Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/ACTIVATE.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/ACTIVATE.sh	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/ACTIVATE.sh	(revision 33547)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+cwd=`pwd`
+
+col=${cwd##*/}
+
+site_with_subdirs=${cwd##*/sites/}
+site=${site_with_subdirs%%/*}
+
+activate.pl -removeold $* -site $site -library_url http://localhost:8383/greenstone3/library $col
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/BUILDCOL.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/BUILDCOL.sh	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/BUILDCOL.sh	(revision 33547)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+cwd=`pwd`
+
+col=${cwd##*/}
+
+site_with_subdirs=${cwd##*/sites/}
+site=${site_with_subdirs%%/*}
+
+buildcol.pl -removeold -site $site $* $col
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/IMPORT.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/IMPORT.sh	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/IMPORT.sh	(revision 33547)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+cwd=`pwd`
+
+col=${cwd##*/}
+
+site_with_subdirs=${cwd##*/sites/}
+site=${site_with_subdirs%%/*}
+
+export PYTHONPATH=/usr/local//lib/python3.7/site-packages/pip/_vendor/
+
+import.pl -removeold -site $site $* $col
+
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml	(revision 33547)
@@ -0,0 +1,413 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <metadataList>
+    <metadata lang="en" name="creator"></metadata>
+    <metadata lang="en" name="maintainer"></metadata>
+    <metadata lang="en" name="public">true</metadata>
+  </metadataList>
+  <displayItemList>
+    <displayItem assigned="true" lang="en" name="name">AMC-Essentia</displayItem>
+    <displayItem assigned="true" lang="en" name="description">
+      &lt;p&gt;
+        This collection shows the capabilities of the
+        &lt;a href="https://essentia.upf.edu/documentation/"&gt;Essentia&lt;/a&gt; DSP library
+        in combination with Greenstone3, based on the 
+        253 MP3 files from 
+        &lt;a href="https://www.australianmusiccentre.com.au/"&gt;AMC&lt;/a&gt;
+      &lt;/p&gt;
+
+      &lt;p&gt;
+        When the digital library collection is built, Essentia is used to compute 
+	a range of audio fetures commonly use in Music Information Retrieval (MIR) for
+	content analysis based techniques.  These features are bound to
+	the document in the digital library correspondig to the source MP3 file.
+      &lt;/p&gt;
+
+    </displayItem>
+  </displayItemList>
+  <search type="lucene">
+    <level name="document">
+      <displayItem lang="en" name="name">document</displayItem>
+    </level>
+<!--
+    <level name="section">
+      <displayItem lang="en" name="name">section</displayItem>
+    </level>
+-->
+    <defaultLevel name="document"/>
+    <index name="dc.Title,dc.Creator,LastFM.LastFMArtistWikiSummary">
+      <displayItem lang="en" name="name">all fields</displayItem>
+    </index>
+    <index name="dc.Title">
+      <displayItem lang="en" name="name">titles</displayItem>
+    </index>
+    <index name="dc.Creator">
+      <displayItem lang="en" name="name">artists</displayItem>
+    </index>
+    <defaultIndex name="dc.Title,dc.Creator,LastFM.LastFMArtistWikiSummary"/>
+    <searchType name="plain"/>
+    <searchType name="simpleform"/>
+    <searchType name="advancedform"/>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document">
+	    <gsf:icon type="document"/>
+	  </gsf:link>
+	</td>
+	<td>
+	  <gsf:switch>
+	    <gsf:metadata name="Title" select="ancestors" separator=": "/>
+	    <gsf:when test="exists">
+	      <gsf:metadata name="Title" select="ancestors" separator=": "/>:
+	    </gsf:when>
+	  </gsf:switch>
+	  <gsf:link type="document">
+	    <gsf:metadata name="Title"/>
+	  </gsf:link>
+	</td>
+      </gsf:template>
+    </format>
+  </search>
+  <infodb type="jdbm"/>
+  <import>
+    <pluginList>
+      <plugin name="ZIPPlugin"/>
+      <plugin name="GreenstoneXMLPlugin"/>
+
+      <plugin name="EmbeddedMetadataPlugin"/>
+      <plugin name="AMCMetadataJSONPlugin"/>
+      
+      <plugin name="MusicIRPlugin">
+	<!--
+            <option name="-compute_mir_features" value="true"/>
+	-->
+	
+	<option name="-compute_essentia_features" value="true"/>
+	<!--
+            <option name="-retrieve_mir_metadata" value="true"/>
+	-->
+          <option name="-enable_cache"/>
+      </plugin>
+
+      <plugin name="TextPlugin"/>
+      <plugin name="HTMLPlugin"/>
+      <plugin name="EmailPlugin"/>
+      <plugin name="PDFPlugin"/>
+      <plugin name="RTFPlugin"/>
+      <plugin name="WordPlugin"/>
+      <plugin name="PostScriptPlugin"/>
+      <plugin name="PowerPointPlugin"/>
+      <plugin name="ExcelPlugin"/>
+      <plugin name="ImagePlugin"/>
+      <plugin name="ISISPlugin"/>
+      <plugin name="NulPlugin"/>
+      <plugin name="MetadataXMLPlugin"/>
+      <plugin name="ArchivesInfPlugin"/>
+      <plugin name="DirectoryPlugin"/>
+    </pluginList>
+  </import>
+  <browse>
+
+		<classifier name="AZCompactList">
+			<option name="-metadata" value="dc.Title;amc.title;ex.amc.title;Title"/>
+			<option name="-mingroup" value="2"/>
+		</classifier>
+		<classifier name="AZCompactList">
+			<option name="-metadata" value="dc.Creator,amc.artist,ex.amc.artist"/>
+			<option name="-buttonname" value="Artists"/>
+			<option name="-mingroup" value="1"/>
+			<option name="-minnesting" value="40"/>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:choose-metadata>
+							<gsf:metadata name="dc.Title"/>
+							<gsf:metadata name="amc.title"/>
+							<gsf:metadata name="exp.Title"/>
+							<gsf:metadata name="Title"/>
+							<gsf:default>Untitled</gsf:default>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode">
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:choose-metadata>
+							<gsf:metadata name="dc.Title"/>
+							<gsf:metadata name="amc.title"/>
+							<gsf:metadata name="exp.Title"/>
+							<gsf:metadata name="Title"/>
+							<gsf:default>Untitled</gsf:default>
+						</gsf:choose-metadata>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode" mode="horizontal">
+				<gsf:link type="horizontal">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
+<!--
+    
+    <classifier name="List">
+      <option name="-metadata" value="dc.Title;Title"/>
+      <option name="-partition_type_within_level" value="approximate_size"/>
+      <option name="-removeprefix" value="&quot;"/>
+    </classifier>
+    <classifier name="AZCompactList">
+      <option name="-metadata" value="dc.Type.genre"/>
+      <option name="-buttonname" value="Genre"/>
+    </classifier>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document">
+	    <gsf:icon type="document"/>
+	  </gsf:link>
+	</td>
+	<td valign="top">
+	  <gsf:metadata name="srclink"/>
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="thumbicon"/>
+	    <gsf:metadata name="srcicon"/>
+	  </gsf:choose-metadata>
+	  <gsf:metadata name="/srclink"/>
+	</td>
+	<td valign="top">
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="dc.Title"/>
+	    <gsf:metadata name="exp.Title"/>
+	    <gsf:metadata name="Title"/>
+	    <gsf:default>Untitled</gsf:default>
+	  </gsf:choose-metadata>
+	  <gsf:switch>
+	    <gsf:metadata name="Source"/>
+	    <gsf:when test="exists">
+	      <br/>
+	      <i>(<gsf:metadata name="Source"/>)</i>
+	    </gsf:when>
+	  </gsf:switch>
+	</td>
+      </gsf:template>
+      <gsf:template match="classifierNode">
+	<td valign="top">
+	  <gsf:link type="classifier">
+	    <gsf:icon type="classifier"/>
+	  </gsf:link>
+	</td>
+	<td valign="top">
+	  <gsf:metadata name="srclink"/>
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="thumbicon"/>
+	    <gsf:metadata name="srcicon"/>
+	  </gsf:choose-metadata>
+	  <gsf:metadata name="/srclink"/>
+	</td>
+	<td valign="top">
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="dc.Title"/>
+	    <gsf:metadata name="exp.Title"/>
+	    <gsf:metadata name="Title"/>
+	    <gsf:default>Untitled</gsf:default>
+	  </gsf:choose-metadata>
+	  <gsf:switch>
+	    <gsf:metadata name="Source"/>
+	    <gsf:when test="exists">
+	      <br/><i>(<gsf:metadata name="Source"/>)</i>
+	    </gsf:when>
+	  </gsf:switch>
+	</td>
+      </gsf:template>
+      <gsf:template match="classifierNode" mode="horizontal">
+	<gsf:link type="horizontal">
+	  <gsf:metadata name="Title"/>
+	</gsf:link>
+      </gsf:template>
+      </format>
+      -->
+</browse>
+
+
+	<display>
+		<format>
+			<gsf:option name="TOC" value="false"/>
+			<gsf:template name="documentHeading">
+			  <!-- title will be dsiplayed in playbar at top of page, so supress showing title here -->
+			  <gsf:script src="interfaces/{$interface_name}/js/direct-edit-source.js"/>
+			  <xsl:call-template name="init-direct-edit"/>
+			</gsf:template>
+			
+			<gsf:template name="documentContentXXX">
+				<xsl:param name="collName"/>
+				<xsl:variable name="docID" select="@docID"/>
+			</gsf:template>
+
+<!--
+    <xsl:variable name="httpCollection"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/></xsl:variable>
+-->
+
+
+
+
+			
+			<xsl:template name="documentContent">
+			  <xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
+			  <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+			  
+			  <xsl:variable name="cgiargFrameOffset">
+			    <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameOffset']/@value"/>
+			  </xsl:variable>
+			  <xsl:variable name="lastfmtrackurl">
+			    <gsf:metadata name="dc.Identifier.lastfmtrackurl"/>
+			  </xsl:variable>
+			  <xsl:variable name="imageUrls">
+			    <gsf:metadata multiple="true" name="EchoNest.Artist-RelatedImage" separator="&amp;quot;, &amp;quot;"/>
+			  </xsl:variable>
+			  <xsl:variable name="echonestid">
+			    <gsf:metadata name="dc.Identifier"/>
+			  </xsl:variable>
+
+			  <!--
+			  <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+			  -->
+			  
+			  <div class="documenttext" style="padding-bottom: 20px; width:100%;"> 
+			    <style>
+			      .doc-metadata td { padding: 7px; }
+			    </style>
+			    <table class="doc-metadata">
+			      <tbody>
+				<tr style="background-color:#eee">
+				  <td>
+				    Title
+				  </td>
+				  <td>
+				    <gsf:metadata name="amc.title"/>
+				  </td>
+				</tr>
+				
+				<tr style="background-color:#fff">
+				  <td>Artist</td>
+				  <td><gsf:metadata name="amc.artist"/></td>
+				</tr>
+				
+				<tr style="background-color:#eee">
+				  <td>Essentia MFCC Features:</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/pessentia.json">Download</a></td>
+				</tr>
+			      </tbody>
+			    </table>
+			  </div>
+
+			  
+			  <div class="documenttext">
+
+
+        <div id="demo">
+            <div id="waveform">
+                <!-- Here be the waveform -->
+		<xsl:text> </xsl:text>
+            </div>
+	    <div id="wave-timeline"><xsl:text> </xsl:text></div>
+
+	    <div>
+              <div class="controls">
+		<button class="btn btn-primary" data-action="play">
+                  <i class="glyphicon glyphicon-play"></i>
+                  Play /
+                  <i class="glyphicon glyphicon-pause"></i>
+                  Pause
+		</button>
+              </div>
+	    </div>
+        </div>
+					   
+	<gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/audio.mp3</gsf:variable>
+
+	<script src="ext/audio/wavesurfer-player.js">
+	  <xsl:text>  </xsl:text>
+	</script>
+	<gsf:script>
+	  document.addEventListener('DOMContentLoaded', function() {
+	    // Load audio from URL
+	    wavesurfer.load(gs.variables.mp3url);
+	  });
+	</gsf:script>
+			  </div>
+			</xsl:template>
+
+		</format>
+	</display>
+
+  <replaceListRef id="gs2-standard"/>
+  <serviceRackList>
+    <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
+    <serviceRack name="OAIPMH">
+      <ListMetadataFormats>
+	<!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
+	The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
+	-->
+	<metadataFormat metadataPrefix="oai_dc">
+	  <metadataPrefix>oai_dc</metadataPrefix>
+	  <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
+	  <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
+	  <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>              
+	  -->
+	  <mappingList>
+	    <!-- 
+	    The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B> 
+	    The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
+	    searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
+	    number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
+	    if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
+	    
+	    **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
+	    
+	    **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
+	    -->
+	    <mapping>dc.Title,Title</mapping>
+	    <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
+	  </mappingList>
+	</metadataFormat>
+      </ListMetadataFormats>
+    </serviceRack> 
+  </serviceRackList>
+</CollectionConfig>
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml.checkpt01
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml.checkpt01	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/etc/collectionConfig.xml.checkpt01	(revision 33547)
@@ -0,0 +1,723 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <metadataList>
+    <metadata lang="en" name="creator"></metadata>
+    <metadata lang="en" name="maintainer"></metadata>
+    <metadata lang="en" name="public">true</metadata>
+  </metadataList>
+  <displayItemList>
+    <displayItem assigned="true" lang="en" name="name">AMC-Essentia</displayItem>
+    <displayItem assigned="true" lang="en" name="description">
+      &lt;p&gt;
+        This collection shows the capabilities of the
+        &lt;a href="https://essentia.upf.edu/documentation/"&gt;Essentia&lt;/a&gt; DSP library
+        in combination with Greenstone3, based on the 
+        253 MP3 files from 
+        &lt;a href="https://www.australianmusiccentre.com.au/"&gt;AMC&lt;/a&gt;
+      &lt;/p&gt;
+
+      &lt;p&gt;
+        When the digital library collection is built, Essentia is used to compute 
+	a range of audio fetures commonly use in Music Information Retrieval (MIR) for
+	content analysis based techniques.  These features are bound to
+	the document in the digital library correspondig to the source MP3 file.
+      &lt;/p&gt;
+
+    </displayItem>
+  </displayItemList>
+  <search type="lucene">
+    <level name="document">
+      <displayItem lang="en" name="name">document</displayItem>
+    </level>
+<!--
+    <level name="section">
+      <displayItem lang="en" name="name">section</displayItem>
+    </level>
+-->
+    <defaultLevel name="document"/>
+    <index name="dc.Title,dc.Creator,LastFM.LastFMArtistWikiSummary">
+      <displayItem lang="en" name="name">all fields</displayItem>
+    </index>
+    <index name="dc.Title">
+      <displayItem lang="en" name="name">titles</displayItem>
+    </index>
+    <index name="dc.Creator">
+      <displayItem lang="en" name="name">artists</displayItem>
+    </index>
+    <defaultIndex name="dc.Title,dc.Creator,LastFM.LastFMArtistWikiSummary"/>
+    <searchType name="plain"/>
+    <searchType name="simpleform"/>
+    <searchType name="advancedform"/>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document">
+	    <gsf:icon type="document"/>
+	  </gsf:link>
+	</td>
+	<td>
+	  <gsf:switch>
+	    <gsf:metadata name="Title" select="ancestors" separator=": "/>
+	    <gsf:when test="exists">
+	      <gsf:metadata name="Title" select="ancestors" separator=": "/>:
+	    </gsf:when>
+	  </gsf:switch>
+	  <gsf:link type="document">
+	    <gsf:metadata name="Title"/>
+	  </gsf:link>
+	</td>
+      </gsf:template>
+    </format>
+  </search>
+  <infodb type="jdbm"/>
+  <import>
+    <pluginList>
+      <plugin name="ZIPPlugin"/>
+      <plugin name="GreenstoneXMLPlugin"/>
+
+      <plugin name="EmbeddedMetadataPlugin"/>
+      <plugin name="AMCMetadataJSONPlugin"/>
+      
+      <plugin name="MusicIRPlugin">
+	<!--
+            <option name="-compute_mir_features" value="true"/>
+	-->
+	
+	<option name="-compute_essentia_features" value="true"/>
+	<!--
+            <option name="-retrieve_mir_metadata" value="true"/>
+	-->
+          <option name="-enable_cache"/>
+      </plugin>
+
+      <plugin name="TextPlugin"/>
+      <plugin name="HTMLPlugin"/>
+      <plugin name="EmailPlugin"/>
+      <plugin name="PDFPlugin"/>
+      <plugin name="RTFPlugin"/>
+      <plugin name="WordPlugin"/>
+      <plugin name="PostScriptPlugin"/>
+      <plugin name="PowerPointPlugin"/>
+      <plugin name="ExcelPlugin"/>
+      <plugin name="ImagePlugin"/>
+      <plugin name="ISISPlugin"/>
+      <plugin name="NulPlugin"/>
+      <plugin name="MetadataXMLPlugin"/>
+      <plugin name="ArchivesInfPlugin"/>
+      <plugin name="DirectoryPlugin"/>
+    </pluginList>
+  </import>
+  <browse>
+
+		<classifier name="AZCompactList">
+			<option name="-metadata" value="dc.Title;amc.title;ex.amc.title;Title"/>
+			<option name="-mingroup" value="2"/>
+		</classifier>
+		<classifier name="AZCompactList">
+			<option name="-metadata" value="dc.Creator,amc.artist,ex.amc.artist"/>
+			<option name="-buttonname" value="Artists"/>
+			<option name="-mingroup" value="1"/>
+			<option name="-minnesting" value="40"/>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:choose-metadata>
+							<gsf:metadata name="dc.Title"/>
+							<gsf:metadata name="amc.title"/>
+							<gsf:metadata name="exp.Title"/>
+							<gsf:metadata name="Title"/>
+							<gsf:default>Untitled</gsf:default>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode">
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:choose-metadata>
+							<gsf:metadata name="dc.Title"/>
+							<gsf:metadata name="amc.title"/>
+							<gsf:metadata name="exp.Title"/>
+							<gsf:metadata name="Title"/>
+							<gsf:default>Untitled</gsf:default>
+						</gsf:choose-metadata>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode" mode="horizontal">
+				<gsf:link type="horizontal">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
+<!--
+    
+    <classifier name="List">
+      <option name="-metadata" value="dc.Title;Title"/>
+      <option name="-partition_type_within_level" value="approximate_size"/>
+      <option name="-removeprefix" value="&quot;"/>
+    </classifier>
+    <classifier name="AZCompactList">
+      <option name="-metadata" value="dc.Type.genre"/>
+      <option name="-buttonname" value="Genre"/>
+    </classifier>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document">
+	    <gsf:icon type="document"/>
+	  </gsf:link>
+	</td>
+	<td valign="top">
+	  <gsf:metadata name="srclink"/>
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="thumbicon"/>
+	    <gsf:metadata name="srcicon"/>
+	  </gsf:choose-metadata>
+	  <gsf:metadata name="/srclink"/>
+	</td>
+	<td valign="top">
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="dc.Title"/>
+	    <gsf:metadata name="exp.Title"/>
+	    <gsf:metadata name="Title"/>
+	    <gsf:default>Untitled</gsf:default>
+	  </gsf:choose-metadata>
+	  <gsf:switch>
+	    <gsf:metadata name="Source"/>
+	    <gsf:when test="exists">
+	      <br/>
+	      <i>(<gsf:metadata name="Source"/>)</i>
+	    </gsf:when>
+	  </gsf:switch>
+	</td>
+      </gsf:template>
+      <gsf:template match="classifierNode">
+	<td valign="top">
+	  <gsf:link type="classifier">
+	    <gsf:icon type="classifier"/>
+	  </gsf:link>
+	</td>
+	<td valign="top">
+	  <gsf:metadata name="srclink"/>
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="thumbicon"/>
+	    <gsf:metadata name="srcicon"/>
+	  </gsf:choose-metadata>
+	  <gsf:metadata name="/srclink"/>
+	</td>
+	<td valign="top">
+	  <gsf:choose-metadata>
+	    <gsf:metadata name="dc.Title"/>
+	    <gsf:metadata name="exp.Title"/>
+	    <gsf:metadata name="Title"/>
+	    <gsf:default>Untitled</gsf:default>
+	  </gsf:choose-metadata>
+	  <gsf:switch>
+	    <gsf:metadata name="Source"/>
+	    <gsf:when test="exists">
+	      <br/><i>(<gsf:metadata name="Source"/>)</i>
+	    </gsf:when>
+	  </gsf:switch>
+	</td>
+      </gsf:template>
+      <gsf:template match="classifierNode" mode="horizontal">
+	<gsf:link type="horizontal">
+	  <gsf:metadata name="Title"/>
+	</gsf:link>
+      </gsf:template>
+      </format>
+      -->
+</browse>
+
+
+	<display>
+		<format>
+			<gsf:option name="TOC" value="false"/>
+			<gsf:template name="documentHeading">
+			  <!-- title will be dsiplayed in playbar at top of page, so supress showing title here -->
+			  <gsf:script src="interfaces/{$interface_name}/js/direct-edit-source.js"/>
+			  <xsl:call-template name="init-direct-edit"/>
+			</gsf:template>
+			
+			<gsf:template name="documentContentXXX">
+				<xsl:param name="collName"/>
+				<xsl:variable name="docID" select="@docID"/>
+			</gsf:template>
+
+<!--
+    <xsl:variable name="httpCollection"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/></xsl:variable>
+-->
+
+
+
+
+			
+			<xsl:template name="documentContent">
+			  <xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
+			  <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+			  
+			  <xsl:variable name="cgiargFrameOffset">
+			    <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameOffset']/@value"/>
+			  </xsl:variable>
+			  <xsl:variable name="lastfmtrackurl">
+			    <gsf:metadata name="dc.Identifier.lastfmtrackurl"/>
+			  </xsl:variable>
+			  <xsl:variable name="imageUrls">
+			    <gsf:metadata multiple="true" name="EchoNest.Artist-RelatedImage" separator="&amp;quot;, &amp;quot;"/>
+			  </xsl:variable>
+			  <xsl:variable name="echonestid">
+			    <gsf:metadata name="dc.Identifier"/>
+			  </xsl:variable>
+
+			  <!--
+			  <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+			  -->
+			  
+			  <div class="documenttext" style="padding-bottom: 20px; width:100%;"> 
+			    <style>
+			      .doc-metadata td { padding: 7px; }
+			    </style>
+			    <table class="doc-metadata">
+			      <tbody>
+				<tr style="background-color:#eee">
+				  <td>
+				    Title
+				  </td>
+				  <td>
+				    <gsf:metadata name="amc.title"/>
+				  </td>
+				</tr>
+				
+				<tr style="background-color:#fff">
+				  <td>Artist</td>
+				  <td><gsf:metadata name="amc.artist"/></td>
+				</tr>
+				
+				<tr style="background-color:#eee">
+				  <td>Essentia MFCC Features:</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/pessentia.json">Download</a></td>
+				</tr>
+			      </tbody>
+			    </table>
+			  </div>
+
+			  
+			  <div class="documenttext">
+
+					<ul class="playlist">
+					        <style>
+						  ul.playlist li {
+						    background-color: #87A41C;
+						  }
+
+						  ul.playlist li.sm2_playing {
+						    background-color: #657C0D;
+						  }
+
+						  ul.playlist li:hover {
+						    background-color: #778410;
+						  }
+
+						</style>
+						<li class="rounded">
+							<a href="{$httpCollection}/index/assoc/{$assocFilePath}/audio.mp3" id="mysong">Play all of: <gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="amc.title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/><gsf:default>Untitled</gsf:default></gsf:choose-metadata></a>
+						</li>
+					</ul>
+
+					   
+					<gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/audio.mp3</gsf:variable>
+
+					<gsf:script>
+					  var player = AV.Player.fromURL(gs.variables.mp3url);
+					  player.play();
+					</gsf:script>
+
+
+					<ul style="font-size: 80%; margin-top: 10px; font-style: italics; ">
+					  <li>Click on the green bar above <b>to start</b> playing.</li>
+					  <li>Click on it again, to pause.</li>
+					</ul>
+
+					<span style="display: none;" id="mysongCurrentPos">0</span>
+					<span style="display: none;" id="mysongOffset">0</span>					
+					
+					<script>
+						<xsl:text disable-output-escaping="yes">if (window.location.toString().match(/fancyplayer/i)) {
+      PP_CONFIG.usePeakData = true;
+      PP_CONFIG.useEQData = true;
+      PP_CONFIG.useFavIcon = true;
+    }
+
+    function playFromOffset(id,frameOffset) 
+    {
+      var msecOffset = 250 * frameOffset; 
+      idElem = document.getElementById(id);
+      pagePlayer.handleClick({target:idElem}); /* fake a click */
+      soundManager.stopAll();
+      /* soundManager.setPosition(id,5000); */
+      soundManager.play(id,{position: msecOffset});
+    }
+
+    function preSubmit(form) 
+    {
+      var currentPosElem = document.getElementById("mysongCurrentPos");
+      var offsetInMSecs = currentPosElem.getAttribute("offsetInMSecs");
+      var frameOffset = Math.round(offsetInMSecs/250.0);
+      form.elements["s1.offset"].value = frameOffset;
+
+      var lengthInSecs = document.getElementById("mysongWindowDuration").innerHTML;
+
+      var frameLength = Math.round(lengthInSecs*1000/250.0);
+      form.elements["s1.length"].value = frameLength;
+
+      return true;
+    }</xsl:text>
+						<xsl:choose>
+							<xsl:when test="$cgiargFrameOffset != '-1'">
+								<xsl:text disable-output-escaping="yes">var allOffsets = "";
+      var frameOffsetStr="</xsl:text>
+								<xsl:value-of select="$cgiargFrameOffset"/>
+								<xsl:text disable-output-escaping="yes">";
+      var frameOffsetList = frameOffsetStr.split(",");
+      frameOffsetList.sort(function(a,b){return a-b});
+
+      for (i=0; i &lt; frameOffsetList.length; i++) {
+        var frameOffset = frameOffsetList[i];
+        var offsetInSecs=(250*frameOffset)/1000.0;
+
+        if (i &gt; 0) { allOffsets += ", "; }
+
+        var span_attr = "class=\"spanbuttonoff\" style=\"cursor: pointer;\"";
+        span_attr += " onmouseover=\"this.className='spanbuttonon'\"";
+        span_attr += " onmouseout=\"this.className='spanbuttonoff'\"";
+        span_attr += " onclick=\"playFromOffset('mysong'," + frameOffset + ")\"";
+
+        allOffsets += "&lt;span " + span_attr + "&gt;" + offsetInSecs + "&lt;/span&gt;";
+      }
+
+      var jumpDurationSpan = document.getElementById("mysongOffset");
+      if (jumpDurationSpan != null) {
+         jumpDurationSpan.innerHTML = allOffsets + " secs";
+      }								</xsl:text>
+							</xsl:when>
+							<xsl:otherwise>var frameOffset=-1;</xsl:otherwise>
+						</xsl:choose>
+					</script>
+				</div>
+			</xsl:template>
+<!--
+Creates a header for the html page
+-->
+			<xsl:template name="create-html-headerXXXX">
+				<title><xsl:call-template name="pageTitle"/> ::<xsl:call-template name="siteName"/></title>
+				<link href="interfaces/{$interface_name}/style/core.css" rel="stylesheet" type="text/css"/>
+				<link href="favicon.ico" rel="shortcut icon"/>
+<!--
+Hook in Seaweed:  seamless web editing
+-->
+				<script src="interfaces/{$interface_name}/js/direct-edit-source.js" type="text/javascript">
+					<xsl:text>					</xsl:text>				</script>
+<!--
+Page player core CSS
+-->
+				<link href="ext/audioDB/css/page-player.css" rel="stylesheet" type="text/css"/>
+<!--
+soundManager.useFlashBlock: related CSS
+-->
+				<link href="ext/audioDB/css/flashblock.css" rel="stylesheet" type="text/css"/>
+<!--
+optional: annotations/sub-tracks/notes, and alternate themes
+-->
+				<link href="ext/audioDB/css/optional-annotations.css" rel="stylesheet" type="text/css"/>
+				<link href="ext/audioDB/css/optional-themes.css" rel="stylesheet" type="text/css"/>
+				<style type="text/css">ul.playlist li .comment {font-size:0.65em;opacity:0.5}</style>
+<!--
+soundManager API
+-->
+				<script src="ext/audioDB/script/soundmanager2-nodebug.js">
+					<xsl:text>					</xsl:text>				</script>
+				<script>
+					<xsl:text disable-output-escaping="yes">/* init Seaweed */
+
+
+    de.onready(function() {
+      try {
+        de.init();
+
+        de.doc.declarePropertySets({
+                offset: {
+                    phMarkup: '[Enter offset value]',
+                    name: "offset"
+                }
+           });
+      }
+      catch (err) {
+        alert("Seaweed failed to initialise: " + err.message);
+      }
+   });
+
+/* --------
+
+  Config override: This demo uses shiny flash 9 stuff, overwriting Flash 8-based defaults
+  Alternate PP_CONFIG object must be defined before soundManager.onready()/onload() fire.
+  Alternately, edit the config in page-player.js to simply use the values below by default
+
+-------- */
+
+/* demo only, but you can use these settings too.. */
+soundManager.flashVersion = 9;
+soundManager.preferFlash = true;        /* for visualization effects */
+soundManager.useHighPerformance = true; /* keep flash on screen, boost performance */
+soundManager.wmode = "transparent";     /* transparent SWF, if possible */
+soundManager.useFastPolling = true;     /* increased JS callback frequency */
+soundManager.url = "ext/audioDB/swf/";
+
+/* custom page player configuration */
+
+var PP_CONFIG = {
+  autoStart: false,      /* begin playing first sound when page loads */
+  playNext: false,        /* stop after one sound, or play through list until end */
+  useThrottling: false,  /* try to rate-limit potentially-expensive calls (eg. dragging position around) */
+  usePeakData: true,     /* [Flash 9 only] whether or not to show peak data (left/right channel values) - nor noticable on CPU */
+  useWaveformData: false,/* [Flash 9 only] show raw waveform data - WARNING: LIKELY VERY CPU-HEAVY */
+  useEQData: false,      /* [Flash 9 only] show EQ (frequency spectrum) data */
+  useFavIcon: false,     /* try to apply peakData to address bar (Firefox + Opera) - performance note: appears to make Firefox 3 do some temporary, heavy disk access/swapping/garbage collection at first(?) - may be too heavy on CPU */
+  useMovieStar: true     /* Flash 9.0r115+ only: Support for a subset of MPEG4 formats. */
+}</xsl:text>
+				</script>
+<!--
+Page player main script
+-->
+				<script src="ext/audioDB/script/page-player.js">
+					<xsl:text>					</xsl:text>				</script>
+<!--
+optional: Metadata UI prototype (not needed unless you want the bottom-most demo bits)
+-->
+				<script src="ext/audioDB/script/optional-page-player-metadata.js">
+					<xsl:text>					</xsl:text>				</script>
+			</xsl:template>
+
+
+
+			<xsl:template name="additionalHeaderContent">
+
+<!--
+Page player core CSS
+-->
+				<link href="ext/audioDB/css/page-player.css" rel="stylesheet" type="text/css"/>
+<!--
+soundManager.useFlashBlock: related CSS
+-->
+				<link href="ext/audioDB/css/flashblock.css" rel="stylesheet" type="text/css"/>
+<!--
+optional: annotations/sub-tracks/notes, and alternate themes
+-->
+				<link href="ext/audioDB/css/optional-annotations.css" rel="stylesheet" type="text/css"/>
+				<link href="ext/audioDB/css/optional-themes.css" rel="stylesheet" type="text/css"/>
+				<style type="text/css">ul.playlist li .comment {font-size:0.65em;opacity:0.5}</style>
+<!--
+soundManager API
+-->
+				<script src="ext/audioDB/script/soundmanager2-nodebug.js">
+					<xsl:text>					</xsl:text>				</script>
+				<script>
+					<xsl:text disable-output-escaping="yes">
+
+/* --------
+
+  Config override: This demo uses shiny flash 9 stuff, overwriting Flash 8-based defaults
+  Alternate PP_CONFIG object must be defined before soundManager.onready()/onload() fire.
+  Alternately, edit the config in page-player.js to simply use the values below by default
+
+-------- */
+
+/* demo only, but you can use these settings too.. */
+soundManager.flashVersion = 9;
+soundManager.preferFlash = true;        /* for visualization effects */
+soundManager.useHighPerformance = true; /* keep flash on screen, boost performance */
+soundManager.wmode = "transparent";     /* transparent SWF, if possible */
+soundManager.useFastPolling = true;     /* increased JS callback frequency */
+soundManager.url = "ext/audioDB/swf/";
+
+/* custom page player configuration */
+
+var PP_CONFIG = {
+  autoStart: false,      /* begin playing first sound when page loads */
+  playNext: false,        /* stop after one sound, or play through list until end */
+  useThrottling: false,  /* try to rate-limit potentially-expensive calls (eg. dragging position around) */
+  usePeakData: true,     /* [Flash 9 only] whether or not to show peak data (left/right channel values) - nor noticable on CPU */
+  useWaveformData: false,/* [Flash 9 only] show raw waveform data - WARNING: LIKELY VERY CPU-HEAVY */
+  useEQData: false,      /* [Flash 9 only] show EQ (frequency spectrum) data */
+  useFavIcon: false,     /* try to apply peakData to address bar (Firefox + Opera) - performance note: appears to make Firefox 3 do some temporary, heavy disk access/swapping/garbage collection at first(?) - may be too heavy on CPU */
+  useMovieStar: true     /* Flash 9.0r115+ only: Support for a subset of MPEG4 formats. */
+}</xsl:text>
+				</script>
+<!--
+Page player main script
+-->
+				<script src="ext/audioDB/script/page-player.js">
+					<xsl:text>					</xsl:text>				</script>
+<!--
+optional: Metadata UI prototype (not needed unless you want the bottom-most demo bits)
+-->
+				<script src="ext/audioDB/script/optional-page-player-metadata.js">
+					<xsl:text>					</xsl:text>				</script>
+			</xsl:template>
+
+
+
+
+
+		</format>
+	</display>
+<!--
+  <display>
+    <format>
+      <gsf:option name="TOC" value="false"/>
+
+  <xsl:template name="documentContent">
+
+    <xsl:variable name="httpCollection"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/></xsl:variable>
+
+    <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+
+    <xsl:variable name="lastfmtrackurl">
+      <gsf:metadata name="dc.Identifier.lastfmtrackurl"/>
+    </xsl:variable>
+
+    <xsl:variable name="echonestid">
+      <gsf:metadata name="dc.Identifier"/>
+    </xsl:variable>
+
+    <div class="documenttext"> 
+
+<table>
+  <tbody>
+    <tr style="background-color:#afa">
+      <td>
+	  Title
+      </td>
+      <td>
+	  <gsf:metadata name="dc.Title"/>
+      </td>
+    </tr>
+
+    <tr style="background-color:#ffa">
+	<td>Album Title</td>
+        <td><gsf:metadata name="dc.Title.albumtitle"/></td>
+    </tr>
+
+    <tr style="background-color:#afa">
+	<td>Artist</td>
+        <td><gsf:metadata name="dc.Creator"/></td>
+    </tr>
+
+    <tr style="background-color:#ffa" valign='top'>
+	<td>Artist Summary</td>
+        <td><i><gsf:metadata name="LastFM.LastFMArtistWikiSummary"/></i></td>
+    </tr>
+
+    <tr style="background-color:#afa">
+	<td>Identifier</td>
+        <td>
+             <gsf:metadata name="dc.Identifier"/><br />
+
+             <xsl:copy-of select="$lastfmtrackurl"/><br />
+             (<a href="{$lastfmtrackurl}" target="#lastfm">Visit @ LastFM</a>)
+        </td>
+    </tr>
+
+    <tr style="background-color:#ffa">
+	<td>jAudio Features</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/jaudio.xml">download ACE XML feature values file</a></td>
+    </tr>
+
+    <tr style="background-color:#afa">
+	<td>jSongMiner Metadata</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/jsongminer.xml">download ACE XML classifications file</a></td>
+    </tr>
+
+
+
+
+  </tbody>
+</table>
+
+    </div>
+  </xsl:template>
+
+
+    </format>
+
+  </display>
+
+-->
+
+  <replaceListRef id="gs2-standard"/>
+  <serviceRackList>
+    <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
+    <serviceRack name="OAIPMH">
+      <ListMetadataFormats>
+	<!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
+	The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
+	-->
+	<metadataFormat metadataPrefix="oai_dc">
+	  <metadataPrefix>oai_dc</metadataPrefix>
+	  <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
+	  <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
+	  <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>              
+	  -->
+	  <mappingList>
+	    <!-- 
+	    The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B> 
+	    The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
+	    searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
+	    number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
+	    if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
+	    
+	    **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
+	    
+	    **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
+	    -->
+	    <mapping>dc.Title,Title</mapping>
+	    <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
+	  </mappingList>
+	</metadataFormat>
+      </ListMetadataFormats>
+    </serviceRack> 
+  </serviceRackList>
+</CollectionConfig>
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-footer.html
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-footer.html	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-footer.html	(revision 33547)
@@ -0,0 +1,232 @@
+<!DOCTYPE html>
+<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
+<!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
+<!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
+<!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
+<!--[if (gt IE 9)|!(IE)]><!-->
+<html class=""><!--<![endif]--><head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<meta name="robots" content="index, follow">
+<meta name="language" content="en">
+
+    <title>Australian Music Centre : Digital Library</title>
+    
+            <script type="text/javascript">
+        
+            //<![CDATA[
+
+            amcfe = window.amcfe ? window.amcfe : {};
+            amcfe.geoIP = window.amcfe.geoIP ? amcfe.geoIP : {};
+            amcfe.geoIP.continentCode = 'OC';
+            amcfe.geoIP.countryCode = 'NZ';
+            amcfe.geoIP.regionCode = 'G1';
+            amcfe.geoIP.city = 'Hamilton';
+            
+            // ]]>
+        </script> 
+    <link rel="shortcut icon" href="http://www.australianmusiccentre.com.au/favicon.ico">
+    
+    <script type="text/javascript" src="support/jquery-1.js"></script>
+<script type="text/javascript" src="support/hoverIntent-r7.js"></script>
+<script type="text/javascript" src="support/superfish-1.js"></script>
+<script type="text/javascript" src="support/simple-lightbox.js"></script>
+<script type="text/javascript" src="support/swfobject.js"></script>
+<script type="text/javascript" src="support/common110825.js"></script>
+<script type="text/javascript" src="support/countries.js"></script>
+    
+    <link rel="stylesheet" type="text/css" media="screen" href="support/main160201.css">
+<link rel="stylesheet" type="text/css" media="screen" href="support/simplelightbox.css">
+    
+    <!--<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />-->
+    
+    <!--[if IE]>
+    
+        <script type="text/javascript" src="/lib/jquery/jquery.corner.js"></script>
+        
+        <script type="text/javascript">
+
+            $(document).ready(function()
+            {
+            
+                // Rounded Corners for IE
+                $(".corner").corner('5px');
+            
+            });
+            
+        </script>
+        
+        <link rel="stylesheet" href="/css/ie090519.css" media="screen, projection" type="text/css" />
+    
+    <![endif]-->
+    
+    <!--[if IE 6]>
+    
+        <script type="text/javascript" src="/js/DD_belatedPNG_0.0.7a-min.js"></script>
+
+        <script type="text/javascript">
+        //<![CDATA[
+
+            DD_belatedPNG.fix('.png_bg', 'img', '#content');
+            
+        //]]>
+        </script>
+        
+        <link rel="stylesheet" href="/css/ielte6091113.css" media="screen, projection" />
+        
+                
+    <![endif]-->
+    
+    <script type="text/javascript">
+    
+        $(document).ready(function() {
+            
+            $("#quick_search_submit").mouseover(function() {
+                
+                $(this).attr({ src: '/images/bg-search-submit-sml-hover.gif' });
+                
+            }).mouseout(function() {
+                
+                $(this).attr({ src: '/images/bg-search-submit-sml.gif' }); 
+                
+            });
+            
+        });
+    
+    </script>
+
+</head>
+
+<body>
+
+
+    <div id="wrapper">
+    
+            
+    
+        <hr class="hidden">
+        
+        <div id="footer">
+        
+            <div class="inner">
+        
+                <dl class="first">
+                
+                    <dt><a href="http://www.australianmusiccentre.com.au/search" title="Find music">Find music</a></dt>
+                        
+                    <dd><a href="http://www.australianmusiccentre.com.au/introductions" title="Introductions to Australian music" class="first">Introductions</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/artists" title="Represented artists">Artists</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/subjectnavigator" title="Subject navigator">Subjects</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/repertoirenavigator" title="Instrumentation navigator">Instrumentations</a></dd>
+        
+                </dl>
+                
+                <dl>
+                
+                    <dt><a href="http://www.australianmusiccentre.com.au/resonate" title="Resonate magazine">Magazine</a></dt>
+        
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/news" title="News" class="first">News</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/reviews" title="Reviews">Reviews</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/blogs" title="Blogs">Blogs</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/features" title="Features">Features</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/opportunities" title="Opportunities">Opportunities</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/journal" title="Bi-annual journal">Journal</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/resonate/about" title="About">About</a></dd>
+                </dl>
+        
+                <dl>
+                
+                    <dt><a href="http://www.australianmusiccentre.com.au/guides/" title="Pathways">Pathways</a></dt>
+                    
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/students" title="for Students" class="first">Students</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/teachers" title="for Teachers">Teachers</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/performers" title="for Performers">Performers</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/composers-soundartists-improvisers" title="for Composers, improvisers &amp; sound artists">Composers</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/composers-soundartists-improvisers" title="for Composers, improvisers &amp; sound artists">Improvisers</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/composers-soundartists-improvisers" title="for Composers, improvisers &amp; sound artists">Sound artists</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/guides/" title="Introductions to Australian music">Introductions</a></dd>
+        
+                </dl>
+        
+                <dl>
+        
+                    <dt><a href="http://www.australianmusiccentre.com.au/calendar/" title="Calendar">Calendar</a></dt>
+        
+                    <dd><a href="http://www.australianmusiccentre.com.au/calendar/" title="View calendar" class="first">View calendar</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/contribute/newEvent" title="Add an event">Add event</a></dd>
+        
+                </dl>
+                
+                <dl>
+                
+                    <dt><a href="http://www.australianmusiccentre.com.au/shop" title="Shop">Shop</a></dt>
+                    
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/cds" title="CDs" class="first">CDs</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/mp3s" title="Mp3s">Mp3s</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/digitalsheetmusic" title="Digital sheet music">Digital sheet music</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/sheetmusic" title="Sheet music">Sheet music</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/books" title="Books">Books</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/shop/education" title="Educational resources">Education resources</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/cart/" title="View cart">View cart</a></dd>
+                    
+                </dl>
+                
+                <dl class="last">
+                
+                    <dt><a href="http://www.australianmusiccentre.com.au/about" title="About">About</a></dt>
+        
+                    <dd><a href="http://www.australianmusiccentre.com.au/about" title="About the AMC" class="first">About the AMC</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/projects" title="Projects &amp; awards">Projects</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/projects" title="Projects &amp; awards">Awards</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/publishing" title="Publishing">Publishing</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/representation" title="Artist representation">Representation</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/library" title="Library">Library</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/membership" title="Membership">Membership</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/funding" title="Funding">Funding</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/sponsors" title="Sponsors &amp; Donors">Sponsors</a></dd>
+                    <dd><a href="http://www.australianmusiccentre.com.au/about/sponsors" title="Sponsors &amp; Donors">Donors</a></dd>
+                    
+        
+                </dl>
+                
+                <div class="overflow clear">
+    
+                    <p class="left">
+                        All content Â© 2016 Australian Music Centre Ltd | ABN 52 001 250 595<br>
+                        All prices are in Australian dollars and are inclusive of GST<br>
+                        Ph +61 2 9935 7805 or Toll free 1300 651 834 | <a href="http://www.australianmusiccentre.com.au/about/terms">Terms &amp; conditions</a> | <a href="http://www.australianmusiccentre.com.au/about/privacy">Privacy policy</a>                    </p>
+                    
+                    <p class="right" style="margin-top:10px;">
+                    
+                        <a href="http://www.iamic.net/" id="logo-iamic" title="IAMIC">IAMIC</a>
+                        <a href="http://www.iscm.org/" id="logo-iscm" title="ISCM">ISCM</a>
+                        
+                    </p>
+                    
+                </div>
+                
+            </div>
+        
+        </div>
+        
+    </div>
+    
+    <span id="page_bg" class="png_bg">&nbsp;</span>
+
+
+<script type="text/javascript">
+//<![CDATA[
+var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");
+document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+//]]>
+</script><script src="support/ga.js" type="text/javascript"></script>
+<script type="text/javascript">
+//<![CDATA[
+var pageTracker=_gat._getTracker("UA-8167875-1");
+pageTracker._initData();
+pageTracker._trackPageview();
+//]]>
+</script>
+
+</body></html>
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-header.html
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-header.html	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/amc-header.html	(revision 33547)
@@ -0,0 +1,296 @@
+<!DOCTYPE html>
+<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
+<!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
+<!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
+<!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
+<!--[if (gt IE 9)|!(IE)]><!-->
+<html class=""><!--<![endif]--><head>
+    <basexx href="http://www.australianmusiccentre.com.au">
+
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+    <meta name="title" content="Australian Music Centre : Digital Libary">
+
+<meta name="robots" content="index, follow">
+<meta name="language" content="en">
+
+    <title>Australian Music Centre : Digital Library</title>
+    
+            <script type="text/javascript">
+        
+            //<![CDATA[
+
+            amcfe = window.amcfe ? window.amcfe : {};
+            amcfe.geoIP = window.amcfe.geoIP ? amcfe.geoIP : {};
+            amcfe.geoIP.continentCode = 'OC';
+            amcfe.geoIP.countryCode = 'NZ';
+            amcfe.geoIP.regionCode = 'G1';
+            amcfe.geoIP.city = 'Hamilton';
+            
+            // ]]>
+        </script> 
+    <link rel="shortcut icon" href="http://www.australianmusiccentre.com.au/favicon.ico">
+    
+    <script type="text/javascript" src="support/jquery-1.js"></script>
+<script type="text/javascript" src="support/hoverIntent-r7.js"></script>
+<script type="text/javascript" src="support/superfish-1.js"></script>
+<script type="text/javascript" src="support/simple-lightbox.js"></script>
+<script type="text/javascript" src="support/swfobject.js"></script>
+<script type="text/javascript" src="support/common110825.js"></script>
+<script type="text/javascript" src="support/countries.js"></script>
+    
+    <link rel="stylesheet" type="text/css" media="screen" href="support/main160201.css">
+<link rel="stylesheet" type="text/css" media="screen" href="support/simplelightbox.css">
+    
+    <!--<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />-->
+    
+    <!--[if IE]>
+    
+        <script type="text/javascript" src="/lib/jquery/jquery.corner.js"></script>
+        
+        <script type="text/javascript">
+
+            $(document).ready(function()
+            {
+            
+                // Rounded Corners for IE
+                $(".corner").corner('5px');
+            
+            });
+            
+        </script>
+        
+        <link rel="stylesheet" href="/css/ie090519.css" media="screen, projection" type="text/css" />
+    
+    <![endif]-->
+    
+    <!--[if IE 6]>
+    
+        <script type="text/javascript" src="/js/DD_belatedPNG_0.0.7a-min.js"></script>
+
+        <script type="text/javascript">
+        //<![CDATA[
+
+            DD_belatedPNG.fix('.png_bg', 'img', '#content');
+            
+        //]]>
+        </script>
+        
+        <link rel="stylesheet" href="/css/ielte6091113.css" media="screen, projection" />
+        
+                
+    <![endif]-->
+    
+    <script type="text/javascript">
+    
+        $(document).ready(function() {
+            
+            $("#quick_search_submit").mouseover(function() {
+                
+                $(this).attr({ src: '/images/bg-search-submit-sml-hover.gif' });
+                
+            }).mouseout(function() {
+                
+                $(this).attr({ src: '/images/bg-search-submit-sml.gif' }); 
+                
+            });
+            
+        });
+    
+    </script>
+
+</head>
+
+<body>
+
+    <ul id="access_options">
+    
+        <li><a href="#nav">Skip to navigation</a></li>
+        <li><a href="#content">Skip to content</a></li>
+        
+    </ul>
+
+    <div id="wrapper">
+    
+        <div id="login_cart">
+        
+            <div class="inner">
+            
+                            
+                <div class="col_6 col_first">
+                
+                    <h3>Login</h3>
+                    
+                    <p>Enter your username and password</p>
+                    
+                    <form action="https://www.australianmusiccentre.com.au/myaccount/login" method="post">
+                        
+                        <p>
+                            <input id="login_username" name="login[username]" type="text">
+                        </p>
+                        
+                        <p>
+                            <input id="login_password" name="login[password]" type="password">
+                        </p>
+                    
+                        <p>
+                            <input class="submit" value="Login" type="submit">
+                        </p>
+        
+                        <p>
+                            <a href="http://www.australianmusiccentre.com.au/myaccount/loginreminder" title="Forgotten your username or password?">Forgotten your username or password?</a>
+                        </p>
+                         
+                    </form>
+                    
+                </div>
+                
+                <div class="col_6 col_last">
+                
+                    <h3>Your Shopping Cart</h3>
+                    <p>There are no items in your shopping cart.</p>                    
+                </div>
+                
+                        
+                                
+                <p class="user_settings"><a href="#" class="login_trigger icon_account">Login</a> <a class="icon_email" href="http://www.australianmusiccentre.com.au/myaccount/signup">Sign up to receive our e-Newsletter</a> <a href="#" class="login_trigger icon_cart">View Cart</a></p>
+                
+                                
+            </div>
+                
+        </div>
+    
+        <div id="header">
+        
+            <div class="inner">
+                
+                                
+                <h1><a href="http://www.australianmusiccentre.com.au/" title="Australian Music Centre | Breaking Sound Barriers">Australian Music Centre | Breaking sound barriers</a></h1>
+                
+                            
+            </div>
+        
+        </div>
+        
+        
+        <div id="nav">
+        
+            <ul class="inner sf-menu sf-js-enabled sf-arrows">
+
+                <li><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/search" title="Find music">Find music</a>
+                
+                    <ul style="display: none;">
+
+                        <li><a href="http://www.australianmusiccentre.com.au/introductions" title="Introductions to Australian music" class="first">Introductions to Australian music</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/artists" title="Represented artists" class="first">Represented artists</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/repertoirenavigator" title="Instrumentation navigator">Repertoire navigator</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/subjectnavigator" title="Subject navigator">Subject navigator</a></li>
+						<li><a href="http://www.australianmusiccentre.com.au/prizes" title="Subject navigator">Prize &amp; award winners</a></li>
+                    </ul>
+                    
+                </li>
+
+                <li><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/resonate" title="Resonate magazine">Resonate magazine</a>
+                
+                    <ul style="display: none;">
+                        
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/news" title="News" class="first">News</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/reviews" title="Reviews">Reviews</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/blogs" title="Blogs">Blogs</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/features" title="Features">Features</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/opportunities" title="Opportunities">Opportunities</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/journal" title="Bi-annual journal">Bi-annual journal</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/resonate/about" title="About">About</a></li>
+
+                        
+                    </ul>
+                    
+                </li>
+                
+                        <li class=""><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/guides/" title="Pathways">Pathways</a>
+                
+                    <ul style="display: none;">
+
+                        <li><a href="http://www.australianmusiccentre.com.au/guides/students" title="for Students" class="first">for Students</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/guides/teachers" title="for Teachers">for Teachers</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/guides/performers" title="for Performers">for Performers</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/guides/composers-soundartists-improvisers" title="for Composers, improvisers &amp; sound artists">for Composers, improvisers &amp; sound artists</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/introductions" title="Introductions to Australian music">Introductions to Australian music</a></li>
+
+                    </ul>
+                    
+                </li>
+                
+                <li><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/calendar" title="Calendar">Calendar</a>
+                
+                    <ul style="display: none;">
+                    
+                        <li><a href="http://www.australianmusiccentre.com.au/calendar" title="View calendar" class="first">View calendar</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/contribute/newEvent" title="Add an event">Add an event</a></li>
+                        
+                    </ul>
+                    
+                </li>
+                
+                <li><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/shop" title="Shop">Shop</a>
+                
+                    <ul style="display: none;">
+                        
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/cds" title="CDs" class="first">CDs</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/mp3s" title="Mp3s">MP3s</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/digitalsheetmusic" title="Digital sheet music">Digital sheet music</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/sheetmusic" title="Sheet music">Sheet music</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/books" title="Books">Books</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/shop/education" title="Educational resources">Education resources</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/cart/" title="View cart">View cart</a></li>
+                        
+                    </ul>
+                    
+                </li>
+                
+                <li><a class="sf-with-ul" href="http://www.australianmusiccentre.com.au/about" title="About">About</a>
+                
+                    <ul style="display: none;">
+                    
+                        <li><a href="http://www.australianmusiccentre.com.au/about/membership" title="Membership" class="first">Membership</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/myaccount/donation" title="Donate to the AMC">Donate to the AMC</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about/projects" title="Projects, Awards">Projects, Awards</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about/representation" title="Artist representation">Artist representation</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about/library" title="Library">Library</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about/sponsors" title="Funding, sponsors &amp; Donors">Funding, sponsors &amp; donors</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about" title="About us">About us</a></li>
+                        <li><a href="http://www.australianmusiccentre.com.au/about/websitedevelopment" title="About theis website">About this website</a></li>
+
+                    </ul>
+                    
+                </li>
+
+                <li><a href="http://www.australianmusiccentre.com.au/contact" title="Contact">Contact</a></li>
+                
+            </ul>
+    
+        </div>
+        
+    
+        <hr class="hidden">
+
+    </div>
+    
+    <span id="page_bg" class="png_bg">&nbsp;</span>
+
+
+<script type="text/javascript">
+//<![CDATA[
+var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");
+document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+//]]>
+</script><script src="support/ga.js" type="text/javascript"></script>
+<script type="text/javascript">
+//<![CDATA[
+var pageTracker=_gat._getTracker("UA-8167875-1");
+pageTracker._initData();
+pageTracker._trackPageview();
+//]]>
+</script>
+
+</body></html>
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/common110825.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/common110825.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/common110825.js	(revision 33547)
@@ -0,0 +1,1 @@
+$(document).ready(function(){$("a.login_trigger").click(function(){if($("div#login_cart div.inner").height()<200){$("div#login_cart div.inner").animate({height:"245px"},500);$("span#page_bg").animate({top:"260px"},500);return false}else{$("div#login_cart div.inner").animate({height:"10px"},500);$("span#page_bg").animate({top:"25px"},500);return false}});$(".striped tbody tr:odd").addClass("alt");$("ul.track_listing li:odd").addClass("alt");$("ul.search_result li:even").addClass("alt");$("input#quick_search_text").focus(function(){search_text=$(this).val();if(search_text=="Search"){$(this).val("")}}).blur(function(){search_text=$(this).val();if(search_text==""){$(this).val("Search")}});$("ul.sf-menu").superfish({autoArrows:false,dropShadows:false,animation:{height:"show"}});$("input[type='checkbox']").each(function(){$(this).addClass("checkbox")});$("input[type='radio']").each(function(){$(this).addClass("radio")});$("input[type='submit']").each(function(){$(this).addClass("submit")});$("#footer_ad_wrap a").attr("target","_blank");$("a.scoresamplelink").each(function(){$(this).click(function(){var a=$(this).attr("id");$.ajax({type:"GET",url:"/"+getFrontController()+"logds",data:"type=score&id="+a+""})})});$(".productsDisplayControl").click(function(){if($("#hideableProducts").css("display")=="none"){$("#hideableProducts").slideDown();$("#productsDisplayIcon").attr("src","/images/collapse.gif");$("#h3ProdDisplayControl").html("Hide additional products");$("#pProdDisplayControl").html("Hide additional products &nbsp; ")}else{$("#hideableProducts").slideUp();$("#productsDisplayIcon").attr("src","/images/expand.gif");$("#h3ProdDisplayControl").html("Display all products ("+additionalProductCount+" more)");$("#pProdDisplayControl").html("Display all products featuring this work ("+additionalProductCount+" more) &nbsp; ")}});if($().hoverIntent){$("tr.product_hover_row").hoverIntent(function(){$(".product_hover_content",this).slideDown("fast")},function(){$(".product_hover_content",this).slideUp("fast")})}});function ehidetext(d,b,c,a){document.write('<a href="mailto:'+d);document.write(String.fromCharCode(64)+b);if(a!==undefined){document.write("?subject="+escape(a))}document.write('">'+c+"</a>")}function ehideadd(b,a){document.write('<a href="mailto:'+b);document.write(String.fromCharCode(64)+a);document.write('">'+b+String.fromCharCode(64)+a+"</a>")}function getFrontController(){var b=location.pathname;if(b.indexOf(".php")!=-1){if(b.indexOf("/",1)!=-1){var a=b.indexOf("/",1);b=b.substring(1,a)}else{b=b.substring(1)}}else{b=""}if(b){b=b+"/"}return b}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a}function GetSwfVer(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4]}if(d[0]=="d"){d=d.substring(1)}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"))}}}var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if(isIE&&isWin&&!isOpera){g=ControlVersion()}}}}}return g}function DetectFlashVer(f,d,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}}function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(e,d,a){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var b in e){c+=b+'="'+e[b]+'" '}c+=">";for(var b in d){c+='<param name="'+b+'" value="'+d[b]+'" /> '}c+="</object>"}else{c+="<embed ";for(var b in a){c+=b+'="'+a[b]+'" '}c+="> </embed>"}document.write(c)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(b,e,g,d,h){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var c=0;c<b.length;c=c+2){var f=b[c].toLowerCase();switch(f){case"classid":break;case"pluginspage":a.embedAttrs[b[c]]=b[c+1];break;case"src":case"movie":b[c+1]=AC_AddExtension(b[c+1],e);a.embedAttrs.src=b[c+1];a.params[g]=b[c+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":a.objAttrs[b[c]]=b[c+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.classid=d;if(h){a.embedAttrs.type=h}return a};
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/countries.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/countries.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/countries.js	(revision 33547)
@@ -0,0 +1,1 @@
+$(window).load(function(){$(".geoip_town").val(amcfe.geoIP.city);switch(amcfe.geoIP.countryCode){case"AF":var a="Afghanistan";var b="93";break;case"AL":var a="Albania";var b="355";break;case"DZ":var a="Algeria";var b="213";break;case"AS":var a="American Samoa";var b="684";break;case"AD":var a="Andorra";var b="376";break;case"AO":var a="Angola";var b="244";break;case"AI":var a="Anguilla";var b="1 264";break;case"AQ":var a="Antarctica";var b="672";break;case"AG":var a="Antigua and Barbuda";var b="1 268";break;case"AR":var a="Argentina";var b="54";break;case"AM":var a="Armenia";var b="374";break;case"AW":var a="Aruba";var b="297";break;case"AU":var a="Australia";var b="61";break;case"AT":var a="Austria";var b="43";break;case"AZ":var a="Azerbaijan";var b="994";break;case"BS":var a="Bahamas";var b="1 242";break;case"BH":var a="Bahrain";var b="973";break;case"BD":var a="Bangladesh";var b="880";break;case"BB":var a="Barbados";var b="1 246";break;case"BY":var a="Belarus";var b="375";break;case"BE":var a="Belgium";var b="32";break;case"BZ":var a="Belize";var b="501";break;case"BJ":var a="Benin";var b="229";break;case"BM":var a="Bermuda";var b="1 441";break;case"BT":var a="Bhutan";var b="975";break;case"BO":var a="Bolivia";var b="975";break;case"BA":var a="Bosnia and Herzegovina";var b="387";break;case"BW":var a="Botswana";var b="267";break;case"BV":var a="Bouvet Island";break;case"BR":var a="Brazil";var b="55";break;case"VG":var a="British Virgin Islands";var b="1 284";break;case"BN":var a="Brunei Darussalam";var b="673";break;case"BG":var a="Bulgaria";var b="359";break;case"BF":var a="Burkina Faso";var b="226";break;case"BI":var a="Burundi";var b="257";break;case"KH":var a="Cambodia";var b="855";break;case"CM":var a="Cameroon";var b="237";break;case"CA":var a="Canada";var b="1";break;case"CV":var a="Cape Verde";var b="238";break;case"KY":var a="Cayman Islands";var b="1 345";break;case"CF":var a="Central African Republic";var b="236";break;case"TD":var a="Chad";var b="235";break;case"CL":var a="Chile";var b="56";break;case"CN":var a="China";var b="86";break;case"CX":var a="Christmas Island";var b="61";break;case"CC":var a="Cocos Island";var b="61";break;case"CO":var a="Colombia";var b="57";break;case"KM":var a="Comoros";var b="269";break;case"CD":var a="Congo, Democratic Republic";var b="242";break;case"CG":var a="Congo";var b="242";break;case"CK":var a="Cook Islands";var b="682";break;case"CR":var a="Costa Rica";var b="506";break;case"CI":var a="Cote d'Ivoire";break;case"HR":var a="Croatia";var b="385";break;case"CU":var a="Cuba";var b="53";break;case"CY":var a="Cyprus";var b="357";break;case"CZ":var a="Czech Republic";var b="420";break;case"DK":var a="Denmark";var b="45";break;case"DJ":var a="Djibouti";var b="253";break;case"DM":var a="Dominica";var b="1 767";break;case"DO":var a="Dominican Republic";var b="1 809";break;case"EC":var a="Ecuador";var b="593";break;case"EG":var a="Egypt";var b="20";break;case"SV":var a="El Salvador";var b="503";break;case"GQ":var a="Equatorial Guinea";var b="240";break;case"ER":var a="Eritrea";var b="291";break;case"EE":var a="Estonia";var b="372";break;case"ET":var a="Ethiopia";var b="251";break;case"FK":var a="Bahrain";var b="500";break;case"FO":var a="Faroe Islands";var b="298";break;case"FJ":var a="Fiji";var b="679";break;case"FI":var a="Bahrain";var b="358";break;case"FR":var a="France";var b="33";break;case"GF":var a="French Guiana";var b="594";break;case"PF":var a="French Polynesia";var b="689";break;case"GA":var a="Gabon";var b="241";break;case"GM":var a="Gambia";var b="220";break;case"GE":var a="Georgia";var b="995";break;case"DE":var a="Germany";var b="49";break;case"GH":var a="Ghana";var b="233";break;case"GI":var a="Gibraltar";var b="350";break;case"GR":var a="Greece";var b="30";break;case"GL":var a="Greenland";var b="299";break;case"GD":var a="Grenada";var b="1 473";break;case"GP":var a="Guadeloupe";var b="590";break;case"GU":var a="Guam";var b="1 671";break;case"GG":var a="Guatemala";var b="502";break;case"GT":var a="Guernsey";break;case"GN":var a="Guinea";var b="224";break;case"GW":var a="Guinea-Bissau";var b="245";break;case"GY":var a="Guyana";var b="592";break;case"HT":var a="Haiti";var b="509";break;case"HN":var a="Honduras";var b="504";break;case"HK":var a="Hong Kong";var b="852";break;case"HU":var a="Hungary";var b="36";break;case"IS":var a="Bahrain";var b="354";break;case"IN":var a="India";var b="91";break;case"ID":var a="Indonesia";var b="62";break;case"IR":var a="Iran";var b="98";break;case"IQ":var a="Iraq";var b="964";break;case"IE":var a="Ireland";var b="353";break;case"IM":var a="Isle of Man";break;case"IL":var a="Israel";var b="972";break;case"IT":var a="Italy";var b="39";break;case"JM":var a="Jamaica";var b="1 876";break;case"JP":var a="Japan";var b="81";break;case"JE":var a="Jersey";break;case"JO":var a="Jordan";var b="962";break;case"KZ":var a="Kazakhstan";var b="7";break;case"KE":var a="Kenya";var b="254";break;case"KI":var a="Kiribati";var b="686";break;case"KR":var a="Korea";var b="82";break;case"KP":var a="Korea, DPR";var b="850";break;case"KW":var a="Kuwait";var b="965";break;case"KG":var a="Kyrgystan";var b="996";break;case"LA":var a="Laos";var b="856";break;case"LV":var a="Latvia";var b="371";break;case"LB":var a="Lebanon";var b="961";break;case"LS":var a="Bahrain";var b="266";break;case"LR":var a="Liberia";var b="231";break;case"LY":var a="Libya";var b="218";break;case"LI":var a="Liechtenstein";var b="423";break;case"LT":var a="Lithuania";var b="370";break;case"LU":var a="Luxembourg";var b="352";break;case"MO":var a="Macao";var b="853";break;case"MK":var a="Macedonia";var b="389";break;case"MG":var a="Madagascar";var b="261";break;case"MW":var a="Malawi";var b="265";break;case"MY":var a="Malaysia";var b="60";break;case"MV":var a="Maldives";var b="960";break;case"ML":var a="Mali";var b="223";break;case"MT":var a="Malta";var b="356";break;case"MH":var a="Marshall Islands";var b="692";break;case"MQ":var a="Martinique";var b="596";break;case"MR":var a="Mauritania";var b="222";break;case"MU":var a="Mauritious";var b="230";break;case"YT":var a="Mayotte";var b="269";break;case"MX":var a="Bahrain";var b="52";break;case"FM":var a="Micronesia";var b="691";break;case"MD":var a="Moldova";var b="373";break;case"MC":var a="Monaco";var b="377";break;case"MN":var a="Mongolia";var b="976";break;case"ME":var a="Montenegro";break;case"MS":var a="Bahrain";var b="1 664";break;case"MA":var a="Bahrain";var b="212";break;case"MZ":var a="Mozambique";var b="258";break;case"MM":var a="Myanmar";var b="95";break;case"NA":var a="Namibia";var b="264";break;case"NR":var a="Nauru";var b="674";break;case"NP":var a="Nepal";var b="977";break;case"NL":var a="Netherlands";var b="31";break;case"NC":var a="New Caledonia";var b="687";break;case"NZ":var a="New Zealand";var b="64";break;case"NI":var a="Nicaragua";var b="505";break;case"NE":var a="Niger";var b="227";break;case"NG":var a="Nigeria";var b="234";break;case"NU":var a="Niue";var b="683";break;case"NF":var a="Norfolk Island";var b="672";break;case"NO":var a="Norway";var b="47";break;case"OM":var a="Oman";var b="968";break;case"PK":var a="Pakistan";var b="92";break;case"PW":var a="Palau";var b="680";break;case"PS":var a="Palestine";break;case"PA":var a="Panama";var b="507";break;case"PG":var a="Papua New Guinea";var b="675";break;case"PY":var a="Paraguay";var b="595";break;case"PE":var a="Peru";var b="51";break;case"PH":var a="Philippines";var b="63";break;case"PN":var a="Picairn";break;case"PL":var a="Poland";var b="48";break;case"PT":var a="Portugal";var b="351";break;case"PR":var a="Puerto Rico";var b="1 787";break;case"QA":var a="Qatar";var b="974";break;case"RE":var a="Reunion";var b="262";break;case"RO":var a="Romania";var b="40";break;case"RU":var a="Russia";var b="7";break;case"RW":var a="Rwanda";var b="250";break;case"SH":var a="Saint Helena";var b="290";break;case"KN":var a="Saint Kitts";var b="1 869";break;case"LC":var a="Saint Lucia";var b="1 758";break;case"MF":var a="Saint Martin";break;case"PM":var a="Saint Pierre";var b="508";break;case"VC":var a="Saint Vincent";var b="1 784";break;case"WS":var a="Samoa";break;case"SM":var a="San Morino";var b="378";break;case"ST":var a="Sao Tome";var b="239";break;case"SA":var a="Saudi Arabia";var b="966";break;case"SN":var a="Bahrain";var b="221";break;case"RS":var a="Serbia";var b="381";break;case"SC":var a="Seychelles";var b="248";break;case"SL":var a="Sierra Leone";var b="232";break;case"SG":var a="Singapore";var b="65";break;case"SK":var a="Slovakia";var b="421";break;case"SI":var a="Slovenia";var b="386";break;case"SB":var a="Solomon Islands";var b="677";break;case"SO":var a="Somalia";var b="252";break;case"ZA":var a="South Africa";var b="27";break;case"GS":var a="South Georgia";break;case"ES":var a="Spain";var b="34";break;case"LK":var a="Sri Lanka";var b="94";break;case"SD":var a="Sudan";var b="249";break;case"SR":var a="Suriname";var b="597";break;case"SJ":var a="Svalbard";break;case"SZ":var a="Swaziland";var b="268";break;case"SE":var a="Sweden";var b="46";break;case"CH":var a="Switzerland";var b="41";break;case"SY":var b="Syria";break;case"TW":var a="Taiwan";var b="886";break;case"TJ":var a="Tajikistan";var b="992";break;case"TZ":var a="Tanzania";var b="255";break;case"TH":var a="Thailand";var b="66";break;case"TL":var a="Timor-Leste";break;case"TG":var a="Togo";var b="228";break;case"TK":var a="Tokelau";var b="690";break;case"TO":var a="Tonga";var b="676";break;case"TT":var a="Trinidad and Tobago";var b="1 868";break;case"TN":var a="Tunisia";var b="216";break;case"TR":var a="Turkey";var b="90";break;case"TM":var a="Turkmenistan";var b="993";break;case"TC":var a="Turks Islands";var b="1 649";break;case"TV":var a="Tuvalu";var b="688";break;case"UG":var a="Uganda";var b="256";break;case"UA":var a="Ukraine";var b="380";break;case"AE":var a="United Arab Emirates";var b="971";break;case"GB":var a="Great Britain";var b="44";break;case"US":var a="United States";var b="1";break;case"UY":var a="Uruguay";var b="598";break;case"VI":var a="US Virgin Islands";var b="1 340";break;case"UZ":var a="Uzbekistan";var b="998";break;case"VU":var a="Vanuatu";var b="678";break;case"VE":var a="Venezuela";var b="58";break;case"VN":var a="Vietnam";var b="84";break;case"WF":var a="Wallis and Futuna";var b="681";break;case"EH":var a="Western Sahara";break;case"YE":var a="Yemen";var b="967";break;case"ZM":var a="Zambia";var b="260";break;case"ZW":var a="Zimbabwe";var b="263";break}$(".countrySelect option").each(function(){if($(this).text()==a){$(this).attr("selected","selected")}});$(".geoip_intl_code").each(function(){$(this).val(b)})});
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/ga.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/ga.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/ga.js	(revision 33547)
@@ -0,0 +1,77 @@
+(function(){var E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \n\r\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}
+function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};
+function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]};
+nf.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()}
+function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",R:new nf,anchor:""};if(!a)return d;c=a.indexOf("://");0<=c&&(d.protocol=a.substring(0,c),a=a.substring(c+3));c=a.search("/|\\?|#");if(0<=c)d.host=a.substring(0,c).toLowerCase(),a=a.substring(c);else return d.host=a.toLowerCase(),d;c=a.indexOf("#");0<=c&&(d.anchor=a.substring(c+1),a=a.substring(0,c));c=a.indexOf("?");0<=c&&(Na(d.R,a.substring(c+1)),a=a.substring(0,c));d.anchor&&b&&Na(d.R,d.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1));
+d.path=a;return d}
+function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}var d=b||J.createElement("a");d.href=J.location.href;var e=(d.protocol||"").toLowerCase(),f=c(d),Be=d.search||"",k=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a.indexOf("//")?a=e+a:0==a.indexOf("/")?a=k+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=k+f[2].substring(0,f[2].lastIndexOf("/"))+
+"/"+a):a=k+f[2]+(a||Be);d.href=a;e=c(d);return{protocol:(d.protocol||"").toLowerCase(),host:e[0],port:e[1],path:e[2],Oa:d.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}for(var d=Da(b).split("&"),e=0;e<d.length;e++)if(d[e]){var f=d[e].indexOf("=");0>f?c(d[e],"1"):c(d[e].substring(0,f),d[e].substring(f+1))}}
+function Pa(a,b){if(F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1))return"-";var c=J.domain;return a.indexOf(c+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.6.7","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}
+var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0),R=N(!0),dc=N(!0),
+ec=N(!0),fc=N(!0),gc=N(!0),hc=N(!0),ic=N(!0),jc=N(!0),S=N(!0),kc=N(!0),lc=N(!0),mc=N(!0),nc=N(!0),oc=N(!0),pc=N(!0),qc=N(!0),rc=Va("campaignParams"),sc=N(),tc=Va("hitCallback"),uc=N();N();var vc=N(),wc=N(),xc=N(),yc=N(),zc=N(),Ac=N(),Bc=N(),Cc=N(),Dc=N(),Ec=N(),Fc=N(),Gc=N(),Hc=N(),Ic=N();N();var Mc=N(),Nc=N(),Yb=N(),Jc=N(),Kc=N(),Lc=Va("utmtCookieName"),Cd=Va("displayFeatures"),Oc=N(),of=Va("gtmid"),Oe=Va("uaName"),Pe=Va("uaDomain"),Qe=Va("uaPath"),pf=Va("linkid");var Re=function(){function a(a,c,d){T(qf.prototype,a,c,d)}a("_createTracker",qf.prototype.hb,55);a("_getTracker",qf.prototype.oa,0);a("_getTrackerByName",qf.prototype.u,51);a("_getTrackers",qf.prototype.pa,130);a("_anonymizeIp",qf.prototype.aa,16);a("_forceSSL",qf.prototype.la,125);a("_getPlugin",Pc,120)},Se=function(){function a(a,c,d){T(U.prototype,a,c,d)}Qc("_getName",$a,58);Qc("_getAccount",Wa,64);Qc("_visitCode",Q,54);Qc("_getClientInfo",ib,53,1);Qc("_getDetectTitle",lb,56,1);Qc("_getDetectFlash",
+jb,65,1);Qc("_getLocalGifPath",wb,57);Qc("_getServiceMode",xb,59);V("_setClientInfo",ib,66,2);V("_setAccount",Wa,3);V("_setNamespace",Ya,48);V("_setAllowLinker",fb,11,2);V("_setDetectFlash",jb,61,2);V("_setDetectTitle",lb,62,2);V("_setLocalGifPath",wb,46,0);V("_setLocalServerMode",xb,92,void 0,0);V("_setRemoteServerMode",xb,63,void 0,1);V("_setLocalRemoteServerMode",xb,47,void 0,2);V("_setSampleRate",vb,45,1);V("_setCampaignTrack",kb,36,2);V("_setAllowAnchor",gb,7,2);V("_setCampNameKey",ob,41);V("_setCampContentKey",
+tb,38);V("_setCampIdKey",nb,39);V("_setCampMediumKey",rb,40);V("_setCampNOKey",ub,42);V("_setCampSourceKey",qb,43);V("_setCampTermKey",sb,44);V("_setCampCIdKey",pb,37);V("_setCookiePath",P,9,0);V("_setMaxCustomVariables",yb,0,1);V("_setVisitorCookieTimeout",cb,28,1);V("_setSessionCookieTimeout",db,26,1);V("_setCampaignCookieTimeout",eb,29,1);V("_setReferrerOverride",Jb,49);V("_setSiteSpeedSampleRate",Dc,132);a("_trackPageview",U.prototype.Fa,1);a("_trackEvent",U.prototype.F,4);a("_trackPageLoadTime",
+U.prototype.Ea,100);a("_trackSocial",U.prototype.Ga,104);a("_trackTrans",U.prototype.Ia,18);a("_sendXEvent",U.prototype.ib,78);a("_createEventTracker",U.prototype.ia,74);a("_getVersion",U.prototype.qa,60);a("_setDomainName",U.prototype.B,6);a("_setAllowHash",U.prototype.va,8);a("_getLinkerUrl",U.prototype.na,52);a("_link",U.prototype.link,101);a("_linkByPost",U.prototype.ua,102);a("_setTrans",U.prototype.za,20);a("_addTrans",U.prototype.$,21);a("_addItem",U.prototype.Y,19);a("_clearTrans",U.prototype.ea,
+105);a("_setTransactionDelim",U.prototype.Aa,82);a("_setCustomVar",U.prototype.wa,10);a("_deleteCustomVar",U.prototype.ka,35);a("_getVisitorCustomVar",U.prototype.ra,50);a("_setXKey",U.prototype.Ca,83);a("_setXValue",U.prototype.Da,84);a("_getXKey",U.prototype.sa,76);a("_getXValue",U.prototype.ta,77);a("_clearXKey",U.prototype.fa,72);a("_clearXValue",U.prototype.ga,73);a("_createXObj",U.prototype.ja,75);a("_addIgnoredOrganic",U.prototype.W,15);a("_clearIgnoredOrganic",U.prototype.ba,97);a("_addIgnoredRef",
+U.prototype.X,31);a("_clearIgnoredRef",U.prototype.ca,32);a("_addOrganic",U.prototype.Z,14);a("_clearOrganic",U.prototype.da,70);a("_cookiePathCopy",U.prototype.ha,30);a("_get",U.prototype.ma,106);a("_set",U.prototype.xa,107);a("_addEventListener",U.prototype.addEventListener,108);a("_removeEventListener",U.prototype.removeEventListener,109);a("_addDevId",U.prototype.V);a("_getPlugin",Pc,122);a("_setPageGroup",U.prototype.ya,126);a("_trackTiming",U.prototype.Ha,124);a("_initData",U.prototype.initData,
+2);a("_setVar",U.prototype.Ba,22);V("_setSessionTimeout",db,27,3);V("_setCookieTimeout",eb,25,3);V("_setCookiePersistence",cb,24,1);a("_setAutoTrackOutbound",Fa,79);a("_setTrackOutboundSubdomains",Fa,81);a("_setHrefExamineLimit",Fa,80)};function Pc(a){var b=this.plugins_;if(b)return b.get(a)}
+var T=function(a,b,c,d){a[b]=function(){try{return void 0!=d&&H(d),c.apply(this,arguments)}catch(a){throw Ra("exc",b,a&&a.name),a;}}},Qc=function(a,b,c,d){U.prototype[a]=function(){try{return H(c),Aa(this.a.get(b),d)}catch(e){throw Ra("exc",a,e&&e.name),e;}}},V=function(a,b,c,d,e){U.prototype[a]=function(f){try{H(c),void 0==e?this.a.set(b,Aa(f,d)):this.a.set(b,e)}catch(Be){throw Ra("exc",a,Be&&Be.name),Be;}}},Te=function(a,b){return{type:b,target:a,stopPropagation:function(){throw"aborted";}}};var Rc=new RegExp(/(^|\.)doubleclick\.net$/i),Sc=function(a,b){return Rc.test(J.location.hostname)?!0:"/"!==b?!1:0!=a.indexOf("www.google.")&&0!=a.indexOf(".google.")&&0!=a.indexOf("google.")||-1<a.indexOf("google.org")?!1:!0},Tc=function(a){var b=a.get(bb),c=a.c(P,"/");Sc(b,c)&&a.stopPropagation()};var Zc=function(){var a={},b={},c=new Uc;this.g=function(a,b){c.add(a,b)};var d=new Uc;this.v=function(a,b){d.add(a,b)};var e=!1,f=!1,Be=!0;this.T=function(){e=!0};this.j=function(a){this.load();this.set(sc,a,!0);a=new Vc(this);e=!1;d.cb(this);e=!0;b={};this.gb();a.Ja()};this.load=function(){e&&(e=!1,this.Ka(),Wc(this),f||(f=!0,c.cb(this),Xc(this),Wc(this)),e=!0)};this.gb=function(){e&&(f?(e=!1,Xc(this),e=!0):this.load())};this.get=function(c){Ua[c]&&this.load();return void 0!==b[c]?b[c]:a[c]};this.set=
+function(c,d,e){Ua[c]&&this.load();e?b[c]=d:a[c]=d;Ua[c]&&this.gb()};this.Za=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){var c=this.get(a);return void 0==c||""===c?b:1*c};this.c=function(a,b){var c=this.get(a);return void 0==c?b:c+""};this.Ka=function(){if(Be){var b=this.c(bb,""),c=this.c(P,"/");Sc(b,c)||(a[O]=a[hb]&&""!=b?Yc(b):1,Be=!1)}}};Zc.prototype.stopPropagation=function(){throw"aborted";};
+var Vc=function(a){var b=this;this.fb=0;var c=a.get(tc);this.Ua=function(){0<b.fb&&c&&(b.fb--,b.fb||c())};this.Ja=function(){!b.fb&&c&&setTimeout(c,10)};a.set(uc,b,!0)};function $c(a,b){b=b||[];for(var c=0;c<b.length;c++){var d=b[c];if(""+a==d||0==d.indexOf(a+"."))return d}return"-"}
+var bd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(6!==b.length||ad(b[0],c))return!1;c=1*b[1];var d=1*b[2],e=1*b[3],f=1*b[4];b=1*b[5];if(!(0<=c&&0<d&&0<e&&0<f&&0<=b))return!1;a.set(Q,c);a.set(Vb,d);a.set(Wb,e);a.set(Zb,f);a.set($b,b);return!0},cd=function(a){var b=a.get(Q),c=a.get(Vb),d=a.get(Wb),e=a.get(Zb),f=a.b($b,1);return[a.b(O,1),void 0!=b?b:"-",c||"-",d||"-",e||"-",f].join(".")},dd=function(a){return[a.b(O,1),a.b(cc,0),a.b(R,1),a.b(dc,0)].join(".")},ed=function(a,b,c){c=c?"":a.c(O,
+"1");var d=b.split(".");if(4!==d.length||ad(d[0],c))d=null;a.set(cc,d?1*d[1]:0);a.set(R,d?1*d[2]:10);a.set(dc,d?1*d[3]:a.get(ab));return null!=d||!ad(b,c)},fd=function(a,b){var c=G(a.c(Tb,"")),d=[],e=a.get(Fb);if(!b&&e){for(var f=0;f<e.length;f++){var Be=e[f];Be&&1==Be.scope&&d.push(f+"="+G(Be.name)+"="+G(Be.value)+"=1")}0<d.length&&(c+="|"+d.join("^"))}return c?a.b(O,1)+"."+c:null},gd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(2>b.length||ad(b[0],c))return!1;b=b.slice(1).join(".").split("|");
+0<b.length&&a.set(Tb,I(b[0]));if(1>=b.length)return!0;b=b[1].split(-1==b[1].indexOf(",")?"^":",");for(c=0;c<b.length;c++){var d=b[c].split("=");if(4==d.length){var e={};e.name=I(d[1]);e.value=I(d[2]);e.scope=1;a.get(Fb)[d[0]]=e}}return!0},hd=function(a,b){var c=Ue(a,b);return c?[a.b(O,1),a.b(ec,0),a.b(fc,1),a.b(gc,1),c].join("."):""},Ue=function(a){function b(b,e){if(!F(a.get(b))){var f=a.c(b,""),f=f.split(" ").join("%20"),f=f.split("+").join("%20");c.push(e+"="+f)}}var c=[];b(ic,"utmcid");b(nc,"utmcsr");
+b(S,"utmgclid");b(kc,"utmgclsrc");b(lc,"utmdclid");b(mc,"utmdsid");b(jc,"utmccn");b(oc,"utmcmd");b(pc,"utmctr");b(qc,"utmcct");return c.join("|")},id=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(5>b.length||ad(b[0],c))return a.set(ec,void 0),a.set(fc,void 0),a.set(gc,void 0),a.set(ic,void 0),a.set(jc,void 0),a.set(nc,void 0),a.set(oc,void 0),a.set(pc,void 0),a.set(qc,void 0),a.set(S,void 0),a.set(kc,void 0),a.set(lc,void 0),a.set(mc,void 0),!1;a.set(ec,1*b[1]);a.set(fc,1*b[2]);a.set(gc,1*b[3]);
+Ve(a,b.slice(4).join("."));return!0},Ve=function(a,b){function c(a){return(a=b.match(a+"=(.*?)(?:\\|utm|$)"))&&2==a.length?a[1]:void 0}function d(b,c){c?(c=e?I(c):c.split("%20").join(" "),a.set(b,c)):a.set(b,void 0)}-1==b.indexOf("=")&&(b=I(b));var e="2"==c("utmcvr");d(ic,c("utmcid"));d(jc,c("utmccn"));d(nc,c("utmcsr"));d(oc,c("utmcmd"));d(pc,c("utmctr"));d(qc,c("utmcct"));d(S,c("utmgclid"));d(kc,c("utmgclsrc"));d(lc,c("utmdclid"));d(mc,c("utmdsid"))},ad=function(a,b){return b?a!=b:!/^\d+$/.test(a)};var Uc=function(){this.filters=[]};Uc.prototype.add=function(a,b){this.filters.push({name:a,s:b})};Uc.prototype.cb=function(a){try{for(var b=0;b<this.filters.length;b++)this.filters[b].s.call(W,a)}catch(c){}};function jd(a){100!=a.get(vb)&&a.get(Q)%1E4>=100*a.get(vb)&&a.stopPropagation()}function kd(a){ld(a.get(Wa))&&a.stopPropagation()}function md(a){"file:"==J.location.protocol&&a.stopPropagation()}function Ge(a){He()&&a.stopPropagation()}
+function nd(a){a.get(Ib)||a.set(Ib,J.title,!0);a.get(Hb)||a.set(Hb,J.location.pathname+J.location.search,!0)}function lf(a){a.get(Wa)&&"UA-XXXXX-X"!=a.get(Wa)||a.stopPropagation()};var od=new function(){var a=[];this.set=function(b){a[b]=!0};this.encode=function(){for(var b=[],c=0;c<a.length;c++)a[c]&&(b[Math.floor(c/6)]^=1<<c%6);for(c=0;c<b.length;c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b[c]||0);return b.join("")+"~"}};function H(a){od.set(a)};var W=window,J=document,ld=function(a){var b=W._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===W["ga-disable-"+a])return!0;try{var c=W.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1},He=function(){return W.navigator&&"preview"==W.navigator.loadPurpose},We=function(a,b){setTimeout(a,b)},pd=function(a){var b=[],c=J.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},X=function(a,b,c,d,e,f){e=
+ld(e)?!1:Sc(d,c)?!1:He()?!1:!0;e&&((b=mf(b))&&2E3<b.length&&(b=b.substring(0,2E3),H(69)),a=a+"="+b+"; path="+c+"; ",f&&(a+="expires="+(new Date((new Date).getTime()+f)).toGMTString()+"; "),d&&(a+="domain="+d+";"),J.cookie=a)},mf=function(a){if(!a)return a;var b=a.indexOf(";");-1!=b&&(a=a.substring(0,b),H(141));if(!(0<=W.navigator.userAgent.indexOf("Firefox")))return a;a=a.replace(/\n|\r/g," ");for(var b=0,c=a.length;b<c;++b){var d=a.charCodeAt(b)&255;if(10==d||13==d)a=a.substring(0,b)+"?"+a.substring(b+
+1)}return a};var qd,rd,sd=function(){if(!qd){var a={},b=W.navigator,c=W.screen;a.jb=c?c.width+"x"+c.height:"-";a.P=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-").toLowerCase();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=J.characterSet||J.charset||"-";try{var d;var e=J.documentElement,f=J.body,Be=f&&f.clientWidth&&f.clientHeight,b=[];e&&e.clientWidth&&e.clientHeight&&("CSS1Compat"===J.compatMode||!Be)?b=[e.clientWidth,e.clientHeight]:Be&&(b=[f.clientWidth,f.clientHeight]);
+d=0>=b[0]||0>=b[1]?"":b.join("x");a.Wa=d}catch(k){H(135)}qd=a}},td=function(){sd();for(var a=qd,b=W.navigator,a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.jb+a.P+(J.cookie?J.cookie:"")+(J.referrer?J.referrer:""),b=a.length,c=W.history.length;0<c;)a+=c--^b++;return Yc(a)},ud=function(a){sd();var b=qd;a.set(Lb,b.jb);a.set(Mb,b.P);a.set(Pb,b.language);a.set(Qb,b.characterSet);a.set(Nb,b.javaEnabled);a.set(Rb,b.Wa);if(a.get(ib)&&a.get(jb)){if(!(b=rd)){var c,d,e;d="ShockwaveFlash";
+if((b=(b=W.navigator)?b.plugins:void 0)&&0<b.length)for(c=0;c<b.length&&!e;c++)d=b[c],-1<d.name.indexOf("Shockwave Flash")&&(e=d.description.split("Shockwave Flash ")[1]);else{d=d+"."+d;try{c=new ActiveXObject(d+".7"),e=c.GetVariable("$version")}catch(f){}if(!e)try{c=new ActiveXObject(d+".6"),e="WIN 6,0,21,0",c.AllowScriptAccess="always",e=c.GetVariable("$version")}catch(Be){}if(!e)try{c=new ActiveXObject(d),e=c.GetVariable("$version")}catch(k){}e&&(e=e.split(" ")[1].split(","),e=e[0]+"."+e[1]+" r"+
+e[2])}b=e?e:"-"}rd=b;a.set(Ob,rd)}else a.set(Ob,"-")};var vd=function(a){if(Ba(a))this.s=a;else{var b=a[0],c=b.lastIndexOf(":"),d=b.lastIndexOf(".");this.h=this.i=this.l="";-1==c&&-1==d?this.h=b:-1==c&&-1!=d?(this.i=b.substring(0,d),this.h=b.substring(d+1)):-1!=c&&-1==d?(this.l=b.substring(0,c),this.h=b.substring(c+1)):c>d?(this.i=b.substring(0,d),this.l=b.substring(d+1,c),this.h=b.substring(c+1)):(this.i=b.substring(0,d),this.h=b.substring(d+1));this.Xa=a.slice(1);this.Ma=!this.l&&"_require"==this.h;this.J=!this.i&&!this.l&&"_provide"==this.h}},Y=function(){T(Y.prototype,
+"push",Y.prototype.push,5);T(Y.prototype,"_getPlugin",Pc,121);T(Y.prototype,"_createAsyncTracker",Y.prototype.Sa,33);T(Y.prototype,"_getAsyncTracker",Y.prototype.Ta,34);this.I=new nf;this.eb=[]};E=Y.prototype;E.Na=function(a,b,c){var d=this.I.get(a);if(!Ba(d))return!1;b.plugins_=b.plugins_||new nf;b.plugins_.set(a,new d(b,c||{}));return!0};E.push=function(a){var b=Z.Va.apply(this,arguments),b=Z.eb.concat(b);for(Z.eb=[];0<b.length&&!Z.O(b[0])&&!(b.shift(),0<Z.eb.length););Z.eb=Z.eb.concat(b);return 0};
+E.Va=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new vd(arguments[c]);d.J?this.O(d):b.push(d)}catch(e){}return b};
+E.O=function(a){try{if(a.s)a.s.apply(W);else if(a.J)this.I.set(a.Xa[0],a.Xa[1]);else{var b="_gat"==a.i?M:"_gaq"==a.i?Z:M.u(a.i);if(a.Ma){if(!this.Na(a.Xa[0],b,a.Xa[2])){if(!a.Pa){var c=Oa(""+a.Xa[1]);var d=c.protocol,e=J.location.protocol;var f;if(f="https:"==d||d==e?!0:"http:"!=d?!1:"http:"==e)a:{var Be=Oa(J.location.href);if(!(c.Oa||0<=c.url.indexOf("?")||0<=c.path.indexOf("://")||c.host==Be.host&&c.port==Be.port))for(var k="http:"==c.protocol?80:443,Ja=M.S,b=0;b<Ja.length;b++)if(c.host==Ja[b][0]&&
+(c.port||k)==(Ja[b][1]||k)&&0==c.path.indexOf(Ja[b][2])){f=!0;break a}f=!1}f&&!ld()&&(a.Pa=Ia(c.url))}return!0}}else a.l&&(b=b.plugins_.get(a.l)),b[a.h].apply(b,a.Xa)}}catch(t){}};E.Sa=function(a,b){return M.hb(a,b||"")};E.Ta=function(a){return M.u(a)};var yd=function(){function a(a,b,c,d){void 0==f[a]&&(f[a]={});void 0==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(void 0!=f[a]&&void 0!=f[a][b])return f[a][b][c]}function c(a,b){if(void 0!=f[a]&&void 0!=f[a][b]){f[a][b]=void 0;var c=!0,d;for(d=0;d<Be.length;d++)if(void 0!=f[a][Be[d]]){c=!1;break}c&&(f[a]=void 0)}}function d(a){var b="",c=!1,d,e;for(d=0;d<Be.length;d++)if(e=a[Be[d]],void 0!=e){c&&(b+=Be[d]);for(var c=[],f=void 0,Bd=void 0,Bd=0;Bd<e.length;Bd++)if(void 0!=e[Bd]){f="";1!=
+Bd&&void 0==e[Bd-1]&&(f+=Bd.toString()+"!");for(var fa=e[Bd],Ke="",Le=void 0,Me=void 0,ga=void 0,Le=0;Le<fa.length;Le++)Me=fa.charAt(Le),ga=k[Me],Ke+=void 0!=ga?ga:Me;f+=Ke;c.push(f)}b+="("+c.join("*")+")";c=!1}else c=!0;return b}var e=this,f=[],Be=["k","v"],k={"'":"'0",")":"'1","*":"'2","!":"'3"};e.Ra=function(a){return void 0!=f[a]};e.A=function(){for(var a="",b=0;b<f.length;b++)void 0!=f[b]&&(a+=b.toString()+d(f[b]));return a};e.Qa=function(a){if(void 0==a)return e.A();for(var b=a.A(),c=0;c<f.length;c++)void 0==
+f[c]||a.Ra(c)||(b+=c.toString()+d(f[c]));return b};e.f=function(b,c,d){if(!wd(d))return!1;a(b,"k",c,d);return!0};e.o=function(b,c,d){if(!xd(d))return!1;a(b,"v",c,d.toString());return!0};e.getKey=function(a,c){return b(a,"k",c)};e.N=function(a,c){return b(a,"v",c)};e.L=function(a){c(a,"k")};e.M=function(a){c(a,"v")};T(e,"_setKey",e.f,89);T(e,"_setValue",e.o,90);T(e,"_getKey",e.getKey,87);T(e,"_getValue",e.N,88);T(e,"_clearKey",e.L,85);T(e,"_clearValue",e.M,86)};
+function wd(a){return"string"==typeof a}function xd(a){return!("number"==typeof a||void 0!=Number&&a instanceof Number)||Math.round(a)!=a||isNaN(a)||Infinity==a?!1:!0};var zd=function(a){var b=W.gaGlobal;a&&!b&&(W.gaGlobal=b={});return b},Ad=function(){var a=zd(!0).hid;null==a&&(a=Ea(),zd(!0).hid=a);return a},Dd=function(a){a.set(Kb,Ad());var b=zd();if(b&&b.dh==a.get(O)){var c=b.sid;c&&(a.get(ac)?H(112):H(132),a.set(Zb,c),a.get(Sb)&&a.set(Wb,c));b=b.vid;a.get(Sb)&&b&&(b=b.split("."),a.set(Q,1*b[0]),a.set(Vb,1*b[1]))}};var Ed,Fd=function(a,b,c,d){var e=a.c(bb,""),f=a.c(P,"/");d=void 0!=d?d:a.b(cb,0);a=a.c(Wa,"");X(b,c,f,e,a,d)},Xc=function(a){var b=a.c(bb,"");a.b(O,1);var c=a.c(P,"/"),d=a.c(Wa,"");X("__utma",cd(a),c,b,d,a.get(cb));X("__utmb",dd(a),c,b,d,a.get(db));X("__utmc",""+a.b(O,1),c,b,d);var e=hd(a,!0);e?X("__utmz",e,c,b,d,a.get(eb)):X("__utmz","",c,b,"",-1);(e=fd(a,!1))?X("__utmv",e,c,b,d,a.get(cb)):X("__utmv","",c,b,"",-1)},Wc=function(a){var b=a.b(O,1);if(!bd(a,$c(b,pd("__utma"))))return a.set(Ub,!0),!1;
+var c=!ed(a,$c(b,pd("__utmb")));a.set(bc,c);id(a,$c(b,pd("__utmz")));gd(a,$c(b,pd("__utmv")));Ed=!c;return!0},Gd=function(a){Ed||0<pd("__utmb").length||(X("__utmd","1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),1E4),0==pd("__utmd").length&&a.stopPropagation())};var h=0,Jd=function(a){void 0==a.get(Q)?Hd(a):a.get(Ub)&&!a.get(Mc)?Hd(a):a.get(bc)&&Id(a)},Kd=function(a){a.get(hc)&&!a.get(ac)&&(Id(a),a.set(fc,a.get($b)))},Hd=function(a){h++;1<h&&H(137);var b=a.get(ab);a.set(Sb,!0);a.set(Q,Ea()^td(a)&2147483647);a.set(Tb,"");a.set(Vb,b);a.set(Wb,b);a.set(Zb,b);a.set($b,1);a.set(ac,!0);a.set(cc,0);a.set(R,10);a.set(dc,b);a.set(Fb,[]);a.set(Ub,!1);a.set(bc,!1)},Id=function(a){h++;1<h&&H(137);a.set(Wb,a.get(Zb));a.set(Zb,a.get(ab));a.Za($b);a.set(ac,!0);a.set(cc,
+0);a.set(R,10);a.set(dc,a.get(ab));a.set(bc,!1)};var Ld="daum:q eniro:search_word naver:query pchome:q images.google:q google:q yahoo:p yahoo:q msn:q bing:q aol:query aol:q lycos:q lycos:query ask:q cnn:query virgilio:qs baidu:wd baidu:word alice:qs yandex:text najdi:q seznam:q rakuten:qt biglobe:q goo.ne:MT search.smt.docomo:MT onet:qt onet:q kvasir:q terra:query rambler:query conduit:q babylon:q search-results:q avg:q comcast:q incredimail:q startsiden:q go.mail.ru:q centrum.cz:q 360.cn:q sogou:query tut.by:query globo:q ukr:q so.com:q haosou.com:q auone:q".split(" "),
+Sd=function(a){if(a.get(kb)&&!a.get(Mc)){var b;b=!F(a.get(ic))||!F(a.get(nc))||!F(a.get(S))||!F(a.get(lc));for(var c={},d=0;d<Md.length;d++){var e=Md[d];c[e]=a.get(e)}(d=a.get(rc))?(H(149),e=new nf,Na(e,d),d=e):d=La(J.location.href,a.get(gb)).R;if("1"!=L(d.get(a.get(ub)))||!b)if(d=Xe(a,d)||Qd(a),d||b||!a.get(ac)||(Pd(a,void 0,"(direct)",void 0,void 0,void 0,"(direct)","(none)",void 0,void 0),d=!0),d&&(a.set(hc,Rd(a,c)),b="(direct)"==a.get(nc)&&"(direct)"==a.get(jc)&&"(none)"==a.get(oc),a.get(hc)||
+a.get(ac)&&!b))a.set(ec,a.get(ab)),a.set(fc,a.get($b)),a.Za(gc)}},Xe=function(a,b){function c(c,d){d=d||"-";var e=L(b.get(a.get(c)));return e&&"-"!=e?I(e):d}var d=L(b.get(a.get(nb)))||"-",e=L(b.get(a.get(qb)))||"-",f=L(b.get(a.get(pb)))||"-",Be=L(b.get("gclsrc"))||"-",k=L(b.get("dclid"))||"-",Ja=c(ob,"(not set)"),t=c(rb,"(not set)"),Za=c(sb),Ma=c(tb);if(F(d)&&F(f)&&F(k)&&F(e))return!1;var mb=!F(f)&&!F(Be),mb=F(e)&&(!F(k)||mb),Xb=F(Za);if(mb||Xb){var Bd=Nd(a),Bd=La(Bd,!0);(Bd=Od(a,Bd))&&!F(Bd[1]&&
+!Bd[2])&&(mb&&(e=Bd[0]),Xb&&(Za=Bd[1]))}Pd(a,d,e,f,Be,k,Ja,t,Za,Ma);return!0},Qd=function(a){var b=Nd(a),c=La(b,!0);(b=!(void 0!=b&&null!=b&&""!=b&&"0"!=b&&"-"!=b&&0<=b.indexOf("://")))||(b=c&&-1<c.host.indexOf("google")&&c.R.contains("q")&&"cse"==c.path);if(b)return!1;if((b=Od(a,c))&&!b[2])return Pd(a,void 0,b[0],void 0,void 0,void 0,"(organic)","organic",b[1],void 0),!0;if(b||!a.get(ac))return!1;a:{for(var b=a.get(Bb),d=Ka(c.host),e=0;e<b.length;++e)if(-1<d.indexOf(b[e])){a=!1;break a}Pd(a,void 0,
+d,void 0,void 0,void 0,"(referral)","referral",void 0,"/"+c.path);a=!0}return a},Od=function(a,b){for(var c=a.get(zb),d=0;d<c.length;++d){var e=c[d].split(":");if(-1<b.host.indexOf(e[0].toLowerCase())){var f=b.R.get(e[1]);if(f&&(f=K(f),!f&&-1<b.host.indexOf("google.")&&(f="(not provided)"),!e[3]||-1<b.url.indexOf(e[3]))){f||H(151);a:{for(var c=f,d=a.get(Ab),c=I(c).toLowerCase(),Be=0;Be<d.length;++Be)if(c==d[Be]){c=!0;break a}c=!1}return[e[2]||e[0],f,c]}}}return null},Pd=function(a,b,c,d,e,f,Be,k,
+Ja,t){a.set(ic,b);a.set(nc,c);a.set(S,d);a.set(kc,e);a.set(lc,f);a.set(jc,Be);a.set(oc,k);a.set(pc,Ja);a.set(qc,t)},Md=[jc,ic,S,lc,nc,oc,pc,qc],Rd=function(a,b){function c(a){a=(""+a).split("+").join("%20");return a=a.split(" ").join("%20")}function d(c){var d=""+(a.get(c)||"");c=""+(b[c]||"");return 0<d.length&&d==c}if(d(S)||d(lc))return H(131),!1;for(var e=0;e<Md.length;e++){var f=Md[e],Be=b[f]||"-",f=a.get(f)||"-";if(c(Be)!=c(f))return!0}return!1},Td=new RegExp(/^https?:\/\/(www\.)?google(\.com?)?(\.[a-z]{2}t?)?\/?$/i),
+jf=/^https?:\/\/(r\.)?search\.yahoo\.com?(\.jp)?\/?[^?]*$/i,rf=/^https?:\/\/(www\.)?bing\.com\/?$/i,Nd=function(a){a=Pa(a.get(Jb),a.get(P));try{if(Td.test(a))return H(136),a+"?q=";if(jf.test(a))return H(150),a+"?p=(not provided)";if(rf.test(a))return a+"?q=(not provided)"}catch(b){H(145)}return a};var Ud,Vd,Wd=function(a){Ud=a.c(S,"");Vd=a.c(kc,"")},Xd=function(a){var b=a.c(S,""),c=a.c(kc,"");b!=Ud&&(-1<c.indexOf("ds")?a.set(mc,void 0):!F(Ud)&&-1<Vd.indexOf("ds")&&a.set(mc,Ud))};var Zd=function(a){Yd(a,J.location.href)?(a.set(Mc,!0),H(12)):a.set(Mc,!1)},Yd=function(a,b){if(!a.get(fb))return!1;var c=La(b,a.get(gb)),d=K(c.R.get("__utma")),e=K(c.R.get("__utmb")),f=K(c.R.get("__utmc")),Be=K(c.R.get("__utmx")),k=K(c.R.get("__utmz")),Ja=K(c.R.get("__utmv")),c=K(c.R.get("__utmk"));if(Yc(""+d+e+f+Be+k+Ja)!=c){d=I(d);e=I(e);f=I(f);Be=I(Be);f=$d(d+e+f+Be,k,Ja,c);if(!f)return!1;k=f[0];Ja=f[1]}if(!bd(a,d,!0))return!1;ed(a,e,!0);id(a,k,!0);gd(a,Ja,!0);ae(a,Be,!0);return!0},ce=function(a,
+b,c){var d;d=cd(a)||"-";var e=dd(a)||"-",f=""+a.b(O,1)||"-",Be=be(a)||"-",k=hd(a,!1)||"-";a=fd(a,!1)||"-";var Ja=Yc(""+d+e+f+Be+k+a),t=[];t.push("__utma="+d);t.push("__utmb="+e);t.push("__utmc="+f);t.push("__utmx="+Be);t.push("__utmz="+k);t.push("__utmv="+a);t.push("__utmk="+Ja);d=t.join("&");if(!d)return b;e=b.indexOf("#");if(c)return 0>e?b+"#"+d:b+"&"+d;c="";f=b.indexOf("?");0<e&&(c=b.substring(e),b=b.substring(0,e));return 0>f?b+"?"+d+c:b+"&"+d+c},$d=function(a,b,c,d){for(var e=0;3>e;e++){for(var f=
+0;3>f;f++){if(d==Yc(a+b+c))return H(127),[b,c];var Be=b.replace(/ /g,"%20"),k=c.replace(/ /g,"%20");if(d==Yc(a+Be+k))return H(128),[Be,k];Be=Be.replace(/\+/g,"%20");k=k.replace(/\+/g,"%20");if(d==Yc(a+Be+k))return H(129),[Be,k];try{var Ja=b.match("utmctr=(.*?)(?:\\|utm|$)");if(Ja&&2==Ja.length&&(Be=b.replace(Ja[1],G(I(Ja[1]))),d==Yc(a+Be+c)))return H(139),[Be,c]}catch(t){}b=I(b)}c=I(c)}};var de="|",fe=function(a,b,c,d,e,f,Be,k,Ja){var t=ee(a,b);t||(t={},a.get(Cb).push(t));t.id_=b;t.affiliation_=c;t.total_=d;t.tax_=e;t.shipping_=f;t.city_=Be;t.state_=k;t.country_=Ja;t.items_=t.items_||[];return t},ge=function(a,b,c,d,e,f,Be){a=ee(a,b)||fe(a,b,"",0,0,0,"","","");var k;a:{if(a&&a.items_){k=a.items_;for(var Ja=0;Ja<k.length;Ja++)if(k[Ja].sku_==c){k=k[Ja];break a}}k=null}Ja=k||{};Ja.transId_=b;Ja.sku_=c;Ja.name_=d;Ja.category_=e;Ja.price_=f;Ja.quantity_=Be;k||a.items_.push(Ja);return Ja},
+ee=function(a,b){for(var c=a.get(Cb),d=0;d<c.length;d++)if(c[d].id_==b)return c[d];return null};var he,ie=function(a){if(!he){var b;b=J.location.hash;var c=W.name,d=/^#?gaso=([^&]*)/;if(c=(b=(b=b&&b.match(d)||c&&c.match(d))?b[1]:K(pd("GASO")))&&b.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))Fd(a,"GASO",""+b,0),M._gasoDomain=a.get(bb),M._gasoCPath=a.get(P),a=c[1],Ia("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+Ea(),"_gasojs");he=!0}};var ae=function(a,b,c){c&&(b=I(b));c=a.b(O,1);b=b.split(".");2>b.length||!/^\d+$/.test(b[0])||(b[0]=""+c,Fd(a,"__utmx",b.join("."),void 0))},be=function(a,b){var c=$c(a.get(O),pd("__utmx"));"-"==c&&(c="");return b?G(c):c},Ye=function(a){try{var b=La(J.location.href,!1),c=decodeURIComponent(L(b.R.get("utm_referrer")))||"";c&&a.set(Jb,c);var d=decodeURIComponent(K(b.R.get("utm_expid")))||"";d&&(d=d.split(".")[0],a.set(Oc,""+d))}catch(e){H(146)}},l=function(a){var b=W.gaData&&W.gaData.expId;b&&a.set(Oc,
+""+b)};var ke=function(a,b){var c=Math.min(a.b(Dc,0),100);if(a.b(Q,0)%100>=c)return!1;c=Ze()||$e();if(void 0==c)return!1;var d=c[0];if(void 0==d||Infinity==d||isNaN(d))return!1;0<d?af(c)?b(je(c)):b(je(c.slice(0,1))):Ga(W,"load",function(){ke(a,b)},!1);return!0},me=function(a,b,c,d){var e=new yd;e.f(14,90,b.substring(0,500));e.f(14,91,a.substring(0,150));e.f(14,92,""+le(c));void 0!=d&&e.f(14,93,d.substring(0,500));e.o(14,90,c);return e},af=function(a){for(var b=1;b<a.length;b++)if(isNaN(a[b])||Infinity==
+a[b]||0>a[b])return!1;return!0},le=function(a){return isNaN(a)||0>a?0:5E3>a?10*Math.floor(a/10):5E4>a?100*Math.floor(a/100):41E5>a?1E3*Math.floor(a/1E3):41E5},je=function(a){for(var b=new yd,c=0;c<a.length;c++)b.f(14,c+1,""+le(a[c])),b.o(14,c+1,a[c]);return b},Ze=function(){var a=W.performance||W.webkitPerformance;if(a=a&&a.timing){var b=a.navigationStart;if(0==b)H(133);else return[a.loadEventStart-b,a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart,
+a.responseEnd-a.responseStart,a.fetchStart-b,a.domInteractive-b,a.domContentLoadedEventStart-b]}},$e=function(){if(W.top==W){var a=W.external,b=a&&a.onloadT;a&&!a.isValidLoadTime&&(b=void 0);2147483648<b&&(b=void 0);0<b&&a.setPageReadyTime();return void 0==b?void 0:[b]}};var cf=function(a){if(a.get(Sb))try{var b;a:{var c=pd(a.get(Oe)||"_ga");if(c&&!(1>c.length)){for(var d=[],e=0;e<c.length;e++){var f;var Be=c[e].split("."),k=Be.shift();if(("GA1"==k||"1"==k)&&1<Be.length){var Ja=Be.shift().split("-");1==Ja.length&&(Ja[1]="1");Ja[0]*=1;Ja[1]*=1;f={Ya:Ja,$a:Be.join(".")}}else f=void 0;f&&d.push(f)}if(1==d.length){b=d[0].$a;break a}if(0!=d.length){var t=a.get(Pe)||a.get(bb),d=bf(d,(0==t.indexOf(".")?t.substr(1):t).split(".").length,0);if(1==d.length){b=d[0].$a;break a}var Za=
+a.get(Qe)||a.get(P);(c=Za)?(1<c.length&&"/"==c.charAt(c.length-1)&&(c=c.substr(0,c.length-1)),0!=c.indexOf("/")&&(c="/"+c),Za=c):Za="/";d=bf(d,"/"==Za?1:Za.split("/").length,1);b=d[0].$a;break a}}b=void 0}if(b){var Ma=(""+b).split(".");2==Ma.length&&/[0-9.]/.test(Ma)&&(H(114),a.set(Q,Ma[0]),a.set(Vb,Ma[1]),a.set(Sb,!1))}}catch(mb){H(115)}},bf=function(a,b,c){for(var d=[],e=[],f=128,Be=0;Be<a.length;Be++){var k=a[Be];k.Ya[c]==b?d.push(k):k.Ya[c]==f?e.push(k):k.Ya[c]<f&&(e=[k],f=k.Ya[c])}return 0<d.length?
+d:e};var kf=/^gtm\d+$/,hf=function(a){var b;b=!!a.b(Cd,1);b&&(H(140),"page"!=a.get(sc)?a.set(Kc,"",!0):(b=a.c(Lc,""),b||(b=(b=a.c($a,""))&&"~0"!=b?kf.test(b)?"__utmt_"+G(a.c(Wa,"")):"__utmt_"+G(b):"__utmt"),0<pd(b).length?a.set(Kc,"",!0):(X(b,"1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),6E5),0<pd(b).length&&(a.set(Kc,Ea(),!0),a.set(Yb,1,!0),a.set(Jc,Ne()+"/r/__utm.gif?",!0)))))};var U=function(a,b,c){function d(a){return function(b){if((b=b.get(Nc)[a])&&b.length)for(var c=Te(e,a),d=0;d<b.length;d++)b[d].call(e,c)}}var e=this;this.a=new Zc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(Wa,b||"UA-XXXXX-X");this.set($a,a||"");this.set(Ya,c||"");this.set(ab,Math.round((new Date).getTime()/1E3));this.set(P,"/");this.set(cb,63072E6);this.set(eb,15768E6);this.set(db,18E5);this.set(fb,!1);this.set(yb,50);this.set(gb,!1);this.set(hb,
+!0);this.set(ib,!0);this.set(jb,!0);this.set(kb,!0);this.set(lb,!0);this.set(ob,"utm_campaign");this.set(nb,"utm_id");this.set(pb,"gclid");this.set(qb,"utm_source");this.set(rb,"utm_medium");this.set(sb,"utm_term");this.set(tb,"utm_content");this.set(ub,"utm_nooverride");this.set(vb,100);this.set(Dc,1);this.set(Ec,!1);this.set(wb,"/__utm.gif");this.set(xb,1);this.set(Cb,[]);this.set(Fb,[]);this.set(zb,Ld.slice(0));this.set(Ab,[]);this.set(Bb,[]);this.B("auto");this.set(Jb,J.referrer);Ye(this.a);this.set(Nc,
+{hit:[],load:[]});this.a.g("0",Zd);this.a.g("1",Wd);this.a.g("2",Jd);this.a.g("3",cf);this.a.g("4",Sd);this.a.g("5",Xd);this.a.g("6",Kd);this.a.g("7",d("load"));this.a.g("8",ie);this.a.v("A",kd);this.a.v("B",md);this.a.v("C",Ge);this.a.v("D",Jd);this.a.v("E",jd);this.a.v("F",Tc);this.a.v("G",ne);this.a.v("H",lf);this.a.v("I",Gd);this.a.v("J",nd);this.a.v("K",ud);this.a.v("L",Dd);this.a.v("M",l);this.a.v("N",hf);this.a.v("O",d("hit"));this.a.v("P",oe);this.a.v("Q",pe);0===this.get(ab)&&H(111);this.a.T();
+this.H=void 0};E=U.prototype;E.m=function(){var a=this.get(Db);a||(a=new yd,this.set(Db,a));return a};E.La=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&this.set(b,c,!0)}};E.K=function(a){if(this.get(Ec))return!1;var b=this,c=ke(this.a,function(c){b.set(Hb,a,!0);b.ib(c)});this.set(Ec,c);return c};E.Fa=function(a){a&&Ca(a)?(H(13),this.set(Hb,a,!0)):"object"===typeof a&&null!==a&&this.La(a);this.H=a=this.get(Hb);this.a.j("page");this.K(a)};
+E.F=function(a,b,c,d,e){if(""==a||!wd(a)||""==b||!wd(b)||void 0!=c&&!wd(c)||void 0!=d&&!xd(d))return!1;this.set(wc,a,!0);this.set(xc,b,!0);this.set(yc,c,!0);this.set(zc,d,!0);this.set(vc,!!e,!0);this.a.j("event");return!0};E.Ha=function(a,b,c,d,e){var f=this.a.b(Dc,0);1*e===e&&(f=e);if(this.a.b(Q,0)%100>=f)return!1;c=1*(""+c);if(""==a||!wd(a)||""==b||!wd(b)||!xd(c)||isNaN(c)||0>c||0>f||100<f||void 0!=d&&(""==d||!wd(d)))return!1;this.ib(me(a,b,c,d));return!0};
+E.Ga=function(a,b,c,d){if(!a||!b)return!1;this.set(Ac,a,!0);this.set(Bc,b,!0);this.set(Cc,c||J.location.href,!0);d&&this.set(Hb,d,!0);this.a.j("social");return!0};E.Ea=function(){this.set(Dc,10);this.K(this.H)};E.Ia=function(){this.a.j("trans")};E.ib=function(a){this.set(Eb,a,!0);this.a.j("event")};E.ia=function(a){this.initData();var b=this;return{_trackEvent:function(c,d,e){H(91);b.F(a,c,d,e)}}};E.ma=function(a){return this.get(a)};
+E.xa=function(a,b){if(a)if(Ca(a))this.set(a,b);else if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};E.addEventListener=function(a,b){var c=this.get(Nc)[a];c&&c.push(b)};E.removeEventListener=function(a,b){for(var c=this.get(Nc)[a],d=0;c&&d<c.length;d++)if(c[d]==b){c.splice(d,1);break}};E.qa=function(){return"5.6.7"};E.B=function(a){this.get(hb);a="auto"==a?Ka(J.domain):a&&"-"!=a&&"none"!=a?a.toLowerCase():"";this.set(bb,a)};E.va=function(a){this.set(hb,!!a)};
+E.na=function(a,b){return ce(this.a,a,b)};E.link=function(a,b){if(this.a.get(fb)&&a){var c=ce(this.a,a,b);J.location.href=c}};E.ua=function(a,b){this.a.get(fb)&&a&&a.action&&(a.action=ce(this.a,a.action,b))};
+E.za=function(){this.initData();var a=this.a,b=J.getElementById?J.getElementById("utmtrans"):J.utmform&&J.utmform.utmtrans?J.utmform.utmtrans:null;if(b&&b.value){a.set(Cb,[]);for(var b=b.value.split("UTM:"),c=0;c<b.length;c++){b[c]=Da(b[c]);for(var d=b[c].split(de),e=0;e<d.length;e++)d[e]=Da(d[e]);"T"==d[0]?fe(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ge(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};E.$=function(a,b,c,d,e,f,Be,k){return fe(this.a,a,b,c,d,e,f,Be,k)};
+E.Y=function(a,b,c,d,e,f){return ge(this.a,a,b,c,d,e,f)};E.Aa=function(a){de=a||"|"};E.ea=function(){this.set(Cb,[])};E.wa=function(a,b,c,d){var e=this.a;if(0>=a||a>e.get(yb))a=!1;else if(!b||!c||128<b.length+c.length)a=!1;else{1!=d&&2!=d&&(d=3);var f={};f.name=b;f.value=c;f.scope=d;e.get(Fb)[a]=f;a=!0}a&&this.a.gb();return a};E.ka=function(a){this.a.get(Fb)[a]=void 0;this.a.gb()};E.ra=function(a){return(a=this.a.get(Fb)[a])&&1==a.scope?a.value:void 0};
+E.Ca=function(a,b,c){12==a&&1==b?this.set(pf,c):this.m().f(a,b,c)};E.Da=function(a,b,c){this.m().o(a,b,c)};E.sa=function(a,b){return this.m().getKey(a,b)};E.ta=function(a,b){return this.m().N(a,b)};E.fa=function(a){this.m().L(a)};E.ga=function(a){this.m().M(a)};E.ja=function(){return new yd};E.W=function(a){a&&this.get(Ab).push(a.toLowerCase())};E.ba=function(){this.set(Ab,[])};E.X=function(a){a&&this.get(Bb).push(a.toLowerCase())};E.ca=function(){this.set(Bb,[])};
+E.Z=function(a,b,c,d,e){if(a&&b){a=[a,b.toLowerCase()].join(":");if(d||e)a=[a,d,e].join(":");d=this.get(zb);d.splice(c?0:d.length,0,a)}};E.da=function(){this.set(zb,[])};E.ha=function(a){this.a.load();var b=this.get(P),c=be(this.a);this.set(P,a);this.a.gb();ae(this.a,c);this.set(P,b)};E.ya=function(a,b){if(0<a&&5>=a&&Ca(b)&&""!=b){var c=this.get(Fc)||[];c[a]=b;this.set(Fc,c)}};E.V=function(a){a=""+a;if(a.match(/^[A-Za-z0-9]{1,5}$/)){var b=this.get(Ic)||[];b.push(a);this.set(Ic,b)}};E.initData=function(){this.a.load()};
+E.Ba=function(a){a&&""!=a&&(this.set(Tb,a),this.a.j("var"))};var ne=function(a){"trans"!==a.get(sc)&&500<=a.b(cc,0)&&a.stopPropagation();if("event"===a.get(sc)){var b=(new Date).getTime(),c=a.b(dc,0),d=a.b(Zb,0),c=Math.floor((b-(c!=d?c:1E3*c))/1E3*1);0<c&&(a.set(dc,b),a.set(R,Math.min(10,a.b(R,0)+c)));0>=a.b(R,0)&&a.stopPropagation()}},pe=function(a){"event"===a.get(sc)&&a.set(R,Math.max(0,a.b(R,10)-1))};var qe=function(){var a=[];this.add=function(b,c,d){d&&(c=G(""+c));a.push(b+"="+c)};this.toString=function(){return a.join("&")}},re=function(a,b){(b||2!=a.get(xb))&&a.Za(cc)},se=function(a,b){b.add("utmwv","5.6.7");b.add("utms",a.get(cc));b.add("utmn",Ea());var c=J.location.hostname;F(c)||b.add("utmhn",c,!0);c=a.get(vb);100!=c&&b.add("utmsp",c,!0)},te=function(a,b){b.add("utmht",(new Date).getTime());b.add("utmac",Da(a.get(Wa)));a.get(Oc)&&b.add("utmxkey",a.get(Oc),!0);a.get(vc)&&b.add("utmni",1);
+a.get(of)&&b.add("utmgtm",a.get(of),!0);var c=a.get(Ic);c&&0<c.length&&b.add("utmdid",c.join("."));ff(a,b);!1!==a.get(Xa)&&(a.get(Xa)||M.w)&&b.add("aip",1);void 0!==a.get(Kc)&&b.add("utmjid",a.c(Kc,""),!0);a.b(Yb,0)&&b.add("utmredir",a.b(Yb,0),!0);M.bb||(M.bb=a.get(Wa));(1<M.ab()||M.bb!=a.get(Wa))&&b.add("utmmt",1);b.add("utmu",od.encode())},ue=function(a,b){for(var c=a.get(Fc)||[],d=[],e=1;e<c.length;e++)c[e]&&d.push(e+":"+G(c[e].replace(/%/g,"%25").replace(/:/g,"%3A").replace(/,/g,"%2C")));d.length&&
+b.add("utmpg",d.join(","))},ff=function(a,b){function c(a,b){b&&d.push(a+"="+b+";")}var d=[];c("__utma",cd(a));c("__utmz",hd(a,!1));c("__utmv",fd(a,!0));c("__utmx",be(a));b.add("utmcc",d.join("+"),!0)},ve=function(a,b){a.get(ib)&&(b.add("utmcs",a.get(Qb),!0),b.add("utmsr",a.get(Lb)),a.get(Rb)&&b.add("utmvp",a.get(Rb)),b.add("utmsc",a.get(Mb)),b.add("utmul",a.get(Pb)),b.add("utmje",a.get(Nb)),b.add("utmfl",a.get(Ob),!0))},we=function(a,b){a.get(lb)&&a.get(Ib)&&b.add("utmdt",a.get(Ib),!0);b.add("utmhid",
+a.get(Kb));b.add("utmr",Pa(a.get(Jb),a.get(P)),!0);b.add("utmp",G(a.get(Hb),!0),!0)},xe=function(a,b){for(var c=a.get(Db),d=a.get(Eb),e=a.get(Fb)||[],f=0;f<e.length;f++){var Be=e[f];Be&&(c||(c=new yd),c.f(8,f,Be.name),c.f(9,f,Be.value),3!=Be.scope&&c.f(11,f,""+Be.scope))}F(a.get(wc))||F(a.get(xc),!0)||(c||(c=new yd),c.f(5,1,a.get(wc)),c.f(5,2,a.get(xc)),e=a.get(yc),void 0!=e&&c.f(5,3,e),e=a.get(zc),void 0!=e&&c.o(5,1,e));F(a.get(pf))||(c||(c=new yd),c.f(12,1,a.get(pf)));c?b.add("utme",c.Qa(d),!0):
+d&&b.add("utme",d.A(),!0)},ye=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,!0);d.add("utmtst",b.affiliation_,!0);d.add("utmtto",b.total_,!0);d.add("utmttx",b.tax_,!0);d.add("utmtsp",b.shipping_,!0);d.add("utmtci",b.city_,!0);d.add("utmtrg",b.state_,!0);d.add("utmtco",b.country_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},ze=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","item");d.add("utmtid",
+b.transId_,!0);d.add("utmipc",b.sku_,!0);d.add("utmipn",b.name_,!0);d.add("utmiva",b.category_,!0);d.add("utmipr",b.price_,!0);d.add("utmiqt",b.quantity_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},Ae=function(a,b){var c=a.get(sc);if("page"==c)c=new qe,re(a,b),se(a,c),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),c=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),
+c=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c.toString()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):"feedback"==c?b?c=[]:(c=new qe,
+re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var Be=a.get(wb)+"?";b=Ae(a,!0);for(var k=0,Ja=b.length;k<Ja;k++)Sa(b[k],e,Be,!0),f++}if(1==c||2==c)for(b=Ae(a),a=a.c(Jc,""),k=0,Ja=b.length;k<Ja;k++)try{Sa(b[k],e,a),f++}catch(t){t&&Ra(t.name,void 0,t.message)}d&&(d.fb=f)};var Ne=function(){return"https:"==J.location.protocol||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)gf(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||ef(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},gf=function(a,b,c){c=c||Ne()+"/__utm.gif?";
+var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},ef=function(a,b){if(0!=Ne().indexOf(J.location.protocol))return!1;var c;c=W.XDomainRequest;if(!c)return!1;c=new c;c.open("POST",Ne()+"/p/__utm.gif");c.onerror=function(){b()};c.onload=b;c.send(a);return!0},df=function(a,b){var c=W.XMLHttpRequest;if(!c)return!1;var d=new c;if(!("withCredentials"in d))return!1;d.open("POST",Ne()+"/p/__utm.gif",!0);d.withCredentials=
+!0;d.setRequestHeader("Content-Type","text/plain");d.onreadystatechange=function(){4==d.readyState&&(b(),d=null)};d.send(a);return!0},Ee=function(a,b){if(!J.body)return We(function(){Ee(a,b)},100),!0;a=encodeURIComponent(a);try{var c=J.createElement('<iframe name="'+a+'"></iframe>')}catch(d){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var e=Ne()+"/u/post_iframe.html";Ga(W,"beforeunload",function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});
+setTimeout(b,1E3);J.body.appendChild(c);c.src=e;return!0};var qf=function(){this.G=this.w=!1;0==Ea()%1E4&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Re();Se()};E=qf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length};
+E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new qf;var Ha=W._gat;Ha&&Ba(Ha._getTracker)?M=Ha:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})();
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/hoverIntent-r7.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/hoverIntent-r7.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/hoverIntent-r7.js	(revision 33547)
@@ -0,0 +1,114 @@
+/**
+ * hoverIntent is similar to jQuery's built-in "hover" method except that
+ * instead of firing the handlerIn function immediately, hoverIntent checks
+ * to see if the user's mouse has slowed down (beneath the sensitivity
+ * threshold) before firing the event. The handlerOut function is only
+ * called after a matching handlerIn.
+ *
+ * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
+ * http://cherne.net/brian/resources/jquery.hoverIntent.html
+ *
+ * You may use hoverIntent under the terms of the MIT license. Basically that
+ * means you are free to use hoverIntent as long as this header is left intact.
+ * Copyright 2007, 2013 Brian Cherne
+ *
+ * // basic usage ... just like .hover()
+ * .hoverIntent( handlerIn, handlerOut )
+ * .hoverIntent( handlerInOut )
+ *
+ * // basic usage ... with event delegation!
+ * .hoverIntent( handlerIn, handlerOut, selector )
+ * .hoverIntent( handlerInOut, selector )
+ *
+ * // using a basic configuration object
+ * .hoverIntent( config )
+ *
+ * @param  handlerIn   function OR configuration object
+ * @param  handlerOut  function OR selector for delegation OR undefined
+ * @param  selector    selector OR undefined
+ * @author Brian Cherne <brian(at)cherne(dot)net>
+ **/
+(function($) {
+    $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
+
+        // default configuration values
+        var cfg = {
+            interval: 100,
+            sensitivity: 7,
+            timeout: 0
+        };
+
+        if ( typeof handlerIn === "object" ) {
+            cfg = $.extend(cfg, handlerIn );
+        } else if ($.isFunction(handlerOut)) {
+            cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
+        } else {
+            cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
+        }
+
+        // instantiate variables
+        // cX, cY = current X and Y position of mouse, updated by mousemove event
+        // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
+        var cX, cY, pX, pY;
+
+        // A private function for getting mouse position
+        var track = function(ev) {
+            cX = ev.pageX;
+            cY = ev.pageY;
+        };
+
+        // A private function for comparing current and previous mouse position
+        var compare = function(ev,ob) {
+            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
+            // compare mouse positions to see if they've crossed the threshold
+            if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
+                $(ob).off("mousemove.hoverIntent",track);
+                // set hoverIntent state to true (so mouseOut can be called)
+                ob.hoverIntent_s = 1;
+                return cfg.over.apply(ob,[ev]);
+            } else {
+                // set previous coordinates for next time
+                pX = cX; pY = cY;
+                // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
+                ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
+            }
+        };
+
+        // A private function for delaying the mouseOut function
+        var delay = function(ev,ob) {
+            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
+            ob.hoverIntent_s = 0;
+            return cfg.out.apply(ob,[ev]);
+        };
+
+        // A private function for handling mouse 'hovering'
+        var handleHover = function(e) {
+            // copy objects to be passed into t (required for event object to be passed in IE)
+            var ev = jQuery.extend({},e);
+            var ob = this;
+
+            // cancel hoverIntent timer if it exists
+            if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
+
+            // if e.type == "mouseenter"
+            if (e.type == "mouseenter") {
+                // set "previous" X and Y position based on initial entry point
+                pX = ev.pageX; pY = ev.pageY;
+                // update "current" X and Y position based on mousemove
+                $(ob).on("mousemove.hoverIntent",track);
+                // start polling interval (self-calling timeout) to compare mouse coordinates over time
+                if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
+
+                // else e.type == "mouseleave"
+            } else {
+                // unbind expensive mousemove event
+                $(ob).off("mousemove.hoverIntent",track);
+                // if hoverIntent state is true, then call the mouseOut function after the specified delay
+                if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
+            }
+        };
+
+        // listen for mouseenter and mouseleave
+        return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
+    };
+})(jQuery);
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/jquery-1.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/jquery-1.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/jquery-1.js	(revision 33547)
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f
+}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)
+},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/main160201.css
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/main160201.css	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/main160201.css	(revision 33547)
@@ -0,0 +1,1 @@
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,th,var{font-style:normal;font-weight:400}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h6{font-size:100%;font-weight:400}q:before,q:after{content:''}abbr,acronym{border:0}html{font-size:50%}body{font-size:125%;background:#E3E9C4;font:normal 12px/16px Arial,Helvetica,sans-serif;color:#000;text-align:center}h1 a{display:block;width:265px;height:102px;background:#FFF url(http://www.australianmusiccentre.com.au/images/logo.gif) no-repeat top left;text-indent:-9999px}h2{color:#5C3F31;font-size:24px;margin:0 0 10px;line-height:28px}h3{color:#5C3F31;font-size:18px;margin:10px 0 15px;line-height:22px}h3.subtitle{color:#5C3F31;font-size:16px;margin:0 0 15px;line-height:20px}h4{font-size:14px;color:#5C3F31;margin:0 0 5px}h5{font-size:14px;color:#5C3F31;margin:0 0 5px;font-weight:700}p{margin:0 0 10px;line-height:18px}p.save{padding:10px;background:#D6E882;text-align:right;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #C0D270}p.save input{margin:0}p.alert{padding:10px;background:#ffe894;border:1px solid #fbc709;clear:both}p.highlight{padding:10px;background:#ffc;border:1px solid #cc9;clear:both}.error_list{padding:10px;border:1px solid #A91212;background:#FFD2D2}small{font-size:10px}ul{margin:0 0 15px;list-style-type:disc;list-style-position:inside}li{padding:5px 10px}ul li ul{list-style-type:circle;margin:10px 0 0}dl{margin-bottom:15px!important}dt{font-weight:700;margin:0 0 3px}dd{padding:2px}a:link,a:active,a:visited{color:#107E2B}a:hover{color:#045017}hr{clear:both;margin:15px 0;height:1px;border:0;background:#F7FAE6;color:#F7FAE6}form ul{list-style:none}label{display:block;margin:0 0 2px}input,textarea,select{padding:2px;font-size:12px;margin:0 0 5px}input{width:80%}input[type="radio"],input[type="checkbox"],input[type="submit"],input[type="button"],input[type="image"]{width:auto}input[type="image"]{padding:0;margin:0}input.area_code{width:20px;margin:0 5px 0 0}input.phone_no{width:234px}input.post_code{width:50px}input.town{width:235px;margin:0 5px 0 0}input.donation{width:75px}p.honeyinput{display:none}table{width:100%;margin:0 0 15px}thead{background:#DDD url(http://www.australianmusiccentre.com.au/images/bg-thead.gif) repeat-x top left;border-top:1px solid #DDD;border-left:1px solid #DDD;border-right:1px solid #DDD}th{font-weight:700;color:#4F4F4F;padding:5px 10px}td{padding:5px}tbody{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-tbody.gif) repeat-x top left}table.nostyle tbody{background:none}td{border:1px solid #DDD}table.nostyle td{border:none}.icon_cart{padding:0 10px 0 25px;background:transparent url(http://www.australianmusiccentre.com.au/images/icon-cart.gif) no-repeat center left}.icon_account{padding:0 10px 0 25px;background:transparent url(http://www.australianmusiccentre.com.au/images/icon-account.gif) no-repeat center left}.icon_email{padding:0 10px 0 25px;background:transparent url(http://www.australianmusiccentre.com.au/images/icon-email.gif) no-repeat center left}div#wrapper{overflow:auto;_height:1%;position:relative}.inner{clear:both;width:80%;text-align:left;_height:1%;margin:0 auto;max-width:960px;min-width:710px;position:relative}div#header{padding:10px 0;position:relative;background:#FFF}div#content{padding:25px 0;overflow:auto;background:#FFF}.col_1,.col_2,.col_3,.col_4,.col_5,.col_6,.col_7,.col_8,.col_9,.col_10,.col_11{float:left}.col_1{width:6.5%;margin:0 1%}.col_2{width:15%;margin:0 1%;min-width:15%}.col_3{width:23.5%;margin:0 1%}.col_4{width:32%;margin:0 1%}.col_5{width:40.5%;margin:0 1%}.col_6{width:49%;margin:0 1%}.col_7{width:57.5%;margin:0 1%}.col_8{width:66%;margin:0 1%}.col_9{width:74.5%;margin:0 1%}.col_10{width:83%;margin:0 1%}.col_11{width:91.5%;margin:0 1%}.col_12{width:100%}.col_first{margin-left:0}.col_last{margin-right:0}span#bg{display:block;width:443px;height:243px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-top.png) no-repeat top left;position:absolute;top:0;right:0}span#page_bg{display:block;width:296px;height:153px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-amc.png) no-repeat top left;position:absolute;top:25px;right:20px}ul#access_options{display:none}div#login_cart{background:#E3E9C4;border-bottom:1px solid #C4CBA1;overflow:auto;height:auto;position:relative}div#login_cart div.inner{position:relative;overflow:hidden;height:10px;padding:15px 0 0}p.user_settings{margin:0;position:absolute;bottom:3px;right:0}div#nav{background:#87A41C;border-top:1px solid #6C7C2F;border-bottom:1px solid #3A470E}div#nav ul{width:80%;height:34px;_height:1%;margin:0 auto;list-style:none}div#nav ul li{display:inline;position:relative}div#nav ul li a:link,div#nav ul li a:visited{display:block;float:left;padding:10px 20px;font-size:14px;color:#FFF;text-decoration:none}div#nav ul li a:hover{background:#657C0D}div#nav ul li ul{width:200px;height:auto;clear:left;display:none;background:#657C0D;list-style:none}div#nav ul li ul li a:link,div#nav ul li ul li a:active,div#nav ul li ul li a:visited,div#nav ul li ul li a:hover{display:block;width:160px;font-size:12px}div#nav ul li ul li a:hover{background:#455506}div#nav ul li a:hover,div#nav ul li:hover > a{background:#657C0D;color:#FFF}.sf-menu,.sf-menu *{margin:0;padding:0;list-style:none;z-index:9999}.sf-menu{line-height:1}.sf-menu ul{position:absolute;top:-999em;width:10em}.sf-menu ul li{display:inline;width:100%}.sf-menu li:hover{visibility:inherit}.sf-menu li{float:left;position:relative}.sf-menu a{display:block;position:relative}.sf-menu li:hover ul,.sf-menu li.sfHover ul{left:0;top:34px;z-index:9999}ul.sf-menu li:hover li ul,ul.sf-menu li.sfHover li ul{top:-999em}ul.sf-menu li li:hover ul,ul.sf-menu li li.sfHover ul{left:10em;top:0}ul.sf-menu li li:hover li ul,ul.sf-menu li li.sfHover li ul{top:-999em}ul.sf-menu li li li:hover ul,ul.sf-menu li li li.sfHover ul{left:10em;top:0}div#page_options{overflow:hidden;_height:1%;position:relative;background:#D6E882 url(http://www.australianmusiccentre.com.au/images/bg-home-search.gif) repeat-x top left;border-bottom:1px solid #C0D270}.ui-tabs .ui-tabs-hide{display:none}ul.pagination{text-align:center;list-style:none;margin-top:10px}ul.pagination li{display:inline;padding:5px 0}ul.pagination li a{text-decoration:none;border:1px solid #ccc;margin:0 3px;padding:5px 2px}ul.pagination li a:hover{background-color:#E3E9C4}ul.pagination li.pag_disabled{border:none;color:#ccc;padding:5px 10px}ul.pagination li.current_page{border:none;font-weight:700;padding:5px 10px}ul.pagination li.pag_elipse{border:none;padding:5px}form#frm_quick_search{position:absolute;top:8px;right:0;z-index:999}form#frm_quick_search input[type="text"],form#frm_quick_search input#quick_search_text{border:2px solid #ABD50E;padding:6px;vertical-align:middle;width:250px!important;margin:0}input#quick_search_submit{width:37px;height:31px;vertical-align:middle;margin:0 0 0 -7px}ul.breadcrumbs{padding:10px 0;font-size:12px;margin:5px 0 4px;clear:left;float:left;list-style:none}ul.breadcrumbs li{display:inline;padding:0}ul.breadcrumbs li a{color:#5C3F31;text-decoration:none;margin:0 0 0 10px;padding:0 15px 0 0;background:transparent url(http://www.australianmusiccentre.com.au/images/breadcrumb-divider.gif) no-repeat center right}ul.breadcrumbs li a:hover{text-decoration:underline;color:#301F16}ul.breadcrumbs li.breadcrumb_current{margin:0 0 0 10px}ul.feeds{margin:12px 0 0;list-style:none}ul.feeds li{padding:5px 0 5px 25px;background:transparent url(http://www.australianmusiccentre.com.au/images/feed-icon.gif) no-repeat center left}div#footer_ad_wrap{overflow:hidden;_height:1%;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #DDD;margin:35px 0 20px;clear:both}div.ad_unit_left,div.ad_unit_center,div.ad_unit_right{width:33.1%;background:#EFEFEF;float:left;height:106px;border-right:1px solid #DDD;border-left:1px solid #FFF}div.ad_unit_left{-moz-border-radius-topleft:5px;-webkit-border-radius-bottomleft:5px;background:transparent url(http://www.australianmusiccentre.com.au/images/ads/bottom-left.jpg) no-repeat top right;border-left:none}div.ad_unit_center{background:transparent url(http://www.australianmusiccentre.com.au/images/ads/center.jpg) no-repeat top center}div.ad_unit_right{-moz-border-radius-topright:5px;-webkit-border-radius-bottomright:5px;background:transparent url(http://www.australianmusiccentre.com.au/images/ads/bottom-right.jpg) no-repeat top left;border-right:none;float:right}div#footer_ad_wrap a{display:block;width:100%;height:106px;text-indent:-9999px}div#footer{clear:both;background:#E3E9C4;padding:15px 0 45px;border-top:1px solid #C4CBA1;margin:0}div#footer p{color:#849149;font-size:10px}div#footer dl{width:14%;float:left;margin:0 1%}div#footer dl.first{margin-left:0}div#footer dl.last{margin-right:0}div#footer dl a{text-decoration:none;color:#687040}div#footer dl a:hover{color:#404620}div#footer dt{margin-bottom:5px}div#footer dt a{font-size:14px;font-weight:700}a#logo-iamic{display:block;width:81px;height:35px;background:transparent url(http://www.australianmusiccentre.com.au/images/logo-iamic.gif) no-repeat top left;text-indent:-9999px;float:right;margin:0 10px}a#logo-iscm{display:block;width:131px;height:35px;background:transparent url(http://www.australianmusiccentre.com.au/images/logo-iscm.gif) no-repeat top left;text-indent:-9999px;float:right;margin:0 10px}div#search_help_intros{padding-top:135px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-intros.jpg) no-repeat top left}div#search_help_composers{padding-top:135px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-composers.jpg) no-repeat top left}div#search_help_repertoire{padding-top:135px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-repertoire.jpg) no-repeat top left}div#search_help_subjects{padding-top:135px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-subjects.jpg) no-repeat top left}div#home_search{background:#D6E882 url(http://www.australianmusiccentre.com.au/images/bg-home-search.gif) repeat-x top left;border-bottom:1px solid #C0D270;padding:15px 0;overflow:auto;_height:1%}form#frm_search{margin:0 0 2px}form#frm_search p{margin:0}form#frm_search input[type="text"]{vertical-align:middle;padding:10px;width:78%;border:3px solid #ABD50E;font-size:18px}form#frm_search input[type="image"]{vertical-align:middle;margin:-6px 0 0 -5px}#search_results .ui-widget-header{background:none;border:none;margin-bottom:15px;border-bottom:1px solid #6C7C2F}div#search_results.ui-widget-content{background:none;border:none}#search_results .ui-tabs-panel{padding:0}#search_results.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:inherit}#search_results.ui-widget-content a{color:#107E2B}#search_results.ui-widget-content #search_tabs a{text-decoration:underline}#search_results.ui-widget-content a:hover{color:#045017}#search_results .ui-state-active{border-color:#6C7C2F}#search_results li.ui-state-default,#search_results li.ui-tabs-selected{margin-right:14px}#search_results .ui-state-hover{border-color:#6C7C2F;background-color:#D6E882}div.expandcollapse{float:right;font-size:90%;margin-right:5px;font-weight:700;cursor:pointer}#search_results div.search_more_detail{margin-top:8px}div.search_facets{background:#FDFEF0;border:1px solid #C8CF9E;overflow:auto;_height:1%;margin-bottom:15px}div.search_facets h4{background-color:#C4CBA1;color:#434A23;padding:3px 5px;font-weight:700}div.search_facets div.facet{padding:5px;margin-bottom:10px}div.search_facets div.facet h5{font-weight:700;border-bottom:1px solid #C8CF9E;cursor:pointer}div.search_facets div.facet_values{display:none}div.search_facets div.facet p{padding:3px 0;margin:0}table.search_results td{padding:15px 5px}div#search_facets dl,div#search_facets form{padding:10px;margin:0;border-bottom:1px solid #F2FDC1;border-top:1px solid #AABB5A}div#search_facets a{color:#45342B}span.solr_hl{font-weight:700}div.hsc_list{padding-top:105px;margin-bottom:15px}div.project_profile{margin:0 0 15px;overflow:auto;_height:1%}div.project_profile img{float:left;padding:2px;border:1px solid #DDD;margin:0 15px 8px 0}div.board_profile{overflow:auto;_height:1%;margin-bottom:10px}div.board_profile img{float:left;margin:0 10px 0 0}ul.timeline{overflow:hidden;_height:1%;margin:0 0 15px}ul.timeline li{display:inline}ul.timeline li a{display:block;float:left;padding:2% 1% 1% 2%;width:7%;text-align:center}.shade_01,ul.timeline li a:hover{background:#abd50e;color:#FFF}.shade_02{background:#c0e04a}.shade_03{background:#d5ea86}.shade_04{background:#eaf4c3}.shade_05{background:#f2f9db}.shade_06{background:#f6fbe6}.shade_07{background:#fbfdf3}div.event_highlight{padding:10px;background:none repeat scroll 0 0 #F7FCE0;border:1px solid #C0D270}div.event_highlight div.event_detail{margin-left:175px}div.event_highlight div.event_image{float:left}div.event_highlight div.event_image img{margin-left:5px;border:1px solid #DDD;padding:2px}div.event_detail h3{font-size:12px;font-weight:700;margin:0;text-transform:uppercase}div.event_detail ul li{list-style:none outside none;padding:5px 2px;width:95%}div.event_detail strong{color:#5C3F31}div.record_highlight{background:#F7FCE0;border:1px solid #C0D270;padding:10px 100px 10px 130px}div.record_highlight div.record_image{width:130px;right:130px;margin-left:-100%;float:left;position:relative}div.record_highlight div.record_image img{border:1px solid #DDD;margin-left:10px;padding:2px}div.record_highlight div.record_detail{float:left;position:relative;width:100%}div.record_highlight div.record_detail h3{margin:0;font-size:12px;font-weight:700;text-transform:uppercase}div.record_highlight div.record_detail strong{color:#5C3F31}div.record_highlight div.record_detail ul li{list-style:none}div.record_highlight div.record_price{width:100px;float:left;position:relative;margin-right:-100px}div.track{padding:10px}div.track_sample{display:block;float:left;width:30px}div.track_detail{margin-left:35px}div.artist_home{border:1px solid #C0D270;padding:10px;width:47%;float:left}div.artist_home p{margin:0}div.artist_home_info{display:none}.alt{background:#F1F5DC}p.large_letter{font-variant:small-caps;font-size:130%;border-bottom:1px solid #000;margin-top:30px;font-weight:700;width:50%}p.photoCredit{font-size:11px;line-height:15px;width:150px}div.work_video table td{border:none}div.work_details{padding:10px 15px;background:#EAF3C0;border:1px solid #C0D270;overflow:auto}div.work_details h3.product_type{margin:0;font-size:12px;font-weight:700;text-transform:uppercase}h2#work_title{margin:0}h3#work_composer{margin:0}div.work_samples{background:#F7FCE0;border-left:1px solid #C0D270;border-right:1px solid #C0D270;border-bottom:1px solid #C0D270;padding:10px 15px;overflow:auto;_height:1%}div.work_versions{background:#FCFEF2;border-left:1px solid #C0D270;border-right:1px solid #C0D270;border-bottom:1px solid #C0D270;padding:10px 15px}div.work_image{width:11%;padding:1%;margin:0 1% 0 0;float:left;background:#FFF;border:1px solid #DDD}div.work_image img{width:100%;height:100%}div.work_products{overflow:hidden;height:auto;_height:1%;margin:10px 0 0}div.image_product{width:43%;margin-right:3%;float:left;position:relative}div.image_product a{text-decoration:none}div.image_product a:hover{text-decoration:underline}div.image_product div.product_image{width:83px;float:left;margin:0 7px 5px 0;height:auto}div.image_product div.product_image img{margin:0 0 5px}div.image_product div.product_detail{margin-left:87px}div.image_product div.product_detail strong{font-weight:700;color:#5C3F31}div.product{margin-bottom:10px;padding:5px;height:160px;width:31.5%;float:left;border-bottom:1px solid #F7FAE6;padding-bottom:15px;position:relative}div.product h4{margin:0 0 10px}div.product_image{width:83px;height:160px;float:left;margin:0 7px 5px 0}div.product_info{width:59%;float:left}div.product img{height:auto;margin:0 0 5px}div.product img.info_btn{width:16px!important;height:16px!important}p.product_noprice{font-size:14px;text-align:center}p.bubble{position:absolute;top:95px;left:65px;display:block;display:block;width:280px;height:auto;z-index:999999;display:none}.bubble_top{display:block;width:280px;height:12px;background:transparent url(http://www.australianmusiccentre.com.au/images/bubble_top.gif) no-repeat top left}.bubble_middle{display:block;width:240px;background:transparent url(http://www.australianmusiccentre.com.au/images/bubble_middle.gif) repeat-y center left;padding:0 15px 0 25px}.bubble_bottom{display:block;width:280px;height:13px;background:transparent url(http://www.australianmusiccentre.com.au/images/bubble_bottom.gif) no-repeat top left}p.product_type{font-size:10px;margin:0;color:#5C3F31}p.product_lib{font-size:11px;color:#333;line-height:13px}p.product_lib span{font-weight:700;color:#5C3F31}p.product_price{font-size:18px;text-align:center}div.product a{text-decoration:none}div.product div.cd_image{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-cd-sml.jpg) no-repeat top left}.productsDisplayControl{color:#107E2B;cursor:pointer;font-weight:700}h2#calendar_month{width:50%;float:left}form#change_location{text-align:right}dl.calendar_day{display:block;width:12%;height:150px;border:1px solid #DDD;float:left;background:#FFF;padding:1%;position:relative;margin:0;overflow:hidden}dl.calendar_day:hover,dl.list_day:hover{background:#ecfda6}dl.calendar_day dt{font:bold 14px Arial,Helvetica,sans-serif;margin:0 0 5px}dl.calendar_day dd{margin:0 0 2px;font-size:11px}dl.calendar_day dd.more_events{position:absolute;bottom:5px}dl.calendar_day span.event_info{display:none}dl.calendar_day span.display_event_info{display:block;position:absolute;top:17px;left:75%;z-index:9999;width:250px;height:75px;background:#FFF;border:1px solid #DDD;padding:20px}ul#day_list{margin:0 0 10px;list-style:none}ul#day_list li{display:inline-block;font-weight:700;width:11.8%;padding:1%;font-size:14px}dl.list_day{display:block;width:96%;height:auto;float:left;overflow:auto;padding:15px 2%;border:1px solid #DDD;position:relative;margin:0}dl.list_day dt{display:block;width:70px;height:100%;float:left;font-size:38px;font-weight:700;letter-spacing:-1px;margin:0}dl.list_day dd{display:block;width:41%;margin:0 2% 0 0;float:left;padding:5px 0}dl.list_day dd.more_events{position:absolute;bottom:5px;right:5px}dl.list_day span.event_info,dl.list_day span.display_event_info{display:block;margin:10px 0}p.month_nav{clear:both;overflow:auto}a.prev_month{float:left}a.next_month{float:right}div.artist_image{float:right;padding:10px;margin:0 0 10px 10px;border:1px solid #C0D270}div.credo{padding:10px 0;color:#5C3F31;font-style:italic;font-family:georgia;line-height:22px;font-size:140%;margin-bottom:5px}div.credo p{margin:0}div.subject_list{padding-top:105px;margin-bottom:15px}div#subject_cultures-and-traditions{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-cultures.jpg) no-repeat top left}div#subject_places{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-places.jpg) no-repeat top left}div#subject_styles-and-genres{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-styles.jpg) no-repeat top left}div#subject_themes{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-themes-subjects.jpg) no-repeat top left}div#rep_band-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-band.jpg) no-repeat top left}div#rep_chamber-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-chamber-music.jpg) no-repeat top left}div#rep_choral-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-choral.jpg) no-repeat top left}div#rep_dramatic-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-dramatic.jpg) no-repeat top left}div#rep_electronic-experimental-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-electronic.jpg) no-repeat top left}div#rep_instrumental-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-instrumental-2.jpg) no-repeat top left}div#rep_jazz-ensembles{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-jazz.jpg) no-repeat top left}div#rep_orchestral-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-orchestral.jpg) no-repeat top left}div#rep_vocal-ensembles{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-vocal-ensemble.jpg) no-repeat top left}div#rep_vocal-music{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-vocal.jpg) no-repeat top left}div.res_feature img{float:left;margin:0 10px 10px 0;padding:2px;border:1px solid #DDD}a.res_feature_title,p.res_feature_title{font-size:14px}div.res_teaser{overflow:auto;_height:1%}div.res_teaser img{float:left;margin:0 10px 10px 0;padding:2px;border:1px solid #DDD}div.res_news span{font-size:10px}div.blog_post{overflow:auto;_height:1%}div.blog_post img{padding:2px;float:left;border:1px solid #DDD;margin:0 15px 10px 0}div.blog_post ul{list-style:none}div.blog_post ul li{display:inline;padding:0 0 0 25px}div.article_image{width:170px;float:right;padding:10px;margin:0 0 10px 10px;border:1px solid #F3E7C6;text-align:center}div.article_image small{display:block}.editornote{font-weight:700}.captionedleft{width:auto;float:left;padding:10px;border:1px solid #F3E7C6;text-align:center;margin:15px 20px 15px 0}.captionedleft div{font-size:10px}span.pullquote{display:block;width:40%;float:left;padding:20px;font:normal 22px/28px Arial,Helvetica,sans-serif;margin:0 15px 15px 0;color:#98002e}div.staff_profile{margin:0 0 15px;overflow:auto;_height:1%}div.staff_profile img{float:left;padding:2px;border:1px solid #DDD;margin:0 10px 10px 0}div.projects_list{margin:0 0 15px;overflow:auto;_height:1%}div.projects_list img{float:left;padding:2px;border:1px solid #DDD;margin:0 15px 8px 0}div.modart_profile{margin:0 0 15px;overflow:auto;_height:1%}div.modart_profile img{float:left;padding:2px;border:1px solid #DDD;margin:0 15px 8px 0}div.recent_award{overflow:auto;_height:1%;margin:0 0 10px}div.recent_award img{float:left;padding:2px;border:1px solid #DDD;margin:0 10px 10px 0}div.featured_product{margin:0 0 10px;overflow:auto;_height:1%}div.featured_product h3 a{text-decoration:none}h3#browse_intros{display:block;width:479px;height:20px;text-indent:-9999px;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-browse-intros.gif) no-repeat top left;margin:10px 0 25px}dl.intro{display:block;width:18%;margin:0 1% 20px 0;padding:0 1% 0 0;border-right:1px solid #F7FAE6;float:left}dl.intro_first{margin-left:0}dl.intro_last{padding-right:0;border:none}dl.intro dt{font-size:16px;font-weight:700;color:#44332B;margin:0 0 10px;padding:105px 0 0}dl.intro dd{padding:2px 0}dt#intro_timeline{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-timeline.jpg) no-repeat top left}dt#intro_themes{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-themes.jpg) no-repeat top left}dt#intro_instrumental{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-instrumental.jpg) no-repeat top left}dt#intro_chamber{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-chamber.jpg) no-repeat top left}dt#intro_choral{background:transparent url(http://www.australianmusiccentre.com.au/images/bg-coral.jpg) no-repeat top left}table.product_highlight_box{background:#F7FCE0;border:1px solid #C0D270;padding:10px}table.product_highlight_box tbody{background:none}table.product_highlight_box td{border:0;vertical-align:top}table.product_highlight_box td.product_image_cell{width:110px}table.product_highlight_box td.product_detail_cell h2{width:95%}table.product_highlight_box td.product_detail_cell h3{margin:0;font-size:12px;font-weight:700;text-transform:uppercase}table.product_highlight_box td.product_detail_cell ul li{list-style:none;width:95%;padding:5px 2px}table.product_highlight_box td.product_price_cell{width:115px;text-align:center}table.product_highlight_box td.product_price_cell div{margin-top:10px;padding-left:5px;border-left:1px solid #C0D270}a.add_to_cart{display:block;text-align:center;margin:0 auto;width:65px;height:18px;padding:3px 10px;color:#576B0B;background:transparent url(http://www.australianmusiccentre.com.au/images/bg-cart-add.jpg) no-repeat top left;font-weight:700;text-decoration:none;font-size:11px}div.sub_section{border-bottom:1px dashed #C0D270;margin-bottom:10px;padding-bottom:10px}li.sub_section{border-top:1px dashed #C0D270;margin-top:10px;padding-top:10px}.hidden{display:none}.left{float:left}.right{float:right}.overflow{overflow:auto}.clear{clear:both}.center{text-align:center}.text_right{text-align:right}.overflow{overflow:auto;_height:1%}.nolist{list-style:none}div.audioSampleContainer{width:23px}div.audioPlay,div.audioPause{height:23px;width:23px;background:transparent url(../images/audiocontrols23.png) no-repeat -29px 0;cursor:pointer}div.audioPause{background-position:0 0}.lightbox-gallery ul li{float:left;margin-right:20px;margin-bottom:20px;list-style:none}
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simple-lightbox.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simple-lightbox.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simple-lightbox.js	(revision 33547)
@@ -0,0 +1,5 @@
+/*
+	By AndrÃ© Rinas, www.andreknieriem.de
+	Available for use under the MIT License
+*/
+!function(e,t,n,i){"use strict";e.fn.simpleLightbox=function(i){var i=e.extend({overlay:!0,spinner:!0,nav:!0,navText:["&lsaquo;","&rsaquo;"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",close:!0,closeText:"Ã",showCounter:!0,fileExt:"png|jpg|jpeg|gif",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,disableRightClick:!1,disableScroll:!0,alertError:!0},i),a=(t.navigator.pointerEnabled||t.navigator.msPointerEnabled,0),o=e(),s=function(){var e=n.body||n.documentElement,e=e.style;return""==e.WebkitTransition?"-webkit-":""==e.MozTransition?"-moz-":""==e.OTransition?"-o-":""==e.transition?"":!1},l=!1,r=e(this.selector,this.context),s=s(),d=s!==!1?!0:!1,c="simplelb",p=e("<div>").addClass("sl-overlay"),h=e("<button>").addClass("sl-close").html(i.closeText),f=e("<div>").addClass("sl-spinner").html("<div></div>"),g=e("<div>").addClass("sl-navigation").html('<button class="sl-prev">'+i.navText[0]+'</button><button class="sl-next">'+i.navText[1]+"</button>"),u=e("<div>").addClass("sl-counter").html('<span class="sl-current"></span>/<span class="sl-total"></span>'),m=!1,v=0,b=e(),x=e("<div>").addClass("sl-caption pos-"+i.captionPosition),y=e("<div>").addClass("sl-wrapper").addClass(i.className).html('<div class="sl-image"></div>'),w=function(t){return i.fileExt?"a"==e(t).prop("tagName").toLowerCase()&&new RegExp(".("+i.fileExt+")$","i").test(e(t).attr("href")):!0},T=function(){b=e(".sl-image"),i.close&&h.appendTo(y),i.showCounter&&r.length>1&&(u.appendTo(y),u.find(".sl-total").text(r.length)),i.nav&&g.appendTo(y),i.spinner&&f.appendTo(y)},S=function(t){t.trigger(e.Event("show.simplelightbox")),i.disableScroll&&M("hide"),y.appendTo("body"),i.overlay&&p.appendTo(e("body")),m=!0,v=r.index(t),o=e("<img/>").hide().attr("src",t.attr("href")),e(".sl-image").html("").attr("style",""),o.appendTo(e(".sl-image")),p.fadeIn("fast"),e(".sl-close").fadeIn("fast"),f.show(),g.fadeIn("fast"),e(".sl-wrapper .sl-counter .sl-current").text(v+1),u.fadeIn("fast"),C(),i.preloading&&I(),setTimeout(function(){t.trigger(e.Event("shown.simplelightbox"))},i.animationSpeed)},C=function(n){if(o.length){var a=new Image,s=e(t).width()*i.widthRatio,c=e(t).height()*i.heightRatio;a.src=o.attr("src"),e(a).bind("error",function(e){m=!1,i.alertError&&alert("Image not found, next image will be loaded"),D(1==n||-1==n?n:1)}),a.onload=function(){var p=a.width,h=a.height;if(p>s||h>c){var g=p/h>s/c?p/s:h/c;p/=g,h/=g}e(".sl-image").css({top:(e(t).height()-h)/2+"px",left:(e(t).width()-p)/2+"px"}),f.hide(),o.css({width:p+"px",height:h+"px"}).fadeIn("fast"),l=!0;var u="self"==i.captionSelector?r.eq(v):r.eq(v).find(i.captionSelector);if("data"==i.captionType)var b=u.data(i.captionsData);else if("text"==i.captionType)var b=u.html();else var b=u.prop(i.captionsData);if(i.loop||(0==v&&e(".sl-prev").hide(),v>=r.length-1&&e(".sl-next").hide(),v>0&&v<r.length-1&&e(".sl-prev, .sl-next").show()),1==r.length&&e(".sl-prev, .sl-next").hide(),1==n||-1==n){var x={opacity:1};i.animationSlide&&(d?(k(0,100*n+"px"),setTimeout(function(){k(i.animationSpeed/1e3,"0px"),50})):x.left=parseInt(e(".sl-image").css("left"))+100*n+"px"),e(".sl-image").animate(x,i.animationSpeed,function(){m=!1,E(b)})}else m=!1,E(b)}}},E=function(t){""!=t&&"undefined"!=typeof t&&i.captions&&x.html(t).hide().appendTo(e(".sl-image")).delay(i.captionDelay).fadeIn("fast")},k=function(t,n){var i={};i[s+"transform"]="translateX("+n+")",i[s+"transition"]=s+"transform "+t+"s linear",e(".sl-image").css(i)},I=function(){var t=0>v+1?r.length-1:v+1>=r.length-1?0:v+1,n=0>v-1?r.length-1:v-1>=r.length-1?0:v-1;e("<img />").attr("src",r.eq(t).attr("href")).load(),e("<img />").attr("src",r.eq(n).attr("href")).load()},D=function(t){f.show();var n=v+t;if(!(m||(0>n||n>=r.length)&&0==i.loop)){v=0>n?r.length-1:n>r.length-1?0:n,e(".sl-wrapper .sl-counter .sl-current").text(v+1);var s={opacity:0};i.animationSlide&&(d?k(i.animationSpeed/1e3,-100*t-a+"px"):s.left=parseInt(e(".sl-image").css("left"))+-100*t+"px"),e(".sl-image").animate(s,i.animationSpeed,function(){setTimeout(function(){var n=r.eq(v);o.attr("src",n.attr("href")),e(".sl-caption").remove(),C(t),i.preloading&&I()},100)})}},q=function(){if(!m){var t=r.eq(v),n=!1;t.trigger(e.Event("close.simplelightbox")),e(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter").fadeOut("fast",function(){i.disableScroll&&M("show"),e(".sl-wrapper, .sl-overlay").remove(),n||t.trigger(e.Event("closed.simplelightbox")),n=!0}),o=e(),l=!1,m=!1}},M=function(i){if("hide"==i){var a=t.innerWidth;if(!a){var o=n.documentElement.getBoundingClientRect();a=o.right-Math.abs(o.left)}if(n.body.clientWidth<a){var s=n.createElement("div"),l=parseInt(e("body").css("padding-right"),10);s.className="sl-scrollbar-measure",e("body").append(s);var r=s.offsetWidth-s.clientWidth;e(n.body)[0].removeChild(s),e("body").data("padding",l),r>0&&e("body").css({"padding-right":l+r,overflow:"hidden"})}}else e("body").css({"padding-right":e("body").data("padding"),overflow:"auto"})};T(),e(t).on("resize",C),r.on("click."+c,function(t){if(w(this)){if(t.preventDefault(),m)return!1;S(e(this))}}),e(n).on("click",".sl-close",function(e){e.preventDefault(),l&&q()}),e(n).click(function(t){l&&i.docClose&&0==e(t.target).closest(".sl-image").length&&0==e(t.target).closest(".sl-navigation").length&&q()}),i.disableRightClick&&e(n).on("contextmenu",".sl-image img",function(e){return!1}),e(n).on("click",".sl-navigation button",function(t){t.preventDefault(),a=0,D(e(this).hasClass("sl-next")?1:-1)}),i.enableKeyboard&&e(n).on("keyup."+c,function(e){if(e.preventDefault(),a=0,l){var t=e.keyCode;27==t&&q(),(37==t||39==e.keyCode)&&D(39==e.keyCode?1:-1)}});var R=0,P=0,W=!1,X=0;return e(n).on("touchstart mousedown pointerdown MSPointerDown",".sl-image",function(e){return W?!0:(d&&(X=parseInt(b.css("left"))),W=!0,R=e.originalEvent.pageX||e.originalEvent.touches[0].pageX,!1)}).on("touchmove mousemove pointermove MSPointerMove",function(e){return W?(e.preventDefault(),P=e.originalEvent.pageX||e.originalEvent.touches[0].pageX,a=R-P,void(i.animationSlide&&(d?k(0,-a+"px"):b.css("left",X-a+"px")))):!0}).on("touchend mouseup touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(e){W&&(W=!1,Math.abs(a)>i.swipeTolerance?D(a>0?1:-1):i.animationSlide&&(d?k(i.animationSpeed/1e3,"0px"):b.animate({left:X+"px"},i.animationSpeed/2)))}),this.open=function(e){S(e)},this.next=function(){D(1)},this.prev=function(){D(-1)},this.close=function(){q()},this.destroy=function(){e(n).unbind("click."+c).unbind("keyup."+c),q(),e(".sl-overlay, .sl-wrapper").remove()},this}}(jQuery,window,document);
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simplelightbox.css
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simplelightbox.css	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/simplelightbox.css	(revision 33547)
@@ -0,0 +1,214 @@
+/* line 1, ../sass/simplelightbox.scss */
+.sl-overlay {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  background: #fff;
+  opacity: 0.7;
+  display: none;
+  z-index: 1006;
+}
+
+/* line 12, ../sass/simplelightbox.scss */
+.sl-wrapper {
+  z-index: 1000;
+}
+/* line 14, ../sass/simplelightbox.scss */
+.sl-wrapper button {
+  border: 0 none;
+  background: transparent;
+  font-size: 58px;
+  padding: 0;
+  cursor: pointer;
+}
+/* line 20, ../sass/simplelightbox.scss */
+.sl-wrapper button:hover {
+  opacity: 0.7;
+}
+/* line 25, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-close {
+  display: none;
+  position: fixed;
+  right: 30px;
+  top: 30px;
+  z-index: 1015;
+}
+/* line 33, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-counter {
+  display: none;
+  position: fixed;
+  top: 30px;
+  left: 30px;
+  z-index: 1015;
+}
+/* line 41, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-navigation {
+  width: 100%;
+  display: none;
+}
+/* line 44, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-navigation button {
+  position: fixed;
+  top: 50%;
+  margin-top: -10px;
+  height: 30px;
+  width: 30px;
+  line-height: 30px;
+  text-align: center;
+  display: block;
+  z-index: 1015;
+  font-family: arial sans-serif;
+}
+/* line 55, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-navigation button.sl-next {
+  right: 40px;
+}
+/* line 59, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-navigation button.sl-prev {
+  left: 40px;
+}
+/* line 65, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image {
+  position: fixed;
+  -ms-touch-action: none;
+  touch-action: none;
+  z-index: 10000;
+}
+/* line 70, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image img {
+  margin: 0;
+  padding: 0;
+  display: block;
+}
+/* line 75, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image iframe {
+  border: 0 none;
+  background: #000;
+}
+/* line 79, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image .sl-caption {
+  display: none;
+  padding: 10px;
+  color: #fff;
+  background: #000;
+  opacity: 0.8;
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+/* line 90, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image .sl-caption.pos-top {
+  bottom: auto;
+  top: 0;
+}
+/* line 95, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image .sl-caption.pos-outside {
+  bottom: auto;
+}
+/* line 100, ../sass/simplelightbox.scss */
+.sl-wrapper .sl-image .sl-download {
+  display: none;
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  color: #fff;
+  z-index: 1005;
+}
+
+/* line 111, ../sass/simplelightbox.scss */
+.sl-spinner {
+  display: none;
+  border: 5px solid #333;
+  border-radius: 40px;
+  height: 40px;
+  left: 50%;
+  margin: -20px 0 0 -20px;
+  opacity: 0;
+  position: fixed;
+  top: 50%;
+  width: 40px;
+  z-index: 1007;
+  -webkit-animation: pulsate 1s ease-out infinite;
+  -moz-animation: pulsate 1s ease-out infinite;
+  -ms-animation: pulsate 1s ease-out infinite;
+  -o-animation: pulsate 1s ease-out infinite;
+  animation: pulsate 1s ease-out infinite;
+}
+
+/* line 130, ../sass/simplelightbox.scss */
+.sl-scrollbar-measure {
+  position: absolute;
+  top: -9999px;
+  width: 50px;
+  height: 50px;
+  overflow: scroll;
+}
+
+@-webkit-keyframes pulsate {
+  0% {
+    transform: scale(0.1);
+    opacity: 0.0;
+  }
+  50% {
+    opacity: 1;
+  }
+  100% {
+    transform: scale(1.2);
+    opacity: 0;
+  }
+}
+@keyframes pulsate {
+  0% {
+    transform: scale(0.1);
+    opacity: 0.0;
+  }
+  50% {
+    opacity: 1;
+  }
+  100% {
+    transform: scale(1.2);
+    opacity: 0;
+  }
+}
+@-moz-keyframes pulsate {
+  0% {
+    transform: scale(0.1);
+    opacity: 0.0;
+  }
+  50% {
+    opacity: 1;
+  }
+  100% {
+    transform: scale(1.2);
+    opacity: 0;
+  }
+}
+@-o-keyframes pulsate {
+  0% {
+    transform: scale(0.1);
+    opacity: 0.0;
+  }
+  50% {
+    opacity: 1;
+  }
+  100% {
+    transform: scale(1.2);
+    opacity: 0;
+  }
+}
+@-ms-keyframes pulsate {
+  0% {
+    transform: scale(0.1);
+    opacity: 0.0;
+  }
+  50% {
+    opacity: 1;
+  }
+  100% {
+    transform: scale(1.2);
+    opacity: 0;
+  }
+}
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/superfish-1.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/superfish-1.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/superfish-1.js	(revision 33547)
@@ -0,0 +1,10 @@
+/*
+ * jQuery Superfish Menu Plugin - v1.7.4
+ * Copyright (c) 2013 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ *	http://www.opensource.org/licenses/mit-license.php
+ *	http://www.gnu.org/licenses/gpl.html
+ */
+
+;(function(e){"use strict";var s=function(){var s={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},o=function(){var s=/iPhone|iPad|iPod/i.test(navigator.userAgent);return s&&e(window).load(function(){e("body").children().on("click",e.noop)}),s}(),n=function(){var e=document.documentElement.style;return"behavior"in e&&"fill"in e&&/iemobile/i.test(navigator.userAgent)}(),t=function(e,o){var n=s.menuClass;o.cssArrows&&(n+=" "+s.menuArrowClass),e.toggleClass(n)},i=function(o,n){return o.find("li."+n.pathClass).slice(0,n.pathLevels).addClass(n.hoverClass+" "+s.bcClass).filter(function(){return e(this).children(n.popUpSelector).hide().show().length}).removeClass(n.pathClass)},r=function(e){e.children("a").toggleClass(s.anchorClass)},a=function(e){var s=e.css("ms-touch-action");s="pan-y"===s?"auto":"pan-y",e.css("ms-touch-action",s)},l=function(s,t){var i="li:has("+t.popUpSelector+")";e.fn.hoverIntent&&!t.disableHI?s.hoverIntent(u,p,i):s.on("mouseenter.superfish",i,u).on("mouseleave.superfish",i,p);var r="MSPointerDown.superfish";o||(r+=" touchend.superfish"),n&&(r+=" mousedown.superfish"),s.on("focusin.superfish","li",u).on("focusout.superfish","li",p).on(r,"a",t,h)},h=function(s){var o=e(this),n=o.siblings(s.data.popUpSelector);n.length>0&&n.is(":hidden")&&(o.one("click.superfish",!1),"MSPointerDown"===s.type?o.trigger("focus"):e.proxy(u,o.parent("li"))())},u=function(){var s=e(this),o=d(s);clearTimeout(o.sfTimer),s.siblings().superfish("hide").end().superfish("show")},p=function(){var s=e(this),n=d(s);o?e.proxy(f,s,n)():(clearTimeout(n.sfTimer),n.sfTimer=setTimeout(e.proxy(f,s,n),n.delay))},f=function(s){s.retainPath=e.inArray(this[0],s.$path)>-1,this.superfish("hide"),this.parents("."+s.hoverClass).length||(s.onIdle.call(c(this)),s.$path.length&&e.proxy(u,s.$path)())},c=function(e){return e.closest("."+s.menuClass)},d=function(e){return c(e).data("sf-options")};return{hide:function(s){if(this.length){var o=this,n=d(o);if(!n)return this;var t=n.retainPath===!0?n.$path:"",i=o.find("li."+n.hoverClass).add(this).not(t).removeClass(n.hoverClass).children(n.popUpSelector),r=n.speedOut;s&&(i.show(),r=0),n.retainPath=!1,n.onBeforeHide.call(i),i.stop(!0,!0).animate(n.animationOut,r,function(){var s=e(this);n.onHide.call(s)})}return this},show:function(){var e=d(this);if(!e)return this;var s=this.addClass(e.hoverClass),o=s.children(e.popUpSelector);return e.onBeforeShow.call(o),o.stop(!0,!0).animate(e.animation,e.speed,function(){e.onShow.call(o)}),this},destroy:function(){return this.each(function(){var o,n=e(this),i=n.data("sf-options");return i?(o=n.find(i.popUpSelector).parent("li"),clearTimeout(i.sfTimer),t(n,i),r(o),a(n),n.off(".superfish").off(".hoverIntent"),o.children(i.popUpSelector).attr("style",function(e,s){return s.replace(/display[^;]+;?/g,"")}),i.$path.removeClass(i.hoverClass+" "+s.bcClass).addClass(i.pathClass),n.find("."+i.hoverClass).removeClass(i.hoverClass),i.onDestroy.call(n),n.removeData("sf-options"),void 0):!1})},init:function(o){return this.each(function(){var n=e(this);if(n.data("sf-options"))return!1;var h=e.extend({},e.fn.superfish.defaults,o),u=n.find(h.popUpSelector).parent("li");h.$path=i(n,h),n.data("sf-options",h),t(n,h),r(u),a(n),l(n,h),u.not("."+s.bcClass).superfish("hide",!0),h.onInit.call(this)})}}}();e.fn.superfish=function(o){return s[o]?s[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?e.error("Method "+o+" does not exist on jQuery.fn.superfish"):s.init.apply(this,arguments)},e.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:e.noop,onBeforeShow:e.noop,onShow:e.noop,onBeforeHide:e.noop,onHide:e.noop,onIdle:e.noop,onDestroy:e.noop},e.fn.extend({hideSuperfishUl:s.hide,showSuperfishUl:s.show})})(jQuery);
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/swfobject.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/swfobject.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/iframe/support/swfobject.js	(revision 33547)
@@ -0,0 +1,4 @@
+/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js	(revision 33547)
@@ -0,0 +1,3937 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.AV=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+var key, val, _ref;
+
+_ref = _dereq_('./src/aurora');
+for (key in _ref) {
+  val = _ref[key];
+  exports[key] = val;
+}
+
+_dereq_('./src/devices/webaudio');
+
+_dereq_('./src/devices/mozilla');
+
+
+},{"./src/aurora":3,"./src/devices/mozilla":22,"./src/devices/webaudio":24}],2:[function(_dereq_,module,exports){
+var Asset, BufferSource, Decoder, Demuxer, EventEmitter, FileSource, HTTPSource,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+HTTPSource = _dereq_('./sources/node/http');
+
+FileSource = _dereq_('./sources/node/file');
+
+BufferSource = _dereq_('./sources/buffer');
+
+Demuxer = _dereq_('./demuxer');
+
+Decoder = _dereq_('./decoder');
+
+Asset = (function(_super) {
+  __extends(Asset, _super);
+
+  function Asset(source) {
+    this.source = source;
+    this._decode = __bind(this._decode, this);
+    this.findDecoder = __bind(this.findDecoder, this);
+    this.probe = __bind(this.probe, this);
+    this.buffered = 0;
+    this.duration = null;
+    this.format = null;
+    this.metadata = null;
+    this.active = false;
+    this.demuxer = null;
+    this.decoder = null;
+    this.source.once('data', this.probe);
+    this.source.on('error', (function(_this) {
+      return function(err) {
+        _this.emit('error', err);
+        return _this.stop();
+      };
+    })(this));
+    this.source.on('progress', (function(_this) {
+      return function(buffered) {
+        _this.buffered = buffered;
+        return _this.emit('buffer', _this.buffered);
+      };
+    })(this));
+  }
+
+  Asset.fromURL = function(url) {
+    return new Asset(new HTTPSource(url));
+  };
+
+  Asset.fromFile = function(file) {
+    return new Asset(new FileSource(file));
+  };
+
+  Asset.fromBuffer = function(buffer) {
+    return new Asset(new BufferSource(buffer));
+  };
+
+  Asset.prototype.start = function(decode) {
+    if (this.active) {
+      return;
+    }
+    if (decode != null) {
+      this.shouldDecode = decode;
+    }
+    if (this.shouldDecode == null) {
+      this.shouldDecode = true;
+    }
+    this.active = true;
+    this.source.start();
+    if (this.decoder && this.shouldDecode) {
+      return this._decode();
+    }
+  };
+
+  Asset.prototype.stop = function() {
+    if (!this.active) {
+      return;
+    }
+    this.active = false;
+    return this.source.pause();
+  };
+
+  Asset.prototype.get = function(event, callback) {
+    if (event !== 'format' && event !== 'duration' && event !== 'metadata') {
+      return;
+    }
+    if (this[event] != null) {
+      return callback(this[event]);
+    } else {
+      this.once(event, (function(_this) {
+        return function(value) {
+          _this.stop();
+          return callback(value);
+        };
+      })(this));
+      return this.start();
+    }
+  };
+
+  Asset.prototype.decodePacket = function() {
+    return this.decoder.decode();
+  };
+
+  Asset.prototype.decodeToBuffer = function(callback) {
+    var chunks, dataHandler, length;
+    length = 0;
+    chunks = [];
+    this.on('data', dataHandler = function(chunk) {
+      length += chunk.length;
+      return chunks.push(chunk);
+    });
+    this.once('end', function() {
+      var buf, chunk, offset, _i, _len;
+      buf = new Float32Array(length);
+      offset = 0;
+      for (_i = 0, _len = chunks.length; _i < _len; _i++) {
+        chunk = chunks[_i];
+        buf.set(chunk, offset);
+        offset += chunk.length;
+      }
+      this.off('data', dataHandler);
+      return callback(buf);
+    });
+    return this.start();
+  };
+
+  Asset.prototype.probe = function(chunk) {
+    var demuxer;
+    if (!this.active) {
+      return;
+    }
+    demuxer = Demuxer.find(chunk);
+    if (!demuxer) {
+      return this.emit('error', 'A demuxer for this container was not found.');
+    }
+    this.demuxer = new demuxer(this.source, chunk);
+    this.demuxer.on('format', this.findDecoder);
+    this.demuxer.on('duration', (function(_this) {
+      return function(duration) {
+        _this.duration = duration;
+        return _this.emit('duration', _this.duration);
+      };
+    })(this));
+    this.demuxer.on('metadata', (function(_this) {
+      return function(metadata) {
+        _this.metadata = metadata;
+        return _this.emit('metadata', _this.metadata);
+      };
+    })(this));
+    return this.demuxer.on('error', (function(_this) {
+      return function(err) {
+        _this.emit('error', err);
+        return _this.stop();
+      };
+    })(this));
+  };
+
+  Asset.prototype.findDecoder = function(format) {
+    var decoder, div;
+    this.format = format;
+    if (!this.active) {
+      return;
+    }
+    this.emit('format', this.format);
+    decoder = Decoder.find(this.format.formatID);
+    if (!decoder) {
+      return this.emit('error', "A decoder for " + this.format.formatID + " was not found.");
+    }
+    this.decoder = new decoder(this.demuxer, this.format);
+    if (this.format.floatingPoint) {
+      this.decoder.on('data', (function(_this) {
+        return function(buffer) {
+          return _this.emit('data', buffer);
+        };
+      })(this));
+    } else {
+      div = Math.pow(2, this.format.bitsPerChannel - 1);
+      this.decoder.on('data', (function(_this) {
+        return function(buffer) {
+          var buf, i, sample, _i, _len;
+          buf = new Float32Array(buffer.length);
+          for (i = _i = 0, _len = buffer.length; _i < _len; i = ++_i) {
+            sample = buffer[i];
+            buf[i] = sample / div;
+          }
+          return _this.emit('data', buf);
+        };
+      })(this));
+    }
+    this.decoder.on('error', (function(_this) {
+      return function(err) {
+        _this.emit('error', err);
+        return _this.stop();
+      };
+    })(this));
+    this.decoder.on('end', (function(_this) {
+      return function() {
+        return _this.emit('end');
+      };
+    })(this));
+    this.emit('decodeStart');
+    if (this.shouldDecode) {
+      return this._decode();
+    }
+  };
+
+  Asset.prototype._decode = function() {
+    while (this.decoder.decode() && this.active) {
+      continue;
+    }
+    if (this.active) {
+      return this.decoder.once('data', this._decode);
+    }
+  };
+
+  return Asset;
+
+})(EventEmitter);
+
+module.exports = Asset;
+
+
+},{"./core/events":9,"./decoder":12,"./demuxer":15,"./sources/buffer":32,"./sources/node/file":30,"./sources/node/http":31}],3:[function(_dereq_,module,exports){
+var key, val, _ref;
+
+_ref = _dereq_('./aurora_base');
+for (key in _ref) {
+  val = _ref[key];
+  exports[key] = val;
+}
+
+_dereq_('./demuxers/caf');
+
+_dereq_('./demuxers/m4a');
+
+_dereq_('./demuxers/aiff');
+
+_dereq_('./demuxers/wave');
+
+_dereq_('./demuxers/au');
+
+_dereq_('./decoders/lpcm');
+
+_dereq_('./decoders/xlaw');
+
+
+},{"./aurora_base":4,"./decoders/lpcm":13,"./decoders/xlaw":14,"./demuxers/aiff":16,"./demuxers/au":17,"./demuxers/caf":18,"./demuxers/m4a":19,"./demuxers/wave":20}],4:[function(_dereq_,module,exports){
+exports.Base = _dereq_('./core/base');
+
+exports.Buffer = _dereq_('./core/buffer');
+
+exports.BufferList = _dereq_('./core/bufferlist');
+
+exports.Stream = _dereq_('./core/stream');
+
+exports.Bitstream = _dereq_('./core/bitstream');
+
+exports.EventEmitter = _dereq_('./core/events');
+
+exports.UnderflowError = _dereq_('./core/underflow');
+
+exports.HTTPSource = _dereq_('./sources/node/http');
+
+exports.FileSource = _dereq_('./sources/node/file');
+
+exports.BufferSource = _dereq_('./sources/buffer');
+
+exports.Demuxer = _dereq_('./demuxer');
+
+exports.Decoder = _dereq_('./decoder');
+
+exports.AudioDevice = _dereq_('./device');
+
+exports.Asset = _dereq_('./asset');
+
+exports.Player = _dereq_('./player');
+
+exports.Filter = _dereq_('./filter');
+
+exports.VolumeFilter = _dereq_('./filters/volume');
+
+exports.BalanceFilter = _dereq_('./filters/balance');
+
+
+},{"./asset":2,"./core/base":5,"./core/bitstream":6,"./core/buffer":7,"./core/bufferlist":8,"./core/events":9,"./core/stream":10,"./core/underflow":11,"./decoder":12,"./demuxer":15,"./device":21,"./filter":25,"./filters/balance":26,"./filters/volume":27,"./player":28,"./sources/buffer":32,"./sources/node/file":30,"./sources/node/http":31}],5:[function(_dereq_,module,exports){
+var Base,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+  __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+Base = (function() {
+  var fnTest;
+
+  function Base() {}
+
+  fnTest = /\b_super\b/;
+
+  Base.extend = function(prop) {
+    var Class, fn, key, keys, _ref, _super;
+    Class = (function(_super) {
+      __extends(Class, _super);
+
+      function Class() {
+        return Class.__super__.constructor.apply(this, arguments);
+      }
+
+      return Class;
+
+    })(this);
+    if (typeof prop === 'function') {
+      keys = Object.keys(Class.prototype);
+      prop.call(Class, Class);
+      prop = {};
+      _ref = Class.prototype;
+      for (key in _ref) {
+        fn = _ref[key];
+        if (__indexOf.call(keys, key) < 0) {
+          prop[key] = fn;
+        }
+      }
+    }
+    _super = Class.__super__;
+    for (key in prop) {
+      fn = prop[key];
+      if (typeof fn === 'function' && fnTest.test(fn)) {
+        (function(key, fn) {
+          return Class.prototype[key] = function() {
+            var ret, tmp;
+            tmp = this._super;
+            this._super = _super[key];
+            ret = fn.apply(this, arguments);
+            this._super = tmp;
+            return ret;
+          };
+        })(key, fn);
+      } else {
+        Class.prototype[key] = fn;
+      }
+    }
+    return Class;
+  };
+
+  return Base;
+
+})();
+
+module.exports = Base;
+
+
+},{}],6:[function(_dereq_,module,exports){
+var Bitstream;
+
+Bitstream = (function() {
+  function Bitstream(stream) {
+    this.stream = stream;
+    this.bitPosition = 0;
+  }
+
+  Bitstream.prototype.copy = function() {
+    var result;
+    result = new Bitstream(this.stream.copy());
+    result.bitPosition = this.bitPosition;
+    return result;
+  };
+
+  Bitstream.prototype.offset = function() {
+    return 8 * this.stream.offset + this.bitPosition;
+  };
+
+  Bitstream.prototype.available = function(bits) {
+    return this.stream.available((bits + 8 - this.bitPosition) / 8);
+  };
+
+  Bitstream.prototype.advance = function(bits) {
+    var pos;
+    pos = this.bitPosition + bits;
+    this.stream.advance(pos >> 3);
+    return this.bitPosition = pos & 7;
+  };
+
+  Bitstream.prototype.rewind = function(bits) {
+    var pos;
+    pos = this.bitPosition - bits;
+    this.stream.rewind(Math.abs(pos >> 3));
+    return this.bitPosition = pos & 7;
+  };
+
+  Bitstream.prototype.seek = function(offset) {
+    var curOffset;
+    curOffset = this.offset();
+    if (offset > curOffset) {
+      return this.advance(offset - curOffset);
+    } else if (offset < curOffset) {
+      return this.rewind(curOffset - offset);
+    }
+  };
+
+  Bitstream.prototype.align = function() {
+    if (this.bitPosition !== 0) {
+      this.bitPosition = 0;
+      return this.stream.advance(1);
+    }
+  };
+
+  Bitstream.prototype.read = function(bits, signed) {
+    var a, a0, a1, a2, a3, a4, mBits;
+    if (bits === 0) {
+      return 0;
+    }
+    mBits = bits + this.bitPosition;
+    if (mBits <= 8) {
+      a = ((this.stream.peekUInt8() << this.bitPosition) & 0xff) >>> (8 - bits);
+    } else if (mBits <= 16) {
+      a = ((this.stream.peekUInt16() << this.bitPosition) & 0xffff) >>> (16 - bits);
+    } else if (mBits <= 24) {
+      a = ((this.stream.peekUInt24() << this.bitPosition) & 0xffffff) >>> (24 - bits);
+    } else if (mBits <= 32) {
+      a = (this.stream.peekUInt32() << this.bitPosition) >>> (32 - bits);
+    } else if (mBits <= 40) {
+      a0 = this.stream.peekUInt8(0) * 0x0100000000;
+      a1 = this.stream.peekUInt8(1) << 24 >>> 0;
+      a2 = this.stream.peekUInt8(2) << 16;
+      a3 = this.stream.peekUInt8(3) << 8;
+      a4 = this.stream.peekUInt8(4);
+      a = a0 + a1 + a2 + a3 + a4;
+      a %= Math.pow(2, 40 - this.bitPosition);
+      a = Math.floor(a / Math.pow(2, 40 - this.bitPosition - bits));
+    } else {
+      throw new Error("Too many bits!");
+    }
+    if (signed) {
+      if (mBits < 32) {
+        if (a >>> (bits - 1)) {
+          a = ((1 << bits >>> 0) - a) * -1;
+        }
+      } else {
+        if (a / Math.pow(2, bits - 1) | 0) {
+          a = (Math.pow(2, bits) - a) * -1;
+        }
+      }
+    }
+    this.advance(bits);
+    return a;
+  };
+
+  Bitstream.prototype.peek = function(bits, signed) {
+    var a, a0, a1, a2, a3, a4, mBits;
+    if (bits === 0) {
+      return 0;
+    }
+    mBits = bits + this.bitPosition;
+    if (mBits <= 8) {
+      a = ((this.stream.peekUInt8() << this.bitPosition) & 0xff) >>> (8 - bits);
+    } else if (mBits <= 16) {
+      a = ((this.stream.peekUInt16() << this.bitPosition) & 0xffff) >>> (16 - bits);
+    } else if (mBits <= 24) {
+      a = ((this.stream.peekUInt24() << this.bitPosition) & 0xffffff) >>> (24 - bits);
+    } else if (mBits <= 32) {
+      a = (this.stream.peekUInt32() << this.bitPosition) >>> (32 - bits);
+    } else if (mBits <= 40) {
+      a0 = this.stream.peekUInt8(0) * 0x0100000000;
+      a1 = this.stream.peekUInt8(1) << 24 >>> 0;
+      a2 = this.stream.peekUInt8(2) << 16;
+      a3 = this.stream.peekUInt8(3) << 8;
+      a4 = this.stream.peekUInt8(4);
+      a = a0 + a1 + a2 + a3 + a4;
+      a %= Math.pow(2, 40 - this.bitPosition);
+      a = Math.floor(a / Math.pow(2, 40 - this.bitPosition - bits));
+    } else {
+      throw new Error("Too many bits!");
+    }
+    if (signed) {
+      if (mBits < 32) {
+        if (a >>> (bits - 1)) {
+          a = ((1 << bits >>> 0) - a) * -1;
+        }
+      } else {
+        if (a / Math.pow(2, bits - 1) | 0) {
+          a = (Math.pow(2, bits) - a) * -1;
+        }
+      }
+    }
+    return a;
+  };
+
+  Bitstream.prototype.readLSB = function(bits, signed) {
+    var a, mBits;
+    if (bits === 0) {
+      return 0;
+    }
+    if (bits > 40) {
+      throw new Error("Too many bits!");
+    }
+    mBits = bits + this.bitPosition;
+    a = (this.stream.peekUInt8(0)) >>> this.bitPosition;
+    if (mBits > 8) {
+      a |= (this.stream.peekUInt8(1)) << (8 - this.bitPosition);
+    }
+    if (mBits > 16) {
+      a |= (this.stream.peekUInt8(2)) << (16 - this.bitPosition);
+    }
+    if (mBits > 24) {
+      a += (this.stream.peekUInt8(3)) << (24 - this.bitPosition) >>> 0;
+    }
+    if (mBits > 32) {
+      a += (this.stream.peekUInt8(4)) * Math.pow(2, 32 - this.bitPosition);
+    }
+    if (mBits >= 32) {
+      a %= Math.pow(2, bits);
+    } else {
+      a &= (1 << bits) - 1;
+    }
+    if (signed) {
+      if (mBits < 32) {
+        if (a >>> (bits - 1)) {
+          a = ((1 << bits >>> 0) - a) * -1;
+        }
+      } else {
+        if (a / Math.pow(2, bits - 1) | 0) {
+          a = (Math.pow(2, bits) - a) * -1;
+        }
+      }
+    }
+    this.advance(bits);
+    return a;
+  };
+
+  Bitstream.prototype.peekLSB = function(bits, signed) {
+    var a, mBits;
+    if (bits === 0) {
+      return 0;
+    }
+    if (bits > 40) {
+      throw new Error("Too many bits!");
+    }
+    mBits = bits + this.bitPosition;
+    a = (this.stream.peekUInt8(0)) >>> this.bitPosition;
+    if (mBits > 8) {
+      a |= (this.stream.peekUInt8(1)) << (8 - this.bitPosition);
+    }
+    if (mBits > 16) {
+      a |= (this.stream.peekUInt8(2)) << (16 - this.bitPosition);
+    }
+    if (mBits > 24) {
+      a += (this.stream.peekUInt8(3)) << (24 - this.bitPosition) >>> 0;
+    }
+    if (mBits > 32) {
+      a += (this.stream.peekUInt8(4)) * Math.pow(2, 32 - this.bitPosition);
+    }
+    if (mBits >= 32) {
+      a %= Math.pow(2, bits);
+    } else {
+      a &= (1 << bits) - 1;
+    }
+    if (signed) {
+      if (mBits < 32) {
+        if (a >>> (bits - 1)) {
+          a = ((1 << bits >>> 0) - a) * -1;
+        }
+      } else {
+        if (a / Math.pow(2, bits - 1) | 0) {
+          a = (Math.pow(2, bits) - a) * -1;
+        }
+      }
+    }
+    return a;
+  };
+
+  return Bitstream;
+
+})();
+
+module.exports = Bitstream;
+
+
+},{}],7:[function(_dereq_,module,exports){
+(function (global){
+var AVBuffer;
+
+AVBuffer = (function() {
+  var BlobBuilder, URL;
+
+  function AVBuffer(input) {
+    var _ref;
+    if (input instanceof Uint8Array) {
+      this.data = input;
+    } else if (input instanceof ArrayBuffer || Array.isArray(input) || typeof input === 'number' || ((_ref = global.Buffer) != null ? _ref.isBuffer(input) : void 0)) {
+      this.data = new Uint8Array(input);
+    } else if (input.buffer instanceof ArrayBuffer) {
+      this.data = new Uint8Array(input.buffer, input.byteOffset, input.length * input.BYTES_PER_ELEMENT);
+    } else if (input instanceof AVBuffer) {
+      this.data = input.data;
+    } else {
+      throw new Error("Constructing buffer with unknown type.");
+    }
+    this.length = this.data.length;
+    this.next = null;
+    this.prev = null;
+  }
+
+  AVBuffer.allocate = function(size) {
+    return new AVBuffer(size);
+  };
+
+  AVBuffer.prototype.copy = function() {
+    return new AVBuffer(new Uint8Array(this.data));
+  };
+
+  AVBuffer.prototype.slice = function(position, length) {
+    if (length == null) {
+      length = this.length;
+    }
+    if (position === 0 && length >= this.length) {
+      return new AVBuffer(this.data);
+    } else {
+      return new AVBuffer(this.data.subarray(position, position + length));
+    }
+  };
+
+  BlobBuilder = global.BlobBuilder || global.MozBlobBuilder || global.WebKitBlobBuilder;
+
+  URL = global.URL || global.webkitURL || global.mozURL;
+
+  AVBuffer.makeBlob = function(data, type) {
+    var bb;
+    if (type == null) {
+      type = 'application/octet-stream';
+    }
+    try {
+      return new Blob([data], {
+        type: type
+      });
+    } catch (_error) {}
+    if (BlobBuilder != null) {
+      bb = new BlobBuilder;
+      bb.append(data);
+      return bb.getBlob(type);
+    }
+    return null;
+  };
+
+  AVBuffer.makeBlobURL = function(data, type) {
+    return URL != null ? URL.createObjectURL(this.makeBlob(data, type)) : void 0;
+  };
+
+  AVBuffer.revokeBlobURL = function(url) {
+    return URL != null ? URL.revokeObjectURL(url) : void 0;
+  };
+
+  AVBuffer.prototype.toBlob = function() {
+    return AVBuffer.makeBlob(this.data.buffer);
+  };
+
+  AVBuffer.prototype.toBlobURL = function() {
+    return AVBuffer.makeBlobURL(this.data.buffer);
+  };
+
+  return AVBuffer;
+
+})();
+
+module.exports = AVBuffer;
+
+
+}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],8:[function(_dereq_,module,exports){
+var BufferList;
+
+BufferList = (function() {
+  function BufferList() {
+    this.first = null;
+    this.last = null;
+    this.numBuffers = 0;
+    this.availableBytes = 0;
+    this.availableBuffers = 0;
+  }
+
+  BufferList.prototype.copy = function() {
+    var result;
+    result = new BufferList;
+    result.first = this.first;
+    result.last = this.last;
+    result.numBuffers = this.numBuffers;
+    result.availableBytes = this.availableBytes;
+    result.availableBuffers = this.availableBuffers;
+    return result;
+  };
+
+  BufferList.prototype.append = function(buffer) {
+    var _ref;
+    buffer.prev = this.last;
+    if ((_ref = this.last) != null) {
+      _ref.next = buffer;
+    }
+    this.last = buffer;
+    if (this.first == null) {
+      this.first = buffer;
+    }
+    this.availableBytes += buffer.length;
+    this.availableBuffers++;
+    return this.numBuffers++;
+  };
+
+  BufferList.prototype.advance = function() {
+    if (this.first) {
+      this.availableBytes -= this.first.length;
+      this.availableBuffers--;
+      this.first = this.first.next;
+      return this.first != null;
+    }
+    return false;
+  };
+
+  BufferList.prototype.rewind = function() {
+    var _ref;
+    if (this.first && !this.first.prev) {
+      return false;
+    }
+    this.first = ((_ref = this.first) != null ? _ref.prev : void 0) || this.last;
+    if (this.first) {
+      this.availableBytes += this.first.length;
+      this.availableBuffers++;
+    }
+    return this.first != null;
+  };
+
+  BufferList.prototype.reset = function() {
+    var _results;
+    _results = [];
+    while (this.rewind()) {
+      continue;
+    }
+    return _results;
+  };
+
+  return BufferList;
+
+})();
+
+module.exports = BufferList;
+
+
+},{}],9:[function(_dereq_,module,exports){
+var Base, EventEmitter,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+  __slice = [].slice;
+
+Base = _dereq_('./base');
+
+EventEmitter = (function(_super) {
+  __extends(EventEmitter, _super);
+
+  function EventEmitter() {
+    return EventEmitter.__super__.constructor.apply(this, arguments);
+  }
+
+  EventEmitter.prototype.on = function(event, fn) {
+    var _base;
+    if (this.events == null) {
+      this.events = {};
+    }
+    if ((_base = this.events)[event] == null) {
+      _base[event] = [];
+    }
+    return this.events[event].push(fn);
+  };
+
+  EventEmitter.prototype.off = function(event, fn) {
+    var index, _ref;
+    if (!((_ref = this.events) != null ? _ref[event] : void 0)) {
+      return;
+    }
+    index = this.events[event].indexOf(fn);
+    if (~index) {
+      return this.events[event].splice(index, 1);
+    }
+  };
+
+  EventEmitter.prototype.once = function(event, fn) {
+    var cb;
+    return this.on(event, cb = function() {
+      this.off(event, cb);
+      return fn.apply(this, arguments);
+    });
+  };
+
+  EventEmitter.prototype.emit = function() {
+    var args, event, fn, _i, _len, _ref, _ref1;
+    event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+    if (!((_ref = this.events) != null ? _ref[event] : void 0)) {
+      return;
+    }
+    _ref1 = this.events[event].slice();
+    for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+      fn = _ref1[_i];
+      fn.apply(this, args);
+    }
+  };
+
+  return EventEmitter;
+
+})(Base);
+
+module.exports = EventEmitter;
+
+
+},{"./base":5}],10:[function(_dereq_,module,exports){
+var AVBuffer, BufferList, Stream, UnderflowError;
+
+BufferList = _dereq_('./bufferlist');
+
+AVBuffer = _dereq_('./buffer');
+
+UnderflowError = _dereq_('./underflow');
+
+Stream = (function() {
+  var buf, decodeString, float32, float64, float64Fallback, float80, int16, int32, int8, nativeEndian, uint16, uint32, uint8;
+
+  buf = new ArrayBuffer(16);
+
+  uint8 = new Uint8Array(buf);
+
+  int8 = new Int8Array(buf);
+
+  uint16 = new Uint16Array(buf);
+
+  int16 = new Int16Array(buf);
+
+  uint32 = new Uint32Array(buf);
+
+  int32 = new Int32Array(buf);
+
+  float32 = new Float32Array(buf);
+
+  if (typeof Float64Array !== "undefined" && Float64Array !== null) {
+    float64 = new Float64Array(buf);
+  }
+
+  nativeEndian = new Uint16Array(new Uint8Array([0x12, 0x34]).buffer)[0] === 0x3412;
+
+  function Stream(list) {
+    this.list = list;
+    this.localOffset = 0;
+    this.offset = 0;
+  }
+
+  Stream.fromBuffer = function(buffer) {
+    var list;
+    list = new BufferList;
+    list.append(buffer);
+    return new Stream(list);
+  };
+
+  Stream.prototype.copy = function() {
+    var result;
+    result = new Stream(this.list.copy());
+    result.localOffset = this.localOffset;
+    result.offset = this.offset;
+    return result;
+  };
+
+  Stream.prototype.available = function(bytes) {
+    return bytes <= this.list.availableBytes - this.localOffset;
+  };
+
+  Stream.prototype.remainingBytes = function() {
+    return this.list.availableBytes - this.localOffset;
+  };
+
+  Stream.prototype.advance = function(bytes) {
+    if (!this.available(bytes)) {
+      throw new UnderflowError();
+    }
+    this.localOffset += bytes;
+    this.offset += bytes;
+    while (this.list.first && this.localOffset >= this.list.first.length) {
+      this.localOffset -= this.list.first.length;
+      this.list.advance();
+    }
+    return this;
+  };
+
+  Stream.prototype.rewind = function(bytes) {
+    if (bytes > this.offset) {
+      throw new UnderflowError();
+    }
+    if (!this.list.first) {
+      this.list.rewind();
+      this.localOffset = this.list.first.length;
+    }
+    this.localOffset -= bytes;
+    this.offset -= bytes;
+    while (this.list.first.prev && this.localOffset < 0) {
+      this.list.rewind();
+      this.localOffset += this.list.first.length;
+    }
+    return this;
+  };
+
+  Stream.prototype.seek = function(position) {
+    if (position > this.offset) {
+      return this.advance(position - this.offset);
+    } else if (position < this.offset) {
+      return this.rewind(this.offset - position);
+    }
+  };
+
+  Stream.prototype.readUInt8 = function() {
+    var a;
+    if (!this.available(1)) {
+      throw new UnderflowError();
+    }
+    a = this.list.first.data[this.localOffset];
+    this.localOffset += 1;
+    this.offset += 1;
+    if (this.localOffset === this.list.first.length) {
+      this.localOffset = 0;
+      this.list.advance();
+    }
+    return a;
+  };
+
+  Stream.prototype.peekUInt8 = function(offset) {
+    var buffer;
+    if (offset == null) {
+      offset = 0;
+    }
+    if (!this.available(offset + 1)) {
+      throw new UnderflowError();
+    }
+    offset = this.localOffset + offset;
+    buffer = this.list.first;
+    while (buffer) {
+      if (buffer.length > offset) {
+        return buffer.data[offset];
+      }
+      offset -= buffer.length;
+      buffer = buffer.next;
+    }
+    return 0;
+  };
+
+  Stream.prototype.read = function(bytes, littleEndian) {
+    var i, _i, _j, _ref;
+    if (littleEndian == null) {
+      littleEndian = false;
+    }
+    if (littleEndian === nativeEndian) {
+      for (i = _i = 0; _i < bytes; i = _i += 1) {
+        uint8[i] = this.readUInt8();
+      }
+    } else {
+      for (i = _j = _ref = bytes - 1; _j >= 0; i = _j += -1) {
+        uint8[i] = this.readUInt8();
+      }
+    }
+  };
+
+  Stream.prototype.peek = function(bytes, offset, littleEndian) {
+    var i, _i, _j;
+    if (littleEndian == null) {
+      littleEndian = false;
+    }
+    if (littleEndian === nativeEndian) {
+      for (i = _i = 0; _i < bytes; i = _i += 1) {
+        uint8[i] = this.peekUInt8(offset + i);
+      }
+    } else {
+      for (i = _j = 0; _j < bytes; i = _j += 1) {
+        uint8[bytes - i - 1] = this.peekUInt8(offset + i);
+      }
+    }
+  };
+
+  Stream.prototype.readInt8 = function() {
+    this.read(1);
+    return int8[0];
+  };
+
+  Stream.prototype.peekInt8 = function(offset) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(1, offset);
+    return int8[0];
+  };
+
+  Stream.prototype.readUInt16 = function(littleEndian) {
+    this.read(2, littleEndian);
+    return uint16[0];
+  };
+
+  Stream.prototype.peekUInt16 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(2, offset, littleEndian);
+    return uint16[0];
+  };
+
+  Stream.prototype.readInt16 = function(littleEndian) {
+    this.read(2, littleEndian);
+    return int16[0];
+  };
+
+  Stream.prototype.peekInt16 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(2, offset, littleEndian);
+    return int16[0];
+  };
+
+  Stream.prototype.readUInt24 = function(littleEndian) {
+    if (littleEndian) {
+      return this.readUInt16(true) + (this.readUInt8() << 16);
+    } else {
+      return (this.readUInt16() << 8) + this.readUInt8();
+    }
+  };
+
+  Stream.prototype.peekUInt24 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    if (littleEndian) {
+      return this.peekUInt16(offset, true) + (this.peekUInt8(offset + 2) << 16);
+    } else {
+      return (this.peekUInt16(offset) << 8) + this.peekUInt8(offset + 2);
+    }
+  };
+
+  Stream.prototype.readInt24 = function(littleEndian) {
+    if (littleEndian) {
+      return this.readUInt16(true) + (this.readInt8() << 16);
+    } else {
+      return (this.readInt16() << 8) + this.readUInt8();
+    }
+  };
+
+  Stream.prototype.peekInt24 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    if (littleEndian) {
+      return this.peekUInt16(offset, true) + (this.peekInt8(offset + 2) << 16);
+    } else {
+      return (this.peekInt16(offset) << 8) + this.peekUInt8(offset + 2);
+    }
+  };
+
+  Stream.prototype.readUInt32 = function(littleEndian) {
+    this.read(4, littleEndian);
+    return uint32[0];
+  };
+
+  Stream.prototype.peekUInt32 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(4, offset, littleEndian);
+    return uint32[0];
+  };
+
+  Stream.prototype.readInt32 = function(littleEndian) {
+    this.read(4, littleEndian);
+    return int32[0];
+  };
+
+  Stream.prototype.peekInt32 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(4, offset, littleEndian);
+    return int32[0];
+  };
+
+  Stream.prototype.readFloat32 = function(littleEndian) {
+    this.read(4, littleEndian);
+    return float32[0];
+  };
+
+  Stream.prototype.peekFloat32 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(4, offset, littleEndian);
+    return float32[0];
+  };
+
+  Stream.prototype.readFloat64 = function(littleEndian) {
+    this.read(8, littleEndian);
+    if (float64) {
+      return float64[0];
+    } else {
+      return float64Fallback();
+    }
+  };
+
+  float64Fallback = function() {
+    var exp, frac, high, low, out, sign;
+    low = uint32[0], high = uint32[1];
+    if (!high || high === 0x80000000) {
+      return 0.0;
+    }
+    sign = 1 - (high >>> 31) * 2;
+    exp = (high >>> 20) & 0x7ff;
+    frac = high & 0xfffff;
+    if (exp === 0x7ff) {
+      if (frac) {
+        return NaN;
+      }
+      return sign * Infinity;
+    }
+    exp -= 1023;
+    out = (frac | 0x100000) * Math.pow(2, exp - 20);
+    out += low * Math.pow(2, exp - 52);
+    return sign * out;
+  };
+
+  Stream.prototype.peekFloat64 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(8, offset, littleEndian);
+    if (float64) {
+      return float64[0];
+    } else {
+      return float64Fallback();
+    }
+  };
+
+  Stream.prototype.readFloat80 = function(littleEndian) {
+    this.read(10, littleEndian);
+    return float80();
+  };
+
+  float80 = function() {
+    var a0, a1, exp, high, low, out, sign;
+    high = uint32[0], low = uint32[1];
+    a0 = uint8[9];
+    a1 = uint8[8];
+    sign = 1 - (a0 >>> 7) * 2;
+    exp = ((a0 & 0x7F) << 8) | a1;
+    if (exp === 0 && low === 0 && high === 0) {
+      return 0;
+    }
+    if (exp === 0x7fff) {
+      if (low === 0 && high === 0) {
+        return sign * Infinity;
+      }
+      return NaN;
+    }
+    exp -= 16383;
+    out = low * Math.pow(2, exp - 31);
+    out += high * Math.pow(2, exp - 63);
+    return sign * out;
+  };
+
+  Stream.prototype.peekFloat80 = function(offset, littleEndian) {
+    if (offset == null) {
+      offset = 0;
+    }
+    this.peek(10, offset, littleEndian);
+    return float80();
+  };
+
+  Stream.prototype.readBuffer = function(length) {
+    var i, result, to, _i;
+    result = AVBuffer.allocate(length);
+    to = result.data;
+    for (i = _i = 0; _i < length; i = _i += 1) {
+      to[i] = this.readUInt8();
+    }
+    return result;
+  };
+
+  Stream.prototype.peekBuffer = function(offset, length) {
+    var i, result, to, _i;
+    if (offset == null) {
+      offset = 0;
+    }
+    result = AVBuffer.allocate(length);
+    to = result.data;
+    for (i = _i = 0; _i < length; i = _i += 1) {
+      to[i] = this.peekUInt8(offset + i);
+    }
+    return result;
+  };
+
+  Stream.prototype.readSingleBuffer = function(length) {
+    var result;
+    result = this.list.first.slice(this.localOffset, length);
+    this.advance(result.length);
+    return result;
+  };
+
+  Stream.prototype.peekSingleBuffer = function(offset, length) {
+    var result;
+    result = this.list.first.slice(this.localOffset + offset, length);
+    return result;
+  };
+
+  Stream.prototype.readString = function(length, encoding) {
+    if (encoding == null) {
+      encoding = 'ascii';
+    }
+    return decodeString.call(this, 0, length, encoding, true);
+  };
+
+  Stream.prototype.peekString = function(offset, length, encoding) {
+    if (offset == null) {
+      offset = 0;
+    }
+    if (encoding == null) {
+      encoding = 'ascii';
+    }
+    return decodeString.call(this, offset, length, encoding, false);
+  };
+
+  decodeString = function(offset, length, encoding, advance) {
+    var b1, b2, b3, b4, bom, c, end, littleEndian, nullEnd, pt, result, w1, w2;
+    encoding = encoding.toLowerCase();
+    nullEnd = length === null ? 0 : -1;
+    if (length == null) {
+      length = Infinity;
+    }
+    end = offset + length;
+    result = '';
+    switch (encoding) {
+      case 'ascii':
+      case 'latin1':
+        while (offset < end && (c = this.peekUInt8(offset++)) !== nullEnd) {
+          result += String.fromCharCode(c);
+        }
+        break;
+      case 'utf8':
+      case 'utf-8':
+        while (offset < end && (b1 = this.peekUInt8(offset++)) !== nullEnd) {
+          if ((b1 & 0x80) === 0) {
+            result += String.fromCharCode(b1);
+          } else if ((b1 & 0xe0) === 0xc0) {
+            b2 = this.peekUInt8(offset++) & 0x3f;
+            result += String.fromCharCode(((b1 & 0x1f) << 6) | b2);
+          } else if ((b1 & 0xf0) === 0xe0) {
+            b2 = this.peekUInt8(offset++) & 0x3f;
+            b3 = this.peekUInt8(offset++) & 0x3f;
+            result += String.fromCharCode(((b1 & 0x0f) << 12) | (b2 << 6) | b3);
+          } else if ((b1 & 0xf8) === 0xf0) {
+            b2 = this.peekUInt8(offset++) & 0x3f;
+            b3 = this.peekUInt8(offset++) & 0x3f;
+            b4 = this.peekUInt8(offset++) & 0x3f;
+            pt = (((b1 & 0x0f) << 18) | (b2 << 12) | (b3 << 6) | b4) - 0x10000;
+            result += String.fromCharCode(0xd800 + (pt >> 10), 0xdc00 + (pt & 0x3ff));
+          }
+        }
+        break;
+      case 'utf16-be':
+      case 'utf16be':
+      case 'utf16le':
+      case 'utf16-le':
+      case 'utf16bom':
+      case 'utf16-bom':
+        switch (encoding) {
+          case 'utf16be':
+          case 'utf16-be':
+            littleEndian = false;
+            break;
+          case 'utf16le':
+          case 'utf16-le':
+            littleEndian = true;
+            break;
+          case 'utf16bom':
+          case 'utf16-bom':
+            if (length < 2 || (bom = this.peekUInt16(offset)) === nullEnd) {
+              if (advance) {
+                this.advance(offset += 2);
+              }
+              return result;
+            }
+            littleEndian = bom === 0xfffe;
+            offset += 2;
+        }
+        while (offset < end && (w1 = this.peekUInt16(offset, littleEndian)) !== nullEnd) {
+          offset += 2;
+          if (w1 < 0xd800 || w1 > 0xdfff) {
+            result += String.fromCharCode(w1);
+          } else {
+            if (w1 > 0xdbff) {
+              throw new Error("Invalid utf16 sequence.");
+            }
+            w2 = this.peekUInt16(offset, littleEndian);
+            if (w2 < 0xdc00 || w2 > 0xdfff) {
+              throw new Error("Invalid utf16 sequence.");
+            }
+            result += String.fromCharCode(w1, w2);
+            offset += 2;
+          }
+        }
+        if (w1 === nullEnd) {
+          offset += 2;
+        }
+        break;
+      default:
+        throw new Error("Unknown encoding: " + encoding);
+    }
+    if (advance) {
+      this.advance(offset);
+    }
+    return result;
+  };
+
+  return Stream;
+
+})();
+
+module.exports = Stream;
+
+
+},{"./buffer":7,"./bufferlist":8,"./underflow":11}],11:[function(_dereq_,module,exports){
+var UnderflowError,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+UnderflowError = (function(_super) {
+  __extends(UnderflowError, _super);
+
+  function UnderflowError() {
+    UnderflowError.__super__.constructor.apply(this, arguments);
+    this.name = 'UnderflowError';
+    this.stack = new Error().stack;
+  }
+
+  return UnderflowError;
+
+})(Error);
+
+module.exports = UnderflowError;
+
+
+},{}],12:[function(_dereq_,module,exports){
+var Bitstream, BufferList, Decoder, EventEmitter, Stream, UnderflowError,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+BufferList = _dereq_('./core/bufferlist');
+
+Stream = _dereq_('./core/stream');
+
+Bitstream = _dereq_('./core/bitstream');
+
+UnderflowError = _dereq_('./core/underflow');
+
+Decoder = (function(_super) {
+  var codecs;
+
+  __extends(Decoder, _super);
+
+  function Decoder(demuxer, format) {
+    var list;
+    this.demuxer = demuxer;
+    this.format = format;
+    list = new BufferList;
+    this.stream = new Stream(list);
+    this.bitstream = new Bitstream(this.stream);
+    this.receivedFinalBuffer = false;
+    this.waiting = false;
+    this.demuxer.on('cookie', (function(_this) {
+      return function(cookie) {
+        var error;
+        try {
+          return _this.setCookie(cookie);
+        } catch (_error) {
+          error = _error;
+          return _this.emit('error', error);
+        }
+      };
+    })(this));
+    this.demuxer.on('data', (function(_this) {
+      return function(chunk) {
+        list.append(chunk);
+        if (_this.waiting) {
+          return _this.decode();
+        }
+      };
+    })(this));
+    this.demuxer.on('end', (function(_this) {
+      return function() {
+        _this.receivedFinalBuffer = true;
+        if (_this.waiting) {
+          return _this.decode();
+        }
+      };
+    })(this));
+    this.init();
+  }
+
+  Decoder.prototype.init = function() {};
+
+  Decoder.prototype.setCookie = function(cookie) {};
+
+  Decoder.prototype.readChunk = function() {};
+
+  Decoder.prototype.decode = function() {
+    var error, offset, packet;
+    this.waiting = false;
+    offset = this.bitstream.offset();
+    try {
+      packet = this.readChunk();
+    } catch (_error) {
+      error = _error;
+      if (!(error instanceof UnderflowError)) {
+        this.emit('error', error);
+        return false;
+      }
+    }
+    if (packet) {
+      this.emit('data', packet);
+      return true;
+    } else if (!this.receivedFinalBuffer) {
+      this.bitstream.seek(offset);
+      this.waiting = true;
+    } else {
+      this.emit('end');
+    }
+    return false;
+  };
+
+  Decoder.prototype.seek = function(timestamp) {
+    var seekPoint;
+    seekPoint = this.demuxer.seek(timestamp);
+    this.stream.seek(seekPoint.offset);
+    return seekPoint.timestamp;
+  };
+
+  codecs = {};
+
+  Decoder.register = function(id, decoder) {
+    return codecs[id] = decoder;
+  };
+
+  Decoder.find = function(id) {
+    return codecs[id] || null;
+  };
+
+  return Decoder;
+
+})(EventEmitter);
+
+module.exports = Decoder;
+
+
+},{"./core/bitstream":6,"./core/bufferlist":8,"./core/events":9,"./core/stream":10,"./core/underflow":11}],13:[function(_dereq_,module,exports){
+var Decoder, LPCMDecoder,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Decoder = _dereq_('../decoder');
+
+LPCMDecoder = (function(_super) {
+  __extends(LPCMDecoder, _super);
+
+  function LPCMDecoder() {
+    this.readChunk = __bind(this.readChunk, this);
+    return LPCMDecoder.__super__.constructor.apply(this, arguments);
+  }
+
+  Decoder.register('lpcm', LPCMDecoder);
+
+  LPCMDecoder.prototype.readChunk = function() {
+    var chunkSize, i, littleEndian, output, samples, stream, _i, _j, _k, _l, _m, _n;
+    stream = this.stream;
+    littleEndian = this.format.littleEndian;
+    chunkSize = Math.min(4096, stream.remainingBytes());
+    samples = chunkSize / (this.format.bitsPerChannel / 8) | 0;
+    if (chunkSize < this.format.bitsPerChannel / 8) {
+      return null;
+    }
+    if (this.format.floatingPoint) {
+      switch (this.format.bitsPerChannel) {
+        case 32:
+          output = new Float32Array(samples);
+          for (i = _i = 0; _i < samples; i = _i += 1) {
+            output[i] = stream.readFloat32(littleEndian);
+          }
+          break;
+        case 64:
+          output = new Float64Array(samples);
+          for (i = _j = 0; _j < samples; i = _j += 1) {
+            output[i] = stream.readFloat64(littleEndian);
+          }
+          break;
+        default:
+          throw new Error('Unsupported bit depth.');
+      }
+    } else {
+      switch (this.format.bitsPerChannel) {
+        case 8:
+          output = new Int8Array(samples);
+          for (i = _k = 0; _k < samples; i = _k += 1) {
+            output[i] = stream.readInt8();
+          }
+          break;
+        case 16:
+          output = new Int16Array(samples);
+          for (i = _l = 0; _l < samples; i = _l += 1) {
+            output[i] = stream.readInt16(littleEndian);
+          }
+          break;
+        case 24:
+          output = new Int32Array(samples);
+          for (i = _m = 0; _m < samples; i = _m += 1) {
+            output[i] = stream.readInt24(littleEndian);
+          }
+          break;
+        case 32:
+          output = new Int32Array(samples);
+          for (i = _n = 0; _n < samples; i = _n += 1) {
+            output[i] = stream.readInt32(littleEndian);
+          }
+          break;
+        default:
+          throw new Error('Unsupported bit depth.');
+      }
+    }
+    return output;
+  };
+
+  return LPCMDecoder;
+
+})(Decoder);
+
+
+},{"../decoder":12}],14:[function(_dereq_,module,exports){
+var Decoder, XLAWDecoder,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Decoder = _dereq_('../decoder');
+
+XLAWDecoder = (function(_super) {
+  var BIAS, QUANT_MASK, SEG_MASK, SEG_SHIFT, SIGN_BIT;
+
+  __extends(XLAWDecoder, _super);
+
+  function XLAWDecoder() {
+    this.readChunk = __bind(this.readChunk, this);
+    return XLAWDecoder.__super__.constructor.apply(this, arguments);
+  }
+
+  Decoder.register('ulaw', XLAWDecoder);
+
+  Decoder.register('alaw', XLAWDecoder);
+
+  SIGN_BIT = 0x80;
+
+  QUANT_MASK = 0xf;
+
+  SEG_SHIFT = 4;
+
+  SEG_MASK = 0x70;
+
+  BIAS = 0x84;
+
+  XLAWDecoder.prototype.init = function() {
+    var i, seg, t, table, val, _i, _j;
+    this.format.bitsPerChannel = 16;
+    this.table = table = new Int16Array(256);
+    if (this.format.formatID === 'ulaw') {
+      for (i = _i = 0; _i < 256; i = ++_i) {
+        val = ~i;
+        t = ((val & QUANT_MASK) << 3) + BIAS;
+        t <<= (val & SEG_MASK) >>> SEG_SHIFT;
+        table[i] = val & SIGN_BIT ? BIAS - t : t - BIAS;
+      }
+    } else {
+      for (i = _j = 0; _j < 256; i = ++_j) {
+        val = i ^ 0x55;
+        t = val & QUANT_MASK;
+        seg = (val & SEG_MASK) >>> SEG_SHIFT;
+        if (seg) {
+          t = (t + t + 1 + 32) << (seg + 2);
+        } else {
+          t = (t + t + 1) << 3;
+        }
+        table[i] = val & SIGN_BIT ? t : -t;
+      }
+    }
+  };
+
+  XLAWDecoder.prototype.readChunk = function() {
+    var i, output, samples, stream, table, _i;
+    stream = this.stream, table = this.table;
+    samples = Math.min(4096, this.stream.remainingBytes());
+    if (samples === 0) {
+      return;
+    }
+    output = new Int16Array(samples);
+    for (i = _i = 0; _i < samples; i = _i += 1) {
+      output[i] = table[stream.readUInt8()];
+    }
+    return output;
+  };
+
+  return XLAWDecoder;
+
+})(Decoder);
+
+
+},{"../decoder":12}],15:[function(_dereq_,module,exports){
+var BufferList, Demuxer, EventEmitter, Stream,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+BufferList = _dereq_('./core/bufferlist');
+
+Stream = _dereq_('./core/stream');
+
+Demuxer = (function(_super) {
+  var formats;
+
+  __extends(Demuxer, _super);
+
+  Demuxer.probe = function(buffer) {
+    return false;
+  };
+
+  function Demuxer(source, chunk) {
+    var list, received;
+    list = new BufferList;
+    list.append(chunk);
+    this.stream = new Stream(list);
+    received = false;
+    source.on('data', (function(_this) {
+      return function(chunk) {
+        received = true;
+        list.append(chunk);
+        return _this.readChunk(chunk);
+      };
+    })(this));
+    source.on('error', (function(_this) {
+      return function(err) {
+        return _this.emit('error', err);
+      };
+    })(this));
+    source.on('end', (function(_this) {
+      return function() {
+        if (!received) {
+          _this.readChunk(chunk);
+        }
+        return _this.emit('end');
+      };
+    })(this));
+    this.seekPoints = [];
+    this.init();
+  }
+
+  Demuxer.prototype.init = function() {};
+
+  Demuxer.prototype.readChunk = function(chunk) {};
+
+  Demuxer.prototype.addSeekPoint = function(offset, timestamp) {
+    var index;
+    index = this.searchTimestamp(timestamp);
+    return this.seekPoints.splice(index, 0, {
+      offset: offset,
+      timestamp: timestamp
+    });
+  };
+
+  Demuxer.prototype.searchTimestamp = function(timestamp, backward) {
+    var high, low, mid, time;
+    low = 0;
+    high = this.seekPoints.length;
+    if (high > 0 && this.seekPoints[high - 1].timestamp < timestamp) {
+      return high;
+    }
+    while (low < high) {
+      mid = (low + high) >> 1;
+      time = this.seekPoints[mid].timestamp;
+      if (time < timestamp) {
+        low = mid + 1;
+      } else if (time >= timestamp) {
+        high = mid;
+      }
+    }
+    if (high > this.seekPoints.length) {
+      high = this.seekPoints.length;
+    }
+    return high;
+  };
+
+  Demuxer.prototype.seek = function(timestamp) {
+    var index, seekPoint;
+    if (this.format && this.format.framesPerPacket > 0 && this.format.bytesPerPacket > 0) {
+      seekPoint = {
+        timestamp: timestamp,
+        offset: this.format.bytesPerPacket * timestamp / this.format.framesPerPacket
+      };
+      return seekPoint;
+    } else {
+      index = this.searchTimestamp(timestamp);
+      return this.seekPoints[index];
+    }
+  };
+
+  formats = [];
+
+  Demuxer.register = function(demuxer) {
+    return formats.push(demuxer);
+  };
+
+  Demuxer.find = function(buffer) {
+    var e, format, offset, stream, _i, _len;
+    stream = Stream.fromBuffer(buffer);
+    for (_i = 0, _len = formats.length; _i < _len; _i++) {
+      format = formats[_i];
+      offset = stream.offset;
+      try {
+        if (format.probe(stream)) {
+          return format;
+        }
+      } catch (_error) {
+        e = _error;
+      }
+      stream.seek(offset);
+    }
+    return null;
+  };
+
+  return Demuxer;
+
+})(EventEmitter);
+
+module.exports = Demuxer;
+
+
+},{"./core/bufferlist":8,"./core/events":9,"./core/stream":10}],16:[function(_dereq_,module,exports){
+var AIFFDemuxer, Demuxer,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Demuxer = _dereq_('../demuxer');
+
+AIFFDemuxer = (function(_super) {
+  __extends(AIFFDemuxer, _super);
+
+  function AIFFDemuxer() {
+    return AIFFDemuxer.__super__.constructor.apply(this, arguments);
+  }
+
+  Demuxer.register(AIFFDemuxer);
+
+  AIFFDemuxer.probe = function(buffer) {
+    var _ref;
+    return buffer.peekString(0, 4) === 'FORM' && ((_ref = buffer.peekString(8, 4)) === 'AIFF' || _ref === 'AIFC');
+  };
+
+  AIFFDemuxer.prototype.readChunk = function() {
+    var buffer, format, offset, _ref;
+    if (!this.readStart && this.stream.available(12)) {
+      if (this.stream.readString(4) !== 'FORM') {
+        return this.emit('error', 'Invalid AIFF.');
+      }
+      this.fileSize = this.stream.readUInt32();
+      this.fileType = this.stream.readString(4);
+      this.readStart = true;
+      if ((_ref = this.fileType) !== 'AIFF' && _ref !== 'AIFC') {
+        return this.emit('error', 'Invalid AIFF.');
+      }
+    }
+    while (this.stream.available(1)) {
+      if (!this.readHeaders && this.stream.available(8)) {
+        this.type = this.stream.readString(4);
+        this.len = this.stream.readUInt32();
+      }
+      switch (this.type) {
+        case 'COMM':
+          if (!this.stream.available(this.len)) {
+            return;
+          }
+          this.format = {
+            formatID: 'lpcm',
+            channelsPerFrame: this.stream.readUInt16(),
+            sampleCount: this.stream.readUInt32(),
+            bitsPerChannel: this.stream.readUInt16(),
+            sampleRate: this.stream.readFloat80(),
+            framesPerPacket: 1,
+            littleEndian: false,
+            floatingPoint: false
+          };
+          this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
+          if (this.fileType === 'AIFC') {
+            format = this.stream.readString(4);
+            this.format.littleEndian = format === 'sowt' && this.format.bitsPerChannel > 8;
+            this.format.floatingPoint = format === 'fl32' || format === 'fl64';
+            if (format === 'twos' || format === 'sowt' || format === 'fl32' || format === 'fl64' || format === 'NONE') {
+              format = 'lpcm';
+            }
+            this.format.formatID = format;
+            this.len -= 4;
+          }
+          this.stream.advance(this.len - 18);
+          this.emit('format', this.format);
+          this.emit('duration', this.format.sampleCount / this.format.sampleRate * 1000 | 0);
+          break;
+        case 'SSND':
+          if (!(this.readSSNDHeader && this.stream.available(4))) {
+            offset = this.stream.readUInt32();
+            this.stream.advance(4);
+            this.stream.advance(offset);
+            this.readSSNDHeader = true;
+          }
+          buffer = this.stream.readSingleBuffer(this.len);
+          this.len -= buffer.length;
+          this.readHeaders = this.len > 0;
+          this.emit('data', buffer);
+          break;
+        default:
+          if (!this.stream.available(this.len)) {
+            return;
+          }
+          this.stream.advance(this.len);
+      }
+      if (this.type !== 'SSND') {
+        this.readHeaders = false;
+      }
+    }
+  };
+
+  return AIFFDemuxer;
+
+})(Demuxer);
+
+
+},{"../demuxer":15}],17:[function(_dereq_,module,exports){
+var AUDemuxer, Demuxer,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Demuxer = _dereq_('../demuxer');
+
+AUDemuxer = (function(_super) {
+  var bps, formats;
+
+  __extends(AUDemuxer, _super);
+
+  function AUDemuxer() {
+    return AUDemuxer.__super__.constructor.apply(this, arguments);
+  }
+
+  Demuxer.register(AUDemuxer);
+
+  AUDemuxer.probe = function(buffer) {
+    return buffer.peekString(0, 4) === '.snd';
+  };
+
+  bps = [8, 8, 16, 24, 32, 32, 64];
+
+  bps[26] = 8;
+
+  formats = {
+    1: 'ulaw',
+    27: 'alaw'
+  };
+
+  AUDemuxer.prototype.readChunk = function() {
+    var bytes, dataSize, encoding, size;
+    if (!this.readHeader && this.stream.available(24)) {
+      if (this.stream.readString(4) !== '.snd') {
+        return this.emit('error', 'Invalid AU file.');
+      }
+      size = this.stream.readUInt32();
+      dataSize = this.stream.readUInt32();
+      encoding = this.stream.readUInt32();
+      this.format = {
+        formatID: formats[encoding] || 'lpcm',
+        littleEndian: false,
+        floatingPoint: encoding === 6 || encoding === 7,
+        bitsPerChannel: bps[encoding - 1],
+        sampleRate: this.stream.readUInt32(),
+        channelsPerFrame: this.stream.readUInt32(),
+        framesPerPacket: 1
+      };
+      if (this.format.bitsPerChannel == null) {
+        return this.emit('error', 'Unsupported encoding in AU file.');
+      }
+      this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
+      if (dataSize !== 0xffffffff) {
+        bytes = this.format.bitsPerChannel / 8;
+        this.emit('duration', dataSize / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1000 | 0);
+      }
+      this.emit('format', this.format);
+      this.readHeader = true;
+    }
+    if (this.readHeader) {
+      while (this.stream.available(1)) {
+        this.emit('data', this.stream.readSingleBuffer(this.stream.remainingBytes()));
+      }
+    }
+  };
+
+  return AUDemuxer;
+
+})(Demuxer);
+
+
+},{"../demuxer":15}],18:[function(_dereq_,module,exports){
+var CAFDemuxer, Demuxer, M4ADemuxer,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Demuxer = _dereq_('../demuxer');
+
+M4ADemuxer = _dereq_('./m4a');
+
+CAFDemuxer = (function(_super) {
+  __extends(CAFDemuxer, _super);
+
+  function CAFDemuxer() {
+    return CAFDemuxer.__super__.constructor.apply(this, arguments);
+  }
+
+  Demuxer.register(CAFDemuxer);
+
+  CAFDemuxer.probe = function(buffer) {
+    return buffer.peekString(0, 4) === 'caff';
+  };
+
+  CAFDemuxer.prototype.readChunk = function() {
+    var buffer, byteOffset, cookie, entries, flags, i, key, metadata, offset, sampleOffset, value, _i, _j, _ref;
+    if (!this.format && this.stream.available(64)) {
+      if (this.stream.readString(4) !== 'caff') {
+        return this.emit('error', "Invalid CAF, does not begin with 'caff'");
+      }
+      this.stream.advance(4);
+      if (this.stream.readString(4) !== 'desc') {
+        return this.emit('error', "Invalid CAF, 'caff' is not followed by 'desc'");
+      }
+      if (!(this.stream.readUInt32() === 0 && this.stream.readUInt32() === 32)) {
+        return this.emit('error', "Invalid 'desc' size, should be 32");
+      }
+      this.format = {};
+      this.format.sampleRate = this.stream.readFloat64();
+      this.format.formatID = this.stream.readString(4);
+      flags = this.stream.readUInt32();
+      if (this.format.formatID === 'lpcm') {
+        this.format.floatingPoint = Boolean(flags & 1);
+        this.format.littleEndian = Boolean(flags & 2);
+      }
+      this.format.bytesPerPacket = this.stream.readUInt32();
+      this.format.framesPerPacket = this.stream.readUInt32();
+      this.format.channelsPerFrame = this.stream.readUInt32();
+      this.format.bitsPerChannel = this.stream.readUInt32();
+      this.emit('format', this.format);
+    }
+    while (this.stream.available(1)) {
+      if (!this.headerCache) {
+        this.headerCache = {
+          type: this.stream.readString(4),
+          oversize: this.stream.readUInt32() !== 0,
+          size: this.stream.readUInt32()
+        };
+        if (this.headerCache.oversize) {
+          return this.emit('error', "Holy Shit, an oversized file, not supported in JS");
+        }
+      }
+      switch (this.headerCache.type) {
+        case 'kuki':
+          if (this.stream.available(this.headerCache.size)) {
+            if (this.format.formatID === 'aac ') {
+              offset = this.stream.offset + this.headerCache.size;
+              if (cookie = M4ADemuxer.readEsds(this.stream)) {
+                this.emit('cookie', cookie);
+              }
+              this.stream.seek(offset);
+            } else {
+              buffer = this.stream.readBuffer(this.headerCache.size);
+              this.emit('cookie', buffer);
+            }
+            this.headerCache = null;
+          }
+          break;
+        case 'pakt':
+          if (this.stream.available(this.headerCache.size)) {
+            if (this.stream.readUInt32() !== 0) {
+              return this.emit('error', 'Sizes greater than 32 bits are not supported.');
+            }
+            this.numPackets = this.stream.readUInt32();
+            if (this.stream.readUInt32() !== 0) {
+              return this.emit('error', 'Sizes greater than 32 bits are not supported.');
+            }
+            this.numFrames = this.stream.readUInt32();
+            this.primingFrames = this.stream.readUInt32();
+            this.remainderFrames = this.stream.readUInt32();
+            this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0);
+            this.sentDuration = true;
+            byteOffset = 0;
+            sampleOffset = 0;
+            for (i = _i = 0, _ref = this.numPackets; _i < _ref; i = _i += 1) {
+              this.addSeekPoint(byteOffset, sampleOffset);
+              byteOffset += this.format.bytesPerPacket || M4ADemuxer.readDescrLen(this.stream);
+              sampleOffset += this.format.framesPerPacket || M4ADemuxer.readDescrLen(this.stream);
+            }
+            this.headerCache = null;
+          }
+          break;
+        case 'info':
+          entries = this.stream.readUInt32();
+          metadata = {};
+          for (i = _j = 0; 0 <= entries ? _j < entries : _j > entries; i = 0 <= entries ? ++_j : --_j) {
+            key = this.stream.readString(null);
+            value = this.stream.readString(null);
+            metadata[key] = value;
+          }
+          this.emit('metadata', metadata);
+          this.headerCache = null;
+          break;
+        case 'data':
+          if (!this.sentFirstDataChunk) {
+            this.stream.advance(4);
+            this.headerCache.size -= 4;
+            if (this.format.bytesPerPacket !== 0 && !this.sentDuration) {
+              this.numFrames = this.headerCache.size / this.format.bytesPerPacket;
+              this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0);
+            }
+            this.sentFirstDataChunk = true;
+          }
+          buffer = this.stream.readSingleBuffer(this.headerCache.size);
+          this.headerCache.size -= buffer.length;
+          this.emit('data', buffer);
+          if (this.headerCache.size <= 0) {
+            this.headerCache = null;
+          }
+          break;
+        default:
+          if (this.stream.available(this.headerCache.size)) {
+            this.stream.advance(this.headerCache.size);
+            this.headerCache = null;
+          }
+      }
+    }
+  };
+
+  return CAFDemuxer;
+
+})(Demuxer);
+
+
+},{"../demuxer":15,"./m4a":19}],19:[function(_dereq_,module,exports){
+var Demuxer, M4ADemuxer,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+  __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+Demuxer = _dereq_('../demuxer');
+
+M4ADemuxer = (function(_super) {
+  var BITS_PER_CHANNEL, TYPES, after, atom, atoms, bool, containers, diskTrack, genres, meta, string;
+
+  __extends(M4ADemuxer, _super);
+
+  function M4ADemuxer() {
+    return M4ADemuxer.__super__.constructor.apply(this, arguments);
+  }
+
+  Demuxer.register(M4ADemuxer);
+
+  TYPES = ['M4A ', 'M4P ', 'M4B ', 'M4V ', 'isom', 'mp42', 'qt  '];
+
+  M4ADemuxer.probe = function(buffer) {
+    var _ref;
+    return buffer.peekString(4, 4) === 'ftyp' && (_ref = buffer.peekString(8, 4), __indexOf.call(TYPES, _ref) >= 0);
+  };
+
+  M4ADemuxer.prototype.init = function() {
+    this.atoms = [];
+    this.offsets = [];
+    this.track = null;
+    return this.tracks = [];
+  };
+
+  atoms = {};
+
+  containers = {};
+
+  atom = function(name, fn) {
+    var c, container, _i, _len, _ref;
+    c = [];
+    _ref = name.split('.').slice(0, -1);
+    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+      container = _ref[_i];
+      c.push(container);
+      containers[c.join('.')] = true;
+    }
+    if (atoms[name] == null) {
+      atoms[name] = {};
+    }
+    return atoms[name].fn = fn;
+  };
+
+  after = function(name, fn) {
+    if (atoms[name] == null) {
+      atoms[name] = {};
+    }
+    return atoms[name].after = fn;
+  };
+
+  M4ADemuxer.prototype.readChunk = function() {
+    var handler, path, type;
+    this["break"] = false;
+    while (this.stream.available(1) && !this["break"]) {
+      if (!this.readHeaders) {
+        if (!this.stream.available(8)) {
+          return;
+        }
+        this.len = this.stream.readUInt32() - 8;
+        this.type = this.stream.readString(4);
+        if (this.len === 0) {
+          continue;
+        }
+        this.atoms.push(this.type);
+        this.offsets.push(this.stream.offset + this.len);
+        this.readHeaders = true;
+      }
+      path = this.atoms.join('.');
+      handler = atoms[path];
+      if (handler != null ? handler.fn : void 0) {
+        if (!(this.stream.available(this.len) || path === 'mdat')) {
+          return;
+        }
+        handler.fn.call(this);
+        if (path in containers) {
+          this.readHeaders = false;
+        }
+      } else if (path in containers) {
+        this.readHeaders = false;
+      } else {
+        if (!this.stream.available(this.len)) {
+          return;
+        }
+        this.stream.advance(this.len);
+      }
+      while (this.stream.offset >= this.offsets[this.offsets.length - 1]) {
+        handler = atoms[this.atoms.join('.')];
+        if (handler != null ? handler.after : void 0) {
+          handler.after.call(this);
+        }
+        type = this.atoms.pop();
+        this.offsets.pop();
+        this.readHeaders = false;
+      }
+    }
+  };
+
+  atom('ftyp', function() {
+    var _ref;
+    if (_ref = this.stream.readString(4), __indexOf.call(TYPES, _ref) < 0) {
+      return this.emit('error', 'Not a valid M4A file.');
+    }
+    return this.stream.advance(this.len - 4);
+  });
+
+  atom('moov.trak', function() {
+    this.track = {};
+    return this.tracks.push(this.track);
+  });
+
+  atom('moov.trak.tkhd', function() {
+    this.stream.advance(4);
+    this.stream.advance(8);
+    this.track.id = this.stream.readUInt32();
+    return this.stream.advance(this.len - 16);
+  });
+
+  atom('moov.trak.mdia.hdlr', function() {
+    this.stream.advance(4);
+    this.stream.advance(4);
+    this.track.type = this.stream.readString(4);
+    this.stream.advance(12);
+    return this.stream.advance(this.len - 24);
+  });
+
+  atom('moov.trak.mdia.mdhd', function() {
+    this.stream.advance(4);
+    this.stream.advance(8);
+    this.track.timeScale = this.stream.readUInt32();
+    this.track.duration = this.stream.readUInt32();
+    return this.stream.advance(4);
+  });
+
+  BITS_PER_CHANNEL = {
+    ulaw: 8,
+    alaw: 8,
+    in24: 24,
+    in32: 32,
+    fl32: 32,
+    fl64: 64
+  };
+
+  atom('moov.trak.mdia.minf.stbl.stsd', function() {
+    var format, numEntries, version, _ref, _ref1;
+    this.stream.advance(4);
+    numEntries = this.stream.readUInt32();
+    if (this.track.type !== 'soun') {
+      return this.stream.advance(this.len - 8);
+    }
+    if (numEntries !== 1) {
+      return this.emit('error', "Only expecting one entry in sample description atom!");
+    }
+    this.stream.advance(4);
+    format = this.track.format = {};
+    format.formatID = this.stream.readString(4);
+    this.stream.advance(6);
+    this.stream.advance(2);
+    version = this.stream.readUInt16();
+    this.stream.advance(6);
+    format.channelsPerFrame = this.stream.readUInt16();
+    format.bitsPerChannel = this.stream.readUInt16();
+    this.stream.advance(4);
+    format.sampleRate = this.stream.readUInt16();
+    this.stream.advance(2);
+    if (version === 1) {
+      format.framesPerPacket = this.stream.readUInt32();
+      this.stream.advance(4);
+      format.bytesPerFrame = this.stream.readUInt32();
+      this.stream.advance(4);
+    } else if (version !== 0) {
+      this.emit('error', 'Unknown version in stsd atom');
+    }
+    if (BITS_PER_CHANNEL[format.formatID] != null) {
+      format.bitsPerChannel = BITS_PER_CHANNEL[format.formatID];
+    }
+    format.floatingPoint = (_ref = format.formatID) === 'fl32' || _ref === 'fl64';
+    format.littleEndian = format.formatID === 'sowt' && format.bitsPerChannel > 8;
+    if ((_ref1 = format.formatID) === 'twos' || _ref1 === 'sowt' || _ref1 === 'in24' || _ref1 === 'in32' || _ref1 === 'fl32' || _ref1 === 'fl64' || _ref1 === 'raw ' || _ref1 === 'NONE') {
+      return format.formatID = 'lpcm';
+    }
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stsd.alac', function() {
+    this.stream.advance(4);
+    return this.track.cookie = this.stream.readBuffer(this.len - 4);
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stsd.esds', function() {
+    var offset;
+    offset = this.stream.offset + this.len;
+    this.track.cookie = M4ADemuxer.readEsds(this.stream);
+    return this.stream.seek(offset);
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stsd.wave.enda', function() {
+    return this.track.format.littleEndian = !!this.stream.readUInt16();
+  });
+
+  M4ADemuxer.readDescrLen = function(stream) {
+    var c, count, len;
+    len = 0;
+    count = 4;
+    while (count--) {
+      c = stream.readUInt8();
+      len = (len << 7) | (c & 0x7f);
+      if (!(c & 0x80)) {
+        break;
+      }
+    }
+    return len;
+  };
+
+  M4ADemuxer.readEsds = function(stream) {
+    var codec_id, flags, len, tag;
+    stream.advance(4);
+    tag = stream.readUInt8();
+    len = M4ADemuxer.readDescrLen(stream);
+    if (tag === 0x03) {
+      stream.advance(2);
+      flags = stream.readUInt8();
+      if (flags & 0x80) {
+        stream.advance(2);
+      }
+      if (flags & 0x40) {
+        stream.advance(stream.readUInt8());
+      }
+      if (flags & 0x20) {
+        stream.advance(2);
+      }
+    } else {
+      stream.advance(2);
+    }
+    tag = stream.readUInt8();
+    len = M4ADemuxer.readDescrLen(stream);
+    if (tag === 0x04) {
+      codec_id = stream.readUInt8();
+      stream.advance(1);
+      stream.advance(3);
+      stream.advance(4);
+      stream.advance(4);
+      tag = stream.readUInt8();
+      len = M4ADemuxer.readDescrLen(stream);
+      if (tag === 0x05) {
+        return stream.readBuffer(len);
+      }
+    }
+    return null;
+  };
+
+  atom('moov.trak.mdia.minf.stbl.stts', function() {
+    var entries, i, _i;
+    this.stream.advance(4);
+    entries = this.stream.readUInt32();
+    this.track.stts = [];
+    for (i = _i = 0; _i < entries; i = _i += 1) {
+      this.track.stts[i] = {
+        count: this.stream.readUInt32(),
+        duration: this.stream.readUInt32()
+      };
+    }
+    return this.setupSeekPoints();
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stsc', function() {
+    var entries, i, _i;
+    this.stream.advance(4);
+    entries = this.stream.readUInt32();
+    this.track.stsc = [];
+    for (i = _i = 0; _i < entries; i = _i += 1) {
+      this.track.stsc[i] = {
+        first: this.stream.readUInt32(),
+        count: this.stream.readUInt32(),
+        id: this.stream.readUInt32()
+      };
+    }
+    return this.setupSeekPoints();
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stsz', function() {
+    var entries, i, _i;
+    this.stream.advance(4);
+    this.track.sampleSize = this.stream.readUInt32();
+    entries = this.stream.readUInt32();
+    if (this.track.sampleSize === 0 && entries > 0) {
+      this.track.sampleSizes = [];
+      for (i = _i = 0; _i < entries; i = _i += 1) {
+        this.track.sampleSizes[i] = this.stream.readUInt32();
+      }
+    }
+    return this.setupSeekPoints();
+  });
+
+  atom('moov.trak.mdia.minf.stbl.stco', function() {
+    var entries, i, _i;
+    this.stream.advance(4);
+    entries = this.stream.readUInt32();
+    this.track.chunkOffsets = [];
+    for (i = _i = 0; _i < entries; i = _i += 1) {
+      this.track.chunkOffsets[i] = this.stream.readUInt32();
+    }
+    return this.setupSeekPoints();
+  });
+
+  atom('moov.trak.tref.chap', function() {
+    var entries, i, _i;
+    entries = this.len >> 2;
+    this.track.chapterTracks = [];
+    for (i = _i = 0; _i < entries; i = _i += 1) {
+      this.track.chapterTracks[i] = this.stream.readUInt32();
+    }
+  });
+
+  M4ADemuxer.prototype.setupSeekPoints = function() {
+    var i, j, offset, position, sampleIndex, size, stscIndex, sttsIndex, sttsSample, timestamp, _i, _j, _len, _ref, _ref1, _results;
+    if (!((this.track.chunkOffsets != null) && (this.track.stsc != null) && (this.track.sampleSize != null) && (this.track.stts != null))) {
+      return;
+    }
+    stscIndex = 0;
+    sttsIndex = 0;
+    sttsIndex = 0;
+    sttsSample = 0;
+    sampleIndex = 0;
+    offset = 0;
+    timestamp = 0;
+    this.track.seekPoints = [];
+    _ref = this.track.chunkOffsets;
+    _results = [];
+    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+      position = _ref[i];
+      for (j = _j = 0, _ref1 = this.track.stsc[stscIndex].count; _j < _ref1; j = _j += 1) {
+        this.track.seekPoints.push({
+          offset: offset,
+          position: position,
+          timestamp: timestamp
+        });
+        size = this.track.sampleSize || this.track.sampleSizes[sampleIndex++];
+        offset += size;
+        position += size;
+        timestamp += this.track.stts[sttsIndex].duration;
+        if (sttsIndex + 1 < this.track.stts.length && ++sttsSample === this.track.stts[sttsIndex].count) {
+          sttsSample = 0;
+          sttsIndex++;
+        }
+      }
+      if (stscIndex + 1 < this.track.stsc.length && i + 1 === this.track.stsc[stscIndex + 1].first) {
+        _results.push(stscIndex++);
+      } else {
+        _results.push(void 0);
+      }
+    }
+    return _results;
+  };
+
+  after('moov', function() {
+    var track, _i, _len, _ref;
+    if (this.mdatOffset != null) {
+      this.stream.seek(this.mdatOffset - 8);
+    }
+    _ref = this.tracks;
+    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+      track = _ref[_i];
+      if (!(track.type === 'soun')) {
+        continue;
+      }
+      this.track = track;
+      break;
+    }
+    if (this.track.type !== 'soun') {
+      this.track = null;
+      return this.emit('error', 'No audio tracks in m4a file.');
+    }
+    this.emit('format', this.track.format);
+    this.emit('duration', this.track.duration / this.track.timeScale * 1000 | 0);
+    if (this.track.cookie) {
+      this.emit('cookie', this.track.cookie);
+    }
+    return this.seekPoints = this.track.seekPoints;
+  });
+
+  atom('mdat', function() {
+    var bytes, chunkSize, length, numSamples, offset, sample, size, _i;
+    if (!this.startedData) {
+      if (this.mdatOffset == null) {
+        this.mdatOffset = this.stream.offset;
+      }
+      if (this.tracks.length === 0) {
+        bytes = Math.min(this.stream.remainingBytes(), this.len);
+        this.stream.advance(bytes);
+        this.len -= bytes;
+        return;
+      }
+      this.chunkIndex = 0;
+      this.stscIndex = 0;
+      this.sampleIndex = 0;
+      this.tailOffset = 0;
+      this.tailSamples = 0;
+      this.startedData = true;
+    }
+    if (!this.readChapters) {
+      this.readChapters = this.parseChapters();
+      if (this["break"] = !this.readChapters) {
+        return;
+      }
+      this.stream.seek(this.mdatOffset);
+    }
+    offset = this.track.chunkOffsets[this.chunkIndex] + this.tailOffset;
+    length = 0;
+    if (!this.stream.available(offset - this.stream.offset)) {
+      this["break"] = true;
+      return;
+    }
+    this.stream.seek(offset);
+    while (this.chunkIndex < this.track.chunkOffsets.length) {
+      numSamples = this.track.stsc[this.stscIndex].count - this.tailSamples;
+      chunkSize = 0;
+      for (sample = _i = 0; _i < numSamples; sample = _i += 1) {
+        size = this.track.sampleSize || this.track.sampleSizes[this.sampleIndex];
+        if (!this.stream.available(length + size)) {
+          break;
+        }
+        length += size;
+        chunkSize += size;
+        this.sampleIndex++;
+      }
+      if (sample < numSamples) {
+        this.tailOffset += chunkSize;
+        this.tailSamples += sample;
+        break;
+      } else {
+        this.chunkIndex++;
+        this.tailOffset = 0;
+        this.tailSamples = 0;
+        if (this.stscIndex + 1 < this.track.stsc.length && this.chunkIndex + 1 === this.track.stsc[this.stscIndex + 1].first) {
+          this.stscIndex++;
+        }
+        if (offset + length !== this.track.chunkOffsets[this.chunkIndex]) {
+          break;
+        }
+      }
+    }
+    if (length > 0) {
+      this.emit('data', this.stream.readBuffer(length));
+      return this["break"] = this.chunkIndex === this.track.chunkOffsets.length;
+    } else {
+      return this["break"] = true;
+    }
+  });
+
+  M4ADemuxer.prototype.parseChapters = function() {
+    var bom, id, len, nextTimestamp, point, title, track, _i, _len, _ref, _ref1, _ref2, _ref3;
+    if (!(((_ref = this.track.chapterTracks) != null ? _ref.length : void 0) > 0)) {
+      return true;
+    }
+    id = this.track.chapterTracks[0];
+    _ref1 = this.tracks;
+    for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+      track = _ref1[_i];
+      if (track.id === id) {
+        break;
+      }
+    }
+    if (track.id !== id) {
+      this.emit('error', 'Chapter track does not exist.');
+    }
+    if (this.chapters == null) {
+      this.chapters = [];
+    }
+    while (this.chapters.length < track.seekPoints.length) {
+      point = track.seekPoints[this.chapters.length];
+      if (!this.stream.available(point.position - this.stream.offset + 32)) {
+        return false;
+      }
+      this.stream.seek(point.position);
+      len = this.stream.readUInt16();
+      title = null;
+      if (!this.stream.available(len)) {
+        return false;
+      }
+      if (len > 2) {
+        bom = this.stream.peekUInt16();
+        if (bom === 0xfeff || bom === 0xfffe) {
+          title = this.stream.readString(len, 'utf16-bom');
+        }
+      }
+      if (title == null) {
+        title = this.stream.readString(len, 'utf8');
+      }
+      nextTimestamp = (_ref2 = (_ref3 = track.seekPoints[this.chapters.length + 1]) != null ? _ref3.timestamp : void 0) != null ? _ref2 : track.duration;
+      this.chapters.push({
+        title: title,
+        timestamp: point.timestamp / track.timeScale * 1000 | 0,
+        duration: (nextTimestamp - point.timestamp) / track.timeScale * 1000 | 0
+      });
+    }
+    this.emit('chapters', this.chapters);
+    return true;
+  };
+
+  atom('moov.udta.meta', function() {
+    this.metadata = {};
+    return this.stream.advance(4);
+  });
+
+  after('moov.udta.meta', function() {
+    return this.emit('metadata', this.metadata);
+  });
+
+  meta = function(field, name, fn) {
+    return atom("moov.udta.meta.ilst." + field + ".data", function() {
+      this.stream.advance(8);
+      this.len -= 8;
+      return fn.call(this, name);
+    });
+  };
+
+  string = function(field) {
+    return this.metadata[field] = this.stream.readString(this.len, 'utf8');
+  };
+
+  meta('Â©alb', 'album', string);
+
+  meta('Â©arg', 'arranger', string);
+
+  meta('Â©art', 'artist', string);
+
+  meta('Â©ART', 'artist', string);
+
+  meta('aART', 'albumArtist', string);
+
+  meta('catg', 'category', string);
+
+  meta('Â©com', 'composer', string);
+
+  meta('Â©cpy', 'copyright', string);
+
+  meta('cprt', 'copyright', string);
+
+  meta('Â©cmt', 'comments', string);
+
+  meta('Â©day', 'releaseDate', string);
+
+  meta('desc', 'description', string);
+
+  meta('Â©gen', 'genre', string);
+
+  meta('Â©grp', 'grouping', string);
+
+  meta('Â©isr', 'ISRC', string);
+
+  meta('keyw', 'keywords', string);
+
+  meta('Â©lab', 'recordLabel', string);
+
+  meta('ldes', 'longDescription', string);
+
+  meta('Â©lyr', 'lyrics', string);
+
+  meta('Â©nam', 'title', string);
+
+  meta('Â©phg', 'recordingCopyright', string);
+
+  meta('Â©prd', 'producer', string);
+
+  meta('Â©prf', 'performers', string);
+
+  meta('purd', 'purchaseDate', string);
+
+  meta('purl', 'podcastURL', string);
+
+  meta('Â©swf', 'songwriter', string);
+
+  meta('Â©too', 'encoder', string);
+
+  meta('Â©wrt', 'composer', string);
+
+  meta('covr', 'coverArt', function(field) {
+    return this.metadata[field] = this.stream.readBuffer(this.len);
+  });
+
+  genres = ["Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A Capella", "Euro-House", "Dance Hall"];
+
+  meta('gnre', 'genre', function(field) {
+    return this.metadata[field] = genres[this.stream.readUInt16() - 1];
+  });
+
+  meta('tmpo', 'tempo', function(field) {
+    return this.metadata[field] = this.stream.readUInt16();
+  });
+
+  meta('rtng', 'rating', function(field) {
+    var rating;
+    rating = this.stream.readUInt8();
+    return this.metadata[field] = rating === 2 ? 'Clean' : rating !== 0 ? 'Explicit' : 'None';
+  });
+
+  diskTrack = function(field) {
+    this.stream.advance(2);
+    this.metadata[field] = this.stream.readUInt16() + ' of ' + this.stream.readUInt16();
+    return this.stream.advance(this.len - 6);
+  };
+
+  meta('disk', 'diskNumber', diskTrack);
+
+  meta('trkn', 'trackNumber', diskTrack);
+
+  bool = function(field) {
+    return this.metadata[field] = this.stream.readUInt8() === 1;
+  };
+
+  meta('cpil', 'compilation', bool);
+
+  meta('pcst', 'podcast', bool);
+
+  meta('pgap', 'gapless', bool);
+
+  return M4ADemuxer;
+
+})(Demuxer);
+
+module.exports = M4ADemuxer;
+
+
+},{"../demuxer":15}],20:[function(_dereq_,module,exports){
+var Demuxer, WAVEDemuxer,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Demuxer = _dereq_('../demuxer');
+
+WAVEDemuxer = (function(_super) {
+  var formats;
+
+  __extends(WAVEDemuxer, _super);
+
+  function WAVEDemuxer() {
+    return WAVEDemuxer.__super__.constructor.apply(this, arguments);
+  }
+
+  Demuxer.register(WAVEDemuxer);
+
+  WAVEDemuxer.probe = function(buffer) {
+    return buffer.peekString(0, 4) === 'RIFF' && buffer.peekString(8, 4) === 'WAVE';
+  };
+
+  formats = {
+    0x0001: 'lpcm',
+    0x0003: 'lpcm',
+    0x0006: 'alaw',
+    0x0007: 'ulaw'
+  };
+
+  WAVEDemuxer.prototype.readChunk = function() {
+    var buffer, bytes, encoding;
+    if (!this.readStart && this.stream.available(12)) {
+      if (this.stream.readString(4) !== 'RIFF') {
+        return this.emit('error', 'Invalid WAV file.');
+      }
+      this.fileSize = this.stream.readUInt32(true);
+      this.readStart = true;
+      if (this.stream.readString(4) !== 'WAVE') {
+        return this.emit('error', 'Invalid WAV file.');
+      }
+    }
+    while (this.stream.available(1)) {
+      if (!this.readHeaders && this.stream.available(8)) {
+        this.type = this.stream.readString(4);
+        this.len = this.stream.readUInt32(true);
+      }
+      switch (this.type) {
+        case 'fmt ':
+          encoding = this.stream.readUInt16(true);
+          if (!(encoding in formats)) {
+            return this.emit('error', 'Unsupported format in WAV file.');
+          }
+          this.format = {
+            formatID: formats[encoding],
+            floatingPoint: encoding === 0x0003,
+            littleEndian: formats[encoding] === 'lpcm',
+            channelsPerFrame: this.stream.readUInt16(true),
+            sampleRate: this.stream.readUInt32(true),
+            framesPerPacket: 1
+          };
+          this.stream.advance(4);
+          this.stream.advance(2);
+          this.format.bitsPerChannel = this.stream.readUInt16(true);
+          this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
+          this.emit('format', this.format);
+          this.stream.advance(this.len - 16);
+          break;
+        case 'data':
+          if (!this.sentDuration) {
+            bytes = this.format.bitsPerChannel / 8;
+            this.emit('duration', this.len / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1000 | 0);
+            this.sentDuration = true;
+          }
+          buffer = this.stream.readSingleBuffer(this.len);
+          this.len -= buffer.length;
+          this.readHeaders = this.len > 0;
+          this.emit('data', buffer);
+          break;
+        default:
+          if (!this.stream.available(this.len)) {
+            return;
+          }
+          this.stream.advance(this.len);
+      }
+      if (this.type !== 'data') {
+        this.readHeaders = false;
+      }
+    }
+  };
+
+  return WAVEDemuxer;
+
+})(Demuxer);
+
+
+},{"../demuxer":15}],21:[function(_dereq_,module,exports){
+var AudioDevice, EventEmitter,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+AudioDevice = (function(_super) {
+  var devices;
+
+  __extends(AudioDevice, _super);
+
+  function AudioDevice(sampleRate, channels) {
+    this.sampleRate = sampleRate;
+    this.channels = channels;
+    this.updateTime = __bind(this.updateTime, this);
+    this.playing = false;
+    this.currentTime = 0;
+    this._lastTime = 0;
+  }
+
+  AudioDevice.prototype.start = function() {
+    if (this.playing) {
+      return;
+    }
+    this.playing = true;
+    if (this.device == null) {
+      this.device = AudioDevice.create(this.sampleRate, this.channels);
+    }
+    if (!this.device) {
+      throw new Error("No supported audio device found.");
+    }
+    this._lastTime = this.device.getDeviceTime();
+    this._timer = setInterval(this.updateTime, 200);
+    return this.device.on('refill', this.refill = (function(_this) {
+      return function(buffer) {
+        return _this.emit('refill', buffer);
+      };
+    })(this));
+  };
+
+  AudioDevice.prototype.stop = function() {
+    if (!this.playing) {
+      return;
+    }
+    this.playing = false;
+    this.device.off('refill', this.refill);
+    return clearInterval(this._timer);
+  };
+
+  AudioDevice.prototype.destroy = function() {
+    this.stop();
+    return this.device.destroy();
+  };
+
+  AudioDevice.prototype.seek = function(currentTime) {
+    this.currentTime = currentTime;
+    if (this.playing) {
+      this._lastTime = this.device.getDeviceTime();
+    }
+    return this.emit('timeUpdate', this.currentTime);
+  };
+
+  AudioDevice.prototype.updateTime = function() {
+    var time;
+    time = this.device.getDeviceTime();
+    this.currentTime += (time - this._lastTime) / this.device.sampleRate * 1000 | 0;
+    this._lastTime = time;
+    return this.emit('timeUpdate', this.currentTime);
+  };
+
+  devices = [];
+
+  AudioDevice.register = function(device) {
+    return devices.push(device);
+  };
+
+  AudioDevice.create = function(sampleRate, channels) {
+    var device, _i, _len;
+    for (_i = 0, _len = devices.length; _i < _len; _i++) {
+      device = devices[_i];
+      if (device.supported) {
+        return new device(sampleRate, channels);
+      }
+    }
+    return null;
+  };
+
+  return AudioDevice;
+
+})(EventEmitter);
+
+module.exports = AudioDevice;
+
+
+},{"./core/events":9}],22:[function(_dereq_,module,exports){
+var AVBuffer, AudioDevice, EventEmitter, MozillaAudioDevice,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('../core/events');
+
+AudioDevice = _dereq_('../device');
+
+AVBuffer = _dereq_('../core/buffer');
+
+MozillaAudioDevice = (function(_super) {
+  var createTimer, destroyTimer;
+
+  __extends(MozillaAudioDevice, _super);
+
+  AudioDevice.register(MozillaAudioDevice);
+
+  MozillaAudioDevice.supported = (typeof Audio !== "undefined" && Audio !== null) && 'mozWriteAudio' in new Audio;
+
+  function MozillaAudioDevice(sampleRate, channels) {
+    this.sampleRate = sampleRate;
+    this.channels = channels;
+    this.refill = __bind(this.refill, this);
+    this.audio = new Audio;
+    this.audio.mozSetup(this.channels, this.sampleRate);
+    this.writePosition = 0;
+    this.prebufferSize = this.sampleRate / 2;
+    this.tail = null;
+    this.timer = createTimer(this.refill, 100);
+  }
+
+  MozillaAudioDevice.prototype.refill = function() {
+    var available, buffer, currentPosition, written;
+    if (this.tail) {
+      written = this.audio.mozWriteAudio(this.tail);
+      this.writePosition += written;
+      if (this.writePosition < this.tail.length) {
+        this.tail = this.tail.subarray(written);
+      } else {
+        this.tail = null;
+      }
+    }
+    currentPosition = this.audio.mozCurrentSampleOffset();
+    available = currentPosition + this.prebufferSize - this.writePosition;
+    if (available > 0) {
+      buffer = new Float32Array(available);
+      this.emit('refill', buffer);
+      written = this.audio.mozWriteAudio(buffer);
+      if (written < buffer.length) {
+        this.tail = buffer.subarray(written);
+      }
+      this.writePosition += written;
+    }
+  };
+
+  MozillaAudioDevice.prototype.destroy = function() {
+    return destroyTimer(this.timer);
+  };
+
+  MozillaAudioDevice.prototype.getDeviceTime = function() {
+    return this.audio.mozCurrentSampleOffset() / this.channels;
+  };
+
+  createTimer = function(fn, interval) {
+    var url, worker;
+    url = AVBuffer.makeBlobURL("setInterval(function() { postMessage('ping'); }, " + interval + ");");
+    if (url == null) {
+      return setInterval(fn, interval);
+    }
+    worker = new Worker(url);
+    worker.onmessage = fn;
+    worker.url = url;
+    return worker;
+  };
+
+  destroyTimer = function(timer) {
+    if (timer.terminate) {
+      timer.terminate();
+      return URL.revokeObjectURL(timer.url);
+    } else {
+      return clearInterval(timer);
+    }
+  };
+
+  return MozillaAudioDevice;
+
+})(EventEmitter);
+
+
+},{"../core/buffer":7,"../core/events":9,"../device":21}],23:[function(_dereq_,module,exports){
+/*
+ * This resampler is from XAudioJS: https://github.com/grantgalitz/XAudioJS
+ * Planned to be replaced with src.js, eventually: https://github.com/jussi-kalliokoski/src.js
+ */
+
+//JavaScript Audio Resampler (c) 2011 - Grant Galitz
+function Resampler(fromSampleRate, toSampleRate, channels, outputBufferSize, noReturn) {
+	this.fromSampleRate = fromSampleRate;
+	this.toSampleRate = toSampleRate;
+	this.channels = channels | 0;
+	this.outputBufferSize = outputBufferSize;
+	this.noReturn = !!noReturn;
+	this.initialize();
+}
+
+Resampler.prototype.initialize = function () {
+	//Perform some checks:
+	if (this.fromSampleRate > 0 && this.toSampleRate > 0 && this.channels > 0) {
+		if (this.fromSampleRate == this.toSampleRate) {
+			//Setup a resampler bypass:
+			this.resampler = this.bypassResampler;		//Resampler just returns what was passed through.
+			this.ratioWeight = 1;
+		}
+		else {
+			if (this.fromSampleRate < this.toSampleRate) {
+				/*
+					Use generic linear interpolation if upsampling,
+					as linear interpolation produces a gradient that we want
+					and works fine with two input sample points per output in this case.
+				*/
+				this.compileLinearInterpolationFunction();
+				this.lastWeight = 1;
+			}
+			else {
+				/*
+					Custom resampler I wrote that doesn't skip samples
+					like standard linear interpolation in high downsampling.
+					This is more accurate than linear interpolation on downsampling.
+				*/
+				this.compileMultiTapFunction();
+				this.tailExists = false;
+				this.lastWeight = 0;
+			}
+			this.ratioWeight = this.fromSampleRate / this.toSampleRate;
+			this.initializeBuffers();
+		}
+	}
+	else {
+		throw(new Error("Invalid settings specified for the resampler."));
+	}
+};
+
+Resampler.prototype.compileLinearInterpolationFunction = function () {
+	var toCompile = "var bufferLength = buffer.length;\
+	var outLength = this.outputBufferSize;\
+	if ((bufferLength % " + this.channels + ") == 0) {\
+		if (bufferLength > 0) {\
+			var ratioWeight = this.ratioWeight;\
+			var weight = this.lastWeight;\
+			var firstWeight = 0;\
+			var secondWeight = 0;\
+			var sourceOffset = 0;\
+			var outputOffset = 0;\
+			var outputBuffer = this.outputBuffer;\
+			for (; weight < 1; weight += ratioWeight) {\
+				secondWeight = weight % 1;\
+				firstWeight = 1 - secondWeight;";
+	for (var channel = 0; channel < this.channels; ++channel) {
+		toCompile += "outputBuffer[outputOffset++] = (this.lastOutput[" + channel + "] * firstWeight) + (buffer[" + channel + "] * secondWeight);";
+	}
+	toCompile += "}\
+			weight -= 1;\
+			for (bufferLength -= " + this.channels + ", sourceOffset = Math.floor(weight) * " + this.channels + "; outputOffset < outLength && sourceOffset < bufferLength;) {\
+				secondWeight = weight % 1;\
+				firstWeight = 1 - secondWeight;";
+	for (var channel = 0; channel < this.channels; ++channel) {
+		toCompile += "outputBuffer[outputOffset++] = (buffer[sourceOffset" + ((channel > 0) ? (" + " + channel) : "") + "] * firstWeight) + (buffer[sourceOffset + " + (this.channels + channel) + "] * secondWeight);";
+	}
+	toCompile += "weight += ratioWeight;\
+				sourceOffset = Math.floor(weight) * " + this.channels + ";\
+			}";
+	for (var channel = 0; channel < this.channels; ++channel) {
+		toCompile += "this.lastOutput[" + channel + "] = buffer[sourceOffset++];";
+	}
+	toCompile += "this.lastWeight = weight % 1;\
+			return this.bufferSlice(outputOffset);\
+		}\
+		else {\
+			return (this.noReturn) ? 0 : [];\
+		}\
+	}\
+	else {\
+		throw(new Error(\"Buffer was of incorrect sample length.\"));\
+	}";
+	this.resampler = Function("buffer", toCompile);
+};
+
+Resampler.prototype.compileMultiTapFunction = function () {
+	var toCompile = "var bufferLength = buffer.length;\
+	var outLength = this.outputBufferSize;\
+	if ((bufferLength % " + this.channels + ") == 0) {\
+		if (bufferLength > 0) {\
+			var ratioWeight = this.ratioWeight;\
+			var weight = 0;";
+	for (var channel = 0; channel < this.channels; ++channel) {
+		toCompile += "var output" + channel + " = 0;"
+	}
+	toCompile += "var actualPosition = 0;\
+			var amountToNext = 0;\
+			var alreadyProcessedTail = !this.tailExists;\
+			this.tailExists = false;\
+			var outputBuffer = this.outputBuffer;\
+			var outputOffset = 0;\
+			var currentPosition = 0;\
+			do {\
+				if (alreadyProcessedTail) {\
+					weight = ratioWeight;";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "output" + channel + " = 0;"
+	}
+	toCompile += "}\
+				else {\
+					weight = this.lastWeight;";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "output" + channel + " = this.lastOutput[" + channel + "];"
+	}
+	toCompile += "alreadyProcessedTail = true;\
+				}\
+				while (weight > 0 && actualPosition < bufferLength) {\
+					amountToNext = 1 + actualPosition - currentPosition;\
+					if (weight >= amountToNext) {";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "output" + channel + " += buffer[actualPosition++] * amountToNext;"
+	}
+	toCompile += "currentPosition = actualPosition;\
+						weight -= amountToNext;\
+					}\
+					else {";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "output" + channel + " += buffer[actualPosition" + ((channel > 0) ? (" + " + channel) : "") + "] * weight;"
+	}
+	toCompile += "currentPosition += weight;\
+						weight = 0;\
+						break;\
+					}\
+				}\
+				if (weight == 0) {";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "outputBuffer[outputOffset++] = output" + channel + " / ratioWeight;"
+	}
+	toCompile += "}\
+				else {\
+					this.lastWeight = weight;";
+	for (channel = 0; channel < this.channels; ++channel) {
+		toCompile += "this.lastOutput[" + channel + "] = output" + channel + ";"
+	}
+	toCompile += "this.tailExists = true;\
+					break;\
+				}\
+			} while (actualPosition < bufferLength && outputOffset < outLength);\
+			return this.bufferSlice(outputOffset);\
+		}\
+		else {\
+			return (this.noReturn) ? 0 : [];\
+		}\
+	}\
+	else {\
+		throw(new Error(\"Buffer was of incorrect sample length.\"));\
+	}";
+	this.resampler = Function("buffer", toCompile);
+};
+
+Resampler.prototype.bypassResampler = function (buffer) {
+	if (this.noReturn) {
+		//Set the buffer passed as our own, as we don't need to resample it:
+		this.outputBuffer = buffer;
+		return buffer.length;
+	}
+	else {
+		//Just return the buffer passsed:
+		return buffer;
+	}
+};
+
+Resampler.prototype.bufferSlice = function (sliceAmount) {
+	if (this.noReturn) {
+		//If we're going to access the properties directly from this object:
+		return sliceAmount;
+	}
+	else {
+		//Typed array and normal array buffer section referencing:
+		try {
+			return this.outputBuffer.subarray(0, sliceAmount);
+		}
+		catch (error) {
+			try {
+				//Regular array pass:
+				this.outputBuffer.length = sliceAmount;
+				return this.outputBuffer;
+			}
+			catch (error) {
+				//Nightly Firefox 4 used to have the subarray function named as slice:
+				return this.outputBuffer.slice(0, sliceAmount);
+			}
+		}
+	}
+};
+
+Resampler.prototype.initializeBuffers = function () {
+	//Initialize the internal buffer:
+	try {
+		this.outputBuffer = new Float32Array(this.outputBufferSize);
+		this.lastOutput = new Float32Array(this.channels);
+	}
+	catch (error) {
+		this.outputBuffer = [];
+		this.lastOutput = [];
+	}
+};
+
+module.exports = Resampler;
+
+},{}],24:[function(_dereq_,module,exports){
+(function (global){
+var AudioDevice, EventEmitter, Resampler, WebAudioDevice,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('../core/events');
+
+AudioDevice = _dereq_('../device');
+
+Resampler = _dereq_('./resampler');
+
+WebAudioDevice = (function(_super) {
+  var AudioContext, createProcessor, sharedContext;
+
+  __extends(WebAudioDevice, _super);
+
+  AudioDevice.register(WebAudioDevice);
+
+  AudioContext = global.AudioContext || global.webkitAudioContext;
+
+  WebAudioDevice.supported = AudioContext && (typeof AudioContext.prototype[createProcessor = 'createScriptProcessor'] === 'function' || typeof AudioContext.prototype[createProcessor = 'createJavaScriptNode'] === 'function');
+
+  sharedContext = null;
+
+  function WebAudioDevice(sampleRate, channels) {
+    this.sampleRate = sampleRate;
+    this.channels = channels;
+    this.refill = __bind(this.refill, this);
+    this.context = sharedContext != null ? sharedContext : sharedContext = new AudioContext;
+    this.deviceSampleRate = this.context.sampleRate;
+    this.bufferSize = Math.ceil(4096 / (this.deviceSampleRate / this.sampleRate) * this.channels);
+    this.bufferSize += this.bufferSize % this.channels;
+    if (this.deviceSampleRate !== this.sampleRate) {
+      this.resampler = new Resampler(this.sampleRate, this.deviceSampleRate, this.channels, 4096 * this.channels);
+    }
+    this.node = this.context[createProcessor](4096, this.channels, this.channels);
+    this.node.onaudioprocess = this.refill;
+    this.node.connect(this.context.destination);
+  }
+
+  WebAudioDevice.prototype.refill = function(event) {
+    var channelCount, channels, data, i, n, outputBuffer, _i, _j, _k, _ref;
+    outputBuffer = event.outputBuffer;
+    channelCount = outputBuffer.numberOfChannels;
+    channels = new Array(channelCount);
+    for (i = _i = 0; _i < channelCount; i = _i += 1) {
+      channels[i] = outputBuffer.getChannelData(i);
+    }
+    data = new Float32Array(this.bufferSize);
+    this.emit('refill', data);
+    if (this.resampler) {
+      data = this.resampler.resampler(data);
+    }
+    for (i = _j = 0, _ref = outputBuffer.length; _j < _ref; i = _j += 1) {
+      for (n = _k = 0; _k < channelCount; n = _k += 1) {
+        channels[n][i] = data[i * channelCount + n];
+      }
+    }
+  };
+
+  WebAudioDevice.prototype.destroy = function() {
+    return this.node.disconnect(0);
+  };
+
+  WebAudioDevice.prototype.getDeviceTime = function() {
+    return this.context.currentTime * this.sampleRate;
+  };
+
+  return WebAudioDevice;
+
+})(EventEmitter);
+
+
+}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"../core/events":9,"../device":21,"./resampler":23}],25:[function(_dereq_,module,exports){
+var Filter;
+
+Filter = (function() {
+  function Filter(context, key) {
+    if (context && key) {
+      Object.defineProperty(this, 'value', {
+        get: function() {
+          return context[key];
+        }
+      });
+    }
+  }
+
+  Filter.prototype.process = function(buffer) {};
+
+  return Filter;
+
+})();
+
+module.exports = Filter;
+
+
+},{}],26:[function(_dereq_,module,exports){
+var BalanceFilter, Filter,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Filter = _dereq_('../filter');
+
+BalanceFilter = (function(_super) {
+  __extends(BalanceFilter, _super);
+
+  function BalanceFilter() {
+    return BalanceFilter.__super__.constructor.apply(this, arguments);
+  }
+
+  BalanceFilter.prototype.process = function(buffer) {
+    var i, pan, _i, _ref;
+    if (this.value === 0) {
+      return;
+    }
+    pan = Math.max(-50, Math.min(50, this.value));
+    for (i = _i = 0, _ref = buffer.length; _i < _ref; i = _i += 2) {
+      buffer[i] *= Math.min(1, (50 - pan) / 50);
+      buffer[i + 1] *= Math.min(1, (50 + pan) / 50);
+    }
+  };
+
+  return BalanceFilter;
+
+})(Filter);
+
+module.exports = BalanceFilter;
+
+
+},{"../filter":25}],27:[function(_dereq_,module,exports){
+var Filter, VolumeFilter,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Filter = _dereq_('../filter');
+
+VolumeFilter = (function(_super) {
+  __extends(VolumeFilter, _super);
+
+  function VolumeFilter() {
+    return VolumeFilter.__super__.constructor.apply(this, arguments);
+  }
+
+  VolumeFilter.prototype.process = function(buffer) {
+    var i, vol, _i, _ref;
+    if (this.value >= 100) {
+      return;
+    }
+    vol = Math.max(0, Math.min(100, this.value)) / 100;
+    for (i = _i = 0, _ref = buffer.length; _i < _ref; i = _i += 1) {
+      buffer[i] *= vol;
+    }
+  };
+
+  return VolumeFilter;
+
+})(Filter);
+
+module.exports = VolumeFilter;
+
+
+},{"../filter":25}],28:[function(_dereq_,module,exports){
+var Asset, AudioDevice, BalanceFilter, EventEmitter, Player, Queue, VolumeFilter,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+Asset = _dereq_('./asset');
+
+VolumeFilter = _dereq_('./filters/volume');
+
+BalanceFilter = _dereq_('./filters/balance');
+
+Queue = _dereq_('./queue');
+
+AudioDevice = _dereq_('./device');
+
+Player = (function(_super) {
+  __extends(Player, _super);
+
+  function Player(asset) {
+    this.asset = asset;
+    this.startPlaying = __bind(this.startPlaying, this);
+    this.playing = false;
+    this.buffered = 0;
+    this.currentTime = 0;
+    this.duration = 0;
+    this.volume = 100;
+    this.pan = 0;
+    this.metadata = {};
+    this.filters = [new VolumeFilter(this, 'volume'), new BalanceFilter(this, 'pan')];
+    this.asset.on('buffer', (function(_this) {
+      return function(buffered) {
+        _this.buffered = buffered;
+        return _this.emit('buffer', _this.buffered);
+      };
+    })(this));
+    this.asset.on('decodeStart', (function(_this) {
+      return function() {
+        _this.queue = new Queue(_this.asset);
+        return _this.queue.once('ready', _this.startPlaying);
+      };
+    })(this));
+    this.asset.on('format', (function(_this) {
+      return function(format) {
+        _this.format = format;
+        return _this.emit('format', _this.format);
+      };
+    })(this));
+    this.asset.on('metadata', (function(_this) {
+      return function(metadata) {
+        _this.metadata = metadata;
+        return _this.emit('metadata', _this.metadata);
+      };
+    })(this));
+    this.asset.on('duration', (function(_this) {
+      return function(duration) {
+        _this.duration = duration;
+        return _this.emit('duration', _this.duration);
+      };
+    })(this));
+    this.asset.on('error', (function(_this) {
+      return function(error) {
+        return _this.emit('error', error);
+      };
+    })(this));
+  }
+
+  Player.fromURL = function(url) {
+    return new Player(Asset.fromURL(url));
+  };
+
+  Player.fromFile = function(file) {
+    return new Player(Asset.fromFile(file));
+  };
+
+  Player.fromBuffer = function(buffer) {
+    return new Player(Asset.fromBuffer(buffer));
+  };
+
+  Player.prototype.preload = function() {
+    if (!this.asset) {
+      return;
+    }
+    this.startedPreloading = true;
+    return this.asset.start(false);
+  };
+
+  Player.prototype.play = function() {
+    var _ref;
+    if (this.playing) {
+      return;
+    }
+    if (!this.startedPreloading) {
+      this.preload();
+    }
+    this.playing = true;
+    return (_ref = this.device) != null ? _ref.start() : void 0;
+  };
+
+  Player.prototype.pause = function() {
+    var _ref;
+    if (!this.playing) {
+      return;
+    }
+    this.playing = false;
+    return (_ref = this.device) != null ? _ref.stop() : void 0;
+  };
+
+  Player.prototype.togglePlayback = function() {
+    if (this.playing) {
+      return this.pause();
+    } else {
+      return this.play();
+    }
+  };
+
+  Player.prototype.stop = function() {
+    var _ref;
+    this.pause();
+    this.asset.stop();
+    return (_ref = this.device) != null ? _ref.destroy() : void 0;
+  };
+
+  Player.prototype.seek = function(timestamp) {
+    var _ref;
+    if ((_ref = this.device) != null) {
+      _ref.stop();
+    }
+    this.queue.once('ready', (function(_this) {
+      return function() {
+        var _ref1, _ref2;
+        if ((_ref1 = _this.device) != null) {
+          _ref1.seek(_this.currentTime);
+        }
+        if (_this.playing) {
+          return (_ref2 = _this.device) != null ? _ref2.start() : void 0;
+        }
+      };
+    })(this));
+    timestamp = (timestamp / 1000) * this.format.sampleRate;
+    timestamp = this.asset.decoder.seek(timestamp);
+    this.currentTime = timestamp / this.format.sampleRate * 1000 | 0;
+    this.queue.reset();
+    return this.currentTime;
+  };
+
+  Player.prototype.startPlaying = function() {
+    var frame, frameOffset;
+    frame = this.queue.read();
+    frameOffset = 0;
+    this.device = new AudioDevice(this.format.sampleRate, this.format.channelsPerFrame);
+    this.device.on('timeUpdate', (function(_this) {
+      return function(currentTime) {
+        _this.currentTime = currentTime;
+        return _this.emit('progress', _this.currentTime);
+      };
+    })(this));
+    this.refill = (function(_this) {
+      return function(buffer) {
+        var bufferOffset, filter, i, max, _i, _j, _len, _ref;
+        if (!_this.playing) {
+          return;
+        }
+        if (!frame) {
+          frame = _this.queue.read();
+          frameOffset = 0;
+        }
+        bufferOffset = 0;
+        while (frame && bufferOffset < buffer.length) {
+          max = Math.min(frame.length - frameOffset, buffer.length - bufferOffset);
+          for (i = _i = 0; _i < max; i = _i += 1) {
+            buffer[bufferOffset++] = frame[frameOffset++];
+          }
+          if (frameOffset === frame.length) {
+            frame = _this.queue.read();
+            frameOffset = 0;
+          }
+        }
+        _ref = _this.filters;
+        for (_j = 0, _len = _ref.length; _j < _len; _j++) {
+          filter = _ref[_j];
+          filter.process(buffer);
+        }
+        if (!frame) {
+          if (_this.queue.ended) {
+            _this.currentTime = _this.duration;
+            _this.emit('progress', _this.currentTime);
+            _this.emit('end');
+            _this.stop();
+          } else {
+            _this.device.stop();
+          }
+        }
+      };
+    })(this);
+    this.device.on('refill', this.refill);
+    if (this.playing) {
+      this.device.start();
+    }
+    return this.emit('ready');
+  };
+
+  return Player;
+
+})(EventEmitter);
+
+module.exports = Player;
+
+
+},{"./asset":2,"./core/events":9,"./device":21,"./filters/balance":26,"./filters/volume":27,"./queue":29}],29:[function(_dereq_,module,exports){
+var EventEmitter, Queue,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('./core/events');
+
+Queue = (function(_super) {
+  __extends(Queue, _super);
+
+  function Queue(asset) {
+    this.asset = asset;
+    this.write = __bind(this.write, this);
+    this.readyMark = 64;
+    this.finished = false;
+    this.buffering = true;
+    this.ended = false;
+    this.buffers = [];
+    this.asset.on('data', this.write);
+    this.asset.on('end', (function(_this) {
+      return function() {
+        return _this.ended = true;
+      };
+    })(this));
+    this.asset.decodePacket();
+  }
+
+  Queue.prototype.write = function(buffer) {
+    if (buffer) {
+      this.buffers.push(buffer);
+    }
+    if (this.buffering) {
+      if (this.buffers.length >= this.readyMark || this.ended) {
+        this.buffering = false;
+        return this.emit('ready');
+      } else {
+        return this.asset.decodePacket();
+      }
+    }
+  };
+
+  Queue.prototype.read = function() {
+    if (this.buffers.length === 0) {
+      return null;
+    }
+    this.asset.decodePacket();
+    return this.buffers.shift();
+  };
+
+  Queue.prototype.reset = function() {
+    this.buffers.length = 0;
+    this.buffering = true;
+    return this.asset.decodePacket();
+  };
+
+  return Queue;
+
+})(EventEmitter);
+
+module.exports = Queue;
+
+
+},{"./core/events":9}],30:[function(_dereq_,module,exports){
+var AVBuffer, EventEmitter, FileSource,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('../../core/events');
+
+AVBuffer = _dereq_('../../core/buffer');
+
+FileSource = (function(_super) {
+  __extends(FileSource, _super);
+
+  function FileSource(file) {
+    this.file = file;
+    if (typeof FileReader === "undefined" || FileReader === null) {
+      return this.emit('error', 'This browser does not have FileReader support.');
+    }
+    this.offset = 0;
+    this.length = this.file.size;
+    this.chunkSize = 1 << 20;
+    this.file[this.slice = 'slice'] || this.file[this.slice = 'webkitSlice'] || this.file[this.slice = 'mozSlice'];
+  }
+
+  FileSource.prototype.start = function() {
+    if (this.reader) {
+      if (!this.active) {
+        return this.loop();
+      }
+    }
+    this.reader = new FileReader;
+    this.active = true;
+    this.reader.onload = (function(_this) {
+      return function(e) {
+        var buf;
+        buf = new AVBuffer(new Uint8Array(e.target.result));
+        _this.offset += buf.length;
+        _this.emit('data', buf);
+        _this.active = false;
+        if (_this.offset < _this.length) {
+          return _this.loop();
+        }
+      };
+    })(this);
+    this.reader.onloadend = (function(_this) {
+      return function() {
+        if (_this.offset === _this.length) {
+          _this.emit('end');
+          return _this.reader = null;
+        }
+      };
+    })(this);
+    this.reader.onerror = (function(_this) {
+      return function(e) {
+        return _this.emit('error', e);
+      };
+    })(this);
+    this.reader.onprogress = (function(_this) {
+      return function(e) {
+        return _this.emit('progress', (_this.offset + e.loaded) / _this.length * 100);
+      };
+    })(this);
+    return this.loop();
+  };
+
+  FileSource.prototype.loop = function() {
+    var blob, endPos;
+    this.active = true;
+    endPos = Math.min(this.offset + this.chunkSize, this.length);
+    blob = this.file[this.slice](this.offset, endPos);
+    return this.reader.readAsArrayBuffer(blob);
+  };
+
+  FileSource.prototype.pause = function() {
+    var _ref;
+    this.active = false;
+    try {
+      return (_ref = this.reader) != null ? _ref.abort() : void 0;
+    } catch (_error) {}
+  };
+
+  FileSource.prototype.reset = function() {
+    this.pause();
+    return this.offset = 0;
+  };
+
+  return FileSource;
+
+})(EventEmitter);
+
+module.exports = FileSource;
+
+
+},{"../../core/buffer":7,"../../core/events":9}],31:[function(_dereq_,module,exports){
+var AVBuffer, EventEmitter, HTTPSource,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('../../core/events');
+
+AVBuffer = _dereq_('../../core/buffer');
+
+HTTPSource = (function(_super) {
+  __extends(HTTPSource, _super);
+
+  function HTTPSource(url) {
+    this.url = url;
+    this.chunkSize = 1 << 20;
+    this.inflight = false;
+    this.reset();
+  }
+
+  HTTPSource.prototype.start = function() {
+    if (this.length) {
+      if (!this.inflight) {
+        return this.loop();
+      }
+    }
+    this.inflight = true;
+    this.xhr = new XMLHttpRequest();
+    this.xhr.onload = (function(_this) {
+      return function(event) {
+        _this.length = parseInt(_this.xhr.getResponseHeader("Content-Length"));
+        _this.inflight = false;
+        return _this.loop();
+      };
+    })(this);
+    this.xhr.onerror = (function(_this) {
+      return function(err) {
+        _this.pause();
+        return _this.emit('error', err);
+      };
+    })(this);
+    this.xhr.onabort = (function(_this) {
+      return function(event) {
+        return _this.inflight = false;
+      };
+    })(this);
+    this.xhr.open("HEAD", this.url, true);
+    return this.xhr.send(null);
+  };
+
+  HTTPSource.prototype.loop = function() {
+    var endPos;
+    if (this.inflight || !this.length) {
+      return this.emit('error', 'Something is wrong in HTTPSource.loop');
+    }
+    this.inflight = true;
+    this.xhr = new XMLHttpRequest();
+    this.xhr.onload = (function(_this) {
+      return function(event) {
+        var buf, buffer, i, txt, _i, _ref;
+        if (_this.xhr.response) {
+          buf = new Uint8Array(_this.xhr.response);
+        } else {
+          txt = _this.xhr.responseText;
+          buf = new Uint8Array(txt.length);
+          for (i = _i = 0, _ref = txt.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+            buf[i] = txt.charCodeAt(i) & 0xff;
+          }
+        }
+        buffer = new AVBuffer(buf);
+        _this.offset += buffer.length;
+        _this.emit('data', buffer);
+        if (_this.offset >= _this.length) {
+          _this.emit('end');
+        }
+        _this.inflight = false;
+        if (!(_this.offset >= _this.length)) {
+          return _this.loop();
+        }
+      };
+    })(this);
+    this.xhr.onprogress = (function(_this) {
+      return function(event) {
+        return _this.emit('progress', (_this.offset + event.loaded) / _this.length * 100);
+      };
+    })(this);
+    this.xhr.onerror = (function(_this) {
+      return function(err) {
+        _this.emit('error', err);
+        return _this.pause();
+      };
+    })(this);
+    this.xhr.onabort = (function(_this) {
+      return function(event) {
+        return _this.inflight = false;
+      };
+    })(this);
+    this.xhr.open("GET", this.url, true);
+    this.xhr.responseType = "arraybuffer";
+    endPos = Math.min(this.offset + this.chunkSize, this.length);
+    this.xhr.setRequestHeader("Range", "bytes=" + this.offset + "-" + endPos);
+    this.xhr.overrideMimeType('text/plain; charset=x-user-defined');
+    return this.xhr.send(null);
+  };
+
+  HTTPSource.prototype.pause = function() {
+    var _ref;
+    this.inflight = false;
+    return (_ref = this.xhr) != null ? _ref.abort() : void 0;
+  };
+
+  HTTPSource.prototype.reset = function() {
+    this.pause();
+    return this.offset = 0;
+  };
+
+  return HTTPSource;
+
+})(EventEmitter);
+
+module.exports = HTTPSource;
+
+
+},{"../../core/buffer":7,"../../core/events":9}],32:[function(_dereq_,module,exports){
+(function (global){
+var AVBuffer, BufferList, BufferSource, EventEmitter,
+  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+EventEmitter = _dereq_('../core/events');
+
+BufferList = _dereq_('../core/bufferlist');
+
+AVBuffer = _dereq_('../core/buffer');
+
+BufferSource = (function(_super) {
+  var clearImmediate, setImmediate;
+
+  __extends(BufferSource, _super);
+
+  function BufferSource(input) {
+    this.loop = __bind(this.loop, this);
+    if (input instanceof BufferList) {
+      this.list = input;
+    } else {
+      this.list = new BufferList;
+      this.list.append(new AVBuffer(input));
+    }
+    this.paused = true;
+  }
+
+  setImmediate = global.setImmediate || function(fn) {
+    return global.setTimeout(fn, 0);
+  };
+
+  clearImmediate = global.clearImmediate || function(timer) {
+    return global.clearTimeout(timer);
+  };
+
+  BufferSource.prototype.start = function() {
+    this.paused = false;
+    return this._timer = setImmediate(this.loop);
+  };
+
+  BufferSource.prototype.loop = function() {
+    this.emit('progress', (this.list.numBuffers - this.list.availableBuffers + 1) / this.list.numBuffers * 100 | 0);
+    this.emit('data', this.list.first);
+    if (this.list.advance()) {
+      return setImmediate(this.loop);
+    } else {
+      return this.emit('end');
+    }
+  };
+
+  BufferSource.prototype.pause = function() {
+    clearImmediate(this._timer);
+    return this.paused = true;
+  };
+
+  BufferSource.prototype.reset = function() {
+    this.pause();
+    return this.list.rewind();
+  };
+
+  return BufferSource;
+
+})(EventEmitter);
+
+module.exports = BufferSource;
+
+
+}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"../core/buffer":7,"../core/bufferlist":8,"../core/events":9}]},{},[1])
+
+(1)
+});
+
+//# sourceMappingURL=aurora.js.map
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js.map
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js.map	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/aurora.js.map	(revision 33547)
@@ -0,0 +1,77 @@
+{
+  "version": 3,
+  "file": "generated.js",
+  "sources": [
+    "/Users/devongovett/projects/codecs/aurora.js/node_modules/browserify/node_modules/browser-pack/_prelude.js",
+    "/Users/devongovett/projects/codecs/aurora.js/browser.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/asset.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/aurora.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/aurora_base.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/base.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/bitstream.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/buffer.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/bufferlist.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/events.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/stream.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/core/underflow.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/decoder.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/decoders/lpcm.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/decoders/xlaw.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxer.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxers/aiff.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxers/au.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxers/caf.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxers/m4a.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/demuxers/wave.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/device.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/devices/mozilla.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/devices/resampler.js",
+    "/Users/devongovett/projects/codecs/aurora.js/src/devices/webaudio.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/filter.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/filters/balance.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/filters/volume.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/player.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/queue.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/sources/browser/file.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/sources/browser/http.coffee",
+    "/Users/devongovett/projects/codecs/aurora.js/src/sources/buffer.coffee"
+  ],
+  "names": [],
+  "mappings": "AAAA;ACAA,IAAA,cAAA;;AAAA;AAAA,KAAA,WAAA;kBAAA;AACE,EAAA,OAAQ,CAAA,GAAA,CAAR,GAAe,GAAf,CADF;AAAA,CAAA;;AAAA,OAGA,CAAQ,wBAAR,CAHA,CAAA;;AAAA,OAIA,CAAQ,uBAAR,CAJA,CAAA;;;;ACQA,IAAA,2EAAA;EAAA;;iSAAA;;AAAA,YAAA,GAAe,OAAA,CAAQ,eAAR,CAAf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AAC,EAAD,EAAK,QAAL,GAAA;AACV,QAAA,WAAA;AAAA,IAAA,GAAA,GAAM,QAAQ,CAAC,WAAT,CAAsB,mDAAA,GAAkD,QAAlD,GAA4D,IAAlF,CAAN,CAAA;AACA,IAAA,IAAuC,WAAvC;AAAA,aAAO,WAAA,CAAY,EAAZ,EAAgB,QAAhB,CAAP,CAAA;KADA;AAAA,IAGA,MAAA,GAAa,IAAA,MAAA,CAAO,GAAP,CAHb,CAAA;AAAA,IAIA,MAAM,CAAC,SAAP,GAAmB,EAJnB,CAAA;AAAA,IAKA,MAAM,CAAC,GAAP,GAAa,GALb,CAAA;AAOA,WAAO,MAAP,CARU;EAAA,CA/Cd,CAAA;;AAAA,EAyDA,YAAA,GAAe,SAAC,KAAD,GAAA;AACX,IAAA,IAAG,KAAK,CAAC,SAAT;AACI,MAAA,KAAK,CAAC,SAAN,CAAA,CAAA,CAAA;aACA,GAAG,CAAC,eAAJ,CAAoB,KAAK,CAAC,GAA1B,EAFJ;KAAA,MAAA;aAII,aAAA,CAAc,KAAd,EAJJ;KADW;EAAA,CAzDf,CAAA;;4BAAA;;GAD6B,aAJjC,CAAA;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA,IAAA,oDAAA;EAAA;;iSAAA;;AAAA,YAAA,GAAe,OAAA,CAAQ,gBAAR,CAAf,CAAA;;AAAA,WACA,GAAc,OAAA,CAAQ,WAAR,CADd,CAAA;;AAAA,SAEA,GAAY,OAAA,CAAQ,aAAR,CAFZ,CAAA;;AAAA;AAKI,MAAA,4CAAA;;AAAA,mCAAA,CAAA;;AAAA,EAAA,WAAW,CAAC,QAAZ,CAAqB,cAArB,CAAA,CAAA;;AAAA,EAGA,YAAA,GAAe,MAAM,CAAC,YAAP,IAAuB,MAAM,CAAC,kBAH7C,CAAA;;AAAA,EAIA,cAAC,CAAA,SAAD,GAAa,YAAA,IACX,CAAC,MAAA,CAAA,YAAmB,CAAA,SAAG,CAAA,eAAA,GAAkB,uBAAlB,CAAtB,KAAoE,UAApE,IACD,MAAA,CAAA,YAAmB,CAAA,SAAG,CAAA,eAAA,GAAkB,sBAAlB,CAAtB,KAAoE,UADpE,CALF,CAAA;;AAAA,EAUA,aAAA,GAAgB,IAVhB,CAAA;;AAYa,EAAA,wBAAE,UAAF,EAAe,QAAf,G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U,YAAA,CAAa,IAAC,CAAA,IAAd,EAFP;EAAA,CAjBP,CAAA;;AAAA,yBAqBA,IAAA,GAAM,SAAA,GAAA;AACF,IAAA,IAAC,CAAA,IAAD,CAAM,UAAN,EAAkB,CAAC,IAAC,CAAA,IAAI,CAAC,UAAN,GAAmB,IAAC,CAAA,IAAI,CAAC,gBAAzB,GAA4C,CAA7C,CAAA,GAAkD,IAAC,CAAA,IAAI,CAAC,UAAxD,GAAqE,GAArE,GAA2E,CAA7F,CAAA,CAAA;AAAA,IACA,IAAC,CAAA,IAAD,CAAM,MAAN,EAAc,IAAC,CAAA,IAAI,CAAC,KAApB,CADA,CAAA;AAEA,IAAA,IAAG,IAAC,CAAA,IAAI,CAAC,OAAN,CAAA,CAAH;aACI,YAAA,CAAa,IAAC,CAAA,IAAd,EADJ;KAAA,MAAA;aAGI,IAAC,CAAA,IAAD,CAAM,KAAN,EAHJ;KAHE;EAAA,CArBN,CAAA;;AAAA,yBA6BA,KAAA,GAAO,SAAA,GAAA;AACH,IAAA,cAAA,CAAe,IAAC,CAAA,MAAhB,CAAA,CAAA;WACA,IAAC,CAAA,MAAD,GAAU,KAFP;EAAA,CA7BP,CAAA;;AAAA,yBAiCA,KAAA,GAAO,SAAA,GAAA;AACH,IAAA,IAAC,CAAA,KAAD,CAAA,CAAA,CAAA;WACA,IAAC,CAAA,IAAI,CAAC,MAAN,CAAA,EAFG;EAAA,CAjCP,CAAA;;sBAAA;;GADuB,aAJ3B,CAAA;;AAAA,MA0CM,CAAC,OAAP,GAAiB,YA1CjB,CAAA",
+  "sourcesContent": [
+    "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})",
+    "for key, val of require './src/aurora'\n  exports[key] = val\n  \nrequire './src/devices/webaudio'\nrequire './src/devices/mozilla'\n",
+    "#\n# The Asset class is responsible for managing all aspects of the \n# decoding pipeline from source to decoder.  You can use the Asset\n# class to inspect information about an audio file, such as its \n# format, metadata, and duration, as well as actually decode the\n# file to linear PCM raw audio data.\n#\n\nEventEmitter = require './core/events'\nHTTPSource   = require './sources/node/http'\nFileSource   = require './sources/node/file'\nBufferSource = require './sources/buffer'\nDemuxer      = require './demuxer'\nDecoder      = require './decoder'\n\nclass Asset extends EventEmitter\n    constructor: (@source) ->\n        @buffered = 0\n        @duration = null\n        @format = null\n        @metadata = null\n        @active = false\n        @demuxer = null\n        @decoder = null\n                \n        @source.once 'data', @probe\n        @source.on 'error', (err) =>\n            @emit 'error', err\n            @stop()\n            \n        @source.on 'progress', (@buffered) =>\n            @emit 'buffer', @buffered\n            \n    @fromURL: (url) ->\n        return new Asset new HTTPSource(url)\n\n    @fromFile: (file) ->\n        return new Asset new FileSource(file)\n        \n    @fromBuffer: (buffer) ->\n        return new Asset new BufferSource(buffer)\n        \n    start: (decode) ->\n        return if @active\n        \n        @shouldDecode = decode if decode?\n        @shouldDecode ?= true\n        \n        @active = true\n        @source.start()\n        \n        if @decoder and @shouldDecode\n            @_decode()\n        \n    stop: ->\n        return unless @active\n        \n        @active = false\n        @source.pause()\n        \n    get: (event, callback) ->\n        return unless event in ['format', 'duration', 'metadata']\n        \n        if this[event]?\n            callback(this[event])\n        else\n            @once event, (value) =>\n                @stop()\n                callback(value)\n            \n            @start()\n            \n    decodePacket: ->\n        @decoder.decode()\n        \n    decodeToBuffer: (callback) ->\n        length = 0\n        chunks = []\n        @on 'data', dataHandler = (chunk) ->\n            length += chunk.length\n            chunks.push chunk\n            \n        @once 'end', ->\n            buf = new Float32Array(length)\n            offset = 0\n            \n            for chunk in chunks\n                buf.set(chunk, offset)\n                offset += chunk.length\n                \n            @off 'data', dataHandler\n            callback(buf)\n            \n        @start()\n    \n    probe: (chunk) =>\n        return unless @active\n        \n        demuxer = Demuxer.find(chunk)\n        if not demuxer\n            return @emit 'error', 'A demuxer for this container was not found.'\n            \n        @demuxer = new demuxer(@source, chunk)\n        @demuxer.on 'format', @findDecoder\n        \n        @demuxer.on 'duration', (@duration) =>\n            @emit 'duration', @duration\n            \n        @demuxer.on 'metadata', (@metadata) =>\n            @emit 'metadata', @metadata\n            \n        @demuxer.on 'error', (err) =>\n            @emit 'error', err\n            @stop()\n\n    findDecoder: (@format) =>\n        return unless @active\n        \n        @emit 'format', @format\n        \n        decoder = Decoder.find(@format.formatID)\n        if not decoder\n            return @emit 'error', \"A decoder for #{@format.formatID} was not found.\"\n\n        @decoder = new decoder(@demuxer, @format)\n        \n        if @format.floatingPoint\n            @decoder.on 'data', (buffer) =>\n                @emit 'data', buffer\n        else\n            div = Math.pow(2, @format.bitsPerChannel - 1)\n            @decoder.on 'data', (buffer) =>\n                buf = new Float32Array(buffer.length)\n                for sample, i in buffer\n                    buf[i] = sample / div\n                    \n                @emit 'data', buf\n            \n        @decoder.on 'error', (err) =>\n            @emit 'error', err\n            @stop()\n            \n        @decoder.on 'end', =>\n            @emit 'end'\n            \n        @emit 'decodeStart'\n        @_decode() if @shouldDecode\n        \n    _decode: =>\n        continue while @decoder.decode() and @active\n        @decoder.once 'data', @_decode if @active\n        \nmodule.exports = Asset\n",
+    "for key, val of require './aurora_base'\n    exports[key] = val\n\nrequire './demuxers/caf'\nrequire './demuxers/m4a'\nrequire './demuxers/aiff'\nrequire './demuxers/wave'\nrequire './demuxers/au'\n\nrequire './decoders/lpcm'\nrequire './decoders/xlaw'",
+    "exports.Base = require './core/base'\nexports.Buffer = require './core/buffer'\nexports.BufferList = require './core/bufferlist'\nexports.Stream = require './core/stream'\nexports.Bitstream = require './core/bitstream'\nexports.EventEmitter = require './core/events'\nexports.UnderflowError = require './core/underflow'\n\n# browserify will replace these with the browser versions\nexports.HTTPSource = require './sources/node/http'\nexports.FileSource = require './sources/node/file'\nexports.BufferSource = require './sources/buffer'\n\nexports.Demuxer = require './demuxer'\nexports.Decoder = require './decoder'\nexports.AudioDevice = require './device'\nexports.Asset = require './asset'\nexports.Player = require './player'\n\nexports.Filter = require './filter'\nexports.VolumeFilter = require './filters/volume'\nexports.BalanceFilter = require './filters/balance'\n",
+    "#\n# The Base class defines an extend method so that\n# CoffeeScript classes can be extended easily by \n# plain JavaScript. Based on http://ejohn.org/blog/simple-javascript-inheritance/.\n#\n\nclass Base\n    fnTest = /\\b_super\\b/\n    \n    @extend: (prop) ->\n        class Class extends this\n            \n        if typeof prop is 'function'\n            keys = Object.keys Class.prototype\n            prop.call(Class, Class)\n            \n            prop = {}\n            for key, fn of Class.prototype when key not in keys\n                prop[key] = fn\n        \n        _super = Class.__super__\n        \n        for key, fn of prop\n            # test whether the method actually uses _super() and wrap it if so\n            if typeof fn is 'function' and fnTest.test(fn)\n                do (key, fn) ->\n                    Class::[key] = ->\n                        tmp = this._super\n                        this._super = _super[key]\n                        \n                        ret = fn.apply(this, arguments)\n                        this._super = tmp\n                        \n                        return ret\n                        \n            else\n                Class::[key] = fn\n                \n        return Class\n        \nmodule.exports = Base\n",
+    "class Bitstream\n    constructor: (@stream) ->\n        @bitPosition = 0\n\n    copy: ->\n        result = new Bitstream @stream.copy()\n        result.bitPosition = @bitPosition\n        return result\n\n    offset: -> # Should be a property\n        return 8 * @stream.offset + @bitPosition\n\n    available: (bits) ->\n        return @stream.available((bits + 8 - @bitPosition) / 8)\n\n    advance: (bits) ->\n        pos = @bitPosition + bits\n        @stream.advance(pos >> 3)\n        @bitPosition = pos & 7\n        \n    rewind: (bits) ->\n        pos = @bitPosition - bits\n        @stream.rewind(Math.abs(pos >> 3))\n        @bitPosition = pos & 7\n        \n    seek: (offset) ->\n        curOffset = @offset()\n        \n        if offset > curOffset\n            @advance offset - curOffset \n            \n        else if offset < curOffset \n            @rewind curOffset - offset\n\n    align: ->\n        unless @bitPosition is 0\n            @bitPosition = 0\n            @stream.advance(1)\n        \n    read: (bits, signed) ->\n        return 0 if bits is 0\n        \n        mBits = bits + @bitPosition\n        if mBits <= 8\n            a = ((@stream.peekUInt8() << @bitPosition) & 0xff) >>> (8 - bits)\n\n        else if mBits <= 16\n            a = ((@stream.peekUInt16() << @bitPosition) & 0xffff) >>> (16 - bits)\n\n        else if mBits <= 24\n            a = ((@stream.peekUInt24() << @bitPosition) & 0xffffff) >>> (24 - bits)\n\n        else if mBits <= 32\n            a = (@stream.peekUInt32() << @bitPosition) >>> (32 - bits)\n\n        else if mBits <= 40\n            a0 = @stream.peekUInt8(0) * 0x0100000000 # same as a << 32\n            a1 = @stream.peekUInt8(1) << 24 >>> 0\n            a2 = @stream.peekUInt8(2) << 16\n            a3 = @stream.peekUInt8(3) << 8\n            a4 = @stream.peekUInt8(4)\n\n            a = a0 + a1 + a2 + a3 + a4\n            a %= Math.pow(2, 40 - @bitPosition)                        # (a << bitPosition) & 0xffffffffff\n            a = Math.floor(a / Math.pow(2, 40 - @bitPosition - bits))  # a >>> (40 - bits)\n\n        else\n            throw new Error \"Too many bits!\"\n            \n        if signed\n            # if the sign bit is turned on, flip the bits and \n            # add one to convert to a negative value\n            if mBits < 32\n                if a >>> (bits - 1)\n                    a = ((1 << bits >>> 0) - a) * -1\n            else\n                if a / Math.pow(2, bits - 1) | 0\n                    a = (Math.pow(2, bits) - a) * -1\n\n        @advance bits\n        return a\n        \n    peek: (bits, signed) ->\n        return 0 if bits is 0\n        \n        mBits = bits + @bitPosition\n        if mBits <= 8\n            a = ((@stream.peekUInt8() << @bitPosition) & 0xff) >>> (8 - bits)\n\n        else if mBits <= 16\n            a = ((@stream.peekUInt16() << @bitPosition) & 0xffff) >>> (16 - bits)\n\n        else if mBits <= 24\n            a = ((@stream.peekUInt24() << @bitPosition) & 0xffffff) >>> (24 - bits)\n\n        else if mBits <= 32\n            a = (@stream.peekUInt32() << @bitPosition) >>> (32 - bits)\n\n        else if mBits <= 40\n            a0 = @stream.peekUInt8(0) * 0x0100000000 # same as a << 32\n            a1 = @stream.peekUInt8(1) << 24 >>> 0\n            a2 = @stream.peekUInt8(2) << 16\n            a3 = @stream.peekUInt8(3) << 8\n            a4 = @stream.peekUInt8(4)\n\n            a = a0 + a1 + a2 + a3 + a4\n            a %= Math.pow(2, 40 - @bitPosition)                        # (a << bitPosition) & 0xffffffffff\n            a = Math.floor(a / Math.pow(2, 40 - @bitPosition - bits))  # a >>> (40 - bits)\n\n        else\n            throw new Error \"Too many bits!\"\n            \n        if signed\n            # if the sign bit is turned on, flip the bits and \n            # add one to convert to a negative value\n            if mBits < 32\n                if a >>> (bits - 1)\n                    a = ((1 << bits >>> 0) - a) * -1\n            else\n                if a / Math.pow(2, bits - 1) | 0\n                    a = (Math.pow(2, bits) - a) * -1\n\n        return a\n\n    readLSB: (bits, signed) ->\n        return 0 if bits is 0\n        if bits > 40\n            throw new Error \"Too many bits!\"\n\n        mBits = bits + @bitPosition\n        a  = (@stream.peekUInt8(0)) >>> @bitPosition\n        a |= (@stream.peekUInt8(1)) << (8  - @bitPosition) if mBits > 8\n        a |= (@stream.peekUInt8(2)) << (16 - @bitPosition) if mBits > 16\n        a += (@stream.peekUInt8(3)) << (24 - @bitPosition) >>> 0 if mBits > 24            \n        a += (@stream.peekUInt8(4)) * Math.pow(2, 32 - @bitPosition) if mBits > 32\n\n        if mBits >= 32\n            a %= Math.pow(2, bits)\n        else\n            a &= (1 << bits) - 1\n            \n        if signed\n            # if the sign bit is turned on, flip the bits and \n            # add one to convert to a negative value\n            if mBits < 32\n                if a >>> (bits - 1)\n                    a = ((1 << bits >>> 0) - a) * -1\n            else\n                if a / Math.pow(2, bits - 1) | 0\n                    a = (Math.pow(2, bits) - a) * -1\n\n        @advance bits\n        return a\n        \n    peekLSB: (bits, signed) ->\n        return 0 if bits is 0\n        if bits > 40\n            throw new Error \"Too many bits!\"\n\n        mBits = bits + @bitPosition\n        a  = (@stream.peekUInt8(0)) >>> @bitPosition\n        a |= (@stream.peekUInt8(1)) << (8  - @bitPosition) if mBits > 8\n        a |= (@stream.peekUInt8(2)) << (16 - @bitPosition) if mBits > 16\n        a += (@stream.peekUInt8(3)) << (24 - @bitPosition) >>> 0 if mBits > 24            \n        a += (@stream.peekUInt8(4)) * Math.pow(2, 32 - @bitPosition) if mBits > 32\n        \n        if mBits >= 32\n            a %= Math.pow(2, bits)\n        else\n            a &= (1 << bits) - 1\n            \n        if signed\n            # if the sign bit is turned on, flip the bits and \n            # add one to convert to a negative value\n            if mBits < 32\n                if a >>> (bits - 1)\n                    a = ((1 << bits >>> 0) - a) * -1\n            else\n                if a / Math.pow(2, bits - 1) | 0\n                    a = (Math.pow(2, bits) - a) * -1\n\n        return a\n        \nmodule.exports = Bitstream\n",
+    "class AVBuffer\n    constructor: (input) ->\n        if input instanceof Uint8Array                  # Uint8Array\n            @data = input\n            \n        else if input instanceof ArrayBuffer or         # ArrayBuffer\n          Array.isArray(input) or                       # normal JS Array\n          typeof input is 'number' or                   # number (i.e. length)\n          global.Buffer?.isBuffer(input)                # Node Buffer\n            @data = new Uint8Array(input)\n            \n        else if input.buffer instanceof ArrayBuffer     # typed arrays other than Uint8Array\n            @data = new Uint8Array(input.buffer, input.byteOffset, input.length * input.BYTES_PER_ELEMENT)\n            \n        else if input instanceof AVBuffer               # AVBuffer, make a shallow copy\n            @data = input.data\n                        \n        else\n            throw new Error \"Constructing buffer with unknown type.\"\n        \n        @length = @data.length\n        \n        # used when the buffer is part of a bufferlist\n        @next = null\n        @prev = null\n    \n    @allocate: (size) ->\n        return new AVBuffer(size)\n    \n    copy: ->\n        return new AVBuffer(new Uint8Array(@data))\n    \n    slice: (position, length = @length) ->\n        if position is 0 and length >= @length\n            return new AVBuffer(@data)\n        else\n            return new AVBuffer(@data.subarray(position, position + length))\n    \n    # prefix-free\n    BlobBuilder = global.BlobBuilder or global.MozBlobBuilder or global.WebKitBlobBuilder\n    URL = global.URL or global.webkitURL or global.mozURL\n    \n    @makeBlob: (data, type = 'application/octet-stream') ->\n        # try the Blob constructor\n        try \n            return new Blob [data], type: type\n        \n        # use the old BlobBuilder\n        if BlobBuilder?\n            bb = new BlobBuilder\n            bb.append data\n            return bb.getBlob(type)\n            \n        # oops, no blobs supported :(\n        return null\n        \n    @makeBlobURL: (data, type) ->\n        return URL?.createObjectURL @makeBlob(data, type)\n        \n    @revokeBlobURL: (url) ->\n        URL?.revokeObjectURL url\n    \n    toBlob: ->\n        return AVBuffer.makeBlob @data.buffer\n        \n    toBlobURL: ->\n        return AVBuffer.makeBlobURL @data.buffer\n        \nmodule.exports = AVBuffer\n",
+    "class BufferList\n    constructor: ->\n        @first = null\n        @last = null\n        @numBuffers = 0\n        @availableBytes = 0\n        @availableBuffers = 0        \n    \n    copy: ->\n        result = new BufferList\n\n        result.first = @first\n        result.last = @last\n        result.numBuffers = @numBuffers\n        result.availableBytes = @availableBytes\n        result.availableBuffers = @availableBuffers\n        \n        return result\n        \n    append: (buffer) ->\n        buffer.prev = @last\n        @last?.next = buffer\n        @last = buffer\n        @first ?= buffer\n        \n        @availableBytes += buffer.length\n        @availableBuffers++\n        @numBuffers++\n        \n    advance: ->\n        if @first\n            @availableBytes -= @first.length\n            @availableBuffers--\n            @first = @first.next\n            return @first?\n            \n        return false\n        \n    rewind: ->\n        if @first and not @first.prev\n            return false\n        \n        @first = @first?.prev or @last\n        if @first\n            @availableBytes += @first.length\n            @availableBuffers++\n            \n        return @first?\n        \n    reset: ->\n        continue while @rewind()\n        \nmodule.exports = BufferList\n",
+    "Base = require './base'\n\nclass EventEmitter extends Base\n    on: (event, fn) ->\n        @events ?= {}\n        @events[event] ?= []\n        @events[event].push(fn)\n        \n    off: (event, fn) ->\n        return unless @events?[event]\n        index = @events[event].indexOf(fn)\n        @events[event].splice(index, 1) if ~index\n        \n    once: (event, fn) ->\n        @on event, cb = ->\n            @off event, cb\n            fn.apply(this, arguments)\n        \n    emit: (event, args...) ->\n        return unless @events?[event]\n        \n        # shallow clone with .slice() so that removing a handler\n        # while event is firing (as in once) doesn't cause errors\n        for fn in @events[event].slice()\n            fn.apply(this, args)\n            \n        return\n        \nmodule.exports = EventEmitter\n",
+    "BufferList = require './bufferlist'\nAVBuffer = require './buffer'\nUnderflowError = require './underflow'\n\nclass Stream\n    buf = new ArrayBuffer(16)\n    uint8 = new Uint8Array(buf)\n    int8 = new Int8Array(buf)\n    uint16 = new Uint16Array(buf)\n    int16 = new Int16Array(buf)\n    uint32 = new Uint32Array(buf)\n    int32 = new Int32Array(buf)\n    float32 = new Float32Array(buf)\n    float64 = new Float64Array(buf) if Float64Array?\n    \n    # detect the native endianness of the machine\n    # 0x3412 is little endian, 0x1234 is big endian\n    nativeEndian = new Uint16Array(new Uint8Array([0x12, 0x34]).buffer)[0] is 0x3412\n        \n    constructor: (@list) ->\n        @localOffset = 0\n        @offset = 0\n        \n    @fromBuffer: (buffer) ->\n        list = new BufferList\n        list.append(buffer)\n        return new Stream(list)\n    \n    copy: ->\n        result = new Stream(@list.copy())\n        result.localOffset = @localOffset\n        result.offset = @offset\n        return result\n    \n    available: (bytes) ->\n        return bytes <= @list.availableBytes - @localOffset\n        \n    remainingBytes: ->\n        return @list.availableBytes - @localOffset\n    \n    advance: (bytes) ->\n        if not @available bytes\n            throw new UnderflowError()\n        \n        @localOffset += bytes\n        @offset += bytes\n        \n        while @list.first and @localOffset >= @list.first.length\n            @localOffset -= @list.first.length\n            @list.advance()\n        \n        return this\n        \n    rewind: (bytes) ->\n        if bytes > @offset\n            throw new UnderflowError()\n        \n        # if we're at the end of the bufferlist, seek from the end\n        if not @list.first\n            @list.rewind()\n            @localOffset = @list.first.length\n            \n        @localOffset -= bytes\n        @offset -= bytes\n        \n        while @list.first.prev and @localOffset < 0\n            @list.rewind()\n            @localOffset += @list.first.length\n            \n        return this\n        \n    seek: (position) ->\n        if position > @offset\n            @advance position - @offset\n            \n        else if position < @offset\n            @rewind @offset - position\n        \n    readUInt8: ->\n        if not @available(1)\n            throw new UnderflowError()\n        \n        a = @list.first.data[@localOffset]\n        @localOffset += 1\n        @offset += 1\n\n        if @localOffset == @list.first.length\n            @localOffset = 0\n            @list.advance()\n\n        return a\n\n    peekUInt8: (offset = 0) ->\n        if not @available(offset + 1)\n            throw new UnderflowError()\n        \n        offset = @localOffset + offset\n        buffer = @list.first\n\n        while buffer\n            if buffer.length > offset\n                return buffer.data[offset]\n\n            offset -= buffer.length\n            buffer = buffer.next\n\n        return 0\n        \n    read: (bytes, littleEndian = false) ->\n        if littleEndian is nativeEndian\n            for i in [0...bytes] by 1\n                uint8[i] = @readUInt8()\n        else\n            for i in [bytes - 1..0] by -1\n                uint8[i] = @readUInt8()\n        \n        return\n        \n    peek: (bytes, offset, littleEndian = false) ->\n        if littleEndian is nativeEndian\n            for i in [0...bytes] by 1\n                uint8[i] = @peekUInt8(offset + i)\n        else\n            for i in [0...bytes] by 1\n                uint8[bytes - i - 1] = @peekUInt8(offset + i)\n                \n        return\n        \n    readInt8: ->\n        @read(1)\n        return int8[0]\n\n    peekInt8: (offset = 0) ->\n        @peek(1, offset)\n        return int8[0]\n        \n    readUInt16: (littleEndian) ->\n        @read(2, littleEndian)\n        return uint16[0]\n\n    peekUInt16: (offset = 0, littleEndian) ->\n        @peek(2, offset, littleEndian)\n        return uint16[0]\n\n    readInt16: (littleEndian) ->\n        @read(2, littleEndian)\n        return int16[0]\n\n    peekInt16: (offset = 0, littleEndian) ->\n        @peek(2, offset, littleEndian)\n        return int16[0]\n        \n    readUInt24: (littleEndian) ->\n        if littleEndian\n            return @readUInt16(true) + (@readUInt8() << 16)\n        else\n            return (@readUInt16() << 8) + @readUInt8()\n\n    peekUInt24: (offset = 0, littleEndian) ->\n        if littleEndian\n            return @peekUInt16(offset, true) + (@peekUInt8(offset + 2) << 16)\n        else\n            return (@peekUInt16(offset) << 8) + @peekUInt8(offset + 2)\n\n    readInt24: (littleEndian) ->\n        if littleEndian\n            return @readUInt16(true) + (@readInt8() << 16)\n        else\n            return (@readInt16() << 8) + @readUInt8()\n\n    peekInt24: (offset = 0, littleEndian) ->\n        if littleEndian\n            return @peekUInt16(offset, true) + (@peekInt8(offset + 2) << 16)\n        else\n            return (@peekInt16(offset) << 8) + @peekUInt8(offset + 2)\n    \n    readUInt32: (littleEndian) ->\n        @read(4, littleEndian)\n        return uint32[0]\n    \n    peekUInt32: (offset = 0, littleEndian) ->\n        @peek(4, offset, littleEndian)\n        return uint32[0]\n    \n    readInt32: (littleEndian) ->\n        @read(4, littleEndian)\n        return int32[0]\n    \n    peekInt32: (offset = 0, littleEndian) ->\n        @peek(4, offset, littleEndian)\n        return int32[0]\n        \n    readFloat32: (littleEndian) ->\n        @read(4, littleEndian)\n        return float32[0]\n        \n    peekFloat32: (offset = 0, littleEndian) ->\n        @peek(4, offset, littleEndian)\n        return float32[0]\n    \n    readFloat64: (littleEndian) ->\n        @read(8, littleEndian)\n        \n        # use Float64Array if available\n        if float64\n            return float64[0]\n        else\n            return float64Fallback()\n            \n    float64Fallback = ->\n        [low, high] = uint32\n        return 0.0 if not high or high is 0x80000000\n\n        sign = 1 - (high >>> 31) * 2 # +1 or -1\n        exp = (high >>> 20) & 0x7ff\n        frac = high & 0xfffff\n\n        # NaN or Infinity\n        if exp is 0x7ff\n            return NaN if frac\n            return sign * Infinity\n\n        exp -= 1023\n        out = (frac | 0x100000) * Math.pow(2, exp - 20)\n        out += low * Math.pow(2, exp - 52)\n\n        return sign * out\n            \n    peekFloat64: (offset = 0, littleEndian) ->\n        @peek(8, offset, littleEndian)\n        \n        # use Float64Array if available\n        if float64\n            return float64[0]\n        else\n            return float64Fallback()\n        \n    # IEEE 80 bit extended float\n    readFloat80: (littleEndian) ->\n        @read(10, littleEndian)\n        return float80()\n        \n    float80 = ->\n        [high, low] = uint32\n        a0 = uint8[9]\n        a1 = uint8[8]\n        \n        sign = 1 - (a0 >>> 7) * 2 # -1 or +1\n        exp = ((a0 & 0x7F) << 8) | a1\n        \n        if exp is 0 and low is 0 and high is 0\n            return 0\n            \n        if exp is 0x7fff\n            if low is 0 and high is 0\n                return sign * Infinity\n                \n            return NaN\n        \n        exp -= 16383\n        out = low * Math.pow(2, exp - 31)\n        out += high * Math.pow(2, exp - 63)\n        \n        return sign * out\n        \n    peekFloat80: (offset = 0, littleEndian) ->\n        @peek(10, offset, littleEndian)\n        return float80()\n        \n    readBuffer: (length) ->\n        result = AVBuffer.allocate(length)\n        to = result.data\n\n        for i in [0...length] by 1\n            to[i] = @readUInt8()\n\n        return result\n\n    peekBuffer: (offset = 0, length) ->\n        result = AVBuffer.allocate(length)\n        to = result.data\n\n        for i in [0...length] by 1\n            to[i] = @peekUInt8(offset + i)\n\n        return result\n\n    readSingleBuffer: (length) ->\n        result = @list.first.slice(@localOffset, length)\n        @advance(result.length)\n        return result\n\n    peekSingleBuffer: (offset, length) ->\n        result = @list.first.slice(@localOffset + offset, length)\n        return result\n    \n    readString: (length, encoding = 'ascii') ->\n        return decodeString.call this, 0, length, encoding, true\n\n    peekString: (offset = 0, length, encoding = 'ascii') ->\n        return decodeString.call this, offset, length, encoding, false\n\n    decodeString = (offset, length, encoding, advance) ->\n        encoding = encoding.toLowerCase()\n        nullEnd = if length is null then 0 else -1\n\n        length = Infinity if not length?\n        end = offset + length\n        result = ''\n\n        switch encoding\n            when 'ascii', 'latin1'\n                while offset < end and (c = @peekUInt8(offset++)) isnt nullEnd\n                    result += String.fromCharCode(c)\n\n            when 'utf8', 'utf-8'\n                while offset < end and (b1 = @peekUInt8(offset++)) isnt nullEnd\n                    if (b1 & 0x80) is 0\n                        result += String.fromCharCode b1\n\n                    # one continuation (128 to 2047)\n                    else if (b1 & 0xe0) is 0xc0\n                        b2 = @peekUInt8(offset++) & 0x3f\n                        result += String.fromCharCode ((b1 & 0x1f) << 6) | b2\n\n                    # two continuation (2048 to 55295 and 57344 to 65535)\n                    else if (b1 & 0xf0) is 0xe0\n                        b2 = @peekUInt8(offset++) & 0x3f\n                        b3 = @peekUInt8(offset++) & 0x3f\n                        result += String.fromCharCode ((b1 & 0x0f) << 12) | (b2 << 6) | b3\n\n                    # three continuation (65536 to 1114111)\n                    else if (b1 & 0xf8) is 0xf0\n                        b2 = @peekUInt8(offset++) & 0x3f\n                        b3 = @peekUInt8(offset++) & 0x3f\n                        b4 = @peekUInt8(offset++) & 0x3f\n\n                        # split into a surrogate pair\n                        pt = (((b1 & 0x0f) << 18) | (b2 << 12) | (b3 << 6) | b4) - 0x10000\n                        result += String.fromCharCode 0xd800 + (pt >> 10), 0xdc00 + (pt & 0x3ff)\n\n            when 'utf16-be', 'utf16be', 'utf16le', 'utf16-le', 'utf16bom', 'utf16-bom'\n                # find endianness\n                switch encoding\n                    when 'utf16be', 'utf16-be'\n                        littleEndian = false\n\n                    when 'utf16le', 'utf16-le'\n                        littleEndian = true\n\n                    when 'utf16bom', 'utf16-bom'\n                        if length < 2 or (bom = @peekUInt16(offset)) is nullEnd\n                            @advance offset += 2 if advance\n                            return result\n\n                        littleEndian = (bom is 0xfffe)\n                        offset += 2\n\n                while offset < end and (w1 = @peekUInt16(offset, littleEndian)) isnt nullEnd\n                    offset += 2\n\n                    if w1 < 0xd800 or w1 > 0xdfff\n                        result += String.fromCharCode(w1)\n\n                    else\n                        if w1 > 0xdbff\n                            throw new Error \"Invalid utf16 sequence.\"\n\n                        w2 = @peekUInt16(offset, littleEndian)\n                        if w2 < 0xdc00 or w2 > 0xdfff\n                            throw new Error \"Invalid utf16 sequence.\"\n\n                        result += String.fromCharCode(w1, w2)\n                        offset += 2\n\n                if w1 is nullEnd\n                    offset += 2\n\n            else\n                throw new Error \"Unknown encoding: #{encoding}\"\n\n        @advance offset if advance\n        return result\n        \nmodule.exports = Stream\n",
+    "# define an error class to be thrown if an underflow occurs\nclass UnderflowError extends Error\n    constructor: ->\n        super\n        @name = 'UnderflowError'\n        @stack = new Error().stack\n\nmodule.exports = UnderflowError\n",
+    "EventEmitter = require './core/events'\nBufferList = require './core/bufferlist'\nStream = require './core/stream'\nBitstream = require './core/bitstream'\nUnderflowError = require './core/underflow'\n\nclass Decoder extends EventEmitter\n    constructor: (@demuxer, @format) ->\n        list = new BufferList\n        @stream = new Stream(list)\n        @bitstream = new Bitstream(@stream)\n        \n        @receivedFinalBuffer = false\n        @waiting = false\n        \n        @demuxer.on 'cookie', (cookie) =>\n            try\n                @setCookie cookie\n            catch error\n                @emit 'error', error\n            \n        @demuxer.on 'data', (chunk) =>\n            list.append chunk\n            @decode() if @waiting\n            \n        @demuxer.on 'end', =>\n            @receivedFinalBuffer = true\n            @decode() if @waiting\n            \n        @init()\n            \n    init: ->\n        return\n            \n    setCookie: (cookie) ->\n        return\n    \n    readChunk: ->\n        return\n        \n    decode: ->\n        @waiting = false\n        offset = @bitstream.offset()\n        \n        try\n            packet = @readChunk()\n        catch error\n            if error not instanceof UnderflowError\n                @emit 'error', error\n                return false\n            \n        # if a packet was successfully read, emit it\n        if packet\n            @emit 'data', packet\n            return true\n            \n        # if we haven't reached the end, jump back and try again when we have more data\n        else if not @receivedFinalBuffer\n            @bitstream.seek offset\n            @waiting = true\n            \n        # otherwise we've reached the end\n        else\n            @emit 'end'\n            \n        return false\n        \n    seek: (timestamp) ->\n        # use the demuxer to get a seek point\n        seekPoint = @demuxer.seek(timestamp)\n        @stream.seek(seekPoint.offset)\n        return seekPoint.timestamp\n    \n    codecs = {}\n    @register: (id, decoder) ->\n        codecs[id] = decoder\n        \n    @find: (id) ->\n        return codecs[id] or null\n        \nmodule.exports = Decoder\n",
+    "Decoder = require '../decoder'\n\nclass LPCMDecoder extends Decoder\n    Decoder.register('lpcm', LPCMDecoder)\n    \n    readChunk: =>\n        stream = @stream\n        littleEndian = @format.littleEndian\n        chunkSize = Math.min(4096, stream.remainingBytes())\n        samples = chunkSize / (@format.bitsPerChannel / 8) | 0\n        \n        if chunkSize < @format.bitsPerChannel / 8\n            return null\n        \n        if @format.floatingPoint\n            switch @format.bitsPerChannel\n                when 32\n                    output = new Float32Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readFloat32(littleEndian)\n                        \n                when 64\n                    output = new Float64Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readFloat64(littleEndian)\n                        \n                else\n                    throw new Error 'Unsupported bit depth.'\n            \n        else\n            switch @format.bitsPerChannel\n                when 8\n                    output = new Int8Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readInt8()\n                \n                when 16\n                    output = new Int16Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readInt16(littleEndian)\n                    \n                when 24\n                    output = new Int32Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readInt24(littleEndian)\n                \n                when 32\n                    output = new Int32Array(samples)\n                    for i in [0...samples] by 1\n                        output[i] = stream.readInt32(littleEndian)\n                    \n                else\n                    throw new Error 'Unsupported bit depth.'\n        \n        return output",
+    "Decoder = require '../decoder'\n\nclass XLAWDecoder extends Decoder\n    Decoder.register('ulaw', XLAWDecoder)\n    Decoder.register('alaw', XLAWDecoder)\n    \n    SIGN_BIT   = 0x80\n    QUANT_MASK = 0xf\n    SEG_SHIFT  = 4\n    SEG_MASK   = 0x70\n    BIAS       = 0x84\n    \n    init: ->\n        @format.bitsPerChannel = 16\n        @table = table = new Int16Array(256)\n        \n        if @format.formatID is 'ulaw'\n            for i in [0...256]\n                # Complement to obtain normal u-law value.\n                val = ~i\n            \n                # Extract and bias the quantization bits. Then\n                # shift up by the segment number and subtract out the bias.\n                t = ((val & QUANT_MASK) << 3) + BIAS\n                t <<= (val & SEG_MASK) >>> SEG_SHIFT\n            \n                table[i] = if val & SIGN_BIT then BIAS - t else t - BIAS\n                                \n        else\n            for i in [0...256]\n                val = i ^ 0x55\n                t = val & QUANT_MASK\n                seg = (val & SEG_MASK) >>> SEG_SHIFT\n                \n                if seg\n                    t = (t + t + 1 + 32) << (seg + 2)\n                else\n                    t = (t + t + 1) << 3\n                    \n                table[i] = if val & SIGN_BIT then t else -t\n                \n        return\n            \n    readChunk: =>\n        {stream, table} = this\n        \n        samples = Math.min(4096, @stream.remainingBytes())\n        return if samples is 0\n        \n        output = new Int16Array(samples)\n        for i in [0...samples] by 1\n            output[i] = table[stream.readUInt8()]\n            \n        return output",
+    "EventEmitter = require './core/events'\nBufferList = require './core/bufferlist'\nStream = require './core/stream'\n\nclass Demuxer extends EventEmitter\n    @probe: (buffer) ->\n        return false\n    \n    constructor: (source, chunk) ->\n        list = new BufferList\n        list.append chunk\n        @stream = new Stream(list)\n        \n        received = false\n        source.on 'data', (chunk) =>\n            received = true\n            list.append chunk\n            @readChunk chunk\n            \n        source.on 'error', (err) =>\n            @emit 'error', err\n            \n        source.on 'end', =>\n            # if there was only one chunk received, read it\n            @readChunk chunk unless received\n            @emit 'end'\n        \n        @seekPoints = []\n        @init()\n            \n    init: ->\n        return\n            \n    readChunk: (chunk) ->\n        return\n        \n    addSeekPoint: (offset, timestamp) ->\n        index = @searchTimestamp timestamp\n        @seekPoints.splice index, 0, \n            offset: offset\n            timestamp: timestamp\n        \n    searchTimestamp: (timestamp, backward) ->\n        low = 0\n        high = @seekPoints.length\n        \n        # optimize appending entries\n        if high > 0 and @seekPoints[high - 1].timestamp < timestamp\n            return high\n        \n        while low < high\n            mid = (low + high) >> 1\n            time = @seekPoints[mid].timestamp\n            \n            if time < timestamp\n                low = mid + 1\n                \n            else if time >= timestamp\n                high = mid\n                \n        if high > @seekPoints.length\n            high = @seekPoints.length\n            \n        return high\n        \n    seek: (timestamp) ->\n        if @format and @format.framesPerPacket > 0 and @format.bytesPerPacket > 0\n            seekPoint =\n                timestamp: timestamp\n                offset: @format.bytesPerPacket * timestamp / @format.framesPerPacket\n                \n            return seekPoint\n        else\n            index = @searchTimestamp timestamp\n            return @seekPoints[index]\n        \n    formats = []\n    @register: (demuxer) ->\n        formats.push demuxer\n            \n    @find: (buffer) ->\n        stream = Stream.fromBuffer(buffer)        \n        for format in formats\n            offset = stream.offset\n            try\n                 return format if format.probe(stream)\n            catch e\n                # an underflow or other error occurred\n                \n            stream.seek(offset)\n            \n        return null\n        \nmodule.exports = Demuxer\n",
+    "Demuxer = require '../demuxer'\n\nclass AIFFDemuxer extends Demuxer\n    Demuxer.register(AIFFDemuxer)\n    \n    @probe: (buffer) ->\n        return buffer.peekString(0, 4) is 'FORM' && \n               buffer.peekString(8, 4) in ['AIFF', 'AIFC']\n        \n    readChunk: ->\n        if not @readStart and @stream.available(12)\n            if @stream.readString(4) isnt 'FORM'\n                return @emit 'error', 'Invalid AIFF.'\n                \n            @fileSize = @stream.readUInt32()\n            @fileType = @stream.readString(4)\n            @readStart = true\n            \n            if @fileType not in ['AIFF', 'AIFC']\n                return @emit 'error', 'Invalid AIFF.'\n        \n        while @stream.available(1)\n            if not @readHeaders and @stream.available(8)\n                @type = @stream.readString(4)\n                @len = @stream.readUInt32()\n                \n            switch @type\n                when 'COMM'\n                    return unless @stream.available(@len)\n                    \n                    @format =\n                        formatID: 'lpcm'\n                        channelsPerFrame: @stream.readUInt16()\n                        sampleCount: @stream.readUInt32()\n                        bitsPerChannel: @stream.readUInt16()\n                        sampleRate: @stream.readFloat80()\n                        framesPerPacket: 1\n                        littleEndian: false\n                        floatingPoint: false\n                        \n                    @format.bytesPerPacket = (@format.bitsPerChannel / 8) * @format.channelsPerFrame\n                    \n                    if @fileType is 'AIFC'\n                        format = @stream.readString(4)\n                        \n                        @format.littleEndian = format is 'sowt' and @format.bitsPerChannel > 8\n                        @format.floatingPoint = format in ['fl32', 'fl64']\n                        \n                        format = 'lpcm' if format in ['twos', 'sowt', 'fl32', 'fl64', 'NONE']\n                        @format.formatID = format\n                        @len -= 4\n                        \n                    @stream.advance(@len - 18)\n                    @emit 'format', @format\n                    @emit 'duration', @format.sampleCount / @format.sampleRate * 1000 | 0\n                    \n                when 'SSND'\n                    unless @readSSNDHeader and @stream.available(4)\n                        offset = @stream.readUInt32()\n                        @stream.advance(4) # skip block size\n                        @stream.advance(offset) # skip to data\n                        @readSSNDHeader = true\n                        \n                    buffer = @stream.readSingleBuffer(@len)\n                    @len -= buffer.length\n                    @readHeaders = @len > 0\n                    @emit 'data', buffer\n                    \n                else\n                    return unless @stream.available(@len)\n                    @stream.advance(@len)\n                        \n            @readHeaders = false unless @type is 'SSND'\n            \n        return",
+    "Demuxer = require '../demuxer'\n\nclass AUDemuxer extends Demuxer\n    Demuxer.register(AUDemuxer)\n    \n    @probe: (buffer) ->\n        return buffer.peekString(0, 4) is '.snd'\n        \n    bps = [8, 8, 16, 24, 32, 32, 64]\n    bps[26] = 8\n    \n    formats = \n        1: 'ulaw'\n        27: 'alaw'\n        \n    readChunk: ->\n        if not @readHeader and @stream.available(24)\n            if @stream.readString(4) isnt '.snd'\n                return @emit 'error', 'Invalid AU file.'\n                \n            size = @stream.readUInt32()\n            dataSize = @stream.readUInt32()\n            encoding = @stream.readUInt32()\n            \n            @format = \n                formatID: formats[encoding] or 'lpcm'\n                littleEndian: false\n                floatingPoint: encoding in [6, 7]\n                bitsPerChannel: bps[encoding - 1]\n                sampleRate: @stream.readUInt32()\n                channelsPerFrame: @stream.readUInt32()\n                framesPerPacket: 1\n            \n            if not @format.bitsPerChannel?\n                return @emit 'error', 'Unsupported encoding in AU file.'\n            \n            @format.bytesPerPacket = (@format.bitsPerChannel / 8) * @format.channelsPerFrame\n            \n            if dataSize isnt 0xffffffff\n                bytes = @format.bitsPerChannel / 8\n                @emit 'duration', dataSize / bytes / @format.channelsPerFrame / @format.sampleRate * 1000 | 0\n            \n            @emit 'format', @format\n            @readHeader = true\n            \n        if @readHeader\n            while @stream.available(1)\n                @emit 'data', @stream.readSingleBuffer(@stream.remainingBytes())\n                \n        return",
+    "Demuxer = require '../demuxer'\nM4ADemuxer = require './m4a'\n\nclass CAFDemuxer extends Demuxer\n    Demuxer.register(CAFDemuxer)\n    \n    @probe: (buffer) ->\n        return buffer.peekString(0, 4) is 'caff'\n        \n    readChunk: ->\n        if not @format and @stream.available(64) # Number out of my behind\n            if @stream.readString(4) isnt 'caff'\n                return @emit 'error', \"Invalid CAF, does not begin with 'caff'\"\n                \n            # skip version and flags\n            @stream.advance(4)\n            \n            if @stream.readString(4) isnt 'desc'\n                return @emit 'error', \"Invalid CAF, 'caff' is not followed by 'desc'\"\n                \n            unless @stream.readUInt32() is 0 and @stream.readUInt32() is 32\n                return @emit 'error', \"Invalid 'desc' size, should be 32\"\n                \n            @format = {}\n            @format.sampleRate = @stream.readFloat64()\n            @format.formatID = @stream.readString(4)\n            \n            flags = @stream.readUInt32()\n            if @format.formatID is 'lpcm'\n                @format.floatingPoint = Boolean(flags & 1)\n                @format.littleEndian = Boolean(flags & 2)\n             \n            @format.bytesPerPacket = @stream.readUInt32()\n            @format.framesPerPacket = @stream.readUInt32()\n            @format.channelsPerFrame = @stream.readUInt32()\n            @format.bitsPerChannel = @stream.readUInt32()\n                \n            @emit 'format', @format\n            \n        while @stream.available(1)\n            unless @headerCache\n                @headerCache =\n                    type: @stream.readString(4)\n                    oversize: @stream.readUInt32() isnt 0\n                    size: @stream.readUInt32()\n                \n                if @headerCache.oversize\n                    return @emit 'error', \"Holy Shit, an oversized file, not supported in JS\"\n            \n            switch @headerCache.type\n                when 'kuki'\n                    if @stream.available(@headerCache.size)\n                        if @format.formatID is 'aac ' # variations needed?\n                            offset = @stream.offset + @headerCache.size\n                            if cookie = M4ADemuxer.readEsds(@stream)\n                                @emit 'cookie', cookie\n                                \n                            @stream.seek offset # skip extra garbage\n                    \n                        else\n                            buffer = @stream.readBuffer(@headerCache.size)\n                            @emit 'cookie', buffer\n                        \n                        @headerCache = null\n                        \n                when 'pakt'\n                    if @stream.available(@headerCache.size)\n                        if @stream.readUInt32() isnt 0\n                            return @emit 'error', 'Sizes greater than 32 bits are not supported.'\n                            \n                        @numPackets = @stream.readUInt32()\n                        \n                        if @stream.readUInt32() isnt 0\n                            return @emit 'error', 'Sizes greater than 32 bits are not supported.'\n                            \n                        @numFrames = @stream.readUInt32()\n                        @primingFrames = @stream.readUInt32()\n                        @remainderFrames = @stream.readUInt32()\n                        \n                        @emit 'duration', @numFrames / @format.sampleRate * 1000 | 0\n                        @sentDuration = true\n                        \n                        byteOffset = 0\n                        sampleOffset = 0\n                        for i in [0...@numPackets] by 1\n                            @addSeekPoint byteOffset, sampleOffset\n                            byteOffset += @format.bytesPerPacket or M4ADemuxer.readDescrLen(@stream)\n                            sampleOffset += @format.framesPerPacket or M4ADemuxer.readDescrLen(@stream)\n                        \n                        @headerCache = null\n                        \n                when 'info'\n                    entries = @stream.readUInt32()\n                    metadata = {}\n                    \n                    for i in [0...entries]\n                        # null terminated strings\n                        key = @stream.readString(null)\n                        value = @stream.readString(null)                        \n                        metadata[key] = value\n                    \n                    @emit 'metadata', metadata\n                    @headerCache = null\n                    \n                when 'data'\n                    unless @sentFirstDataChunk\n                        # skip edit count\n                        @stream.advance(4)\n                        @headerCache.size -= 4\n\n                        # calculate the duration based on bytes per packet if no packet table\n                        if @format.bytesPerPacket isnt 0 and not @sentDuration\n                            @numFrames = @headerCache.size / @format.bytesPerPacket\n                            @emit 'duration', @numFrames / @format.sampleRate * 1000 | 0\n                            \n                        @sentFirstDataChunk = true\n                \n                    buffer = @stream.readSingleBuffer(@headerCache.size)\n                    @headerCache.size -= buffer.length\n                    @emit 'data', buffer\n                    \n                    if @headerCache.size <= 0\n                        @headerCache = null\n                    \n                else\n                    if @stream.available(@headerCache.size)\n                        @stream.advance(@headerCache.size)\n                        @headerCache = null\n                        \n        return",
+    "Demuxer = require '../demuxer'\n\nclass M4ADemuxer extends Demuxer\n    Demuxer.register(M4ADemuxer)\n    \n    # common file type identifiers\n    # see http://mp4ra.org/filetype.html for a complete list\n    TYPES = ['M4A ', 'M4P ', 'M4B ', 'M4V ', 'isom', 'mp42', 'qt  ']\n    \n    @probe: (buffer) ->\n        return buffer.peekString(4, 4) is 'ftyp' and\n               buffer.peekString(8, 4) in TYPES\n        \n    init: ->\n        # current atom heirarchy stacks\n        @atoms = []\n        @offsets = []\n        \n        # m4a files can have multiple tracks\n        @track = null\n        @tracks = []\n        \n    # lookup table for atom handlers\n    atoms = {}\n    \n    # lookup table of container atom names\n    containers = {}\n    \n    # declare a function to be used for parsing a given atom name\n    atom = (name, fn) ->        \n        c = []\n        for container in name.split('.').slice(0, -1)\n            c.push container\n            containers[c.join('.')] = true\n            \n        atoms[name] ?= {}\n        atoms[name].fn = fn\n        \n    # declare a function to be called after parsing of an atom and all sub-atoms has completed\n    after = (name, fn) ->\n        atoms[name] ?= {}\n        atoms[name].after = fn\n        \n    readChunk: ->\n        @break = false\n        \n        while @stream.available(1) and not @break\n            # if we're ready to read a new atom, add it to the stack\n            if not @readHeaders\n                return unless @stream.available(8)\n                \n                @len = @stream.readUInt32() - 8\n                @type = @stream.readString(4)\n                \n                continue if @len is 0\n                \n                @atoms.push @type\n                @offsets.push @stream.offset + @len\n                @readHeaders = true\n                \n            # find a handler for the current atom heirarchy\n            path = @atoms.join '.'                \n            handler = atoms[path]\n            \n            if handler?.fn\n                # wait until we have enough data, unless this is the mdat atom\n                return unless @stream.available(@len) or path is 'mdat'\n\n                # call the parser for the atom type\n                handler.fn.call(this)\n                \n                # check if this atom can contain sub-atoms\n                if path of containers\n                    @readHeaders = false\n                    \n            # handle container atoms\n            else if path of containers\n                @readHeaders = false\n                \n            # unknown atom\n            else\n                # wait until we have enough data\n                return unless @stream.available(@len)\n                @stream.advance(@len)\n                \n            # pop completed items from the stack\n            while @stream.offset >= @offsets[@offsets.length - 1]\n                # call after handler\n                handler = atoms[@atoms.join '.']\n                if handler?.after\n                    handler.after.call(this)\n                \n                type = @atoms.pop()\n                @offsets.pop()\n                @readHeaders = false\n                \n    atom 'ftyp', ->\n        if @stream.readString(4) not in TYPES\n            return @emit 'error', 'Not a valid M4A file.'\n        \n        @stream.advance(@len - 4)\n    \n    atom 'moov.trak', ->\n        @track = {}\n        @tracks.push @track\n        \n    atom 'moov.trak.tkhd', ->\n        @stream.advance(4) # version and flags\n        \n        @stream.advance(8) # creation and modification time\n        @track.id = @stream.readUInt32()\n        \n        @stream.advance(@len - 16)\n        \n    atom 'moov.trak.mdia.hdlr', ->\n        @stream.advance(4) # version and flags\n        \n        @stream.advance(4) # component type\n        @track.type = @stream.readString(4)\n        \n        @stream.advance(12) # component manufacturer, flags, and mask\n        @stream.advance(@len - 24) # component name\n    \n    atom 'moov.trak.mdia.mdhd', ->\n        @stream.advance(4) # version and flags\n        @stream.advance(8) # creation and modification dates\n        \n        @track.timeScale = @stream.readUInt32()\n        @track.duration = @stream.readUInt32()\n        \n        @stream.advance(4) # language and quality\n        \n    # corrections to bits per channel, base on formatID\n    # (ffmpeg appears to always encode the bitsPerChannel as 16)\n    BITS_PER_CHANNEL = \n        ulaw: 8\n        alaw: 8\n        in24: 24\n        in32: 32\n        fl32: 32\n        fl64: 64\n        \n    atom 'moov.trak.mdia.minf.stbl.stsd', ->\n        @stream.advance(4) # version and flags\n        \n        numEntries = @stream.readUInt32()\n        \n        # just ignore the rest of the atom if this isn't an audio track\n        if @track.type isnt 'soun'\n            return @stream.advance(@len - 8)\n        \n        if numEntries isnt 1\n            return @emit 'error', \"Only expecting one entry in sample description atom!\"\n            \n        @stream.advance(4) # size\n        \n        format = @track.format = {}\n        format.formatID = @stream.readString(4)\n        \n        @stream.advance(6) # reserved\n        @stream.advance(2) # data reference index\n        \n        version = @stream.readUInt16()\n        @stream.advance(6) # skip revision level and vendor\n        \n        format.channelsPerFrame = @stream.readUInt16()\n        format.bitsPerChannel = @stream.readUInt16()\n        \n        @stream.advance(4) # skip compression id and packet size\n        \n        format.sampleRate = @stream.readUInt16()\n        @stream.advance(2)\n        \n        if version is 1\n            format.framesPerPacket = @stream.readUInt32()\n            @stream.advance(4) # bytes per packet\n            format.bytesPerFrame = @stream.readUInt32()\n            @stream.advance(4) # bytes per sample\n            \n        else if version isnt 0\n            @emit 'error', 'Unknown version in stsd atom'\n            \n        if BITS_PER_CHANNEL[format.formatID]?\n            format.bitsPerChannel = BITS_PER_CHANNEL[format.formatID]\n            \n        format.floatingPoint = format.formatID in ['fl32', 'fl64']\n        format.littleEndian = format.formatID is 'sowt' and format.bitsPerChannel > 8\n        \n        if format.formatID in ['twos', 'sowt', 'in24', 'in32', 'fl32', 'fl64', 'raw ', 'NONE']\n            format.formatID = 'lpcm'\n        \n    atom 'moov.trak.mdia.minf.stbl.stsd.alac', ->\n        @stream.advance(4)\n        @track.cookie = @stream.readBuffer(@len - 4)\n        \n    atom 'moov.trak.mdia.minf.stbl.stsd.esds', ->\n        offset = @stream.offset + @len\n        @track.cookie = M4ADemuxer.readEsds @stream\n        @stream.seek offset # skip garbage at the end \n        \n    atom 'moov.trak.mdia.minf.stbl.stsd.wave.enda', ->\n        @track.format.littleEndian = !!@stream.readUInt16()\n        \n    # reads a variable length integer\n    @readDescrLen: (stream) ->\n        len = 0\n        count = 4\n\n        while count--\n            c = stream.readUInt8()\n            len = (len << 7) | (c & 0x7f)\n            break unless c & 0x80\n\n        return len\n        \n    @readEsds: (stream) ->\n        stream.advance(4) # version and flags\n        \n        tag = stream.readUInt8()\n        len = M4ADemuxer.readDescrLen(stream)\n\n        if tag is 0x03 # MP4ESDescrTag\n            stream.advance(2) # id\n            flags = stream.readUInt8()\n\n            if flags & 0x80 # streamDependenceFlag\n                stream.advance(2)\n\n            if flags & 0x40 # URL_Flag\n                stream.advance stream.readUInt8()\n\n            if flags & 0x20 # OCRstreamFlag\n                stream.advance(2)\n\n        else\n            stream.advance(2) # id\n\n        tag = stream.readUInt8()\n        len = M4ADemuxer.readDescrLen(stream)\n            \n        if tag is 0x04 # MP4DecConfigDescrTag\n            codec_id = stream.readUInt8() # might want this... (isom.c:35)\n            stream.advance(1) # stream type\n            stream.advance(3) # buffer size\n            stream.advance(4) # max bitrate\n            stream.advance(4) # avg bitrate\n\n            tag = stream.readUInt8()\n            len = M4ADemuxer.readDescrLen(stream)\n            \n            if tag is 0x05 # MP4DecSpecificDescrTag\n                return stream.readBuffer(len)\n        \n        return null\n        \n    # time to sample\n    atom 'moov.trak.mdia.minf.stbl.stts', ->\n        @stream.advance(4) # version and flags\n        \n        entries = @stream.readUInt32()\n        @track.stts = []\n        for i in [0...entries] by 1\n            @track.stts[i] =\n                count: @stream.readUInt32()\n                duration: @stream.readUInt32()\n                \n        @setupSeekPoints()\n    \n    # sample to chunk\n    atom 'moov.trak.mdia.minf.stbl.stsc', ->\n        @stream.advance(4) # version and flags\n        \n        entries = @stream.readUInt32()\n        @track.stsc = []\n        for i in [0...entries] by 1\n            @track.stsc[i] = \n                first: @stream.readUInt32()\n                count: @stream.readUInt32()\n                id: @stream.readUInt32()\n                \n        @setupSeekPoints()\n        \n    # sample size\n    atom 'moov.trak.mdia.minf.stbl.stsz', ->\n        @stream.advance(4) # version and flags\n        \n        @track.sampleSize = @stream.readUInt32()\n        entries = @stream.readUInt32()\n        \n        if @track.sampleSize is 0 and entries > 0\n            @track.sampleSizes = []\n            for i in [0...entries] by 1\n                @track.sampleSizes[i] = @stream.readUInt32()\n                \n        @setupSeekPoints()\n    \n    # chunk offsets\n    atom 'moov.trak.mdia.minf.stbl.stco', -> # TODO: co64\n        @stream.advance(4) # version and flags\n        \n        entries = @stream.readUInt32()\n        @track.chunkOffsets = []\n        for i in [0...entries] by 1\n            @track.chunkOffsets[i] = @stream.readUInt32()\n            \n        @setupSeekPoints()\n        \n    # chapter track reference\n    atom 'moov.trak.tref.chap', ->\n        entries = @len >> 2\n        @track.chapterTracks = []\n        for i in [0...entries] by 1\n            @track.chapterTracks[i] = @stream.readUInt32()\n            \n        return\n        \n    # once we have all the information we need, generate the seek table for this track\n    setupSeekPoints: ->\n        return unless @track.chunkOffsets? and @track.stsc? and @track.sampleSize? and @track.stts?\n        \n        stscIndex = 0\n        sttsIndex = 0\n        sttsIndex = 0\n        sttsSample = 0\n        sampleIndex = 0\n        \n        offset = 0\n        timestamp = 0\n        @track.seekPoints = []\n        \n        for position, i in @track.chunkOffsets\n            for j in [0...@track.stsc[stscIndex].count] by 1\n                # push the timestamp and both the physical position in the file\n                # and the offset without gaps from the start of the data\n                @track.seekPoints.push\n                    offset: offset\n                    position: position\n                    timestamp: timestamp\n                \n                size = @track.sampleSize or @track.sampleSizes[sampleIndex++]\n                offset += size\n                position += size\n                timestamp += @track.stts[sttsIndex].duration\n                \n                if sttsIndex + 1 < @track.stts.length and ++sttsSample is @track.stts[sttsIndex].count\n                    sttsSample = 0\n                    sttsIndex++\n                    \n            if stscIndex + 1 < @track.stsc.length and i + 1 is @track.stsc[stscIndex + 1].first\n                stscIndex++\n        \n    after 'moov', ->        \n        # if the mdat block was at the beginning rather than the end, jump back to it\n        if @mdatOffset?\n            @stream.seek @mdatOffset - 8\n            \n        # choose a track\n        for track in @tracks when track.type is 'soun'\n            @track = track\n            break\n            \n        if @track.type isnt 'soun'\n            @track = null\n            return @emit 'error', 'No audio tracks in m4a file.'\n            \n        # emit info\n        @emit 'format', @track.format\n        @emit 'duration', @track.duration / @track.timeScale * 1000 | 0\n        if @track.cookie\n            @emit 'cookie', @track.cookie\n        \n        # use the seek points from the selected track\n        @seekPoints = @track.seekPoints\n        \n    atom 'mdat', ->\n        if not @startedData\n            @mdatOffset ?= @stream.offset\n            \n            # if we haven't read the headers yet, the mdat atom was at the beginning\n            # rather than the end. Skip over it for now to read the headers first, and\n            # come back later.\n            if @tracks.length is 0\n                bytes = Math.min(@stream.remainingBytes(), @len)\n                @stream.advance bytes\n                @len -= bytes\n                return\n            \n            @chunkIndex = 0\n            @stscIndex = 0\n            @sampleIndex = 0\n            @tailOffset = 0\n            @tailSamples = 0\n            \n            @startedData = true\n            \n        # read the chapter information if any\n        unless @readChapters\n            @readChapters = @parseChapters()\n            return if @break = not @readChapters\n            @stream.seek @mdatOffset\n            \n        # get the starting offset\n        offset = @track.chunkOffsets[@chunkIndex] + @tailOffset\n        length = 0\n        \n        # make sure we have enough data to get to the offset\n        unless @stream.available(offset - @stream.offset)\n            @break = true\n            return\n        \n        # seek to the offset\n        @stream.seek(offset)\n        \n        # calculate the maximum length we can read at once\n        while @chunkIndex < @track.chunkOffsets.length\n            # calculate the size in bytes of the chunk using the sample size table\n            numSamples = @track.stsc[@stscIndex].count - @tailSamples\n            chunkSize = 0\n            for sample in [0...numSamples] by 1\n                size = @track.sampleSize or @track.sampleSizes[@sampleIndex]\n                \n                # if we don't have enough data to add this sample, jump out\n                break unless @stream.available(length + size)\n                \n                length += size\n                chunkSize += size\n                @sampleIndex++\n            \n            # if we didn't make it through the whole chunk, add what we did use to the tail\n            if sample < numSamples\n                @tailOffset += chunkSize\n                @tailSamples += sample\n                break\n            else\n                # otherwise, we can move to the next chunk\n                @chunkIndex++\n                @tailOffset = 0\n                @tailSamples = 0\n                \n                # if we've made it to the end of a list of subsequent chunks with the same number of samples,\n                # go to the next sample to chunk entry\n                if @stscIndex + 1 < @track.stsc.length and @chunkIndex + 1 is @track.stsc[@stscIndex + 1].first\n                    @stscIndex++\n                \n                # if the next chunk isn't right after this one, jump out\n                if offset + length isnt @track.chunkOffsets[@chunkIndex]\n                    break\n        \n        # emit some data if we have any, otherwise wait for more\n        if length > 0\n            @emit 'data', @stream.readBuffer(length)\n            @break = @chunkIndex is @track.chunkOffsets.length\n        else\n            @break = true\n            \n    parseChapters: ->\n        return true unless @track.chapterTracks?.length > 0\n\n        # find the chapter track\n        id = @track.chapterTracks[0]\n        for track in @tracks\n            break if track.id is id\n\n        if track.id isnt id\n            @emit 'error', 'Chapter track does not exist.'\n\n        @chapters ?= []\n        \n        # use the seek table offsets to find chapter titles\n        while @chapters.length < track.seekPoints.length\n            point = track.seekPoints[@chapters.length]\n            \n            # make sure we have enough data\n            return false unless @stream.available(point.position - @stream.offset + 32)\n\n            # jump to the title offset\n            @stream.seek point.position\n\n            # read the length of the title string\n            len = @stream.readUInt16()\n            title = null\n            \n            return false unless @stream.available(len)\n            \n            # if there is a BOM marker, read a utf16 string\n            if len > 2\n                bom = @stream.peekUInt16()\n                if bom in [0xfeff, 0xfffe]\n                    title = @stream.readString(len, 'utf16-bom')\n\n            # otherwise, use utf8\n            title ?= @stream.readString(len, 'utf8')\n            \n            # add the chapter title, timestamp, and duration\n            nextTimestamp = track.seekPoints[@chapters.length + 1]?.timestamp ? track.duration\n            @chapters.push\n                title: title\n                timestamp: point.timestamp / track.timeScale * 1000 | 0\n                duration: (nextTimestamp - point.timestamp) / track.timeScale * 1000 | 0\n                \n        # we're done, so emit the chapter data\n        @emit 'chapters', @chapters\n        return true\n        \n    # metadata chunk\n    atom 'moov.udta.meta', ->\n        @metadata = {}        \n        @stream.advance(4) # version and flags\n        \n    # emit when we're done\n    after 'moov.udta.meta', ->\n        @emit 'metadata', @metadata\n\n    # convienience function to generate metadata atom handler\n    meta = (field, name, fn) ->\n        atom \"moov.udta.meta.ilst.#{field}.data\", ->\n            @stream.advance(8)\n            @len -= 8\n            fn.call this, name\n\n    # string field reader\n    string = (field) ->\n        @metadata[field] = @stream.readString(@len, 'utf8')\n\n    # from http://atomicparsley.sourceforge.net/mpeg-4files.html\n    meta 'Â©alb', 'album', string\n    meta 'Â©arg', 'arranger', string\n    meta 'Â©art', 'artist', string\n    meta 'Â©ART', 'artist', string\n    meta 'aART', 'albumArtist', string\n    meta 'catg', 'category', string\n    meta 'Â©com', 'composer', string\n    meta 'Â©cpy', 'copyright', string\n    meta 'cprt', 'copyright', string\n    meta 'Â©cmt', 'comments', string\n    meta 'Â©day', 'releaseDate', string\n    meta 'desc', 'description', string\n    meta 'Â©gen', 'genre', string # custom genres\n    meta 'Â©grp', 'grouping', string\n    meta 'Â©isr', 'ISRC', string\n    meta 'keyw', 'keywords', string\n    meta 'Â©lab', 'recordLabel', string\n    meta 'ldes', 'longDescription', string\n    meta 'Â©lyr', 'lyrics', string\n    meta 'Â©nam', 'title', string\n    meta 'Â©phg', 'recordingCopyright', string\n    meta 'Â©prd', 'producer', string\n    meta 'Â©prf', 'performers', string\n    meta 'purd', 'purchaseDate', string\n    meta 'purl', 'podcastURL', string\n    meta 'Â©swf', 'songwriter', string\n    meta 'Â©too', 'encoder', string\n    meta 'Â©wrt', 'composer', string\n\n    meta 'covr', 'coverArt', (field) ->\n        @metadata[field] = @stream.readBuffer(@len)\n\n    # standard genres\n    genres = [\n        \"Blues\", \"Classic Rock\", \"Country\", \"Dance\", \"Disco\", \"Funk\", \"Grunge\", \n        \"Hip-Hop\", \"Jazz\", \"Metal\", \"New Age\", \"Oldies\", \"Other\", \"Pop\", \"R&B\",\n        \"Rap\", \"Reggae\", \"Rock\", \"Techno\", \"Industrial\", \"Alternative\", \"Ska\", \n        \"Death Metal\", \"Pranks\", \"Soundtrack\", \"Euro-Techno\", \"Ambient\", \n        \"Trip-Hop\", \"Vocal\", \"Jazz+Funk\", \"Fusion\", \"Trance\", \"Classical\", \n        \"Instrumental\", \"Acid\", \"House\", \"Game\", \"Sound Clip\", \"Gospel\", \"Noise\",\n        \"AlternRock\", \"Bass\", \"Soul\", \"Punk\", \"Space\", \"Meditative\", \"Instrumental Pop\", \n        \"Instrumental Rock\", \"Ethnic\", \"Gothic\",  \"Darkwave\", \"Techno-Industrial\", \n        \"Electronic\", \"Pop-Folk\", \"Eurodance\", \"Dream\", \"Southern Rock\", \"Comedy\", \n        \"Cult\", \"Gangsta\", \"Top 40\", \"Christian Rap\", \"Pop/Funk\", \"Jungle\", \n        \"Native American\", \"Cabaret\", \"New Wave\", \"Psychadelic\", \"Rave\", \"Showtunes\",\n        \"Trailer\", \"Lo-Fi\", \"Tribal\", \"Acid Punk\", \"Acid Jazz\", \"Polka\", \"Retro\", \n        \"Musical\", \"Rock & Roll\", \"Hard Rock\", \"Folk\", \"Folk/Rock\", \"National Folk\", \n        \"Swing\", \"Fast Fusion\", \"Bebob\", \"Latin\", \"Revival\", \"Celtic\", \"Bluegrass\",\n        \"Avantgarde\", \"Gothic Rock\", \"Progressive Rock\", \"Psychedelic Rock\", \"Symphonic Rock\",\n        \"Slow Rock\", \"Big Band\", \"Chorus\", \"Easy Listening\", \"Acoustic\", \"Humour\", \"Speech\", \n        \"Chanson\", \"Opera\", \"Chamber Music\", \"Sonata\", \"Symphony\", \"Booty Bass\", \"Primus\", \n        \"Porn Groove\", \"Satire\", \"Slow Jam\", \"Club\", \"Tango\", \"Samba\", \"Folklore\", \"Ballad\", \n        \"Power Ballad\", \"Rhythmic Soul\", \"Freestyle\", \"Duet\", \"Punk Rock\", \"Drum Solo\", \n        \"A Capella\", \"Euro-House\", \"Dance Hall\"\n    ]\n\n    meta 'gnre', 'genre', (field) ->\n        @metadata[field] = genres[@stream.readUInt16() - 1]\n\n    meta 'tmpo', 'tempo', (field) ->\n        @metadata[field] = @stream.readUInt16()\n\n    meta 'rtng', 'rating', (field) ->\n        rating = @stream.readUInt8()\n        @metadata[field] = if rating is 2 then 'Clean' else if rating isnt 0 then 'Explicit' else 'None'\n\n    diskTrack = (field) ->\n        @stream.advance(2)\n        @metadata[field] = @stream.readUInt16() + ' of ' + @stream.readUInt16()\n        @stream.advance(@len - 6)\n\n    meta 'disk', 'diskNumber', diskTrack\n    meta 'trkn', 'trackNumber', diskTrack\n\n    bool = (field) ->\n        @metadata[field] = @stream.readUInt8() is 1\n\n    meta 'cpil', 'compilation', bool\n    meta 'pcst', 'podcast', bool\n    meta 'pgap', 'gapless', bool\n    \nmodule.exports = M4ADemuxer\n",
+    "Demuxer = require '../demuxer'\n\nclass WAVEDemuxer extends Demuxer\n    Demuxer.register(WAVEDemuxer)\n    \n    @probe: (buffer) ->\n        return buffer.peekString(0, 4) is 'RIFF' && \n               buffer.peekString(8, 4) is 'WAVE'\n               \n    formats = \n        0x0001: 'lpcm'\n        0x0003: 'lpcm'\n        0x0006: 'alaw'\n        0x0007: 'ulaw'\n               \n    readChunk: ->\n        if not @readStart and @stream.available(12)\n            if @stream.readString(4) isnt 'RIFF'\n                return @emit 'error', 'Invalid WAV file.'\n                \n            @fileSize = @stream.readUInt32(true)\n            @readStart = true\n            \n            if @stream.readString(4) isnt 'WAVE'\n                return @emit 'error', 'Invalid WAV file.'\n                \n        while @stream.available(1)\n            if not @readHeaders and @stream.available(8)\n                @type = @stream.readString(4)\n                @len = @stream.readUInt32(true) # little endian\n                \n            switch @type\n                when 'fmt '\n                    encoding = @stream.readUInt16(true)\n                    if encoding not of formats\n                        return @emit 'error', 'Unsupported format in WAV file.'\n                        \n                    @format = \n                        formatID: formats[encoding]\n                        floatingPoint: encoding is 0x0003\n                        littleEndian: formats[encoding] is 'lpcm'\n                        channelsPerFrame: @stream.readUInt16(true)\n                        sampleRate: @stream.readUInt32(true)\n                        framesPerPacket: 1\n                        \n                    @stream.advance(4) # bytes/sec.\n                    @stream.advance(2) # block align\n                    \n                    @format.bitsPerChannel = @stream.readUInt16(true)\n                    @format.bytesPerPacket = (@format.bitsPerChannel / 8) * @format.channelsPerFrame\n                    \n                    @emit 'format', @format\n\n                    # Advance to the next chunk\n                    @stream.advance(@len - 16)\n                    \n                when 'data'\n                    if not @sentDuration\n                        bytes = @format.bitsPerChannel / 8\n                        @emit 'duration', @len / bytes / @format.channelsPerFrame / @format.sampleRate * 1000 | 0\n                        @sentDuration = true\n                \n                    buffer = @stream.readSingleBuffer(@len)\n                    @len -= buffer.length\n                    @readHeaders = @len > 0\n                    @emit 'data', buffer\n                    \n                else\n                    return unless @stream.available(@len)\n                    @stream.advance(@len)\n                        \n            @readHeaders = false unless @type is 'data'\n            \n        return",
+    "#\n# The AudioDevice class is responsible for interfacing with various audio\n# APIs in browsers, and for keeping track of the current playback time\n# based on the device hardware time and the play/pause/seek state\n#\n\nEventEmitter = require './core/events'\n\nclass AudioDevice extends EventEmitter\n    constructor: (@sampleRate, @channels) ->\n        @playing = false\n        @currentTime = 0\n        @_lastTime = 0\n        \n    start: ->\n        return if @playing\n        @playing = true\n        \n        @device ?= AudioDevice.create(@sampleRate, @channels)\n        unless @device\n            throw new Error \"No supported audio device found.\"\n            \n        @_lastTime = @device.getDeviceTime()\n            \n        @_timer = setInterval @updateTime, 200\n        @device.on 'refill', @refill = (buffer) =>\n            @emit 'refill', buffer\n        \n    stop: ->\n        return unless @playing\n        @playing = false\n        \n        @device.off 'refill', @refill\n        clearInterval @_timer\n        \n    destroy: ->\n        @stop()\n        @device.destroy()\n        \n    seek: (@currentTime) ->\n        @_lastTime = @device.getDeviceTime() if @playing\n        @emit 'timeUpdate', @currentTime\n        \n    updateTime: =>\n        time = @device.getDeviceTime()\n        @currentTime += (time - @_lastTime) / @device.sampleRate * 1000 | 0\n        @_lastTime = time\n        @emit 'timeUpdate', @currentTime\n        \n    devices = []\n    @register: (device) ->\n        devices.push(device)\n\n    @create: (sampleRate, channels) ->\n        for device in devices when device.supported\n            return new device(sampleRate, channels)\n\n        return null\n        \nmodule.exports = AudioDevice\n",
+    "EventEmitter = require '../core/events'\nAudioDevice = require '../device'\nAVBuffer = require '../core/buffer'\n\nclass MozillaAudioDevice extends EventEmitter\n    AudioDevice.register(MozillaAudioDevice)\n    \n    # determine whether this device is supported by the browser\n    @supported: Audio? and 'mozWriteAudio' of new Audio\n    \n    constructor: (@sampleRate, @channels) ->        \n        @audio = new Audio\n        @audio.mozSetup(@channels, @sampleRate)\n        \n        @writePosition = 0\n        @prebufferSize = @sampleRate / 2\n        @tail = null\n        \n        @timer = createTimer @refill, 100\n        \n    refill: =>\n        if @tail\n            written = @audio.mozWriteAudio(@tail)\n            @writePosition += written\n            \n            if @writePosition < @tail.length\n                @tail = @tail.subarray(written)\n            else    \n                @tail = null\n            \n        currentPosition = @audio.mozCurrentSampleOffset()\n        available = currentPosition + @prebufferSize - @writePosition\n        if available > 0\n            buffer = new Float32Array(available)\n            @emit 'refill', buffer\n            \n            written = @audio.mozWriteAudio(buffer)\n            if written < buffer.length\n                @tail = buffer.subarray(written)\n                \n            @writePosition += written\n            \n        return\n        \n    destroy: ->\n        destroyTimer @timer\n        \n    getDeviceTime: ->\n        return @audio.mozCurrentSampleOffset() / @channels\n    \n    # Use an inline worker to get setInterval\n    # without being clamped in background tabs\n    createTimer = (fn, interval) ->\n        url = AVBuffer.makeBlobURL(\"setInterval(function() { postMessage('ping'); }, #{interval});\")\n        return setInterval fn, interval unless url?\n                \n        worker = new Worker(url)\n        worker.onmessage = fn\n        worker.url = url\n        \n        return worker\n        \n    destroyTimer = (timer) ->\n        if timer.terminate\n            timer.terminate()\n            URL.revokeObjectURL(timer.url)\n        else\n            clearInterval timer",
+    "/*\n * This resampler is from XAudioJS: https://github.com/grantgalitz/XAudioJS\n * Planned to be replaced with src.js, eventually: https://github.com/jussi-kalliokoski/src.js\n */\n\n//JavaScript Audio Resampler (c) 2011 - Grant Galitz\nfunction Resampler(fromSampleRate, toSampleRate, channels, outputBufferSize, noReturn) {\n\tthis.fromSampleRate = fromSampleRate;\n\tthis.toSampleRate = toSampleRate;\n\tthis.channels = channels | 0;\n\tthis.outputBufferSize = outputBufferSize;\n\tthis.noReturn = !!noReturn;\n\tthis.initialize();\n}\n\nResampler.prototype.initialize = function () {\n\t//Perform some checks:\n\tif (this.fromSampleRate > 0 && this.toSampleRate > 0 && this.channels > 0) {\n\t\tif (this.fromSampleRate == this.toSampleRate) {\n\t\t\t//Setup a resampler bypass:\n\t\t\tthis.resampler = this.bypassResampler;\t\t//Resampler just returns what was passed through.\n\t\t\tthis.ratioWeight = 1;\n\t\t}\n\t\telse {\n\t\t\tif (this.fromSampleRate < this.toSampleRate) {\n\t\t\t\t/*\n\t\t\t\t\tUse generic linear interpolation if upsampling,\n\t\t\t\t\tas linear interpolation produces a gradient that we want\n\t\t\t\t\tand works fine with two input sample points per output in this case.\n\t\t\t\t*/\n\t\t\t\tthis.compileLinearInterpolationFunction();\n\t\t\t\tthis.lastWeight = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/*\n\t\t\t\t\tCustom resampler I wrote that doesn't skip samples\n\t\t\t\t\tlike standard linear interpolation in high downsampling.\n\t\t\t\t\tThis is more accurate than linear interpolation on downsampling.\n\t\t\t\t*/\n\t\t\t\tthis.compileMultiTapFunction();\n\t\t\t\tthis.tailExists = false;\n\t\t\t\tthis.lastWeight = 0;\n\t\t\t}\n\t\t\tthis.ratioWeight = this.fromSampleRate / this.toSampleRate;\n\t\t\tthis.initializeBuffers();\n\t\t}\n\t}\n\telse {\n\t\tthrow(new Error(\"Invalid settings specified for the resampler.\"));\n\t}\n};\n\nResampler.prototype.compileLinearInterpolationFunction = function () {\n\tvar toCompile = \"var bufferLength = buffer.length;\\\n\tvar outLength = this.outputBufferSize;\\\n\tif ((bufferLength % \" + this.channels + \") == 0) {\\\n\t\tif (bufferLength > 0) {\\\n\t\t\tvar ratioWeight = this.ratioWeight;\\\n\t\t\tvar weight = this.lastWeight;\\\n\t\t\tvar firstWeight = 0;\\\n\t\t\tvar secondWeight = 0;\\\n\t\t\tvar sourceOffset = 0;\\\n\t\t\tvar outputOffset = 0;\\\n\t\t\tvar outputBuffer = this.outputBuffer;\\\n\t\t\tfor (; weight < 1; weight += ratioWeight) {\\\n\t\t\t\tsecondWeight = weight % 1;\\\n\t\t\t\tfirstWeight = 1 - secondWeight;\";\n\tfor (var channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"outputBuffer[outputOffset++] = (this.lastOutput[\" + channel + \"] * firstWeight) + (buffer[\" + channel + \"] * secondWeight);\";\n\t}\n\ttoCompile += \"}\\\n\t\t\tweight -= 1;\\\n\t\t\tfor (bufferLength -= \" + this.channels + \", sourceOffset = Math.floor(weight) * \" + this.channels + \"; outputOffset < outLength && sourceOffset < bufferLength;) {\\\n\t\t\t\tsecondWeight = weight % 1;\\\n\t\t\t\tfirstWeight = 1 - secondWeight;\";\n\tfor (var channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"outputBuffer[outputOffset++] = (buffer[sourceOffset\" + ((channel > 0) ? (\" + \" + channel) : \"\") + \"] * firstWeight) + (buffer[sourceOffset + \" + (this.channels + channel) + \"] * secondWeight);\";\n\t}\n\ttoCompile += \"weight += ratioWeight;\\\n\t\t\t\tsourceOffset = Math.floor(weight) * \" + this.channels + \";\\\n\t\t\t}\";\n\tfor (var channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"this.lastOutput[\" + channel + \"] = buffer[sourceOffset++];\";\n\t}\n\ttoCompile += \"this.lastWeight = weight % 1;\\\n\t\t\treturn this.bufferSlice(outputOffset);\\\n\t\t}\\\n\t\telse {\\\n\t\t\treturn (this.noReturn) ? 0 : [];\\\n\t\t}\\\n\t}\\\n\telse {\\\n\t\tthrow(new Error(\\\"Buffer was of incorrect sample length.\\\"));\\\n\t}\";\n\tthis.resampler = Function(\"buffer\", toCompile);\n};\n\nResampler.prototype.compileMultiTapFunction = function () {\n\tvar toCompile = \"var bufferLength = buffer.length;\\\n\tvar outLength = this.outputBufferSize;\\\n\tif ((bufferLength % \" + this.channels + \") == 0) {\\\n\t\tif (bufferLength > 0) {\\\n\t\t\tvar ratioWeight = this.ratioWeight;\\\n\t\t\tvar weight = 0;\";\n\tfor (var channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"var output\" + channel + \" = 0;\"\n\t}\n\ttoCompile += \"var actualPosition = 0;\\\n\t\t\tvar amountToNext = 0;\\\n\t\t\tvar alreadyProcessedTail = !this.tailExists;\\\n\t\t\tthis.tailExists = false;\\\n\t\t\tvar outputBuffer = this.outputBuffer;\\\n\t\t\tvar outputOffset = 0;\\\n\t\t\tvar currentPosition = 0;\\\n\t\t\tdo {\\\n\t\t\t\tif (alreadyProcessedTail) {\\\n\t\t\t\t\tweight = ratioWeight;\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"output\" + channel + \" = 0;\"\n\t}\n\ttoCompile += \"}\\\n\t\t\t\telse {\\\n\t\t\t\t\tweight = this.lastWeight;\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"output\" + channel + \" = this.lastOutput[\" + channel + \"];\"\n\t}\n\ttoCompile += \"alreadyProcessedTail = true;\\\n\t\t\t\t}\\\n\t\t\t\twhile (weight > 0 && actualPosition < bufferLength) {\\\n\t\t\t\t\tamountToNext = 1 + actualPosition - currentPosition;\\\n\t\t\t\t\tif (weight >= amountToNext) {\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"output\" + channel + \" += buffer[actualPosition++] * amountToNext;\"\n\t}\n\ttoCompile += \"currentPosition = actualPosition;\\\n\t\t\t\t\t\tweight -= amountToNext;\\\n\t\t\t\t\t}\\\n\t\t\t\t\telse {\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"output\" + channel + \" += buffer[actualPosition\" + ((channel > 0) ? (\" + \" + channel) : \"\") + \"] * weight;\"\n\t}\n\ttoCompile += \"currentPosition += weight;\\\n\t\t\t\t\t\tweight = 0;\\\n\t\t\t\t\t\tbreak;\\\n\t\t\t\t\t}\\\n\t\t\t\t}\\\n\t\t\t\tif (weight == 0) {\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"outputBuffer[outputOffset++] = output\" + channel + \" / ratioWeight;\"\n\t}\n\ttoCompile += \"}\\\n\t\t\t\telse {\\\n\t\t\t\t\tthis.lastWeight = weight;\";\n\tfor (channel = 0; channel < this.channels; ++channel) {\n\t\ttoCompile += \"this.lastOutput[\" + channel + \"] = output\" + channel + \";\"\n\t}\n\ttoCompile += \"this.tailExists = true;\\\n\t\t\t\t\tbreak;\\\n\t\t\t\t}\\\n\t\t\t} while (actualPosition < bufferLength && outputOffset < outLength);\\\n\t\t\treturn this.bufferSlice(outputOffset);\\\n\t\t}\\\n\t\telse {\\\n\t\t\treturn (this.noReturn) ? 0 : [];\\\n\t\t}\\\n\t}\\\n\telse {\\\n\t\tthrow(new Error(\\\"Buffer was of incorrect sample length.\\\"));\\\n\t}\";\n\tthis.resampler = Function(\"buffer\", toCompile);\n};\n\nResampler.prototype.bypassResampler = function (buffer) {\n\tif (this.noReturn) {\n\t\t//Set the buffer passed as our own, as we don't need to resample it:\n\t\tthis.outputBuffer = buffer;\n\t\treturn buffer.length;\n\t}\n\telse {\n\t\t//Just return the buffer passsed:\n\t\treturn buffer;\n\t}\n};\n\nResampler.prototype.bufferSlice = function (sliceAmount) {\n\tif (this.noReturn) {\n\t\t//If we're going to access the properties directly from this object:\n\t\treturn sliceAmount;\n\t}\n\telse {\n\t\t//Typed array and normal array buffer section referencing:\n\t\ttry {\n\t\t\treturn this.outputBuffer.subarray(0, sliceAmount);\n\t\t}\n\t\tcatch (error) {\n\t\t\ttry {\n\t\t\t\t//Regular array pass:\n\t\t\t\tthis.outputBuffer.length = sliceAmount;\n\t\t\t\treturn this.outputBuffer;\n\t\t\t}\n\t\t\tcatch (error) {\n\t\t\t\t//Nightly Firefox 4 used to have the subarray function named as slice:\n\t\t\t\treturn this.outputBuffer.slice(0, sliceAmount);\n\t\t\t}\n\t\t}\n\t}\n};\n\nResampler.prototype.initializeBuffers = function () {\n\t//Initialize the internal buffer:\n\ttry {\n\t\tthis.outputBuffer = new Float32Array(this.outputBufferSize);\n\t\tthis.lastOutput = new Float32Array(this.channels);\n\t}\n\tcatch (error) {\n\t\tthis.outputBuffer = [];\n\t\tthis.lastOutput = [];\n\t}\n};\n\nmodule.exports = Resampler;\n",
+    "EventEmitter = require '../core/events'\nAudioDevice = require '../device'\nResampler = require './resampler'\n\nclass WebAudioDevice extends EventEmitter\n    AudioDevice.register(WebAudioDevice)\n    \n    # determine whether this device is supported by the browser\n    AudioContext = global.AudioContext or global.webkitAudioContext\n    @supported = AudioContext and \n      (typeof AudioContext::[createProcessor = 'createScriptProcessor'] is 'function' or\n      typeof AudioContext::[createProcessor = 'createJavaScriptNode']  is 'function')\n    \n    # Chrome limits the number of AudioContexts that one can create,\n    # so use a lazily created shared context for all playback\n    sharedContext = null\n    \n    constructor: (@sampleRate, @channels) ->\n        @context = sharedContext ?= new AudioContext\n        @deviceSampleRate = @context.sampleRate\n        \n        # calculate the buffer size to read\n        @bufferSize = Math.ceil(4096 / (@deviceSampleRate / @sampleRate) * @channels)\n        @bufferSize += @bufferSize % @channels\n        \n        # if the sample rate doesn't match the hardware sample rate, create a resampler\n        if @deviceSampleRate isnt @sampleRate\n            @resampler = new Resampler(@sampleRate, @deviceSampleRate, @channels, 4096 * @channels)\n\n        @node = @context[createProcessor](4096, @channels, @channels)\n        @node.onaudioprocess = @refill\n        @node.connect(@context.destination)\n        \n    refill: (event) =>\n        outputBuffer = event.outputBuffer\n        channelCount = outputBuffer.numberOfChannels\n        channels = new Array(channelCount)\n        \n        # get output channels\n        for i in [0...channelCount] by 1\n            channels[i] = outputBuffer.getChannelData(i)\n        \n        # get audio data    \n        data = new Float32Array(@bufferSize)\n        @emit 'refill', data\n        \n        # resample if necessary    \n        if @resampler\n            data = @resampler.resampler(data)\n        \n        # write data to output\n        for i in [0...outputBuffer.length] by 1\n            for n in [0...channelCount] by 1\n                channels[n][i] = data[i * channelCount + n]\n                \n        return\n        \n    destroy: ->\n        @node.disconnect(0)\n        \n    getDeviceTime: ->\n        return @context.currentTime * @sampleRate",
+    "class Filter\n    constructor: (context, key) ->\n        # default constructor takes a single value\n        # override to take more parameters\n        if context and key\n            Object.defineProperty this, 'value', \n                get: -> context[key]\n        \n    process: (buffer) ->\n        # override this method\n        return\n        \nmodule.exports = Filter\n",
+    "Filter = require '../filter'\n\nclass BalanceFilter extends Filter\n    process: (buffer) ->\n        return if @value is 0\n        pan = Math.max(-50, Math.min(50, @value))\n        \n        for i in [0...buffer.length] by 2\n            buffer[i] *= Math.min(1, (50 - pan) / 50)\n            buffer[i + 1] *= Math.min(1, (50 + pan) / 50)\n            \n        return\n        \nmodule.exports = BalanceFilter\n",
+    "Filter = require '../filter'\n\nclass VolumeFilter extends Filter\n    process: (buffer) ->\n        return if @value >= 100\n        vol = Math.max(0, Math.min(100, @value)) / 100\n        \n        for i in [0...buffer.length] by 1\n            buffer[i] *= vol\n            \n        return\n        \nmodule.exports = VolumeFilter\n",
+    "#\n# The Player class plays back audio data from various sources\n# as decoded by the Asset class.  In addition, it handles\n# common audio filters like panning and volume adjustment,\n# and interfacing with AudioDevices to keep track of the \n# playback time.\n#\n\nEventEmitter = require './core/events'\nAsset = require './asset'\nVolumeFilter = require './filters/volume'\nBalanceFilter = require './filters/balance'\nQueue = require './queue'\nAudioDevice = require './device'\n\nclass Player extends EventEmitter\n    constructor: (@asset) ->\n        @playing = false\n        @buffered = 0\n        @currentTime = 0\n        @duration = 0\n        @volume = 100\n        @pan = 0 # -50 for left, 50 for right, 0 for center\n        @metadata = {}\n        \n        @filters = [\n            new VolumeFilter(this, 'volume')\n            new BalanceFilter(this, 'pan')\n        ]\n        \n        @asset.on 'buffer', (@buffered) =>\n            @emit 'buffer', @buffered\n        \n        @asset.on 'decodeStart', =>\n            @queue = new Queue(@asset)\n            @queue.once 'ready', @startPlaying\n            \n        @asset.on 'format', (@format) =>\n            @emit 'format', @format\n            \n        @asset.on 'metadata', (@metadata) =>\n            @emit 'metadata', @metadata\n            \n        @asset.on 'duration', (@duration) =>\n            @emit 'duration', @duration\n            \n        @asset.on 'error', (error) =>\n            @emit 'error', error\n                \n    @fromURL: (url) ->\n        return new Player Asset.fromURL(url)\n        \n    @fromFile: (file) ->\n        return new Player Asset.fromFile(file)\n        \n    @fromBuffer: (buffer) ->\n        return new Player Asset.fromBuffer(buffer)\n        \n    preload: ->\n        return unless @asset\n        \n        @startedPreloading = true\n        @asset.start(false)\n        \n    play: ->\n        return if @playing\n        \n        unless @startedPreloading\n            @preload()\n        \n        @playing = true\n        @device?.start()\n        \n    pause: ->\n        return unless @playing\n        \n        @playing = false\n        @device?.stop()\n        \n    togglePlayback: ->\n        if @playing\n            @pause()\n        else\n            @play()\n        \n    stop: ->\n        @pause()\n        @asset.stop()\n        @device?.destroy()\n        \n    seek: (timestamp) ->\n        @device?.stop()\n        @queue.once 'ready', =>\n            @device?.seek @currentTime\n            @device?.start() if @playing\n            \n        # convert timestamp to sample number\n        timestamp = (timestamp / 1000) * @format.sampleRate\n            \n        # the actual timestamp we seeked to may differ \n        # from the requested timestamp due to optimizations\n        timestamp = @asset.decoder.seek(timestamp)\n        \n        # convert back from samples to milliseconds\n        @currentTime = timestamp / @format.sampleRate * 1000 | 0\n        \n        @queue.reset()\n        return @currentTime\n        \n    startPlaying: =>\n        frame = @queue.read()\n        frameOffset = 0\n        \n        @device = new AudioDevice(@format.sampleRate, @format.channelsPerFrame)\n        @device.on 'timeUpdate', (@currentTime) =>\n            @emit 'progress', @currentTime\n        \n        @refill = (buffer) =>\n            return unless @playing\n            \n            # try reading another frame if one isn't already available\n            # happens when we play to the end and then seek back\n            if not frame\n                frame = @queue.read()\n                frameOffset = 0\n\n            bufferOffset = 0\n            while frame and bufferOffset < buffer.length\n                max = Math.min(frame.length - frameOffset, buffer.length - bufferOffset)\n                for i in [0...max] by 1\n                    buffer[bufferOffset++] = frame[frameOffset++]\n                \n                if frameOffset is frame.length\n                    frame = @queue.read()\n                    frameOffset = 0\n            \n            # run any applied filters\n            for filter in @filters\n                filter.process(buffer)\n                \n            # if we've run out of data, pause the player\n            unless frame\n                # if this was the end of the track, make\n                # sure the currentTime reflects that\n                if @queue.ended\n                    @currentTime = @duration\n                    @emit 'progress', @currentTime\n                    @emit 'end'\n                    @stop()\n                else\n                    # if we ran out of data in the middle of \n                    # the track, stop the timer but don't change\n                    # the playback state\n                    @device.stop()\n                    \n            return\n        \n        @device.on 'refill', @refill\n        @device.start() if @playing\n        @emit 'ready'\n        \nmodule.exports = Player\n",
+    "EventEmitter = require './core/events'\n\nclass Queue extends EventEmitter\n    constructor: (@asset) ->\n        @readyMark = 64\n        @finished = false\n        @buffering = true\n        @ended = false\n        \n        @buffers = []\n        @asset.on 'data', @write\n        @asset.on 'end', =>\n            @ended = true\n            \n        @asset.decodePacket()\n        \n    write: (buffer) =>\n        @buffers.push buffer if buffer\n        \n        if @buffering\n            if @buffers.length >= @readyMark or @ended\n                @buffering = false\n                @emit 'ready'\n            else    \n                @asset.decodePacket()\n            \n    read: ->\n        return null if @buffers.length is 0\n        \n        @asset.decodePacket()\n        return @buffers.shift()\n        \n    reset: ->\n        @buffers.length = 0\n        @buffering = true\n        @asset.decodePacket()\n        \nmodule.exports = Queue\n",
+    "EventEmitter = require '../../core/events'\nAVBuffer = require '../../core/buffer'\n\nclass FileSource extends EventEmitter\n    constructor: (@file) ->\n        if not FileReader?\n            return @emit 'error', 'This browser does not have FileReader support.'\n        \n        @offset = 0\n        @length = @file.size\n        @chunkSize = 1 << 20\n        @file[@slice = 'slice'] or @file[@slice = 'webkitSlice'] or @file[@slice = 'mozSlice']\n            \n    start: ->\n        if @reader\n            return @loop() unless @active\n        \n        @reader = new FileReader\n        @active = true\n        \n        @reader.onload = (e) =>\n            buf = new AVBuffer(new Uint8Array(e.target.result))\n            @offset += buf.length\n        \n            @emit 'data', buf   \n            @active = false     \n            @loop() if @offset < @length\n        \n        @reader.onloadend = =>\n            if @offset is @length\n                @emit 'end'\n                @reader = null\n        \n        @reader.onerror = (e) =>\n            @emit 'error', e\n        \n        @reader.onprogress = (e) =>\n            @emit 'progress', (@offset + e.loaded) / @length * 100\n        \n        @loop()\n        \n    loop: ->\n        @active = true\n        endPos = Math.min(@offset + @chunkSize, @length)\n        \n        blob = @file[@slice](@offset, endPos)\n        @reader.readAsArrayBuffer(blob)\n        \n    pause: ->\n        @active = false\n        try\n          @reader?.abort()\n        \n    reset: ->\n        @pause()\n        @offset = 0\n\nmodule.exports = FileSource\n",
+    "EventEmitter = require '../../core/events'\nAVBuffer = require '../../core/buffer'\n\nclass HTTPSource extends EventEmitter\n    constructor: (@url) ->\n        @chunkSize = 1 << 20\n        @inflight = false\n        @reset()\n        \n    start: ->\n        if @length\n            return @loop() unless @inflight\n        \n        @inflight = true\n        @xhr = new XMLHttpRequest()\n        \n        @xhr.onload = (event) =>\n            @length = parseInt @xhr.getResponseHeader(\"Content-Length\")                \n            @inflight = false\n            @loop()\n        \n        @xhr.onerror = (err) =>\n            @pause()\n            @emit 'error', err\n            \n        @xhr.onabort = (event) =>\n            @inflight = false\n        \n        @xhr.open(\"HEAD\", @url, true)\n        @xhr.send(null)\n        \n    loop: ->\n        if @inflight or not @length\n            return @emit 'error', 'Something is wrong in HTTPSource.loop'\n            \n        @inflight = true\n        @xhr = new XMLHttpRequest()\n        \n        @xhr.onload = (event) =>\n            if @xhr.response\n                buf = new Uint8Array(@xhr.response)\n            else\n                txt = @xhr.responseText\n                buf = new Uint8Array(txt.length)\n                for i in [0...txt.length]\n                    buf[i] = txt.charCodeAt(i) & 0xff\n\n            buffer = new AVBuffer(buf)\n            @offset += buffer.length\n            \n            @emit 'data', buffer\n            @emit 'end' if @offset >= @length\n\n            @inflight = false\n            @loop() unless @offset >= @length\n            \n        @xhr.onprogress = (event) =>\n            @emit 'progress', (@offset + event.loaded) / @length * 100\n\n        @xhr.onerror = (err) =>\n            @emit 'error', err\n            @pause()\n\n        @xhr.onabort = (event) =>\n            @inflight = false\n\n        @xhr.open(\"GET\", @url, true)\n        @xhr.responseType = \"arraybuffer\"\n\n        endPos = Math.min(@offset + @chunkSize, @length)\n        @xhr.setRequestHeader(\"Range\", \"bytes=#{@offset}-#{endPos}\")\n        @xhr.overrideMimeType('text/plain; charset=x-user-defined')\n        @xhr.send(null)\n        \n    pause: ->\n        @inflight = false\n        @xhr?.abort()\n        \n    reset: ->\n        @pause()\n        @offset = 0\n        \nmodule.exports = HTTPSource\n",
+    "EventEmitter = require '../core/events'\nBufferList = require '../core/bufferlist'\nAVBuffer = require '../core/buffer'\n\nclass BufferSource extends EventEmitter    \n    constructor: (input) ->\n        # Now make an AV.BufferList\n        if input instanceof BufferList\n            @list = input\n            \n        else\n            @list = new BufferList\n            @list.append new AVBuffer(input)\n            \n        @paused = true\n        \n    setImmediate = global.setImmediate or (fn) ->\n        global.setTimeout fn, 0\n        \n    clearImmediate = global.clearImmediate or (timer) ->\n        global.clearTimeout timer\n        \n    start: ->\n        @paused = false\n        @_timer = setImmediate @loop\n        \n    loop: =>\n        @emit 'progress', (@list.numBuffers - @list.availableBuffers + 1) / @list.numBuffers * 100 | 0\n        @emit 'data', @list.first\n        if @list.advance()\n            setImmediate @loop\n        else\n            @emit 'end'\n        \n    pause: ->\n        clearImmediate @_timer\n        @paused = true\n        \n    reset: ->\n        @pause()\n        @list.rewind()\n        \nmodule.exports = BufferSource\n"
+  ],
+  "sourceRoot": ""
+}
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js	(revision 33547)
@@ -0,0 +1,7706 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+exports.MP3Demuxer = require('./src/demuxer');
+exports.MP3Decoder = require('./src/decoder');
+
+},{"./src/decoder":2,"./src/demuxer":3}],2:[function(require,module,exports){
+var AV = (window.AV);
+var MP3FrameHeader = require('./header');
+var MP3Stream = require('./stream');
+var MP3Frame = require('./frame');
+var MP3Synth = require('./synth');
+var Layer1 = require('./layer1');
+var Layer2 = require('./layer2');
+var Layer3 = require('./layer3');
+
+var MP3Decoder = AV.Decoder.extend(function() {
+    AV.Decoder.register('mp3', this);
+    
+    this.prototype.init = function() {
+        this.mp3_stream = new MP3Stream(this.bitstream);
+        this.frame = new MP3Frame();
+        this.synth = new MP3Synth();
+        this.seeking = false;
+    };
+    
+    this.prototype.readChunk = function() {
+        var stream = this.mp3_stream;
+        var frame = this.frame;
+        var synth = this.synth;
+
+        // if we just seeked, we may start getting errors involving the frame reservoir,
+        // so keep going until we successfully decode a frame
+        if (this.seeking) {
+            while (true) {
+                try {
+                    frame.decode(stream);
+                    break;
+                } catch (err) {
+                    if (err instanceof AV.UnderflowError)
+                        throw err;
+                }
+            }
+            
+            this.seeking = false;
+        } else {
+            frame.decode(stream);
+        }
+        
+        synth.frame(frame);
+        
+        // interleave samples
+        var data = synth.pcm.samples,
+            channels = synth.pcm.channels,
+            len = synth.pcm.length,
+            output = new Float32Array(len * channels),
+            j = 0;
+        
+        for (var k = 0; k < len; k++) {
+            for (var i = 0; i < channels; i++) {
+                output[j++] = data[i][k];
+            }
+        }
+        
+        return output;
+    };
+    
+    this.prototype.seek = function(timestamp) {
+        var offset;
+        
+        // if there was a Xing or VBRI tag with a seek table, use that
+        // otherwise guesstimate based on CBR bitrate
+        if (this.demuxer.seekPoints.length > 0) {
+            timestamp = this._super(timestamp);
+            offset = this.stream.offset;
+        } else {
+            offset = timestamp * this.format.bitrate / 8 / this.format.sampleRate;
+        }
+        
+        this.mp3_stream.reset(offset);
+        
+        // try to find 3 consecutive valid frame headers in a row
+        for (var i = 0; i < 4096; i++) {
+            var pos = offset + i;
+            for (var j = 0; j < 3; j++) {
+                this.mp3_stream.reset(pos);
+                
+                try {
+                    var header = MP3FrameHeader.decode(this.mp3_stream);
+                } catch (e) {
+                    break;
+                }
+                
+                // skip the rest of the frame
+                var size = header.framesize();
+                if (size == null)
+                    break;
+                        
+                pos += size;
+            }
+            
+            // check if we're done
+            if (j === 3)
+                break;
+        }
+        
+        // if we didn't find 3 frames, just try the first one and hope for the best
+        if (j !== 3)
+            i = 0;
+            
+        this.mp3_stream.reset(offset + i);
+        
+        // if we guesstimated, update the timestamp to another estimate of where we actually seeked to
+        if (this.demuxer.seekPoints.length === 0)
+            timestamp = this.stream.offset / (this.format.bitrate / 8) * this.format.sampleRate;
+        
+        this.seeking = true;
+        return timestamp;
+    };
+});
+
+module.exports = MP3Decoder;
+
+},{"./frame":4,"./header":5,"./layer1":9,"./layer2":10,"./layer3":11,"./stream":12,"./synth":13}],3:[function(require,module,exports){
+var AV = (window.AV);
+var ID3v23Stream = require('./id3').ID3v23Stream;
+var ID3v22Stream = require('./id3').ID3v22Stream;
+var MP3FrameHeader = require('./header');
+var MP3Stream = require('./stream');
+
+var MP3Demuxer = AV.Demuxer.extend(function() {
+    AV.Demuxer.register(this);
+    
+    this.probe = function(stream) {
+        var off = stream.offset;
+        
+        // skip id3 metadata if it exists
+        var id3header = MP3Demuxer.getID3v2Header(stream);
+        if (id3header)
+            stream.advance(10 + id3header.length);
+        
+        // attempt to read the header of the first audio frame
+        var s = new MP3Stream(new AV.Bitstream(stream));
+        var header = null;
+        
+        try {
+            header = MP3FrameHeader.decode(s);
+        } catch (e) {};
+        
+        // go back to the beginning, for other probes
+        stream.seek(off);
+        
+        return !!header;
+    };
+    
+    this.getID3v2Header = function(stream) {
+        if (stream.peekString(0, 3) == 'ID3') {
+            stream = AV.Stream.fromBuffer(stream.peekBuffer(0, 10));
+            stream.advance(3); // 'ID3'
+
+            var major = stream.readUInt8();
+            var minor = stream.readUInt8();
+            var flags = stream.readUInt8();
+            var bytes = stream.readBuffer(4).data;
+            var length = (bytes[0] << 21) | (bytes[1] << 14) | (bytes[2] << 7) | bytes[3];
+
+            return { 
+                version: '2.' + major + '.' + minor, 
+                major: major, 
+                minor: minor, 
+                flags: flags, 
+                length: length 
+            };
+        }
+        
+        return null;
+    };
+    
+    const XING_OFFSETS = [[32, 17], [17, 9]];
+    this.prototype.parseDuration = function(header) {
+        var stream = this.stream;
+        var frames;
+                
+        var offset = stream.offset;
+        if (!header || header.layer !== 3)
+            return false;
+        
+        // Check for Xing/Info tag
+        stream.advance(XING_OFFSETS[header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0][header.nchannels() === 1 ? 1 : 0]);
+        var tag = stream.readString(4);
+        if (tag === 'Xing' || tag === 'Info') {
+            var flags = stream.readUInt32();
+            if (flags & 1) 
+                frames = stream.readUInt32();
+                
+            if (flags & 2)
+                var size = stream.readUInt32();
+                
+            if (flags & 4 && frames && size) {
+                for (var i = 0; i < 100; i++) {
+                    var b = stream.readUInt8();
+                    var pos = b / 256 * size | 0;
+                    var time = i / 100 * (frames * header.nbsamples() * 32) | 0;
+                    this.addSeekPoint(pos, time);
+                }
+            }
+                
+            if (flags & 8)
+                stream.advance(4);
+                
+        } else {
+            // Check for VBRI tag (always 32 bytes after end of mpegaudio header)
+            stream.seek(offset + 4 + 32);
+            tag = stream.readString(4);
+            if (tag == 'VBRI' && stream.readUInt16() === 1) { // Check tag version
+                stream.advance(4); // skip delay and quality
+                stream.advance(4); // skip size
+                frames = stream.readUInt32();
+                
+                var entries = stream.readUInt16();
+                var scale = stream.readUInt16();
+                var bytesPerEntry = stream.readUInt16();
+                var framesPerEntry = stream.readUInt16();
+                var fn = 'readUInt' + (bytesPerEntry * 8);
+                
+                var pos = 0;
+                for (var i = 0; i < entries; i++) {
+                    this.addSeekPoint(pos, framesPerEntry * i);
+                    pos += stream[fn]();
+                }
+            }
+        }
+        
+        if (!frames)
+            return false;
+            
+        this.emit('duration', (frames * header.nbsamples() * 32) / header.samplerate * 1000 | 0);
+        return true;
+    };
+    
+    this.prototype.readChunk = function() {
+        var stream = this.stream;
+        
+        if (!this.sentInfo) {
+            // read id3 metadata if it exists
+            var id3header = MP3Demuxer.getID3v2Header(stream);
+            if (id3header) {
+                stream.advance(10);
+                
+                if (id3header.major > 2) {
+                    var id3 = new ID3v23Stream(id3header, stream);
+                } else {
+                    var id3 = new ID3v22Stream(id3header, stream);
+                }
+                
+                this.emit('metadata', id3.read());
+            }
+            
+            // read the header of the first audio frame
+            var off = stream.offset;
+            var s = new MP3Stream(new AV.Bitstream(stream));
+            
+            var header = MP3FrameHeader.decode(s);
+            if (!header)
+                return this.emit('error', 'Could not find first frame.');
+            
+            this.emit('format', {
+                formatID: 'mp3',
+                sampleRate: header.samplerate,
+                channelsPerFrame: header.nchannels(),
+                bitrate: header.bitrate,
+                floatingPoint: true
+            });
+            
+            var sentDuration = this.parseDuration(header);
+            stream.advance(off - stream.offset);
+            
+            // if there were no Xing/VBRI tags, guesstimate the duration based on data size and bitrate
+            this.dataSize = 0;
+            if (!sentDuration) {
+                this.on('end', function() {
+                    this.emit('duration', this.dataSize * 8 / header.bitrate * 1000 | 0);
+                });
+            }
+            
+            this.sentInfo = true;
+        }
+        
+        while (stream.available(1)) {
+            var buffer = stream.readSingleBuffer(stream.remainingBytes());
+            this.dataSize += buffer.length;
+            this.emit('data', buffer);
+        }
+    };
+});
+
+module.exports = MP3Demuxer;
+
+},{"./header":5,"./id3":7,"./stream":12}],4:[function(require,module,exports){
+var MP3FrameHeader = require('./header');
+var utils = require('./utils');
+
+function MP3Frame() {
+    this.header = null;                     // MPEG audio header
+    this.options = 0;                       // decoding options (from stream)
+    this.sbsample = utils.makeArray([2, 36, 32]); // synthesis subband filter samples
+    this.overlap = utils.makeArray([2, 32, 18]);  // Layer III block overlap data
+    this.decoders = [];
+}
+
+// included layer decoders are registered here
+MP3Frame.layers = [];
+
+MP3Frame.prototype.decode = function(stream) {
+    if (!this.header || !(this.header.flags & MP3FrameHeader.FLAGS.INCOMPLETE))
+        this.header = MP3FrameHeader.decode(stream);
+
+    this.header.flags &= ~MP3FrameHeader.FLAGS.INCOMPLETE;
+    
+    // make an instance of the decoder for this layer if needed
+    var decoder = this.decoders[this.header.layer - 1];
+    if (!decoder) {
+        var Layer = MP3Frame.layers[this.header.layer];
+        if (!Layer)
+            throw new Error("Layer " + this.header.layer + " is not supported.");
+            
+        decoder = this.decoders[this.header.layer - 1] = new Layer();
+    }
+    
+    decoder.decode(stream, this);
+};
+
+module.exports = MP3Frame;
+
+},{"./header":5,"./utils":15}],5:[function(require,module,exports){
+var AV = (window.AV);
+
+function MP3FrameHeader() {
+    this.layer          = 0; // audio layer (1, 2, or 3)
+    this.mode           = 0; // channel mode (see above)
+    this.mode_extension = 0; // additional mode info
+    this.emphasis       = 0; // de-emphasis to use (see above)
+
+    this.bitrate        = 0; // stream bitrate (bps)
+    this.samplerate     = 0; // sampling frequency (Hz)
+
+    this.crc_check      = 0; // frame CRC accumulator
+    this.crc_target     = 0; // final target CRC checksum
+
+    this.flags          = 0; // flags (see above)
+    this.private_bits   = 0; // private bits
+}
+
+const BITRATES = [
+    // MPEG-1
+    [ 0,  32000,  64000,  96000, 128000, 160000, 192000, 224000,  // Layer I
+         256000, 288000, 320000, 352000, 384000, 416000, 448000 ],
+    [ 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  // Layer II
+         128000, 160000, 192000, 224000, 256000, 320000, 384000 ],
+    [ 0,  32000,  40000,  48000,  56000,  64000,  80000,  96000,  // Layer III
+         112000, 128000, 160000, 192000, 224000, 256000, 320000 ],
+
+    // MPEG-2 LSF
+    [ 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  // Layer I
+         128000, 144000, 160000, 176000, 192000, 224000, 256000 ],
+    [ 0,   8000,  16000,  24000,  32000,  40000,  48000,  56000,  // Layers
+          64000,  80000,  96000, 112000, 128000, 144000, 160000 ] // II & III
+];
+
+const SAMPLERATES = [ 
+    44100, 48000, 32000 
+];
+
+MP3FrameHeader.FLAGS = {
+    NPRIVATE_III: 0x0007,   // number of Layer III private bits
+    INCOMPLETE  : 0x0008,   // header but not data is decoded
+
+    PROTECTION  : 0x0010,   // frame has CRC protection
+    COPYRIGHT   : 0x0020,   // frame is copyright
+    ORIGINAL    : 0x0040,   // frame is original (else copy)
+    PADDING     : 0x0080,   // frame has additional slot
+
+    I_STEREO    : 0x0100,   // uses intensity joint stereo
+    MS_STEREO   : 0x0200,   // uses middle/side joint stereo
+    FREEFORMAT  : 0x0400,   // uses free format bitrate
+
+    LSF_EXT     : 0x1000,   // lower sampling freq. extension
+    MC_EXT      : 0x2000,   // multichannel audio extension
+    MPEG_2_5_EXT: 0x4000    // MPEG 2.5 (unofficial) extension
+};
+
+const PRIVATE = {
+    HEADER  : 0x0100, // header private bit
+    III     : 0x001f  // Layer III private bits (up to 5)
+};
+
+MP3FrameHeader.MODE = {
+    SINGLE_CHANNEL: 0, // single channel
+    DUAL_CHANNEL  : 1, // dual channel
+    JOINT_STEREO  : 2, // joint (MS/intensity) stereo
+    STEREO        : 3  // normal LR stereo
+};
+
+const EMPHASIS = {
+    NONE      : 0, // no emphasis
+    _50_15_US : 1, // 50/15 microseconds emphasis
+    CCITT_J_17: 3, // CCITT J.17 emphasis
+    RESERVED  : 2  // unknown emphasis
+};
+
+MP3FrameHeader.BUFFER_GUARD = 8;
+MP3FrameHeader.BUFFER_MDLEN = (511 + 2048 + MP3FrameHeader.BUFFER_GUARD);
+
+MP3FrameHeader.prototype.copy = function() {
+    var clone = new MP3FrameHeader();
+    var keys = Object.keys(this);
+    
+    for (var key in keys) {
+        clone[key] = this[key];
+    }
+    
+    return clone;
+}
+
+MP3FrameHeader.prototype.nchannels = function () {
+    return this.mode === 0 ? 1 : 2;
+};
+
+MP3FrameHeader.prototype.nbsamples = function() {
+    return (this.layer === 1 ? 12 : ((this.layer === 3 && (this.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 18 : 36));
+};
+
+MP3FrameHeader.prototype.framesize = function() {
+    if (this.bitrate === 0)
+        return null;
+    
+    var padding = (this.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0);
+    switch (this.layer) {
+        case 1:
+            var size = (this.bitrate * 12) / this.samplerate | 0;
+            return (size + padding) * 4;
+            
+        case 2:
+            var size = (this.bitrate * 144) / this.samplerate | 0;
+            return size + padding;
+            
+        case 3:
+        default:
+            var lsf = this.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0;
+            var size = (this.bitrate * 144) / (this.samplerate << lsf) | 0;
+            return size + padding;
+    }
+};
+
+MP3FrameHeader.prototype.decode = function(stream) {
+    this.flags        = 0;
+    this.private_bits = 0;
+    
+    // syncword 
+    stream.advance(11);
+
+    // MPEG 2.5 indicator (really part of syncword) 
+    if (stream.read(1) === 0)
+        this.flags |= MP3FrameHeader.FLAGS.MPEG_2_5_EXT;
+
+    // ID 
+    if (stream.read(1) === 0) {
+        this.flags |= MP3FrameHeader.FLAGS.LSF_EXT;
+    } else if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) {
+        throw new AV.UnderflowError(); // LOSTSYNC
+    }
+
+    // layer 
+    this.layer = 4 - stream.read(2);
+
+    if (this.layer === 4)
+        throw new Error('Invalid layer');
+
+    // protection_bit 
+    if (stream.read(1) === 0)
+        this.flags |= MP3FrameHeader.FLAGS.PROTECTION;
+
+    // bitrate_index 
+    var index = stream.read(4);
+    if (index === 15)
+        throw new Error('Invalid bitrate');
+
+    if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) {
+        this.bitrate = BITRATES[3 + (this.layer >> 1)][index];
+    } else {
+        this.bitrate = BITRATES[this.layer - 1][index];
+    }
+
+    // sampling_frequency 
+    index = stream.read(2);
+    if (index === 3)
+        throw new Error('Invalid sampling frequency');
+
+    this.samplerate = SAMPLERATES[index];
+
+    if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) {
+        this.samplerate /= 2;
+
+        if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)
+            this.samplerate /= 2;
+    }
+
+    // padding_bit 
+    if (stream.read(1))
+        this.flags |= MP3FrameHeader.FLAGS.PADDING;
+
+    // private_bit 
+    if (stream.read(1))
+        this.private_bits |= PRIVATE.HEADER;
+
+    // mode 
+    this.mode = 3 - stream.read(2);
+
+    // mode_extension 
+    this.mode_extension = stream.read(2);
+
+    // copyright 
+    if (stream.read(1))
+        this.flags |= MP3FrameHeader.FLAGS.COPYRIGHT;
+
+    // original/copy 
+    if (stream.read(1))
+        this.flags |= MP3FrameHeader.FLAGS.ORIGINAL;
+
+    // emphasis 
+    this.emphasis = stream.read(2);
+
+    // crc_check 
+    if (this.flags & MP3FrameHeader.FLAGS.PROTECTION)
+        this.crc_target = stream.read(16);
+};
+
+MP3FrameHeader.decode = function(stream) {
+    // synchronize
+    var ptr = stream.next_frame;
+    var syncing = true;
+    var header = null;
+    
+    while (syncing) {
+        syncing = false;
+        
+        if (stream.sync) {
+            if (!stream.available(MP3FrameHeader.BUFFER_GUARD)) {
+                stream.next_frame = ptr;
+                throw new AV.UnderflowError();
+            } else if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) {
+                // mark point where frame sync word was expected
+                stream.this_frame = ptr;
+                stream.next_frame = ptr + 1;
+                throw new AV.UnderflowError(); // LOSTSYNC
+            }
+        } else {
+            stream.seek(ptr * 8);
+            if (!stream.doSync())
+                throw new AV.UnderflowError();
+                
+            ptr = stream.nextByte();
+        }
+        
+        // begin processing
+        stream.this_frame = ptr;
+        stream.next_frame = ptr + 1; // possibly bogus sync word
+        
+        stream.seek(stream.this_frame * 8);
+        
+        header = new MP3FrameHeader();
+        header.decode(stream);
+        
+        if (header.bitrate === 0) {
+            if (stream.freerate === 0 || !stream.sync || (header.layer === 3 && stream.freerate > 640000))
+                MP3FrameHeader.free_bitrate(stream, header);
+            
+            header.bitrate = stream.freerate;
+            header.flags |= MP3FrameHeader.FLAGS.FREEFORMAT;
+        }
+        
+        // calculate beginning of next frame
+        var pad_slot = (header.flags & MP3FrameHeader.FLAGS.PADDING) ? 1 : 0;
+        
+        if (header.layer === 1) {
+            var N = (((12 * header.bitrate / header.samplerate) << 0) + pad_slot) * 4;
+        } else {
+            var slots_per_frame = (header.layer === 3 && (header.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 72 : 144;
+            var N = ((slots_per_frame * header.bitrate / header.samplerate) << 0) + pad_slot;
+        }
+        
+        // verify there is enough data left in buffer to decode this frame
+        if (!stream.available(N + MP3FrameHeader.BUFFER_GUARD)) {
+            stream.next_frame = stream.this_frame;
+            throw new AV.UnderflowError();
+        }
+        
+        stream.next_frame = stream.this_frame + N;
+        
+        if (!stream.sync) {
+            // check that a valid frame header follows this frame
+            ptr = stream.next_frame;
+            
+            if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) {
+                ptr = stream.next_frame = stream.this_frame + 1;
+
+                // emulating 'goto sync'
+                syncing = true;
+                continue;
+            }
+            
+            stream.sync = true;
+        }
+    }
+    
+    header.flags |= MP3FrameHeader.FLAGS.INCOMPLETE;
+    return header;
+};
+
+MP3FrameHeader.free_bitrate = function(stream, header) {
+    var pad_slot = header.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0,
+        slots_per_frame = header.layer === 3 && header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 72 : 144;
+    
+    var start = stream.offset();
+    var rate = 0;
+        
+    while (stream.doSync()) {
+        var peek_header = header.copy();
+        var peek_stream = stream.copy();
+        
+        if (peek_header.decode(peek_stream) && peek_header.layer === header.layer && peek_header.samplerate === header.samplerate) {
+            var N = stream.nextByte() - stream.this_frame;
+            
+            if (header.layer === 1) {
+                rate = header.samplerate * (N - 4 * pad_slot + 4) / 48 / 1000 | 0;
+            } else {
+                rate = header.samplerate * (N - pad_slot + 1) / slots_per_frame / 1000 | 0;
+            }
+            
+            if (rate >= 8)
+                break;
+        }
+        
+        stream.advance(8);
+    }
+    
+    stream.seek(start);
+    
+    if (rate < 8 || (header.layer === 3 && rate > 640))
+        throw new AV.UnderflowError(); // LOSTSYNC
+    
+    stream.freerate = rate * 1000;
+};
+
+module.exports = MP3FrameHeader;
+
+},{}],6:[function(require,module,exports){
+/*
+ * These are the Huffman code words for Layer III.
+ * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
+ *
+ * These tables support decoding up to 4 Huffman code bits at a time.
+ */
+
+var PTR = function(offs, bits) {
+    return {
+        final: 0,
+        ptr: {
+            bits:   bits,
+            offset: offs
+        }
+    };
+};
+
+var huffquad_V = function (v, w, x, y, hlen) {
+    return {
+        final: 1,
+        value: {
+            v: v,
+            w: w,
+            x: x,
+            y: y,
+            hlen: hlen
+        }
+    };
+};
+
+const hufftabA = [
+  /* 0000 */ PTR(16, 2),
+  /* 0001 */ PTR(20, 2),
+  /* 0010 */ PTR(24, 1),
+  /* 0011 */ PTR(26, 1),
+  /* 0100 */ huffquad_V(0, 0, 1, 0, 4),
+  /* 0101 */ huffquad_V(0, 0, 0, 1, 4),
+  /* 0110 */ huffquad_V(0, 1, 0, 0, 4),
+  /* 0111 */ huffquad_V(1, 0, 0, 0, 4),
+  /* 1000 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1001 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1010 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1011 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1100 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1101 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1110 */ huffquad_V(0, 0, 0, 0, 1),
+  /* 1111 */ huffquad_V(0, 0, 0, 0, 1),
+
+  /* 0000 ... */
+  /* 00   */ huffquad_V(1, 0, 1, 1, 2),	/* 16 */
+  /* 01   */ huffquad_V(1, 1, 1, 1, 2),
+  /* 10   */ huffquad_V(1, 1, 0, 1, 2),
+  /* 11   */ huffquad_V(1, 1, 1, 0, 2),
+
+  /* 0001 ... */
+  /* 00   */ huffquad_V(0, 1, 1, 1, 2),	/* 20 */
+  /* 01   */ huffquad_V(0, 1, 0, 1, 2),
+  /* 10   */ huffquad_V(1, 0, 0, 1, 1),
+  /* 11   */ huffquad_V(1, 0, 0, 1, 1),
+
+  /* 0010 ... */
+  /* 0    */ huffquad_V(0, 1, 1, 0, 1),	/* 24 */
+  /* 1    */ huffquad_V(0, 0, 1, 1, 1),
+
+  /* 0011 ... */
+  /* 0    */ huffquad_V(1, 0, 1, 0, 1),	/* 26 */
+  /* 1    */ huffquad_V(1, 1, 0, 0, 1)
+];
+
+const hufftabB = [
+  /* 0000 */ huffquad_V(1, 1, 1, 1, 4),
+  /* 0001 */ huffquad_V(1, 1, 1, 0, 4),
+  /* 0010 */ huffquad_V(1, 1, 0, 1, 4),
+  /* 0011 */ huffquad_V(1, 1, 0, 0, 4),
+  /* 0100 */ huffquad_V(1, 0, 1, 1, 4),
+  /* 0101 */ huffquad_V(1, 0, 1, 0, 4),
+  /* 0110 */ huffquad_V(1, 0, 0, 1, 4),
+  /* 0111 */ huffquad_V(1, 0, 0, 0, 4),
+  /* 1000 */ huffquad_V(0, 1, 1, 1, 4),
+  /* 1001 */ huffquad_V(0, 1, 1, 0, 4),
+  /* 1010 */ huffquad_V(0, 1, 0, 1, 4),
+  /* 1011 */ huffquad_V(0, 1, 0, 0, 4),
+  /* 1100 */ huffquad_V(0, 0, 1, 1, 4),
+  /* 1101 */ huffquad_V(0, 0, 1, 0, 4),
+  /* 1110 */ huffquad_V(0, 0, 0, 1, 4),
+  /* 1111 */ huffquad_V(0, 0, 0, 0, 4)
+];
+
+var V = function (x, y, hlen) {
+    return {
+        final: 1,
+        value: {
+            x: x,
+            y: y,
+            hlen: hlen
+        }
+    };
+};
+
+const hufftab0 = [
+  /*      */ V(0, 0, 0)
+];
+
+const hufftab1 = [
+  /* 000  */ V(1, 1, 3),
+  /* 001  */ V(0, 1, 3),
+  /* 010  */ V(1, 0, 2),
+  /* 011  */ V(1, 0, 2),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1)
+];
+
+const hufftab2 = [
+  /* 000  */ PTR(8, 3),
+  /* 001  */ V(1, 1, 3),
+  /* 010  */ V(0, 1, 3),
+  /* 011  */ V(1, 0, 3),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1),
+
+  /* 000 ... */
+  /* 000  */ V(2, 2, 3),	/* 8 */
+  /* 001  */ V(0, 2, 3),
+  /* 010  */ V(1, 2, 2),
+  /* 011  */ V(1, 2, 2),
+  /* 100  */ V(2, 1, 2),
+  /* 101  */ V(2, 1, 2),
+  /* 110  */ V(2, 0, 2),
+  /* 111  */ V(2, 0, 2)
+];
+
+const hufftab3 = [
+  /* 000  */ PTR(8, 3),
+  /* 001  */ V(1, 0, 3),
+  /* 010  */ V(1, 1, 2),
+  /* 011  */ V(1, 1, 2),
+  /* 100  */ V(0, 1, 2),
+  /* 101  */ V(0, 1, 2),
+  /* 110  */ V(0, 0, 2),
+  /* 111  */ V(0, 0, 2),
+
+  /* 000 ... */
+  /* 000  */ V(2, 2, 3),	/* 8 */
+  /* 001  */ V(0, 2, 3),
+  /* 010  */ V(1, 2, 2),
+  /* 011  */ V(1, 2, 2),
+  /* 100  */ V(2, 1, 2),
+  /* 101  */ V(2, 1, 2),
+  /* 110  */ V(2, 0, 2),
+  /* 111  */ V(2, 0, 2)
+];
+
+const hufftab5 = [
+  /* 000  */ PTR(8, 4),
+  /* 001  */ V(1, 1, 3),
+  /* 010  */ V(0, 1, 3),
+  /* 011  */ V(1, 0, 3),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1),
+
+  /* 000 ... */
+  /* 0000 */ PTR(24, 1),	/* 8 */
+  /* 0001 */ V(3, 2, 4),
+  /* 0010 */ V(3, 1, 3),
+  /* 0011 */ V(3, 1, 3),
+  /* 0100 */ V(1, 3, 4),
+  /* 0101 */ V(0, 3, 4),
+  /* 0110 */ V(3, 0, 4),
+  /* 0111 */ V(2, 2, 4),
+  /* 1000 */ V(1, 2, 3),
+  /* 1001 */ V(1, 2, 3),
+  /* 1010 */ V(2, 1, 3),
+  /* 1011 */ V(2, 1, 3),
+  /* 1100 */ V(0, 2, 3),
+  /* 1101 */ V(0, 2, 3),
+  /* 1110 */ V(2, 0, 3),
+  /* 1111 */ V(2, 0, 3),
+
+  /* 000 0000 ... */
+  /* 0    */ V(3, 3, 1),	/* 24 */
+  /* 1    */ V(2, 3, 1)
+];
+
+const hufftab6 = [
+  /* 0000 */ PTR(16, 3),
+  /* 0001 */ PTR(24, 1),
+  /* 0010 */ PTR(26, 1),
+  /* 0011 */ V(1, 2, 4),
+  /* 0100 */ V(2, 1, 4),
+  /* 0101 */ V(2, 0, 4),
+  /* 0110 */ V(0, 1, 3),
+  /* 0111 */ V(0, 1, 3),
+  /* 1000 */ V(1, 1, 2),
+  /* 1001 */ V(1, 1, 2),
+  /* 1010 */ V(1, 1, 2),
+  /* 1011 */ V(1, 1, 2),
+  /* 1100 */ V(1, 0, 3),
+  /* 1101 */ V(1, 0, 3),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 000  */ V(3, 3, 3),	/* 16 */
+  /* 001  */ V(0, 3, 3),
+  /* 010  */ V(2, 3, 2),
+  /* 011  */ V(2, 3, 2),
+  /* 100  */ V(3, 2, 2),
+  /* 101  */ V(3, 2, 2),
+  /* 110  */ V(3, 0, 2),
+  /* 111  */ V(3, 0, 2),
+
+  /* 0001 ... */
+  /* 0    */ V(1, 3, 1),	/* 24 */
+  /* 1    */ V(3, 1, 1),
+
+  /* 0010 ... */
+  /* 0    */ V(2, 2, 1),	/* 26 */
+  /* 1    */ V(0, 2, 1)
+];
+
+const hufftab7 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 2),
+  /* 0011 */ V(1, 1, 4),
+  /* 0100 */ V(0, 1, 3),
+  /* 0101 */ V(0, 1, 3),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(52, 2),	/* 16 */
+  /* 0001 */ PTR(56, 1),
+  /* 0010 */ PTR(58, 1),
+  /* 0011 */ V(1, 5, 4),
+  /* 0100 */ V(5, 1, 4),
+  /* 0101 */ PTR(60, 1),
+  /* 0110 */ V(5, 0, 4),
+  /* 0111 */ PTR(62, 1),
+  /* 1000 */ V(2, 4, 4),
+  /* 1001 */ V(4, 2, 4),
+  /* 1010 */ V(1, 4, 3),
+  /* 1011 */ V(1, 4, 3),
+  /* 1100 */ V(4, 1, 3),
+  /* 1101 */ V(4, 1, 3),
+  /* 1110 */ V(4, 0, 3),
+  /* 1111 */ V(4, 0, 3),
+
+  /* 0001 ... */
+  /* 0000 */ V(0, 4, 4),	/* 32 */
+  /* 0001 */ V(2, 3, 4),
+  /* 0010 */ V(3, 2, 4),
+  /* 0011 */ V(0, 3, 4),
+  /* 0100 */ V(1, 3, 3),
+  /* 0101 */ V(1, 3, 3),
+  /* 0110 */ V(3, 1, 3),
+  /* 0111 */ V(3, 1, 3),
+  /* 1000 */ V(3, 0, 3),
+  /* 1001 */ V(3, 0, 3),
+  /* 1010 */ V(2, 2, 3),
+  /* 1011 */ V(2, 2, 3),
+  /* 1100 */ V(1, 2, 2),
+  /* 1101 */ V(1, 2, 2),
+  /* 1110 */ V(1, 2, 2),
+  /* 1111 */ V(1, 2, 2),
+
+  /* 0010 ... */
+  /* 00   */ V(2, 1, 1),	/* 48 */
+  /* 01   */ V(2, 1, 1),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(5, 5, 2),	/* 52 */
+  /* 01   */ V(4, 5, 2),
+  /* 10   */ V(5, 4, 2),
+  /* 11   */ V(5, 3, 2),
+
+  /* 0000 0001 ... */
+  /* 0    */ V(3, 5, 1),	/* 56 */
+  /* 1    */ V(4, 4, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(2, 5, 1),	/* 58 */
+  /* 1    */ V(5, 2, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(0, 5, 1),	/* 60 */
+  /* 1    */ V(3, 4, 1),
+
+  /* 0000 0111 ... */
+  /* 0    */ V(4, 3, 1),	/* 62 */
+  /* 1    */ V(3, 3, 1)
+];
+
+const hufftab8 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ V(1, 2, 4),
+  /* 0011 */ V(2, 1, 4),
+  /* 0100 */ V(1, 1, 2),
+  /* 0101 */ V(1, 1, 2),
+  /* 0110 */ V(1, 1, 2),
+  /* 0111 */ V(1, 1, 2),
+  /* 1000 */ V(0, 1, 3),
+  /* 1001 */ V(0, 1, 3),
+  /* 1010 */ V(1, 0, 3),
+  /* 1011 */ V(1, 0, 3),
+  /* 1100 */ V(0, 0, 2),
+  /* 1101 */ V(0, 0, 2),
+  /* 1110 */ V(0, 0, 2),
+  /* 1111 */ V(0, 0, 2),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(48, 3),	/* 16 */
+  /* 0001 */ PTR(56, 2),
+  /* 0010 */ PTR(60, 1),
+  /* 0011 */ V(1, 5, 4),
+  /* 0100 */ V(5, 1, 4),
+  /* 0101 */ PTR(62, 1),
+  /* 0110 */ PTR(64, 1),
+  /* 0111 */ V(2, 4, 4),
+  /* 1000 */ V(4, 2, 4),
+  /* 1001 */ V(1, 4, 4),
+  /* 1010 */ V(4, 1, 3),
+  /* 1011 */ V(4, 1, 3),
+  /* 1100 */ V(0, 4, 4),
+  /* 1101 */ V(4, 0, 4),
+  /* 1110 */ V(2, 3, 4),
+  /* 1111 */ V(3, 2, 4),
+
+  /* 0001 ... */
+  /* 0000 */ V(1, 3, 4),	/* 32 */
+  /* 0001 */ V(3, 1, 4),
+  /* 0010 */ V(0, 3, 4),
+  /* 0011 */ V(3, 0, 4),
+  /* 0100 */ V(2, 2, 2),
+  /* 0101 */ V(2, 2, 2),
+  /* 0110 */ V(2, 2, 2),
+  /* 0111 */ V(2, 2, 2),
+  /* 1000 */ V(0, 2, 2),
+  /* 1001 */ V(0, 2, 2),
+  /* 1010 */ V(0, 2, 2),
+  /* 1011 */ V(0, 2, 2),
+  /* 1100 */ V(2, 0, 2),
+  /* 1101 */ V(2, 0, 2),
+  /* 1110 */ V(2, 0, 2),
+  /* 1111 */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(5, 5, 3),	/* 48 */
+  /* 001  */ V(5, 4, 3),
+  /* 010  */ V(4, 5, 2),
+  /* 011  */ V(4, 5, 2),
+  /* 100  */ V(5, 3, 1),
+  /* 101  */ V(5, 3, 1),
+  /* 110  */ V(5, 3, 1),
+  /* 111  */ V(5, 3, 1),
+
+  /* 0000 0001 ... */
+  /* 00   */ V(3, 5, 2),	/* 56 */
+  /* 01   */ V(4, 4, 2),
+  /* 10   */ V(2, 5, 1),
+  /* 11   */ V(2, 5, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(5, 2, 1),	/* 60 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(3, 4, 1),	/* 62 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0000 0110 ... */
+  /* 0    */ V(5, 0, 1),	/* 64 */
+  /* 1    */ V(3, 3, 1)
+];
+
+const hufftab9 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 3),
+  /* 0010 */ PTR(40, 2),
+  /* 0011 */ PTR(44, 2),
+  /* 0100 */ PTR(48, 1),
+  /* 0101 */ V(1, 2, 4),
+  /* 0110 */ V(2, 1, 4),
+  /* 0111 */ V(2, 0, 4),
+  /* 1000 */ V(1, 1, 3),
+  /* 1001 */ V(1, 1, 3),
+  /* 1010 */ V(0, 1, 3),
+  /* 1011 */ V(0, 1, 3),
+  /* 1100 */ V(1, 0, 3),
+  /* 1101 */ V(1, 0, 3),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(50, 1),	/* 16 */
+  /* 0001 */ V(3, 5, 4),
+  /* 0010 */ V(5, 3, 4),
+  /* 0011 */ PTR(52, 1),
+  /* 0100 */ V(4, 4, 4),
+  /* 0101 */ V(2, 5, 4),
+  /* 0110 */ V(5, 2, 4),
+  /* 0111 */ V(1, 5, 4),
+  /* 1000 */ V(5, 1, 3),
+  /* 1001 */ V(5, 1, 3),
+  /* 1010 */ V(3, 4, 3),
+  /* 1011 */ V(3, 4, 3),
+  /* 1100 */ V(4, 3, 3),
+  /* 1101 */ V(4, 3, 3),
+  /* 1110 */ V(5, 0, 4),
+  /* 1111 */ V(0, 4, 4),
+
+  /* 0001 ... */
+  /* 000  */ V(2, 4, 3),	/* 32 */
+  /* 001  */ V(4, 2, 3),
+  /* 010  */ V(3, 3, 3),
+  /* 011  */ V(4, 0, 3),
+  /* 100  */ V(1, 4, 2),
+  /* 101  */ V(1, 4, 2),
+  /* 110  */ V(4, 1, 2),
+  /* 111  */ V(4, 1, 2),
+
+  /* 0010 ... */
+  /* 00   */ V(2, 3, 2),	/* 40 */
+  /* 01   */ V(3, 2, 2),
+  /* 10   */ V(1, 3, 1),
+  /* 11   */ V(1, 3, 1),
+
+  /* 0011 ... */
+  /* 00   */ V(3, 1, 1),	/* 44 */
+  /* 01   */ V(3, 1, 1),
+  /* 10   */ V(0, 3, 2),
+  /* 11   */ V(3, 0, 2),
+
+  /* 0100 ... */
+  /* 0    */ V(2, 2, 1),	/* 48 */
+  /* 1    */ V(0, 2, 1),
+
+  /* 0000 0000 ... */
+  /* 0    */ V(5, 5, 1),	/* 50 */
+  /* 1    */ V(4, 5, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(5, 4, 1),	/* 52 */
+  /* 1    */ V(0, 5, 1)
+];
+
+const hufftab10 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 2),
+  /* 0011 */ V(1, 1, 4),
+  /* 0100 */ V(0, 1, 3),
+  /* 0101 */ V(0, 1, 3),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(52, 3),	/* 16 */
+  /* 0001 */ PTR(60, 2),
+  /* 0010 */ PTR(64, 3),
+  /* 0011 */ PTR(72, 1),
+  /* 0100 */ PTR(74, 2),
+  /* 0101 */ PTR(78, 2),
+  /* 0110 */ PTR(82, 2),
+  /* 0111 */ V(1, 7, 4),
+  /* 1000 */ V(7, 1, 4),
+  /* 1001 */ PTR(86, 1),
+  /* 1010 */ PTR(88, 2),
+  /* 1011 */ PTR(92, 2),
+  /* 1100 */ V(1, 6, 4),
+  /* 1101 */ V(6, 1, 4),
+  /* 1110 */ V(6, 0, 4),
+  /* 1111 */ PTR(96, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(98, 1),	/* 32 */
+  /* 0001 */ PTR(100, 1),
+  /* 0010 */ V(1, 4, 4),
+  /* 0011 */ V(4, 1, 4),
+  /* 0100 */ V(4, 0, 4),
+  /* 0101 */ V(2, 3, 4),
+  /* 0110 */ V(3, 2, 4),
+  /* 0111 */ V(0, 3, 4),
+  /* 1000 */ V(1, 3, 3),
+  /* 1001 */ V(1, 3, 3),
+  /* 1010 */ V(3, 1, 3),
+  /* 1011 */ V(3, 1, 3),
+  /* 1100 */ V(3, 0, 3),
+  /* 1101 */ V(3, 0, 3),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0010 ... */
+  /* 00   */ V(1, 2, 2),	/* 48 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(7, 7, 3),	/* 52 */
+  /* 001  */ V(6, 7, 3),
+  /* 010  */ V(7, 6, 3),
+  /* 011  */ V(5, 7, 3),
+  /* 100  */ V(7, 5, 3),
+  /* 101  */ V(6, 6, 3),
+  /* 110  */ V(4, 7, 2),
+  /* 111  */ V(4, 7, 2),
+
+  /* 0000 0001 ... */
+  /* 00   */ V(7, 4, 2),	/* 60 */
+  /* 01   */ V(5, 6, 2),
+  /* 10   */ V(6, 5, 2),
+  /* 11   */ V(3, 7, 2),
+
+  /* 0000 0010 ... */
+  /* 000  */ V(7, 3, 2),	/* 64 */
+  /* 001  */ V(7, 3, 2),
+  /* 010  */ V(4, 6, 2),
+  /* 011  */ V(4, 6, 2),
+  /* 100  */ V(5, 5, 3),
+  /* 101  */ V(5, 4, 3),
+  /* 110  */ V(6, 3, 2),
+  /* 111  */ V(6, 3, 2),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(2, 7, 1),	/* 72 */
+  /* 1    */ V(7, 2, 1),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(6, 4, 2),	/* 74 */
+  /* 01   */ V(0, 7, 2),
+  /* 10   */ V(7, 0, 1),
+  /* 11   */ V(7, 0, 1),
+
+  /* 0000 0101 ... */
+  /* 00   */ V(6, 2, 1),	/* 78 */
+  /* 01   */ V(6, 2, 1),
+  /* 10   */ V(4, 5, 2),
+  /* 11   */ V(3, 5, 2),
+
+  /* 0000 0110 ... */
+  /* 00   */ V(0, 6, 1),	/* 82 */
+  /* 01   */ V(0, 6, 1),
+  /* 10   */ V(5, 3, 2),
+  /* 11   */ V(4, 4, 2),
+
+  /* 0000 1001 ... */
+  /* 0    */ V(3, 6, 1),	/* 86 */
+  /* 1    */ V(2, 6, 1),
+
+  /* 0000 1010 ... */
+  /* 00   */ V(2, 5, 2),	/* 88 */
+  /* 01   */ V(5, 2, 2),
+  /* 10   */ V(1, 5, 1),
+  /* 11   */ V(1, 5, 1),
+
+  /* 0000 1011 ... */
+  /* 00   */ V(5, 1, 1),	/* 92 */
+  /* 01   */ V(5, 1, 1),
+  /* 10   */ V(3, 4, 2),
+  /* 11   */ V(4, 3, 2),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(0, 5, 1),	/* 96 */
+  /* 1    */ V(5, 0, 1),
+
+  /* 0001 0000 ... */
+  /* 0    */ V(2, 4, 1),	/* 98 */
+  /* 1    */ V(4, 2, 1),
+
+  /* 0001 0001 ... */
+  /* 0    */ V(3, 3, 1),	/* 100 */
+  /* 1    */ V(0, 4, 1)
+];
+
+const hufftab11 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 3),
+  /* 0100 */ V(1, 2, 4),
+  /* 0101 */ PTR(72, 1),
+  /* 0110 */ V(1, 1, 3),
+  /* 0111 */ V(1, 1, 3),
+  /* 1000 */ V(0, 1, 3),
+  /* 1001 */ V(0, 1, 3),
+  /* 1010 */ V(1, 0, 3),
+  /* 1011 */ V(1, 0, 3),
+  /* 1100 */ V(0, 0, 2),
+  /* 1101 */ V(0, 0, 2),
+  /* 1110 */ V(0, 0, 2),
+  /* 1111 */ V(0, 0, 2),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(74, 2),	/* 16 */
+  /* 0001 */ PTR(78, 3),
+  /* 0010 */ PTR(86, 2),
+  /* 0011 */ PTR(90, 1),
+  /* 0100 */ PTR(92, 2),
+  /* 0101 */ V(2, 7, 4),
+  /* 0110 */ V(7, 2, 4),
+  /* 0111 */ PTR(96, 1),
+  /* 1000 */ V(7, 1, 3),
+  /* 1001 */ V(7, 1, 3),
+  /* 1010 */ V(1, 7, 4),
+  /* 1011 */ V(7, 0, 4),
+  /* 1100 */ V(3, 6, 4),
+  /* 1101 */ V(6, 3, 4),
+  /* 1110 */ V(6, 0, 4),
+  /* 1111 */ PTR(98, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(100, 1),	/* 32 */
+  /* 0001 */ V(1, 5, 4),
+  /* 0010 */ V(6, 2, 3),
+  /* 0011 */ V(6, 2, 3),
+  /* 0100 */ V(2, 6, 4),
+  /* 0101 */ V(0, 6, 4),
+  /* 0110 */ V(1, 6, 3),
+  /* 0111 */ V(1, 6, 3),
+  /* 1000 */ V(6, 1, 3),
+  /* 1001 */ V(6, 1, 3),
+  /* 1010 */ V(5, 1, 4),
+  /* 1011 */ V(3, 4, 4),
+  /* 1100 */ V(5, 0, 4),
+  /* 1101 */ PTR(102, 1),
+  /* 1110 */ V(2, 4, 4),
+  /* 1111 */ V(4, 2, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(1, 4, 4),	/* 48 */
+  /* 0001 */ V(4, 1, 4),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 3),
+  /* 0101 */ V(2, 3, 3),
+  /* 0110 */ V(3, 2, 3),
+  /* 0111 */ V(3, 2, 3),
+  /* 1000 */ V(1, 3, 2),
+  /* 1001 */ V(1, 3, 2),
+  /* 1010 */ V(1, 3, 2),
+  /* 1011 */ V(1, 3, 2),
+  /* 1100 */ V(3, 1, 2),
+  /* 1101 */ V(3, 1, 2),
+  /* 1110 */ V(3, 1, 2),
+  /* 1111 */ V(3, 1, 2),
+
+  /* 0011 ... */
+  /* 000  */ V(0, 3, 3),	/* 64 */
+  /* 001  */ V(3, 0, 3),
+  /* 010  */ V(2, 2, 2),
+  /* 011  */ V(2, 2, 2),
+  /* 100  */ V(2, 1, 1),
+  /* 101  */ V(2, 1, 1),
+  /* 110  */ V(2, 1, 1),
+  /* 111  */ V(2, 1, 1),
+
+  /* 0101 ... */
+  /* 0    */ V(0, 2, 1),	/* 72 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(7, 7, 2),	/* 74 */
+  /* 01   */ V(6, 7, 2),
+  /* 10   */ V(7, 6, 2),
+  /* 11   */ V(7, 5, 2),
+
+  /* 0000 0001 ... */
+  /* 000  */ V(6, 6, 2),	/* 78 */
+  /* 001  */ V(6, 6, 2),
+  /* 010  */ V(4, 7, 2),
+  /* 011  */ V(4, 7, 2),
+  /* 100  */ V(7, 4, 2),
+  /* 101  */ V(7, 4, 2),
+  /* 110  */ V(5, 7, 3),
+  /* 111  */ V(5, 5, 3),
+
+  /* 0000 0010 ... */
+  /* 00   */ V(5, 6, 2),	/* 86 */
+  /* 01   */ V(6, 5, 2),
+  /* 10   */ V(3, 7, 1),
+  /* 11   */ V(3, 7, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(7, 3, 1),	/* 90 */
+  /* 1    */ V(4, 6, 1),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(4, 5, 2),	/* 92 */
+  /* 01   */ V(5, 4, 2),
+  /* 10   */ V(3, 5, 2),
+  /* 11   */ V(5, 3, 2),
+
+  /* 0000 0111 ... */
+  /* 0    */ V(6, 4, 1),	/* 96 */
+  /* 1    */ V(0, 7, 1),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(4, 4, 1),	/* 98 */
+  /* 1    */ V(2, 5, 1),
+
+  /* 0001 0000 ... */
+  /* 0    */ V(5, 2, 1),	/* 100 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(4, 3, 1),	/* 102 */
+  /* 1    */ V(3, 3, 1)
+];
+
+const hufftab12 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ PTR(68, 3),
+  /* 0101 */ PTR(76, 1),
+  /* 0110 */ V(1, 2, 4),
+  /* 0111 */ V(2, 1, 4),
+  /* 1000 */ PTR(78, 1),
+  /* 1001 */ V(0, 0, 4),
+  /* 1010 */ V(1, 1, 3),
+  /* 1011 */ V(1, 1, 3),
+  /* 1100 */ V(0, 1, 3),
+  /* 1101 */ V(0, 1, 3),
+  /* 1110 */ V(1, 0, 3),
+  /* 1111 */ V(1, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(80, 2),	/* 16 */
+  /* 0001 */ PTR(84, 1),
+  /* 0010 */ PTR(86, 1),
+  /* 0011 */ PTR(88, 1),
+  /* 0100 */ V(5, 6, 4),
+  /* 0101 */ V(3, 7, 4),
+  /* 0110 */ PTR(90, 1),
+  /* 0111 */ V(2, 7, 4),
+  /* 1000 */ V(7, 2, 4),
+  /* 1001 */ V(4, 6, 4),
+  /* 1010 */ V(6, 4, 4),
+  /* 1011 */ V(1, 7, 4),
+  /* 1100 */ V(7, 1, 4),
+  /* 1101 */ PTR(92, 1),
+  /* 1110 */ V(3, 6, 4),
+  /* 1111 */ V(6, 3, 4),
+
+  /* 0001 ... */
+  /* 0000 */ V(4, 5, 4),	/* 32 */
+  /* 0001 */ V(5, 4, 4),
+  /* 0010 */ V(4, 4, 4),
+  /* 0011 */ PTR(94, 1),
+  /* 0100 */ V(2, 6, 3),
+  /* 0101 */ V(2, 6, 3),
+  /* 0110 */ V(6, 2, 3),
+  /* 0111 */ V(6, 2, 3),
+  /* 1000 */ V(6, 1, 3),
+  /* 1001 */ V(6, 1, 3),
+  /* 1010 */ V(1, 6, 4),
+  /* 1011 */ V(6, 0, 4),
+  /* 1100 */ V(3, 5, 4),
+  /* 1101 */ V(5, 3, 4),
+  /* 1110 */ V(2, 5, 4),
+  /* 1111 */ V(5, 2, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(1, 5, 3),	/* 48 */
+  /* 0001 */ V(1, 5, 3),
+  /* 0010 */ V(5, 1, 3),
+  /* 0011 */ V(5, 1, 3),
+  /* 0100 */ V(3, 4, 3),
+  /* 0101 */ V(3, 4, 3),
+  /* 0110 */ V(4, 3, 3),
+  /* 0111 */ V(4, 3, 3),
+  /* 1000 */ V(5, 0, 4),
+  /* 1001 */ V(0, 4, 4),
+  /* 1010 */ V(2, 4, 3),
+  /* 1011 */ V(2, 4, 3),
+  /* 1100 */ V(4, 2, 3),
+  /* 1101 */ V(4, 2, 3),
+  /* 1110 */ V(1, 4, 3),
+  /* 1111 */ V(1, 4, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(3, 3, 2),	/* 64 */
+  /* 01   */ V(4, 1, 2),
+  /* 10   */ V(2, 3, 2),
+  /* 11   */ V(3, 2, 2),
+
+  /* 0100 ... */
+  /* 000  */ V(4, 0, 3),	/* 68 */
+  /* 001  */ V(0, 3, 3),
+  /* 010  */ V(3, 0, 2),
+  /* 011  */ V(3, 0, 2),
+  /* 100  */ V(1, 3, 1),
+  /* 101  */ V(1, 3, 1),
+  /* 110  */ V(1, 3, 1),
+  /* 111  */ V(1, 3, 1),
+
+  /* 0101 ... */
+  /* 0    */ V(3, 1, 1),	/* 76 */
+  /* 1    */ V(2, 2, 1),
+
+  /* 1000 ... */
+  /* 0    */ V(0, 2, 1),	/* 78 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(7, 7, 2),	/* 80 */
+  /* 01   */ V(6, 7, 2),
+  /* 10   */ V(7, 6, 1),
+  /* 11   */ V(7, 6, 1),
+
+  /* 0000 0001 ... */
+  /* 0    */ V(5, 7, 1),	/* 84 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(6, 6, 1),	/* 86 */
+  /* 1    */ V(4, 7, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(7, 4, 1),	/* 88 */
+  /* 1    */ V(6, 5, 1),
+
+  /* 0000 0110 ... */
+  /* 0    */ V(7, 3, 1),	/* 90 */
+  /* 1    */ V(5, 5, 1),
+
+  /* 0000 1101 ... */
+  /* 0    */ V(0, 7, 1),	/* 92 */
+  /* 1    */ V(7, 0, 1),
+
+  /* 0001 0011 ... */
+  /* 0    */ V(0, 6, 1),	/* 94 */
+  /* 1    */ V(0, 5, 1)
+];
+
+const hufftab13 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ V(1, 1, 4),
+  /* 0101 */ V(0, 1, 4),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(68, 4),	/* 16 */
+  /* 0001 */ PTR(84, 4),
+  /* 0010 */ PTR(100, 4),
+  /* 0011 */ PTR(116, 4),
+  /* 0100 */ PTR(132, 4),
+  /* 0101 */ PTR(148, 4),
+  /* 0110 */ PTR(164, 3),
+  /* 0111 */ PTR(172, 3),
+  /* 1000 */ PTR(180, 3),
+  /* 1001 */ PTR(188, 3),
+  /* 1010 */ PTR(196, 3),
+  /* 1011 */ PTR(204, 3),
+  /* 1100 */ PTR(212, 1),
+  /* 1101 */ PTR(214, 2),
+  /* 1110 */ PTR(218, 3),
+  /* 1111 */ PTR(226, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(228, 2),	/* 32 */
+  /* 0001 */ PTR(232, 2),
+  /* 0010 */ PTR(236, 2),
+  /* 0011 */ PTR(240, 2),
+  /* 0100 */ V(8, 1, 4),
+  /* 0101 */ PTR(244, 1),
+  /* 0110 */ PTR(246, 1),
+  /* 0111 */ PTR(248, 1),
+  /* 1000 */ PTR(250, 2),
+  /* 1001 */ PTR(254, 1),
+  /* 1010 */ V(1, 5, 4),
+  /* 1011 */ V(5, 1, 4),
+  /* 1100 */ PTR(256, 1),
+  /* 1101 */ PTR(258, 1),
+  /* 1110 */ PTR(260, 1),
+  /* 1111 */ V(1, 4, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(4, 1, 3),	/* 48 */
+  /* 0001 */ V(4, 1, 3),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 4),
+  /* 0101 */ V(3, 2, 4),
+  /* 0110 */ V(1, 3, 3),
+  /* 0111 */ V(1, 3, 3),
+  /* 1000 */ V(3, 1, 3),
+  /* 1001 */ V(3, 1, 3),
+  /* 1010 */ V(0, 3, 3),
+  /* 1011 */ V(0, 3, 3),
+  /* 1100 */ V(3, 0, 3),
+  /* 1101 */ V(3, 0, 3),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(1, 2, 2),	/* 64 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 0000 */ PTR(262, 4),	/* 68 */
+  /* 0001 */ PTR(278, 4),
+  /* 0010 */ PTR(294, 4),
+  /* 0011 */ PTR(310, 3),
+  /* 0100 */ PTR(318, 2),
+  /* 0101 */ PTR(322, 2),
+  /* 0110 */ PTR(326, 3),
+  /* 0111 */ PTR(334, 2),
+  /* 1000 */ PTR(338, 1),
+  /* 1001 */ PTR(340, 2),
+  /* 1010 */ PTR(344, 2),
+  /* 1011 */ PTR(348, 2),
+  /* 1100 */ PTR(352, 2),
+  /* 1101 */ PTR(356, 2),
+  /* 1110 */ V(1, 15, 4),
+  /* 1111 */ V(15, 1, 4),
+
+  /* 0000 0001 ... */
+  /* 0000 */ V(15, 0, 4),	/* 84 */
+  /* 0001 */ PTR(360, 1),
+  /* 0010 */ PTR(362, 1),
+  /* 0011 */ PTR(364, 1),
+  /* 0100 */ V(14, 2, 4),
+  /* 0101 */ PTR(366, 1),
+  /* 0110 */ V(1, 14, 4),
+  /* 0111 */ V(14, 1, 4),
+  /* 1000 */ PTR(368, 1),
+  /* 1001 */ PTR(370, 1),
+  /* 1010 */ PTR(372, 1),
+  /* 1011 */ PTR(374, 1),
+  /* 1100 */ PTR(376, 1),
+  /* 1101 */ PTR(378, 1),
+  /* 1110 */ V(12, 6, 4),
+  /* 1111 */ V(3, 13, 4),
+
+  /* 0000 0010 ... */
+  /* 0000 */ PTR(380, 1),	/* 100 */
+  /* 0001 */ V(2, 13, 4),
+  /* 0010 */ V(13, 2, 4),
+  /* 0011 */ V(1, 13, 4),
+  /* 0100 */ V(11, 7, 4),
+  /* 0101 */ PTR(382, 1),
+  /* 0110 */ PTR(384, 1),
+  /* 0111 */ V(12, 3, 4),
+  /* 1000 */ PTR(386, 1),
+  /* 1001 */ V(4, 11, 4),
+  /* 1010 */ V(13, 1, 3),
+  /* 1011 */ V(13, 1, 3),
+  /* 1100 */ V(0, 13, 4),
+  /* 1101 */ V(13, 0, 4),
+  /* 1110 */ V(8, 10, 4),
+  /* 1111 */ V(10, 8, 4),
+
+  /* 0000 0011 ... */
+  /* 0000 */ V(4, 12, 4),	/* 116 */
+  /* 0001 */ V(12, 4, 4),
+  /* 0010 */ V(6, 11, 4),
+  /* 0011 */ V(11, 6, 4),
+  /* 0100 */ V(3, 12, 3),
+  /* 0101 */ V(3, 12, 3),
+  /* 0110 */ V(2, 12, 3),
+  /* 0111 */ V(2, 12, 3),
+  /* 1000 */ V(12, 2, 3),
+  /* 1001 */ V(12, 2, 3),
+  /* 1010 */ V(5, 11, 3),
+  /* 1011 */ V(5, 11, 3),
+  /* 1100 */ V(11, 5, 4),
+  /* 1101 */ V(8, 9, 4),
+  /* 1110 */ V(1, 12, 3),
+  /* 1111 */ V(1, 12, 3),
+
+  /* 0000 0100 ... */
+  /* 0000 */ V(12, 1, 3),	/* 132 */
+  /* 0001 */ V(12, 1, 3),
+  /* 0010 */ V(9, 8, 4),
+  /* 0011 */ V(0, 12, 4),
+  /* 0100 */ V(12, 0, 3),
+  /* 0101 */ V(12, 0, 3),
+  /* 0110 */ V(11, 4, 4),
+  /* 0111 */ V(6, 10, 4),
+  /* 1000 */ V(10, 6, 4),
+  /* 1001 */ V(7, 9, 4),
+  /* 1010 */ V(3, 11, 3),
+  /* 1011 */ V(3, 11, 3),
+  /* 1100 */ V(11, 3, 3),
+  /* 1101 */ V(11, 3, 3),
+  /* 1110 */ V(8, 8, 4),
+  /* 1111 */ V(5, 10, 4),
+
+  /* 0000 0101 ... */
+  /* 0000 */ V(2, 11, 3),	/* 148 */
+  /* 0001 */ V(2, 11, 3),
+  /* 0010 */ V(10, 5, 4),
+  /* 0011 */ V(6, 9, 4),
+  /* 0100 */ V(10, 4, 3),
+  /* 0101 */ V(10, 4, 3),
+  /* 0110 */ V(7, 8, 4),
+  /* 0111 */ V(8, 7, 4),
+  /* 1000 */ V(9, 4, 3),
+  /* 1001 */ V(9, 4, 3),
+  /* 1010 */ V(7, 7, 4),
+  /* 1011 */ V(7, 6, 4),
+  /* 1100 */ V(11, 2, 2),
+  /* 1101 */ V(11, 2, 2),
+  /* 1110 */ V(11, 2, 2),
+  /* 1111 */ V(11, 2, 2),
+
+  /* 0000 0110 ... */
+  /* 000  */ V(1, 11, 2),	/* 164 */
+  /* 001  */ V(1, 11, 2),
+  /* 010  */ V(11, 1, 2),
+  /* 011  */ V(11, 1, 2),
+  /* 100  */ V(0, 11, 3),
+  /* 101  */ V(11, 0, 3),
+  /* 110  */ V(9, 6, 3),
+  /* 111  */ V(4, 10, 3),
+
+  /* 0000 0111 ... */
+  /* 000  */ V(3, 10, 3),	/* 172 */
+  /* 001  */ V(10, 3, 3),
+  /* 010  */ V(5, 9, 3),
+  /* 011  */ V(9, 5, 3),
+  /* 100  */ V(2, 10, 2),
+  /* 101  */ V(2, 10, 2),
+  /* 110  */ V(10, 2, 2),
+  /* 111  */ V(10, 2, 2),
+
+  /* 0000 1000 ... */
+  /* 000  */ V(1, 10, 2),	/* 180 */
+  /* 001  */ V(1, 10, 2),
+  /* 010  */ V(10, 1, 2),
+  /* 011  */ V(10, 1, 2),
+  /* 100  */ V(0, 10, 3),
+  /* 101  */ V(6, 8, 3),
+  /* 110  */ V(10, 0, 2),
+  /* 111  */ V(10, 0, 2),
+
+  /* 0000 1001 ... */
+  /* 000  */ V(8, 6, 3),	/* 188 */
+  /* 001  */ V(4, 9, 3),
+  /* 010  */ V(9, 3, 2),
+  /* 011  */ V(9, 3, 2),
+  /* 100  */ V(3, 9, 3),
+  /* 101  */ V(5, 8, 3),
+  /* 110  */ V(8, 5, 3),
+  /* 111  */ V(6, 7, 3),
+
+  /* 0000 1010 ... */
+  /* 000  */ V(2, 9, 2),	/* 196 */
+  /* 001  */ V(2, 9, 2),
+  /* 010  */ V(9, 2, 2),
+  /* 011  */ V(9, 2, 2),
+  /* 100  */ V(5, 7, 3),
+  /* 101  */ V(7, 5, 3),
+  /* 110  */ V(3, 8, 2),
+  /* 111  */ V(3, 8, 2),
+
+  /* 0000 1011 ... */
+  /* 000  */ V(8, 3, 2),	/* 204 */
+  /* 001  */ V(8, 3, 2),
+  /* 010  */ V(6, 6, 3),
+  /* 011  */ V(4, 7, 3),
+  /* 100  */ V(7, 4, 3),
+  /* 101  */ V(5, 6, 3),
+  /* 110  */ V(6, 5, 3),
+  /* 111  */ V(7, 3, 3),
+
+  /* 0000 1100 ... */
+  /* 0    */ V(1, 9, 1),	/* 212 */
+  /* 1    */ V(9, 1, 1),
+
+  /* 0000 1101 ... */
+  /* 00   */ V(0, 9, 2),	/* 214 */
+  /* 01   */ V(9, 0, 2),
+  /* 10   */ V(4, 8, 2),
+  /* 11   */ V(8, 4, 2),
+
+  /* 0000 1110 ... */
+  /* 000  */ V(7, 2, 2),	/* 218 */
+  /* 001  */ V(7, 2, 2),
+  /* 010  */ V(4, 6, 3),
+  /* 011  */ V(6, 4, 3),
+  /* 100  */ V(2, 8, 1),
+  /* 101  */ V(2, 8, 1),
+  /* 110  */ V(2, 8, 1),
+  /* 111  */ V(2, 8, 1),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(8, 2, 1),	/* 226 */
+  /* 1    */ V(1, 8, 1),
+
+  /* 0001 0000 ... */
+  /* 00   */ V(3, 7, 2),	/* 228 */
+  /* 01   */ V(2, 7, 2),
+  /* 10   */ V(1, 7, 1),
+  /* 11   */ V(1, 7, 1),
+
+  /* 0001 0001 ... */
+  /* 00   */ V(7, 1, 1),	/* 232 */
+  /* 01   */ V(7, 1, 1),
+  /* 10   */ V(5, 5, 2),
+  /* 11   */ V(0, 7, 2),
+
+  /* 0001 0010 ... */
+  /* 00   */ V(7, 0, 2),	/* 236 */
+  /* 01   */ V(3, 6, 2),
+  /* 10   */ V(6, 3, 2),
+  /* 11   */ V(4, 5, 2),
+
+  /* 0001 0011 ... */
+  /* 00   */ V(5, 4, 2),	/* 240 */
+  /* 01   */ V(2, 6, 2),
+  /* 10   */ V(6, 2, 2),
+  /* 11   */ V(3, 5, 2),
+
+  /* 0001 0101 ... */
+  /* 0    */ V(0, 8, 1),	/* 244 */
+  /* 1    */ V(8, 0, 1),
+
+  /* 0001 0110 ... */
+  /* 0    */ V(1, 6, 1),	/* 246 */
+  /* 1    */ V(6, 1, 1),
+
+  /* 0001 0111 ... */
+  /* 0    */ V(0, 6, 1),	/* 248 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 0001 1000 ... */
+  /* 00   */ V(5, 3, 2),	/* 250 */
+  /* 01   */ V(4, 4, 2),
+  /* 10   */ V(2, 5, 1),
+  /* 11   */ V(2, 5, 1),
+
+  /* 0001 1001 ... */
+  /* 0    */ V(5, 2, 1),	/* 254 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0001 1100 ... */
+  /* 0    */ V(3, 4, 1),	/* 256 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(5, 0, 1),	/* 258 */
+  /* 1    */ V(2, 4, 1),
+
+  /* 0001 1110 ... */
+  /* 0    */ V(4, 2, 1),	/* 260 */
+  /* 1    */ V(3, 3, 1),
+
+  /* 0000 0000 0000 ... */
+  /* 0000 */ PTR(388, 3),	/* 262 */
+  /* 0001 */ V(15, 15, 4),
+  /* 0010 */ V(14, 15, 4),
+  /* 0011 */ V(13, 15, 4),
+  /* 0100 */ V(14, 14, 4),
+  /* 0101 */ V(12, 15, 4),
+  /* 0110 */ V(13, 14, 4),
+  /* 0111 */ V(11, 15, 4),
+  /* 1000 */ V(15, 11, 4),
+  /* 1001 */ V(12, 14, 4),
+  /* 1010 */ V(13, 12, 4),
+  /* 1011 */ PTR(396, 1),
+  /* 1100 */ V(14, 12, 3),
+  /* 1101 */ V(14, 12, 3),
+  /* 1110 */ V(13, 13, 3),
+  /* 1111 */ V(13, 13, 3),
+
+  /* 0000 0000 0001 ... */
+  /* 0000 */ V(15, 10, 4),	/* 278 */
+  /* 0001 */ V(12, 13, 4),
+  /* 0010 */ V(11, 14, 3),
+  /* 0011 */ V(11, 14, 3),
+  /* 0100 */ V(14, 11, 3),
+  /* 0101 */ V(14, 11, 3),
+  /* 0110 */ V(9, 15, 3),
+  /* 0111 */ V(9, 15, 3),
+  /* 1000 */ V(15, 9, 3),
+  /* 1001 */ V(15, 9, 3),
+  /* 1010 */ V(14, 10, 3),
+  /* 1011 */ V(14, 10, 3),
+  /* 1100 */ V(11, 13, 3),
+  /* 1101 */ V(11, 13, 3),
+  /* 1110 */ V(13, 11, 3),
+  /* 1111 */ V(13, 11, 3),
+
+  /* 0000 0000 0010 ... */
+  /* 0000 */ V(8, 15, 3),	/* 294 */
+  /* 0001 */ V(8, 15, 3),
+  /* 0010 */ V(15, 8, 3),
+  /* 0011 */ V(15, 8, 3),
+  /* 0100 */ V(12, 12, 3),
+  /* 0101 */ V(12, 12, 3),
+  /* 0110 */ V(10, 14, 4),
+  /* 0111 */ V(9, 14, 4),
+  /* 1000 */ V(8, 14, 3),
+  /* 1001 */ V(8, 14, 3),
+  /* 1010 */ V(7, 15, 4),
+  /* 1011 */ V(7, 14, 4),
+  /* 1100 */ V(15, 7, 2),
+  /* 1101 */ V(15, 7, 2),
+  /* 1110 */ V(15, 7, 2),
+  /* 1111 */ V(15, 7, 2),
+
+  /* 0000 0000 0011 ... */
+  /* 000  */ V(13, 10, 2),	/* 310 */
+  /* 001  */ V(13, 10, 2),
+  /* 010  */ V(10, 13, 3),
+  /* 011  */ V(11, 12, 3),
+  /* 100  */ V(12, 11, 3),
+  /* 101  */ V(15, 6, 3),
+  /* 110  */ V(6, 15, 2),
+  /* 111  */ V(6, 15, 2),
+
+  /* 0000 0000 0100 ... */
+  /* 00   */ V(14, 8, 2),	/* 318 */
+  /* 01   */ V(5, 15, 2),
+  /* 10   */ V(9, 13, 2),
+  /* 11   */ V(13, 9, 2),
+
+  /* 0000 0000 0101 ... */
+  /* 00   */ V(15, 5, 2),	/* 322 */
+  /* 01   */ V(14, 7, 2),
+  /* 10   */ V(10, 12, 2),
+  /* 11   */ V(11, 11, 2),
+
+  /* 0000 0000 0110 ... */
+  /* 000  */ V(4, 15, 2),	/* 326 */
+  /* 001  */ V(4, 15, 2),
+  /* 010  */ V(15, 4, 2),
+  /* 011  */ V(15, 4, 2),
+  /* 100  */ V(12, 10, 3),
+  /* 101  */ V(14, 6, 3),
+  /* 110  */ V(15, 3, 2),
+  /* 111  */ V(15, 3, 2),
+
+  /* 0000 0000 0111 ... */
+  /* 00   */ V(3, 15, 1),	/* 334 */
+  /* 01   */ V(3, 15, 1),
+  /* 10   */ V(8, 13, 2),
+  /* 11   */ V(13, 8, 2),
+
+  /* 0000 0000 1000 ... */
+  /* 0    */ V(2, 15, 1),	/* 338 */
+  /* 1    */ V(15, 2, 1),
+
+  /* 0000 0000 1001 ... */
+  /* 00   */ V(6, 14, 2),	/* 340 */
+  /* 01   */ V(9, 12, 2),
+  /* 10   */ V(0, 15, 1),
+  /* 11   */ V(0, 15, 1),
+
+  /* 0000 0000 1010 ... */
+  /* 00   */ V(12, 9, 2),	/* 344 */
+  /* 01   */ V(5, 14, 2),
+  /* 10   */ V(10, 11, 1),
+  /* 11   */ V(10, 11, 1),
+
+  /* 0000 0000 1011 ... */
+  /* 00   */ V(7, 13, 2),	/* 348 */
+  /* 01   */ V(13, 7, 2),
+  /* 10   */ V(4, 14, 1),
+  /* 11   */ V(4, 14, 1),
+
+  /* 0000 0000 1100 ... */
+  /* 00   */ V(12, 8, 2),	/* 352 */
+  /* 01   */ V(13, 6, 2),
+  /* 10   */ V(3, 14, 1),
+  /* 11   */ V(3, 14, 1),
+
+  /* 0000 0000 1101 ... */
+  /* 00   */ V(11, 9, 1),	/* 356 */
+  /* 01   */ V(11, 9, 1),
+  /* 10   */ V(9, 11, 2),
+  /* 11   */ V(10, 10, 2),
+
+  /* 0000 0001 0001 ... */
+  /* 0    */ V(11, 10, 1),	/* 360 */
+  /* 1    */ V(14, 5, 1),
+
+  /* 0000 0001 0010 ... */
+  /* 0    */ V(14, 4, 1),	/* 362 */
+  /* 1    */ V(8, 12, 1),
+
+  /* 0000 0001 0011 ... */
+  /* 0    */ V(6, 13, 1),	/* 364 */
+  /* 1    */ V(14, 3, 1),
+
+  /* 0000 0001 0101 ... */
+  /* 0    */ V(2, 14, 1),	/* 366 */
+  /* 1    */ V(0, 14, 1),
+
+  /* 0000 0001 1000 ... */
+  /* 0    */ V(14, 0, 1),	/* 368 */
+  /* 1    */ V(5, 13, 1),
+
+  /* 0000 0001 1001 ... */
+  /* 0    */ V(13, 5, 1),	/* 370 */
+  /* 1    */ V(7, 12, 1),
+
+  /* 0000 0001 1010 ... */
+  /* 0    */ V(12, 7, 1),	/* 372 */
+  /* 1    */ V(4, 13, 1),
+
+  /* 0000 0001 1011 ... */
+  /* 0    */ V(8, 11, 1),	/* 374 */
+  /* 1    */ V(11, 8, 1),
+
+  /* 0000 0001 1100 ... */
+  /* 0    */ V(13, 4, 1),	/* 376 */
+  /* 1    */ V(9, 10, 1),
+
+  /* 0000 0001 1101 ... */
+  /* 0    */ V(10, 9, 1),	/* 378 */
+  /* 1    */ V(6, 12, 1),
+
+  /* 0000 0010 0000 ... */
+  /* 0    */ V(13, 3, 1),	/* 380 */
+  /* 1    */ V(7, 11, 1),
+
+  /* 0000 0010 0101 ... */
+  /* 0    */ V(5, 12, 1),	/* 382 */
+  /* 1    */ V(12, 5, 1),
+
+  /* 0000 0010 0110 ... */
+  /* 0    */ V(9, 9, 1),	/* 384 */
+  /* 1    */ V(7, 10, 1),
+
+  /* 0000 0010 1000 ... */
+  /* 0    */ V(10, 7, 1),	/* 386 */
+  /* 1    */ V(9, 7, 1),
+
+  /* 0000 0000 0000 0000 ... */
+  /* 000  */ V(15, 14, 3),	/* 388 */
+  /* 001  */ V(15, 12, 3),
+  /* 010  */ V(15, 13, 2),
+  /* 011  */ V(15, 13, 2),
+  /* 100  */ V(14, 13, 1),
+  /* 101  */ V(14, 13, 1),
+  /* 110  */ V(14, 13, 1),
+  /* 111  */ V(14, 13, 1),
+
+  /* 0000 0000 0000 1011 ... */
+  /* 0    */ V(10, 15, 1),	/* 396 */
+  /* 1    */ V(14, 9, 1)
+];
+
+const hufftab15 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 4),
+  /* 0100 */ PTR(80, 4),
+  /* 0101 */ PTR(96, 3),
+  /* 0110 */ PTR(104, 3),
+  /* 0111 */ PTR(112, 2),
+  /* 1000 */ PTR(116, 1),
+  /* 1001 */ PTR(118, 1),
+  /* 1010 */ V(1, 1, 3),
+  /* 1011 */ V(1, 1, 3),
+  /* 1100 */ V(0, 1, 4),
+  /* 1101 */ V(1, 0, 4),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(120, 4),	/* 16 */
+  /* 0001 */ PTR(136, 4),
+  /* 0010 */ PTR(152, 4),
+  /* 0011 */ PTR(168, 4),
+  /* 0100 */ PTR(184, 4),
+  /* 0101 */ PTR(200, 3),
+  /* 0110 */ PTR(208, 3),
+  /* 0111 */ PTR(216, 4),
+  /* 1000 */ PTR(232, 3),
+  /* 1001 */ PTR(240, 3),
+  /* 1010 */ PTR(248, 3),
+  /* 1011 */ PTR(256, 3),
+  /* 1100 */ PTR(264, 2),
+  /* 1101 */ PTR(268, 3),
+  /* 1110 */ PTR(276, 3),
+  /* 1111 */ PTR(284, 2),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(288, 2),	/* 32 */
+  /* 0001 */ PTR(292, 2),
+  /* 0010 */ PTR(296, 2),
+  /* 0011 */ PTR(300, 2),
+  /* 0100 */ PTR(304, 2),
+  /* 0101 */ PTR(308, 2),
+  /* 0110 */ PTR(312, 2),
+  /* 0111 */ PTR(316, 2),
+  /* 1000 */ PTR(320, 1),
+  /* 1001 */ PTR(322, 1),
+  /* 1010 */ PTR(324, 1),
+  /* 1011 */ PTR(326, 2),
+  /* 1100 */ PTR(330, 1),
+  /* 1101 */ PTR(332, 1),
+  /* 1110 */ PTR(334, 2),
+  /* 1111 */ PTR(338, 1),
+
+  /* 0010 ... */
+  /* 0000 */ PTR(340, 1),	/* 48 */
+  /* 0001 */ PTR(342, 1),
+  /* 0010 */ V(9, 1, 4),
+  /* 0011 */ PTR(344, 1),
+  /* 0100 */ PTR(346, 1),
+  /* 0101 */ PTR(348, 1),
+  /* 0110 */ PTR(350, 1),
+  /* 0111 */ PTR(352, 1),
+  /* 1000 */ V(2, 8, 4),
+  /* 1001 */ V(8, 2, 4),
+  /* 1010 */ V(1, 8, 4),
+  /* 1011 */ V(8, 1, 4),
+  /* 1100 */ PTR(354, 1),
+  /* 1101 */ PTR(356, 1),
+  /* 1110 */ PTR(358, 1),
+  /* 1111 */ PTR(360, 1),
+
+  /* 0011 ... */
+  /* 0000 */ V(2, 7, 4),	/* 64 */
+  /* 0001 */ V(7, 2, 4),
+  /* 0010 */ V(6, 4, 4),
+  /* 0011 */ V(1, 7, 4),
+  /* 0100 */ V(5, 5, 4),
+  /* 0101 */ V(7, 1, 4),
+  /* 0110 */ PTR(362, 1),
+  /* 0111 */ V(3, 6, 4),
+  /* 1000 */ V(6, 3, 4),
+  /* 1001 */ V(4, 5, 4),
+  /* 1010 */ V(5, 4, 4),
+  /* 1011 */ V(2, 6, 4),
+  /* 1100 */ V(6, 2, 4),
+  /* 1101 */ V(1, 6, 4),
+  /* 1110 */ PTR(364, 1),
+  /* 1111 */ V(3, 5, 4),
+
+  /* 0100 ... */
+  /* 0000 */ V(6, 1, 3),	/* 80 */
+  /* 0001 */ V(6, 1, 3),
+  /* 0010 */ V(5, 3, 4),
+  /* 0011 */ V(4, 4, 4),
+  /* 0100 */ V(2, 5, 3),
+  /* 0101 */ V(2, 5, 3),
+  /* 0110 */ V(5, 2, 3),
+  /* 0111 */ V(5, 2, 3),
+  /* 1000 */ V(1, 5, 3),
+  /* 1001 */ V(1, 5, 3),
+  /* 1010 */ V(5, 1, 3),
+  /* 1011 */ V(5, 1, 3),
+  /* 1100 */ V(0, 5, 4),
+  /* 1101 */ V(5, 0, 4),
+  /* 1110 */ V(3, 4, 3),
+  /* 1111 */ V(3, 4, 3),
+
+  /* 0101 ... */
+  /* 000  */ V(4, 3, 3),	/* 96 */
+  /* 001  */ V(2, 4, 3),
+  /* 010  */ V(4, 2, 3),
+  /* 011  */ V(3, 3, 3),
+  /* 100  */ V(4, 1, 2),
+  /* 101  */ V(4, 1, 2),
+  /* 110  */ V(1, 4, 3),
+  /* 111  */ V(0, 4, 3),
+
+  /* 0110 ... */
+  /* 000  */ V(2, 3, 2),	/* 104 */
+  /* 001  */ V(2, 3, 2),
+  /* 010  */ V(3, 2, 2),
+  /* 011  */ V(3, 2, 2),
+  /* 100  */ V(4, 0, 3),
+  /* 101  */ V(0, 3, 3),
+  /* 110  */ V(1, 3, 2),
+  /* 111  */ V(1, 3, 2),
+
+  /* 0111 ... */
+  /* 00   */ V(3, 1, 2),	/* 112 */
+  /* 01   */ V(3, 0, 2),
+  /* 10   */ V(2, 2, 1),
+  /* 11   */ V(2, 2, 1),
+
+  /* 1000 ... */
+  /* 0    */ V(1, 2, 1),	/* 116 */
+  /* 1    */ V(2, 1, 1),
+
+  /* 1001 ... */
+  /* 0    */ V(0, 2, 1),	/* 118 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 0000 */ PTR(366, 1),	/* 120 */
+  /* 0001 */ PTR(368, 1),
+  /* 0010 */ V(14, 14, 4),
+  /* 0011 */ PTR(370, 1),
+  /* 0100 */ PTR(372, 1),
+  /* 0101 */ PTR(374, 1),
+  /* 0110 */ V(15, 11, 4),
+  /* 0111 */ PTR(376, 1),
+  /* 1000 */ V(13, 13, 4),
+  /* 1001 */ V(10, 15, 4),
+  /* 1010 */ V(15, 10, 4),
+  /* 1011 */ V(11, 14, 4),
+  /* 1100 */ V(14, 11, 4),
+  /* 1101 */ V(12, 13, 4),
+  /* 1110 */ V(13, 12, 4),
+  /* 1111 */ V(9, 15, 4),
+
+  /* 0000 0001 ... */
+  /* 0000 */ V(15, 9, 4),	/* 136 */
+  /* 0001 */ V(14, 10, 4),
+  /* 0010 */ V(11, 13, 4),
+  /* 0011 */ V(13, 11, 4),
+  /* 0100 */ V(8, 15, 4),
+  /* 0101 */ V(15, 8, 4),
+  /* 0110 */ V(12, 12, 4),
+  /* 0111 */ V(9, 14, 4),
+  /* 1000 */ V(14, 9, 4),
+  /* 1001 */ V(7, 15, 4),
+  /* 1010 */ V(15, 7, 4),
+  /* 1011 */ V(10, 13, 4),
+  /* 1100 */ V(13, 10, 4),
+  /* 1101 */ V(11, 12, 4),
+  /* 1110 */ V(6, 15, 4),
+  /* 1111 */ PTR(378, 1),
+
+  /* 0000 0010 ... */
+  /* 0000 */ V(12, 11, 3),	/* 152 */
+  /* 0001 */ V(12, 11, 3),
+  /* 0010 */ V(15, 6, 3),
+  /* 0011 */ V(15, 6, 3),
+  /* 0100 */ V(8, 14, 4),
+  /* 0101 */ V(14, 8, 4),
+  /* 0110 */ V(5, 15, 4),
+  /* 0111 */ V(9, 13, 4),
+  /* 1000 */ V(15, 5, 3),
+  /* 1001 */ V(15, 5, 3),
+  /* 1010 */ V(7, 14, 3),
+  /* 1011 */ V(7, 14, 3),
+  /* 1100 */ V(14, 7, 3),
+  /* 1101 */ V(14, 7, 3),
+  /* 1110 */ V(10, 12, 3),
+  /* 1111 */ V(10, 12, 3),
+
+  /* 0000 0011 ... */
+  /* 0000 */ V(12, 10, 3),	/* 168 */
+  /* 0001 */ V(12, 10, 3),
+  /* 0010 */ V(11, 11, 3),
+  /* 0011 */ V(11, 11, 3),
+  /* 0100 */ V(13, 9, 4),
+  /* 0101 */ V(8, 13, 4),
+  /* 0110 */ V(4, 15, 3),
+  /* 0111 */ V(4, 15, 3),
+  /* 1000 */ V(15, 4, 3),
+  /* 1001 */ V(15, 4, 3),
+  /* 1010 */ V(3, 15, 3),
+  /* 1011 */ V(3, 15, 3),
+  /* 1100 */ V(15, 3, 3),
+  /* 1101 */ V(15, 3, 3),
+  /* 1110 */ V(13, 8, 3),
+  /* 1111 */ V(13, 8, 3),
+
+  /* 0000 0100 ... */
+  /* 0000 */ V(14, 6, 3),	/* 184 */
+  /* 0001 */ V(14, 6, 3),
+  /* 0010 */ V(2, 15, 3),
+  /* 0011 */ V(2, 15, 3),
+  /* 0100 */ V(15, 2, 3),
+  /* 0101 */ V(15, 2, 3),
+  /* 0110 */ V(6, 14, 4),
+  /* 0111 */ V(15, 0, 4),
+  /* 1000 */ V(1, 15, 3),
+  /* 1001 */ V(1, 15, 3),
+  /* 1010 */ V(15, 1, 3),
+  /* 1011 */ V(15, 1, 3),
+  /* 1100 */ V(9, 12, 3),
+  /* 1101 */ V(9, 12, 3),
+  /* 1110 */ V(12, 9, 3),
+  /* 1111 */ V(12, 9, 3),
+
+  /* 0000 0101 ... */
+  /* 000  */ V(5, 14, 3),	/* 200 */
+  /* 001  */ V(10, 11, 3),
+  /* 010  */ V(11, 10, 3),
+  /* 011  */ V(14, 5, 3),
+  /* 100  */ V(7, 13, 3),
+  /* 101  */ V(13, 7, 3),
+  /* 110  */ V(4, 14, 3),
+  /* 111  */ V(14, 4, 3),
+
+  /* 0000 0110 ... */
+  /* 000  */ V(8, 12, 3),	/* 208 */
+  /* 001  */ V(12, 8, 3),
+  /* 010  */ V(3, 14, 3),
+  /* 011  */ V(6, 13, 3),
+  /* 100  */ V(13, 6, 3),
+  /* 101  */ V(14, 3, 3),
+  /* 110  */ V(9, 11, 3),
+  /* 111  */ V(11, 9, 3),
+
+  /* 0000 0111 ... */
+  /* 0000 */ V(2, 14, 3),	/* 216 */
+  /* 0001 */ V(2, 14, 3),
+  /* 0010 */ V(10, 10, 3),
+  /* 0011 */ V(10, 10, 3),
+  /* 0100 */ V(14, 2, 3),
+  /* 0101 */ V(14, 2, 3),
+  /* 0110 */ V(1, 14, 3),
+  /* 0111 */ V(1, 14, 3),
+  /* 1000 */ V(14, 1, 3),
+  /* 1001 */ V(14, 1, 3),
+  /* 1010 */ V(0, 14, 4),
+  /* 1011 */ V(14, 0, 4),
+  /* 1100 */ V(5, 13, 3),
+  /* 1101 */ V(5, 13, 3),
+  /* 1110 */ V(13, 5, 3),
+  /* 1111 */ V(13, 5, 3),
+
+  /* 0000 1000 ... */
+  /* 000  */ V(7, 12, 3),	/* 232 */
+  /* 001  */ V(12, 7, 3),
+  /* 010  */ V(4, 13, 3),
+  /* 011  */ V(8, 11, 3),
+  /* 100  */ V(13, 4, 2),
+  /* 101  */ V(13, 4, 2),
+  /* 110  */ V(11, 8, 3),
+  /* 111  */ V(9, 10, 3),
+
+  /* 0000 1001 ... */
+  /* 000  */ V(10, 9, 3),	/* 240 */
+  /* 001  */ V(6, 12, 3),
+  /* 010  */ V(12, 6, 3),
+  /* 011  */ V(3, 13, 3),
+  /* 100  */ V(13, 3, 2),
+  /* 101  */ V(13, 3, 2),
+  /* 110  */ V(13, 2, 2),
+  /* 111  */ V(13, 2, 2),
+
+  /* 0000 1010 ... */
+  /* 000  */ V(2, 13, 3),	/* 248 */
+  /* 001  */ V(0, 13, 3),
+  /* 010  */ V(1, 13, 2),
+  /* 011  */ V(1, 13, 2),
+  /* 100  */ V(7, 11, 2),
+  /* 101  */ V(7, 11, 2),
+  /* 110  */ V(11, 7, 2),
+  /* 111  */ V(11, 7, 2),
+
+  /* 0000 1011 ... */
+  /* 000  */ V(13, 1, 2),	/* 256 */
+  /* 001  */ V(13, 1, 2),
+  /* 010  */ V(5, 12, 3),
+  /* 011  */ V(13, 0, 3),
+  /* 100  */ V(12, 5, 2),
+  /* 101  */ V(12, 5, 2),
+  /* 110  */ V(8, 10, 2),
+  /* 111  */ V(8, 10, 2),
+
+  /* 0000 1100 ... */
+  /* 00   */ V(10, 8, 2),	/* 264 */
+  /* 01   */ V(4, 12, 2),
+  /* 10   */ V(12, 4, 2),
+  /* 11   */ V(6, 11, 2),
+
+  /* 0000 1101 ... */
+  /* 000  */ V(11, 6, 2),	/* 268 */
+  /* 001  */ V(11, 6, 2),
+  /* 010  */ V(9, 9, 3),
+  /* 011  */ V(0, 12, 3),
+  /* 100  */ V(3, 12, 2),
+  /* 101  */ V(3, 12, 2),
+  /* 110  */ V(12, 3, 2),
+  /* 111  */ V(12, 3, 2),
+
+  /* 0000 1110 ... */
+  /* 000  */ V(7, 10, 2),	/* 276 */
+  /* 001  */ V(7, 10, 2),
+  /* 010  */ V(10, 7, 2),
+  /* 011  */ V(10, 7, 2),
+  /* 100  */ V(10, 6, 2),
+  /* 101  */ V(10, 6, 2),
+  /* 110  */ V(12, 0, 3),
+  /* 111  */ V(0, 11, 3),
+
+  /* 0000 1111 ... */
+  /* 00   */ V(12, 2, 1),	/* 284 */
+  /* 01   */ V(12, 2, 1),
+  /* 10   */ V(2, 12, 2),
+  /* 11   */ V(5, 11, 2),
+
+  /* 0001 0000 ... */
+  /* 00   */ V(11, 5, 2),	/* 288 */
+  /* 01   */ V(1, 12, 2),
+  /* 10   */ V(8, 9, 2),
+  /* 11   */ V(9, 8, 2),
+
+  /* 0001 0001 ... */
+  /* 00   */ V(12, 1, 2),	/* 292 */
+  /* 01   */ V(4, 11, 2),
+  /* 10   */ V(11, 4, 2),
+  /* 11   */ V(6, 10, 2),
+
+  /* 0001 0010 ... */
+  /* 00   */ V(3, 11, 2),	/* 296 */
+  /* 01   */ V(7, 9, 2),
+  /* 10   */ V(11, 3, 1),
+  /* 11   */ V(11, 3, 1),
+
+  /* 0001 0011 ... */
+  /* 00   */ V(9, 7, 2),	/* 300 */
+  /* 01   */ V(8, 8, 2),
+  /* 10   */ V(2, 11, 2),
+  /* 11   */ V(5, 10, 2),
+
+  /* 0001 0100 ... */
+  /* 00   */ V(11, 2, 1),	/* 304 */
+  /* 01   */ V(11, 2, 1),
+  /* 10   */ V(10, 5, 2),
+  /* 11   */ V(1, 11, 2),
+
+  /* 0001 0101 ... */
+  /* 00   */ V(11, 1, 1),	/* 308 */
+  /* 01   */ V(11, 1, 1),
+  /* 10   */ V(11, 0, 2),
+  /* 11   */ V(6, 9, 2),
+
+  /* 0001 0110 ... */
+  /* 00   */ V(9, 6, 2),	/* 312 */
+  /* 01   */ V(4, 10, 2),
+  /* 10   */ V(10, 4, 2),
+  /* 11   */ V(7, 8, 2),
+
+  /* 0001 0111 ... */
+  /* 00   */ V(8, 7, 2),	/* 316 */
+  /* 01   */ V(3, 10, 2),
+  /* 10   */ V(10, 3, 1),
+  /* 11   */ V(10, 3, 1),
+
+  /* 0001 1000 ... */
+  /* 0    */ V(5, 9, 1),	/* 320 */
+  /* 1    */ V(9, 5, 1),
+
+  /* 0001 1001 ... */
+  /* 0    */ V(2, 10, 1),	/* 322 */
+  /* 1    */ V(10, 2, 1),
+
+  /* 0001 1010 ... */
+  /* 0    */ V(1, 10, 1),	/* 324 */
+  /* 1    */ V(10, 1, 1),
+
+  /* 0001 1011 ... */
+  /* 00   */ V(0, 10, 2),	/* 326 */
+  /* 01   */ V(10, 0, 2),
+  /* 10   */ V(6, 8, 1),
+  /* 11   */ V(6, 8, 1),
+
+  /* 0001 1100 ... */
+  /* 0    */ V(8, 6, 1),	/* 330 */
+  /* 1    */ V(4, 9, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(9, 4, 1),	/* 332 */
+  /* 1    */ V(3, 9, 1),
+
+  /* 0001 1110 ... */
+  /* 00   */ V(9, 3, 1),	/* 334 */
+  /* 01   */ V(9, 3, 1),
+  /* 10   */ V(7, 7, 2),
+  /* 11   */ V(0, 9, 2),
+
+  /* 0001 1111 ... */
+  /* 0    */ V(5, 8, 1),	/* 338 */
+  /* 1    */ V(8, 5, 1),
+
+  /* 0010 0000 ... */
+  /* 0    */ V(2, 9, 1),	/* 340 */
+  /* 1    */ V(6, 7, 1),
+
+  /* 0010 0001 ... */
+  /* 0    */ V(7, 6, 1),	/* 342 */
+  /* 1    */ V(9, 2, 1),
+
+  /* 0010 0011 ... */
+  /* 0    */ V(1, 9, 1),	/* 344 */
+  /* 1    */ V(9, 0, 1),
+
+  /* 0010 0100 ... */
+  /* 0    */ V(4, 8, 1),	/* 346 */
+  /* 1    */ V(8, 4, 1),
+
+  /* 0010 0101 ... */
+  /* 0    */ V(5, 7, 1),	/* 348 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0010 0110 ... */
+  /* 0    */ V(3, 8, 1),	/* 350 */
+  /* 1    */ V(8, 3, 1),
+
+  /* 0010 0111 ... */
+  /* 0    */ V(6, 6, 1),	/* 352 */
+  /* 1    */ V(4, 7, 1),
+
+  /* 0010 1100 ... */
+  /* 0    */ V(7, 4, 1),	/* 354 */
+  /* 1    */ V(0, 8, 1),
+
+  /* 0010 1101 ... */
+  /* 0    */ V(8, 0, 1),	/* 356 */
+  /* 1    */ V(5, 6, 1),
+
+  /* 0010 1110 ... */
+  /* 0    */ V(6, 5, 1),	/* 358 */
+  /* 1    */ V(3, 7, 1),
+
+  /* 0010 1111 ... */
+  /* 0    */ V(7, 3, 1),	/* 360 */
+  /* 1    */ V(4, 6, 1),
+
+  /* 0011 0110 ... */
+  /* 0    */ V(0, 7, 1),	/* 362 */
+  /* 1    */ V(7, 0, 1),
+
+  /* 0011 1110 ... */
+  /* 0    */ V(0, 6, 1),	/* 364 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 0000 0000 0000 ... */
+  /* 0    */ V(15, 15, 1),	/* 366 */
+  /* 1    */ V(14, 15, 1),
+
+  /* 0000 0000 0001 ... */
+  /* 0    */ V(15, 14, 1),	/* 368 */
+  /* 1    */ V(13, 15, 1),
+
+  /* 0000 0000 0011 ... */
+  /* 0    */ V(15, 13, 1),	/* 370 */
+  /* 1    */ V(12, 15, 1),
+
+  /* 0000 0000 0100 ... */
+  /* 0    */ V(15, 12, 1),	/* 372 */
+  /* 1    */ V(13, 14, 1),
+
+  /* 0000 0000 0101 ... */
+  /* 0    */ V(14, 13, 1),	/* 374 */
+  /* 1    */ V(11, 15, 1),
+
+  /* 0000 0000 0111 ... */
+  /* 0    */ V(12, 14, 1),	/* 376 */
+  /* 1    */ V(14, 12, 1),
+
+  /* 0000 0001 1111 ... */
+  /* 0    */ V(10, 14, 1),	/* 378 */
+  /* 1    */ V(0, 15, 1)
+];
+
+const hufftab16 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ V(1, 1, 4),
+  /* 0101 */ V(0, 1, 4),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(68, 3),	/* 16 */
+  /* 0001 */ PTR(76, 3),
+  /* 0010 */ PTR(84, 2),
+  /* 0011 */ V(15, 15, 4),
+  /* 0100 */ PTR(88, 2),
+  /* 0101 */ PTR(92, 1),
+  /* 0110 */ PTR(94, 4),
+  /* 0111 */ V(15, 2, 4),
+  /* 1000 */ PTR(110, 1),
+  /* 1001 */ V(1, 15, 4),
+  /* 1010 */ V(15, 1, 4),
+  /* 1011 */ PTR(112, 4),
+  /* 1100 */ PTR(128, 4),
+  /* 1101 */ PTR(144, 4),
+  /* 1110 */ PTR(160, 4),
+  /* 1111 */ PTR(176, 4),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(192, 4),	/* 32 */
+  /* 0001 */ PTR(208, 3),
+  /* 0010 */ PTR(216, 3),
+  /* 0011 */ PTR(224, 3),
+  /* 0100 */ PTR(232, 3),
+  /* 0101 */ PTR(240, 3),
+  /* 0110 */ PTR(248, 3),
+  /* 0111 */ PTR(256, 3),
+  /* 1000 */ PTR(264, 2),
+  /* 1001 */ PTR(268, 2),
+  /* 1010 */ PTR(272, 1),
+  /* 1011 */ PTR(274, 2),
+  /* 1100 */ PTR(278, 2),
+  /* 1101 */ PTR(282, 1),
+  /* 1110 */ V(5, 1, 4),
+  /* 1111 */ PTR(284, 1),
+
+  /* 0010 ... */
+  /* 0000 */ PTR(286, 1),	/* 48 */
+  /* 0001 */ PTR(288, 1),
+  /* 0010 */ PTR(290, 1),
+  /* 0011 */ V(1, 4, 4),
+  /* 0100 */ V(4, 1, 4),
+  /* 0101 */ PTR(292, 1),
+  /* 0110 */ V(2, 3, 4),
+  /* 0111 */ V(3, 2, 4),
+  /* 1000 */ V(1, 3, 3),
+  /* 1001 */ V(1, 3, 3),
+  /* 1010 */ V(3, 1, 3),
+  /* 1011 */ V(3, 1, 3),
+  /* 1100 */ V(0, 3, 4),
+  /* 1101 */ V(3, 0, 4),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(1, 2, 2),	/* 64 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(14, 15, 3),	/* 68 */
+  /* 001  */ V(15, 14, 3),
+  /* 010  */ V(13, 15, 3),
+  /* 011  */ V(15, 13, 3),
+  /* 100  */ V(12, 15, 3),
+  /* 101  */ V(15, 12, 3),
+  /* 110  */ V(11, 15, 3),
+  /* 111  */ V(15, 11, 3),
+
+  /* 0000 0001 ... */
+  /* 000  */ V(10, 15, 2),	/* 76 */
+  /* 001  */ V(10, 15, 2),
+  /* 010  */ V(15, 10, 3),
+  /* 011  */ V(9, 15, 3),
+  /* 100  */ V(15, 9, 3),
+  /* 101  */ V(15, 8, 3),
+  /* 110  */ V(8, 15, 2),
+  /* 111  */ V(8, 15, 2),
+
+  /* 0000 0010 ... */
+  /* 00   */ V(7, 15, 2),	/* 84 */
+  /* 01   */ V(15, 7, 2),
+  /* 10   */ V(6, 15, 2),
+  /* 11   */ V(15, 6, 2),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(5, 15, 2),	/* 88 */
+  /* 01   */ V(15, 5, 2),
+  /* 10   */ V(4, 15, 1),
+  /* 11   */ V(4, 15, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(15, 4, 1),	/* 92 */
+  /* 1    */ V(15, 3, 1),
+
+  /* 0000 0110 ... */
+  /* 0000 */ V(15, 0, 1),	/* 94 */
+  /* 0001 */ V(15, 0, 1),
+  /* 0010 */ V(15, 0, 1),
+  /* 0011 */ V(15, 0, 1),
+  /* 0100 */ V(15, 0, 1),
+  /* 0101 */ V(15, 0, 1),
+  /* 0110 */ V(15, 0, 1),
+  /* 0111 */ V(15, 0, 1),
+  /* 1000 */ V(3, 15, 2),
+  /* 1001 */ V(3, 15, 2),
+  /* 1010 */ V(3, 15, 2),
+  /* 1011 */ V(3, 15, 2),
+  /* 1100 */ PTR(294, 4),
+  /* 1101 */ PTR(310, 3),
+  /* 1110 */ PTR(318, 3),
+  /* 1111 */ PTR(326, 3),
+
+  /* 0000 1000 ... */
+  /* 0    */ V(2, 15, 1),	/* 110 */
+  /* 1    */ V(0, 15, 1),
+
+  /* 0000 1011 ... */
+  /* 0000 */ PTR(334, 2),	/* 112 */
+  /* 0001 */ PTR(338, 2),
+  /* 0010 */ PTR(342, 2),
+  /* 0011 */ PTR(346, 1),
+  /* 0100 */ PTR(348, 2),
+  /* 0101 */ PTR(352, 2),
+  /* 0110 */ PTR(356, 1),
+  /* 0111 */ PTR(358, 2),
+  /* 1000 */ PTR(362, 2),
+  /* 1001 */ PTR(366, 2),
+  /* 1010 */ PTR(370, 2),
+  /* 1011 */ V(14, 3, 4),
+  /* 1100 */ PTR(374, 1),
+  /* 1101 */ PTR(376, 1),
+  /* 1110 */ PTR(378, 1),
+  /* 1111 */ PTR(380, 1),
+
+  /* 0000 1100 ... */
+  /* 0000 */ PTR(382, 1),	/* 128 */
+  /* 0001 */ PTR(384, 1),
+  /* 0010 */ PTR(386, 1),
+  /* 0011 */ V(0, 13, 4),
+  /* 0100 */ PTR(388, 1),
+  /* 0101 */ PTR(390, 1),
+  /* 0110 */ PTR(392, 1),
+  /* 0111 */ V(3, 12, 4),
+  /* 1000 */ PTR(394, 1),
+  /* 1001 */ V(1, 12, 4),
+  /* 1010 */ V(12, 0, 4),
+  /* 1011 */ PTR(396, 1),
+  /* 1100 */ V(14, 2, 3),
+  /* 1101 */ V(14, 2, 3),
+  /* 1110 */ V(2, 14, 4),
+  /* 1111 */ V(1, 14, 4),
+
+  /* 0000 1101 ... */
+  /* 0000 */ V(13, 3, 4),	/* 144 */
+  /* 0001 */ V(2, 13, 4),
+  /* 0010 */ V(13, 2, 4),
+  /* 0011 */ V(13, 1, 4),
+  /* 0100 */ V(3, 11, 4),
+  /* 0101 */ PTR(398, 1),
+  /* 0110 */ V(1, 13, 3),
+  /* 0111 */ V(1, 13, 3),
+  /* 1000 */ V(12, 4, 4),
+  /* 1001 */ V(6, 11, 4),
+  /* 1010 */ V(12, 3, 4),
+  /* 1011 */ V(10, 7, 4),
+  /* 1100 */ V(2, 12, 3),
+  /* 1101 */ V(2, 12, 3),
+  /* 1110 */ V(12, 2, 4),
+  /* 1111 */ V(11, 5, 4),
+
+  /* 0000 1110 ... */
+  /* 0000 */ V(12, 1, 4),	/* 160 */
+  /* 0001 */ V(0, 12, 4),
+  /* 0010 */ V(4, 11, 4),
+  /* 0011 */ V(11, 4, 4),
+  /* 0100 */ V(6, 10, 4),
+  /* 0101 */ V(10, 6, 4),
+  /* 0110 */ V(11, 3, 3),
+  /* 0111 */ V(11, 3, 3),
+  /* 1000 */ V(5, 10, 4),
+  /* 1001 */ V(10, 5, 4),
+  /* 1010 */ V(2, 11, 3),
+  /* 1011 */ V(2, 11, 3),
+  /* 1100 */ V(11, 2, 3),
+  /* 1101 */ V(11, 2, 3),
+  /* 1110 */ V(1, 11, 3),
+  /* 1111 */ V(1, 11, 3),
+
+  /* 0000 1111 ... */
+  /* 0000 */ V(11, 1, 3),	/* 176 */
+  /* 0001 */ V(11, 1, 3),
+  /* 0010 */ V(0, 11, 4),
+  /* 0011 */ V(11, 0, 4),
+  /* 0100 */ V(6, 9, 4),
+  /* 0101 */ V(9, 6, 4),
+  /* 0110 */ V(4, 10, 4),
+  /* 0111 */ V(10, 4, 4),
+  /* 1000 */ V(7, 8, 4),
+  /* 1001 */ V(8, 7, 4),
+  /* 1010 */ V(10, 3, 3),
+  /* 1011 */ V(10, 3, 3),
+  /* 1100 */ V(3, 10, 4),
+  /* 1101 */ V(5, 9, 4),
+  /* 1110 */ V(2, 10, 3),
+  /* 1111 */ V(2, 10, 3),
+
+  /* 0001 0000 ... */
+  /* 0000 */ V(9, 5, 4),	/* 192 */
+  /* 0001 */ V(6, 8, 4),
+  /* 0010 */ V(10, 1, 3),
+  /* 0011 */ V(10, 1, 3),
+  /* 0100 */ V(8, 6, 4),
+  /* 0101 */ V(7, 7, 4),
+  /* 0110 */ V(9, 4, 3),
+  /* 0111 */ V(9, 4, 3),
+  /* 1000 */ V(4, 9, 4),
+  /* 1001 */ V(5, 7, 4),
+  /* 1010 */ V(6, 7, 3),
+  /* 1011 */ V(6, 7, 3),
+  /* 1100 */ V(10, 2, 2),
+  /* 1101 */ V(10, 2, 2),
+  /* 1110 */ V(10, 2, 2),
+  /* 1111 */ V(10, 2, 2),
+
+  /* 0001 0001 ... */
+  /* 000  */ V(1, 10, 2),	/* 208 */
+  /* 001  */ V(1, 10, 2),
+  /* 010  */ V(0, 10, 3),
+  /* 011  */ V(10, 0, 3),
+  /* 100  */ V(3, 9, 3),
+  /* 101  */ V(9, 3, 3),
+  /* 110  */ V(5, 8, 3),
+  /* 111  */ V(8, 5, 3),
+
+  /* 0001 0010 ... */
+  /* 000  */ V(2, 9, 2),	/* 216 */
+  /* 001  */ V(2, 9, 2),
+  /* 010  */ V(9, 2, 2),
+  /* 011  */ V(9, 2, 2),
+  /* 100  */ V(7, 6, 3),
+  /* 101  */ V(0, 9, 3),
+  /* 110  */ V(1, 9, 2),
+  /* 111  */ V(1, 9, 2),
+
+  /* 0001 0011 ... */
+  /* 000  */ V(9, 1, 2),	/* 224 */
+  /* 001  */ V(9, 1, 2),
+  /* 010  */ V(9, 0, 3),
+  /* 011  */ V(4, 8, 3),
+  /* 100  */ V(8, 4, 3),
+  /* 101  */ V(7, 5, 3),
+  /* 110  */ V(3, 8, 3),
+  /* 111  */ V(8, 3, 3),
+
+  /* 0001 0100 ... */
+  /* 000  */ V(6, 6, 3),	/* 232 */
+  /* 001  */ V(2, 8, 3),
+  /* 010  */ V(8, 2, 2),
+  /* 011  */ V(8, 2, 2),
+  /* 100  */ V(4, 7, 3),
+  /* 101  */ V(7, 4, 3),
+  /* 110  */ V(1, 8, 2),
+  /* 111  */ V(1, 8, 2),
+
+  /* 0001 0101 ... */
+  /* 000  */ V(8, 1, 2),	/* 240 */
+  /* 001  */ V(8, 1, 2),
+  /* 010  */ V(8, 0, 2),
+  /* 011  */ V(8, 0, 2),
+  /* 100  */ V(0, 8, 3),
+  /* 101  */ V(5, 6, 3),
+  /* 110  */ V(3, 7, 2),
+  /* 111  */ V(3, 7, 2),
+
+  /* 0001 0110 ... */
+  /* 000  */ V(7, 3, 2),	/* 248 */
+  /* 001  */ V(7, 3, 2),
+  /* 010  */ V(6, 5, 3),
+  /* 011  */ V(4, 6, 3),
+  /* 100  */ V(2, 7, 2),
+  /* 101  */ V(2, 7, 2),
+  /* 110  */ V(7, 2, 2),
+  /* 111  */ V(7, 2, 2),
+
+  /* 0001 0111 ... */
+  /* 000  */ V(6, 4, 3),	/* 256 */
+  /* 001  */ V(5, 5, 3),
+  /* 010  */ V(0, 7, 2),
+  /* 011  */ V(0, 7, 2),
+  /* 100  */ V(1, 7, 1),
+  /* 101  */ V(1, 7, 1),
+  /* 110  */ V(1, 7, 1),
+  /* 111  */ V(1, 7, 1),
+
+  /* 0001 1000 ... */
+  /* 00   */ V(7, 1, 1),	/* 264  */
+  /* 01   */ V(7, 1, 1),
+  /* 10   */ V(7, 0, 2),
+  /* 11   */ V(3, 6, 2),
+
+  /* 0001 1001 ... */
+  /* 00   */ V(6, 3, 2),	/* 268 */
+  /* 01   */ V(4, 5, 2),
+  /* 10   */ V(5, 4, 2),
+  /* 11   */ V(2, 6, 2),
+
+  /* 0001 1010 ... */
+  /* 0    */ V(6, 2, 1),	/* 272 */
+  /* 1    */ V(1, 6, 1),
+
+  /* 0001 1011 ... */
+  /* 00   */ V(6, 1, 1),	/* 274 */
+  /* 01   */ V(6, 1, 1),
+  /* 10   */ V(0, 6, 2),
+  /* 11   */ V(6, 0, 2),
+
+  /* 0001 1100 ... */
+  /* 00   */ V(5, 3, 1),	/* 278 */
+  /* 01   */ V(5, 3, 1),
+  /* 10   */ V(3, 5, 2),
+  /* 11   */ V(4, 4, 2),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(2, 5, 1),	/* 282 */
+  /* 1    */ V(5, 2, 1),
+
+  /* 0001 1111 ... */
+  /* 0    */ V(1, 5, 1),	/* 284 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0010 0000 ... */
+  /* 0    */ V(3, 4, 1),	/* 286 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0010 0001 ... */
+  /* 0    */ V(5, 0, 1),	/* 288 */
+  /* 1    */ V(2, 4, 1),
+
+  /* 0010 0010 ... */
+  /* 0    */ V(4, 2, 1),	/* 290 */
+  /* 1    */ V(3, 3, 1),
+
+  /* 0010 0101 ... */
+  /* 0    */ V(0, 4, 1),	/* 292 */
+  /* 1    */ V(4, 0, 1),
+
+  /* 0000 0110 1100 ... */
+  /* 0000 */ V(12, 14, 4),	/* 294 */
+  /* 0001 */ PTR(400, 1),
+  /* 0010 */ V(13, 14, 3),
+  /* 0011 */ V(13, 14, 3),
+  /* 0100 */ V(14, 9, 3),
+  /* 0101 */ V(14, 9, 3),
+  /* 0110 */ V(14, 10, 4),
+  /* 0111 */ V(13, 9, 4),
+  /* 1000 */ V(14, 14, 2),
+  /* 1001 */ V(14, 14, 2),
+  /* 1010 */ V(14, 14, 2),
+  /* 1011 */ V(14, 14, 2),
+  /* 1100 */ V(14, 13, 3),
+  /* 1101 */ V(14, 13, 3),
+  /* 1110 */ V(14, 11, 3),
+  /* 1111 */ V(14, 11, 3),
+
+  /* 0000 0110 1101 ... */
+  /* 000  */ V(11, 14, 2),	/* 310 */
+  /* 001  */ V(11, 14, 2),
+  /* 010  */ V(12, 13, 2),
+  /* 011  */ V(12, 13, 2),
+  /* 100  */ V(13, 12, 3),
+  /* 101  */ V(13, 11, 3),
+  /* 110  */ V(10, 14, 2),
+  /* 111  */ V(10, 14, 2),
+
+  /* 0000 0110 1110 ... */
+  /* 000  */ V(12, 12, 2),	/* 318 */
+  /* 001  */ V(12, 12, 2),
+  /* 010  */ V(10, 13, 3),
+  /* 011  */ V(13, 10, 3),
+  /* 100  */ V(7, 14, 3),
+  /* 101  */ V(10, 12, 3),
+  /* 110  */ V(12, 10, 2),
+  /* 111  */ V(12, 10, 2),
+
+  /* 0000 0110 1111 ... */
+  /* 000  */ V(12, 9, 3),	/* 326 */
+  /* 001  */ V(7, 13, 3),
+  /* 010  */ V(5, 14, 2),
+  /* 011  */ V(5, 14, 2),
+  /* 100  */ V(11, 13, 1),
+  /* 101  */ V(11, 13, 1),
+  /* 110  */ V(11, 13, 1),
+  /* 111  */ V(11, 13, 1),
+
+  /* 0000 1011 0000 ... */
+  /* 00   */ V(9, 14, 1),	/* 334 */
+  /* 01   */ V(9, 14, 1),
+  /* 10   */ V(11, 12, 2),
+  /* 11   */ V(12, 11, 2),
+
+  /* 0000 1011 0001 ... */
+  /* 00   */ V(8, 14, 2),	/* 338 */
+  /* 01   */ V(14, 8, 2),
+  /* 10   */ V(9, 13, 2),
+  /* 11   */ V(14, 7, 2),
+
+  /* 0000 1011 0010 ... */
+  /* 00   */ V(11, 11, 2),	/* 342 */
+  /* 01   */ V(8, 13, 2),
+  /* 10   */ V(13, 8, 2),
+  /* 11   */ V(6, 14, 2),
+
+  /* 0000 1011 0011 ... */
+  /* 0    */ V(14, 6, 1),	/* 346 */
+  /* 1    */ V(9, 12, 1),
+
+  /* 0000 1011 0100 ... */
+  /* 00   */ V(10, 11, 2),	/* 348 */
+  /* 01   */ V(11, 10, 2),
+  /* 10   */ V(14, 5, 2),
+  /* 11   */ V(13, 7, 2),
+
+  /* 0000 1011 0101 ... */
+  /* 00   */ V(4, 14, 1),	/* 352 */
+  /* 01   */ V(4, 14, 1),
+  /* 10   */ V(14, 4, 2),
+  /* 11   */ V(8, 12, 2),
+
+  /* 0000 1011 0110 ... */
+  /* 0    */ V(12, 8, 1),	/* 356 */
+  /* 1    */ V(3, 14, 1),
+
+  /* 0000 1011 0111 ... */
+  /* 00   */ V(6, 13, 1),	/* 358 */
+  /* 01   */ V(6, 13, 1),
+  /* 10   */ V(13, 6, 2),
+  /* 11   */ V(9, 11, 2),
+
+  /* 0000 1011 1000 ... */
+  /* 00   */ V(11, 9, 2),	/* 362 */
+  /* 01   */ V(10, 10, 2),
+  /* 10   */ V(14, 1, 1),
+  /* 11   */ V(14, 1, 1),
+
+  /* 0000 1011 1001 ... */
+  /* 00   */ V(13, 4, 1),	/* 366 */
+  /* 01   */ V(13, 4, 1),
+  /* 10   */ V(11, 8, 2),
+  /* 11   */ V(10, 9, 2),
+
+  /* 0000 1011 1010 ... */
+  /* 00   */ V(7, 11, 1),	/* 370 */
+  /* 01   */ V(7, 11, 1),
+  /* 10   */ V(11, 7, 2),
+  /* 11   */ V(13, 0, 2),
+
+  /* 0000 1011 1100 ... */
+  /* 0    */ V(0, 14, 1),	/* 374 */
+  /* 1    */ V(14, 0, 1),
+
+  /* 0000 1011 1101 ... */
+  /* 0    */ V(5, 13, 1),	/* 376 */
+  /* 1    */ V(13, 5, 1),
+
+  /* 0000 1011 1110 ... */
+  /* 0    */ V(7, 12, 1),	/* 378 */
+  /* 1    */ V(12, 7, 1),
+
+  /* 0000 1011 1111 ... */
+  /* 0    */ V(4, 13, 1),	/* 380 */
+  /* 1    */ V(8, 11, 1),
+
+  /* 0000 1100 0000 ... */
+  /* 0    */ V(9, 10, 1),	/* 382 */
+  /* 1    */ V(6, 12, 1),
+
+  /* 0000 1100 0001 ... */
+  /* 0    */ V(12, 6, 1),	/* 384 */
+  /* 1    */ V(3, 13, 1),
+
+  /* 0000 1100 0010 ... */
+  /* 0    */ V(5, 12, 1),	/* 386 */
+  /* 1    */ V(12, 5, 1),
+
+  /* 0000 1100 0100 ... */
+  /* 0    */ V(8, 10, 1),	/* 388 */
+  /* 1    */ V(10, 8, 1),
+
+  /* 0000 1100 0101 ... */
+  /* 0    */ V(9, 9, 1),	/* 390 */
+  /* 1    */ V(4, 12, 1),
+
+  /* 0000 1100 0110 ... */
+  /* 0    */ V(11, 6, 1),	/* 392 */
+  /* 1    */ V(7, 10, 1),
+
+  /* 0000 1100 1000 ... */
+  /* 0    */ V(5, 11, 1),	/* 394 */
+  /* 1    */ V(8, 9, 1),
+
+  /* 0000 1100 1011 ... */
+  /* 0    */ V(9, 8, 1),	/* 396 */
+  /* 1    */ V(7, 9, 1),
+
+  /* 0000 1101 0101 ... */
+  /* 0    */ V(9, 7, 1),	/* 398 */
+  /* 1    */ V(8, 8, 1),
+
+  /* 0000 0110 1100 0001 ... */
+  /* 0    */ V(14, 12, 1),	/* 400 */
+  /* 1    */ V(13, 13, 1)
+];
+
+const hufftab24 = [
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ V(15, 15, 4),
+  /* 0100 */ PTR(64, 4),
+  /* 0101 */ PTR(80, 4),
+  /* 0110 */ PTR(96, 4),
+  /* 0111 */ PTR(112, 4),
+  /* 1000 */ PTR(128, 4),
+  /* 1001 */ PTR(144, 4),
+  /* 1010 */ PTR(160, 3),
+  /* 1011 */ PTR(168, 2),
+  /* 1100 */ V(1, 1, 4),
+  /* 1101 */ V(0, 1, 4),
+  /* 1110 */ V(1, 0, 4),
+  /* 1111 */ V(0, 0, 4),
+
+  /* 0000 ... */
+  /* 0000 */ V(14, 15, 4),	/* 16 */
+  /* 0001 */ V(15, 14, 4),
+  /* 0010 */ V(13, 15, 4),
+  /* 0011 */ V(15, 13, 4),
+  /* 0100 */ V(12, 15, 4),
+  /* 0101 */ V(15, 12, 4),
+  /* 0110 */ V(11, 15, 4),
+  /* 0111 */ V(15, 11, 4),
+  /* 1000 */ V(15, 10, 3),
+  /* 1001 */ V(15, 10, 3),
+  /* 1010 */ V(10, 15, 4),
+  /* 1011 */ V(9, 15, 4),
+  /* 1100 */ V(15, 9, 3),
+  /* 1101 */ V(15, 9, 3),
+  /* 1110 */ V(15, 8, 3),
+  /* 1111 */ V(15, 8, 3),
+
+  /* 0001 ... */
+  /* 0000 */ V(8, 15, 4),	/* 32 */
+  /* 0001 */ V(7, 15, 4),
+  /* 0010 */ V(15, 7, 3),
+  /* 0011 */ V(15, 7, 3),
+  /* 0100 */ V(6, 15, 3),
+  /* 0101 */ V(6, 15, 3),
+  /* 0110 */ V(15, 6, 3),
+  /* 0111 */ V(15, 6, 3),
+  /* 1000 */ V(5, 15, 3),
+  /* 1001 */ V(5, 15, 3),
+  /* 1010 */ V(15, 5, 3),
+  /* 1011 */ V(15, 5, 3),
+  /* 1100 */ V(4, 15, 3),
+  /* 1101 */ V(4, 15, 3),
+  /* 1110 */ V(15, 4, 3),
+  /* 1111 */ V(15, 4, 3),
+
+  /* 0010 ... */
+  /* 0000 */ V(3, 15, 3),	/* 48 */
+  /* 0001 */ V(3, 15, 3),
+  /* 0010 */ V(15, 3, 3),
+  /* 0011 */ V(15, 3, 3),
+  /* 0100 */ V(2, 15, 3),
+  /* 0101 */ V(2, 15, 3),
+  /* 0110 */ V(15, 2, 3),
+  /* 0111 */ V(15, 2, 3),
+  /* 1000 */ V(15, 1, 3),
+  /* 1001 */ V(15, 1, 3),
+  /* 1010 */ V(1, 15, 4),
+  /* 1011 */ V(15, 0, 4),
+  /* 1100 */ PTR(172, 3),
+  /* 1101 */ PTR(180, 3),
+  /* 1110 */ PTR(188, 3),
+  /* 1111 */ PTR(196, 3),
+
+  /* 0100 ... */
+  /* 0000 */ PTR(204, 4),	/* 64 */
+  /* 0001 */ PTR(220, 3),
+  /* 0010 */ PTR(228, 3),
+  /* 0011 */ PTR(236, 3),
+  /* 0100 */ PTR(244, 2),
+  /* 0101 */ PTR(248, 2),
+  /* 0110 */ PTR(252, 2),
+  /* 0111 */ PTR(256, 2),
+  /* 1000 */ PTR(260, 2),
+  /* 1001 */ PTR(264, 2),
+  /* 1010 */ PTR(268, 2),
+  /* 1011 */ PTR(272, 2),
+  /* 1100 */ PTR(276, 2),
+  /* 1101 */ PTR(280, 3),
+  /* 1110 */ PTR(288, 2),
+  /* 1111 */ PTR(292, 2),
+
+  /* 0101 ... */
+  /* 0000 */ PTR(296, 2),	/* 80 */
+  /* 0001 */ PTR(300, 3),
+  /* 0010 */ PTR(308, 2),
+  /* 0011 */ PTR(312, 3),
+  /* 0100 */ PTR(320, 1),
+  /* 0101 */ PTR(322, 2),
+  /* 0110 */ PTR(326, 2),
+  /* 0111 */ PTR(330, 1),
+  /* 1000 */ PTR(332, 2),
+  /* 1001 */ PTR(336, 1),
+  /* 1010 */ PTR(338, 1),
+  /* 1011 */ PTR(340, 1),
+  /* 1100 */ PTR(342, 1),
+  /* 1101 */ PTR(344, 1),
+  /* 1110 */ PTR(346, 1),
+  /* 1111 */ PTR(348, 1),
+
+  /* 0110 ... */
+  /* 0000 */ PTR(350, 1),	/* 96 */
+  /* 0001 */ PTR(352, 1),
+  /* 0010 */ PTR(354, 1),
+  /* 0011 */ PTR(356, 1),
+  /* 0100 */ PTR(358, 1),
+  /* 0101 */ PTR(360, 1),
+  /* 0110 */ PTR(362, 1),
+  /* 0111 */ PTR(364, 1),
+  /* 1000 */ PTR(366, 1),
+  /* 1001 */ PTR(368, 1),
+  /* 1010 */ PTR(370, 2),
+  /* 1011 */ PTR(374, 1),
+  /* 1100 */ PTR(376, 2),
+  /* 1101 */ V(7, 3, 4),
+  /* 1110 */ PTR(380, 1),
+  /* 1111 */ V(7, 2, 4),
+
+  /* 0111 ... */
+  /* 0000 */ V(4, 6, 4),	/* 112 */
+  /* 0001 */ V(6, 4, 4),
+  /* 0010 */ V(5, 5, 4),
+  /* 0011 */ V(7, 1, 4),
+  /* 0100 */ V(3, 6, 4),
+  /* 0101 */ V(6, 3, 4),
+  /* 0110 */ V(4, 5, 4),
+  /* 0111 */ V(5, 4, 4),
+  /* 1000 */ V(2, 6, 4),
+  /* 1001 */ V(6, 2, 4),
+  /* 1010 */ V(1, 6, 4),
+  /* 1011 */ V(6, 1, 4),
+  /* 1100 */ PTR(382, 1),
+  /* 1101 */ V(3, 5, 4),
+  /* 1110 */ V(5, 3, 4),
+  /* 1111 */ V(4, 4, 4),
+
+  /* 1000 ... */
+  /* 0000 */ V(2, 5, 4),	/* 128 */
+  /* 0001 */ V(5, 2, 4),
+  /* 0010 */ V(1, 5, 4),
+  /* 0011 */ PTR(384, 1),
+  /* 0100 */ V(5, 1, 3),
+  /* 0101 */ V(5, 1, 3),
+  /* 0110 */ V(3, 4, 4),
+  /* 0111 */ V(4, 3, 4),
+  /* 1000 */ V(2, 4, 3),
+  /* 1001 */ V(2, 4, 3),
+  /* 1010 */ V(4, 2, 3),
+  /* 1011 */ V(4, 2, 3),
+  /* 1100 */ V(3, 3, 3),
+  /* 1101 */ V(3, 3, 3),
+  /* 1110 */ V(1, 4, 3),
+  /* 1111 */ V(1, 4, 3),
+
+  /* 1001 ... */
+  /* 0000 */ V(4, 1, 3),	/* 144 */
+  /* 0001 */ V(4, 1, 3),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 3),
+  /* 0101 */ V(2, 3, 3),
+  /* 0110 */ V(3, 2, 3),
+  /* 0111 */ V(3, 2, 3),
+  /* 1000 */ V(1, 3, 2),
+  /* 1001 */ V(1, 3, 2),
+  /* 1010 */ V(1, 3, 2),
+  /* 1011 */ V(1, 3, 2),
+  /* 1100 */ V(3, 1, 2),
+  /* 1101 */ V(3, 1, 2),
+  /* 1110 */ V(3, 1, 2),
+  /* 1111 */ V(3, 1, 2),
+
+  /* 1010 ... */
+  /* 000  */ V(0, 3, 3),	/* 160 */
+  /* 001  */ V(3, 0, 3),
+  /* 010  */ V(2, 2, 2),
+  /* 011  */ V(2, 2, 2),
+  /* 100  */ V(1, 2, 1),
+  /* 101  */ V(1, 2, 1),
+  /* 110  */ V(1, 2, 1),
+  /* 111  */ V(1, 2, 1),
+
+  /* 1011 ... */
+  /* 00   */ V(2, 1, 1),	/* 168 */
+  /* 01   */ V(2, 1, 1),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0010 1100 ... */
+  /* 000  */ V(0, 15, 1),	/* 172 */
+  /* 001  */ V(0, 15, 1),
+  /* 010  */ V(0, 15, 1),
+  /* 011  */ V(0, 15, 1),
+  /* 100  */ V(14, 14, 3),
+  /* 101  */ V(13, 14, 3),
+  /* 110  */ V(14, 13, 3),
+  /* 111  */ V(12, 14, 3),
+
+  /* 0010 1101 ... */
+  /* 000  */ V(14, 12, 3),	/* 180 */
+  /* 001  */ V(13, 13, 3),
+  /* 010  */ V(11, 14, 3),
+  /* 011  */ V(14, 11, 3),
+  /* 100  */ V(12, 13, 3),
+  /* 101  */ V(13, 12, 3),
+  /* 110  */ V(10, 14, 3),
+  /* 111  */ V(14, 10, 3),
+
+  /* 0010 1110 ... */
+  /* 000  */ V(11, 13, 3),	/* 188 */
+  /* 001  */ V(13, 11, 3),
+  /* 010  */ V(12, 12, 3),
+  /* 011  */ V(9, 14, 3),
+  /* 100  */ V(14, 9, 3),
+  /* 101  */ V(10, 13, 3),
+  /* 110  */ V(13, 10, 3),
+  /* 111  */ V(11, 12, 3),
+
+  /* 0010 1111 ... */
+  /* 000  */ V(12, 11, 3),	/* 196 */
+  /* 001  */ V(8, 14, 3),
+  /* 010  */ V(14, 8, 3),
+  /* 011  */ V(9, 13, 3),
+  /* 100  */ V(13, 9, 3),
+  /* 101  */ V(7, 14, 3),
+  /* 110  */ V(14, 7, 3),
+  /* 111  */ V(10, 12, 3),
+
+  /* 0100 0000 ... */
+  /* 0000 */ V(12, 10, 3),	/* 204 */
+  /* 0001 */ V(12, 10, 3),
+  /* 0010 */ V(11, 11, 3),
+  /* 0011 */ V(11, 11, 3),
+  /* 0100 */ V(8, 13, 3),
+  /* 0101 */ V(8, 13, 3),
+  /* 0110 */ V(13, 8, 3),
+  /* 0111 */ V(13, 8, 3),
+  /* 1000 */ V(0, 14, 4),
+  /* 1001 */ V(14, 0, 4),
+  /* 1010 */ V(0, 13, 3),
+  /* 1011 */ V(0, 13, 3),
+  /* 1100 */ V(14, 6, 2),
+  /* 1101 */ V(14, 6, 2),
+  /* 1110 */ V(14, 6, 2),
+  /* 1111 */ V(14, 6, 2),
+
+  /* 0100 0001 ... */
+  /* 000  */ V(6, 14, 3),	/* 220 */
+  /* 001  */ V(9, 12, 3),
+  /* 010  */ V(12, 9, 2),
+  /* 011  */ V(12, 9, 2),
+  /* 100  */ V(5, 14, 2),
+  /* 101  */ V(5, 14, 2),
+  /* 110  */ V(11, 10, 2),
+  /* 111  */ V(11, 10, 2),
+
+  /* 0100 0010 ... */
+  /* 000  */ V(14, 5, 2),	/* 228 */
+  /* 001  */ V(14, 5, 2),
+  /* 010  */ V(10, 11, 3),
+  /* 011  */ V(7, 13, 3),
+  /* 100  */ V(13, 7, 2),
+  /* 101  */ V(13, 7, 2),
+  /* 110  */ V(14, 4, 2),
+  /* 111  */ V(14, 4, 2),
+
+  /* 0100 0011 ... */
+  /* 000  */ V(8, 12, 2),	/* 236 */
+  /* 001  */ V(8, 12, 2),
+  /* 010  */ V(12, 8, 2),
+  /* 011  */ V(12, 8, 2),
+  /* 100  */ V(4, 14, 3),
+  /* 101  */ V(2, 14, 3),
+  /* 110  */ V(3, 14, 2),
+  /* 111  */ V(3, 14, 2),
+
+  /* 0100 0100 ... */
+  /* 00   */ V(6, 13, 2),	/* 244 */
+  /* 01   */ V(13, 6, 2),
+  /* 10   */ V(14, 3, 2),
+  /* 11   */ V(9, 11, 2),
+
+  /* 0100 0101 ... */
+  /* 00   */ V(11, 9, 2),	/* 248 */
+  /* 01   */ V(10, 10, 2),
+  /* 10   */ V(14, 2, 2),
+  /* 11   */ V(1, 14, 2),
+
+  /* 0100 0110 ... */
+  /* 00   */ V(14, 1, 2),	/* 252 */
+  /* 01   */ V(5, 13, 2),
+  /* 10   */ V(13, 5, 2),
+  /* 11   */ V(7, 12, 2),
+
+  /* 0100 0111 ... */
+  /* 00   */ V(12, 7, 2),	/* 256 */
+  /* 01   */ V(4, 13, 2),
+  /* 10   */ V(8, 11, 2),
+  /* 11   */ V(11, 8, 2),
+
+  /* 0100 1000 ... */
+  /* 00   */ V(13, 4, 2),	/* 260 */
+  /* 01   */ V(9, 10, 2),
+  /* 10   */ V(10, 9, 2),
+  /* 11   */ V(6, 12, 2),
+
+  /* 0100 1001 ... */
+  /* 00   */ V(12, 6, 2),	/* 264 */
+  /* 01   */ V(3, 13, 2),
+  /* 10   */ V(13, 3, 2),
+  /* 11   */ V(2, 13, 2),
+
+  /* 0100 1010 ... */
+  /* 00   */ V(13, 2, 2),	/* 268 */
+  /* 01   */ V(1, 13, 2),
+  /* 10   */ V(7, 11, 2),
+  /* 11   */ V(11, 7, 2),
+
+  /* 0100 1011 ... */
+  /* 00   */ V(13, 1, 2),	/* 272 */
+  /* 01   */ V(5, 12, 2),
+  /* 10   */ V(12, 5, 2),
+  /* 11   */ V(8, 10, 2),
+
+  /* 0100 1100 ... */
+  /* 00   */ V(10, 8, 2),	/* 276 */
+  /* 01   */ V(9, 9, 2),
+  /* 10   */ V(4, 12, 2),
+  /* 11   */ V(12, 4, 2),
+
+  /* 0100 1101 ... */
+  /* 000  */ V(6, 11, 2),	/* 280 */
+  /* 001  */ V(6, 11, 2),
+  /* 010  */ V(11, 6, 2),
+  /* 011  */ V(11, 6, 2),
+  /* 100  */ V(13, 0, 3),
+  /* 101  */ V(0, 12, 3),
+  /* 110  */ V(3, 12, 2),
+  /* 111  */ V(3, 12, 2),
+
+  /* 0100 1110 ... */
+  /* 00   */ V(12, 3, 2),	/* 288 */
+  /* 01   */ V(7, 10, 2),
+  /* 10   */ V(10, 7, 2),
+  /* 11   */ V(2, 12, 2),
+
+  /* 0100 1111 ... */
+  /* 00   */ V(12, 2, 2),	/* 292 */
+  /* 01   */ V(5, 11, 2),
+  /* 10   */ V(11, 5, 2),
+  /* 11   */ V(1, 12, 2),
+
+  /* 0101 0000 ... */
+  /* 00   */ V(8, 9, 2),	/* 296 */
+  /* 01   */ V(9, 8, 2),
+  /* 10   */ V(12, 1, 2),
+  /* 11   */ V(4, 11, 2),
+
+  /* 0101 0001 ... */
+  /* 000  */ V(12, 0, 3),	/* 300 */
+  /* 001  */ V(0, 11, 3),
+  /* 010  */ V(3, 11, 2),
+  /* 011  */ V(3, 11, 2),
+  /* 100  */ V(11, 0, 3),
+  /* 101  */ V(0, 10, 3),
+  /* 110  */ V(1, 10, 2),
+  /* 111  */ V(1, 10, 2),
+
+  /* 0101 0010 ... */
+  /* 00   */ V(11, 4, 1),	/* 308 */
+  /* 01   */ V(11, 4, 1),
+  /* 10   */ V(6, 10, 2),
+  /* 11   */ V(10, 6, 2),
+
+  /* 0101 0011 ... */
+  /* 000  */ V(7, 9, 2),	/* 312 */
+  /* 001  */ V(7, 9, 2),
+  /* 010  */ V(9, 7, 2),
+  /* 011  */ V(9, 7, 2),
+  /* 100  */ V(10, 0, 3),
+  /* 101  */ V(0, 9, 3),
+  /* 110  */ V(9, 0, 2),
+  /* 111  */ V(9, 0, 2),
+
+  /* 0101 0100 ... */
+  /* 0    */ V(11, 3, 1),	/* 320 */
+  /* 1    */ V(8, 8, 1),
+
+  /* 0101 0101 ... */
+  /* 00   */ V(2, 11, 2),	/* 322 */
+  /* 01   */ V(5, 10, 2),
+  /* 10   */ V(11, 2, 1),
+  /* 11   */ V(11, 2, 1),
+
+  /* 0101 0110 ... */
+  /* 00   */ V(10, 5, 2),	/* 326 */
+  /* 01   */ V(1, 11, 2),
+  /* 10   */ V(11, 1, 2),
+  /* 11   */ V(6, 9, 2),
+
+  /* 0101 0111 ... */
+  /* 0    */ V(9, 6, 1),	/* 330 */
+  /* 1    */ V(10, 4, 1),
+
+  /* 0101 1000 ... */
+  /* 00   */ V(4, 10, 2),	/* 332 */
+  /* 01   */ V(7, 8, 2),
+  /* 10   */ V(8, 7, 1),
+  /* 11   */ V(8, 7, 1),
+
+  /* 0101 1001 ... */
+  /* 0    */ V(3, 10, 1),	/* 336 */
+  /* 1    */ V(10, 3, 1),
+
+  /* 0101 1010 ... */
+  /* 0    */ V(5, 9, 1),	/* 338 */
+  /* 1    */ V(9, 5, 1),
+
+  /* 0101 1011 ... */
+  /* 0    */ V(2, 10, 1),	/* 340 */
+  /* 1    */ V(10, 2, 1),
+
+  /* 0101 1100 ... */
+  /* 0    */ V(10, 1, 1),	/* 342 */
+  /* 1    */ V(6, 8, 1),
+
+  /* 0101 1101 ... */
+  /* 0    */ V(8, 6, 1),	/* 344 */
+  /* 1    */ V(7, 7, 1),
+
+  /* 0101 1110 ... */
+  /* 0    */ V(4, 9, 1),	/* 346 */
+  /* 1    */ V(9, 4, 1),
+
+  /* 0101 1111 ... */
+  /* 0    */ V(3, 9, 1),	/* 348 */
+  /* 1    */ V(9, 3, 1),
+
+  /* 0110 0000 ... */
+  /* 0    */ V(5, 8, 1),	/* 350 */
+  /* 1    */ V(8, 5, 1),
+
+  /* 0110 0001 ... */
+  /* 0    */ V(2, 9, 1),	/* 352 */
+  /* 1    */ V(6, 7, 1),
+
+  /* 0110 0010 ... */
+  /* 0    */ V(7, 6, 1),	/* 354 */
+  /* 1    */ V(9, 2, 1),
+
+  /* 0110 0011 ... */
+  /* 0    */ V(1, 9, 1),	/* 356 */
+  /* 1    */ V(9, 1, 1),
+
+  /* 0110 0100 ... */
+  /* 0    */ V(4, 8, 1),	/* 358 */
+  /* 1    */ V(8, 4, 1),
+
+  /* 0110 0101 ... */
+  /* 0    */ V(5, 7, 1),	/* 360 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0110 0110 ... */
+  /* 0    */ V(3, 8, 1),	/* 362 */
+  /* 1    */ V(8, 3, 1),
+
+  /* 0110 0111 ... */
+  /* 0    */ V(6, 6, 1),	/* 364 */
+  /* 1    */ V(2, 8, 1),
+
+  /* 0110 1000 ... */
+  /* 0    */ V(8, 2, 1),	/* 366 */
+  /* 1    */ V(1, 8, 1),
+
+  /* 0110 1001 ... */
+  /* 0    */ V(4, 7, 1),	/* 368 */
+  /* 1    */ V(7, 4, 1),
+
+  /* 0110 1010 ... */
+  /* 00   */ V(8, 1, 1),	/* 370 */
+  /* 01   */ V(8, 1, 1),
+  /* 10   */ V(0, 8, 2),
+  /* 11   */ V(8, 0, 2),
+
+  /* 0110 1011 ... */
+  /* 0    */ V(5, 6, 1),	/* 374 */
+  /* 1    */ V(6, 5, 1),
+
+  /* 0110 1100 ... */
+  /* 00   */ V(1, 7, 1),	/* 376 */
+  /* 01   */ V(1, 7, 1),
+  /* 10   */ V(0, 7, 2),
+  /* 11   */ V(7, 0, 2),
+
+  /* 0110 1110 ... */
+  /* 0    */ V(3, 7, 1),	/* 380  */
+  /* 1    */ V(2, 7, 1),
+
+  /* 0111 1100 ... */
+  /* 0    */ V(0, 6, 1),	/* 382 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 1000 0011 ... */
+  /* 0    */ V(0, 5, 1),	/* 384 */
+  /* 1    */ V(5, 0, 1)
+];
+
+/* hufftable constructor */
+function MP3Hufftable(table, linbits, startbits) {
+    this.table = table;
+    this.linbits = linbits;
+    this.startbits = startbits;
+};
+
+/* external tables */
+exports.huff_quad_table = [ hufftabA, hufftabB ];
+exports.huff_pair_table = [
+  /*  0 */ new MP3Hufftable(hufftab0,   0, 0),
+  /*  1 */ new MP3Hufftable(hufftab1,   0, 3),
+  /*  2 */ new MP3Hufftable(hufftab2,   0, 3),
+  /*  3 */ new MP3Hufftable(hufftab3,   0, 3),
+  /*  4 */ null, //new MP3Hufftable(0 /* not used */),
+  /*  5 */ new MP3Hufftable(hufftab5,   0, 3),
+  /*  6 */ new MP3Hufftable(hufftab6,   0, 4),
+  /*  7 */ new MP3Hufftable(hufftab7,   0, 4),
+  /*  8 */ new MP3Hufftable(hufftab8,   0, 4),
+  /*  9 */ new MP3Hufftable(hufftab9,   0, 4),
+  /* 10 */ new MP3Hufftable(hufftab10,  0, 4),
+  /* 11 */ new MP3Hufftable(hufftab11,  0, 4),
+  /* 12 */ new MP3Hufftable(hufftab12,  0, 4),
+  /* 13 */ new MP3Hufftable(hufftab13,  0, 4),
+  /* 14 */ null, //new MP3Hufftable(0 /* not used */),
+  /* 15 */ new MP3Hufftable(hufftab15,  0, 4),
+  /* 16 */ new MP3Hufftable(hufftab16,  1, 4),
+  /* 17 */ new MP3Hufftable(hufftab16,  2, 4),
+  /* 18 */ new MP3Hufftable(hufftab16,  3, 4),
+  /* 19 */ new MP3Hufftable(hufftab16,  4, 4),
+  /* 20 */ new MP3Hufftable(hufftab16,  6, 4),
+  /* 21 */ new MP3Hufftable(hufftab16,  8, 4),
+  /* 22 */ new MP3Hufftable(hufftab16, 10, 4),
+  /* 23 */ new MP3Hufftable(hufftab16, 13, 4),
+  /* 24 */ new MP3Hufftable(hufftab24,  4, 4),
+  /* 25 */ new MP3Hufftable(hufftab24,  5, 4),
+  /* 26 */ new MP3Hufftable(hufftab24,  6, 4),
+  /* 27 */ new MP3Hufftable(hufftab24,  7, 4),
+  /* 28 */ new MP3Hufftable(hufftab24,  8, 4),
+  /* 29 */ new MP3Hufftable(hufftab24,  9, 4),
+  /* 30 */ new MP3Hufftable(hufftab24, 11, 4),
+  /* 31 */ new MP3Hufftable(hufftab24, 13, 4)
+];
+
+},{}],7:[function(require,module,exports){
+var AV = (window.AV);
+
+const ENCODINGS = ['latin1', 'utf16-bom', 'utf16-be', 'utf8'];
+
+var ID3Stream = AV.Base.extend({
+    constructor: function(header, stream) {
+        this.header = header;
+        this.stream = stream;
+        this.offset = 0;
+    },
+    
+    read: function() {
+        if (!this.data) {
+            this.data = {};
+            
+            // read all frames
+            var frame;
+            while (frame = this.readFrame()) {
+                // if we already have an instance of this key, add it to an array
+                if (frame.key in this.data) {
+                    if (!Array.isArray(this.data[frame.key]))
+                        this.data[frame.key] = [this.data[frame.key]];
+                        
+                    this.data[frame.key].push(frame.value);
+                } else {
+                    this.data[frame.key] = frame.value;
+                }
+            }
+        }
+
+        return this.data;
+    },
+    
+    readFrame: function() {
+        if (this.offset >= this.header.length)
+            return null;
+        
+        // get the header    
+        var header = this.readHeader();
+        var decoder = header.identifier;
+        
+        if (header.identifier.charCodeAt(0) === 0) {
+            this.offset += this.header.length + 1;
+            return null;
+        }
+        
+        // map common frame names to a single type
+        if (!this.frameTypes[decoder]) {
+            for (var key in this.map) {
+                if (this.map[key].indexOf(decoder) !== -1) {
+                    decoder = key;
+                    break;
+                }
+            }
+        }
+
+        if (this.frameTypes[decoder]) {
+            // decode the frame
+            var frame = this.decodeFrame(header, this.frameTypes[decoder]),
+                keys = Object.keys(frame);
+            
+            // if it only returned one key, use that as the value    
+            if (keys.length === 1)
+                frame = frame[keys[0]];
+            
+            var result = {
+                value: frame
+            };
+            
+        } else {
+            // No frame type found, treat it as binary
+            var result = {
+                value: this.stream.readBuffer(Math.min(header.length, this.header.length - this.offset))
+            };
+        }
+
+        result.key = this.names[header.identifier] ? this.names[header.identifier] : header.identifier;
+        
+        // special sauce for cover art, which should just be a buffer
+        if (result.key === 'coverArt')
+            result.value = result.value.data;
+
+        this.offset += 10 + header.length;
+        return result;
+    },
+
+    decodeFrame: function(header, fields) {
+        var stream = this.stream,
+            start = stream.offset;
+            
+        var encoding = 0, ret = {};
+        var len = Object.keys(fields).length, i = 0;
+        
+        for (var key in fields) {
+            var type = fields[key];
+            var rest = header.length - (stream.offset - start);
+            i++;
+            
+            // check for special field names
+            switch (key) {
+                case 'encoding':
+                    encoding = stream.readUInt8();
+                    continue;
+                
+                case 'language':
+                    ret.language = stream.readString(3);
+                    continue;
+            }
+            
+            // check types
+            switch (type) {                    
+                case 'latin1':
+                    ret[key] = stream.readString(i === len ? rest : null, 'latin1');
+                    break;
+                    
+                case 'string':
+                    ret[key] = stream.readString(i === len ? rest : null, ENCODINGS[encoding]);
+                    break;
+                    
+                case 'binary':
+                    ret[key] = stream.readBuffer(rest)
+                    break;
+                    
+                case 'int16':
+                    ret[key] = stream.readInt16();
+                    break;
+                    
+                case 'int8':
+                    ret[key] = stream.readInt8();
+                    break;
+                    
+                case 'int24':
+                    ret[key] = stream.readInt24();
+                    break;
+                    
+                case 'int32':
+                    ret[key] = stream.readInt32();
+                    break;
+                    
+                case 'int32+':
+                    ret[key] = stream.readInt32();
+                    if (rest > 4)
+                        throw new Error('Seriously dude? Stop playing this song and get a life!');
+                        
+                    break;
+                    
+                case 'date':
+                    var val = stream.readString(8);
+                    ret[key] = new Date(val.slice(0, 4), val.slice(4, 6) - 1, val.slice(6, 8));
+                    break;
+                    
+                case 'frame_id':
+                    ret[key] = stream.readString(4);
+                    break;
+                    
+                default:
+                    throw new Error('Unknown key type ' + type);
+            }
+        }
+        
+        // Just in case something went wrong...
+        var rest = header.length - (stream.offset - start);
+        if (rest > 0)
+            stream.advance(rest);
+        
+        return ret;
+    }
+});
+
+// ID3 v2.3 and v2.4 support
+exports.ID3v23Stream = ID3Stream.extend({
+    readHeader: function() {
+        var identifier = this.stream.readString(4);        
+        var length = 0;
+        
+        if (this.header.major === 4) {
+            for (var i = 0; i < 4; i++)
+                length = (length << 7) + (this.stream.readUInt8() & 0x7f);
+        } else {
+            length = this.stream.readUInt32();
+        }
+        
+        return {
+            identifier: identifier,
+            length: length,
+            flags: this.stream.readUInt16()
+        };
+    },
+    
+    map: {
+        text: [
+            // Identification Frames
+            'TIT1', 'TIT2', 'TIT3', 'TALB', 'TOAL', 'TRCK', 'TPOS', 'TSST', 'TSRC',
+
+            // Involved Persons Frames
+            'TPE1', 'TPE2', 'TPE3', 'TPE4', 'TOPE', 'TEXT', 'TOLY', 'TCOM', 'TMCL', 'TIPL', 'TENC',
+
+            // Derived and Subjective Properties Frames
+            'TBPM', 'TLEN', 'TKEY', 'TLAN', 'TCON', 'TFLT', 'TMED', 'TMOO',
+
+            // Rights and Licence Frames
+            'TCOP', 'TPRO', 'TPUB', 'TOWN', 'TRSN', 'TRSO',
+
+            // Other Text Frames
+            'TOFN', 'TDLY', 'TDEN', 'TDOR', 'TDRC', 'TDRL', 'TDTG', 'TSSE', 'TSOA', 'TSOP', 'TSOT',
+            
+            // Deprecated Text Frames
+            'TDAT', 'TIME', 'TORY', 'TRDA', 'TSIZ', 'TYER',
+            
+            // Non-standard iTunes Frames
+            'TCMP', 'TSO2', 'TSOC'
+        ],
+        
+        url: [
+            'WCOM', 'WCOP', 'WOAF', 'WOAR', 'WOAS', 'WORS', 'WPAY', 'WPUB'
+        ]
+    },
+    
+    frameTypes: {        
+        text: {
+            encoding: 1,
+            value: 'string'
+        },
+        
+        url: {
+            value: 'latin1'
+        },
+        
+        TXXX: {
+            encoding: 1,
+            description: 'string',
+            value: 'string'
+        },
+        
+        WXXX: {
+            encoding: 1,
+            description: 'string',
+            value: 'latin1',
+        },
+        
+        USLT: {
+            encoding: 1,
+            language: 1,
+            description: 'string',
+            value: 'string'
+        },
+        
+        COMM: {
+            encoding: 1,
+            language: 1,
+            description: 'string',
+            value: 'string'
+        },
+        
+        APIC: {
+            encoding: 1,
+            mime: 'latin1',
+            type: 'int8',
+            description: 'string',
+            data: 'binary'
+        },
+        
+        UFID: {
+            owner: 'latin1',
+            identifier: 'binary'
+        },
+
+        MCDI: {
+            value: 'binary'
+        },
+        
+        PRIV: {
+            owner: 'latin1',
+            value: 'binary'
+        },
+        
+        GEOB: {
+            encoding: 1,
+            mime: 'latin1',
+            filename: 'string',
+            description: 'string',
+            data: 'binary'
+        },
+        
+        PCNT: {
+            value: 'int32+'
+        },
+        
+        POPM: {
+            email: 'latin1',
+            rating: 'int8',
+            counter: 'int32+'
+        },
+        
+        AENC: {
+            owner: 'latin1',
+            previewStart: 'int16',
+            previewLength: 'int16',
+            encryptionInfo: 'binary'
+        },
+        
+        ETCO: {
+            format: 'int8',
+            data: 'binary'  // TODO
+        },
+        
+        MLLT: {
+            framesBetweenReference: 'int16',
+            bytesBetweenReference: 'int24',
+            millisecondsBetweenReference: 'int24',
+            bitsForBytesDeviation: 'int8',
+            bitsForMillisecondsDev: 'int8',
+            data: 'binary' // TODO
+        },
+        
+        SYTC: {
+            format: 'int8',
+            tempoData: 'binary' // TODO
+        },
+        
+        SYLT: {
+            encoding: 1,
+            language: 1,
+            format: 'int8',
+            contentType: 'int8',
+            description: 'string',
+            data: 'binary' // TODO
+        },
+        
+        RVA2: {
+            identification: 'latin1',
+            data: 'binary' // TODO
+        },
+        
+        EQU2: {
+            interpolationMethod: 'int8',
+            identification: 'latin1',
+            data: 'binary' // TODO
+        },
+        
+        RVRB: {
+            left: 'int16',
+            right: 'int16',
+            bouncesLeft: 'int8',
+            bouncesRight: 'int8',
+            feedbackLL: 'int8',
+            feedbackLR: 'int8',
+            feedbackRR: 'int8',
+            feedbackRL: 'int8',
+            premixLR: 'int8',
+            premixRL: 'int8'
+        },
+        
+        RBUF: {
+            size: 'int24',
+            flag: 'int8',
+            offset: 'int32'
+        },
+        
+        LINK: {
+            identifier: 'frame_id',
+            url: 'latin1',
+            data: 'binary' // TODO stringlist?
+        },
+        
+        POSS: {
+            format: 'int8',
+            position: 'binary' // TODO
+        },
+        
+        USER: {
+            encoding: 1,
+            language: 1,
+            value: 'string'
+        },
+        
+        OWNE: {
+            encoding: 1,
+            price: 'latin1',
+            purchaseDate: 'date',
+            seller: 'string'
+        },
+        
+        COMR: {
+            encoding: 1,
+            price: 'latin1',
+            validUntil: 'date',
+            contactURL: 'latin1',
+            receivedAs: 'int8',
+            seller: 'string',
+            description: 'string',
+            logoMime: 'latin1',
+            logo: 'binary'
+        },
+        
+        ENCR: {
+            owner: 'latin1',
+            methodSymbol: 'int8',
+            data: 'binary'
+        },
+        
+        GRID: {
+            owner: 'latin1',
+            groupSymbol: 'int8',
+            data: 'binary'
+        },
+        
+        SIGN: {
+            groupSymbol: 'int8',
+            signature: 'binary'
+        },
+        
+        SEEK: {
+            value: 'int32'
+        },
+        
+        ASPI: {
+            dataStart: 'int32',
+            dataLength: 'int32',
+            numPoints: 'int16',
+            bitsPerPoint: 'int8',
+            data: 'binary' // TODO
+        },
+        
+        // Deprecated ID3 v2.3 frames
+        IPLS: {
+            encoding: 1,
+            value: 'string' // list?
+        },
+        
+        RVAD: {
+            adjustment: 'int8',
+            bits: 'int8',
+            data: 'binary' // TODO
+        },
+        
+        EQUA: {
+            adjustmentBits: 'int8',
+            data: 'binary' // TODO
+        }
+    },
+    
+    names: {
+        // Identification Frames
+        'TIT1': 'grouping',
+        'TIT2': 'title',
+        'TIT3': 'subtitle',
+        'TALB': 'album',
+        'TOAL': 'originalAlbumTitle',
+        'TRCK': 'trackNumber',
+        'TPOS': 'diskNumber',
+        'TSST': 'setSubtitle',
+        'TSRC': 'ISRC',
+
+        // Involved Persons Frames
+        'TPE1': 'artist',
+        'TPE2': 'albumArtist',
+        'TPE3': 'conductor',
+        'TPE4': 'modifiedBy',
+        'TOPE': 'originalArtist',
+        'TEXT': 'lyricist',
+        'TOLY': 'originalLyricist',
+        'TCOM': 'composer',
+        'TMCL': 'musicianCreditsList',
+        'TIPL': 'involvedPeopleList',
+        'TENC': 'encodedBy',
+
+        // Derived and Subjective Properties Frames
+        'TBPM': 'tempo',
+        'TLEN': 'length',
+        'TKEY': 'initialKey',
+        'TLAN': 'language',
+        'TCON': 'genre',
+        'TFLT': 'fileType',
+        'TMED': 'mediaType',
+        'TMOO': 'mood',
+
+        // Rights and Licence Frames
+        'TCOP': 'copyright',
+        'TPRO': 'producedNotice',
+        'TPUB': 'publisher',
+        'TOWN': 'fileOwner',
+        'TRSN': 'internetRadioStationName',
+        'TRSO': 'internetRadioStationOwner',
+
+        // Other Text Frames
+        'TOFN': 'originalFilename',
+        'TDLY': 'playlistDelay',
+        'TDEN': 'encodingTime',
+        'TDOR': 'originalReleaseTime',
+        'TDRC': 'recordingTime',
+        'TDRL': 'releaseTime',
+        'TDTG': 'taggingTime',
+        'TSSE': 'encodedWith',
+        'TSOA': 'albumSortOrder',
+        'TSOP': 'performerSortOrder',
+        'TSOT': 'titleSortOrder',
+        
+        // User defined text information
+        'TXXX': 'userText',
+        
+        // Unsynchronised lyrics/text transcription
+        'USLT': 'lyrics',
+
+        // Attached Picture Frame
+        'APIC': 'coverArt',
+
+        // Unique Identifier Frame
+        'UFID': 'uniqueIdentifier',
+
+        // Music CD Identifier Frame
+        'MCDI': 'CDIdentifier',
+
+        // Comment Frame
+        'COMM': 'comments',
+        
+        // URL link frames
+        'WCOM': 'commercialInformation',
+        'WCOP': 'copyrightInformation',
+        'WOAF': 'officialAudioFileWebpage',
+        'WOAR': 'officialArtistWebpage',
+        'WOAS': 'officialAudioSourceWebpage',
+        'WORS': 'officialInternetRadioStationHomepage',
+        'WPAY': 'payment',
+        'WPUB': 'officialPublisherWebpage',
+
+        // User Defined URL Link Frame
+        'WXXX': 'url',
+
+        'PRIV': 'private',
+        'GEOB': 'generalEncapsulatedObject',
+        'PCNT': 'playCount',
+        'POPM': 'rating',
+        'AENC': 'audioEncryption',
+        'ETCO': 'eventTimingCodes',
+        'MLLT': 'MPEGLocationLookupTable',
+        'SYTC': 'synchronisedTempoCodes',
+        'SYLT': 'synchronisedLyrics',
+        'RVA2': 'volumeAdjustment',
+        'EQU2': 'equalization',
+        'RVRB': 'reverb',
+        'RBUF': 'recommendedBufferSize',
+        'LINK': 'link',
+        'POSS': 'positionSynchronisation',
+        'USER': 'termsOfUse',
+        'OWNE': 'ownership',
+        'COMR': 'commercial',
+        'ENCR': 'encryption',
+        'GRID': 'groupIdentifier',
+        'SIGN': 'signature',
+        'SEEK': 'seek',
+        'ASPI': 'audioSeekPointIndex',
+
+        // Deprecated ID3 v2.3 frames
+        'TDAT': 'date',
+        'TIME': 'time',
+        'TORY': 'originalReleaseYear',
+        'TRDA': 'recordingDates',
+        'TSIZ': 'size',
+        'TYER': 'year',
+        'IPLS': 'involvedPeopleList',
+        'RVAD': 'volumeAdjustment',
+        'EQUA': 'equalization',
+        
+        // Non-standard iTunes frames
+        'TCMP': 'compilation',
+        'TSO2': 'albumArtistSortOrder',
+        'TSOC': 'composerSortOrder'
+    }
+});
+
+// ID3 v2.2 support
+exports.ID3v22Stream = exports.ID3v23Stream.extend({    
+    readHeader: function() {
+        var id = this.stream.readString(3);
+        
+        if (this.frameReplacements[id] && !this.frameTypes[id])
+            this.frameTypes[id] = this.frameReplacements[id];
+        
+        return {
+            identifier: this.replacements[id] || id,
+            length: this.stream.readUInt24()
+        };
+    },
+    
+    // map 3 char ID3 v2.2 names to 4 char ID3 v2.3/4 names
+    replacements: {
+        'UFI': 'UFID',
+        'TT1': 'TIT1',
+        'TT2': 'TIT2',
+        'TT3': 'TIT3',
+        'TP1': 'TPE1',
+        'TP2': 'TPE2',
+        'TP3': 'TPE3',
+        'TP4': 'TPE4',
+        'TCM': 'TCOM',
+        'TXT': 'TEXT',
+        'TLA': 'TLAN',
+        'TCO': 'TCON',
+        'TAL': 'TALB',
+        'TPA': 'TPOS',
+        'TRK': 'TRCK',
+        'TRC': 'TSRC',
+        'TYE': 'TYER',
+        'TDA': 'TDAT',
+        'TIM': 'TIME',
+        'TRD': 'TRDA',
+        'TMT': 'TMED',
+        'TFT': 'TFLT',
+        'TBP': 'TBPM',
+        'TCR': 'TCOP',
+        'TPB': 'TPUB',
+        'TEN': 'TENC',
+        'TSS': 'TSSE',
+        'TOF': 'TOFN',
+        'TLE': 'TLEN',
+        'TSI': 'TSIZ',
+        'TDY': 'TDLY',
+        'TKE': 'TKEY',
+        'TOT': 'TOAL',
+        'TOA': 'TOPE',
+        'TOL': 'TOLY',
+        'TOR': 'TORY',
+        'TXX': 'TXXX',
+        
+        'WAF': 'WOAF',
+        'WAR': 'WOAR',
+        'WAS': 'WOAS',
+        'WCM': 'WCOM',
+        'WCP': 'WCOP',
+        'WPB': 'WPUB',
+        'WXX': 'WXXX',
+        
+        'IPL': 'IPLS',
+        'MCI': 'MCDI',
+        'ETC': 'ETCO',
+        'MLL': 'MLLT',
+        'STC': 'SYTC',
+        'ULT': 'USLT',
+        'SLT': 'SYLT',
+        'COM': 'COMM',
+        'RVA': 'RVAD',
+        'EQU': 'EQUA',
+        'REV': 'RVRB',
+        
+        'GEO': 'GEOB',
+        'CNT': 'PCNT',
+        'POP': 'POPM',
+        'BUF': 'RBUF',
+        'CRA': 'AENC',
+        'LNK': 'LINK',
+        
+        // iTunes stuff
+        'TST': 'TSOT',
+        'TSP': 'TSOP',
+        'TSA': 'TSOA',
+        'TCP': 'TCMP',
+        'TS2': 'TSO2',
+        'TSC': 'TSOC'
+    },
+    
+    // replacements for ID3 v2.3/4 frames
+    frameReplacements: {
+        PIC: {
+            encoding: 1,
+            format: 'int24',
+            type: 'int8',
+            description: 'string',
+            data: 'binary'
+        },
+        
+        CRM: {
+            owner: 'latin1',
+            description: 'latin1',
+            data: 'binary'
+        }
+    }
+});
+},{}],8:[function(require,module,exports){
+function IMDCT() {
+    this.tmp_imdct36 = new Float64Array(18);
+    this.tmp_dctIV = new Float64Array(18);
+    this.tmp_sdctII = new Float64Array(9);
+}
+
+// perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm
+IMDCT.prototype.imdct36 = function(x, y) {
+    var tmp = this.tmp_imdct36;
+
+    /* DCT-IV */
+    this.dctIV(x, tmp);
+
+    // convert 18-point DCT-IV to 36-point IMDCT
+    for (var i =  0; i <  9; ++i) {
+        y[i] =  tmp[9 + i];
+    }
+    for (var i =  9; i < 27; ++i) {
+        y[i] = -tmp[36 - (9 + i) - 1];
+    }
+    for (var i = 27; i < 36; ++i) {
+        y[i] = -tmp[i - 27];
+    }
+};
+
+var dctIV_scale = [];
+for(i = 0; i < 18; i++) {
+    dctIV_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (4 * 18));
+}
+
+IMDCT.prototype.dctIV = function(y, X) {
+    var tmp = this.tmp_dctIV;
+
+    // scaling
+    for (var i = 0; i < 18; ++i) {
+        tmp[i] = y[i] * dctIV_scale[i];
+    }
+
+    // SDCT-II
+    this.sdctII(tmp, X);
+
+    // scale reduction and output accumulation
+    X[0] /= 2;
+    for (var i = 1; i < 18; ++i) {
+        X[i] = X[i] / 2 - X[i - 1];
+    }
+};
+
+var sdctII_scale = [];
+for (var i = 0; i < 9; ++i) {
+    sdctII_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (2 * 18));
+}
+
+IMDCT.prototype.sdctII = function(x, X) {
+    // divide the 18-point SDCT-II into two 9-point SDCT-IIs
+    var tmp = this.tmp_sdctII;
+
+    // even input butterfly
+    for (var i = 0; i < 9; ++i) {
+        tmp[i] = x[i] + x[18 - i - 1];
+    }
+
+    fastsdct(tmp, X, 0);
+
+    // odd input butterfly and scaling
+    for (var i = 0; i < 9; ++i) {
+        tmp[i] = (x[i] - x[18 - i - 1]) * sdctII_scale[i];
+    }
+
+    fastsdct(tmp, X, 1);
+
+    // output accumulation
+    for (var i = 3; i < 18; i += 2) {
+        X[i] -= X[i - 2];
+    }
+};
+
+var c0 = 2 * Math.cos( 1 * Math.PI / 18);
+var c1 = 2 * Math.cos( 3 * Math.PI / 18);
+var c2 = 2 * Math.cos( 4 * Math.PI / 18);
+var c3 = 2 * Math.cos( 5 * Math.PI / 18);
+var c4 = 2 * Math.cos( 7 * Math.PI / 18);
+var c5 = 2 * Math.cos( 8 * Math.PI / 18);
+var c6 = 2 * Math.cos(16 * Math.PI / 18);
+
+function fastsdct(x, y, offset) {
+    var a0,  a1,  a2,  a3,  a4,  a5,  a6,  a7,  a8,  a9,  a10, a11, a12;
+    var a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25;
+    var m0,  m1,  m2,  m3,  m4,  m5,  m6,  m7;
+
+    a0 = x[3] + x[5];
+    a1 = x[3] - x[5];
+    a2 = x[6] + x[2];
+    a3 = x[6] - x[2];
+    a4 = x[1] + x[7];
+    a5 = x[1] - x[7];
+    a6 = x[8] + x[0];
+    a7 = x[8] - x[0];
+
+    a8  = a0  + a2;
+    a9  = a0  - a2;
+    a10 = a0  - a6;
+    a11 = a2  - a6;
+    a12 = a8  + a6;
+    a13 = a1  - a3;
+    a14 = a13 + a7;
+    a15 = a3  + a7;
+    a16 = a1  - a7;
+    a17 = a1  + a3;
+
+    m0 = a17 * -c3;
+    m1 = a16 * -c0;
+    m2 = a15 * -c4;
+    m3 = a14 * -c1;
+    m4 = a5  * -c1;
+    m5 = a11 * -c6;
+    m6 = a10 * -c5;
+    m7 = a9  * -c2;
+
+    a18 =     x[4] + a4;
+    a19 = 2 * x[4] - a4;
+    a20 = a19 + m5;
+    a21 = a19 - m5;
+    a22 = a19 + m6;
+    a23 = m4  + m2;
+    a24 = m4  - m2;
+    a25 = m4  + m1;
+
+    // output to every other slot for convenience
+    y[offset +  0] = a18 + a12;
+    y[offset +  2] = m0  - a25;
+    y[offset +  4] = m7  - a20;
+    y[offset +  6] = m3;
+    y[offset +  8] = a21 - m6;
+    y[offset + 10] = a24 - m1;
+    y[offset + 12] = a12 - 2 * a18;
+    y[offset + 14] = a23 + m0;
+    y[offset + 16] = a22 + m7;
+}
+
+IMDCT.S = [
+  /*  0 */  [ 0.608761429,
+              -0.923879533,
+              -0.130526192,
+               0.991444861,
+              -0.382683432,
+              -0.793353340 ],
+
+  /*  6 */  [ -0.793353340,
+               0.382683432,
+               0.991444861,
+               0.130526192,
+              -0.923879533,
+              -0.608761429 ],
+
+  /*  1 */  [  0.382683432,
+              -0.923879533,
+               0.923879533,
+              -0.382683432,
+              -0.382683432,
+               0.923879533 ],
+
+  /*  7 */  [ -0.923879533,
+              -0.382683432,
+               0.382683432,
+               0.923879533,
+               0.923879533,
+               0.382683432 ],
+
+  /*  2 */  [  0.130526192,
+              -0.382683432,
+               0.608761429,
+              -0.793353340,
+               0.923879533,
+              -0.991444861 ],
+
+  /*  8 */  [ -0.991444861,
+              -0.923879533,
+              -0.793353340,
+              -0.608761429,
+              -0.382683432,
+              -0.130526192 ]
+];
+
+module.exports = IMDCT;
+
+},{}],9:[function(require,module,exports){
+var tables = require('./tables');
+var MP3FrameHeader = require('./header');
+var MP3Frame = require('./frame');
+var utils = require('./utils');
+
+function Layer1() {    
+    this.allocation = utils.makeArray([2, 32], Uint8Array);
+    this.scalefactor = utils.makeArray([2, 32], Uint8Array);
+}
+
+MP3Frame.layers[1] = Layer1;
+
+// linear scaling table
+const LINEAR_TABLE = new Float32Array([
+    1.33333333333333, 1.14285714285714, 1.06666666666667,
+    1.03225806451613, 1.01587301587302, 1.00787401574803,
+    1.00392156862745, 1.00195694716243, 1.00097751710655,
+    1.00048851978505, 1.00024420024420, 1.00012208521548,
+    1.00006103888177, 1.00003051850948
+]);
+
+Layer1.prototype.decode = function(stream, frame) {
+    var header = frame.header;
+    var nch = header.nchannels();
+    
+    var bound = 32;
+    if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) {
+        header.flags |= MP3FrameHeader.FLAGS.I_STEREO;
+        bound = 4 + header.mode_extension * 4;
+    }
+    
+    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {
+        // TODO: crc check
+    }
+    
+    // decode bit allocations
+    var allocation = this.allocation;
+    for (var sb = 0; sb < bound; sb++) {
+        for (var ch = 0; ch < nch; ch++) {
+            var nb = stream.read(4);
+            if (nb === 15)
+                throw new Error("forbidden bit allocation value");
+                
+            allocation[ch][sb] = nb ? nb + 1 : 0;
+        }
+    }
+    
+    for (var sb = bound; sb < 32; sb++) {
+        var nb = stream.read(4);
+        if (nb === 15)
+            throw new Error("forbidden bit allocation value");
+            
+        allocation[0][sb] =
+        allocation[1][sb] = nb ? nb + 1 : 0;
+    }
+    
+    // decode scalefactors
+    var scalefactor = this.scalefactor;
+    for (var sb = 0; sb < 32; sb++) {
+        for (var ch = 0; ch < nch; ch++) {
+            if (allocation[ch][sb]) {
+                scalefactor[ch][sb] = stream.read(6);
+                
+            	/*
+            	 * Scalefactor index 63 does not appear in Table B.1 of
+            	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
+                 * so we do as well 
+                 */
+            }
+        }
+    }
+    
+    // decode samples
+    for (var s = 0; s < 12; s++) {
+        for (var sb = 0; sb < bound; sb++) {
+            for (var ch = 0; ch < nch; ch++) {
+                var nb = allocation[ch][sb];
+                frame.sbsample[ch][s][sb] = nb ? this.sample(stream, nb) * tables.SF_TABLE[scalefactor[ch][sb]] : 0;
+            }
+        }
+        
+        for (var sb = bound; sb < 32; sb++) {
+            var nb = allocation[0][sb];
+            if (nb) {
+                var sample = this.sample(stream, nb);
+                
+                for (var ch = 0; ch < nch; ch++) {
+                    frame.sbsample[ch][s][sb] = sample * tables.SF_TABLE[scalefactor[ch][sb]];
+                }
+            } else {
+                for (var ch = 0; ch < nch; ch++) {
+                    frame.sbsample[ch][s][sb] = 0;
+                }
+            }
+        }
+    }
+};
+
+Layer1.prototype.sample = function(stream, nb) {
+    var sample = stream.read(nb);
+    
+    // invert most significant bit, and form a 2's complement sample
+    sample ^= 1 << (nb - 1);
+    sample |= -(sample & (1 << (nb - 1)));
+    sample /= (1 << (nb - 1));
+        
+    // requantize the sample
+    // s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1))
+    sample += 1 >> (nb - 1);
+    return sample * LINEAR_TABLE[nb - 2];
+};
+
+module.exports = Layer1;
+
+},{"./frame":4,"./header":5,"./tables":14,"./utils":15}],10:[function(require,module,exports){
+var tables = require('./tables');
+var MP3FrameHeader = require('./header');
+var MP3Frame = require('./frame');
+var utils = require('./utils');
+
+function Layer2() {    
+    this.samples = new Float64Array(3);
+    this.allocation = utils.makeArray([2, 32], Uint8Array);
+    this.scfsi = utils.makeArray([2, 32], Uint8Array);
+    this.scalefactor = utils.makeArray([2, 32, 3], Uint8Array);
+}
+
+MP3Frame.layers[2] = Layer2;
+
+// possible quantization per subband table
+const SBQUANT = [
+  // ISO/IEC 11172-3 Table B.2a
+  { sblimit: 27, offsets:
+      [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 ] },
+      
+  // ISO/IEC 11172-3 Table B.2b
+  { sblimit: 30, offsets:
+      [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 ] },
+      
+  // ISO/IEC 11172-3 Table B.2c
+  {  sblimit: 8, offsets:
+      [ 5, 5, 2, 2, 2, 2, 2, 2 ] },
+      
+  // ISO/IEC 11172-3 Table B.2d
+  { sblimit: 12, offsets:
+      [ 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ] },
+      
+  // ISO/IEC 13818-3 Table B.1
+  { sblimit: 30, offsets:
+      [ 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] }
+];
+
+// bit allocation table
+const BITALLOC = [
+    { nbal: 2, offset: 0 },  // 0
+    { nbal: 2, offset: 3 },  // 1
+    { nbal: 3, offset: 3 },  // 2
+    { nbal: 3, offset: 1 },  // 3
+    { nbal: 4, offset: 2 },  // 4
+    { nbal: 4, offset: 3 },  // 5
+    { nbal: 4, offset: 4 },  // 6
+    { nbal: 4, offset: 5 }   // 7
+];
+
+// offsets into quantization class table
+const OFFSETS = [
+    [ 0, 1, 16                                             ],  // 0
+    [ 0, 1,  2, 3, 4, 5, 16                                ],  // 1
+    [ 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14 ],  // 2
+    [ 0, 1,  3, 4, 5, 6,  7, 8,  9, 10, 11, 12, 13, 14, 15 ],  // 3
+    [ 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 16 ],  // 4
+    [ 0, 2,  4, 5, 6, 7,  8, 9, 10, 11, 12, 13, 14, 15, 16 ]   // 5
+];
+
+
+
+/*
+ * These are the Layer II classes of quantization.
+ * The table is derived from Table B.4 of ISO/IEC 11172-3.
+ */
+const QC_TABLE = [
+    { nlevels:     3, group: 2, bits:  5, C: 1.33333333333, D: 0.50000000000 },
+    { nlevels:     5, group: 3, bits:  7, C: 1.60000000000, D: 0.50000000000 },
+    { nlevels:     7, group: 0, bits:  3, C: 1.14285714286, D: 0.25000000000 },
+    { nlevels:     9, group: 4, bits: 10, C: 1.77777777777, D: 0.50000000000 },
+    { nlevels:    15, group: 0, bits:  4, C: 1.06666666666, D: 0.12500000000 },
+    { nlevels:    31, group: 0, bits:  5, C: 1.03225806452, D: 0.06250000000 },
+    { nlevels:    63, group: 0, bits:  6, C: 1.01587301587, D: 0.03125000000 },
+    { nlevels:   127, group: 0, bits:  7, C: 1.00787401575, D: 0.01562500000 },
+    { nlevels:   255, group: 0, bits:  8, C: 1.00392156863, D: 0.00781250000 },
+    { nlevels:   511, group: 0, bits:  9, C: 1.00195694716, D: 0.00390625000 },
+    { nlevels:  1023, group: 0, bits: 10, C: 1.00097751711, D: 0.00195312500 },
+    { nlevels:  2047, group: 0, bits: 11, C: 1.00048851979, D: 0.00097656250 },
+    { nlevels:  4095, group: 0, bits: 12, C: 1.00024420024, D: 0.00048828125 },
+    { nlevels:  8191, group: 0, bits: 13, C: 1.00012208522, D: 0.00024414063 },
+    { nlevels: 16383, group: 0, bits: 14, C: 1.00006103888, D: 0.00012207031 },
+    { nlevels: 32767, group: 0, bits: 15, C: 1.00003051851, D: 0.00006103516 },
+    { nlevels: 65535, group: 0, bits: 16, C: 1.00001525902, D: 0.00003051758 }
+];
+
+Layer2.prototype.decode = function(stream, frame) {
+    var header = frame.header;
+    var nch = header.nchannels();
+    var index;
+    
+    if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {
+        index = 4;
+    } else if (header.flags & MP3FrameHeader.FLAGS.FREEFORMAT) {
+        index = header.samplerate === 48000 ? 0 : 1;
+    } else {
+        var bitrate_per_channel = header.bitrate;
+        
+        if (nch === 2) {
+            bitrate_per_channel /= 2;
+            
+            /*
+             * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and
+             * 80 kbps bitrates in Layer II, but some encoders ignore this
+             * restriction, so we ignore it as well.
+             */
+        } else {
+            /*
+        	 * ISO/IEC 11172-3 does not allow single channel mode for 224, 256,
+        	 * 320, or 384 kbps bitrates in Layer II.
+        	 */
+            if (bitrate_per_channel > 192000)
+                throw new Error('bad bitrate/mode combination');
+        }
+        
+        if (bitrate_per_channel <= 48000)
+            index = header.samplerate === 32000 ? 3 : 2;
+        else if (bitrate_per_channel <= 80000)
+            index = 0;
+        else
+            index = header.samplerate === 48000 ? 0 : 1;
+    }
+    
+    var sblimit = SBQUANT[index].sblimit;
+    var offsets = SBQUANT[index].offsets;
+    
+    var bound = 32;
+    if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) {
+        header.flags |= MP3FrameHeader.FLAGS.I_STEREO;
+        bound = 4 + header.mode_extension * 4;
+    }
+    
+    if (bound > sblimit)
+        bound = sblimit;
+    
+    // decode bit allocations
+    var allocation = this.allocation;
+    for (var sb = 0; sb < bound; sb++) {
+        var nbal = BITALLOC[offsets[sb]].nbal;
+        
+        for (var ch = 0; ch < nch; ch++)
+            allocation[ch][sb] = stream.read(nbal);
+    }
+    
+    for (var sb = bound; sb < sblimit; sb++) {
+        var nbal = BITALLOC[offsets[sb]].nbal;
+        
+        allocation[0][sb] =
+        allocation[1][sb] = stream.read(nbal);
+    }
+    
+    // decode scalefactor selection info
+    var scfsi = this.scfsi;
+    for (var sb = 0; sb < sblimit; sb++) {
+        for (var ch = 0; ch < nch; ch++) {
+            if (allocation[ch][sb])
+                scfsi[ch][sb] = stream.read(2);
+        }
+    }
+    
+    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {
+        // TODO: crc check
+    }
+    
+    // decode scalefactors
+    var scalefactor = this.scalefactor;
+    for (var sb = 0; sb < sblimit; sb++) {
+        for (var ch = 0; ch < nch; ch++) {
+            if (allocation[ch][sb]) {
+                scalefactor[ch][sb][0] = stream.read(6);
+                
+                switch (scfsi[ch][sb]) {
+            	    case 2:
+            	        scalefactor[ch][sb][2] =
+                        scalefactor[ch][sb][1] = scalefactor[ch][sb][0];
+                        break;
+                        
+                    case 0:
+                        scalefactor[ch][sb][1] = stream.read(6);
+                    	// fall through
+                    	
+                    case 1:
+                    case 3:
+                        scalefactor[ch][sb][2] = stream.read(6);
+                }
+                
+                if (scfsi[ch][sb] & 1)
+                    scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1];
+                    
+                /*
+            	 * Scalefactor index 63 does not appear in Table B.1 of
+            	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
+            	 * so we do as well.
+            	 */
+            }
+        }
+    }
+    
+    // decode samples
+    for (var gr = 0; gr < 12; gr++) {
+        // normal
+        for (var sb = 0; sb < bound; sb++) {
+            for (var ch = 0; ch < nch; ch++) {                
+                if (index = allocation[ch][sb]) {
+                    index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1];
+                    this.decodeSamples(stream, QC_TABLE[index]);
+                    
+                    var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]];
+                    for (var s = 0; s < 3; s++) {
+                        frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale;
+                    }
+                } else {
+                    for (var s = 0; s < 3; s++) {
+                        frame.sbsample[ch][3 * gr + s][sb] = 0;
+                    }
+                }
+            }
+        }
+        
+        // joint stereo
+        for (var sb = bound; sb < sblimit; sb++) {
+            if (index = allocation[0][sb]) {
+                index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1];
+                this.decodeSamples(stream, QC_TABLE[index]);
+                
+                for (var ch = 0; ch < nch; ch++) {
+                    var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]];
+                    for (var s = 0; s < 3; s++) {
+                        frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale;
+                    }
+                }
+            } else {
+                for (var ch = 0; ch < nch; ch++) {
+                    for (var s = 0; s < 3; s++) {
+                        frame.sbsample[ch][3 * gr + s][sb] = 0;
+                    }
+                }
+            }
+        }
+        
+        // the rest
+        for (var ch = 0; ch < nch; ch++) {
+            for (var s = 0; s < 3; s++) {
+                for (var sb = sblimit; sb < 32; sb++) {
+                    frame.sbsample[ch][3 * gr + s][sb] = 0;
+                }
+            }
+        }
+    }
+};
+
+Layer2.prototype.decodeSamples = function(stream, quantclass) {
+    var sample = this.samples;
+    var nb = quantclass.group;
+    
+    if (nb) {
+        // degrouping
+        var c = stream.read(quantclass.bits);
+        var nlevels = quantclass.nlevels;
+        
+        for (var s = 0; s < 3; s++) {
+            sample[s] = c % nlevels;
+            c = c / nlevels | 0;
+        }
+    } else {
+        nb = quantclass.bits;
+        for (var s = 0; s < 3; s++) {
+            sample[s] = stream.read(nb);
+        }
+    }
+    
+    for (var s = 0; s < 3; s++) {
+        // invert most significant bit, and form a 2's complement sample
+        var requantized = sample[s] ^ (1 << (nb - 1));
+        requantized |= -(requantized & (1 << (nb - 1)));
+        requantized /= (1 << (nb - 1));
+        
+        // requantize the sample
+        sample[s] = (requantized + quantclass.D) * quantclass.C;
+    }
+};
+
+module.exports = Layer2;
+
+},{"./frame":4,"./header":5,"./tables":14,"./utils":15}],11:[function(require,module,exports){
+var AV = (window.AV);
+var tables = require('./tables');
+var MP3FrameHeader = require('./header');
+var MP3Frame = require('./frame');
+var huffman = require('./huffman');
+var IMDCT = require('./imdct');
+var utils = require('./utils');
+
+function MP3SideInfo() {
+    this.main_data_begin = null;
+    this.private_bits = null;
+    this.gr = [new MP3Granule(), new MP3Granule()];
+    this.scfsi = new Uint8Array(2);
+}
+
+function MP3Granule() {
+    this.ch = [new MP3Channel(), new MP3Channel()];
+}
+
+function MP3Channel() {
+    // from side info
+    this.part2_3_length    = null;
+    this.big_values        = null;
+    this.global_gain       = null;
+    this.scalefac_compress = null;
+    
+    this.flags         = null;
+    this.block_type    = null;
+    this.table_select  = new Uint8Array(3);
+    this.subblock_gain = new Uint8Array(3);
+    this.region0_count = null;
+    this.region1_count = null;
+    
+    // from main_data
+    this.scalefac = new Uint8Array(39);
+}
+
+function Layer3() {
+    this.imdct = new IMDCT();
+    this.si = new MP3SideInfo();
+    
+    // preallocate reusable typed arrays for performance
+    this.xr = [new Float64Array(576), new Float64Array(576)];
+    this._exponents = new Int32Array(39);
+    this.reqcache = new Float64Array(16);
+    this.modes = new Int16Array(39);
+    this.output = new Float64Array(36);
+    
+    this.tmp = utils.makeArray([32, 3, 6]);
+    this.tmp2 = new Float64Array(32 * 3 * 6);
+}
+
+MP3Frame.layers[3] = Layer3;
+
+Layer3.prototype.decode = function(stream, frame) {
+    var header = frame.header;
+    var next_md_begin = 0;
+    var md_len = 0;
+    
+    var nch = header.nchannels();
+    var si_len = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? (nch === 1 ? 9 : 17) : (nch === 1 ? 17 : 32);
+        
+    // check frame sanity
+    if (stream.next_frame - stream.nextByte() < si_len) {
+        stream.md_len = 0;
+        throw new Error('Bad frame length');
+    }
+    
+    // check CRC word
+    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {
+        // TODO: crc check
+    }
+    
+    // decode frame side information
+    var sideInfo = this.sideInfo(stream, nch, header.flags & MP3FrameHeader.FLAGS.LSF_EXT);        
+    var si = sideInfo.si;
+    var data_bitlen = sideInfo.data_bitlen;
+    var priv_bitlen = sideInfo.priv_bitlen;
+    
+    header.flags        |= priv_bitlen;
+    header.private_bits |= si.private_bits;
+    
+    // find main_data of next frame
+    var peek = stream.copy();
+    peek.seek(stream.next_frame * 8);
+    
+    var nextHeader = peek.read(16);    
+    if ((nextHeader & 0xffe6) === 0xffe2) { // syncword | layer
+        if ((nextHeader & 1) === 0) // protection bit
+            peek.advance(16); // crc check
+            
+        peek.advance(16); // skip the rest of the header
+        next_md_begin = peek.read((nextHeader & 8) ? 9 : 8);
+    }
+    
+    // find main_data of this frame
+    var frame_space = stream.next_frame - stream.nextByte();
+    
+    if (next_md_begin > si.main_data_begin + frame_space)
+        next_md_begin = 0;
+        
+    var md_len = si.main_data_begin + frame_space - next_md_begin;
+    var frame_used = 0;
+    var ptr;
+    
+    if (si.main_data_begin === 0) {
+        ptr = stream.stream;
+        stream.md_len = 0;
+        frame_used = md_len;
+    } else {
+        if (si.main_data_begin > stream.md_len) {
+            throw new Error('bad main_data_begin pointer');
+        } else {
+            var old_md_len = stream.md_len;
+            
+            if (md_len > si.main_data_begin) {
+                if (stream.md_len + md_len - si.main_data_begin > MP3FrameHeader.BUFFER_MDLEN) {
+                    throw new Error("Assertion failed: (stream.md_len + md_len - si.main_data_begin <= MAD_MP3FrameHeader.BUFFER_MDLEN)");
+                }
+                
+                frame_used = md_len - si.main_data_begin;
+                this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.nextByte(), frame_used);
+                stream.md_len += frame_used;
+            }
+            
+            ptr = new AV.Bitstream(AV.Stream.fromBuffer(new AV.Buffer(stream.main_data)));
+            ptr.advance((old_md_len - si.main_data_begin) * 8);
+        }
+    }
+    
+    var frame_free = frame_space - frame_used;
+    
+    // decode main_data
+    this.decodeMainData(ptr, frame, si, nch);
+    
+    // preload main_data buffer with up to 511 bytes for next frame(s)
+    if (frame_free >= next_md_begin) {
+        this.memcpy(stream.main_data, 0, stream.stream.stream, stream.next_frame - next_md_begin, next_md_begin);
+        stream.md_len = next_md_begin;
+    } else {
+        if (md_len < si.main_data_begin) {
+            var extra = si.main_data_begin - md_len;
+            if (extra + frame_free > next_md_begin)
+                extra = next_md_begin - frame_free;
+
+            if (extra < stream.md_len) {
+                this.memcpy(stream.main_data, 0, stream.main_data, stream.md_len - extra, extra);
+                stream.md_len = extra;
+            }
+        } else {
+            stream.md_len = 0;
+        }
+        
+        this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.next_frame - frame_free, frame_free);
+        stream.md_len += frame_free;
+    }
+};
+
+Layer3.prototype.memcpy = function(dst, dstOffset, pSrc, srcOffset, length) {
+    var subarr;
+    if (pSrc.subarray)
+        subarr = pSrc.subarray(srcOffset, srcOffset + length);
+    else
+        subarr = pSrc.peekBuffer(srcOffset - pSrc.offset, length).data;
+
+    // oh my, memcpy actually exists in JavaScript?
+    dst.set(subarr, dstOffset);
+    return dst;
+};
+
+Layer3.prototype.sideInfo = function(stream, nch, lsf) {
+    var si = this.si;
+    var data_bitlen = 0;
+    var priv_bitlen = lsf ? ((nch === 1) ? 1 : 2) : ((nch === 1) ? 5 : 3);
+    
+    si.main_data_begin = stream.read(lsf ? 8 : 9);
+    si.private_bits    = stream.read(priv_bitlen);
+
+    var ngr = 1;
+    if (!lsf) {
+        ngr = 2;
+        for (var ch = 0; ch < nch; ++ch)
+            si.scfsi[ch] = stream.read(4);
+    }
+    
+    for (var gr = 0; gr < ngr; gr++) {
+        var granule = si.gr[gr];
+        
+        for (var ch = 0; ch < nch; ch++) {
+            var channel = granule.ch[ch];
+            
+            channel.part2_3_length    = stream.read(12);
+            channel.big_values        = stream.read(9);
+            channel.global_gain       = stream.read(8);
+            channel.scalefac_compress = stream.read(lsf ? 9 : 4);
+
+            data_bitlen += channel.part2_3_length;
+
+            if (channel.big_values > 288)
+                throw new Error('bad big_values count');
+
+            channel.flags = 0;
+
+            // window_switching_flag
+            if (stream.read(1)) {
+                channel.block_type = stream.read(2);
+
+                if (channel.block_type === 0)
+                    throw new Error('reserved block_type');
+
+                if (!lsf && channel.block_type === 2 && si.scfsi[ch])
+                    throw new Error('bad scalefactor selection info');
+
+                channel.region0_count = 7;
+                channel.region1_count = 36;
+
+                if (stream.read(1))
+                    channel.flags |= tables.MIXED_BLOCK_FLAG;
+                else if (channel.block_type === 2)
+                    channel.region0_count = 8;
+
+                for (var i = 0; i < 2; i++)
+                    channel.table_select[i] = stream.read(5);
+
+                for (var i = 0; i < 3; i++)
+                    channel.subblock_gain[i] = stream.read(3);
+            } else {
+                channel.block_type = 0;
+
+                for (var i = 0; i < 3; i++)
+                    channel.table_select[i] = stream.read(5);
+
+                channel.region0_count = stream.read(4);
+                channel.region1_count = stream.read(3);
+            }
+
+            // [preflag,] scalefac_scale, count1table_select
+            channel.flags |= stream.read(lsf ? 2 : 3);
+        }
+    }
+    
+    return {
+        si: si,
+        data_bitlen: data_bitlen,
+        priv_bitlen: priv_bitlen
+    };
+};
+
+Layer3.prototype.decodeMainData = function(stream, frame, si, nch) {
+    var header = frame.header;
+    var sfreq = header.samplerate;
+
+    if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)
+        sfreq *= 2;
+
+    // 48000 => 0, 44100 => 1, 32000 => 2,
+    // 24000 => 3, 22050 => 4, 16000 => 5
+    var sfreqi = ((sfreq >>  7) & 0x000f) + ((sfreq >> 15) & 0x0001) - 8;
+
+    if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)
+        sfreqi += 3;
+        
+    // scalefactors, Huffman decoding, requantization
+    var ngr = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? 1 : 2;
+    var xr = this.xr;
+    
+    for (var gr = 0; gr < ngr; ++gr) {
+        var granule = si.gr[gr];
+        var sfbwidth = [];
+        var l = 0;
+        
+        for (var ch = 0; ch < nch; ++ch) {
+            var channel = granule.ch[ch];
+            var part2_length;
+            
+            sfbwidth[ch] = tables.SFBWIDTH_TABLE[sfreqi].l;
+            if (channel.block_type === 2) {
+                sfbwidth[ch] = (channel.flags & tables.MIXED_BLOCK_FLAG) ? tables.SFBWIDTH_TABLE[sfreqi].m : tables.SFBWIDTH_TABLE[sfreqi].s;
+            }
+
+            if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {
+                part2_length = this.scalefactors_lsf(stream, channel, ch === 0 ? 0 : si.gr[1].ch[1], header.mode_extension);
+            } else {
+                part2_length = this.scalefactors(stream, channel, si.gr[0].ch[ch], gr === 0 ? 0 : si.scfsi[ch]);
+            }
+
+            this.huffmanDecode(stream, xr[ch], channel, sfbwidth[ch], part2_length);
+        }
+        
+        // joint stereo processing
+        if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO && header.mode_extension !== 0)
+            this.stereo(xr, si.gr, gr, header, sfbwidth[0]);
+        
+        // reordering, alias reduction, IMDCT, overlap-add, frequency inversion
+        for (var ch = 0; ch < nch; ch++) {
+            var channel = granule.ch[ch];
+            var sample = frame.sbsample[ch].slice(18 * gr);
+            
+            var sb, l = 0, i, sblimit;
+            var output = this.output;
+            
+            if (channel.block_type === 2) {
+                this.reorder(xr[ch], channel, sfbwidth[ch]);
+
+                /*
+                 * According to ISO/IEC 11172-3, "Alias reduction is not applied for
+                 * granules with block_type === 2 (short block)." However, other
+                 * sources suggest alias reduction should indeed be performed on the
+                 * lower two subbands of mixed blocks. Most other implementations do
+                 * this, so by default we will too.
+                 */
+                if (channel.flags & tables.MIXED_BLOCK_FLAG)
+                    this.aliasreduce(xr[ch], 36);
+            } else {
+                this.aliasreduce(xr[ch], 576);
+            }
+            
+            // subbands 0-1
+            if (channel.block_type !== 2 || (channel.flags & tables.MIXED_BLOCK_FLAG)) {
+                var block_type = channel.block_type;
+                if (channel.flags & tables.MIXED_BLOCK_FLAG)
+                    block_type = 0;
+
+                // long blocks
+                for (var sb = 0; sb < 2; ++sb, l += 18) {
+                    this.imdct_l(xr[ch].subarray(l, l + 18), output, block_type);
+                    this.overlap(output, frame.overlap[ch][sb], sample, sb);
+                }
+            } else {
+                // short blocks
+                for (var sb = 0; sb < 2; ++sb, l += 18) {
+                    this.imdct_s(xr[ch].subarray(l, l + 18), output);
+                    this.overlap(output, frame.overlap[ch][sb], sample, sb);
+                }
+            }
+            
+            this.freqinver(sample, 1);
+
+            // (nonzero) subbands 2-31
+            var i = 576;
+            while (i > 36 && xr[ch][i - 1] === 0) {
+                --i;
+            }
+            
+            sblimit = 32 - (((576 - i) / 18) << 0);
+
+            if (channel.block_type !== 2) {
+                // long blocks
+                for (var sb = 2; sb < sblimit; ++sb, l += 18) {
+                    this.imdct_l(xr[ch].subarray(l, l + 18), output, channel.block_type);
+                    this.overlap(output, frame.overlap[ch][sb], sample, sb);
+
+                    if (sb & 1)
+                        this.freqinver(sample, sb);
+                }
+            } else {
+                // short blocks
+                for (var sb = 2; sb < sblimit; ++sb, l += 18) {
+                    this.imdct_s(xr[ch].subarray(l, l + 18), output);
+                    this.overlap(output, frame.overlap[ch][sb], sample, sb);
+
+                    if (sb & 1)
+                        this.freqinver(sample, sb);
+                }
+            }
+            
+            // remaining (zero) subbands
+            for (var sb = sblimit; sb < 32; ++sb) {
+                this.overlap_z(frame.overlap[ch][sb], sample, sb);
+
+                if (sb & 1)
+                    this.freqinver(sample, sb);
+            }
+        }
+    }
+};
+
+Layer3.prototype.scalefactors = function(stream, channel, gr0ch, scfsi) {
+    var start = stream.offset();
+    var slen1 = tables.SFLEN_TABLE[channel.scalefac_compress].slen1;
+    var slen2 = tables.SFLEN_TABLE[channel.scalefac_compress].slen2;
+    var sfbi;
+    
+    if (channel.block_type === 2) {
+        sfbi = 0;
+
+        var nsfb = (channel.flags & tables.MIXED_BLOCK_FLAG) ? 8 + 3 * 3 : 6 * 3;
+        while (nsfb--)
+            channel.scalefac[sfbi++] = stream.read(slen1);
+
+        nsfb = 6 * 3;
+        while (nsfb--)
+            channel.scalefac[sfbi++] = stream.read(slen2);
+
+        nsfb = 1 * 3;
+        while (nsfb--)
+            channel.scalefac[sfbi++] = 0;
+    } else {
+        if (scfsi & 0x8) {
+            for (var sfbi = 0; sfbi < 6; ++sfbi)
+                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];
+        } else {
+            for (var sfbi = 0; sfbi < 6; ++sfbi)
+                channel.scalefac[sfbi] = stream.read(slen1);
+        }
+
+        if (scfsi & 0x4) {
+            for (var sfbi = 6; sfbi < 11; ++sfbi)
+                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];
+        } else {
+            for (var sfbi = 6; sfbi < 11; ++sfbi)
+                channel.scalefac[sfbi] = stream.read(slen1);
+        }
+
+        if (scfsi & 0x2) {
+            for (var sfbi = 11; sfbi < 16; ++sfbi)
+                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];
+        } else {
+            for (var sfbi = 11; sfbi < 16; ++sfbi)
+                channel.scalefac[sfbi] = stream.read(slen2);
+        }
+
+        if (scfsi & 0x1) {
+            for (var sfbi = 16; sfbi < 21; ++sfbi)
+                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];
+        } else {
+            for (var sfbi = 16; sfbi < 21; ++sfbi)
+                channel.scalefac[sfbi] = stream.read(slen2);
+        }
+
+        channel.scalefac[21] = 0;
+    }
+    
+    return stream.offset() - start;
+};
+
+Layer3.prototype.scalefactors_lsf = function(stream, channel, gr1ch, mode_extension) {
+    var start = stream.offset();
+    var scalefac_compress = channel.scalefac_compress;
+    var index = channel.block_type === 2 ? (channel.flags & tables.MIXED_BLOCK_FLAG ? 2 : 1) : 0;
+    var slen = new Int32Array(4);
+    var nsfb;
+    
+    if (!((mode_extension & tables.I_STEREO) && gr1ch)) {
+        if (scalefac_compress < 400) {
+            slen[0] = (scalefac_compress >>> 4) / 5;
+            slen[1] = (scalefac_compress >>> 4) % 5;
+            slen[2] = (scalefac_compress % 16) >>> 2;
+            slen[3] =  scalefac_compress %  4;
+        
+            nsfb = tables.NSFB_TABLE[0][index];
+        } else if (scalefac_compress < 500) {
+            scalefac_compress -= 400;
+
+            slen[0] = (scalefac_compress >>> 2) / 5;
+            slen[1] = (scalefac_compress >>> 2) % 5;
+            slen[2] =  scalefac_compress % 4;
+            slen[3] = 0;
+
+            nsfb = tables.NSFB_TABLE[1][index];
+        } else {
+            scalefac_compress -= 500;
+
+            slen[0] = scalefac_compress / 3;
+            slen[1] = scalefac_compress % 3;
+            slen[2] = 0;
+            slen[3] = 0;
+
+            channel.flags |= tables.PREFLAG;
+            nsfb = tables.NSFB_TABLE[2][index];
+        }
+        
+        var n = 0;
+        for (var part = 0; part < 4; part++) {
+            for (var i = 0; i < nsfb[part]; i++) {
+                channel.scalefac[n++] = stream.read(slen[part]);
+            }
+        }
+        
+        while (n < 39) {
+            channel.scalefac[n++] = 0;
+        }
+    } else {  // (mode_extension & tables.I_STEREO) && gr1ch (i.e. ch == 1)
+        scalefac_compress >>>= 1;
+        
+        if (scalefac_compress < 180) {
+            slen[0] =  scalefac_compress / 36;
+            slen[1] = (scalefac_compress % 36) / 6;
+            slen[2] = (scalefac_compress % 36) % 6;
+            slen[3] = 0;
+
+            nsfb = tables.NSFB_TABLE[3][index];
+        } else if (scalefac_compress < 244) {
+            scalefac_compress -= 180;
+
+            slen[0] = (scalefac_compress % 64) >>> 4;
+            slen[1] = (scalefac_compress % 16) >>> 2;
+            slen[2] =  scalefac_compress %  4;
+            slen[3] = 0;
+
+            nsfb = tables.NSFB_TABLE[4][index];
+        } else {
+            scalefac_compress -= 244;
+
+            slen[0] = scalefac_compress / 3;
+            slen[1] = scalefac_compress % 3;
+            slen[2] = 0;
+            slen[3] = 0;
+
+            nsfb = tables.NSFB_TABLE[5][index];
+        }
+        
+        var n = 0;
+        for (var part = 0; part < 4; ++part) {
+            var max = (1 << slen[part]) - 1;
+            for (var i = 0; i < nsfb[part]; ++i) {
+                var is_pos = stream.read(slen[part]);
+
+                channel.scalefac[n] = is_pos;
+                gr1ch.scalefac[n++] = is_pos === max ? 1 : 0;
+            }
+        }
+        
+        while (n < 39) {
+            channel.scalefac[n] = 0;
+            gr1ch.scalefac[n++] = 0;  // apparently not illegal
+        }
+    }
+    
+    return stream.offset() - start;
+};
+
+Layer3.prototype.huffmanDecode = function(stream, xr, channel, sfbwidth, part2_length) {
+    var exponents = this._exponents;
+    var sfbwidthptr = 0;
+    
+    var bits_left = channel.part2_3_length - part2_length;    
+    if (bits_left < 0)
+        throw new Error('bad audio data length');
+    
+    this.exponents(channel, sfbwidth, exponents);
+    
+    var peek = stream.copy();
+    stream.advance(bits_left);
+    
+    /* align bit reads to byte boundaries */
+    var cachesz  = 8 - peek.bitPosition;
+    cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7;
+    
+    var bitcache = peek.read(cachesz);
+    bits_left -= cachesz;
+
+    var xrptr = 0;
+    
+    // big_values
+    var region = 0;
+    var reqcache = this.reqcache;
+    
+    var sfbound = xrptr + sfbwidth[sfbwidthptr++];
+    var rcount  = channel.region0_count + 1;
+    
+    var entry = huffman.huff_pair_table[channel.table_select[region]];
+    var table     = entry.table;
+    var linbits   = entry.linbits;
+    var startbits = entry.startbits;
+    
+    if (typeof table === 'undefined')
+        throw new Error('bad Huffman table select');
+        
+    var expptr = 0;
+    var exp = exponents[expptr++];
+    var reqhits = 0;
+    var big_values = channel.big_values;
+    
+    while (big_values-- && cachesz + bits_left > 0) {
+         if (xrptr === sfbound) {
+             sfbound += sfbwidth[sfbwidthptr++];
+
+             // change table if region boundary
+             if (--rcount === 0) {
+                 if (region === 0)
+                     rcount = channel.region1_count + 1;
+                 else
+                     rcount = 0; // all remaining
+
+                 entry     = huffman.huff_pair_table[channel.table_select[++region]];
+                 table     = entry.table;
+                 linbits   = entry.linbits;
+                 startbits = entry.startbits;
+
+                 if (typeof table === 'undefined')
+                     throw new Error('bad Huffman table select');
+             }
+
+             if (exp !== exponents[expptr]) {
+                 exp = exponents[expptr];
+                 reqhits = 0;
+             }
+
+             ++expptr;
+         }
+         
+         if (cachesz < 21) {
+             var bits   = ((32 - 1 - 21) + (21 - cachesz)) & ~7;
+             bitcache   = (bitcache << bits) | peek.read(bits);
+             cachesz   += bits;
+             bits_left -= bits;
+         }
+         
+         var clumpsz = startbits;
+         var pair = table[ (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))];
+         
+         while (!pair.final) {
+             cachesz -= clumpsz;
+             clumpsz = pair.ptr.bits;
+             pair    = table[pair.ptr.offset + (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))];
+         }
+         
+         cachesz -= pair.value.hlen;
+         
+         if (linbits) {
+             var value = pair.value.x;
+             var x_final = false;
+             
+             switch (value) {
+                 case 0:
+                     xr[xrptr] = 0;
+                     break;
+
+                 case 15:
+                     if (cachesz < linbits + 2) {
+                         bitcache   = (bitcache << 16) | peek.read(16);
+                         cachesz   += 16;
+                         bits_left -= 16;
+                     }
+
+                     value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1));
+                     cachesz -= linbits;
+
+                     requantized = this.requantize(value, exp);
+                     x_final = true; // simulating goto, yay
+                     break;
+
+                 default:
+                     if (reqhits & (1 << value)) {
+                         requantized = reqcache[value];
+                     } else {
+                         reqhits |= (1 << value);
+                         requantized = reqcache[value] = this.requantize(value, exp);
+                     }
+                     
+                     x_final = true;
+             }
+             
+             if(x_final) {
+                 xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;
+             }
+             
+             value = pair.value.y;
+             var y_final = false;
+             
+             switch (value) {
+                 case 0:
+                     xr[xrptr + 1] = 0;
+                     break;
+
+                 case 15:
+                     if (cachesz < linbits + 1) {
+                         bitcache   = (bitcache << 16) | peek.read(16);
+                         cachesz   += 16;
+                         bits_left -= 16;
+                     }
+
+                     value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1));
+                     cachesz -= linbits;
+
+                     requantized = this.requantize(value, exp);
+                     y_final = true;
+                     break; // simulating goto, yayzor
+
+                 default:
+                     if (reqhits & (1 << value)) {
+                         requantized = reqcache[value];
+                     } else {
+                         reqhits |= (1 << value);
+                         reqcache[value] = this.requantize(value, exp);
+                         requantized = reqcache[value];
+                     }
+                     
+                     y_final = true;
+             }
+             
+             if(y_final) {
+                 xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;
+             }
+             
+         } else {
+             var value = pair.value.x;
+
+             if (value === 0) {
+                 xr[xrptr] = 0;
+             } else {
+                 if (reqhits & (1 << value))
+                     requantized = reqcache[value];
+                 else {
+                     reqhits |= (1 << value);
+                     requantized = reqcache[value] = this.requantize(value, exp);
+                 }
+
+                 xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;
+             }
+
+             value = pair.value.y;
+
+             if (value === 0) {
+                 xr[xrptr + 1] = 0;
+             } else {
+                 if (reqhits & (1 << value))
+                     requantized = reqcache[value];
+                 else {
+                     reqhits |= (1 << value);
+                     requantized = reqcache[value] = this.requantize(value, exp);
+                 }
+
+                 xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;
+             }
+         }
+
+         xrptr += 2;
+    }
+    
+    if (cachesz + bits_left < 0)
+        throw new Error('Huffman data overrun');
+    
+    // count1    
+    var table = huffman.huff_quad_table[channel.flags & tables.COUNT1TABLE_SELECT];
+    var requantized = this.requantize(1, exp);
+    
+    while (cachesz + bits_left > 0 && xrptr <= 572) {
+        if (cachesz < 10) {
+            bitcache   = (bitcache << 16) | peek.read(16);
+            cachesz   += 16;
+            bits_left -= 16;
+        }
+        
+        var quad = table[(((bitcache) >> ((cachesz) - (4))) & ((1 << (4)) - 1))];
+        
+        // quad tables guaranteed to have at most one extra lookup
+        if (!quad.final) {
+            cachesz -= 4;
+            quad = table[quad.ptr.offset + (((bitcache) >> ((cachesz) - (quad.ptr.bits))) & ((1 << (quad.ptr.bits)) - 1))];
+        }
+        
+        cachesz -= quad.value.hlen;
+
+        if (xrptr === sfbound) {
+            sfbound += sfbwidth[sfbwidthptr++];
+
+            if (exp !== exponents[expptr]) {
+                exp = exponents[expptr];
+                requantized = this.requantize(1, exp);
+            }
+
+            ++expptr;
+        }
+        
+        // v (0..1)
+        xr[xrptr] = quad.value.v ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;
+
+        // w (0..1)
+        xr[xrptr + 1] = quad.value.w ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;
+
+        xrptr += 2;
+        if (xrptr === sfbound) {
+            sfbound += sfbwidth[sfbwidthptr++];
+
+            if (exp !== exponents[expptr]) {
+                exp = exponents[expptr];
+                requantized = this.requantize(1, exp);
+            }
+
+            ++expptr;
+        }
+        
+        // x (0..1)
+        xr[xrptr] = quad.value.x ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;
+
+        // y (0..1)
+        xr[xrptr + 1] = quad.value.y ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;
+
+        xrptr += 2;
+        
+        if (cachesz + bits_left < 0) {
+            // technically the bitstream is misformatted, but apparently
+            // some encoders are just a bit sloppy with stuffing bits
+            xrptr -= 4;
+        }
+    }
+    
+    if (-bits_left > MP3FrameHeader.BUFFER_GUARD * 8) {
+        throw new Error("assertion failed: (-bits_left <= MP3FrameHeader.BUFFER_GUARD * CHAR_BIT)");
+    }
+    
+    // rzero
+    while (xrptr < 576) {
+        xr[xrptr]     = 0;
+        xr[xrptr + 1] = 0;
+        xrptr += 2;
+    }
+};
+
+Layer3.prototype.requantize = function(value, exp) {
+    // usual (x >> 0) tricks to make sure frac and exp stay integers
+    var frac = (exp % 4) >> 0;  // assumes sign(frac) === sign(exp)
+    exp = (exp / 4) >> 0;
+
+    var requantized = Math.pow(value, 4.0 / 3.0);
+    requantized *= Math.pow(2.0, (exp / 4.0));
+    
+    if (frac) {
+        requantized *= Math.pow(2.0, (frac / 4.0));
+    }
+    
+    if (exp < 0) {
+        requantized /= Math.pow(2.0, -exp * (3.0 / 4.0));
+    }
+
+    return requantized;
+};
+
+Layer3.prototype.exponents = function(channel, sfbwidth, exponents) {
+    var gain = channel.global_gain - 210;
+    var scalefac_multiplier = (channel.flags & tables.SCALEFAC_SCALE) ? 2 : 1;
+    
+    if (channel.block_type === 2) {
+        var sfbi = 0, l = 0;
+        
+        if (channel.flags & tables.MIXED_BLOCK_FLAG) {
+            var premask = (channel.flags & tables.PREFLAG) ? ~0 : 0;
+            
+            // long block subbands 0-1
+            while (l < 36) {
+                exponents[sfbi] = gain - ((channel.scalefac[sfbi] + (tables.PRETAB[sfbi] & premask)) << scalefac_multiplier);
+                l += sfbwidth[sfbi++];
+            }
+        }
+        
+        // this is probably wrong for 8000 Hz short/mixed blocks
+        var gain0 = gain - 8 * channel.subblock_gain[0];
+        var gain1 = gain - 8 * channel.subblock_gain[1];
+        var gain2 = gain - 8 * channel.subblock_gain[2];
+        
+        while (l < 576) {
+            exponents[sfbi + 0] = gain0 - (channel.scalefac[sfbi + 0] << scalefac_multiplier);
+            exponents[sfbi + 1] = gain1 - (channel.scalefac[sfbi + 1] << scalefac_multiplier);
+            exponents[sfbi + 2] = gain2 - (channel.scalefac[sfbi + 2] << scalefac_multiplier);
+            
+            l += 3 * sfbwidth[sfbi];
+            sfbi += 3;
+        }
+    } else {
+        if (channel.flags & tables.PREFLAG) {
+            for (var sfbi = 0; sfbi < 22; sfbi++) {
+                exponents[sfbi] = gain - ((channel.scalefac[sfbi] + tables.PRETAB[sfbi]) << scalefac_multiplier);
+            }
+        } else {
+            for (var sfbi = 0; sfbi < 22; sfbi++) {
+                exponents[sfbi] = gain - (channel.scalefac[sfbi] << scalefac_multiplier);
+            }
+        }
+    }
+};
+
+Layer3.prototype.stereo = function(xr, granules, gr, header, sfbwidth) {
+    var granule = granules[gr];
+    var modes = this.modes;
+    var sfbi, l, n, i;
+    
+    if (granule.ch[0].block_type !== granule.ch[1].block_type || (granule.ch[0].flags & tables.MIXED_BLOCK_FLAG) !== (granule.ch[1].flags & tables.MIXED_BLOCK_FLAG))
+        throw new Error('incompatible stereo block_type');
+        
+    for (var i = 0; i < 39; i++)
+        modes[i] = header.mode_extension;
+        
+    // intensity stereo
+    if (header.mode_extension & tables.I_STEREO) {
+        var right_ch = granule.ch[1];
+        var right_xr = xr[1];
+        
+        header.flags |= MP3FrameHeader.FLAGS.tables.I_STEREO;
+         
+        // first determine which scalefactor bands are to be processed
+        if (right_ch.block_type === 2) {
+            var lower, start, max, bound = new Uint32Array(3), w;
+
+            lower = start = max = bound[0] = bound[1] = bound[2] = 0;
+            sfbi = l = 0;
+            
+            if (right_ch.flags & tables.MIXED_BLOCK_FLAG) {
+                while (l < 36) {
+                    n = sfbwidth[sfbi++];
+
+                    for (var i = 0; i < n; ++i) {
+                        if (right_xr[i]) {
+                            lower = sfbi;
+                            break;
+                        }
+                    }
+
+                    right_xr += n;
+                    l += n;
+                }
+
+                start = sfbi;
+            }
+            
+            var w = 0;
+            while (l < 576) {
+                n = sfbwidth[sfbi++];
+
+                for (i = 0; i < n; ++i) {
+                    if (right_xr[i]) {
+                        max = bound[w] = sfbi;
+                        break;
+                    }
+                }
+
+                right_xr += n;
+                l += n;
+                w = (w + 1) % 3;
+            }
+            
+            if (max)
+                lower = start;
+
+            // long blocks
+            for (i = 0; i < lower; ++i)
+                modes[i] = header.mode_extension & ~tables.I_STEREO;
+
+            // short blocks
+            w = 0;
+            for (i = start; i < max; ++i) {
+                if (i < bound[w])
+                    modes[i] = header.mode_extension & ~tables.I_STEREO;
+
+                w = (w + 1) % 3;
+            }
+        } else {
+            var bound = 0;
+            for (sfbi = l = 0; l < 576; l += n) {
+                n = sfbwidth[sfbi++];
+
+                for (i = 0; i < n; ++i) {
+                    if (right_xr[i]) {
+                        bound = sfbi;
+                        break;
+                    }
+                }
+
+                right_xr += n;
+            }
+
+            for (i = 0; i < bound; ++i)
+                modes[i] = header.mode_extension & ~tables.I_STEREO;
+        }
+        
+        // now do the actual processing
+        if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {
+            var illegal_pos = granules[gr + 1].ch[1].scalefac;
+
+            // intensity_scale
+            var lsf_scale = IS_Ltables.SF_TABLE[right_ch.scalefac_compress & 0x1];
+            
+            for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+                n = sfbwidth[sfbi];
+
+                if (!(modes[sfbi] & tables.I_STEREO))
+                    continue;
+
+                if (illegal_pos[sfbi]) {
+                    modes[sfbi] &= ~tables.I_STEREO;
+                    continue;
+                }
+
+                is_pos = right_ch.scalefac[sfbi];
+                
+                for (i = 0; i < n; ++i) {
+                    var left = xr[0][l + i];
+
+                    if (is_pos === 0) {
+                        xr[1][l + i] = left;
+                    } else {
+                        var opposite = left * lsf_scale[(is_pos - 1) / 2];
+
+                        if (is_pos & 1) {
+                            xr[0][l + i] = opposite;
+                            xr[1][l + i] = left;
+                        }
+                        else {
+                            xr[1][l + i] = opposite;
+                        }
+                    }
+                }
+            }
+        } else {
+            for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+                n = sfbwidth[sfbi];
+
+                if (!(modes[sfbi] & tables.I_STEREO))
+                    continue;
+
+                is_pos = right_ch.scalefac[sfbi];
+
+                if (is_pos >= 7) {  // illegal intensity position
+                    modes[sfbi] &= ~tables.I_STEREO;
+                    continue;
+                }
+
+                for (i = 0; i < n; ++i) {
+                    var left = xr[0][l + i];
+                    xr[0][l + i] = left * tables.IS_TABLE[is_pos];
+                    xr[1][l + i] = left * tables.IS_TABLE[6 - is_pos];
+                }
+            }
+        }
+    }
+    
+    // middle/side stereo
+    if (header.mode_extension & tables.MS_STEREO) {
+        header.flags |= tables.MS_STEREO;
+
+        var invsqrt2 = tables.ROOT_TABLE[3 + -2];
+
+        for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+            n = sfbwidth[sfbi];
+
+            if (modes[sfbi] !== tables.MS_STEREO)
+                continue;
+
+            for (i = 0; i < n; ++i) {
+                var m = xr[0][l + i];
+                var s = xr[1][l + i];
+
+                xr[0][l + i] = (m + s) * invsqrt2;  // l = (m + s) / sqrt(2)
+                xr[1][l + i] = (m - s) * invsqrt2;  // r = (m - s) / sqrt(2)
+            }
+        }
+    }
+};
+
+Layer3.prototype.aliasreduce = function(xr, lines) {
+    for (var xrPointer = 18; xrPointer < lines; xrPointer += 18) {
+        for (var i = 0; i < 8; ++i) {
+            var a = xr[xrPointer - i - 1];
+            var b = xr[xrPointer + i];
+
+            xr[xrPointer - i - 1] = a * tables.CS[i] - b * tables.CA[i];
+            xr[xrPointer + i] = b * tables.CS[i] + a * tables.CA[i];
+        }
+    }
+};
+
+// perform IMDCT and windowing for long blocks
+Layer3.prototype.imdct_l = function (X, z, block_type) {
+    // IMDCT
+    this.imdct.imdct36(X, z);
+
+    // windowing
+    switch (block_type) {
+        case 0:  // normal window
+            for (var i = 0; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i];
+            break;
+
+        case 1:  // start block
+            for (var i =  0; i < 18; ++i) z[i] = z[i] * tables.WINDOW_L[i];
+            for (var i = 24; i < 30; ++i) z[i] = z[i] * tables.WINDOW_S[i - 18];
+            for (var i = 30; i < 36; ++i) z[i] = 0;
+            break;
+
+        case 3:  // stop block
+            for (var i =  0; i <  6; ++i) z[i] = 0;
+            for (var i =  6; i < 12; ++i) z[i] = z[i] * tables.WINDOW_S[i - 6];
+            for (var i = 18; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i];
+            break;
+    }
+};
+
+/*
+ * perform IMDCT and windowing for short blocks
+ */
+Layer3.prototype.imdct_s = function (X, z) {
+    var yptr = 0;
+    var wptr;
+    var Xptr = 0;
+    
+    var y = new Float64Array(36);
+    var hi, lo;
+
+    // IMDCT
+    for (var w = 0; w < 3; ++w) {
+        var sptr = 0;
+
+        for (var i = 0; i < 3; ++i) {
+            lo = X[Xptr + 0] * IMDCT.S[sptr][0] +
+                 X[Xptr + 1] * IMDCT.S[sptr][1] +
+                 X[Xptr + 2] * IMDCT.S[sptr][2] +
+                 X[Xptr + 3] * IMDCT.S[sptr][3] +
+                 X[Xptr + 4] * IMDCT.S[sptr][4] +
+                 X[Xptr + 5] * IMDCT.S[sptr][5];
+
+
+            y[yptr + i + 0] = lo;
+            y[yptr + 5 - i] = -y[yptr + i + 0];
+
+            ++sptr;
+
+            lo = X[Xptr + 0] * IMDCT.S[sptr][0] +
+                 X[Xptr + 1] * IMDCT.S[sptr][1] +
+                 X[Xptr + 2] * IMDCT.S[sptr][2] +
+                 X[Xptr + 3] * IMDCT.S[sptr][3] +
+                 X[Xptr + 4] * IMDCT.S[sptr][4] +
+                 X[Xptr + 5] * IMDCT.S[sptr][5];
+
+            y[yptr +  i + 6] = lo;
+            y[yptr + 11 - i] = y[yptr + i + 6];
+
+            ++sptr;
+        }
+
+        yptr += 12;
+        Xptr += 6;
+    }
+
+    // windowing, overlapping and concatenation
+    yptr = 0;
+    var wptr = 0;
+
+    for (var i = 0; i < 6; ++i) {
+        z[i + 0] = 0;
+        z[i + 6] = y[yptr +  0 + 0] * tables.WINDOW_S[wptr + 0];
+
+        lo = y[yptr + 0 + 6] * tables.WINDOW_S[wptr + 6] +
+             y[yptr + 12 + 0] * tables.WINDOW_S[wptr + 0];
+
+        z[i + 12] = lo;
+
+        lo = y[yptr + 12 + 6] * tables.WINDOW_S[wptr + 6] +
+             y[yptr + 24 + 0] * tables.WINDOW_S[wptr + 0];
+
+        z[i + 18] = lo;
+        z[i + 24] = y[yptr + 24 + 6] * tables.WINDOW_S[wptr + 6];
+        z[i + 30] = 0;
+
+        ++yptr;
+        ++wptr;
+    }
+};
+
+Layer3.prototype.overlap = function (output, overlap, sample, sb) {
+    for (var i = 0; i < 18; ++i) {
+        sample[i][sb] = output[i] + overlap[i];
+        overlap[i]    = output[i + 18];
+    }
+};
+
+Layer3.prototype.freqinver = function (sample, sb) {
+    for (var i = 1; i < 18; i += 2)
+        sample[i][sb] = -sample[i][sb];
+};
+
+Layer3.prototype.overlap_z = function (overlap, sample, sb) {
+    for (var i = 0; i < 18; ++i) {
+        sample[i][sb] = overlap[i];
+        overlap[i]    = 0;
+    }
+};
+
+Layer3.prototype.reorder = function (xr, channel, sfbwidth) {
+    var sfbwidthPointer = 0;
+    var tmp = this.tmp;
+    var sbw = new Uint32Array(3);
+    var sw  = new Uint32Array(3);
+    
+    // this is probably wrong for 8000 Hz mixed blocks
+
+    var sb = 0;
+    if (channel.flags & tables.MIXED_BLOCK_FLAG) {
+        var sb = 2;
+
+        var l = 0;
+        while (l < 36)
+            l += sfbwidth[sfbwidthPointer++];
+    }
+
+    for (var w = 0; w < 3; ++w) {
+        sbw[w] = sb;
+        sw[w]  = 0;
+    }
+
+    f = sfbwidth[sfbwidthPointer++];
+    w = 0;
+
+    for (var l = 18 * sb; l < 576; ++l) {
+        if (f-- === 0) {
+            f = sfbwidth[sfbwidthPointer++] - 1;
+            w = (w + 1) % 3;
+        }
+        
+        tmp[sbw[w]][w][sw[w]++] = xr[l];
+
+        if (sw[w] === 6) {
+            sw[w] = 0;
+            ++sbw[w];
+        }
+    }
+
+    var tmp2 = this.tmp2;
+    var ptr = 0;
+    
+    for (var i = 0; i < 32; i++) {
+        for (var j = 0; j < 3; j++) {
+            for (var k = 0; k < 6; k++) {
+                tmp2[ptr++] = tmp[i][j][k];
+            }
+        }
+    }
+    
+    var len = (576 - 18 * sb); 
+    for (var i = 0; i < len; i++) {
+        xr[18 * sb + i] = tmp2[sb + i];
+    }
+};
+
+module.exports = Layer3;
+
+},{"./frame":4,"./header":5,"./huffman":6,"./imdct":8,"./tables":14,"./utils":15}],12:[function(require,module,exports){
+var AV = (window.AV);
+var MP3FrameHeader = require('./header');
+
+function MP3Stream(stream) {
+    this.stream = stream;                     // actual bitstream
+    this.sync = false;                        // stream sync found
+    this.freerate = 0;                        // free bitrate (fixed)
+    this.this_frame = stream.stream.offset;   // start of current frame
+    this.next_frame = stream.stream.offset;   // start of next frame
+    
+    this.main_data = new Uint8Array(MP3FrameHeader.BUFFER_MDLEN); // actual audio data
+    this.md_len = 0;                               // length of main data
+    
+    // copy methods from actual stream
+    for (var key in stream) {
+        if (typeof stream[key] === 'function')
+            this[key] = stream[key].bind(stream);
+    }
+}
+
+MP3Stream.prototype.getU8 = function(offset) {
+    var stream = this.stream.stream;
+    return stream.peekUInt8(offset - stream.offset);
+};
+
+MP3Stream.prototype.nextByte = function() {
+    var stream = this.stream;
+    return stream.bitPosition === 0 ? stream.stream.offset : stream.stream.offset + 1;
+};
+
+MP3Stream.prototype.doSync = function() {
+    var stream = this.stream.stream;
+    this.align();
+    
+    while (this.available(16) && !(stream.peekUInt8(0) === 0xff && (stream.peekUInt8(1) & 0xe0) === 0xe0)) {
+        this.advance(8);
+    }
+
+    if (!this.available(MP3FrameHeader.BUFFER_GUARD))
+        return false;
+        
+    return true;
+};
+
+MP3Stream.prototype.reset = function(byteOffset) {
+    this.seek(byteOffset * 8);
+    this.next_frame = byteOffset;
+    this.sync = true;
+};
+
+module.exports = MP3Stream;
+
+},{"./header":5}],13:[function(require,module,exports){
+var utils = require('./utils');
+
+function MP3Synth() {
+    this.filter = utils.makeArray([2, 2, 2, 16, 8]); // polyphase filterbank outputs
+    this.phase = 0;
+    
+    this.pcm = {
+        samplerate: 0,
+        channels: 0,
+        length: 0,
+        samples: [new Float64Array(1152), new Float64Array(1152)]
+    };
+}
+
+/* costab[i] = cos(PI / (2 * 32) * i) */
+const costab1  = 0.998795456;
+const costab2  = 0.995184727;
+const costab3  = 0.989176510;
+const costab4  = 0.980785280;
+const costab5  = 0.970031253;
+const costab6  = 0.956940336;
+const costab7  = 0.941544065;
+const costab8  = 0.923879533;
+const costab9  = 0.903989293;
+const costab10 = 0.881921264;
+const costab11 = 0.857728610;
+const costab12 = 0.831469612;
+const costab13 = 0.803207531;
+const costab14 = 0.773010453;
+const costab15 = 0.740951125;
+const costab16 = 0.707106781;
+const costab17 = 0.671558955;
+const costab18 = 0.634393284;
+const costab19 = 0.595699304;
+const costab20 = 0.555570233;
+const costab21 = 0.514102744;
+const costab22 = 0.471396737;
+const costab23 = 0.427555093;
+const costab24 = 0.382683432;
+const costab25 = 0.336889853;
+const costab26 = 0.290284677;
+const costab27 = 0.242980180;
+const costab28 = 0.195090322;
+const costab29 = 0.146730474;
+const costab30 = 0.098017140;
+const costab31 = 0.049067674;
+
+/*
+ * NAME:    dct32()
+ * DESCRIPTION: perform fast in[32].out[32] DCT
+ */
+MP3Synth.dct32 = function (_in, slot, lo, hi) {
+    var t0,   t1,   t2,   t3,   t4,   t5,   t6,   t7;
+    var t8,   t9,   t10,  t11,  t12,  t13,  t14,  t15;
+    var t16,  t17,  t18,  t19,  t20,  t21,  t22,  t23;
+    var t24,  t25,  t26,  t27,  t28,  t29,  t30,  t31;
+    var t32,  t33,  t34,  t35,  t36,  t37,  t38,  t39;
+    var t40,  t41,  t42,  t43,  t44,  t45,  t46,  t47;
+    var t48,  t49,  t50,  t51,  t52,  t53,  t54,  t55;
+    var t56,  t57,  t58,  t59,  t60,  t61,  t62,  t63;
+    var t64,  t65,  t66,  t67,  t68,  t69,  t70,  t71;
+    var t72,  t73,  t74,  t75,  t76,  t77,  t78,  t79;
+    var t80,  t81,  t82,  t83,  t84,  t85,  t86,  t87;
+    var t88,  t89,  t90,  t91,  t92,  t93,  t94,  t95;
+    var t96,  t97,  t98,  t99,  t100, t101, t102, t103;
+    var t104, t105, t106, t107, t108, t109, t110, t111;
+    var t112, t113, t114, t115, t116, t117, t118, t119;
+    var t120, t121, t122, t123, t124, t125, t126, t127;
+    var t128, t129, t130, t131, t132, t133, t134, t135;
+    var t136, t137, t138, t139, t140, t141, t142, t143;
+    var t144, t145, t146, t147, t148, t149, t150, t151;
+    var t152, t153, t154, t155, t156, t157, t158, t159;
+    var t160, t161, t162, t163, t164, t165, t166, t167;
+    var t168, t169, t170, t171, t172, t173, t174, t175;
+    var t176;
+
+    t0   = _in[0]  + _in[31];  t16  = ((_in[0]  - _in[31]) * (costab1));
+    t1   = _in[15] + _in[16];  t17  = ((_in[15] - _in[16]) * (costab31));
+
+    t41  = t16 + t17;
+    t59  = ((t16 - t17) * (costab2));
+    t33  = t0  + t1;
+    t50  = ((t0  - t1) * ( costab2));
+
+    t2   = _in[7]  + _in[24];  t18  = ((_in[7]  - _in[24]) * (costab15));
+    t3   = _in[8]  + _in[23];  t19  = ((_in[8]  - _in[23]) * (costab17));
+
+    t42  = t18 + t19;
+    t60  = ((t18 - t19) * (costab30));
+    t34  = t2  + t3;
+    t51  = ((t2  - t3) * ( costab30));
+
+    t4   = _in[3]  + _in[28];  t20  = ((_in[3]  - _in[28]) * (costab7));
+    t5   = _in[12] + _in[19];  t21  = ((_in[12] - _in[19]) * (costab25));
+
+    t43  = t20 + t21;
+    t61  = ((t20 - t21) * (costab14));
+    t35  = t4  + t5;
+    t52  = ((t4  - t5) * ( costab14));
+
+    t6   = _in[4]  + _in[27];  t22  = ((_in[4]  - _in[27]) * (costab9));
+    t7   = _in[11] + _in[20];  t23  = ((_in[11] - _in[20]) * (costab23));
+
+    t44  = t22 + t23;
+    t62  = ((t22 - t23) * (costab18));
+    t36  = t6  + t7;
+    t53  = ((t6  - t7) * ( costab18));
+
+    t8   = _in[1]  + _in[30];  t24  = ((_in[1]  - _in[30]) * (costab3));
+    t9   = _in[14] + _in[17];  t25  = ((_in[14] - _in[17]) * (costab29));
+
+    t45  = t24 + t25;
+    t63  = ((t24 - t25) * (costab6));
+    t37  = t8  + t9;
+    t54  = ((t8  - t9) * ( costab6));
+
+    t10  = _in[6]  + _in[25];  t26  = ((_in[6]  - _in[25]) * (costab13));
+    t11  = _in[9]  + _in[22];  t27  = ((_in[9]  - _in[22]) * (costab19));
+
+    t46  = t26 + t27;
+    t64  = ((t26 - t27) * (costab26));
+    t38  = t10 + t11;
+    t55  = ((t10 - t11) * (costab26));
+
+    t12  = _in[2]  + _in[29];  t28  = ((_in[2]  - _in[29]) * (costab5));
+    t13  = _in[13] + _in[18];  t29  = ((_in[13] - _in[18]) * (costab27));
+
+    t47  = t28 + t29;
+    t65  = ((t28 - t29) * (costab10));
+    t39  = t12 + t13;
+    t56  = ((t12 - t13) * (costab10));
+
+    t14  = _in[5]  + _in[26];  t30  = ((_in[5]  - _in[26]) * (costab11));
+    t15  = _in[10] + _in[21];  t31  = ((_in[10] - _in[21]) * (costab21));
+
+    t48  = t30 + t31;
+    t66  = ((t30 - t31) * (costab22));
+    t40  = t14 + t15;
+    t57  = ((t14 - t15) * (costab22));
+
+    t69  = t33 + t34;  t89  = ((t33 - t34) * (costab4));
+    t70  = t35 + t36;  t90  = ((t35 - t36) * (costab28));
+    t71  = t37 + t38;  t91  = ((t37 - t38) * (costab12));
+    t72  = t39 + t40;  t92  = ((t39 - t40) * (costab20));
+    t73  = t41 + t42;  t94  = ((t41 - t42) * (costab4));
+    t74  = t43 + t44;  t95  = ((t43 - t44) * (costab28));
+    t75  = t45 + t46;  t96  = ((t45 - t46) * (costab12));
+    t76  = t47 + t48;  t97  = ((t47 - t48) * (costab20));
+
+    t78  = t50 + t51;  t100 = ((t50 - t51) * (costab4));
+    t79  = t52 + t53;  t101 = ((t52 - t53) * (costab28));
+    t80  = t54 + t55;  t102 = ((t54 - t55) * (costab12));
+    t81  = t56 + t57;  t103 = ((t56 - t57) * (costab20));
+
+    t83  = t59 + t60;  t106 = ((t59 - t60) * (costab4));
+    t84  = t61 + t62;  t107 = ((t61 - t62) * (costab28));
+    t85  = t63 + t64;  t108 = ((t63 - t64) * (costab12));
+    t86  = t65 + t66;  t109 = ((t65 - t66) * (costab20));
+
+    t113 = t69  + t70;
+    t114 = t71  + t72;
+
+    /*  0 */ hi[15][slot] = t113 + t114;
+    /* 16 */ lo[ 0][slot] = ((t113 - t114) * (costab16));
+
+    t115 = t73  + t74;
+    t116 = t75  + t76;
+
+    t32  = t115 + t116;
+
+    /*  1 */ hi[14][slot] = t32;
+
+    t118 = t78  + t79;
+    t119 = t80  + t81;
+
+    t58  = t118 + t119;
+
+    /*  2 */ hi[13][slot] = t58;
+
+    t121 = t83  + t84;
+    t122 = t85  + t86;
+
+    t67  = t121 + t122;
+
+    t49  = (t67 * 2) - t32;
+
+    /*  3 */ hi[12][slot] = t49;
+
+    t125 = t89  + t90;
+    t126 = t91  + t92;
+
+    t93  = t125 + t126;
+
+    /*  4 */ hi[11][slot] = t93;
+
+    t128 = t94  + t95;
+    t129 = t96  + t97;
+
+    t98  = t128 + t129;
+
+    t68  = (t98 * 2) - t49;
+
+    /*  5 */ hi[10][slot] = t68;
+
+    t132 = t100 + t101;
+    t133 = t102 + t103;
+
+    t104 = t132 + t133;
+
+    t82  = (t104 * 2) - t58;
+
+    /*  6 */ hi[ 9][slot] = t82;
+
+    t136 = t106 + t107;
+    t137 = t108 + t109;
+
+    t110 = t136 + t137;
+
+    t87  = (t110 * 2) - t67;
+
+    t77  = (t87 * 2) - t68;
+
+    /*  7 */ hi[ 8][slot] = t77;
+
+    t141 = ((t69 - t70) * (costab8));
+    t142 = ((t71 - t72) * (costab24));
+    t143 = t141 + t142;
+
+    /*  8 */ hi[ 7][slot] = t143;
+    /* 24 */ lo[ 8][slot] =
+        (((t141 - t142) * (costab16) * 2)) - t143;
+
+    t144 = ((t73 - t74) * (costab8));
+    t145 = ((t75 - t76) * (costab24));
+    t146 = t144 + t145;
+
+    t88  = (t146 * 2) - t77;
+
+    /*  9 */ hi[ 6][slot] = t88;
+
+    t148 = ((t78 - t79) * (costab8));
+    t149 = ((t80 - t81) * (costab24));
+    t150 = t148 + t149;
+
+    t105 = (t150 * 2) - t82;
+
+    /* 10 */ hi[ 5][slot] = t105;
+
+    t152 = ((t83 - t84) * (costab8));
+    t153 = ((t85 - t86) * (costab24));
+    t154 = t152 + t153;
+
+    t111 = (t154 * 2) - t87;
+
+    t99  = (t111 * 2) - t88;
+
+    /* 11 */ hi[ 4][slot] = t99;
+
+    t157 = ((t89 - t90) * (costab8));
+    t158 = ((t91 - t92) * (costab24));
+    t159 = t157 + t158;
+
+    t127 = (t159 * 2) - t93;
+
+    /* 12 */ hi[ 3][slot] = t127;
+
+    t160 = (((t125 - t126) * (costab16) * 2)) - t127;
+
+    /* 20 */ lo[ 4][slot] = t160;
+    /* 28 */ lo[12][slot] =
+        (((((t157 - t158) * (costab16) * 2) - t159) * 2)) - t160;
+
+    t161 = ((t94 - t95) * (costab8));
+    t162 = ((t96 - t97) * (costab24));
+    t163 = t161 + t162;
+
+    t130 = (t163 * 2) - t98;
+
+    t112 = (t130 * 2) - t99;
+
+    /* 13 */ hi[ 2][slot] = t112;
+
+    t164 = (((t128 - t129) * (costab16) * 2)) - t130;
+
+    t166 = ((t100 - t101) * (costab8));
+    t167 = ((t102 - t103) * (costab24));
+    t168 = t166 + t167;
+
+    t134 = (t168 * 2) - t104;
+
+    t120 = (t134 * 2) - t105;
+
+    /* 14 */ hi[ 1][slot] = t120;
+
+    t135 = (((t118 - t119) * (costab16) * 2)) - t120;
+
+    /* 18 */ lo[ 2][slot] = t135;
+
+    t169 = (((t132 - t133) * (costab16) * 2)) - t134;
+
+    t151 = (t169 * 2) - t135;
+
+    /* 22 */ lo[ 6][slot] = t151;
+
+    t170 = (((((t148 - t149) * (costab16) * 2) - t150) * 2)) - t151;
+
+    /* 26 */ lo[10][slot] = t170;
+    /* 30 */ lo[14][slot] =
+        (((((((t166 - t167) * (costab16)) * 2 -
+             t168) * 2) - t169) * 2) - t170);
+
+    t171 = ((t106 - t107) * (costab8));
+    t172 = ((t108 - t109) * (costab24));
+    t173 = t171 + t172;
+
+    t138 = (t173 * 2) - t110;
+    t123 = (t138 * 2) - t111;
+    t139 = (((t121 - t122) * (costab16) * 2)) - t123;
+    t117 = (t123 * 2) - t112;
+
+    /* 15 */ hi[ 0][slot] = t117;
+
+    t124 = (((t115 - t116) * (costab16) * 2)) - t117;
+
+    /* 17 */ lo[ 1][slot] = t124;
+
+    t131 = (t139 * 2) - t124;
+
+    /* 19 */ lo[ 3][slot] = t131;
+
+    t140 = (t164 * 2) - t131;
+
+    /* 21 */ lo[ 5][slot] = t140;
+
+    t174 = (((t136 - t137) * (costab16) * 2)) - t138;
+    t155 = (t174 * 2) - t139;
+    t147 = (t155 * 2) - t140;
+
+    /* 23 */ lo[ 7][slot] = t147;
+
+    t156 = (((((t144 - t145) * (costab16) * 2) - t146) * 2)) - t147;
+
+    /* 25 */ lo[ 9][slot] = t156;
+
+    t175 = (((((t152 - t153) * (costab16) * 2) - t154) * 2)) - t155;
+    t165 = (t175 * 2) - t156;
+
+    /* 27 */ lo[11][slot] = t165;
+
+    t176 = (((((((t161 - t162) * (costab16) * 2)) -
+               t163) * 2) - t164) * 2) - t165;
+
+    /* 29 */ lo[13][slot] = t176;
+    /* 31 */ lo[15][slot] =
+        (((((((((t171 - t172) * (costab16)) * 2 -
+               t173) * 2) - t174) * 2) - t175) * 2) - t176);
+
+    /*
+     * Totals:
+     *  80 multiplies
+     *  80 additions
+     * 119 subtractions
+     *  49 shifts (not counting SSO)
+     */
+};
+
+/*
+ * These are the coefficients for the subband synthesis window. This is a
+ * reordered version of Table B.3 from ISO/IEC 11172-3.
+ */
+const D = [
+    [  0.000000000,   /*  0 */
+       -0.000442505,
+       0.003250122,
+       -0.007003784,
+       0.031082153,
+       -0.078628540,
+       0.100311279,
+       -0.572036743,
+       1.144989014,
+       0.572036743,
+       0.100311279,
+       0.078628540,
+       0.031082153,
+       0.007003784,
+       0.003250122,
+       0.000442505,
+
+       0.000000000,
+       -0.000442505,
+       0.003250122,
+       -0.007003784,
+       0.031082153,
+       -0.078628540,
+       0.100311279,
+       -0.572036743,
+       1.144989014,
+       0.572036743,
+       0.100311279,
+       0.078628540,
+       0.031082153,
+       0.007003784,
+       0.003250122,
+       0.000442505 ],
+
+    [ -0.000015259,   /*  1 */
+      -0.000473022,
+      0.003326416,
+      -0.007919312,
+      0.030517578,
+      -0.084182739,
+      0.090927124,
+      -0.600219727,
+      1.144287109,
+      0.543823242,
+      0.108856201,
+      0.073059082,
+      0.031478882,
+      0.006118774,
+      0.003173828,
+      0.000396729,
+
+      -0.000015259,
+      -0.000473022,
+      0.003326416,
+      -0.007919312,
+      0.030517578,
+      -0.084182739,
+      0.090927124,
+      -0.600219727,
+      1.144287109,
+      0.543823242,
+      0.108856201,
+      0.073059082,
+      0.031478882,
+      0.006118774,
+      0.003173828,
+      0.000396729 ],
+
+    [ -0.000015259,   /*  2 */
+      -0.000534058,
+      0.003387451,
+      -0.008865356,
+      0.029785156,
+      -0.089706421,
+      0.080688477,
+      -0.628295898,
+      1.142211914,
+      0.515609741,
+      0.116577148,
+      0.067520142,
+      0.031738281,
+      0.005294800,
+      0.003082275,
+      0.000366211,
+
+      -0.000015259,
+      -0.000534058,
+      0.003387451,
+      -0.008865356,
+      0.029785156,
+      -0.089706421,
+      0.080688477,
+      -0.628295898,
+      1.142211914,
+      0.515609741,
+      0.116577148,
+      0.067520142,
+      0.031738281,
+      0.005294800,
+      0.003082275,
+      0.000366211 ],
+
+    [ -0.000015259,   /*  3 */
+      -0.000579834,
+      0.003433228,
+      -0.009841919,
+      0.028884888,
+      -0.095169067,
+      0.069595337,
+      -0.656219482,
+      1.138763428,
+      0.487472534,
+      0.123474121,
+      0.061996460,
+      0.031845093,
+      0.004486084,
+      0.002990723,
+      0.000320435,
+
+      -0.000015259,
+      -0.000579834,
+      0.003433228,
+      -0.009841919,
+      0.028884888,
+      -0.095169067,
+      0.069595337,
+      -0.656219482,
+      1.138763428,
+      0.487472534,
+      0.123474121,
+      0.061996460,
+      0.031845093,
+      0.004486084,
+      0.002990723,
+      0.000320435 ],
+
+    [ -0.000015259,   /*  4 */
+      -0.000625610,
+      0.003463745,
+      -0.010848999,
+      0.027801514,
+      -0.100540161,
+      0.057617187,
+      -0.683914185,
+      1.133926392,
+      0.459472656,
+      0.129577637,
+      0.056533813,
+      0.031814575,
+      0.003723145,
+      0.002899170,
+      0.000289917,
+
+      -0.000015259,
+      -0.000625610,
+      0.003463745,
+      -0.010848999,
+      0.027801514,
+      -0.100540161,
+      0.057617187,
+      -0.683914185,
+      1.133926392,
+      0.459472656,
+      0.129577637,
+      0.056533813,
+      0.031814575,
+      0.003723145,
+      0.002899170,
+      0.000289917 ],
+
+    [ -0.000015259,   /*  5 */
+      -0.000686646,
+      0.003479004,
+      -0.011886597,
+      0.026535034,
+      -0.105819702,
+      0.044784546,
+      -0.711318970,
+      1.127746582,
+      0.431655884,
+      0.134887695,
+      0.051132202,
+      0.031661987,
+      0.003005981,
+      0.002792358,
+      0.000259399,
+
+      -0.000015259,
+      -0.000686646,
+      0.003479004,
+      -0.011886597,
+      0.026535034,
+      -0.105819702,
+      0.044784546,
+      -0.711318970,
+      1.127746582,
+      0.431655884,
+      0.134887695,
+      0.051132202,
+      0.031661987,
+      0.003005981,
+      0.002792358,
+      0.000259399 ],
+
+    [ -0.000015259,   /*  6 */
+      -0.000747681,
+      0.003479004,
+      -0.012939453,
+      0.025085449,
+      -0.110946655,
+      0.031082153,
+      -0.738372803,
+      1.120223999,
+      0.404083252,
+      0.139450073,
+      0.045837402,
+      0.031387329,
+      0.002334595,
+      0.002685547,
+      0.000244141,
+
+      -0.000015259,
+      -0.000747681,
+      0.003479004,
+      -0.012939453,
+      0.025085449,
+      -0.110946655,
+      0.031082153,
+      -0.738372803,
+      1.120223999,
+      0.404083252,
+      0.139450073,
+      0.045837402,
+      0.031387329,
+      0.002334595,
+      0.002685547,
+      0.000244141 ],
+
+    [ -0.000030518,   /*  7 */
+      -0.000808716,
+      0.003463745,
+      -0.014022827,
+      0.023422241,
+      -0.115921021,
+      0.016510010,
+      -0.765029907,
+      1.111373901,
+      0.376800537,
+      0.143264771,
+      0.040634155,
+      0.031005859,
+      0.001693726,
+      0.002578735,
+      0.000213623,
+
+      -0.000030518,
+      -0.000808716,
+      0.003463745,
+      -0.014022827,
+      0.023422241,
+      -0.115921021,
+      0.016510010,
+      -0.765029907,
+      1.111373901,
+      0.376800537,
+      0.143264771,
+      0.040634155,
+      0.031005859,
+      0.001693726,
+      0.002578735,
+      0.000213623 ],
+
+    [ -0.000030518,   /*  8 */
+      -0.000885010,
+      0.003417969,
+      -0.015121460,
+      0.021575928,
+      -0.120697021,
+      0.001068115,
+      -0.791213989,
+      1.101211548,
+      0.349868774,
+      0.146362305,
+      0.035552979,
+      0.030532837,
+      0.001098633,
+      0.002456665,
+      0.000198364,
+
+      -0.000030518,
+      -0.000885010,
+      0.003417969,
+      -0.015121460,
+      0.021575928,
+      -0.120697021,
+      0.001068115,
+      -0.791213989,
+      1.101211548,
+      0.349868774,
+      0.146362305,
+      0.035552979,
+      0.030532837,
+      0.001098633,
+      0.002456665,
+      0.000198364 ],
+
+    [ -0.000030518,   /*  9 */
+      -0.000961304,
+      0.003372192,
+      -0.016235352,
+      0.019531250,
+      -0.125259399,
+      -0.015228271,
+      -0.816864014,
+      1.089782715,
+      0.323318481,
+      0.148773193,
+      0.030609131,
+      0.029937744,
+      0.000549316,
+      0.002349854,
+      0.000167847,
+
+      -0.000030518,
+      -0.000961304,
+      0.003372192,
+      -0.016235352,
+      0.019531250,
+      -0.125259399,
+      -0.015228271,
+      -0.816864014,
+      1.089782715,
+      0.323318481,
+      0.148773193,
+      0.030609131,
+      0.029937744,
+      0.000549316,
+      0.002349854,
+      0.000167847 ],
+
+    [ -0.000030518,   /* 10 */
+      -0.001037598,
+      0.003280640,
+      -0.017349243,
+      0.017257690,
+      -0.129562378,
+      -0.032379150,
+      -0.841949463,
+      1.077117920,
+      0.297210693,
+      0.150497437,
+      0.025817871,
+      0.029281616,
+      0.000030518,
+      0.002243042,
+      0.000152588,
+
+      -0.000030518,
+      -0.001037598,
+      0.003280640,
+      -0.017349243,
+      0.017257690,
+      -0.129562378,
+      -0.032379150,
+      -0.841949463,
+      1.077117920,
+      0.297210693,
+      0.150497437,
+      0.025817871,
+      0.029281616,
+      0.000030518,
+      0.002243042,
+      0.000152588 ],
+
+    [ -0.000045776,   /* 11 */
+      -0.001113892,
+      0.003173828,
+      -0.018463135,
+      0.014801025,
+      -0.133590698,
+      -0.050354004,
+      -0.866363525,
+      1.063217163,
+      0.271591187,
+      0.151596069,
+      0.021179199,
+      0.028533936,
+      -0.000442505,
+      0.002120972,
+      0.000137329,
+
+      -0.000045776,
+      -0.001113892,
+      0.003173828,
+      -0.018463135,
+      0.014801025,
+      -0.133590698,
+      -0.050354004,
+      -0.866363525,
+      1.063217163,
+      0.271591187,
+      0.151596069,
+      0.021179199,
+      0.028533936,
+      -0.000442505,
+      0.002120972,
+      0.000137329 ],
+
+    [ -0.000045776,   /* 12 */
+      -0.001205444,
+      0.003051758,
+      -0.019577026,
+      0.012115479,
+      -0.137298584,
+      -0.069168091,
+      -0.890090942,
+      1.048156738,
+      0.246505737,
+      0.152069092,
+      0.016708374,
+      0.027725220,
+      -0.000869751,
+      0.002014160,
+      0.000122070,
+
+      -0.000045776,
+      -0.001205444,
+      0.003051758,
+      -0.019577026,
+      0.012115479,
+      -0.137298584,
+      -0.069168091,
+      -0.890090942,
+      1.048156738,
+      0.246505737,
+      0.152069092,
+      0.016708374,
+      0.027725220,
+      -0.000869751,
+      0.002014160,
+      0.000122070 ],
+
+    [ -0.000061035,   /* 13 */
+      -0.001296997,
+      0.002883911,
+      -0.020690918,
+      0.009231567,
+      -0.140670776,
+      -0.088775635,
+      -0.913055420,
+      1.031936646,
+      0.221984863,
+      0.151962280,
+      0.012420654,
+      0.026840210,
+      -0.001266479,
+      0.001907349,
+      0.000106812,
+
+      -0.000061035,
+      -0.001296997,
+      0.002883911,
+      -0.020690918,
+      0.009231567,
+      -0.140670776,
+      -0.088775635,
+      -0.913055420,
+      1.031936646,
+      0.221984863,
+      0.151962280,
+      0.012420654,
+      0.026840210,
+      -0.001266479,
+      0.001907349,
+      0.000106812 ],
+
+    [ -0.000061035,   /* 14 */
+      -0.001388550,
+      0.002700806,
+      -0.021789551,
+      0.006134033,
+      -0.143676758,
+      -0.109161377,
+      -0.935195923,
+      1.014617920,
+      0.198059082,
+      0.151306152,
+      0.008316040,
+      0.025909424,
+      -0.001617432,
+      0.001785278,
+      0.000106812,
+
+      -0.000061035,
+      -0.001388550,
+      0.002700806,
+      -0.021789551,
+      0.006134033,
+      -0.143676758,
+      -0.109161377,
+      -0.935195923,
+      1.014617920,
+      0.198059082,
+      0.151306152,
+      0.008316040,
+      0.025909424,
+      -0.001617432,
+      0.001785278,
+      0.000106812 ],
+
+    [ -0.000076294,   /* 15 */
+      -0.001480103,
+      0.002487183,
+      -0.022857666,
+      0.002822876,
+      -0.146255493,
+      -0.130310059,
+      -0.956481934,
+      0.996246338,
+      0.174789429,
+      0.150115967,
+      0.004394531,
+      0.024932861,
+      -0.001937866,
+      0.001693726,
+      0.000091553,
+
+      -0.000076294,
+      -0.001480103,
+      0.002487183,
+      -0.022857666,
+      0.002822876,
+      -0.146255493,
+      -0.130310059,
+      -0.956481934,
+      0.996246338,
+      0.174789429,
+      0.150115967,
+      0.004394531,
+      0.024932861,
+      -0.001937866,
+      0.001693726,
+      0.000091553 ],
+
+    [ -0.000076294,   /* 16 */
+      -0.001586914,
+      0.002227783,
+      -0.023910522,
+      -0.000686646,
+      -0.148422241,
+      -0.152206421,
+      -0.976852417,
+      0.976852417,
+      0.152206421,
+      0.148422241,
+      0.000686646,
+      0.023910522,
+      -0.002227783,
+      0.001586914,
+      0.000076294,
+
+      -0.000076294,
+      -0.001586914,
+      0.002227783,
+      -0.023910522,
+      -0.000686646,
+      -0.148422241,
+      -0.152206421,
+      -0.976852417,
+      0.976852417,
+      0.152206421,
+      0.148422241,
+      0.000686646,
+      0.023910522,
+      -0.002227783,
+      0.001586914,
+      0.000076294 ]
+];
+
+/*
+ * perform full frequency PCM synthesis
+ */
+MP3Synth.prototype.full = function(frame, nch, ns) {
+    var Dptr, hi, lo, ptr;
+    
+    for (var ch = 0; ch < nch; ++ch) {
+        var sbsample = frame.sbsample[ch];
+        var filter  = this.filter[ch];
+        var phase   = this.phase;
+        var pcm     = this.pcm.samples[ch];
+        var pcm1Ptr = 0;
+        var pcm2Ptr = 0;
+
+        for (var s = 0; s < ns; ++s) {
+            MP3Synth.dct32(sbsample[s], phase >> 1, filter[0][phase & 1], filter[1][phase & 1]);
+
+            var pe = phase & ~1;
+            var po = ((phase - 1) & 0xf) | 1;
+
+            /* calculate 32 samples */
+            var fe = filter[0][ phase & 1];
+            var fx = filter[0][~phase & 1];
+            var fo = filter[1][~phase & 1];
+
+            var fePtr = 0;
+            var fxPtr = 0;
+            var foPtr = 0;
+            
+            Dptr = 0;
+
+            ptr = D[Dptr];
+            _fx = fx[fxPtr];
+            _fe = fe[fePtr];
+
+            lo =  _fx[0] * ptr[po +  0];
+            lo += _fx[1] * ptr[po + 14];
+            lo += _fx[2] * ptr[po + 12];
+            lo += _fx[3] * ptr[po + 10];
+            lo += _fx[4] * ptr[po +  8];
+            lo += _fx[5] * ptr[po +  6];
+            lo += _fx[6] * ptr[po +  4];
+            lo += _fx[7] * ptr[po +  2];
+            lo = -lo;                      
+            
+            lo += _fe[0] * ptr[pe +  0];
+            lo += _fe[1] * ptr[pe + 14];
+            lo += _fe[2] * ptr[pe + 12];
+            lo += _fe[3] * ptr[pe + 10];
+            lo += _fe[4] * ptr[pe +  8];
+            lo += _fe[5] * ptr[pe +  6];
+            lo += _fe[6] * ptr[pe +  4];
+            lo += _fe[7] * ptr[pe +  2];
+
+            pcm[pcm1Ptr++] = lo;
+            pcm2Ptr = pcm1Ptr + 30;
+
+            for (var sb = 1; sb < 16; ++sb) {
+                ++fePtr;
+                ++Dptr;
+
+                /* D[32 - sb][i] === -D[sb][31 - i] */
+
+                ptr = D[Dptr];
+                _fo = fo[foPtr];
+                _fe = fe[fePtr];
+
+                lo  = _fo[0] * ptr[po +  0];
+                lo += _fo[1] * ptr[po + 14];
+                lo += _fo[2] * ptr[po + 12];
+                lo += _fo[3] * ptr[po + 10];
+                lo += _fo[4] * ptr[po +  8];
+                lo += _fo[5] * ptr[po +  6];
+                lo += _fo[6] * ptr[po +  4];
+                lo += _fo[7] * ptr[po +  2];
+                lo = -lo;
+
+                lo += _fe[7] * ptr[pe + 2];
+                lo += _fe[6] * ptr[pe + 4];
+                lo += _fe[5] * ptr[pe + 6];
+                lo += _fe[4] * ptr[pe + 8];
+                lo += _fe[3] * ptr[pe + 10];
+                lo += _fe[2] * ptr[pe + 12];
+                lo += _fe[1] * ptr[pe + 14];
+                lo += _fe[0] * ptr[pe + 0];
+
+                pcm[pcm1Ptr++] = lo;
+
+                lo =  _fe[0] * ptr[-pe + 31 - 16];
+                lo += _fe[1] * ptr[-pe + 31 - 14];
+                lo += _fe[2] * ptr[-pe + 31 - 12];
+                lo += _fe[3] * ptr[-pe + 31 - 10];
+                lo += _fe[4] * ptr[-pe + 31 -  8];
+                lo += _fe[5] * ptr[-pe + 31 -  6];
+                lo += _fe[6] * ptr[-pe + 31 -  4];
+                lo += _fe[7] * ptr[-pe + 31 -  2];
+
+                lo += _fo[7] * ptr[-po + 31 -  2];
+                lo += _fo[6] * ptr[-po + 31 -  4];
+                lo += _fo[5] * ptr[-po + 31 -  6];
+                lo += _fo[4] * ptr[-po + 31 -  8];
+                lo += _fo[3] * ptr[-po + 31 - 10];
+                lo += _fo[2] * ptr[-po + 31 - 12];
+                lo += _fo[1] * ptr[-po + 31 - 14];
+                lo += _fo[0] * ptr[-po + 31 - 16];
+
+                pcm[pcm2Ptr--] = lo;
+                ++foPtr;
+            }
+
+            ++Dptr;
+
+            ptr = D[Dptr];
+            _fo = fo[foPtr];
+
+            lo  = _fo[0] * ptr[po +  0];
+            lo += _fo[1] * ptr[po + 14];
+            lo += _fo[2] * ptr[po + 12];
+            lo += _fo[3] * ptr[po + 10];
+            lo += _fo[4] * ptr[po +  8];
+            lo += _fo[5] * ptr[po +  6];
+            lo += _fo[6] * ptr[po +  4];
+            lo += _fo[7] * ptr[po +  2];
+
+            pcm[pcm1Ptr] = -lo;
+            pcm1Ptr += 16;
+            phase = (phase + 1) % 16;
+        }
+    }
+};
+
+// TODO: synth.half()
+
+/*
+ * NAME:    synth.frame()
+ * DESCRIPTION: perform PCM synthesis of frame subband samples
+ */
+MP3Synth.prototype.frame = function (frame) {
+    var nch = frame.header.nchannels();
+    var ns  = frame.header.nbsamples();
+
+    this.pcm.samplerate = frame.header.samplerate;
+    this.pcm.channels   = nch;
+    this.pcm.length     = 32 * ns;
+
+    /*
+     if (frame.options & Mad.Option.HALFSAMPLERATE) {
+     this.pcm.samplerate /= 2;
+     this.pcm.length     /= 2;
+
+     throw new Error("HALFSAMPLERATE is not supported. What do you think? As if I have the time for this");
+     }
+     */
+
+    this.full(frame, nch, ns);
+    this.phase = (this.phase + ns) % 16;
+};
+
+module.exports = MP3Synth;
+
+},{"./utils":15}],14:[function(require,module,exports){
+/*
+ * These are the scalefactor values for Layer I and Layer II.
+ * The values are from Table B.1 of ISO/IEC 11172-3.
+ *
+ * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict
+ * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of
+ * 63 is invalid. However, for better compatibility with current practices, we
+ * add a 64th entry.
+ */
+exports.SF_TABLE = new Float32Array([
+    2.000000000000, 1.587401051968, 1.259921049895, 1.000000000000, 
+    0.793700525984, 0.629960524947, 0.500000000000, 0.396850262992,
+    0.314980262474, 0.250000000000, 0.198425131496, 0.157490131237,
+    0.125000000000, 0.099212565748, 0.078745065618, 0.062500000000,
+    0.049606282874, 0.039372532809, 0.031250000000, 0.024803141437,
+    0.019686266405, 0.015625000000, 0.012401570719, 0.009843133202,
+    0.007812500000, 0.006200785359, 0.004921566601, 0.003906250000,
+    0.003100392680, 0.002460783301, 0.001953125000, 0.001550196340,
+    0.001230391650, 0.000976562500, 0.000775098170, 0.000615195825,
+    0.000488281250, 0.000387549085, 0.000307597913, 0.000244140625,
+    0.000193774542, 0.000153798956, 0.000122070313, 0.000096887271,
+    0.000076899478, 0.000061035156, 0.000048443636, 0.000038449739,
+    0.000030517578, 0.000024221818, 0.000019224870, 0.000015258789,
+    0.000012110909, 0.000009612435, 0.000007629395, 0.000006055454,
+    0.000004806217, 0.000003814697, 0.000003027727, 0.000002403109,
+    0.000001907349, 0.000001513864, 0.000001201554, 0.000000000000
+]);
+
+/*
+ * MPEG-1 scalefactor band widths
+ * derived from Table B.8 of ISO/IEC 11172-3
+ */
+const SFB_48000_LONG = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  6,  6,  6,   8,  10,
+    12, 16, 18, 22, 28, 34, 40, 46, 54,  54, 192
+]);
+
+const SFB_44100_LONG = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  6,  6,  8,   8,  10,
+    12, 16, 20, 24, 28, 34, 42, 50, 54,  76, 158
+]);
+
+const SFB_32000_LONG = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  6,  6,  8,  10,  12,
+    16, 20, 24, 30, 38, 46, 56, 68, 84, 102,  26
+]);
+
+const SFB_48000_SHORT = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+    6,  6,  6,  6,  6, 10, 10, 10, 12, 12, 12, 14, 14,
+    14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66
+]);
+
+const SFB_44100_SHORT = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+    6,  6,  8,  8,  8, 10, 10, 10, 12, 12, 12, 14, 14,
+    14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56
+]);
+
+const SFB_32000_SHORT = new Uint8Array([
+    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+    6,  6,  8,  8,  8, 12, 12, 12, 16, 16, 16, 20, 20,
+    20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12
+]);
+
+const SFB_48000_MIXED = new Uint8Array([
+    /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+    /* short */  4,  4,  4,  6,  6,  6,  6,  6,  6, 10,
+    10, 10, 12, 12, 12, 14, 14, 14, 16, 16,
+    16, 20, 20, 20, 26, 26, 26, 66, 66, 66
+]);
+
+const SFB_44100_MIXED = new Uint8Array([
+    /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+    /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,
+    10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+    18, 22, 22, 22, 30, 30, 30, 56, 56, 56
+]);
+
+const SFB_32000_MIXED = new Uint8Array([
+    /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+    /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 12,
+    12, 12, 16, 16, 16, 20, 20, 20, 26, 26,
+    26, 34, 34, 34, 42, 42, 42, 12, 12, 12
+]);
+
+/*
+ * MPEG-2 scalefactor band widths
+ * derived from Table B.2 of ISO/IEC 13818-3
+ */
+const SFB_24000_LONG = new Uint8Array([
+    6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
+   18, 22, 26, 32, 38, 46, 54, 62, 70,  76,  36
+]);
+
+const SFB_22050_LONG = new Uint8Array([
+    6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
+   20, 24, 28, 32, 38, 46, 52, 60, 68,  58,  54
+]);
+
+const SFB_16000_LONG = SFB_22050_LONG;
+
+const SFB_24000_SHORT = new Uint8Array([
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
+   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+  18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12
+]);
+
+const SFB_22050_SHORT = new Uint8Array([
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  6,
+   6,  6,  8,  8,  8, 10, 10, 10, 14, 14, 14, 18, 18,
+  18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18
+]);
+
+const SFB_16000_SHORT = new Uint8Array([
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
+   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+  18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18
+]);
+
+const SFB_24000_MIXED = new Uint8Array([
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
+              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
+              24, 32, 32, 32, 44, 44, 44, 12, 12, 12
+]);
+
+const SFB_22050_MIXED = new Uint8Array([
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  6,  6,  6,  8,  8,  8, 10,
+              10, 10, 14, 14, 14, 18, 18, 18, 26, 26,
+              26, 32, 32, 32, 42, 42, 42, 18, 18, 18
+]);
+
+const SFB_16000_MIXED = new Uint8Array([
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
+              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
+              24, 30, 30, 30, 40, 40, 40, 18, 18, 18
+]);
+
+/*
+ * MPEG 2.5 scalefactor band widths
+ * derived from public sources
+ */
+const SFB_12000_LONG = SFB_16000_LONG;
+const SFB_11025_LONG = SFB_12000_LONG;
+
+const SFB_8000_LONG = new Uint8Array([
+  12, 12, 12, 12, 12, 12, 16, 20, 24,  28,  32,
+  40, 48, 56, 64, 76, 90,  2,  2,  2,   2,   2
+]);
+
+const SFB_12000_SHORT = SFB_16000_SHORT;
+const SFB_11025_SHORT = SFB_12000_SHORT;
+
+const SFB_8000_SHORT = new Uint8Array([
+   8,  8,  8,  8,  8,  8,  8,  8,  8, 12, 12, 12, 16,
+  16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36,
+  36,  2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
+]);
+
+const SFB_12000_MIXED = SFB_16000_MIXED;
+const SFB_11025_MIXED = SFB_12000_MIXED;
+
+/* the 8000 Hz short block scalefactor bands do not break after
+   the first 36 frequency lines, so this is probably wrong */
+const SFB_8000_MIXED = new Uint8Array([
+  /* long */  12, 12, 12,
+  /* short */  4,  4,  4,  8,  8,  8, 12, 12, 12, 16, 16, 16,
+              20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36,
+               2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
+]);
+
+exports.SFBWIDTH_TABLE = [
+    { l: SFB_48000_LONG, s: SFB_48000_SHORT, m: SFB_48000_MIXED },
+    { l: SFB_44100_LONG, s: SFB_44100_SHORT, m: SFB_44100_MIXED },
+    { l: SFB_32000_LONG, s: SFB_32000_SHORT, m: SFB_32000_MIXED },
+    { l: SFB_24000_LONG, s: SFB_24000_SHORT, m: SFB_24000_MIXED },
+    { l: SFB_22050_LONG, s: SFB_22050_SHORT, m: SFB_22050_MIXED },
+    { l: SFB_16000_LONG, s: SFB_16000_SHORT, m: SFB_16000_MIXED },
+    { l: SFB_12000_LONG, s: SFB_12000_SHORT, m: SFB_12000_MIXED },
+    { l: SFB_11025_LONG, s: SFB_11025_SHORT, m: SFB_11025_MIXED },
+    { l:  SFB_8000_LONG, s:  SFB_8000_SHORT, m:  SFB_8000_MIXED }
+];
+
+exports.PRETAB = new Uint8Array([
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0
+]);
+
+/*
+ * fractional powers of two
+ * used for requantization and joint stereo decoding
+ *
+ * ROOT_TABLE[3 + x] = 2^(x/4)
+ */
+exports.ROOT_TABLE = new Float32Array([
+    /* 2^(-3/4) */ 0.59460355750136,
+    /* 2^(-2/4) */ 0.70710678118655,
+    /* 2^(-1/4) */ 0.84089641525371,
+    /* 2^( 0/4) */ 1.00000000000000,
+    /* 2^(+1/4) */ 1.18920711500272,
+    /* 2^(+2/4) */ 1.41421356237310,
+    /* 2^(+3/4) */ 1.68179283050743
+]);
+
+exports.CS = new Float32Array([
+    +0.857492926 , +0.881741997,
+    +0.949628649 , +0.983314592,
+    +0.995517816 , +0.999160558,
+    +0.999899195 , +0.999993155
+]);
+
+exports.CA = new Float32Array([
+    -0.514495755, -0.471731969,
+    -0.313377454, -0.181913200,
+    -0.094574193, -0.040965583,
+    -0.014198569, -0.003699975
+]);
+
+exports.COUNT1TABLE_SELECT = 0x01;
+exports.SCALEFAC_SCALE     = 0x02;
+exports.PREFLAG            = 0x04;
+exports.MIXED_BLOCK_FLAG   = 0x08;
+
+exports.I_STEREO  = 0x1;
+exports.MS_STEREO = 0x2;
+
+/*
+ * windowing coefficients for long blocks
+ * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
+ *
+ * WINDOW_L[i] = sin((PI / 36) * (i + 1/2))
+ */
+exports.WINDOW_L = new Float32Array([
+    0.043619387, 0.130526192,
+    0.216439614, 0.300705800,
+    0.382683432, 0.461748613,
+    0.537299608, 0.608761429,
+    0.675590208, 0.737277337,
+    0.793353340, 0.843391446,
+
+    0.887010833, 0.923879533,
+    0.953716951, 0.976296007,
+    0.991444861, 0.999048222,
+    0.999048222, 0.991444861,
+    0.976296007, 0.953716951,
+    0.923879533, 0.887010833,
+
+    0.843391446, 0.793353340,
+    0.737277337, 0.675590208,
+    0.608761429, 0.537299608,
+    0.461748613, 0.382683432,
+    0.300705800, 0.216439614,
+    0.130526192, 0.043619387
+]);
+
+/*
+ * windowing coefficients for short blocks
+ * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
+ *
+ * WINDOW_S[i] = sin((PI / 12) * (i + 1/2))
+ */
+exports.WINDOW_S = new Float32Array([
+    0.130526192, 0.382683432,
+    0.608761429, 0.793353340,
+    0.923879533, 0.991444861,
+    0.991444861, 0.923879533,
+    0.793353340, 0.608761429,
+    0.382683432, 0.130526192
+]);
+
+/*
+ * coefficients for intensity stereo processing
+ * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3
+ *
+ * is_ratio[i] = tan(i * (PI / 12))
+ * IS_TABLE[i] = is_ratio[i] / (1 + is_ratio[i])
+ */
+exports.IS_TABLE = new Float32Array([
+    0.000000000,
+    0.211324865,
+    0.366025404,
+    0.500000000,
+    0.633974596,
+    0.788675135,
+    1.000000000
+]);
+
+/*
+ * coefficients for LSF intensity stereo processing
+ * derived from section 2.4.3.2 of ISO/IEC 13818-3
+ *
+ * IS_LSF_TABLE[0][i] = (1 / sqrt(sqrt(2)))^(i + 1)
+ * IS_LSF_TABLE[1][i] = (1 /      sqrt(2)) ^(i + 1)
+ */
+exports.IS_LSF_TABLE = [
+    new Float32Array([
+        0.840896415,
+        0.707106781,
+        0.594603558,
+        0.500000000,
+        0.420448208,
+        0.353553391,
+        0.297301779,
+        0.250000000,
+        0.210224104,
+        0.176776695,
+        0.148650889,
+        0.125000000,
+        0.105112052,
+        0.088388348,
+        0.074325445
+    ]), 
+    new Float32Array([
+        0.707106781,
+        0.500000000,
+        0.353553391,
+        0.250000000,
+        0.176776695,
+        0.125000000,
+        0.088388348,
+        0.062500000,
+        0.044194174,
+        0.031250000,
+        0.022097087,
+        0.015625000,
+        0.011048543,
+        0.007812500,
+        0.005524272
+    ])
+];
+
+/*
+ * scalefactor bit lengths
+ * derived from section 2.4.2.7 of ISO/IEC 11172-3
+ */
+exports.SFLEN_TABLE = [
+    { slen1: 0, slen2: 0 }, { slen1: 0, slen2: 1 }, { slen1: 0, slen2: 2 }, { slen1: 0, slen2: 3 },
+    { slen1: 3, slen2: 0 }, { slen1: 1, slen2: 1 }, { slen1: 1, slen2: 2 }, { slen1: 1, slen2: 3 },
+    { slen1: 2, slen2: 1 }, { slen1: 2, slen2: 2 }, { slen1: 2, slen2: 3 }, { slen1: 3, slen2: 1 },
+    { slen1: 3, slen2: 2 }, { slen1: 3, slen2: 3 }, { slen1: 4, slen2: 2 }, { slen1: 4, slen2: 3 }    
+];
+
+/*
+ * number of LSF scalefactor band values
+ * derived from section 2.4.3.2 of ISO/IEC 13818-3
+ */
+exports.NSFB_TABLE = [
+    [ [  6,  5,  5, 5 ],
+      [  9,  9,  9, 9 ],
+      [  6,  9,  9, 9 ] ],
+
+    [ [  6,  5,  7, 3 ],
+      [  9,  9, 12, 6 ],
+      [  6,  9, 12, 6 ] ],
+
+    [ [ 11, 10,  0, 0 ],
+      [ 18, 18,  0, 0 ],
+      [ 15, 18,  0, 0 ] ],
+
+    [ [  7,  7,  7, 0 ],
+      [ 12, 12, 12, 0 ],
+      [  6, 15, 12, 0 ] ],
+
+    [ [  6,  6,  6, 3 ],
+      [ 12,  9,  9, 6 ],
+      [  6, 12,  9, 6 ] ],
+
+    [ [  8,  8,  5, 0 ],
+      [ 15, 12,  9, 0 ],
+      [  6, 18,  9, 0 ] ]
+];
+ 
+},{}],15:[function(require,module,exports){
+/**
+ * Makes a multidimensional array
+ */
+exports.makeArray = function(lengths, Type) {
+    if (!Type) Type = Float64Array;
+    
+    if (lengths.length === 1) {
+        return new Type(lengths[0]);
+    }
+    
+    var ret = [],
+        len = lengths[0];
+        
+    for (var j = 0; j < len; j++) {
+        ret[j] = exports.makeArray(lengths.slice(1), Type);
+    }
+    
+    return ret;
+};
+
+},{}]},{},[1])
+
+
+//# sourceMappingURL=mp3.js.map
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js.map
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js.map	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/js/audiocogs/mp3.js.map	(revision 33547)
@@ -0,0 +1,43 @@
+{
+  "version": 3,
+  "file": "generated.js",
+  "sources": [
+    "/Users/devongovett/projects/codecs/mp3.js/node_modules/browserify/node_modules/browser-pack/_prelude.js",
+    "/Users/devongovett/projects/codecs/mp3.js/index.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/decoder.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/demuxer.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/frame.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/header.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/huffman.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/id3.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/imdct.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/layer1.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/layer2.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/layer3.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/stream.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/synth.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/tables.js",
+    "/Users/devongovett/projects/codecs/mp3.js/src/utils.js"
+  ],
+  "names": [],
+  "mappings": "AAAA;ACAA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACz6FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACltCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrlCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
+  "sourcesContent": [
+    "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})",
+    "exports.MP3Demuxer = require('./src/demuxer');\nexports.MP3Decoder = require('./src/decoder');\n",
+    "var AV = (window.AV);\nvar MP3FrameHeader = require('./header');\nvar MP3Stream = require('./stream');\nvar MP3Frame = require('./frame');\nvar MP3Synth = require('./synth');\nvar Layer1 = require('./layer1');\nvar Layer2 = require('./layer2');\nvar Layer3 = require('./layer3');\n\nvar MP3Decoder = AV.Decoder.extend(function() {\n    AV.Decoder.register('mp3', this);\n    \n    this.prototype.init = function() {\n        this.mp3_stream = new MP3Stream(this.bitstream);\n        this.frame = new MP3Frame();\n        this.synth = new MP3Synth();\n        this.seeking = false;\n    };\n    \n    this.prototype.readChunk = function() {\n        var stream = this.mp3_stream;\n        var frame = this.frame;\n        var synth = this.synth;\n\n        // if we just seeked, we may start getting errors involving the frame reservoir,\n        // so keep going until we successfully decode a frame\n        if (this.seeking) {\n            while (true) {\n                try {\n                    frame.decode(stream);\n                    break;\n                } catch (err) {\n                    if (err instanceof AV.UnderflowError)\n                        throw err;\n                }\n            }\n            \n            this.seeking = false;\n        } else {\n            frame.decode(stream);\n        }\n        \n        synth.frame(frame);\n        \n        // interleave samples\n        var data = synth.pcm.samples,\n            channels = synth.pcm.channels,\n            len = synth.pcm.length,\n            output = new Float32Array(len * channels),\n            j = 0;\n        \n        for (var k = 0; k < len; k++) {\n            for (var i = 0; i < channels; i++) {\n                output[j++] = data[i][k];\n            }\n        }\n        \n        return output;\n    };\n    \n    this.prototype.seek = function(timestamp) {\n        var offset;\n        \n        // if there was a Xing or VBRI tag with a seek table, use that\n        // otherwise guesstimate based on CBR bitrate\n        if (this.demuxer.seekPoints.length > 0) {\n            timestamp = this._super(timestamp);\n            offset = this.stream.offset;\n        } else {\n            offset = timestamp * this.format.bitrate / 8 / this.format.sampleRate;\n        }\n        \n        this.mp3_stream.reset(offset);\n        \n        // try to find 3 consecutive valid frame headers in a row\n        for (var i = 0; i < 4096; i++) {\n            var pos = offset + i;\n            for (var j = 0; j < 3; j++) {\n                this.mp3_stream.reset(pos);\n                \n                try {\n                    var header = MP3FrameHeader.decode(this.mp3_stream);\n                } catch (e) {\n                    break;\n                }\n                \n                // skip the rest of the frame\n                var size = header.framesize();\n                if (size == null)\n                    break;\n                        \n                pos += size;\n            }\n            \n            // check if we're done\n            if (j === 3)\n                break;\n        }\n        \n        // if we didn't find 3 frames, just try the first one and hope for the best\n        if (j !== 3)\n            i = 0;\n            \n        this.mp3_stream.reset(offset + i);\n        \n        // if we guesstimated, update the timestamp to another estimate of where we actually seeked to\n        if (this.demuxer.seekPoints.length === 0)\n            timestamp = this.stream.offset / (this.format.bitrate / 8) * this.format.sampleRate;\n        \n        this.seeking = true;\n        return timestamp;\n    };\n});\n\nmodule.exports = MP3Decoder;\n",
+    "var AV = (window.AV);\nvar ID3v23Stream = require('./id3').ID3v23Stream;\nvar ID3v22Stream = require('./id3').ID3v22Stream;\nvar MP3FrameHeader = require('./header');\nvar MP3Stream = require('./stream');\n\nvar MP3Demuxer = AV.Demuxer.extend(function() {\n    AV.Demuxer.register(this);\n    \n    this.probe = function(stream) {\n        var off = stream.offset;\n        \n        // skip id3 metadata if it exists\n        var id3header = MP3Demuxer.getID3v2Header(stream);\n        if (id3header)\n            stream.advance(10 + id3header.length);\n        \n        // attempt to read the header of the first audio frame\n        var s = new MP3Stream(new AV.Bitstream(stream));\n        var header = null;\n        \n        try {\n            header = MP3FrameHeader.decode(s);\n        } catch (e) {};\n        \n        // go back to the beginning, for other probes\n        stream.seek(off);\n        \n        return !!header;\n    };\n    \n    this.getID3v2Header = function(stream) {\n        if (stream.peekString(0, 3) == 'ID3') {\n            stream = AV.Stream.fromBuffer(stream.peekBuffer(0, 10));\n            stream.advance(3); // 'ID3'\n\n            var major = stream.readUInt8();\n            var minor = stream.readUInt8();\n            var flags = stream.readUInt8();\n            var bytes = stream.readBuffer(4).data;\n            var length = (bytes[0] << 21) | (bytes[1] << 14) | (bytes[2] << 7) | bytes[3];\n\n            return { \n                version: '2.' + major + '.' + minor, \n                major: major, \n                minor: minor, \n                flags: flags, \n                length: length \n            };\n        }\n        \n        return null;\n    };\n    \n    const XING_OFFSETS = [[32, 17], [17, 9]];\n    this.prototype.parseDuration = function(header) {\n        var stream = this.stream;\n        var frames;\n                \n        var offset = stream.offset;\n        if (!header || header.layer !== 3)\n            return false;\n        \n        // Check for Xing/Info tag\n        stream.advance(XING_OFFSETS[header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0][header.nchannels() === 1 ? 1 : 0]);\n        var tag = stream.readString(4);\n        if (tag === 'Xing' || tag === 'Info') {\n            var flags = stream.readUInt32();\n            if (flags & 1) \n                frames = stream.readUInt32();\n                \n            if (flags & 2)\n                var size = stream.readUInt32();\n                \n            if (flags & 4 && frames && size) {\n                for (var i = 0; i < 100; i++) {\n                    var b = stream.readUInt8();\n                    var pos = b / 256 * size | 0;\n                    var time = i / 100 * (frames * header.nbsamples() * 32) | 0;\n                    this.addSeekPoint(pos, time);\n                }\n            }\n                \n            if (flags & 8)\n                stream.advance(4);\n                \n        } else {\n            // Check for VBRI tag (always 32 bytes after end of mpegaudio header)\n            stream.seek(offset + 4 + 32);\n            tag = stream.readString(4);\n            if (tag == 'VBRI' && stream.readUInt16() === 1) { // Check tag version\n                stream.advance(4); // skip delay and quality\n                stream.advance(4); // skip size\n                frames = stream.readUInt32();\n                \n                var entries = stream.readUInt16();\n                var scale = stream.readUInt16();\n                var bytesPerEntry = stream.readUInt16();\n                var framesPerEntry = stream.readUInt16();\n                var fn = 'readUInt' + (bytesPerEntry * 8);\n                \n                var pos = 0;\n                for (var i = 0; i < entries; i++) {\n                    this.addSeekPoint(pos, framesPerEntry * i);\n                    pos += stream[fn]();\n                }\n            }\n        }\n        \n        if (!frames)\n            return false;\n            \n        this.emit('duration', (frames * header.nbsamples() * 32) / header.samplerate * 1000 | 0);\n        return true;\n    };\n    \n    this.prototype.readChunk = function() {\n        var stream = this.stream;\n        \n        if (!this.sentInfo) {\n            // read id3 metadata if it exists\n            var id3header = MP3Demuxer.getID3v2Header(stream);\n            if (id3header) {\n                stream.advance(10);\n                \n                if (id3header.major > 2) {\n                    var id3 = new ID3v23Stream(id3header, stream);\n                } else {\n                    var id3 = new ID3v22Stream(id3header, stream);\n                }\n                \n                this.emit('metadata', id3.read());\n            }\n            \n            // read the header of the first audio frame\n            var off = stream.offset;\n            var s = new MP3Stream(new AV.Bitstream(stream));\n            \n            var header = MP3FrameHeader.decode(s);\n            if (!header)\n                return this.emit('error', 'Could not find first frame.');\n            \n            this.emit('format', {\n                formatID: 'mp3',\n                sampleRate: header.samplerate,\n                channelsPerFrame: header.nchannels(),\n                bitrate: header.bitrate,\n                floatingPoint: true\n            });\n            \n            var sentDuration = this.parseDuration(header);\n            stream.advance(off - stream.offset);\n            \n            // if there were no Xing/VBRI tags, guesstimate the duration based on data size and bitrate\n            this.dataSize = 0;\n            if (!sentDuration) {\n                this.on('end', function() {\n                    this.emit('duration', this.dataSize * 8 / header.bitrate * 1000 | 0);\n                });\n            }\n            \n            this.sentInfo = true;\n        }\n        \n        while (stream.available(1)) {\n            var buffer = stream.readSingleBuffer(stream.remainingBytes());\n            this.dataSize += buffer.length;\n            this.emit('data', buffer);\n        }\n    };\n});\n\nmodule.exports = MP3Demuxer;\n",
+    "var MP3FrameHeader = require('./header');\nvar utils = require('./utils');\n\nfunction MP3Frame() {\n    this.header = null;                     // MPEG audio header\n    this.options = 0;                       // decoding options (from stream)\n    this.sbsample = utils.makeArray([2, 36, 32]); // synthesis subband filter samples\n    this.overlap = utils.makeArray([2, 32, 18]);  // Layer III block overlap data\n    this.decoders = [];\n}\n\n// included layer decoders are registered here\nMP3Frame.layers = [];\n\nMP3Frame.prototype.decode = function(stream) {\n    if (!this.header || !(this.header.flags & MP3FrameHeader.FLAGS.INCOMPLETE))\n        this.header = MP3FrameHeader.decode(stream);\n\n    this.header.flags &= ~MP3FrameHeader.FLAGS.INCOMPLETE;\n    \n    // make an instance of the decoder for this layer if needed\n    var decoder = this.decoders[this.header.layer - 1];\n    if (!decoder) {\n        var Layer = MP3Frame.layers[this.header.layer];\n        if (!Layer)\n            throw new Error(\"Layer \" + this.header.layer + \" is not supported.\");\n            \n        decoder = this.decoders[this.header.layer - 1] = new Layer();\n    }\n    \n    decoder.decode(stream, this);\n};\n\nmodule.exports = MP3Frame;\n",
+    "var AV = (window.AV);\n\nfunction MP3FrameHeader() {\n    this.layer          = 0; // audio layer (1, 2, or 3)\n    this.mode           = 0; // channel mode (see above)\n    this.mode_extension = 0; // additional mode info\n    this.emphasis       = 0; // de-emphasis to use (see above)\n\n    this.bitrate        = 0; // stream bitrate (bps)\n    this.samplerate     = 0; // sampling frequency (Hz)\n\n    this.crc_check      = 0; // frame CRC accumulator\n    this.crc_target     = 0; // final target CRC checksum\n\n    this.flags          = 0; // flags (see above)\n    this.private_bits   = 0; // private bits\n}\n\nconst BITRATES = [\n    // MPEG-1\n    [ 0,  32000,  64000,  96000, 128000, 160000, 192000, 224000,  // Layer I\n         256000, 288000, 320000, 352000, 384000, 416000, 448000 ],\n    [ 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  // Layer II\n         128000, 160000, 192000, 224000, 256000, 320000, 384000 ],\n    [ 0,  32000,  40000,  48000,  56000,  64000,  80000,  96000,  // Layer III\n         112000, 128000, 160000, 192000, 224000, 256000, 320000 ],\n\n    // MPEG-2 LSF\n    [ 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  // Layer I\n         128000, 144000, 160000, 176000, 192000, 224000, 256000 ],\n    [ 0,   8000,  16000,  24000,  32000,  40000,  48000,  56000,  // Layers\n          64000,  80000,  96000, 112000, 128000, 144000, 160000 ] // II & III\n];\n\nconst SAMPLERATES = [ \n    44100, 48000, 32000 \n];\n\nMP3FrameHeader.FLAGS = {\n    NPRIVATE_III: 0x0007,   // number of Layer III private bits\n    INCOMPLETE  : 0x0008,   // header but not data is decoded\n\n    PROTECTION  : 0x0010,   // frame has CRC protection\n    COPYRIGHT   : 0x0020,   // frame is copyright\n    ORIGINAL    : 0x0040,   // frame is original (else copy)\n    PADDING     : 0x0080,   // frame has additional slot\n\n    I_STEREO    : 0x0100,   // uses intensity joint stereo\n    MS_STEREO   : 0x0200,   // uses middle/side joint stereo\n    FREEFORMAT  : 0x0400,   // uses free format bitrate\n\n    LSF_EXT     : 0x1000,   // lower sampling freq. extension\n    MC_EXT      : 0x2000,   // multichannel audio extension\n    MPEG_2_5_EXT: 0x4000    // MPEG 2.5 (unofficial) extension\n};\n\nconst PRIVATE = {\n    HEADER  : 0x0100, // header private bit\n    III     : 0x001f  // Layer III private bits (up to 5)\n};\n\nMP3FrameHeader.MODE = {\n    SINGLE_CHANNEL: 0, // single channel\n    DUAL_CHANNEL  : 1, // dual channel\n    JOINT_STEREO  : 2, // joint (MS/intensity) stereo\n    STEREO        : 3  // normal LR stereo\n};\n\nconst EMPHASIS = {\n    NONE      : 0, // no emphasis\n    _50_15_US : 1, // 50/15 microseconds emphasis\n    CCITT_J_17: 3, // CCITT J.17 emphasis\n    RESERVED  : 2  // unknown emphasis\n};\n\nMP3FrameHeader.BUFFER_GUARD = 8;\nMP3FrameHeader.BUFFER_MDLEN = (511 + 2048 + MP3FrameHeader.BUFFER_GUARD);\n\nMP3FrameHeader.prototype.copy = function() {\n    var clone = new MP3FrameHeader();\n    var keys = Object.keys(this);\n    \n    for (var key in keys) {\n        clone[key] = this[key];\n    }\n    \n    return clone;\n}\n\nMP3FrameHeader.prototype.nchannels = function () {\n    return this.mode === 0 ? 1 : 2;\n};\n\nMP3FrameHeader.prototype.nbsamples = function() {\n    return (this.layer === 1 ? 12 : ((this.layer === 3 && (this.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 18 : 36));\n};\n\nMP3FrameHeader.prototype.framesize = function() {\n    if (this.bitrate === 0)\n        return null;\n    \n    var padding = (this.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0);\n    switch (this.layer) {\n        case 1:\n            var size = (this.bitrate * 12) / this.samplerate | 0;\n            return (size + padding) * 4;\n            \n        case 2:\n            var size = (this.bitrate * 144) / this.samplerate | 0;\n            return size + padding;\n            \n        case 3:\n        default:\n            var lsf = this.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 1 : 0;\n            var size = (this.bitrate * 144) / (this.samplerate << lsf) | 0;\n            return size + padding;\n    }\n};\n\nMP3FrameHeader.prototype.decode = function(stream) {\n    this.flags        = 0;\n    this.private_bits = 0;\n    \n    // syncword \n    stream.advance(11);\n\n    // MPEG 2.5 indicator (really part of syncword) \n    if (stream.read(1) === 0)\n        this.flags |= MP3FrameHeader.FLAGS.MPEG_2_5_EXT;\n\n    // ID \n    if (stream.read(1) === 0) {\n        this.flags |= MP3FrameHeader.FLAGS.LSF_EXT;\n    } else if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT) {\n        throw new AV.UnderflowError(); // LOSTSYNC\n    }\n\n    // layer \n    this.layer = 4 - stream.read(2);\n\n    if (this.layer === 4)\n        throw new Error('Invalid layer');\n\n    // protection_bit \n    if (stream.read(1) === 0)\n        this.flags |= MP3FrameHeader.FLAGS.PROTECTION;\n\n    // bitrate_index \n    var index = stream.read(4);\n    if (index === 15)\n        throw new Error('Invalid bitrate');\n\n    if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) {\n        this.bitrate = BITRATES[3 + (this.layer >> 1)][index];\n    } else {\n        this.bitrate = BITRATES[this.layer - 1][index];\n    }\n\n    // sampling_frequency \n    index = stream.read(2);\n    if (index === 3)\n        throw new Error('Invalid sampling frequency');\n\n    this.samplerate = SAMPLERATES[index];\n\n    if (this.flags & MP3FrameHeader.FLAGS.LSF_EXT) {\n        this.samplerate /= 2;\n\n        if (this.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)\n            this.samplerate /= 2;\n    }\n\n    // padding_bit \n    if (stream.read(1))\n        this.flags |= MP3FrameHeader.FLAGS.PADDING;\n\n    // private_bit \n    if (stream.read(1))\n        this.private_bits |= PRIVATE.HEADER;\n\n    // mode \n    this.mode = 3 - stream.read(2);\n\n    // mode_extension \n    this.mode_extension = stream.read(2);\n\n    // copyright \n    if (stream.read(1))\n        this.flags |= MP3FrameHeader.FLAGS.COPYRIGHT;\n\n    // original/copy \n    if (stream.read(1))\n        this.flags |= MP3FrameHeader.FLAGS.ORIGINAL;\n\n    // emphasis \n    this.emphasis = stream.read(2);\n\n    // crc_check \n    if (this.flags & MP3FrameHeader.FLAGS.PROTECTION)\n        this.crc_target = stream.read(16);\n};\n\nMP3FrameHeader.decode = function(stream) {\n    // synchronize\n    var ptr = stream.next_frame;\n    var syncing = true;\n    var header = null;\n    \n    while (syncing) {\n        syncing = false;\n        \n        if (stream.sync) {\n            if (!stream.available(MP3FrameHeader.BUFFER_GUARD)) {\n                stream.next_frame = ptr;\n                throw new AV.UnderflowError();\n            } else if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) {\n                // mark point where frame sync word was expected\n                stream.this_frame = ptr;\n                stream.next_frame = ptr + 1;\n                throw new AV.UnderflowError(); // LOSTSYNC\n            }\n        } else {\n            stream.seek(ptr * 8);\n            if (!stream.doSync())\n                throw new AV.UnderflowError();\n                \n            ptr = stream.nextByte();\n        }\n        \n        // begin processing\n        stream.this_frame = ptr;\n        stream.next_frame = ptr + 1; // possibly bogus sync word\n        \n        stream.seek(stream.this_frame * 8);\n        \n        header = new MP3FrameHeader();\n        header.decode(stream);\n        \n        if (header.bitrate === 0) {\n            if (stream.freerate === 0 || !stream.sync || (header.layer === 3 && stream.freerate > 640000))\n                MP3FrameHeader.free_bitrate(stream, header);\n            \n            header.bitrate = stream.freerate;\n            header.flags |= MP3FrameHeader.FLAGS.FREEFORMAT;\n        }\n        \n        // calculate beginning of next frame\n        var pad_slot = (header.flags & MP3FrameHeader.FLAGS.PADDING) ? 1 : 0;\n        \n        if (header.layer === 1) {\n            var N = (((12 * header.bitrate / header.samplerate) << 0) + pad_slot) * 4;\n        } else {\n            var slots_per_frame = (header.layer === 3 && (header.flags & MP3FrameHeader.FLAGS.LSF_EXT)) ? 72 : 144;\n            var N = ((slots_per_frame * header.bitrate / header.samplerate) << 0) + pad_slot;\n        }\n        \n        // verify there is enough data left in buffer to decode this frame\n        if (!stream.available(N + MP3FrameHeader.BUFFER_GUARD)) {\n            stream.next_frame = stream.this_frame;\n            throw new AV.UnderflowError();\n        }\n        \n        stream.next_frame = stream.this_frame + N;\n        \n        if (!stream.sync) {\n            // check that a valid frame header follows this frame\n            ptr = stream.next_frame;\n            \n            if (!(stream.getU8(ptr) === 0xff && (stream.getU8(ptr + 1) & 0xe0) === 0xe0)) {\n                ptr = stream.next_frame = stream.this_frame + 1;\n\n                // emulating 'goto sync'\n                syncing = true;\n                continue;\n            }\n            \n            stream.sync = true;\n        }\n    }\n    \n    header.flags |= MP3FrameHeader.FLAGS.INCOMPLETE;\n    return header;\n};\n\nMP3FrameHeader.free_bitrate = function(stream, header) {\n    var pad_slot = header.flags & MP3FrameHeader.FLAGS.PADDING ? 1 : 0,\n        slots_per_frame = header.layer === 3 && header.flags & MP3FrameHeader.FLAGS.LSF_EXT ? 72 : 144;\n    \n    var start = stream.offset();\n    var rate = 0;\n        \n    while (stream.doSync()) {\n        var peek_header = header.copy();\n        var peek_stream = stream.copy();\n        \n        if (peek_header.decode(peek_stream) && peek_header.layer === header.layer && peek_header.samplerate === header.samplerate) {\n            var N = stream.nextByte() - stream.this_frame;\n            \n            if (header.layer === 1) {\n                rate = header.samplerate * (N - 4 * pad_slot + 4) / 48 / 1000 | 0;\n            } else {\n                rate = header.samplerate * (N - pad_slot + 1) / slots_per_frame / 1000 | 0;\n            }\n            \n            if (rate >= 8)\n                break;\n        }\n        \n        stream.advance(8);\n    }\n    \n    stream.seek(start);\n    \n    if (rate < 8 || (header.layer === 3 && rate > 640))\n        throw new AV.UnderflowError(); // LOSTSYNC\n    \n    stream.freerate = rate * 1000;\n};\n\nmodule.exports = MP3FrameHeader;\n",
+    "/*\n * These are the Huffman code words for Layer III.\n * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.\n *\n * These tables support decoding up to 4 Huffman code bits at a time.\n */\n\nvar PTR = function(offs, bits) {\n    return {\n        final: 0,\n        ptr: {\n            bits:   bits,\n            offset: offs\n        }\n    };\n};\n\nvar huffquad_V = function (v, w, x, y, hlen) {\n    return {\n        final: 1,\n        value: {\n            v: v,\n            w: w,\n            x: x,\n            y: y,\n            hlen: hlen\n        }\n    };\n};\n\nconst hufftabA = [\n  /* 0000 */ PTR(16, 2),\n  /* 0001 */ PTR(20, 2),\n  /* 0010 */ PTR(24, 1),\n  /* 0011 */ PTR(26, 1),\n  /* 0100 */ huffquad_V(0, 0, 1, 0, 4),\n  /* 0101 */ huffquad_V(0, 0, 0, 1, 4),\n  /* 0110 */ huffquad_V(0, 1, 0, 0, 4),\n  /* 0111 */ huffquad_V(1, 0, 0, 0, 4),\n  /* 1000 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1001 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1010 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1011 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1100 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1101 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1110 */ huffquad_V(0, 0, 0, 0, 1),\n  /* 1111 */ huffquad_V(0, 0, 0, 0, 1),\n\n  /* 0000 ... */\n  /* 00   */ huffquad_V(1, 0, 1, 1, 2),\t/* 16 */\n  /* 01   */ huffquad_V(1, 1, 1, 1, 2),\n  /* 10   */ huffquad_V(1, 1, 0, 1, 2),\n  /* 11   */ huffquad_V(1, 1, 1, 0, 2),\n\n  /* 0001 ... */\n  /* 00   */ huffquad_V(0, 1, 1, 1, 2),\t/* 20 */\n  /* 01   */ huffquad_V(0, 1, 0, 1, 2),\n  /* 10   */ huffquad_V(1, 0, 0, 1, 1),\n  /* 11   */ huffquad_V(1, 0, 0, 1, 1),\n\n  /* 0010 ... */\n  /* 0    */ huffquad_V(0, 1, 1, 0, 1),\t/* 24 */\n  /* 1    */ huffquad_V(0, 0, 1, 1, 1),\n\n  /* 0011 ... */\n  /* 0    */ huffquad_V(1, 0, 1, 0, 1),\t/* 26 */\n  /* 1    */ huffquad_V(1, 1, 0, 0, 1)\n];\n\nconst hufftabB = [\n  /* 0000 */ huffquad_V(1, 1, 1, 1, 4),\n  /* 0001 */ huffquad_V(1, 1, 1, 0, 4),\n  /* 0010 */ huffquad_V(1, 1, 0, 1, 4),\n  /* 0011 */ huffquad_V(1, 1, 0, 0, 4),\n  /* 0100 */ huffquad_V(1, 0, 1, 1, 4),\n  /* 0101 */ huffquad_V(1, 0, 1, 0, 4),\n  /* 0110 */ huffquad_V(1, 0, 0, 1, 4),\n  /* 0111 */ huffquad_V(1, 0, 0, 0, 4),\n  /* 1000 */ huffquad_V(0, 1, 1, 1, 4),\n  /* 1001 */ huffquad_V(0, 1, 1, 0, 4),\n  /* 1010 */ huffquad_V(0, 1, 0, 1, 4),\n  /* 1011 */ huffquad_V(0, 1, 0, 0, 4),\n  /* 1100 */ huffquad_V(0, 0, 1, 1, 4),\n  /* 1101 */ huffquad_V(0, 0, 1, 0, 4),\n  /* 1110 */ huffquad_V(0, 0, 0, 1, 4),\n  /* 1111 */ huffquad_V(0, 0, 0, 0, 4)\n];\n\nvar V = function (x, y, hlen) {\n    return {\n        final: 1,\n        value: {\n            x: x,\n            y: y,\n            hlen: hlen\n        }\n    };\n};\n\nconst hufftab0 = [\n  /*      */ V(0, 0, 0)\n];\n\nconst hufftab1 = [\n  /* 000  */ V(1, 1, 3),\n  /* 001  */ V(0, 1, 3),\n  /* 010  */ V(1, 0, 2),\n  /* 011  */ V(1, 0, 2),\n  /* 100  */ V(0, 0, 1),\n  /* 101  */ V(0, 0, 1),\n  /* 110  */ V(0, 0, 1),\n  /* 111  */ V(0, 0, 1)\n];\n\nconst hufftab2 = [\n  /* 000  */ PTR(8, 3),\n  /* 001  */ V(1, 1, 3),\n  /* 010  */ V(0, 1, 3),\n  /* 011  */ V(1, 0, 3),\n  /* 100  */ V(0, 0, 1),\n  /* 101  */ V(0, 0, 1),\n  /* 110  */ V(0, 0, 1),\n  /* 111  */ V(0, 0, 1),\n\n  /* 000 ... */\n  /* 000  */ V(2, 2, 3),\t/* 8 */\n  /* 001  */ V(0, 2, 3),\n  /* 010  */ V(1, 2, 2),\n  /* 011  */ V(1, 2, 2),\n  /* 100  */ V(2, 1, 2),\n  /* 101  */ V(2, 1, 2),\n  /* 110  */ V(2, 0, 2),\n  /* 111  */ V(2, 0, 2)\n];\n\nconst hufftab3 = [\n  /* 000  */ PTR(8, 3),\n  /* 001  */ V(1, 0, 3),\n  /* 010  */ V(1, 1, 2),\n  /* 011  */ V(1, 1, 2),\n  /* 100  */ V(0, 1, 2),\n  /* 101  */ V(0, 1, 2),\n  /* 110  */ V(0, 0, 2),\n  /* 111  */ V(0, 0, 2),\n\n  /* 000 ... */\n  /* 000  */ V(2, 2, 3),\t/* 8 */\n  /* 001  */ V(0, 2, 3),\n  /* 010  */ V(1, 2, 2),\n  /* 011  */ V(1, 2, 2),\n  /* 100  */ V(2, 1, 2),\n  /* 101  */ V(2, 1, 2),\n  /* 110  */ V(2, 0, 2),\n  /* 111  */ V(2, 0, 2)\n];\n\nconst hufftab5 = [\n  /* 000  */ PTR(8, 4),\n  /* 001  */ V(1, 1, 3),\n  /* 010  */ V(0, 1, 3),\n  /* 011  */ V(1, 0, 3),\n  /* 100  */ V(0, 0, 1),\n  /* 101  */ V(0, 0, 1),\n  /* 110  */ V(0, 0, 1),\n  /* 111  */ V(0, 0, 1),\n\n  /* 000 ... */\n  /* 0000 */ PTR(24, 1),\t/* 8 */\n  /* 0001 */ V(3, 2, 4),\n  /* 0010 */ V(3, 1, 3),\n  /* 0011 */ V(3, 1, 3),\n  /* 0100 */ V(1, 3, 4),\n  /* 0101 */ V(0, 3, 4),\n  /* 0110 */ V(3, 0, 4),\n  /* 0111 */ V(2, 2, 4),\n  /* 1000 */ V(1, 2, 3),\n  /* 1001 */ V(1, 2, 3),\n  /* 1010 */ V(2, 1, 3),\n  /* 1011 */ V(2, 1, 3),\n  /* 1100 */ V(0, 2, 3),\n  /* 1101 */ V(0, 2, 3),\n  /* 1110 */ V(2, 0, 3),\n  /* 1111 */ V(2, 0, 3),\n\n  /* 000 0000 ... */\n  /* 0    */ V(3, 3, 1),\t/* 24 */\n  /* 1    */ V(2, 3, 1)\n];\n\nconst hufftab6 = [\n  /* 0000 */ PTR(16, 3),\n  /* 0001 */ PTR(24, 1),\n  /* 0010 */ PTR(26, 1),\n  /* 0011 */ V(1, 2, 4),\n  /* 0100 */ V(2, 1, 4),\n  /* 0101 */ V(2, 0, 4),\n  /* 0110 */ V(0, 1, 3),\n  /* 0111 */ V(0, 1, 3),\n  /* 1000 */ V(1, 1, 2),\n  /* 1001 */ V(1, 1, 2),\n  /* 1010 */ V(1, 1, 2),\n  /* 1011 */ V(1, 1, 2),\n  /* 1100 */ V(1, 0, 3),\n  /* 1101 */ V(1, 0, 3),\n  /* 1110 */ V(0, 0, 3),\n  /* 1111 */ V(0, 0, 3),\n\n  /* 0000 ... */\n  /* 000  */ V(3, 3, 3),\t/* 16 */\n  /* 001  */ V(0, 3, 3),\n  /* 010  */ V(2, 3, 2),\n  /* 011  */ V(2, 3, 2),\n  /* 100  */ V(3, 2, 2),\n  /* 101  */ V(3, 2, 2),\n  /* 110  */ V(3, 0, 2),\n  /* 111  */ V(3, 0, 2),\n\n  /* 0001 ... */\n  /* 0    */ V(1, 3, 1),\t/* 24 */\n  /* 1    */ V(3, 1, 1),\n\n  /* 0010 ... */\n  /* 0    */ V(2, 2, 1),\t/* 26 */\n  /* 1    */ V(0, 2, 1)\n];\n\nconst hufftab7 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 2),\n  /* 0011 */ V(1, 1, 4),\n  /* 0100 */ V(0, 1, 3),\n  /* 0101 */ V(0, 1, 3),\n  /* 0110 */ V(1, 0, 3),\n  /* 0111 */ V(1, 0, 3),\n  /* 1000 */ V(0, 0, 1),\n  /* 1001 */ V(0, 0, 1),\n  /* 1010 */ V(0, 0, 1),\n  /* 1011 */ V(0, 0, 1),\n  /* 1100 */ V(0, 0, 1),\n  /* 1101 */ V(0, 0, 1),\n  /* 1110 */ V(0, 0, 1),\n  /* 1111 */ V(0, 0, 1),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(52, 2),\t/* 16 */\n  /* 0001 */ PTR(56, 1),\n  /* 0010 */ PTR(58, 1),\n  /* 0011 */ V(1, 5, 4),\n  /* 0100 */ V(5, 1, 4),\n  /* 0101 */ PTR(60, 1),\n  /* 0110 */ V(5, 0, 4),\n  /* 0111 */ PTR(62, 1),\n  /* 1000 */ V(2, 4, 4),\n  /* 1001 */ V(4, 2, 4),\n  /* 1010 */ V(1, 4, 3),\n  /* 1011 */ V(1, 4, 3),\n  /* 1100 */ V(4, 1, 3),\n  /* 1101 */ V(4, 1, 3),\n  /* 1110 */ V(4, 0, 3),\n  /* 1111 */ V(4, 0, 3),\n\n  /* 0001 ... */\n  /* 0000 */ V(0, 4, 4),\t/* 32 */\n  /* 0001 */ V(2, 3, 4),\n  /* 0010 */ V(3, 2, 4),\n  /* 0011 */ V(0, 3, 4),\n  /* 0100 */ V(1, 3, 3),\n  /* 0101 */ V(1, 3, 3),\n  /* 0110 */ V(3, 1, 3),\n  /* 0111 */ V(3, 1, 3),\n  /* 1000 */ V(3, 0, 3),\n  /* 1001 */ V(3, 0, 3),\n  /* 1010 */ V(2, 2, 3),\n  /* 1011 */ V(2, 2, 3),\n  /* 1100 */ V(1, 2, 2),\n  /* 1101 */ V(1, 2, 2),\n  /* 1110 */ V(1, 2, 2),\n  /* 1111 */ V(1, 2, 2),\n\n  /* 0010 ... */\n  /* 00   */ V(2, 1, 1),\t/* 48 */\n  /* 01   */ V(2, 1, 1),\n  /* 10   */ V(0, 2, 2),\n  /* 11   */ V(2, 0, 2),\n\n  /* 0000 0000 ... */\n  /* 00   */ V(5, 5, 2),\t/* 52 */\n  /* 01   */ V(4, 5, 2),\n  /* 10   */ V(5, 4, 2),\n  /* 11   */ V(5, 3, 2),\n\n  /* 0000 0001 ... */\n  /* 0    */ V(3, 5, 1),\t/* 56 */\n  /* 1    */ V(4, 4, 1),\n\n  /* 0000 0010 ... */\n  /* 0    */ V(2, 5, 1),\t/* 58 */\n  /* 1    */ V(5, 2, 1),\n\n  /* 0000 0101 ... */\n  /* 0    */ V(0, 5, 1),\t/* 60 */\n  /* 1    */ V(3, 4, 1),\n\n  /* 0000 0111 ... */\n  /* 0    */ V(4, 3, 1),\t/* 62 */\n  /* 1    */ V(3, 3, 1)\n];\n\nconst hufftab8 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ V(1, 2, 4),\n  /* 0011 */ V(2, 1, 4),\n  /* 0100 */ V(1, 1, 2),\n  /* 0101 */ V(1, 1, 2),\n  /* 0110 */ V(1, 1, 2),\n  /* 0111 */ V(1, 1, 2),\n  /* 1000 */ V(0, 1, 3),\n  /* 1001 */ V(0, 1, 3),\n  /* 1010 */ V(1, 0, 3),\n  /* 1011 */ V(1, 0, 3),\n  /* 1100 */ V(0, 0, 2),\n  /* 1101 */ V(0, 0, 2),\n  /* 1110 */ V(0, 0, 2),\n  /* 1111 */ V(0, 0, 2),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(48, 3),\t/* 16 */\n  /* 0001 */ PTR(56, 2),\n  /* 0010 */ PTR(60, 1),\n  /* 0011 */ V(1, 5, 4),\n  /* 0100 */ V(5, 1, 4),\n  /* 0101 */ PTR(62, 1),\n  /* 0110 */ PTR(64, 1),\n  /* 0111 */ V(2, 4, 4),\n  /* 1000 */ V(4, 2, 4),\n  /* 1001 */ V(1, 4, 4),\n  /* 1010 */ V(4, 1, 3),\n  /* 1011 */ V(4, 1, 3),\n  /* 1100 */ V(0, 4, 4),\n  /* 1101 */ V(4, 0, 4),\n  /* 1110 */ V(2, 3, 4),\n  /* 1111 */ V(3, 2, 4),\n\n  /* 0001 ... */\n  /* 0000 */ V(1, 3, 4),\t/* 32 */\n  /* 0001 */ V(3, 1, 4),\n  /* 0010 */ V(0, 3, 4),\n  /* 0011 */ V(3, 0, 4),\n  /* 0100 */ V(2, 2, 2),\n  /* 0101 */ V(2, 2, 2),\n  /* 0110 */ V(2, 2, 2),\n  /* 0111 */ V(2, 2, 2),\n  /* 1000 */ V(0, 2, 2),\n  /* 1001 */ V(0, 2, 2),\n  /* 1010 */ V(0, 2, 2),\n  /* 1011 */ V(0, 2, 2),\n  /* 1100 */ V(2, 0, 2),\n  /* 1101 */ V(2, 0, 2),\n  /* 1110 */ V(2, 0, 2),\n  /* 1111 */ V(2, 0, 2),\n\n  /* 0000 0000 ... */\n  /* 000  */ V(5, 5, 3),\t/* 48 */\n  /* 001  */ V(5, 4, 3),\n  /* 010  */ V(4, 5, 2),\n  /* 011  */ V(4, 5, 2),\n  /* 100  */ V(5, 3, 1),\n  /* 101  */ V(5, 3, 1),\n  /* 110  */ V(5, 3, 1),\n  /* 111  */ V(5, 3, 1),\n\n  /* 0000 0001 ... */\n  /* 00   */ V(3, 5, 2),\t/* 56 */\n  /* 01   */ V(4, 4, 2),\n  /* 10   */ V(2, 5, 1),\n  /* 11   */ V(2, 5, 1),\n\n  /* 0000 0010 ... */\n  /* 0    */ V(5, 2, 1),\t/* 60 */\n  /* 1    */ V(0, 5, 1),\n\n  /* 0000 0101 ... */\n  /* 0    */ V(3, 4, 1),\t/* 62 */\n  /* 1    */ V(4, 3, 1),\n\n  /* 0000 0110 ... */\n  /* 0    */ V(5, 0, 1),\t/* 64 */\n  /* 1    */ V(3, 3, 1)\n];\n\nconst hufftab9 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 3),\n  /* 0010 */ PTR(40, 2),\n  /* 0011 */ PTR(44, 2),\n  /* 0100 */ PTR(48, 1),\n  /* 0101 */ V(1, 2, 4),\n  /* 0110 */ V(2, 1, 4),\n  /* 0111 */ V(2, 0, 4),\n  /* 1000 */ V(1, 1, 3),\n  /* 1001 */ V(1, 1, 3),\n  /* 1010 */ V(0, 1, 3),\n  /* 1011 */ V(0, 1, 3),\n  /* 1100 */ V(1, 0, 3),\n  /* 1101 */ V(1, 0, 3),\n  /* 1110 */ V(0, 0, 3),\n  /* 1111 */ V(0, 0, 3),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(50, 1),\t/* 16 */\n  /* 0001 */ V(3, 5, 4),\n  /* 0010 */ V(5, 3, 4),\n  /* 0011 */ PTR(52, 1),\n  /* 0100 */ V(4, 4, 4),\n  /* 0101 */ V(2, 5, 4),\n  /* 0110 */ V(5, 2, 4),\n  /* 0111 */ V(1, 5, 4),\n  /* 1000 */ V(5, 1, 3),\n  /* 1001 */ V(5, 1, 3),\n  /* 1010 */ V(3, 4, 3),\n  /* 1011 */ V(3, 4, 3),\n  /* 1100 */ V(4, 3, 3),\n  /* 1101 */ V(4, 3, 3),\n  /* 1110 */ V(5, 0, 4),\n  /* 1111 */ V(0, 4, 4),\n\n  /* 0001 ... */\n  /* 000  */ V(2, 4, 3),\t/* 32 */\n  /* 001  */ V(4, 2, 3),\n  /* 010  */ V(3, 3, 3),\n  /* 011  */ V(4, 0, 3),\n  /* 100  */ V(1, 4, 2),\n  /* 101  */ V(1, 4, 2),\n  /* 110  */ V(4, 1, 2),\n  /* 111  */ V(4, 1, 2),\n\n  /* 0010 ... */\n  /* 00   */ V(2, 3, 2),\t/* 40 */\n  /* 01   */ V(3, 2, 2),\n  /* 10   */ V(1, 3, 1),\n  /* 11   */ V(1, 3, 1),\n\n  /* 0011 ... */\n  /* 00   */ V(3, 1, 1),\t/* 44 */\n  /* 01   */ V(3, 1, 1),\n  /* 10   */ V(0, 3, 2),\n  /* 11   */ V(3, 0, 2),\n\n  /* 0100 ... */\n  /* 0    */ V(2, 2, 1),\t/* 48 */\n  /* 1    */ V(0, 2, 1),\n\n  /* 0000 0000 ... */\n  /* 0    */ V(5, 5, 1),\t/* 50 */\n  /* 1    */ V(4, 5, 1),\n\n  /* 0000 0011 ... */\n  /* 0    */ V(5, 4, 1),\t/* 52 */\n  /* 1    */ V(0, 5, 1)\n];\n\nconst hufftab10 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 2),\n  /* 0011 */ V(1, 1, 4),\n  /* 0100 */ V(0, 1, 3),\n  /* 0101 */ V(0, 1, 3),\n  /* 0110 */ V(1, 0, 3),\n  /* 0111 */ V(1, 0, 3),\n  /* 1000 */ V(0, 0, 1),\n  /* 1001 */ V(0, 0, 1),\n  /* 1010 */ V(0, 0, 1),\n  /* 1011 */ V(0, 0, 1),\n  /* 1100 */ V(0, 0, 1),\n  /* 1101 */ V(0, 0, 1),\n  /* 1110 */ V(0, 0, 1),\n  /* 1111 */ V(0, 0, 1),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(52, 3),\t/* 16 */\n  /* 0001 */ PTR(60, 2),\n  /* 0010 */ PTR(64, 3),\n  /* 0011 */ PTR(72, 1),\n  /* 0100 */ PTR(74, 2),\n  /* 0101 */ PTR(78, 2),\n  /* 0110 */ PTR(82, 2),\n  /* 0111 */ V(1, 7, 4),\n  /* 1000 */ V(7, 1, 4),\n  /* 1001 */ PTR(86, 1),\n  /* 1010 */ PTR(88, 2),\n  /* 1011 */ PTR(92, 2),\n  /* 1100 */ V(1, 6, 4),\n  /* 1101 */ V(6, 1, 4),\n  /* 1110 */ V(6, 0, 4),\n  /* 1111 */ PTR(96, 1),\n\n  /* 0001 ... */\n  /* 0000 */ PTR(98, 1),\t/* 32 */\n  /* 0001 */ PTR(100, 1),\n  /* 0010 */ V(1, 4, 4),\n  /* 0011 */ V(4, 1, 4),\n  /* 0100 */ V(4, 0, 4),\n  /* 0101 */ V(2, 3, 4),\n  /* 0110 */ V(3, 2, 4),\n  /* 0111 */ V(0, 3, 4),\n  /* 1000 */ V(1, 3, 3),\n  /* 1001 */ V(1, 3, 3),\n  /* 1010 */ V(3, 1, 3),\n  /* 1011 */ V(3, 1, 3),\n  /* 1100 */ V(3, 0, 3),\n  /* 1101 */ V(3, 0, 3),\n  /* 1110 */ V(2, 2, 3),\n  /* 1111 */ V(2, 2, 3),\n\n  /* 0010 ... */\n  /* 00   */ V(1, 2, 2),\t/* 48 */\n  /* 01   */ V(2, 1, 2),\n  /* 10   */ V(0, 2, 2),\n  /* 11   */ V(2, 0, 2),\n\n  /* 0000 0000 ... */\n  /* 000  */ V(7, 7, 3),\t/* 52 */\n  /* 001  */ V(6, 7, 3),\n  /* 010  */ V(7, 6, 3),\n  /* 011  */ V(5, 7, 3),\n  /* 100  */ V(7, 5, 3),\n  /* 101  */ V(6, 6, 3),\n  /* 110  */ V(4, 7, 2),\n  /* 111  */ V(4, 7, 2),\n\n  /* 0000 0001 ... */\n  /* 00   */ V(7, 4, 2),\t/* 60 */\n  /* 01   */ V(5, 6, 2),\n  /* 10   */ V(6, 5, 2),\n  /* 11   */ V(3, 7, 2),\n\n  /* 0000 0010 ... */\n  /* 000  */ V(7, 3, 2),\t/* 64 */\n  /* 001  */ V(7, 3, 2),\n  /* 010  */ V(4, 6, 2),\n  /* 011  */ V(4, 6, 2),\n  /* 100  */ V(5, 5, 3),\n  /* 101  */ V(5, 4, 3),\n  /* 110  */ V(6, 3, 2),\n  /* 111  */ V(6, 3, 2),\n\n  /* 0000 0011 ... */\n  /* 0    */ V(2, 7, 1),\t/* 72 */\n  /* 1    */ V(7, 2, 1),\n\n  /* 0000 0100 ... */\n  /* 00   */ V(6, 4, 2),\t/* 74 */\n  /* 01   */ V(0, 7, 2),\n  /* 10   */ V(7, 0, 1),\n  /* 11   */ V(7, 0, 1),\n\n  /* 0000 0101 ... */\n  /* 00   */ V(6, 2, 1),\t/* 78 */\n  /* 01   */ V(6, 2, 1),\n  /* 10   */ V(4, 5, 2),\n  /* 11   */ V(3, 5, 2),\n\n  /* 0000 0110 ... */\n  /* 00   */ V(0, 6, 1),\t/* 82 */\n  /* 01   */ V(0, 6, 1),\n  /* 10   */ V(5, 3, 2),\n  /* 11   */ V(4, 4, 2),\n\n  /* 0000 1001 ... */\n  /* 0    */ V(3, 6, 1),\t/* 86 */\n  /* 1    */ V(2, 6, 1),\n\n  /* 0000 1010 ... */\n  /* 00   */ V(2, 5, 2),\t/* 88 */\n  /* 01   */ V(5, 2, 2),\n  /* 10   */ V(1, 5, 1),\n  /* 11   */ V(1, 5, 1),\n\n  /* 0000 1011 ... */\n  /* 00   */ V(5, 1, 1),\t/* 92 */\n  /* 01   */ V(5, 1, 1),\n  /* 10   */ V(3, 4, 2),\n  /* 11   */ V(4, 3, 2),\n\n  /* 0000 1111 ... */\n  /* 0    */ V(0, 5, 1),\t/* 96 */\n  /* 1    */ V(5, 0, 1),\n\n  /* 0001 0000 ... */\n  /* 0    */ V(2, 4, 1),\t/* 98 */\n  /* 1    */ V(4, 2, 1),\n\n  /* 0001 0001 ... */\n  /* 0    */ V(3, 3, 1),\t/* 100 */\n  /* 1    */ V(0, 4, 1)\n];\n\nconst hufftab11 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ PTR(64, 3),\n  /* 0100 */ V(1, 2, 4),\n  /* 0101 */ PTR(72, 1),\n  /* 0110 */ V(1, 1, 3),\n  /* 0111 */ V(1, 1, 3),\n  /* 1000 */ V(0, 1, 3),\n  /* 1001 */ V(0, 1, 3),\n  /* 1010 */ V(1, 0, 3),\n  /* 1011 */ V(1, 0, 3),\n  /* 1100 */ V(0, 0, 2),\n  /* 1101 */ V(0, 0, 2),\n  /* 1110 */ V(0, 0, 2),\n  /* 1111 */ V(0, 0, 2),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(74, 2),\t/* 16 */\n  /* 0001 */ PTR(78, 3),\n  /* 0010 */ PTR(86, 2),\n  /* 0011 */ PTR(90, 1),\n  /* 0100 */ PTR(92, 2),\n  /* 0101 */ V(2, 7, 4),\n  /* 0110 */ V(7, 2, 4),\n  /* 0111 */ PTR(96, 1),\n  /* 1000 */ V(7, 1, 3),\n  /* 1001 */ V(7, 1, 3),\n  /* 1010 */ V(1, 7, 4),\n  /* 1011 */ V(7, 0, 4),\n  /* 1100 */ V(3, 6, 4),\n  /* 1101 */ V(6, 3, 4),\n  /* 1110 */ V(6, 0, 4),\n  /* 1111 */ PTR(98, 1),\n\n  /* 0001 ... */\n  /* 0000 */ PTR(100, 1),\t/* 32 */\n  /* 0001 */ V(1, 5, 4),\n  /* 0010 */ V(6, 2, 3),\n  /* 0011 */ V(6, 2, 3),\n  /* 0100 */ V(2, 6, 4),\n  /* 0101 */ V(0, 6, 4),\n  /* 0110 */ V(1, 6, 3),\n  /* 0111 */ V(1, 6, 3),\n  /* 1000 */ V(6, 1, 3),\n  /* 1001 */ V(6, 1, 3),\n  /* 1010 */ V(5, 1, 4),\n  /* 1011 */ V(3, 4, 4),\n  /* 1100 */ V(5, 0, 4),\n  /* 1101 */ PTR(102, 1),\n  /* 1110 */ V(2, 4, 4),\n  /* 1111 */ V(4, 2, 4),\n\n  /* 0010 ... */\n  /* 0000 */ V(1, 4, 4),\t/* 48 */\n  /* 0001 */ V(4, 1, 4),\n  /* 0010 */ V(0, 4, 4),\n  /* 0011 */ V(4, 0, 4),\n  /* 0100 */ V(2, 3, 3),\n  /* 0101 */ V(2, 3, 3),\n  /* 0110 */ V(3, 2, 3),\n  /* 0111 */ V(3, 2, 3),\n  /* 1000 */ V(1, 3, 2),\n  /* 1001 */ V(1, 3, 2),\n  /* 1010 */ V(1, 3, 2),\n  /* 1011 */ V(1, 3, 2),\n  /* 1100 */ V(3, 1, 2),\n  /* 1101 */ V(3, 1, 2),\n  /* 1110 */ V(3, 1, 2),\n  /* 1111 */ V(3, 1, 2),\n\n  /* 0011 ... */\n  /* 000  */ V(0, 3, 3),\t/* 64 */\n  /* 001  */ V(3, 0, 3),\n  /* 010  */ V(2, 2, 2),\n  /* 011  */ V(2, 2, 2),\n  /* 100  */ V(2, 1, 1),\n  /* 101  */ V(2, 1, 1),\n  /* 110  */ V(2, 1, 1),\n  /* 111  */ V(2, 1, 1),\n\n  /* 0101 ... */\n  /* 0    */ V(0, 2, 1),\t/* 72 */\n  /* 1    */ V(2, 0, 1),\n\n  /* 0000 0000 ... */\n  /* 00   */ V(7, 7, 2),\t/* 74 */\n  /* 01   */ V(6, 7, 2),\n  /* 10   */ V(7, 6, 2),\n  /* 11   */ V(7, 5, 2),\n\n  /* 0000 0001 ... */\n  /* 000  */ V(6, 6, 2),\t/* 78 */\n  /* 001  */ V(6, 6, 2),\n  /* 010  */ V(4, 7, 2),\n  /* 011  */ V(4, 7, 2),\n  /* 100  */ V(7, 4, 2),\n  /* 101  */ V(7, 4, 2),\n  /* 110  */ V(5, 7, 3),\n  /* 111  */ V(5, 5, 3),\n\n  /* 0000 0010 ... */\n  /* 00   */ V(5, 6, 2),\t/* 86 */\n  /* 01   */ V(6, 5, 2),\n  /* 10   */ V(3, 7, 1),\n  /* 11   */ V(3, 7, 1),\n\n  /* 0000 0011 ... */\n  /* 0    */ V(7, 3, 1),\t/* 90 */\n  /* 1    */ V(4, 6, 1),\n\n  /* 0000 0100 ... */\n  /* 00   */ V(4, 5, 2),\t/* 92 */\n  /* 01   */ V(5, 4, 2),\n  /* 10   */ V(3, 5, 2),\n  /* 11   */ V(5, 3, 2),\n\n  /* 0000 0111 ... */\n  /* 0    */ V(6, 4, 1),\t/* 96 */\n  /* 1    */ V(0, 7, 1),\n\n  /* 0000 1111 ... */\n  /* 0    */ V(4, 4, 1),\t/* 98 */\n  /* 1    */ V(2, 5, 1),\n\n  /* 0001 0000 ... */\n  /* 0    */ V(5, 2, 1),\t/* 100 */\n  /* 1    */ V(0, 5, 1),\n\n  /* 0001 1101 ... */\n  /* 0    */ V(4, 3, 1),\t/* 102 */\n  /* 1    */ V(3, 3, 1)\n];\n\nconst hufftab12 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ PTR(64, 2),\n  /* 0100 */ PTR(68, 3),\n  /* 0101 */ PTR(76, 1),\n  /* 0110 */ V(1, 2, 4),\n  /* 0111 */ V(2, 1, 4),\n  /* 1000 */ PTR(78, 1),\n  /* 1001 */ V(0, 0, 4),\n  /* 1010 */ V(1, 1, 3),\n  /* 1011 */ V(1, 1, 3),\n  /* 1100 */ V(0, 1, 3),\n  /* 1101 */ V(0, 1, 3),\n  /* 1110 */ V(1, 0, 3),\n  /* 1111 */ V(1, 0, 3),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(80, 2),\t/* 16 */\n  /* 0001 */ PTR(84, 1),\n  /* 0010 */ PTR(86, 1),\n  /* 0011 */ PTR(88, 1),\n  /* 0100 */ V(5, 6, 4),\n  /* 0101 */ V(3, 7, 4),\n  /* 0110 */ PTR(90, 1),\n  /* 0111 */ V(2, 7, 4),\n  /* 1000 */ V(7, 2, 4),\n  /* 1001 */ V(4, 6, 4),\n  /* 1010 */ V(6, 4, 4),\n  /* 1011 */ V(1, 7, 4),\n  /* 1100 */ V(7, 1, 4),\n  /* 1101 */ PTR(92, 1),\n  /* 1110 */ V(3, 6, 4),\n  /* 1111 */ V(6, 3, 4),\n\n  /* 0001 ... */\n  /* 0000 */ V(4, 5, 4),\t/* 32 */\n  /* 0001 */ V(5, 4, 4),\n  /* 0010 */ V(4, 4, 4),\n  /* 0011 */ PTR(94, 1),\n  /* 0100 */ V(2, 6, 3),\n  /* 0101 */ V(2, 6, 3),\n  /* 0110 */ V(6, 2, 3),\n  /* 0111 */ V(6, 2, 3),\n  /* 1000 */ V(6, 1, 3),\n  /* 1001 */ V(6, 1, 3),\n  /* 1010 */ V(1, 6, 4),\n  /* 1011 */ V(6, 0, 4),\n  /* 1100 */ V(3, 5, 4),\n  /* 1101 */ V(5, 3, 4),\n  /* 1110 */ V(2, 5, 4),\n  /* 1111 */ V(5, 2, 4),\n\n  /* 0010 ... */\n  /* 0000 */ V(1, 5, 3),\t/* 48 */\n  /* 0001 */ V(1, 5, 3),\n  /* 0010 */ V(5, 1, 3),\n  /* 0011 */ V(5, 1, 3),\n  /* 0100 */ V(3, 4, 3),\n  /* 0101 */ V(3, 4, 3),\n  /* 0110 */ V(4, 3, 3),\n  /* 0111 */ V(4, 3, 3),\n  /* 1000 */ V(5, 0, 4),\n  /* 1001 */ V(0, 4, 4),\n  /* 1010 */ V(2, 4, 3),\n  /* 1011 */ V(2, 4, 3),\n  /* 1100 */ V(4, 2, 3),\n  /* 1101 */ V(4, 2, 3),\n  /* 1110 */ V(1, 4, 3),\n  /* 1111 */ V(1, 4, 3),\n\n  /* 0011 ... */\n  /* 00   */ V(3, 3, 2),\t/* 64 */\n  /* 01   */ V(4, 1, 2),\n  /* 10   */ V(2, 3, 2),\n  /* 11   */ V(3, 2, 2),\n\n  /* 0100 ... */\n  /* 000  */ V(4, 0, 3),\t/* 68 */\n  /* 001  */ V(0, 3, 3),\n  /* 010  */ V(3, 0, 2),\n  /* 011  */ V(3, 0, 2),\n  /* 100  */ V(1, 3, 1),\n  /* 101  */ V(1, 3, 1),\n  /* 110  */ V(1, 3, 1),\n  /* 111  */ V(1, 3, 1),\n\n  /* 0101 ... */\n  /* 0    */ V(3, 1, 1),\t/* 76 */\n  /* 1    */ V(2, 2, 1),\n\n  /* 1000 ... */\n  /* 0    */ V(0, 2, 1),\t/* 78 */\n  /* 1    */ V(2, 0, 1),\n\n  /* 0000 0000 ... */\n  /* 00   */ V(7, 7, 2),\t/* 80 */\n  /* 01   */ V(6, 7, 2),\n  /* 10   */ V(7, 6, 1),\n  /* 11   */ V(7, 6, 1),\n\n  /* 0000 0001 ... */\n  /* 0    */ V(5, 7, 1),\t/* 84 */\n  /* 1    */ V(7, 5, 1),\n\n  /* 0000 0010 ... */\n  /* 0    */ V(6, 6, 1),\t/* 86 */\n  /* 1    */ V(4, 7, 1),\n\n  /* 0000 0011 ... */\n  /* 0    */ V(7, 4, 1),\t/* 88 */\n  /* 1    */ V(6, 5, 1),\n\n  /* 0000 0110 ... */\n  /* 0    */ V(7, 3, 1),\t/* 90 */\n  /* 1    */ V(5, 5, 1),\n\n  /* 0000 1101 ... */\n  /* 0    */ V(0, 7, 1),\t/* 92 */\n  /* 1    */ V(7, 0, 1),\n\n  /* 0001 0011 ... */\n  /* 0    */ V(0, 6, 1),\t/* 94 */\n  /* 1    */ V(0, 5, 1)\n];\n\nconst hufftab13 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ PTR(64, 2),\n  /* 0100 */ V(1, 1, 4),\n  /* 0101 */ V(0, 1, 4),\n  /* 0110 */ V(1, 0, 3),\n  /* 0111 */ V(1, 0, 3),\n  /* 1000 */ V(0, 0, 1),\n  /* 1001 */ V(0, 0, 1),\n  /* 1010 */ V(0, 0, 1),\n  /* 1011 */ V(0, 0, 1),\n  /* 1100 */ V(0, 0, 1),\n  /* 1101 */ V(0, 0, 1),\n  /* 1110 */ V(0, 0, 1),\n  /* 1111 */ V(0, 0, 1),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(68, 4),\t/* 16 */\n  /* 0001 */ PTR(84, 4),\n  /* 0010 */ PTR(100, 4),\n  /* 0011 */ PTR(116, 4),\n  /* 0100 */ PTR(132, 4),\n  /* 0101 */ PTR(148, 4),\n  /* 0110 */ PTR(164, 3),\n  /* 0111 */ PTR(172, 3),\n  /* 1000 */ PTR(180, 3),\n  /* 1001 */ PTR(188, 3),\n  /* 1010 */ PTR(196, 3),\n  /* 1011 */ PTR(204, 3),\n  /* 1100 */ PTR(212, 1),\n  /* 1101 */ PTR(214, 2),\n  /* 1110 */ PTR(218, 3),\n  /* 1111 */ PTR(226, 1),\n\n  /* 0001 ... */\n  /* 0000 */ PTR(228, 2),\t/* 32 */\n  /* 0001 */ PTR(232, 2),\n  /* 0010 */ PTR(236, 2),\n  /* 0011 */ PTR(240, 2),\n  /* 0100 */ V(8, 1, 4),\n  /* 0101 */ PTR(244, 1),\n  /* 0110 */ PTR(246, 1),\n  /* 0111 */ PTR(248, 1),\n  /* 1000 */ PTR(250, 2),\n  /* 1001 */ PTR(254, 1),\n  /* 1010 */ V(1, 5, 4),\n  /* 1011 */ V(5, 1, 4),\n  /* 1100 */ PTR(256, 1),\n  /* 1101 */ PTR(258, 1),\n  /* 1110 */ PTR(260, 1),\n  /* 1111 */ V(1, 4, 4),\n\n  /* 0010 ... */\n  /* 0000 */ V(4, 1, 3),\t/* 48 */\n  /* 0001 */ V(4, 1, 3),\n  /* 0010 */ V(0, 4, 4),\n  /* 0011 */ V(4, 0, 4),\n  /* 0100 */ V(2, 3, 4),\n  /* 0101 */ V(3, 2, 4),\n  /* 0110 */ V(1, 3, 3),\n  /* 0111 */ V(1, 3, 3),\n  /* 1000 */ V(3, 1, 3),\n  /* 1001 */ V(3, 1, 3),\n  /* 1010 */ V(0, 3, 3),\n  /* 1011 */ V(0, 3, 3),\n  /* 1100 */ V(3, 0, 3),\n  /* 1101 */ V(3, 0, 3),\n  /* 1110 */ V(2, 2, 3),\n  /* 1111 */ V(2, 2, 3),\n\n  /* 0011 ... */\n  /* 00   */ V(1, 2, 2),\t/* 64 */\n  /* 01   */ V(2, 1, 2),\n  /* 10   */ V(0, 2, 2),\n  /* 11   */ V(2, 0, 2),\n\n  /* 0000 0000 ... */\n  /* 0000 */ PTR(262, 4),\t/* 68 */\n  /* 0001 */ PTR(278, 4),\n  /* 0010 */ PTR(294, 4),\n  /* 0011 */ PTR(310, 3),\n  /* 0100 */ PTR(318, 2),\n  /* 0101 */ PTR(322, 2),\n  /* 0110 */ PTR(326, 3),\n  /* 0111 */ PTR(334, 2),\n  /* 1000 */ PTR(338, 1),\n  /* 1001 */ PTR(340, 2),\n  /* 1010 */ PTR(344, 2),\n  /* 1011 */ PTR(348, 2),\n  /* 1100 */ PTR(352, 2),\n  /* 1101 */ PTR(356, 2),\n  /* 1110 */ V(1, 15, 4),\n  /* 1111 */ V(15, 1, 4),\n\n  /* 0000 0001 ... */\n  /* 0000 */ V(15, 0, 4),\t/* 84 */\n  /* 0001 */ PTR(360, 1),\n  /* 0010 */ PTR(362, 1),\n  /* 0011 */ PTR(364, 1),\n  /* 0100 */ V(14, 2, 4),\n  /* 0101 */ PTR(366, 1),\n  /* 0110 */ V(1, 14, 4),\n  /* 0111 */ V(14, 1, 4),\n  /* 1000 */ PTR(368, 1),\n  /* 1001 */ PTR(370, 1),\n  /* 1010 */ PTR(372, 1),\n  /* 1011 */ PTR(374, 1),\n  /* 1100 */ PTR(376, 1),\n  /* 1101 */ PTR(378, 1),\n  /* 1110 */ V(12, 6, 4),\n  /* 1111 */ V(3, 13, 4),\n\n  /* 0000 0010 ... */\n  /* 0000 */ PTR(380, 1),\t/* 100 */\n  /* 0001 */ V(2, 13, 4),\n  /* 0010 */ V(13, 2, 4),\n  /* 0011 */ V(1, 13, 4),\n  /* 0100 */ V(11, 7, 4),\n  /* 0101 */ PTR(382, 1),\n  /* 0110 */ PTR(384, 1),\n  /* 0111 */ V(12, 3, 4),\n  /* 1000 */ PTR(386, 1),\n  /* 1001 */ V(4, 11, 4),\n  /* 1010 */ V(13, 1, 3),\n  /* 1011 */ V(13, 1, 3),\n  /* 1100 */ V(0, 13, 4),\n  /* 1101 */ V(13, 0, 4),\n  /* 1110 */ V(8, 10, 4),\n  /* 1111 */ V(10, 8, 4),\n\n  /* 0000 0011 ... */\n  /* 0000 */ V(4, 12, 4),\t/* 116 */\n  /* 0001 */ V(12, 4, 4),\n  /* 0010 */ V(6, 11, 4),\n  /* 0011 */ V(11, 6, 4),\n  /* 0100 */ V(3, 12, 3),\n  /* 0101 */ V(3, 12, 3),\n  /* 0110 */ V(2, 12, 3),\n  /* 0111 */ V(2, 12, 3),\n  /* 1000 */ V(12, 2, 3),\n  /* 1001 */ V(12, 2, 3),\n  /* 1010 */ V(5, 11, 3),\n  /* 1011 */ V(5, 11, 3),\n  /* 1100 */ V(11, 5, 4),\n  /* 1101 */ V(8, 9, 4),\n  /* 1110 */ V(1, 12, 3),\n  /* 1111 */ V(1, 12, 3),\n\n  /* 0000 0100 ... */\n  /* 0000 */ V(12, 1, 3),\t/* 132 */\n  /* 0001 */ V(12, 1, 3),\n  /* 0010 */ V(9, 8, 4),\n  /* 0011 */ V(0, 12, 4),\n  /* 0100 */ V(12, 0, 3),\n  /* 0101 */ V(12, 0, 3),\n  /* 0110 */ V(11, 4, 4),\n  /* 0111 */ V(6, 10, 4),\n  /* 1000 */ V(10, 6, 4),\n  /* 1001 */ V(7, 9, 4),\n  /* 1010 */ V(3, 11, 3),\n  /* 1011 */ V(3, 11, 3),\n  /* 1100 */ V(11, 3, 3),\n  /* 1101 */ V(11, 3, 3),\n  /* 1110 */ V(8, 8, 4),\n  /* 1111 */ V(5, 10, 4),\n\n  /* 0000 0101 ... */\n  /* 0000 */ V(2, 11, 3),\t/* 148 */\n  /* 0001 */ V(2, 11, 3),\n  /* 0010 */ V(10, 5, 4),\n  /* 0011 */ V(6, 9, 4),\n  /* 0100 */ V(10, 4, 3),\n  /* 0101 */ V(10, 4, 3),\n  /* 0110 */ V(7, 8, 4),\n  /* 0111 */ V(8, 7, 4),\n  /* 1000 */ V(9, 4, 3),\n  /* 1001 */ V(9, 4, 3),\n  /* 1010 */ V(7, 7, 4),\n  /* 1011 */ V(7, 6, 4),\n  /* 1100 */ V(11, 2, 2),\n  /* 1101 */ V(11, 2, 2),\n  /* 1110 */ V(11, 2, 2),\n  /* 1111 */ V(11, 2, 2),\n\n  /* 0000 0110 ... */\n  /* 000  */ V(1, 11, 2),\t/* 164 */\n  /* 001  */ V(1, 11, 2),\n  /* 010  */ V(11, 1, 2),\n  /* 011  */ V(11, 1, 2),\n  /* 100  */ V(0, 11, 3),\n  /* 101  */ V(11, 0, 3),\n  /* 110  */ V(9, 6, 3),\n  /* 111  */ V(4, 10, 3),\n\n  /* 0000 0111 ... */\n  /* 000  */ V(3, 10, 3),\t/* 172 */\n  /* 001  */ V(10, 3, 3),\n  /* 010  */ V(5, 9, 3),\n  /* 011  */ V(9, 5, 3),\n  /* 100  */ V(2, 10, 2),\n  /* 101  */ V(2, 10, 2),\n  /* 110  */ V(10, 2, 2),\n  /* 111  */ V(10, 2, 2),\n\n  /* 0000 1000 ... */\n  /* 000  */ V(1, 10, 2),\t/* 180 */\n  /* 001  */ V(1, 10, 2),\n  /* 010  */ V(10, 1, 2),\n  /* 011  */ V(10, 1, 2),\n  /* 100  */ V(0, 10, 3),\n  /* 101  */ V(6, 8, 3),\n  /* 110  */ V(10, 0, 2),\n  /* 111  */ V(10, 0, 2),\n\n  /* 0000 1001 ... */\n  /* 000  */ V(8, 6, 3),\t/* 188 */\n  /* 001  */ V(4, 9, 3),\n  /* 010  */ V(9, 3, 2),\n  /* 011  */ V(9, 3, 2),\n  /* 100  */ V(3, 9, 3),\n  /* 101  */ V(5, 8, 3),\n  /* 110  */ V(8, 5, 3),\n  /* 111  */ V(6, 7, 3),\n\n  /* 0000 1010 ... */\n  /* 000  */ V(2, 9, 2),\t/* 196 */\n  /* 001  */ V(2, 9, 2),\n  /* 010  */ V(9, 2, 2),\n  /* 011  */ V(9, 2, 2),\n  /* 100  */ V(5, 7, 3),\n  /* 101  */ V(7, 5, 3),\n  /* 110  */ V(3, 8, 2),\n  /* 111  */ V(3, 8, 2),\n\n  /* 0000 1011 ... */\n  /* 000  */ V(8, 3, 2),\t/* 204 */\n  /* 001  */ V(8, 3, 2),\n  /* 010  */ V(6, 6, 3),\n  /* 011  */ V(4, 7, 3),\n  /* 100  */ V(7, 4, 3),\n  /* 101  */ V(5, 6, 3),\n  /* 110  */ V(6, 5, 3),\n  /* 111  */ V(7, 3, 3),\n\n  /* 0000 1100 ... */\n  /* 0    */ V(1, 9, 1),\t/* 212 */\n  /* 1    */ V(9, 1, 1),\n\n  /* 0000 1101 ... */\n  /* 00   */ V(0, 9, 2),\t/* 214 */\n  /* 01   */ V(9, 0, 2),\n  /* 10   */ V(4, 8, 2),\n  /* 11   */ V(8, 4, 2),\n\n  /* 0000 1110 ... */\n  /* 000  */ V(7, 2, 2),\t/* 218 */\n  /* 001  */ V(7, 2, 2),\n  /* 010  */ V(4, 6, 3),\n  /* 011  */ V(6, 4, 3),\n  /* 100  */ V(2, 8, 1),\n  /* 101  */ V(2, 8, 1),\n  /* 110  */ V(2, 8, 1),\n  /* 111  */ V(2, 8, 1),\n\n  /* 0000 1111 ... */\n  /* 0    */ V(8, 2, 1),\t/* 226 */\n  /* 1    */ V(1, 8, 1),\n\n  /* 0001 0000 ... */\n  /* 00   */ V(3, 7, 2),\t/* 228 */\n  /* 01   */ V(2, 7, 2),\n  /* 10   */ V(1, 7, 1),\n  /* 11   */ V(1, 7, 1),\n\n  /* 0001 0001 ... */\n  /* 00   */ V(7, 1, 1),\t/* 232 */\n  /* 01   */ V(7, 1, 1),\n  /* 10   */ V(5, 5, 2),\n  /* 11   */ V(0, 7, 2),\n\n  /* 0001 0010 ... */\n  /* 00   */ V(7, 0, 2),\t/* 236 */\n  /* 01   */ V(3, 6, 2),\n  /* 10   */ V(6, 3, 2),\n  /* 11   */ V(4, 5, 2),\n\n  /* 0001 0011 ... */\n  /* 00   */ V(5, 4, 2),\t/* 240 */\n  /* 01   */ V(2, 6, 2),\n  /* 10   */ V(6, 2, 2),\n  /* 11   */ V(3, 5, 2),\n\n  /* 0001 0101 ... */\n  /* 0    */ V(0, 8, 1),\t/* 244 */\n  /* 1    */ V(8, 0, 1),\n\n  /* 0001 0110 ... */\n  /* 0    */ V(1, 6, 1),\t/* 246 */\n  /* 1    */ V(6, 1, 1),\n\n  /* 0001 0111 ... */\n  /* 0    */ V(0, 6, 1),\t/* 248 */\n  /* 1    */ V(6, 0, 1),\n\n  /* 0001 1000 ... */\n  /* 00   */ V(5, 3, 2),\t/* 250 */\n  /* 01   */ V(4, 4, 2),\n  /* 10   */ V(2, 5, 1),\n  /* 11   */ V(2, 5, 1),\n\n  /* 0001 1001 ... */\n  /* 0    */ V(5, 2, 1),\t/* 254 */\n  /* 1    */ V(0, 5, 1),\n\n  /* 0001 1100 ... */\n  /* 0    */ V(3, 4, 1),\t/* 256 */\n  /* 1    */ V(4, 3, 1),\n\n  /* 0001 1101 ... */\n  /* 0    */ V(5, 0, 1),\t/* 258 */\n  /* 1    */ V(2, 4, 1),\n\n  /* 0001 1110 ... */\n  /* 0    */ V(4, 2, 1),\t/* 260 */\n  /* 1    */ V(3, 3, 1),\n\n  /* 0000 0000 0000 ... */\n  /* 0000 */ PTR(388, 3),\t/* 262 */\n  /* 0001 */ V(15, 15, 4),\n  /* 0010 */ V(14, 15, 4),\n  /* 0011 */ V(13, 15, 4),\n  /* 0100 */ V(14, 14, 4),\n  /* 0101 */ V(12, 15, 4),\n  /* 0110 */ V(13, 14, 4),\n  /* 0111 */ V(11, 15, 4),\n  /* 1000 */ V(15, 11, 4),\n  /* 1001 */ V(12, 14, 4),\n  /* 1010 */ V(13, 12, 4),\n  /* 1011 */ PTR(396, 1),\n  /* 1100 */ V(14, 12, 3),\n  /* 1101 */ V(14, 12, 3),\n  /* 1110 */ V(13, 13, 3),\n  /* 1111 */ V(13, 13, 3),\n\n  /* 0000 0000 0001 ... */\n  /* 0000 */ V(15, 10, 4),\t/* 278 */\n  /* 0001 */ V(12, 13, 4),\n  /* 0010 */ V(11, 14, 3),\n  /* 0011 */ V(11, 14, 3),\n  /* 0100 */ V(14, 11, 3),\n  /* 0101 */ V(14, 11, 3),\n  /* 0110 */ V(9, 15, 3),\n  /* 0111 */ V(9, 15, 3),\n  /* 1000 */ V(15, 9, 3),\n  /* 1001 */ V(15, 9, 3),\n  /* 1010 */ V(14, 10, 3),\n  /* 1011 */ V(14, 10, 3),\n  /* 1100 */ V(11, 13, 3),\n  /* 1101 */ V(11, 13, 3),\n  /* 1110 */ V(13, 11, 3),\n  /* 1111 */ V(13, 11, 3),\n\n  /* 0000 0000 0010 ... */\n  /* 0000 */ V(8, 15, 3),\t/* 294 */\n  /* 0001 */ V(8, 15, 3),\n  /* 0010 */ V(15, 8, 3),\n  /* 0011 */ V(15, 8, 3),\n  /* 0100 */ V(12, 12, 3),\n  /* 0101 */ V(12, 12, 3),\n  /* 0110 */ V(10, 14, 4),\n  /* 0111 */ V(9, 14, 4),\n  /* 1000 */ V(8, 14, 3),\n  /* 1001 */ V(8, 14, 3),\n  /* 1010 */ V(7, 15, 4),\n  /* 1011 */ V(7, 14, 4),\n  /* 1100 */ V(15, 7, 2),\n  /* 1101 */ V(15, 7, 2),\n  /* 1110 */ V(15, 7, 2),\n  /* 1111 */ V(15, 7, 2),\n\n  /* 0000 0000 0011 ... */\n  /* 000  */ V(13, 10, 2),\t/* 310 */\n  /* 001  */ V(13, 10, 2),\n  /* 010  */ V(10, 13, 3),\n  /* 011  */ V(11, 12, 3),\n  /* 100  */ V(12, 11, 3),\n  /* 101  */ V(15, 6, 3),\n  /* 110  */ V(6, 15, 2),\n  /* 111  */ V(6, 15, 2),\n\n  /* 0000 0000 0100 ... */\n  /* 00   */ V(14, 8, 2),\t/* 318 */\n  /* 01   */ V(5, 15, 2),\n  /* 10   */ V(9, 13, 2),\n  /* 11   */ V(13, 9, 2),\n\n  /* 0000 0000 0101 ... */\n  /* 00   */ V(15, 5, 2),\t/* 322 */\n  /* 01   */ V(14, 7, 2),\n  /* 10   */ V(10, 12, 2),\n  /* 11   */ V(11, 11, 2),\n\n  /* 0000 0000 0110 ... */\n  /* 000  */ V(4, 15, 2),\t/* 326 */\n  /* 001  */ V(4, 15, 2),\n  /* 010  */ V(15, 4, 2),\n  /* 011  */ V(15, 4, 2),\n  /* 100  */ V(12, 10, 3),\n  /* 101  */ V(14, 6, 3),\n  /* 110  */ V(15, 3, 2),\n  /* 111  */ V(15, 3, 2),\n\n  /* 0000 0000 0111 ... */\n  /* 00   */ V(3, 15, 1),\t/* 334 */\n  /* 01   */ V(3, 15, 1),\n  /* 10   */ V(8, 13, 2),\n  /* 11   */ V(13, 8, 2),\n\n  /* 0000 0000 1000 ... */\n  /* 0    */ V(2, 15, 1),\t/* 338 */\n  /* 1    */ V(15, 2, 1),\n\n  /* 0000 0000 1001 ... */\n  /* 00   */ V(6, 14, 2),\t/* 340 */\n  /* 01   */ V(9, 12, 2),\n  /* 10   */ V(0, 15, 1),\n  /* 11   */ V(0, 15, 1),\n\n  /* 0000 0000 1010 ... */\n  /* 00   */ V(12, 9, 2),\t/* 344 */\n  /* 01   */ V(5, 14, 2),\n  /* 10   */ V(10, 11, 1),\n  /* 11   */ V(10, 11, 1),\n\n  /* 0000 0000 1011 ... */\n  /* 00   */ V(7, 13, 2),\t/* 348 */\n  /* 01   */ V(13, 7, 2),\n  /* 10   */ V(4, 14, 1),\n  /* 11   */ V(4, 14, 1),\n\n  /* 0000 0000 1100 ... */\n  /* 00   */ V(12, 8, 2),\t/* 352 */\n  /* 01   */ V(13, 6, 2),\n  /* 10   */ V(3, 14, 1),\n  /* 11   */ V(3, 14, 1),\n\n  /* 0000 0000 1101 ... */\n  /* 00   */ V(11, 9, 1),\t/* 356 */\n  /* 01   */ V(11, 9, 1),\n  /* 10   */ V(9, 11, 2),\n  /* 11   */ V(10, 10, 2),\n\n  /* 0000 0001 0001 ... */\n  /* 0    */ V(11, 10, 1),\t/* 360 */\n  /* 1    */ V(14, 5, 1),\n\n  /* 0000 0001 0010 ... */\n  /* 0    */ V(14, 4, 1),\t/* 362 */\n  /* 1    */ V(8, 12, 1),\n\n  /* 0000 0001 0011 ... */\n  /* 0    */ V(6, 13, 1),\t/* 364 */\n  /* 1    */ V(14, 3, 1),\n\n  /* 0000 0001 0101 ... */\n  /* 0    */ V(2, 14, 1),\t/* 366 */\n  /* 1    */ V(0, 14, 1),\n\n  /* 0000 0001 1000 ... */\n  /* 0    */ V(14, 0, 1),\t/* 368 */\n  /* 1    */ V(5, 13, 1),\n\n  /* 0000 0001 1001 ... */\n  /* 0    */ V(13, 5, 1),\t/* 370 */\n  /* 1    */ V(7, 12, 1),\n\n  /* 0000 0001 1010 ... */\n  /* 0    */ V(12, 7, 1),\t/* 372 */\n  /* 1    */ V(4, 13, 1),\n\n  /* 0000 0001 1011 ... */\n  /* 0    */ V(8, 11, 1),\t/* 374 */\n  /* 1    */ V(11, 8, 1),\n\n  /* 0000 0001 1100 ... */\n  /* 0    */ V(13, 4, 1),\t/* 376 */\n  /* 1    */ V(9, 10, 1),\n\n  /* 0000 0001 1101 ... */\n  /* 0    */ V(10, 9, 1),\t/* 378 */\n  /* 1    */ V(6, 12, 1),\n\n  /* 0000 0010 0000 ... */\n  /* 0    */ V(13, 3, 1),\t/* 380 */\n  /* 1    */ V(7, 11, 1),\n\n  /* 0000 0010 0101 ... */\n  /* 0    */ V(5, 12, 1),\t/* 382 */\n  /* 1    */ V(12, 5, 1),\n\n  /* 0000 0010 0110 ... */\n  /* 0    */ V(9, 9, 1),\t/* 384 */\n  /* 1    */ V(7, 10, 1),\n\n  /* 0000 0010 1000 ... */\n  /* 0    */ V(10, 7, 1),\t/* 386 */\n  /* 1    */ V(9, 7, 1),\n\n  /* 0000 0000 0000 0000 ... */\n  /* 000  */ V(15, 14, 3),\t/* 388 */\n  /* 001  */ V(15, 12, 3),\n  /* 010  */ V(15, 13, 2),\n  /* 011  */ V(15, 13, 2),\n  /* 100  */ V(14, 13, 1),\n  /* 101  */ V(14, 13, 1),\n  /* 110  */ V(14, 13, 1),\n  /* 111  */ V(14, 13, 1),\n\n  /* 0000 0000 0000 1011 ... */\n  /* 0    */ V(10, 15, 1),\t/* 396 */\n  /* 1    */ V(14, 9, 1)\n];\n\nconst hufftab15 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ PTR(64, 4),\n  /* 0100 */ PTR(80, 4),\n  /* 0101 */ PTR(96, 3),\n  /* 0110 */ PTR(104, 3),\n  /* 0111 */ PTR(112, 2),\n  /* 1000 */ PTR(116, 1),\n  /* 1001 */ PTR(118, 1),\n  /* 1010 */ V(1, 1, 3),\n  /* 1011 */ V(1, 1, 3),\n  /* 1100 */ V(0, 1, 4),\n  /* 1101 */ V(1, 0, 4),\n  /* 1110 */ V(0, 0, 3),\n  /* 1111 */ V(0, 0, 3),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(120, 4),\t/* 16 */\n  /* 0001 */ PTR(136, 4),\n  /* 0010 */ PTR(152, 4),\n  /* 0011 */ PTR(168, 4),\n  /* 0100 */ PTR(184, 4),\n  /* 0101 */ PTR(200, 3),\n  /* 0110 */ PTR(208, 3),\n  /* 0111 */ PTR(216, 4),\n  /* 1000 */ PTR(232, 3),\n  /* 1001 */ PTR(240, 3),\n  /* 1010 */ PTR(248, 3),\n  /* 1011 */ PTR(256, 3),\n  /* 1100 */ PTR(264, 2),\n  /* 1101 */ PTR(268, 3),\n  /* 1110 */ PTR(276, 3),\n  /* 1111 */ PTR(284, 2),\n\n  /* 0001 ... */\n  /* 0000 */ PTR(288, 2),\t/* 32 */\n  /* 0001 */ PTR(292, 2),\n  /* 0010 */ PTR(296, 2),\n  /* 0011 */ PTR(300, 2),\n  /* 0100 */ PTR(304, 2),\n  /* 0101 */ PTR(308, 2),\n  /* 0110 */ PTR(312, 2),\n  /* 0111 */ PTR(316, 2),\n  /* 1000 */ PTR(320, 1),\n  /* 1001 */ PTR(322, 1),\n  /* 1010 */ PTR(324, 1),\n  /* 1011 */ PTR(326, 2),\n  /* 1100 */ PTR(330, 1),\n  /* 1101 */ PTR(332, 1),\n  /* 1110 */ PTR(334, 2),\n  /* 1111 */ PTR(338, 1),\n\n  /* 0010 ... */\n  /* 0000 */ PTR(340, 1),\t/* 48 */\n  /* 0001 */ PTR(342, 1),\n  /* 0010 */ V(9, 1, 4),\n  /* 0011 */ PTR(344, 1),\n  /* 0100 */ PTR(346, 1),\n  /* 0101 */ PTR(348, 1),\n  /* 0110 */ PTR(350, 1),\n  /* 0111 */ PTR(352, 1),\n  /* 1000 */ V(2, 8, 4),\n  /* 1001 */ V(8, 2, 4),\n  /* 1010 */ V(1, 8, 4),\n  /* 1011 */ V(8, 1, 4),\n  /* 1100 */ PTR(354, 1),\n  /* 1101 */ PTR(356, 1),\n  /* 1110 */ PTR(358, 1),\n  /* 1111 */ PTR(360, 1),\n\n  /* 0011 ... */\n  /* 0000 */ V(2, 7, 4),\t/* 64 */\n  /* 0001 */ V(7, 2, 4),\n  /* 0010 */ V(6, 4, 4),\n  /* 0011 */ V(1, 7, 4),\n  /* 0100 */ V(5, 5, 4),\n  /* 0101 */ V(7, 1, 4),\n  /* 0110 */ PTR(362, 1),\n  /* 0111 */ V(3, 6, 4),\n  /* 1000 */ V(6, 3, 4),\n  /* 1001 */ V(4, 5, 4),\n  /* 1010 */ V(5, 4, 4),\n  /* 1011 */ V(2, 6, 4),\n  /* 1100 */ V(6, 2, 4),\n  /* 1101 */ V(1, 6, 4),\n  /* 1110 */ PTR(364, 1),\n  /* 1111 */ V(3, 5, 4),\n\n  /* 0100 ... */\n  /* 0000 */ V(6, 1, 3),\t/* 80 */\n  /* 0001 */ V(6, 1, 3),\n  /* 0010 */ V(5, 3, 4),\n  /* 0011 */ V(4, 4, 4),\n  /* 0100 */ V(2, 5, 3),\n  /* 0101 */ V(2, 5, 3),\n  /* 0110 */ V(5, 2, 3),\n  /* 0111 */ V(5, 2, 3),\n  /* 1000 */ V(1, 5, 3),\n  /* 1001 */ V(1, 5, 3),\n  /* 1010 */ V(5, 1, 3),\n  /* 1011 */ V(5, 1, 3),\n  /* 1100 */ V(0, 5, 4),\n  /* 1101 */ V(5, 0, 4),\n  /* 1110 */ V(3, 4, 3),\n  /* 1111 */ V(3, 4, 3),\n\n  /* 0101 ... */\n  /* 000  */ V(4, 3, 3),\t/* 96 */\n  /* 001  */ V(2, 4, 3),\n  /* 010  */ V(4, 2, 3),\n  /* 011  */ V(3, 3, 3),\n  /* 100  */ V(4, 1, 2),\n  /* 101  */ V(4, 1, 2),\n  /* 110  */ V(1, 4, 3),\n  /* 111  */ V(0, 4, 3),\n\n  /* 0110 ... */\n  /* 000  */ V(2, 3, 2),\t/* 104 */\n  /* 001  */ V(2, 3, 2),\n  /* 010  */ V(3, 2, 2),\n  /* 011  */ V(3, 2, 2),\n  /* 100  */ V(4, 0, 3),\n  /* 101  */ V(0, 3, 3),\n  /* 110  */ V(1, 3, 2),\n  /* 111  */ V(1, 3, 2),\n\n  /* 0111 ... */\n  /* 00   */ V(3, 1, 2),\t/* 112 */\n  /* 01   */ V(3, 0, 2),\n  /* 10   */ V(2, 2, 1),\n  /* 11   */ V(2, 2, 1),\n\n  /* 1000 ... */\n  /* 0    */ V(1, 2, 1),\t/* 116 */\n  /* 1    */ V(2, 1, 1),\n\n  /* 1001 ... */\n  /* 0    */ V(0, 2, 1),\t/* 118 */\n  /* 1    */ V(2, 0, 1),\n\n  /* 0000 0000 ... */\n  /* 0000 */ PTR(366, 1),\t/* 120 */\n  /* 0001 */ PTR(368, 1),\n  /* 0010 */ V(14, 14, 4),\n  /* 0011 */ PTR(370, 1),\n  /* 0100 */ PTR(372, 1),\n  /* 0101 */ PTR(374, 1),\n  /* 0110 */ V(15, 11, 4),\n  /* 0111 */ PTR(376, 1),\n  /* 1000 */ V(13, 13, 4),\n  /* 1001 */ V(10, 15, 4),\n  /* 1010 */ V(15, 10, 4),\n  /* 1011 */ V(11, 14, 4),\n  /* 1100 */ V(14, 11, 4),\n  /* 1101 */ V(12, 13, 4),\n  /* 1110 */ V(13, 12, 4),\n  /* 1111 */ V(9, 15, 4),\n\n  /* 0000 0001 ... */\n  /* 0000 */ V(15, 9, 4),\t/* 136 */\n  /* 0001 */ V(14, 10, 4),\n  /* 0010 */ V(11, 13, 4),\n  /* 0011 */ V(13, 11, 4),\n  /* 0100 */ V(8, 15, 4),\n  /* 0101 */ V(15, 8, 4),\n  /* 0110 */ V(12, 12, 4),\n  /* 0111 */ V(9, 14, 4),\n  /* 1000 */ V(14, 9, 4),\n  /* 1001 */ V(7, 15, 4),\n  /* 1010 */ V(15, 7, 4),\n  /* 1011 */ V(10, 13, 4),\n  /* 1100 */ V(13, 10, 4),\n  /* 1101 */ V(11, 12, 4),\n  /* 1110 */ V(6, 15, 4),\n  /* 1111 */ PTR(378, 1),\n\n  /* 0000 0010 ... */\n  /* 0000 */ V(12, 11, 3),\t/* 152 */\n  /* 0001 */ V(12, 11, 3),\n  /* 0010 */ V(15, 6, 3),\n  /* 0011 */ V(15, 6, 3),\n  /* 0100 */ V(8, 14, 4),\n  /* 0101 */ V(14, 8, 4),\n  /* 0110 */ V(5, 15, 4),\n  /* 0111 */ V(9, 13, 4),\n  /* 1000 */ V(15, 5, 3),\n  /* 1001 */ V(15, 5, 3),\n  /* 1010 */ V(7, 14, 3),\n  /* 1011 */ V(7, 14, 3),\n  /* 1100 */ V(14, 7, 3),\n  /* 1101 */ V(14, 7, 3),\n  /* 1110 */ V(10, 12, 3),\n  /* 1111 */ V(10, 12, 3),\n\n  /* 0000 0011 ... */\n  /* 0000 */ V(12, 10, 3),\t/* 168 */\n  /* 0001 */ V(12, 10, 3),\n  /* 0010 */ V(11, 11, 3),\n  /* 0011 */ V(11, 11, 3),\n  /* 0100 */ V(13, 9, 4),\n  /* 0101 */ V(8, 13, 4),\n  /* 0110 */ V(4, 15, 3),\n  /* 0111 */ V(4, 15, 3),\n  /* 1000 */ V(15, 4, 3),\n  /* 1001 */ V(15, 4, 3),\n  /* 1010 */ V(3, 15, 3),\n  /* 1011 */ V(3, 15, 3),\n  /* 1100 */ V(15, 3, 3),\n  /* 1101 */ V(15, 3, 3),\n  /* 1110 */ V(13, 8, 3),\n  /* 1111 */ V(13, 8, 3),\n\n  /* 0000 0100 ... */\n  /* 0000 */ V(14, 6, 3),\t/* 184 */\n  /* 0001 */ V(14, 6, 3),\n  /* 0010 */ V(2, 15, 3),\n  /* 0011 */ V(2, 15, 3),\n  /* 0100 */ V(15, 2, 3),\n  /* 0101 */ V(15, 2, 3),\n  /* 0110 */ V(6, 14, 4),\n  /* 0111 */ V(15, 0, 4),\n  /* 1000 */ V(1, 15, 3),\n  /* 1001 */ V(1, 15, 3),\n  /* 1010 */ V(15, 1, 3),\n  /* 1011 */ V(15, 1, 3),\n  /* 1100 */ V(9, 12, 3),\n  /* 1101 */ V(9, 12, 3),\n  /* 1110 */ V(12, 9, 3),\n  /* 1111 */ V(12, 9, 3),\n\n  /* 0000 0101 ... */\n  /* 000  */ V(5, 14, 3),\t/* 200 */\n  /* 001  */ V(10, 11, 3),\n  /* 010  */ V(11, 10, 3),\n  /* 011  */ V(14, 5, 3),\n  /* 100  */ V(7, 13, 3),\n  /* 101  */ V(13, 7, 3),\n  /* 110  */ V(4, 14, 3),\n  /* 111  */ V(14, 4, 3),\n\n  /* 0000 0110 ... */\n  /* 000  */ V(8, 12, 3),\t/* 208 */\n  /* 001  */ V(12, 8, 3),\n  /* 010  */ V(3, 14, 3),\n  /* 011  */ V(6, 13, 3),\n  /* 100  */ V(13, 6, 3),\n  /* 101  */ V(14, 3, 3),\n  /* 110  */ V(9, 11, 3),\n  /* 111  */ V(11, 9, 3),\n\n  /* 0000 0111 ... */\n  /* 0000 */ V(2, 14, 3),\t/* 216 */\n  /* 0001 */ V(2, 14, 3),\n  /* 0010 */ V(10, 10, 3),\n  /* 0011 */ V(10, 10, 3),\n  /* 0100 */ V(14, 2, 3),\n  /* 0101 */ V(14, 2, 3),\n  /* 0110 */ V(1, 14, 3),\n  /* 0111 */ V(1, 14, 3),\n  /* 1000 */ V(14, 1, 3),\n  /* 1001 */ V(14, 1, 3),\n  /* 1010 */ V(0, 14, 4),\n  /* 1011 */ V(14, 0, 4),\n  /* 1100 */ V(5, 13, 3),\n  /* 1101 */ V(5, 13, 3),\n  /* 1110 */ V(13, 5, 3),\n  /* 1111 */ V(13, 5, 3),\n\n  /* 0000 1000 ... */\n  /* 000  */ V(7, 12, 3),\t/* 232 */\n  /* 001  */ V(12, 7, 3),\n  /* 010  */ V(4, 13, 3),\n  /* 011  */ V(8, 11, 3),\n  /* 100  */ V(13, 4, 2),\n  /* 101  */ V(13, 4, 2),\n  /* 110  */ V(11, 8, 3),\n  /* 111  */ V(9, 10, 3),\n\n  /* 0000 1001 ... */\n  /* 000  */ V(10, 9, 3),\t/* 240 */\n  /* 001  */ V(6, 12, 3),\n  /* 010  */ V(12, 6, 3),\n  /* 011  */ V(3, 13, 3),\n  /* 100  */ V(13, 3, 2),\n  /* 101  */ V(13, 3, 2),\n  /* 110  */ V(13, 2, 2),\n  /* 111  */ V(13, 2, 2),\n\n  /* 0000 1010 ... */\n  /* 000  */ V(2, 13, 3),\t/* 248 */\n  /* 001  */ V(0, 13, 3),\n  /* 010  */ V(1, 13, 2),\n  /* 011  */ V(1, 13, 2),\n  /* 100  */ V(7, 11, 2),\n  /* 101  */ V(7, 11, 2),\n  /* 110  */ V(11, 7, 2),\n  /* 111  */ V(11, 7, 2),\n\n  /* 0000 1011 ... */\n  /* 000  */ V(13, 1, 2),\t/* 256 */\n  /* 001  */ V(13, 1, 2),\n  /* 010  */ V(5, 12, 3),\n  /* 011  */ V(13, 0, 3),\n  /* 100  */ V(12, 5, 2),\n  /* 101  */ V(12, 5, 2),\n  /* 110  */ V(8, 10, 2),\n  /* 111  */ V(8, 10, 2),\n\n  /* 0000 1100 ... */\n  /* 00   */ V(10, 8, 2),\t/* 264 */\n  /* 01   */ V(4, 12, 2),\n  /* 10   */ V(12, 4, 2),\n  /* 11   */ V(6, 11, 2),\n\n  /* 0000 1101 ... */\n  /* 000  */ V(11, 6, 2),\t/* 268 */\n  /* 001  */ V(11, 6, 2),\n  /* 010  */ V(9, 9, 3),\n  /* 011  */ V(0, 12, 3),\n  /* 100  */ V(3, 12, 2),\n  /* 101  */ V(3, 12, 2),\n  /* 110  */ V(12, 3, 2),\n  /* 111  */ V(12, 3, 2),\n\n  /* 0000 1110 ... */\n  /* 000  */ V(7, 10, 2),\t/* 276 */\n  /* 001  */ V(7, 10, 2),\n  /* 010  */ V(10, 7, 2),\n  /* 011  */ V(10, 7, 2),\n  /* 100  */ V(10, 6, 2),\n  /* 101  */ V(10, 6, 2),\n  /* 110  */ V(12, 0, 3),\n  /* 111  */ V(0, 11, 3),\n\n  /* 0000 1111 ... */\n  /* 00   */ V(12, 2, 1),\t/* 284 */\n  /* 01   */ V(12, 2, 1),\n  /* 10   */ V(2, 12, 2),\n  /* 11   */ V(5, 11, 2),\n\n  /* 0001 0000 ... */\n  /* 00   */ V(11, 5, 2),\t/* 288 */\n  /* 01   */ V(1, 12, 2),\n  /* 10   */ V(8, 9, 2),\n  /* 11   */ V(9, 8, 2),\n\n  /* 0001 0001 ... */\n  /* 00   */ V(12, 1, 2),\t/* 292 */\n  /* 01   */ V(4, 11, 2),\n  /* 10   */ V(11, 4, 2),\n  /* 11   */ V(6, 10, 2),\n\n  /* 0001 0010 ... */\n  /* 00   */ V(3, 11, 2),\t/* 296 */\n  /* 01   */ V(7, 9, 2),\n  /* 10   */ V(11, 3, 1),\n  /* 11   */ V(11, 3, 1),\n\n  /* 0001 0011 ... */\n  /* 00   */ V(9, 7, 2),\t/* 300 */\n  /* 01   */ V(8, 8, 2),\n  /* 10   */ V(2, 11, 2),\n  /* 11   */ V(5, 10, 2),\n\n  /* 0001 0100 ... */\n  /* 00   */ V(11, 2, 1),\t/* 304 */\n  /* 01   */ V(11, 2, 1),\n  /* 10   */ V(10, 5, 2),\n  /* 11   */ V(1, 11, 2),\n\n  /* 0001 0101 ... */\n  /* 00   */ V(11, 1, 1),\t/* 308 */\n  /* 01   */ V(11, 1, 1),\n  /* 10   */ V(11, 0, 2),\n  /* 11   */ V(6, 9, 2),\n\n  /* 0001 0110 ... */\n  /* 00   */ V(9, 6, 2),\t/* 312 */\n  /* 01   */ V(4, 10, 2),\n  /* 10   */ V(10, 4, 2),\n  /* 11   */ V(7, 8, 2),\n\n  /* 0001 0111 ... */\n  /* 00   */ V(8, 7, 2),\t/* 316 */\n  /* 01   */ V(3, 10, 2),\n  /* 10   */ V(10, 3, 1),\n  /* 11   */ V(10, 3, 1),\n\n  /* 0001 1000 ... */\n  /* 0    */ V(5, 9, 1),\t/* 320 */\n  /* 1    */ V(9, 5, 1),\n\n  /* 0001 1001 ... */\n  /* 0    */ V(2, 10, 1),\t/* 322 */\n  /* 1    */ V(10, 2, 1),\n\n  /* 0001 1010 ... */\n  /* 0    */ V(1, 10, 1),\t/* 324 */\n  /* 1    */ V(10, 1, 1),\n\n  /* 0001 1011 ... */\n  /* 00   */ V(0, 10, 2),\t/* 326 */\n  /* 01   */ V(10, 0, 2),\n  /* 10   */ V(6, 8, 1),\n  /* 11   */ V(6, 8, 1),\n\n  /* 0001 1100 ... */\n  /* 0    */ V(8, 6, 1),\t/* 330 */\n  /* 1    */ V(4, 9, 1),\n\n  /* 0001 1101 ... */\n  /* 0    */ V(9, 4, 1),\t/* 332 */\n  /* 1    */ V(3, 9, 1),\n\n  /* 0001 1110 ... */\n  /* 00   */ V(9, 3, 1),\t/* 334 */\n  /* 01   */ V(9, 3, 1),\n  /* 10   */ V(7, 7, 2),\n  /* 11   */ V(0, 9, 2),\n\n  /* 0001 1111 ... */\n  /* 0    */ V(5, 8, 1),\t/* 338 */\n  /* 1    */ V(8, 5, 1),\n\n  /* 0010 0000 ... */\n  /* 0    */ V(2, 9, 1),\t/* 340 */\n  /* 1    */ V(6, 7, 1),\n\n  /* 0010 0001 ... */\n  /* 0    */ V(7, 6, 1),\t/* 342 */\n  /* 1    */ V(9, 2, 1),\n\n  /* 0010 0011 ... */\n  /* 0    */ V(1, 9, 1),\t/* 344 */\n  /* 1    */ V(9, 0, 1),\n\n  /* 0010 0100 ... */\n  /* 0    */ V(4, 8, 1),\t/* 346 */\n  /* 1    */ V(8, 4, 1),\n\n  /* 0010 0101 ... */\n  /* 0    */ V(5, 7, 1),\t/* 348 */\n  /* 1    */ V(7, 5, 1),\n\n  /* 0010 0110 ... */\n  /* 0    */ V(3, 8, 1),\t/* 350 */\n  /* 1    */ V(8, 3, 1),\n\n  /* 0010 0111 ... */\n  /* 0    */ V(6, 6, 1),\t/* 352 */\n  /* 1    */ V(4, 7, 1),\n\n  /* 0010 1100 ... */\n  /* 0    */ V(7, 4, 1),\t/* 354 */\n  /* 1    */ V(0, 8, 1),\n\n  /* 0010 1101 ... */\n  /* 0    */ V(8, 0, 1),\t/* 356 */\n  /* 1    */ V(5, 6, 1),\n\n  /* 0010 1110 ... */\n  /* 0    */ V(6, 5, 1),\t/* 358 */\n  /* 1    */ V(3, 7, 1),\n\n  /* 0010 1111 ... */\n  /* 0    */ V(7, 3, 1),\t/* 360 */\n  /* 1    */ V(4, 6, 1),\n\n  /* 0011 0110 ... */\n  /* 0    */ V(0, 7, 1),\t/* 362 */\n  /* 1    */ V(7, 0, 1),\n\n  /* 0011 1110 ... */\n  /* 0    */ V(0, 6, 1),\t/* 364 */\n  /* 1    */ V(6, 0, 1),\n\n  /* 0000 0000 0000 ... */\n  /* 0    */ V(15, 15, 1),\t/* 366 */\n  /* 1    */ V(14, 15, 1),\n\n  /* 0000 0000 0001 ... */\n  /* 0    */ V(15, 14, 1),\t/* 368 */\n  /* 1    */ V(13, 15, 1),\n\n  /* 0000 0000 0011 ... */\n  /* 0    */ V(15, 13, 1),\t/* 370 */\n  /* 1    */ V(12, 15, 1),\n\n  /* 0000 0000 0100 ... */\n  /* 0    */ V(15, 12, 1),\t/* 372 */\n  /* 1    */ V(13, 14, 1),\n\n  /* 0000 0000 0101 ... */\n  /* 0    */ V(14, 13, 1),\t/* 374 */\n  /* 1    */ V(11, 15, 1),\n\n  /* 0000 0000 0111 ... */\n  /* 0    */ V(12, 14, 1),\t/* 376 */\n  /* 1    */ V(14, 12, 1),\n\n  /* 0000 0001 1111 ... */\n  /* 0    */ V(10, 14, 1),\t/* 378 */\n  /* 1    */ V(0, 15, 1)\n];\n\nconst hufftab16 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ PTR(64, 2),\n  /* 0100 */ V(1, 1, 4),\n  /* 0101 */ V(0, 1, 4),\n  /* 0110 */ V(1, 0, 3),\n  /* 0111 */ V(1, 0, 3),\n  /* 1000 */ V(0, 0, 1),\n  /* 1001 */ V(0, 0, 1),\n  /* 1010 */ V(0, 0, 1),\n  /* 1011 */ V(0, 0, 1),\n  /* 1100 */ V(0, 0, 1),\n  /* 1101 */ V(0, 0, 1),\n  /* 1110 */ V(0, 0, 1),\n  /* 1111 */ V(0, 0, 1),\n\n  /* 0000 ... */\n  /* 0000 */ PTR(68, 3),\t/* 16 */\n  /* 0001 */ PTR(76, 3),\n  /* 0010 */ PTR(84, 2),\n  /* 0011 */ V(15, 15, 4),\n  /* 0100 */ PTR(88, 2),\n  /* 0101 */ PTR(92, 1),\n  /* 0110 */ PTR(94, 4),\n  /* 0111 */ V(15, 2, 4),\n  /* 1000 */ PTR(110, 1),\n  /* 1001 */ V(1, 15, 4),\n  /* 1010 */ V(15, 1, 4),\n  /* 1011 */ PTR(112, 4),\n  /* 1100 */ PTR(128, 4),\n  /* 1101 */ PTR(144, 4),\n  /* 1110 */ PTR(160, 4),\n  /* 1111 */ PTR(176, 4),\n\n  /* 0001 ... */\n  /* 0000 */ PTR(192, 4),\t/* 32 */\n  /* 0001 */ PTR(208, 3),\n  /* 0010 */ PTR(216, 3),\n  /* 0011 */ PTR(224, 3),\n  /* 0100 */ PTR(232, 3),\n  /* 0101 */ PTR(240, 3),\n  /* 0110 */ PTR(248, 3),\n  /* 0111 */ PTR(256, 3),\n  /* 1000 */ PTR(264, 2),\n  /* 1001 */ PTR(268, 2),\n  /* 1010 */ PTR(272, 1),\n  /* 1011 */ PTR(274, 2),\n  /* 1100 */ PTR(278, 2),\n  /* 1101 */ PTR(282, 1),\n  /* 1110 */ V(5, 1, 4),\n  /* 1111 */ PTR(284, 1),\n\n  /* 0010 ... */\n  /* 0000 */ PTR(286, 1),\t/* 48 */\n  /* 0001 */ PTR(288, 1),\n  /* 0010 */ PTR(290, 1),\n  /* 0011 */ V(1, 4, 4),\n  /* 0100 */ V(4, 1, 4),\n  /* 0101 */ PTR(292, 1),\n  /* 0110 */ V(2, 3, 4),\n  /* 0111 */ V(3, 2, 4),\n  /* 1000 */ V(1, 3, 3),\n  /* 1001 */ V(1, 3, 3),\n  /* 1010 */ V(3, 1, 3),\n  /* 1011 */ V(3, 1, 3),\n  /* 1100 */ V(0, 3, 4),\n  /* 1101 */ V(3, 0, 4),\n  /* 1110 */ V(2, 2, 3),\n  /* 1111 */ V(2, 2, 3),\n\n  /* 0011 ... */\n  /* 00   */ V(1, 2, 2),\t/* 64 */\n  /* 01   */ V(2, 1, 2),\n  /* 10   */ V(0, 2, 2),\n  /* 11   */ V(2, 0, 2),\n\n  /* 0000 0000 ... */\n  /* 000  */ V(14, 15, 3),\t/* 68 */\n  /* 001  */ V(15, 14, 3),\n  /* 010  */ V(13, 15, 3),\n  /* 011  */ V(15, 13, 3),\n  /* 100  */ V(12, 15, 3),\n  /* 101  */ V(15, 12, 3),\n  /* 110  */ V(11, 15, 3),\n  /* 111  */ V(15, 11, 3),\n\n  /* 0000 0001 ... */\n  /* 000  */ V(10, 15, 2),\t/* 76 */\n  /* 001  */ V(10, 15, 2),\n  /* 010  */ V(15, 10, 3),\n  /* 011  */ V(9, 15, 3),\n  /* 100  */ V(15, 9, 3),\n  /* 101  */ V(15, 8, 3),\n  /* 110  */ V(8, 15, 2),\n  /* 111  */ V(8, 15, 2),\n\n  /* 0000 0010 ... */\n  /* 00   */ V(7, 15, 2),\t/* 84 */\n  /* 01   */ V(15, 7, 2),\n  /* 10   */ V(6, 15, 2),\n  /* 11   */ V(15, 6, 2),\n\n  /* 0000 0100 ... */\n  /* 00   */ V(5, 15, 2),\t/* 88 */\n  /* 01   */ V(15, 5, 2),\n  /* 10   */ V(4, 15, 1),\n  /* 11   */ V(4, 15, 1),\n\n  /* 0000 0101 ... */\n  /* 0    */ V(15, 4, 1),\t/* 92 */\n  /* 1    */ V(15, 3, 1),\n\n  /* 0000 0110 ... */\n  /* 0000 */ V(15, 0, 1),\t/* 94 */\n  /* 0001 */ V(15, 0, 1),\n  /* 0010 */ V(15, 0, 1),\n  /* 0011 */ V(15, 0, 1),\n  /* 0100 */ V(15, 0, 1),\n  /* 0101 */ V(15, 0, 1),\n  /* 0110 */ V(15, 0, 1),\n  /* 0111 */ V(15, 0, 1),\n  /* 1000 */ V(3, 15, 2),\n  /* 1001 */ V(3, 15, 2),\n  /* 1010 */ V(3, 15, 2),\n  /* 1011 */ V(3, 15, 2),\n  /* 1100 */ PTR(294, 4),\n  /* 1101 */ PTR(310, 3),\n  /* 1110 */ PTR(318, 3),\n  /* 1111 */ PTR(326, 3),\n\n  /* 0000 1000 ... */\n  /* 0    */ V(2, 15, 1),\t/* 110 */\n  /* 1    */ V(0, 15, 1),\n\n  /* 0000 1011 ... */\n  /* 0000 */ PTR(334, 2),\t/* 112 */\n  /* 0001 */ PTR(338, 2),\n  /* 0010 */ PTR(342, 2),\n  /* 0011 */ PTR(346, 1),\n  /* 0100 */ PTR(348, 2),\n  /* 0101 */ PTR(352, 2),\n  /* 0110 */ PTR(356, 1),\n  /* 0111 */ PTR(358, 2),\n  /* 1000 */ PTR(362, 2),\n  /* 1001 */ PTR(366, 2),\n  /* 1010 */ PTR(370, 2),\n  /* 1011 */ V(14, 3, 4),\n  /* 1100 */ PTR(374, 1),\n  /* 1101 */ PTR(376, 1),\n  /* 1110 */ PTR(378, 1),\n  /* 1111 */ PTR(380, 1),\n\n  /* 0000 1100 ... */\n  /* 0000 */ PTR(382, 1),\t/* 128 */\n  /* 0001 */ PTR(384, 1),\n  /* 0010 */ PTR(386, 1),\n  /* 0011 */ V(0, 13, 4),\n  /* 0100 */ PTR(388, 1),\n  /* 0101 */ PTR(390, 1),\n  /* 0110 */ PTR(392, 1),\n  /* 0111 */ V(3, 12, 4),\n  /* 1000 */ PTR(394, 1),\n  /* 1001 */ V(1, 12, 4),\n  /* 1010 */ V(12, 0, 4),\n  /* 1011 */ PTR(396, 1),\n  /* 1100 */ V(14, 2, 3),\n  /* 1101 */ V(14, 2, 3),\n  /* 1110 */ V(2, 14, 4),\n  /* 1111 */ V(1, 14, 4),\n\n  /* 0000 1101 ... */\n  /* 0000 */ V(13, 3, 4),\t/* 144 */\n  /* 0001 */ V(2, 13, 4),\n  /* 0010 */ V(13, 2, 4),\n  /* 0011 */ V(13, 1, 4),\n  /* 0100 */ V(3, 11, 4),\n  /* 0101 */ PTR(398, 1),\n  /* 0110 */ V(1, 13, 3),\n  /* 0111 */ V(1, 13, 3),\n  /* 1000 */ V(12, 4, 4),\n  /* 1001 */ V(6, 11, 4),\n  /* 1010 */ V(12, 3, 4),\n  /* 1011 */ V(10, 7, 4),\n  /* 1100 */ V(2, 12, 3),\n  /* 1101 */ V(2, 12, 3),\n  /* 1110 */ V(12, 2, 4),\n  /* 1111 */ V(11, 5, 4),\n\n  /* 0000 1110 ... */\n  /* 0000 */ V(12, 1, 4),\t/* 160 */\n  /* 0001 */ V(0, 12, 4),\n  /* 0010 */ V(4, 11, 4),\n  /* 0011 */ V(11, 4, 4),\n  /* 0100 */ V(6, 10, 4),\n  /* 0101 */ V(10, 6, 4),\n  /* 0110 */ V(11, 3, 3),\n  /* 0111 */ V(11, 3, 3),\n  /* 1000 */ V(5, 10, 4),\n  /* 1001 */ V(10, 5, 4),\n  /* 1010 */ V(2, 11, 3),\n  /* 1011 */ V(2, 11, 3),\n  /* 1100 */ V(11, 2, 3),\n  /* 1101 */ V(11, 2, 3),\n  /* 1110 */ V(1, 11, 3),\n  /* 1111 */ V(1, 11, 3),\n\n  /* 0000 1111 ... */\n  /* 0000 */ V(11, 1, 3),\t/* 176 */\n  /* 0001 */ V(11, 1, 3),\n  /* 0010 */ V(0, 11, 4),\n  /* 0011 */ V(11, 0, 4),\n  /* 0100 */ V(6, 9, 4),\n  /* 0101 */ V(9, 6, 4),\n  /* 0110 */ V(4, 10, 4),\n  /* 0111 */ V(10, 4, 4),\n  /* 1000 */ V(7, 8, 4),\n  /* 1001 */ V(8, 7, 4),\n  /* 1010 */ V(10, 3, 3),\n  /* 1011 */ V(10, 3, 3),\n  /* 1100 */ V(3, 10, 4),\n  /* 1101 */ V(5, 9, 4),\n  /* 1110 */ V(2, 10, 3),\n  /* 1111 */ V(2, 10, 3),\n\n  /* 0001 0000 ... */\n  /* 0000 */ V(9, 5, 4),\t/* 192 */\n  /* 0001 */ V(6, 8, 4),\n  /* 0010 */ V(10, 1, 3),\n  /* 0011 */ V(10, 1, 3),\n  /* 0100 */ V(8, 6, 4),\n  /* 0101 */ V(7, 7, 4),\n  /* 0110 */ V(9, 4, 3),\n  /* 0111 */ V(9, 4, 3),\n  /* 1000 */ V(4, 9, 4),\n  /* 1001 */ V(5, 7, 4),\n  /* 1010 */ V(6, 7, 3),\n  /* 1011 */ V(6, 7, 3),\n  /* 1100 */ V(10, 2, 2),\n  /* 1101 */ V(10, 2, 2),\n  /* 1110 */ V(10, 2, 2),\n  /* 1111 */ V(10, 2, 2),\n\n  /* 0001 0001 ... */\n  /* 000  */ V(1, 10, 2),\t/* 208 */\n  /* 001  */ V(1, 10, 2),\n  /* 010  */ V(0, 10, 3),\n  /* 011  */ V(10, 0, 3),\n  /* 100  */ V(3, 9, 3),\n  /* 101  */ V(9, 3, 3),\n  /* 110  */ V(5, 8, 3),\n  /* 111  */ V(8, 5, 3),\n\n  /* 0001 0010 ... */\n  /* 000  */ V(2, 9, 2),\t/* 216 */\n  /* 001  */ V(2, 9, 2),\n  /* 010  */ V(9, 2, 2),\n  /* 011  */ V(9, 2, 2),\n  /* 100  */ V(7, 6, 3),\n  /* 101  */ V(0, 9, 3),\n  /* 110  */ V(1, 9, 2),\n  /* 111  */ V(1, 9, 2),\n\n  /* 0001 0011 ... */\n  /* 000  */ V(9, 1, 2),\t/* 224 */\n  /* 001  */ V(9, 1, 2),\n  /* 010  */ V(9, 0, 3),\n  /* 011  */ V(4, 8, 3),\n  /* 100  */ V(8, 4, 3),\n  /* 101  */ V(7, 5, 3),\n  /* 110  */ V(3, 8, 3),\n  /* 111  */ V(8, 3, 3),\n\n  /* 0001 0100 ... */\n  /* 000  */ V(6, 6, 3),\t/* 232 */\n  /* 001  */ V(2, 8, 3),\n  /* 010  */ V(8, 2, 2),\n  /* 011  */ V(8, 2, 2),\n  /* 100  */ V(4, 7, 3),\n  /* 101  */ V(7, 4, 3),\n  /* 110  */ V(1, 8, 2),\n  /* 111  */ V(1, 8, 2),\n\n  /* 0001 0101 ... */\n  /* 000  */ V(8, 1, 2),\t/* 240 */\n  /* 001  */ V(8, 1, 2),\n  /* 010  */ V(8, 0, 2),\n  /* 011  */ V(8, 0, 2),\n  /* 100  */ V(0, 8, 3),\n  /* 101  */ V(5, 6, 3),\n  /* 110  */ V(3, 7, 2),\n  /* 111  */ V(3, 7, 2),\n\n  /* 0001 0110 ... */\n  /* 000  */ V(7, 3, 2),\t/* 248 */\n  /* 001  */ V(7, 3, 2),\n  /* 010  */ V(6, 5, 3),\n  /* 011  */ V(4, 6, 3),\n  /* 100  */ V(2, 7, 2),\n  /* 101  */ V(2, 7, 2),\n  /* 110  */ V(7, 2, 2),\n  /* 111  */ V(7, 2, 2),\n\n  /* 0001 0111 ... */\n  /* 000  */ V(6, 4, 3),\t/* 256 */\n  /* 001  */ V(5, 5, 3),\n  /* 010  */ V(0, 7, 2),\n  /* 011  */ V(0, 7, 2),\n  /* 100  */ V(1, 7, 1),\n  /* 101  */ V(1, 7, 1),\n  /* 110  */ V(1, 7, 1),\n  /* 111  */ V(1, 7, 1),\n\n  /* 0001 1000 ... */\n  /* 00   */ V(7, 1, 1),\t/* 264  */\n  /* 01   */ V(7, 1, 1),\n  /* 10   */ V(7, 0, 2),\n  /* 11   */ V(3, 6, 2),\n\n  /* 0001 1001 ... */\n  /* 00   */ V(6, 3, 2),\t/* 268 */\n  /* 01   */ V(4, 5, 2),\n  /* 10   */ V(5, 4, 2),\n  /* 11   */ V(2, 6, 2),\n\n  /* 0001 1010 ... */\n  /* 0    */ V(6, 2, 1),\t/* 272 */\n  /* 1    */ V(1, 6, 1),\n\n  /* 0001 1011 ... */\n  /* 00   */ V(6, 1, 1),\t/* 274 */\n  /* 01   */ V(6, 1, 1),\n  /* 10   */ V(0, 6, 2),\n  /* 11   */ V(6, 0, 2),\n\n  /* 0001 1100 ... */\n  /* 00   */ V(5, 3, 1),\t/* 278 */\n  /* 01   */ V(5, 3, 1),\n  /* 10   */ V(3, 5, 2),\n  /* 11   */ V(4, 4, 2),\n\n  /* 0001 1101 ... */\n  /* 0    */ V(2, 5, 1),\t/* 282 */\n  /* 1    */ V(5, 2, 1),\n\n  /* 0001 1111 ... */\n  /* 0    */ V(1, 5, 1),\t/* 284 */\n  /* 1    */ V(0, 5, 1),\n\n  /* 0010 0000 ... */\n  /* 0    */ V(3, 4, 1),\t/* 286 */\n  /* 1    */ V(4, 3, 1),\n\n  /* 0010 0001 ... */\n  /* 0    */ V(5, 0, 1),\t/* 288 */\n  /* 1    */ V(2, 4, 1),\n\n  /* 0010 0010 ... */\n  /* 0    */ V(4, 2, 1),\t/* 290 */\n  /* 1    */ V(3, 3, 1),\n\n  /* 0010 0101 ... */\n  /* 0    */ V(0, 4, 1),\t/* 292 */\n  /* 1    */ V(4, 0, 1),\n\n  /* 0000 0110 1100 ... */\n  /* 0000 */ V(12, 14, 4),\t/* 294 */\n  /* 0001 */ PTR(400, 1),\n  /* 0010 */ V(13, 14, 3),\n  /* 0011 */ V(13, 14, 3),\n  /* 0100 */ V(14, 9, 3),\n  /* 0101 */ V(14, 9, 3),\n  /* 0110 */ V(14, 10, 4),\n  /* 0111 */ V(13, 9, 4),\n  /* 1000 */ V(14, 14, 2),\n  /* 1001 */ V(14, 14, 2),\n  /* 1010 */ V(14, 14, 2),\n  /* 1011 */ V(14, 14, 2),\n  /* 1100 */ V(14, 13, 3),\n  /* 1101 */ V(14, 13, 3),\n  /* 1110 */ V(14, 11, 3),\n  /* 1111 */ V(14, 11, 3),\n\n  /* 0000 0110 1101 ... */\n  /* 000  */ V(11, 14, 2),\t/* 310 */\n  /* 001  */ V(11, 14, 2),\n  /* 010  */ V(12, 13, 2),\n  /* 011  */ V(12, 13, 2),\n  /* 100  */ V(13, 12, 3),\n  /* 101  */ V(13, 11, 3),\n  /* 110  */ V(10, 14, 2),\n  /* 111  */ V(10, 14, 2),\n\n  /* 0000 0110 1110 ... */\n  /* 000  */ V(12, 12, 2),\t/* 318 */\n  /* 001  */ V(12, 12, 2),\n  /* 010  */ V(10, 13, 3),\n  /* 011  */ V(13, 10, 3),\n  /* 100  */ V(7, 14, 3),\n  /* 101  */ V(10, 12, 3),\n  /* 110  */ V(12, 10, 2),\n  /* 111  */ V(12, 10, 2),\n\n  /* 0000 0110 1111 ... */\n  /* 000  */ V(12, 9, 3),\t/* 326 */\n  /* 001  */ V(7, 13, 3),\n  /* 010  */ V(5, 14, 2),\n  /* 011  */ V(5, 14, 2),\n  /* 100  */ V(11, 13, 1),\n  /* 101  */ V(11, 13, 1),\n  /* 110  */ V(11, 13, 1),\n  /* 111  */ V(11, 13, 1),\n\n  /* 0000 1011 0000 ... */\n  /* 00   */ V(9, 14, 1),\t/* 334 */\n  /* 01   */ V(9, 14, 1),\n  /* 10   */ V(11, 12, 2),\n  /* 11   */ V(12, 11, 2),\n\n  /* 0000 1011 0001 ... */\n  /* 00   */ V(8, 14, 2),\t/* 338 */\n  /* 01   */ V(14, 8, 2),\n  /* 10   */ V(9, 13, 2),\n  /* 11   */ V(14, 7, 2),\n\n  /* 0000 1011 0010 ... */\n  /* 00   */ V(11, 11, 2),\t/* 342 */\n  /* 01   */ V(8, 13, 2),\n  /* 10   */ V(13, 8, 2),\n  /* 11   */ V(6, 14, 2),\n\n  /* 0000 1011 0011 ... */\n  /* 0    */ V(14, 6, 1),\t/* 346 */\n  /* 1    */ V(9, 12, 1),\n\n  /* 0000 1011 0100 ... */\n  /* 00   */ V(10, 11, 2),\t/* 348 */\n  /* 01   */ V(11, 10, 2),\n  /* 10   */ V(14, 5, 2),\n  /* 11   */ V(13, 7, 2),\n\n  /* 0000 1011 0101 ... */\n  /* 00   */ V(4, 14, 1),\t/* 352 */\n  /* 01   */ V(4, 14, 1),\n  /* 10   */ V(14, 4, 2),\n  /* 11   */ V(8, 12, 2),\n\n  /* 0000 1011 0110 ... */\n  /* 0    */ V(12, 8, 1),\t/* 356 */\n  /* 1    */ V(3, 14, 1),\n\n  /* 0000 1011 0111 ... */\n  /* 00   */ V(6, 13, 1),\t/* 358 */\n  /* 01   */ V(6, 13, 1),\n  /* 10   */ V(13, 6, 2),\n  /* 11   */ V(9, 11, 2),\n\n  /* 0000 1011 1000 ... */\n  /* 00   */ V(11, 9, 2),\t/* 362 */\n  /* 01   */ V(10, 10, 2),\n  /* 10   */ V(14, 1, 1),\n  /* 11   */ V(14, 1, 1),\n\n  /* 0000 1011 1001 ... */\n  /* 00   */ V(13, 4, 1),\t/* 366 */\n  /* 01   */ V(13, 4, 1),\n  /* 10   */ V(11, 8, 2),\n  /* 11   */ V(10, 9, 2),\n\n  /* 0000 1011 1010 ... */\n  /* 00   */ V(7, 11, 1),\t/* 370 */\n  /* 01   */ V(7, 11, 1),\n  /* 10   */ V(11, 7, 2),\n  /* 11   */ V(13, 0, 2),\n\n  /* 0000 1011 1100 ... */\n  /* 0    */ V(0, 14, 1),\t/* 374 */\n  /* 1    */ V(14, 0, 1),\n\n  /* 0000 1011 1101 ... */\n  /* 0    */ V(5, 13, 1),\t/* 376 */\n  /* 1    */ V(13, 5, 1),\n\n  /* 0000 1011 1110 ... */\n  /* 0    */ V(7, 12, 1),\t/* 378 */\n  /* 1    */ V(12, 7, 1),\n\n  /* 0000 1011 1111 ... */\n  /* 0    */ V(4, 13, 1),\t/* 380 */\n  /* 1    */ V(8, 11, 1),\n\n  /* 0000 1100 0000 ... */\n  /* 0    */ V(9, 10, 1),\t/* 382 */\n  /* 1    */ V(6, 12, 1),\n\n  /* 0000 1100 0001 ... */\n  /* 0    */ V(12, 6, 1),\t/* 384 */\n  /* 1    */ V(3, 13, 1),\n\n  /* 0000 1100 0010 ... */\n  /* 0    */ V(5, 12, 1),\t/* 386 */\n  /* 1    */ V(12, 5, 1),\n\n  /* 0000 1100 0100 ... */\n  /* 0    */ V(8, 10, 1),\t/* 388 */\n  /* 1    */ V(10, 8, 1),\n\n  /* 0000 1100 0101 ... */\n  /* 0    */ V(9, 9, 1),\t/* 390 */\n  /* 1    */ V(4, 12, 1),\n\n  /* 0000 1100 0110 ... */\n  /* 0    */ V(11, 6, 1),\t/* 392 */\n  /* 1    */ V(7, 10, 1),\n\n  /* 0000 1100 1000 ... */\n  /* 0    */ V(5, 11, 1),\t/* 394 */\n  /* 1    */ V(8, 9, 1),\n\n  /* 0000 1100 1011 ... */\n  /* 0    */ V(9, 8, 1),\t/* 396 */\n  /* 1    */ V(7, 9, 1),\n\n  /* 0000 1101 0101 ... */\n  /* 0    */ V(9, 7, 1),\t/* 398 */\n  /* 1    */ V(8, 8, 1),\n\n  /* 0000 0110 1100 0001 ... */\n  /* 0    */ V(14, 12, 1),\t/* 400 */\n  /* 1    */ V(13, 13, 1)\n];\n\nconst hufftab24 = [\n  /* 0000 */ PTR(16, 4),\n  /* 0001 */ PTR(32, 4),\n  /* 0010 */ PTR(48, 4),\n  /* 0011 */ V(15, 15, 4),\n  /* 0100 */ PTR(64, 4),\n  /* 0101 */ PTR(80, 4),\n  /* 0110 */ PTR(96, 4),\n  /* 0111 */ PTR(112, 4),\n  /* 1000 */ PTR(128, 4),\n  /* 1001 */ PTR(144, 4),\n  /* 1010 */ PTR(160, 3),\n  /* 1011 */ PTR(168, 2),\n  /* 1100 */ V(1, 1, 4),\n  /* 1101 */ V(0, 1, 4),\n  /* 1110 */ V(1, 0, 4),\n  /* 1111 */ V(0, 0, 4),\n\n  /* 0000 ... */\n  /* 0000 */ V(14, 15, 4),\t/* 16 */\n  /* 0001 */ V(15, 14, 4),\n  /* 0010 */ V(13, 15, 4),\n  /* 0011 */ V(15, 13, 4),\n  /* 0100 */ V(12, 15, 4),\n  /* 0101 */ V(15, 12, 4),\n  /* 0110 */ V(11, 15, 4),\n  /* 0111 */ V(15, 11, 4),\n  /* 1000 */ V(15, 10, 3),\n  /* 1001 */ V(15, 10, 3),\n  /* 1010 */ V(10, 15, 4),\n  /* 1011 */ V(9, 15, 4),\n  /* 1100 */ V(15, 9, 3),\n  /* 1101 */ V(15, 9, 3),\n  /* 1110 */ V(15, 8, 3),\n  /* 1111 */ V(15, 8, 3),\n\n  /* 0001 ... */\n  /* 0000 */ V(8, 15, 4),\t/* 32 */\n  /* 0001 */ V(7, 15, 4),\n  /* 0010 */ V(15, 7, 3),\n  /* 0011 */ V(15, 7, 3),\n  /* 0100 */ V(6, 15, 3),\n  /* 0101 */ V(6, 15, 3),\n  /* 0110 */ V(15, 6, 3),\n  /* 0111 */ V(15, 6, 3),\n  /* 1000 */ V(5, 15, 3),\n  /* 1001 */ V(5, 15, 3),\n  /* 1010 */ V(15, 5, 3),\n  /* 1011 */ V(15, 5, 3),\n  /* 1100 */ V(4, 15, 3),\n  /* 1101 */ V(4, 15, 3),\n  /* 1110 */ V(15, 4, 3),\n  /* 1111 */ V(15, 4, 3),\n\n  /* 0010 ... */\n  /* 0000 */ V(3, 15, 3),\t/* 48 */\n  /* 0001 */ V(3, 15, 3),\n  /* 0010 */ V(15, 3, 3),\n  /* 0011 */ V(15, 3, 3),\n  /* 0100 */ V(2, 15, 3),\n  /* 0101 */ V(2, 15, 3),\n  /* 0110 */ V(15, 2, 3),\n  /* 0111 */ V(15, 2, 3),\n  /* 1000 */ V(15, 1, 3),\n  /* 1001 */ V(15, 1, 3),\n  /* 1010 */ V(1, 15, 4),\n  /* 1011 */ V(15, 0, 4),\n  /* 1100 */ PTR(172, 3),\n  /* 1101 */ PTR(180, 3),\n  /* 1110 */ PTR(188, 3),\n  /* 1111 */ PTR(196, 3),\n\n  /* 0100 ... */\n  /* 0000 */ PTR(204, 4),\t/* 64 */\n  /* 0001 */ PTR(220, 3),\n  /* 0010 */ PTR(228, 3),\n  /* 0011 */ PTR(236, 3),\n  /* 0100 */ PTR(244, 2),\n  /* 0101 */ PTR(248, 2),\n  /* 0110 */ PTR(252, 2),\n  /* 0111 */ PTR(256, 2),\n  /* 1000 */ PTR(260, 2),\n  /* 1001 */ PTR(264, 2),\n  /* 1010 */ PTR(268, 2),\n  /* 1011 */ PTR(272, 2),\n  /* 1100 */ PTR(276, 2),\n  /* 1101 */ PTR(280, 3),\n  /* 1110 */ PTR(288, 2),\n  /* 1111 */ PTR(292, 2),\n\n  /* 0101 ... */\n  /* 0000 */ PTR(296, 2),\t/* 80 */\n  /* 0001 */ PTR(300, 3),\n  /* 0010 */ PTR(308, 2),\n  /* 0011 */ PTR(312, 3),\n  /* 0100 */ PTR(320, 1),\n  /* 0101 */ PTR(322, 2),\n  /* 0110 */ PTR(326, 2),\n  /* 0111 */ PTR(330, 1),\n  /* 1000 */ PTR(332, 2),\n  /* 1001 */ PTR(336, 1),\n  /* 1010 */ PTR(338, 1),\n  /* 1011 */ PTR(340, 1),\n  /* 1100 */ PTR(342, 1),\n  /* 1101 */ PTR(344, 1),\n  /* 1110 */ PTR(346, 1),\n  /* 1111 */ PTR(348, 1),\n\n  /* 0110 ... */\n  /* 0000 */ PTR(350, 1),\t/* 96 */\n  /* 0001 */ PTR(352, 1),\n  /* 0010 */ PTR(354, 1),\n  /* 0011 */ PTR(356, 1),\n  /* 0100 */ PTR(358, 1),\n  /* 0101 */ PTR(360, 1),\n  /* 0110 */ PTR(362, 1),\n  /* 0111 */ PTR(364, 1),\n  /* 1000 */ PTR(366, 1),\n  /* 1001 */ PTR(368, 1),\n  /* 1010 */ PTR(370, 2),\n  /* 1011 */ PTR(374, 1),\n  /* 1100 */ PTR(376, 2),\n  /* 1101 */ V(7, 3, 4),\n  /* 1110 */ PTR(380, 1),\n  /* 1111 */ V(7, 2, 4),\n\n  /* 0111 ... */\n  /* 0000 */ V(4, 6, 4),\t/* 112 */\n  /* 0001 */ V(6, 4, 4),\n  /* 0010 */ V(5, 5, 4),\n  /* 0011 */ V(7, 1, 4),\n  /* 0100 */ V(3, 6, 4),\n  /* 0101 */ V(6, 3, 4),\n  /* 0110 */ V(4, 5, 4),\n  /* 0111 */ V(5, 4, 4),\n  /* 1000 */ V(2, 6, 4),\n  /* 1001 */ V(6, 2, 4),\n  /* 1010 */ V(1, 6, 4),\n  /* 1011 */ V(6, 1, 4),\n  /* 1100 */ PTR(382, 1),\n  /* 1101 */ V(3, 5, 4),\n  /* 1110 */ V(5, 3, 4),\n  /* 1111 */ V(4, 4, 4),\n\n  /* 1000 ... */\n  /* 0000 */ V(2, 5, 4),\t/* 128 */\n  /* 0001 */ V(5, 2, 4),\n  /* 0010 */ V(1, 5, 4),\n  /* 0011 */ PTR(384, 1),\n  /* 0100 */ V(5, 1, 3),\n  /* 0101 */ V(5, 1, 3),\n  /* 0110 */ V(3, 4, 4),\n  /* 0111 */ V(4, 3, 4),\n  /* 1000 */ V(2, 4, 3),\n  /* 1001 */ V(2, 4, 3),\n  /* 1010 */ V(4, 2, 3),\n  /* 1011 */ V(4, 2, 3),\n  /* 1100 */ V(3, 3, 3),\n  /* 1101 */ V(3, 3, 3),\n  /* 1110 */ V(1, 4, 3),\n  /* 1111 */ V(1, 4, 3),\n\n  /* 1001 ... */\n  /* 0000 */ V(4, 1, 3),\t/* 144 */\n  /* 0001 */ V(4, 1, 3),\n  /* 0010 */ V(0, 4, 4),\n  /* 0011 */ V(4, 0, 4),\n  /* 0100 */ V(2, 3, 3),\n  /* 0101 */ V(2, 3, 3),\n  /* 0110 */ V(3, 2, 3),\n  /* 0111 */ V(3, 2, 3),\n  /* 1000 */ V(1, 3, 2),\n  /* 1001 */ V(1, 3, 2),\n  /* 1010 */ V(1, 3, 2),\n  /* 1011 */ V(1, 3, 2),\n  /* 1100 */ V(3, 1, 2),\n  /* 1101 */ V(3, 1, 2),\n  /* 1110 */ V(3, 1, 2),\n  /* 1111 */ V(3, 1, 2),\n\n  /* 1010 ... */\n  /* 000  */ V(0, 3, 3),\t/* 160 */\n  /* 001  */ V(3, 0, 3),\n  /* 010  */ V(2, 2, 2),\n  /* 011  */ V(2, 2, 2),\n  /* 100  */ V(1, 2, 1),\n  /* 101  */ V(1, 2, 1),\n  /* 110  */ V(1, 2, 1),\n  /* 111  */ V(1, 2, 1),\n\n  /* 1011 ... */\n  /* 00   */ V(2, 1, 1),\t/* 168 */\n  /* 01   */ V(2, 1, 1),\n  /* 10   */ V(0, 2, 2),\n  /* 11   */ V(2, 0, 2),\n\n  /* 0010 1100 ... */\n  /* 000  */ V(0, 15, 1),\t/* 172 */\n  /* 001  */ V(0, 15, 1),\n  /* 010  */ V(0, 15, 1),\n  /* 011  */ V(0, 15, 1),\n  /* 100  */ V(14, 14, 3),\n  /* 101  */ V(13, 14, 3),\n  /* 110  */ V(14, 13, 3),\n  /* 111  */ V(12, 14, 3),\n\n  /* 0010 1101 ... */\n  /* 000  */ V(14, 12, 3),\t/* 180 */\n  /* 001  */ V(13, 13, 3),\n  /* 010  */ V(11, 14, 3),\n  /* 011  */ V(14, 11, 3),\n  /* 100  */ V(12, 13, 3),\n  /* 101  */ V(13, 12, 3),\n  /* 110  */ V(10, 14, 3),\n  /* 111  */ V(14, 10, 3),\n\n  /* 0010 1110 ... */\n  /* 000  */ V(11, 13, 3),\t/* 188 */\n  /* 001  */ V(13, 11, 3),\n  /* 010  */ V(12, 12, 3),\n  /* 011  */ V(9, 14, 3),\n  /* 100  */ V(14, 9, 3),\n  /* 101  */ V(10, 13, 3),\n  /* 110  */ V(13, 10, 3),\n  /* 111  */ V(11, 12, 3),\n\n  /* 0010 1111 ... */\n  /* 000  */ V(12, 11, 3),\t/* 196 */\n  /* 001  */ V(8, 14, 3),\n  /* 010  */ V(14, 8, 3),\n  /* 011  */ V(9, 13, 3),\n  /* 100  */ V(13, 9, 3),\n  /* 101  */ V(7, 14, 3),\n  /* 110  */ V(14, 7, 3),\n  /* 111  */ V(10, 12, 3),\n\n  /* 0100 0000 ... */\n  /* 0000 */ V(12, 10, 3),\t/* 204 */\n  /* 0001 */ V(12, 10, 3),\n  /* 0010 */ V(11, 11, 3),\n  /* 0011 */ V(11, 11, 3),\n  /* 0100 */ V(8, 13, 3),\n  /* 0101 */ V(8, 13, 3),\n  /* 0110 */ V(13, 8, 3),\n  /* 0111 */ V(13, 8, 3),\n  /* 1000 */ V(0, 14, 4),\n  /* 1001 */ V(14, 0, 4),\n  /* 1010 */ V(0, 13, 3),\n  /* 1011 */ V(0, 13, 3),\n  /* 1100 */ V(14, 6, 2),\n  /* 1101 */ V(14, 6, 2),\n  /* 1110 */ V(14, 6, 2),\n  /* 1111 */ V(14, 6, 2),\n\n  /* 0100 0001 ... */\n  /* 000  */ V(6, 14, 3),\t/* 220 */\n  /* 001  */ V(9, 12, 3),\n  /* 010  */ V(12, 9, 2),\n  /* 011  */ V(12, 9, 2),\n  /* 100  */ V(5, 14, 2),\n  /* 101  */ V(5, 14, 2),\n  /* 110  */ V(11, 10, 2),\n  /* 111  */ V(11, 10, 2),\n\n  /* 0100 0010 ... */\n  /* 000  */ V(14, 5, 2),\t/* 228 */\n  /* 001  */ V(14, 5, 2),\n  /* 010  */ V(10, 11, 3),\n  /* 011  */ V(7, 13, 3),\n  /* 100  */ V(13, 7, 2),\n  /* 101  */ V(13, 7, 2),\n  /* 110  */ V(14, 4, 2),\n  /* 111  */ V(14, 4, 2),\n\n  /* 0100 0011 ... */\n  /* 000  */ V(8, 12, 2),\t/* 236 */\n  /* 001  */ V(8, 12, 2),\n  /* 010  */ V(12, 8, 2),\n  /* 011  */ V(12, 8, 2),\n  /* 100  */ V(4, 14, 3),\n  /* 101  */ V(2, 14, 3),\n  /* 110  */ V(3, 14, 2),\n  /* 111  */ V(3, 14, 2),\n\n  /* 0100 0100 ... */\n  /* 00   */ V(6, 13, 2),\t/* 244 */\n  /* 01   */ V(13, 6, 2),\n  /* 10   */ V(14, 3, 2),\n  /* 11   */ V(9, 11, 2),\n\n  /* 0100 0101 ... */\n  /* 00   */ V(11, 9, 2),\t/* 248 */\n  /* 01   */ V(10, 10, 2),\n  /* 10   */ V(14, 2, 2),\n  /* 11   */ V(1, 14, 2),\n\n  /* 0100 0110 ... */\n  /* 00   */ V(14, 1, 2),\t/* 252 */\n  /* 01   */ V(5, 13, 2),\n  /* 10   */ V(13, 5, 2),\n  /* 11   */ V(7, 12, 2),\n\n  /* 0100 0111 ... */\n  /* 00   */ V(12, 7, 2),\t/* 256 */\n  /* 01   */ V(4, 13, 2),\n  /* 10   */ V(8, 11, 2),\n  /* 11   */ V(11, 8, 2),\n\n  /* 0100 1000 ... */\n  /* 00   */ V(13, 4, 2),\t/* 260 */\n  /* 01   */ V(9, 10, 2),\n  /* 10   */ V(10, 9, 2),\n  /* 11   */ V(6, 12, 2),\n\n  /* 0100 1001 ... */\n  /* 00   */ V(12, 6, 2),\t/* 264 */\n  /* 01   */ V(3, 13, 2),\n  /* 10   */ V(13, 3, 2),\n  /* 11   */ V(2, 13, 2),\n\n  /* 0100 1010 ... */\n  /* 00   */ V(13, 2, 2),\t/* 268 */\n  /* 01   */ V(1, 13, 2),\n  /* 10   */ V(7, 11, 2),\n  /* 11   */ V(11, 7, 2),\n\n  /* 0100 1011 ... */\n  /* 00   */ V(13, 1, 2),\t/* 272 */\n  /* 01   */ V(5, 12, 2),\n  /* 10   */ V(12, 5, 2),\n  /* 11   */ V(8, 10, 2),\n\n  /* 0100 1100 ... */\n  /* 00   */ V(10, 8, 2),\t/* 276 */\n  /* 01   */ V(9, 9, 2),\n  /* 10   */ V(4, 12, 2),\n  /* 11   */ V(12, 4, 2),\n\n  /* 0100 1101 ... */\n  /* 000  */ V(6, 11, 2),\t/* 280 */\n  /* 001  */ V(6, 11, 2),\n  /* 010  */ V(11, 6, 2),\n  /* 011  */ V(11, 6, 2),\n  /* 100  */ V(13, 0, 3),\n  /* 101  */ V(0, 12, 3),\n  /* 110  */ V(3, 12, 2),\n  /* 111  */ V(3, 12, 2),\n\n  /* 0100 1110 ... */\n  /* 00   */ V(12, 3, 2),\t/* 288 */\n  /* 01   */ V(7, 10, 2),\n  /* 10   */ V(10, 7, 2),\n  /* 11   */ V(2, 12, 2),\n\n  /* 0100 1111 ... */\n  /* 00   */ V(12, 2, 2),\t/* 292 */\n  /* 01   */ V(5, 11, 2),\n  /* 10   */ V(11, 5, 2),\n  /* 11   */ V(1, 12, 2),\n\n  /* 0101 0000 ... */\n  /* 00   */ V(8, 9, 2),\t/* 296 */\n  /* 01   */ V(9, 8, 2),\n  /* 10   */ V(12, 1, 2),\n  /* 11   */ V(4, 11, 2),\n\n  /* 0101 0001 ... */\n  /* 000  */ V(12, 0, 3),\t/* 300 */\n  /* 001  */ V(0, 11, 3),\n  /* 010  */ V(3, 11, 2),\n  /* 011  */ V(3, 11, 2),\n  /* 100  */ V(11, 0, 3),\n  /* 101  */ V(0, 10, 3),\n  /* 110  */ V(1, 10, 2),\n  /* 111  */ V(1, 10, 2),\n\n  /* 0101 0010 ... */\n  /* 00   */ V(11, 4, 1),\t/* 308 */\n  /* 01   */ V(11, 4, 1),\n  /* 10   */ V(6, 10, 2),\n  /* 11   */ V(10, 6, 2),\n\n  /* 0101 0011 ... */\n  /* 000  */ V(7, 9, 2),\t/* 312 */\n  /* 001  */ V(7, 9, 2),\n  /* 010  */ V(9, 7, 2),\n  /* 011  */ V(9, 7, 2),\n  /* 100  */ V(10, 0, 3),\n  /* 101  */ V(0, 9, 3),\n  /* 110  */ V(9, 0, 2),\n  /* 111  */ V(9, 0, 2),\n\n  /* 0101 0100 ... */\n  /* 0    */ V(11, 3, 1),\t/* 320 */\n  /* 1    */ V(8, 8, 1),\n\n  /* 0101 0101 ... */\n  /* 00   */ V(2, 11, 2),\t/* 322 */\n  /* 01   */ V(5, 10, 2),\n  /* 10   */ V(11, 2, 1),\n  /* 11   */ V(11, 2, 1),\n\n  /* 0101 0110 ... */\n  /* 00   */ V(10, 5, 2),\t/* 326 */\n  /* 01   */ V(1, 11, 2),\n  /* 10   */ V(11, 1, 2),\n  /* 11   */ V(6, 9, 2),\n\n  /* 0101 0111 ... */\n  /* 0    */ V(9, 6, 1),\t/* 330 */\n  /* 1    */ V(10, 4, 1),\n\n  /* 0101 1000 ... */\n  /* 00   */ V(4, 10, 2),\t/* 332 */\n  /* 01   */ V(7, 8, 2),\n  /* 10   */ V(8, 7, 1),\n  /* 11   */ V(8, 7, 1),\n\n  /* 0101 1001 ... */\n  /* 0    */ V(3, 10, 1),\t/* 336 */\n  /* 1    */ V(10, 3, 1),\n\n  /* 0101 1010 ... */\n  /* 0    */ V(5, 9, 1),\t/* 338 */\n  /* 1    */ V(9, 5, 1),\n\n  /* 0101 1011 ... */\n  /* 0    */ V(2, 10, 1),\t/* 340 */\n  /* 1    */ V(10, 2, 1),\n\n  /* 0101 1100 ... */\n  /* 0    */ V(10, 1, 1),\t/* 342 */\n  /* 1    */ V(6, 8, 1),\n\n  /* 0101 1101 ... */\n  /* 0    */ V(8, 6, 1),\t/* 344 */\n  /* 1    */ V(7, 7, 1),\n\n  /* 0101 1110 ... */\n  /* 0    */ V(4, 9, 1),\t/* 346 */\n  /* 1    */ V(9, 4, 1),\n\n  /* 0101 1111 ... */\n  /* 0    */ V(3, 9, 1),\t/* 348 */\n  /* 1    */ V(9, 3, 1),\n\n  /* 0110 0000 ... */\n  /* 0    */ V(5, 8, 1),\t/* 350 */\n  /* 1    */ V(8, 5, 1),\n\n  /* 0110 0001 ... */\n  /* 0    */ V(2, 9, 1),\t/* 352 */\n  /* 1    */ V(6, 7, 1),\n\n  /* 0110 0010 ... */\n  /* 0    */ V(7, 6, 1),\t/* 354 */\n  /* 1    */ V(9, 2, 1),\n\n  /* 0110 0011 ... */\n  /* 0    */ V(1, 9, 1),\t/* 356 */\n  /* 1    */ V(9, 1, 1),\n\n  /* 0110 0100 ... */\n  /* 0    */ V(4, 8, 1),\t/* 358 */\n  /* 1    */ V(8, 4, 1),\n\n  /* 0110 0101 ... */\n  /* 0    */ V(5, 7, 1),\t/* 360 */\n  /* 1    */ V(7, 5, 1),\n\n  /* 0110 0110 ... */\n  /* 0    */ V(3, 8, 1),\t/* 362 */\n  /* 1    */ V(8, 3, 1),\n\n  /* 0110 0111 ... */\n  /* 0    */ V(6, 6, 1),\t/* 364 */\n  /* 1    */ V(2, 8, 1),\n\n  /* 0110 1000 ... */\n  /* 0    */ V(8, 2, 1),\t/* 366 */\n  /* 1    */ V(1, 8, 1),\n\n  /* 0110 1001 ... */\n  /* 0    */ V(4, 7, 1),\t/* 368 */\n  /* 1    */ V(7, 4, 1),\n\n  /* 0110 1010 ... */\n  /* 00   */ V(8, 1, 1),\t/* 370 */\n  /* 01   */ V(8, 1, 1),\n  /* 10   */ V(0, 8, 2),\n  /* 11   */ V(8, 0, 2),\n\n  /* 0110 1011 ... */\n  /* 0    */ V(5, 6, 1),\t/* 374 */\n  /* 1    */ V(6, 5, 1),\n\n  /* 0110 1100 ... */\n  /* 00   */ V(1, 7, 1),\t/* 376 */\n  /* 01   */ V(1, 7, 1),\n  /* 10   */ V(0, 7, 2),\n  /* 11   */ V(7, 0, 2),\n\n  /* 0110 1110 ... */\n  /* 0    */ V(3, 7, 1),\t/* 380  */\n  /* 1    */ V(2, 7, 1),\n\n  /* 0111 1100 ... */\n  /* 0    */ V(0, 6, 1),\t/* 382 */\n  /* 1    */ V(6, 0, 1),\n\n  /* 1000 0011 ... */\n  /* 0    */ V(0, 5, 1),\t/* 384 */\n  /* 1    */ V(5, 0, 1)\n];\n\n/* hufftable constructor */\nfunction MP3Hufftable(table, linbits, startbits) {\n    this.table = table;\n    this.linbits = linbits;\n    this.startbits = startbits;\n};\n\n/* external tables */\nexports.huff_quad_table = [ hufftabA, hufftabB ];\nexports.huff_pair_table = [\n  /*  0 */ new MP3Hufftable(hufftab0,   0, 0),\n  /*  1 */ new MP3Hufftable(hufftab1,   0, 3),\n  /*  2 */ new MP3Hufftable(hufftab2,   0, 3),\n  /*  3 */ new MP3Hufftable(hufftab3,   0, 3),\n  /*  4 */ null, //new MP3Hufftable(0 /* not used */),\n  /*  5 */ new MP3Hufftable(hufftab5,   0, 3),\n  /*  6 */ new MP3Hufftable(hufftab6,   0, 4),\n  /*  7 */ new MP3Hufftable(hufftab7,   0, 4),\n  /*  8 */ new MP3Hufftable(hufftab8,   0, 4),\n  /*  9 */ new MP3Hufftable(hufftab9,   0, 4),\n  /* 10 */ new MP3Hufftable(hufftab10,  0, 4),\n  /* 11 */ new MP3Hufftable(hufftab11,  0, 4),\n  /* 12 */ new MP3Hufftable(hufftab12,  0, 4),\n  /* 13 */ new MP3Hufftable(hufftab13,  0, 4),\n  /* 14 */ null, //new MP3Hufftable(0 /* not used */),\n  /* 15 */ new MP3Hufftable(hufftab15,  0, 4),\n  /* 16 */ new MP3Hufftable(hufftab16,  1, 4),\n  /* 17 */ new MP3Hufftable(hufftab16,  2, 4),\n  /* 18 */ new MP3Hufftable(hufftab16,  3, 4),\n  /* 19 */ new MP3Hufftable(hufftab16,  4, 4),\n  /* 20 */ new MP3Hufftable(hufftab16,  6, 4),\n  /* 21 */ new MP3Hufftable(hufftab16,  8, 4),\n  /* 22 */ new MP3Hufftable(hufftab16, 10, 4),\n  /* 23 */ new MP3Hufftable(hufftab16, 13, 4),\n  /* 24 */ new MP3Hufftable(hufftab24,  4, 4),\n  /* 25 */ new MP3Hufftable(hufftab24,  5, 4),\n  /* 26 */ new MP3Hufftable(hufftab24,  6, 4),\n  /* 27 */ new MP3Hufftable(hufftab24,  7, 4),\n  /* 28 */ new MP3Hufftable(hufftab24,  8, 4),\n  /* 29 */ new MP3Hufftable(hufftab24,  9, 4),\n  /* 30 */ new MP3Hufftable(hufftab24, 11, 4),\n  /* 31 */ new MP3Hufftable(hufftab24, 13, 4)\n];\n",
+    "var AV = (window.AV);\n\nconst ENCODINGS = ['latin1', 'utf16-bom', 'utf16-be', 'utf8'];\n\nvar ID3Stream = AV.Base.extend({\n    constructor: function(header, stream) {\n        this.header = header;\n        this.stream = stream;\n        this.offset = 0;\n    },\n    \n    read: function() {\n        if (!this.data) {\n            this.data = {};\n            \n            // read all frames\n            var frame;\n            while (frame = this.readFrame()) {\n                // if we already have an instance of this key, add it to an array\n                if (frame.key in this.data) {\n                    if (!Array.isArray(this.data[frame.key]))\n                        this.data[frame.key] = [this.data[frame.key]];\n                        \n                    this.data[frame.key].push(frame.value);\n                } else {\n                    this.data[frame.key] = frame.value;\n                }\n            }\n        }\n\n        return this.data;\n    },\n    \n    readFrame: function() {\n        if (this.offset >= this.header.length)\n            return null;\n        \n        // get the header    \n        var header = this.readHeader();\n        var decoder = header.identifier;\n        \n        if (header.identifier.charCodeAt(0) === 0) {\n            this.offset += this.header.length + 1;\n            return null;\n        }\n        \n        // map common frame names to a single type\n        if (!this.frameTypes[decoder]) {\n            for (var key in this.map) {\n                if (this.map[key].indexOf(decoder) !== -1) {\n                    decoder = key;\n                    break;\n                }\n            }\n        }\n\n        if (this.frameTypes[decoder]) {\n            // decode the frame\n            var frame = this.decodeFrame(header, this.frameTypes[decoder]),\n                keys = Object.keys(frame);\n            \n            // if it only returned one key, use that as the value    \n            if (keys.length === 1)\n                frame = frame[keys[0]];\n            \n            var result = {\n                value: frame\n            };\n            \n        } else {\n            // No frame type found, treat it as binary\n            var result = {\n                value: this.stream.readBuffer(Math.min(header.length, this.header.length - this.offset))\n            };\n        }\n\n        result.key = this.names[header.identifier] ? this.names[header.identifier] : header.identifier;\n        \n        // special sauce for cover art, which should just be a buffer\n        if (result.key === 'coverArt')\n            result.value = result.value.data;\n\n        this.offset += 10 + header.length;\n        return result;\n    },\n\n    decodeFrame: function(header, fields) {\n        var stream = this.stream,\n            start = stream.offset;\n            \n        var encoding = 0, ret = {};\n        var len = Object.keys(fields).length, i = 0;\n        \n        for (var key in fields) {\n            var type = fields[key];\n            var rest = header.length - (stream.offset - start);\n            i++;\n            \n            // check for special field names\n            switch (key) {\n                case 'encoding':\n                    encoding = stream.readUInt8();\n                    continue;\n                \n                case 'language':\n                    ret.language = stream.readString(3);\n                    continue;\n            }\n            \n            // check types\n            switch (type) {                    \n                case 'latin1':\n                    ret[key] = stream.readString(i === len ? rest : null, 'latin1');\n                    break;\n                    \n                case 'string':\n                    ret[key] = stream.readString(i === len ? rest : null, ENCODINGS[encoding]);\n                    break;\n                    \n                case 'binary':\n                    ret[key] = stream.readBuffer(rest)\n                    break;\n                    \n                case 'int16':\n                    ret[key] = stream.readInt16();\n                    break;\n                    \n                case 'int8':\n                    ret[key] = stream.readInt8();\n                    break;\n                    \n                case 'int24':\n                    ret[key] = stream.readInt24();\n                    break;\n                    \n                case 'int32':\n                    ret[key] = stream.readInt32();\n                    break;\n                    \n                case 'int32+':\n                    ret[key] = stream.readInt32();\n                    if (rest > 4)\n                        throw new Error('Seriously dude? Stop playing this song and get a life!');\n                        \n                    break;\n                    \n                case 'date':\n                    var val = stream.readString(8);\n                    ret[key] = new Date(val.slice(0, 4), val.slice(4, 6) - 1, val.slice(6, 8));\n                    break;\n                    \n                case 'frame_id':\n                    ret[key] = stream.readString(4);\n                    break;\n                    \n                default:\n                    throw new Error('Unknown key type ' + type);\n            }\n        }\n        \n        // Just in case something went wrong...\n        var rest = header.length - (stream.offset - start);\n        if (rest > 0)\n            stream.advance(rest);\n        \n        return ret;\n    }\n});\n\n// ID3 v2.3 and v2.4 support\nexports.ID3v23Stream = ID3Stream.extend({\n    readHeader: function() {\n        var identifier = this.stream.readString(4);        \n        var length = 0;\n        \n        if (this.header.major === 4) {\n            for (var i = 0; i < 4; i++)\n                length = (length << 7) + (this.stream.readUInt8() & 0x7f);\n        } else {\n            length = this.stream.readUInt32();\n        }\n        \n        return {\n            identifier: identifier,\n            length: length,\n            flags: this.stream.readUInt16()\n        };\n    },\n    \n    map: {\n        text: [\n            // Identification Frames\n            'TIT1', 'TIT2', 'TIT3', 'TALB', 'TOAL', 'TRCK', 'TPOS', 'TSST', 'TSRC',\n\n            // Involved Persons Frames\n            'TPE1', 'TPE2', 'TPE3', 'TPE4', 'TOPE', 'TEXT', 'TOLY', 'TCOM', 'TMCL', 'TIPL', 'TENC',\n\n            // Derived and Subjective Properties Frames\n            'TBPM', 'TLEN', 'TKEY', 'TLAN', 'TCON', 'TFLT', 'TMED', 'TMOO',\n\n            // Rights and Licence Frames\n            'TCOP', 'TPRO', 'TPUB', 'TOWN', 'TRSN', 'TRSO',\n\n            // Other Text Frames\n            'TOFN', 'TDLY', 'TDEN', 'TDOR', 'TDRC', 'TDRL', 'TDTG', 'TSSE', 'TSOA', 'TSOP', 'TSOT',\n            \n            // Deprecated Text Frames\n            'TDAT', 'TIME', 'TORY', 'TRDA', 'TSIZ', 'TYER',\n            \n            // Non-standard iTunes Frames\n            'TCMP', 'TSO2', 'TSOC'\n        ],\n        \n        url: [\n            'WCOM', 'WCOP', 'WOAF', 'WOAR', 'WOAS', 'WORS', 'WPAY', 'WPUB'\n        ]\n    },\n    \n    frameTypes: {        \n        text: {\n            encoding: 1,\n            value: 'string'\n        },\n        \n        url: {\n            value: 'latin1'\n        },\n        \n        TXXX: {\n            encoding: 1,\n            description: 'string',\n            value: 'string'\n        },\n        \n        WXXX: {\n            encoding: 1,\n            description: 'string',\n            value: 'latin1',\n        },\n        \n        USLT: {\n            encoding: 1,\n            language: 1,\n            description: 'string',\n            value: 'string'\n        },\n        \n        COMM: {\n            encoding: 1,\n            language: 1,\n            description: 'string',\n            value: 'string'\n        },\n        \n        APIC: {\n            encoding: 1,\n            mime: 'latin1',\n            type: 'int8',\n            description: 'string',\n            data: 'binary'\n        },\n        \n        UFID: {\n            owner: 'latin1',\n            identifier: 'binary'\n        },\n\n        MCDI: {\n            value: 'binary'\n        },\n        \n        PRIV: {\n            owner: 'latin1',\n            value: 'binary'\n        },\n        \n        GEOB: {\n            encoding: 1,\n            mime: 'latin1',\n            filename: 'string',\n            description: 'string',\n            data: 'binary'\n        },\n        \n        PCNT: {\n            value: 'int32+'\n        },\n        \n        POPM: {\n            email: 'latin1',\n            rating: 'int8',\n            counter: 'int32+'\n        },\n        \n        AENC: {\n            owner: 'latin1',\n            previewStart: 'int16',\n            previewLength: 'int16',\n            encryptionInfo: 'binary'\n        },\n        \n        ETCO: {\n            format: 'int8',\n            data: 'binary'  // TODO\n        },\n        \n        MLLT: {\n            framesBetweenReference: 'int16',\n            bytesBetweenReference: 'int24',\n            millisecondsBetweenReference: 'int24',\n            bitsForBytesDeviation: 'int8',\n            bitsForMillisecondsDev: 'int8',\n            data: 'binary' // TODO\n        },\n        \n        SYTC: {\n            format: 'int8',\n            tempoData: 'binary' // TODO\n        },\n        \n        SYLT: {\n            encoding: 1,\n            language: 1,\n            format: 'int8',\n            contentType: 'int8',\n            description: 'string',\n            data: 'binary' // TODO\n        },\n        \n        RVA2: {\n            identification: 'latin1',\n            data: 'binary' // TODO\n        },\n        \n        EQU2: {\n            interpolationMethod: 'int8',\n            identification: 'latin1',\n            data: 'binary' // TODO\n        },\n        \n        RVRB: {\n            left: 'int16',\n            right: 'int16',\n            bouncesLeft: 'int8',\n            bouncesRight: 'int8',\n            feedbackLL: 'int8',\n            feedbackLR: 'int8',\n            feedbackRR: 'int8',\n            feedbackRL: 'int8',\n            premixLR: 'int8',\n            premixRL: 'int8'\n        },\n        \n        RBUF: {\n            size: 'int24',\n            flag: 'int8',\n            offset: 'int32'\n        },\n        \n        LINK: {\n            identifier: 'frame_id',\n            url: 'latin1',\n            data: 'binary' // TODO stringlist?\n        },\n        \n        POSS: {\n            format: 'int8',\n            position: 'binary' // TODO\n        },\n        \n        USER: {\n            encoding: 1,\n            language: 1,\n            value: 'string'\n        },\n        \n        OWNE: {\n            encoding: 1,\n            price: 'latin1',\n            purchaseDate: 'date',\n            seller: 'string'\n        },\n        \n        COMR: {\n            encoding: 1,\n            price: 'latin1',\n            validUntil: 'date',\n            contactURL: 'latin1',\n            receivedAs: 'int8',\n            seller: 'string',\n            description: 'string',\n            logoMime: 'latin1',\n            logo: 'binary'\n        },\n        \n        ENCR: {\n            owner: 'latin1',\n            methodSymbol: 'int8',\n            data: 'binary'\n        },\n        \n        GRID: {\n            owner: 'latin1',\n            groupSymbol: 'int8',\n            data: 'binary'\n        },\n        \n        SIGN: {\n            groupSymbol: 'int8',\n            signature: 'binary'\n        },\n        \n        SEEK: {\n            value: 'int32'\n        },\n        \n        ASPI: {\n            dataStart: 'int32',\n            dataLength: 'int32',\n            numPoints: 'int16',\n            bitsPerPoint: 'int8',\n            data: 'binary' // TODO\n        },\n        \n        // Deprecated ID3 v2.3 frames\n        IPLS: {\n            encoding: 1,\n            value: 'string' // list?\n        },\n        \n        RVAD: {\n            adjustment: 'int8',\n            bits: 'int8',\n            data: 'binary' // TODO\n        },\n        \n        EQUA: {\n            adjustmentBits: 'int8',\n            data: 'binary' // TODO\n        }\n    },\n    \n    names: {\n        // Identification Frames\n        'TIT1': 'grouping',\n        'TIT2': 'title',\n        'TIT3': 'subtitle',\n        'TALB': 'album',\n        'TOAL': 'originalAlbumTitle',\n        'TRCK': 'trackNumber',\n        'TPOS': 'diskNumber',\n        'TSST': 'setSubtitle',\n        'TSRC': 'ISRC',\n\n        // Involved Persons Frames\n        'TPE1': 'artist',\n        'TPE2': 'albumArtist',\n        'TPE3': 'conductor',\n        'TPE4': 'modifiedBy',\n        'TOPE': 'originalArtist',\n        'TEXT': 'lyricist',\n        'TOLY': 'originalLyricist',\n        'TCOM': 'composer',\n        'TMCL': 'musicianCreditsList',\n        'TIPL': 'involvedPeopleList',\n        'TENC': 'encodedBy',\n\n        // Derived and Subjective Properties Frames\n        'TBPM': 'tempo',\n        'TLEN': 'length',\n        'TKEY': 'initialKey',\n        'TLAN': 'language',\n        'TCON': 'genre',\n        'TFLT': 'fileType',\n        'TMED': 'mediaType',\n        'TMOO': 'mood',\n\n        // Rights and Licence Frames\n        'TCOP': 'copyright',\n        'TPRO': 'producedNotice',\n        'TPUB': 'publisher',\n        'TOWN': 'fileOwner',\n        'TRSN': 'internetRadioStationName',\n        'TRSO': 'internetRadioStationOwner',\n\n        // Other Text Frames\n        'TOFN': 'originalFilename',\n        'TDLY': 'playlistDelay',\n        'TDEN': 'encodingTime',\n        'TDOR': 'originalReleaseTime',\n        'TDRC': 'recordingTime',\n        'TDRL': 'releaseTime',\n        'TDTG': 'taggingTime',\n        'TSSE': 'encodedWith',\n        'TSOA': 'albumSortOrder',\n        'TSOP': 'performerSortOrder',\n        'TSOT': 'titleSortOrder',\n        \n        // User defined text information\n        'TXXX': 'userText',\n        \n        // Unsynchronised lyrics/text transcription\n        'USLT': 'lyrics',\n\n        // Attached Picture Frame\n        'APIC': 'coverArt',\n\n        // Unique Identifier Frame\n        'UFID': 'uniqueIdentifier',\n\n        // Music CD Identifier Frame\n        'MCDI': 'CDIdentifier',\n\n        // Comment Frame\n        'COMM': 'comments',\n        \n        // URL link frames\n        'WCOM': 'commercialInformation',\n        'WCOP': 'copyrightInformation',\n        'WOAF': 'officialAudioFileWebpage',\n        'WOAR': 'officialArtistWebpage',\n        'WOAS': 'officialAudioSourceWebpage',\n        'WORS': 'officialInternetRadioStationHomepage',\n        'WPAY': 'payment',\n        'WPUB': 'officialPublisherWebpage',\n\n        // User Defined URL Link Frame\n        'WXXX': 'url',\n\n        'PRIV': 'private',\n        'GEOB': 'generalEncapsulatedObject',\n        'PCNT': 'playCount',\n        'POPM': 'rating',\n        'AENC': 'audioEncryption',\n        'ETCO': 'eventTimingCodes',\n        'MLLT': 'MPEGLocationLookupTable',\n        'SYTC': 'synchronisedTempoCodes',\n        'SYLT': 'synchronisedLyrics',\n        'RVA2': 'volumeAdjustment',\n        'EQU2': 'equalization',\n        'RVRB': 'reverb',\n        'RBUF': 'recommendedBufferSize',\n        'LINK': 'link',\n        'POSS': 'positionSynchronisation',\n        'USER': 'termsOfUse',\n        'OWNE': 'ownership',\n        'COMR': 'commercial',\n        'ENCR': 'encryption',\n        'GRID': 'groupIdentifier',\n        'SIGN': 'signature',\n        'SEEK': 'seek',\n        'ASPI': 'audioSeekPointIndex',\n\n        // Deprecated ID3 v2.3 frames\n        'TDAT': 'date',\n        'TIME': 'time',\n        'TORY': 'originalReleaseYear',\n        'TRDA': 'recordingDates',\n        'TSIZ': 'size',\n        'TYER': 'year',\n        'IPLS': 'involvedPeopleList',\n        'RVAD': 'volumeAdjustment',\n        'EQUA': 'equalization',\n        \n        // Non-standard iTunes frames\n        'TCMP': 'compilation',\n        'TSO2': 'albumArtistSortOrder',\n        'TSOC': 'composerSortOrder'\n    }\n});\n\n// ID3 v2.2 support\nexports.ID3v22Stream = exports.ID3v23Stream.extend({    \n    readHeader: function() {\n        var id = this.stream.readString(3);\n        \n        if (this.frameReplacements[id] && !this.frameTypes[id])\n            this.frameTypes[id] = this.frameReplacements[id];\n        \n        return {\n            identifier: this.replacements[id] || id,\n            length: this.stream.readUInt24()\n        };\n    },\n    \n    // map 3 char ID3 v2.2 names to 4 char ID3 v2.3/4 names\n    replacements: {\n        'UFI': 'UFID',\n        'TT1': 'TIT1',\n        'TT2': 'TIT2',\n        'TT3': 'TIT3',\n        'TP1': 'TPE1',\n        'TP2': 'TPE2',\n        'TP3': 'TPE3',\n        'TP4': 'TPE4',\n        'TCM': 'TCOM',\n        'TXT': 'TEXT',\n        'TLA': 'TLAN',\n        'TCO': 'TCON',\n        'TAL': 'TALB',\n        'TPA': 'TPOS',\n        'TRK': 'TRCK',\n        'TRC': 'TSRC',\n        'TYE': 'TYER',\n        'TDA': 'TDAT',\n        'TIM': 'TIME',\n        'TRD': 'TRDA',\n        'TMT': 'TMED',\n        'TFT': 'TFLT',\n        'TBP': 'TBPM',\n        'TCR': 'TCOP',\n        'TPB': 'TPUB',\n        'TEN': 'TENC',\n        'TSS': 'TSSE',\n        'TOF': 'TOFN',\n        'TLE': 'TLEN',\n        'TSI': 'TSIZ',\n        'TDY': 'TDLY',\n        'TKE': 'TKEY',\n        'TOT': 'TOAL',\n        'TOA': 'TOPE',\n        'TOL': 'TOLY',\n        'TOR': 'TORY',\n        'TXX': 'TXXX',\n        \n        'WAF': 'WOAF',\n        'WAR': 'WOAR',\n        'WAS': 'WOAS',\n        'WCM': 'WCOM',\n        'WCP': 'WCOP',\n        'WPB': 'WPUB',\n        'WXX': 'WXXX',\n        \n        'IPL': 'IPLS',\n        'MCI': 'MCDI',\n        'ETC': 'ETCO',\n        'MLL': 'MLLT',\n        'STC': 'SYTC',\n        'ULT': 'USLT',\n        'SLT': 'SYLT',\n        'COM': 'COMM',\n        'RVA': 'RVAD',\n        'EQU': 'EQUA',\n        'REV': 'RVRB',\n        \n        'GEO': 'GEOB',\n        'CNT': 'PCNT',\n        'POP': 'POPM',\n        'BUF': 'RBUF',\n        'CRA': 'AENC',\n        'LNK': 'LINK',\n        \n        // iTunes stuff\n        'TST': 'TSOT',\n        'TSP': 'TSOP',\n        'TSA': 'TSOA',\n        'TCP': 'TCMP',\n        'TS2': 'TSO2',\n        'TSC': 'TSOC'\n    },\n    \n    // replacements for ID3 v2.3/4 frames\n    frameReplacements: {\n        PIC: {\n            encoding: 1,\n            format: 'int24',\n            type: 'int8',\n            description: 'string',\n            data: 'binary'\n        },\n        \n        CRM: {\n            owner: 'latin1',\n            description: 'latin1',\n            data: 'binary'\n        }\n    }\n});",
+    "function IMDCT() {\n    this.tmp_imdct36 = new Float64Array(18);\n    this.tmp_dctIV = new Float64Array(18);\n    this.tmp_sdctII = new Float64Array(9);\n}\n\n// perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm\nIMDCT.prototype.imdct36 = function(x, y) {\n    var tmp = this.tmp_imdct36;\n\n    /* DCT-IV */\n    this.dctIV(x, tmp);\n\n    // convert 18-point DCT-IV to 36-point IMDCT\n    for (var i =  0; i <  9; ++i) {\n        y[i] =  tmp[9 + i];\n    }\n    for (var i =  9; i < 27; ++i) {\n        y[i] = -tmp[36 - (9 + i) - 1];\n    }\n    for (var i = 27; i < 36; ++i) {\n        y[i] = -tmp[i - 27];\n    }\n};\n\nvar dctIV_scale = [];\nfor(i = 0; i < 18; i++) {\n    dctIV_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (4 * 18));\n}\n\nIMDCT.prototype.dctIV = function(y, X) {\n    var tmp = this.tmp_dctIV;\n\n    // scaling\n    for (var i = 0; i < 18; ++i) {\n        tmp[i] = y[i] * dctIV_scale[i];\n    }\n\n    // SDCT-II\n    this.sdctII(tmp, X);\n\n    // scale reduction and output accumulation\n    X[0] /= 2;\n    for (var i = 1; i < 18; ++i) {\n        X[i] = X[i] / 2 - X[i - 1];\n    }\n};\n\nvar sdctII_scale = [];\nfor (var i = 0; i < 9; ++i) {\n    sdctII_scale[i] = 2 * Math.cos(Math.PI * (2 * i + 1) / (2 * 18));\n}\n\nIMDCT.prototype.sdctII = function(x, X) {\n    // divide the 18-point SDCT-II into two 9-point SDCT-IIs\n    var tmp = this.tmp_sdctII;\n\n    // even input butterfly\n    for (var i = 0; i < 9; ++i) {\n        tmp[i] = x[i] + x[18 - i - 1];\n    }\n\n    fastsdct(tmp, X, 0);\n\n    // odd input butterfly and scaling\n    for (var i = 0; i < 9; ++i) {\n        tmp[i] = (x[i] - x[18 - i - 1]) * sdctII_scale[i];\n    }\n\n    fastsdct(tmp, X, 1);\n\n    // output accumulation\n    for (var i = 3; i < 18; i += 2) {\n        X[i] -= X[i - 2];\n    }\n};\n\nvar c0 = 2 * Math.cos( 1 * Math.PI / 18);\nvar c1 = 2 * Math.cos( 3 * Math.PI / 18);\nvar c2 = 2 * Math.cos( 4 * Math.PI / 18);\nvar c3 = 2 * Math.cos( 5 * Math.PI / 18);\nvar c4 = 2 * Math.cos( 7 * Math.PI / 18);\nvar c5 = 2 * Math.cos( 8 * Math.PI / 18);\nvar c6 = 2 * Math.cos(16 * Math.PI / 18);\n\nfunction fastsdct(x, y, offset) {\n    var a0,  a1,  a2,  a3,  a4,  a5,  a6,  a7,  a8,  a9,  a10, a11, a12;\n    var a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25;\n    var m0,  m1,  m2,  m3,  m4,  m5,  m6,  m7;\n\n    a0 = x[3] + x[5];\n    a1 = x[3] - x[5];\n    a2 = x[6] + x[2];\n    a3 = x[6] - x[2];\n    a4 = x[1] + x[7];\n    a5 = x[1] - x[7];\n    a6 = x[8] + x[0];\n    a7 = x[8] - x[0];\n\n    a8  = a0  + a2;\n    a9  = a0  - a2;\n    a10 = a0  - a6;\n    a11 = a2  - a6;\n    a12 = a8  + a6;\n    a13 = a1  - a3;\n    a14 = a13 + a7;\n    a15 = a3  + a7;\n    a16 = a1  - a7;\n    a17 = a1  + a3;\n\n    m0 = a17 * -c3;\n    m1 = a16 * -c0;\n    m2 = a15 * -c4;\n    m3 = a14 * -c1;\n    m4 = a5  * -c1;\n    m5 = a11 * -c6;\n    m6 = a10 * -c5;\n    m7 = a9  * -c2;\n\n    a18 =     x[4] + a4;\n    a19 = 2 * x[4] - a4;\n    a20 = a19 + m5;\n    a21 = a19 - m5;\n    a22 = a19 + m6;\n    a23 = m4  + m2;\n    a24 = m4  - m2;\n    a25 = m4  + m1;\n\n    // output to every other slot for convenience\n    y[offset +  0] = a18 + a12;\n    y[offset +  2] = m0  - a25;\n    y[offset +  4] = m7  - a20;\n    y[offset +  6] = m3;\n    y[offset +  8] = a21 - m6;\n    y[offset + 10] = a24 - m1;\n    y[offset + 12] = a12 - 2 * a18;\n    y[offset + 14] = a23 + m0;\n    y[offset + 16] = a22 + m7;\n}\n\nIMDCT.S = [\n  /*  0 */  [ 0.608761429,\n              -0.923879533,\n              -0.130526192,\n               0.991444861,\n              -0.382683432,\n              -0.793353340 ],\n\n  /*  6 */  [ -0.793353340,\n               0.382683432,\n               0.991444861,\n               0.130526192,\n              -0.923879533,\n              -0.608761429 ],\n\n  /*  1 */  [  0.382683432,\n              -0.923879533,\n               0.923879533,\n              -0.382683432,\n              -0.382683432,\n               0.923879533 ],\n\n  /*  7 */  [ -0.923879533,\n              -0.382683432,\n               0.382683432,\n               0.923879533,\n               0.923879533,\n               0.382683432 ],\n\n  /*  2 */  [  0.130526192,\n              -0.382683432,\n               0.608761429,\n              -0.793353340,\n               0.923879533,\n              -0.991444861 ],\n\n  /*  8 */  [ -0.991444861,\n              -0.923879533,\n              -0.793353340,\n              -0.608761429,\n              -0.382683432,\n              -0.130526192 ]\n];\n\nmodule.exports = IMDCT;\n",
+    "var tables = require('./tables');\nvar MP3FrameHeader = require('./header');\nvar MP3Frame = require('./frame');\nvar utils = require('./utils');\n\nfunction Layer1() {    \n    this.allocation = utils.makeArray([2, 32], Uint8Array);\n    this.scalefactor = utils.makeArray([2, 32], Uint8Array);\n}\n\nMP3Frame.layers[1] = Layer1;\n\n// linear scaling table\nconst LINEAR_TABLE = new Float32Array([\n    1.33333333333333, 1.14285714285714, 1.06666666666667,\n    1.03225806451613, 1.01587301587302, 1.00787401574803,\n    1.00392156862745, 1.00195694716243, 1.00097751710655,\n    1.00048851978505, 1.00024420024420, 1.00012208521548,\n    1.00006103888177, 1.00003051850948\n]);\n\nLayer1.prototype.decode = function(stream, frame) {\n    var header = frame.header;\n    var nch = header.nchannels();\n    \n    var bound = 32;\n    if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) {\n        header.flags |= MP3FrameHeader.FLAGS.I_STEREO;\n        bound = 4 + header.mode_extension * 4;\n    }\n    \n    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {\n        // TODO: crc check\n    }\n    \n    // decode bit allocations\n    var allocation = this.allocation;\n    for (var sb = 0; sb < bound; sb++) {\n        for (var ch = 0; ch < nch; ch++) {\n            var nb = stream.read(4);\n            if (nb === 15)\n                throw new Error(\"forbidden bit allocation value\");\n                \n            allocation[ch][sb] = nb ? nb + 1 : 0;\n        }\n    }\n    \n    for (var sb = bound; sb < 32; sb++) {\n        var nb = stream.read(4);\n        if (nb === 15)\n            throw new Error(\"forbidden bit allocation value\");\n            \n        allocation[0][sb] =\n        allocation[1][sb] = nb ? nb + 1 : 0;\n    }\n    \n    // decode scalefactors\n    var scalefactor = this.scalefactor;\n    for (var sb = 0; sb < 32; sb++) {\n        for (var ch = 0; ch < nch; ch++) {\n            if (allocation[ch][sb]) {\n                scalefactor[ch][sb] = stream.read(6);\n                \n            \t/*\n            \t * Scalefactor index 63 does not appear in Table B.1 of\n            \t * ISO/IEC 11172-3. Nonetheless, other implementations accept it,\n                 * so we do as well \n                 */\n            }\n        }\n    }\n    \n    // decode samples\n    for (var s = 0; s < 12; s++) {\n        for (var sb = 0; sb < bound; sb++) {\n            for (var ch = 0; ch < nch; ch++) {\n                var nb = allocation[ch][sb];\n                frame.sbsample[ch][s][sb] = nb ? this.sample(stream, nb) * tables.SF_TABLE[scalefactor[ch][sb]] : 0;\n            }\n        }\n        \n        for (var sb = bound; sb < 32; sb++) {\n            var nb = allocation[0][sb];\n            if (nb) {\n                var sample = this.sample(stream, nb);\n                \n                for (var ch = 0; ch < nch; ch++) {\n                    frame.sbsample[ch][s][sb] = sample * tables.SF_TABLE[scalefactor[ch][sb]];\n                }\n            } else {\n                for (var ch = 0; ch < nch; ch++) {\n                    frame.sbsample[ch][s][sb] = 0;\n                }\n            }\n        }\n    }\n};\n\nLayer1.prototype.sample = function(stream, nb) {\n    var sample = stream.read(nb);\n    \n    // invert most significant bit, and form a 2's complement sample\n    sample ^= 1 << (nb - 1);\n    sample |= -(sample & (1 << (nb - 1)));\n    sample /= (1 << (nb - 1));\n        \n    // requantize the sample\n    // s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1))\n    sample += 1 >> (nb - 1);\n    return sample * LINEAR_TABLE[nb - 2];\n};\n\nmodule.exports = Layer1;\n",
+    "var tables = require('./tables');\nvar MP3FrameHeader = require('./header');\nvar MP3Frame = require('./frame');\nvar utils = require('./utils');\n\nfunction Layer2() {    \n    this.samples = new Float64Array(3);\n    this.allocation = utils.makeArray([2, 32], Uint8Array);\n    this.scfsi = utils.makeArray([2, 32], Uint8Array);\n    this.scalefactor = utils.makeArray([2, 32, 3], Uint8Array);\n}\n\nMP3Frame.layers[2] = Layer2;\n\n// possible quantization per subband table\nconst SBQUANT = [\n  // ISO/IEC 11172-3 Table B.2a\n  { sblimit: 27, offsets:\n      [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 ] },\n      \n  // ISO/IEC 11172-3 Table B.2b\n  { sblimit: 30, offsets:\n      [ 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 ] },\n      \n  // ISO/IEC 11172-3 Table B.2c\n  {  sblimit: 8, offsets:\n      [ 5, 5, 2, 2, 2, 2, 2, 2 ] },\n      \n  // ISO/IEC 11172-3 Table B.2d\n  { sblimit: 12, offsets:\n      [ 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ] },\n      \n  // ISO/IEC 13818-3 Table B.1\n  { sblimit: 30, offsets:\n      [ 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] }\n];\n\n// bit allocation table\nconst BITALLOC = [\n    { nbal: 2, offset: 0 },  // 0\n    { nbal: 2, offset: 3 },  // 1\n    { nbal: 3, offset: 3 },  // 2\n    { nbal: 3, offset: 1 },  // 3\n    { nbal: 4, offset: 2 },  // 4\n    { nbal: 4, offset: 3 },  // 5\n    { nbal: 4, offset: 4 },  // 6\n    { nbal: 4, offset: 5 }   // 7\n];\n\n// offsets into quantization class table\nconst OFFSETS = [\n    [ 0, 1, 16                                             ],  // 0\n    [ 0, 1,  2, 3, 4, 5, 16                                ],  // 1\n    [ 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14 ],  // 2\n    [ 0, 1,  3, 4, 5, 6,  7, 8,  9, 10, 11, 12, 13, 14, 15 ],  // 3\n    [ 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 16 ],  // 4\n    [ 0, 2,  4, 5, 6, 7,  8, 9, 10, 11, 12, 13, 14, 15, 16 ]   // 5\n];\n\n\n\n/*\n * These are the Layer II classes of quantization.\n * The table is derived from Table B.4 of ISO/IEC 11172-3.\n */\nconst QC_TABLE = [\n    { nlevels:     3, group: 2, bits:  5, C: 1.33333333333, D: 0.50000000000 },\n    { nlevels:     5, group: 3, bits:  7, C: 1.60000000000, D: 0.50000000000 },\n    { nlevels:     7, group: 0, bits:  3, C: 1.14285714286, D: 0.25000000000 },\n    { nlevels:     9, group: 4, bits: 10, C: 1.77777777777, D: 0.50000000000 },\n    { nlevels:    15, group: 0, bits:  4, C: 1.06666666666, D: 0.12500000000 },\n    { nlevels:    31, group: 0, bits:  5, C: 1.03225806452, D: 0.06250000000 },\n    { nlevels:    63, group: 0, bits:  6, C: 1.01587301587, D: 0.03125000000 },\n    { nlevels:   127, group: 0, bits:  7, C: 1.00787401575, D: 0.01562500000 },\n    { nlevels:   255, group: 0, bits:  8, C: 1.00392156863, D: 0.00781250000 },\n    { nlevels:   511, group: 0, bits:  9, C: 1.00195694716, D: 0.00390625000 },\n    { nlevels:  1023, group: 0, bits: 10, C: 1.00097751711, D: 0.00195312500 },\n    { nlevels:  2047, group: 0, bits: 11, C: 1.00048851979, D: 0.00097656250 },\n    { nlevels:  4095, group: 0, bits: 12, C: 1.00024420024, D: 0.00048828125 },\n    { nlevels:  8191, group: 0, bits: 13, C: 1.00012208522, D: 0.00024414063 },\n    { nlevels: 16383, group: 0, bits: 14, C: 1.00006103888, D: 0.00012207031 },\n    { nlevels: 32767, group: 0, bits: 15, C: 1.00003051851, D: 0.00006103516 },\n    { nlevels: 65535, group: 0, bits: 16, C: 1.00001525902, D: 0.00003051758 }\n];\n\nLayer2.prototype.decode = function(stream, frame) {\n    var header = frame.header;\n    var nch = header.nchannels();\n    var index;\n    \n    if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {\n        index = 4;\n    } else if (header.flags & MP3FrameHeader.FLAGS.FREEFORMAT) {\n        index = header.samplerate === 48000 ? 0 : 1;\n    } else {\n        var bitrate_per_channel = header.bitrate;\n        \n        if (nch === 2) {\n            bitrate_per_channel /= 2;\n            \n            /*\n             * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and\n             * 80 kbps bitrates in Layer II, but some encoders ignore this\n             * restriction, so we ignore it as well.\n             */\n        } else {\n            /*\n        \t * ISO/IEC 11172-3 does not allow single channel mode for 224, 256,\n        \t * 320, or 384 kbps bitrates in Layer II.\n        \t */\n            if (bitrate_per_channel > 192000)\n                throw new Error('bad bitrate/mode combination');\n        }\n        \n        if (bitrate_per_channel <= 48000)\n            index = header.samplerate === 32000 ? 3 : 2;\n        else if (bitrate_per_channel <= 80000)\n            index = 0;\n        else\n            index = header.samplerate === 48000 ? 0 : 1;\n    }\n    \n    var sblimit = SBQUANT[index].sblimit;\n    var offsets = SBQUANT[index].offsets;\n    \n    var bound = 32;\n    if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO) {\n        header.flags |= MP3FrameHeader.FLAGS.I_STEREO;\n        bound = 4 + header.mode_extension * 4;\n    }\n    \n    if (bound > sblimit)\n        bound = sblimit;\n    \n    // decode bit allocations\n    var allocation = this.allocation;\n    for (var sb = 0; sb < bound; sb++) {\n        var nbal = BITALLOC[offsets[sb]].nbal;\n        \n        for (var ch = 0; ch < nch; ch++)\n            allocation[ch][sb] = stream.read(nbal);\n    }\n    \n    for (var sb = bound; sb < sblimit; sb++) {\n        var nbal = BITALLOC[offsets[sb]].nbal;\n        \n        allocation[0][sb] =\n        allocation[1][sb] = stream.read(nbal);\n    }\n    \n    // decode scalefactor selection info\n    var scfsi = this.scfsi;\n    for (var sb = 0; sb < sblimit; sb++) {\n        for (var ch = 0; ch < nch; ch++) {\n            if (allocation[ch][sb])\n                scfsi[ch][sb] = stream.read(2);\n        }\n    }\n    \n    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {\n        // TODO: crc check\n    }\n    \n    // decode scalefactors\n    var scalefactor = this.scalefactor;\n    for (var sb = 0; sb < sblimit; sb++) {\n        for (var ch = 0; ch < nch; ch++) {\n            if (allocation[ch][sb]) {\n                scalefactor[ch][sb][0] = stream.read(6);\n                \n                switch (scfsi[ch][sb]) {\n            \t    case 2:\n            \t        scalefactor[ch][sb][2] =\n                        scalefactor[ch][sb][1] = scalefactor[ch][sb][0];\n                        break;\n                        \n                    case 0:\n                        scalefactor[ch][sb][1] = stream.read(6);\n                    \t// fall through\n                    \t\n                    case 1:\n                    case 3:\n                        scalefactor[ch][sb][2] = stream.read(6);\n                }\n                \n                if (scfsi[ch][sb] & 1)\n                    scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1];\n                    \n                /*\n            \t * Scalefactor index 63 does not appear in Table B.1 of\n            \t * ISO/IEC 11172-3. Nonetheless, other implementations accept it,\n            \t * so we do as well.\n            \t */\n            }\n        }\n    }\n    \n    // decode samples\n    for (var gr = 0; gr < 12; gr++) {\n        // normal\n        for (var sb = 0; sb < bound; sb++) {\n            for (var ch = 0; ch < nch; ch++) {                \n                if (index = allocation[ch][sb]) {\n                    index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1];\n                    this.decodeSamples(stream, QC_TABLE[index]);\n                    \n                    var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]];\n                    for (var s = 0; s < 3; s++) {\n                        frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale;\n                    }\n                } else {\n                    for (var s = 0; s < 3; s++) {\n                        frame.sbsample[ch][3 * gr + s][sb] = 0;\n                    }\n                }\n            }\n        }\n        \n        // joint stereo\n        for (var sb = bound; sb < sblimit; sb++) {\n            if (index = allocation[0][sb]) {\n                index = OFFSETS[BITALLOC[offsets[sb]].offset][index - 1];\n                this.decodeSamples(stream, QC_TABLE[index]);\n                \n                for (var ch = 0; ch < nch; ch++) {\n                    var scale = tables.SF_TABLE[scalefactor[ch][sb][gr >> 2]];\n                    for (var s = 0; s < 3; s++) {\n                        frame.sbsample[ch][3 * gr + s][sb] = this.samples[s] * scale;\n                    }\n                }\n            } else {\n                for (var ch = 0; ch < nch; ch++) {\n                    for (var s = 0; s < 3; s++) {\n                        frame.sbsample[ch][3 * gr + s][sb] = 0;\n                    }\n                }\n            }\n        }\n        \n        // the rest\n        for (var ch = 0; ch < nch; ch++) {\n            for (var s = 0; s < 3; s++) {\n                for (var sb = sblimit; sb < 32; sb++) {\n                    frame.sbsample[ch][3 * gr + s][sb] = 0;\n                }\n            }\n        }\n    }\n};\n\nLayer2.prototype.decodeSamples = function(stream, quantclass) {\n    var sample = this.samples;\n    var nb = quantclass.group;\n    \n    if (nb) {\n        // degrouping\n        var c = stream.read(quantclass.bits);\n        var nlevels = quantclass.nlevels;\n        \n        for (var s = 0; s < 3; s++) {\n            sample[s] = c % nlevels;\n            c = c / nlevels | 0;\n        }\n    } else {\n        nb = quantclass.bits;\n        for (var s = 0; s < 3; s++) {\n            sample[s] = stream.read(nb);\n        }\n    }\n    \n    for (var s = 0; s < 3; s++) {\n        // invert most significant bit, and form a 2's complement sample\n        var requantized = sample[s] ^ (1 << (nb - 1));\n        requantized |= -(requantized & (1 << (nb - 1)));\n        requantized /= (1 << (nb - 1));\n        \n        // requantize the sample\n        sample[s] = (requantized + quantclass.D) * quantclass.C;\n    }\n};\n\nmodule.exports = Layer2;\n",
+    "var AV = (window.AV);\nvar tables = require('./tables');\nvar MP3FrameHeader = require('./header');\nvar MP3Frame = require('./frame');\nvar huffman = require('./huffman');\nvar IMDCT = require('./imdct');\nvar utils = require('./utils');\n\nfunction MP3SideInfo() {\n    this.main_data_begin = null;\n    this.private_bits = null;\n    this.gr = [new MP3Granule(), new MP3Granule()];\n    this.scfsi = new Uint8Array(2);\n}\n\nfunction MP3Granule() {\n    this.ch = [new MP3Channel(), new MP3Channel()];\n}\n\nfunction MP3Channel() {\n    // from side info\n    this.part2_3_length    = null;\n    this.big_values        = null;\n    this.global_gain       = null;\n    this.scalefac_compress = null;\n    \n    this.flags         = null;\n    this.block_type    = null;\n    this.table_select  = new Uint8Array(3);\n    this.subblock_gain = new Uint8Array(3);\n    this.region0_count = null;\n    this.region1_count = null;\n    \n    // from main_data\n    this.scalefac = new Uint8Array(39);\n}\n\nfunction Layer3() {\n    this.imdct = new IMDCT();\n    this.si = new MP3SideInfo();\n    \n    // preallocate reusable typed arrays for performance\n    this.xr = [new Float64Array(576), new Float64Array(576)];\n    this._exponents = new Int32Array(39);\n    this.reqcache = new Float64Array(16);\n    this.modes = new Int16Array(39);\n    this.output = new Float64Array(36);\n    \n    this.tmp = utils.makeArray([32, 3, 6]);\n    this.tmp2 = new Float64Array(32 * 3 * 6);\n}\n\nMP3Frame.layers[3] = Layer3;\n\nLayer3.prototype.decode = function(stream, frame) {\n    var header = frame.header;\n    var next_md_begin = 0;\n    var md_len = 0;\n    \n    var nch = header.nchannels();\n    var si_len = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? (nch === 1 ? 9 : 17) : (nch === 1 ? 17 : 32);\n        \n    // check frame sanity\n    if (stream.next_frame - stream.nextByte() < si_len) {\n        stream.md_len = 0;\n        throw new Error('Bad frame length');\n    }\n    \n    // check CRC word\n    if (header.flags & MP3FrameHeader.FLAGS.PROTECTION) {\n        // TODO: crc check\n    }\n    \n    // decode frame side information\n    var sideInfo = this.sideInfo(stream, nch, header.flags & MP3FrameHeader.FLAGS.LSF_EXT);        \n    var si = sideInfo.si;\n    var data_bitlen = sideInfo.data_bitlen;\n    var priv_bitlen = sideInfo.priv_bitlen;\n    \n    header.flags        |= priv_bitlen;\n    header.private_bits |= si.private_bits;\n    \n    // find main_data of next frame\n    var peek = stream.copy();\n    peek.seek(stream.next_frame * 8);\n    \n    var nextHeader = peek.read(16);    \n    if ((nextHeader & 0xffe6) === 0xffe2) { // syncword | layer\n        if ((nextHeader & 1) === 0) // protection bit\n            peek.advance(16); // crc check\n            \n        peek.advance(16); // skip the rest of the header\n        next_md_begin = peek.read((nextHeader & 8) ? 9 : 8);\n    }\n    \n    // find main_data of this frame\n    var frame_space = stream.next_frame - stream.nextByte();\n    \n    if (next_md_begin > si.main_data_begin + frame_space)\n        next_md_begin = 0;\n        \n    var md_len = si.main_data_begin + frame_space - next_md_begin;\n    var frame_used = 0;\n    var ptr;\n    \n    if (si.main_data_begin === 0) {\n        ptr = stream.stream;\n        stream.md_len = 0;\n        frame_used = md_len;\n    } else {\n        if (si.main_data_begin > stream.md_len) {\n            throw new Error('bad main_data_begin pointer');\n        } else {\n            var old_md_len = stream.md_len;\n            \n            if (md_len > si.main_data_begin) {\n                if (stream.md_len + md_len - si.main_data_begin > MP3FrameHeader.BUFFER_MDLEN) {\n                    throw new Error(\"Assertion failed: (stream.md_len + md_len - si.main_data_begin <= MAD_MP3FrameHeader.BUFFER_MDLEN)\");\n                }\n                \n                frame_used = md_len - si.main_data_begin;\n                this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.nextByte(), frame_used);\n                stream.md_len += frame_used;\n            }\n            \n            ptr = new AV.Bitstream(AV.Stream.fromBuffer(new AV.Buffer(stream.main_data)));\n            ptr.advance((old_md_len - si.main_data_begin) * 8);\n        }\n    }\n    \n    var frame_free = frame_space - frame_used;\n    \n    // decode main_data\n    this.decodeMainData(ptr, frame, si, nch);\n    \n    // preload main_data buffer with up to 511 bytes for next frame(s)\n    if (frame_free >= next_md_begin) {\n        this.memcpy(stream.main_data, 0, stream.stream.stream, stream.next_frame - next_md_begin, next_md_begin);\n        stream.md_len = next_md_begin;\n    } else {\n        if (md_len < si.main_data_begin) {\n            var extra = si.main_data_begin - md_len;\n            if (extra + frame_free > next_md_begin)\n                extra = next_md_begin - frame_free;\n\n            if (extra < stream.md_len) {\n                this.memcpy(stream.main_data, 0, stream.main_data, stream.md_len - extra, extra);\n                stream.md_len = extra;\n            }\n        } else {\n            stream.md_len = 0;\n        }\n        \n        this.memcpy(stream.main_data, stream.md_len, stream.stream.stream, stream.next_frame - frame_free, frame_free);\n        stream.md_len += frame_free;\n    }\n};\n\nLayer3.prototype.memcpy = function(dst, dstOffset, pSrc, srcOffset, length) {\n    var subarr;\n    if (pSrc.subarray)\n        subarr = pSrc.subarray(srcOffset, srcOffset + length);\n    else\n        subarr = pSrc.peekBuffer(srcOffset - pSrc.offset, length).data;\n\n    // oh my, memcpy actually exists in JavaScript?\n    dst.set(subarr, dstOffset);\n    return dst;\n};\n\nLayer3.prototype.sideInfo = function(stream, nch, lsf) {\n    var si = this.si;\n    var data_bitlen = 0;\n    var priv_bitlen = lsf ? ((nch === 1) ? 1 : 2) : ((nch === 1) ? 5 : 3);\n    \n    si.main_data_begin = stream.read(lsf ? 8 : 9);\n    si.private_bits    = stream.read(priv_bitlen);\n\n    var ngr = 1;\n    if (!lsf) {\n        ngr = 2;\n        for (var ch = 0; ch < nch; ++ch)\n            si.scfsi[ch] = stream.read(4);\n    }\n    \n    for (var gr = 0; gr < ngr; gr++) {\n        var granule = si.gr[gr];\n        \n        for (var ch = 0; ch < nch; ch++) {\n            var channel = granule.ch[ch];\n            \n            channel.part2_3_length    = stream.read(12);\n            channel.big_values        = stream.read(9);\n            channel.global_gain       = stream.read(8);\n            channel.scalefac_compress = stream.read(lsf ? 9 : 4);\n\n            data_bitlen += channel.part2_3_length;\n\n            if (channel.big_values > 288)\n                throw new Error('bad big_values count');\n\n            channel.flags = 0;\n\n            // window_switching_flag\n            if (stream.read(1)) {\n                channel.block_type = stream.read(2);\n\n                if (channel.block_type === 0)\n                    throw new Error('reserved block_type');\n\n                if (!lsf && channel.block_type === 2 && si.scfsi[ch])\n                    throw new Error('bad scalefactor selection info');\n\n                channel.region0_count = 7;\n                channel.region1_count = 36;\n\n                if (stream.read(1))\n                    channel.flags |= tables.MIXED_BLOCK_FLAG;\n                else if (channel.block_type === 2)\n                    channel.region0_count = 8;\n\n                for (var i = 0; i < 2; i++)\n                    channel.table_select[i] = stream.read(5);\n\n                for (var i = 0; i < 3; i++)\n                    channel.subblock_gain[i] = stream.read(3);\n            } else {\n                channel.block_type = 0;\n\n                for (var i = 0; i < 3; i++)\n                    channel.table_select[i] = stream.read(5);\n\n                channel.region0_count = stream.read(4);\n                channel.region1_count = stream.read(3);\n            }\n\n            // [preflag,] scalefac_scale, count1table_select\n            channel.flags |= stream.read(lsf ? 2 : 3);\n        }\n    }\n    \n    return {\n        si: si,\n        data_bitlen: data_bitlen,\n        priv_bitlen: priv_bitlen\n    };\n};\n\nLayer3.prototype.decodeMainData = function(stream, frame, si, nch) {\n    var header = frame.header;\n    var sfreq = header.samplerate;\n\n    if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)\n        sfreq *= 2;\n\n    // 48000 => 0, 44100 => 1, 32000 => 2,\n    // 24000 => 3, 22050 => 4, 16000 => 5\n    var sfreqi = ((sfreq >>  7) & 0x000f) + ((sfreq >> 15) & 0x0001) - 8;\n\n    if (header.flags & MP3FrameHeader.FLAGS.MPEG_2_5_EXT)\n        sfreqi += 3;\n        \n    // scalefactors, Huffman decoding, requantization\n    var ngr = (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) ? 1 : 2;\n    var xr = this.xr;\n    \n    for (var gr = 0; gr < ngr; ++gr) {\n        var granule = si.gr[gr];\n        var sfbwidth = [];\n        var l = 0;\n        \n        for (var ch = 0; ch < nch; ++ch) {\n            var channel = granule.ch[ch];\n            var part2_length;\n            \n            sfbwidth[ch] = tables.SFBWIDTH_TABLE[sfreqi].l;\n            if (channel.block_type === 2) {\n                sfbwidth[ch] = (channel.flags & tables.MIXED_BLOCK_FLAG) ? tables.SFBWIDTH_TABLE[sfreqi].m : tables.SFBWIDTH_TABLE[sfreqi].s;\n            }\n\n            if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {\n                part2_length = this.scalefactors_lsf(stream, channel, ch === 0 ? 0 : si.gr[1].ch[1], header.mode_extension);\n            } else {\n                part2_length = this.scalefactors(stream, channel, si.gr[0].ch[ch], gr === 0 ? 0 : si.scfsi[ch]);\n            }\n\n            this.huffmanDecode(stream, xr[ch], channel, sfbwidth[ch], part2_length);\n        }\n        \n        // joint stereo processing\n        if (header.mode === MP3FrameHeader.MODE.JOINT_STEREO && header.mode_extension !== 0)\n            this.stereo(xr, si.gr, gr, header, sfbwidth[0]);\n        \n        // reordering, alias reduction, IMDCT, overlap-add, frequency inversion\n        for (var ch = 0; ch < nch; ch++) {\n            var channel = granule.ch[ch];\n            var sample = frame.sbsample[ch].slice(18 * gr);\n            \n            var sb, l = 0, i, sblimit;\n            var output = this.output;\n            \n            if (channel.block_type === 2) {\n                this.reorder(xr[ch], channel, sfbwidth[ch]);\n\n                /*\n                 * According to ISO/IEC 11172-3, \"Alias reduction is not applied for\n                 * granules with block_type === 2 (short block).\" However, other\n                 * sources suggest alias reduction should indeed be performed on the\n                 * lower two subbands of mixed blocks. Most other implementations do\n                 * this, so by default we will too.\n                 */\n                if (channel.flags & tables.MIXED_BLOCK_FLAG)\n                    this.aliasreduce(xr[ch], 36);\n            } else {\n                this.aliasreduce(xr[ch], 576);\n            }\n            \n            // subbands 0-1\n            if (channel.block_type !== 2 || (channel.flags & tables.MIXED_BLOCK_FLAG)) {\n                var block_type = channel.block_type;\n                if (channel.flags & tables.MIXED_BLOCK_FLAG)\n                    block_type = 0;\n\n                // long blocks\n                for (var sb = 0; sb < 2; ++sb, l += 18) {\n                    this.imdct_l(xr[ch].subarray(l, l + 18), output, block_type);\n                    this.overlap(output, frame.overlap[ch][sb], sample, sb);\n                }\n            } else {\n                // short blocks\n                for (var sb = 0; sb < 2; ++sb, l += 18) {\n                    this.imdct_s(xr[ch].subarray(l, l + 18), output);\n                    this.overlap(output, frame.overlap[ch][sb], sample, sb);\n                }\n            }\n            \n            this.freqinver(sample, 1);\n\n            // (nonzero) subbands 2-31\n            var i = 576;\n            while (i > 36 && xr[ch][i - 1] === 0) {\n                --i;\n            }\n            \n            sblimit = 32 - (((576 - i) / 18) << 0);\n\n            if (channel.block_type !== 2) {\n                // long blocks\n                for (var sb = 2; sb < sblimit; ++sb, l += 18) {\n                    this.imdct_l(xr[ch].subarray(l, l + 18), output, channel.block_type);\n                    this.overlap(output, frame.overlap[ch][sb], sample, sb);\n\n                    if (sb & 1)\n                        this.freqinver(sample, sb);\n                }\n            } else {\n                // short blocks\n                for (var sb = 2; sb < sblimit; ++sb, l += 18) {\n                    this.imdct_s(xr[ch].subarray(l, l + 18), output);\n                    this.overlap(output, frame.overlap[ch][sb], sample, sb);\n\n                    if (sb & 1)\n                        this.freqinver(sample, sb);\n                }\n            }\n            \n            // remaining (zero) subbands\n            for (var sb = sblimit; sb < 32; ++sb) {\n                this.overlap_z(frame.overlap[ch][sb], sample, sb);\n\n                if (sb & 1)\n                    this.freqinver(sample, sb);\n            }\n        }\n    }\n};\n\nLayer3.prototype.scalefactors = function(stream, channel, gr0ch, scfsi) {\n    var start = stream.offset();\n    var slen1 = tables.SFLEN_TABLE[channel.scalefac_compress].slen1;\n    var slen2 = tables.SFLEN_TABLE[channel.scalefac_compress].slen2;\n    var sfbi;\n    \n    if (channel.block_type === 2) {\n        sfbi = 0;\n\n        var nsfb = (channel.flags & tables.MIXED_BLOCK_FLAG) ? 8 + 3 * 3 : 6 * 3;\n        while (nsfb--)\n            channel.scalefac[sfbi++] = stream.read(slen1);\n\n        nsfb = 6 * 3;\n        while (nsfb--)\n            channel.scalefac[sfbi++] = stream.read(slen2);\n\n        nsfb = 1 * 3;\n        while (nsfb--)\n            channel.scalefac[sfbi++] = 0;\n    } else {\n        if (scfsi & 0x8) {\n            for (var sfbi = 0; sfbi < 6; ++sfbi)\n                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];\n        } else {\n            for (var sfbi = 0; sfbi < 6; ++sfbi)\n                channel.scalefac[sfbi] = stream.read(slen1);\n        }\n\n        if (scfsi & 0x4) {\n            for (var sfbi = 6; sfbi < 11; ++sfbi)\n                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];\n        } else {\n            for (var sfbi = 6; sfbi < 11; ++sfbi)\n                channel.scalefac[sfbi] = stream.read(slen1);\n        }\n\n        if (scfsi & 0x2) {\n            for (var sfbi = 11; sfbi < 16; ++sfbi)\n                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];\n        } else {\n            for (var sfbi = 11; sfbi < 16; ++sfbi)\n                channel.scalefac[sfbi] = stream.read(slen2);\n        }\n\n        if (scfsi & 0x1) {\n            for (var sfbi = 16; sfbi < 21; ++sfbi)\n                channel.scalefac[sfbi] = gr0ch.scalefac[sfbi];\n        } else {\n            for (var sfbi = 16; sfbi < 21; ++sfbi)\n                channel.scalefac[sfbi] = stream.read(slen2);\n        }\n\n        channel.scalefac[21] = 0;\n    }\n    \n    return stream.offset() - start;\n};\n\nLayer3.prototype.scalefactors_lsf = function(stream, channel, gr1ch, mode_extension) {\n    var start = stream.offset();\n    var scalefac_compress = channel.scalefac_compress;\n    var index = channel.block_type === 2 ? (channel.flags & tables.MIXED_BLOCK_FLAG ? 2 : 1) : 0;\n    var slen = new Int32Array(4);\n    var nsfb;\n    \n    if (!((mode_extension & tables.I_STEREO) && gr1ch)) {\n        if (scalefac_compress < 400) {\n            slen[0] = (scalefac_compress >>> 4) / 5;\n            slen[1] = (scalefac_compress >>> 4) % 5;\n            slen[2] = (scalefac_compress % 16) >>> 2;\n            slen[3] =  scalefac_compress %  4;\n        \n            nsfb = tables.NSFB_TABLE[0][index];\n        } else if (scalefac_compress < 500) {\n            scalefac_compress -= 400;\n\n            slen[0] = (scalefac_compress >>> 2) / 5;\n            slen[1] = (scalefac_compress >>> 2) % 5;\n            slen[2] =  scalefac_compress % 4;\n            slen[3] = 0;\n\n            nsfb = tables.NSFB_TABLE[1][index];\n        } else {\n            scalefac_compress -= 500;\n\n            slen[0] = scalefac_compress / 3;\n            slen[1] = scalefac_compress % 3;\n            slen[2] = 0;\n            slen[3] = 0;\n\n            channel.flags |= tables.PREFLAG;\n            nsfb = tables.NSFB_TABLE[2][index];\n        }\n        \n        var n = 0;\n        for (var part = 0; part < 4; part++) {\n            for (var i = 0; i < nsfb[part]; i++) {\n                channel.scalefac[n++] = stream.read(slen[part]);\n            }\n        }\n        \n        while (n < 39) {\n            channel.scalefac[n++] = 0;\n        }\n    } else {  // (mode_extension & tables.I_STEREO) && gr1ch (i.e. ch == 1)\n        scalefac_compress >>>= 1;\n        \n        if (scalefac_compress < 180) {\n            slen[0] =  scalefac_compress / 36;\n            slen[1] = (scalefac_compress % 36) / 6;\n            slen[2] = (scalefac_compress % 36) % 6;\n            slen[3] = 0;\n\n            nsfb = tables.NSFB_TABLE[3][index];\n        } else if (scalefac_compress < 244) {\n            scalefac_compress -= 180;\n\n            slen[0] = (scalefac_compress % 64) >>> 4;\n            slen[1] = (scalefac_compress % 16) >>> 2;\n            slen[2] =  scalefac_compress %  4;\n            slen[3] = 0;\n\n            nsfb = tables.NSFB_TABLE[4][index];\n        } else {\n            scalefac_compress -= 244;\n\n            slen[0] = scalefac_compress / 3;\n            slen[1] = scalefac_compress % 3;\n            slen[2] = 0;\n            slen[3] = 0;\n\n            nsfb = tables.NSFB_TABLE[5][index];\n        }\n        \n        var n = 0;\n        for (var part = 0; part < 4; ++part) {\n            var max = (1 << slen[part]) - 1;\n            for (var i = 0; i < nsfb[part]; ++i) {\n                var is_pos = stream.read(slen[part]);\n\n                channel.scalefac[n] = is_pos;\n                gr1ch.scalefac[n++] = is_pos === max ? 1 : 0;\n            }\n        }\n        \n        while (n < 39) {\n            channel.scalefac[n] = 0;\n            gr1ch.scalefac[n++] = 0;  // apparently not illegal\n        }\n    }\n    \n    return stream.offset() - start;\n};\n\nLayer3.prototype.huffmanDecode = function(stream, xr, channel, sfbwidth, part2_length) {\n    var exponents = this._exponents;\n    var sfbwidthptr = 0;\n    \n    var bits_left = channel.part2_3_length - part2_length;    \n    if (bits_left < 0)\n        throw new Error('bad audio data length');\n    \n    this.exponents(channel, sfbwidth, exponents);\n    \n    var peek = stream.copy();\n    stream.advance(bits_left);\n    \n    /* align bit reads to byte boundaries */\n    var cachesz  = 8 - peek.bitPosition;\n    cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7;\n    \n    var bitcache = peek.read(cachesz);\n    bits_left -= cachesz;\n\n    var xrptr = 0;\n    \n    // big_values\n    var region = 0;\n    var reqcache = this.reqcache;\n    \n    var sfbound = xrptr + sfbwidth[sfbwidthptr++];\n    var rcount  = channel.region0_count + 1;\n    \n    var entry = huffman.huff_pair_table[channel.table_select[region]];\n    var table     = entry.table;\n    var linbits   = entry.linbits;\n    var startbits = entry.startbits;\n    \n    if (typeof table === 'undefined')\n        throw new Error('bad Huffman table select');\n        \n    var expptr = 0;\n    var exp = exponents[expptr++];\n    var reqhits = 0;\n    var big_values = channel.big_values;\n    \n    while (big_values-- && cachesz + bits_left > 0) {\n         if (xrptr === sfbound) {\n             sfbound += sfbwidth[sfbwidthptr++];\n\n             // change table if region boundary\n             if (--rcount === 0) {\n                 if (region === 0)\n                     rcount = channel.region1_count + 1;\n                 else\n                     rcount = 0; // all remaining\n\n                 entry     = huffman.huff_pair_table[channel.table_select[++region]];\n                 table     = entry.table;\n                 linbits   = entry.linbits;\n                 startbits = entry.startbits;\n\n                 if (typeof table === 'undefined')\n                     throw new Error('bad Huffman table select');\n             }\n\n             if (exp !== exponents[expptr]) {\n                 exp = exponents[expptr];\n                 reqhits = 0;\n             }\n\n             ++expptr;\n         }\n         \n         if (cachesz < 21) {\n             var bits   = ((32 - 1 - 21) + (21 - cachesz)) & ~7;\n             bitcache   = (bitcache << bits) | peek.read(bits);\n             cachesz   += bits;\n             bits_left -= bits;\n         }\n         \n         var clumpsz = startbits;\n         var pair = table[ (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))];\n         \n         while (!pair.final) {\n             cachesz -= clumpsz;\n             clumpsz = pair.ptr.bits;\n             pair    = table[pair.ptr.offset + (((bitcache) >> ((cachesz) - (clumpsz))) & ((1 << (clumpsz)) - 1))];\n         }\n         \n         cachesz -= pair.value.hlen;\n         \n         if (linbits) {\n             var value = pair.value.x;\n             var x_final = false;\n             \n             switch (value) {\n                 case 0:\n                     xr[xrptr] = 0;\n                     break;\n\n                 case 15:\n                     if (cachesz < linbits + 2) {\n                         bitcache   = (bitcache << 16) | peek.read(16);\n                         cachesz   += 16;\n                         bits_left -= 16;\n                     }\n\n                     value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1));\n                     cachesz -= linbits;\n\n                     requantized = this.requantize(value, exp);\n                     x_final = true; // simulating goto, yay\n                     break;\n\n                 default:\n                     if (reqhits & (1 << value)) {\n                         requantized = reqcache[value];\n                     } else {\n                         reqhits |= (1 << value);\n                         requantized = reqcache[value] = this.requantize(value, exp);\n                     }\n                     \n                     x_final = true;\n             }\n             \n             if(x_final) {\n                 xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;\n             }\n             \n             value = pair.value.y;\n             var y_final = false;\n             \n             switch (value) {\n                 case 0:\n                     xr[xrptr + 1] = 0;\n                     break;\n\n                 case 15:\n                     if (cachesz < linbits + 1) {\n                         bitcache   = (bitcache << 16) | peek.read(16);\n                         cachesz   += 16;\n                         bits_left -= 16;\n                     }\n\n                     value += (((bitcache) >> ((cachesz) - (linbits))) & ((1 << (linbits)) - 1));\n                     cachesz -= linbits;\n\n                     requantized = this.requantize(value, exp);\n                     y_final = true;\n                     break; // simulating goto, yayzor\n\n                 default:\n                     if (reqhits & (1 << value)) {\n                         requantized = reqcache[value];\n                     } else {\n                         reqhits |= (1 << value);\n                         reqcache[value] = this.requantize(value, exp);\n                         requantized = reqcache[value];\n                     }\n                     \n                     y_final = true;\n             }\n             \n             if(y_final) {\n                 xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;\n             }\n             \n         } else {\n             var value = pair.value.x;\n\n             if (value === 0) {\n                 xr[xrptr] = 0;\n             } else {\n                 if (reqhits & (1 << value))\n                     requantized = reqcache[value];\n                 else {\n                     reqhits |= (1 << value);\n                     requantized = reqcache[value] = this.requantize(value, exp);\n                 }\n\n                 xr[xrptr] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;\n             }\n\n             value = pair.value.y;\n\n             if (value === 0) {\n                 xr[xrptr + 1] = 0;\n             } else {\n                 if (reqhits & (1 << value))\n                     requantized = reqcache[value];\n                 else {\n                     reqhits |= (1 << value);\n                     requantized = reqcache[value] = this.requantize(value, exp);\n                 }\n\n                 xr[xrptr + 1] = ((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized;\n             }\n         }\n\n         xrptr += 2;\n    }\n    \n    if (cachesz + bits_left < 0)\n        throw new Error('Huffman data overrun');\n    \n    // count1    \n    var table = huffman.huff_quad_table[channel.flags & tables.COUNT1TABLE_SELECT];\n    var requantized = this.requantize(1, exp);\n    \n    while (cachesz + bits_left > 0 && xrptr <= 572) {\n        if (cachesz < 10) {\n            bitcache   = (bitcache << 16) | peek.read(16);\n            cachesz   += 16;\n            bits_left -= 16;\n        }\n        \n        var quad = table[(((bitcache) >> ((cachesz) - (4))) & ((1 << (4)) - 1))];\n        \n        // quad tables guaranteed to have at most one extra lookup\n        if (!quad.final) {\n            cachesz -= 4;\n            quad = table[quad.ptr.offset + (((bitcache) >> ((cachesz) - (quad.ptr.bits))) & ((1 << (quad.ptr.bits)) - 1))];\n        }\n        \n        cachesz -= quad.value.hlen;\n\n        if (xrptr === sfbound) {\n            sfbound += sfbwidth[sfbwidthptr++];\n\n            if (exp !== exponents[expptr]) {\n                exp = exponents[expptr];\n                requantized = this.requantize(1, exp);\n            }\n\n            ++expptr;\n        }\n        \n        // v (0..1)\n        xr[xrptr] = quad.value.v ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;\n\n        // w (0..1)\n        xr[xrptr + 1] = quad.value.w ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;\n\n        xrptr += 2;\n        if (xrptr === sfbound) {\n            sfbound += sfbwidth[sfbwidthptr++];\n\n            if (exp !== exponents[expptr]) {\n                exp = exponents[expptr];\n                requantized = this.requantize(1, exp);\n            }\n\n            ++expptr;\n        }\n        \n        // x (0..1)\n        xr[xrptr] = quad.value.x ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;\n\n        // y (0..1)\n        xr[xrptr + 1] = quad.value.y ? (((bitcache) & (1 << ((cachesz--) - 1))) ? -requantized : requantized) : 0;\n\n        xrptr += 2;\n        \n        if (cachesz + bits_left < 0) {\n            // technically the bitstream is misformatted, but apparently\n            // some encoders are just a bit sloppy with stuffing bits\n            xrptr -= 4;\n        }\n    }\n    \n    if (-bits_left > MP3FrameHeader.BUFFER_GUARD * 8) {\n        throw new Error(\"assertion failed: (-bits_left <= MP3FrameHeader.BUFFER_GUARD * CHAR_BIT)\");\n    }\n    \n    // rzero\n    while (xrptr < 576) {\n        xr[xrptr]     = 0;\n        xr[xrptr + 1] = 0;\n        xrptr += 2;\n    }\n};\n\nLayer3.prototype.requantize = function(value, exp) {\n    // usual (x >> 0) tricks to make sure frac and exp stay integers\n    var frac = (exp % 4) >> 0;  // assumes sign(frac) === sign(exp)\n    exp = (exp / 4) >> 0;\n\n    var requantized = Math.pow(value, 4.0 / 3.0);\n    requantized *= Math.pow(2.0, (exp / 4.0));\n    \n    if (frac) {\n        requantized *= Math.pow(2.0, (frac / 4.0));\n    }\n    \n    if (exp < 0) {\n        requantized /= Math.pow(2.0, -exp * (3.0 / 4.0));\n    }\n\n    return requantized;\n};\n\nLayer3.prototype.exponents = function(channel, sfbwidth, exponents) {\n    var gain = channel.global_gain - 210;\n    var scalefac_multiplier = (channel.flags & tables.SCALEFAC_SCALE) ? 2 : 1;\n    \n    if (channel.block_type === 2) {\n        var sfbi = 0, l = 0;\n        \n        if (channel.flags & tables.MIXED_BLOCK_FLAG) {\n            var premask = (channel.flags & tables.PREFLAG) ? ~0 : 0;\n            \n            // long block subbands 0-1\n            while (l < 36) {\n                exponents[sfbi] = gain - ((channel.scalefac[sfbi] + (tables.PRETAB[sfbi] & premask)) << scalefac_multiplier);\n                l += sfbwidth[sfbi++];\n            }\n        }\n        \n        // this is probably wrong for 8000 Hz short/mixed blocks\n        var gain0 = gain - 8 * channel.subblock_gain[0];\n        var gain1 = gain - 8 * channel.subblock_gain[1];\n        var gain2 = gain - 8 * channel.subblock_gain[2];\n        \n        while (l < 576) {\n            exponents[sfbi + 0] = gain0 - (channel.scalefac[sfbi + 0] << scalefac_multiplier);\n            exponents[sfbi + 1] = gain1 - (channel.scalefac[sfbi + 1] << scalefac_multiplier);\n            exponents[sfbi + 2] = gain2 - (channel.scalefac[sfbi + 2] << scalefac_multiplier);\n            \n            l += 3 * sfbwidth[sfbi];\n            sfbi += 3;\n        }\n    } else {\n        if (channel.flags & tables.PREFLAG) {\n            for (var sfbi = 0; sfbi < 22; sfbi++) {\n                exponents[sfbi] = gain - ((channel.scalefac[sfbi] + tables.PRETAB[sfbi]) << scalefac_multiplier);\n            }\n        } else {\n            for (var sfbi = 0; sfbi < 22; sfbi++) {\n                exponents[sfbi] = gain - (channel.scalefac[sfbi] << scalefac_multiplier);\n            }\n        }\n    }\n};\n\nLayer3.prototype.stereo = function(xr, granules, gr, header, sfbwidth) {\n    var granule = granules[gr];\n    var modes = this.modes;\n    var sfbi, l, n, i;\n    \n    if (granule.ch[0].block_type !== granule.ch[1].block_type || (granule.ch[0].flags & tables.MIXED_BLOCK_FLAG) !== (granule.ch[1].flags & tables.MIXED_BLOCK_FLAG))\n        throw new Error('incompatible stereo block_type');\n        \n    for (var i = 0; i < 39; i++)\n        modes[i] = header.mode_extension;\n        \n    // intensity stereo\n    if (header.mode_extension & tables.I_STEREO) {\n        var right_ch = granule.ch[1];\n        var right_xr = xr[1];\n        \n        header.flags |= MP3FrameHeader.FLAGS.tables.I_STEREO;\n         \n        // first determine which scalefactor bands are to be processed\n        if (right_ch.block_type === 2) {\n            var lower, start, max, bound = new Uint32Array(3), w;\n\n            lower = start = max = bound[0] = bound[1] = bound[2] = 0;\n            sfbi = l = 0;\n            \n            if (right_ch.flags & tables.MIXED_BLOCK_FLAG) {\n                while (l < 36) {\n                    n = sfbwidth[sfbi++];\n\n                    for (var i = 0; i < n; ++i) {\n                        if (right_xr[i]) {\n                            lower = sfbi;\n                            break;\n                        }\n                    }\n\n                    right_xr += n;\n                    l += n;\n                }\n\n                start = sfbi;\n            }\n            \n            var w = 0;\n            while (l < 576) {\n                n = sfbwidth[sfbi++];\n\n                for (i = 0; i < n; ++i) {\n                    if (right_xr[i]) {\n                        max = bound[w] = sfbi;\n                        break;\n                    }\n                }\n\n                right_xr += n;\n                l += n;\n                w = (w + 1) % 3;\n            }\n            \n            if (max)\n                lower = start;\n\n            // long blocks\n            for (i = 0; i < lower; ++i)\n                modes[i] = header.mode_extension & ~tables.I_STEREO;\n\n            // short blocks\n            w = 0;\n            for (i = start; i < max; ++i) {\n                if (i < bound[w])\n                    modes[i] = header.mode_extension & ~tables.I_STEREO;\n\n                w = (w + 1) % 3;\n            }\n        } else {\n            var bound = 0;\n            for (sfbi = l = 0; l < 576; l += n) {\n                n = sfbwidth[sfbi++];\n\n                for (i = 0; i < n; ++i) {\n                    if (right_xr[i]) {\n                        bound = sfbi;\n                        break;\n                    }\n                }\n\n                right_xr += n;\n            }\n\n            for (i = 0; i < bound; ++i)\n                modes[i] = header.mode_extension & ~tables.I_STEREO;\n        }\n        \n        // now do the actual processing\n        if (header.flags & MP3FrameHeader.FLAGS.LSF_EXT) {\n            var illegal_pos = granules[gr + 1].ch[1].scalefac;\n\n            // intensity_scale\n            var lsf_scale = IS_Ltables.SF_TABLE[right_ch.scalefac_compress & 0x1];\n            \n            for (sfbi = l = 0; l < 576; ++sfbi, l += n) {\n                n = sfbwidth[sfbi];\n\n                if (!(modes[sfbi] & tables.I_STEREO))\n                    continue;\n\n                if (illegal_pos[sfbi]) {\n                    modes[sfbi] &= ~tables.I_STEREO;\n                    continue;\n                }\n\n                is_pos = right_ch.scalefac[sfbi];\n                \n                for (i = 0; i < n; ++i) {\n                    var left = xr[0][l + i];\n\n                    if (is_pos === 0) {\n                        xr[1][l + i] = left;\n                    } else {\n                        var opposite = left * lsf_scale[(is_pos - 1) / 2];\n\n                        if (is_pos & 1) {\n                            xr[0][l + i] = opposite;\n                            xr[1][l + i] = left;\n                        }\n                        else {\n                            xr[1][l + i] = opposite;\n                        }\n                    }\n                }\n            }\n        } else {\n            for (sfbi = l = 0; l < 576; ++sfbi, l += n) {\n                n = sfbwidth[sfbi];\n\n                if (!(modes[sfbi] & tables.I_STEREO))\n                    continue;\n\n                is_pos = right_ch.scalefac[sfbi];\n\n                if (is_pos >= 7) {  // illegal intensity position\n                    modes[sfbi] &= ~tables.I_STEREO;\n                    continue;\n                }\n\n                for (i = 0; i < n; ++i) {\n                    var left = xr[0][l + i];\n                    xr[0][l + i] = left * tables.IS_TABLE[is_pos];\n                    xr[1][l + i] = left * tables.IS_TABLE[6 - is_pos];\n                }\n            }\n        }\n    }\n    \n    // middle/side stereo\n    if (header.mode_extension & tables.MS_STEREO) {\n        header.flags |= tables.MS_STEREO;\n\n        var invsqrt2 = tables.ROOT_TABLE[3 + -2];\n\n        for (sfbi = l = 0; l < 576; ++sfbi, l += n) {\n            n = sfbwidth[sfbi];\n\n            if (modes[sfbi] !== tables.MS_STEREO)\n                continue;\n\n            for (i = 0; i < n; ++i) {\n                var m = xr[0][l + i];\n                var s = xr[1][l + i];\n\n                xr[0][l + i] = (m + s) * invsqrt2;  // l = (m + s) / sqrt(2)\n                xr[1][l + i] = (m - s) * invsqrt2;  // r = (m - s) / sqrt(2)\n            }\n        }\n    }\n};\n\nLayer3.prototype.aliasreduce = function(xr, lines) {\n    for (var xrPointer = 18; xrPointer < lines; xrPointer += 18) {\n        for (var i = 0; i < 8; ++i) {\n            var a = xr[xrPointer - i - 1];\n            var b = xr[xrPointer + i];\n\n            xr[xrPointer - i - 1] = a * tables.CS[i] - b * tables.CA[i];\n            xr[xrPointer + i] = b * tables.CS[i] + a * tables.CA[i];\n        }\n    }\n};\n\n// perform IMDCT and windowing for long blocks\nLayer3.prototype.imdct_l = function (X, z, block_type) {\n    // IMDCT\n    this.imdct.imdct36(X, z);\n\n    // windowing\n    switch (block_type) {\n        case 0:  // normal window\n            for (var i = 0; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i];\n            break;\n\n        case 1:  // start block\n            for (var i =  0; i < 18; ++i) z[i] = z[i] * tables.WINDOW_L[i];\n            for (var i = 24; i < 30; ++i) z[i] = z[i] * tables.WINDOW_S[i - 18];\n            for (var i = 30; i < 36; ++i) z[i] = 0;\n            break;\n\n        case 3:  // stop block\n            for (var i =  0; i <  6; ++i) z[i] = 0;\n            for (var i =  6; i < 12; ++i) z[i] = z[i] * tables.WINDOW_S[i - 6];\n            for (var i = 18; i < 36; ++i) z[i] = z[i] * tables.WINDOW_L[i];\n            break;\n    }\n};\n\n/*\n * perform IMDCT and windowing for short blocks\n */\nLayer3.prototype.imdct_s = function (X, z) {\n    var yptr = 0;\n    var wptr;\n    var Xptr = 0;\n    \n    var y = new Float64Array(36);\n    var hi, lo;\n\n    // IMDCT\n    for (var w = 0; w < 3; ++w) {\n        var sptr = 0;\n\n        for (var i = 0; i < 3; ++i) {\n            lo = X[Xptr + 0] * IMDCT.S[sptr][0] +\n                 X[Xptr + 1] * IMDCT.S[sptr][1] +\n                 X[Xptr + 2] * IMDCT.S[sptr][2] +\n                 X[Xptr + 3] * IMDCT.S[sptr][3] +\n                 X[Xptr + 4] * IMDCT.S[sptr][4] +\n                 X[Xptr + 5] * IMDCT.S[sptr][5];\n\n\n            y[yptr + i + 0] = lo;\n            y[yptr + 5 - i] = -y[yptr + i + 0];\n\n            ++sptr;\n\n            lo = X[Xptr + 0] * IMDCT.S[sptr][0] +\n                 X[Xptr + 1] * IMDCT.S[sptr][1] +\n                 X[Xptr + 2] * IMDCT.S[sptr][2] +\n                 X[Xptr + 3] * IMDCT.S[sptr][3] +\n                 X[Xptr + 4] * IMDCT.S[sptr][4] +\n                 X[Xptr + 5] * IMDCT.S[sptr][5];\n\n            y[yptr +  i + 6] = lo;\n            y[yptr + 11 - i] = y[yptr + i + 6];\n\n            ++sptr;\n        }\n\n        yptr += 12;\n        Xptr += 6;\n    }\n\n    // windowing, overlapping and concatenation\n    yptr = 0;\n    var wptr = 0;\n\n    for (var i = 0; i < 6; ++i) {\n        z[i + 0] = 0;\n        z[i + 6] = y[yptr +  0 + 0] * tables.WINDOW_S[wptr + 0];\n\n        lo = y[yptr + 0 + 6] * tables.WINDOW_S[wptr + 6] +\n             y[yptr + 12 + 0] * tables.WINDOW_S[wptr + 0];\n\n        z[i + 12] = lo;\n\n        lo = y[yptr + 12 + 6] * tables.WINDOW_S[wptr + 6] +\n             y[yptr + 24 + 0] * tables.WINDOW_S[wptr + 0];\n\n        z[i + 18] = lo;\n        z[i + 24] = y[yptr + 24 + 6] * tables.WINDOW_S[wptr + 6];\n        z[i + 30] = 0;\n\n        ++yptr;\n        ++wptr;\n    }\n};\n\nLayer3.prototype.overlap = function (output, overlap, sample, sb) {\n    for (var i = 0; i < 18; ++i) {\n        sample[i][sb] = output[i] + overlap[i];\n        overlap[i]    = output[i + 18];\n    }\n};\n\nLayer3.prototype.freqinver = function (sample, sb) {\n    for (var i = 1; i < 18; i += 2)\n        sample[i][sb] = -sample[i][sb];\n};\n\nLayer3.prototype.overlap_z = function (overlap, sample, sb) {\n    for (var i = 0; i < 18; ++i) {\n        sample[i][sb] = overlap[i];\n        overlap[i]    = 0;\n    }\n};\n\nLayer3.prototype.reorder = function (xr, channel, sfbwidth) {\n    var sfbwidthPointer = 0;\n    var tmp = this.tmp;\n    var sbw = new Uint32Array(3);\n    var sw  = new Uint32Array(3);\n    \n    // this is probably wrong for 8000 Hz mixed blocks\n\n    var sb = 0;\n    if (channel.flags & tables.MIXED_BLOCK_FLAG) {\n        var sb = 2;\n\n        var l = 0;\n        while (l < 36)\n            l += sfbwidth[sfbwidthPointer++];\n    }\n\n    for (var w = 0; w < 3; ++w) {\n        sbw[w] = sb;\n        sw[w]  = 0;\n    }\n\n    f = sfbwidth[sfbwidthPointer++];\n    w = 0;\n\n    for (var l = 18 * sb; l < 576; ++l) {\n        if (f-- === 0) {\n            f = sfbwidth[sfbwidthPointer++] - 1;\n            w = (w + 1) % 3;\n        }\n        \n        tmp[sbw[w]][w][sw[w]++] = xr[l];\n\n        if (sw[w] === 6) {\n            sw[w] = 0;\n            ++sbw[w];\n        }\n    }\n\n    var tmp2 = this.tmp2;\n    var ptr = 0;\n    \n    for (var i = 0; i < 32; i++) {\n        for (var j = 0; j < 3; j++) {\n            for (var k = 0; k < 6; k++) {\n                tmp2[ptr++] = tmp[i][j][k];\n            }\n        }\n    }\n    \n    var len = (576 - 18 * sb); \n    for (var i = 0; i < len; i++) {\n        xr[18 * sb + i] = tmp2[sb + i];\n    }\n};\n\nmodule.exports = Layer3;\n",
+    "var AV = (window.AV);\nvar MP3FrameHeader = require('./header');\n\nfunction MP3Stream(stream) {\n    this.stream = stream;                     // actual bitstream\n    this.sync = false;                        // stream sync found\n    this.freerate = 0;                        // free bitrate (fixed)\n    this.this_frame = stream.stream.offset;   // start of current frame\n    this.next_frame = stream.stream.offset;   // start of next frame\n    \n    this.main_data = new Uint8Array(MP3FrameHeader.BUFFER_MDLEN); // actual audio data\n    this.md_len = 0;                               // length of main data\n    \n    // copy methods from actual stream\n    for (var key in stream) {\n        if (typeof stream[key] === 'function')\n            this[key] = stream[key].bind(stream);\n    }\n}\n\nMP3Stream.prototype.getU8 = function(offset) {\n    var stream = this.stream.stream;\n    return stream.peekUInt8(offset - stream.offset);\n};\n\nMP3Stream.prototype.nextByte = function() {\n    var stream = this.stream;\n    return stream.bitPosition === 0 ? stream.stream.offset : stream.stream.offset + 1;\n};\n\nMP3Stream.prototype.doSync = function() {\n    var stream = this.stream.stream;\n    this.align();\n    \n    while (this.available(16) && !(stream.peekUInt8(0) === 0xff && (stream.peekUInt8(1) & 0xe0) === 0xe0)) {\n        this.advance(8);\n    }\n\n    if (!this.available(MP3FrameHeader.BUFFER_GUARD))\n        return false;\n        \n    return true;\n};\n\nMP3Stream.prototype.reset = function(byteOffset) {\n    this.seek(byteOffset * 8);\n    this.next_frame = byteOffset;\n    this.sync = true;\n};\n\nmodule.exports = MP3Stream;\n",
+    "var utils = require('./utils');\n\nfunction MP3Synth() {\n    this.filter = utils.makeArray([2, 2, 2, 16, 8]); // polyphase filterbank outputs\n    this.phase = 0;\n    \n    this.pcm = {\n        samplerate: 0,\n        channels: 0,\n        length: 0,\n        samples: [new Float64Array(1152), new Float64Array(1152)]\n    };\n}\n\n/* costab[i] = cos(PI / (2 * 32) * i) */\nconst costab1  = 0.998795456;\nconst costab2  = 0.995184727;\nconst costab3  = 0.989176510;\nconst costab4  = 0.980785280;\nconst costab5  = 0.970031253;\nconst costab6  = 0.956940336;\nconst costab7  = 0.941544065;\nconst costab8  = 0.923879533;\nconst costab9  = 0.903989293;\nconst costab10 = 0.881921264;\nconst costab11 = 0.857728610;\nconst costab12 = 0.831469612;\nconst costab13 = 0.803207531;\nconst costab14 = 0.773010453;\nconst costab15 = 0.740951125;\nconst costab16 = 0.707106781;\nconst costab17 = 0.671558955;\nconst costab18 = 0.634393284;\nconst costab19 = 0.595699304;\nconst costab20 = 0.555570233;\nconst costab21 = 0.514102744;\nconst costab22 = 0.471396737;\nconst costab23 = 0.427555093;\nconst costab24 = 0.382683432;\nconst costab25 = 0.336889853;\nconst costab26 = 0.290284677;\nconst costab27 = 0.242980180;\nconst costab28 = 0.195090322;\nconst costab29 = 0.146730474;\nconst costab30 = 0.098017140;\nconst costab31 = 0.049067674;\n\n/*\n * NAME:    dct32()\n * DESCRIPTION: perform fast in[32].out[32] DCT\n */\nMP3Synth.dct32 = function (_in, slot, lo, hi) {\n    var t0,   t1,   t2,   t3,   t4,   t5,   t6,   t7;\n    var t8,   t9,   t10,  t11,  t12,  t13,  t14,  t15;\n    var t16,  t17,  t18,  t19,  t20,  t21,  t22,  t23;\n    var t24,  t25,  t26,  t27,  t28,  t29,  t30,  t31;\n    var t32,  t33,  t34,  t35,  t36,  t37,  t38,  t39;\n    var t40,  t41,  t42,  t43,  t44,  t45,  t46,  t47;\n    var t48,  t49,  t50,  t51,  t52,  t53,  t54,  t55;\n    var t56,  t57,  t58,  t59,  t60,  t61,  t62,  t63;\n    var t64,  t65,  t66,  t67,  t68,  t69,  t70,  t71;\n    var t72,  t73,  t74,  t75,  t76,  t77,  t78,  t79;\n    var t80,  t81,  t82,  t83,  t84,  t85,  t86,  t87;\n    var t88,  t89,  t90,  t91,  t92,  t93,  t94,  t95;\n    var t96,  t97,  t98,  t99,  t100, t101, t102, t103;\n    var t104, t105, t106, t107, t108, t109, t110, t111;\n    var t112, t113, t114, t115, t116, t117, t118, t119;\n    var t120, t121, t122, t123, t124, t125, t126, t127;\n    var t128, t129, t130, t131, t132, t133, t134, t135;\n    var t136, t137, t138, t139, t140, t141, t142, t143;\n    var t144, t145, t146, t147, t148, t149, t150, t151;\n    var t152, t153, t154, t155, t156, t157, t158, t159;\n    var t160, t161, t162, t163, t164, t165, t166, t167;\n    var t168, t169, t170, t171, t172, t173, t174, t175;\n    var t176;\n\n    t0   = _in[0]  + _in[31];  t16  = ((_in[0]  - _in[31]) * (costab1));\n    t1   = _in[15] + _in[16];  t17  = ((_in[15] - _in[16]) * (costab31));\n\n    t41  = t16 + t17;\n    t59  = ((t16 - t17) * (costab2));\n    t33  = t0  + t1;\n    t50  = ((t0  - t1) * ( costab2));\n\n    t2   = _in[7]  + _in[24];  t18  = ((_in[7]  - _in[24]) * (costab15));\n    t3   = _in[8]  + _in[23];  t19  = ((_in[8]  - _in[23]) * (costab17));\n\n    t42  = t18 + t19;\n    t60  = ((t18 - t19) * (costab30));\n    t34  = t2  + t3;\n    t51  = ((t2  - t3) * ( costab30));\n\n    t4   = _in[3]  + _in[28];  t20  = ((_in[3]  - _in[28]) * (costab7));\n    t5   = _in[12] + _in[19];  t21  = ((_in[12] - _in[19]) * (costab25));\n\n    t43  = t20 + t21;\n    t61  = ((t20 - t21) * (costab14));\n    t35  = t4  + t5;\n    t52  = ((t4  - t5) * ( costab14));\n\n    t6   = _in[4]  + _in[27];  t22  = ((_in[4]  - _in[27]) * (costab9));\n    t7   = _in[11] + _in[20];  t23  = ((_in[11] - _in[20]) * (costab23));\n\n    t44  = t22 + t23;\n    t62  = ((t22 - t23) * (costab18));\n    t36  = t6  + t7;\n    t53  = ((t6  - t7) * ( costab18));\n\n    t8   = _in[1]  + _in[30];  t24  = ((_in[1]  - _in[30]) * (costab3));\n    t9   = _in[14] + _in[17];  t25  = ((_in[14] - _in[17]) * (costab29));\n\n    t45  = t24 + t25;\n    t63  = ((t24 - t25) * (costab6));\n    t37  = t8  + t9;\n    t54  = ((t8  - t9) * ( costab6));\n\n    t10  = _in[6]  + _in[25];  t26  = ((_in[6]  - _in[25]) * (costab13));\n    t11  = _in[9]  + _in[22];  t27  = ((_in[9]  - _in[22]) * (costab19));\n\n    t46  = t26 + t27;\n    t64  = ((t26 - t27) * (costab26));\n    t38  = t10 + t11;\n    t55  = ((t10 - t11) * (costab26));\n\n    t12  = _in[2]  + _in[29];  t28  = ((_in[2]  - _in[29]) * (costab5));\n    t13  = _in[13] + _in[18];  t29  = ((_in[13] - _in[18]) * (costab27));\n\n    t47  = t28 + t29;\n    t65  = ((t28 - t29) * (costab10));\n    t39  = t12 + t13;\n    t56  = ((t12 - t13) * (costab10));\n\n    t14  = _in[5]  + _in[26];  t30  = ((_in[5]  - _in[26]) * (costab11));\n    t15  = _in[10] + _in[21];  t31  = ((_in[10] - _in[21]) * (costab21));\n\n    t48  = t30 + t31;\n    t66  = ((t30 - t31) * (costab22));\n    t40  = t14 + t15;\n    t57  = ((t14 - t15) * (costab22));\n\n    t69  = t33 + t34;  t89  = ((t33 - t34) * (costab4));\n    t70  = t35 + t36;  t90  = ((t35 - t36) * (costab28));\n    t71  = t37 + t38;  t91  = ((t37 - t38) * (costab12));\n    t72  = t39 + t40;  t92  = ((t39 - t40) * (costab20));\n    t73  = t41 + t42;  t94  = ((t41 - t42) * (costab4));\n    t74  = t43 + t44;  t95  = ((t43 - t44) * (costab28));\n    t75  = t45 + t46;  t96  = ((t45 - t46) * (costab12));\n    t76  = t47 + t48;  t97  = ((t47 - t48) * (costab20));\n\n    t78  = t50 + t51;  t100 = ((t50 - t51) * (costab4));\n    t79  = t52 + t53;  t101 = ((t52 - t53) * (costab28));\n    t80  = t54 + t55;  t102 = ((t54 - t55) * (costab12));\n    t81  = t56 + t57;  t103 = ((t56 - t57) * (costab20));\n\n    t83  = t59 + t60;  t106 = ((t59 - t60) * (costab4));\n    t84  = t61 + t62;  t107 = ((t61 - t62) * (costab28));\n    t85  = t63 + t64;  t108 = ((t63 - t64) * (costab12));\n    t86  = t65 + t66;  t109 = ((t65 - t66) * (costab20));\n\n    t113 = t69  + t70;\n    t114 = t71  + t72;\n\n    /*  0 */ hi[15][slot] = t113 + t114;\n    /* 16 */ lo[ 0][slot] = ((t113 - t114) * (costab16));\n\n    t115 = t73  + t74;\n    t116 = t75  + t76;\n\n    t32  = t115 + t116;\n\n    /*  1 */ hi[14][slot] = t32;\n\n    t118 = t78  + t79;\n    t119 = t80  + t81;\n\n    t58  = t118 + t119;\n\n    /*  2 */ hi[13][slot] = t58;\n\n    t121 = t83  + t84;\n    t122 = t85  + t86;\n\n    t67  = t121 + t122;\n\n    t49  = (t67 * 2) - t32;\n\n    /*  3 */ hi[12][slot] = t49;\n\n    t125 = t89  + t90;\n    t126 = t91  + t92;\n\n    t93  = t125 + t126;\n\n    /*  4 */ hi[11][slot] = t93;\n\n    t128 = t94  + t95;\n    t129 = t96  + t97;\n\n    t98  = t128 + t129;\n\n    t68  = (t98 * 2) - t49;\n\n    /*  5 */ hi[10][slot] = t68;\n\n    t132 = t100 + t101;\n    t133 = t102 + t103;\n\n    t104 = t132 + t133;\n\n    t82  = (t104 * 2) - t58;\n\n    /*  6 */ hi[ 9][slot] = t82;\n\n    t136 = t106 + t107;\n    t137 = t108 + t109;\n\n    t110 = t136 + t137;\n\n    t87  = (t110 * 2) - t67;\n\n    t77  = (t87 * 2) - t68;\n\n    /*  7 */ hi[ 8][slot] = t77;\n\n    t141 = ((t69 - t70) * (costab8));\n    t142 = ((t71 - t72) * (costab24));\n    t143 = t141 + t142;\n\n    /*  8 */ hi[ 7][slot] = t143;\n    /* 24 */ lo[ 8][slot] =\n        (((t141 - t142) * (costab16) * 2)) - t143;\n\n    t144 = ((t73 - t74) * (costab8));\n    t145 = ((t75 - t76) * (costab24));\n    t146 = t144 + t145;\n\n    t88  = (t146 * 2) - t77;\n\n    /*  9 */ hi[ 6][slot] = t88;\n\n    t148 = ((t78 - t79) * (costab8));\n    t149 = ((t80 - t81) * (costab24));\n    t150 = t148 + t149;\n\n    t105 = (t150 * 2) - t82;\n\n    /* 10 */ hi[ 5][slot] = t105;\n\n    t152 = ((t83 - t84) * (costab8));\n    t153 = ((t85 - t86) * (costab24));\n    t154 = t152 + t153;\n\n    t111 = (t154 * 2) - t87;\n\n    t99  = (t111 * 2) - t88;\n\n    /* 11 */ hi[ 4][slot] = t99;\n\n    t157 = ((t89 - t90) * (costab8));\n    t158 = ((t91 - t92) * (costab24));\n    t159 = t157 + t158;\n\n    t127 = (t159 * 2) - t93;\n\n    /* 12 */ hi[ 3][slot] = t127;\n\n    t160 = (((t125 - t126) * (costab16) * 2)) - t127;\n\n    /* 20 */ lo[ 4][slot] = t160;\n    /* 28 */ lo[12][slot] =\n        (((((t157 - t158) * (costab16) * 2) - t159) * 2)) - t160;\n\n    t161 = ((t94 - t95) * (costab8));\n    t162 = ((t96 - t97) * (costab24));\n    t163 = t161 + t162;\n\n    t130 = (t163 * 2) - t98;\n\n    t112 = (t130 * 2) - t99;\n\n    /* 13 */ hi[ 2][slot] = t112;\n\n    t164 = (((t128 - t129) * (costab16) * 2)) - t130;\n\n    t166 = ((t100 - t101) * (costab8));\n    t167 = ((t102 - t103) * (costab24));\n    t168 = t166 + t167;\n\n    t134 = (t168 * 2) - t104;\n\n    t120 = (t134 * 2) - t105;\n\n    /* 14 */ hi[ 1][slot] = t120;\n\n    t135 = (((t118 - t119) * (costab16) * 2)) - t120;\n\n    /* 18 */ lo[ 2][slot] = t135;\n\n    t169 = (((t132 - t133) * (costab16) * 2)) - t134;\n\n    t151 = (t169 * 2) - t135;\n\n    /* 22 */ lo[ 6][slot] = t151;\n\n    t170 = (((((t148 - t149) * (costab16) * 2) - t150) * 2)) - t151;\n\n    /* 26 */ lo[10][slot] = t170;\n    /* 30 */ lo[14][slot] =\n        (((((((t166 - t167) * (costab16)) * 2 -\n             t168) * 2) - t169) * 2) - t170);\n\n    t171 = ((t106 - t107) * (costab8));\n    t172 = ((t108 - t109) * (costab24));\n    t173 = t171 + t172;\n\n    t138 = (t173 * 2) - t110;\n    t123 = (t138 * 2) - t111;\n    t139 = (((t121 - t122) * (costab16) * 2)) - t123;\n    t117 = (t123 * 2) - t112;\n\n    /* 15 */ hi[ 0][slot] = t117;\n\n    t124 = (((t115 - t116) * (costab16) * 2)) - t117;\n\n    /* 17 */ lo[ 1][slot] = t124;\n\n    t131 = (t139 * 2) - t124;\n\n    /* 19 */ lo[ 3][slot] = t131;\n\n    t140 = (t164 * 2) - t131;\n\n    /* 21 */ lo[ 5][slot] = t140;\n\n    t174 = (((t136 - t137) * (costab16) * 2)) - t138;\n    t155 = (t174 * 2) - t139;\n    t147 = (t155 * 2) - t140;\n\n    /* 23 */ lo[ 7][slot] = t147;\n\n    t156 = (((((t144 - t145) * (costab16) * 2) - t146) * 2)) - t147;\n\n    /* 25 */ lo[ 9][slot] = t156;\n\n    t175 = (((((t152 - t153) * (costab16) * 2) - t154) * 2)) - t155;\n    t165 = (t175 * 2) - t156;\n\n    /* 27 */ lo[11][slot] = t165;\n\n    t176 = (((((((t161 - t162) * (costab16) * 2)) -\n               t163) * 2) - t164) * 2) - t165;\n\n    /* 29 */ lo[13][slot] = t176;\n    /* 31 */ lo[15][slot] =\n        (((((((((t171 - t172) * (costab16)) * 2 -\n               t173) * 2) - t174) * 2) - t175) * 2) - t176);\n\n    /*\n     * Totals:\n     *  80 multiplies\n     *  80 additions\n     * 119 subtractions\n     *  49 shifts (not counting SSO)\n     */\n};\n\n/*\n * These are the coefficients for the subband synthesis window. This is a\n * reordered version of Table B.3 from ISO/IEC 11172-3.\n */\nconst D = [\n    [  0.000000000,   /*  0 */\n       -0.000442505,\n       0.003250122,\n       -0.007003784,\n       0.031082153,\n       -0.078628540,\n       0.100311279,\n       -0.572036743,\n       1.144989014,\n       0.572036743,\n       0.100311279,\n       0.078628540,\n       0.031082153,\n       0.007003784,\n       0.003250122,\n       0.000442505,\n\n       0.000000000,\n       -0.000442505,\n       0.003250122,\n       -0.007003784,\n       0.031082153,\n       -0.078628540,\n       0.100311279,\n       -0.572036743,\n       1.144989014,\n       0.572036743,\n       0.100311279,\n       0.078628540,\n       0.031082153,\n       0.007003784,\n       0.003250122,\n       0.000442505 ],\n\n    [ -0.000015259,   /*  1 */\n      -0.000473022,\n      0.003326416,\n      -0.007919312,\n      0.030517578,\n      -0.084182739,\n      0.090927124,\n      -0.600219727,\n      1.144287109,\n      0.543823242,\n      0.108856201,\n      0.073059082,\n      0.031478882,\n      0.006118774,\n      0.003173828,\n      0.000396729,\n\n      -0.000015259,\n      -0.000473022,\n      0.003326416,\n      -0.007919312,\n      0.030517578,\n      -0.084182739,\n      0.090927124,\n      -0.600219727,\n      1.144287109,\n      0.543823242,\n      0.108856201,\n      0.073059082,\n      0.031478882,\n      0.006118774,\n      0.003173828,\n      0.000396729 ],\n\n    [ -0.000015259,   /*  2 */\n      -0.000534058,\n      0.003387451,\n      -0.008865356,\n      0.029785156,\n      -0.089706421,\n      0.080688477,\n      -0.628295898,\n      1.142211914,\n      0.515609741,\n      0.116577148,\n      0.067520142,\n      0.031738281,\n      0.005294800,\n      0.003082275,\n      0.000366211,\n\n      -0.000015259,\n      -0.000534058,\n      0.003387451,\n      -0.008865356,\n      0.029785156,\n      -0.089706421,\n      0.080688477,\n      -0.628295898,\n      1.142211914,\n      0.515609741,\n      0.116577148,\n      0.067520142,\n      0.031738281,\n      0.005294800,\n      0.003082275,\n      0.000366211 ],\n\n    [ -0.000015259,   /*  3 */\n      -0.000579834,\n      0.003433228,\n      -0.009841919,\n      0.028884888,\n      -0.095169067,\n      0.069595337,\n      -0.656219482,\n      1.138763428,\n      0.487472534,\n      0.123474121,\n      0.061996460,\n      0.031845093,\n      0.004486084,\n      0.002990723,\n      0.000320435,\n\n      -0.000015259,\n      -0.000579834,\n      0.003433228,\n      -0.009841919,\n      0.028884888,\n      -0.095169067,\n      0.069595337,\n      -0.656219482,\n      1.138763428,\n      0.487472534,\n      0.123474121,\n      0.061996460,\n      0.031845093,\n      0.004486084,\n      0.002990723,\n      0.000320435 ],\n\n    [ -0.000015259,   /*  4 */\n      -0.000625610,\n      0.003463745,\n      -0.010848999,\n      0.027801514,\n      -0.100540161,\n      0.057617187,\n      -0.683914185,\n      1.133926392,\n      0.459472656,\n      0.129577637,\n      0.056533813,\n      0.031814575,\n      0.003723145,\n      0.002899170,\n      0.000289917,\n\n      -0.000015259,\n      -0.000625610,\n      0.003463745,\n      -0.010848999,\n      0.027801514,\n      -0.100540161,\n      0.057617187,\n      -0.683914185,\n      1.133926392,\n      0.459472656,\n      0.129577637,\n      0.056533813,\n      0.031814575,\n      0.003723145,\n      0.002899170,\n      0.000289917 ],\n\n    [ -0.000015259,   /*  5 */\n      -0.000686646,\n      0.003479004,\n      -0.011886597,\n      0.026535034,\n      -0.105819702,\n      0.044784546,\n      -0.711318970,\n      1.127746582,\n      0.431655884,\n      0.134887695,\n      0.051132202,\n      0.031661987,\n      0.003005981,\n      0.002792358,\n      0.000259399,\n\n      -0.000015259,\n      -0.000686646,\n      0.003479004,\n      -0.011886597,\n      0.026535034,\n      -0.105819702,\n      0.044784546,\n      -0.711318970,\n      1.127746582,\n      0.431655884,\n      0.134887695,\n      0.051132202,\n      0.031661987,\n      0.003005981,\n      0.002792358,\n      0.000259399 ],\n\n    [ -0.000015259,   /*  6 */\n      -0.000747681,\n      0.003479004,\n      -0.012939453,\n      0.025085449,\n      -0.110946655,\n      0.031082153,\n      -0.738372803,\n      1.120223999,\n      0.404083252,\n      0.139450073,\n      0.045837402,\n      0.031387329,\n      0.002334595,\n      0.002685547,\n      0.000244141,\n\n      -0.000015259,\n      -0.000747681,\n      0.003479004,\n      -0.012939453,\n      0.025085449,\n      -0.110946655,\n      0.031082153,\n      -0.738372803,\n      1.120223999,\n      0.404083252,\n      0.139450073,\n      0.045837402,\n      0.031387329,\n      0.002334595,\n      0.002685547,\n      0.000244141 ],\n\n    [ -0.000030518,   /*  7 */\n      -0.000808716,\n      0.003463745,\n      -0.014022827,\n      0.023422241,\n      -0.115921021,\n      0.016510010,\n      -0.765029907,\n      1.111373901,\n      0.376800537,\n      0.143264771,\n      0.040634155,\n      0.031005859,\n      0.001693726,\n      0.002578735,\n      0.000213623,\n\n      -0.000030518,\n      -0.000808716,\n      0.003463745,\n      -0.014022827,\n      0.023422241,\n      -0.115921021,\n      0.016510010,\n      -0.765029907,\n      1.111373901,\n      0.376800537,\n      0.143264771,\n      0.040634155,\n      0.031005859,\n      0.001693726,\n      0.002578735,\n      0.000213623 ],\n\n    [ -0.000030518,   /*  8 */\n      -0.000885010,\n      0.003417969,\n      -0.015121460,\n      0.021575928,\n      -0.120697021,\n      0.001068115,\n      -0.791213989,\n      1.101211548,\n      0.349868774,\n      0.146362305,\n      0.035552979,\n      0.030532837,\n      0.001098633,\n      0.002456665,\n      0.000198364,\n\n      -0.000030518,\n      -0.000885010,\n      0.003417969,\n      -0.015121460,\n      0.021575928,\n      -0.120697021,\n      0.001068115,\n      -0.791213989,\n      1.101211548,\n      0.349868774,\n      0.146362305,\n      0.035552979,\n      0.030532837,\n      0.001098633,\n      0.002456665,\n      0.000198364 ],\n\n    [ -0.000030518,   /*  9 */\n      -0.000961304,\n      0.003372192,\n      -0.016235352,\n      0.019531250,\n      -0.125259399,\n      -0.015228271,\n      -0.816864014,\n      1.089782715,\n      0.323318481,\n      0.148773193,\n      0.030609131,\n      0.029937744,\n      0.000549316,\n      0.002349854,\n      0.000167847,\n\n      -0.000030518,\n      -0.000961304,\n      0.003372192,\n      -0.016235352,\n      0.019531250,\n      -0.125259399,\n      -0.015228271,\n      -0.816864014,\n      1.089782715,\n      0.323318481,\n      0.148773193,\n      0.030609131,\n      0.029937744,\n      0.000549316,\n      0.002349854,\n      0.000167847 ],\n\n    [ -0.000030518,   /* 10 */\n      -0.001037598,\n      0.003280640,\n      -0.017349243,\n      0.017257690,\n      -0.129562378,\n      -0.032379150,\n      -0.841949463,\n      1.077117920,\n      0.297210693,\n      0.150497437,\n      0.025817871,\n      0.029281616,\n      0.000030518,\n      0.002243042,\n      0.000152588,\n\n      -0.000030518,\n      -0.001037598,\n      0.003280640,\n      -0.017349243,\n      0.017257690,\n      -0.129562378,\n      -0.032379150,\n      -0.841949463,\n      1.077117920,\n      0.297210693,\n      0.150497437,\n      0.025817871,\n      0.029281616,\n      0.000030518,\n      0.002243042,\n      0.000152588 ],\n\n    [ -0.000045776,   /* 11 */\n      -0.001113892,\n      0.003173828,\n      -0.018463135,\n      0.014801025,\n      -0.133590698,\n      -0.050354004,\n      -0.866363525,\n      1.063217163,\n      0.271591187,\n      0.151596069,\n      0.021179199,\n      0.028533936,\n      -0.000442505,\n      0.002120972,\n      0.000137329,\n\n      -0.000045776,\n      -0.001113892,\n      0.003173828,\n      -0.018463135,\n      0.014801025,\n      -0.133590698,\n      -0.050354004,\n      -0.866363525,\n      1.063217163,\n      0.271591187,\n      0.151596069,\n      0.021179199,\n      0.028533936,\n      -0.000442505,\n      0.002120972,\n      0.000137329 ],\n\n    [ -0.000045776,   /* 12 */\n      -0.001205444,\n      0.003051758,\n      -0.019577026,\n      0.012115479,\n      -0.137298584,\n      -0.069168091,\n      -0.890090942,\n      1.048156738,\n      0.246505737,\n      0.152069092,\n      0.016708374,\n      0.027725220,\n      -0.000869751,\n      0.002014160,\n      0.000122070,\n\n      -0.000045776,\n      -0.001205444,\n      0.003051758,\n      -0.019577026,\n      0.012115479,\n      -0.137298584,\n      -0.069168091,\n      -0.890090942,\n      1.048156738,\n      0.246505737,\n      0.152069092,\n      0.016708374,\n      0.027725220,\n      -0.000869751,\n      0.002014160,\n      0.000122070 ],\n\n    [ -0.000061035,   /* 13 */\n      -0.001296997,\n      0.002883911,\n      -0.020690918,\n      0.009231567,\n      -0.140670776,\n      -0.088775635,\n      -0.913055420,\n      1.031936646,\n      0.221984863,\n      0.151962280,\n      0.012420654,\n      0.026840210,\n      -0.001266479,\n      0.001907349,\n      0.000106812,\n\n      -0.000061035,\n      -0.001296997,\n      0.002883911,\n      -0.020690918,\n      0.009231567,\n      -0.140670776,\n      -0.088775635,\n      -0.913055420,\n      1.031936646,\n      0.221984863,\n      0.151962280,\n      0.012420654,\n      0.026840210,\n      -0.001266479,\n      0.001907349,\n      0.000106812 ],\n\n    [ -0.000061035,   /* 14 */\n      -0.001388550,\n      0.002700806,\n      -0.021789551,\n      0.006134033,\n      -0.143676758,\n      -0.109161377,\n      -0.935195923,\n      1.014617920,\n      0.198059082,\n      0.151306152,\n      0.008316040,\n      0.025909424,\n      -0.001617432,\n      0.001785278,\n      0.000106812,\n\n      -0.000061035,\n      -0.001388550,\n      0.002700806,\n      -0.021789551,\n      0.006134033,\n      -0.143676758,\n      -0.109161377,\n      -0.935195923,\n      1.014617920,\n      0.198059082,\n      0.151306152,\n      0.008316040,\n      0.025909424,\n      -0.001617432,\n      0.001785278,\n      0.000106812 ],\n\n    [ -0.000076294,   /* 15 */\n      -0.001480103,\n      0.002487183,\n      -0.022857666,\n      0.002822876,\n      -0.146255493,\n      -0.130310059,\n      -0.956481934,\n      0.996246338,\n      0.174789429,\n      0.150115967,\n      0.004394531,\n      0.024932861,\n      -0.001937866,\n      0.001693726,\n      0.000091553,\n\n      -0.000076294,\n      -0.001480103,\n      0.002487183,\n      -0.022857666,\n      0.002822876,\n      -0.146255493,\n      -0.130310059,\n      -0.956481934,\n      0.996246338,\n      0.174789429,\n      0.150115967,\n      0.004394531,\n      0.024932861,\n      -0.001937866,\n      0.001693726,\n      0.000091553 ],\n\n    [ -0.000076294,   /* 16 */\n      -0.001586914,\n      0.002227783,\n      -0.023910522,\n      -0.000686646,\n      -0.148422241,\n      -0.152206421,\n      -0.976852417,\n      0.976852417,\n      0.152206421,\n      0.148422241,\n      0.000686646,\n      0.023910522,\n      -0.002227783,\n      0.001586914,\n      0.000076294,\n\n      -0.000076294,\n      -0.001586914,\n      0.002227783,\n      -0.023910522,\n      -0.000686646,\n      -0.148422241,\n      -0.152206421,\n      -0.976852417,\n      0.976852417,\n      0.152206421,\n      0.148422241,\n      0.000686646,\n      0.023910522,\n      -0.002227783,\n      0.001586914,\n      0.000076294 ]\n];\n\n/*\n * perform full frequency PCM synthesis\n */\nMP3Synth.prototype.full = function(frame, nch, ns) {\n    var Dptr, hi, lo, ptr;\n    \n    for (var ch = 0; ch < nch; ++ch) {\n        var sbsample = frame.sbsample[ch];\n        var filter  = this.filter[ch];\n        var phase   = this.phase;\n        var pcm     = this.pcm.samples[ch];\n        var pcm1Ptr = 0;\n        var pcm2Ptr = 0;\n\n        for (var s = 0; s < ns; ++s) {\n            MP3Synth.dct32(sbsample[s], phase >> 1, filter[0][phase & 1], filter[1][phase & 1]);\n\n            var pe = phase & ~1;\n            var po = ((phase - 1) & 0xf) | 1;\n\n            /* calculate 32 samples */\n            var fe = filter[0][ phase & 1];\n            var fx = filter[0][~phase & 1];\n            var fo = filter[1][~phase & 1];\n\n            var fePtr = 0;\n            var fxPtr = 0;\n            var foPtr = 0;\n            \n            Dptr = 0;\n\n            ptr = D[Dptr];\n            _fx = fx[fxPtr];\n            _fe = fe[fePtr];\n\n            lo =  _fx[0] * ptr[po +  0];\n            lo += _fx[1] * ptr[po + 14];\n            lo += _fx[2] * ptr[po + 12];\n            lo += _fx[3] * ptr[po + 10];\n            lo += _fx[4] * ptr[po +  8];\n            lo += _fx[5] * ptr[po +  6];\n            lo += _fx[6] * ptr[po +  4];\n            lo += _fx[7] * ptr[po +  2];\n            lo = -lo;                      \n            \n            lo += _fe[0] * ptr[pe +  0];\n            lo += _fe[1] * ptr[pe + 14];\n            lo += _fe[2] * ptr[pe + 12];\n            lo += _fe[3] * ptr[pe + 10];\n            lo += _fe[4] * ptr[pe +  8];\n            lo += _fe[5] * ptr[pe +  6];\n            lo += _fe[6] * ptr[pe +  4];\n            lo += _fe[7] * ptr[pe +  2];\n\n            pcm[pcm1Ptr++] = lo;\n            pcm2Ptr = pcm1Ptr + 30;\n\n            for (var sb = 1; sb < 16; ++sb) {\n                ++fePtr;\n                ++Dptr;\n\n                /* D[32 - sb][i] === -D[sb][31 - i] */\n\n                ptr = D[Dptr];\n                _fo = fo[foPtr];\n                _fe = fe[fePtr];\n\n                lo  = _fo[0] * ptr[po +  0];\n                lo += _fo[1] * ptr[po + 14];\n                lo += _fo[2] * ptr[po + 12];\n                lo += _fo[3] * ptr[po + 10];\n                lo += _fo[4] * ptr[po +  8];\n                lo += _fo[5] * ptr[po +  6];\n                lo += _fo[6] * ptr[po +  4];\n                lo += _fo[7] * ptr[po +  2];\n                lo = -lo;\n\n                lo += _fe[7] * ptr[pe + 2];\n                lo += _fe[6] * ptr[pe + 4];\n                lo += _fe[5] * ptr[pe + 6];\n                lo += _fe[4] * ptr[pe + 8];\n                lo += _fe[3] * ptr[pe + 10];\n                lo += _fe[2] * ptr[pe + 12];\n                lo += _fe[1] * ptr[pe + 14];\n                lo += _fe[0] * ptr[pe + 0];\n\n                pcm[pcm1Ptr++] = lo;\n\n                lo =  _fe[0] * ptr[-pe + 31 - 16];\n                lo += _fe[1] * ptr[-pe + 31 - 14];\n                lo += _fe[2] * ptr[-pe + 31 - 12];\n                lo += _fe[3] * ptr[-pe + 31 - 10];\n                lo += _fe[4] * ptr[-pe + 31 -  8];\n                lo += _fe[5] * ptr[-pe + 31 -  6];\n                lo += _fe[6] * ptr[-pe + 31 -  4];\n                lo += _fe[7] * ptr[-pe + 31 -  2];\n\n                lo += _fo[7] * ptr[-po + 31 -  2];\n                lo += _fo[6] * ptr[-po + 31 -  4];\n                lo += _fo[5] * ptr[-po + 31 -  6];\n                lo += _fo[4] * ptr[-po + 31 -  8];\n                lo += _fo[3] * ptr[-po + 31 - 10];\n                lo += _fo[2] * ptr[-po + 31 - 12];\n                lo += _fo[1] * ptr[-po + 31 - 14];\n                lo += _fo[0] * ptr[-po + 31 - 16];\n\n                pcm[pcm2Ptr--] = lo;\n                ++foPtr;\n            }\n\n            ++Dptr;\n\n            ptr = D[Dptr];\n            _fo = fo[foPtr];\n\n            lo  = _fo[0] * ptr[po +  0];\n            lo += _fo[1] * ptr[po + 14];\n            lo += _fo[2] * ptr[po + 12];\n            lo += _fo[3] * ptr[po + 10];\n            lo += _fo[4] * ptr[po +  8];\n            lo += _fo[5] * ptr[po +  6];\n            lo += _fo[6] * ptr[po +  4];\n            lo += _fo[7] * ptr[po +  2];\n\n            pcm[pcm1Ptr] = -lo;\n            pcm1Ptr += 16;\n            phase = (phase + 1) % 16;\n        }\n    }\n};\n\n// TODO: synth.half()\n\n/*\n * NAME:    synth.frame()\n * DESCRIPTION: perform PCM synthesis of frame subband samples\n */\nMP3Synth.prototype.frame = function (frame) {\n    var nch = frame.header.nchannels();\n    var ns  = frame.header.nbsamples();\n\n    this.pcm.samplerate = frame.header.samplerate;\n    this.pcm.channels   = nch;\n    this.pcm.length     = 32 * ns;\n\n    /*\n     if (frame.options & Mad.Option.HALFSAMPLERATE) {\n     this.pcm.samplerate /= 2;\n     this.pcm.length     /= 2;\n\n     throw new Error(\"HALFSAMPLERATE is not supported. What do you think? As if I have the time for this\");\n     }\n     */\n\n    this.full(frame, nch, ns);\n    this.phase = (this.phase + ns) % 16;\n};\n\nmodule.exports = MP3Synth;\n",
+    "/*\n * These are the scalefactor values for Layer I and Layer II.\n * The values are from Table B.1 of ISO/IEC 11172-3.\n *\n * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict\n * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of\n * 63 is invalid. However, for better compatibility with current practices, we\n * add a 64th entry.\n */\nexports.SF_TABLE = new Float32Array([\n    2.000000000000, 1.587401051968, 1.259921049895, 1.000000000000, \n    0.793700525984, 0.629960524947, 0.500000000000, 0.396850262992,\n    0.314980262474, 0.250000000000, 0.198425131496, 0.157490131237,\n    0.125000000000, 0.099212565748, 0.078745065618, 0.062500000000,\n    0.049606282874, 0.039372532809, 0.031250000000, 0.024803141437,\n    0.019686266405, 0.015625000000, 0.012401570719, 0.009843133202,\n    0.007812500000, 0.006200785359, 0.004921566601, 0.003906250000,\n    0.003100392680, 0.002460783301, 0.001953125000, 0.001550196340,\n    0.001230391650, 0.000976562500, 0.000775098170, 0.000615195825,\n    0.000488281250, 0.000387549085, 0.000307597913, 0.000244140625,\n    0.000193774542, 0.000153798956, 0.000122070313, 0.000096887271,\n    0.000076899478, 0.000061035156, 0.000048443636, 0.000038449739,\n    0.000030517578, 0.000024221818, 0.000019224870, 0.000015258789,\n    0.000012110909, 0.000009612435, 0.000007629395, 0.000006055454,\n    0.000004806217, 0.000003814697, 0.000003027727, 0.000002403109,\n    0.000001907349, 0.000001513864, 0.000001201554, 0.000000000000\n]);\n\n/*\n * MPEG-1 scalefactor band widths\n * derived from Table B.8 of ISO/IEC 11172-3\n */\nconst SFB_48000_LONG = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  6,  6,  6,   8,  10,\n    12, 16, 18, 22, 28, 34, 40, 46, 54,  54, 192\n]);\n\nconst SFB_44100_LONG = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  6,  6,  8,   8,  10,\n    12, 16, 20, 24, 28, 34, 42, 50, 54,  76, 158\n]);\n\nconst SFB_32000_LONG = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  6,  6,  8,  10,  12,\n    16, 20, 24, 30, 38, 46, 56, 68, 84, 102,  26\n]);\n\nconst SFB_48000_SHORT = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,\n    6,  6,  6,  6,  6, 10, 10, 10, 12, 12, 12, 14, 14,\n    14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66\n]);\n\nconst SFB_44100_SHORT = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,\n    6,  6,  8,  8,  8, 10, 10, 10, 12, 12, 12, 14, 14,\n    14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56\n]);\n\nconst SFB_32000_SHORT = new Uint8Array([\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,\n    6,  6,  8,  8,  8, 12, 12, 12, 16, 16, 16, 20, 20,\n    20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12\n]);\n\nconst SFB_48000_MIXED = new Uint8Array([\n    /* long */   4,  4,  4,  4,  4,  4,  6,  6,\n    /* short */  4,  4,  4,  6,  6,  6,  6,  6,  6, 10,\n    10, 10, 12, 12, 12, 14, 14, 14, 16, 16,\n    16, 20, 20, 20, 26, 26, 26, 66, 66, 66\n]);\n\nconst SFB_44100_MIXED = new Uint8Array([\n    /* long */   4,  4,  4,  4,  4,  4,  6,  6,\n    /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,\n    10, 10, 12, 12, 12, 14, 14, 14, 18, 18,\n    18, 22, 22, 22, 30, 30, 30, 56, 56, 56\n]);\n\nconst SFB_32000_MIXED = new Uint8Array([\n    /* long */   4,  4,  4,  4,  4,  4,  6,  6,\n    /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 12,\n    12, 12, 16, 16, 16, 20, 20, 20, 26, 26,\n    26, 34, 34, 34, 42, 42, 42, 12, 12, 12\n]);\n\n/*\n * MPEG-2 scalefactor band widths\n * derived from Table B.2 of ISO/IEC 13818-3\n */\nconst SFB_24000_LONG = new Uint8Array([\n    6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,\n   18, 22, 26, 32, 38, 46, 54, 62, 70,  76,  36\n]);\n\nconst SFB_22050_LONG = new Uint8Array([\n    6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,\n   20, 24, 28, 32, 38, 46, 52, 60, 68,  58,  54\n]);\n\nconst SFB_16000_LONG = SFB_22050_LONG;\n\nconst SFB_24000_SHORT = new Uint8Array([\n   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,\n   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,\n  18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12\n]);\n\nconst SFB_22050_SHORT = new Uint8Array([\n   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  6,\n   6,  6,  8,  8,  8, 10, 10, 10, 14, 14, 14, 18, 18,\n  18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18\n]);\n\nconst SFB_16000_SHORT = new Uint8Array([\n   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,\n   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,\n  18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18\n]);\n\nconst SFB_24000_MIXED = new Uint8Array([\n  /* long */   6,  6,  6,  6,  6,  6,\n  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,\n              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,\n              24, 32, 32, 32, 44, 44, 44, 12, 12, 12\n]);\n\nconst SFB_22050_MIXED = new Uint8Array([\n  /* long */   6,  6,  6,  6,  6,  6,\n  /* short */  6,  6,  6,  6,  6,  6,  8,  8,  8, 10,\n              10, 10, 14, 14, 14, 18, 18, 18, 26, 26,\n              26, 32, 32, 32, 42, 42, 42, 18, 18, 18\n]);\n\nconst SFB_16000_MIXED = new Uint8Array([\n  /* long */   6,  6,  6,  6,  6,  6,\n  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,\n              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,\n              24, 30, 30, 30, 40, 40, 40, 18, 18, 18\n]);\n\n/*\n * MPEG 2.5 scalefactor band widths\n * derived from public sources\n */\nconst SFB_12000_LONG = SFB_16000_LONG;\nconst SFB_11025_LONG = SFB_12000_LONG;\n\nconst SFB_8000_LONG = new Uint8Array([\n  12, 12, 12, 12, 12, 12, 16, 20, 24,  28,  32,\n  40, 48, 56, 64, 76, 90,  2,  2,  2,   2,   2\n]);\n\nconst SFB_12000_SHORT = SFB_16000_SHORT;\nconst SFB_11025_SHORT = SFB_12000_SHORT;\n\nconst SFB_8000_SHORT = new Uint8Array([\n   8,  8,  8,  8,  8,  8,  8,  8,  8, 12, 12, 12, 16,\n  16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36,\n  36,  2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26\n]);\n\nconst SFB_12000_MIXED = SFB_16000_MIXED;\nconst SFB_11025_MIXED = SFB_12000_MIXED;\n\n/* the 8000 Hz short block scalefactor bands do not break after\n   the first 36 frequency lines, so this is probably wrong */\nconst SFB_8000_MIXED = new Uint8Array([\n  /* long */  12, 12, 12,\n  /* short */  4,  4,  4,  8,  8,  8, 12, 12, 12, 16, 16, 16,\n              20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36,\n               2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26\n]);\n\nexports.SFBWIDTH_TABLE = [\n    { l: SFB_48000_LONG, s: SFB_48000_SHORT, m: SFB_48000_MIXED },\n    { l: SFB_44100_LONG, s: SFB_44100_SHORT, m: SFB_44100_MIXED },\n    { l: SFB_32000_LONG, s: SFB_32000_SHORT, m: SFB_32000_MIXED },\n    { l: SFB_24000_LONG, s: SFB_24000_SHORT, m: SFB_24000_MIXED },\n    { l: SFB_22050_LONG, s: SFB_22050_SHORT, m: SFB_22050_MIXED },\n    { l: SFB_16000_LONG, s: SFB_16000_SHORT, m: SFB_16000_MIXED },\n    { l: SFB_12000_LONG, s: SFB_12000_SHORT, m: SFB_12000_MIXED },\n    { l: SFB_11025_LONG, s: SFB_11025_SHORT, m: SFB_11025_MIXED },\n    { l:  SFB_8000_LONG, s:  SFB_8000_SHORT, m:  SFB_8000_MIXED }\n];\n\nexports.PRETAB = new Uint8Array([\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0\n]);\n\n/*\n * fractional powers of two\n * used for requantization and joint stereo decoding\n *\n * ROOT_TABLE[3 + x] = 2^(x/4)\n */\nexports.ROOT_TABLE = new Float32Array([\n    /* 2^(-3/4) */ 0.59460355750136,\n    /* 2^(-2/4) */ 0.70710678118655,\n    /* 2^(-1/4) */ 0.84089641525371,\n    /* 2^( 0/4) */ 1.00000000000000,\n    /* 2^(+1/4) */ 1.18920711500272,\n    /* 2^(+2/4) */ 1.41421356237310,\n    /* 2^(+3/4) */ 1.68179283050743\n]);\n\nexports.CS = new Float32Array([\n    +0.857492926 , +0.881741997,\n    +0.949628649 , +0.983314592,\n    +0.995517816 , +0.999160558,\n    +0.999899195 , +0.999993155\n]);\n\nexports.CA = new Float32Array([\n    -0.514495755, -0.471731969,\n    -0.313377454, -0.181913200,\n    -0.094574193, -0.040965583,\n    -0.014198569, -0.003699975\n]);\n\nexports.COUNT1TABLE_SELECT = 0x01;\nexports.SCALEFAC_SCALE     = 0x02;\nexports.PREFLAG            = 0x04;\nexports.MIXED_BLOCK_FLAG   = 0x08;\n\nexports.I_STEREO  = 0x1;\nexports.MS_STEREO = 0x2;\n\n/*\n * windowing coefficients for long blocks\n * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3\n *\n * WINDOW_L[i] = sin((PI / 36) * (i + 1/2))\n */\nexports.WINDOW_L = new Float32Array([\n    0.043619387, 0.130526192,\n    0.216439614, 0.300705800,\n    0.382683432, 0.461748613,\n    0.537299608, 0.608761429,\n    0.675590208, 0.737277337,\n    0.793353340, 0.843391446,\n\n    0.887010833, 0.923879533,\n    0.953716951, 0.976296007,\n    0.991444861, 0.999048222,\n    0.999048222, 0.991444861,\n    0.976296007, 0.953716951,\n    0.923879533, 0.887010833,\n\n    0.843391446, 0.793353340,\n    0.737277337, 0.675590208,\n    0.608761429, 0.537299608,\n    0.461748613, 0.382683432,\n    0.300705800, 0.216439614,\n    0.130526192, 0.043619387\n]);\n\n/*\n * windowing coefficients for short blocks\n * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3\n *\n * WINDOW_S[i] = sin((PI / 12) * (i + 1/2))\n */\nexports.WINDOW_S = new Float32Array([\n    0.130526192, 0.382683432,\n    0.608761429, 0.793353340,\n    0.923879533, 0.991444861,\n    0.991444861, 0.923879533,\n    0.793353340, 0.608761429,\n    0.382683432, 0.130526192\n]);\n\n/*\n * coefficients for intensity stereo processing\n * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3\n *\n * is_ratio[i] = tan(i * (PI / 12))\n * IS_TABLE[i] = is_ratio[i] / (1 + is_ratio[i])\n */\nexports.IS_TABLE = new Float32Array([\n    0.000000000,\n    0.211324865,\n    0.366025404,\n    0.500000000,\n    0.633974596,\n    0.788675135,\n    1.000000000\n]);\n\n/*\n * coefficients for LSF intensity stereo processing\n * derived from section 2.4.3.2 of ISO/IEC 13818-3\n *\n * IS_LSF_TABLE[0][i] = (1 / sqrt(sqrt(2)))^(i + 1)\n * IS_LSF_TABLE[1][i] = (1 /      sqrt(2)) ^(i + 1)\n */\nexports.IS_LSF_TABLE = [\n    new Float32Array([\n        0.840896415,\n        0.707106781,\n        0.594603558,\n        0.500000000,\n        0.420448208,\n        0.353553391,\n        0.297301779,\n        0.250000000,\n        0.210224104,\n        0.176776695,\n        0.148650889,\n        0.125000000,\n        0.105112052,\n        0.088388348,\n        0.074325445\n    ]), \n    new Float32Array([\n        0.707106781,\n        0.500000000,\n        0.353553391,\n        0.250000000,\n        0.176776695,\n        0.125000000,\n        0.088388348,\n        0.062500000,\n        0.044194174,\n        0.031250000,\n        0.022097087,\n        0.015625000,\n        0.011048543,\n        0.007812500,\n        0.005524272\n    ])\n];\n\n/*\n * scalefactor bit lengths\n * derived from section 2.4.2.7 of ISO/IEC 11172-3\n */\nexports.SFLEN_TABLE = [\n    { slen1: 0, slen2: 0 }, { slen1: 0, slen2: 1 }, { slen1: 0, slen2: 2 }, { slen1: 0, slen2: 3 },\n    { slen1: 3, slen2: 0 }, { slen1: 1, slen2: 1 }, { slen1: 1, slen2: 2 }, { slen1: 1, slen2: 3 },\n    { slen1: 2, slen2: 1 }, { slen1: 2, slen2: 2 }, { slen1: 2, slen2: 3 }, { slen1: 3, slen2: 1 },\n    { slen1: 3, slen2: 2 }, { slen1: 3, slen2: 3 }, { slen1: 4, slen2: 2 }, { slen1: 4, slen2: 3 }    \n];\n\n/*\n * number of LSF scalefactor band values\n * derived from section 2.4.3.2 of ISO/IEC 13818-3\n */\nexports.NSFB_TABLE = [\n    [ [  6,  5,  5, 5 ],\n      [  9,  9,  9, 9 ],\n      [  6,  9,  9, 9 ] ],\n\n    [ [  6,  5,  7, 3 ],\n      [  9,  9, 12, 6 ],\n      [  6,  9, 12, 6 ] ],\n\n    [ [ 11, 10,  0, 0 ],\n      [ 18, 18,  0, 0 ],\n      [ 15, 18,  0, 0 ] ],\n\n    [ [  7,  7,  7, 0 ],\n      [ 12, 12, 12, 0 ],\n      [  6, 15, 12, 0 ] ],\n\n    [ [  6,  6,  6, 3 ],\n      [ 12,  9,  9, 6 ],\n      [  6, 12,  9, 6 ] ],\n\n    [ [  8,  8,  5, 0 ],\n      [ 15, 12,  9, 0 ],\n      [  6, 18,  9, 0 ] ]\n];\n ",
+    "/**\n * Makes a multidimensional array\n */\nexports.makeArray = function(lengths, Type) {\n    if (!Type) Type = Float64Array;\n    \n    if (lengths.length === 1) {\n        return new Type(lengths[0]);\n    }\n    \n    var ret = [],\n        len = lengths[0];\n        \n    for (var j = 0; j < len; j++) {\n        ret[j] = exports.makeArray(lengths.slice(1), Type);\n    }\n    \n    return ret;\n};\n"
+  ],
+  "sourceRoot": ""
+}
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/perllib/plugins/AMCMetadataJSONPlugin.pm
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/perllib/plugins/AMCMetadataJSONPlugin.pm	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/perllib/plugins/AMCMetadataJSONPlugin.pm	(revision 33547)
@@ -0,0 +1,209 @@
+###########################################################################
+#
+# AMCMetadataJSONPlugin.pm -- A plugin for JSON files resulting from page 
+#                             scrape of artists on the Australian Music Centre
+#                             website
+#
+# A component of the Greenstone digital library software
+# from the New Zealand Digital Library Project at the 
+# University of Waikato, New Zealand.
+#
+# Copyright 2016 New Zealand Digital Library Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+###########################################################################
+
+package AMCMetadataJSONPlugin;
+
+
+use BaseImporter;
+use MetadataRead;
+
+use strict;
+no strict 'refs';
+use multiread;
+
+use Encode;
+use JSON;
+
+# methods with identical signatures take precedence in the order given in the ISA list.
+sub BEGIN {
+    @AMCMetadataJSONPlugin::ISA = ('MetadataRead', 'BaseImporter');
+}
+
+
+my $arguments = [
+      { 'name' => "process_exp",
+	'desc' => "{BaseImporter.process_exp}",
+	'type' => "regexp",
+	'reqd' => "no",
+	'deft' => &get_default_process_exp() }
+
+];
+
+
+my $options = { 'name'     => "AMCMetadataJSONPlugin",
+		'desc'     => "{AMCMetadataJSONPlugin.desc}",
+		'abstract' => "no",
+		'inherits' => "yes",
+		'args'     => $arguments };
+
+
+sub new
+{
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
+    push(@{$hashArgOptLists->{"OptList"}},$options);
+
+    my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists);
+
+    return bless $self, $class;
+}
+
+
+sub get_default_process_exp
+{
+    return q^(?i)\.json$^;
+}
+
+sub file_block_read {
+    my $self = shift (@_);
+    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_;
+
+    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
+
+    if (!-f $filename_full_path || !$self->can_process_this_file($filename_full_path)) {
+	return undef; # can't recognise
+    }
+
+    # set this so we know this is a metadata file - needed for incremental 
+    # build
+    # if this file changes, then we need to reimport everything
+    $block_hash->{'metadata_files'}->{$filename_full_path} = 1;
+
+    return 1;
+}
+
+sub metadata_read
+{
+    my $self = shift (@_);
+    my ($pluginfo, $base_dir, $file, $block_hash, 
+	$extrametakeys, $extrametadata, $extrametafile,
+	$processor, $gli, $aux) = @_;
+
+    # Read metadata from JSON files
+    my $filename = &util::filename_cat($base_dir, $file);
+
+    if (!-f $filename || !$self->can_process_this_file($filename)) {
+
+	return undef;
+    }
+    print STDERR "\n<Processing n='$file' p='AMCMetadataJSONPlugin'>\n" if ($gli);
+    print STDERR "AMCMetadataJSONPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
+
+    my $outhandle = $self->{'outhandle'};
+    my $failhandle = $self->{'failhandle'};
+
+    # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
+    $self->block_filename($block_hash,$filename);
+
+
+    # Read the JSON file to get the metadata
+    my $json_file_content;
+    open(JSON_FILE, "$filename");
+    my $json_file_reader = new multiread();
+    $json_file_reader->set_handle('AMCMetadataJSONPlugin::JSON_FILE');
+    $json_file_reader->read_file(\$json_file_content);
+
+    # Would be nice if AMCMetadataJSONPlugin was extended to support a minus
+    # option to choose the character encoding the JSON file is in 
+    # For now we will assume it is always in UTF8
+
+    my $json_file_content_bytes = encode('UTF-8', $json_file_content);
+
+    $json_file_content = decode("utf8",$json_file_content_bytes);
+
+    close(JSON_FILE);
+
+    # Split the file into lines and read the first line (contains the metadata names)
+#    $json_file_content =~ s/\r/\n/g;  # Handle non-Unix line endings
+#    $json_file_content =~ s/\n+/\n/g;
+#    my @json_file_lines = split(/;/s, $json_file_content);
+
+#    my $matching_file = $file;
+#    $matching_filename =~ s/\.js/\.{ogg,mp3,wav}/;
+
+
+#    my $json_metadata = {};
+
+    print STDERR "**** json_metadata = $json_file_content\n";
+    # my $json_metadata = decode_json $json_file_content;
+    my $json_metadata = JSON->new->utf8->decode($json_file_content);
+
+    # We can't associate any metadata without knowing the file to associate it with
+    my $audio_url = $json_metadata->{"audio_url"};
+    if (!defined $audio_url) {
+	$self->print_error($outhandle, $failhandle, $gli, $filename, "No audio_url metadata in JSON file: $file");
+	
+	return -1;
+    }
+
+    my $local_audio_file = $audio_url;
+    $local_audio_file =~ s/^http:\/\/.*\///;
+    
+    print STDERR "***** local audio file = $local_audio_file\n";
+ 
+    foreach my $k (keys %$json_metadata) {
+	$json_metadata->{'amc.'.$k} = [ $json_metadata->{$k} ];
+	delete $json_metadata->{$k};
+    }
+
+
+#    my $json_filename = shift(@$json_trackurl_array);
+#    $json_filename =~ s/\"//g; # strip off quotes
+#    delete $json_metadata->{"track_url"};
+    
+    # Associate the metadata now
+    $local_audio_file = &util::filename_to_regex($local_audio_file);
+
+###  print STDERR "**** setting up mapping for: $json_filename\n";
+
+    $extrametadata->{$local_audio_file} = $json_metadata;
+    push(@$extrametakeys, $local_audio_file);
+    # record which file the metadata came from 
+    if (!defined $extrametafile->{$local_audio_file}) {
+	$extrametafile->{$local_audio_file} = {};
+    }
+    # maps the file to full path
+    $extrametafile->{$local_audio_file}->{$file} = $filename;
+
+    return 1; 
+}
+
+sub print_error
+{
+
+    my $self = shift(@_);
+    my ($outhandle, $failhandle, $gli, $file, $error) = @_;
+
+    print $outhandle "AMCMetadataJSONPlugin Error: $file: $error\n";
+    print $failhandle "AMCMetadataJSONPlugin Error: $file: $error\n";
+    print STDERR "<ProcessingError n='$file' r='$error'/>\n" if ($gli);
+}
+1;
Index: /main/trunk/model-sites-dev/mars/collect/amc-essentia/transform/layouts/main.xsl
===================================================================
--- /main/trunk/model-sites-dev/mars/collect/amc-essentia/transform/layouts/main.xsl	(revision 33547)
+++ /main/trunk/model-sites-dev/mars/collect/amc-essentia/transform/layouts/main.xsl	(revision 33547)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+    xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+    
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:result="http://www.example.com/results"
+    xmlns:exsl="http://exslt.org/common"
+
+	extension-element-prefixes="java util result exsl"
+	exclude-result-prefixes="util java util">
+
+<!--
+	<xsl:import href="header.xsl"/>
+	<xsl:include href="formatmanager.xsl"/>
+	-->
+
+	
+	<!-- the main layout is defined here -->
+	<xsl:template name="mainTemplate">
+	  <xsl:variable name="collName" select="/page/pageResponse/collection/@name"/>
+
+		<html>
+
+			<head>
+				<!-- ***** in header.xsl ***** -->
+				<xsl:call-template name="create-html-header"/>
+				<xsl:call-template name="basketHeadTags"/>
+
+				<!-- src="ext/audioJS/script/XXX.js" -->
+
+				<script src="sites/{$site_name}/collect/{$collName}/js/audiocogs/aurora.js">
+				  <xsl:text>  </xsl:text>
+				</script>
+				<script src="sites/{$site_name}/collect/{$collName}/js/audiocogs/mp3.js">
+				  <xsl:text>  </xsl:text>
+				</script>
+
+
+				<!-- Bootstrap -->
+<!--
+				<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet" />
+-->
+				<link rel="stylesheet" href="ext/audio/css/style.css" />
+				<link rel="stylesheet" href="ext/audio/css/ribbon.css" />
+				<!-- wavesurfer.js -->
+				<script src="ext/audio/ws/wavesurfer.js"><xsl:text>  </xsl:text></script>
+				<script src="ext/audio/ws/plugin/wavesurfer.cursor.js"><xsl:text>  </xsl:text></script>
+				<script src="ext/audio/ws/plugin/wavesurfer.timeline.js"><xsl:text>  </xsl:text></script>
+
+
+			</head>
+			
+			<body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
+				
+				<!--<xsl:call-template name="displayErrorsIfAny"/>-->
+				<a name="top"><xsl:text> </xsl:text></a>
+
+				<iframe src="sites/{$site_name}/collect/{$collName}/iframe/amc-header.html"
+					style="position: absolute; height: 100%; border: none; width: 100%">
+				  <gsf:comment>filler</gsf:comment>
+				</iframe>
+
+				<!-- **** background CSS commented out, can be removed -->
+				<style>
+				  <xsl:text disable-output-escaping="yes">
+				  #container { top: 185px; }
+				  #gs_banner { background-color: #87A41C; background-image: none; }
+
+				  .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+				  border: 1px solid #D6E882;
+				  XXbackground: #C4CBA1 url("images/ui-bg_highlight-hard_15_459e00_1x100.png") repeat-x scroll 50% 50%;
+				  background-color: #C4CBA1;
+				  background-image: none;
+				  font-weight: bold;
+				  color: #000;
+				  }
+
+				  .ui-widget-header {
+				  border: 1px solid #D6E882;
+				  XXbackground: #87A41C url("images/ui-bg_gloss-wave_50_43a21a_500x100.png") repeat-x scroll 50% 50%;
+				  background-color: #87A41C;
+				  background-image: none;
+				  color: #FFF;
+				  font-weight: bold;
+				  }
+				  </xsl:text>
+				</style>
+<!--				
+				<div id="topArea" class="ui-state-default ui-corner-top">
+					<table>
+						<tbody>
+							<tr>
+								<td><div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div></td>
+								
+								
+								<td><xsl:call-template name="home-help-preferences"/></td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+				-->
+
+				<div id="container" class="ui-corner-all">
+
+					<!-- ***** in header.xsl ***** -->
+					<xsl:call-template name="create-banner"/>
+					
+					<xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='on')]">
+						<xsl:call-template name="formatmanagerpre"/>
+					</xsl:if>
+    
+					<div id="gs_content" class="ui-widget-content">
+						<!--
+							show the content of the page.
+							to customise this part, edit the xsl file for the page you want to edit
+						-->
+						<xsl:apply-templates select="/page"/>
+
+					</div>
+
+					<xsl:call-template name="gs_footer"/>
+				</div>
+			</body>
+		</html>
+	</xsl:template>
+	
+	
+</xsl:stylesheet>
