diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index d0c59cd0a732..924c886bcac9 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -296,7 +296,6 @@ skip-if = e10s [browser_contextSearchTabPosition.js] skip-if = os == "mac" || e10s # bug 967013; e10s: bug 1094761 - test hits the network in e10s, causing next test to crash [browser_ctrlTab.js] -[browser_customize_popupNotification.js] [browser_datareporting_notification.js] skip-if = !datareporting [browser_devedition.js] diff --git a/browser/base/content/test/general/browser_customize_popupNotification.js b/browser/base/content/test/general/browser_customize_popupNotification.js deleted file mode 100644 index 4dea7b497607..000000000000 --- a/browser/base/content/test/general/browser_customize_popupNotification.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -Any copyright is dedicated to the Public Domain. -http://creativecommons.org/publicdomain/zero/1.0/ -*/ - -function test() { - waitForExplicitFinish(); - let newWin = OpenBrowserWindow(); - registerCleanupFunction(() => { - newWin.close() - newWin = null; - }); - whenDelayedStartupFinished(newWin, function () { - // Remove the URL bar - newWin.gURLBar.parentNode.removeChild(newWin.gURLBar); - - waitForFocus(function () { - let PN = newWin.PopupNotifications; - try { - let panelPromise = promisePopupShown(PN.panel); - let notification = PN.show(newWin.gBrowser.selectedBrowser, "some-notification", "Some message"); - panelPromise.then(function() { - ok(notification, "showed the notification"); - ok(PN.isPanelOpen, "panel is open"); - is(PN.panel.anchorNode, newWin.gBrowser.selectedTab, "notification is correctly anchored to the tab"); - PN.panel.hidePopup(); - finish(); - }); - } catch (ex) { - ok(false, "threw exception: " + ex); - finish(); - } - }, newWin); - }); -} diff --git a/browser/components/loop/MozLoopService.jsm b/browser/components/loop/MozLoopService.jsm index 572b348a3d83..23b573350752 100644 --- a/browser/components/loop/MozLoopService.jsm +++ b/browser/components/loop/MozLoopService.jsm @@ -1535,13 +1535,29 @@ this.MozLoopService = { let urlStr = this.getLoopPref("gettingStarted.url"); let url = new URL(Services.urlFormatter.formatURL(urlStr)); for (let paramName in aAdditionalParams) { - url.searchParams.append(paramName, aAdditionalParams[paramName]); + url.searchParams.set(paramName, aAdditionalParams[paramName]); } if (aSrc) { url.searchParams.set("utm_source", "firefox-browser"); url.searchParams.set("utm_medium", "firefox-browser"); url.searchParams.set("utm_campaign", aSrc); } + + // Find the most recent pageID that has the Loop prefix. + let mostRecentLoopPageID = {id: null, lastSeen: null}; + for (let pageID of UITour.pageIDsForSession) { + if (pageID[0] && pageID[0].startsWith("hello-tour_OpenPanel_") && + pageID[1] && pageID[1].lastSeen > mostRecentLoopPageID.lastSeen) { + mostRecentLoopPageID.id = pageID[0]; + mostRecentLoopPageID.lastSeen = pageID[1].lastSeen; + } + } + + const PAGE_ID_EXPIRATION_MS = 60 * 60 * 1000; + if (mostRecentLoopPageID.id && + mostRecentLoopPageID.lastSeen > Date.now() - PAGE_ID_EXPIRATION_MS) { + url.searchParams.set("utm_content", mostRecentLoopPageID.id); + } return url; }, diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index 74a5a91d2eb1..270981defcd4 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -74,6 +74,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => { this.UITour = { url: null, seenPageIDs: null, + // This map is not persisted and is used for + // building the content source of a potential tour. + pageIDsForSession: new Map(), pageIDSourceBrowsers: new WeakMap(), /* Map from browser chrome windows to a Set of s in which a tour is open (both visible and hidden) */ tourBrowsersByWindow: new WeakMap(), @@ -375,16 +378,22 @@ this.UITour = { switch (action) { case "registerPageID": { - // This is only relevant if Telemtry is enabled. + if (typeof data.pageID != "string") { + log.warn("registerPageID: pageID must be a string"); + break; + } + + this.pageIDsForSession.set(data.pageID, {lastSeen: Date.now()}); + + // The rest is only relevant if Telemetry is enabled. if (!UITelemetry.enabled) { - log.debug("registerPageID: Telemery disabled, not doing anything"); + log.debug("registerPageID: Telemetry disabled, not doing anything"); break; } // We don't want to allow BrowserUITelemetry.BUCKET_SEPARATOR in the // pageID, as it could make parsing the telemetry bucket name difficult. - if (typeof data.pageID != "string" || - data.pageID.contains(BrowserUITelemetry.BUCKET_SEPARATOR)) { + if (data.pageID.contains(BrowserUITelemetry.BUCKET_SEPARATOR)) { log.warn("registerPageID: Invalid page ID specified"); break; } diff --git a/browser/components/uitour/test/browser.ini b/browser/components/uitour/test/browser.ini index 294f17210084..e86d5da55b2c 100644 --- a/browser/components/uitour/test/browser.ini +++ b/browser/components/uitour/test/browser.ini @@ -20,7 +20,7 @@ skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. [browser_UITour_heartbeat.js] skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. [browser_UITour_loop.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = os == "linux" || e10s # Bug 941428 - UITour.jsm not e10s friendly. [browser_UITour_modalDialog.js] run-if = os == "mac" # modal dialog disabling only working on OS X skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly diff --git a/browser/components/uitour/test/browser_UITour_heartbeat.js b/browser/components/uitour/test/browser_UITour_heartbeat.js index e0d5c63cb8cc..8d7f525c20cc 100644 --- a/browser/components/uitour/test/browser_UITour_heartbeat.js +++ b/browser/components/uitour/test/browser_UITour_heartbeat.js @@ -172,12 +172,12 @@ let tests = [ info("'Heartbeat:Voted' notification received (timestamp " + aData.timestamp.toString() + ")."); ok(Number.isFinite(aData.timestamp), "Timestamp must be a number."); is(aData.score, expectedScore, "Should report a score of " + expectedScore); - done(); break; } case "Heartbeat:NotificationClosed": { info("'Heartbeat:NotificationClosed' notification received (timestamp " + aData.timestamp.toString() + ")."); ok(Number.isFinite(aData.timestamp), "Timestamp must be a number."); + done(); break; } default: @@ -197,6 +197,7 @@ let tests = [ let flowId = "ui-ratefirefox-" + Math.random(); let originalTabCount = gBrowser.tabs.length; const expectedTabCount = originalTabCount + 1; + let heartbeatVoteSeen = false; gContentAPI.observe(function (aEventName, aData) { switch (aEventName) { @@ -210,9 +211,11 @@ let tests = [ case "Heartbeat:Voted": { info("'Heartbeat:Voted' notification received (timestamp " + aData.timestamp.toString() + ")."); ok(Number.isFinite(aData.timestamp), "Timestamp must be a number."); + heartbeatVoteSeen = true; break; } case "Heartbeat:NotificationClosed": { + ok(heartbeatVoteSeen, "Heartbeat vote should have been received"); info("'Heartbeat:NotificationClosed' notification received (timestamp " + aData.timestamp.toString() + ")."); ok(Number.isFinite(aData.timestamp), "Timestamp must be a number."); is(gBrowser.tabs.length, expectedTabCount, "Engagement URL should open in a new tab."); diff --git a/browser/components/uitour/test/browser_UITour_loop.js b/browser/components/uitour/test/browser_UITour_loop.js index d3ae6e034936..88c842211d0b 100644 --- a/browser/components/uitour/test/browser_UITour_loop.js +++ b/browser/components/uitour/test/browser_UITour_loop.js @@ -27,7 +27,84 @@ function runOffline(fun) { } let tests = [ + taskify(function* test_gettingStartedClicked_linkOpenedWithExpectedParams() { + Services.prefs.setBoolPref("loop.gettingStarted.seen", false); + Services.prefs.setCharPref("loop.gettingStarted.url", "http://example.com"); + ise(loopButton.open, false, "Menu should initially be closed"); + loopButton.click(); + + yield waitForConditionPromise(() => { + return loopButton.open; + }, "Menu should be visible after showMenu()"); + + gContentAPI.registerPageID("hello-tour_OpenPanel_testPage"); + yield new Promise(resolve => { + gContentAPI.ping(() => resolve()); + }); + + let loopDoc = document.getElementById("loop-notification-panel").children[0].contentDocument; + let gettingStartedButton = loopDoc.getElementById("fte-button"); + ok(gettingStartedButton, "Getting Started button should be found"); + + let newTabPromise = waitForConditionPromise(() => { + return gBrowser.currentURI.path.contains("utm_source=firefox-browser"); + }, "New tab with utm_content=testPageNewID should have opened"); + + gettingStartedButton.click(); + yield newTabPromise; + ok(gBrowser.currentURI.path.contains("utm_content=hello-tour_OpenPanel_testPage"), + "Expected URL opened (" + gBrowser.currentURI.path + ")"); + yield gBrowser.removeCurrentTab(); + + checkLoopPanelIsHidden(); + }), + taskify(function* test_gettingStartedClicked_linkOpenedWithExpectedParams2() { + Services.prefs.setBoolPref("loop.gettingStarted.seen", false); + // Force a refresh of the loop panel since going from seen -> unseen doesn't trigger + // automatic re-rendering. + let loopWin = document.getElementById("loop-notification-panel").children[0].contentWindow; + var event = new loopWin.CustomEvent("GettingStartedSeen"); + loopWin.dispatchEvent(event); + + UITour.pageIDsForSession.clear(); + Services.prefs.setCharPref("loop.gettingStarted.url", "http://example.com"); + ise(loopButton.open, false, "Menu should initially be closed"); + loopButton.click(); + + yield waitForConditionPromise(() => { + return loopButton.open; + }, "Menu should be visible after showMenu()"); + + + gContentAPI.registerPageID("hello-tour_OpenPanel_testPageOldId"); + yield new Promise(resolve => { + gContentAPI.ping(() => resolve()); + }); + // Set the time of the page ID to 10 hours earlier, so that it is considered "expired". + UITour.pageIDsForSession.set("hello-tour_OpenPanel_testPageOldId", + {lastSeen: Date.now() - (10 * 60 * 60 * 1000)}); + + let loopDoc = loopWin.document; + let gettingStartedButton = loopDoc.getElementById("fte-button"); + ok(gettingStartedButton, "Getting Started button should be found"); + + let newTabPromise = waitForConditionPromise(() => { + Services.console.logStringMessage(gBrowser.currentURI.path); + return gBrowser.currentURI.path.contains("utm_source=firefox-browser"); + }, "New tab with utm_content=testPageNewID should have opened"); + + gettingStartedButton.click(); + yield newTabPromise; + ok(!gBrowser.currentURI.path.contains("utm_content=hello-tour_OpenPanel_testPageOldId"), + "Expected URL opened without the utm_content parameter (" + + gBrowser.currentURI.path + ")"); + yield gBrowser.removeCurrentTab(); + + checkLoopPanelIsHidden(); + }), taskify(function* test_menu_show_hide() { + // The targets to highlight only appear after getting started is launched. + Services.prefs.setBoolPref("loop.gettingStarted.seen", true); ise(loopButton.open, false, "Menu should initially be closed"); gContentAPI.showMenu("loop"); @@ -277,8 +354,6 @@ function setupFakeRoom() { if (Services.prefs.getBoolPref("loop.enabled")) { loopButton = window.LoopUI.toolbarButton.node; - // The targets to highlight only appear after getting started is launched. - Services.prefs.setBoolPref("loop.gettingStarted.seen", true); registerCleanupFunction(() => { Services.prefs.clearUserPref("loop.gettingStarted.resumeOnFirstJoin"); diff --git a/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm b/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm index e165e38e75da..17d3b4662fb2 100644 --- a/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm +++ b/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm @@ -53,7 +53,8 @@ function getStringPref(pref, def) { } function log(str) { - dump(str + '\n'); + var msg = 'ShumwayBootstrapUtils.jsm: ' + str; + Services.console.logStringMessage(msg); } // Register/unregister a constructor as a factory. @@ -80,6 +81,19 @@ Factory.prototype = { let converterFactory = new Factory(); let overlayConverterFactory = new Factory(); +function allowedPlatformForMedia() { + var oscpu = Cc["@mozilla.org/network/protocol;1?name=http"] + .getService(Ci.nsIHttpProtocolHandler).oscpu; + if (oscpu.indexOf('Windows NT') === 0) { + return oscpu.indexOf('Windows NT 5') < 0; // excluding Windows XP + } + if (oscpu.indexOf('Intel Mac OS X') === 0) { + return true; + } + // Other platforms are not supported yet. + return false; +} + var ShumwayBootstrapUtils = { register: function () { // Register the components. @@ -88,7 +102,15 @@ var ShumwayBootstrapUtils = { if (registerOverlayPreview) { var ignoreCTP = getBoolPref(PREF_IGNORE_CTP, true); - var whitelist = getStringPref(PREF_WHITELIST); + var whitelist = getStringPref(PREF_WHITELIST); + // Some platforms cannot support video playback, and our whitelist targets + // only video players atm. We need to disable Shumway for those platforms. + if (whitelist && !Services.prefs.prefHasUserValue(PREF_WHITELIST) && + !allowedPlatformForMedia()) { + log('Default SWF whitelist is used on an unsupported platform -- ' + + 'using demo whitelist.'); + whitelist = 'http://www.areweflashyet.com/*.swf'; + } Ph.registerPlayPreviewMimeType(SWF_CONTENT_TYPE, ignoreCTP, undefined, whitelist); } diff --git a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm b/browser/extensions/shumway/content/ShumwayStreamConverter.jsm index 57e5cb858037..910548536480 100644 --- a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm +++ b/browser/extensions/shumway/content/ShumwayStreamConverter.jsm @@ -220,7 +220,7 @@ function isShumwayEnabledFor(actions) { function getVersionInfo() { var deferred = Promise.defer(); var versionInfo = { - version: 'unknown', + geckoVersion: 'unknown', geckoBuildID: 'unknown', shumwayVersion: 'unknown' }; @@ -230,18 +230,30 @@ function getVersionInfo() { versionInfo.geckoVersion = appInfo.version; versionInfo.geckoBuildID = appInfo.appBuildID; } catch (e) { - log('Error encountered while getting platform version info:', e); + log('Error encountered while getting platform version info: ' + e); } - try { - var addonId = "shumway@research.mozilla.org"; - AddonManager.getAddonByID(addonId, function(addon) { - versionInfo.shumwayVersion = addon ? addon.version : 'n/a'; - deferred.resolve(versionInfo); - }); - } catch (e) { - log('Error encountered while getting Shumway version info:', e); + var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] + .createInstance(Ci.nsIXMLHttpRequest); + xhr.open('GET', 'resource://shumway/version.txt', true); + xhr.overrideMimeType('text/plain'); + xhr.onload = function () { + try { + // Trying to merge version.txt lines into something like: + // "version (sha) details" + var lines = xhr.responseText.split(/\n/g); + lines[1] = '(' + lines[1] + ')'; + versionInfo.shumwayVersion = lines.join(' '); + } catch (e) { + log('Error while parsing version info: ' + e); + } deferred.resolve(versionInfo); - } + }; + xhr.onerror = function () { + log('Error while reading version info: ' + xhr.error); + deferred.resolve(versionInfo); + }; + xhr.send(); + return deferred.promise; } @@ -754,6 +766,7 @@ function activateShumwayScripts(window, requestListener) { } function initExternalCom(wrappedWindow, wrappedObject, targetWindow) { + var traceExternalInterface = getBoolPref('shumway.externalInterface.trace', false); if (!wrappedWindow.__flash__initialized) { wrappedWindow.__flash__initialized = true; wrappedWindow.__flash__toXML = function __flash__toXML(obj) { @@ -786,29 +799,32 @@ function initExternalCom(wrappedWindow, wrappedObject, targetWindow) { } }; wrappedWindow.__flash__eval = function (expr) { - this.console.log('__flash__eval: ' + expr); + traceExternalInterface && this.console.log('__flash__eval: ' + expr); // allowScriptAccess protects page from unwanted swf scripts, // we can execute script in the page context without restrictions. - return this.eval(expr); + var result = this.eval(expr); + traceExternalInterface && this.console.log('__flash__eval (result): ' + result); + return result; }.bind(wrappedWindow); wrappedWindow.__flash__call = function (expr) { - this.console.log('__flash__call (ignored): ' + expr); + traceExternalInterface && this.console.log('__flash__call (ignored): ' + expr); }; } wrappedObject.__flash__registerCallback = function (functionName) { - wrappedWindow.console.log('__flash__registerCallback: ' + functionName); + traceExternalInterface && wrappedWindow.console.log('__flash__registerCallback: ' + functionName); Components.utils.exportFunction(function () { var args = Array.prototype.slice.call(arguments, 0); - wrappedWindow.console.log('__flash__callIn: ' + functionName); + traceExternalInterface && wrappedWindow.console.log('__flash__callIn: ' + functionName); var result; if (targetWindow.wrappedJSObject.onExternalCallback) { result = targetWindow.wrappedJSObject.onExternalCallback({functionName: functionName, args: args}); + traceExternalInterface && wrappedWindow.console.log('__flash__callIn (result): ' + result); } return wrappedWindow.eval(result); }, this, { defineAs: functionName }); }; wrappedObject.__flash__unregisterCallback = function (functionName) { - wrappedWindow.console.log('__flash__unregisterCallback: ' + functionName); + traceExternalInterface && wrappedWindow.console.log('__flash__unregisterCallback: ' + functionName); delete this[functionName]; }; } @@ -909,7 +925,11 @@ ShumwayStreamConverterBase.prototype = { throw new Error('Movie url is not specified'); } - baseUrl = objectParams.base || pageUrl; + if (objectParams.base) { + baseUrl = Services.io.newURI(objectParams.base, null, pageUrl).spec; + } else { + baseUrl = pageUrl; + } var movieParams = {}; if (objectParams.flashvars) { diff --git a/browser/extensions/shumway/content/ShumwayUtils.jsm b/browser/extensions/shumway/content/ShumwayUtils.jsm index aae94b1e60fd..e8426adbcf77 100644 --- a/browser/extensions/shumway/content/ShumwayUtils.jsm +++ b/browser/extensions/shumway/content/ShumwayUtils.jsm @@ -17,6 +17,7 @@ var EXPORTED_SYMBOLS = ["ShumwayUtils"]; const PREF_PREFIX = 'shumway.'; const PREF_DISABLED = PREF_PREFIX + 'disabled'; +const PREF_WHITELIST = PREF_PREFIX + 'swf.whitelist'; let Cc = Components.classes; let Ci = Components.interfaces; @@ -43,6 +44,7 @@ let ShumwayUtils = { _registered: false, init: function init() { + this.migratePreferences(); if (this.enabled) this._ensureRegistered(); else @@ -56,6 +58,19 @@ let ShumwayUtils = { Services.prefs.addObserver(PREF_DISABLED, this, false); }, + migratePreferences: function migratePreferences() { + // At one point we had shumway.disabled set to true by default, + // and we are trying to replace it with shumway.swf.whitelist: + // checking if the user already changed it before to reset + // the whitelist to '*'. + if (Services.prefs.prefHasUserValue(PREF_DISABLED) && + !Services.prefs.prefHasUserValue(PREF_WHITELIST) && + !getBoolPref(PREF_DISABLED, false)) { + // The user is already using Shumway -- enabling all web sites. + Services.prefs.setCharPref(PREF_WHITELIST, '*'); + } + }, + // nsIObserver observe: function observe(aSubject, aTopic, aData) { if (this.enabled) diff --git a/browser/extensions/shumway/content/playerglobal/playerglobal.abcs b/browser/extensions/shumway/content/playerglobal/playerglobal.abcs index a4c393b8488c..eb3040f1a244 100644 Binary files a/browser/extensions/shumway/content/playerglobal/playerglobal.abcs and b/browser/extensions/shumway/content/playerglobal/playerglobal.abcs differ diff --git a/browser/extensions/shumway/content/playerglobal/playerglobal.json b/browser/extensions/shumway/content/playerglobal/playerglobal.json index ebdc0d858bfa..8c1152841d05 100644 --- a/browser/extensions/shumway/content/playerglobal/playerglobal.json +++ b/browser/extensions/shumway/content/playerglobal/playerglobal.json @@ -909,14 +909,14 @@ "flash.events:UncaughtErrorEvents" ], "offset": 62984, - "length": 194 + "length": 236 }, { "name": "flash/events/VideoEvent", "defs": [ "flash.events:VideoEvent" ], - "offset": 63178, + "offset": 63220, "length": 461 }, { @@ -924,7 +924,7 @@ "defs": [ "flash.geom:ColorTransform" ], - "offset": 63639, + "offset": 63681, "length": 586 }, { @@ -932,7 +932,7 @@ "defs": [ "flash.geom:Matrix" ], - "offset": 64225, + "offset": 64267, "length": 814 }, { @@ -940,7 +940,7 @@ "defs": [ "flash.geom:Matrix3D" ], - "offset": 65039, + "offset": 65081, "length": 1092 }, { @@ -948,7 +948,7 @@ "defs": [ "flash.geom:Orientation3D" ], - "offset": 66131, + "offset": 66173, "length": 290 }, { @@ -956,7 +956,7 @@ "defs": [ "flash.geom:PerspectiveProjection" ], - "offset": 66421, + "offset": 66463, "length": 389 }, { @@ -964,7 +964,7 @@ "defs": [ "flash.geom:Point" ], - "offset": 66810, + "offset": 66852, "length": 516 }, { @@ -972,7 +972,7 @@ "defs": [ "flash.geom:Rectangle" ], - "offset": 67326, + "offset": 67368, "length": 889 }, { @@ -980,7 +980,7 @@ "defs": [ "flash.geom:Transform" ], - "offset": 68215, + "offset": 68257, "length": 553 }, { @@ -988,7 +988,7 @@ "defs": [ "flash.geom:Utils3D" ], - "offset": 68768, + "offset": 68810, "length": 342 }, { @@ -996,7 +996,7 @@ "defs": [ "flash.geom:Vector3D" ], - "offset": 69110, + "offset": 69152, "length": 830 }, { @@ -1004,7 +1004,7 @@ "defs": [ "flash.filters:BevelFilter" ], - "offset": 69940, + "offset": 69982, "length": 685 }, { @@ -1012,7 +1012,7 @@ "defs": [ "flash.filters:BitmapFilter" ], - "offset": 70625, + "offset": 70667, "length": 209 }, { @@ -1020,7 +1020,7 @@ "defs": [ "flash.filters:BitmapFilterQuality" ], - "offset": 70834, + "offset": 70876, "length": 256 }, { @@ -1028,7 +1028,7 @@ "defs": [ "flash.filters:BitmapFilterType" ], - "offset": 71090, + "offset": 71132, "length": 268 }, { @@ -1036,7 +1036,7 @@ "defs": [ "flash.filters:BlurFilter" ], - "offset": 71358, + "offset": 71400, "length": 342 }, { @@ -1044,7 +1044,7 @@ "defs": [ "flash.filters:ColorMatrixFilter" ], - "offset": 71700, + "offset": 71742, "length": 294 }, { @@ -1052,7 +1052,7 @@ "defs": [ "flash.filters:ConvolutionFilter" ], - "offset": 71994, + "offset": 72036, "length": 570 }, { @@ -1060,7 +1060,7 @@ "defs": [ "flash.filters:DisplacementMapFilter" ], - "offset": 72564, + "offset": 72606, "length": 632 }, { @@ -1068,7 +1068,7 @@ "defs": [ "flash.filters:DisplacementMapFilterMode" ], - "offset": 73196, + "offset": 73238, "length": 315 }, { @@ -1076,7 +1076,7 @@ "defs": [ "flash.filters:DropShadowFilter" ], - "offset": 73511, + "offset": 73553, "length": 627 }, { @@ -1084,7 +1084,7 @@ "defs": [ "flash.filters:GlowFilter" ], - "offset": 74138, + "offset": 74180, "length": 517 }, { @@ -1092,7 +1092,7 @@ "defs": [ "flash.filters:GradientBevelFilter" ], - "offset": 74655, + "offset": 74697, "length": 649 }, { @@ -1100,7 +1100,7 @@ "defs": [ "flash.filters:GradientGlowFilter" ], - "offset": 75304, + "offset": 75346, "length": 646 }, { @@ -1108,7 +1108,7 @@ "defs": [ "flash.globalization:Collator" ], - "offset": 75950, + "offset": 75992, "length": 692 }, { @@ -1116,7 +1116,7 @@ "defs": [ "flash.globalization:CollatorMode" ], - "offset": 76642, + "offset": 76684, "length": 257 }, { @@ -1124,7 +1124,7 @@ "defs": [ "flash.globalization:CurrencyFormatter" ], - "offset": 76899, + "offset": 76941, "length": 1104 }, { @@ -1132,7 +1132,7 @@ "defs": [ "flash.globalization:CurrencyParseResult" ], - "offset": 78003, + "offset": 78045, "length": 350 }, { @@ -1140,7 +1140,7 @@ "defs": [ "flash.globalization:DateTimeFormatter" ], - "offset": 78353, + "offset": 78395, "length": 830 }, { @@ -1148,7 +1148,7 @@ "defs": [ "flash.globalization:DateTimeNameContext" ], - "offset": 79183, + "offset": 79225, "length": 273 }, { @@ -1156,7 +1156,7 @@ "defs": [ "flash.globalization:DateTimeNameStyle" ], - "offset": 79456, + "offset": 79498, "length": 330 }, { @@ -1164,7 +1164,7 @@ "defs": [ "flash.globalization:DateTimeStyle" ], - "offset": 79786, + "offset": 79828, "length": 330 }, { @@ -1172,7 +1172,7 @@ "defs": [ "flash.globalization:LastOperationStatus" ], - "offset": 80116, + "offset": 80158, "length": 1104 }, { @@ -1180,7 +1180,7 @@ "defs": [ "flash.globalization:LocaleID" ], - "offset": 81220, + "offset": 81262, "length": 560 }, { @@ -1188,7 +1188,7 @@ "defs": [ "flash.globalization:NationalDigitsType" ], - "offset": 81780, + "offset": 81822, "length": 1055 }, { @@ -1196,7 +1196,7 @@ "defs": [ "flash.globalization:NumberFormatter" ], - "offset": 82835, + "offset": 82877, "length": 946 }, { @@ -1204,7 +1204,7 @@ "defs": [ "flash.globalization:NumberParseResult" ], - "offset": 83781, + "offset": 83823, "length": 367 }, { @@ -1212,7 +1212,7 @@ "defs": [ "flash.globalization:StringTools" ], - "offset": 84148, + "offset": 84190, "length": 460 }, { @@ -1220,7 +1220,7 @@ "defs": [ "flash.media:AudioDecoder" ], - "offset": 84608, + "offset": 84650, "length": 448 }, { @@ -1228,7 +1228,7 @@ "defs": [ "flash.media:Camera" ], - "offset": 85056, + "offset": 85098, "length": 1029 }, { @@ -1236,7 +1236,7 @@ "defs": [ "flash.media:H264Level" ], - "offset": 86085, + "offset": 86127, "length": 613 }, { @@ -1244,7 +1244,7 @@ "defs": [ "flash.media:H264Profile" ], - "offset": 86698, + "offset": 86740, "length": 233 }, { @@ -1252,7 +1252,7 @@ "defs": [ "flash.media:H264VideoStreamSettings" ], - "offset": 86931, + "offset": 86973, "length": 1137 }, { @@ -1260,7 +1260,7 @@ "defs": [ "flash.media:ID3Info" ], - "offset": 88068, + "offset": 88110, "length": 300 }, { @@ -1268,7 +1268,7 @@ "defs": [ "flash.media:Microphone" ], - "offset": 88368, + "offset": 88410, "length": 986 }, { @@ -1276,7 +1276,7 @@ "defs": [ "flash.media:MicrophoneEnhancedMode" ], - "offset": 89354, + "offset": 89396, "length": 367 }, { @@ -1284,7 +1284,7 @@ "defs": [ "flash.media:MicrophoneEnhancedOptions" ], - "offset": 89721, + "offset": 89763, "length": 604 }, { @@ -1292,7 +1292,7 @@ "defs": [ "flash.media:Sound" ], - "offset": 90325, + "offset": 90367, "length": 726 }, { @@ -1300,7 +1300,7 @@ "defs": [ "flash.media:SoundChannel" ], - "offset": 91051, + "offset": 91093, "length": 390 }, { @@ -1308,7 +1308,7 @@ "defs": [ "flash.media:SoundCodec" ], - "offset": 91441, + "offset": 91483, "length": 287 }, { @@ -1316,7 +1316,7 @@ "defs": [ "flash.media:SoundLoaderContext" ], - "offset": 91728, + "offset": 91770, "length": 261 }, { @@ -1324,7 +1324,7 @@ "defs": [ "flash.media:SoundMixer" ], - "offset": 91989, + "offset": 92031, "length": 513 }, { @@ -1332,7 +1332,7 @@ "defs": [ "flash.media:SoundTransform" ], - "offset": 92502, + "offset": 92544, "length": 422 }, { @@ -1340,7 +1340,7 @@ "defs": [ "flash.media:StageVideo" ], - "offset": 92924, + "offset": 92966, "length": 570 }, { @@ -1348,7 +1348,7 @@ "defs": [ "flash.media:StageVideoAvailability" ], - "offset": 93494, + "offset": 93536, "length": 271 }, { @@ -1356,7 +1356,7 @@ "defs": [ "flash.media:Video" ], - "offset": 93765, + "offset": 93807, "length": 494 }, { @@ -1364,7 +1364,7 @@ "defs": [ "flash.media:VideoCodec" ], - "offset": 94259, + "offset": 94301, "length": 256 }, { @@ -1372,7 +1372,7 @@ "defs": [ "flash.media:VideoStatus" ], - "offset": 94515, + "offset": 94557, "length": 286 }, { @@ -1380,7 +1380,7 @@ "defs": [ "flash.media:VideoStreamSettings" ], - "offset": 94801, + "offset": 94843, "length": 651 }, { @@ -1388,7 +1388,7 @@ "defs": [ "flash.profiler:Telemetry" ], - "offset": 95452, + "offset": 95494, "length": 422 }, { @@ -1396,7 +1396,7 @@ "defs": [ "flash.printing:PrintJob" ], - "offset": 95874, + "offset": 95916, "length": 711 }, { @@ -1404,7 +1404,7 @@ "defs": [ "flash.printing:PrintJobOptions" ], - "offset": 96585, + "offset": 96627, "length": 216 }, { @@ -1412,7 +1412,7 @@ "defs": [ "flash.printing:PrintJobOrientation" ], - "offset": 96801, + "offset": 96843, "length": 265 }, { @@ -1420,7 +1420,7 @@ "defs": [ "flash.security:CertificateStatus" ], - "offset": 97066, + "offset": 97108, "length": 533 }, { @@ -1428,7 +1428,7 @@ "defs": [ "flash.security:X500DistinguishedName" ], - "offset": 97599, + "offset": 97641, "length": 427 }, { @@ -1436,7 +1436,7 @@ "defs": [ "flash.security:X509Certificate" ], - "offset": 98026, + "offset": 98068, "length": 635 }, { @@ -1444,7 +1444,7 @@ "defs": [ "flash.sampler:ClassFactory" ], - "offset": 98661, + "offset": 98703, "length": 285 }, { @@ -1452,7 +1452,7 @@ "defs": [ "flash.sampler:DeleteObjectSample" ], - "offset": 98946, + "offset": 98988, "length": 233 }, { @@ -1460,7 +1460,7 @@ "defs": [ "flash.sampler:NewObjectSample" ], - "offset": 99179, + "offset": 99221, "length": 308 }, { @@ -1468,7 +1468,7 @@ "defs": [ "flash.sampler:Sample" ], - "offset": 99487, + "offset": 99529, "length": 205 }, { @@ -1476,7 +1476,7 @@ "defs": [ "flash.sampler:StackFrame" ], - "offset": 99692, + "offset": 99734, "length": 310 }, { @@ -1484,7 +1484,7 @@ "defs": [ "flash.system:ApplicationDomain" ], - "offset": 100002, + "offset": 100044, "length": 498 }, { @@ -1492,7 +1492,7 @@ "defs": [ "flash.system:ApplicationInstaller" ], - "offset": 100500, + "offset": 100542, "length": 426 }, { @@ -1500,7 +1500,7 @@ "defs": [ "flash.system:AuthorizedFeatures" ], - "offset": 100926, + "offset": 100968, "length": 456 }, { @@ -1508,7 +1508,7 @@ "defs": [ "flash.system:AuthorizedFeaturesLoader" ], - "offset": 101382, + "offset": 101424, "length": 398 }, { @@ -1516,7 +1516,7 @@ "defs": [ "flash.system:Capabilities" ], - "offset": 101780, + "offset": 101822, "length": 1133 }, { @@ -1524,7 +1524,7 @@ "defs": [ "flash.system:DomainMemoryWithStage3D" ], - "offset": 102913, + "offset": 102955, "length": 191 }, { @@ -1533,7 +1533,7 @@ "flash.system:FSCommand", "flash.system:fscommand" ], - "offset": 103104, + "offset": 103146, "length": 285 }, { @@ -1541,7 +1541,7 @@ "defs": [ "flash.system:ImageDecodingPolicy" ], - "offset": 103389, + "offset": 103431, "length": 257 }, { @@ -1549,7 +1549,7 @@ "defs": [ "flash.system:IME" ], - "offset": 103646, + "offset": 103688, "length": 469 }, { @@ -1557,7 +1557,7 @@ "defs": [ "flash.system:IMEConversionMode" ], - "offset": 104115, + "offset": 104157, "length": 432 }, { @@ -1565,7 +1565,7 @@ "defs": [ "flash.system:JPEGLoaderContext" ], - "offset": 104547, + "offset": 104589, "length": 309 }, { @@ -1573,7 +1573,7 @@ "defs": [ "flash.system:LoaderContext" ], - "offset": 104856, + "offset": 104898, "length": 480 }, { @@ -1581,7 +1581,7 @@ "defs": [ "flash.system:MessageChannel" ], - "offset": 105336, + "offset": 105378, "length": 584 }, { @@ -1589,7 +1589,7 @@ "defs": [ "flash.system:MessageChannelState" ], - "offset": 105920, + "offset": 105962, "length": 278 }, { @@ -1597,7 +1597,7 @@ "defs": [ "flash.system:Security" ], - "offset": 106198, + "offset": 106240, "length": 773 }, { @@ -1605,7 +1605,7 @@ "defs": [ "flash.system:SecurityDomain" ], - "offset": 106971, + "offset": 107013, "length": 221 }, { @@ -1613,7 +1613,7 @@ "defs": [ "flash.system:SecurityPanel" ], - "offset": 107192, + "offset": 107234, "length": 430 }, { @@ -1621,7 +1621,7 @@ "defs": [ "flash.system:System" ], - "offset": 107622, + "offset": 107664, "length": 602 }, { @@ -1629,7 +1629,7 @@ "defs": [ "flash.system:SystemUpdater" ], - "offset": 108224, + "offset": 108266, "length": 322 }, { @@ -1637,7 +1637,7 @@ "defs": [ "flash.system:SystemUpdaterType" ], - "offset": 108546, + "offset": 108588, "length": 241 }, { @@ -1645,7 +1645,7 @@ "defs": [ "flash.system:TouchscreenType" ], - "offset": 108787, + "offset": 108829, "length": 268 }, { @@ -1653,7 +1653,7 @@ "defs": [ "flash.trace:Trace" ], - "offset": 109055, + "offset": 109097, "length": 488 }, { @@ -1661,7 +1661,7 @@ "defs": [ "flash.ui:ContextMenu" ], - "offset": 109543, + "offset": 109585, "length": 636 }, { @@ -1669,7 +1669,7 @@ "defs": [ "flash.ui:ContextMenuBuiltInItems" ], - "offset": 110179, + "offset": 110221, "length": 467 }, { @@ -1677,7 +1677,7 @@ "defs": [ "flash.ui:ContextMenuClipboardItems" ], - "offset": 110646, + "offset": 110688, "length": 380 }, { @@ -1685,7 +1685,7 @@ "defs": [ "flash.ui:ContextMenuItem" ], - "offset": 111026, + "offset": 111068, "length": 458 }, { @@ -1693,7 +1693,7 @@ "defs": [ "flash.ui:GameInput" ], - "offset": 111484, + "offset": 111526, "length": 333 }, { @@ -1701,7 +1701,7 @@ "defs": [ "flash.ui:GameInputControl" ], - "offset": 111817, + "offset": 111859, "length": 458 }, { @@ -1709,7 +1709,7 @@ "defs": [ "flash.ui:GameInputControlType" ], - "offset": 112275, + "offset": 112317, "length": 389 }, { @@ -1717,7 +1717,7 @@ "defs": [ "flash.ui:GameInputDevice" ], - "offset": 112664, + "offset": 112706, "length": 623 }, { @@ -1725,7 +1725,7 @@ "defs": [ "flash.ui:GameInputFinger" ], - "offset": 113287, + "offset": 113329, "length": 291 }, { @@ -1733,7 +1733,7 @@ "defs": [ "flash.ui:GameInputHand" ], - "offset": 113578, + "offset": 113620, "length": 256 }, { @@ -1741,7 +1741,7 @@ "defs": [ "flash.ui:Keyboard" ], - "offset": 113834, + "offset": 113876, "length": 9336 }, { @@ -1749,7 +1749,7 @@ "defs": [ "flash.ui:KeyboardType" ], - "offset": 123170, + "offset": 123212, "length": 266 }, { @@ -1757,7 +1757,7 @@ "defs": [ "flash.ui:KeyLocation" ], - "offset": 123436, + "offset": 123478, "length": 273 }, { @@ -1765,7 +1765,7 @@ "defs": [ "flash.ui:Mouse" ], - "offset": 123709, + "offset": 123751, "length": 383 }, { @@ -1773,7 +1773,7 @@ "defs": [ "flash.ui:MouseCursor" ], - "offset": 124092, + "offset": 124134, "length": 302 }, { @@ -1781,7 +1781,7 @@ "defs": [ "flash.ui:MouseCursorData" ], - "offset": 124394, + "offset": 124436, "length": 352 }, { @@ -1789,7 +1789,7 @@ "defs": [ "flash.ui:Multitouch" ], - "offset": 124746, + "offset": 124788, "length": 435 }, { @@ -1797,7 +1797,7 @@ "defs": [ "flash.ui:MultitouchInputMode" ], - "offset": 125181, + "offset": 125223, "length": 279 }, { @@ -1805,7 +1805,7 @@ "defs": [ "flash.sensors:Accelerometer" ], - "offset": 125460, + "offset": 125502, "length": 357 }, { @@ -1813,7 +1813,7 @@ "defs": [ "flash.sensors:Geolocation" ], - "offset": 125817, + "offset": 125859, "length": 351 }, { @@ -1821,7 +1821,7 @@ "defs": [ "flash.display3D:Context3D" ], - "offset": 126168, + "offset": 126210, "length": 2088 }, { @@ -1829,7 +1829,7 @@ "defs": [ "flash.display3D:Context3DBlendFactor" ], - "offset": 128256, + "offset": 128298, "length": 681 }, { @@ -1837,7 +1837,7 @@ "defs": [ "flash.display3D:Context3DClearMask" ], - "offset": 128937, + "offset": 128979, "length": 292 }, { @@ -1845,7 +1845,7 @@ "defs": [ "flash.display3D:Context3DProfile" ], - "offset": 129229, + "offset": 129271, "length": 282 }, { @@ -1853,7 +1853,7 @@ "defs": [ "flash.display3D:Context3DProgramType" ], - "offset": 129511, + "offset": 129553, "length": 263 }, { @@ -1861,7 +1861,7 @@ "defs": [ "flash.display3D:Context3DRenderMode" ], - "offset": 129774, + "offset": 129816, "length": 257 }, { @@ -1869,7 +1869,7 @@ "defs": [ "flash.display3D:Context3DCompareMode" ], - "offset": 130031, + "offset": 130073, "length": 452 }, { @@ -1877,7 +1877,7 @@ "defs": [ "flash.display3D:Context3DStencilAction" ], - "offset": 130483, + "offset": 130525, "length": 499 }, { @@ -1885,7 +1885,7 @@ "defs": [ "flash.display3D:Context3DTextureFormat" ], - "offset": 130982, + "offset": 131024, "length": 315 }, { @@ -1893,7 +1893,7 @@ "defs": [ "flash.display3D:Context3DTriangleFace" ], - "offset": 131297, + "offset": 131339, "length": 323 }, { @@ -1901,7 +1901,7 @@ "defs": [ "flash.display3D:Context3DVertexBufferFormat" ], - "offset": 131620, + "offset": 131662, "length": 365 }, { @@ -1909,7 +1909,7 @@ "defs": [ "flash.display3D:IndexBuffer3D" ], - "offset": 131985, + "offset": 132027, "length": 364 }, { @@ -1917,7 +1917,7 @@ "defs": [ "flash.display3D:Program3D" ], - "offset": 132349, + "offset": 132391, "length": 275 }, { @@ -1925,7 +1925,7 @@ "defs": [ "flash.display3D:VertexBuffer3D" ], - "offset": 132624, + "offset": 132666, "length": 367 }, { @@ -1933,7 +1933,7 @@ "defs": [ "flash.display3D.textures:CubeTexture" ], - "offset": 132991, + "offset": 133033, "length": 501 }, { @@ -1941,7 +1941,7 @@ "defs": [ "flash.display3D.textures:Texture" ], - "offset": 133492, + "offset": 133534, "length": 487 }, { @@ -1949,7 +1949,7 @@ "defs": [ "flash.display3D.textures:TextureBase" ], - "offset": 133979, + "offset": 134021, "length": 292 }, { @@ -1957,7 +1957,7 @@ "defs": [ "flash.net:DynamicPropertyOutput" ], - "offset": 134271, + "offset": 134313, "length": 308 }, { @@ -1965,7 +1965,7 @@ "defs": [ "flash.net:FileFilter" ], - "offset": 134579, + "offset": 134621, "length": 318 }, { @@ -1973,7 +1973,7 @@ "defs": [ "flash.net:FileReference" ], - "offset": 134897, + "offset": 134939, "length": 666 }, { @@ -1981,7 +1981,7 @@ "defs": [ "flash.net:FileReferenceList" ], - "offset": 135563, + "offset": 135605, "length": 315 }, { @@ -1989,7 +1989,7 @@ "defs": [ "flash.net:GroupSpecifier" ], - "offset": 135878, + "offset": 135920, "length": 1492 }, { @@ -1997,7 +1997,7 @@ "defs": [ "flash.net:IDynamicPropertyOutput" ], - "offset": 137370, + "offset": 137412, "length": 197 }, { @@ -2005,7 +2005,7 @@ "defs": [ "flash.net:IDynamicPropertyWriter" ], - "offset": 137567, + "offset": 137609, "length": 225 }, { @@ -2013,7 +2013,7 @@ "defs": [ "flash.net:LocalConnection" ], - "offset": 137792, + "offset": 137834, "length": 495 }, { @@ -2021,7 +2021,7 @@ "defs": [ "flash.net:NetConnection" ], - "offset": 138287, + "offset": 138329, "length": 906 }, { @@ -2029,7 +2029,7 @@ "defs": [ "flash.net:NetGroup" ], - "offset": 139193, + "offset": 139235, "length": 1299 }, { @@ -2037,7 +2037,7 @@ "defs": [ "flash.net:NetGroupInfo" ], - "offset": 140492, + "offset": 140534, "length": 768 }, { @@ -2045,7 +2045,7 @@ "defs": [ "flash.net:NetGroupReceiveMode" ], - "offset": 141260, + "offset": 141302, "length": 245 }, { @@ -2053,7 +2053,7 @@ "defs": [ "flash.net:NetGroupReplicationStrategy" ], - "offset": 141505, + "offset": 141547, "length": 283 }, { @@ -2061,7 +2061,7 @@ "defs": [ "flash.net:NetGroupSendMode" ], - "offset": 141788, + "offset": 141830, "length": 273 }, { @@ -2069,7 +2069,7 @@ "defs": [ "flash.net:NetGroupSendResult" ], - "offset": 142061, + "offset": 142103, "length": 270 }, { @@ -2077,7 +2077,7 @@ "defs": [ "flash.net:NetMonitor" ], - "offset": 142331, + "offset": 142373, "length": 279 }, { @@ -2085,7 +2085,7 @@ "defs": [ "flash.net:NetStream" ], - "offset": 142610, + "offset": 142652, "length": 3025 }, { @@ -2093,7 +2093,7 @@ "defs": [ "flash.net:NetStreamAppendBytesAction" ], - "offset": 145635, + "offset": 145677, "length": 315 }, { @@ -2101,7 +2101,7 @@ "defs": [ "flash.net:NetStreamMulticastInfo" ], - "offset": 145950, + "offset": 145992, "length": 2712 }, { @@ -2109,7 +2109,7 @@ "defs": [ "flash.net:NetStreamInfo" ], - "offset": 148662, + "offset": 148704, "length": 1958 }, { @@ -2117,7 +2117,7 @@ "defs": [ "flash.net:NetStreamPlayOptions" ], - "offset": 150620, + "offset": 150662, "length": 355 }, { @@ -2125,7 +2125,7 @@ "defs": [ "flash.net:NetStreamPlayTransitions" ], - "offset": 150975, + "offset": 151017, "length": 406 }, { @@ -2133,7 +2133,7 @@ "defs": [ "flash.net:ObjectEncoding" ], - "offset": 151381, + "offset": 151423, "length": 345 }, { @@ -2141,7 +2141,7 @@ "defs": [ "flash.net:Responder" ], - "offset": 151726, + "offset": 151768, "length": 239 }, { @@ -2149,7 +2149,7 @@ "defs": [ "flash.net:SecureSocket" ], - "offset": 151965, + "offset": 152007, "length": 566 }, { @@ -2157,7 +2157,7 @@ "defs": [ "flash.net:SharedObject" ], - "offset": 152531, + "offset": 152573, "length": 1108 }, { @@ -2165,7 +2165,7 @@ "defs": [ "flash.net:SharedObjectFlushStatus" ], - "offset": 153639, + "offset": 153681, "length": 257 }, { @@ -2173,7 +2173,7 @@ "defs": [ "flash.net:URLLoader" ], - "offset": 153896, + "offset": 153938, "length": 435 }, { @@ -2181,7 +2181,7 @@ "defs": [ "flash.net:Socket" ], - "offset": 154331, + "offset": 154373, "length": 1282 }, { @@ -2189,7 +2189,7 @@ "defs": [ "flash.net:URLLoaderDataFormat" ], - "offset": 155613, + "offset": 155655, "length": 276 }, { @@ -2197,7 +2197,7 @@ "defs": [ "flash.net:URLRequest" ], - "offset": 155889, + "offset": 155931, "length": 379 }, { @@ -2205,7 +2205,7 @@ "defs": [ "flash.net:URLRequestHeader" ], - "offset": 156268, + "offset": 156310, "length": 223 }, { @@ -2213,7 +2213,7 @@ "defs": [ "flash.net:URLStream" ], - "offset": 156491, + "offset": 156533, "length": 908 }, { @@ -2221,7 +2221,7 @@ "defs": [ "flash.net:URLRequestMethod" ], - "offset": 157399, + "offset": 157441, "length": 304 }, { @@ -2229,7 +2229,7 @@ "defs": [ "flash.net:URLVariables" ], - "offset": 157703, + "offset": 157745, "length": 245 }, { @@ -2237,7 +2237,7 @@ "defs": [ "flash.net:XMLSocket" ], - "offset": 157948, + "offset": 157990, "length": 480 }, { @@ -2245,7 +2245,7 @@ "defs": [ "flash.text:AntiAliasType" ], - "offset": 158428, + "offset": 158470, "length": 239 }, { @@ -2253,7 +2253,7 @@ "defs": [ "flash.text:CSMSettings" ], - "offset": 158667, + "offset": 158709, "length": 248 }, { @@ -2261,7 +2261,7 @@ "defs": [ "flash.text:Font" ], - "offset": 158915, + "offset": 158957, "length": 361 }, { @@ -2269,7 +2269,7 @@ "defs": [ "flash.text:FontStyle" ], - "offset": 159276, + "offset": 159318, "length": 292 }, { @@ -2277,7 +2277,7 @@ "defs": [ "flash.text:FontType" ], - "offset": 159568, + "offset": 159610, "length": 269 }, { @@ -2285,7 +2285,7 @@ "defs": [ "flash.text:GridFitType" ], - "offset": 159837, + "offset": 159879, "length": 258 }, { @@ -2293,7 +2293,7 @@ "defs": [ "flash.text:StaticText" ], - "offset": 160095, + "offset": 160137, "length": 299 }, { @@ -2301,7 +2301,7 @@ "defs": [ "flash.text:StyleSheet" ], - "offset": 160394, + "offset": 160436, "length": 386 }, { @@ -2309,7 +2309,7 @@ "defs": [ "flash.text:TextColorType" ], - "offset": 160780, + "offset": 160822, "length": 241 }, { @@ -2317,7 +2317,7 @@ "defs": [ "flash.text:TextDisplayMode" ], - "offset": 161021, + "offset": 161063, "length": 258 }, { @@ -2325,7 +2325,7 @@ "defs": [ "flash.text:TextField" ], - "offset": 161279, + "offset": 161321, "length": 2296 }, { @@ -2333,7 +2333,7 @@ "defs": [ "flash.text:TextFieldAutoSize" ], - "offset": 163575, + "offset": 163617, "length": 291 }, { @@ -2341,7 +2341,7 @@ "defs": [ "flash.text:TextFieldType" ], - "offset": 163866, + "offset": 163908, "length": 235 }, { @@ -2349,7 +2349,7 @@ "defs": [ "flash.text:TextFormat" ], - "offset": 164101, + "offset": 164143, "length": 778 }, { @@ -2357,7 +2357,7 @@ "defs": [ "flash.text:TextFormatAlign" ], - "offset": 164879, + "offset": 164921, "length": 343 }, { @@ -2365,7 +2365,7 @@ "defs": [ "flash.text:TextFormatDisplay" ], - "offset": 165222, + "offset": 165264, "length": 241 }, { @@ -2373,7 +2373,7 @@ "defs": [ "flash.text:TextInteractionMode" ], - "offset": 165463, + "offset": 165505, "length": 253 }, { @@ -2381,7 +2381,7 @@ "defs": [ "flash.text:TextLineMetrics" ], - "offset": 165716, + "offset": 165758, "length": 300 }, { @@ -2389,7 +2389,7 @@ "defs": [ "flash.text:TextRenderer" ], - "offset": 166016, + "offset": 166058, "length": 373 }, { @@ -2397,7 +2397,7 @@ "defs": [ "flash.text:TextRun" ], - "offset": 166389, + "offset": 166431, "length": 294 }, { @@ -2405,7 +2405,7 @@ "defs": [ "flash.text:TextSnapshot" ], - "offset": 166683, + "offset": 166725, "length": 513 }, { @@ -2413,7 +2413,7 @@ "defs": [ "flash.text.engine:BreakOpportunity" ], - "offset": 167196, + "offset": 167238, "length": 293 }, { @@ -2421,7 +2421,7 @@ "defs": [ "flash.text.engine:CFFHinting" ], - "offset": 167489, + "offset": 167531, "length": 256 }, { @@ -2429,7 +2429,7 @@ "defs": [ "flash.text.engine:ContentElement" ], - "offset": 167745, + "offset": 167787, "length": 624 }, { @@ -2437,7 +2437,7 @@ "defs": [ "flash.text.engine:DigitCase" ], - "offset": 168369, + "offset": 168411, "length": 277 }, { @@ -2445,7 +2445,7 @@ "defs": [ "flash.text.engine:DigitWidth" ], - "offset": 168646, + "offset": 168688, "length": 288 }, { @@ -2453,7 +2453,7 @@ "defs": [ "flash.text.engine:EastAsianJustifier" ], - "offset": 168934, + "offset": 168976, "length": 495 }, { @@ -2461,7 +2461,7 @@ "defs": [ "flash.text.engine:ElementFormat" ], - "offset": 169429, + "offset": 169471, "length": 1204 }, { @@ -2469,7 +2469,7 @@ "defs": [ "flash.text.engine:FontDescription" ], - "offset": 170633, + "offset": 170675, "length": 672 }, { @@ -2477,7 +2477,7 @@ "defs": [ "flash.text.engine:FontLookup" ], - "offset": 171305, + "offset": 171347, "length": 254 }, { @@ -2485,7 +2485,7 @@ "defs": [ "flash.text.engine:FontMetrics" ], - "offset": 171559, + "offset": 171601, "length": 512 }, { @@ -2493,7 +2493,7 @@ "defs": [ "flash.text.engine:FontPosture" ], - "offset": 172071, + "offset": 172113, "length": 245 }, { @@ -2501,7 +2501,7 @@ "defs": [ "flash.text.engine:FontWeight" ], - "offset": 172316, + "offset": 172358, "length": 239 }, { @@ -2509,7 +2509,7 @@ "defs": [ "flash.text.engine:GraphicElement" ], - "offset": 172555, + "offset": 172597, "length": 497 }, { @@ -2517,7 +2517,7 @@ "defs": [ "flash.text.engine:GroupElement" ], - "offset": 173052, + "offset": 173094, "length": 714 }, { @@ -2525,7 +2525,7 @@ "defs": [ "flash.text.engine:JustificationStyle" ], - "offset": 173766, + "offset": 173808, "length": 356 }, { @@ -2533,7 +2533,7 @@ "defs": [ "flash.text.engine:Kerning" ], - "offset": 174122, + "offset": 174164, "length": 248 }, { @@ -2541,7 +2541,7 @@ "defs": [ "flash.text.engine:LigatureLevel" ], - "offset": 174370, + "offset": 174412, "length": 338 }, { @@ -2549,7 +2549,7 @@ "defs": [ "flash.text.engine:LineJustification" ], - "offset": 174708, + "offset": 174750, "length": 388 }, { @@ -2557,7 +2557,7 @@ "defs": [ "flash.text.engine:RenderingMode" ], - "offset": 175096, + "offset": 175138, "length": 243 }, { @@ -2565,7 +2565,7 @@ "defs": [ "flash.text.engine:SpaceJustifier" ], - "offset": 175339, + "offset": 175381, "length": 527 }, { @@ -2573,7 +2573,7 @@ "defs": [ "flash.text.engine:TabAlignment" ], - "offset": 175866, + "offset": 175908, "length": 299 }, { @@ -2581,7 +2581,7 @@ "defs": [ "flash.text.engine:TabStop" ], - "offset": 176165, + "offset": 176207, "length": 357 }, { @@ -2589,7 +2589,7 @@ "defs": [ "flash.text.engine:TextBaseline" ], - "offset": 176522, + "offset": 176564, "length": 483 }, { @@ -2597,7 +2597,7 @@ "defs": [ "flash.text.engine:TextBlock" ], - "offset": 177005, + "offset": 177047, "length": 2184 }, { @@ -2605,7 +2605,7 @@ "defs": [ "flash.text.engine:TextElement" ], - "offset": 179189, + "offset": 179231, "length": 383 }, { @@ -2613,7 +2613,7 @@ "defs": [ "flash.text.engine:TextJustifier" ], - "offset": 179572, + "offset": 179614, "length": 774 }, { @@ -2621,7 +2621,7 @@ "defs": [ "flash.text.engine:TextLine" ], - "offset": 180346, + "offset": 180388, "length": 2027 }, { @@ -2629,7 +2629,7 @@ "defs": [ "flash.text.engine:TextLineCreationResult" ], - "offset": 182373, + "offset": 182415, "length": 360 }, { @@ -2637,7 +2637,7 @@ "defs": [ "flash.text.engine:TextLineMirrorRegion" ], - "offset": 182733, + "offset": 182775, "length": 451 }, { @@ -2645,7 +2645,7 @@ "defs": [ "flash.text.engine:TextLineValidity" ], - "offset": 183184, + "offset": 183226, "length": 332 }, { @@ -2653,7 +2653,7 @@ "defs": [ "flash.text.engine:TextRotation" ], - "offset": 183516, + "offset": 183558, "length": 352 }, { @@ -2661,7 +2661,7 @@ "defs": [ "flash.text.engine:TypographicCase" ], - "offset": 183868, + "offset": 183910, "length": 436 }, { @@ -2669,7 +2669,7 @@ "defs": [ "flash.text.ime:CompositionAttributeRange" ], - "offset": 184304, + "offset": 184346, "length": 315 }, { @@ -2677,7 +2677,7 @@ "defs": [ "flash.text.ime:IIMEClient" ], - "offset": 184619, + "offset": 184661, "length": 525 }, { @@ -2688,7 +2688,7 @@ "flash.net:registerClassAlias", "flash.net:getClassByAlias" ], - "offset": 185144, + "offset": 185186, "length": 343 }, { @@ -2703,7 +2703,7 @@ "flash.utils:escapeMultiByte", "flash.utils:unescapeMultiByte" ], - "offset": 185487, + "offset": 185529, "length": 545 }, { @@ -2711,7 +2711,7 @@ "defs": [ "flash.utils:Endian" ], - "offset": 186032, + "offset": 186074, "length": 243 }, { @@ -2719,7 +2719,7 @@ "defs": [ "flash.utils:IExternalizable" ], - "offset": 186275, + "offset": 186317, "length": 223 }, { @@ -2727,7 +2727,7 @@ "defs": [ "flash.utils:Timer" ], - "offset": 186498, + "offset": 186540, "length": 400 }, { @@ -2739,7 +2739,7 @@ "flash.utils:clearInterval", "flash.utils:clearTimeout" ], - "offset": 186898, + "offset": 186940, "length": 995 } ] \ No newline at end of file diff --git a/browser/extensions/shumway/content/shumway.gfx.js b/browser/extensions/shumway/content/shumway.gfx.js index 663516569b36..36255cc25b71 100644 --- a/browser/extensions/shumway/content/shumway.gfx.js +++ b/browser/extensions/shumway/content/shumway.gfx.js @@ -15,2100 +15,2066 @@ limitations under the License. */ console.time("Load Shared Dependencies"); +var Shumway, Shumway$$inline_0 = Shumway || (Shumway = {}); +Shumway$$inline_0.version = "0.9.3775"; +Shumway$$inline_0.build = "a82ac47"; var jsGlobal = function() { return this || (0,eval)("this//# sourceURL=jsGlobal-getter"); }(), inBrowser = "undefined" !== typeof window && "document" in window && "plugins" in window.document, inFirefox = "undefined" !== typeof navigator && 0 <= navigator.userAgent.indexOf("Firefox"); -function dumpLine(g) { - "undefined" !== typeof dump && dump(g + "\n"); +function dumpLine(l) { } jsGlobal.performance || (jsGlobal.performance = {}); jsGlobal.performance.now || (jsGlobal.performance.now = "undefined" !== typeof dateNow ? dateNow : Date.now); -var START_TIME = performance.now(), Shumway; -(function(g) { - function m(a) { - return(a | 0) === a; +function lazyInitializer(l, r, g) { + Object.defineProperty(l, r, {get:function() { + var c = g(); + Object.defineProperty(l, r, {value:c, configurable:!0, enumerable:!0}); + return c; + }, configurable:!0, enumerable:!0}); +} +var START_TIME = performance.now(); +(function(l) { + function r(d) { + return(d | 0) === d; } - function e(a) { - return "object" === typeof a || "function" === typeof a; + function g(d) { + return "object" === typeof d || "function" === typeof d; } - function c(a) { - return String(Number(a)) === a; + function c(d) { + return String(Number(d)) === d; } - function w(a) { - var h = 0; - if ("number" === typeof a) { - return h = a | 0, a === h && 0 <= h ? !0 : a >>> 0 === a; + function t(d) { + var e = 0; + if ("number" === typeof d) { + return e = d | 0, d === e && 0 <= e ? !0 : d >>> 0 === d; } - if ("string" !== typeof a) { + if ("string" !== typeof d) { return!1; } - var f = a.length; - if (0 === f) { + var b = d.length; + if (0 === b) { return!1; } - if ("0" === a) { + if ("0" === d) { return!0; } - if (f > g.UINT32_CHAR_BUFFER_LENGTH) { + if (b > l.UINT32_CHAR_BUFFER_LENGTH) { return!1; } - var d = 0, h = a.charCodeAt(d++) - 48; - if (1 > h || 9 < h) { + var f = 0, e = d.charCodeAt(f++) - 48; + if (1 > e || 9 < e) { return!1; } - for (var q = 0, x = 0;d < f;) { - x = a.charCodeAt(d++) - 48; - if (0 > x || 9 < x) { + for (var q = 0, w = 0;f < b;) { + w = d.charCodeAt(f++) - 48; + if (0 > w || 9 < w) { return!1; } - q = h; - h = 10 * h + x; + q = e; + e = 10 * e + w; } - return q < g.UINT32_MAX_DIV_10 || q === g.UINT32_MAX_DIV_10 && x <= g.UINT32_MAX_MOD_10 ? !0 : !1; + return q < l.UINT32_MAX_DIV_10 || q === l.UINT32_MAX_DIV_10 && w <= l.UINT32_MAX_MOD_10 ? !0 : !1; } - (function(a) { - a[a._0 = 48] = "_0"; - a[a._1 = 49] = "_1"; - a[a._2 = 50] = "_2"; - a[a._3 = 51] = "_3"; - a[a._4 = 52] = "_4"; - a[a._5 = 53] = "_5"; - a[a._6 = 54] = "_6"; - a[a._7 = 55] = "_7"; - a[a._8 = 56] = "_8"; - a[a._9 = 57] = "_9"; - })(g.CharacterCodes || (g.CharacterCodes = {})); - g.UINT32_CHAR_BUFFER_LENGTH = 10; - g.UINT32_MAX = 4294967295; - g.UINT32_MAX_DIV_10 = 429496729; - g.UINT32_MAX_MOD_10 = 5; - g.isString = function(a) { - return "string" === typeof a; + (function(d) { + d[d._0 = 48] = "_0"; + d[d._1 = 49] = "_1"; + d[d._2 = 50] = "_2"; + d[d._3 = 51] = "_3"; + d[d._4 = 52] = "_4"; + d[d._5 = 53] = "_5"; + d[d._6 = 54] = "_6"; + d[d._7 = 55] = "_7"; + d[d._8 = 56] = "_8"; + d[d._9 = 57] = "_9"; + })(l.CharacterCodes || (l.CharacterCodes = {})); + l.UINT32_CHAR_BUFFER_LENGTH = 10; + l.UINT32_MAX = 4294967295; + l.UINT32_MAX_DIV_10 = 429496729; + l.UINT32_MAX_MOD_10 = 5; + l.isString = function(d) { + return "string" === typeof d; }; - g.isFunction = function(a) { - return "function" === typeof a; + l.isFunction = function(d) { + return "function" === typeof d; }; - g.isNumber = function(a) { - return "number" === typeof a; + l.isNumber = function(d) { + return "number" === typeof d; }; - g.isInteger = m; - g.isArray = function(a) { - return a instanceof Array; + l.isInteger = r; + l.isArray = function(d) { + return d instanceof Array; }; - g.isNumberOrString = function(a) { - return "number" === typeof a || "string" === typeof a; + l.isNumberOrString = function(d) { + return "number" === typeof d || "string" === typeof d; }; - g.isObject = e; - g.toNumber = function(a) { - return+a; + l.isObject = g; + l.toNumber = function(d) { + return+d; }; - g.isNumericString = c; - g.isNumeric = function(a) { - if ("number" === typeof a) { + l.isNumericString = c; + l.isNumeric = function(d) { + if ("number" === typeof d) { return!0; } - if ("string" === typeof a) { - var h = a.charCodeAt(0); - return 65 <= h && 90 >= h || 97 <= h && 122 >= h || 36 === h || 95 === h ? !1 : w(a) || c(a); + if ("string" === typeof d) { + var e = d.charCodeAt(0); + return 65 <= e && 90 >= e || 97 <= e && 122 >= e || 36 === e || 95 === e ? !1 : t(d) || c(d); } return!1; }; - g.isIndex = w; - g.isNullOrUndefined = function(a) { - return void 0 == a; + l.isIndex = t; + l.isNullOrUndefined = function(d) { + return void 0 == d; }; - var k; - (function(a) { - a.error = function(f) { - console.error(f); - throw Error(f); + var m; + (function(d) { + d.error = function(b) { + console.error(b); + throw Error(b); }; - a.assert = function(f, d) { - void 0 === d && (d = "assertion failed"); - "" === f && (f = !0); - if (!f) { + d.assert = function(b, f) { + void 0 === f && (f = "assertion failed"); + "" === b && (b = !0); + if (!b) { if ("undefined" !== typeof console && "assert" in console) { - throw console.assert(!1, d), Error(d); + throw console.assert(!1, f), Error(f); } - a.error(d.toString()); + d.error(f.toString()); } }; - a.assertUnreachable = function(f) { - throw Error("Reached unreachable location " + Error().stack.split("\n")[1] + f); + d.assertUnreachable = function(b) { + throw Error("Reached unreachable location " + Error().stack.split("\n")[1] + b); }; - a.assertNotImplemented = function(f, d) { - f || a.error("notImplemented: " + d); + d.assertNotImplemented = function(b, f) { + b || d.error("notImplemented: " + f); }; - a.warning = function(f, d, q) { - console.warn.apply(console, arguments); + d.warning = function(b, f, q) { }; - a.notUsed = function(f) { - a.assert(!1, "Not Used " + f); + d.notUsed = function(b) { }; - a.notImplemented = function(f) { - a.assert(!1, "Not Implemented " + f); + d.notImplemented = function(b) { }; - a.dummyConstructor = function(f) { - a.assert(!1, "Dummy Constructor: " + f); + d.dummyConstructor = function(b) { }; - a.abstractMethod = function(f) { - a.assert(!1, "Abstract Method " + f); + d.abstractMethod = function(b) { }; - var h = {}; - a.somewhatImplemented = function(f) { - h[f] || (h[f] = !0, a.warning("somewhatImplemented: " + f)); + var e = {}; + d.somewhatImplemented = function(b) { + e[b] || (e[b] = !0); }; - a.unexpected = function(f) { - a.assert(!1, "Unexpected: " + f); + d.unexpected = function(b) { + d.assert(!1, "Unexpected: " + b); }; - a.unexpectedCase = function(f) { - a.assert(!1, "Unexpected Case: " + f); + d.unexpectedCase = function(b) { + d.assert(!1, "Unexpected Case: " + b); }; - })(k = g.Debug || (g.Debug = {})); - g.getTicks = function() { + })(m = l.Debug || (l.Debug = {})); + l.getTicks = function() { return performance.now(); }; - var b; - (function(a) { - function h(d, f) { - for (var a = 0, h = d.length;a < h;a++) { - if (d[a] === f) { - return a; + (function(d) { + function e(f, q) { + for (var b = 0, e = f.length;b < e;b++) { + if (f[b] === q) { + return b; } } - d.push(f); - return d.length - 1; + f.push(q); + return f.length - 1; } - var f = g.Debug.assert; - a.popManyInto = function(d, a, h) { - f(d.length >= a); - for (var b = a - 1;0 <= b;b--) { - h[b] = d.pop(); + d.popManyInto = function(f, q, b) { + for (var e = q - 1;0 <= e;e--) { + b[e] = f.pop(); } - h.length = a; + b.length = q; }; - a.popMany = function(d, a) { - f(d.length >= a); - var h = d.length - a, b = d.slice(h, this.length); - d.length = h; - return b; + d.popMany = function(f, q) { + var b = f.length - q, e = f.slice(b, this.length); + f.length = b; + return e; }; - a.popManyIntoVoid = function(d, a) { - f(d.length >= a); - d.length -= a; + d.popManyIntoVoid = function(f, q) { + f.length -= q; }; - a.pushMany = function(d, f) { - for (var a = 0;a < f.length;a++) { - d.push(f[a]); + d.pushMany = function(f, q) { + for (var b = 0;b < q.length;b++) { + f.push(q[b]); } }; - a.top = function(d) { - return d.length && d[d.length - 1]; + d.top = function(f) { + return f.length && f[f.length - 1]; }; - a.last = function(d) { - return d.length && d[d.length - 1]; + d.last = function(f) { + return f.length && f[f.length - 1]; }; - a.peek = function(d) { - f(0 < d.length); - return d[d.length - 1]; + d.peek = function(f) { + return f[f.length - 1]; }; - a.indexOf = function(d, f) { - for (var a = 0, h = d.length;a < h;a++) { - if (d[a] === f) { - return a; + d.indexOf = function(f, q) { + for (var b = 0, e = f.length;b < e;b++) { + if (f[b] === q) { + return b; } } return-1; }; - a.equals = function(d, f) { - if (d.length !== f.length) { + d.equals = function(f, q) { + if (f.length !== q.length) { return!1; } - for (var a = 0;a < d.length;a++) { - if (d[a] !== f[a]) { + for (var b = 0;b < f.length;b++) { + if (f[b] !== q[b]) { return!1; } } return!0; }; - a.pushUnique = h; - a.unique = function(d) { - for (var f = [], a = 0;a < d.length;a++) { - h(f, d[a]); + d.pushUnique = e; + d.unique = function(f) { + for (var q = [], b = 0;b < f.length;b++) { + e(q, f[b]); + } + return q; + }; + d.copyFrom = function(f, b) { + f.length = 0; + d.pushMany(f, b); + }; + d.ensureTypedArrayCapacity = function(f, b) { + if (f.length < b) { + var w = f; + f = new f.constructor(l.IntegerUtilities.nearestPowerOfTwo(b)); + f.set(w, 0); } return f; }; - a.copyFrom = function(d, f) { - d.length = 0; - a.pushMany(d, f); - }; - a.ensureTypedArrayCapacity = function(d, f) { - if (d.length < f) { - var a = d; - d = new d.constructor(g.IntegerUtilities.nearestPowerOfTwo(f)); - d.set(a, 0); - } - return d; - }; - var d = function() { - function d(f) { + var b = function() { + function f(f) { void 0 === f && (f = 16); this._f32 = this._i32 = this._u16 = this._u8 = null; this._offset = 0; this.ensureCapacity(f); } - d.prototype.reset = function() { + f.prototype.reset = function() { this._offset = 0; }; - Object.defineProperty(d.prototype, "offset", {get:function() { + Object.defineProperty(f.prototype, "offset", {get:function() { return this._offset; }, enumerable:!0, configurable:!0}); - d.prototype.getIndex = function(d) { - f(1 === d || 2 === d || 4 === d || 8 === d || 16 === d); - d = this._offset / d; - f((d | 0) === d); - return d; + f.prototype.getIndex = function(f) { + return this._offset / f; }; - d.prototype.ensureAdditionalCapacity = function() { + f.prototype.ensureAdditionalCapacity = function() { this.ensureCapacity(this._offset + 68); }; - d.prototype.ensureCapacity = function(d) { + f.prototype.ensureCapacity = function(f) { if (!this._u8) { - this._u8 = new Uint8Array(d); + this._u8 = new Uint8Array(f); } else { - if (this._u8.length > d) { + if (this._u8.length > f) { return; } } - var f = 2 * this._u8.length; - f < d && (f = d); - d = new Uint8Array(f); - d.set(this._u8, 0); - this._u8 = d; - this._u16 = new Uint16Array(d.buffer); - this._i32 = new Int32Array(d.buffer); - this._f32 = new Float32Array(d.buffer); + var b = 2 * this._u8.length; + b < f && (b = f); + f = new Uint8Array(b); + f.set(this._u8, 0); + this._u8 = f; + this._u16 = new Uint16Array(f.buffer); + this._i32 = new Int32Array(f.buffer); + this._f32 = new Float32Array(f.buffer); }; - d.prototype.writeInt = function(d) { - f(0 === (this._offset & 3)); + f.prototype.writeInt = function(f) { this.ensureCapacity(this._offset + 4); - this.writeIntUnsafe(d); + this.writeIntUnsafe(f); }; - d.prototype.writeIntAt = function(d, q) { - f(0 <= q && q <= this._offset); - f(0 === (q & 3)); - this.ensureCapacity(q + 4); - this._i32[q >> 2] = d; + f.prototype.writeIntAt = function(f, b) { + this.ensureCapacity(b + 4); + this._i32[b >> 2] = f; }; - d.prototype.writeIntUnsafe = function(d) { - this._i32[this._offset >> 2] = d; + f.prototype.writeIntUnsafe = function(f) { + this._i32[this._offset >> 2] = f; this._offset += 4; }; - d.prototype.writeFloat = function(d) { - f(0 === (this._offset & 3)); + f.prototype.writeFloat = function(f) { this.ensureCapacity(this._offset + 4); - this.writeFloatUnsafe(d); + this.writeFloatUnsafe(f); }; - d.prototype.writeFloatUnsafe = function(d) { - this._f32[this._offset >> 2] = d; + f.prototype.writeFloatUnsafe = function(f) { + this._f32[this._offset >> 2] = f; this._offset += 4; }; - d.prototype.write4Floats = function(d, q, a, h) { - f(0 === (this._offset & 3)); + f.prototype.write4Floats = function(f, b, e, d) { this.ensureCapacity(this._offset + 16); - this.write4FloatsUnsafe(d, q, a, h); + this.write4FloatsUnsafe(f, b, e, d); }; - d.prototype.write4FloatsUnsafe = function(d, f, q, a) { - var h = this._offset >> 2; - this._f32[h + 0] = d; - this._f32[h + 1] = f; - this._f32[h + 2] = q; - this._f32[h + 3] = a; + f.prototype.write4FloatsUnsafe = function(f, b, e, d) { + var a = this._offset >> 2; + this._f32[a + 0] = f; + this._f32[a + 1] = b; + this._f32[a + 2] = e; + this._f32[a + 3] = d; this._offset += 16; }; - d.prototype.write6Floats = function(d, q, a, h, b, u) { - f(0 === (this._offset & 3)); + f.prototype.write6Floats = function(f, b, e, d, a, h) { this.ensureCapacity(this._offset + 24); - this.write6FloatsUnsafe(d, q, a, h, b, u); + this.write6FloatsUnsafe(f, b, e, d, a, h); }; - d.prototype.write6FloatsUnsafe = function(d, f, q, a, h, b) { - var u = this._offset >> 2; - this._f32[u + 0] = d; - this._f32[u + 1] = f; - this._f32[u + 2] = q; - this._f32[u + 3] = a; - this._f32[u + 4] = h; - this._f32[u + 5] = b; + f.prototype.write6FloatsUnsafe = function(f, b, e, d, a, h) { + var p = this._offset >> 2; + this._f32[p + 0] = f; + this._f32[p + 1] = b; + this._f32[p + 2] = e; + this._f32[p + 3] = d; + this._f32[p + 4] = a; + this._f32[p + 5] = h; this._offset += 24; }; - d.prototype.subF32View = function() { + f.prototype.subF32View = function() { return this._f32.subarray(0, this._offset >> 2); }; - d.prototype.subI32View = function() { + f.prototype.subI32View = function() { return this._i32.subarray(0, this._offset >> 2); }; - d.prototype.subU16View = function() { + f.prototype.subU16View = function() { return this._u16.subarray(0, this._offset >> 1); }; - d.prototype.subU8View = function() { + f.prototype.subU8View = function() { return this._u8.subarray(0, this._offset); }; - d.prototype.hashWords = function(d, f, q) { - f = this._i32; - for (var a = 0;a < q;a++) { - d = (31 * d | 0) + f[a] | 0; + f.prototype.hashWords = function(f, b, e) { + b = this._i32; + for (var d = 0;d < e;d++) { + f = (31 * f | 0) + b[d] | 0; } - return d; + return f; }; - d.prototype.reserve = function(d) { - d = d + 3 & -4; - this.ensureCapacity(this._offset + d); - this._offset += d; + f.prototype.reserve = function(f) { + f = f + 3 & -4; + this.ensureCapacity(this._offset + f); + this._offset += f; }; - return d; + return f; }(); - a.ArrayWriter = d; - })(b = g.ArrayUtilities || (g.ArrayUtilities = {})); + d.ArrayWriter = b; + })(l.ArrayUtilities || (l.ArrayUtilities = {})); var a = function() { - function a(h) { - this._u8 = new Uint8Array(h); - this._u16 = new Uint16Array(h); - this._i32 = new Int32Array(h); - this._f32 = new Float32Array(h); + function d(e) { + this._u8 = new Uint8Array(e); + this._u16 = new Uint16Array(e); + this._i32 = new Int32Array(e); + this._f32 = new Float32Array(e); this._offset = 0; } - Object.defineProperty(a.prototype, "offset", {get:function() { + Object.defineProperty(d.prototype, "offset", {get:function() { return this._offset; }, enumerable:!0, configurable:!0}); - a.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return this._offset === this._u8.length; }; - a.prototype.readInt = function() { - k.assert(0 === (this._offset & 3)); - k.assert(this._offset <= this._u8.length - 4); - var a = this._i32[this._offset >> 2]; + d.prototype.readInt = function() { + var e = this._i32[this._offset >> 2]; this._offset += 4; - return a; + return e; }; - a.prototype.readFloat = function() { - k.assert(0 === (this._offset & 3)); - k.assert(this._offset <= this._u8.length - 4); - var a = this._f32[this._offset >> 2]; + d.prototype.readFloat = function() { + var e = this._f32[this._offset >> 2]; this._offset += 4; - return a; + return e; }; - return a; + return d; }(); - g.ArrayReader = a; - (function(a) { - function h(d, f) { - return Object.prototype.hasOwnProperty.call(d, f); + l.ArrayReader = a; + (function(d) { + function e(f, b) { + return Object.prototype.hasOwnProperty.call(f, b); } - function f(d, f) { - for (var a in f) { - h(f, a) && (d[a] = f[a]); + function b(f, b) { + for (var w in b) { + e(b, w) && (f[w] = b[w]); } } - a.boxValue = function(d) { - return void 0 == d || e(d) ? d : Object(d); + d.boxValue = function(f) { + return void 0 == f || g(f) ? f : Object(f); }; - a.toKeyValueArray = function(d) { - var f = Object.prototype.hasOwnProperty, a = [], h; - for (h in d) { - f.call(d, h) && a.push([h, d[h]]); + d.toKeyValueArray = function(f) { + var b = Object.prototype.hasOwnProperty, e = [], d; + for (d in f) { + b.call(f, d) && e.push([d, f[d]]); } - return a; + return e; }; - a.isPrototypeWriteable = function(d) { - return Object.getOwnPropertyDescriptor(d, "prototype").writable; + d.isPrototypeWriteable = function(f) { + return Object.getOwnPropertyDescriptor(f, "prototype").writable; }; - a.hasOwnProperty = h; - a.propertyIsEnumerable = function(d, f) { - return Object.prototype.propertyIsEnumerable.call(d, f); + d.hasOwnProperty = e; + d.propertyIsEnumerable = function(f, b) { + return Object.prototype.propertyIsEnumerable.call(f, b); }; - a.getOwnPropertyDescriptor = function(d, f) { - return Object.getOwnPropertyDescriptor(d, f); + d.getOwnPropertyDescriptor = function(f, b) { + return Object.getOwnPropertyDescriptor(f, b); }; - a.hasOwnGetter = function(d, f) { - var a = Object.getOwnPropertyDescriptor(d, f); - return!(!a || !a.get); + d.hasOwnGetter = function(f, b) { + var e = Object.getOwnPropertyDescriptor(f, b); + return!(!e || !e.get); }; - a.getOwnGetter = function(d, f) { - var a = Object.getOwnPropertyDescriptor(d, f); - return a ? a.get : null; + d.getOwnGetter = function(f, b) { + var e = Object.getOwnPropertyDescriptor(f, b); + return e ? e.get : null; }; - a.hasOwnSetter = function(d, f) { - var a = Object.getOwnPropertyDescriptor(d, f); - return!(!a || !a.set); + d.hasOwnSetter = function(f, b) { + var e = Object.getOwnPropertyDescriptor(f, b); + return!(!e || !e.set); }; - a.createMap = function() { + d.createMap = function() { return Object.create(null); }; - a.createArrayMap = function() { + d.createArrayMap = function() { return[]; }; - a.defineReadOnlyProperty = function(d, f, a) { - Object.defineProperty(d, f, {value:a, writable:!1, configurable:!0, enumerable:!1}); + d.defineReadOnlyProperty = function(f, b, e) { + Object.defineProperty(f, b, {value:e, writable:!1, configurable:!0, enumerable:!1}); }; - a.getOwnPropertyDescriptors = function(d) { - for (var f = a.createMap(), h = Object.getOwnPropertyNames(d), s = 0;s < h.length;s++) { - f[h[s]] = Object.getOwnPropertyDescriptor(d, h[s]); + d.getOwnPropertyDescriptors = function(f) { + for (var b = d.createMap(), e = Object.getOwnPropertyNames(f), a = 0;a < e.length;a++) { + b[e[a]] = Object.getOwnPropertyDescriptor(f, e[a]); } - return f; + return b; }; - a.cloneObject = function(d) { - var q = Object.create(Object.getPrototypeOf(d)); - f(q, d); + d.cloneObject = function(f) { + var q = Object.create(Object.getPrototypeOf(f)); + b(q, f); return q; }; - a.copyProperties = function(d, f) { - for (var a in f) { - d[a] = f[a]; + d.copyProperties = function(f, b) { + for (var e in b) { + f[e] = b[e]; } }; - a.copyOwnProperties = f; - a.copyOwnPropertyDescriptors = function(d, f, a) { - void 0 === a && (a = !0); - for (var s in f) { - if (h(f, s)) { - var b = Object.getOwnPropertyDescriptor(f, s); - if (a || !h(d, s)) { - k.assert(b); + d.copyOwnProperties = b; + d.copyOwnPropertyDescriptors = function(f, b, w) { + void 0 === w && (w = !0); + for (var d in b) { + if (e(b, d)) { + var a = Object.getOwnPropertyDescriptor(b, d); + if (w || !e(f, d)) { try { - Object.defineProperty(d, s, b); - } catch (u) { + Object.defineProperty(f, d, a); + } catch (h) { } } } } }; - a.getLatestGetterOrSetterPropertyDescriptor = function(d, f) { - for (var a = {};d;) { - var h = Object.getOwnPropertyDescriptor(d, f); - h && (a.get = a.get || h.get, a.set = a.set || h.set); - if (a.get && a.set) { + d.getLatestGetterOrSetterPropertyDescriptor = function(f, b) { + for (var e = {};f;) { + var d = Object.getOwnPropertyDescriptor(f, b); + d && (e.get = e.get || d.get, e.set = e.set || d.set); + if (e.get && e.set) { break; } - d = Object.getPrototypeOf(d); + f = Object.getPrototypeOf(f); } - return a; + return e; }; - a.defineNonEnumerableGetterOrSetter = function(d, f, h, s) { - var b = a.getLatestGetterOrSetterPropertyDescriptor(d, f); - b.configurable = !0; - b.enumerable = !1; - s ? b.get = h : b.set = h; - Object.defineProperty(d, f, b); + d.defineNonEnumerableGetterOrSetter = function(f, b, e, a) { + var h = d.getLatestGetterOrSetterPropertyDescriptor(f, b); + h.configurable = !0; + h.enumerable = !1; + a ? h.get = e : h.set = e; + Object.defineProperty(f, b, h); }; - a.defineNonEnumerableGetter = function(d, f, a) { - Object.defineProperty(d, f, {get:a, configurable:!0, enumerable:!1}); + d.defineNonEnumerableGetter = function(f, b, e) { + Object.defineProperty(f, b, {get:e, configurable:!0, enumerable:!1}); }; - a.defineNonEnumerableSetter = function(d, f, a) { - Object.defineProperty(d, f, {set:a, configurable:!0, enumerable:!1}); + d.defineNonEnumerableSetter = function(f, b, e) { + Object.defineProperty(f, b, {set:e, configurable:!0, enumerable:!1}); }; - a.defineNonEnumerableProperty = function(d, f, a) { - Object.defineProperty(d, f, {value:a, writable:!0, configurable:!0, enumerable:!1}); + d.defineNonEnumerableProperty = function(f, b, e) { + Object.defineProperty(f, b, {value:e, writable:!0, configurable:!0, enumerable:!1}); }; - a.defineNonEnumerableForwardingProperty = function(d, f, a) { - Object.defineProperty(d, f, {get:n.makeForwardingGetter(a), set:n.makeForwardingSetter(a), writable:!0, configurable:!0, enumerable:!1}); + d.defineNonEnumerableForwardingProperty = function(f, b, e) { + Object.defineProperty(f, b, {get:h.makeForwardingGetter(e), set:h.makeForwardingSetter(e), writable:!0, configurable:!0, enumerable:!1}); }; - a.defineNewNonEnumerableProperty = function(d, f, h) { - k.assert(!Object.prototype.hasOwnProperty.call(d, f), "Property: " + f + " already exits."); - a.defineNonEnumerableProperty(d, f, h); + d.defineNewNonEnumerableProperty = function(b, q, e) { + d.defineNonEnumerableProperty(b, q, e); }; - a.createPublicAliases = function(d, f) { - for (var a = {value:null, writable:!0, configurable:!0, enumerable:!1}, h = 0;h < f.length;h++) { - var b = f[h]; - a.value = d[b]; - Object.defineProperty(d, "$Bg" + b, a); + d.createPublicAliases = function(b, q) { + for (var e = {value:null, writable:!0, configurable:!0, enumerable:!1}, d = 0;d < q.length;d++) { + var a = q[d]; + e.value = b[a]; + Object.defineProperty(b, "$Bg" + a, e); } }; - })(g.ObjectUtilities || (g.ObjectUtilities = {})); - var n; - (function(a) { - a.makeForwardingGetter = function(a) { - return new Function('return this["' + a + '"]//# sourceURL=fwd-get-' + a + ".as"); + })(l.ObjectUtilities || (l.ObjectUtilities = {})); + var h; + (function(d) { + d.makeForwardingGetter = function(e) { + return new Function('return this["' + e + '"]//# sourceURL=fwd-get-' + e + ".as"); }; - a.makeForwardingSetter = function(a) { - return new Function("value", 'this["' + a + '"] = value;//# sourceURL=fwd-set-' + a + ".as"); + d.makeForwardingSetter = function(e) { + return new Function("value", 'this["' + e + '"] = value;//# sourceURL=fwd-set-' + e + ".as"); }; - a.bindSafely = function(a, f) { - function d() { - return a.apply(f, arguments); + d.bindSafely = function(e, b) { + function f() { + return e.apply(b, arguments); } - k.assert(!a.boundTo); - k.assert(f); - d.boundTo = f; - return d; + f.boundTo = b; + return f; }; - })(n = g.FunctionUtilities || (g.FunctionUtilities = {})); - (function(a) { - function h(d) { - return "string" === typeof d ? '"' + d + '"' : "number" === typeof d || "boolean" === typeof d ? String(d) : d instanceof Array ? "[] " + d.length : typeof d; + })(h = l.FunctionUtilities || (l.FunctionUtilities = {})); + (function(d) { + function e(b) { + return "string" === typeof b ? '"' + b + '"' : "number" === typeof b || "boolean" === typeof b ? String(b) : b instanceof Array ? "[] " + b.length : typeof b; } - var f = g.Debug.assert; - a.repeatString = function(d, f) { - for (var q = "", a = 0;a < f;a++) { - q += d; + d.repeatString = function(b, f) { + for (var q = "", e = 0;e < f;e++) { + q += b; } return q; }; - a.memorySizeToString = function(d) { - d |= 0; - return 1024 > d ? d + " B" : 1048576 > d ? (d / 1024).toFixed(2) + "KB" : (d / 1048576).toFixed(2) + "MB"; + d.memorySizeToString = function(b) { + b |= 0; + return 1024 > b ? b + " B" : 1048576 > b ? (b / 1024).toFixed(2) + "KB" : (b / 1048576).toFixed(2) + "MB"; }; - a.toSafeString = h; - a.toSafeArrayString = function(d) { - for (var f = [], q = 0;q < d.length;q++) { - f.push(h(d[q])); + d.toSafeString = e; + d.toSafeArrayString = function(b) { + for (var f = [], q = 0;q < b.length;q++) { + f.push(e(b[q])); } return f.join(", "); }; - a.utf8decode = function(d) { - for (var f = new Uint8Array(4 * d.length), q = 0, a = 0, h = d.length;a < h;a++) { - var x = d.charCodeAt(a); - if (127 >= x) { - f[q++] = x; + d.utf8decode = function(b) { + for (var f = new Uint8Array(4 * b.length), q = 0, e = 0, w = b.length;e < w;e++) { + var d = b.charCodeAt(e); + if (127 >= d) { + f[q++] = d; } else { - if (55296 <= x && 56319 >= x) { - var b = d.charCodeAt(a + 1); - 56320 <= b && 57343 >= b && (x = ((x & 1023) << 10) + (b & 1023) + 65536, ++a); + if (55296 <= d && 56319 >= d) { + var a = b.charCodeAt(e + 1); + 56320 <= a && 57343 >= a && (d = ((d & 1023) << 10) + (a & 1023) + 65536, ++e); } - 0 !== (x & 4292870144) ? (f[q++] = 248 | x >>> 24 & 3, f[q++] = 128 | x >>> 18 & 63, f[q++] = 128 | x >>> 12 & 63, f[q++] = 128 | x >>> 6 & 63) : 0 !== (x & 4294901760) ? (f[q++] = 240 | x >>> 18 & 7, f[q++] = 128 | x >>> 12 & 63, f[q++] = 128 | x >>> 6 & 63) : 0 !== (x & 4294965248) ? (f[q++] = 224 | x >>> 12 & 15, f[q++] = 128 | x >>> 6 & 63) : f[q++] = 192 | x >>> 6 & 31; - f[q++] = 128 | x & 63; + 0 !== (d & 4292870144) ? (f[q++] = 248 | d >>> 24 & 3, f[q++] = 128 | d >>> 18 & 63, f[q++] = 128 | d >>> 12 & 63, f[q++] = 128 | d >>> 6 & 63) : 0 !== (d & 4294901760) ? (f[q++] = 240 | d >>> 18 & 7, f[q++] = 128 | d >>> 12 & 63, f[q++] = 128 | d >>> 6 & 63) : 0 !== (d & 4294965248) ? (f[q++] = 224 | d >>> 12 & 15, f[q++] = 128 | d >>> 6 & 63) : f[q++] = 192 | d >>> 6 & 31; + f[q++] = 128 | d & 63; } } return f.subarray(0, q); }; - a.utf8encode = function(d) { - for (var f = 0, q = "";f < d.length;) { - var a = d[f++] & 255; - if (127 >= a) { - q += String.fromCharCode(a); + d.utf8encode = function(b) { + for (var f = 0, q = "";f < b.length;) { + var e = b[f++] & 255; + if (127 >= e) { + q += String.fromCharCode(e); } else { - var h = 192, x = 5; + var d = 192, w = 5; do { - if ((a & (h >> 1 | 128)) === h) { + if ((e & (d >> 1 | 128)) === d) { break; } - h = h >> 1 | 128; - --x; - } while (0 <= x); - if (0 >= x) { - q += String.fromCharCode(a); + d = d >> 1 | 128; + --w; + } while (0 <= w); + if (0 >= w) { + q += String.fromCharCode(e); } else { - for (var a = a & (1 << x) - 1, h = !1, b = 5;b >= x;--b) { - var s = d[f++]; - if (128 != (s & 192)) { - h = !0; + for (var e = e & (1 << w) - 1, d = !1, a = 5;a >= w;--a) { + var h = b[f++]; + if (128 != (h & 192)) { + d = !0; break; } - a = a << 6 | s & 63; + e = e << 6 | h & 63; } - if (h) { - for (x = f - (7 - b);x < f;++x) { - q += String.fromCharCode(d[x] & 255); + if (d) { + for (w = f - (7 - a);w < f;++w) { + q += String.fromCharCode(b[w] & 255); } } else { - q = 65536 <= a ? q + String.fromCharCode(a - 65536 >> 10 & 1023 | 55296, a & 1023 | 56320) : q + String.fromCharCode(a); + q = 65536 <= e ? q + String.fromCharCode(e - 65536 >> 10 & 1023 | 55296, e & 1023 | 56320) : q + String.fromCharCode(e); } } } } return q; }; - a.base64ArrayBuffer = function(d) { + d.base64ArrayBuffer = function(b) { var f = ""; - d = new Uint8Array(d); - for (var q = d.byteLength, a = q % 3, q = q - a, h, x, b, s, u = 0;u < q;u += 3) { - s = d[u] << 16 | d[u + 1] << 8 | d[u + 2], h = (s & 16515072) >> 18, x = (s & 258048) >> 12, b = (s & 4032) >> 6, s &= 63, f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[x] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[b] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[s]; + b = new Uint8Array(b); + for (var q = b.byteLength, e = q % 3, q = q - e, d, w, a, h, G = 0;G < q;G += 3) { + h = b[G] << 16 | b[G + 1] << 8 | b[G + 2], d = (h & 16515072) >> 18, w = (h & 258048) >> 12, a = (h & 4032) >> 6, h &= 63, f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[w] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h]; } - 1 == a ? (s = d[q], f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(s & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(s & 3) << 4] + "==") : 2 == a && (s = d[q] << 8 | d[q + 1], f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(s & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(s & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(s & 15) << + 1 == e ? (h = b[q], f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 3) << 4] + "==") : 2 == e && (h = b[q] << 8 | b[q + 1], f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 15) << 2] + "="); return f; }; - a.escapeString = function(d) { - void 0 !== d && (d = d.replace(/[^\w$]/gi, "$"), /^\d/.test(d) && (d = "$" + d)); - return d; + d.escapeString = function(b) { + void 0 !== b && (b = b.replace(/[^\w$]/gi, "$"), /^\d/.test(b) && (b = "$" + b)); + return b; }; - a.fromCharCodeArray = function(d) { - for (var f = "", q = 0;q < d.length;q += 16384) { - var a = Math.min(d.length - q, 16384), f = f + String.fromCharCode.apply(null, d.subarray(q, q + a)) + d.fromCharCodeArray = function(b) { + for (var f = "", q = 0;q < b.length;q += 16384) { + var e = Math.min(b.length - q, 16384), f = f + String.fromCharCode.apply(null, b.subarray(q, q + e)) } return f; }; - a.variableLengthEncodeInt32 = function(d) { - var q = 32 - Math.clz32(d); - f(32 >= q, q); - for (var h = Math.ceil(q / 6), x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[h], b = h - 1;0 <= b;b--) { - x += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[d >> 6 * b & 63]; + d.variableLengthEncodeInt32 = function(b) { + for (var f = 32 - Math.clz32(b), q = Math.ceil(f / 6), f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[q], q = q - 1;0 <= q;q--) { + f += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b >> 6 * q & 63]; } - f(a.variableLengthDecodeInt32(x) === d, d + " : " + x + " - " + h + " bits: " + q); - return x; + return f; }; - a.toEncoding = function(d) { - return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[d]; + d.toEncoding = function(b) { + return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b]; }; - a.fromEncoding = function(d) { - d = d.charCodeAt(0); - if (65 <= d && 90 >= d) { - return d - 65; + d.fromEncoding = function(b) { + b = b.charCodeAt(0); + if (65 <= b && 90 >= b) { + return b - 65; } - if (97 <= d && 122 >= d) { - return d - 71; + if (97 <= b && 122 >= b) { + return b - 71; } - if (48 <= d && 57 >= d) { - return d + 4; + if (48 <= b && 57 >= b) { + return b + 4; } - if (36 === d) { + if (36 === b) { return 62; } - if (95 === d) { + if (95 === b) { return 63; } - f(!1, "Invalid Encoding"); }; - a.variableLengthDecodeInt32 = function(d) { - for (var f = a.fromEncoding(d[0]), q = 0, h = 0;h < f;h++) { - var x = 6 * (f - h - 1), q = q | a.fromEncoding(d[1 + h]) << x + d.variableLengthDecodeInt32 = function(b) { + for (var f = d.fromEncoding(b[0]), q = 0, e = 0;e < f;e++) { + var w = 6 * (f - e - 1), q = q | d.fromEncoding(b[1 + e]) << w } return q; }; - a.trimMiddle = function(d, f) { - if (d.length <= f) { - return d; + d.trimMiddle = function(b, f) { + if (b.length <= f) { + return b; } - var q = f >> 1, a = f - q - 1; - return d.substr(0, q) + "\u2026" + d.substr(d.length - a, a); + var q = f >> 1, e = f - q - 1; + return b.substr(0, q) + "\u2026" + b.substr(b.length - e, e); }; - a.multiple = function(d, f) { - for (var q = "", a = 0;a < f;a++) { - q += d; + d.multiple = function(b, f) { + for (var q = "", e = 0;e < f;e++) { + q += b; } return q; }; - a.indexOfAny = function(d, f, q) { - for (var a = d.length, h = 0;h < f.length;h++) { - var x = d.indexOf(f[h], q); - 0 <= x && (a = Math.min(a, x)); + d.indexOfAny = function(b, f, q) { + for (var e = b.length, d = 0;d < f.length;d++) { + var w = b.indexOf(f[d], q); + 0 <= w && (e = Math.min(e, w)); } - return a === d.length ? -1 : a; + return e === b.length ? -1 : e; }; - var d = Array(3), q = Array(4), x = Array(5), b = Array(6), n = Array(7), p = Array(8), r = Array(9); - a.concat3 = function(f, q, a) { - d[0] = f; - d[1] = q; - d[2] = a; - return d.join(""); - }; - a.concat4 = function(d, f, a, h) { - q[0] = d; - q[1] = f; - q[2] = a; - q[3] = h; - return q.join(""); - }; - a.concat5 = function(d, f, q, a, h) { - x[0] = d; - x[1] = f; - x[2] = q; - x[3] = a; - x[4] = h; - return x.join(""); - }; - a.concat6 = function(d, f, q, a, h, x) { - b[0] = d; - b[1] = f; - b[2] = q; - b[3] = a; - b[4] = h; - b[5] = x; + var b = Array(3), f = Array(4), q = Array(5), w = Array(6), a = Array(7), h = Array(8), p = Array(9); + d.concat3 = function(f, q, e) { + b[0] = f; + b[1] = q; + b[2] = e; return b.join(""); }; - a.concat7 = function(d, f, q, a, h, x, b) { - n[0] = d; - n[1] = f; - n[2] = q; - n[3] = a; - n[4] = h; - n[5] = x; - n[6] = b; - return n.join(""); + d.concat4 = function(b, q, e, d) { + f[0] = b; + f[1] = q; + f[2] = e; + f[3] = d; + return f.join(""); }; - a.concat8 = function(d, f, q, a, h, x, b, s) { - p[0] = d; + d.concat5 = function(b, f, e, d, w) { + q[0] = b; + q[1] = f; + q[2] = e; + q[3] = d; + q[4] = w; + return q.join(""); + }; + d.concat6 = function(b, f, q, e, d, a) { + w[0] = b; + w[1] = f; + w[2] = q; + w[3] = e; + w[4] = d; + w[5] = a; + return w.join(""); + }; + d.concat7 = function(b, f, q, e, d, w, h) { + a[0] = b; + a[1] = f; + a[2] = q; + a[3] = e; + a[4] = d; + a[5] = w; + a[6] = h; + return a.join(""); + }; + d.concat8 = function(b, f, q, e, d, w, a, G) { + h[0] = b; + h[1] = f; + h[2] = q; + h[3] = e; + h[4] = d; + h[5] = w; + h[6] = a; + h[7] = G; + return h.join(""); + }; + d.concat9 = function(b, f, q, e, d, w, a, h, G) { + p[0] = b; p[1] = f; p[2] = q; - p[3] = a; - p[4] = h; - p[5] = x; - p[6] = b; - p[7] = s; + p[3] = e; + p[4] = d; + p[5] = w; + p[6] = a; + p[7] = h; + p[8] = G; return p.join(""); }; - a.concat9 = function(d, f, q, a, h, x, b, s, u) { - r[0] = d; - r[1] = f; - r[2] = q; - r[3] = a; - r[4] = h; - r[5] = x; - r[6] = b; - r[7] = s; - r[8] = u; - return r.join(""); - }; - })(g.StringUtilities || (g.StringUtilities = {})); - (function(a) { - var h = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), f = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, + })(l.StringUtilities || (l.StringUtilities = {})); + (function(d) { + var e = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), b = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551]); - a.hashBytesTo32BitsMD5 = function(d, q, a) { - var b = 1732584193, u = -271733879, n = -1732584194, p = 271733878, r = a + 72 & -64, c = new Uint8Array(r), k; - for (k = 0;k < a;++k) { - c[k] = d[q++]; + d.hashBytesTo32BitsMD5 = function(f, q, d) { + var a = 1732584193, h = -271733879, p = -1732584194, c = 271733878, k = d + 72 & -64, m = new Uint8Array(k), n; + for (n = 0;n < d;++n) { + m[n] = f[q++]; } - c[k++] = 128; - for (d = r - 8;k < d;) { - c[k++] = 0; + m[n++] = 128; + for (f = k - 8;n < f;) { + m[n++] = 0; } - c[k++] = a << 3 & 255; - c[k++] = a >> 5 & 255; - c[k++] = a >> 13 & 255; - c[k++] = a >> 21 & 255; - c[k++] = a >>> 29 & 255; - c[k++] = 0; - c[k++] = 0; - c[k++] = 0; - d = new Int32Array(16); - for (k = 0;k < r;) { - for (a = 0;16 > a;++a, k += 4) { - d[a] = c[k] | c[k + 1] << 8 | c[k + 2] << 16 | c[k + 3] << 24; + m[n++] = d << 3 & 255; + m[n++] = d >> 5 & 255; + m[n++] = d >> 13 & 255; + m[n++] = d >> 21 & 255; + m[n++] = d >>> 29 & 255; + m[n++] = 0; + m[n++] = 0; + m[n++] = 0; + f = new Int32Array(16); + for (n = 0;n < k;) { + for (d = 0;16 > d;++d, n += 4) { + f[d] = m[n] | m[n + 1] << 8 | m[n + 2] << 16 | m[n + 3] << 24; } - var y = b; - q = u; - var l = n, t = p, v, e; - for (a = 0;64 > a;++a) { - 16 > a ? (v = q & l | ~q & t, e = a) : 32 > a ? (v = t & q | ~t & l, e = 5 * a + 1 & 15) : 48 > a ? (v = q ^ l ^ t, e = 3 * a + 5 & 15) : (v = l ^ (q | ~t), e = 7 * a & 15); - var g = t, y = y + v + f[a] + d[e] | 0; - v = h[a]; - t = l; - l = q; - q = q + (y << v | y >>> 32 - v) | 0; - y = g; + var u = a; + q = h; + var s = p, g = c, v, l; + for (d = 0;64 > d;++d) { + 16 > d ? (v = q & s | ~q & g, l = d) : 32 > d ? (v = g & q | ~g & s, l = 5 * d + 1 & 15) : 48 > d ? (v = q ^ s ^ g, l = 3 * d + 5 & 15) : (v = s ^ (q | ~g), l = 7 * d & 15); + var r = g, u = u + v + b[d] + f[l] | 0; + v = e[d]; + g = s; + s = q; + q = q + (u << v | u >>> 32 - v) | 0; + u = r; } - b = b + y | 0; - u = u + q | 0; - n = n + l | 0; - p = p + t | 0; + a = a + u | 0; + h = h + q | 0; + p = p + s | 0; + c = c + g | 0; } - return b; + return a; }; - a.hashBytesTo32BitsAdler = function(d, f, a) { - var h = 1, b = 0; - for (a = f + a;f < a;++f) { - h = (h + (d[f] & 255)) % 65521, b = (b + h) % 65521; + d.hashBytesTo32BitsAdler = function(b, q, e) { + var d = 1, a = 0; + for (e = q + e;q < e;++q) { + d = (d + (b[q] & 255)) % 65521, a = (a + d) % 65521; } - return b << 16 | h; + return a << 16 | d; }; - })(g.HashUtilities || (g.HashUtilities = {})); + })(l.HashUtilities || (l.HashUtilities = {})); var p = function() { - function a() { + function d() { } - a.seed = function(h) { - a._state[0] = h; - a._state[1] = h; + d.seed = function(e) { + d._state[0] = e; + d._state[1] = e; }; - a.next = function() { - var a = this._state, f = Math.imul(18273, a[0] & 65535) + (a[0] >>> 16) | 0; - a[0] = f; - var d = Math.imul(36969, a[1] & 65535) + (a[1] >>> 16) | 0; - a[1] = d; - a = (f << 16) + (d & 65535) | 0; - return 2.3283064365386963E-10 * (0 > a ? a + 4294967296 : a); + d.next = function() { + var e = this._state, b = Math.imul(18273, e[0] & 65535) + (e[0] >>> 16) | 0; + e[0] = b; + var f = Math.imul(36969, e[1] & 65535) + (e[1] >>> 16) | 0; + e[1] = f; + e = (b << 16) + (f & 65535) | 0; + return 2.3283064365386963E-10 * (0 > e ? e + 4294967296 : e); }; - a._state = new Uint32Array([57005, 48879]); - return a; + d._state = new Uint32Array([57005, 48879]); + return d; }(); - g.Random = p; + l.Random = p; Math.random = function() { return p.next(); }; (function() { - function a() { - this.id = "$weakmap" + h++; + function d() { + this.id = "$weakmap" + e++; } if ("function" !== typeof jsGlobal.WeakMap) { - var h = 0; - a.prototype = {has:function(f) { - return f.hasOwnProperty(this.id); - }, get:function(f, d) { - return f.hasOwnProperty(this.id) ? f[this.id] : d; - }, set:function(f, d) { - Object.defineProperty(f, this.id, {value:d, enumerable:!1, configurable:!0}); + var e = 0; + d.prototype = {has:function(b) { + return b.hasOwnProperty(this.id); + }, get:function(b, f) { + return b.hasOwnProperty(this.id) ? b[this.id] : f; + }, set:function(b, f) { + Object.defineProperty(b, this.id, {value:f, enumerable:!1, configurable:!0}); }}; - jsGlobal.WeakMap = a; + jsGlobal.WeakMap = d; } })(); a = function() { - function a() { + function d() { "undefined" !== typeof netscape && netscape.security.PrivilegeManager ? this._map = new WeakMap : this._list = []; } - a.prototype.clear = function() { + d.prototype.clear = function() { this._map ? this._map.clear() : this._list.length = 0; }; - a.prototype.push = function(a) { - this._map ? (k.assert(!this._map.has(a)), this._map.set(a, null)) : (k.assert(-1 === this._list.indexOf(a)), this._list.push(a)); + d.prototype.push = function(e) { + this._map ? this._map.set(e, null) : this._list.push(e); }; - a.prototype.remove = function(a) { - this._map ? (k.assert(this._map.has(a)), this._map.delete(a)) : (k.assert(-1 < this._list.indexOf(a)), this._list[this._list.indexOf(a)] = null, k.assert(-1 === this._list.indexOf(a))); + d.prototype.remove = function(e) { + this._map ? this._map.delete(e) : this._list[this._list.indexOf(e)] = null; }; - a.prototype.forEach = function(a) { + d.prototype.forEach = function(e) { if (this._map) { - "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(d) { - 0 !== d._referenceCount && a(d); + "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(b) { + 0 !== b._referenceCount && e(b); }); } else { - for (var f = this._list, d = 0, q = 0;q < f.length;q++) { - var x = f[q]; - x && (0 === x._referenceCount ? (f[q] = null, d++) : a(x)); + for (var b = this._list, f = 0, q = 0;q < b.length;q++) { + var d = b[q]; + d && (0 === d._referenceCount ? (b[q] = null, f++) : e(d)); } - if (16 < d && d > f.length >> 2) { - d = []; - for (q = 0;q < f.length;q++) { - (x = f[q]) && 0 < x._referenceCount && d.push(x); + if (16 < f && f > b.length >> 2) { + f = []; + for (q = 0;q < b.length;q++) { + (d = b[q]) && 0 < d._referenceCount && f.push(d); } - this._list = d; + this._list = f; } } }; - Object.defineProperty(a.prototype, "length", {get:function() { + Object.defineProperty(d.prototype, "length", {get:function() { return this._map ? -1 : this._list.length; }, enumerable:!0, configurable:!0}); - return a; + return d; }(); - g.WeakList = a; - var y; - (function(a) { - a.pow2 = function(a) { - return a === (a | 0) ? 0 > a ? 1 / (1 << -a) : 1 << a : Math.pow(2, a); + l.WeakList = a; + var k; + (function(d) { + d.pow2 = function(e) { + return e === (e | 0) ? 0 > e ? 1 / (1 << -e) : 1 << e : Math.pow(2, e); }; - a.clamp = function(a, f, d) { - return Math.max(f, Math.min(d, a)); + d.clamp = function(e, b, f) { + return Math.max(b, Math.min(f, e)); }; - a.roundHalfEven = function(a) { - if (.5 === Math.abs(a % 1)) { - var f = Math.floor(a); - return 0 === f % 2 ? f : Math.ceil(a); + d.roundHalfEven = function(e) { + if (.5 === Math.abs(e % 1)) { + var b = Math.floor(e); + return 0 === b % 2 ? b : Math.ceil(e); } - return Math.round(a); + return Math.round(e); }; - a.epsilonEquals = function(a, f) { - return 1E-7 > Math.abs(a - f); + d.epsilonEquals = function(e, b) { + return 1E-7 > Math.abs(e - b); }; - })(y = g.NumberUtilities || (g.NumberUtilities = {})); - (function(a) { - a[a.MaxU16 = 65535] = "MaxU16"; - a[a.MaxI16 = 32767] = "MaxI16"; - a[a.MinI16 = -32768] = "MinI16"; - })(g.Numbers || (g.Numbers = {})); - var v; - (function(a) { - function h(d) { - return 256 * d << 16 >> 16; + })(k = l.NumberUtilities || (l.NumberUtilities = {})); + (function(d) { + d[d.MaxU16 = 65535] = "MaxU16"; + d[d.MaxI16 = 32767] = "MaxI16"; + d[d.MinI16 = -32768] = "MinI16"; + })(l.Numbers || (l.Numbers = {})); + var u; + (function(d) { + function e(b) { + return 256 * b << 16 >> 16; } - var f = new ArrayBuffer(8); - a.i8 = new Int8Array(f); - a.u8 = new Uint8Array(f); - a.i32 = new Int32Array(f); - a.f32 = new Float32Array(f); - a.f64 = new Float64Array(f); - a.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; - a.floatToInt32 = function(d) { - a.f32[0] = d; - return a.i32[0]; + var b = new ArrayBuffer(8); + d.i8 = new Int8Array(b); + d.u8 = new Uint8Array(b); + d.i32 = new Int32Array(b); + d.f32 = new Float32Array(b); + d.f64 = new Float64Array(b); + d.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; + d.floatToInt32 = function(b) { + d.f32[0] = b; + return d.i32[0]; }; - a.int32ToFloat = function(d) { - a.i32[0] = d; - return a.f32[0]; + d.int32ToFloat = function(b) { + d.i32[0] = b; + return d.f32[0]; }; - a.swap16 = function(d) { - return(d & 255) << 8 | d >> 8 & 255; + d.swap16 = function(b) { + return(b & 255) << 8 | b >> 8 & 255; }; - a.swap32 = function(d) { - return(d & 255) << 24 | (d & 65280) << 8 | d >> 8 & 65280 | d >> 24 & 255; + d.swap32 = function(b) { + return(b & 255) << 24 | (b & 65280) << 8 | b >> 8 & 65280 | b >> 24 & 255; }; - a.toS8U8 = h; - a.fromS8U8 = function(d) { - return d / 256; + d.toS8U8 = e; + d.fromS8U8 = function(b) { + return b / 256; }; - a.clampS8U8 = function(d) { - return h(d) / 256; + d.clampS8U8 = function(b) { + return e(b) / 256; }; - a.toS16 = function(d) { - return d << 16 >> 16; + d.toS16 = function(b) { + return b << 16 >> 16; }; - a.bitCount = function(d) { - d -= d >> 1 & 1431655765; - d = (d & 858993459) + (d >> 2 & 858993459); - return 16843009 * (d + (d >> 4) & 252645135) >> 24; + d.bitCount = function(b) { + b -= b >> 1 & 1431655765; + b = (b & 858993459) + (b >> 2 & 858993459); + return 16843009 * (b + (b >> 4) & 252645135) >> 24; }; - a.ones = function(d) { - d -= d >> 1 & 1431655765; - d = (d & 858993459) + (d >> 2 & 858993459); - return 16843009 * (d + (d >> 4) & 252645135) >> 24; + d.ones = function(b) { + b -= b >> 1 & 1431655765; + b = (b & 858993459) + (b >> 2 & 858993459); + return 16843009 * (b + (b >> 4) & 252645135) >> 24; }; - a.trailingZeros = function(d) { - return a.ones((d & -d) - 1); + d.trailingZeros = function(b) { + return d.ones((b & -b) - 1); }; - a.getFlags = function(d, f) { - var a = ""; - for (d = 0;d < f.length;d++) { - d & 1 << d && (a += f[d] + " "); + d.getFlags = function(b, q) { + var e = ""; + for (b = 0;b < q.length;b++) { + b & 1 << b && (e += q[b] + " "); } - return 0 === a.length ? "" : a.trim(); + return 0 === e.length ? "" : e.trim(); }; - a.isPowerOfTwo = function(d) { - return d && 0 === (d & d - 1); + d.isPowerOfTwo = function(b) { + return b && 0 === (b & b - 1); }; - a.roundToMultipleOfFour = function(d) { - return d + 3 & -4; + d.roundToMultipleOfFour = function(b) { + return b + 3 & -4; }; - a.nearestPowerOfTwo = function(d) { - d--; - d |= d >> 1; - d |= d >> 2; - d |= d >> 4; - d |= d >> 8; - d |= d >> 16; - d++; - return d; + d.nearestPowerOfTwo = function(b) { + b--; + b |= b >> 1; + b |= b >> 2; + b |= b >> 4; + b |= b >> 8; + b |= b >> 16; + b++; + return b; }; - a.roundToMultipleOfPowerOfTwo = function(d, f) { - var a = (1 << f) - 1; - return d + a & ~a; + d.roundToMultipleOfPowerOfTwo = function(b, q) { + var e = (1 << q) - 1; + return b + e & ~e; }; - Math.imul || (Math.imul = function(d, f) { - var a = d & 65535, h = f & 65535; - return a * h + ((d >>> 16 & 65535) * h + a * (f >>> 16 & 65535) << 16 >>> 0) | 0; + Math.imul || (Math.imul = function(b, q) { + var e = b & 65535, d = q & 65535; + return e * d + ((b >>> 16 & 65535) * d + e * (q >>> 16 & 65535) << 16 >>> 0) | 0; }); - Math.clz32 || (Math.clz32 = function(d) { - d |= d >> 1; - d |= d >> 2; - d |= d >> 4; - d |= d >> 8; - return 32 - a.ones(d | d >> 16); + Math.clz32 || (Math.clz32 = function(b) { + b |= b >> 1; + b |= b >> 2; + b |= b >> 4; + b |= b >> 8; + return 32 - d.ones(b | b >> 16); }); - })(v = g.IntegerUtilities || (g.IntegerUtilities = {})); - (function(a) { - function h(f, d, a, h, b, u) { - return(a - f) * (u - d) - (h - d) * (b - f); + })(u = l.IntegerUtilities || (l.IntegerUtilities = {})); + (function(d) { + function e(b, f, q, e, d, a) { + return(q - b) * (a - f) - (e - f) * (d - b); } - a.pointInPolygon = function(f, d, a) { - for (var h = 0, b = a.length - 2, u = 0;u < b;u += 2) { - var n = a[u + 0], p = a[u + 1], r = a[u + 2], c = a[u + 3]; - (p <= d && c > d || p > d && c <= d) && f < n + (d - p) / (c - p) * (r - n) && h++; + d.pointInPolygon = function(b, f, q) { + for (var e = 0, d = q.length - 2, a = 0;a < d;a += 2) { + var h = q[a + 0], p = q[a + 1], c = q[a + 2], k = q[a + 3]; + (p <= f && k > f || p > f && k <= f) && b < h + (f - p) / (k - p) * (c - h) && e++; } - return 1 === (h & 1); + return 1 === (e & 1); }; - a.signedArea = h; - a.counterClockwise = function(f, d, a, b, s, u) { - return 0 < h(f, d, a, b, s, u); + d.signedArea = e; + d.counterClockwise = function(b, f, q, d, a, h) { + return 0 < e(b, f, q, d, a, h); }; - a.clockwise = function(f, d, a, b, s, u) { - return 0 > h(f, d, a, b, s, u); + d.clockwise = function(b, f, q, d, a, h) { + return 0 > e(b, f, q, d, a, h); }; - a.pointInPolygonInt32 = function(f, d, a) { + d.pointInPolygonInt32 = function(b, f, q) { + b |= 0; f |= 0; - d |= 0; - for (var h = 0, b = a.length - 2, u = 0;u < b;u += 2) { - var n = a[u + 0], p = a[u + 1], r = a[u + 2], c = a[u + 3]; - (p <= d && c > d || p > d && c <= d) && f < n + (d - p) / (c - p) * (r - n) && h++; + for (var e = 0, d = q.length - 2, a = 0;a < d;a += 2) { + var h = q[a + 0], p = q[a + 1], c = q[a + 2], k = q[a + 3]; + (p <= f && k > f || p > f && k <= f) && b < h + (f - p) / (k - p) * (c - h) && e++; } - return 1 === (h & 1); + return 1 === (e & 1); }; - })(g.GeometricUtilities || (g.GeometricUtilities = {})); - (function(a) { - a[a.Error = 1] = "Error"; - a[a.Warn = 2] = "Warn"; - a[a.Debug = 4] = "Debug"; - a[a.Log = 8] = "Log"; - a[a.Info = 16] = "Info"; - a[a.All = 31] = "All"; - })(g.LogLevel || (g.LogLevel = {})); + })(l.GeometricUtilities || (l.GeometricUtilities = {})); + (function(d) { + d[d.Error = 1] = "Error"; + d[d.Warn = 2] = "Warn"; + d[d.Debug = 4] = "Debug"; + d[d.Log = 8] = "Log"; + d[d.Info = 16] = "Info"; + d[d.All = 31] = "All"; + })(l.LogLevel || (l.LogLevel = {})); a = function() { - function a(h, f) { - void 0 === h && (h = !1); + function d(e, b) { + void 0 === e && (e = !1); this._tab = " "; this._padding = ""; - this._suppressOutput = h; - this._out = f || a._consoleOut; - this._outNoNewline = f || a._consoleOutNoNewline; + this._suppressOutput = e; + this._out = b || d._consoleOut; + this._outNoNewline = b || d._consoleOutNoNewline; } - a.prototype.write = function(a, f) { - void 0 === a && (a = ""); - void 0 === f && (f = !1); - this._suppressOutput || this._outNoNewline((f ? this._padding : "") + a); + d.prototype.write = function(e, b) { + void 0 === e && (e = ""); + void 0 === b && (b = !1); + this._suppressOutput || this._outNoNewline((b ? this._padding : "") + e); }; - a.prototype.writeLn = function(a) { - void 0 === a && (a = ""); - this._suppressOutput || this._out(this._padding + a); + d.prototype.writeLn = function(e) { + void 0 === e && (e = ""); + this._suppressOutput || this._out(this._padding + e); }; - a.prototype.writeObject = function(a, f) { - void 0 === a && (a = ""); - this._suppressOutput || this._out(this._padding + a, f); + d.prototype.writeObject = function(e, b) { + void 0 === e && (e = ""); + this._suppressOutput || this._out(this._padding + e, b); }; - a.prototype.writeTimeLn = function(a) { - void 0 === a && (a = ""); - this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + a); + d.prototype.writeTimeLn = function(e) { + void 0 === e && (e = ""); + this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + e); }; - a.prototype.writeComment = function(a) { - a = a.split("\n"); - if (1 === a.length) { - this.writeLn("// " + a[0]); + d.prototype.writeComment = function(e) { + e = e.split("\n"); + if (1 === e.length) { + this.writeLn("// " + e[0]); } else { this.writeLn("/**"); - for (var f = 0;f < a.length;f++) { - this.writeLn(" * " + a[f]); + for (var b = 0;b < e.length;b++) { + this.writeLn(" * " + e[b]); } this.writeLn(" */"); } }; - a.prototype.writeLns = function(a) { - a = a.split("\n"); - for (var f = 0;f < a.length;f++) { - this.writeLn(a[f]); + d.prototype.writeLns = function(e) { + e = e.split("\n"); + for (var b = 0;b < e.length;b++) { + this.writeLn(e[b]); } }; - a.prototype.errorLn = function(h) { - a.logLevel & 1 && this.boldRedLn(h); + d.prototype.errorLn = function(e) { + d.logLevel & 1 && this.boldRedLn(e); }; - a.prototype.warnLn = function(h) { - a.logLevel & 2 && this.yellowLn(h); + d.prototype.warnLn = function(e) { + d.logLevel & 2 && this.yellowLn(e); }; - a.prototype.debugLn = function(h) { - a.logLevel & 4 && this.purpleLn(h); + d.prototype.debugLn = function(e) { + d.logLevel & 4 && this.purpleLn(e); }; - a.prototype.logLn = function(h) { - a.logLevel & 8 && this.writeLn(h); + d.prototype.logLn = function(e) { + d.logLevel & 8 && this.writeLn(e); }; - a.prototype.infoLn = function(h) { - a.logLevel & 16 && this.writeLn(h); + d.prototype.infoLn = function(e) { + d.logLevel & 16 && this.writeLn(e); }; - a.prototype.yellowLn = function(h) { - this.colorLn(a.YELLOW, h); + d.prototype.yellowLn = function(e) { + this.colorLn(d.YELLOW, e); }; - a.prototype.greenLn = function(h) { - this.colorLn(a.GREEN, h); + d.prototype.greenLn = function(e) { + this.colorLn(d.GREEN, e); }; - a.prototype.boldRedLn = function(h) { - this.colorLn(a.BOLD_RED, h); + d.prototype.boldRedLn = function(e) { + this.colorLn(d.BOLD_RED, e); }; - a.prototype.redLn = function(h) { - this.colorLn(a.RED, h); + d.prototype.redLn = function(e) { + this.colorLn(d.RED, e); }; - a.prototype.purpleLn = function(h) { - this.colorLn(a.PURPLE, h); + d.prototype.purpleLn = function(e) { + this.colorLn(d.PURPLE, e); }; - a.prototype.colorLn = function(h, f) { - this._suppressOutput || (inBrowser ? this._out(this._padding + f) : this._out(this._padding + h + f + a.ENDC)); + d.prototype.colorLn = function(e, b) { + this._suppressOutput || (inBrowser ? this._out(this._padding + b) : this._out(this._padding + e + b + d.ENDC)); }; - a.prototype.redLns = function(h) { - this.colorLns(a.RED, h); + d.prototype.redLns = function(e) { + this.colorLns(d.RED, e); }; - a.prototype.colorLns = function(a, f) { - for (var d = f.split("\n"), q = 0;q < d.length;q++) { - this.colorLn(a, d[q]); + d.prototype.colorLns = function(e, b) { + for (var f = b.split("\n"), q = 0;q < f.length;q++) { + this.colorLn(e, f[q]); } }; - a.prototype.enter = function(a) { - this._suppressOutput || this._out(this._padding + a); + d.prototype.enter = function(e) { + this._suppressOutput || this._out(this._padding + e); this.indent(); }; - a.prototype.leaveAndEnter = function(a) { - this.leave(a); + d.prototype.leaveAndEnter = function(e) { + this.leave(e); this.indent(); }; - a.prototype.leave = function(a) { + d.prototype.leave = function(e) { this.outdent(); - !this._suppressOutput && a && this._out(this._padding + a); + !this._suppressOutput && e && this._out(this._padding + e); }; - a.prototype.indent = function() { + d.prototype.indent = function() { this._padding += this._tab; }; - a.prototype.outdent = function() { + d.prototype.outdent = function() { 0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length)); }; - a.prototype.writeArray = function(a, f, d) { + d.prototype.writeArray = function(e, b, f) { + void 0 === b && (b = !1); void 0 === f && (f = !1); - void 0 === d && (d = !1); - f = f || !1; - for (var q = 0, b = a.length;q < b;q++) { - var s = ""; - f && (s = null === a[q] ? "null" : void 0 === a[q] ? "undefined" : a[q].constructor.name, s += " "); - var n = d ? "" : ("" + q).padRight(" ", 4); - this.writeLn(n + s + a[q]); + b = b || !1; + for (var q = 0, d = e.length;q < d;q++) { + var a = ""; + b && (a = null === e[q] ? "null" : void 0 === e[q] ? "undefined" : e[q].constructor.name, a += " "); + var h = f ? "" : ("" + q).padRight(" ", 4); + this.writeLn(h + a + e[q]); } }; - a.PURPLE = "\u001b[94m"; - a.YELLOW = "\u001b[93m"; - a.GREEN = "\u001b[92m"; - a.RED = "\u001b[91m"; - a.BOLD_RED = "\u001b[1;91m"; - a.ENDC = "\u001b[0m"; - a.logLevel = 31; - a._consoleOut = console.info.bind(console); - a._consoleOutNoNewline = console.info.bind(console); - return a; + d.PURPLE = "\u001b[94m"; + d.YELLOW = "\u001b[93m"; + d.GREEN = "\u001b[92m"; + d.RED = "\u001b[91m"; + d.BOLD_RED = "\u001b[1;91m"; + d.ENDC = "\u001b[0m"; + d.logLevel = 31; + d._consoleOut = console.info.bind(console); + d._consoleOutNoNewline = console.info.bind(console); + return d; }(); - g.IndentingWriter = a; - var l = function() { - return function(a, h) { - this.value = a; - this.next = h; + l.IndentingWriter = a; + var n = function() { + return function(d, e) { + this.value = d; + this.next = e; }; }(), a = function() { - function a(h) { - k.assert(h); - this._compare = h; + function d(e) { + this._compare = e; this._head = null; this._length = 0; } - a.prototype.push = function(a) { - k.assert(void 0 !== a); + d.prototype.push = function(e) { this._length++; if (this._head) { - var f = this._head, d = null; - a = new l(a, null); - for (var q = this._compare;f;) { - if (0 < q(f.value, a.value)) { - d ? (a.next = f, d.next = a) : (a.next = this._head, this._head = a); + var b = this._head, f = null; + e = new n(e, null); + for (var q = this._compare;b;) { + if (0 < q(b.value, e.value)) { + f ? (e.next = b, f.next = e) : (e.next = this._head, this._head = e); return; } - d = f; - f = f.next; + f = b; + b = b.next; } - d.next = a; + f.next = e; } else { - this._head = new l(a, null); + this._head = new n(e, null); } }; - a.prototype.forEach = function(h) { - for (var f = this._head, d = null;f;) { - var q = h(f.value); - if (q === a.RETURN) { + d.prototype.forEach = function(e) { + for (var b = this._head, f = null;b;) { + var q = e(b.value); + if (q === d.RETURN) { break; } else { - q === a.DELETE ? f = d ? d.next = f.next : this._head = this._head.next : (d = f, f = f.next); + q === d.DELETE ? b = f ? f.next = b.next : this._head = this._head.next : (f = b, b = b.next); } } }; - a.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return!this._head; }; - a.prototype.pop = function() { + d.prototype.pop = function() { if (this._head) { this._length--; - var a = this._head; + var e = this._head; this._head = this._head.next; - return a.value; + return e.value; } }; - a.prototype.contains = function(a) { - for (var f = this._head;f;) { - if (f.value === a) { + d.prototype.contains = function(e) { + for (var b = this._head;b;) { + if (b.value === e) { return!0; } - f = f.next; + b = b.next; } return!1; }; - a.prototype.toString = function() { - for (var a = "[", f = this._head;f;) { - a += f.value.toString(), (f = f.next) && (a += ","); + d.prototype.toString = function() { + for (var e = "[", b = this._head;b;) { + e += b.value.toString(), (b = b.next) && (e += ","); } - return a + "]"; + return e + "]"; }; - a.RETURN = 1; - a.DELETE = 2; - return a; + d.RETURN = 1; + d.DELETE = 2; + return d; }(); - g.SortedList = a; + l.SortedList = a; a = function() { - function a(h, f) { - void 0 === f && (f = 12); + function d(e, b) { + void 0 === b && (b = 12); this.start = this.index = 0; - this._size = 1 << f; + this._size = 1 << b; this._mask = this._size - 1; - this.array = new h(this._size); + this.array = new e(this._size); } - a.prototype.get = function(a) { - return this.array[a]; + d.prototype.get = function(e) { + return this.array[e]; }; - a.prototype.forEachInReverse = function(a) { + d.prototype.forEachInReverse = function(e) { if (!this.isEmpty()) { - for (var f = 0 === this.index ? this._size - 1 : this.index - 1, d = this.start - 1 & this._mask;f !== d && !a(this.array[f], f);) { - f = 0 === f ? this._size - 1 : f - 1; + for (var b = 0 === this.index ? this._size - 1 : this.index - 1, f = this.start - 1 & this._mask;b !== f && !e(this.array[b], b);) { + b = 0 === b ? this._size - 1 : b - 1; } } }; - a.prototype.write = function(a) { - this.array[this.index] = a; + d.prototype.write = function(e) { + this.array[this.index] = e; this.index = this.index + 1 & this._mask; this.index === this.start && (this.start = this.start + 1 & this._mask); }; - a.prototype.isFull = function() { + d.prototype.isFull = function() { return(this.index + 1 & this._mask) === this.start; }; - a.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return this.index === this.start; }; - a.prototype.reset = function() { + d.prototype.reset = function() { this.start = this.index = 0; }; - return a; + return d; }(); - g.CircularBuffer = a; - (function(a) { - function h(d) { - return d + (a.BITS_PER_WORD - 1) >> a.ADDRESS_BITS_PER_WORD << a.ADDRESS_BITS_PER_WORD; + l.CircularBuffer = a; + (function(d) { + function e(b) { + return b + (d.BITS_PER_WORD - 1) >> d.ADDRESS_BITS_PER_WORD << d.ADDRESS_BITS_PER_WORD; } - function f(d, a) { - d = d || "1"; - a = a || "0"; - for (var f = "", q = 0;q < length;q++) { - f += this.get(q) ? d : a; + function b(b, f) { + b = b || "1"; + f = f || "0"; + for (var q = "", e = 0;e < length;e++) { + q += this.get(e) ? b : f; } - return f; + return q; } - function d(d) { - for (var a = [], f = 0;f < length;f++) { - this.get(f) && a.push(d ? d[f] : f); + function f(b) { + for (var f = [], q = 0;q < length;q++) { + this.get(q) && f.push(b ? b[q] : q); } - return a.join(", "); + return f.join(", "); } - var q = g.Debug.assert; - a.ADDRESS_BITS_PER_WORD = 5; - a.BITS_PER_WORD = 1 << a.ADDRESS_BITS_PER_WORD; - a.BIT_INDEX_MASK = a.BITS_PER_WORD - 1; - var b = function() { - function d(f) { - this.size = h(f); + d.ADDRESS_BITS_PER_WORD = 5; + d.BITS_PER_WORD = 1 << d.ADDRESS_BITS_PER_WORD; + d.BIT_INDEX_MASK = d.BITS_PER_WORD - 1; + var q = function() { + function b(f) { + this.size = e(f); this.dirty = this.count = 0; this.length = f; - this.bits = new Uint32Array(this.size >> a.ADDRESS_BITS_PER_WORD); + this.bits = new Uint32Array(this.size >> d.ADDRESS_BITS_PER_WORD); } - d.prototype.recount = function() { + b.prototype.recount = function() { if (this.dirty) { - for (var d = this.bits, a = 0, f = 0, q = d.length;f < q;f++) { - var h = d[f], h = h - (h >> 1 & 1431655765), h = (h & 858993459) + (h >> 2 & 858993459), a = a + (16843009 * (h + (h >> 4) & 252645135) >> 24) + for (var b = this.bits, f = 0, q = 0, e = b.length;q < e;q++) { + var d = b[q], d = d - (d >> 1 & 1431655765), d = (d & 858993459) + (d >> 2 & 858993459), f = f + (16843009 * (d + (d >> 4) & 252645135) >> 24) } - this.count = a; + this.count = f; this.dirty = 0; } }; - d.prototype.set = function(d) { - var f = d >> a.ADDRESS_BITS_PER_WORD, q = this.bits[f]; - d = q | 1 << (d & a.BIT_INDEX_MASK); - this.bits[f] = d; - this.dirty |= q ^ d; + b.prototype.set = function(b) { + var f = b >> d.ADDRESS_BITS_PER_WORD, q = this.bits[f]; + b = q | 1 << (b & d.BIT_INDEX_MASK); + this.bits[f] = b; + this.dirty |= q ^ b; }; - d.prototype.setAll = function() { - for (var d = this.bits, a = 0, f = d.length;a < f;a++) { - d[a] = 4294967295; + b.prototype.setAll = function() { + for (var b = this.bits, f = 0, q = b.length;f < q;f++) { + b[f] = 4294967295; } this.count = this.size; this.dirty = 0; }; - d.prototype.assign = function(d) { - this.count = d.count; - this.dirty = d.dirty; - this.size = d.size; - for (var a = 0, f = this.bits.length;a < f;a++) { - this.bits[a] = d.bits[a]; + b.prototype.assign = function(b) { + this.count = b.count; + this.dirty = b.dirty; + this.size = b.size; + for (var f = 0, q = this.bits.length;f < q;f++) { + this.bits[f] = b.bits[f]; } }; - d.prototype.clear = function(d) { - var f = d >> a.ADDRESS_BITS_PER_WORD, q = this.bits[f]; - d = q & ~(1 << (d & a.BIT_INDEX_MASK)); - this.bits[f] = d; - this.dirty |= q ^ d; + b.prototype.clear = function(b) { + var f = b >> d.ADDRESS_BITS_PER_WORD, q = this.bits[f]; + b = q & ~(1 << (b & d.BIT_INDEX_MASK)); + this.bits[f] = b; + this.dirty |= q ^ b; }; - d.prototype.get = function(d) { - return 0 !== (this.bits[d >> a.ADDRESS_BITS_PER_WORD] & 1 << (d & a.BIT_INDEX_MASK)); + b.prototype.get = function(b) { + return 0 !== (this.bits[b >> d.ADDRESS_BITS_PER_WORD] & 1 << (b & d.BIT_INDEX_MASK)); }; - d.prototype.clearAll = function() { - for (var d = this.bits, a = 0, f = d.length;a < f;a++) { - d[a] = 0; + b.prototype.clearAll = function() { + for (var b = this.bits, f = 0, q = b.length;f < q;f++) { + b[f] = 0; } this.dirty = this.count = 0; }; - d.prototype._union = function(d) { - var a = this.dirty, f = this.bits; - d = d.bits; - for (var q = 0, h = f.length;q < h;q++) { - var b = f[q], x = b | d[q]; - f[q] = x; - a |= b ^ x; + b.prototype._union = function(b) { + var f = this.dirty, q = this.bits; + b = b.bits; + for (var e = 0, d = q.length;e < d;e++) { + var a = q[e], w = a | b[e]; + q[e] = w; + f |= a ^ w; } - this.dirty = a; + this.dirty = f; }; - d.prototype.intersect = function(d) { - var a = this.dirty, f = this.bits; - d = d.bits; - for (var q = 0, h = f.length;q < h;q++) { - var b = f[q], x = b & d[q]; - f[q] = x; - a |= b ^ x; + b.prototype.intersect = function(b) { + var f = this.dirty, q = this.bits; + b = b.bits; + for (var e = 0, d = q.length;e < d;e++) { + var a = q[e], w = a & b[e]; + q[e] = w; + f |= a ^ w; } - this.dirty = a; + this.dirty = f; }; - d.prototype.subtract = function(d) { - var a = this.dirty, f = this.bits; - d = d.bits; - for (var q = 0, h = f.length;q < h;q++) { - var b = f[q], x = b & ~d[q]; - f[q] = x; - a |= b ^ x; + b.prototype.subtract = function(b) { + var f = this.dirty, q = this.bits; + b = b.bits; + for (var e = 0, d = q.length;e < d;e++) { + var a = q[e], w = a & ~b[e]; + q[e] = w; + f |= a ^ w; } - this.dirty = a; + this.dirty = f; }; - d.prototype.negate = function() { - for (var d = this.dirty, a = this.bits, f = 0, q = a.length;f < q;f++) { - var h = a[f], b = ~h; - a[f] = b; - d |= h ^ b; + b.prototype.negate = function() { + for (var b = this.dirty, f = this.bits, q = 0, e = f.length;q < e;q++) { + var d = f[q], a = ~d; + f[q] = a; + b |= d ^ a; } - this.dirty = d; + this.dirty = b; }; - d.prototype.forEach = function(d) { - q(d); - for (var f = this.bits, h = 0, b = f.length;h < b;h++) { - var x = f[h]; - if (x) { - for (var s = 0;s < a.BITS_PER_WORD;s++) { - x & 1 << s && d(h * a.BITS_PER_WORD + s); + b.prototype.forEach = function(b) { + for (var f = this.bits, q = 0, e = f.length;q < e;q++) { + var a = f[q]; + if (a) { + for (var w = 0;w < d.BITS_PER_WORD;w++) { + a & 1 << w && b(q * d.BITS_PER_WORD + w); } } } }; - d.prototype.toArray = function() { - for (var d = [], f = this.bits, q = 0, h = f.length;q < h;q++) { - var b = f[q]; - if (b) { - for (var x = 0;x < a.BITS_PER_WORD;x++) { - b & 1 << x && d.push(q * a.BITS_PER_WORD + x); + b.prototype.toArray = function() { + for (var b = [], f = this.bits, q = 0, e = f.length;q < e;q++) { + var a = f[q]; + if (a) { + for (var w = 0;w < d.BITS_PER_WORD;w++) { + a & 1 << w && b.push(q * d.BITS_PER_WORD + w); } } } - return d; + return b; }; - d.prototype.equals = function(d) { - if (this.size !== d.size) { + b.prototype.equals = function(b) { + if (this.size !== b.size) { return!1; } - var a = this.bits; - d = d.bits; - for (var f = 0, q = a.length;f < q;f++) { - if (a[f] !== d[f]) { + var f = this.bits; + b = b.bits; + for (var q = 0, e = f.length;q < e;q++) { + if (f[q] !== b[q]) { return!1; } } return!0; }; - d.prototype.contains = function(d) { - if (this.size !== d.size) { + b.prototype.contains = function(b) { + if (this.size !== b.size) { return!1; } - var a = this.bits; - d = d.bits; - for (var f = 0, q = a.length;f < q;f++) { - if ((a[f] | d[f]) !== a[f]) { + var f = this.bits; + b = b.bits; + for (var q = 0, e = f.length;q < e;q++) { + if ((f[q] | b[q]) !== f[q]) { return!1; } } return!0; }; - d.prototype.isEmpty = function() { + b.prototype.isEmpty = function() { this.recount(); return 0 === this.count; }; - d.prototype.clone = function() { - var a = new d(this.length); - a._union(this); - return a; + b.prototype.clone = function() { + var f = new b(this.length); + f._union(this); + return f; }; - return d; + return b; }(); - a.Uint32ArrayBitSet = b; - var s = function() { - function d(a) { + d.Uint32ArrayBitSet = q; + var a = function() { + function b(f) { this.dirty = this.count = 0; - this.size = h(a); + this.size = e(f); this.bits = 0; this.singleWord = !0; - this.length = a; + this.length = f; } - d.prototype.recount = function() { + b.prototype.recount = function() { if (this.dirty) { - var d = this.bits, d = d - (d >> 1 & 1431655765), d = (d & 858993459) + (d >> 2 & 858993459); - this.count = 0 + (16843009 * (d + (d >> 4) & 252645135) >> 24); + var b = this.bits, b = b - (b >> 1 & 1431655765), b = (b & 858993459) + (b >> 2 & 858993459); + this.count = 0 + (16843009 * (b + (b >> 4) & 252645135) >> 24); this.dirty = 0; } }; - d.prototype.set = function(d) { + b.prototype.set = function(b) { var f = this.bits; - this.bits = d = f | 1 << (d & a.BIT_INDEX_MASK); - this.dirty |= f ^ d; + this.bits = b = f | 1 << (b & d.BIT_INDEX_MASK); + this.dirty |= f ^ b; }; - d.prototype.setAll = function() { + b.prototype.setAll = function() { this.bits = 4294967295; this.count = this.size; this.dirty = 0; }; - d.prototype.assign = function(d) { - this.count = d.count; - this.dirty = d.dirty; - this.size = d.size; - this.bits = d.bits; + b.prototype.assign = function(b) { + this.count = b.count; + this.dirty = b.dirty; + this.size = b.size; + this.bits = b.bits; }; - d.prototype.clear = function(d) { + b.prototype.clear = function(b) { var f = this.bits; - this.bits = d = f & ~(1 << (d & a.BIT_INDEX_MASK)); - this.dirty |= f ^ d; + this.bits = b = f & ~(1 << (b & d.BIT_INDEX_MASK)); + this.dirty |= f ^ b; }; - d.prototype.get = function(d) { - return 0 !== (this.bits & 1 << (d & a.BIT_INDEX_MASK)); + b.prototype.get = function(b) { + return 0 !== (this.bits & 1 << (b & d.BIT_INDEX_MASK)); }; - d.prototype.clearAll = function() { + b.prototype.clearAll = function() { this.dirty = this.count = this.bits = 0; }; - d.prototype._union = function(d) { - var a = this.bits; - this.bits = d = a | d.bits; - this.dirty = a ^ d; + b.prototype._union = function(b) { + var f = this.bits; + this.bits = b = f | b.bits; + this.dirty = f ^ b; }; - d.prototype.intersect = function(d) { - var a = this.bits; - this.bits = d = a & d.bits; - this.dirty = a ^ d; + b.prototype.intersect = function(b) { + var f = this.bits; + this.bits = b = f & b.bits; + this.dirty = f ^ b; }; - d.prototype.subtract = function(d) { - var a = this.bits; - this.bits = d = a & ~d.bits; - this.dirty = a ^ d; + b.prototype.subtract = function(b) { + var f = this.bits; + this.bits = b = f & ~b.bits; + this.dirty = f ^ b; }; - d.prototype.negate = function() { - var d = this.bits, a = ~d; - this.bits = a; - this.dirty = d ^ a; + b.prototype.negate = function() { + var b = this.bits, f = ~b; + this.bits = f; + this.dirty = b ^ f; }; - d.prototype.forEach = function(d) { - q(d); + b.prototype.forEach = function(b) { var f = this.bits; if (f) { - for (var h = 0;h < a.BITS_PER_WORD;h++) { - f & 1 << h && d(h); + for (var q = 0;q < d.BITS_PER_WORD;q++) { + f & 1 << q && b(q); } } }; - d.prototype.toArray = function() { - var d = [], f = this.bits; + b.prototype.toArray = function() { + var b = [], f = this.bits; if (f) { - for (var q = 0;q < a.BITS_PER_WORD;q++) { - f & 1 << q && d.push(q); + for (var q = 0;q < d.BITS_PER_WORD;q++) { + f & 1 << q && b.push(q); } } - return d; + return b; }; - d.prototype.equals = function(d) { - return this.bits === d.bits; + b.prototype.equals = function(b) { + return this.bits === b.bits; }; - d.prototype.contains = function(d) { - var a = this.bits; - return(a | d.bits) === a; + b.prototype.contains = function(b) { + var f = this.bits; + return(f | b.bits) === f; }; - d.prototype.isEmpty = function() { + b.prototype.isEmpty = function() { this.recount(); return 0 === this.count; }; - d.prototype.clone = function() { - var a = new d(this.length); - a._union(this); - return a; + b.prototype.clone = function() { + var f = new b(this.length); + f._union(this); + return f; }; - return d; + return b; }(); - a.Uint32BitSet = s; - s.prototype.toString = d; - s.prototype.toBitString = f; - b.prototype.toString = d; - b.prototype.toBitString = f; - a.BitSetFunctor = function(d) { - var f = 1 === h(d) >> a.ADDRESS_BITS_PER_WORD ? s : b; + d.Uint32BitSet = a; + a.prototype.toString = f; + a.prototype.toBitString = b; + q.prototype.toString = f; + q.prototype.toBitString = b; + d.BitSetFunctor = function(b) { + var f = 1 === e(b) >> d.ADDRESS_BITS_PER_WORD ? a : q; return function() { - return new f(d); + return new f(b); }; }; - })(g.BitSets || (g.BitSets = {})); + })(l.BitSets || (l.BitSets = {})); a = function() { - function a() { + function d() { } - a.randomStyle = function() { - a._randomStyleCache || (a._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" ")); - return a._randomStyleCache[a._nextStyle++ % a._randomStyleCache.length]; + d.randomStyle = function() { + d._randomStyleCache || (d._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" ")); + return d._randomStyleCache[d._nextStyle++ % d._randomStyleCache.length]; }; - a.gradientColor = function(h) { - return a._gradient[a._gradient.length * y.clamp(h, 0, 1) | 0]; + d.gradientColor = function(e) { + return d._gradient[d._gradient.length * k.clamp(e, 0, 1) | 0]; }; - a.contrastStyle = function(a) { - a = parseInt(a.substr(1), 16); - return 128 <= (299 * (a >> 16) + 587 * (a >> 8 & 255) + 114 * (a & 255)) / 1E3 ? "#000000" : "#ffffff"; + d.contrastStyle = function(e) { + e = parseInt(e.substr(1), 16); + return 128 <= (299 * (e >> 16) + 587 * (e >> 8 & 255) + 114 * (e & 255)) / 1E3 ? "#000000" : "#ffffff"; }; - a.reset = function() { - a._nextStyle = 0; + d.reset = function() { + d._nextStyle = 0; }; - a.TabToolbar = "#252c33"; - a.Toolbars = "#343c45"; - a.HighlightBlue = "#1d4f73"; - a.LightText = "#f5f7fa"; - a.ForegroundText = "#b6babf"; - a.Black = "#000000"; - a.VeryDark = "#14171a"; - a.Dark = "#181d20"; - a.Light = "#a9bacb"; - a.Grey = "#8fa1b2"; - a.DarkGrey = "#5f7387"; - a.Blue = "#46afe3"; - a.Purple = "#6b7abb"; - a.Pink = "#df80ff"; - a.Red = "#eb5368"; - a.Orange = "#d96629"; - a.LightOrange = "#d99b28"; - a.Green = "#70bf53"; - a.BlueGrey = "#5e88b0"; - a._nextStyle = 0; - a._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); - return a; + d.TabToolbar = "#252c33"; + d.Toolbars = "#343c45"; + d.HighlightBlue = "#1d4f73"; + d.LightText = "#f5f7fa"; + d.ForegroundText = "#b6babf"; + d.Black = "#000000"; + d.VeryDark = "#14171a"; + d.Dark = "#181d20"; + d.Light = "#a9bacb"; + d.Grey = "#8fa1b2"; + d.DarkGrey = "#5f7387"; + d.Blue = "#46afe3"; + d.Purple = "#6b7abb"; + d.Pink = "#df80ff"; + d.Red = "#eb5368"; + d.Orange = "#d96629"; + d.LightOrange = "#d99b28"; + d.Green = "#70bf53"; + d.BlueGrey = "#5e88b0"; + d._nextStyle = 0; + d._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); + return d; }(); - g.ColorStyle = a; + l.ColorStyle = a; a = function() { - function a(h, f, d, q) { - this.xMin = h | 0; - this.yMin = f | 0; - this.xMax = d | 0; + function d(e, b, f, q) { + this.xMin = e | 0; + this.yMin = b | 0; + this.xMax = f | 0; this.yMax = q | 0; } - a.FromUntyped = function(h) { - return new a(h.xMin, h.yMin, h.xMax, h.yMax); + d.FromUntyped = function(e) { + return new d(e.xMin, e.yMin, e.xMax, e.yMax); }; - a.FromRectangle = function(h) { - return new a(20 * h.x | 0, 20 * h.y | 0, 20 * (h.x + h.width) | 0, 20 * (h.y + h.height) | 0); + d.FromRectangle = function(e) { + return new d(20 * e.x | 0, 20 * e.y | 0, 20 * (e.x + e.width) | 0, 20 * (e.y + e.height) | 0); }; - a.prototype.setElements = function(a, f, d, q) { - this.xMin = a; - this.yMin = f; - this.xMax = d; + d.prototype.setElements = function(e, b, f, q) { + this.xMin = e; + this.yMin = b; + this.xMax = f; this.yMax = q; }; - a.prototype.copyFrom = function(a) { - this.setElements(a.xMin, a.yMin, a.xMax, a.yMax); + d.prototype.copyFrom = function(e) { + this.setElements(e.xMin, e.yMin, e.xMax, e.yMax); }; - a.prototype.contains = function(a, f) { - return a < this.xMin !== a < this.xMax && f < this.yMin !== f < this.yMax; + d.prototype.contains = function(e, b) { + return e < this.xMin !== e < this.xMax && b < this.yMin !== b < this.yMax; }; - a.prototype.unionInPlace = function(a) { - a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax)); + d.prototype.unionInPlace = function(e) { + e.isEmpty() || (this.extendByPoint(e.xMin, e.yMin), this.extendByPoint(e.xMax, e.yMax)); }; - a.prototype.extendByPoint = function(a, f) { - this.extendByX(a); - this.extendByY(f); + d.prototype.extendByPoint = function(e, b) { + this.extendByX(e); + this.extendByY(b); }; - a.prototype.extendByX = function(a) { - 134217728 === this.xMin ? this.xMin = this.xMax = a : (this.xMin = Math.min(this.xMin, a), this.xMax = Math.max(this.xMax, a)); + d.prototype.extendByX = function(e) { + 134217728 === this.xMin ? this.xMin = this.xMax = e : (this.xMin = Math.min(this.xMin, e), this.xMax = Math.max(this.xMax, e)); }; - a.prototype.extendByY = function(a) { - 134217728 === this.yMin ? this.yMin = this.yMax = a : (this.yMin = Math.min(this.yMin, a), this.yMax = Math.max(this.yMax, a)); + d.prototype.extendByY = function(e) { + 134217728 === this.yMin ? this.yMin = this.yMax = e : (this.yMin = Math.min(this.yMin, e), this.yMax = Math.max(this.yMax, e)); }; - a.prototype.intersects = function(a) { - return this.contains(a.xMin, a.yMin) || this.contains(a.xMax, a.yMax); + d.prototype.intersects = function(e) { + return this.contains(e.xMin, e.yMin) || this.contains(e.xMax, e.yMax); }; - a.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return this.xMax <= this.xMin || this.yMax <= this.yMin; }; - Object.defineProperty(a.prototype, "width", {get:function() { + Object.defineProperty(d.prototype, "width", {get:function() { return this.xMax - this.xMin; - }, set:function(a) { - this.xMax = this.xMin + a; + }, set:function(e) { + this.xMax = this.xMin + e; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "height", {get:function() { + Object.defineProperty(d.prototype, "height", {get:function() { return this.yMax - this.yMin; - }, set:function(a) { - this.yMax = this.yMin + a; + }, set:function(e) { + this.yMax = this.yMin + e; }, enumerable:!0, configurable:!0}); - a.prototype.getBaseWidth = function(a) { - return Math.abs(Math.cos(a)) * (this.xMax - this.xMin) + Math.abs(Math.sin(a)) * (this.yMax - this.yMin); + d.prototype.getBaseWidth = function(e) { + return Math.abs(Math.cos(e)) * (this.xMax - this.xMin) + Math.abs(Math.sin(e)) * (this.yMax - this.yMin); }; - a.prototype.getBaseHeight = function(a) { - return Math.abs(Math.sin(a)) * (this.xMax - this.xMin) + Math.abs(Math.cos(a)) * (this.yMax - this.yMin); + d.prototype.getBaseHeight = function(e) { + return Math.abs(Math.sin(e)) * (this.xMax - this.xMin) + Math.abs(Math.cos(e)) * (this.yMax - this.yMin); }; - a.prototype.setEmpty = function() { + d.prototype.setEmpty = function() { this.xMin = this.yMin = this.xMax = this.yMax = 0; }; - a.prototype.setToSentinels = function() { + d.prototype.setToSentinels = function() { this.xMin = this.yMin = this.xMax = this.yMax = 134217728; }; - a.prototype.clone = function() { - return new a(this.xMin, this.yMin, this.xMax, this.yMax); + d.prototype.clone = function() { + return new d(this.xMin, this.yMin, this.xMax, this.yMax); }; - a.prototype.toString = function() { + d.prototype.toString = function() { return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }"; }; - return a; + return d; }(); - g.Bounds = a; + l.Bounds = a; a = function() { - function a(h, f, d, q) { - k.assert(m(h)); - k.assert(m(f)); - k.assert(m(d)); - k.assert(m(q)); - this._xMin = h | 0; - this._yMin = f | 0; - this._xMax = d | 0; + function d(e, b, f, q) { + m.assert(r(e)); + m.assert(r(b)); + m.assert(r(f)); + m.assert(r(q)); + this._xMin = e | 0; + this._yMin = b | 0; + this._xMax = f | 0; this._yMax = q | 0; } - a.FromUntyped = function(h) { - return new a(h.xMin, h.yMin, h.xMax, h.yMax); + d.FromUntyped = function(e) { + return new d(e.xMin, e.yMin, e.xMax, e.yMax); }; - a.FromRectangle = function(h) { - return new a(20 * h.x | 0, 20 * h.y | 0, 20 * (h.x + h.width) | 0, 20 * (h.y + h.height) | 0); + d.FromRectangle = function(e) { + return new d(20 * e.x | 0, 20 * e.y | 0, 20 * (e.x + e.width) | 0, 20 * (e.y + e.height) | 0); }; - a.prototype.setElements = function(a, f, d, q) { - this.xMin = a; - this.yMin = f; - this.xMax = d; + d.prototype.setElements = function(e, b, f, q) { + this.xMin = e; + this.yMin = b; + this.xMax = f; this.yMax = q; }; - a.prototype.copyFrom = function(a) { - this.setElements(a.xMin, a.yMin, a.xMax, a.yMax); + d.prototype.copyFrom = function(e) { + this.setElements(e.xMin, e.yMin, e.xMax, e.yMax); }; - a.prototype.contains = function(a, f) { - return a < this.xMin !== a < this.xMax && f < this.yMin !== f < this.yMax; + d.prototype.contains = function(e, b) { + return e < this.xMin !== e < this.xMax && b < this.yMin !== b < this.yMax; }; - a.prototype.unionInPlace = function(a) { - a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax)); + d.prototype.unionInPlace = function(e) { + e.isEmpty() || (this.extendByPoint(e.xMin, e.yMin), this.extendByPoint(e.xMax, e.yMax)); }; - a.prototype.extendByPoint = function(a, f) { - this.extendByX(a); - this.extendByY(f); + d.prototype.extendByPoint = function(e, b) { + this.extendByX(e); + this.extendByY(b); }; - a.prototype.extendByX = function(a) { - 134217728 === this.xMin ? this.xMin = this.xMax = a : (this.xMin = Math.min(this.xMin, a), this.xMax = Math.max(this.xMax, a)); + d.prototype.extendByX = function(e) { + 134217728 === this.xMin ? this.xMin = this.xMax = e : (this.xMin = Math.min(this.xMin, e), this.xMax = Math.max(this.xMax, e)); }; - a.prototype.extendByY = function(a) { - 134217728 === this.yMin ? this.yMin = this.yMax = a : (this.yMin = Math.min(this.yMin, a), this.yMax = Math.max(this.yMax, a)); + d.prototype.extendByY = function(e) { + 134217728 === this.yMin ? this.yMin = this.yMax = e : (this.yMin = Math.min(this.yMin, e), this.yMax = Math.max(this.yMax, e)); }; - a.prototype.intersects = function(a) { - return this.contains(a._xMin, a._yMin) || this.contains(a._xMax, a._yMax); + d.prototype.intersects = function(e) { + return this.contains(e._xMin, e._yMin) || this.contains(e._xMax, e._yMax); }; - a.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return this._xMax <= this._xMin || this._yMax <= this._yMin; }; - Object.defineProperty(a.prototype, "xMin", {get:function() { + Object.defineProperty(d.prototype, "xMin", {get:function() { return this._xMin; - }, set:function(a) { - k.assert(m(a)); - this._xMin = a; + }, set:function(e) { + m.assert(r(e)); + this._xMin = e; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "yMin", {get:function() { + Object.defineProperty(d.prototype, "yMin", {get:function() { return this._yMin; - }, set:function(a) { - k.assert(m(a)); - this._yMin = a | 0; + }, set:function(e) { + m.assert(r(e)); + this._yMin = e | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "xMax", {get:function() { + Object.defineProperty(d.prototype, "xMax", {get:function() { return this._xMax; - }, set:function(a) { - k.assert(m(a)); - this._xMax = a | 0; + }, set:function(e) { + m.assert(r(e)); + this._xMax = e | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "width", {get:function() { + Object.defineProperty(d.prototype, "width", {get:function() { return this._xMax - this._xMin; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "yMax", {get:function() { + Object.defineProperty(d.prototype, "yMax", {get:function() { return this._yMax; - }, set:function(a) { - k.assert(m(a)); - this._yMax = a | 0; + }, set:function(e) { + m.assert(r(e)); + this._yMax = e | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "height", {get:function() { + Object.defineProperty(d.prototype, "height", {get:function() { return this._yMax - this._yMin; }, enumerable:!0, configurable:!0}); - a.prototype.getBaseWidth = function(a) { - return Math.abs(Math.cos(a)) * (this._xMax - this._xMin) + Math.abs(Math.sin(a)) * (this._yMax - this._yMin); + d.prototype.getBaseWidth = function(e) { + return Math.abs(Math.cos(e)) * (this._xMax - this._xMin) + Math.abs(Math.sin(e)) * (this._yMax - this._yMin); }; - a.prototype.getBaseHeight = function(a) { - return Math.abs(Math.sin(a)) * (this._xMax - this._xMin) + Math.abs(Math.cos(a)) * (this._yMax - this._yMin); + d.prototype.getBaseHeight = function(e) { + return Math.abs(Math.sin(e)) * (this._xMax - this._xMin) + Math.abs(Math.cos(e)) * (this._yMax - this._yMin); }; - a.prototype.setEmpty = function() { + d.prototype.setEmpty = function() { this._xMin = this._yMin = this._xMax = this._yMax = 0; }; - a.prototype.clone = function() { - return new a(this.xMin, this.yMin, this.xMax, this.yMax); + d.prototype.clone = function() { + return new d(this.xMin, this.yMin, this.xMax, this.yMax); }; - a.prototype.toString = function() { + d.prototype.toString = function() { return "{ xMin: " + this._xMin + ", xMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }"; }; - a.prototype.assertValid = function() { + d.prototype.assertValid = function() { }; - return a; + return d; }(); - g.DebugBounds = a; + l.DebugBounds = a; a = function() { - function a(h, f, d, q) { - this.r = h; - this.g = f; - this.b = d; + function d(e, b, f, q) { + this.r = e; + this.g = b; + this.b = f; this.a = q; } - a.FromARGB = function(h) { - return new a((h >> 16 & 255) / 255, (h >> 8 & 255) / 255, (h >> 0 & 255) / 255, (h >> 24 & 255) / 255); + d.FromARGB = function(e) { + return new d((e >> 16 & 255) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255, (e >> 24 & 255) / 255); }; - a.FromRGBA = function(h) { - return a.FromARGB(t.RGBAToARGB(h)); + d.FromRGBA = function(e) { + return d.FromARGB(s.RGBAToARGB(e)); }; - a.prototype.toRGBA = function() { + d.prototype.toRGBA = function() { return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a; }; - a.prototype.toCSSStyle = function() { - return t.rgbaToCSSStyle(this.toRGBA()); + d.prototype.toCSSStyle = function() { + return s.rgbaToCSSStyle(this.toRGBA()); }; - a.prototype.set = function(a) { - this.r = a.r; - this.g = a.g; - this.b = a.b; - this.a = a.a; + d.prototype.set = function(e) { + this.r = e.r; + this.g = e.g; + this.b = e.b; + this.a = e.a; }; - a.randomColor = function() { - var h = .4; - void 0 === h && (h = 1); - return new a(Math.random(), Math.random(), Math.random(), h); + d.randomColor = function() { + var e = .4; + void 0 === e && (e = 1); + return new d(Math.random(), Math.random(), Math.random(), e); }; - a.parseColor = function(h) { - a.colorCache || (a.colorCache = Object.create(null)); - if (a.colorCache[h]) { - return a.colorCache[h]; + d.parseColor = function(e) { + d.colorCache || (d.colorCache = Object.create(null)); + if (d.colorCache[e]) { + return d.colorCache[e]; } - var f = document.createElement("span"); - document.body.appendChild(f); - f.style.backgroundColor = h; - var d = getComputedStyle(f).backgroundColor; - document.body.removeChild(f); - (f = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(d)) || (f = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(d)); - d = new a(0, 0, 0, 0); - d.r = parseFloat(f[1]) / 255; - d.g = parseFloat(f[2]) / 255; - d.b = parseFloat(f[3]) / 255; - d.a = f[4] ? parseFloat(f[4]) / 255 : 1; - return a.colorCache[h] = d; + var b = document.createElement("span"); + document.body.appendChild(b); + b.style.backgroundColor = e; + var f = getComputedStyle(b).backgroundColor; + document.body.removeChild(b); + (b = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(f)) || (b = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(f)); + f = new d(0, 0, 0, 0); + f.r = parseFloat(b[1]) / 255; + f.g = parseFloat(b[2]) / 255; + f.b = parseFloat(b[3]) / 255; + f.a = b[4] ? parseFloat(b[4]) / 255 : 1; + return d.colorCache[e] = f; }; - a.Red = new a(1, 0, 0, 1); - a.Green = new a(0, 1, 0, 1); - a.Blue = new a(0, 0, 1, 1); - a.None = new a(0, 0, 0, 0); - a.White = new a(1, 1, 1, 1); - a.Black = new a(0, 0, 0, 1); - a.colorCache = {}; - return a; + d.Red = new d(1, 0, 0, 1); + d.Green = new d(0, 1, 0, 1); + d.Blue = new d(0, 0, 1, 1); + d.None = new d(0, 0, 0, 0); + d.White = new d(1, 1, 1, 1); + d.Black = new d(0, 0, 0, 1); + d.colorCache = {}; + return d; }(); - g.Color = a; - var t; - (function(a) { - function h(a) { - var d, f, h = a >> 24 & 255; - f = (Math.imul(a >> 16 & 255, h) + 127) / 255 | 0; - d = (Math.imul(a >> 8 & 255, h) + 127) / 255 | 0; - a = (Math.imul(a >> 0 & 255, h) + 127) / 255 | 0; - return h << 24 | f << 16 | d << 8 | a; + l.Color = a; + var s; + (function(d) { + function e(b) { + var f, e, d = b >> 24 & 255; + e = (Math.imul(b >> 16 & 255, d) + 127) / 255 | 0; + f = (Math.imul(b >> 8 & 255, d) + 127) / 255 | 0; + b = (Math.imul(b >> 0 & 255, d) + 127) / 255 | 0; + return d << 24 | e << 16 | f << 8 | b; } - a.RGBAToARGB = function(a) { - return a >> 8 & 16777215 | (a & 255) << 24; + d.RGBAToARGB = function(b) { + return b >> 8 & 16777215 | (b & 255) << 24; }; - a.ARGBToRGBA = function(a) { - return a << 8 | a >> 24 & 255; + d.ARGBToRGBA = function(b) { + return b << 8 | b >> 24 & 255; }; - a.rgbaToCSSStyle = function(a) { - return g.StringUtilities.concat9("rgba(", a >> 24 & 255, ",", a >> 16 & 255, ",", a >> 8 & 255, ",", (a & 255) / 255, ")"); + d.rgbaToCSSStyle = function(b) { + return l.StringUtilities.concat9("rgba(", b >> 24 & 255, ",", b >> 16 & 255, ",", b >> 8 & 255, ",", (b & 255) / 255, ")"); }; - a.cssStyleToRGBA = function(a) { - if ("#" === a[0]) { - if (7 === a.length) { - return parseInt(a.substring(1), 16) << 8 | 255; + d.cssStyleToRGBA = function(b) { + if ("#" === b[0]) { + if (7 === b.length) { + return parseInt(b.substring(1), 16) << 8 | 255; } } else { - if ("r" === a[0]) { - return a = a.substring(5, a.length - 1).split(","), (parseInt(a[0]) & 255) << 24 | (parseInt(a[1]) & 255) << 16 | (parseInt(a[2]) & 255) << 8 | 255 * parseFloat(a[3]) & 255; + if ("r" === b[0]) { + return b = b.substring(5, b.length - 1).split(","), (parseInt(b[0]) & 255) << 24 | (parseInt(b[1]) & 255) << 16 | (parseInt(b[2]) & 255) << 8 | 255 * parseFloat(b[3]) & 255; } } return 4278190335; }; - a.hexToRGB = function(a) { - return parseInt(a.slice(1), 16); + d.hexToRGB = function(b) { + return parseInt(b.slice(1), 16); }; - a.rgbToHex = function(a) { - return "#" + ("000000" + (a >>> 0).toString(16)).slice(-6); + d.rgbToHex = function(b) { + return "#" + ("000000" + (b >>> 0).toString(16)).slice(-6); }; - a.isValidHexColor = function(a) { - return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(a); + d.isValidHexColor = function(b) { + return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(b); }; - a.clampByte = function(a) { - return Math.max(0, Math.min(255, a)); + d.clampByte = function(b) { + return Math.max(0, Math.min(255, b)); }; - a.unpremultiplyARGB = function(a) { - var d, f, h = a >> 24 & 255; - f = Math.imul(255, a >> 16 & 255) / h & 255; - d = Math.imul(255, a >> 8 & 255) / h & 255; - a = Math.imul(255, a >> 0 & 255) / h & 255; - return h << 24 | f << 16 | d << 8 | a; + d.unpremultiplyARGB = function(b) { + var f, e, d = b >> 24 & 255; + e = Math.imul(255, b >> 16 & 255) / d & 255; + f = Math.imul(255, b >> 8 & 255) / d & 255; + b = Math.imul(255, b >> 0 & 255) / d & 255; + return d << 24 | e << 16 | f << 8 | b; }; - a.premultiplyARGB = h; - var f; - a.ensureUnpremultiplyTable = function() { - if (!f) { - f = new Uint8Array(65536); - for (var a = 0;256 > a;a++) { - for (var d = 0;256 > d;d++) { - f[(d << 8) + a] = Math.imul(255, a) / d; + d.premultiplyARGB = e; + var b; + d.ensureUnpremultiplyTable = function() { + if (!b) { + b = new Uint8Array(65536); + for (var f = 0;256 > f;f++) { + for (var e = 0;256 > e;e++) { + b[(e << 8) + f] = Math.imul(255, f) / e; } } } }; - a.tableLookupUnpremultiplyARGB = function(a) { - a |= 0; - var d = a >> 24 & 255; - if (0 === d) { + d.tableLookupUnpremultiplyARGB = function(f) { + f |= 0; + var e = f >> 24 & 255; + if (0 === e) { return 0; } - if (255 === d) { - return a; + if (255 === e) { + return f; } - var h, b, n = d << 8, p = f; - b = p[n + (a >> 16 & 255)]; - h = p[n + (a >> 8 & 255)]; - a = p[n + (a >> 0 & 255)]; - return d << 24 | b << 16 | h << 8 | a; + var d, a, h = e << 8, p = b; + a = p[h + (f >> 16 & 255)]; + d = p[h + (f >> 8 & 255)]; + f = p[h + (f >> 0 & 255)]; + return e << 24 | a << 16 | d << 8 | f; }; - a.blendPremultipliedBGRA = function(a, d) { - var f, h; - h = 256 - (d & 255); - f = Math.imul(a & 16711935, h) >> 8; - h = Math.imul(a >> 8 & 16711935, h) >> 8; - return((d >> 8 & 16711935) + h & 16711935) << 8 | (d & 16711935) + f & 16711935; + d.blendPremultipliedBGRA = function(b, f) { + var e, d; + d = 256 - (f & 255); + e = Math.imul(b & 16711935, d) >> 8; + d = Math.imul(b >> 8 & 16711935, d) >> 8; + return((f >> 8 & 16711935) + d & 16711935) << 8 | (f & 16711935) + e & 16711935; }; - var d = v.swap32; - a.convertImage = function(a, b, s, n) { - s !== n && k.assert(s.buffer !== n.buffer, "Can't handle overlapping views."); - var p = s.length; - if (a === b) { - if (s !== n) { - for (a = 0;a < p;a++) { - n[a] = s[a]; + var f = u.swap32; + d.convertImage = function(q, d, a, h) { + var p = a.length; + if (q === d) { + if (a !== h) { + for (q = 0;q < p;q++) { + h[q] = a[q]; } } } else { - if (1 === a && 3 === b) { - for (g.ColorUtilities.ensureUnpremultiplyTable(), a = 0;a < p;a++) { - var c = s[a]; - b = c & 255; - if (0 === b) { - n[a] = 0; + if (1 === q && 3 === d) { + for (l.ColorUtilities.ensureUnpremultiplyTable(), q = 0;q < p;q++) { + var c = a[q]; + d = c & 255; + if (0 === d) { + h[q] = 0; } else { - if (255 === b) { - n[a] = 4278190080 | c >> 8 & 16777215; + if (255 === d) { + h[q] = 4278190080 | c >> 8 & 16777215; } else { - var u = c >> 24 & 255, l = c >> 16 & 255, c = c >> 8 & 255, y = b << 8, t = f, c = t[y + c], l = t[y + l], u = t[y + u]; - n[a] = b << 24 | u << 16 | l << 8 | c; + var k = c >> 24 & 255, n = c >> 16 & 255, c = c >> 8 & 255, u = d << 8, s = b, c = s[u + c], n = s[u + n], k = s[u + k]; + h[q] = d << 24 | k << 16 | n << 8 | c; } } } } else { - if (2 === a && 3 === b) { - for (a = 0;a < p;a++) { - n[a] = d(s[a]); + if (2 === q && 3 === d) { + for (q = 0;q < p;q++) { + h[q] = f(a[q]); } } else { - if (3 === a && 1 === b) { - for (a = 0;a < p;a++) { - b = s[a], n[a] = d(h(b & 4278255360 | b >> 16 & 255 | (b & 255) << 16)); + if (3 === q && 1 === d) { + for (q = 0;q < p;q++) { + d = a[q], h[q] = f(e(d & 4278255360 | d >> 16 & 255 | (d & 255) << 16)); } } else { - for (k.somewhatImplemented("Image Format Conversion: " + r[a] + " -> " + r[b]), a = 0;a < p;a++) { - n[a] = s[a]; + for (m.somewhatImplemented("Image Format Conversion: " + v[q] + " -> " + v[d]), q = 0;q < p;q++) { + h[q] = a[q]; } } } } } }; - })(t = g.ColorUtilities || (g.ColorUtilities = {})); + })(s = l.ColorUtilities || (l.ColorUtilities = {})); a = function() { - function a(h) { - void 0 === h && (h = 32); + function d(e) { + void 0 === e && (e = 32); this._list = []; - this._maxSize = h; + this._maxSize = e; } - a.prototype.acquire = function(h) { - if (a._enabled) { - for (var f = this._list, d = 0;d < f.length;d++) { - var q = f[d]; - if (q.byteLength >= h) { - return f.splice(d, 1), q; + d.prototype.acquire = function(e) { + if (d._enabled) { + for (var b = this._list, f = 0;f < b.length;f++) { + var q = b[f]; + if (q.byteLength >= e) { + return b.splice(f, 1), q; } } } - return new ArrayBuffer(h); + return new ArrayBuffer(e); }; - a.prototype.release = function(h) { - if (a._enabled) { - var f = this._list; - k.assert(0 > b.indexOf(f, h)); - f.length === this._maxSize && f.shift(); - f.push(h); + d.prototype.release = function(e) { + if (d._enabled) { + var b = this._list; + b.length === this._maxSize && b.shift(); + b.push(e); } }; - a.prototype.ensureUint8ArrayLength = function(a, f) { - if (a.length >= f) { - return a; + d.prototype.ensureUint8ArrayLength = function(e, b) { + if (e.length >= b) { + return e; } - var d = Math.max(a.length + f, (3 * a.length >> 1) + 1), d = new Uint8Array(this.acquire(d), 0, d); - d.set(a); - this.release(a.buffer); - return d; + var f = Math.max(e.length + b, (3 * e.length >> 1) + 1), f = new Uint8Array(this.acquire(f), 0, f); + f.set(e); + this.release(e.buffer); + return f; }; - a.prototype.ensureFloat64ArrayLength = function(a, f) { - if (a.length >= f) { - return a; + d.prototype.ensureFloat64ArrayLength = function(e, b) { + if (e.length >= b) { + return e; } - var d = Math.max(a.length + f, (3 * a.length >> 1) + 1), d = new Float64Array(this.acquire(d * Float64Array.BYTES_PER_ELEMENT), 0, d); - d.set(a); - this.release(a.buffer); - return d; + var f = Math.max(e.length + b, (3 * e.length >> 1) + 1), f = new Float64Array(this.acquire(f * Float64Array.BYTES_PER_ELEMENT), 0, f); + f.set(e); + this.release(e.buffer); + return f; }; - a._enabled = !0; - return a; + d._enabled = !0; + return d; }(); - g.ArrayBufferPool = a; - (function(a) { - (function(a) { - a[a.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE"; - a[a.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE"; - a[a.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE"; - a[a.VIDEO_FEATURE = 4] = "VIDEO_FEATURE"; - a[a.SOUND_FEATURE = 5] = "SOUND_FEATURE"; - a[a.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE"; - })(a.Feature || (a.Feature = {})); - (function(a) { - a[a.AVM1_ERROR = 1] = "AVM1_ERROR"; - a[a.AVM2_ERROR = 2] = "AVM2_ERROR"; - })(a.ErrorTypes || (a.ErrorTypes = {})); - a.instance; - })(g.Telemetry || (g.Telemetry = {})); - (function(a) { - a.instance; - })(g.FileLoadingService || (g.FileLoadingService = {})); - g.registerCSSFont = function(a, b, f) { + l.ArrayBufferPool = a; + (function(d) { + (function(e) { + e[e.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE"; + e[e.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE"; + e[e.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE"; + e[e.VIDEO_FEATURE = 4] = "VIDEO_FEATURE"; + e[e.SOUND_FEATURE = 5] = "SOUND_FEATURE"; + e[e.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE"; + })(d.Feature || (d.Feature = {})); + (function(e) { + e[e.AVM1_ERROR = 1] = "AVM1_ERROR"; + e[e.AVM2_ERROR = 2] = "AVM2_ERROR"; + })(d.ErrorTypes || (d.ErrorTypes = {})); + d.instance; + })(l.Telemetry || (l.Telemetry = {})); + (function(d) { + d.instance; + })(l.FileLoadingService || (l.FileLoadingService = {})); + l.registerCSSFont = function(d, e, b) { if (inBrowser) { - var d = document.head; - d.insertBefore(document.createElement("style"), d.firstChild); - d = document.styleSheets[0]; - b = "@font-face{font-family:swffont" + a + ";src:url(data:font/opentype;base64," + g.StringUtilities.base64ArrayBuffer(b) + ")}"; - d.insertRule(b, d.cssRules.length); - f && (f = document.createElement("div"), f.style.fontFamily = "swffont" + a, f.innerHTML = "hello", document.body.appendChild(f), document.body.removeChild(f)); - } else { - k.warning("Cannot register CSS font outside the browser"); + var f = document.head; + f.insertBefore(document.createElement("style"), f.firstChild); + f = document.styleSheets[0]; + e = "@font-face{font-family:swffont" + d + ";src:url(data:font/opentype;base64," + l.StringUtilities.base64ArrayBuffer(e) + ")}"; + f.insertRule(e, f.cssRules.length); + b && (b = document.createElement("div"), b.style.fontFamily = "swffont" + d, b.innerHTML = "hello", document.body.appendChild(b), document.body.removeChild(b)); } }; - (function(a) { - a.instance = {enabled:!1, initJS:function(a) { - }, registerCallback:function(a) { - }, unregisterCallback:function(a) { - }, eval:function(a) { - }, call:function(a) { + (function(d) { + d.instance = {enabled:!1, initJS:function(e) { + }, registerCallback:function(e) { + }, unregisterCallback:function(e) { + }, eval:function(e) { + }, call:function(e) { }, getId:function() { return null; }}; - })(g.ExternalInterfaceService || (g.ExternalInterfaceService = {})); + })(l.ExternalInterfaceService || (l.ExternalInterfaceService = {})); a = function() { - function a() { + function d() { } - a.prototype.setClipboard = function(a) { - k.abstractMethod("public ClipboardService::setClipboard"); + d.prototype.setClipboard = function(e) { }; - a.instance = null; - return a; + d.instance = null; + return d; }(); - g.ClipboardService = a; + l.ClipboardService = a; a = function() { - function a() { + function d() { this._queues = {}; } - a.prototype.register = function(a, f) { - k.assert(a); - k.assert(f); - var d = this._queues[a]; - if (d) { - if (-1 < d.indexOf(f)) { + d.prototype.register = function(e, b) { + m.assert(e); + m.assert(b); + var f = this._queues[e]; + if (f) { + if (-1 < f.indexOf(b)) { return; } } else { - d = this._queues[a] = []; + f = this._queues[e] = []; } - d.push(f); + f.push(b); }; - a.prototype.unregister = function(a, f) { - k.assert(a); - k.assert(f); - var d = this._queues[a]; - if (d) { - var q = d.indexOf(f); - -1 !== q && d.splice(q, 1); - 0 === d.length && (this._queues[a] = null); + d.prototype.unregister = function(e, b) { + m.assert(e); + m.assert(b); + var f = this._queues[e]; + if (f) { + var q = f.indexOf(b); + -1 !== q && f.splice(q, 1); + 0 === f.length && (this._queues[e] = null); } }; - a.prototype.notify = function(a, f) { - var d = this._queues[a]; - if (d) { - d = d.slice(); - f = Array.prototype.slice.call(arguments, 0); - for (var q = 0;q < d.length;q++) { - d[q].apply(null, f); + d.prototype.notify = function(e, b) { + var f = this._queues[e]; + if (f) { + f = f.slice(); + b = Array.prototype.slice.call(arguments, 0); + for (var q = 0;q < f.length;q++) { + f[q].apply(null, b); } } }; - a.prototype.notify1 = function(a, f) { - var d = this._queues[a]; - if (d) { - for (var d = d.slice(), q = 0;q < d.length;q++) { - (0,d[q])(a, f); + d.prototype.notify1 = function(e, b) { + var f = this._queues[e]; + if (f) { + for (var f = f.slice(), q = 0;q < f.length;q++) { + (0,f[q])(e, b); } } }; - return a; + return d; }(); - g.Callback = a; - (function(a) { - a[a.None = 0] = "None"; - a[a.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB"; - a[a.StraightAlphaARGB = 2] = "StraightAlphaARGB"; - a[a.StraightAlphaRGBA = 3] = "StraightAlphaRGBA"; - a[a.JPEG = 4] = "JPEG"; - a[a.PNG = 5] = "PNG"; - a[a.GIF = 6] = "GIF"; - })(g.ImageType || (g.ImageType = {})); - var r = g.ImageType; - g.getMIMETypeForImageType = function(a) { - switch(a) { + l.Callback = a; + (function(d) { + d[d.None = 0] = "None"; + d[d.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB"; + d[d.StraightAlphaARGB = 2] = "StraightAlphaARGB"; + d[d.StraightAlphaRGBA = 3] = "StraightAlphaRGBA"; + d[d.JPEG = 4] = "JPEG"; + d[d.PNG = 5] = "PNG"; + d[d.GIF = 6] = "GIF"; + })(l.ImageType || (l.ImageType = {})); + var v = l.ImageType; + l.getMIMETypeForImageType = function(d) { + switch(d) { case 4: return "image/jpeg"; case 5: @@ -2119,9 +2085,9 @@ var START_TIME = performance.now(), Shumway; return "text/plain"; } }; - (function(a) { - a.toCSSCursor = function(a) { - switch(a) { + (function(d) { + d.toCSSCursor = function(e) { + switch(e) { case 0: return "auto"; case 2: @@ -2134,159 +2100,159 @@ var START_TIME = performance.now(), Shumway; return "default"; } }; - })(g.UI || (g.UI = {})); + })(l.UI || (l.UI = {})); a = function() { - function a() { - this.promise = new Promise(function(a, f) { - this.resolve = a; - this.reject = f; + function d() { + this.promise = new Promise(function(e, b) { + this.resolve = e; + this.reject = b; }.bind(this)); } - a.prototype.then = function(a, f) { - return this.promise.then(a, f); + d.prototype.then = function(e, b) { + return this.promise.then(e, b); }; - return a; + return d; }(); - g.PromiseWrapper = a; + l.PromiseWrapper = a; })(Shumway || (Shumway = {})); (function() { - function g(a) { - if ("function" !== typeof a) { + function l(b) { + if ("function" !== typeof b) { throw new TypeError("Invalid deferred constructor"); } - var f = l(); - a = new a(f); - var b = f.resolve; - if ("function" !== typeof b) { + var f = s(); + b = new b(f); + var e = f.resolve; + if ("function" !== typeof e) { throw new TypeError("Invalid resolve construction function"); } f = f.reject; if ("function" !== typeof f) { throw new TypeError("Invalid reject construction function"); } - return{promise:a, resolve:b, reject:f}; + return{promise:b, resolve:e, reject:f}; } - function m(a, f) { - if ("object" !== typeof a || null === a) { + function r(b, f) { + if ("object" !== typeof b || null === b) { return!1; } try { - var b = a.then; - if ("function" !== typeof b) { + var e = b.then; + if ("function" !== typeof e) { return!1; } - b.call(a, f.resolve, f.reject); - } catch (h) { - b = f.reject, b(h); + e.call(b, f.resolve, f.reject); + } catch (d) { + e = f.reject, e(d); } return!0; } - function e(a) { - return "object" === typeof a && null !== a && "undefined" !== typeof a.promiseStatus; + function g(b) { + return "object" === typeof b && null !== b && "undefined" !== typeof b.promiseStatus; } - function c(a, f) { - if ("unresolved" === a.promiseStatus) { - var b = a.rejectReactions; - a.result = f; - a.resolveReactions = void 0; - a.rejectReactions = void 0; - a.promiseStatus = "has-rejection"; - w(b, f); + function c(b, f) { + if ("unresolved" === b.promiseStatus) { + var e = b.rejectReactions; + b.result = f; + b.resolveReactions = void 0; + b.rejectReactions = void 0; + b.promiseStatus = "has-rejection"; + t(e, f); } } - function w(a, f) { - for (var b = 0;b < a.length;b++) { - k({reaction:a[b], argument:f}); + function t(b, f) { + for (var e = 0;e < b.length;e++) { + m({reaction:b[e], argument:f}); } } - function k(d) { - 0 === f.length && setTimeout(a, 0); - f.push(d); + function m(b) { + 0 === f.length && setTimeout(h, 0); + f.push(b); } - function b(a, f) { - var b = a.deferred, h = a.handler, n, p; + function a(b, f) { + var e = b.deferred, d = b.handler, a, h; try { - n = h(f); - } catch (c) { - return b = b.reject, b(c); + a = d(f); + } catch (p) { + return e = e.reject, e(p); } - if (n === b.promise) { - return b = b.reject, b(new TypeError("Self resolution")); + if (a === e.promise) { + return e = e.reject, e(new TypeError("Self resolution")); } try { - if (p = m(n, b), !p) { - var r = b.resolve; - return r(n); + if (h = r(a, e), !h) { + var c = e.resolve; + return c(a); } } catch (k) { - return b = b.reject, b(k); + return e = e.reject, e(k); } } - function a() { + function h() { for (;0 < f.length;) { - var a = f[0]; + var b = f[0]; try { - b(a.reaction, a.argument); - } catch (q) { - if ("function" === typeof u.onerror) { - u.onerror(q); + a(b.reaction, b.argument); + } catch (d) { + if ("function" === typeof e.onerror) { + e.onerror(d); } } f.shift(); } } - function n(a) { - throw a; + function p(b) { + throw b; } - function p(a) { - return a; + function k(b) { + return b; } - function y(a) { + function u(b) { return function(f) { - c(a, f); + c(b, f); }; } - function v(a) { + function n(b) { return function(f) { - if ("unresolved" === a.promiseStatus) { - var b = a.resolveReactions; - a.result = f; - a.resolveReactions = void 0; - a.rejectReactions = void 0; - a.promiseStatus = "has-resolution"; - w(b, f); + if ("unresolved" === b.promiseStatus) { + var e = b.resolveReactions; + b.result = f; + b.resolveReactions = void 0; + b.rejectReactions = void 0; + b.promiseStatus = "has-resolution"; + t(e, f); } }; } - function l() { - function a(f, b) { - a.resolve = f; - a.reject = b; + function s() { + function b(f, e) { + b.resolve = f; + b.reject = e; } - return a; + return b; } - function t(a, f, b) { - return function(h) { - if (h === a) { - return b(new TypeError("Self resolution")); + function v(b, f, e) { + return function(d) { + if (d === b) { + return e(new TypeError("Self resolution")); } - var n = a.promiseConstructor; - if (e(h) && h.promiseConstructor === n) { - return h.then(f, b); + var a = b.promiseConstructor; + if (g(d) && d.promiseConstructor === a) { + return d.then(f, e); } - n = g(n); - return m(h, n) ? n.promise.then(f, b) : f(h); + a = l(a); + return r(d, a) ? a.promise.then(f, e) : f(d); }; } - function r(a, f, b, h) { - return function(n) { - f[a] = n; - h.countdown--; - 0 === h.countdown && b.resolve(f); + function d(b, f, e, d) { + return function(a) { + f[b] = a; + d.countdown--; + 0 === d.countdown && e.resolve(f); }; } - function u(a) { - if ("function" !== typeof a) { + function e(b) { + if ("function" !== typeof b) { throw new TypeError("resolver is not a function"); } if ("object" !== typeof this) { @@ -2296,276 +2262,275 @@ var START_TIME = performance.now(), Shumway; this.resolveReactions = []; this.rejectReactions = []; this.result = void 0; - var f = v(this), b = y(this); + var f = n(this), d = u(this); try { - a(f, b); - } catch (h) { - c(this, h); + b(f, d); + } catch (a) { + c(this, a); } - this.promiseConstructor = u; + this.promiseConstructor = e; return this; } - var h = Function("return this")(); - if (h.Promise) { - "function" !== typeof h.Promise.all && (h.Promise.all = function(a) { - var f = 0, b = [], s, n, p = new h.Promise(function(a, d) { - s = a; - n = d; + var b = Function("return this")(); + if (b.Promise) { + "function" !== typeof b.Promise.all && (b.Promise.all = function(f) { + var e = 0, d = [], a, h, p = new b.Promise(function(b, f) { + a = b; + h = f; }); - a.forEach(function(a, d) { - f++; - a.then(function(a) { - b[d] = a; - f--; - 0 === f && s(b); - }, n); + f.forEach(function(b, f) { + e++; + b.then(function(b) { + d[f] = b; + e--; + 0 === e && a(d); + }, h); }); - 0 === f && s(b); + 0 === e && a(d); return p; - }), "function" !== typeof h.Promise.resolve && (h.Promise.resolve = function(a) { - return new h.Promise(function(f) { - f(a); + }), "function" !== typeof b.Promise.resolve && (b.Promise.resolve = function(f) { + return new b.Promise(function(b) { + b(f); }); }); } else { var f = []; - u.all = function(a) { - var f = g(this), b = [], h = {countdown:0}, n = 0; - a.forEach(function(a) { - this.cast(a).then(r(n, b, f, h), f.reject); - n++; - h.countdown++; + e.all = function(b) { + var f = l(this), e = [], a = {countdown:0}, h = 0; + b.forEach(function(b) { + this.cast(b).then(d(h, e, f, a), f.reject); + h++; + a.countdown++; }, this); - 0 === n && f.resolve(b); + 0 === h && f.resolve(e); return f.promise; }; - u.cast = function(a) { - if (e(a)) { - return a; + e.cast = function(b) { + if (g(b)) { + return b; } - var f = g(this); - f.resolve(a); + var f = l(this); + f.resolve(b); return f.promise; }; - u.reject = function(a) { - var f = g(this); - f.reject(a); + e.reject = function(b) { + var f = l(this); + f.reject(b); return f.promise; }; - u.resolve = function(a) { - var f = g(this); - f.resolve(a); + e.resolve = function(b) { + var f = l(this); + f.resolve(b); return f.promise; }; - u.prototype = {"catch":function(a) { - this.then(void 0, a); - }, then:function(a, f) { - if (!e(this)) { + e.prototype = {"catch":function(b) { + this.then(void 0, b); + }, then:function(b, f) { + if (!g(this)) { throw new TypeError("this is not a Promises"); } - var b = g(this.promiseConstructor), h = "function" === typeof f ? f : n, c = {deferred:b, handler:t(this, "function" === typeof a ? a : p, h)}, h = {deferred:b, handler:h}; + var e = l(this.promiseConstructor), d = "function" === typeof f ? f : p, a = {deferred:e, handler:v(this, "function" === typeof b ? b : k, d)}, d = {deferred:e, handler:d}; switch(this.promiseStatus) { case "unresolved": - this.resolveReactions.push(c); - this.rejectReactions.push(h); + this.resolveReactions.push(a); + this.rejectReactions.push(d); break; case "has-resolution": - k({reaction:c, argument:this.result}); + m({reaction:a, argument:this.result}); break; case "has-rejection": - k({reaction:h, argument:this.result}); + m({reaction:d, argument:this.result}); } - return b.promise; + return e.promise; }}; - h.Promise = u; + b.Promise = e; } })(); "undefined" !== typeof exports && (exports.Shumway = Shumway); (function() { - function g(g, e, c) { - g[e] || Object.defineProperty(g, e, {value:c, writable:!0, configurable:!0, enumerable:!1}); + function l(l, g, c) { + l[g] || Object.defineProperty(l, g, {value:c, writable:!0, configurable:!0, enumerable:!1}); } - g(String.prototype, "padRight", function(g, e) { - var c = this, w = c.replace(/\033\[[0-9]*m/g, "").length; - if (!g || w >= e) { + l(String.prototype, "padRight", function(l, g) { + var c = this, t = c.replace(/\033\[[0-9]*m/g, "").length; + if (!l || t >= g) { return c; } - for (var w = (e - w) / g.length, k = 0;k < w;k++) { - c += g; + for (var t = (g - t) / l.length, m = 0;m < t;m++) { + c += l; } return c; }); - g(String.prototype, "padLeft", function(g, e) { - var c = this, w = c.length; - if (!g || w >= e) { + l(String.prototype, "padLeft", function(l, g) { + var c = this, t = c.length; + if (!l || t >= g) { return c; } - for (var w = (e - w) / g.length, k = 0;k < w;k++) { - c = g + c; + for (var t = (g - t) / l.length, m = 0;m < t;m++) { + c = l + c; } return c; }); - g(String.prototype, "trim", function() { + l(String.prototype, "trim", function() { return this.replace(/^\s+|\s+$/g, ""); }); - g(String.prototype, "endsWith", function(g) { - return-1 !== this.indexOf(g, this.length - g.length); + l(String.prototype, "endsWith", function(l) { + return-1 !== this.indexOf(l, this.length - l.length); }); - g(Array.prototype, "replace", function(g, e) { - if (g === e) { + l(Array.prototype, "replace", function(l, g) { + if (l === g) { return 0; } - for (var c = 0, w = 0;w < this.length;w++) { - this[w] === g && (this[w] = e, c++); + for (var c = 0, t = 0;t < this.length;t++) { + this[t] === l && (this[t] = g, c++); } return c; }); })(); -(function(g) { - (function(m) { - var e = g.isObject, c = g.Debug.assert, w = function() { - function a(b, n, c, k) { - this.shortName = b; - this.longName = n; +(function(l) { + (function(r) { + var g = l.isObject, c = function() { + function a(a, p, c, m) { + this.shortName = a; + this.longName = p; this.type = c; - k = k || {}; - this.positional = k.positional; - this.parseFn = k.parse; - this.value = k.defaultValue; + m = m || {}; + this.positional = m.positional; + this.parseFn = m.parse; + this.value = m.defaultValue; } a.prototype.parse = function(a) { - "boolean" === this.type ? (c("boolean" === typeof a), this.value = a) : "number" === this.type ? (c(!isNaN(a), a + " is not a number"), this.value = parseInt(a, 10)) : this.value = a; + this.value = "boolean" === this.type ? a : "number" === this.type ? parseInt(a, 10) : a; this.parseFn && this.parseFn(this.value); }; return a; }(); - m.Argument = w; - var k = function() { - function n() { + r.Argument = c; + var t = function() { + function a() { this.args = []; } - n.prototype.addArgument = function(a, b, n, c) { - a = new w(a, b, n, c); + a.prototype.addArgument = function(a, p, k, m) { + a = new c(a, p, k, m); this.args.push(a); return a; }; - n.prototype.addBoundOption = function(a) { - this.args.push(new w(a.shortName, a.longName, a.type, {parse:function(b) { - a.value = b; + a.prototype.addBoundOption = function(a) { + this.args.push(new c(a.shortName, a.longName, a.type, {parse:function(p) { + a.value = p; }})); }; - n.prototype.addBoundOptionSet = function(n) { - var k = this; - n.options.forEach(function(n) { - n instanceof b ? k.addBoundOptionSet(n) : (c(n instanceof a), k.addBoundOption(n)); + a.prototype.addBoundOptionSet = function(a) { + var p = this; + a.options.forEach(function(a) { + a instanceof m ? p.addBoundOptionSet(a) : p.addBoundOption(a); }); }; - n.prototype.getUsage = function() { + a.prototype.getUsage = function() { var a = ""; - this.args.forEach(function(b) { - a = b.positional ? a + b.longName : a + ("[-" + b.shortName + "|--" + b.longName + ("boolean" === b.type ? "" : " " + b.type[0].toUpperCase()) + "]"); + this.args.forEach(function(p) { + a = p.positional ? a + p.longName : a + ("[-" + p.shortName + "|--" + p.longName + ("boolean" === p.type ? "" : " " + p.type[0].toUpperCase()) + "]"); a += " "; }); return a; }; - n.prototype.parse = function(a) { - var b = {}, n = []; - this.args.forEach(function(a) { - a.positional ? n.push(a) : (b["-" + a.shortName] = a, b["--" + a.longName] = a); + a.prototype.parse = function(a) { + var p = {}, c = []; + this.args.forEach(function(d) { + d.positional ? c.push(d) : (p["-" + d.shortName] = d, p["--" + d.longName] = d); }); - for (var k = [];a.length;) { - var t = a.shift(), r = null, u = t; - if ("--" == t) { - k = k.concat(a); + for (var m = [];a.length;) { + var n = a.shift(), s = null, g = n; + if ("--" == n) { + m = m.concat(a); break; } else { - if ("-" == t.slice(0, 1) || "--" == t.slice(0, 2)) { - r = b[t]; - if (!r) { + if ("-" == n.slice(0, 1) || "--" == n.slice(0, 2)) { + s = p[n]; + if (!s) { continue; } - "boolean" !== r.type ? (u = a.shift(), c("-" !== u && "--" !== u, "Argument " + t + " must have a value.")) : u = !0; + g = "boolean" !== s.type ? a.shift() : !0; } else { - n.length ? r = n.shift() : k.push(u); + c.length ? s = c.shift() : m.push(g); } } - r && r.parse(u); + s && s.parse(g); } - c(0 === n.length, "Missing positional arguments."); - return k; + return m; }; - return n; + return a; }(); - m.ArgumentParser = k; - var b = function() { - function a(b, n) { - void 0 === n && (n = null); + r.ArgumentParser = t; + var m = function() { + function a(a, p) { + void 0 === p && (p = null); this.open = !1; - this.name = b; - this.settings = n || {}; + this.name = a; + this.settings = p || {}; this.options = []; } - a.prototype.register = function(b) { - if (b instanceof a) { - for (var c = 0;c < this.options.length;c++) { - var k = this.options[c]; - if (k instanceof a && k.name === b.name) { - return k; + a.prototype.register = function(h) { + if (h instanceof a) { + for (var p = 0;p < this.options.length;p++) { + var c = this.options[p]; + if (c instanceof a && c.name === h.name) { + return c; } } } - this.options.push(b); + this.options.push(h); if (this.settings) { - if (b instanceof a) { - c = this.settings[b.name], e(c) && (b.settings = c.settings, b.open = c.open); + if (h instanceof a) { + p = this.settings[h.name], g(p) && (h.settings = p.settings, h.open = p.open); } else { - if ("undefined" !== typeof this.settings[b.longName]) { - switch(b.type) { + if ("undefined" !== typeof this.settings[h.longName]) { + switch(h.type) { case "boolean": - b.value = !!this.settings[b.longName]; + h.value = !!this.settings[h.longName]; break; case "number": - b.value = +this.settings[b.longName]; + h.value = +this.settings[h.longName]; break; default: - b.value = this.settings[b.longName]; + h.value = this.settings[h.longName]; } } } } - return b; + return h; }; a.prototype.trace = function(a) { a.enter(this.name + " {"); - this.options.forEach(function(b) { - b.trace(a); + this.options.forEach(function(p) { + p.trace(a); }); a.leave("}"); }; a.prototype.getSettings = function() { - var b = {}; - this.options.forEach(function(c) { - c instanceof a ? b[c.name] = {settings:c.getSettings(), open:c.open} : b[c.longName] = c.value; + var h = {}; + this.options.forEach(function(p) { + p instanceof a ? h[p.name] = {settings:p.getSettings(), open:p.open} : h[p.longName] = p.value; }); - return b; + return h; }; - a.prototype.setSettings = function(b) { - b && this.options.forEach(function(c) { - c instanceof a ? c.name in b && c.setSettings(b[c.name].settings) : c.longName in b && (c.value = b[c.longName]); + a.prototype.setSettings = function(h) { + h && this.options.forEach(function(p) { + p instanceof a ? p.name in h && p.setSettings(h[p.name].settings) : p.longName in h && (p.value = h[p.longName]); }); }; return a; }(); - m.OptionSet = b; - var a = function() { - function a(b, n, c, k, t, r) { - void 0 === r && (r = null); - this.longName = n; - this.shortName = b; + r.OptionSet = m; + t = function() { + function a(a, p, c, m, n, s) { + void 0 === s && (s = null); + this.longName = p; + this.shortName = a; this.type = c; - this.value = this.defaultValue = k; - this.description = t; - this.config = r; + this.value = this.defaultValue = m; + this.description = n; + this.config = s; } a.prototype.parse = function(a) { this.value = a; @@ -2575,12 +2540,12 @@ var START_TIME = performance.now(), Shumway; }; return a; }(); - m.Option = a; - })(g.Options || (g.Options = {})); + r.Option = t; + })(l.Options || (l.Options = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - function e() { +(function(l) { + (function(r) { + function g() { try { return "undefined" !== typeof window && "localStorage" in window && null !== window.localStorage; } catch (c) { @@ -2588,73 +2553,73 @@ var START_TIME = performance.now(), Shumway; } } function c(c) { - void 0 === c && (c = m.ROOT); - var k = {}; - if (e() && (c = window.localStorage[c])) { + void 0 === c && (c = r.ROOT); + var m = {}; + if (g() && (c = window.localStorage[c])) { try { - k = JSON.parse(c); - } catch (b) { + m = JSON.parse(c); + } catch (a) { } } - return k; + return m; } - m.ROOT = "Shumway Options"; - m.shumwayOptions = new g.Options.OptionSet(m.ROOT, c()); - m.isStorageSupported = e; - m.load = c; - m.save = function(c, k) { + r.ROOT = "Shumway Options"; + r.shumwayOptions = new l.Options.OptionSet(r.ROOT, c()); + r.isStorageSupported = g; + r.load = c; + r.save = function(c, m) { void 0 === c && (c = null); - void 0 === k && (k = m.ROOT); - if (e()) { + void 0 === m && (m = r.ROOT); + if (g()) { try { - window.localStorage[k] = JSON.stringify(c ? c : m.shumwayOptions.getSettings()); - } catch (b) { + window.localStorage[m] = JSON.stringify(c ? c : r.shumwayOptions.getSettings()); + } catch (a) { } } }; - m.setSettings = function(c) { - m.shumwayOptions.setSettings(c); + r.setSettings = function(c) { + r.shumwayOptions.setSettings(c); }; - m.getSettings = function(c) { - return m.shumwayOptions.getSettings(); + r.getSettings = function(c) { + return r.shumwayOptions.getSettings(); }; - })(g.Settings || (g.Settings = {})); + })(l.Settings || (l.Settings = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = function() { - function c(c, k) { +(function(l) { + (function(r) { + var g = function() { + function c(c, m) { this._parent = c; - this._timers = g.ObjectUtilities.createMap(); - this._name = k; + this._timers = l.ObjectUtilities.createMap(); + this._name = m; this._count = this._total = this._last = this._begin = 0; } - c.time = function(e, k) { - c.start(e); - k(); + c.time = function(g, m) { + c.start(g); + m(); c.stop(); }; - c.start = function(e) { - c._top = c._top._timers[e] || (c._top._timers[e] = new c(c._top, e)); + c.start = function(g) { + c._top = c._top._timers[g] || (c._top._timers[g] = new c(c._top, g)); c._top.start(); - e = c._flat._timers[e] || (c._flat._timers[e] = new c(c._flat, e)); - e.start(); - c._flatStack.push(e); + g = c._flat._timers[g] || (c._flat._timers[g] = new c(c._flat, g)); + g.start(); + c._flatStack.push(g); }; c.stop = function() { c._top.stop(); c._top = c._top._parent; c._flatStack.pop().stop(); }; - c.stopStart = function(e) { + c.stopStart = function(g) { c.stop(); - c.start(e); + c.start(g); }; c.prototype.start = function() { - this._begin = g.getTicks(); + this._begin = l.getTicks(); }; c.prototype.stop = function() { - this._last = g.getTicks() - this._begin; + this._last = l.getTicks() - this._begin; this._total += this._last; this._count += 1; }; @@ -2663,14 +2628,14 @@ var START_TIME = performance.now(), Shumway; }; c.prototype.trace = function(c) { c.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms"); - for (var k in this._timers) { - this._timers[k].trace(c); + for (var m in this._timers) { + this._timers[m].trace(c); } c.outdent(); }; - c.trace = function(e) { - c._base.trace(e); - c._flat.trace(e); + c.trace = function(g) { + c._base.trace(g); + c._flat.trace(g); }; c._base = new c(null, "Total"); c._top = c._base; @@ -2678,8 +2643,8 @@ var START_TIME = performance.now(), Shumway; c._flatStack = []; return c; }(); - m.Timer = e; - e = function() { + r.Timer = g; + g = function() { function c(c) { this._enabled = c; this.clear(); @@ -2691,61 +2656,61 @@ var START_TIME = performance.now(), Shumway; this._enabled = c; }; c.prototype.clear = function() { - this._counts = g.ObjectUtilities.createMap(); - this._times = g.ObjectUtilities.createMap(); + this._counts = l.ObjectUtilities.createMap(); + this._times = l.ObjectUtilities.createMap(); }; c.prototype.toJSON = function() { return{counts:this._counts, times:this._times}; }; - c.prototype.count = function(c, k, b) { - void 0 === k && (k = 1); - void 0 === b && (b = 0); + c.prototype.count = function(c, m, a) { + void 0 === m && (m = 1); + void 0 === a && (a = 0); if (this._enabled) { - return void 0 === this._counts[c] && (this._counts[c] = 0, this._times[c] = 0), this._counts[c] += k, this._times[c] += b, this._counts[c]; + return void 0 === this._counts[c] && (this._counts[c] = 0, this._times[c] = 0), this._counts[c] += m, this._times[c] += a, this._counts[c]; } }; c.prototype.trace = function(c) { - for (var k in this._counts) { - c.writeLn(k + ": " + this._counts[k]); + for (var m in this._counts) { + c.writeLn(m + ": " + this._counts[m]); } }; - c.prototype._pairToString = function(c, k) { - var b = k[0], a = k[1], n = c[b], b = b + ": " + a; - n && (b += ", " + n.toFixed(4), 1 < a && (b += " (" + (n / a).toFixed(4) + ")")); - return b; + c.prototype._pairToString = function(c, m) { + var a = m[0], h = m[1], p = c[a], a = a + ": " + h; + p && (a += ", " + p.toFixed(4), 1 < h && (a += " (" + (p / h).toFixed(4) + ")")); + return a; }; c.prototype.toStringSorted = function() { - var c = this, k = this._times, b = [], a; - for (a in this._counts) { - b.push([a, this._counts[a]]); + var c = this, m = this._times, a = [], h; + for (h in this._counts) { + a.push([h, this._counts[h]]); } - b.sort(function(a, b) { - return b[1] - a[1]; + a.sort(function(a, h) { + return h[1] - a[1]; }); - return b.map(function(a) { - return c._pairToString(k, a); + return a.map(function(a) { + return c._pairToString(m, a); }).join(", "); }; - c.prototype.traceSorted = function(c, k) { - void 0 === k && (k = !1); - var b = this, a = this._times, n = [], p; - for (p in this._counts) { - n.push([p, this._counts[p]]); + c.prototype.traceSorted = function(c, m) { + void 0 === m && (m = !1); + var a = this, h = this._times, p = [], k; + for (k in this._counts) { + p.push([k, this._counts[k]]); } - n.sort(function(a, b) { - return b[1] - a[1]; + p.sort(function(a, h) { + return h[1] - a[1]; }); - k ? c.writeLn(n.map(function(n) { - return b._pairToString(a, n); - }).join(", ")) : n.forEach(function(n) { - c.writeLn(b._pairToString(a, n)); + m ? c.writeLn(p.map(function(p) { + return a._pairToString(h, p); + }).join(", ")) : p.forEach(function(p) { + c.writeLn(a._pairToString(h, p)); }); }; c.instance = new c(!0); return c; }(); - m.Counter = e; - e = function() { + r.Counter = g; + g = function() { function c(c) { this._samples = new Float64Array(c); this._index = this._count = 0; @@ -2756,167 +2721,164 @@ var START_TIME = performance.now(), Shumway; this._samples[this._index % this._samples.length] = c; }; c.prototype.average = function() { - for (var c = 0, k = 0;k < this._count;k++) { - c += this._samples[k]; + for (var c = 0, m = 0;m < this._count;m++) { + c += this._samples[m]; } return c / this._count; }; return c; }(); - m.Average = e; - })(g.Metrics || (g.Metrics = {})); + r.Average = g; + })(l.Metrics || (l.Metrics = {})); })(Shumway || (Shumway = {})); -var __extends = this.__extends || function(g, m) { - function e() { - this.constructor = g; +var __extends = this.__extends || function(l, r) { + function g() { + this.constructor = l; } - for (var c in m) { - m.hasOwnProperty(c) && (g[c] = m[c]); + for (var c in r) { + r.hasOwnProperty(c) && (l[c] = r[c]); } - e.prototype = m.prototype; - g.prototype = new e; + g.prototype = r.prototype; + l.prototype = new g; }; -(function(g) { - (function(m) { - function e(a) { - for (var f = Math.max.apply(null, a), d = a.length, q = 1 << f, b = new Uint32Array(q), s = f << 16 | 65535, n = 0;n < q;n++) { - b[n] = s; +(function(l) { + (function(l) { + function g(b) { + for (var f = Math.max.apply(null, b), q = b.length, e = 1 << f, d = new Uint32Array(e), a = f << 16 | 65535, h = 0;h < e;h++) { + d[h] = a; } - for (var s = 0, n = 1, c = 2;n <= f;s <<= 1, ++n, c <<= 1) { - for (var p = 0;p < d;++p) { - if (a[p] === n) { - for (var r = 0, k = 0;k < n;++k) { - r = 2 * r + (s >> k & 1); + for (var a = 0, h = 1, p = 2;h <= f;a <<= 1, ++h, p <<= 1) { + for (var c = 0;c < q;++c) { + if (b[c] === h) { + for (var m = 0, k = 0;k < h;++k) { + m = 2 * m + (a >> k & 1); } - for (k = r;k < q;k += c) { - b[k] = n << 16 | p; + for (k = m;k < e;k += p) { + d[k] = h << 16 | c; } - ++s; + ++a; } } } - return{codes:b, maxBits:f}; + return{codes:d, maxBits:f}; } var c; - (function(a) { - a[a.INIT = 0] = "INIT"; - a[a.BLOCK_0 = 1] = "BLOCK_0"; - a[a.BLOCK_1 = 2] = "BLOCK_1"; - a[a.BLOCK_2_PRE = 3] = "BLOCK_2_PRE"; - a[a.BLOCK_2 = 4] = "BLOCK_2"; - a[a.DONE = 5] = "DONE"; - a[a.ERROR = 6] = "ERROR"; - a[a.VERIFY_HEADER = 7] = "VERIFY_HEADER"; + (function(b) { + b[b.INIT = 0] = "INIT"; + b[b.BLOCK_0 = 1] = "BLOCK_0"; + b[b.BLOCK_1 = 2] = "BLOCK_1"; + b[b.BLOCK_2_PRE = 3] = "BLOCK_2_PRE"; + b[b.BLOCK_2 = 4] = "BLOCK_2"; + b[b.DONE = 5] = "DONE"; + b[b.ERROR = 6] = "ERROR"; + b[b.VERIFY_HEADER = 7] = "VERIFY_HEADER"; })(c || (c = {})); c = function() { - function a(f) { - this._error = null; + function b(b) { } - Object.defineProperty(a.prototype, "error", {get:function() { - return this._error; - }, enumerable:!0, configurable:!0}); - a.prototype.push = function(a) { - g.Debug.abstractMethod("Inflate.push"); + b.prototype.push = function(b) { }; - a.prototype.close = function() { + b.prototype.close = function() { }; - a.create = function(a) { - return "undefined" !== typeof SpecialInflate ? new t(a) : new w(a); + b.create = function(b) { + return "undefined" !== typeof SpecialInflate ? new v(b) : new t(b); }; - a.prototype._processZLibHeader = function(a, d, q) { - if (d + 2 > q) { + b.prototype._processZLibHeader = function(b, q, e) { + if (q + 2 > e) { return 0; } - a = a[d] << 8 | a[d + 1]; - d = null; - 2048 !== (a & 3840) ? d = "inflate: unknown compression method" : 0 !== a % 31 ? d = "inflate: bad FCHECK" : 0 !== (a & 32) && (d = "inflate: FDICT bit set"); - return d ? (this._error = d, -1) : 2; + b = b[q] << 8 | b[q + 1]; + q = null; + 2048 !== (b & 3840) ? q = "inflate: unknown compression method" : 0 !== b % 31 ? q = "inflate: bad FCHECK" : 0 !== (b & 32) && (q = "inflate: FDICT bit set"); + if (q) { + if (this.onError) { + this.onError(q); + } + return-1; + } + return 2; }; - a.inflate = function(f, d, q) { - var b = new Uint8Array(d), s = 0; - d = a.create(q); - d.onData = function(a) { - b.set(a, s); - s += a.length; + b.inflate = function(f, q, e) { + var d = new Uint8Array(q), a = 0; + q = b.create(e); + q.onData = function(b) { + d.set(b, a); + a += b.length; }; - d.push(f); - d.close(); - return b; + q.push(f); + q.close(); + return d; }; - return a; + return b; }(); - m.Inflate = c; - var w = function(h) { - function f(d) { - h.call(this, d); + l.Inflate = c; + var t = function(b) { + function f(f) { + b.call(this, f); this._buffer = null; this._bitLength = this._bitBuffer = this._bufferPosition = this._bufferSize = 0; this._window = new Uint8Array(65794); this._windowPosition = 0; - this._state = d ? 7 : 0; + this._state = f ? 7 : 0; this._isFinalBlock = !1; this._distanceTable = this._literalTable = null; this._block0Read = 0; this._block2State = null; this._copyState = {state:0, len:0, lenBits:0, dist:0, distBits:0}; - this._error = void 0; - if (!l) { - k = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); - b = new Uint16Array(30); - a = new Uint8Array(30); - for (var f = d = 0, x = 1;30 > d;++d) { - b[d] = x, x += 1 << (a[d] = ~~((f += 2 < d ? 1 : 0) / 2)); + if (!s) { + m = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + a = new Uint16Array(30); + h = new Uint8Array(30); + for (var e = f = 0, d = 1;30 > f;++f) { + a[f] = d, d += 1 << (h[f] = ~~((e += 2 < f ? 1 : 0) / 2)); } - var s = new Uint8Array(288); - for (d = 0;32 > d;++d) { - s[d] = 5; + var c = new Uint8Array(288); + for (f = 0;32 > f;++f) { + c[f] = 5; } - n = e(s.subarray(0, 32)); - p = new Uint16Array(29); - y = new Uint8Array(29); - f = d = 0; - for (x = 3;29 > d;++d) { - p[d] = x - (28 == d ? 1 : 0), x += 1 << (y[d] = ~~((f += 4 < d ? 1 : 0) / 4 % 6)); + p = g(c.subarray(0, 32)); + k = new Uint16Array(29); + u = new Uint8Array(29); + e = f = 0; + for (d = 3;29 > f;++f) { + k[f] = d - (28 == f ? 1 : 0), d += 1 << (u[f] = ~~((e += 4 < f ? 1 : 0) / 4 % 6)); } - for (d = 0;288 > d;++d) { - s[d] = 144 > d || 279 < d ? 8 : 256 > d ? 9 : 7; + for (f = 0;288 > f;++f) { + c[f] = 144 > f || 279 < f ? 8 : 256 > f ? 9 : 7; } - v = e(s); - l = !0; + n = g(c); + s = !0; } } - __extends(f, h); - Object.defineProperty(f.prototype, "error", {get:function() { - return this._error; - }, enumerable:!0, configurable:!0}); - f.prototype.push = function(a) { - if (!this._buffer || this._buffer.length < this._bufferSize + a.length) { - var f = new Uint8Array(this._bufferSize + a.length); + __extends(f, b); + f.prototype.push = function(b) { + if (!this._buffer || this._buffer.length < this._bufferSize + b.length) { + var f = new Uint8Array(this._bufferSize + b.length); this._buffer && f.set(this._buffer); this._buffer = f; } - this._buffer.set(a, this._bufferSize); - this._bufferSize += a.length; + this._buffer.set(b, this._bufferSize); + this._bufferSize += b.length; this._bufferPosition = 0; - a = !1; + b = !1; do { f = this._windowPosition; - if (0 === this._state && (a = this._decodeInitState())) { + if (0 === this._state && (b = this._decodeInitState())) { break; } switch(this._state) { case 1: - a = this._decodeBlock0(); + b = this._decodeBlock0(); break; case 3: - if (a = this._decodeBlock2Pre()) { + if (b = this._decodeBlock2Pre()) { break; } ; case 2: ; case 4: - a = this._decodeBlock(); + b = this._decodeBlock(); break; case 6: ; @@ -2924,1017 +2886,1417 @@ var __extends = this.__extends || function(g, m) { this._bufferPosition = this._bufferSize; break; case 7: - var b = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize); - 0 < b ? (this._bufferPosition += b, this._state = 0) : 0 === b ? a = !0 : this._state = 6; + var e = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize); + 0 < e ? (this._bufferPosition += e, this._state = 0) : 0 === e ? b = !0 : this._state = 6; } if (0 < this._windowPosition - f) { this.onData(this._window.subarray(f, this._windowPosition)); } 65536 <= this._windowPosition && ("copyWithin" in this._buffer ? this._window.copyWithin(0, this._windowPosition - 32768, this._windowPosition) : this._window.set(this._window.subarray(this._windowPosition - 32768, this._windowPosition)), this._windowPosition = 32768); - } while (!a && this._bufferPosition < this._bufferSize); + } while (!b && this._bufferPosition < this._bufferSize); this._bufferPosition < this._bufferSize ? ("copyWithin" in this._buffer ? this._buffer.copyWithin(0, this._bufferPosition, this._bufferSize) : this._buffer.set(this._buffer.subarray(this._bufferPosition, this._bufferSize)), this._bufferSize -= this._bufferPosition) : this._bufferSize = 0; }; f.prototype._decodeInitState = function() { if (this._isFinalBlock) { return this._state = 5, !1; } - var a = this._buffer, f = this._bufferSize, b = this._bitBuffer, h = this._bitLength, c = this._bufferPosition; - if (3 > (f - c << 3) + h) { + var b = this._buffer, f = this._bufferSize, e = this._bitBuffer, d = this._bitLength, a = this._bufferPosition; + if (3 > (f - a << 3) + d) { return!0; } - 3 > h && (b |= a[c++] << h, h += 8); - var p = b & 7, b = b >> 3, h = h - 3; - switch(p >> 1) { + 3 > d && (e |= b[a++] << d, d += 8); + var h = e & 7, e = e >> 3, d = d - 3; + switch(h >> 1) { case 0: - h = b = 0; - if (4 > f - c) { + d = e = 0; + if (4 > f - a) { return!0; } - var r = a[c] | a[c + 1] << 8, a = a[c + 2] | a[c + 3] << 8, c = c + 4; - if (65535 !== (r ^ a)) { - this._error = "inflate: invalid block 0 length"; - a = 6; + var c = b[a] | b[a + 1] << 8, b = b[a + 2] | b[a + 3] << 8, a = a + 4; + if (65535 !== (c ^ b)) { + this._error("inflate: invalid block 0 length"); + b = 6; break; } - 0 === r ? a = 0 : (this._block0Read = r, a = 1); + 0 === c ? b = 0 : (this._block0Read = c, b = 1); break; case 1: - a = 2; - this._literalTable = v; - this._distanceTable = n; + b = 2; + this._literalTable = n; + this._distanceTable = p; break; case 2: - if (26 > (f - c << 3) + h) { + if (26 > (f - a << 3) + d) { return!0; } - for (;14 > h;) { - b |= a[c++] << h, h += 8; + for (;14 > d;) { + e |= b[a++] << d, d += 8; } - r = (b >> 10 & 15) + 4; - if ((f - c << 3) + h < 14 + 3 * r) { + c = (e >> 10 & 15) + 4; + if ((f - a << 3) + d < 14 + 3 * c) { return!0; } - for (var f = {numLiteralCodes:(b & 31) + 257, numDistanceCodes:(b >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, b = b >> 14, h = h - 14, t = new Uint8Array(19), l = 0;l < r;++l) { - 3 > h && (b |= a[c++] << h, h += 8), t[k[l]] = b & 7, b >>= 3, h -= 3; + for (var f = {numLiteralCodes:(e & 31) + 257, numDistanceCodes:(e >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, e = e >> 14, d = d - 14, k = new Uint8Array(19), u = 0;u < c;++u) { + 3 > d && (e |= b[a++] << d, d += 8), k[m[u]] = e & 7, e >>= 3, d -= 3; } - for (;19 > l;l++) { - t[k[l]] = 0; + for (;19 > u;u++) { + k[m[u]] = 0; } f.bitLengths = new Uint8Array(f.numLiteralCodes + f.numDistanceCodes); - f.codeLengthTable = e(t); + f.codeLengthTable = g(k); this._block2State = f; - a = 3; + b = 3; break; default: - return this._error = "inflate: unsupported block type", !1; + return this._error("inflate: unsupported block type"), !1; } - this._isFinalBlock = !!(p & 1); - this._state = a; - this._bufferPosition = c; - this._bitBuffer = b; - this._bitLength = h; + this._isFinalBlock = !!(h & 1); + this._state = b; + this._bufferPosition = a; + this._bitBuffer = e; + this._bitLength = d; return!1; }; + f.prototype._error = function(b) { + if (this.onError) { + this.onError(b); + } + }; f.prototype._decodeBlock0 = function() { - var a = this._bufferPosition, f = this._windowPosition, b = this._block0Read, h = 65794 - f, n = this._bufferSize - a, c = n < b, p = Math.min(h, n, b); - this._window.set(this._buffer.subarray(a, a + p), f); + var b = this._bufferPosition, f = this._windowPosition, e = this._block0Read, d = 65794 - f, a = this._bufferSize - b, h = a < e, p = Math.min(d, a, e); + this._window.set(this._buffer.subarray(b, b + p), f); this._windowPosition = f + p; - this._bufferPosition = a + p; - this._block0Read = b - p; - return b === p ? (this._state = 0, !1) : c && h < n; + this._bufferPosition = b + p; + this._block0Read = e - p; + return e === p ? (this._state = 0, !1) : h && d < a; }; - f.prototype._readBits = function(a) { - var f = this._bitBuffer, b = this._bitLength; - if (a > b) { - var h = this._bufferPosition, n = this._bufferSize; + f.prototype._readBits = function(b) { + var f = this._bitBuffer, e = this._bitLength; + if (b > e) { + var d = this._bufferPosition, a = this._bufferSize; do { - if (h >= n) { - return this._bufferPosition = h, this._bitBuffer = f, this._bitLength = b, -1; + if (d >= a) { + return this._bufferPosition = d, this._bitBuffer = f, this._bitLength = e, -1; } - f |= this._buffer[h++] << b; - b += 8; - } while (a > b); - this._bufferPosition = h; + f |= this._buffer[d++] << e; + e += 8; + } while (b > e); + this._bufferPosition = d; } - this._bitBuffer = f >> a; - this._bitLength = b - a; - return f & (1 << a) - 1; + this._bitBuffer = f >> b; + this._bitLength = e - b; + return f & (1 << b) - 1; }; - f.prototype._readCode = function(a) { - var f = this._bitBuffer, b = this._bitLength, h = a.maxBits; - if (h > b) { - var n = this._bufferPosition, c = this._bufferSize; + f.prototype._readCode = function(b) { + var f = this._bitBuffer, e = this._bitLength, d = b.maxBits; + if (d > e) { + var a = this._bufferPosition, h = this._bufferSize; do { - if (n >= c) { - return this._bufferPosition = n, this._bitBuffer = f, this._bitLength = b, -1; + if (a >= h) { + return this._bufferPosition = a, this._bitBuffer = f, this._bitLength = e, -1; } - f |= this._buffer[n++] << b; - b += 8; - } while (h > b); - this._bufferPosition = n; + f |= this._buffer[a++] << e; + e += 8; + } while (d > e); + this._bufferPosition = a; } - a = a.codes[f & (1 << h) - 1]; - h = a >> 16; - if (a & 32768) { - return this._error = "inflate: invalid encoding", this._state = 6, -1; + b = b.codes[f & (1 << d) - 1]; + d = b >> 16; + if (b & 32768) { + return this._error("inflate: invalid encoding"), this._state = 6, -1; } - this._bitBuffer = f >> h; - this._bitLength = b - h; - return a & 65535; + this._bitBuffer = f >> d; + this._bitLength = e - d; + return b & 65535; }; f.prototype._decodeBlock2Pre = function() { - var a = this._block2State, f = a.numLiteralCodes + a.numDistanceCodes, b = a.bitLengths, h = a.codesRead, n = 0 < h ? b[h - 1] : 0, c = a.codeLengthTable, p; - if (0 < a.dupBits) { - p = this._readBits(a.dupBits); + var b = this._block2State, f = b.numLiteralCodes + b.numDistanceCodes, e = b.bitLengths, d = b.codesRead, a = 0 < d ? e[d - 1] : 0, h = b.codeLengthTable, p; + if (0 < b.dupBits) { + p = this._readBits(b.dupBits); if (0 > p) { return!0; } for (;p--;) { - b[h++] = n; + e[d++] = a; } - a.dupBits = 0; + b.dupBits = 0; } - for (;h < f;) { - var r = this._readCode(c); - if (0 > r) { - return a.codesRead = h, !0; + for (;d < f;) { + var c = this._readCode(h); + if (0 > c) { + return b.codesRead = d, !0; } - if (16 > r) { - b[h++] = n = r; + if (16 > c) { + e[d++] = a = c; } else { - var k; - switch(r) { + var m; + switch(c) { case 16: - k = 2; + m = 2; p = 3; - r = n; + c = a; break; case 17: - p = k = 3; - r = 0; + p = m = 3; + c = 0; break; case 18: - k = 7, p = 11, r = 0; + m = 7, p = 11, c = 0; } for (;p--;) { - b[h++] = r; + e[d++] = c; } - p = this._readBits(k); + p = this._readBits(m); if (0 > p) { - return a.codesRead = h, a.dupBits = k, !0; + return b.codesRead = d, b.dupBits = m, !0; } for (;p--;) { - b[h++] = r; + e[d++] = c; } - n = r; + a = c; } } - this._literalTable = e(b.subarray(0, a.numLiteralCodes)); - this._distanceTable = e(b.subarray(a.numLiteralCodes)); + this._literalTable = g(e.subarray(0, b.numLiteralCodes)); + this._distanceTable = g(e.subarray(b.numLiteralCodes)); this._state = 4; this._block2State = null; return!1; }; f.prototype._decodeBlock = function() { - var d = this._literalTable, f = this._distanceTable, h = this._window, n = this._windowPosition, c = this._copyState, r, k, t, l; - if (0 !== c.state) { - switch(c.state) { + var b = this._literalTable, f = this._distanceTable, e = this._window, d = this._windowPosition, p = this._copyState, c, m, n, s; + if (0 !== p.state) { + switch(p.state) { case 1: - if (0 > (r = this._readBits(c.lenBits))) { + if (0 > (c = this._readBits(p.lenBits))) { return!0; } - c.len += r; - c.state = 2; + p.len += c; + p.state = 2; case 2: - if (0 > (r = this._readCode(f))) { + if (0 > (c = this._readCode(f))) { return!0; } - c.distBits = a[r]; - c.dist = b[r]; - c.state = 3; + p.distBits = h[c]; + p.dist = a[c]; + p.state = 3; case 3: - r = 0; - if (0 < c.distBits && 0 > (r = this._readBits(c.distBits))) { + c = 0; + if (0 < p.distBits && 0 > (c = this._readBits(p.distBits))) { return!0; } - l = c.dist + r; - k = c.len; - for (r = n - l;k--;) { - h[n++] = h[r++]; + s = p.dist + c; + m = p.len; + for (c = d - s;m--;) { + e[d++] = e[c++]; } - c.state = 0; - if (65536 <= n) { - return this._windowPosition = n, !1; + p.state = 0; + if (65536 <= d) { + return this._windowPosition = d, !1; } break; } } do { - r = this._readCode(d); - if (0 > r) { - return this._windowPosition = n, !0; + c = this._readCode(b); + if (0 > c) { + return this._windowPosition = d, !0; } - if (256 > r) { - h[n++] = r; + if (256 > c) { + e[d++] = c; } else { - if (256 < r) { - this._windowPosition = n; - r -= 257; - t = y[r]; - k = p[r]; - r = 0 === t ? 0 : this._readBits(t); - if (0 > r) { - return c.state = 1, c.len = k, c.lenBits = t, !0; + if (256 < c) { + this._windowPosition = d; + c -= 257; + n = u[c]; + m = k[c]; + c = 0 === n ? 0 : this._readBits(n); + if (0 > c) { + return p.state = 1, p.len = m, p.lenBits = n, !0; } - k += r; - r = this._readCode(f); - if (0 > r) { - return c.state = 2, c.len = k, !0; + m += c; + c = this._readCode(f); + if (0 > c) { + return p.state = 2, p.len = m, !0; } - t = a[r]; - l = b[r]; - r = 0 === t ? 0 : this._readBits(t); - if (0 > r) { - return c.state = 3, c.len = k, c.dist = l, c.distBits = t, !0; + n = h[c]; + s = a[c]; + c = 0 === n ? 0 : this._readBits(n); + if (0 > c) { + return p.state = 3, p.len = m, p.dist = s, p.distBits = n, !0; } - l += r; - for (r = n - l;k--;) { - h[n++] = h[r++]; + s += c; + for (c = d - s;m--;) { + e[d++] = e[c++]; } } else { this._state = 0; break; } } - } while (65536 > n); - this._windowPosition = n; + } while (65536 > d); + this._windowPosition = d; return!1; }; return f; - }(c), k, b, a, n, p, y, v, l = !1, t = function(a) { - function f(d) { - a.call(this, d); - this._verifyHeader = d; + }(c), m, a, h, p, k, u, n, s = !1, v = function(b) { + function f(f) { + b.call(this, f); + this._verifyHeader = f; this._specialInflate = new SpecialInflate; - this._specialInflate.onData = function(a) { - this.onData(a); + this._specialInflate.onData = function(b) { + this.onData(b); }.bind(this); } - __extends(f, a); - f.prototype.push = function(a) { + __extends(f, b); + f.prototype.push = function(b) { if (this._verifyHeader) { var f; - this._buffer ? (f = new Uint8Array(this._buffer.length + a.length), f.set(this._buffer), f.set(a, this._buffer.length), this._buffer = null) : f = new Uint8Array(a); - var b = this._processZLibHeader(f, 0, f.length); - if (0 === b) { + this._buffer ? (f = new Uint8Array(this._buffer.length + b.length), f.set(this._buffer), f.set(b, this._buffer.length), this._buffer = null) : f = new Uint8Array(b); + var e = this._processZLibHeader(f, 0, f.length); + if (0 === e) { this._buffer = f; return; } this._verifyHeader = !0; - 0 < b && (a = f.subarray(b)); + 0 < e && (b = f.subarray(e)); } - this._error || this._specialInflate.push(a); + this._specialInflate.push(b); }; f.prototype.close = function() { this._specialInflate && (this._specialInflate.close(), this._specialInflate = null); }; return f; - }(c), r; - (function(a) { - a[a.WRITE = 0] = "WRITE"; - a[a.DONE = 1] = "DONE"; - a[a.ZLIB_HEADER = 2] = "ZLIB_HEADER"; - })(r || (r = {})); - var u = function() { - function a() { + }(c), d; + (function(b) { + b[b.WRITE = 0] = "WRITE"; + b[b.DONE = 1] = "DONE"; + b[b.ZLIB_HEADER = 2] = "ZLIB_HEADER"; + })(d || (d = {})); + var e = function() { + function b() { this.a = 1; this.b = 0; } - a.prototype.update = function(a, d, q) { - for (var b = this.a, h = this.b;d < q;++d) { - b = (b + (a[d] & 255)) % 65521, h = (h + b) % 65521; + b.prototype.update = function(b, e, d) { + for (var a = this.a, h = this.b;e < d;++e) { + a = (a + (b[e] & 255)) % 65521, h = (h + a) % 65521; } - this.a = b; + this.a = a; this.b = h; }; - a.prototype.getChecksum = function() { + b.prototype.getChecksum = function() { return this.b << 16 | this.a; }; - return a; + return b; }(); - m.Adler32 = u; - r = function() { - function a(f) { - this._state = (this._writeZlibHeader = f) ? 2 : 0; - this._adler32 = f ? new u : null; + l.Adler32 = e; + d = function() { + function b(b) { + this._state = (this._writeZlibHeader = b) ? 2 : 0; + this._adler32 = b ? new e : null; } - a.prototype.push = function(a) { + b.prototype.push = function(b) { 2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0); - for (var d = a.length, q = new Uint8Array(d + 5 * Math.ceil(d / 65535)), b = 0, h = 0;65535 < d;) { - q.set(new Uint8Array([0, 255, 255, 0, 0]), b), b += 5, q.set(a.subarray(h, h + 65535), b), h += 65535, b += 65535, d -= 65535; + for (var e = b.length, d = new Uint8Array(e + 5 * Math.ceil(e / 65535)), a = 0, h = 0;65535 < e;) { + d.set(new Uint8Array([0, 255, 255, 0, 0]), a), a += 5, d.set(b.subarray(h, h + 65535), a), h += 65535, a += 65535, e -= 65535; } - q.set(new Uint8Array([0, d & 255, d >> 8 & 255, ~d & 255, ~d >> 8 & 255]), b); - q.set(a.subarray(h, d), b + 5); - this.onData(q); - this._adler32 && this._adler32.update(a, 0, d); + d.set(new Uint8Array([0, e & 255, e >> 8 & 255, ~e & 255, ~e >> 8 & 255]), a); + d.set(b.subarray(h, e), a + 5); + this.onData(d); + this._adler32 && this._adler32.update(b, 0, e); }; - a.prototype.finish = function() { + b.prototype.close = function() { this._state = 1; this.onData(new Uint8Array([1, 0, 0, 255, 255])); if (this._adler32) { - var a = this._adler32.getChecksum(); - this.onData(new Uint8Array([a & 255, a >> 8 & 255, a >> 16 & 255, a >>> 24 & 255])); + var b = this._adler32.getChecksum(); + this.onData(new Uint8Array([b & 255, b >> 8 & 255, b >> 16 & 255, b >>> 24 & 255])); } }; - return a; + return b; }(); - m.Deflate = r; - })(g.ArrayUtilities || (g.ArrayUtilities = {})); + l.Deflate = d; + })(l.ArrayUtilities || (l.ArrayUtilities = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - function e(b, n) { - b !== a(b, 0, n) && throwError("RangeError", Errors.ParamRangeError); +(function(l) { + (function(l) { + function g(b) { + for (var e = new Uint16Array(b), d = 0;d < b;d++) { + e[d] = 1024; + } + return e; + } + function c(b, e, d, a) { + for (var h = 1, p = 0, c = 0;c < d;c++) { + var m = a.decodeBit(b, h + e), h = (h << 1) + m, p = p | m << c + } + return p; + } + function t(b, e) { + var d = []; + d.length = e; + for (var a = 0;a < e;a++) { + d[a] = new k(b); + } + return d; + } + var m = function() { + function b() { + this.pos = this.available = 0; + this.buffer = new Uint8Array(2E3); + } + b.prototype.append = function(b) { + var f = this.pos + this.available, e = f + b.length; + if (e > this.buffer.length) { + for (var d = 2 * this.buffer.length;d < e;) { + d *= 2; + } + e = new Uint8Array(d); + e.set(this.buffer); + this.buffer = e; + } + this.buffer.set(b, f); + this.available += b.length; + }; + b.prototype.compact = function() { + 0 !== this.available && (this.buffer.set(this.buffer.subarray(this.pos, this.pos + this.available), 0), this.pos = 0); + }; + b.prototype.readByte = function() { + if (0 >= this.available) { + throw Error("Unexpected end of file"); + } + this.available--; + return this.buffer[this.pos++]; + }; + return b; + }(), a = function() { + function b(f) { + this.onData = f; + this.processed = 0; + } + b.prototype.writeBytes = function(b) { + this.onData.call(null, b); + this.processed += b.length; + }; + return b; + }(), h = function() { + function b(f) { + this.outStream = f; + this.buf = null; + this.size = this.pos = 0; + this.isFull = !1; + this.totalPos = this.writePos = 0; + } + b.prototype.create = function(b) { + this.buf = new Uint8Array(b); + this.pos = 0; + this.size = b; + this.isFull = !1; + this.totalPos = this.writePos = 0; + }; + b.prototype.putByte = function(b) { + this.totalPos++; + this.buf[this.pos++] = b; + this.pos === this.size && (this.flush(), this.pos = 0, this.isFull = !0); + }; + b.prototype.getByte = function(b) { + return this.buf[b <= this.pos ? this.pos - b : this.size - b + this.pos]; + }; + b.prototype.flush = function() { + this.writePos < this.pos && (this.outStream.writeBytes(this.buf.subarray(this.writePos, this.pos)), this.writePos = this.pos === this.size ? 0 : this.pos); + }; + b.prototype.copyMatch = function(b, f) { + for (var e = this.pos, d = this.size, a = this.buf, h = b <= e ? e - b : d - b + e, p = f;0 < p;) { + for (var c = Math.min(Math.min(p, d - e), d - h), m = 0;m < c;m++) { + var k = a[h++]; + a[e++] = k; + } + e === d && (this.pos = e, this.flush(), e = 0, this.isFull = !0); + h === d && (h = 0); + p -= c; + } + this.pos = e; + this.totalPos += f; + }; + b.prototype.checkDistance = function(b) { + return b <= this.pos || this.isFull; + }; + b.prototype.isEmpty = function() { + return 0 === this.pos && !this.isFull; + }; + return b; + }(), p = function() { + function b(f) { + this.inStream = f; + this.code = this.range = 0; + this.corrupted = !1; + } + b.prototype.init = function() { + 0 !== this.inStream.readByte() && (this.corrupted = !0); + this.range = -1; + for (var b = 0, f = 0;4 > f;f++) { + b = b << 8 | this.inStream.readByte(); + } + b === this.range && (this.corrupted = !0); + this.code = b; + }; + b.prototype.isFinishedOK = function() { + return 0 === this.code; + }; + b.prototype.decodeDirectBits = function(b) { + var f = 0, e = this.range, d = this.code; + do { + var e = e >>> 1 | 0, d = d - e | 0, a = d >> 31, d = d + (e & a) | 0; + d === e && (this.corrupted = !0); + 0 <= e && 16777216 > e && (e <<= 8, d = d << 8 | this.inStream.readByte()); + f = (f << 1) + a + 1 | 0; + } while (--b); + this.range = e; + this.code = d; + return f; + }; + b.prototype.decodeBit = function(b, f) { + var e = this.range, d = this.code, a = b[f], h = (e >>> 11) * a; + d >>> 0 < h ? (a = a + (2048 - a >> 5) | 0, e = h | 0, h = 0) : (a = a - (a >> 5) | 0, d = d - h | 0, e = e - h | 0, h = 1); + b[f] = a & 65535; + 0 <= e && 16777216 > e && (e <<= 8, d = d << 8 | this.inStream.readByte()); + this.range = e; + this.code = d; + return h; + }; + return b; + }(), k = function() { + function b(f) { + this.numBits = f; + this.probs = g(1 << f); + } + b.prototype.decode = function(b) { + for (var f = 1, e = 0;e < this.numBits;e++) { + f = (f << 1) + b.decodeBit(this.probs, f); + } + return f - (1 << this.numBits); + }; + b.prototype.reverseDecode = function(b) { + return c(this.probs, 0, this.numBits, b); + }; + return b; + }(), u = function() { + function b() { + this.choice = g(2); + this.lowCoder = t(3, 16); + this.midCoder = t(3, 16); + this.highCoder = new k(8); + } + b.prototype.decode = function(b, f) { + return 0 === b.decodeBit(this.choice, 0) ? this.lowCoder[f].decode(b) : 0 === b.decodeBit(this.choice, 1) ? 8 + this.midCoder[f].decode(b) : 16 + this.highCoder.decode(b); + }; + return b; + }(), n = function() { + function b(f, e) { + this.rangeDec = new p(f); + this.outWindow = new h(e); + this.markerIsMandatory = !1; + this.dictSizeInProperties = this.dictSize = this.lp = this.pb = this.lc = 0; + this.leftToUnpack = this.unpackSize = void 0; + this.reps = new Int32Array(4); + this.state = 0; + } + b.prototype.decodeProperties = function(b) { + var f = b[0]; + if (225 <= f) { + throw Error("Incorrect LZMA properties"); + } + this.lc = f % 9; + f = f / 9 | 0; + this.pb = f / 5 | 0; + this.lp = f % 5; + for (f = this.dictSizeInProperties = 0;4 > f;f++) { + this.dictSizeInProperties |= b[f + 1] << 8 * f; + } + this.dictSize = this.dictSizeInProperties; + 4096 > this.dictSize && (this.dictSize = 4096); + }; + b.prototype.create = function() { + this.outWindow.create(this.dictSize); + this.init(); + this.rangeDec.init(); + this.reps[0] = 0; + this.reps[1] = 0; + this.reps[2] = 0; + this.state = this.reps[3] = 0; + this.leftToUnpack = this.unpackSize; + }; + b.prototype.decodeLiteral = function(b, f) { + var e = this.outWindow, d = this.rangeDec, a = 0; + e.isEmpty() || (a = e.getByte(1)); + var h = 1, a = 768 * (((e.totalPos & (1 << this.lp) - 1) << this.lc) + (a >> 8 - this.lc)); + if (7 <= b) { + e = e.getByte(f + 1); + do { + var p = e >> 7 & 1, e = e << 1, c = d.decodeBit(this.litProbs, a + ((1 + p << 8) + h)), h = h << 1 | c; + if (p !== c) { + break; + } + } while (256 > h); + } + for (;256 > h;) { + h = h << 1 | d.decodeBit(this.litProbs, a + h); + } + return h - 256 & 255; + }; + b.prototype.decodeDistance = function(b) { + var f = b; + 3 < f && (f = 3); + b = this.rangeDec; + f = this.posSlotDecoder[f].decode(b); + if (4 > f) { + return f; + } + var e = (f >> 1) - 1, d = (2 | f & 1) << e; + 14 > f ? d = d + c(this.posDecoders, d - f, e, b) | 0 : (d = d + (b.decodeDirectBits(e - 4) << 4) | 0, d = d + this.alignDecoder.reverseDecode(b) | 0); + return d; + }; + b.prototype.init = function() { + this.litProbs = g(768 << this.lc + this.lp); + this.posSlotDecoder = t(6, 4); + this.alignDecoder = new k(4); + this.posDecoders = g(115); + this.isMatch = g(192); + this.isRep = g(12); + this.isRepG0 = g(12); + this.isRepG1 = g(12); + this.isRepG2 = g(12); + this.isRep0Long = g(192); + this.lenDecoder = new u; + this.repLenDecoder = new u; + }; + b.prototype.decode = function(b) { + for (var f = this.rangeDec, a = this.outWindow, h = this.pb, p = this.dictSize, c = this.markerIsMandatory, m = this.leftToUnpack, k = this.isMatch, n = this.isRep, u = this.isRepG0, g = this.isRepG1, l = this.isRepG2, r = this.isRep0Long, t = this.lenDecoder, y = this.repLenDecoder, z = this.reps[0], B = this.reps[1], x = this.reps[2], E = this.reps[3], A = this.state;;) { + if (b && 48 > f.inStream.available) { + this.outWindow.flush(); + break; + } + if (0 === m && !c && (this.outWindow.flush(), f.isFinishedOK())) { + return d; + } + var D = a.totalPos & (1 << h) - 1; + if (0 === f.decodeBit(k, (A << 4) + D)) { + if (0 === m) { + return s; + } + a.putByte(this.decodeLiteral(A, z)); + A = 4 > A ? 0 : 10 > A ? A - 3 : A - 6; + m--; + } else { + if (0 !== f.decodeBit(n, A)) { + if (0 === m || a.isEmpty()) { + return s; + } + if (0 === f.decodeBit(u, A)) { + if (0 === f.decodeBit(r, (A << 4) + D)) { + A = 7 > A ? 9 : 11; + a.putByte(a.getByte(z + 1)); + m--; + continue; + } + } else { + var F; + 0 === f.decodeBit(g, A) ? F = B : (0 === f.decodeBit(l, A) ? F = x : (F = E, E = x), x = B); + B = z; + z = F; + } + D = y.decode(f, D); + A = 7 > A ? 8 : 11; + } else { + E = x; + x = B; + B = z; + D = t.decode(f, D); + A = 7 > A ? 7 : 10; + z = this.decodeDistance(D); + if (-1 === z) { + return this.outWindow.flush(), f.isFinishedOK() ? v : s; + } + if (0 === m || z >= p || !a.checkDistance(z)) { + return s; + } + } + D += 2; + F = !1; + void 0 !== m && m < D && (D = m, F = !0); + a.copyMatch(z + 1, D); + m -= D; + if (F) { + return s; + } + } + } + this.state = A; + this.reps[0] = z; + this.reps[1] = B; + this.reps[2] = x; + this.reps[3] = E; + this.leftToUnpack = m; + return e; + }; + return b; + }(), s = 0, v = 1, d = 2, e = 3, b; + (function(b) { + b[b.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER"; + b[b.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER"; + b[b.PROCESS_DATA = 2] = "PROCESS_DATA"; + b[b.CLOSED = 3] = "CLOSED"; + })(b || (b = {})); + b = function() { + function b(f) { + void 0 === f && (f = !1); + this._state = f ? 1 : 0; + this.buffer = null; + } + b.prototype.push = function(b) { + if (2 > this._state) { + var f = this.buffer ? this.buffer.length : 0, d = (1 === this._state ? 17 : 13) + 5; + if (f + b.length < d) { + d = new Uint8Array(f + b.length); + 0 < f && d.set(this.buffer); + d.set(b, f); + this.buffer = d; + return; + } + var h = new Uint8Array(d); + 0 < f && h.set(this.buffer); + h.set(b.subarray(0, d - f), f); + this._inStream = new m; + this._inStream.append(h.subarray(d - 5)); + this._outStream = new a(function(b) { + this.onData.call(null, b); + }.bind(this)); + this._decoder = new n(this._inStream, this._outStream); + if (1 === this._state) { + this._decoder.decodeProperties(h.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((h[4] | h[5] << 8 | h[6] << 16 | h[7] << 24) >>> 0) - 8; + } else { + this._decoder.decodeProperties(h.subarray(0, 5)); + for (var f = 0, p = !1, c = 0;8 > c;c++) { + var k = h[5 + c]; + 255 !== k && (p = !0); + f |= k << 8 * c; + } + this._decoder.markerIsMandatory = !p; + this._decoder.unpackSize = p ? f : void 0; + } + this._decoder.create(); + b = b.subarray(d); + this._state = 2; + } + this._inStream.append(b); + b = this._decoder.decode(!0); + this._inStream.compact(); + b !== e && this._checkError(b); + }; + b.prototype.close = function() { + this._state = 3; + var b = this._decoder.decode(!1); + this._checkError(b); + this._decoder = null; + }; + b.prototype._checkError = function(b) { + var f; + b === s ? f = "LZMA decoding error" : b === e ? f = "Decoding is not complete" : b === v ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (f = "Finished with end marker before than specified size") : f = "Internal LZMA Error"; + if (f && this.onError) { + this.onError(f); + } + }; + return b; + }(); + l.LzmaDecoder = b; + })(l.ArrayUtilities || (l.ArrayUtilities = {})); +})(Shumway || (Shumway = {})); +(function(l) { + (function(r) { + function g(a, d) { + a !== h(a, 0, d) && throwError("RangeError", Errors.ParamRangeError); } function c(a) { return "string" === typeof a ? a : void 0 == a ? null : a + ""; } - var w = g.Debug.notImplemented, k = g.StringUtilities.utf8decode, b = g.StringUtilities.utf8encode, a = g.NumberUtilities.clamp, n = function() { - return function(a, b, n) { + var t = l.Debug.notImplemented, m = l.StringUtilities.utf8decode, a = l.StringUtilities.utf8encode, h = l.NumberUtilities.clamp, p = function() { + return function(a, d, e) { this.buffer = a; - this.length = b; - this.littleEndian = n; + this.length = d; + this.littleEndian = e; }; }(); - m.PlainObjectDataBuffer = n; - for (var p = new Uint32Array(33), y = 1, v = 0;32 >= y;y++) { - p[y] = v = v << 1 | 1; + r.PlainObjectDataBuffer = p; + for (var k = new Uint32Array(33), u = 1, n = 0;32 >= u;u++) { + k[u] = n = n << 1 | 1; } - var l; + var s; (function(a) { a[a.U8 = 1] = "U8"; a[a.I32 = 2] = "I32"; a[a.F32 = 4] = "F32"; - })(l || (l = {})); - y = function() { - function l(a) { - void 0 === a && (a = l.INITIAL_SIZE); - this._buffer || (this._buffer = new ArrayBuffer(a), this._position = this._length = 0, this._resetViews(), this._littleEndian = l._nativeLittleEndian, this._bitLength = this._bitBuffer = 0); + })(s || (s = {})); + u = function() { + function n(d) { + void 0 === d && (d = n.INITIAL_SIZE); + this._buffer || (this._buffer = new ArrayBuffer(d), this._position = this._length = 0, this._resetViews(), this._littleEndian = n._nativeLittleEndian, this._bitLength = this._bitBuffer = 0); } - l.FromArrayBuffer = function(a, b) { - void 0 === b && (b = -1); - var h = Object.create(l.prototype); - h._buffer = a; - h._length = -1 === b ? a.byteLength : b; - h._position = 0; - h._resetViews(); - h._littleEndian = l._nativeLittleEndian; - h._bitBuffer = 0; - h._bitLength = 0; - return h; - }; - l.FromPlainObject = function(a) { - var b = l.FromArrayBuffer(a.buffer, a.length); - b._littleEndian = a.littleEndian; + n.FromArrayBuffer = function(d, e) { + void 0 === e && (e = -1); + var b = Object.create(n.prototype); + b._buffer = d; + b._length = -1 === e ? d.byteLength : e; + b._position = 0; + b._resetViews(); + b._littleEndian = n._nativeLittleEndian; + b._bitBuffer = 0; + b._bitLength = 0; return b; }; - l.prototype.toPlainObject = function() { - return new n(this._buffer, this._length, this._littleEndian); + n.FromPlainObject = function(d) { + var e = n.FromArrayBuffer(d.buffer, d.length); + e._littleEndian = d.littleEndian; + return e; }; - l.prototype._resetViews = function() { + n.prototype.toPlainObject = function() { + return new p(this._buffer, this._length, this._littleEndian); + }; + n.prototype._resetViews = function() { this._u8 = new Uint8Array(this._buffer); this._f32 = this._i32 = null; }; - l.prototype._requestViews = function(a) { - 0 === (this._buffer.byteLength & 3) && (null === this._i32 && a & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && a & 4 && (this._f32 = new Float32Array(this._buffer))); + n.prototype._requestViews = function(d) { + 0 === (this._buffer.byteLength & 3) && (null === this._i32 && d & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && d & 4 && (this._f32 = new Float32Array(this._buffer))); }; - l.prototype.getBytes = function() { + n.prototype.getBytes = function() { return new Uint8Array(this._buffer, 0, this._length); }; - l.prototype._ensureCapacity = function(a) { - var b = this._buffer; - if (b.byteLength < a) { - for (var h = Math.max(b.byteLength, 1);h < a;) { - h *= 2; + n.prototype._ensureCapacity = function(d) { + var e = this._buffer; + if (e.byteLength < d) { + for (var b = Math.max(e.byteLength, 1);b < d;) { + b *= 2; } - a = l._arrayBufferPool.acquire(h); - h = this._u8; - this._buffer = a; + d = n._arrayBufferPool.acquire(b); + b = this._u8; + this._buffer = d; this._resetViews(); - this._u8.set(h); - l._arrayBufferPool.release(b); + this._u8.set(b); + n._arrayBufferPool.release(e); } }; - l.prototype.clear = function() { + n.prototype.clear = function() { this._position = this._length = 0; }; - l.prototype.readBoolean = function() { + n.prototype.readBoolean = function() { return 0 !== this.readUnsignedByte(); }; - l.prototype.readByte = function() { + n.prototype.readByte = function() { return this.readUnsignedByte() << 24 >> 24; }; - l.prototype.readUnsignedByte = function() { + n.prototype.readUnsignedByte = function() { this._position + 1 > this._length && throwError("EOFError", Errors.EOFError); return this._u8[this._position++]; }; - l.prototype.readBytes = function(a, b) { - var h = 0; - void 0 === h && (h = 0); + n.prototype.readBytes = function(d, e) { + var b = 0; void 0 === b && (b = 0); + void 0 === e && (e = 0); var f = this._position; - h || (h = 0); - b || (b = this._length - f); - f + b > this._length && throwError("EOFError", Errors.EOFError); - a.length < h + b && (a._ensureCapacity(h + b), a.length = h + b); - a._u8.set(new Uint8Array(this._buffer, f, b), h); - this._position += b; + b || (b = 0); + e || (e = this._length - f); + f + e > this._length && throwError("EOFError", Errors.EOFError); + d.length < b + e && (d._ensureCapacity(b + e), d.length = b + e); + d._u8.set(new Uint8Array(this._buffer, f, e), b); + this._position += e; }; - l.prototype.readShort = function() { + n.prototype.readShort = function() { return this.readUnsignedShort() << 16 >> 16; }; - l.prototype.readUnsignedShort = function() { - var a = this._u8, b = this._position; - b + 2 > this._length && throwError("EOFError", Errors.EOFError); - var h = a[b + 0], a = a[b + 1]; - this._position = b + 2; - return this._littleEndian ? a << 8 | h : h << 8 | a; + n.prototype.readUnsignedShort = function() { + var d = this._u8, e = this._position; + e + 2 > this._length && throwError("EOFError", Errors.EOFError); + var b = d[e + 0], d = d[e + 1]; + this._position = e + 2; + return this._littleEndian ? d << 8 | b : b << 8 | d; }; - l.prototype.readInt = function() { - var a = this._u8, b = this._position; - b + 4 > this._length && throwError("EOFError", Errors.EOFError); - var h = a[b + 0], f = a[b + 1], d = a[b + 2], a = a[b + 3]; - this._position = b + 4; - return this._littleEndian ? a << 24 | d << 16 | f << 8 | h : h << 24 | f << 16 | d << 8 | a; + n.prototype.readInt = function() { + var d = this._u8, e = this._position; + e + 4 > this._length && throwError("EOFError", Errors.EOFError); + var b = d[e + 0], f = d[e + 1], a = d[e + 2], d = d[e + 3]; + this._position = e + 4; + return this._littleEndian ? d << 24 | a << 16 | f << 8 | b : b << 24 | f << 16 | a << 8 | d; }; - l.prototype.readUnsignedInt = function() { + n.prototype.readUnsignedInt = function() { return this.readInt() >>> 0; }; - l.prototype.readFloat = function() { - var a = this._position; - a + 4 > this._length && throwError("EOFError", Errors.EOFError); - this._position = a + 4; - this._requestViews(4); - if (this._littleEndian && 0 === (a & 3) && this._f32) { - return this._f32[a >> 2]; - } - var b = this._u8, h = g.IntegerUtilities.u8; - this._littleEndian ? (h[0] = b[a + 0], h[1] = b[a + 1], h[2] = b[a + 2], h[3] = b[a + 3]) : (h[3] = b[a + 0], h[2] = b[a + 1], h[1] = b[a + 2], h[0] = b[a + 3]); - return g.IntegerUtilities.f32[0]; - }; - l.prototype.readDouble = function() { - var a = this._u8, b = this._position; - b + 8 > this._length && throwError("EOFError", Errors.EOFError); - var h = g.IntegerUtilities.u8; - this._littleEndian ? (h[0] = a[b + 0], h[1] = a[b + 1], h[2] = a[b + 2], h[3] = a[b + 3], h[4] = a[b + 4], h[5] = a[b + 5], h[6] = a[b + 6], h[7] = a[b + 7]) : (h[0] = a[b + 7], h[1] = a[b + 6], h[2] = a[b + 5], h[3] = a[b + 4], h[4] = a[b + 3], h[5] = a[b + 2], h[6] = a[b + 1], h[7] = a[b + 0]); - this._position = b + 8; - return g.IntegerUtilities.f64[0]; - }; - l.prototype.writeBoolean = function(a) { - this.writeByte(a ? 1 : 0); - }; - l.prototype.writeByte = function(a) { - var b = this._position + 1; - this._ensureCapacity(b); - this._u8[this._position++] = a; - b > this._length && (this._length = b); - }; - l.prototype.writeUnsignedByte = function(a) { - var b = this._position + 1; - this._ensureCapacity(b); - this._u8[this._position++] = a; - b > this._length && (this._length = b); - }; - l.prototype.writeRawBytes = function(a) { - var b = this._position + a.length; - this._ensureCapacity(b); - this._u8.set(a, this._position); - this._position = b; - b > this._length && (this._length = b); - }; - l.prototype.writeBytes = function(a, b, h) { - void 0 === b && (b = 0); - void 0 === h && (h = 0); - g.isNullOrUndefined(a) && throwError("TypeError", Errors.NullPointerError, "bytes"); - 2 > arguments.length && (b = 0); - 3 > arguments.length && (h = 0); - e(b, a.length); - e(b + h, a.length); - 0 === h && (h = a.length - b); - this.writeRawBytes(new Int8Array(a._buffer, b, h)); - }; - l.prototype.writeShort = function(a) { - this.writeUnsignedShort(a); - }; - l.prototype.writeUnsignedShort = function(a) { - var b = this._position; - this._ensureCapacity(b + 2); - var h = this._u8; - this._littleEndian ? (h[b + 0] = a, h[b + 1] = a >> 8) : (h[b + 0] = a >> 8, h[b + 1] = a); - this._position = b += 2; - b > this._length && (this._length = b); - }; - l.prototype.writeInt = function(a) { - this.writeUnsignedInt(a); - }; - l.prototype.write2Ints = function(a, b) { - this.write2UnsignedInts(a, b); - }; - l.prototype.write4Ints = function(a, b, h, f) { - this.write4UnsignedInts(a, b, h, f); - }; - l.prototype.writeUnsignedInt = function(a) { - var b = this._position; - this._ensureCapacity(b + 4); - this._requestViews(2); - if (this._littleEndian === l._nativeLittleEndian && 0 === (b & 3) && this._i32) { - this._i32[b >> 2] = a; - } else { - var h = this._u8; - this._littleEndian ? (h[b + 0] = a, h[b + 1] = a >> 8, h[b + 2] = a >> 16, h[b + 3] = a >> 24) : (h[b + 0] = a >> 24, h[b + 1] = a >> 16, h[b + 2] = a >> 8, h[b + 3] = a); - } - this._position = b += 4; - b > this._length && (this._length = b); - }; - l.prototype.write2UnsignedInts = function(a, b) { - var h = this._position; - this._ensureCapacity(h + 8); - this._requestViews(2); - this._littleEndian === l._nativeLittleEndian && 0 === (h & 3) && this._i32 ? (this._i32[(h >> 2) + 0] = a, this._i32[(h >> 2) + 1] = b, this._position = h += 8, h > this._length && (this._length = h)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(b)); - }; - l.prototype.write4UnsignedInts = function(a, b, h, f) { + n.prototype.readFloat = function() { var d = this._position; - this._ensureCapacity(d + 16); - this._requestViews(2); - this._littleEndian === l._nativeLittleEndian && 0 === (d & 3) && this._i32 ? (this._i32[(d >> 2) + 0] = a, this._i32[(d >> 2) + 1] = b, this._i32[(d >> 2) + 2] = h, this._i32[(d >> 2) + 3] = f, this._position = d += 16, d > this._length && (this._length = d)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(b), this.writeUnsignedInt(h), this.writeUnsignedInt(f)); - }; - l.prototype.writeFloat = function(a) { - var b = this._position; - this._ensureCapacity(b + 4); + d + 4 > this._length && throwError("EOFError", Errors.EOFError); + this._position = d + 4; this._requestViews(4); - if (this._littleEndian === l._nativeLittleEndian && 0 === (b & 3) && this._f32) { - this._f32[b >> 2] = a; - } else { - var h = this._u8; - g.IntegerUtilities.f32[0] = a; - a = g.IntegerUtilities.u8; - this._littleEndian ? (h[b + 0] = a[0], h[b + 1] = a[1], h[b + 2] = a[2], h[b + 3] = a[3]) : (h[b + 0] = a[3], h[b + 1] = a[2], h[b + 2] = a[1], h[b + 3] = a[0]); + if (this._littleEndian && 0 === (d & 3) && this._f32) { + return this._f32[d >> 2]; } - this._position = b += 4; - b > this._length && (this._length = b); + var e = this._u8, b = l.IntegerUtilities.u8; + this._littleEndian ? (b[0] = e[d + 0], b[1] = e[d + 1], b[2] = e[d + 2], b[3] = e[d + 3]) : (b[3] = e[d + 0], b[2] = e[d + 1], b[1] = e[d + 2], b[0] = e[d + 3]); + return l.IntegerUtilities.f32[0]; }; - l.prototype.write6Floats = function(a, b, h, f, d, q) { - var n = this._position; - this._ensureCapacity(n + 24); - this._requestViews(4); - this._littleEndian === l._nativeLittleEndian && 0 === (n & 3) && this._f32 ? (this._f32[(n >> 2) + 0] = a, this._f32[(n >> 2) + 1] = b, this._f32[(n >> 2) + 2] = h, this._f32[(n >> 2) + 3] = f, this._f32[(n >> 2) + 4] = d, this._f32[(n >> 2) + 5] = q, this._position = n += 24, n > this._length && (this._length = n)) : (this.writeFloat(a), this.writeFloat(b), this.writeFloat(h), this.writeFloat(f), this.writeFloat(d), this.writeFloat(q)); + n.prototype.readDouble = function() { + var d = this._u8, e = this._position; + e + 8 > this._length && throwError("EOFError", Errors.EOFError); + var b = l.IntegerUtilities.u8; + this._littleEndian ? (b[0] = d[e + 0], b[1] = d[e + 1], b[2] = d[e + 2], b[3] = d[e + 3], b[4] = d[e + 4], b[5] = d[e + 5], b[6] = d[e + 6], b[7] = d[e + 7]) : (b[0] = d[e + 7], b[1] = d[e + 6], b[2] = d[e + 5], b[3] = d[e + 4], b[4] = d[e + 3], b[5] = d[e + 2], b[6] = d[e + 1], b[7] = d[e + 0]); + this._position = e + 8; + return l.IntegerUtilities.f64[0]; }; - l.prototype.writeDouble = function(a) { + n.prototype.writeBoolean = function(d) { + this.writeByte(d ? 1 : 0); + }; + n.prototype.writeByte = function(d) { + var e = this._position + 1; + this._ensureCapacity(e); + this._u8[this._position++] = d; + e > this._length && (this._length = e); + }; + n.prototype.writeUnsignedByte = function(d) { + var e = this._position + 1; + this._ensureCapacity(e); + this._u8[this._position++] = d; + e > this._length && (this._length = e); + }; + n.prototype.writeRawBytes = function(d) { + var e = this._position + d.length; + this._ensureCapacity(e); + this._u8.set(d, this._position); + this._position = e; + e > this._length && (this._length = e); + }; + n.prototype.writeBytes = function(d, e, b) { + void 0 === e && (e = 0); + void 0 === b && (b = 0); + l.isNullOrUndefined(d) && throwError("TypeError", Errors.NullPointerError, "bytes"); + 2 > arguments.length && (e = 0); + 3 > arguments.length && (b = 0); + g(e, d.length); + g(e + b, d.length); + 0 === b && (b = d.length - e); + this.writeRawBytes(new Int8Array(d._buffer, e, b)); + }; + n.prototype.writeShort = function(d) { + this.writeUnsignedShort(d); + }; + n.prototype.writeUnsignedShort = function(d) { + var e = this._position; + this._ensureCapacity(e + 2); + var b = this._u8; + this._littleEndian ? (b[e + 0] = d, b[e + 1] = d >> 8) : (b[e + 0] = d >> 8, b[e + 1] = d); + this._position = e += 2; + e > this._length && (this._length = e); + }; + n.prototype.writeInt = function(d) { + this.writeUnsignedInt(d); + }; + n.prototype.write2Ints = function(d, e) { + this.write2UnsignedInts(d, e); + }; + n.prototype.write4Ints = function(d, e, b, f) { + this.write4UnsignedInts(d, e, b, f); + }; + n.prototype.writeUnsignedInt = function(d) { + var e = this._position; + this._ensureCapacity(e + 4); + this._requestViews(2); + if (this._littleEndian === n._nativeLittleEndian && 0 === (e & 3) && this._i32) { + this._i32[e >> 2] = d; + } else { + var b = this._u8; + this._littleEndian ? (b[e + 0] = d, b[e + 1] = d >> 8, b[e + 2] = d >> 16, b[e + 3] = d >> 24) : (b[e + 0] = d >> 24, b[e + 1] = d >> 16, b[e + 2] = d >> 8, b[e + 3] = d); + } + this._position = e += 4; + e > this._length && (this._length = e); + }; + n.prototype.write2UnsignedInts = function(d, e) { var b = this._position; this._ensureCapacity(b + 8); - var h = this._u8; - g.IntegerUtilities.f64[0] = a; - a = g.IntegerUtilities.u8; - this._littleEndian ? (h[b + 0] = a[0], h[b + 1] = a[1], h[b + 2] = a[2], h[b + 3] = a[3], h[b + 4] = a[4], h[b + 5] = a[5], h[b + 6] = a[6], h[b + 7] = a[7]) : (h[b + 0] = a[7], h[b + 1] = a[6], h[b + 2] = a[5], h[b + 3] = a[4], h[b + 4] = a[3], h[b + 5] = a[2], h[b + 6] = a[1], h[b + 7] = a[0]); - this._position = b += 8; - b > this._length && (this._length = b); + this._requestViews(2); + this._littleEndian === n._nativeLittleEndian && 0 === (b & 3) && this._i32 ? (this._i32[(b >> 2) + 0] = d, this._i32[(b >> 2) + 1] = e, this._position = b += 8, b > this._length && (this._length = b)) : (this.writeUnsignedInt(d), this.writeUnsignedInt(e)); }; - l.prototype.readRawBytes = function() { + n.prototype.write4UnsignedInts = function(d, e, b, f) { + var a = this._position; + this._ensureCapacity(a + 16); + this._requestViews(2); + this._littleEndian === n._nativeLittleEndian && 0 === (a & 3) && this._i32 ? (this._i32[(a >> 2) + 0] = d, this._i32[(a >> 2) + 1] = e, this._i32[(a >> 2) + 2] = b, this._i32[(a >> 2) + 3] = f, this._position = a += 16, a > this._length && (this._length = a)) : (this.writeUnsignedInt(d), this.writeUnsignedInt(e), this.writeUnsignedInt(b), this.writeUnsignedInt(f)); + }; + n.prototype.writeFloat = function(d) { + var e = this._position; + this._ensureCapacity(e + 4); + this._requestViews(4); + if (this._littleEndian === n._nativeLittleEndian && 0 === (e & 3) && this._f32) { + this._f32[e >> 2] = d; + } else { + var b = this._u8; + l.IntegerUtilities.f32[0] = d; + d = l.IntegerUtilities.u8; + this._littleEndian ? (b[e + 0] = d[0], b[e + 1] = d[1], b[e + 2] = d[2], b[e + 3] = d[3]) : (b[e + 0] = d[3], b[e + 1] = d[2], b[e + 2] = d[1], b[e + 3] = d[0]); + } + this._position = e += 4; + e > this._length && (this._length = e); + }; + n.prototype.write6Floats = function(d, e, b, f, a, h) { + var p = this._position; + this._ensureCapacity(p + 24); + this._requestViews(4); + this._littleEndian === n._nativeLittleEndian && 0 === (p & 3) && this._f32 ? (this._f32[(p >> 2) + 0] = d, this._f32[(p >> 2) + 1] = e, this._f32[(p >> 2) + 2] = b, this._f32[(p >> 2) + 3] = f, this._f32[(p >> 2) + 4] = a, this._f32[(p >> 2) + 5] = h, this._position = p += 24, p > this._length && (this._length = p)) : (this.writeFloat(d), this.writeFloat(e), this.writeFloat(b), this.writeFloat(f), this.writeFloat(a), this.writeFloat(h)); + }; + n.prototype.writeDouble = function(d) { + var e = this._position; + this._ensureCapacity(e + 8); + var b = this._u8; + l.IntegerUtilities.f64[0] = d; + d = l.IntegerUtilities.u8; + this._littleEndian ? (b[e + 0] = d[0], b[e + 1] = d[1], b[e + 2] = d[2], b[e + 3] = d[3], b[e + 4] = d[4], b[e + 5] = d[5], b[e + 6] = d[6], b[e + 7] = d[7]) : (b[e + 0] = d[7], b[e + 1] = d[6], b[e + 2] = d[5], b[e + 3] = d[4], b[e + 4] = d[3], b[e + 5] = d[2], b[e + 6] = d[1], b[e + 7] = d[0]); + this._position = e += 8; + e > this._length && (this._length = e); + }; + n.prototype.readRawBytes = function() { return new Int8Array(this._buffer, 0, this._length); }; - l.prototype.writeUTF = function(a) { - a = c(a); - a = k(a); - this.writeShort(a.length); - this.writeRawBytes(a); + n.prototype.writeUTF = function(d) { + d = c(d); + d = m(d); + this.writeShort(d.length); + this.writeRawBytes(d); }; - l.prototype.writeUTFBytes = function(a) { - a = c(a); - a = k(a); - this.writeRawBytes(a); + n.prototype.writeUTFBytes = function(d) { + d = c(d); + d = m(d); + this.writeRawBytes(d); }; - l.prototype.readUTF = function() { + n.prototype.readUTF = function() { return this.readUTFBytes(this.readShort()); }; - l.prototype.readUTFBytes = function(a) { - a >>>= 0; - var n = this._position; - n + a > this._length && throwError("EOFError", Errors.EOFError); - this._position += a; - return b(new Int8Array(this._buffer, n, a)); + n.prototype.readUTFBytes = function(d) { + d >>>= 0; + var e = this._position; + e + d > this._length && throwError("EOFError", Errors.EOFError); + this._position += d; + return a(new Int8Array(this._buffer, e, d)); }; - Object.defineProperty(l.prototype, "length", {get:function() { + Object.defineProperty(n.prototype, "length", {get:function() { return this._length; - }, set:function(b) { - b >>>= 0; - b > this._buffer.byteLength && this._ensureCapacity(b); - this._length = b; - this._position = a(this._position, 0, this._length); + }, set:function(d) { + d >>>= 0; + d > this._buffer.byteLength && this._ensureCapacity(d); + this._length = d; + this._position = h(this._position, 0, this._length); }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "bytesAvailable", {get:function() { + Object.defineProperty(n.prototype, "bytesAvailable", {get:function() { return this._length - this._position; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "position", {get:function() { + Object.defineProperty(n.prototype, "position", {get:function() { return this._position; - }, set:function(a) { - this._position = a >>> 0; + }, set:function(d) { + this._position = d >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "buffer", {get:function() { + Object.defineProperty(n.prototype, "buffer", {get:function() { return this._buffer; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "bytes", {get:function() { + Object.defineProperty(n.prototype, "bytes", {get:function() { return this._u8; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "ints", {get:function() { + Object.defineProperty(n.prototype, "ints", {get:function() { this._requestViews(2); return this._i32; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "objectEncoding", {get:function() { + Object.defineProperty(n.prototype, "objectEncoding", {get:function() { return this._objectEncoding; - }, set:function(a) { - this._objectEncoding = a >>> 0; + }, set:function(d) { + this._objectEncoding = d >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(l.prototype, "endian", {get:function() { + Object.defineProperty(n.prototype, "endian", {get:function() { return this._littleEndian ? "littleEndian" : "bigEndian"; - }, set:function(a) { - a = c(a); - this._littleEndian = "auto" === a ? l._nativeLittleEndian : "littleEndian" === a; + }, set:function(d) { + d = c(d); + this._littleEndian = "auto" === d ? n._nativeLittleEndian : "littleEndian" === d; }, enumerable:!0, configurable:!0}); - l.prototype.toString = function() { - return b(new Int8Array(this._buffer, 0, this._length)); + n.prototype.toString = function() { + return a(new Int8Array(this._buffer, 0, this._length)); }; - l.prototype.toBlob = function(a) { - return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:a}); + n.prototype.toBlob = function(d) { + return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:d}); }; - l.prototype.writeMultiByte = function(a, b) { - w("packageInternal flash.utils.ObjectOutput::writeMultiByte"); + n.prototype.writeMultiByte = function(d, e) { + t("packageInternal flash.utils.ObjectOutput::writeMultiByte"); }; - l.prototype.readMultiByte = function(a, b) { - w("packageInternal flash.utils.ObjectInput::readMultiByte"); + n.prototype.readMultiByte = function(d, e) { + t("packageInternal flash.utils.ObjectInput::readMultiByte"); }; - l.prototype.getValue = function(a) { - a |= 0; - return a >= this._length ? void 0 : this._u8[a]; + n.prototype.getValue = function(d) { + d |= 0; + return d >= this._length ? void 0 : this._u8[d]; }; - l.prototype.setValue = function(a, b) { - a |= 0; - var h = a + 1; - this._ensureCapacity(h); - this._u8[a] = b; - h > this._length && (this._length = h); + n.prototype.setValue = function(d, e) { + d |= 0; + var b = d + 1; + this._ensureCapacity(b); + this._u8[d] = e; + b > this._length && (this._length = b); }; - l.prototype.readFixed = function() { + n.prototype.readFixed = function() { return this.readInt() / 65536; }; - l.prototype.readFixed8 = function() { + n.prototype.readFixed8 = function() { return this.readShort() / 256; }; - l.prototype.readFloat16 = function() { - var a = this.readUnsignedShort(), b = a >> 15 ? -1 : 1, h = (a & 31744) >> 10, a = a & 1023; - return h ? 31 === h ? a ? NaN : Infinity * b : b * Math.pow(2, h - 15) * (1 + a / 1024) : a / 1024 * Math.pow(2, -14) * b; + n.prototype.readFloat16 = function() { + var d = this.readUnsignedShort(), e = d >> 15 ? -1 : 1, b = (d & 31744) >> 10, d = d & 1023; + return b ? 31 === b ? d ? NaN : Infinity * e : e * Math.pow(2, b - 15) * (1 + d / 1024) : d / 1024 * Math.pow(2, -14) * e; }; - l.prototype.readEncodedU32 = function() { - var a = this.readUnsignedByte(); - if (!(a & 128)) { - return a; + n.prototype.readEncodedU32 = function() { + var d = this.readUnsignedByte(); + if (!(d & 128)) { + return d; } - a = a & 127 | this.readUnsignedByte() << 7; - if (!(a & 16384)) { - return a; + d = d & 127 | this.readUnsignedByte() << 7; + if (!(d & 16384)) { + return d; } - a = a & 16383 | this.readUnsignedByte() << 14; - if (!(a & 2097152)) { - return a; + d = d & 16383 | this.readUnsignedByte() << 14; + if (!(d & 2097152)) { + return d; } - a = a & 2097151 | this.readUnsignedByte() << 21; - return a & 268435456 ? a & 268435455 | this.readUnsignedByte() << 28 : a; + d = d & 2097151 | this.readUnsignedByte() << 21; + return d & 268435456 ? d & 268435455 | this.readUnsignedByte() << 28 : d; }; - l.prototype.readBits = function(a) { - return this.readUnsignedBits(a) << 32 - a >> 32 - a; + n.prototype.readBits = function(d) { + return this.readUnsignedBits(d) << 32 - d >> 32 - d; }; - l.prototype.readUnsignedBits = function(a) { - for (var b = this._bitBuffer, h = this._bitLength;a > h;) { - b = b << 8 | this.readUnsignedByte(), h += 8; + n.prototype.readUnsignedBits = function(d) { + for (var e = this._bitBuffer, b = this._bitLength;d > b;) { + e = e << 8 | this.readUnsignedByte(), b += 8; } - h -= a; - a = b >>> h & p[a]; - this._bitBuffer = b; - this._bitLength = h; - return a; + b -= d; + d = e >>> b & k[d]; + this._bitBuffer = e; + this._bitLength = b; + return d; }; - l.prototype.readFixedBits = function(a) { - return this.readBits(a) / 65536; + n.prototype.readFixedBits = function(d) { + return this.readBits(d) / 65536; }; - l.prototype.readString = function(a) { - var n = this._position; - if (a) { - n + a > this._length && throwError("EOFError", Errors.EOFError), this._position += a; + n.prototype.readString = function(d) { + var e = this._position; + if (d) { + e + d > this._length && throwError("EOFError", Errors.EOFError), this._position += d; } else { - a = 0; - for (var h = n;h < this._length && this._u8[h];h++) { - a++; + d = 0; + for (var b = e;b < this._length && this._u8[b];b++) { + d++; } - this._position += a + 1; + this._position += d + 1; } - return b(new Int8Array(this._buffer, n, a)); + return a(new Int8Array(this._buffer, e, d)); }; - l.prototype.align = function() { + n.prototype.align = function() { this._bitLength = this._bitBuffer = 0; }; - l.prototype._compress = function(a) { - a = c(a); - switch(a) { + n.prototype._compress = function(d) { + d = c(d); + switch(d) { case "zlib": - a = new m.Deflate(!0); + d = new r.Deflate(!0); break; case "deflate": - a = new m.Deflate(!1); + d = new r.Deflate(!1); break; default: return; } - var b = new l; - a.onData = b.writeRawBytes.bind(b); - a.push(this._u8.subarray(0, this._length)); - a.finish(); - this._ensureCapacity(b._u8.length); - this._u8.set(b._u8); - this.length = b.length; + var e = new n; + d.onData = e.writeRawBytes.bind(e); + d.push(this._u8.subarray(0, this._length)); + d.close(); + this._ensureCapacity(e._u8.length); + this._u8.set(e._u8); + this.length = e.length; this._position = 0; }; - l.prototype._uncompress = function(a) { - a = c(a); - switch(a) { + n.prototype._uncompress = function(d) { + d = c(d); + switch(d) { case "zlib": - a = m.Inflate.create(!0); + d = r.Inflate.create(!0); break; case "deflate": - a = m.Inflate.create(!1); + d = r.Inflate.create(!1); + break; + case "lzma": + d = new r.LzmaDecoder(!1); break; default: return; } - var b = new l; - a.onData = b.writeRawBytes.bind(b); - a.push(this._u8.subarray(0, this._length)); - a.error && throwError("IOError", Errors.CompressedDataError); - a.close(); - this._ensureCapacity(b._u8.length); - this._u8.set(b._u8); - this.length = b.length; + var e = new n, b; + d.onData = e.writeRawBytes.bind(e); + d.onError = function(f) { + return b = f; + }; + d.push(this._u8.subarray(0, this._length)); + b && throwError("IOError", Errors.CompressedDataError); + d.close(); + this._ensureCapacity(e._u8.length); + this._u8.set(e._u8); + this.length = e.length; this._position = 0; }; - l._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; - l.INITIAL_SIZE = 128; - l._arrayBufferPool = new g.ArrayBufferPool; - return l; + n._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; + n.INITIAL_SIZE = 128; + n._arrayBufferPool = new l.ArrayBufferPool; + return n; }(); - m.DataBuffer = y; - })(g.ArrayUtilities || (g.ArrayUtilities = {})); + r.DataBuffer = u; + })(l.ArrayUtilities || (l.ArrayUtilities = {})); })(Shumway || (Shumway = {})); -(function(g) { - var m = g.ArrayUtilities.DataBuffer, e = g.ArrayUtilities.ensureTypedArrayCapacity, c = g.Debug.assert; - (function(b) { - b[b.BeginSolidFill = 1] = "BeginSolidFill"; - b[b.BeginGradientFill = 2] = "BeginGradientFill"; - b[b.BeginBitmapFill = 3] = "BeginBitmapFill"; - b[b.EndFill = 4] = "EndFill"; - b[b.LineStyleSolid = 5] = "LineStyleSolid"; - b[b.LineStyleGradient = 6] = "LineStyleGradient"; - b[b.LineStyleBitmap = 7] = "LineStyleBitmap"; - b[b.LineEnd = 8] = "LineEnd"; - b[b.MoveTo = 9] = "MoveTo"; - b[b.LineTo = 10] = "LineTo"; - b[b.CurveTo = 11] = "CurveTo"; - b[b.CubicCurveTo = 12] = "CubicCurveTo"; - })(g.PathCommand || (g.PathCommand = {})); - (function(b) { - b[b.Linear = 16] = "Linear"; - b[b.Radial = 18] = "Radial"; - })(g.GradientType || (g.GradientType = {})); - (function(b) { - b[b.Pad = 0] = "Pad"; - b[b.Reflect = 1] = "Reflect"; - b[b.Repeat = 2] = "Repeat"; - })(g.GradientSpreadMethod || (g.GradientSpreadMethod = {})); - (function(b) { - b[b.RGB = 0] = "RGB"; - b[b.LinearRGB = 1] = "LinearRGB"; - })(g.GradientInterpolationMethod || (g.GradientInterpolationMethod = {})); - (function(b) { - b[b.None = 0] = "None"; - b[b.Normal = 1] = "Normal"; - b[b.Vertical = 2] = "Vertical"; - b[b.Horizontal = 3] = "Horizontal"; - })(g.LineScaleMode || (g.LineScaleMode = {})); - var w = function() { - return function(b, a, n, c, k, e, l, g, r, m, h) { - this.commands = b; +(function(l) { + var r = l.ArrayUtilities.DataBuffer, g = l.ArrayUtilities.ensureTypedArrayCapacity; + (function(c) { + c[c.BeginSolidFill = 1] = "BeginSolidFill"; + c[c.BeginGradientFill = 2] = "BeginGradientFill"; + c[c.BeginBitmapFill = 3] = "BeginBitmapFill"; + c[c.EndFill = 4] = "EndFill"; + c[c.LineStyleSolid = 5] = "LineStyleSolid"; + c[c.LineStyleGradient = 6] = "LineStyleGradient"; + c[c.LineStyleBitmap = 7] = "LineStyleBitmap"; + c[c.LineEnd = 8] = "LineEnd"; + c[c.MoveTo = 9] = "MoveTo"; + c[c.LineTo = 10] = "LineTo"; + c[c.CurveTo = 11] = "CurveTo"; + c[c.CubicCurveTo = 12] = "CubicCurveTo"; + })(l.PathCommand || (l.PathCommand = {})); + (function(c) { + c[c.Linear = 16] = "Linear"; + c[c.Radial = 18] = "Radial"; + })(l.GradientType || (l.GradientType = {})); + (function(c) { + c[c.Pad = 0] = "Pad"; + c[c.Reflect = 1] = "Reflect"; + c[c.Repeat = 2] = "Repeat"; + })(l.GradientSpreadMethod || (l.GradientSpreadMethod = {})); + (function(c) { + c[c.RGB = 0] = "RGB"; + c[c.LinearRGB = 1] = "LinearRGB"; + })(l.GradientInterpolationMethod || (l.GradientInterpolationMethod = {})); + (function(c) { + c[c.None = 0] = "None"; + c[c.Normal = 1] = "Normal"; + c[c.Vertical = 2] = "Vertical"; + c[c.Horizontal = 3] = "Horizontal"; + })(l.LineScaleMode || (l.LineScaleMode = {})); + var c = function() { + return function(c, a, h, p, k, u, n, s, g, d, e) { + this.commands = c; this.commandsPosition = a; - this.coordinates = n; - this.morphCoordinates = c; + this.coordinates = h; + this.morphCoordinates = p; this.coordinatesPosition = k; - this.styles = e; - this.stylesLength = l; - this.morphStyles = g; - this.morphStylesLength = r; - this.hasFills = m; - this.hasLines = h; + this.styles = u; + this.stylesLength = n; + this.morphStyles = s; + this.morphStylesLength = g; + this.hasFills = d; + this.hasLines = e; }; }(); - g.PlainObjectShapeData = w; - var k; - (function(b) { - b[b.Commands = 32] = "Commands"; - b[b.Coordinates = 128] = "Coordinates"; - b[b.Styles = 16] = "Styles"; - })(k || (k = {})); - k = function() { - function b(a) { + l.PlainObjectShapeData = c; + var t; + (function(c) { + c[c.Commands = 32] = "Commands"; + c[c.Coordinates = 128] = "Coordinates"; + c[c.Styles = 16] = "Styles"; + })(t || (t = {})); + t = function() { + function m(a) { void 0 === a && (a = !0); a && this.clear(); } - b.FromPlainObject = function(a) { - var n = new b(!1); - n.commands = a.commands; - n.coordinates = a.coordinates; - n.morphCoordinates = a.morphCoordinates; - n.commandsPosition = a.commandsPosition; - n.coordinatesPosition = a.coordinatesPosition; - n.styles = m.FromArrayBuffer(a.styles, a.stylesLength); - n.styles.endian = "auto"; - a.morphStyles && (n.morphStyles = m.FromArrayBuffer(a.morphStyles, a.morphStylesLength), n.morphStyles.endian = "auto"); - n.hasFills = a.hasFills; - n.hasLines = a.hasLines; - return n; + m.FromPlainObject = function(a) { + var h = new m(!1); + h.commands = a.commands; + h.coordinates = a.coordinates; + h.morphCoordinates = a.morphCoordinates; + h.commandsPosition = a.commandsPosition; + h.coordinatesPosition = a.coordinatesPosition; + h.styles = r.FromArrayBuffer(a.styles, a.stylesLength); + h.styles.endian = "auto"; + a.morphStyles && (h.morphStyles = r.FromArrayBuffer(a.morphStyles, a.morphStylesLength), h.morphStyles.endian = "auto"); + h.hasFills = a.hasFills; + h.hasLines = a.hasLines; + return h; }; - b.prototype.moveTo = function(a, b) { + m.prototype.moveTo = function(a, h) { this.ensurePathCapacities(1, 2); this.commands[this.commandsPosition++] = 9; this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; }; - b.prototype.lineTo = function(a, b) { + m.prototype.lineTo = function(a, h) { this.ensurePathCapacities(1, 2); this.commands[this.commandsPosition++] = 10; this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; }; - b.prototype.curveTo = function(a, b, c, k) { + m.prototype.curveTo = function(a, h, c, k) { this.ensurePathCapacities(1, 4); this.commands[this.commandsPosition++] = 11; this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; this.coordinates[this.coordinatesPosition++] = c; this.coordinates[this.coordinatesPosition++] = k; }; - b.prototype.cubicCurveTo = function(a, b, c, k, e, l) { + m.prototype.cubicCurveTo = function(a, h, c, k, m, n) { this.ensurePathCapacities(1, 6); this.commands[this.commandsPosition++] = 12; this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; this.coordinates[this.coordinatesPosition++] = c; this.coordinates[this.coordinatesPosition++] = k; - this.coordinates[this.coordinatesPosition++] = e; - this.coordinates[this.coordinatesPosition++] = l; + this.coordinates[this.coordinatesPosition++] = m; + this.coordinates[this.coordinatesPosition++] = n; }; - b.prototype.beginFill = function(a) { + m.prototype.beginFill = function(a) { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 1; this.styles.writeUnsignedInt(a); this.hasFills = !0; }; - b.prototype.writeMorphFill = function(a) { + m.prototype.writeMorphFill = function(a) { this.morphStyles.writeUnsignedInt(a); }; - b.prototype.endFill = function() { + m.prototype.endFill = function() { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 4; }; - b.prototype.endLine = function() { + m.prototype.endLine = function() { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 8; }; - b.prototype.lineStyle = function(a, b, p, k, e, l, g) { - c(a === (a | 0), 0 <= a && 5100 >= a); + m.prototype.lineStyle = function(a, h, c, k, m, n, s) { this.ensurePathCapacities(2, 0); this.commands[this.commandsPosition++] = 5; this.coordinates[this.coordinatesPosition++] = a; a = this.styles; - a.writeUnsignedInt(b); - a.writeBoolean(p); + a.writeUnsignedInt(h); + a.writeBoolean(c); a.writeUnsignedByte(k); - a.writeUnsignedByte(e); - a.writeUnsignedByte(l); - a.writeUnsignedByte(g); + a.writeUnsignedByte(m); + a.writeUnsignedByte(n); + a.writeUnsignedByte(s); this.hasLines = !0; }; - b.prototype.writeMorphLineStyle = function(a, b) { + m.prototype.writeMorphLineStyle = function(a, h) { this.morphCoordinates[this.coordinatesPosition - 1] = a; - this.morphStyles.writeUnsignedInt(b); + this.morphStyles.writeUnsignedInt(h); }; - b.prototype.beginBitmap = function(a, b, p, k, e) { - c(3 === a || 7 === a); + m.prototype.beginBitmap = function(a, h, c, k, m) { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = a; a = this.styles; - a.writeUnsignedInt(b); - this._writeStyleMatrix(p, !1); + a.writeUnsignedInt(h); + this._writeStyleMatrix(c, !1); a.writeBoolean(k); - a.writeBoolean(e); + a.writeBoolean(m); this.hasFills = !0; }; - b.prototype.writeMorphBitmap = function(a) { + m.prototype.writeMorphBitmap = function(a) { this._writeStyleMatrix(a, !0); }; - b.prototype.beginGradient = function(a, b, p, k, e, l, g, r) { - c(2 === a || 6 === a); + m.prototype.beginGradient = function(a, h, c, k, m, n, s, g) { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = a; a = this.styles; a.writeUnsignedByte(k); - c(r === (r | 0)); - a.writeShort(r); - this._writeStyleMatrix(e, !1); - k = b.length; + a.writeShort(g); + this._writeStyleMatrix(m, !1); + k = h.length; a.writeByte(k); - for (e = 0;e < k;e++) { - a.writeUnsignedByte(p[e]), a.writeUnsignedInt(b[e]); + for (m = 0;m < k;m++) { + a.writeUnsignedByte(c[m]), a.writeUnsignedInt(h[m]); } - a.writeUnsignedByte(l); - a.writeUnsignedByte(g); + a.writeUnsignedByte(n); + a.writeUnsignedByte(s); this.hasFills = !0; }; - b.prototype.writeMorphGradient = function(a, b, c) { + m.prototype.writeMorphGradient = function(a, h, c) { this._writeStyleMatrix(c, !0); c = this.morphStyles; for (var k = 0;k < a.length;k++) { - c.writeUnsignedByte(b[k]), c.writeUnsignedInt(a[k]); + c.writeUnsignedByte(h[k]), c.writeUnsignedInt(a[k]); } }; - b.prototype.writeCommandAndCoordinates = function(a, b, c) { + m.prototype.writeCommandAndCoordinates = function(a, h, c) { this.ensurePathCapacities(1, 2); this.commands[this.commandsPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; this.coordinates[this.coordinatesPosition++] = c; }; - b.prototype.writeCoordinates = function(a, b) { + m.prototype.writeCoordinates = function(a, h) { this.ensurePathCapacities(0, 2); this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = b; + this.coordinates[this.coordinatesPosition++] = h; }; - b.prototype.writeMorphCoordinates = function(a, b) { - this.morphCoordinates = e(this.morphCoordinates, this.coordinatesPosition); + m.prototype.writeMorphCoordinates = function(a, h) { + this.morphCoordinates = g(this.morphCoordinates, this.coordinatesPosition); this.morphCoordinates[this.coordinatesPosition - 2] = a; - this.morphCoordinates[this.coordinatesPosition - 1] = b; + this.morphCoordinates[this.coordinatesPosition - 1] = h; }; - b.prototype.clear = function() { + m.prototype.clear = function() { this.commandsPosition = this.coordinatesPosition = 0; this.commands = new Uint8Array(32); this.coordinates = new Int32Array(128); - this.styles = new m(16); + this.styles = new r(16); this.styles.endian = "auto"; this.hasFills = this.hasLines = !1; }; - b.prototype.isEmpty = function() { + m.prototype.isEmpty = function() { return 0 === this.commandsPosition; }; - b.prototype.clone = function() { - var a = new b(!1); + m.prototype.clone = function() { + var a = new m(!1); a.commands = new Uint8Array(this.commands); a.commandsPosition = this.commandsPosition; a.coordinates = new Int32Array(this.coordinates); a.coordinatesPosition = this.coordinatesPosition; - a.styles = new m(this.styles.length); + a.styles = new r(this.styles.length); a.styles.writeRawBytes(this.styles.bytes); - this.morphStyles && (a.morphStyles = new m(this.morphStyles.length), a.morphStyles.writeRawBytes(this.morphStyles.bytes)); + this.morphStyles && (a.morphStyles = new r(this.morphStyles.length), a.morphStyles.writeRawBytes(this.morphStyles.bytes)); a.hasFills = this.hasFills; a.hasLines = this.hasLines; return a; }; - b.prototype.toPlainObject = function() { - return new w(this.commands, this.commandsPosition, this.coordinates, this.morphCoordinates, this.coordinatesPosition, this.styles.buffer, this.styles.length, this.morphStyles && this.morphStyles.buffer, this.morphStyles ? this.morphStyles.length : 0, this.hasFills, this.hasLines); + m.prototype.toPlainObject = function() { + return new c(this.commands, this.commandsPosition, this.coordinates, this.morphCoordinates, this.coordinatesPosition, this.styles.buffer, this.styles.length, this.morphStyles && this.morphStyles.buffer, this.morphStyles ? this.morphStyles.length : 0, this.hasFills, this.hasLines); }; - Object.defineProperty(b.prototype, "buffers", {get:function() { + Object.defineProperty(m.prototype, "buffers", {get:function() { var a = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer]; this.morphCoordinates && a.push(this.morphCoordinates.buffer); this.morphStyles && a.push(this.morphStyles.buffer); return a; }, enumerable:!0, configurable:!0}); - b.prototype._writeStyleMatrix = function(a, b) { - (b ? this.morphStyles : this.styles).write6Floats(a.a, a.b, a.c, a.d, a.tx, a.ty); + m.prototype._writeStyleMatrix = function(a, h) { + (h ? this.morphStyles : this.styles).write6Floats(a.a, a.b, a.c, a.d, a.tx, a.ty); }; - b.prototype.ensurePathCapacities = function(a, b) { - this.commands = e(this.commands, this.commandsPosition + a); - this.coordinates = e(this.coordinates, this.coordinatesPosition + b); + m.prototype.ensurePathCapacities = function(a, h) { + this.commands = g(this.commands, this.commandsPosition + a); + this.coordinates = g(this.coordinates, this.coordinatesPosition + h); }; - return b; + return m; }(); - g.ShapeData = k; + l.ShapeData = t; })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { (function(c) { c[c.CODE_END = 0] = "CODE_END"; c[c.CODE_SHOW_FRAME = 1] = "CODE_SHOW_FRAME"; @@ -4020,7 +4382,7 @@ var __extends = this.__extends || function(g, m) { c[c.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2"; c[c.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4"; c[c.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4"; - })(e.SwfTag || (e.SwfTag = {})); + })(g.SwfTag || (g.SwfTag = {})); (function(c) { c[c.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE"; c[c.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS"; @@ -4047,19 +4409,19 @@ var __extends = this.__extends || function(g, m) { c[c.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA"; c[c.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4"; c[c.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4"; - })(e.DefinitionTags || (e.DefinitionTags = {})); + })(g.DefinitionTags || (g.DefinitionTags = {})); (function(c) { c[c.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS"; c[c.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2"; c[c.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3"; c[c.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4"; - })(e.ImageDefinitionTags || (e.ImageDefinitionTags = {})); + })(g.ImageDefinitionTags || (g.ImageDefinitionTags = {})); (function(c) { c[c.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT"; c[c.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2"; c[c.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3"; c[c.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4"; - })(e.FontDefinitionTags || (e.FontDefinitionTags = {})); + })(g.FontDefinitionTags || (g.FontDefinitionTags = {})); (function(c) { c[c.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT"; c[c.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2"; @@ -4069,7 +4431,7 @@ var __extends = this.__extends || function(g, m) { c[c.CODE_START_SOUND = 15] = "CODE_START_SOUND"; c[c.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2"; c[c.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME"; - })(e.ControlTags || (e.ControlTags = {})); + })(g.ControlTags || (g.ControlTags = {})); (function(c) { c[c.Move = 1] = "Move"; c[c.HasCharacter = 2] = "HasCharacter"; @@ -4087,7 +4449,7 @@ var __extends = this.__extends || function(g, m) { c[c.HasVisible = 8192] = "HasVisible"; c[c.OpaqueBackground = 16384] = "OpaqueBackground"; c[c.Reserved = 32768] = "Reserved"; - })(e.PlaceObjectFlags || (e.PlaceObjectFlags = {})); + })(g.PlaceObjectFlags || (g.PlaceObjectFlags = {})); (function(c) { c[c.Load = 1] = "Load"; c[c.EnterFrame = 2] = "EnterFrame"; @@ -4108,375 +4470,379 @@ var __extends = this.__extends || function(g, m) { c[c.DragOut = 65536] = "DragOut"; c[c.KeyPress = 131072] = "KeyPress"; c[c.Construct = 262144] = "Construct"; - })(e.AVM1ClipEvents || (e.AVM1ClipEvents = {})); - })(g.Parser || (g.Parser = {})); - })(g.SWF || (g.SWF = {})); + })(g.AVM1ClipEvents || (g.AVM1ClipEvents = {})); + })(l.Parser || (l.Parser = {})); + })(l.SWF || (l.SWF = {})); })(Shumway || (Shumway = {})); -(function(g) { - var m = g.Debug.unexpected, e = function() { - function c(c, k, b, a) { +(function(l) { + var r = l.Debug.unexpected, g = function() { + function c(c, m, a, h) { this.url = c; - this.method = k; - this.mimeType = b; - this.data = a; + this.method = m; + this.mimeType = a; + this.data = h; } - c.prototype.readAll = function(c, k) { - var b = this.url, a = new XMLHttpRequest({mozSystem:!0}); - a.open(this.method || "GET", this.url, !0); - a.responseType = "arraybuffer"; - c && (a.onprogress = function(b) { - c(a.response, b.loaded, b.total); + c.prototype.readAll = function(c, m) { + var a = this.url, h = new XMLHttpRequest({mozSystem:!0}); + h.open(this.method || "GET", this.url, !0); + h.responseType = "arraybuffer"; + c && (h.onprogress = function(a) { + c(h.response, a.loaded, a.total); }); - a.onreadystatechange = function(n) { - 4 === a.readyState && (200 !== a.status && 0 !== a.status || null === a.response ? (m("Path: " + b + " not found."), k(null, a.statusText)) : k(a.response)); + h.onreadystatechange = function(c) { + 4 === h.readyState && (200 !== h.status && 0 !== h.status || null === h.response ? (r("Path: " + a + " not found."), m(null, h.statusText)) : m(h.response)); }; - this.mimeType && a.setRequestHeader("Content-Type", this.mimeType); - a.send(this.data || null); + this.mimeType && h.setRequestHeader("Content-Type", this.mimeType); + h.send(this.data || null); }; - c.prototype.readChunked = function(c, k, b, a, n, p) { + c.prototype.readChunked = function(c, m, a, h, p, k) { if (0 >= c) { - this.readAsync(k, b, a, n, p); + this.readAsync(m, a, h, p, k); } else { - var e = 0, v = new Uint8Array(c), l = 0, g; - this.readAsync(function(a, b) { - g = b.total; - for (var h = a.length, f = 0;e + h >= c;) { - var d = c - e; - v.set(a.subarray(f, f + d), e); - f += d; - h -= d; - l += c; - k(v, {loaded:l, total:g}); - e = 0; + var u = 0, n = new Uint8Array(c), s = 0, g; + this.readAsync(function(d, e) { + g = e.total; + for (var b = d.length, f = 0;u + b >= c;) { + var a = c - u; + n.set(d.subarray(f, f + a), u); + f += a; + b -= a; + s += c; + m(n, {loaded:s, total:g}); + u = 0; } - v.set(a.subarray(f), e); - e += h; - }, b, a, function() { - 0 < e && (l += e, k(v.subarray(0, e), {loaded:l, total:g}), e = 0); - n && n(); - }, p); + n.set(d.subarray(f), u); + u += b; + }, a, h, function() { + 0 < u && (s += u, m(n.subarray(0, u), {loaded:s, total:g}), u = 0); + p && p(); + }, k); } }; - c.prototype.readAsync = function(c, k, b, a, n) { - var p = new XMLHttpRequest({mozSystem:!0}), e = this.url, g = 0, l = 0; - p.open(this.method || "GET", e, !0); - p.responseType = "moz-chunked-arraybuffer"; - var t = "moz-chunked-arraybuffer" !== p.responseType; - t && (p.responseType = "arraybuffer"); - p.onprogress = function(a) { - t || (g = a.loaded, l = a.total, c(new Uint8Array(p.response), {loaded:g, total:l})); + c.prototype.readAsync = function(c, m, a, h, p) { + var k = new XMLHttpRequest({mozSystem:!0}), u = this.url, n = 0, s = 0; + k.open(this.method || "GET", u, !0); + k.responseType = "moz-chunked-arraybuffer"; + var g = "moz-chunked-arraybuffer" !== k.responseType; + g && (k.responseType = "arraybuffer"); + k.onprogress = function(d) { + g || (n = d.loaded, s = d.total, c(new Uint8Array(k.response), {loaded:n, total:s})); }; - p.onreadystatechange = function(b) { - 2 === p.readyState && n && n(e, p.status, p.getAllResponseHeaders()); - 4 === p.readyState && (200 !== p.status && 0 !== p.status || null === p.response && (0 === l || g !== l) ? k(p.statusText) : (t && (b = p.response, c(new Uint8Array(b), {loaded:0, total:b.byteLength})), a && a())); + k.onreadystatechange = function(d) { + 2 === k.readyState && p && p(u, k.status, k.getAllResponseHeaders()); + 4 === k.readyState && (200 !== k.status && 0 !== k.status || null === k.response && (0 === s || n !== s) ? m(k.statusText) : (g && (d = k.response, c(new Uint8Array(d), {loaded:0, total:d.byteLength})), h && h())); }; - this.mimeType && p.setRequestHeader("Content-Type", this.mimeType); - p.send(this.data || null); - b && b(); + this.mimeType && k.setRequestHeader("Content-Type", this.mimeType); + k.send(this.data || null); + a && a(); }; return c; }(); - g.BinaryFileReader = e; + l.BinaryFileReader = g; })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { - e[e.Objects = 0] = "Objects"; - e[e.References = 1] = "References"; - })(g.RemotingPhase || (g.RemotingPhase = {})); - (function(e) { - e[e.HasMatrix = 1] = "HasMatrix"; - e[e.HasBounds = 2] = "HasBounds"; - e[e.HasChildren = 4] = "HasChildren"; - e[e.HasColorTransform = 8] = "HasColorTransform"; - e[e.HasClipRect = 16] = "HasClipRect"; - e[e.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties"; - e[e.HasMask = 64] = "HasMask"; - e[e.HasClip = 128] = "HasClip"; - })(g.MessageBits || (g.MessageBits = {})); - (function(e) { - e[e.None = 0] = "None"; - e[e.Asset = 134217728] = "Asset"; - })(g.IDMask || (g.IDMask = {})); - (function(e) { - e[e.EOF = 0] = "EOF"; - e[e.UpdateFrame = 100] = "UpdateFrame"; - e[e.UpdateGraphics = 101] = "UpdateGraphics"; - e[e.UpdateBitmapData = 102] = "UpdateBitmapData"; - e[e.UpdateTextContent = 103] = "UpdateTextContent"; - e[e.UpdateStage = 104] = "UpdateStage"; - e[e.UpdateNetStream = 105] = "UpdateNetStream"; - e[e.RequestBitmapData = 106] = "RequestBitmapData"; - e[e.DrawToBitmap = 200] = "DrawToBitmap"; - e[e.MouseEvent = 300] = "MouseEvent"; - e[e.KeyboardEvent = 301] = "KeyboardEvent"; - e[e.FocusEvent = 302] = "FocusEvent"; - })(g.MessageTag || (g.MessageTag = {})); - (function(e) { - e[e.Blur = 0] = "Blur"; - e[e.DropShadow = 1] = "DropShadow"; - })(g.FilterType || (g.FilterType = {})); - (function(e) { - e[e.Identity = 0] = "Identity"; - e[e.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly"; - e[e.All = 2] = "All"; - })(g.ColorTransformEncoding || (g.ColorTransformEncoding = {})); - (function(e) { - e[e.Initialized = 0] = "Initialized"; - e[e.PlayStart = 1] = "PlayStart"; - e[e.PlayStop = 2] = "PlayStop"; - e[e.BufferFull = 3] = "BufferFull"; - e[e.Progress = 4] = "Progress"; - e[e.BufferEmpty = 5] = "BufferEmpty"; - e[e.Error = 6] = "Error"; - e[e.Metadata = 7] = "Metadata"; - e[e.Seeking = 8] = "Seeking"; - })(g.VideoPlaybackEvent || (g.VideoPlaybackEvent = {})); - (function(e) { - e[e.Init = 1] = "Init"; - e[e.Pause = 2] = "Pause"; - e[e.Seek = 3] = "Seek"; - e[e.GetTime = 4] = "GetTime"; - e[e.GetBufferLength = 5] = "GetBufferLength"; - e[e.SetSoundLevels = 6] = "SetSoundLevels"; - e[e.GetBytesLoaded = 7] = "GetBytesLoaded"; - e[e.GetBytesTotal = 8] = "GetBytesTotal"; - })(g.VideoControlEvent || (g.VideoControlEvent = {})); - (function(e) { - e[e.ShowAll = 0] = "ShowAll"; - e[e.ExactFit = 1] = "ExactFit"; - e[e.NoBorder = 2] = "NoBorder"; - e[e.NoScale = 4] = "NoScale"; - })(g.StageScaleMode || (g.StageScaleMode = {})); - (function(e) { - e[e.None = 0] = "None"; - e[e.Top = 1] = "Top"; - e[e.Bottom = 2] = "Bottom"; - e[e.Left = 4] = "Left"; - e[e.Right = 8] = "Right"; - e[e.TopLeft = e.Top | e.Left] = "TopLeft"; - e[e.BottomLeft = e.Bottom | e.Left] = "BottomLeft"; - e[e.BottomRight = e.Bottom | e.Right] = "BottomRight"; - e[e.TopRight = e.Top | e.Right] = "TopRight"; - })(g.StageAlignFlags || (g.StageAlignFlags = {})); - g.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" "); - g.KeyboardEventNames = ["keydown", "keypress", "keyup"]; - (function(e) { - e[e.CtrlKey = 1] = "CtrlKey"; - e[e.AltKey = 2] = "AltKey"; - e[e.ShiftKey = 4] = "ShiftKey"; - })(g.KeyboardEventFlags || (g.KeyboardEventFlags = {})); - (function(e) { - e[e.DocumentHidden = 0] = "DocumentHidden"; - e[e.DocumentVisible = 1] = "DocumentVisible"; - e[e.WindowBlur = 2] = "WindowBlur"; - e[e.WindowFocus = 3] = "WindowFocus"; - })(g.FocusEventType || (g.FocusEventType = {})); - })(g.Remoting || (g.Remoting = {})); +(function(l) { + (function(l) { + (function(g) { + g[g.Objects = 0] = "Objects"; + g[g.References = 1] = "References"; + })(l.RemotingPhase || (l.RemotingPhase = {})); + (function(g) { + g[g.HasMatrix = 1] = "HasMatrix"; + g[g.HasBounds = 2] = "HasBounds"; + g[g.HasChildren = 4] = "HasChildren"; + g[g.HasColorTransform = 8] = "HasColorTransform"; + g[g.HasClipRect = 16] = "HasClipRect"; + g[g.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties"; + g[g.HasMask = 64] = "HasMask"; + g[g.HasClip = 128] = "HasClip"; + })(l.MessageBits || (l.MessageBits = {})); + (function(g) { + g[g.None = 0] = "None"; + g[g.Asset = 134217728] = "Asset"; + })(l.IDMask || (l.IDMask = {})); + (function(g) { + g[g.EOF = 0] = "EOF"; + g[g.UpdateFrame = 100] = "UpdateFrame"; + g[g.UpdateGraphics = 101] = "UpdateGraphics"; + g[g.UpdateBitmapData = 102] = "UpdateBitmapData"; + g[g.UpdateTextContent = 103] = "UpdateTextContent"; + g[g.UpdateStage = 104] = "UpdateStage"; + g[g.UpdateNetStream = 105] = "UpdateNetStream"; + g[g.RequestBitmapData = 106] = "RequestBitmapData"; + g[g.DrawToBitmap = 200] = "DrawToBitmap"; + g[g.MouseEvent = 300] = "MouseEvent"; + g[g.KeyboardEvent = 301] = "KeyboardEvent"; + g[g.FocusEvent = 302] = "FocusEvent"; + })(l.MessageTag || (l.MessageTag = {})); + (function(g) { + g[g.Blur = 0] = "Blur"; + g[g.DropShadow = 1] = "DropShadow"; + })(l.FilterType || (l.FilterType = {})); + (function(g) { + g[g.Identity = 0] = "Identity"; + g[g.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly"; + g[g.All = 2] = "All"; + })(l.ColorTransformEncoding || (l.ColorTransformEncoding = {})); + (function(g) { + g[g.Initialized = 0] = "Initialized"; + g[g.Metadata = 1] = "Metadata"; + g[g.PlayStart = 2] = "PlayStart"; + g[g.PlayStop = 3] = "PlayStop"; + g[g.BufferEmpty = 4] = "BufferEmpty"; + g[g.BufferFull = 5] = "BufferFull"; + g[g.Pause = 6] = "Pause"; + g[g.Unpause = 7] = "Unpause"; + g[g.Seeking = 8] = "Seeking"; + g[g.Seeked = 9] = "Seeked"; + g[g.Progress = 10] = "Progress"; + g[g.Error = 11] = "Error"; + })(l.VideoPlaybackEvent || (l.VideoPlaybackEvent = {})); + (function(g) { + g[g.Init = 1] = "Init"; + g[g.Pause = 2] = "Pause"; + g[g.Seek = 3] = "Seek"; + g[g.GetTime = 4] = "GetTime"; + g[g.GetBufferLength = 5] = "GetBufferLength"; + g[g.SetSoundLevels = 6] = "SetSoundLevels"; + g[g.GetBytesLoaded = 7] = "GetBytesLoaded"; + g[g.GetBytesTotal = 8] = "GetBytesTotal"; + g[g.EnsurePlaying = 9] = "EnsurePlaying"; + })(l.VideoControlEvent || (l.VideoControlEvent = {})); + (function(g) { + g[g.ShowAll = 0] = "ShowAll"; + g[g.ExactFit = 1] = "ExactFit"; + g[g.NoBorder = 2] = "NoBorder"; + g[g.NoScale = 4] = "NoScale"; + })(l.StageScaleMode || (l.StageScaleMode = {})); + (function(g) { + g[g.None = 0] = "None"; + g[g.Top = 1] = "Top"; + g[g.Bottom = 2] = "Bottom"; + g[g.Left = 4] = "Left"; + g[g.Right = 8] = "Right"; + g[g.TopLeft = g.Top | g.Left] = "TopLeft"; + g[g.BottomLeft = g.Bottom | g.Left] = "BottomLeft"; + g[g.BottomRight = g.Bottom | g.Right] = "BottomRight"; + g[g.TopRight = g.Top | g.Right] = "TopRight"; + })(l.StageAlignFlags || (l.StageAlignFlags = {})); + l.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" "); + l.KeyboardEventNames = ["keydown", "keypress", "keyup"]; + (function(g) { + g[g.CtrlKey = 1] = "CtrlKey"; + g[g.AltKey = 2] = "AltKey"; + g[g.ShiftKey = 4] = "ShiftKey"; + })(l.KeyboardEventFlags || (l.KeyboardEventFlags = {})); + (function(g) { + g[g.DocumentHidden = 0] = "DocumentHidden"; + g[g.DocumentVisible = 1] = "DocumentVisible"; + g[g.WindowBlur = 2] = "WindowBlur"; + g[g.WindowFocus = 3] = "WindowFocus"; + })(l.FocusEventType || (l.FocusEventType = {})); + })(l.Remoting || (l.Remoting = {})); })(Shumway || (Shumway = {})); var throwError, Errors; -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { var c = function() { function c() { } - c.toRGBA = function(b, a, n, c) { - void 0 === c && (c = 1); - return "rgba(" + b + "," + a + "," + n + "," + c + ")"; + c.toRGBA = function(a, h, c, k) { + void 0 === k && (k = 1); + return "rgba(" + a + "," + h + "," + c + "," + k + ")"; }; return c; }(); - e.UI = c; - var g = function() { - function k() { + g.UI = c; + var l = function() { + function m() { } - k.prototype.tabToolbar = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(37, 44, 51, b); + m.prototype.tabToolbar = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(37, 44, 51, a); }; - k.prototype.toolbars = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(52, 60, 69, b); + m.prototype.toolbars = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(52, 60, 69, a); }; - k.prototype.selectionBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(29, 79, 115, b); + m.prototype.selectionBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(29, 79, 115, a); }; - k.prototype.selectionText = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(245, 247, 250, b); + m.prototype.selectionText = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(245, 247, 250, a); }; - k.prototype.splitters = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(0, 0, 0, b); + m.prototype.splitters = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(0, 0, 0, a); }; - k.prototype.bodyBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(17, 19, 21, b); + m.prototype.bodyBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(17, 19, 21, a); }; - k.prototype.sidebarBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(24, 29, 32, b); + m.prototype.sidebarBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(24, 29, 32, a); }; - k.prototype.attentionBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(161, 134, 80, b); + m.prototype.attentionBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(161, 134, 80, a); }; - k.prototype.bodyText = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(143, 161, 178, b); + m.prototype.bodyText = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(143, 161, 178, a); }; - k.prototype.foregroundTextGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(182, 186, 191, b); + m.prototype.foregroundTextGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(182, 186, 191, a); }; - k.prototype.contentTextHighContrast = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(169, 186, 203, b); + m.prototype.contentTextHighContrast = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(169, 186, 203, a); }; - k.prototype.contentTextGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(143, 161, 178, b); + m.prototype.contentTextGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(143, 161, 178, a); }; - k.prototype.contentTextDarkGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(95, 115, 135, b); + m.prototype.contentTextDarkGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(95, 115, 135, a); }; - k.prototype.blueHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(70, 175, 227, b); + m.prototype.blueHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(70, 175, 227, a); }; - k.prototype.purpleHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(107, 122, 187, b); + m.prototype.purpleHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(107, 122, 187, a); }; - k.prototype.pinkHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(223, 128, 255, b); + m.prototype.pinkHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(223, 128, 255, a); }; - k.prototype.redHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(235, 83, 104, b); + m.prototype.redHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(235, 83, 104, a); }; - k.prototype.orangeHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(217, 102, 41, b); + m.prototype.orangeHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(217, 102, 41, a); }; - k.prototype.lightOrangeHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(217, 155, 40, b); + m.prototype.lightOrangeHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(217, 155, 40, a); }; - k.prototype.greenHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(112, 191, 83, b); + m.prototype.greenHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(112, 191, 83, a); }; - k.prototype.blueGreyHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(94, 136, 176, b); + m.prototype.blueGreyHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(94, 136, 176, a); }; - return k; + return m; }(); - e.UIThemeDark = g; - g = function() { - function k() { + g.UIThemeDark = l; + l = function() { + function m() { } - k.prototype.tabToolbar = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(235, 236, 237, b); + m.prototype.tabToolbar = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(235, 236, 237, a); }; - k.prototype.toolbars = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(240, 241, 242, b); + m.prototype.toolbars = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(240, 241, 242, a); }; - k.prototype.selectionBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(76, 158, 217, b); + m.prototype.selectionBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(76, 158, 217, a); }; - k.prototype.selectionText = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(245, 247, 250, b); + m.prototype.selectionText = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(245, 247, 250, a); }; - k.prototype.splitters = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(170, 170, 170, b); + m.prototype.splitters = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(170, 170, 170, a); }; - k.prototype.bodyBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(252, 252, 252, b); + m.prototype.bodyBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(252, 252, 252, a); }; - k.prototype.sidebarBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(247, 247, 247, b); + m.prototype.sidebarBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(247, 247, 247, a); }; - k.prototype.attentionBackground = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(161, 134, 80, b); + m.prototype.attentionBackground = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(161, 134, 80, a); }; - k.prototype.bodyText = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(24, 25, 26, b); + m.prototype.bodyText = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(24, 25, 26, a); }; - k.prototype.foregroundTextGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(88, 89, 89, b); + m.prototype.foregroundTextGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(88, 89, 89, a); }; - k.prototype.contentTextHighContrast = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(41, 46, 51, b); + m.prototype.contentTextHighContrast = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(41, 46, 51, a); }; - k.prototype.contentTextGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(143, 161, 178, b); + m.prototype.contentTextGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(143, 161, 178, a); }; - k.prototype.contentTextDarkGrey = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(102, 115, 128, b); + m.prototype.contentTextDarkGrey = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(102, 115, 128, a); }; - k.prototype.blueHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(0, 136, 204, b); + m.prototype.blueHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(0, 136, 204, a); }; - k.prototype.purpleHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(91, 95, 255, b); + m.prototype.purpleHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(91, 95, 255, a); }; - k.prototype.pinkHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(184, 46, 229, b); + m.prototype.pinkHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(184, 46, 229, a); }; - k.prototype.redHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(237, 38, 85, b); + m.prototype.redHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(237, 38, 85, a); }; - k.prototype.orangeHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(241, 60, 0, b); + m.prototype.orangeHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(241, 60, 0, a); }; - k.prototype.lightOrangeHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(217, 126, 0, b); + m.prototype.lightOrangeHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(217, 126, 0, a); }; - k.prototype.greenHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(44, 187, 15, b); + m.prototype.greenHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(44, 187, 15, a); }; - k.prototype.blueGreyHighlight = function(b) { - void 0 === b && (b = 1); - return c.toRGBA(95, 136, 176, b); + m.prototype.blueGreyHighlight = function(a) { + void 0 === a && (a = 1); + return c.toRGBA(95, 136, 176, a); }; - return k; + return m; }(); - e.UIThemeLight = g; - })(g.Theme || (g.Theme = {})); - })(g.Tools || (g.Tools = {})); + g.UIThemeLight = l; + })(l.Theme || (l.Theme = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { var c = function() { - function c(k) { - this._buffers = k || []; + function c(m) { + this._buffers = m || []; this._snapshots = []; this._maxDepth = 0; } @@ -4514,223 +4880,223 @@ var throwError, Errors; return this._maxDepth; }, enumerable:!0, configurable:!0}); c.prototype.forEachSnapshot = function(c) { - for (var b = 0, a = this.snapshotCount;b < a;b++) { - c(this._snapshots[b], b); + for (var a = 0, h = this.snapshotCount;a < h;a++) { + c(this._snapshots[a], a); } }; c.prototype.createSnapshots = function() { - var c = Number.MAX_VALUE, b = Number.MIN_VALUE, a = 0; + var c = Number.MAX_VALUE, a = Number.MIN_VALUE, h = 0; for (this._snapshots = [];0 < this._buffers.length;) { - var n = this._buffers.shift().createSnapshot(); - n && (c > n.startTime && (c = n.startTime), b < n.endTime && (b = n.endTime), a < n.maxDepth && (a = n.maxDepth), this._snapshots.push(n)); + var p = this._buffers.shift().createSnapshot(); + p && (c > p.startTime && (c = p.startTime), a < p.endTime && (a = p.endTime), h < p.maxDepth && (h = p.maxDepth), this._snapshots.push(p)); } this._startTime = c; - this._endTime = b; + this._endTime = a; this._windowStart = c; - this._windowEnd = b; - this._maxDepth = a; + this._windowEnd = a; + this._maxDepth = h; }; - c.prototype.setWindow = function(c, b) { - if (c > b) { - var a = c; - c = b; - b = a; + c.prototype.setWindow = function(c, a) { + if (c > a) { + var h = c; + c = a; + a = h; } - a = Math.min(b - c, this.totalTime); - c < this._startTime ? (c = this._startTime, b = this._startTime + a) : b > this._endTime && (c = this._endTime - a, b = this._endTime); + h = Math.min(a - c, this.totalTime); + c < this._startTime ? (c = this._startTime, a = this._startTime + h) : a > this._endTime && (c = this._endTime - h, a = this._endTime); this._windowStart = c; - this._windowEnd = b; + this._windowEnd = a; }; c.prototype.moveWindowTo = function(c) { this.setWindow(c - this.windowLength / 2, c + this.windowLength / 2); }; return c; }(); - e.Profile = c; - })(g.Profiler || (g.Profiler = {})); - })(g.Tools || (g.Tools = {})); + g.Profile = c; + })(l.Profiler || (l.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(g, m) { - function e() { - this.constructor = g; +__extends = this.__extends || function(l, r) { + function g() { + this.constructor = l; } - for (var c in m) { - m.hasOwnProperty(c) && (g[c] = m[c]); + for (var c in r) { + r.hasOwnProperty(c) && (l[c] = r[c]); } - e.prototype = m.prototype; - g.prototype = new e; + g.prototype = r.prototype; + l.prototype = new g; }; -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { var c = function() { return function(c) { this.kind = c; this.totalTime = this.selfTime = this.count = 0; }; }(); - e.TimelineFrameStatistics = c; - var g = function() { - function k(b, a, c, p, k, e) { - this.parent = b; - this.kind = a; + g.TimelineFrameStatistics = c; + var l = function() { + function m(a, h, c, k, m, n) { + this.parent = a; + this.kind = h; this.startData = c; - this.endData = p; - this.startTime = k; - this.endTime = e; + this.endData = k; + this.startTime = m; + this.endTime = n; this.maxDepth = 0; } - Object.defineProperty(k.prototype, "totalTime", {get:function() { + Object.defineProperty(m.prototype, "totalTime", {get:function() { return this.endTime - this.startTime; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "selfTime", {get:function() { - var b = this.totalTime; + Object.defineProperty(m.prototype, "selfTime", {get:function() { + var a = this.totalTime; if (this.children) { - for (var a = 0, c = this.children.length;a < c;a++) { - var p = this.children[a], b = b - (p.endTime - p.startTime) + for (var h = 0, c = this.children.length;h < c;h++) { + var k = this.children[h], a = a - (k.endTime - k.startTime) } } - return b; + return a; }, enumerable:!0, configurable:!0}); - k.prototype.getChildIndex = function(b) { - for (var a = this.children, c = 0;c < a.length;c++) { - if (a[c].endTime > b) { + m.prototype.getChildIndex = function(a) { + for (var h = this.children, c = 0;c < h.length;c++) { + if (h[c].endTime > a) { return c; } } return 0; }; - k.prototype.getChildRange = function(b, a) { - if (this.children && b <= this.endTime && a >= this.startTime && a >= b) { - var c = this._getNearestChild(b), p = this._getNearestChildReverse(a); - if (c <= p) { - return b = this.children[c].startTime, a = this.children[p].endTime, {startIndex:c, endIndex:p, startTime:b, endTime:a, totalTime:a - b}; + m.prototype.getChildRange = function(a, h) { + if (this.children && a <= this.endTime && h >= this.startTime && h >= a) { + var c = this._getNearestChild(a), k = this._getNearestChildReverse(h); + if (c <= k) { + return a = this.children[c].startTime, h = this.children[k].endTime, {startIndex:c, endIndex:k, startTime:a, endTime:h, totalTime:h - a}; } } return null; }; - k.prototype._getNearestChild = function(b) { - var a = this.children; - if (a && a.length) { - if (b <= a[0].endTime) { + m.prototype._getNearestChild = function(a) { + var h = this.children; + if (h && h.length) { + if (a <= h[0].endTime) { return 0; } - for (var c, p = 0, k = a.length - 1;k > p;) { - c = (p + k) / 2 | 0; - var e = a[c]; - if (b >= e.startTime && b <= e.endTime) { + for (var c, k = 0, m = h.length - 1;m > k;) { + c = (k + m) / 2 | 0; + var n = h[c]; + if (a >= n.startTime && a <= n.endTime) { return c; } - b > e.endTime ? p = c + 1 : k = c; + a > n.endTime ? k = c + 1 : m = c; } - return Math.ceil((p + k) / 2); + return Math.ceil((k + m) / 2); } return 0; }; - k.prototype._getNearestChildReverse = function(b) { - var a = this.children; - if (a && a.length) { - var c = a.length - 1; - if (b >= a[c].startTime) { + m.prototype._getNearestChildReverse = function(a) { + var h = this.children; + if (h && h.length) { + var c = h.length - 1; + if (a >= h[c].startTime) { return c; } - for (var p, k = 0;c > k;) { - p = Math.ceil((k + c) / 2); - var e = a[p]; - if (b >= e.startTime && b <= e.endTime) { - return p; + for (var k, m = 0;c > m;) { + k = Math.ceil((m + c) / 2); + var n = h[k]; + if (a >= n.startTime && a <= n.endTime) { + return k; } - b > e.endTime ? k = p : c = p - 1; + a > n.endTime ? m = k : c = k - 1; } - return(k + c) / 2 | 0; + return(m + c) / 2 | 0; } return 0; }; - k.prototype.query = function(b) { - if (b < this.startTime || b > this.endTime) { + m.prototype.query = function(a) { + if (a < this.startTime || a > this.endTime) { return null; } - var a = this.children; - if (a && 0 < a.length) { - for (var c, p = 0, k = a.length - 1;k > p;) { - var e = (p + k) / 2 | 0; - c = a[e]; - if (b >= c.startTime && b <= c.endTime) { - return c.query(b); + var h = this.children; + if (h && 0 < h.length) { + for (var c, k = 0, m = h.length - 1;m > k;) { + var n = (k + m) / 2 | 0; + c = h[n]; + if (a >= c.startTime && a <= c.endTime) { + return c.query(a); } - b > c.endTime ? p = e + 1 : k = e; + a > c.endTime ? k = n + 1 : m = n; } - c = a[k]; - if (b >= c.startTime && b <= c.endTime) { - return c.query(b); + c = h[m]; + if (a >= c.startTime && a <= c.endTime) { + return c.query(a); } } return this; }; - k.prototype.queryNext = function(b) { - for (var a = this;b > a.endTime;) { - if (a.parent) { - a = a.parent; + m.prototype.queryNext = function(a) { + for (var h = this;a > h.endTime;) { + if (h.parent) { + h = h.parent; } else { break; } } - return a.query(b); + return h.query(a); }; - k.prototype.getDepth = function() { - for (var b = 0, a = this;a;) { - b++, a = a.parent; + m.prototype.getDepth = function() { + for (var a = 0, h = this;h;) { + a++, h = h.parent; } - return b; + return a; }; - k.prototype.calculateStatistics = function() { - function b(n) { - if (n.kind) { - var p = a[n.kind.id] || (a[n.kind.id] = new c(n.kind)); - p.count++; - p.selfTime += n.selfTime; - p.totalTime += n.totalTime; + m.prototype.calculateStatistics = function() { + function a(p) { + if (p.kind) { + var k = h[p.kind.id] || (h[p.kind.id] = new c(p.kind)); + k.count++; + k.selfTime += p.selfTime; + k.totalTime += p.totalTime; } - n.children && n.children.forEach(b); + p.children && p.children.forEach(a); } - var a = this.statistics = []; - b(this); + var h = this.statistics = []; + a(this); }; - k.prototype.trace = function(b) { - var a = (this.kind ? this.kind.name + ": " : "Profile: ") + (this.endTime - this.startTime).toFixed(2); + m.prototype.trace = function(a) { + var h = (this.kind ? this.kind.name + ": " : "Profile: ") + (this.endTime - this.startTime).toFixed(2); if (this.children && this.children.length) { - b.enter(a); - for (a = 0;a < this.children.length;a++) { - this.children[a].trace(b); + a.enter(h); + for (h = 0;h < this.children.length;h++) { + this.children[h].trace(a); } - b.outdent(); + a.outdent(); } else { - b.writeLn(a); + a.writeLn(h); } }; - return k; + return m; }(); - e.TimelineFrame = g; - g = function(c) { - function b(a) { + g.TimelineFrame = l; + l = function(c) { + function a(a) { c.call(this, null, null, null, null, NaN, NaN); this.name = a; } - __extends(b, c); - return b; - }(g); - e.TimelineBufferSnapshot = g; - })(g.Profiler || (g.Profiler = {})); - })(g.Tools || (g.Tools = {})); + __extends(a, c); + return a; + }(l); + g.TimelineBufferSnapshot = l; + })(l.Profiler || (l.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { +(function(l) { + (function(r) { + (function(g) { var c = function() { - function c(k, b) { - void 0 === k && (k = ""); - this.name = k || ""; - this._startTime = g.isNullOrUndefined(b) ? jsGlobal.START_TIME : b; + function c(m, a) { + void 0 === m && (m = ""); + this.name = m || ""; + this._startTime = l.isNullOrUndefined(a) ? jsGlobal.START_TIME : a; } c.prototype.getKind = function(c) { return this._kinds[c]; @@ -4747,71 +5113,71 @@ __extends = this.__extends || function(g, m) { this._data = []; this._kinds = []; this._kindNameMap = Object.create(null); - this._marks = new g.CircularBuffer(Int32Array, 20); - this._times = new g.CircularBuffer(Float64Array, 20); + this._marks = new l.CircularBuffer(Int32Array, 20); + this._times = new l.CircularBuffer(Float64Array, 20); }; - c.prototype._getKindId = function(k) { - var b = c.MAX_KINDID; - if (void 0 === this._kindNameMap[k]) { - if (b = this._kinds.length, b < c.MAX_KINDID) { - var a = {id:b, name:k, visible:!0}; - this._kinds.push(a); - this._kindNameMap[k] = a; + c.prototype._getKindId = function(m) { + var a = c.MAX_KINDID; + if (void 0 === this._kindNameMap[m]) { + if (a = this._kinds.length, a < c.MAX_KINDID) { + var h = {id:a, name:m, visible:!0}; + this._kinds.push(h); + this._kindNameMap[m] = h; } else { - b = c.MAX_KINDID; + a = c.MAX_KINDID; } } else { - b = this._kindNameMap[k].id; + a = this._kindNameMap[m].id; } - return b; + return a; }; - c.prototype._getMark = function(k, b, a) { - var n = c.MAX_DATAID; - g.isNullOrUndefined(a) || b === c.MAX_KINDID || (n = this._data.length, n < c.MAX_DATAID ? this._data.push(a) : n = c.MAX_DATAID); - return k | n << 16 | b; + c.prototype._getMark = function(m, a, h) { + var p = c.MAX_DATAID; + l.isNullOrUndefined(h) || a === c.MAX_KINDID || (p = this._data.length, p < c.MAX_DATAID ? this._data.push(h) : p = c.MAX_DATAID); + return m | p << 16 | a; }; - c.prototype.enter = function(k, b, a) { - a = (g.isNullOrUndefined(a) ? performance.now() : a) - this._startTime; + c.prototype.enter = function(m, a, h) { + h = (l.isNullOrUndefined(h) ? performance.now() : h) - this._startTime; this._marks || this._initialize(); this._depth++; - k = this._getKindId(k); - this._marks.write(this._getMark(c.ENTER, k, b)); - this._times.write(a); - this._stack.push(k); + m = this._getKindId(m); + this._marks.write(this._getMark(c.ENTER, m, a)); + this._times.write(h); + this._stack.push(m); }; - c.prototype.leave = function(k, b, a) { - a = (g.isNullOrUndefined(a) ? performance.now() : a) - this._startTime; - var n = this._stack.pop(); - k && (n = this._getKindId(k)); - this._marks.write(this._getMark(c.LEAVE, n, b)); - this._times.write(a); + c.prototype.leave = function(m, a, h) { + h = (l.isNullOrUndefined(h) ? performance.now() : h) - this._startTime; + var p = this._stack.pop(); + m && (p = this._getKindId(m)); + this._marks.write(this._getMark(c.LEAVE, p, a)); + this._times.write(h); this._depth--; }; - c.prototype.count = function(c, b, a) { + c.prototype.count = function(c, a, h) { }; c.prototype.createSnapshot = function() { - var k; - void 0 === k && (k = Number.MAX_VALUE); + var m; + void 0 === m && (m = Number.MAX_VALUE); if (!this._marks) { return null; } - var b = this._times, a = this._kinds, n = this._data, p = new e.TimelineBufferSnapshot(this.name), y = [p], v = 0; + var a = this._times, h = this._kinds, p = this._data, k = new g.TimelineBufferSnapshot(this.name), u = [k], n = 0; this._marks || this._initialize(); - this._marks.forEachInReverse(function(p, t) { - var r = n[p >>> 16 & c.MAX_DATAID], u = a[p & c.MAX_KINDID]; - if (g.isNullOrUndefined(u) || u.visible) { - var h = p & 2147483648, f = b.get(t), d = y.length; - if (h === c.LEAVE) { - if (1 === d && (v++, v > k)) { + this._marks.forEachInReverse(function(k, v) { + var d = p[k >>> 16 & c.MAX_DATAID], e = h[k & c.MAX_KINDID]; + if (l.isNullOrUndefined(e) || e.visible) { + var b = k & 2147483648, f = a.get(v), q = u.length; + if (b === c.LEAVE) { + if (1 === q && (n++, n > m)) { return!0; } - y.push(new e.TimelineFrame(y[d - 1], u, null, r, NaN, f)); + u.push(new g.TimelineFrame(u[q - 1], e, null, d, NaN, f)); } else { - if (h === c.ENTER) { - if (u = y.pop(), h = y[y.length - 1]) { - for (h.children ? h.children.unshift(u) : h.children = [u], h = y.length, u.depth = h, u.startData = r, u.startTime = f;u;) { - if (u.maxDepth < h) { - u.maxDepth = h, u = u.parent; + if (b === c.ENTER) { + if (e = u.pop(), b = u[u.length - 1]) { + for (b.children ? b.children.unshift(e) : b.children = [e], b = u.length, e.depth = b, e.startData = d, e.startTime = f;e;) { + if (e.maxDepth < b) { + e.maxDepth = b, e = e.parent; } else { break; } @@ -4823,63 +5189,63 @@ __extends = this.__extends || function(g, m) { } } }); - p.children && p.children.length && (p.startTime = p.children[0].startTime, p.endTime = p.children[p.children.length - 1].endTime); - return p; + k.children && k.children.length && (k.startTime = k.children[0].startTime, k.endTime = k.children[k.children.length - 1].endTime); + return k; }; c.prototype.reset = function(c) { - this._startTime = g.isNullOrUndefined(c) ? performance.now() : c; + this._startTime = l.isNullOrUndefined(c) ? performance.now() : c; this._marks ? (this._depth = 0, this._data = [], this._marks.reset(), this._times.reset()) : this._initialize(); }; - c.FromFirefoxProfile = function(k, b) { - for (var a = k.profile.threads[0].samples, n = new c(b, a[0].time), p = [], e, g = 0;g < a.length;g++) { - e = a[g]; - var l = e.time, t = e.frames, r = 0; - for (e = Math.min(t.length, p.length);r < e && t[r].location === p[r].location;) { - r++; + c.FromFirefoxProfile = function(m, a) { + for (var h = m.profile.threads[0].samples, p = new c(a, h[0].time), k = [], g, n = 0;n < h.length;n++) { + g = h[n]; + var s = g.time, l = g.frames, d = 0; + for (g = Math.min(l.length, k.length);d < g && l[d].location === k[d].location;) { + d++; } - for (var u = p.length - r, h = 0;h < u;h++) { - e = p.pop(), n.leave(e.location, null, l); + for (var e = k.length - d, b = 0;b < e;b++) { + g = k.pop(), p.leave(g.location, null, s); } - for (;r < t.length;) { - e = t[r++], n.enter(e.location, null, l); + for (;d < l.length;) { + g = l[d++], p.enter(g.location, null, s); } - p = t; + k = l; } - for (;e = p.pop();) { - n.leave(e.location, null, l); - } - return n; - }; - c.FromChromeProfile = function(k, b) { - var a = k.timestamps, n = k.samples, p = new c(b, a[0] / 1E3), e = [], g = {}, l; - c._resolveIds(k.head, g); - for (var t = 0;t < a.length;t++) { - var r = a[t] / 1E3, u = []; - for (l = g[n[t]];l;) { - u.unshift(l), l = l.parent; - } - var h = 0; - for (l = Math.min(u.length, e.length);h < l && u[h] === e[h];) { - h++; - } - for (var f = e.length - h, d = 0;d < f;d++) { - l = e.pop(), p.leave(l.functionName, null, r); - } - for (;h < u.length;) { - l = u[h++], p.enter(l.functionName, null, r); - } - e = u; - } - for (;l = e.pop();) { - p.leave(l.functionName, null, r); + for (;g = k.pop();) { + p.leave(g.location, null, s); } return p; }; - c._resolveIds = function(k, b) { - b[k.id] = k; - if (k.children) { - for (var a = 0;a < k.children.length;a++) { - k.children[a].parent = k, c._resolveIds(k.children[a], b); + c.FromChromeProfile = function(m, a) { + var h = m.timestamps, p = m.samples, k = new c(a, h[0] / 1E3), g = [], n = {}, s; + c._resolveIds(m.head, n); + for (var l = 0;l < h.length;l++) { + var d = h[l] / 1E3, e = []; + for (s = n[p[l]];s;) { + e.unshift(s), s = s.parent; + } + var b = 0; + for (s = Math.min(e.length, g.length);b < s && e[b] === g[b];) { + b++; + } + for (var f = g.length - b, q = 0;q < f;q++) { + s = g.pop(), k.leave(s.functionName, null, d); + } + for (;b < e.length;) { + s = e[b++], k.enter(s.functionName, null, d); + } + g = e; + } + for (;s = g.pop();) { + k.leave(s.functionName, null, d); + } + return k; + }; + c._resolveIds = function(m, a) { + a[m.id] = m; + if (m.children) { + for (var h = 0;h < m.children.length;h++) { + m.children[h].parent = m, c._resolveIds(m.children[h], a); } } }; @@ -4889,35 +5255,35 @@ __extends = this.__extends || function(g, m) { c.MAX_DATAID = 32767; return c; }(); - e.TimelineBuffer = c; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + g.TimelineBuffer = c; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { +(function(l) { + (function(r) { + (function(g) { (function(c) { c[c.DARK = 0] = "DARK"; c[c.LIGHT = 1] = "LIGHT"; - })(e.UIThemeType || (e.UIThemeType = {})); + })(g.UIThemeType || (g.UIThemeType = {})); var c = function() { - function c(k, b) { - void 0 === b && (b = 0); - this._container = k; + function c(m, a) { + void 0 === a && (a = 0); + this._container = m; this._headers = []; this._charts = []; this._profiles = []; this._activeProfile = null; - this.themeType = b; + this.themeType = a; this._tooltip = this._createTooltip(); } - c.prototype.createProfile = function(c, b) { - void 0 === b && (b = !0); - var a = new e.Profile(c); - a.createSnapshots(); - this._profiles.push(a); - b && this.activateProfile(a); - return a; + c.prototype.createProfile = function(c, a) { + void 0 === a && (a = !0); + var h = new g.Profile(c); + h.createSnapshots(); + this._profiles.push(h); + a && this.activateProfile(h); + return h; }; c.prototype.activateProfile = function(c) { this.deactivateProfile(); @@ -4951,10 +5317,10 @@ __extends = this.__extends || function(g, m) { }, set:function(c) { switch(c) { case 0: - this._theme = new m.Theme.UIThemeDark; + this._theme = new r.Theme.UIThemeDark; break; case 1: - this._theme = new m.Theme.UIThemeLight; + this._theme = new r.Theme.UIThemeLight; } }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "theme", {get:function() { @@ -4966,11 +5332,11 @@ __extends = this.__extends || function(g, m) { c.prototype._createViews = function() { if (this._activeProfile) { var c = this; - this._overviewHeader = new e.FlameChartHeader(this, 0); - this._overview = new e.FlameChartOverview(this, 0); - this._activeProfile.forEachSnapshot(function(b, a) { - c._headers.push(new e.FlameChartHeader(c, 1)); - c._charts.push(new e.FlameChart(c, b)); + this._overviewHeader = new g.FlameChartHeader(this, 0); + this._overview = new g.FlameChartOverview(this, 0); + this._activeProfile.forEachSnapshot(function(a, h) { + c._headers.push(new g.FlameChartHeader(c, 1)); + c._charts.push(new g.FlameChart(c, a)); }); window.addEventListener("resize", this._onResize.bind(this)); } @@ -4989,34 +5355,34 @@ __extends = this.__extends || function(g, m) { }; c.prototype._initializeViews = function() { if (this._activeProfile) { - var c = this, b = this._activeProfile.startTime, a = this._activeProfile.endTime; - this._overviewHeader.initialize(b, a); - this._overview.initialize(b, a); - this._activeProfile.forEachSnapshot(function(n, p) { - c._headers[p].initialize(b, a); - c._charts[p].initialize(b, a); + var c = this, a = this._activeProfile.startTime, h = this._activeProfile.endTime; + this._overviewHeader.initialize(a, h); + this._overview.initialize(a, h); + this._activeProfile.forEachSnapshot(function(p, k) { + c._headers[k].initialize(a, h); + c._charts[k].initialize(a, h); }); } }; c.prototype._onResize = function() { if (this._activeProfile) { - var c = this, b = this._container.offsetWidth; - this._overviewHeader.setSize(b); - this._overview.setSize(b); - this._activeProfile.forEachSnapshot(function(a, n) { - c._headers[n].setSize(b); - c._charts[n].setSize(b); + var c = this, a = this._container.offsetWidth; + this._overviewHeader.setSize(a); + this._overview.setSize(a); + this._activeProfile.forEachSnapshot(function(h, p) { + c._headers[p].setSize(a); + c._charts[p].setSize(a); }); } }; c.prototype._updateViews = function() { if (this._activeProfile) { - var c = this, b = this._activeProfile.windowStart, a = this._activeProfile.windowEnd; - this._overviewHeader.setWindow(b, a); - this._overview.setWindow(b, a); - this._activeProfile.forEachSnapshot(function(n, p) { - c._headers[p].setWindow(b, a); - c._charts[p].setWindow(b, a); + var c = this, a = this._activeProfile.windowStart, h = this._activeProfile.windowEnd; + this._overviewHeader.setWindow(a, h); + this._overview.setWindow(a, h); + this._activeProfile.forEachSnapshot(function(p, k) { + c._headers[k].setWindow(a, h); + c._charts[k].setWindow(a, h); }); } }; @@ -5029,56 +5395,56 @@ __extends = this.__extends || function(g, m) { this._container.insertBefore(c, this._container.firstChild); return c; }; - c.prototype.setWindow = function(c, b) { - this._activeProfile.setWindow(c, b); + c.prototype.setWindow = function(c, a) { + this._activeProfile.setWindow(c, a); this._updateViews(); }; c.prototype.moveWindowTo = function(c) { this._activeProfile.moveWindowTo(c); this._updateViews(); }; - c.prototype.showTooltip = function(c, b, a, n) { + c.prototype.showTooltip = function(c, a, h, p) { this.removeTooltipContent(); - this._tooltip.appendChild(this.createTooltipContent(c, b)); + this._tooltip.appendChild(this.createTooltipContent(c, a)); this._tooltip.style.display = "block"; - var p = this._tooltip.firstChild; - b = p.clientWidth; - p = p.clientHeight; - a += a + b >= c.canvas.clientWidth - 50 ? -(b + 20) : 25; - n += c.canvas.offsetTop - p / 2; - this._tooltip.style.left = a + "px"; - this._tooltip.style.top = n + "px"; + var k = this._tooltip.firstChild; + a = k.clientWidth; + k = k.clientHeight; + h += h + a >= c.canvas.clientWidth - 50 ? -(a + 20) : 25; + p += c.canvas.offsetTop - k / 2; + this._tooltip.style.left = h + "px"; + this._tooltip.style.top = p + "px"; }; c.prototype.hideTooltip = function() { this._tooltip.style.display = "none"; }; - c.prototype.createTooltipContent = function(c, b) { - var a = Math.round(1E5 * b.totalTime) / 1E5, n = Math.round(1E5 * b.selfTime) / 1E5, p = Math.round(1E4 * b.selfTime / b.totalTime) / 100, e = document.createElement("div"), g = document.createElement("h1"); - g.textContent = b.kind.name; - e.appendChild(g); - g = document.createElement("p"); - g.textContent = "Total: " + a + " ms"; - e.appendChild(g); - a = document.createElement("p"); - a.textContent = "Self: " + n + " ms (" + p + "%)"; - e.appendChild(a); - if (n = c.getStatistics(b.kind)) { - p = document.createElement("p"), p.textContent = "Count: " + n.count, e.appendChild(p), p = Math.round(1E5 * n.totalTime) / 1E5, a = document.createElement("p"), a.textContent = "All Total: " + p + " ms", e.appendChild(a), n = Math.round(1E5 * n.selfTime) / 1E5, p = document.createElement("p"), p.textContent = "All Self: " + n + " ms", e.appendChild(p); + c.prototype.createTooltipContent = function(c, a) { + var h = Math.round(1E5 * a.totalTime) / 1E5, p = Math.round(1E5 * a.selfTime) / 1E5, k = Math.round(1E4 * a.selfTime / a.totalTime) / 100, g = document.createElement("div"), n = document.createElement("h1"); + n.textContent = a.kind.name; + g.appendChild(n); + n = document.createElement("p"); + n.textContent = "Total: " + h + " ms"; + g.appendChild(n); + h = document.createElement("p"); + h.textContent = "Self: " + p + " ms (" + k + "%)"; + g.appendChild(h); + if (p = c.getStatistics(a.kind)) { + k = document.createElement("p"), k.textContent = "Count: " + p.count, g.appendChild(k), k = Math.round(1E5 * p.totalTime) / 1E5, h = document.createElement("p"), h.textContent = "All Total: " + k + " ms", g.appendChild(h), p = Math.round(1E5 * p.selfTime) / 1E5, k = document.createElement("p"), k.textContent = "All Self: " + p + " ms", g.appendChild(k); } - this.appendDataElements(e, b.startData); - this.appendDataElements(e, b.endData); - return e; + this.appendDataElements(g, a.startData); + this.appendDataElements(g, a.endData); + return g; }; - c.prototype.appendDataElements = function(c, b) { - if (!g.isNullOrUndefined(b)) { + c.prototype.appendDataElements = function(c, a) { + if (!l.isNullOrUndefined(a)) { c.appendChild(document.createElement("hr")); - var a; - if (g.isObject(b)) { - for (var n in b) { - a = document.createElement("p"), a.textContent = n + ": " + b[n], c.appendChild(a); + var h; + if (l.isObject(a)) { + for (var p in a) { + h = document.createElement("p"), h.textContent = p + ": " + a[p], c.appendChild(h); } } else { - a = document.createElement("p"), a.textContent = b.toString(), c.appendChild(a); + h = document.createElement("p"), h.textContent = a.toString(), c.appendChild(h); } } }; @@ -5089,61 +5455,61 @@ __extends = this.__extends || function(g, m) { }; return c; }(); - e.Controller = c; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + g.Controller = c; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.NumberUtilities.clamp, m = function() { - function b(a) { +(function(l) { + (function(r) { + (function(g) { + var c = l.NumberUtilities.clamp, r = function() { + function a(a) { this.value = a; } - b.prototype.toString = function() { + a.prototype.toString = function() { return this.value; }; - b.AUTO = new b("auto"); - b.DEFAULT = new b("default"); - b.NONE = new b("none"); - b.HELP = new b("help"); - b.POINTER = new b("pointer"); - b.PROGRESS = new b("progress"); - b.WAIT = new b("wait"); - b.CELL = new b("cell"); - b.CROSSHAIR = new b("crosshair"); - b.TEXT = new b("text"); - b.ALIAS = new b("alias"); - b.COPY = new b("copy"); - b.MOVE = new b("move"); - b.NO_DROP = new b("no-drop"); - b.NOT_ALLOWED = new b("not-allowed"); - b.ALL_SCROLL = new b("all-scroll"); - b.COL_RESIZE = new b("col-resize"); - b.ROW_RESIZE = new b("row-resize"); - b.N_RESIZE = new b("n-resize"); - b.E_RESIZE = new b("e-resize"); - b.S_RESIZE = new b("s-resize"); - b.W_RESIZE = new b("w-resize"); - b.NE_RESIZE = new b("ne-resize"); - b.NW_RESIZE = new b("nw-resize"); - b.SE_RESIZE = new b("se-resize"); - b.SW_RESIZE = new b("sw-resize"); - b.EW_RESIZE = new b("ew-resize"); - b.NS_RESIZE = new b("ns-resize"); - b.NESW_RESIZE = new b("nesw-resize"); - b.NWSE_RESIZE = new b("nwse-resize"); - b.ZOOM_IN = new b("zoom-in"); - b.ZOOM_OUT = new b("zoom-out"); - b.GRAB = new b("grab"); - b.GRABBING = new b("grabbing"); - return b; + a.AUTO = new a("auto"); + a.DEFAULT = new a("default"); + a.NONE = new a("none"); + a.HELP = new a("help"); + a.POINTER = new a("pointer"); + a.PROGRESS = new a("progress"); + a.WAIT = new a("wait"); + a.CELL = new a("cell"); + a.CROSSHAIR = new a("crosshair"); + a.TEXT = new a("text"); + a.ALIAS = new a("alias"); + a.COPY = new a("copy"); + a.MOVE = new a("move"); + a.NO_DROP = new a("no-drop"); + a.NOT_ALLOWED = new a("not-allowed"); + a.ALL_SCROLL = new a("all-scroll"); + a.COL_RESIZE = new a("col-resize"); + a.ROW_RESIZE = new a("row-resize"); + a.N_RESIZE = new a("n-resize"); + a.E_RESIZE = new a("e-resize"); + a.S_RESIZE = new a("s-resize"); + a.W_RESIZE = new a("w-resize"); + a.NE_RESIZE = new a("ne-resize"); + a.NW_RESIZE = new a("nw-resize"); + a.SE_RESIZE = new a("se-resize"); + a.SW_RESIZE = new a("sw-resize"); + a.EW_RESIZE = new a("ew-resize"); + a.NS_RESIZE = new a("ns-resize"); + a.NESW_RESIZE = new a("nesw-resize"); + a.NWSE_RESIZE = new a("nwse-resize"); + a.ZOOM_IN = new a("zoom-in"); + a.ZOOM_OUT = new a("zoom-out"); + a.GRAB = new a("grab"); + a.GRABBING = new a("grabbing"); + return a; }(); - e.MouseCursor = m; - var k = function() { - function b(a, b) { + g.MouseCursor = r; + var m = function() { + function a(a, c) { this._target = a; - this._eventTarget = b; + this._eventTarget = c; this._wheelDisabled = !1; this._boundOnMouseDown = this._onMouseDown.bind(this); this._boundOnMouseUp = this._onMouseUp.bind(this); @@ -5152,12 +5518,12 @@ __extends = this.__extends || function(g, m) { this._boundOnMouseMove = this._onMouseMove.bind(this); this._boundOnMouseWheel = this._onMouseWheel.bind(this); this._boundOnDrag = this._onDrag.bind(this); - b.addEventListener("mousedown", this._boundOnMouseDown, !1); - b.addEventListener("mouseover", this._boundOnMouseOver, !1); - b.addEventListener("mouseout", this._boundOnMouseOut, !1); - b.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1); + c.addEventListener("mousedown", this._boundOnMouseDown, !1); + c.addEventListener("mouseover", this._boundOnMouseOver, !1); + c.addEventListener("mouseout", this._boundOnMouseOut, !1); + c.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1); } - b.prototype.destroy = function() { + a.prototype.destroy = function() { var a = this._eventTarget; a.removeEventListener("mousedown", this._boundOnMouseDown); a.removeEventListener("mouseover", this._boundOnMouseOver); @@ -5168,38 +5534,38 @@ __extends = this.__extends || function(g, m) { this._killHoverCheck(); this._target = this._eventTarget = null; }; - b.prototype.updateCursor = function(a) { - if (!b._cursorOwner || b._cursorOwner === this._target) { - var c = this._eventTarget.parentElement; - b._cursor !== a && (b._cursor = a, ["", "-moz-", "-webkit-"].forEach(function(b) { - c.style.cursor = b + a; + a.prototype.updateCursor = function(c) { + if (!a._cursorOwner || a._cursorOwner === this._target) { + var p = this._eventTarget.parentElement; + a._cursor !== c && (a._cursor = c, ["", "-moz-", "-webkit-"].forEach(function(a) { + p.style.cursor = a + c; })); - b._cursorOwner = b._cursor === m.DEFAULT ? null : this._target; + a._cursorOwner = a._cursor === r.DEFAULT ? null : this._target; } }; - b.prototype._onMouseDown = function(a) { + a.prototype._onMouseDown = function(a) { this._killHoverCheck(); if (0 === a.button) { - var b = this._getTargetMousePos(a, a.target); - this._dragInfo = {start:b, current:b, delta:{x:0, y:0}, hasMoved:!1, originalTarget:a.target}; + var c = this._getTargetMousePos(a, a.target); + this._dragInfo = {start:c, current:c, delta:{x:0, y:0}, hasMoved:!1, originalTarget:a.target}; window.addEventListener("mousemove", this._boundOnDrag, !1); window.addEventListener("mouseup", this._boundOnMouseUp, !1); - this._target.onMouseDown(b.x, b.y); + this._target.onMouseDown(c.x, c.y); } }; - b.prototype._onDrag = function(a) { - var b = this._dragInfo; - a = this._getTargetMousePos(a, b.originalTarget); - var c = {x:a.x - b.start.x, y:a.y - b.start.y}; - b.current = a; - b.delta = c; - b.hasMoved = !0; - this._target.onDrag(b.start.x, b.start.y, a.x, a.y, c.x, c.y); + a.prototype._onDrag = function(a) { + var c = this._dragInfo; + a = this._getTargetMousePos(a, c.originalTarget); + var k = {x:a.x - c.start.x, y:a.y - c.start.y}; + c.current = a; + c.delta = k; + c.hasMoved = !0; + this._target.onDrag(c.start.x, c.start.y, a.x, a.y, k.x, k.y); }; - b.prototype._onMouseUp = function(a) { + a.prototype._onMouseUp = function(a) { window.removeEventListener("mousemove", this._boundOnDrag); window.removeEventListener("mouseup", this._boundOnMouseUp); - var b = this; + var c = this; a = this._dragInfo; if (a.hasMoved) { this._target.onDragEnd(a.start.x, a.start.y, a.current.x, a.current.y, a.delta.x, a.delta.y); @@ -5209,43 +5575,43 @@ __extends = this.__extends || function(g, m) { this._dragInfo = null; this._wheelDisabled = !0; setTimeout(function() { - b._wheelDisabled = !1; + c._wheelDisabled = !1; }, 500); }; - b.prototype._onMouseOver = function(a) { + a.prototype._onMouseOver = function(a) { a.target.addEventListener("mousemove", this._boundOnMouseMove, !1); if (!this._dragInfo) { - var b = this._getTargetMousePos(a, a.target); - this._target.onMouseOver(b.x, b.y); + var c = this._getTargetMousePos(a, a.target); + this._target.onMouseOver(c.x, c.y); this._startHoverCheck(a); } }; - b.prototype._onMouseOut = function(a) { + a.prototype._onMouseOut = function(a) { a.target.removeEventListener("mousemove", this._boundOnMouseMove, !1); if (!this._dragInfo) { this._target.onMouseOut(); } this._killHoverCheck(); }; - b.prototype._onMouseMove = function(a) { + a.prototype._onMouseMove = function(a) { if (!this._dragInfo) { - var b = this._getTargetMousePos(a, a.target); - this._target.onMouseMove(b.x, b.y); + var c = this._getTargetMousePos(a, a.target); + this._target.onMouseMove(c.x, c.y); this._killHoverCheck(); this._startHoverCheck(a); } }; - b.prototype._onMouseWheel = function(a) { + a.prototype._onMouseWheel = function(a) { if (!(a.altKey || a.metaKey || a.ctrlKey || a.shiftKey || (a.preventDefault(), this._dragInfo || this._wheelDisabled))) { - var b = this._getTargetMousePos(a, a.target); + var p = this._getTargetMousePos(a, a.target); a = c("undefined" !== typeof a.deltaY ? a.deltaY / 16 : -a.wheelDelta / 40, -1, 1); - this._target.onMouseWheel(b.x, b.y, Math.pow(1.2, a) - 1); + this._target.onMouseWheel(p.x, p.y, Math.pow(1.2, a) - 1); } }; - b.prototype._startHoverCheck = function(a) { - this._hoverInfo = {isHovering:!1, timeoutHandle:setTimeout(this._onMouseMoveIdleHandler.bind(this), b.HOVER_TIMEOUT), pos:this._getTargetMousePos(a, a.target)}; + a.prototype._startHoverCheck = function(c) { + this._hoverInfo = {isHovering:!1, timeoutHandle:setTimeout(this._onMouseMoveIdleHandler.bind(this), a.HOVER_TIMEOUT), pos:this._getTargetMousePos(c, c.target)}; }; - b.prototype._killHoverCheck = function() { + a.prototype._killHoverCheck = function() { if (this._hoverInfo) { clearTimeout(this._hoverInfo.timeoutHandle); if (this._hoverInfo.isHovering) { @@ -5254,73 +5620,73 @@ __extends = this.__extends || function(g, m) { this._hoverInfo = null; } }; - b.prototype._onMouseMoveIdleHandler = function() { + a.prototype._onMouseMoveIdleHandler = function() { var a = this._hoverInfo; a.isHovering = !0; this._target.onHoverStart(a.pos.x, a.pos.y); }; - b.prototype._getTargetMousePos = function(a, b) { - var c = b.getBoundingClientRect(); - return{x:a.clientX - c.left, y:a.clientY - c.top}; + a.prototype._getTargetMousePos = function(a, c) { + var k = c.getBoundingClientRect(); + return{x:a.clientX - k.left, y:a.clientY - k.top}; }; - b.HOVER_TIMEOUT = 500; - b._cursor = m.DEFAULT; - return b; + a.HOVER_TIMEOUT = 500; + a._cursor = r.DEFAULT; + return a; }(); - e.MouseController = k; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + g.MouseController = m; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { (function(c) { c[c.NONE = 0] = "NONE"; c[c.WINDOW = 1] = "WINDOW"; c[c.HANDLE_LEFT = 2] = "HANDLE_LEFT"; c[c.HANDLE_RIGHT = 3] = "HANDLE_RIGHT"; c[c.HANDLE_BOTH = 4] = "HANDLE_BOTH"; - })(e.FlameChartDragTarget || (e.FlameChartDragTarget = {})); + })(g.FlameChartDragTarget || (g.FlameChartDragTarget = {})); var c = function() { - function c(k) { - this._controller = k; + function c(m) { + this._controller = m; this._initialized = !1; this._canvas = document.createElement("canvas"); this._context = this._canvas.getContext("2d"); - this._mouseController = new e.MouseController(this, this._canvas); - k = k.container; - k.appendChild(this._canvas); - k = k.getBoundingClientRect(); - this.setSize(k.width); + this._mouseController = new g.MouseController(this, this._canvas); + m = m.container; + m.appendChild(this._canvas); + m = m.getBoundingClientRect(); + this.setSize(m.width); } Object.defineProperty(c.prototype, "canvas", {get:function() { return this._canvas; }, enumerable:!0, configurable:!0}); - c.prototype.setSize = function(c, b) { - void 0 === b && (b = 20); + c.prototype.setSize = function(c, a) { + void 0 === a && (a = 20); this._width = c; - this._height = b; + this._height = a; this._resetCanvas(); this.draw(); }; - c.prototype.initialize = function(c, b) { + c.prototype.initialize = function(c, a) { this._initialized = !0; - this.setRange(c, b); - this.setWindow(c, b, !1); + this.setRange(c, a); + this.setWindow(c, a, !1); this.draw(); }; - c.prototype.setWindow = function(c, b, a) { - void 0 === a && (a = !0); + c.prototype.setWindow = function(c, a, h) { + void 0 === h && (h = !0); this._windowStart = c; - this._windowEnd = b; - !a || this.draw(); + this._windowEnd = a; + !h || this.draw(); }; - c.prototype.setRange = function(c, b) { - var a = !1; - void 0 === a && (a = !0); + c.prototype.setRange = function(c, a) { + var h = !1; + void 0 === h && (h = !0); this._rangeStart = c; - this._rangeEnd = b; - !a || this.draw(); + this._rangeEnd = a; + !h || this.draw(); }; c.prototype.destroy = function() { this._mouseController.destroy(); @@ -5329,18 +5695,18 @@ __extends = this.__extends || function(g, m) { this._controller = null; }; c.prototype._resetCanvas = function() { - var c = window.devicePixelRatio, b = this._canvas; - b.width = this._width * c; - b.height = this._height * c; - b.style.width = this._width + "px"; - b.style.height = this._height + "px"; + var c = window.devicePixelRatio, a = this._canvas; + a.width = this._width * c; + a.height = this._height * c; + a.style.width = this._width + "px"; + a.style.height = this._height + "px"; }; c.prototype.draw = function() { }; - c.prototype._almostEq = function(c, b) { - var a; - void 0 === a && (a = 10); - return Math.abs(c - b) < 1 / Math.pow(10, a); + c.prototype._almostEq = function(c, a) { + var h; + void 0 === h && (h = 10); + return Math.abs(c - a) < 1 / Math.pow(10, h); }; c.prototype._windowEqRange = function() { return this._almostEq(this._windowStart, this._rangeStart) && this._almostEq(this._windowEnd, this._rangeEnd); @@ -5360,29 +5726,29 @@ __extends = this.__extends || function(g, m) { c.prototype._toTime = function(c) { return 0; }; - c.prototype.onMouseWheel = function(e, b, a) { - e = this._toTime(e); - b = this._windowStart; - var n = this._windowEnd, p = n - b; - a = Math.max((c.MIN_WINDOW_LEN - p) / p, a); - this._controller.setWindow(b + (b - e) * a, n + (n - e) * a); + c.prototype.onMouseWheel = function(g, a, h) { + g = this._toTime(g); + a = this._windowStart; + var p = this._windowEnd, k = p - a; + h = Math.max((c.MIN_WINDOW_LEN - k) / k, h); + this._controller.setWindow(a + (a - g) * h, p + (p - g) * h); this.onHoverEnd(); }; - c.prototype.onMouseDown = function(c, b) { + c.prototype.onMouseDown = function(c, a) { }; - c.prototype.onMouseMove = function(c, b) { + c.prototype.onMouseMove = function(c, a) { }; - c.prototype.onMouseOver = function(c, b) { + c.prototype.onMouseOver = function(c, a) { }; c.prototype.onMouseOut = function() { }; - c.prototype.onDrag = function(c, b, a, n, p, e) { + c.prototype.onDrag = function(c, a, h, p, k, g) { }; - c.prototype.onDragEnd = function(c, b, a, n, p, e) { + c.prototype.onDragEnd = function(c, a, h, p, k, g) { }; - c.prototype.onClick = function(c, b) { + c.prototype.onClick = function(c, a) { }; - c.prototype.onHoverStart = function(c, b) { + c.prototype.onHoverStart = function(c, a) { }; c.prototype.onHoverEnd = function() { }; @@ -5390,423 +5756,423 @@ __extends = this.__extends || function(g, m) { c.MIN_WINDOW_LEN = .1; return c; }(); - e.FlameChartBase = c; - })(g.Profiler || (g.Profiler = {})); - })(g.Tools || (g.Tools = {})); + g.FlameChartBase = c; + })(l.Profiler || (l.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.StringUtilities.trimMiddle, m = function(k) { - function b(a, b) { - k.call(this, a); +(function(l) { + (function(r) { + (function(g) { + var c = l.StringUtilities.trimMiddle, r = function(m) { + function a(a, c) { + m.call(this, a); this._textWidth = {}; this._minFrameWidthInPixels = 1; - this._snapshot = b; + this._snapshot = c; this._kindStyle = Object.create(null); } - __extends(b, k); - b.prototype.setSize = function(a, b) { - k.prototype.setSize.call(this, a, b || this._initialized ? 12.5 * this._maxDepth : 100); + __extends(a, m); + a.prototype.setSize = function(a, c) { + m.prototype.setSize.call(this, a, c || this._initialized ? 12.5 * this._maxDepth : 100); }; - b.prototype.initialize = function(a, b) { + a.prototype.initialize = function(a, c) { this._initialized = !0; this._maxDepth = this._snapshot.maxDepth; - this.setRange(a, b); - this.setWindow(a, b, !1); + this.setRange(a, c); + this.setWindow(a, c, !1); this.setSize(this._width, 12.5 * this._maxDepth); }; - b.prototype.destroy = function() { - k.prototype.destroy.call(this); + a.prototype.destroy = function() { + m.prototype.destroy.call(this); this._snapshot = null; }; - b.prototype.draw = function() { - var a = this._context, b = window.devicePixelRatio; - g.ColorStyle.reset(); + a.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio; + l.ColorStyle.reset(); a.save(); - a.scale(b, b); + a.scale(c, c); a.fillStyle = this._controller.theme.bodyBackground(1); a.fillRect(0, 0, this._width, this._height); this._initialized && this._drawChildren(this._snapshot); a.restore(); }; - b.prototype._drawChildren = function(a, b) { - void 0 === b && (b = 0); - var c = a.getChildRange(this._windowStart, this._windowEnd); - if (c) { - for (var e = c.startIndex;e <= c.endIndex;e++) { - var k = a.children[e]; - this._drawFrame(k, b) && this._drawChildren(k, b + 1); + a.prototype._drawChildren = function(a, c) { + void 0 === c && (c = 0); + var k = a.getChildRange(this._windowStart, this._windowEnd); + if (k) { + for (var g = k.startIndex;g <= k.endIndex;g++) { + var n = a.children[g]; + this._drawFrame(n, c) && this._drawChildren(n, c + 1); } } }; - b.prototype._drawFrame = function(a, b) { - var c = this._context, e = this._toPixels(a.startTime), k = this._toPixels(a.endTime), l = k - e; - if (l <= this._minFrameWidthInPixels) { - return c.fillStyle = this._controller.theme.tabToolbar(1), c.fillRect(e, 12.5 * b, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1; + a.prototype._drawFrame = function(a, c) { + var k = this._context, g = this._toPixels(a.startTime), n = this._toPixels(a.endTime), s = n - g; + if (s <= this._minFrameWidthInPixels) { + return k.fillStyle = this._controller.theme.tabToolbar(1), k.fillRect(g, 12.5 * c, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1; } - 0 > e && (k = l + e, e = 0); - var k = k - e, t = this._kindStyle[a.kind.id]; - t || (t = g.ColorStyle.randomStyle(), t = this._kindStyle[a.kind.id] = {bgColor:t, textColor:g.ColorStyle.contrastStyle(t)}); - c.save(); - c.fillStyle = t.bgColor; - c.fillRect(e, 12.5 * b, k, 12); - 12 < l && (l = a.kind.name) && l.length && (l = this._prepareText(c, l, k - 4), l.length && (c.fillStyle = t.textColor, c.textBaseline = "bottom", c.fillText(l, e + 2, 12.5 * (b + 1) - 1))); - c.restore(); + 0 > g && (n = s + g, g = 0); + var n = n - g, m = this._kindStyle[a.kind.id]; + m || (m = l.ColorStyle.randomStyle(), m = this._kindStyle[a.kind.id] = {bgColor:m, textColor:l.ColorStyle.contrastStyle(m)}); + k.save(); + k.fillStyle = m.bgColor; + k.fillRect(g, 12.5 * c, n, 12); + 12 < s && (s = a.kind.name) && s.length && (s = this._prepareText(k, s, n - 4), s.length && (k.fillStyle = m.textColor, k.textBaseline = "bottom", k.fillText(s, g + 2, 12.5 * (c + 1) - 1))); + k.restore(); return!0; }; - b.prototype._prepareText = function(a, b, p) { - var e = this._measureWidth(a, b); - if (p > e) { - return b; + a.prototype._prepareText = function(a, p, k) { + var g = this._measureWidth(a, p); + if (k > g) { + return p; } - for (var e = 3, k = b.length;e < k;) { - var l = e + k >> 1; - this._measureWidth(a, c(b, l)) < p ? e = l + 1 : k = l; + for (var g = 3, n = p.length;g < n;) { + var m = g + n >> 1; + this._measureWidth(a, c(p, m)) < k ? g = m + 1 : n = m; } - b = c(b, k - 1); - e = this._measureWidth(a, b); - return e <= p ? b : ""; + p = c(p, n - 1); + g = this._measureWidth(a, p); + return g <= k ? p : ""; }; - b.prototype._measureWidth = function(a, b) { - var c = this._textWidth[b]; - c || (c = a.measureText(b).width, this._textWidth[b] = c); - return c; + a.prototype._measureWidth = function(a, c) { + var k = this._textWidth[c]; + k || (k = a.measureText(c).width, this._textWidth[c] = k); + return k; }; - b.prototype._toPixelsRelative = function(a) { + a.prototype._toPixelsRelative = function(a) { return a * this._width / (this._windowEnd - this._windowStart); }; - b.prototype._toPixels = function(a) { + a.prototype._toPixels = function(a) { return this._toPixelsRelative(a - this._windowStart); }; - b.prototype._toTimeRelative = function(a) { + a.prototype._toTimeRelative = function(a) { return a * (this._windowEnd - this._windowStart) / this._width; }; - b.prototype._toTime = function(a) { + a.prototype._toTime = function(a) { return this._toTimeRelative(a) + this._windowStart; }; - b.prototype._getFrameAtPosition = function(a, b) { - var c = 1 + b / 12.5 | 0, e = this._snapshot.query(this._toTime(a)); - if (e && e.depth >= c) { - for (;e && e.depth > c;) { - e = e.parent; + a.prototype._getFrameAtPosition = function(a, c) { + var k = 1 + c / 12.5 | 0, g = this._snapshot.query(this._toTime(a)); + if (g && g.depth >= k) { + for (;g && g.depth > k;) { + g = g.parent; } - return e; + return g; } return null; }; - b.prototype.onMouseDown = function(a, b) { - this._windowEqRange() || (this._mouseController.updateCursor(e.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1}); + a.prototype.onMouseDown = function(a, c) { + this._windowEqRange() || (this._mouseController.updateCursor(g.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1}); }; - b.prototype.onMouseMove = function(a, b) { + a.prototype.onMouseMove = function(a, c) { }; - b.prototype.onMouseOver = function(a, b) { + a.prototype.onMouseOver = function(a, c) { }; - b.prototype.onMouseOut = function() { + a.prototype.onMouseOut = function() { }; - b.prototype.onDrag = function(a, b, c, e, k, l) { + a.prototype.onDrag = function(a, c, k, g, n, m) { if (a = this._dragInfo) { - k = this._toTimeRelative(-k), this._controller.setWindow(a.windowStartInitial + k, a.windowEndInitial + k); + n = this._toTimeRelative(-n), this._controller.setWindow(a.windowStartInitial + n, a.windowEndInitial + n); } }; - b.prototype.onDragEnd = function(a, b, c, k, g, l) { + a.prototype.onDragEnd = function(a, c, k, m, n, s) { this._dragInfo = null; - this._mouseController.updateCursor(e.MouseCursor.DEFAULT); + this._mouseController.updateCursor(g.MouseCursor.DEFAULT); }; - b.prototype.onClick = function(a, b) { + a.prototype.onClick = function(a, c) { this._dragInfo = null; - this._mouseController.updateCursor(e.MouseCursor.DEFAULT); + this._mouseController.updateCursor(g.MouseCursor.DEFAULT); }; - b.prototype.onHoverStart = function(a, b) { - var c = this._getFrameAtPosition(a, b); - c && (this._hoveredFrame = c, this._controller.showTooltip(this, c, a, b)); + a.prototype.onHoverStart = function(a, c) { + var k = this._getFrameAtPosition(a, c); + k && (this._hoveredFrame = k, this._controller.showTooltip(this, k, a, c)); }; - b.prototype.onHoverEnd = function() { + a.prototype.onHoverEnd = function() { this._hoveredFrame && (this._hoveredFrame = null, this._controller.hideTooltip()); }; - b.prototype.getStatistics = function(a) { - var b = this._snapshot; - b.statistics || b.calculateStatistics(); - return b.statistics[a.id]; + a.prototype.getStatistics = function(a) { + var c = this._snapshot; + c.statistics || c.calculateStatistics(); + return c.statistics[a.id]; }; - return b; - }(e.FlameChartBase); - e.FlameChart = m; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + return a; + }(g.FlameChartBase); + g.FlameChart = r; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.NumberUtilities.clamp; +(function(l) { + (function(r) { + (function(g) { + var c = l.NumberUtilities.clamp; (function(c) { c[c.OVERLAY = 0] = "OVERLAY"; c[c.STACK = 1] = "STACK"; c[c.UNION = 2] = "UNION"; - })(e.FlameChartOverviewMode || (e.FlameChartOverviewMode = {})); - var m = function(k) { - function b(a, b) { - void 0 === b && (b = 1); - this._mode = b; + })(g.FlameChartOverviewMode || (g.FlameChartOverviewMode = {})); + var r = function(m) { + function a(a, c) { + void 0 === c && (c = 1); + this._mode = c; this._overviewCanvasDirty = !0; this._overviewCanvas = document.createElement("canvas"); this._overviewContext = this._overviewCanvas.getContext("2d"); - k.call(this, a); + m.call(this, a); } - __extends(b, k); - b.prototype.setSize = function(a, b) { - k.prototype.setSize.call(this, a, b || 64); + __extends(a, m); + a.prototype.setSize = function(a, c) { + m.prototype.setSize.call(this, a, c || 64); }; - Object.defineProperty(b.prototype, "mode", {set:function(a) { + Object.defineProperty(a.prototype, "mode", {set:function(a) { this._mode = a; this.draw(); }, enumerable:!0, configurable:!0}); - b.prototype._resetCanvas = function() { - k.prototype._resetCanvas.call(this); + a.prototype._resetCanvas = function() { + m.prototype._resetCanvas.call(this); this._overviewCanvas.width = this._canvas.width; this._overviewCanvas.height = this._canvas.height; this._overviewCanvasDirty = !0; }; - b.prototype.draw = function() { - var a = this._context, b = window.devicePixelRatio, c = this._width, e = this._height; + a.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio, k = this._width, g = this._height; a.save(); - a.scale(b, b); + a.scale(c, c); a.fillStyle = this._controller.theme.bodyBackground(1); - a.fillRect(0, 0, c, e); + a.fillRect(0, 0, k, g); a.restore(); this._initialized && (this._overviewCanvasDirty && (this._drawChart(), this._overviewCanvasDirty = !1), a.drawImage(this._overviewCanvas, 0, 0), this._drawSelection()); }; - b.prototype._drawSelection = function() { - var a = this._context, b = this._height, c = window.devicePixelRatio, e = this._selection ? this._selection.left : this._toPixels(this._windowStart), k = this._selection ? this._selection.right : this._toPixels(this._windowEnd), l = this._controller.theme; + a.prototype._drawSelection = function() { + var a = this._context, c = this._height, k = window.devicePixelRatio, g = this._selection ? this._selection.left : this._toPixels(this._windowStart), n = this._selection ? this._selection.right : this._toPixels(this._windowEnd), m = this._controller.theme; a.save(); - a.scale(c, c); - this._selection ? (a.fillStyle = l.selectionText(.15), a.fillRect(e, 1, k - e, b - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(e + .5, 0, k - e - 1, 4), a.fillRect(e + .5, b - 4, k - e - 1, 4)) : (a.fillStyle = l.bodyBackground(.4), a.fillRect(0, 1, e, b - 1), a.fillRect(k, 1, this._width, b - 1)); + a.scale(k, k); + this._selection ? (a.fillStyle = m.selectionText(.15), a.fillRect(g, 1, n - g, c - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(g + .5, 0, n - g - 1, 4), a.fillRect(g + .5, c - 4, n - g - 1, 4)) : (a.fillStyle = m.bodyBackground(.4), a.fillRect(0, 1, g, c - 1), a.fillRect(n, 1, this._width, c - 1)); a.beginPath(); - a.moveTo(e, 0); - a.lineTo(e, b); - a.moveTo(k, 0); - a.lineTo(k, b); + a.moveTo(g, 0); + a.lineTo(g, c); + a.moveTo(n, 0); + a.lineTo(n, c); a.lineWidth = .5; - a.strokeStyle = l.foregroundTextGrey(1); + a.strokeStyle = m.foregroundTextGrey(1); a.stroke(); - b = Math.abs((this._selection ? this._toTime(this._selection.right) : this._windowEnd) - (this._selection ? this._toTime(this._selection.left) : this._windowStart)); - a.fillStyle = l.selectionText(.5); + c = Math.abs((this._selection ? this._toTime(this._selection.right) : this._windowEnd) - (this._selection ? this._toTime(this._selection.left) : this._windowStart)); + a.fillStyle = m.selectionText(.5); a.font = "8px sans-serif"; a.textBaseline = "alphabetic"; a.textAlign = "end"; - a.fillText(b.toFixed(2), Math.min(e, k) - 4, 10); - a.fillText((b / 60).toFixed(2), Math.min(e, k) - 4, 20); + a.fillText(c.toFixed(2), Math.min(g, n) - 4, 10); + a.fillText((c / 60).toFixed(2), Math.min(g, n) - 4, 20); a.restore(); }; - b.prototype._drawChart = function() { - var a = window.devicePixelRatio, b = this._height, c = this._controller.activeProfile, e = 4 * this._width, k = c.totalTime / e, l = this._overviewContext, g = this._controller.theme.blueHighlight(1); - l.save(); - l.translate(0, a * b); - var r = -a * b / (c.maxDepth - 1); - l.scale(a / 4, r); - l.clearRect(0, 0, e, c.maxDepth - 1); - 1 == this._mode && l.scale(1, 1 / c.snapshotCount); - for (var m = 0, h = c.snapshotCount;m < h;m++) { - var f = c.getSnapshotAt(m); + a.prototype._drawChart = function() { + var a = window.devicePixelRatio, c = this._height, k = this._controller.activeProfile, g = 4 * this._width, n = k.totalTime / g, m = this._overviewContext, l = this._controller.theme.blueHighlight(1); + m.save(); + m.translate(0, a * c); + var d = -a * c / (k.maxDepth - 1); + m.scale(a / 4, d); + m.clearRect(0, 0, g, k.maxDepth - 1); + 1 == this._mode && m.scale(1, 1 / k.snapshotCount); + for (var e = 0, b = k.snapshotCount;e < b;e++) { + var f = k.getSnapshotAt(e); if (f) { - var d = null, q = 0; - l.beginPath(); - l.moveTo(0, 0); - for (var x = 0;x < e;x++) { - q = c.startTime + x * k, q = (d = d ? d.queryNext(q) : f.query(q)) ? d.getDepth() - 1 : 0, l.lineTo(x, q); + var q = null, w = 0; + m.beginPath(); + m.moveTo(0, 0); + for (var G = 0;G < g;G++) { + w = k.startTime + G * n, w = (q = q ? q.queryNext(w) : f.query(w)) ? q.getDepth() - 1 : 0, m.lineTo(G, w); } - l.lineTo(x, 0); - l.fillStyle = g; - l.fill(); - 1 == this._mode && l.translate(0, -b * a / r); + m.lineTo(G, 0); + m.fillStyle = l; + m.fill(); + 1 == this._mode && m.translate(0, -c * a / d); } } - l.restore(); + m.restore(); }; - b.prototype._toPixelsRelative = function(a) { + a.prototype._toPixelsRelative = function(a) { return a * this._width / (this._rangeEnd - this._rangeStart); }; - b.prototype._toPixels = function(a) { + a.prototype._toPixels = function(a) { return this._toPixelsRelative(a - this._rangeStart); }; - b.prototype._toTimeRelative = function(a) { + a.prototype._toTimeRelative = function(a) { return a * (this._rangeEnd - this._rangeStart) / this._width; }; - b.prototype._toTime = function(a) { + a.prototype._toTime = function(a) { return this._toTimeRelative(a) + this._rangeStart; }; - b.prototype._getDragTargetUnderCursor = function(a, b) { - if (0 <= b && b < this._height) { - var c = this._toPixels(this._windowStart), k = this._toPixels(this._windowEnd), g = 2 + e.FlameChartBase.DRAGHANDLE_WIDTH / 2, l = a >= c - g && a <= c + g, t = a >= k - g && a <= k + g; - if (l && t) { + a.prototype._getDragTargetUnderCursor = function(a, c) { + if (0 <= c && c < this._height) { + var k = this._toPixels(this._windowStart), m = this._toPixels(this._windowEnd), n = 2 + g.FlameChartBase.DRAGHANDLE_WIDTH / 2, s = a >= k - n && a <= k + n, l = a >= m - n && a <= m + n; + if (s && l) { return 4; } - if (l) { + if (s) { return 2; } - if (t) { + if (l) { return 3; } - if (!this._windowEqRange() && a > c + g && a < k - g) { + if (!this._windowEqRange() && a > k + n && a < m - n) { return 1; } } return 0; }; - b.prototype.onMouseDown = function(a, b) { - var c = this._getDragTargetUnderCursor(a, b); - 0 === c ? (this._selection = {left:a, right:a}, this.draw()) : (1 === c && this._mouseController.updateCursor(e.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:c}); + a.prototype.onMouseDown = function(a, c) { + var k = this._getDragTargetUnderCursor(a, c); + 0 === k ? (this._selection = {left:a, right:a}, this.draw()) : (1 === k && this._mouseController.updateCursor(g.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:k}); }; - b.prototype.onMouseMove = function(a, b) { - var c = e.MouseCursor.DEFAULT, k = this._getDragTargetUnderCursor(a, b); - 0 === k || this._selection || (c = 1 === k ? e.MouseCursor.GRAB : e.MouseCursor.EW_RESIZE); - this._mouseController.updateCursor(c); + a.prototype.onMouseMove = function(a, c) { + var k = g.MouseCursor.DEFAULT, m = this._getDragTargetUnderCursor(a, c); + 0 === m || this._selection || (k = 1 === m ? g.MouseCursor.GRAB : g.MouseCursor.EW_RESIZE); + this._mouseController.updateCursor(k); }; - b.prototype.onMouseOver = function(a, b) { - this.onMouseMove(a, b); + a.prototype.onMouseOver = function(a, c) { + this.onMouseMove(a, c); }; - b.prototype.onMouseOut = function() { - this._mouseController.updateCursor(e.MouseCursor.DEFAULT); + a.prototype.onMouseOut = function() { + this._mouseController.updateCursor(g.MouseCursor.DEFAULT); }; - b.prototype.onDrag = function(a, b, p, k, g, l) { + a.prototype.onDrag = function(a, p, k, m, n, s) { if (this._selection) { - this._selection = {left:a, right:c(p, 0, this._width - 1)}, this.draw(); + this._selection = {left:a, right:c(k, 0, this._width - 1)}, this.draw(); } else { a = this._dragInfo; if (4 === a.target) { - if (0 !== g) { - a.target = 0 > g ? 2 : 3; + if (0 !== n) { + a.target = 0 > n ? 2 : 3; } else { return; } } - b = this._windowStart; - p = this._windowEnd; - g = this._toTimeRelative(g); + p = this._windowStart; + k = this._windowEnd; + n = this._toTimeRelative(n); switch(a.target) { case 1: - b = a.windowStartInitial + g; - p = a.windowEndInitial + g; + p = a.windowStartInitial + n; + k = a.windowEndInitial + n; break; case 2: - b = c(a.windowStartInitial + g, this._rangeStart, p - e.FlameChartBase.MIN_WINDOW_LEN); + p = c(a.windowStartInitial + n, this._rangeStart, k - g.FlameChartBase.MIN_WINDOW_LEN); break; case 3: - p = c(a.windowEndInitial + g, b + e.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); + k = c(a.windowEndInitial + n, p + g.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); break; default: return; } - this._controller.setWindow(b, p); + this._controller.setWindow(p, k); } }; - b.prototype.onDragEnd = function(a, b, c, e, k, l) { - this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(c))); + a.prototype.onDragEnd = function(a, c, k, g, n, m) { + this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(k))); this._dragInfo = null; - this.onMouseMove(c, e); + this.onMouseMove(k, g); }; - b.prototype.onClick = function(a, b) { + a.prototype.onClick = function(a, c) { this._selection = this._dragInfo = null; - this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, b) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, b)); + this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, c) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, c)); this.draw(); }; - b.prototype.onHoverStart = function(a, b) { + a.prototype.onHoverStart = function(a, c) { }; - b.prototype.onHoverEnd = function() { + a.prototype.onHoverEnd = function() { }; - return b; - }(e.FlameChartBase); - e.FlameChartOverview = m; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + return a; + }(g.FlameChartBase); + g.FlameChartOverview = r; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.NumberUtilities.clamp; +(function(l) { + (function(r) { + (function(g) { + var c = l.NumberUtilities.clamp; (function(c) { c[c.OVERVIEW = 0] = "OVERVIEW"; c[c.CHART = 1] = "CHART"; - })(e.FlameChartHeaderType || (e.FlameChartHeaderType = {})); - var m = function(k) { - function b(a, b) { - this._type = b; - k.call(this, a); + })(g.FlameChartHeaderType || (g.FlameChartHeaderType = {})); + var r = function(m) { + function a(a, c) { + this._type = c; + m.call(this, a); } - __extends(b, k); - b.prototype.draw = function() { - var a = this._context, b = window.devicePixelRatio, c = this._width, e = this._height; + __extends(a, m); + a.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio, k = this._width, g = this._height; a.save(); - a.scale(b, b); + a.scale(c, c); a.fillStyle = this._controller.theme.tabToolbar(1); - a.fillRect(0, 0, c, e); - this._initialized && (0 == this._type ? (b = this._toPixels(this._windowStart), c = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(b, 0, c - b, e), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(b), this._drawDragHandle(c)) : this._drawLabels(this._windowStart, this._windowEnd)); + a.fillRect(0, 0, k, g); + this._initialized && (0 == this._type ? (c = this._toPixels(this._windowStart), k = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(c, 0, k - c, g), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(c), this._drawDragHandle(k)) : this._drawLabels(this._windowStart, this._windowEnd)); a.restore(); }; - b.prototype._drawLabels = function(a, c) { - var p = this._context, e = this._calculateTickInterval(a, c), k = Math.ceil(a / e) * e, l = 500 <= e, g = l ? 1E3 : 1, r = this._decimalPlaces(e / g), l = l ? "s" : "ms", m = this._toPixels(k), h = this._height / 2, f = this._controller.theme; - p.lineWidth = 1; - p.strokeStyle = f.contentTextDarkGrey(.5); - p.fillStyle = f.contentTextDarkGrey(1); - p.textAlign = "right"; - p.textBaseline = "middle"; - p.font = "11px sans-serif"; - for (f = this._width + b.TICK_MAX_WIDTH;m < f;) { - p.fillText((k / g).toFixed(r) + " " + l, m - 7, h + 1), p.beginPath(), p.moveTo(m, 0), p.lineTo(m, this._height + 1), p.closePath(), p.stroke(), k += e, m = this._toPixels(k); + a.prototype._drawLabels = function(c, p) { + var k = this._context, g = this._calculateTickInterval(c, p), n = Math.ceil(c / g) * g, m = 500 <= g, l = m ? 1E3 : 1, d = this._decimalPlaces(g / l), m = m ? "s" : "ms", e = this._toPixels(n), b = this._height / 2, f = this._controller.theme; + k.lineWidth = 1; + k.strokeStyle = f.contentTextDarkGrey(.5); + k.fillStyle = f.contentTextDarkGrey(1); + k.textAlign = "right"; + k.textBaseline = "middle"; + k.font = "11px sans-serif"; + for (f = this._width + a.TICK_MAX_WIDTH;e < f;) { + k.fillText((n / l).toFixed(d) + " " + m, e - 7, b + 1), k.beginPath(), k.moveTo(e, 0), k.lineTo(e, this._height + 1), k.closePath(), k.stroke(), n += g, e = this._toPixels(n); } }; - b.prototype._calculateTickInterval = function(a, c) { - var e = (c - a) / (this._width / b.TICK_MAX_WIDTH), k = Math.pow(10, Math.floor(Math.log(e) / Math.LN10)), e = e / k; - return 5 < e ? 10 * k : 2 < e ? 5 * k : 1 < e ? 2 * k : k; + a.prototype._calculateTickInterval = function(c, p) { + var k = (p - c) / (this._width / a.TICK_MAX_WIDTH), g = Math.pow(10, Math.floor(Math.log(k) / Math.LN10)), k = k / g; + return 5 < k ? 10 * g : 2 < k ? 5 * g : 1 < k ? 2 * g : g; }; - b.prototype._drawDragHandle = function(a) { - var b = this._context; - b.lineWidth = 2; - b.strokeStyle = this._controller.theme.bodyBackground(1); - b.fillStyle = this._controller.theme.foregroundTextGrey(.7); - this._drawRoundedRect(b, a - e.FlameChartBase.DRAGHANDLE_WIDTH / 2, e.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2); + a.prototype._drawDragHandle = function(a) { + var c = this._context; + c.lineWidth = 2; + c.strokeStyle = this._controller.theme.bodyBackground(1); + c.fillStyle = this._controller.theme.foregroundTextGrey(.7); + this._drawRoundedRect(c, a - g.FlameChartBase.DRAGHANDLE_WIDTH / 2, g.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2); }; - b.prototype._drawRoundedRect = function(a, b, c, e) { - var k, l = !0; - void 0 === l && (l = !0); - void 0 === k && (k = !0); + a.prototype._drawRoundedRect = function(a, c, k, g) { + var n, m = !0; + void 0 === m && (m = !0); + void 0 === n && (n = !0); a.beginPath(); - a.moveTo(b + 2, 1); - a.lineTo(b + c - 2, 1); - a.quadraticCurveTo(b + c, 1, b + c, 3); - a.lineTo(b + c, 1 + e - 2); - a.quadraticCurveTo(b + c, 1 + e, b + c - 2, 1 + e); - a.lineTo(b + 2, 1 + e); - a.quadraticCurveTo(b, 1 + e, b, 1 + e - 2); - a.lineTo(b, 3); - a.quadraticCurveTo(b, 1, b + 2, 1); + a.moveTo(c + 2, 1); + a.lineTo(c + k - 2, 1); + a.quadraticCurveTo(c + k, 1, c + k, 3); + a.lineTo(c + k, 1 + g - 2); + a.quadraticCurveTo(c + k, 1 + g, c + k - 2, 1 + g); + a.lineTo(c + 2, 1 + g); + a.quadraticCurveTo(c, 1 + g, c, 1 + g - 2); + a.lineTo(c, 3); + a.quadraticCurveTo(c, 1, c + 2, 1); a.closePath(); - l && a.stroke(); - k && a.fill(); + m && a.stroke(); + n && a.fill(); }; - b.prototype._toPixelsRelative = function(a) { + a.prototype._toPixelsRelative = function(a) { return a * this._width / (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart); }; - b.prototype._toPixels = function(a) { + a.prototype._toPixels = function(a) { return this._toPixelsRelative(a - (0 === this._type ? this._rangeStart : this._windowStart)); }; - b.prototype._toTimeRelative = function(a) { + a.prototype._toTimeRelative = function(a) { return a * (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart) / this._width; }; - b.prototype._toTime = function(a) { + a.prototype._toTime = function(a) { return this._toTimeRelative(a) + (0 === this._type ? this._rangeStart : this._windowStart); }; - b.prototype._getDragTargetUnderCursor = function(a, b) { - if (0 <= b && b < this._height) { + a.prototype._getDragTargetUnderCursor = function(a, c) { + if (0 <= c && c < this._height) { if (0 === this._type) { - var c = this._toPixels(this._windowStart), k = this._toPixels(this._windowEnd), g = 2 + e.FlameChartBase.DRAGHANDLE_WIDTH / 2, c = a >= c - g && a <= c + g, k = a >= k - g && a <= k + g; - if (c && k) { + var k = this._toPixels(this._windowStart), m = this._toPixels(this._windowEnd), n = 2 + g.FlameChartBase.DRAGHANDLE_WIDTH / 2, k = a >= k - n && a <= k + n, m = a >= m - n && a <= m + n; + if (k && m) { return 4; } - if (c) { + if (k) { return 2; } - if (k) { + if (m) { return 3; } } @@ -5816,134 +6182,134 @@ __extends = this.__extends || function(g, m) { } return 0; }; - b.prototype.onMouseDown = function(a, b) { - var c = this._getDragTargetUnderCursor(a, b); - 1 === c && this._mouseController.updateCursor(e.MouseCursor.GRABBING); - this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:c}; + a.prototype.onMouseDown = function(a, c) { + var k = this._getDragTargetUnderCursor(a, c); + 1 === k && this._mouseController.updateCursor(g.MouseCursor.GRABBING); + this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:k}; }; - b.prototype.onMouseMove = function(a, b) { - var c = e.MouseCursor.DEFAULT, k = this._getDragTargetUnderCursor(a, b); - 0 !== k && (1 !== k ? c = e.MouseCursor.EW_RESIZE : 1 !== k || this._windowEqRange() || (c = e.MouseCursor.GRAB)); - this._mouseController.updateCursor(c); + a.prototype.onMouseMove = function(a, c) { + var k = g.MouseCursor.DEFAULT, m = this._getDragTargetUnderCursor(a, c); + 0 !== m && (1 !== m ? k = g.MouseCursor.EW_RESIZE : 1 !== m || this._windowEqRange() || (k = g.MouseCursor.GRAB)); + this._mouseController.updateCursor(k); }; - b.prototype.onMouseOver = function(a, b) { - this.onMouseMove(a, b); + a.prototype.onMouseOver = function(a, c) { + this.onMouseMove(a, c); }; - b.prototype.onMouseOut = function() { - this._mouseController.updateCursor(e.MouseCursor.DEFAULT); + a.prototype.onMouseOut = function() { + this._mouseController.updateCursor(g.MouseCursor.DEFAULT); }; - b.prototype.onDrag = function(a, b, p, k, g, l) { + a.prototype.onDrag = function(a, p, k, m, n, s) { a = this._dragInfo; if (4 === a.target) { - if (0 !== g) { - a.target = 0 > g ? 2 : 3; + if (0 !== n) { + a.target = 0 > n ? 2 : 3; } else { return; } } - b = this._windowStart; - p = this._windowEnd; - g = this._toTimeRelative(g); + p = this._windowStart; + k = this._windowEnd; + n = this._toTimeRelative(n); switch(a.target) { case 1: - p = 0 === this._type ? 1 : -1; - b = a.windowStartInitial + p * g; - p = a.windowEndInitial + p * g; + k = 0 === this._type ? 1 : -1; + p = a.windowStartInitial + k * n; + k = a.windowEndInitial + k * n; break; case 2: - b = c(a.windowStartInitial + g, this._rangeStart, p - e.FlameChartBase.MIN_WINDOW_LEN); + p = c(a.windowStartInitial + n, this._rangeStart, k - g.FlameChartBase.MIN_WINDOW_LEN); break; case 3: - p = c(a.windowEndInitial + g, b + e.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); + k = c(a.windowEndInitial + n, p + g.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); break; default: return; } - this._controller.setWindow(b, p); + this._controller.setWindow(p, k); }; - b.prototype.onDragEnd = function(a, b, c, e, k, l) { + a.prototype.onDragEnd = function(a, c, k, g, n, m) { this._dragInfo = null; - this.onMouseMove(c, e); + this.onMouseMove(k, g); }; - b.prototype.onClick = function(a, b) { - 1 === this._dragInfo.target && this._mouseController.updateCursor(e.MouseCursor.GRAB); + a.prototype.onClick = function(a, c) { + 1 === this._dragInfo.target && this._mouseController.updateCursor(g.MouseCursor.GRAB); }; - b.prototype.onHoverStart = function(a, b) { + a.prototype.onHoverStart = function(a, c) { }; - b.prototype.onHoverEnd = function() { + a.prototype.onHoverEnd = function() { }; - b.TICK_MAX_WIDTH = 75; - return b; - }(e.FlameChartBase); - e.FlameChartHeader = m; - })(m.Profiler || (m.Profiler = {})); - })(g.Tools || (g.Tools = {})); + a.TICK_MAX_WIDTH = 75; + return a; + }(g.FlameChartBase); + g.FlameChartHeader = r; + })(r.Profiler || (r.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { (function(c) { - var e = function() { - function b(a, b, c, e, k) { + var g = function() { + function a(a, c, k, g, n) { this.pageLoaded = a; - this.threadsTotal = b; - this.threadsLoaded = c; - this.threadFilesTotal = e; - this.threadFilesLoaded = k; + this.threadsTotal = c; + this.threadsLoaded = k; + this.threadFilesTotal = g; + this.threadFilesLoaded = n; } - b.prototype.toString = function() { - return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, b, c) { + a.prototype.toString = function() { + return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, c, k) { return a + ":" + this[a]; }, this).join(", ") + "]"; }; - return b; + return a; }(); - c.TraceLoggerProgressInfo = e; - var k = function() { - function b(a) { + c.TraceLoggerProgressInfo = g; + var m = function() { + function a(a) { this._baseUrl = a; this._threads = []; this._progressInfo = null; } - b.prototype.loadPage = function(a, b, c) { + a.prototype.loadPage = function(a, c, k) { this._threads = []; - this._pageLoadCallback = b; - this._pageLoadProgressCallback = c; - this._progressInfo = new e(!1, 0, 0, 0, 0); + this._pageLoadCallback = c; + this._pageLoadProgressCallback = k; + this._progressInfo = new g(!1, 0, 0, 0, 0); this._loadData([a], this._onLoadPage.bind(this)); }; - Object.defineProperty(b.prototype, "buffers", {get:function() { - for (var a = [], b = 0, c = this._threads.length;b < c;b++) { - a.push(this._threads[b].buffer); + Object.defineProperty(a.prototype, "buffers", {get:function() { + for (var a = [], c = 0, k = this._threads.length;c < k;c++) { + a.push(this._threads[c].buffer); } return a; }, enumerable:!0, configurable:!0}); - b.prototype._onProgress = function() { + a.prototype._onProgress = function() { this._pageLoadProgressCallback && this._pageLoadProgressCallback.call(this, this._progressInfo); }; - b.prototype._onLoadPage = function(a) { + a.prototype._onLoadPage = function(a) { if (a && 1 == a.length) { - var b = this, e = 0; + var g = this, k = 0; a = a[0]; - var k = a.length; - this._threads = Array(k); + var m = a.length; + this._threads = Array(m); this._progressInfo.pageLoaded = !0; - this._progressInfo.threadsTotal = k; - for (var g = 0;g < a.length;g++) { - var l = a[g], t = [l.dict, l.tree]; - l.corrections && t.push(l.corrections); - this._progressInfo.threadFilesTotal += t.length; - this._loadData(t, function(a) { - return function(l) { - l && (l = new c.Thread(l), l.buffer.name = "Thread " + a, b._threads[a] = l); - e++; - b._progressInfo.threadsLoaded++; - b._onProgress(); - e === k && b._pageLoadCallback.call(b, null, b._threads); + this._progressInfo.threadsTotal = m; + for (var n = 0;n < a.length;n++) { + var l = a[n], v = [l.dict, l.tree]; + l.corrections && v.push(l.corrections); + this._progressInfo.threadFilesTotal += v.length; + this._loadData(v, function(a) { + return function(e) { + e && (e = new c.Thread(e), e.buffer.name = "Thread " + a, g._threads[a] = e); + k++; + g._progressInfo.threadsLoaded++; + g._onProgress(); + k === m && g._pageLoadCallback.call(g, null, g._threads); }; - }(g), function(a) { - b._progressInfo.threadFilesLoaded++; - b._onProgress(); + }(n), function(a) { + g._progressInfo.threadFilesLoaded++; + g._onProgress(); }); } this._onProgress(); @@ -5951,49 +6317,49 @@ __extends = this.__extends || function(g, m) { this._pageLoadCallback.call(this, "Error loading page.", null); } }; - b.prototype._loadData = function(a, b, c) { - var e = 0, k = 0, l = a.length, g = []; - g.length = l; - for (var r = 0;r < l;r++) { - var m = this._baseUrl + a[r], h = new XMLHttpRequest, f = /\.tl$/i.test(m) ? "arraybuffer" : "json"; - h.open("GET", m, !0); - h.responseType = f; - h.onload = function(a, f) { - return function(h) { + a.prototype._loadData = function(a, c, g) { + var m = 0, n = 0, l = a.length, v = []; + v.length = l; + for (var d = 0;d < l;d++) { + var e = this._baseUrl + a[d], b = new XMLHttpRequest, f = /\.tl$/i.test(e) ? "arraybuffer" : "json"; + b.open("GET", e, !0); + b.responseType = f; + b.onload = function(b, f) { + return function(a) { if ("json" === f) { - if (h = this.response, "string" === typeof h) { + if (a = this.response, "string" === typeof a) { try { - h = JSON.parse(h), g[a] = h; - } catch (s) { - k++; + a = JSON.parse(a), v[b] = a; + } catch (e) { + n++; } } else { - g[a] = h; + v[b] = a; } } else { - g[a] = this.response; + v[b] = this.response; } - ++e; - c && c(e); - e === l && b(g); + ++m; + g && g(m); + m === l && c(v); }; - }(r, f); - h.send(); + }(d, f); + b.send(); } }; - b.colors = "#0044ff #8c4b00 #cc5c33 #ff80c4 #ffbfd9 #ff8800 #8c5e00 #adcc33 #b380ff #bfd9ff #ffaa00 #8c0038 #bf8f30 #f780ff #cc99c9 #aaff00 #000073 #452699 #cc8166 #cca799 #000066 #992626 #cc6666 #ccc299 #ff6600 #526600 #992663 #cc6681 #99ccc2 #ff0066 #520066 #269973 #61994d #739699 #ffcc00 #006629 #269199 #94994d #738299 #ff0000 #590000 #234d8c #8c6246 #7d7399 #ee00ff #00474d #8c2385 #8c7546 #7c8c69 #eeff00 #4d003d #662e1a #62468c #8c6969 #6600ff #4c2900 #1a6657 #8c464f #8c6981 #44ff00 #401100 #1a2466 #663355 #567365 #d90074 #403300 #101d40 #59562d #66614d #cc0000 #002b40 #234010 #4c2626 #4d5e66 #00a3cc #400011 #231040 #4c3626 #464359 #0000bf #331b00 #80e6ff #311a33 #4d3939 #a69b00 #003329 #80ffb2 #331a20 #40303d #00a658 #40ffd9 #ffc480 #ffe1bf #332b26 #8c2500 #9933cc #80fff6 #ffbfbf #303326 #005e8c #33cc47 #b2ff80 #c8bfff #263332 #00708c #cc33ad #ffe680 #f2ffbf #262a33 #388c00 #335ccc #8091ff #bfffd9".split(" "); - return b; + a.colors = "#0044ff #8c4b00 #cc5c33 #ff80c4 #ffbfd9 #ff8800 #8c5e00 #adcc33 #b380ff #bfd9ff #ffaa00 #8c0038 #bf8f30 #f780ff #cc99c9 #aaff00 #000073 #452699 #cc8166 #cca799 #000066 #992626 #cc6666 #ccc299 #ff6600 #526600 #992663 #cc6681 #99ccc2 #ff0066 #520066 #269973 #61994d #739699 #ffcc00 #006629 #269199 #94994d #738299 #ff0000 #590000 #234d8c #8c6246 #7d7399 #ee00ff #00474d #8c2385 #8c7546 #7c8c69 #eeff00 #4d003d #662e1a #62468c #8c6969 #6600ff #4c2900 #1a6657 #8c464f #8c6981 #44ff00 #401100 #1a2466 #663355 #567365 #d90074 #403300 #101d40 #59562d #66614d #cc0000 #002b40 #234010 #4c2626 #4d5e66 #00a3cc #400011 #231040 #4c3626 #464359 #0000bf #331b00 #80e6ff #311a33 #4d3939 #a69b00 #003329 #80ffb2 #331a20 #40303d #00a658 #40ffd9 #ffc480 #ffe1bf #332b26 #8c2500 #9933cc #80fff6 #ffbfbf #303326 #005e8c #33cc47 #b2ff80 #c8bfff #263332 #00708c #cc33ad #ffe680 #f2ffbf #262a33 #388c00 #335ccc #8091ff #bfffd9".split(" "); + return a; }(); - c.TraceLogger = k; - })(e.TraceLogger || (e.TraceLogger = {})); - })(g.Profiler || (g.Profiler = {})); - })(g.Tools || (g.Tools = {})); + c.TraceLogger = m; + })(g.TraceLogger || (g.TraceLogger = {})); + })(l.Profiler || (l.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { (function(c) { - var g; + var l; (function(c) { c[c.START_HI = 0] = "START_HI"; c[c.START_LO = 4] = "START_LO"; @@ -6001,37 +6367,37 @@ __extends = this.__extends || function(g, m) { c[c.STOP_LO = 12] = "STOP_LO"; c[c.TEXTID = 16] = "TEXTID"; c[c.NEXTID = 20] = "NEXTID"; - })(g || (g = {})); - g = function() { - function c(b) { - 2 <= b.length && (this._text = b[0], this._data = new DataView(b[1]), this._buffer = new e.TimelineBuffer, this._walkTree(0)); + })(l || (l = {})); + l = function() { + function c(a) { + 2 <= a.length && (this._text = a[0], this._data = new DataView(a[1]), this._buffer = new g.TimelineBuffer, this._walkTree(0)); } Object.defineProperty(c.prototype, "buffer", {get:function() { return this._buffer; }, enumerable:!0, configurable:!0}); - c.prototype._walkTree = function(b) { - var a = this._data, e = this._buffer; + c.prototype._walkTree = function(a) { + var h = this._data, g = this._buffer; do { - var g = b * c.ITEM_SIZE, m = 4294967295 * a.getUint32(g + 0) + a.getUint32(g + 4), v = 4294967295 * a.getUint32(g + 8) + a.getUint32(g + 12), l = a.getUint32(g + 16), g = a.getUint32(g + 20), t = 1 === (l & 1), l = l >>> 1, l = this._text[l]; - e.enter(l, null, m / 1E6); - t && this._walkTree(b + 1); - e.leave(l, null, v / 1E6); - b = g; - } while (0 !== b); + var k = a * c.ITEM_SIZE, l = 4294967295 * h.getUint32(k + 0) + h.getUint32(k + 4), n = 4294967295 * h.getUint32(k + 8) + h.getUint32(k + 12), s = h.getUint32(k + 16), k = h.getUint32(k + 20), v = 1 === (s & 1), s = s >>> 1, s = this._text[s]; + g.enter(s, null, l / 1E6); + v && this._walkTree(a + 1); + g.leave(s, null, n / 1E6); + a = k; + } while (0 !== a); }; c.ITEM_SIZE = 24; return c; }(); - c.Thread = g; - })(e.TraceLogger || (e.TraceLogger = {})); - })(g.Profiler || (g.Profiler = {})); - })(g.Tools || (g.Tools = {})); + c.Thread = l; + })(g.TraceLogger || (g.TraceLogger = {})); + })(l.Profiler || (l.Profiler = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.NumberUtilities.clamp, m = function() { - function b() { +(function(l) { + (function(r) { + (function(g) { + var c = l.NumberUtilities.clamp, r = function() { + function a() { this.length = 0; this.lines = []; this.format = []; @@ -6039,27 +6405,27 @@ __extends = this.__extends || function(g, m) { this.repeat = []; this.length = 0; } - b.prototype.append = function(a, b) { - var c = this.lines; - 0 < c.length && c[c.length - 1] === a ? this.repeat[c.length - 1]++ : (this.lines.push(a), this.repeat.push(1), this.format.push(b ? {backgroundFillStyle:b} : void 0), this.time.push(performance.now()), this.length++); + a.prototype.append = function(a, c) { + var g = this.lines; + 0 < g.length && g[g.length - 1] === a ? this.repeat[g.length - 1]++ : (this.lines.push(a), this.repeat.push(1), this.format.push(c ? {backgroundFillStyle:c} : void 0), this.time.push(performance.now()), this.length++); }; - b.prototype.get = function(a) { + a.prototype.get = function(a) { return this.lines[a]; }; - b.prototype.getFormat = function(a) { + a.prototype.getFormat = function(a) { return this.format[a]; }; - b.prototype.getTime = function(a) { + a.prototype.getTime = function(a) { return this.time[a]; }; - b.prototype.getRepeat = function(a) { + a.prototype.getRepeat = function(a) { return this.repeat[a]; }; - return b; + return a; }(); - e.Buffer = m; - var k = function() { - function b(a) { + g.Buffer = r; + var m = function() { + function a(a) { this.lineColor = "#2A2A2A"; this.alternateLineColor = "#262626"; this.textColor = "#FFFFFF"; @@ -6081,158 +6447,158 @@ __extends = this.__extends || function(g, m) { this._resizeHandler(); this.textMarginBottom = this.textMarginLeft = 4; this.refreshFrequency = 0; - this.buffer = new m; + this.buffer = new r; a.addEventListener("keydown", function(a) { - var s = 0; + var h = 0; switch(a.keyCode) { - case d: + case q: this.showLineNumbers = !this.showLineNumbers; break; - case q: + case w: this.showLineTime = !this.showLineTime; break; case l: - s = -1; + h = -1; break; - case k: - s = 1; - break; - case b: - s = -this.pageLineCount; + case v: + h = 1; break; case c: - s = this.pageLineCount; - break; - case e: - s = -this.lineIndex; + h = -this.pageLineCount; break; case g: - s = this.buffer.length - this.lineIndex; + h = this.pageLineCount; break; - case r: + case m: + h = -this.lineIndex; + break; + case n: + h = this.buffer.length - this.lineIndex; + break; + case d: this.columnIndex -= a.metaKey ? 10 : 1; 0 > this.columnIndex && (this.columnIndex = 0); a.preventDefault(); break; - case u: + case e: this.columnIndex += a.metaKey ? 10 : 1; a.preventDefault(); break; - case h: + case b: a.metaKey && (this.selection = {start:0, end:this.buffer.length}, a.preventDefault()); break; case f: if (a.metaKey) { - var O = ""; + var V = ""; if (this.selection) { - for (var T = this.selection.start;T <= this.selection.end;T++) { - O += this.buffer.get(T) + "\n"; + for (var Q = this.selection.start;Q <= this.selection.end;Q++) { + V += this.buffer.get(Q) + "\n"; } } else { - O = this.buffer.get(this.lineIndex); + V = this.buffer.get(this.lineIndex); } - alert(O); + alert(V); } ; } - a.metaKey && (s *= this.pageLineCount); - s && (this.scroll(s), a.preventDefault()); - s && a.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < s ? this.selection = {start:this.lineIndex - s, end:this.lineIndex} : 0 > s && (this.selection = {start:this.lineIndex, end:this.lineIndex - s}) : s && (this.selection = null); + a.metaKey && (h *= this.pageLineCount); + h && (this.scroll(h), a.preventDefault()); + h && a.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < h ? this.selection = {start:this.lineIndex - h, end:this.lineIndex} : 0 > h && (this.selection = {start:this.lineIndex, end:this.lineIndex - h}) : h && (this.selection = null); this.paint(); }.bind(this), !1); - a.addEventListener("focus", function(a) { + a.addEventListener("focus", function(b) { this.hasFocus = !0; }.bind(this), !1); - a.addEventListener("blur", function(a) { + a.addEventListener("blur", function(b) { this.hasFocus = !1; }.bind(this), !1); - var b = 33, c = 34, e = 36, g = 35, l = 38, k = 40, r = 37, u = 39, h = 65, f = 67, d = 78, q = 84; + var c = 33, g = 34, m = 36, n = 35, l = 38, v = 40, d = 37, e = 39, b = 65, f = 67, q = 78, w = 84; } - b.prototype.resize = function() { + a.prototype.resize = function() { this._resizeHandler(); }; - b.prototype._resizeHandler = function() { - var a = this.canvas.parentElement, b = a.clientWidth, a = a.clientHeight - 1, c = window.devicePixelRatio || 1; - 1 !== c ? (this.ratio = c / 1, this.canvas.width = b * this.ratio, this.canvas.height = a * this.ratio, this.canvas.style.width = b + "px", this.canvas.style.height = a + "px") : (this.ratio = 1, this.canvas.width = b, this.canvas.height = a); + a.prototype._resizeHandler = function() { + var a = this.canvas.parentElement, c = a.clientWidth, a = a.clientHeight - 1, g = window.devicePixelRatio || 1; + 1 !== g ? (this.ratio = g / 1, this.canvas.width = c * this.ratio, this.canvas.height = a * this.ratio, this.canvas.style.width = c + "px", this.canvas.style.height = a + "px") : (this.ratio = 1, this.canvas.width = c, this.canvas.height = a); this.pageLineCount = Math.floor(this.canvas.height / this.lineHeight); }; - b.prototype.gotoLine = function(a) { + a.prototype.gotoLine = function(a) { this.lineIndex = c(a, 0, this.buffer.length - 1); }; - b.prototype.scrollIntoView = function() { + a.prototype.scrollIntoView = function() { this.lineIndex < this.pageIndex ? this.pageIndex = this.lineIndex : this.lineIndex >= this.pageIndex + this.pageLineCount && (this.pageIndex = this.lineIndex - this.pageLineCount + 1); }; - b.prototype.scroll = function(a) { + a.prototype.scroll = function(a) { this.gotoLine(this.lineIndex + a); this.scrollIntoView(); }; - b.prototype.paint = function() { + a.prototype.paint = function() { var a = this.pageLineCount; this.pageIndex + a > this.buffer.length && (a = this.buffer.length - this.pageIndex); - var b = this.textMarginLeft, c = b + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), e = c + (this.showLineTime ? 40 : 10), g = e + 25; + var c = this.textMarginLeft, g = c + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), m = g + (this.showLineTime ? 40 : 10), n = m + 25; this.context.font = this.fontSize + 'px Consolas, "Liberation Mono", Courier, monospace'; this.context.setTransform(this.ratio, 0, 0, this.ratio, 0, 0); - for (var l = this.canvas.width, k = this.lineHeight, r = 0;r < a;r++) { - var m = r * this.lineHeight, h = this.pageIndex + r, f = this.buffer.get(h), d = this.buffer.getFormat(h), q = this.buffer.getRepeat(h), x = 1 < h ? this.buffer.getTime(h) - this.buffer.getTime(0) : 0; - this.context.fillStyle = h % 2 ? this.lineColor : this.alternateLineColor; - d && d.backgroundFillStyle && (this.context.fillStyle = d.backgroundFillStyle); - this.context.fillRect(0, m, l, k); + for (var l = this.canvas.width, v = this.lineHeight, d = 0;d < a;d++) { + var e = d * this.lineHeight, b = this.pageIndex + d, f = this.buffer.get(b), q = this.buffer.getFormat(b), w = this.buffer.getRepeat(b), G = 1 < b ? this.buffer.getTime(b) - this.buffer.getTime(0) : 0; + this.context.fillStyle = b % 2 ? this.lineColor : this.alternateLineColor; + q && q.backgroundFillStyle && (this.context.fillStyle = q.backgroundFillStyle); + this.context.fillRect(0, e, l, v); this.context.fillStyle = this.selectionTextColor; this.context.fillStyle = this.textColor; - this.selection && h >= this.selection.start && h <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, m, l, k), this.context.fillStyle = this.selectionTextColor); - this.hasFocus && h === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, m, l, k), this.context.fillStyle = this.selectionTextColor); + this.selection && b >= this.selection.start && b <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, e, l, v), this.context.fillStyle = this.selectionTextColor); + this.hasFocus && b === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, e, l, v), this.context.fillStyle = this.selectionTextColor); 0 < this.columnIndex && (f = f.substring(this.columnIndex)); - m = (r + 1) * this.lineHeight - this.textMarginBottom; - this.showLineNumbers && this.context.fillText(String(h), b, m); - this.showLineTime && this.context.fillText(x.toFixed(1).padLeft(" ", 6), c, m); - 1 < q && this.context.fillText(String(q).padLeft(" ", 3), e, m); - this.context.fillText(f, g, m); + e = (d + 1) * this.lineHeight - this.textMarginBottom; + this.showLineNumbers && this.context.fillText(String(b), c, e); + this.showLineTime && this.context.fillText(G.toFixed(1).padLeft(" ", 6), g, e); + 1 < w && this.context.fillText(String(w).padLeft(" ", 3), m, e); + this.context.fillText(f, n, e); } }; - b.prototype.refreshEvery = function(a) { - function b() { - c.paint(); - c.refreshFrequency && setTimeout(b, c.refreshFrequency); + a.prototype.refreshEvery = function(a) { + function c() { + g.paint(); + g.refreshFrequency && setTimeout(c, g.refreshFrequency); } - var c = this; + var g = this; this.refreshFrequency = a; - c.refreshFrequency && setTimeout(b, c.refreshFrequency); + g.refreshFrequency && setTimeout(c, g.refreshFrequency); }; - b.prototype.isScrolledToBottom = function() { + a.prototype.isScrolledToBottom = function() { return this.lineIndex === this.buffer.length - 1; }; - return b; + return a; }(); - e.Terminal = k; - })(m.Terminal || (m.Terminal = {})); - })(g.Tools || (g.Tools = {})); + g.Terminal = m; + })(r.Terminal || (r.Terminal = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { +(function(l) { + (function(l) { + (function(g) { var c = function() { - function c(e) { + function c(g) { this._lastWeightedTime = this._lastTime = this._index = 0; this._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); - this._container = e; + this._container = g; this._canvas = document.createElement("canvas"); this._container.appendChild(this._canvas); this._context = this._canvas.getContext("2d"); this._listenForContainerSizeChanges(); } c.prototype._listenForContainerSizeChanges = function() { - var c = this._containerWidth, b = this._containerHeight; + var c = this._containerWidth, a = this._containerHeight; this._onContainerSizeChanged(); - var a = this; + var h = this; setInterval(function() { - if (c !== a._containerWidth || b !== a._containerHeight) { - a._onContainerSizeChanged(), c = a._containerWidth, b = a._containerHeight; + if (c !== h._containerWidth || a !== h._containerHeight) { + h._onContainerSizeChanged(), c = h._containerWidth, a = h._containerHeight; } }, 10); }; c.prototype._onContainerSizeChanged = function() { - var c = this._containerWidth, b = this._containerHeight, a = window.devicePixelRatio || 1; - 1 !== a ? (this._ratio = a / 1, this._canvas.width = c * this._ratio, this._canvas.height = b * this._ratio, this._canvas.style.width = c + "px", this._canvas.style.height = b + "px") : (this._ratio = 1, this._canvas.width = c, this._canvas.height = b); + var c = this._containerWidth, a = this._containerHeight, h = window.devicePixelRatio || 1; + 1 !== h ? (this._ratio = h / 1, this._canvas.width = c * this._ratio, this._canvas.height = a * this._ratio, this._canvas.style.width = c + "px", this._canvas.style.height = a + "px") : (this._ratio = 1, this._canvas.width = c, this._canvas.height = a); }; Object.defineProperty(c.prototype, "_containerWidth", {get:function() { return this._container.clientWidth; @@ -6240,421 +6606,417 @@ __extends = this.__extends || function(g, m) { Object.defineProperty(c.prototype, "_containerHeight", {get:function() { return this._container.clientHeight; }, enumerable:!0, configurable:!0}); - c.prototype.tickAndRender = function(c, b) { + c.prototype.tickAndRender = function(c, a) { void 0 === c && (c = !1); - void 0 === b && (b = 0); + void 0 === a && (a = 0); if (0 === this._lastTime) { this._lastTime = performance.now(); } else { - var a = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, e = this._context, g = 2 * this._ratio, m = 30 * this._ratio, v = performance; - v.memory && (m += 30 * this._ratio); - var l = (this._canvas.width - m) / (g + 1) | 0, t = this._index++; - this._index > l && (this._index = 0); - l = this._canvas.height; - e.globalAlpha = 1; - e.fillStyle = "black"; - e.fillRect(m + t * (g + 1), 0, 4 * g, this._canvas.height); - var r = Math.min(1E3 / 60 / a, 1); - e.fillStyle = "#00FF00"; - e.globalAlpha = c ? .5 : 1; - r = l / 2 * r | 0; - e.fillRect(m + t * (g + 1), l - r, g, r); - b && (r = Math.min(1E3 / 240 / b, 1), e.fillStyle = "#FF6347", r = l / 2 * r | 0, e.fillRect(m + t * (g + 1), l / 2 - r, g, r)); - 0 === t % 16 && (e.globalAlpha = 1, e.fillStyle = "black", e.fillRect(0, 0, m, this._canvas.height), e.fillStyle = "white", e.font = 8 * this._ratio + "px Arial", e.textBaseline = "middle", g = (1E3 / a).toFixed(0), b && (g += " " + b.toFixed(0)), v.memory && (g += " " + (v.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), e.fillText(g, 2 * this._ratio, this._containerHeight / 2 * this._ratio)); + var h = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, g = this._context, k = 2 * this._ratio, l = 30 * this._ratio, n = performance; + n.memory && (l += 30 * this._ratio); + var s = (this._canvas.width - l) / (k + 1) | 0, v = this._index++; + this._index > s && (this._index = 0); + s = this._canvas.height; + g.globalAlpha = 1; + g.fillStyle = "black"; + g.fillRect(l + v * (k + 1), 0, 4 * k, this._canvas.height); + var d = Math.min(1E3 / 60 / h, 1); + g.fillStyle = "#00FF00"; + g.globalAlpha = c ? .5 : 1; + d = s / 2 * d | 0; + g.fillRect(l + v * (k + 1), s - d, k, d); + a && (d = Math.min(1E3 / 240 / a, 1), g.fillStyle = "#FF6347", d = s / 2 * d | 0, g.fillRect(l + v * (k + 1), s / 2 - d, k, d)); + 0 === v % 16 && (g.globalAlpha = 1, g.fillStyle = "black", g.fillRect(0, 0, l, this._canvas.height), g.fillStyle = "white", g.font = 8 * this._ratio + "px Arial", g.textBaseline = "middle", k = (1E3 / h).toFixed(0), a && (k += " " + a.toFixed(0)), n.memory && (k += " " + (n.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), g.fillText(k, 2 * this._ratio, this._containerHeight / 2 * this._ratio)); this._lastTime = performance.now(); - this._lastWeightedTime = a; + this._lastWeightedTime = h; } }; return c; }(); - e.FPS = c; - })(g.Mini || (g.Mini = {})); - })(g.Tools || (g.Tools = {})); + g.FPS = c; + })(l.Mini || (l.Mini = {})); + })(l.Tools || (l.Tools = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load Shared Dependencies"); console.time("Load GFX Dependencies"); -(function(g) { - (function(m) { - function e(a, d, f) { - return p && f ? "string" === typeof d ? (a = g.ColorUtilities.cssStyleToRGBA(d), g.ColorUtilities.rgbaToCSSStyle(f.transformRGBA(a))) : d instanceof CanvasGradient && d._template ? d._template.createCanvasGradient(a, f) : d : d; +(function(l) { + (function(r) { + function g(b, f, a) { + return p && a ? "string" === typeof f ? (b = l.ColorUtilities.cssStyleToRGBA(f), l.ColorUtilities.rgbaToCSSStyle(a.transformRGBA(b))) : f instanceof CanvasGradient && f._template ? f._template.createCanvasGradient(b, a) : f : f; } - var c = g.Debug.assert, w = g.NumberUtilities.clamp; - (function(a) { - a[a.None = 0] = "None"; - a[a.Brief = 1] = "Brief"; - a[a.Verbose = 2] = "Verbose"; - })(m.TraceLevel || (m.TraceLevel = {})); - var k = g.Metrics.Counter.instance; - m.frameCounter = new g.Metrics.Counter(!0); - m.traceLevel = 2; - m.writer = null; - m.frameCount = function(a) { - k.count(a); - m.frameCounter.count(a); + var c = l.NumberUtilities.clamp; + (function(b) { + b[b.None = 0] = "None"; + b[b.Brief = 1] = "Brief"; + b[b.Verbose = 2] = "Verbose"; + })(r.TraceLevel || (r.TraceLevel = {})); + var t = l.Metrics.Counter.instance; + r.frameCounter = new l.Metrics.Counter(!0); + r.traceLevel = 2; + r.writer = null; + r.frameCount = function(b) { + t.count(b); + r.frameCounter.count(b); }; - m.timelineBuffer = new g.Tools.Profiler.TimelineBuffer("GFX"); - m.enterTimeline = function(a, d) { + r.timelineBuffer = new l.Tools.Profiler.TimelineBuffer("GFX"); + r.enterTimeline = function(b, f) { }; - m.leaveTimeline = function(a, d) { + r.leaveTimeline = function(b, f) { }; - var b = null, a = null, n = null, p = !0; - p && "undefined" !== typeof CanvasRenderingContext2D && (b = CanvasGradient.prototype.addColorStop, a = CanvasRenderingContext2D.prototype.createLinearGradient, n = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(a, d, f, b) { - return(new v(a, d, f, b)).createCanvasGradient(this, null); - }, CanvasRenderingContext2D.prototype.createRadialGradient = function(a, d, f, b, c, q) { - return(new l(a, d, f, b, c, q)).createCanvasGradient(this, null); - }, CanvasGradient.prototype.addColorStop = function(a, d) { - b.call(this, a, d); - this._template.addColorStop(a, d); + var m = null, a = null, h = null, p = !0; + p && "undefined" !== typeof CanvasRenderingContext2D && (m = CanvasGradient.prototype.addColorStop, a = CanvasRenderingContext2D.prototype.createLinearGradient, h = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(b, f, a, e) { + return(new u(b, f, a, e)).createCanvasGradient(this, null); + }, CanvasRenderingContext2D.prototype.createRadialGradient = function(b, f, a, e, d, c) { + return(new n(b, f, a, e, d, c)).createCanvasGradient(this, null); + }, CanvasGradient.prototype.addColorStop = function(b, f) { + m.call(this, b, f); + this._template.addColorStop(b, f); }); - var y = function() { - return function(a, d) { - this.offset = a; - this.color = d; + var k = function() { + return function(b, f) { + this.offset = b; + this.color = f; }; - }(), v = function() { - function d(a, f, b, c) { - this.x0 = a; - this.y0 = f; - this.x1 = b; + }(), u = function() { + function b(f, a, e, d) { + this.x0 = f; + this.y0 = a; + this.x1 = e; + this.y1 = d; + this.colorStops = []; + } + b.prototype.addColorStop = function(b, f) { + this.colorStops.push(new k(b, f)); + }; + b.prototype.createCanvasGradient = function(b, f) { + for (var e = a.call(b, this.x0, this.y0, this.x1, this.y1), d = this.colorStops, c = 0;c < d.length;c++) { + var q = d[c], w = q.offset, q = q.color, q = f ? g(b, q, f) : q; + m.call(e, w, q); + } + e._template = this; + e._transform = this._transform; + return e; + }; + return b; + }(), n = function() { + function b(f, a, e, d, c, q) { + this.x0 = f; + this.y0 = a; + this.r0 = e; + this.x1 = d; this.y1 = c; + this.r1 = q; this.colorStops = []; } - d.prototype.addColorStop = function(a, d) { - this.colorStops.push(new y(a, d)); + b.prototype.addColorStop = function(b, f) { + this.colorStops.push(new k(b, f)); }; - d.prototype.createCanvasGradient = function(d, f) { - for (var c = a.call(d, this.x0, this.y0, this.x1, this.y1), q = this.colorStops, h = 0;h < q.length;h++) { - var s = q[h], x = s.offset, s = s.color, s = f ? e(d, s, f) : s; - b.call(c, x, s); + b.prototype.createCanvasGradient = function(b, f) { + for (var a = h.call(b, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), e = this.colorStops, d = 0;d < e.length;d++) { + var c = e[d], q = c.offset, c = c.color, c = f ? g(b, c, f) : c; + m.call(a, q, c); } - c._template = this; - c._transform = this._transform; - return c; + a._template = this; + a._transform = this._transform; + return a; }; - return d; - }(), l = function() { - function a(d, f, b, c, q, h) { - this.x0 = d; - this.y0 = f; - this.r0 = b; - this.x1 = c; - this.y1 = q; - this.r1 = h; - this.colorStops = []; - } - a.prototype.addColorStop = function(a, d) { - this.colorStops.push(new y(a, d)); - }; - a.prototype.createCanvasGradient = function(a, d) { - for (var f = n.call(a, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), c = this.colorStops, q = 0;q < c.length;q++) { - var h = c[q], s = h.offset, h = h.color, h = d ? e(a, h, d) : h; - b.call(f, s, h); - } - f._template = this; - f._transform = this._transform; - return f; - }; - return a; - }(), t; - (function(a) { - a[a.ClosePath = 1] = "ClosePath"; - a[a.MoveTo = 2] = "MoveTo"; - a[a.LineTo = 3] = "LineTo"; - a[a.QuadraticCurveTo = 4] = "QuadraticCurveTo"; - a[a.BezierCurveTo = 5] = "BezierCurveTo"; - a[a.ArcTo = 6] = "ArcTo"; - a[a.Rect = 7] = "Rect"; - a[a.Arc = 8] = "Arc"; - a[a.Save = 9] = "Save"; - a[a.Restore = 10] = "Restore"; - a[a.Transform = 11] = "Transform"; - })(t || (t = {})); - var r = function() { - function a(d) { - this._commands = new Uint8Array(a._arrayBufferPool.acquire(8), 0, 8); + return b; + }(), s; + (function(b) { + b[b.ClosePath = 1] = "ClosePath"; + b[b.MoveTo = 2] = "MoveTo"; + b[b.LineTo = 3] = "LineTo"; + b[b.QuadraticCurveTo = 4] = "QuadraticCurveTo"; + b[b.BezierCurveTo = 5] = "BezierCurveTo"; + b[b.ArcTo = 6] = "ArcTo"; + b[b.Rect = 7] = "Rect"; + b[b.Arc = 8] = "Arc"; + b[b.Save = 9] = "Save"; + b[b.Restore = 10] = "Restore"; + b[b.Transform = 11] = "Transform"; + })(s || (s = {})); + var v = function() { + function b(f) { + this._commands = new Uint8Array(b._arrayBufferPool.acquire(8), 0, 8); this._commandPosition = 0; - this._data = new Float64Array(a._arrayBufferPool.acquire(8 * Float64Array.BYTES_PER_ELEMENT), 0, 8); + this._data = new Float64Array(b._arrayBufferPool.acquire(8 * Float64Array.BYTES_PER_ELEMENT), 0, 8); this._dataPosition = 0; - d instanceof a && this.addPath(d); + f instanceof b && this.addPath(f); } - a._apply = function(a, d) { - var f = a._commands, b = a._data, c = 0, q = 0; - d.beginPath(); - for (var h = a._commandPosition;c < h;) { - switch(f[c++]) { + b._apply = function(b, f) { + var a = b._commands, e = b._data, d = 0, c = 0; + f.beginPath(); + for (var q = b._commandPosition;d < q;) { + switch(a[d++]) { case 1: - d.closePath(); + f.closePath(); break; case 2: - d.moveTo(b[q++], b[q++]); + f.moveTo(e[c++], e[c++]); break; case 3: - d.lineTo(b[q++], b[q++]); + f.lineTo(e[c++], e[c++]); break; case 4: - d.quadraticCurveTo(b[q++], b[q++], b[q++], b[q++]); + f.quadraticCurveTo(e[c++], e[c++], e[c++], e[c++]); break; case 5: - d.bezierCurveTo(b[q++], b[q++], b[q++], b[q++], b[q++], b[q++]); + f.bezierCurveTo(e[c++], e[c++], e[c++], e[c++], e[c++], e[c++]); break; case 6: - d.arcTo(b[q++], b[q++], b[q++], b[q++], b[q++]); + f.arcTo(e[c++], e[c++], e[c++], e[c++], e[c++]); break; case 7: - d.rect(b[q++], b[q++], b[q++], b[q++]); + f.rect(e[c++], e[c++], e[c++], e[c++]); break; case 8: - d.arc(b[q++], b[q++], b[q++], b[q++], b[q++], !!b[q++]); + f.arc(e[c++], e[c++], e[c++], e[c++], e[c++], !!e[c++]); break; case 9: - d.save(); + f.save(); break; case 10: - d.restore(); + f.restore(); break; case 11: - d.transform(b[q++], b[q++], b[q++], b[q++], b[q++], b[q++]); + f.transform(e[c++], e[c++], e[c++], e[c++], e[c++], e[c++]); } } }; - a.prototype._ensureCommandCapacity = function(d) { - this._commands = a._arrayBufferPool.ensureUint8ArrayLength(this._commands, d); + b.prototype._ensureCommandCapacity = function(f) { + this._commands = b._arrayBufferPool.ensureUint8ArrayLength(this._commands, f); }; - a.prototype._ensureDataCapacity = function(d) { - this._data = a._arrayBufferPool.ensureFloat64ArrayLength(this._data, d); + b.prototype._ensureDataCapacity = function(f) { + this._data = b._arrayBufferPool.ensureFloat64ArrayLength(this._data, f); }; - a.prototype._writeCommand = function(a) { + b.prototype._writeCommand = function(b) { this._commandPosition >= this._commands.length && this._ensureCommandCapacity(this._commandPosition + 1); - this._commands[this._commandPosition++] = a; + this._commands[this._commandPosition++] = b; }; - a.prototype._writeData = function(a, d, f, b, q, h) { - var s = arguments.length; - c(6 >= s && (0 === s % 2 || 5 === s)); - this._dataPosition + s >= this._data.length && this._ensureDataCapacity(this._dataPosition + s); - var x = this._data, e = this._dataPosition; - x[e] = a; - x[e + 1] = d; - 2 < s && (x[e + 2] = f, x[e + 3] = b, 4 < s && (x[e + 4] = q, 6 === s && (x[e + 5] = h))); - this._dataPosition += s; + b.prototype._writeData = function(b, f, a, e, c, d) { + var q = arguments.length; + this._dataPosition + q >= this._data.length && this._ensureDataCapacity(this._dataPosition + q); + var w = this._data, h = this._dataPosition; + w[h] = b; + w[h + 1] = f; + 2 < q && (w[h + 2] = a, w[h + 3] = e, 4 < q && (w[h + 4] = c, 6 === q && (w[h + 5] = d))); + this._dataPosition += q; }; - a.prototype.closePath = function() { + b.prototype.closePath = function() { this._writeCommand(1); }; - a.prototype.moveTo = function(a, d) { + b.prototype.moveTo = function(b, f) { this._writeCommand(2); - this._writeData(a, d); + this._writeData(b, f); }; - a.prototype.lineTo = function(a, d) { + b.prototype.lineTo = function(b, f) { this._writeCommand(3); - this._writeData(a, d); + this._writeData(b, f); }; - a.prototype.quadraticCurveTo = function(a, d, f, b) { + b.prototype.quadraticCurveTo = function(b, f, a, e) { this._writeCommand(4); - this._writeData(a, d, f, b); + this._writeData(b, f, a, e); }; - a.prototype.bezierCurveTo = function(a, d, f, b, c, q) { + b.prototype.bezierCurveTo = function(b, f, a, e, c, d) { this._writeCommand(5); - this._writeData(a, d, f, b, c, q); + this._writeData(b, f, a, e, c, d); }; - a.prototype.arcTo = function(a, d, f, b, c) { + b.prototype.arcTo = function(b, f, a, e, c) { this._writeCommand(6); - this._writeData(a, d, f, b, c); + this._writeData(b, f, a, e, c); }; - a.prototype.rect = function(a, d, f, b) { + b.prototype.rect = function(b, f, a, e) { this._writeCommand(7); - this._writeData(a, d, f, b); + this._writeData(b, f, a, e); }; - a.prototype.arc = function(a, d, f, b, c, q) { + b.prototype.arc = function(b, f, a, e, c, d) { this._writeCommand(8); - this._writeData(a, d, f, b, c, +q); + this._writeData(b, f, a, e, c, +d); }; - a.prototype.addPath = function(a, d) { - d && (this._writeCommand(9), this._writeCommand(11), this._writeData(d.a, d.b, d.c, d.d, d.e, d.f)); - var f = this._commandPosition + a._commandPosition; - f >= this._commands.length && this._ensureCommandCapacity(f); - for (var b = this._commands, c = a._commands, q = this._commandPosition, h = 0;q < f;q++) { - b[q] = c[h++]; + b.prototype.addPath = function(b, f) { + f && (this._writeCommand(9), this._writeCommand(11), this._writeData(f.a, f.b, f.c, f.d, f.e, f.f)); + var a = this._commandPosition + b._commandPosition; + a >= this._commands.length && this._ensureCommandCapacity(a); + for (var e = this._commands, c = b._commands, d = this._commandPosition, q = 0;d < a;d++) { + e[d] = c[q++]; } - this._commandPosition = f; - f = this._dataPosition + a._dataPosition; - f >= this._data.length && this._ensureDataCapacity(f); - b = this._data; - c = a._data; - q = this._dataPosition; - for (h = 0;q < f;q++) { - b[q] = c[h++]; + this._commandPosition = a; + a = this._dataPosition + b._dataPosition; + a >= this._data.length && this._ensureDataCapacity(a); + e = this._data; + c = b._data; + d = this._dataPosition; + for (q = 0;d < a;d++) { + e[d] = c[q++]; } - this._dataPosition = f; - d && this._writeCommand(10); + this._dataPosition = a; + f && this._writeCommand(10); }; - a._arrayBufferPool = new g.ArrayBufferPool; - return a; + b._arrayBufferPool = new l.ArrayBufferPool; + return b; }(); - m.Path = r; + r.Path = v; if ("undefined" !== typeof CanvasRenderingContext2D && ("undefined" === typeof Path2D || !Path2D.prototype.addPath)) { - var u = CanvasRenderingContext2D.prototype.fill; - CanvasRenderingContext2D.prototype.fill = function(a, d) { - arguments.length && (a instanceof r ? r._apply(a, this) : d = a); - d ? u.call(this, d) : u.call(this); + var d = CanvasRenderingContext2D.prototype.fill; + CanvasRenderingContext2D.prototype.fill = function(b, f) { + arguments.length && (b instanceof v ? v._apply(b, this) : f = b); + f ? d.call(this, f) : d.call(this); }; - var h = CanvasRenderingContext2D.prototype.stroke; - CanvasRenderingContext2D.prototype.stroke = function(a, d) { - arguments.length && (a instanceof r ? r._apply(a, this) : d = a); - d ? h.call(this, d) : h.call(this); + var e = CanvasRenderingContext2D.prototype.stroke; + CanvasRenderingContext2D.prototype.stroke = function(b, f) { + arguments.length && (b instanceof v ? v._apply(b, this) : f = b); + f ? e.call(this, f) : e.call(this); }; - var f = CanvasRenderingContext2D.prototype.clip; - CanvasRenderingContext2D.prototype.clip = function(a, d) { - arguments.length && (a instanceof r ? r._apply(a, this) : d = a); - d ? f.call(this, d) : f.call(this); + var b = CanvasRenderingContext2D.prototype.clip; + CanvasRenderingContext2D.prototype.clip = function(f, a) { + arguments.length && (f instanceof v ? v._apply(f, this) : a = f); + a ? b.call(this, a) : b.call(this); }; - window.Path2D = r; + window.Path2D = v; } if ("undefined" !== typeof CanvasPattern && Path2D.prototype.addPath) { - t = function(a) { - this._transform = a; - this._template && (this._template._transform = a); + s = function(b) { + this._transform = b; + this._template && (this._template._transform = b); }; - CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = t); - CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = t); - var d = CanvasRenderingContext2D.prototype.fill, q = CanvasRenderingContext2D.prototype.stroke; - CanvasRenderingContext2D.prototype.fill = function(a, f) { - var b = !!this.fillStyle._transform; - if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && b && a instanceof Path2D) { - var b = this.fillStyle._transform, c; + CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = s); + CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = s); + var f = CanvasRenderingContext2D.prototype.fill, q = CanvasRenderingContext2D.prototype.stroke; + CanvasRenderingContext2D.prototype.fill = function(b, a) { + var e = !!this.fillStyle._transform; + if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && e && b instanceof Path2D) { + var e = this.fillStyle._transform, c; try { - c = b.inverse(); - } catch (q) { - c = b = m.Geometry.Matrix.createIdentitySVGMatrix(); + c = e.inverse(); + } catch (d) { + c = e = r.Geometry.Matrix.createIdentitySVGMatrix(); } - this.transform(b.a, b.b, b.c, b.d, b.e, b.f); - b = new Path2D; - b.addPath(a, c); - d.call(this, b, f); + this.transform(e.a, e.b, e.c, e.d, e.e, e.f); + e = new Path2D; + e.addPath(b, c); + f.call(this, e, a); this.transform(c.a, c.b, c.c, c.d, c.e, c.f); } else { - 0 === arguments.length ? d.call(this) : 1 === arguments.length ? d.call(this, a) : 2 === arguments.length && d.call(this, a, f); + 0 === arguments.length ? f.call(this) : 1 === arguments.length ? f.call(this, b) : 2 === arguments.length && f.call(this, b, a); } }; - CanvasRenderingContext2D.prototype.stroke = function(a) { - var d = !!this.strokeStyle._transform; - if ((this.strokeStyle instanceof CanvasPattern || this.strokeStyle instanceof CanvasGradient) && d && a instanceof Path2D) { - var f = this.strokeStyle._transform, d = f.inverse(); + CanvasRenderingContext2D.prototype.stroke = function(b) { + var f = !!this.strokeStyle._transform; + if ((this.strokeStyle instanceof CanvasPattern || this.strokeStyle instanceof CanvasGradient) && f && b instanceof Path2D) { + var a = this.strokeStyle._transform, f = a.inverse(); + this.transform(a.a, a.b, a.c, a.d, a.e, a.f); + a = new Path2D; + a.addPath(b, f); + var e = this.lineWidth; + this.lineWidth *= (f.a + f.d) / 2; + q.call(this, a); this.transform(f.a, f.b, f.c, f.d, f.e, f.f); - f = new Path2D; - f.addPath(a, d); - var b = this.lineWidth; - this.lineWidth *= (d.a + d.d) / 2; - q.call(this, f); - this.transform(d.a, d.b, d.c, d.d, d.e, d.f); - this.lineWidth = b; + this.lineWidth = e; } else { - 0 === arguments.length ? q.call(this) : 1 === arguments.length && q.call(this, a); + 0 === arguments.length ? q.call(this) : 1 === arguments.length && q.call(this, b); } }; } "undefined" !== typeof CanvasRenderingContext2D && function() { - function a() { - c(this.mozCurrentTransform); - return m.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform); + function b() { + return r.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform); } - CanvasRenderingContext2D.prototype.flashStroke = function(a, d) { - var f = this.currentTransform; - if (f) { - var b = new Path2D; - b.addPath(a, f); - var c = this.lineWidth; + CanvasRenderingContext2D.prototype.flashStroke = function(b, f) { + var a = this.currentTransform; + if (a) { + var e = new Path2D; + e.addPath(b, a); + var d = this.lineWidth; this.setTransform(1, 0, 0, 1, 0, 0); - switch(d) { + switch(f) { case 1: - this.lineWidth = w(c * (g.getScaleX(f) + g.getScaleY(f)) / 2, 1, 1024); + this.lineWidth = c(d * (l.getScaleX(a) + l.getScaleY(a)) / 2, 1, 1024); break; case 2: - this.lineWidth = w(c * g.getScaleY(f), 1, 1024); + this.lineWidth = c(d * l.getScaleY(a), 1, 1024); break; case 3: - this.lineWidth = w(c * g.getScaleX(f), 1, 1024); + this.lineWidth = c(d * l.getScaleX(a), 1, 1024); } - this.stroke(b); - this.setTransform(f.a, f.b, f.c, f.d, f.e, f.f); - this.lineWidth = c; + this.stroke(e); + this.setTransform(a.a, a.b, a.c, a.d, a.e, a.f); + this.lineWidth = d; } else { - this.stroke(a); + this.stroke(b); } }; - !("currentTransform" in CanvasRenderingContext2D.prototype) && "mozCurrentTransform" in CanvasRenderingContext2D.prototype && Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:a}); + !("currentTransform" in CanvasRenderingContext2D.prototype) && "mozCurrentTransform" in CanvasRenderingContext2D.prototype && Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:b}); }(); if ("undefined" !== typeof CanvasRenderingContext2D && void 0 === CanvasRenderingContext2D.prototype.globalColorMatrix) { - var x = CanvasRenderingContext2D.prototype.fill, s = CanvasRenderingContext2D.prototype.stroke, O = CanvasRenderingContext2D.prototype.fillText, T = CanvasRenderingContext2D.prototype.strokeText; + var w = CanvasRenderingContext2D.prototype.fill, G = CanvasRenderingContext2D.prototype.stroke, U = CanvasRenderingContext2D.prototype.fillText, V = CanvasRenderingContext2D.prototype.strokeText; Object.defineProperty(CanvasRenderingContext2D.prototype, "globalColorMatrix", {get:function() { return this._globalColorMatrix ? this._globalColorMatrix.clone() : null; - }, set:function(a) { - a ? this._globalColorMatrix ? this._globalColorMatrix.set(a) : this._globalColorMatrix = a.clone() : this._globalColorMatrix = null; + }, set:function(b) { + b ? this._globalColorMatrix ? this._globalColorMatrix.set(b) : this._globalColorMatrix = b.clone() : this._globalColorMatrix = null; }, enumerable:!0, configurable:!0}); - CanvasRenderingContext2D.prototype.fill = function(a, d) { - var f = null; - this._globalColorMatrix && (f = this.fillStyle, this.fillStyle = e(this, this.fillStyle, this._globalColorMatrix)); - 0 === arguments.length ? x.call(this) : 1 === arguments.length ? x.call(this, a) : 2 === arguments.length && x.call(this, a, d); - f && (this.fillStyle = f); + CanvasRenderingContext2D.prototype.fill = function(b, f) { + var a = null; + this._globalColorMatrix && (a = this.fillStyle, this.fillStyle = g(this, this.fillStyle, this._globalColorMatrix)); + 0 === arguments.length ? w.call(this) : 1 === arguments.length ? w.call(this, b) : 2 === arguments.length && w.call(this, b, f); + a && (this.fillStyle = a); }; - CanvasRenderingContext2D.prototype.stroke = function(a, d) { - var f = null; - this._globalColorMatrix && (f = this.strokeStyle, this.strokeStyle = e(this, this.strokeStyle, this._globalColorMatrix)); - 0 === arguments.length ? s.call(this) : 1 === arguments.length && s.call(this, a); - f && (this.strokeStyle = f); + CanvasRenderingContext2D.prototype.stroke = function(b, f) { + var a = null; + this._globalColorMatrix && (a = this.strokeStyle, this.strokeStyle = g(this, this.strokeStyle, this._globalColorMatrix)); + 0 === arguments.length ? G.call(this) : 1 === arguments.length && G.call(this, b); + a && (this.strokeStyle = a); }; - CanvasRenderingContext2D.prototype.fillText = function(a, d, f, b) { + CanvasRenderingContext2D.prototype.fillText = function(b, f, a, e) { var c = null; - this._globalColorMatrix && (c = this.fillStyle, this.fillStyle = e(this, this.fillStyle, this._globalColorMatrix)); - 3 === arguments.length ? O.call(this, a, d, f) : 4 === arguments.length ? O.call(this, a, d, f, b) : g.Debug.unexpected(); + this._globalColorMatrix && (c = this.fillStyle, this.fillStyle = g(this, this.fillStyle, this._globalColorMatrix)); + 3 === arguments.length ? U.call(this, b, f, a) : 4 === arguments.length ? U.call(this, b, f, a, e) : l.Debug.unexpected(); c && (this.fillStyle = c); }; - CanvasRenderingContext2D.prototype.strokeText = function(a, d, f, b) { + CanvasRenderingContext2D.prototype.strokeText = function(b, f, a, e) { var c = null; - this._globalColorMatrix && (c = this.strokeStyle, this.strokeStyle = e(this, this.strokeStyle, this._globalColorMatrix)); - 3 === arguments.length ? T.call(this, a, d, f) : 4 === arguments.length ? T.call(this, a, d, f, b) : g.Debug.unexpected(); + this._globalColorMatrix && (c = this.strokeStyle, this.strokeStyle = g(this, this.strokeStyle, this._globalColorMatrix)); + 3 === arguments.length ? V.call(this, b, f, a) : 4 === arguments.length ? V.call(this, b, f, a, e) : l.Debug.unexpected(); c && (this.strokeStyle = c); }; } - })(g.GFX || (g.GFX = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - g.ScreenShot = function() { - return function(e, c, g) { - this.dataURL = e; +(function(l) { + (function(l) { + l.ScreenShot = function() { + return function(g, c, l) { + this.dataURL = g; this.w = c; - this.h = g; + this.h = l; }; }(); - })(g.GFX || (g.GFX = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - var m = g.Debug.assert, e = function() { - function c() { +(function(l) { + var r = function() { + function g() { this._count = 0; this._head = this._tail = null; } - Object.defineProperty(c.prototype, "count", {get:function() { + Object.defineProperty(g.prototype, "count", {get:function() { return this._count; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "head", {get:function() { + Object.defineProperty(g.prototype, "head", {get:function() { return this._head; }, enumerable:!0, configurable:!0}); - c.prototype._unshift = function(c) { - m(!c.next && !c.previous); + g.prototype._unshift = function(c) { 0 === this._count ? this._head = this._tail = c : (c.next = this._head, this._head = c.next.previous = c); this._count++; }; - c.prototype._remove = function(c) { - m(0 < this._count); + g.prototype._remove = function(c) { c === this._head && c === this._tail ? this._head = this._tail = null : c === this._head ? (this._head = c.next, this._head.previous = null) : c == this._tail ? (this._tail = c.previous, this._tail.next = null) : (c.previous.next = c.next, c.next.previous = c.previous); c.previous = c.next = null; this._count--; }; - c.prototype.use = function(c) { + g.prototype.use = function(c) { this._head !== c && ((c.next || c.previous || this._tail === c) && this._remove(c), this._unshift(c)); }; - c.prototype.pop = function() { + g.prototype.pop = function() { if (!this._tail) { return null; } @@ -6662,284 +7024,284 @@ console.time("Load GFX Dependencies"); this._remove(c); return c; }; - c.prototype.visit = function(c, e) { - void 0 === e && (e = !0); - for (var b = e ? this._head : this._tail;b && c(b);) { - b = e ? b.next : b.previous; + g.prototype.visit = function(c, g) { + void 0 === g && (g = !0); + for (var m = g ? this._head : this._tail;m && c(m);) { + m = g ? m.next : m.previous; } }; - return c; + return g; }(); - g.LRUList = e; - g.getScaleX = function(c) { - return c.a; + l.LRUList = r; + l.getScaleX = function(g) { + return g.a; }; - g.getScaleY = function(c) { - return c.d; + l.getScaleY = function(g) { + return g.d; }; })(Shumway || (Shumway = {})); -var Shumway$$inline_24 = Shumway || (Shumway = {}), GFX$$inline_25 = Shumway$$inline_24.GFX || (Shumway$$inline_24.GFX = {}), Option$$inline_26 = Shumway$$inline_24.Options.Option, OptionSet$$inline_27 = Shumway$$inline_24.Options.OptionSet, shumwayOptions$$inline_28 = Shumway$$inline_24.Settings.shumwayOptions, rendererOptions$$inline_29 = shumwayOptions$$inline_28.register(new OptionSet$$inline_27("Renderer Options")); -GFX$$inline_25.imageUpdateOption = rendererOptions$$inline_29.register(new Option$$inline_26("", "imageUpdate", "boolean", !0, "Enable image updating.")); -GFX$$inline_25.imageConvertOption = rendererOptions$$inline_29.register(new Option$$inline_26("", "imageConvert", "boolean", !0, "Enable image conversion.")); -GFX$$inline_25.stageOptions = shumwayOptions$$inline_28.register(new OptionSet$$inline_27("Stage Renderer Options")); -GFX$$inline_25.forcePaint = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "forcePaint", "boolean", !1, "Force repainting.")); -GFX$$inline_25.ignoreViewport = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport.")); -GFX$$inline_25.viewportLoupeDiameter = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}})); -GFX$$inline_25.disableClipping = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "disableClipping", "boolean", !1, "Disable clipping.")); -GFX$$inline_25.debugClipping = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "debugClipping", "boolean", !1, "Disable clipping.")); -GFX$$inline_25.hud = GFX$$inline_25.stageOptions.register(new Option$$inline_26("", "hud", "boolean", !1, "Enable HUD.")); -var webGLOptions$$inline_30 = GFX$$inline_25.stageOptions.register(new OptionSet$$inline_27("WebGL Options")); -GFX$$inline_25.perspectiveCamera = webGLOptions$$inline_30.register(new Option$$inline_26("", "pc", "boolean", !1, "Use perspective camera.")); -GFX$$inline_25.perspectiveCameraFOV = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcFOV", "number", 60, "Perspective Camera FOV.")); -GFX$$inline_25.perspectiveCameraDistance = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcDistance", "number", 2, "Perspective Camera Distance.")); -GFX$$inline_25.perspectiveCameraAngle = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcAngle", "number", 0, "Perspective Camera Angle.")); -GFX$$inline_25.perspectiveCameraAngleRotate = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcRotate", "boolean", !1, "Rotate Use perspective camera.")); -GFX$$inline_25.perspectiveCameraSpacing = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcSpacing", "number", .01, "Element Spacing.")); -GFX$$inline_25.perspectiveCameraSpacingInflate = webGLOptions$$inline_30.register(new Option$$inline_26("", "pcInflate", "boolean", !1, "Rotate Use perspective camera.")); -GFX$$inline_25.drawTiles = webGLOptions$$inline_30.register(new Option$$inline_26("", "drawTiles", "boolean", !1, "Draw WebGL Tiles")); -GFX$$inline_25.drawSurfaces = webGLOptions$$inline_30.register(new Option$$inline_26("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces.")); -GFX$$inline_25.drawSurface = webGLOptions$$inline_30.register(new Option$$inline_26("", "drawSurface", "number", -1, "Draw WebGL Surface #")); -GFX$$inline_25.drawElements = webGLOptions$$inline_30.register(new Option$$inline_26("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck.")); -GFX$$inline_25.disableSurfaceUploads = webGLOptions$$inline_30.register(new Option$$inline_26("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads.")); -GFX$$inline_25.premultipliedAlpha = webGLOptions$$inline_30.register(new Option$$inline_26("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext().")); -GFX$$inline_25.unpackPremultiplyAlpha = webGLOptions$$inline_30.register(new Option$$inline_26("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei.")); -var factorChoices$$inline_31 = {ZERO:0, ONE:1, SRC_COLOR:768, ONE_MINUS_SRC_COLOR:769, DST_COLOR:774, ONE_MINUS_DST_COLOR:775, SRC_ALPHA:770, ONE_MINUS_SRC_ALPHA:771, DST_ALPHA:772, ONE_MINUS_DST_ALPHA:773, SRC_ALPHA_SATURATE:776, CONSTANT_COLOR:32769, ONE_MINUS_CONSTANT_COLOR:32770, CONSTANT_ALPHA:32771, ONE_MINUS_CONSTANT_ALPHA:32772}; -GFX$$inline_25.sourceBlendFactor = webGLOptions$$inline_30.register(new Option$$inline_26("", "sourceBlendFactor", "number", factorChoices$$inline_31.ONE, "", {choices:factorChoices$$inline_31})); -GFX$$inline_25.destinationBlendFactor = webGLOptions$$inline_30.register(new Option$$inline_26("", "destinationBlendFactor", "number", factorChoices$$inline_31.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_31})); -var canvas2DOptions$$inline_32 = GFX$$inline_25.stageOptions.register(new OptionSet$$inline_27("Canvas2D Options")); -GFX$$inline_25.clipDirtyRegions = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions.")); -GFX$$inline_25.clipCanvas = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "clipCanvas", "boolean", !1, "Clip Regions.")); -GFX$$inline_25.cull = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "cull", "boolean", !1, "Enable culling.")); -GFX$$inline_25.snapToDevicePixels = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "snapToDevicePixels", "boolean", !1, "")); -GFX$$inline_25.imageSmoothing = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "imageSmoothing", "boolean", !1, "")); -GFX$$inline_25.masking = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "masking", "boolean", !0, "Composite Mask.")); -GFX$$inline_25.blending = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "blending", "boolean", !0, "")); -GFX$$inline_25.debugLayers = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "debugLayers", "boolean", !1, "")); -GFX$$inline_25.filters = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "filters", "boolean", !1, "")); -GFX$$inline_25.cacheShapes = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "cacheShapes", "boolean", !0, "")); -GFX$$inline_25.cacheShapesMaxSize = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}})); -GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Option$$inline_26("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}})); -(function(g) { - (function(m) { - (function(e) { - function c(a, f, d, b) { - var c = 1 - b; - return a * c * c + 2 * f * c * b + d * b * b; +var Shumway$$inline_28 = Shumway || (Shumway = {}), GFX$$inline_29 = Shumway$$inline_28.GFX || (Shumway$$inline_28.GFX = {}), Option$$inline_30 = Shumway$$inline_28.Options.Option, OptionSet$$inline_31 = Shumway$$inline_28.Options.OptionSet, shumwayOptions$$inline_32 = Shumway$$inline_28.Settings.shumwayOptions, rendererOptions$$inline_33 = shumwayOptions$$inline_32.register(new OptionSet$$inline_31("Renderer Options")); +GFX$$inline_29.imageUpdateOption = rendererOptions$$inline_33.register(new Option$$inline_30("", "imageUpdate", "boolean", !0, "Enable image updating.")); +GFX$$inline_29.imageConvertOption = rendererOptions$$inline_33.register(new Option$$inline_30("", "imageConvert", "boolean", !0, "Enable image conversion.")); +GFX$$inline_29.stageOptions = shumwayOptions$$inline_32.register(new OptionSet$$inline_31("Stage Renderer Options")); +GFX$$inline_29.forcePaint = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "forcePaint", "boolean", !1, "Force repainting.")); +GFX$$inline_29.ignoreViewport = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport.")); +GFX$$inline_29.viewportLoupeDiameter = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}})); +GFX$$inline_29.disableClipping = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "disableClipping", "boolean", !1, "Disable clipping.")); +GFX$$inline_29.debugClipping = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "debugClipping", "boolean", !1, "Disable clipping.")); +GFX$$inline_29.hud = GFX$$inline_29.stageOptions.register(new Option$$inline_30("", "hud", "boolean", !1, "Enable HUD.")); +var webGLOptions$$inline_34 = GFX$$inline_29.stageOptions.register(new OptionSet$$inline_31("WebGL Options")); +GFX$$inline_29.perspectiveCamera = webGLOptions$$inline_34.register(new Option$$inline_30("", "pc", "boolean", !1, "Use perspective camera.")); +GFX$$inline_29.perspectiveCameraFOV = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcFOV", "number", 60, "Perspective Camera FOV.")); +GFX$$inline_29.perspectiveCameraDistance = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcDistance", "number", 2, "Perspective Camera Distance.")); +GFX$$inline_29.perspectiveCameraAngle = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcAngle", "number", 0, "Perspective Camera Angle.")); +GFX$$inline_29.perspectiveCameraAngleRotate = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcRotate", "boolean", !1, "Rotate Use perspective camera.")); +GFX$$inline_29.perspectiveCameraSpacing = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcSpacing", "number", .01, "Element Spacing.")); +GFX$$inline_29.perspectiveCameraSpacingInflate = webGLOptions$$inline_34.register(new Option$$inline_30("", "pcInflate", "boolean", !1, "Rotate Use perspective camera.")); +GFX$$inline_29.drawTiles = webGLOptions$$inline_34.register(new Option$$inline_30("", "drawTiles", "boolean", !1, "Draw WebGL Tiles")); +GFX$$inline_29.drawSurfaces = webGLOptions$$inline_34.register(new Option$$inline_30("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces.")); +GFX$$inline_29.drawSurface = webGLOptions$$inline_34.register(new Option$$inline_30("", "drawSurface", "number", -1, "Draw WebGL Surface #")); +GFX$$inline_29.drawElements = webGLOptions$$inline_34.register(new Option$$inline_30("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck.")); +GFX$$inline_29.disableSurfaceUploads = webGLOptions$$inline_34.register(new Option$$inline_30("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads.")); +GFX$$inline_29.premultipliedAlpha = webGLOptions$$inline_34.register(new Option$$inline_30("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext().")); +GFX$$inline_29.unpackPremultiplyAlpha = webGLOptions$$inline_34.register(new Option$$inline_30("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei.")); +var factorChoices$$inline_35 = {ZERO:0, ONE:1, SRC_COLOR:768, ONE_MINUS_SRC_COLOR:769, DST_COLOR:774, ONE_MINUS_DST_COLOR:775, SRC_ALPHA:770, ONE_MINUS_SRC_ALPHA:771, DST_ALPHA:772, ONE_MINUS_DST_ALPHA:773, SRC_ALPHA_SATURATE:776, CONSTANT_COLOR:32769, ONE_MINUS_CONSTANT_COLOR:32770, CONSTANT_ALPHA:32771, ONE_MINUS_CONSTANT_ALPHA:32772}; +GFX$$inline_29.sourceBlendFactor = webGLOptions$$inline_34.register(new Option$$inline_30("", "sourceBlendFactor", "number", factorChoices$$inline_35.ONE, "", {choices:factorChoices$$inline_35})); +GFX$$inline_29.destinationBlendFactor = webGLOptions$$inline_34.register(new Option$$inline_30("", "destinationBlendFactor", "number", factorChoices$$inline_35.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_35})); +var canvas2DOptions$$inline_36 = GFX$$inline_29.stageOptions.register(new OptionSet$$inline_31("Canvas2D Options")); +GFX$$inline_29.clipDirtyRegions = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions.")); +GFX$$inline_29.clipCanvas = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "clipCanvas", "boolean", !1, "Clip Regions.")); +GFX$$inline_29.cull = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "cull", "boolean", !1, "Enable culling.")); +GFX$$inline_29.snapToDevicePixels = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "snapToDevicePixels", "boolean", !1, "")); +GFX$$inline_29.imageSmoothing = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "imageSmoothing", "boolean", !1, "")); +GFX$$inline_29.masking = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "masking", "boolean", !0, "Composite Mask.")); +GFX$$inline_29.blending = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "blending", "boolean", !0, "")); +GFX$$inline_29.debugLayers = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "debugLayers", "boolean", !1, "")); +GFX$$inline_29.filters = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "filters", "boolean", !1, "")); +GFX$$inline_29.cacheShapes = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "cacheShapes", "boolean", !0, "")); +GFX$$inline_29.cacheShapesMaxSize = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}})); +GFX$$inline_29.cacheShapesThreshold = canvas2DOptions$$inline_36.register(new Option$$inline_30("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}})); +(function(l) { + (function(r) { + (function(g) { + function c(a, b, f, c) { + var d = 1 - c; + return a * d * d + 2 * b * d * c + f * c * c; } - function w(a, f, d, b, c) { - var s = c * c, e = 1 - c, l = e * e; - return a * e * l + 3 * f * c * l + 3 * d * e * s + b * c * s; + function t(a, b, f, c, d) { + var h = d * d, n = 1 - d, g = n * n; + return a * n * g + 3 * b * d * g + 3 * f * n * h + c * d * h; } - var k = g.NumberUtilities.clamp, b = g.NumberUtilities.pow2, a = g.NumberUtilities.epsilonEquals, n = g.Debug.assert; - e.radianToDegrees = function(a) { + var m = l.NumberUtilities.clamp, a = l.NumberUtilities.pow2, h = l.NumberUtilities.epsilonEquals; + g.radianToDegrees = function(a) { return 180 * a / Math.PI; }; - e.degreesToRadian = function(a) { + g.degreesToRadian = function(a) { return a * Math.PI / 180; }; - e.quadraticBezier = c; - e.quadraticBezierExtreme = function(a, f, d) { - var b = (a - f) / (a - 2 * f + d); - return 0 > b ? a : 1 < b ? d : c(a, f, d, b); + g.quadraticBezier = c; + g.quadraticBezierExtreme = function(a, b, f) { + var d = (a - b) / (a - 2 * b + f); + return 0 > d ? a : 1 < d ? f : c(a, b, f, d); }; - e.cubicBezier = w; - e.cubicBezierExtremes = function(a, f, d, b) { - var c = f - a, s; - s = 2 * (d - f); - var e = b - d; - c + e === s && (e *= 1.0001); - var l = 2 * c - s, g = s - 2 * c, g = Math.sqrt(g * g - 4 * c * (c - s + e)); - s = 2 * (c - s + e); - c = (l + g) / s; - l = (l - g) / s; - g = []; - 0 <= c && 1 >= c && g.push(w(a, f, d, b, c)); - 0 <= l && 1 >= l && g.push(w(a, f, d, b, l)); - return g; + g.cubicBezier = t; + g.cubicBezierExtremes = function(a, b, f, c) { + var d = b - a, h; + h = 2 * (f - b); + var n = c - f; + d + n === h && (n *= 1.0001); + var g = 2 * d - h, k = h - 2 * d, k = Math.sqrt(k * k - 4 * d * (d - h + n)); + h = 2 * (d - h + n); + d = (g + k) / h; + g = (g - k) / h; + k = []; + 0 <= d && 1 >= d && k.push(t(a, b, f, c, d)); + 0 <= g && 1 >= g && k.push(t(a, b, f, c, g)); + return k; }; var p = function() { - function a(f, d) { - this.x = f; - this.y = d; + function a(b, f) { + this.x = b; + this.y = f; } - a.prototype.setElements = function(a, d) { - this.x = a; - this.y = d; + a.prototype.setElements = function(b, f) { + this.x = b; + this.y = f; return this; }; - a.prototype.set = function(a) { - this.x = a.x; - this.y = a.y; + a.prototype.set = function(b) { + this.x = b.x; + this.y = b.y; return this; }; - a.prototype.dot = function(a) { - return this.x * a.x + this.y * a.y; + a.prototype.dot = function(b) { + return this.x * b.x + this.y * b.y; }; a.prototype.squaredLength = function() { return this.dot(this); }; - a.prototype.distanceTo = function(a) { - return Math.sqrt(this.dot(a)); + a.prototype.distanceTo = function(b) { + return Math.sqrt(this.dot(b)); }; - a.prototype.sub = function(a) { - this.x -= a.x; - this.y -= a.y; + a.prototype.sub = function(b) { + this.x -= b.x; + this.y -= b.y; return this; }; - a.prototype.mul = function(a) { - this.x *= a; - this.y *= a; + a.prototype.mul = function(b) { + this.x *= b; + this.y *= b; return this; }; a.prototype.clone = function() { return new a(this.x, this.y); }; - a.prototype.toString = function(a) { - void 0 === a && (a = 2); - return "{x: " + this.x.toFixed(a) + ", y: " + this.y.toFixed(a) + "}"; + a.prototype.toString = function(b) { + void 0 === b && (b = 2); + return "{x: " + this.x.toFixed(b) + ", y: " + this.y.toFixed(b) + "}"; }; - a.prototype.inTriangle = function(a, d, b) { - var c = a.y * b.x - a.x * b.y + (b.y - a.y) * this.x + (a.x - b.x) * this.y, h = a.x * d.y - a.y * d.x + (a.y - d.y) * this.x + (d.x - a.x) * this.y; - if (0 > c != 0 > h) { + a.prototype.inTriangle = function(b, f, a) { + var e = b.y * a.x - b.x * a.y + (a.y - b.y) * this.x + (b.x - a.x) * this.y, c = b.x * f.y - b.y * f.x + (b.y - f.y) * this.x + (f.x - b.x) * this.y; + if (0 > e != 0 > c) { return!1; } - a = -d.y * b.x + a.y * (b.x - d.x) + a.x * (d.y - b.y) + d.x * b.y; - 0 > a && (c = -c, h = -h, a = -a); - return 0 < c && 0 < h && c + h < a; + b = -f.y * a.x + b.y * (a.x - f.x) + b.x * (f.y - a.y) + f.x * a.y; + 0 > b && (e = -e, c = -c, b = -b); + return 0 < e && 0 < c && e + c < b; }; a.createEmpty = function() { return new a(0, 0); }; a.createEmptyPoints = function(b) { - for (var d = [], c = 0;c < b;c++) { - d.push(new a(0, 0)); + for (var f = [], c = 0;c < b;c++) { + f.push(new a(0, 0)); } - return d; + return f; }; return a; }(); - e.Point = p; - var y = function() { - function a(b, d, c) { + g.Point = p; + var k = function() { + function a(b, f, e) { this.x = b; - this.y = d; - this.z = c; + this.y = f; + this.z = e; } - a.prototype.setElements = function(a, d, b) { - this.x = a; - this.y = d; - this.z = b; + a.prototype.setElements = function(b, f, a) { + this.x = b; + this.y = f; + this.z = a; return this; }; - a.prototype.set = function(a) { - this.x = a.x; - this.y = a.y; - this.z = a.z; + a.prototype.set = function(b) { + this.x = b.x; + this.y = b.y; + this.z = b.z; return this; }; - a.prototype.dot = function(a) { - return this.x * a.x + this.y * a.y + this.z * a.z; + a.prototype.dot = function(b) { + return this.x * b.x + this.y * b.y + this.z * b.z; }; - a.prototype.cross = function(a) { - var d = this.z * a.x - this.x * a.z, b = this.x * a.y - this.y * a.x; - this.x = this.y * a.z - this.z * a.y; - this.y = d; - this.z = b; + a.prototype.cross = function(b) { + var f = this.z * b.x - this.x * b.z, a = this.x * b.y - this.y * b.x; + this.x = this.y * b.z - this.z * b.y; + this.y = f; + this.z = a; return this; }; a.prototype.squaredLength = function() { return this.dot(this); }; - a.prototype.sub = function(a) { - this.x -= a.x; - this.y -= a.y; - this.z -= a.z; + a.prototype.sub = function(b) { + this.x -= b.x; + this.y -= b.y; + this.z -= b.z; return this; }; - a.prototype.mul = function(a) { - this.x *= a; - this.y *= a; - this.z *= a; + a.prototype.mul = function(b) { + this.x *= b; + this.y *= b; + this.z *= b; return this; }; a.prototype.normalize = function() { - var a = Math.sqrt(this.squaredLength()); - 1E-5 < a ? this.mul(1 / a) : this.setElements(0, 0, 0); + var b = Math.sqrt(this.squaredLength()); + 1E-5 < b ? this.mul(1 / b) : this.setElements(0, 0, 0); return this; }; a.prototype.clone = function() { return new a(this.x, this.y, this.z); }; - a.prototype.toString = function(a) { - void 0 === a && (a = 2); - return "{x: " + this.x.toFixed(a) + ", y: " + this.y.toFixed(a) + ", z: " + this.z.toFixed(a) + "}"; + a.prototype.toString = function(b) { + void 0 === b && (b = 2); + return "{x: " + this.x.toFixed(b) + ", y: " + this.y.toFixed(b) + ", z: " + this.z.toFixed(b) + "}"; }; a.createEmpty = function() { return new a(0, 0, 0); }; a.createEmptyPoints = function(b) { - for (var d = [], c = 0;c < b;c++) { - d.push(new a(0, 0, 0)); + for (var f = [], c = 0;c < b;c++) { + f.push(new a(0, 0, 0)); } - return d; + return f; }; return a; }(); - e.Point3D = y; - var v = function() { - function a(b, d, c, x) { - this.setElements(b, d, c, x); + g.Point3D = k; + var u = function() { + function a(b, f, c, d) { + this.setElements(b, f, c, d); a.allocationCount++; } - a.prototype.setElements = function(a, d, b, c) { - this.x = a; - this.y = d; - this.w = b; - this.h = c; + a.prototype.setElements = function(b, f, a, e) { + this.x = b; + this.y = f; + this.w = a; + this.h = e; }; - a.prototype.set = function(a) { - this.x = a.x; - this.y = a.y; - this.w = a.w; - this.h = a.h; + a.prototype.set = function(b) { + this.x = b.x; + this.y = b.y; + this.w = b.w; + this.h = b.h; }; - a.prototype.contains = function(a) { - var d = a.x + a.w, b = a.y + a.h, c = this.x + this.w, h = this.y + this.h; - return a.x >= this.x && a.x < c && a.y >= this.y && a.y < h && d > this.x && d <= c && b > this.y && b <= h; + a.prototype.contains = function(b) { + var f = b.x + b.w, a = b.y + b.h, e = this.x + this.w, c = this.y + this.h; + return b.x >= this.x && b.x < e && b.y >= this.y && b.y < c && f > this.x && f <= e && a > this.y && a <= c; }; - a.prototype.containsPoint = function(a) { - return a.x >= this.x && a.x < this.x + this.w && a.y >= this.y && a.y < this.y + this.h; + a.prototype.containsPoint = function(b) { + return b.x >= this.x && b.x < this.x + this.w && b.y >= this.y && b.y < this.y + this.h; }; - a.prototype.isContained = function(a) { - for (var d = 0;d < a.length;d++) { - if (a[d].contains(this)) { + a.prototype.isContained = function(b) { + for (var f = 0;f < b.length;f++) { + if (b[f].contains(this)) { return!0; } } return!1; }; - a.prototype.isSmallerThan = function(a) { - return this.w < a.w && this.h < a.h; + a.prototype.isSmallerThan = function(b) { + return this.w < b.w && this.h < b.h; }; - a.prototype.isLargerThan = function(a) { - return this.w > a.w && this.h > a.h; + a.prototype.isLargerThan = function(b) { + return this.w > b.w && this.h > b.h; }; - a.prototype.union = function(a) { + a.prototype.union = function(b) { if (this.isEmpty()) { - this.set(a); + this.set(b); } else { - if (!a.isEmpty()) { - var d = this.x, b = this.y; - this.x > a.x && (d = a.x); - this.y > a.y && (b = a.y); - var c = this.x + this.w; - c < a.x + a.w && (c = a.x + a.w); - var h = this.y + this.h; - h < a.y + a.h && (h = a.y + a.h); - this.x = d; - this.y = b; - this.w = c - d; - this.h = h - b; + if (!b.isEmpty()) { + var f = this.x, a = this.y; + this.x > b.x && (f = b.x); + this.y > b.y && (a = b.y); + var e = this.x + this.w; + e < b.x + b.w && (e = b.x + b.w); + var c = this.y + this.h; + c < b.y + b.h && (c = b.y + b.h); + this.x = f; + this.y = a; + this.w = e - f; + this.h = c - a; } } }; @@ -6950,39 +7312,39 @@ GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Op this.h = this.w = this.y = this.x = 0; }; a.prototype.intersect = function(b) { - var d = a.createEmpty(); + var f = a.createEmpty(); if (this.isEmpty() || b.isEmpty()) { - return d.setEmpty(), d; + return f.setEmpty(), f; } - d.x = Math.max(this.x, b.x); - d.y = Math.max(this.y, b.y); - d.w = Math.min(this.x + this.w, b.x + b.w) - d.x; - d.h = Math.min(this.y + this.h, b.y + b.h) - d.y; - d.isEmpty() && d.setEmpty(); - this.set(d); + f.x = Math.max(this.x, b.x); + f.y = Math.max(this.y, b.y); + f.w = Math.min(this.x + this.w, b.x + b.w) - f.x; + f.h = Math.min(this.y + this.h, b.y + b.h) - f.y; + f.isEmpty() && f.setEmpty(); + this.set(f); }; - a.prototype.intersects = function(a) { - if (this.isEmpty() || a.isEmpty()) { + a.prototype.intersects = function(b) { + if (this.isEmpty() || b.isEmpty()) { return!1; } - var d = Math.max(this.x, a.x), b = Math.max(this.y, a.y), d = Math.min(this.x + this.w, a.x + a.w) - d; - a = Math.min(this.y + this.h, a.y + a.h) - b; - return!(0 >= d || 0 >= a); + var f = Math.max(this.x, b.x), a = Math.max(this.y, b.y), f = Math.min(this.x + this.w, b.x + b.w) - f; + b = Math.min(this.y + this.h, b.y + b.h) - a; + return!(0 >= f || 0 >= b); }; - a.prototype.intersectsTransformedAABB = function(b, d) { + a.prototype.intersectsTransformedAABB = function(b, f) { var c = a._temporary; c.set(b); - d.transformRectangleAABB(c); + f.transformRectangleAABB(c); return this.intersects(c); }; - a.prototype.intersectsTranslated = function(a, d, b) { - if (this.isEmpty() || a.isEmpty()) { + a.prototype.intersectsTranslated = function(b, f, a) { + if (this.isEmpty() || b.isEmpty()) { return!1; } - var c = Math.max(this.x, a.x + d), h = Math.max(this.y, a.y + b); - d = Math.min(this.x + this.w, a.x + d + a.w) - c; - a = Math.min(this.y + this.h, a.y + b + a.h) - h; - return!(0 >= d || 0 >= a); + var e = Math.max(this.x, b.x + f), c = Math.max(this.y, b.y + a); + f = Math.min(this.x + this.w, b.x + f + b.w) - e; + b = Math.min(this.y + this.h, b.y + a + b.h) - c; + return!(0 >= f || 0 >= b); }; a.prototype.area = function() { return this.w * this.h; @@ -7000,32 +7362,32 @@ GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Op a._dirtyStack.push(this); }; a.prototype.snap = function() { - var a = Math.ceil(this.x + this.w), d = Math.ceil(this.y + this.h); + var b = Math.ceil(this.x + this.w), f = Math.ceil(this.y + this.h); this.x = Math.floor(this.x); this.y = Math.floor(this.y); - this.w = a - this.x; - this.h = d - this.y; + this.w = b - this.x; + this.h = f - this.y; return this; }; - a.prototype.scale = function(a, d) { - this.x *= a; - this.y *= d; - this.w *= a; - this.h *= d; + a.prototype.scale = function(b, f) { + this.x *= b; + this.y *= f; + this.w *= b; + this.h *= f; return this; }; - a.prototype.offset = function(a, d) { - this.x += a; - this.y += d; + a.prototype.offset = function(b, f) { + this.x += b; + this.y += f; return this; }; - a.prototype.resize = function(a, d) { - this.w += a; - this.h += d; + a.prototype.resize = function(b, f) { + this.w += b; + this.h += f; return this; }; - a.prototype.expand = function(a, d) { - this.offset(-a, -d).resize(2 * a, 2 * d); + a.prototype.expand = function(b, f) { + this.offset(-b, -f).resize(2 * b, 2 * f); return this; }; a.prototype.getCenter = function() { @@ -7034,9 +7396,9 @@ GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Op a.prototype.getAbsoluteBounds = function() { return new a(0, 0, this.w, this.h); }; - a.prototype.toString = function(a) { - void 0 === a && (a = 2); - return "{" + this.x.toFixed(a) + ", " + this.y.toFixed(a) + ", " + this.w.toFixed(a) + ", " + this.h.toFixed(a) + "}"; + a.prototype.toString = function(b) { + void 0 === b && (b = 2); + return "{" + this.x.toFixed(b) + ", " + this.y.toFixed(b) + ", " + this.w.toFixed(b) + ", " + this.h.toFixed(b) + "}"; }; a.createEmpty = function() { var b = a.allocate(); @@ -7052,56 +7414,56 @@ GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Op a.prototype.setMaxI16 = function() { this.setElements(-32768, -32768, 65535, 65535); }; - a.prototype.getCorners = function(a) { - a[0].x = this.x; - a[0].y = this.y; - a[1].x = this.x + this.w; - a[1].y = this.y; - a[2].x = this.x + this.w; - a[2].y = this.y + this.h; - a[3].x = this.x; - a[3].y = this.y + this.h; + a.prototype.getCorners = function(b) { + b[0].x = this.x; + b[0].y = this.y; + b[1].x = this.x + this.w; + b[1].y = this.y; + b[2].x = this.x + this.w; + b[2].y = this.y + this.h; + b[3].x = this.x; + b[3].y = this.y + this.h; }; a.allocationCount = 0; a._temporary = new a(0, 0, 0, 0); a._dirtyStack = []; return a; }(); - e.Rectangle = v; - var l = function() { + g.Rectangle = u; + var n = function() { function a(b) { - this.corners = b.map(function(a) { - return a.clone(); + this.corners = b.map(function(b) { + return b.clone(); }); this.axes = [b[1].clone().sub(b[0]), b[3].clone().sub(b[0])]; this.origins = []; - for (var d = 0;2 > d;d++) { - this.axes[d].mul(1 / this.axes[d].squaredLength()), this.origins.push(b[0].dot(this.axes[d])); + for (var f = 0;2 > f;f++) { + this.axes[f].mul(1 / this.axes[f].squaredLength()), this.origins.push(b[0].dot(this.axes[f])); } } a.prototype.getBounds = function() { return a.getBounds(this.corners); }; - a.getBounds = function(a) { - for (var d = new p(Number.MAX_VALUE, Number.MAX_VALUE), b = new p(Number.MIN_VALUE, Number.MIN_VALUE), c = 0;4 > c;c++) { - var h = a[c].x, e = a[c].y; - d.x = Math.min(d.x, h); - d.y = Math.min(d.y, e); - b.x = Math.max(b.x, h); - b.y = Math.max(b.y, e); + a.getBounds = function(b) { + for (var f = new p(Number.MAX_VALUE, Number.MAX_VALUE), a = new p(Number.MIN_VALUE, Number.MIN_VALUE), e = 0;4 > e;e++) { + var c = b[e].x, d = b[e].y; + f.x = Math.min(f.x, c); + f.y = Math.min(f.y, d); + a.x = Math.max(a.x, c); + a.y = Math.max(a.y, d); } - return new v(d.x, d.y, b.x - d.x, b.y - d.y); + return new u(f.x, f.y, a.x - f.x, a.y - f.y); }; - a.prototype.intersects = function(a) { - return this.intersectsOneWay(a) && a.intersectsOneWay(this); + a.prototype.intersects = function(b) { + return this.intersectsOneWay(b) && b.intersectsOneWay(this); }; - a.prototype.intersectsOneWay = function(a) { - for (var d = 0;2 > d;d++) { - for (var b = 0;4 > b;b++) { - var c = a.corners[b].dot(this.axes[d]), h, e; - 0 === b ? e = h = c : c < h ? h = c : c > e && (e = c); + a.prototype.intersectsOneWay = function(b) { + for (var f = 0;2 > f;f++) { + for (var a = 0;4 > a;a++) { + var e = b.corners[a].dot(this.axes[f]), c, d; + 0 === a ? d = c = e : e < c ? c = e : e > d && (d = e); } - if (h > 1 + this.origins[d] || e < this.origins[d]) { + if (c > 1 + this.origins[f] || d < this.origins[f]) { return!1; } } @@ -7109,813 +7471,807 @@ GFX$$inline_25.cacheShapesThreshold = canvas2DOptions$$inline_32.register(new Op }; return a; }(); - e.OBB = l; + g.OBB = n; (function(a) { a[a.Unknown = 0] = "Unknown"; a[a.Identity = 1] = "Identity"; a[a.Translation = 2] = "Translation"; - })(e.MatrixType || (e.MatrixType = {})); - var t = function() { - function b(a, d, c, x, s, e) { + })(g.MatrixType || (g.MatrixType = {})); + var s = function() { + function a(b, f, c, d, h, n) { this._data = new Float64Array(6); this._type = 0; - this.setElements(a, d, c, x, s, e); - b.allocationCount++; + this.setElements(b, f, c, d, h, n); + a.allocationCount++; } - Object.defineProperty(b.prototype, "a", {get:function() { + Object.defineProperty(a.prototype, "a", {get:function() { return this._data[0]; - }, set:function(a) { - this._data[0] = a; + }, set:function(b) { + this._data[0] = b; this._type = 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "b", {get:function() { + Object.defineProperty(a.prototype, "b", {get:function() { return this._data[1]; - }, set:function(a) { - this._data[1] = a; + }, set:function(b) { + this._data[1] = b; this._type = 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "c", {get:function() { + Object.defineProperty(a.prototype, "c", {get:function() { return this._data[2]; - }, set:function(a) { - this._data[2] = a; + }, set:function(b) { + this._data[2] = b; this._type = 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "d", {get:function() { + Object.defineProperty(a.prototype, "d", {get:function() { return this._data[3]; - }, set:function(a) { - this._data[3] = a; + }, set:function(b) { + this._data[3] = b; this._type = 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "tx", {get:function() { + Object.defineProperty(a.prototype, "tx", {get:function() { return this._data[4]; - }, set:function(a) { - this._data[4] = a; + }, set:function(b) { + this._data[4] = b; 1 === this._type && (this._type = 2); }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "ty", {get:function() { + Object.defineProperty(a.prototype, "ty", {get:function() { return this._data[5]; - }, set:function(a) { - this._data[5] = a; + }, set:function(b) { + this._data[5] = b; 1 === this._type && (this._type = 2); }, enumerable:!0, configurable:!0}); - b.prototype.setElements = function(a, d, b, c, h, e) { - var l = this._data; - l[0] = a; - l[1] = d; - l[2] = b; - l[3] = c; - l[4] = h; - l[5] = e; + a.prototype.setElements = function(b, a, c, e, d, h) { + var n = this._data; + n[0] = b; + n[1] = a; + n[2] = c; + n[3] = e; + n[4] = d; + n[5] = h; this._type = 0; }; - b.prototype.set = function(a) { - var d = this._data, b = a._data; - d[0] = b[0]; - d[1] = b[1]; - d[2] = b[2]; - d[3] = b[3]; - d[4] = b[4]; - d[5] = b[5]; - this._type = a._type; + a.prototype.set = function(b) { + var a = this._data, c = b._data; + a[0] = c[0]; + a[1] = c[1]; + a[2] = c[2]; + a[3] = c[3]; + a[4] = c[4]; + a[5] = c[5]; + this._type = b._type; }; - b.prototype.emptyArea = function(a) { - a = this._data; - return 0 === a[0] || 0 === a[3] ? !0 : !1; + a.prototype.emptyArea = function(b) { + b = this._data; + return 0 === b[0] || 0 === b[3] ? !0 : !1; }; - b.prototype.infiniteArea = function(a) { - a = this._data; - return Infinity === Math.abs(a[0]) || Infinity === Math.abs(a[3]) ? !0 : !1; + a.prototype.infiniteArea = function(b) { + b = this._data; + return Infinity === Math.abs(b[0]) || Infinity === Math.abs(b[3]) ? !0 : !1; }; - b.prototype.isEqual = function(a) { - if (1 === this._type && 1 === a._type) { + a.prototype.isEqual = function(b) { + if (1 === this._type && 1 === b._type) { return!0; } - var d = this._data; - a = a._data; - return d[0] === a[0] && d[1] === a[1] && d[2] === a[2] && d[3] === a[3] && d[4] === a[4] && d[5] === a[5]; + var a = this._data; + b = b._data; + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5]; }; - b.prototype.clone = function() { - var a = b.allocate(); - a.set(this); - return a; + a.prototype.clone = function() { + var b = a.allocate(); + b.set(this); + return b; }; - b.allocate = function() { - var a = b._dirtyStack; - return a.length ? a.pop() : new b(12345, 12345, 12345, 12345, 12345, 12345); + a.allocate = function() { + var b = a._dirtyStack; + return b.length ? b.pop() : new a(12345, 12345, 12345, 12345, 12345, 12345); }; - b.prototype.free = function() { - b._dirtyStack.push(this); + a.prototype.free = function() { + a._dirtyStack.push(this); }; - b.prototype.transform = function(a, d, b, c, h, e) { - var l = this._data, g = l[0], n = l[1], k = l[2], p = l[3], r = l[4], t = l[5]; - l[0] = g * a + k * d; - l[1] = n * a + p * d; - l[2] = g * b + k * c; - l[3] = n * b + p * c; - l[4] = g * h + k * e + r; - l[5] = n * h + p * e + t; + a.prototype.transform = function(b, a, c, e, d, h) { + var n = this._data, g = n[0], k = n[1], p = n[2], m = n[3], l = n[4], s = n[5]; + n[0] = g * b + p * a; + n[1] = k * b + m * a; + n[2] = g * c + p * e; + n[3] = k * c + m * e; + n[4] = g * d + p * h + l; + n[5] = k * d + m * h + s; this._type = 0; return this; }; - b.prototype.transformRectangle = function(a, d) { - n(4 === d.length); - var b = this._data, c = b[0], h = b[1], e = b[2], l = b[3], g = b[4], b = b[5], k = a.x, p = a.y, r = a.w, t = a.h; - d[0].x = c * k + e * p + g; - d[0].y = h * k + l * p + b; - d[1].x = c * (k + r) + e * p + g; - d[1].y = h * (k + r) + l * p + b; - d[2].x = c * (k + r) + e * (p + t) + g; - d[2].y = h * (k + r) + l * (p + t) + b; - d[3].x = c * k + e * (p + t) + g; - d[3].y = h * k + l * (p + t) + b; + a.prototype.transformRectangle = function(b, a) { + var c = this._data, e = c[0], d = c[1], h = c[2], n = c[3], g = c[4], c = c[5], k = b.x, p = b.y, m = b.w, l = b.h; + a[0].x = e * k + h * p + g; + a[0].y = d * k + n * p + c; + a[1].x = e * (k + m) + h * p + g; + a[1].y = d * (k + m) + n * p + c; + a[2].x = e * (k + m) + h * (p + l) + g; + a[2].y = d * (k + m) + n * (p + l) + c; + a[3].x = e * k + h * (p + l) + g; + a[3].y = d * k + n * (p + l) + c; }; - b.prototype.isTranslationOnly = function() { + a.prototype.isTranslationOnly = function() { if (2 === this._type) { return!0; } var b = this._data; - return 1 === b[0] && 0 === b[1] && 0 === b[2] && 1 === b[3] || a(b[0], 1) && a(b[1], 0) && a(b[2], 0) && a(b[3], 1) ? (this._type = 2, !0) : !1; + return 1 === b[0] && 0 === b[1] && 0 === b[2] && 1 === b[3] || h(b[0], 1) && h(b[1], 0) && h(b[2], 0) && h(b[3], 1) ? (this._type = 2, !0) : !1; }; - b.prototype.transformRectangleAABB = function(a) { - var d = this._data; + a.prototype.transformRectangleAABB = function(b) { + var a = this._data; if (1 !== this._type) { if (2 === this._type) { - a.x += d[4], a.y += d[5]; + b.x += a[4], b.y += a[5]; } else { - var b = d[0], c = d[1], h = d[2], e = d[3], l = d[4], g = d[5], n = a.x, k = a.y, p = a.w, r = a.h, d = b * n + h * k + l, t = c * n + e * k + g, m = b * (n + p) + h * k + l, v = c * (n + p) + e * k + g, u = b * (n + p) + h * (k + r) + l, p = c * (n + p) + e * (k + r) + g, b = b * n + h * (k + r) + l, c = c * n + e * (k + r) + g, e = 0; - d > m && (e = d, d = m, m = e); - u > b && (e = u, u = b, b = e); - a.x = d < u ? d : u; - a.w = (m > b ? m : b) - a.x; - t > v && (e = t, t = v, v = e); - p > c && (e = p, p = c, c = e); - a.y = t < p ? t : p; - a.h = (v > c ? v : c) - a.y; + var c = a[0], e = a[1], d = a[2], h = a[3], n = a[4], g = a[5], k = b.x, p = b.y, m = b.w, l = b.h, a = c * k + d * p + n, s = e * k + h * p + g, u = c * (k + m) + d * p + n, v = e * (k + m) + h * p + g, r = c * (k + m) + d * (p + l) + n, m = e * (k + m) + h * (p + l) + g, c = c * k + d * (p + l) + n, e = e * k + h * (p + l) + g, h = 0; + a > u && (h = a, a = u, u = h); + r > c && (h = r, r = c, c = h); + b.x = a < r ? a : r; + b.w = (u > c ? u : c) - b.x; + s > v && (h = s, s = v, v = h); + m > e && (h = m, m = e, e = h); + b.y = s < m ? s : m; + b.h = (v > e ? v : e) - b.y; } } }; - b.prototype.scale = function(a, d) { - var b = this._data; - b[0] *= a; - b[1] *= d; - b[2] *= a; - b[3] *= d; - b[4] *= a; - b[5] *= d; + a.prototype.scale = function(b, a) { + var c = this._data; + c[0] *= b; + c[1] *= a; + c[2] *= b; + c[3] *= a; + c[4] *= b; + c[5] *= a; this._type = 0; return this; }; - b.prototype.scaleClone = function(a, d) { - return 1 === a && 1 === d ? this : this.clone().scale(a, d); + a.prototype.scaleClone = function(b, a) { + return 1 === b && 1 === a ? this : this.clone().scale(b, a); }; - b.prototype.rotate = function(a) { - var d = this._data, b = d[0], c = d[1], h = d[2], e = d[3], l = d[4], g = d[5], n = Math.cos(a); - a = Math.sin(a); - d[0] = n * b - a * c; - d[1] = a * b + n * c; - d[2] = n * h - a * e; - d[3] = a * h + n * e; - d[4] = n * l - a * g; - d[5] = a * l + n * g; + a.prototype.rotate = function(b) { + var a = this._data, c = a[0], e = a[1], d = a[2], h = a[3], n = a[4], g = a[5], k = Math.cos(b); + b = Math.sin(b); + a[0] = k * c - b * e; + a[1] = b * c + k * e; + a[2] = k * d - b * h; + a[3] = b * d + k * h; + a[4] = k * n - b * g; + a[5] = b * n + k * g; this._type = 0; return this; }; - b.prototype.concat = function(a) { - if (1 === a._type) { + a.prototype.concat = function(b) { + if (1 === b._type) { return this; } - var d = this._data; - a = a._data; - var b = d[0] * a[0], c = 0, h = 0, e = d[3] * a[3], l = d[4] * a[0] + a[4], g = d[5] * a[3] + a[5]; - if (0 !== d[1] || 0 !== d[2] || 0 !== a[1] || 0 !== a[2]) { - b += d[1] * a[2], e += d[2] * a[1], c += d[0] * a[1] + d[1] * a[3], h += d[2] * a[0] + d[3] * a[2], l += d[5] * a[2], g += d[4] * a[1]; + var a = this._data; + b = b._data; + var c = a[0] * b[0], e = 0, d = 0, h = a[3] * b[3], n = a[4] * b[0] + b[4], g = a[5] * b[3] + b[5]; + if (0 !== a[1] || 0 !== a[2] || 0 !== b[1] || 0 !== b[2]) { + c += a[1] * b[2], h += a[2] * b[1], e += a[0] * b[1] + a[1] * b[3], d += a[2] * b[0] + a[3] * b[2], n += a[5] * b[2], g += a[4] * b[1]; } - d[0] = b; - d[1] = c; - d[2] = h; - d[3] = e; - d[4] = l; - d[5] = g; + a[0] = c; + a[1] = e; + a[2] = d; + a[3] = h; + a[4] = n; + a[5] = g; this._type = 0; return this; }; - b.prototype.concatClone = function(a) { - return this.clone().concat(a); + a.prototype.concatClone = function(b) { + return this.clone().concat(b); }; - b.prototype.preMultiply = function(a) { - var d = this._data, b = a._data; - if (2 === a._type && this._type & 3) { - d[4] += b[4], d[5] += b[5], this._type = 2; + a.prototype.preMultiply = function(b) { + var a = this._data, c = b._data; + if (2 === b._type && this._type & 3) { + a[4] += c[4], a[5] += c[5], this._type = 2; } else { - if (1 !== a._type) { - a = b[0] * d[0]; - var c = 0, h = 0, e = b[3] * d[3], l = b[4] * d[0] + d[4], g = b[5] * d[3] + d[5]; - if (0 !== b[1] || 0 !== b[2] || 0 !== d[1] || 0 !== d[2]) { - a += b[1] * d[2], e += b[2] * d[1], c += b[0] * d[1] + b[1] * d[3], h += b[2] * d[0] + b[3] * d[2], l += b[5] * d[2], g += b[4] * d[1]; + if (1 !== b._type) { + b = c[0] * a[0]; + var e = 0, d = 0, h = c[3] * a[3], n = c[4] * a[0] + a[4], g = c[5] * a[3] + a[5]; + if (0 !== c[1] || 0 !== c[2] || 0 !== a[1] || 0 !== a[2]) { + b += c[1] * a[2], h += c[2] * a[1], e += c[0] * a[1] + c[1] * a[3], d += c[2] * a[0] + c[3] * a[2], n += c[5] * a[2], g += c[4] * a[1]; } - d[0] = a; - d[1] = c; - d[2] = h; - d[3] = e; - d[4] = l; - d[5] = g; + a[0] = b; + a[1] = e; + a[2] = d; + a[3] = h; + a[4] = n; + a[5] = g; this._type = 0; } } }; - b.prototype.translate = function(a, d) { - var b = this._data; - b[4] += a; - b[5] += d; + a.prototype.translate = function(b, a) { + var c = this._data; + c[4] += b; + c[5] += a; 1 === this._type && (this._type = 2); return this; }; - b.prototype.setIdentity = function() { - var a = this._data; - a[0] = 1; - a[1] = 0; - a[2] = 0; - a[3] = 1; - a[4] = 0; - a[5] = 0; + a.prototype.setIdentity = function() { + var b = this._data; + b[0] = 1; + b[1] = 0; + b[2] = 0; + b[3] = 1; + b[4] = 0; + b[5] = 0; this._type = 1; }; - b.prototype.isIdentity = function() { + a.prototype.isIdentity = function() { if (1 === this._type) { return!0; } - var a = this._data; - return 1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3] && 0 === a[4] && 0 === a[5]; + var b = this._data; + return 1 === b[0] && 0 === b[1] && 0 === b[2] && 1 === b[3] && 0 === b[4] && 0 === b[5]; }; - b.prototype.transformPoint = function(a) { + a.prototype.transformPoint = function(b) { if (1 !== this._type) { - var d = this._data, b = a.x, c = a.y; - a.x = d[0] * b + d[2] * c + d[4]; - a.y = d[1] * b + d[3] * c + d[5]; + var a = this._data, c = b.x, e = b.y; + b.x = a[0] * c + a[2] * e + a[4]; + b.y = a[1] * c + a[3] * e + a[5]; } }; - b.prototype.transformPoints = function(a) { + a.prototype.transformPoints = function(b) { if (1 !== this._type) { - for (var d = 0;d < a.length;d++) { - this.transformPoint(a[d]); + for (var a = 0;a < b.length;a++) { + this.transformPoint(b[a]); } } }; - b.prototype.deltaTransformPoint = function(a) { + a.prototype.deltaTransformPoint = function(b) { if (1 !== this._type) { - var d = this._data, b = a.x, c = a.y; - a.x = d[0] * b + d[2] * c; - a.y = d[1] * b + d[3] * c; + var a = this._data, c = b.x, e = b.y; + b.x = a[0] * c + a[2] * e; + b.y = a[1] * c + a[3] * e; } }; - b.prototype.inverse = function(a) { - var d = this._data, b = a._data; + a.prototype.inverse = function(b) { + var a = this._data, c = b._data; if (1 === this._type) { - a.setIdentity(); + b.setIdentity(); } else { if (2 === this._type) { - b[0] = 1, b[1] = 0, b[2] = 0, b[3] = 1, b[4] = -d[4], b[5] = -d[5], a._type = 2; + c[0] = 1, c[1] = 0, c[2] = 0, c[3] = 1, c[4] = -a[4], c[5] = -a[5], b._type = 2; } else { - var c = d[1], h = d[2], e = d[4], l = d[5]; - if (0 === c && 0 === h) { - var g = b[0] = 1 / d[0], d = b[3] = 1 / d[3]; - b[1] = 0; - b[2] = 0; - b[4] = -g * e; - b[5] = -d * l; + var e = a[1], d = a[2], h = a[4], n = a[5]; + if (0 === e && 0 === d) { + var g = c[0] = 1 / a[0], a = c[3] = 1 / a[3]; + c[1] = 0; + c[2] = 0; + c[4] = -g * h; + c[5] = -a * n; } else { - var g = d[0], d = d[3], n = g * d - c * h; - if (0 === n) { - a.setIdentity(); + var g = a[0], a = a[3], k = g * a - e * d; + if (0 === k) { + b.setIdentity(); return; } - n = 1 / n; - b[0] = d * n; - c = b[1] = -c * n; - h = b[2] = -h * n; - d = b[3] = g * n; - b[4] = -(b[0] * e + h * l); - b[5] = -(c * e + d * l); + k = 1 / k; + c[0] = a * k; + e = c[1] = -e * k; + d = c[2] = -d * k; + a = c[3] = g * k; + c[4] = -(c[0] * h + d * n); + c[5] = -(e * h + a * n); } - a._type = 0; + b._type = 0; } } }; - b.prototype.getTranslateX = function() { + a.prototype.getTranslateX = function() { return this._data[4]; }; - b.prototype.getTranslateY = function() { + a.prototype.getTranslateY = function() { return this._data[4]; }; - b.prototype.getScaleX = function() { - var a = this._data; - if (1 === a[0] && 0 === a[1]) { + a.prototype.getScaleX = function() { + var b = this._data; + if (1 === b[0] && 0 === b[1]) { return 1; } - var d = Math.sqrt(a[0] * a[0] + a[1] * a[1]); - return 0 < a[0] ? d : -d; + var a = Math.sqrt(b[0] * b[0] + b[1] * b[1]); + return 0 < b[0] ? a : -a; }; - b.prototype.getScaleY = function() { - var a = this._data; - if (0 === a[2] && 1 === a[3]) { + a.prototype.getScaleY = function() { + var b = this._data; + if (0 === b[2] && 1 === b[3]) { return 1; } - var d = Math.sqrt(a[2] * a[2] + a[3] * a[3]); - return 0 < a[3] ? d : -d; + var a = Math.sqrt(b[2] * b[2] + b[3] * b[3]); + return 0 < b[3] ? a : -a; }; - b.prototype.getScale = function() { + a.prototype.getScale = function() { return(this.getScaleX() + this.getScaleY()) / 2; }; - b.prototype.getAbsoluteScaleX = function() { + a.prototype.getAbsoluteScaleX = function() { return Math.abs(this.getScaleX()); }; - b.prototype.getAbsoluteScaleY = function() { + a.prototype.getAbsoluteScaleY = function() { return Math.abs(this.getScaleY()); }; - b.prototype.getRotation = function() { + a.prototype.getRotation = function() { + var b = this._data; + return 180 * Math.atan(b[1] / b[0]) / Math.PI; + }; + a.prototype.isScaleOrRotation = function() { + var b = this._data; + return.01 > Math.abs(b[0] * b[2] + b[1] * b[3]); + }; + a.prototype.toString = function(b) { + void 0 === b && (b = 2); var a = this._data; - return 180 * Math.atan(a[1] / a[0]) / Math.PI; + return "{" + a[0].toFixed(b) + ", " + a[1].toFixed(b) + ", " + a[2].toFixed(b) + ", " + a[3].toFixed(b) + ", " + a[4].toFixed(b) + ", " + a[5].toFixed(b) + "}"; }; - b.prototype.isScaleOrRotation = function() { - var a = this._data; - return.01 > Math.abs(a[0] * a[2] + a[1] * a[3]); + a.prototype.toWebGLMatrix = function() { + var b = this._data; + return new Float32Array([b[0], b[1], 0, b[2], b[3], 0, b[4], b[5], 1]); }; - b.prototype.toString = function(a) { - void 0 === a && (a = 2); - var d = this._data; - return "{" + d[0].toFixed(a) + ", " + d[1].toFixed(a) + ", " + d[2].toFixed(a) + ", " + d[3].toFixed(a) + ", " + d[4].toFixed(a) + ", " + d[5].toFixed(a) + "}"; + a.prototype.toCSSTransform = function() { + var b = this._data; + return "matrix(" + b[0] + ", " + b[1] + ", " + b[2] + ", " + b[3] + ", " + b[4] + ", " + b[5] + ")"; }; - b.prototype.toWebGLMatrix = function() { - var a = this._data; - return new Float32Array([a[0], a[1], 0, a[2], a[3], 0, a[4], a[5], 1]); + a.createIdentity = function() { + var b = a.allocate(); + b.setIdentity(); + return b; }; - b.prototype.toCSSTransform = function() { - var a = this._data; - return "matrix(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")"; + a.prototype.toSVGMatrix = function() { + var b = this._data, f = a._svg.createSVGMatrix(); + f.a = b[0]; + f.b = b[1]; + f.c = b[2]; + f.d = b[3]; + f.e = b[4]; + f.f = b[5]; + return f; }; - b.createIdentity = function() { - var a = b.allocate(); - a.setIdentity(); - return a; + a.prototype.snap = function() { + var b = this._data; + return this.isTranslationOnly() ? (b[0] = 1, b[1] = 0, b[2] = 0, b[3] = 1, b[4] = Math.round(b[4]), b[5] = Math.round(b[5]), this._type = 2, !0) : !1; }; - b.prototype.toSVGMatrix = function() { - var a = this._data, d = b._svg.createSVGMatrix(); - d.a = a[0]; - d.b = a[1]; - d.c = a[2]; - d.d = a[3]; - d.e = a[4]; - d.f = a[5]; - return d; + a.createIdentitySVGMatrix = function() { + return a._svg.createSVGMatrix(); }; - b.prototype.snap = function() { - var a = this._data; - return this.isTranslationOnly() ? (a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 1, a[4] = Math.round(a[4]), a[5] = Math.round(a[5]), this._type = 2, !0) : !1; + a.createSVGMatrixFromArray = function(b) { + var f = a._svg.createSVGMatrix(); + f.a = b[0]; + f.b = b[1]; + f.c = b[2]; + f.d = b[3]; + f.e = b[4]; + f.f = b[5]; + return f; }; - b.createIdentitySVGMatrix = function() { - return b._svg.createSVGMatrix(); + a.allocationCount = 0; + a._dirtyStack = []; + a._svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + a.multiply = function(b, a) { + var c = a._data; + b.transform(c[0], c[1], c[2], c[3], c[4], c[5]); }; - b.createSVGMatrixFromArray = function(a) { - var d = b._svg.createSVGMatrix(); - d.a = a[0]; - d.b = a[1]; - d.c = a[2]; - d.d = a[3]; - d.e = a[4]; - d.f = a[5]; - return d; - }; - b.allocationCount = 0; - b._dirtyStack = []; - b._svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - b.multiply = function(a, d) { - var b = d._data; - a.transform(b[0], b[1], b[2], b[3], b[4], b[5]); - }; - return b; + return a; }(); - e.Matrix = t; - t = function() { + g.Matrix = s; + s = function() { function a(b) { this._m = new Float32Array(b); } a.prototype.asWebGLMatrix = function() { return this._m; }; - a.createCameraLookAt = function(b, d, c) { - d = b.clone().sub(d).normalize(); - c = c.clone().cross(d).normalize(); - var e = d.clone().cross(c); - return new a([c.x, c.y, c.z, 0, e.x, e.y, e.z, 0, d.x, d.y, d.z, 0, b.x, b.y, b.z, 1]); + a.createCameraLookAt = function(b, f, c) { + f = b.clone().sub(f).normalize(); + c = c.clone().cross(f).normalize(); + var d = f.clone().cross(c); + return new a([c.x, c.y, c.z, 0, d.x, d.y, d.z, 0, f.x, f.y, f.z, 0, b.x, b.y, b.z, 1]); }; - a.createLookAt = function(b, d, c) { - d = b.clone().sub(d).normalize(); - c = c.clone().cross(d).normalize(); - var e = d.clone().cross(c); - return new a([c.x, e.x, d.x, 0, e.x, e.y, d.y, 0, d.x, e.z, d.z, 0, -c.dot(b), -e.dot(b), -d.dot(b), 1]); + a.createLookAt = function(b, f, c) { + f = b.clone().sub(f).normalize(); + c = c.clone().cross(f).normalize(); + var d = f.clone().cross(c); + return new a([c.x, d.x, f.x, 0, d.x, d.y, f.y, 0, f.x, d.z, f.z, 0, -c.dot(b), -d.dot(b), -f.dot(b), 1]); }; - a.prototype.mul = function(a) { - a = [a.x, a.y, a.z, 0]; - for (var b = this._m, c = [], h = 0;4 > h;h++) { - c[h] = 0; - for (var s = 4 * h, e = 0;4 > e;e++) { - c[h] += b[s + e] * a[e]; + a.prototype.mul = function(b) { + b = [b.x, b.y, b.z, 0]; + for (var a = this._m, c = [], d = 0;4 > d;d++) { + c[d] = 0; + for (var e = 4 * d, h = 0;4 > h;h++) { + c[d] += a[e + h] * b[h]; } } - return new y(c[0], c[1], c[2]); + return new k(c[0], c[1], c[2]); }; - a.create2DProjection = function(b, d, c) { - return new a([2 / b, 0, 0, 0, 0, -2 / d, 0, 0, 0, 0, 2 / c, 0, -1, 1, 0, 1]); + a.create2DProjection = function(b, f, c) { + return new a([2 / b, 0, 0, 0, 0, -2 / f, 0, 0, 0, 0, 2 / c, 0, -1, 1, 0, 1]); }; a.createPerspective = function(b) { b = Math.tan(.5 * Math.PI - .5 * b); - var d = 1 / -4999.9; - return new a([b / 1, 0, 0, 0, 0, b, 0, 0, 0, 0, 5000.1 * d, -1, 0, 0, 1E3 * d, 0]); + var f = 1 / -4999.9; + return new a([b / 1, 0, 0, 0, 0, b, 0, 0, 0, 0, 5000.1 * f, -1, 0, 0, 1E3 * f, 0]); }; a.createIdentity = function() { return a.createTranslation(0, 0); }; - a.createTranslation = function(b, d) { - return new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, d, 0, 1]); + a.createTranslation = function(b, f) { + return new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, f, 0, 1]); }; a.createXRotation = function(b) { - var d = Math.cos(b); + var f = Math.cos(b); b = Math.sin(b); - return new a([1, 0, 0, 0, 0, d, b, 0, 0, -b, d, 0, 0, 0, 0, 1]); + return new a([1, 0, 0, 0, 0, f, b, 0, 0, -b, f, 0, 0, 0, 0, 1]); }; a.createYRotation = function(b) { - var d = Math.cos(b); + var f = Math.cos(b); b = Math.sin(b); - return new a([d, 0, -b, 0, 0, 1, 0, 0, b, 0, d, 0, 0, 0, 0, 1]); + return new a([f, 0, -b, 0, 0, 1, 0, 0, b, 0, f, 0, 0, 0, 0, 1]); }; a.createZRotation = function(b) { - var d = Math.cos(b); + var f = Math.cos(b); b = Math.sin(b); - return new a([d, b, 0, 0, -b, d, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); + return new a([f, b, 0, 0, -b, f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); }; - a.createScale = function(b, d, c) { - return new a([b, 0, 0, 0, 0, d, 0, 0, 0, 0, c, 0, 0, 0, 0, 1]); + a.createScale = function(b, f, c) { + return new a([b, 0, 0, 0, 0, f, 0, 0, 0, 0, c, 0, 0, 0, 0, 1]); }; - a.createMultiply = function(b, d) { - var c = b._m, e = d._m, s = c[0], l = c[1], g = c[2], n = c[3], k = c[4], p = c[5], r = c[6], t = c[7], m = c[8], v = c[9], u = c[10], y = c[11], w = c[12], A = c[13], C = c[14], c = c[15], D = e[0], z = e[1], E = e[2], G = e[3], F = e[4], H = e[5], I = e[6], J = e[7], K = e[8], L = e[9], M = e[10], N = e[11], Q = e[12], R = e[13], S = e[14], e = e[15]; - return new a([s * D + l * F + g * K + n * Q, s * z + l * H + g * L + n * R, s * E + l * I + g * M + n * S, s * G + l * J + g * N + n * e, k * D + p * F + r * K + t * Q, k * z + p * H + r * L + t * R, k * E + p * I + r * M + t * S, k * G + p * J + r * N + t * e, m * D + v * F + u * K + y * Q, m * z + v * H + u * L + y * R, m * E + v * I + u * M + y * S, m * G + v * J + u * N + y * e, w * D + A * F + C * K + c * Q, w * z + A * H + C * L + c * R, w * E + A * I + C * M + c * S, w * G + A * - J + C * N + c * e]); + a.createMultiply = function(b, f) { + var c = b._m, d = f._m, h = c[0], n = c[1], g = c[2], k = c[3], p = c[4], m = c[5], l = c[6], s = c[7], u = c[8], v = c[9], r = c[10], t = c[11], y = c[12], z = c[13], B = c[14], c = c[15], x = d[0], E = d[1], A = d[2], D = d[3], F = d[4], I = d[5], J = d[6], K = d[7], L = d[8], M = d[9], N = d[10], O = d[11], R = d[12], S = d[13], T = d[14], d = d[15]; + return new a([h * x + n * F + g * L + k * R, h * E + n * I + g * M + k * S, h * A + n * J + g * N + k * T, h * D + n * K + g * O + k * d, p * x + m * F + l * L + s * R, p * E + m * I + l * M + s * S, p * A + m * J + l * N + s * T, p * D + m * K + l * O + s * d, u * x + v * F + r * L + t * R, u * E + v * I + r * M + t * S, u * A + v * J + r * N + t * T, u * D + v * K + r * O + t * d, y * x + z * F + B * L + c * R, y * E + z * I + B * M + c * S, y * A + z * J + B * N + c * T, y * D + z * + K + B * O + c * d]); }; a.createInverse = function(b) { - var d = b._m; - b = d[0]; - var c = d[1], e = d[2], s = d[3], l = d[4], g = d[5], n = d[6], k = d[7], p = d[8], r = d[9], t = d[10], m = d[11], v = d[12], u = d[13], y = d[14], d = d[15], w = t * d, A = y * m, C = n * d, D = y * k, z = n * m, E = t * k, G = e * d, F = y * s, H = e * m, I = t * s, J = e * k, K = n * s, L = p * u, M = v * r, N = l * u, Q = v * g, R = l * r, S = p * g, Y = b * u, Z = v * c, $ = b * r, aa = p * c, ba = b * g, ca = l * c, da = w * g + D * r + z * u - (A * g + C * r + E * u), ea = A * c + - G * r + I * u - (w * c + F * r + H * u), u = C * c + F * g + J * u - (D * c + G * g + K * u), c = E * c + H * g + K * r - (z * c + I * g + J * r), g = 1 / (b * da + l * ea + p * u + v * c); - return new a([g * da, g * ea, g * u, g * c, g * (A * l + C * p + E * v - (w * l + D * p + z * v)), g * (w * b + F * p + H * v - (A * b + G * p + I * v)), g * (D * b + G * l + K * v - (C * b + F * l + J * v)), g * (z * b + I * l + J * p - (E * b + H * l + K * p)), g * (L * k + Q * m + R * d - (M * k + N * m + S * d)), g * (M * s + Y * m + aa * d - (L * s + Z * m + $ * d)), g * (N * s + Z * k + ba * d - (Q * s + Y * k + ca * d)), g * (S * s + $ * k + ca * m - (R * s + aa * k + ba * m)), g * - (N * t + S * y + M * n - (R * y + L * n + Q * t)), g * ($ * y + L * e + Z * t - (Y * t + aa * y + M * e)), g * (Y * n + ca * y + Q * e - (ba * y + N * e + Z * n)), g * (ba * t + R * e + aa * n - ($ * n + ca * t + S * e))]); + var f = b._m; + b = f[0]; + var c = f[1], d = f[2], h = f[3], n = f[4], g = f[5], k = f[6], p = f[7], m = f[8], l = f[9], s = f[10], u = f[11], v = f[12], r = f[13], t = f[14], f = f[15], y = s * f, z = t * u, B = k * f, x = t * p, E = k * u, A = s * p, D = d * f, F = t * h, I = d * u, J = s * h, K = d * p, L = k * h, M = m * r, N = v * l, O = n * r, R = v * g, S = n * l, T = m * g, X = b * r, Y = v * c, Z = b * l, $ = m * c, aa = b * g, ba = n * c, ca = y * g + x * l + E * r - (z * g + B * l + A * r), da = z * c + + D * l + J * r - (y * c + F * l + I * r), r = B * c + F * g + K * r - (x * c + D * g + L * r), c = A * c + I * g + L * l - (E * c + J * g + K * l), g = 1 / (b * ca + n * da + m * r + v * c); + return new a([g * ca, g * da, g * r, g * c, g * (z * n + B * m + A * v - (y * n + x * m + E * v)), g * (y * b + F * m + I * v - (z * b + D * m + J * v)), g * (x * b + D * n + L * v - (B * b + F * n + K * v)), g * (E * b + J * n + K * m - (A * b + I * n + L * m)), g * (M * p + R * u + S * f - (N * p + O * u + T * f)), g * (N * h + X * u + $ * f - (M * h + Y * u + Z * f)), g * (O * h + Y * p + aa * f - (R * h + X * p + ba * f)), g * (T * h + Z * p + ba * u - (S * h + $ * p + aa * u)), g * + (O * s + T * t + N * k - (S * t + M * k + R * s)), g * (Z * t + M * d + Y * s - (X * s + $ * t + N * d)), g * (X * k + ba * t + R * d - (aa * t + O * d + Y * k)), g * (aa * s + S * d + $ * k - (Z * k + ba * s + T * d))]); }; return a; }(); - e.Matrix3D = t; - t = function() { - function a(b, d, c) { + g.Matrix3D = s; + s = function() { + function a(b, f, c) { void 0 === c && (c = 7); - var e = this.size = 1 << c; + var d = this.size = 1 << c; this.sizeInBits = c; this.w = b; - this.h = d; - this.c = Math.ceil(b / e); - this.r = Math.ceil(d / e); + this.h = f; + this.c = Math.ceil(b / d); + this.r = Math.ceil(f / d); this.grid = []; for (b = 0;b < this.r;b++) { - for (this.grid.push([]), d = 0;d < this.c;d++) { - this.grid[b][d] = new a.Cell(new v(d * e, b * e, e, e)); + for (this.grid.push([]), f = 0;f < this.c;f++) { + this.grid[b][f] = new a.Cell(new u(f * d, b * d, d, d)); } } } a.prototype.clear = function() { - for (var a = 0;a < this.r;a++) { - for (var b = 0;b < this.c;b++) { - this.grid[a][b].clear(); + for (var b = 0;b < this.r;b++) { + for (var a = 0;a < this.c;a++) { + this.grid[b][a].clear(); } } }; a.prototype.getBounds = function() { - return new v(0, 0, this.w, this.h); + return new u(0, 0, this.w, this.h); }; - a.prototype.addDirtyRectangle = function(a) { - var b = a.x >> this.sizeInBits, c = a.y >> this.sizeInBits; - if (!(b >= this.c || c >= this.r)) { - 0 > b && (b = 0); + a.prototype.addDirtyRectangle = function(b) { + var a = b.x >> this.sizeInBits, c = b.y >> this.sizeInBits; + if (!(a >= this.c || c >= this.r)) { + 0 > a && (a = 0); 0 > c && (c = 0); - var h = this.grid[c][b]; - a = a.clone(); - a.snap(); - if (h.region.contains(a)) { - h.bounds.isEmpty() ? h.bounds.set(a) : h.bounds.contains(a) || h.bounds.union(a); + var d = this.grid[c][a]; + b = b.clone(); + b.snap(); + if (d.region.contains(b)) { + d.bounds.isEmpty() ? d.bounds.set(b) : d.bounds.contains(b) || d.bounds.union(b); } else { - for (var e = Math.min(this.c, Math.ceil((a.x + a.w) / this.size)) - b, l = Math.min(this.r, Math.ceil((a.y + a.h) / this.size)) - c, g = 0;g < e;g++) { - for (var n = 0;n < l;n++) { - h = this.grid[c + n][b + g], h = h.region.clone(), h.intersect(a), h.isEmpty() || this.addDirtyRectangle(h); + for (var e = Math.min(this.c, Math.ceil((b.x + b.w) / this.size)) - a, h = Math.min(this.r, Math.ceil((b.y + b.h) / this.size)) - c, n = 0;n < e;n++) { + for (var g = 0;g < h;g++) { + d = this.grid[c + g][a + n], d = d.region.clone(), d.intersect(b), d.isEmpty() || this.addDirtyRectangle(d); } } } } }; - a.prototype.gatherRegions = function(a) { - for (var b = 0;b < this.r;b++) { + a.prototype.gatherRegions = function(b) { + for (var a = 0;a < this.r;a++) { for (var c = 0;c < this.c;c++) { - this.grid[b][c].bounds.isEmpty() || a.push(this.grid[b][c].bounds); + this.grid[a][c].bounds.isEmpty() || b.push(this.grid[a][c].bounds); } } }; - a.prototype.gatherOptimizedRegions = function(a) { - this.gatherRegions(a); + a.prototype.gatherOptimizedRegions = function(b) { + this.gatherRegions(b); }; a.prototype.getDirtyRatio = function() { - var a = this.w * this.h; - if (0 === a) { + var b = this.w * this.h; + if (0 === b) { return 0; } - for (var b = 0, c = 0;c < this.r;c++) { - for (var h = 0;h < this.c;h++) { - b += this.grid[c][h].region.area(); + for (var a = 0, c = 0;c < this.r;c++) { + for (var d = 0;d < this.c;d++) { + a += this.grid[c][d].region.area(); } } - return b / a; + return a / b; }; - a.prototype.render = function(a, b) { - function c(b) { - a.rect(b.x, b.y, b.w, b.h); + a.prototype.render = function(b, a) { + function c(a) { + b.rect(a.x, a.y, a.w, a.h); } - if (b && b.drawGrid) { - a.strokeStyle = "white"; - for (var h = 0;h < this.r;h++) { + if (a && a.drawGrid) { + b.strokeStyle = "white"; + for (var d = 0;d < this.r;d++) { for (var e = 0;e < this.c;e++) { - var g = this.grid[h][e]; - a.beginPath(); - c(g.region); - a.closePath(); - a.stroke(); + var h = this.grid[d][e]; + b.beginPath(); + c(h.region); + b.closePath(); + b.stroke(); } } } - a.strokeStyle = "#E0F8D8"; - for (h = 0;h < this.r;h++) { + b.strokeStyle = "#E0F8D8"; + for (d = 0;d < this.r;d++) { for (e = 0;e < this.c;e++) { - g = this.grid[h][e], a.beginPath(), c(g.bounds), a.closePath(), a.stroke(); + h = this.grid[d][e], b.beginPath(), c(h.bounds), b.closePath(), b.stroke(); } } }; - a.tmpRectangle = v.createEmpty(); + a.tmpRectangle = u.createEmpty(); return a; }(); - e.DirtyRegion = t; + g.DirtyRegion = s; (function(a) { var b = function() { - function a(b) { - this.region = b; - this.bounds = v.createEmpty(); + function b(a) { + this.region = a; + this.bounds = u.createEmpty(); } - a.prototype.clear = function() { + b.prototype.clear = function() { this.bounds.setEmpty(); }; - return a; + return b; }(); a.Cell = b; - })(t = e.DirtyRegion || (e.DirtyRegion = {})); - var r = function() { - function a(b, d, c, h, e, g) { + })(s = g.DirtyRegion || (g.DirtyRegion = {})); + var v = function() { + function a(b, f, c, d, e, h) { this.index = b; - this.x = d; + this.x = f; this.y = c; - this.scale = g; - this.bounds = new v(d * h, c * e, h, e); + this.scale = h; + this.bounds = new u(f * d, c * e, d, e); } a.prototype.getOBB = function() { if (this._obb) { return this._obb; } this.bounds.getCorners(a.corners); - return this._obb = new l(a.corners); + return this._obb = new n(a.corners); }; a.corners = p.createEmptyPoints(4); return a; }(); - e.Tile = r; - var u = function() { - function a(b, d, c, h, e) { + g.Tile = v; + var d = function() { + function a(b, f, c, d, e) { this.tileW = c; - this.tileH = h; + this.tileH = d; this.scale = e; this.w = b; - this.h = d; - this.rows = Math.ceil(d / h); + this.h = f; + this.rows = Math.ceil(f / d); this.columns = Math.ceil(b / c); - n(2048 > this.rows && 2048 > this.columns); this.tiles = []; - for (d = b = 0;d < this.rows;d++) { - for (var g = 0;g < this.columns;g++) { - this.tiles.push(new r(b++, g, d, c, h, e)); + for (f = b = 0;f < this.rows;f++) { + for (var h = 0;h < this.columns;h++) { + this.tiles.push(new v(b++, h, f, c, d, e)); } } } - a.prototype.getTiles = function(a, b) { - if (b.emptyArea(a)) { + a.prototype.getTiles = function(b, a) { + if (a.emptyArea(b)) { return[]; } - if (b.infiniteArea(a)) { + if (a.infiniteArea(b)) { return this.tiles; } var c = this.columns * this.rows; - return 40 > c && b.isScaleOrRotation() ? this.getFewTiles(a, b, 10 < c) : this.getManyTiles(a, b); + return 40 > c && a.isScaleOrRotation() ? this.getFewTiles(b, a, 10 < c) : this.getManyTiles(b, a); }; - a.prototype.getFewTiles = function(b, d, c) { + a.prototype.getFewTiles = function(b, f, c) { void 0 === c && (c = !0); - if (d.isTranslationOnly() && 1 === this.tiles.length) { - return this.tiles[0].bounds.intersectsTranslated(b, d.tx, d.ty) ? [this.tiles[0]] : []; + if (f.isTranslationOnly() && 1 === this.tiles.length) { + return this.tiles[0].bounds.intersectsTranslated(b, f.tx, f.ty) ? [this.tiles[0]] : []; } - d.transformRectangle(b, a._points); - var e; - b = new v(0, 0, this.w, this.h); - c && (e = new l(a._points)); - b.intersect(l.getBounds(a._points)); + f.transformRectangle(b, a._points); + var d; + b = new u(0, 0, this.w, this.h); + c && (d = new n(a._points)); + b.intersect(n.getBounds(a._points)); if (b.isEmpty()) { return[]; } - var s = b.x / this.tileW | 0; - d = b.y / this.tileH | 0; - var g = Math.ceil((b.x + b.w) / this.tileW) | 0, n = Math.ceil((b.y + b.h) / this.tileH) | 0, s = k(s, 0, this.columns), g = k(g, 0, this.columns); - d = k(d, 0, this.rows); - for (var n = k(n, 0, this.rows), p = [];s < g;s++) { - for (var r = d;r < n;r++) { - var t = this.tiles[r * this.columns + s]; - t.bounds.intersects(b) && (c ? t.getOBB().intersects(e) : 1) && p.push(t); + var h = b.x / this.tileW | 0; + f = b.y / this.tileH | 0; + var g = Math.ceil((b.x + b.w) / this.tileW) | 0, k = Math.ceil((b.y + b.h) / this.tileH) | 0, h = m(h, 0, this.columns), g = m(g, 0, this.columns); + f = m(f, 0, this.rows); + for (var k = m(k, 0, this.rows), p = [];h < g;h++) { + for (var l = f;l < k;l++) { + var s = this.tiles[l * this.columns + h]; + s.bounds.intersects(b) && (c ? s.getOBB().intersects(d) : 1) && p.push(s); } } return p; }; - a.prototype.getManyTiles = function(b, d) { - function c(a, b, d) { - return(a - b.x) * (d.y - b.y) / (d.x - b.x) + b.y; + a.prototype.getManyTiles = function(b, f) { + function c(b, a, f) { + return(b - a.x) * (f.y - a.y) / (f.x - a.x) + a.y; } - function e(a, b, d, c, f) { - if (!(0 > d || d >= b.columns)) { - for (c = k(c, 0, b.rows), f = k(f + 1, 0, b.rows);c < f;c++) { - a.push(b.tiles[c * b.columns + d]); + function d(b, a, f, c, e) { + if (!(0 > f || f >= a.columns)) { + for (c = m(c, 0, a.rows), e = m(e + 1, 0, a.rows);c < e;c++) { + b.push(a.tiles[c * a.columns + f]); } } } - var s = a._points; - d.transformRectangle(b, s); - for (var g = s[0].x < s[1].x ? 0 : 1, l = s[2].x < s[3].x ? 2 : 3, l = s[g].x < s[l].x ? g : l, g = [], n = 0;5 > n;n++, l++) { - g.push(s[l % 4]); + var h = a._points; + f.transformRectangle(b, h); + for (var n = h[0].x < h[1].x ? 0 : 1, g = h[2].x < h[3].x ? 2 : 3, g = h[n].x < h[g].x ? n : g, n = [], k = 0;5 > k;k++, g++) { + n.push(h[g % 4]); } - (g[1].x - g[0].x) * (g[3].y - g[0].y) < (g[1].y - g[0].y) * (g[3].x - g[0].x) && (s = g[1], g[1] = g[3], g[3] = s); - var s = [], p, r, l = Math.floor(g[0].x / this.tileW), n = (l + 1) * this.tileW; - if (g[2].x < n) { - p = Math.min(g[0].y, g[1].y, g[2].y, g[3].y); - r = Math.max(g[0].y, g[1].y, g[2].y, g[3].y); - var t = Math.floor(p / this.tileH), m = Math.floor(r / this.tileH); - e(s, this, l, t, m); - return s; + (n[1].x - n[0].x) * (n[3].y - n[0].y) < (n[1].y - n[0].y) * (n[3].x - n[0].x) && (h = n[1], n[1] = n[3], n[3] = h); + var h = [], p, l, g = Math.floor(n[0].x / this.tileW), k = (g + 1) * this.tileW; + if (n[2].x < k) { + p = Math.min(n[0].y, n[1].y, n[2].y, n[3].y); + l = Math.max(n[0].y, n[1].y, n[2].y, n[3].y); + var s = Math.floor(p / this.tileH), u = Math.floor(l / this.tileH); + d(h, this, g, s, u); + return h; } - var v = 0, u = 4, y = !1; - if (g[0].x === g[1].x || g[0].x === g[3].x) { - g[0].x === g[1].x ? (y = !0, v++) : u--, p = c(n, g[v], g[v + 1]), r = c(n, g[u], g[u - 1]), t = Math.floor(g[v].y / this.tileH), m = Math.floor(g[u].y / this.tileH), e(s, this, l, t, m), l++; + var v = 0, r = 4, t = !1; + if (n[0].x === n[1].x || n[0].x === n[3].x) { + n[0].x === n[1].x ? (t = !0, v++) : r--, p = c(k, n[v], n[v + 1]), l = c(k, n[r], n[r - 1]), s = Math.floor(n[v].y / this.tileH), u = Math.floor(n[r].y / this.tileH), d(h, this, g, s, u), g++; } do { - var w, B, A, C; - g[v + 1].x < n ? (w = g[v + 1].y, A = !0) : (w = c(n, g[v], g[v + 1]), A = !1); - g[u - 1].x < n ? (B = g[u - 1].y, C = !0) : (B = c(n, g[u], g[u - 1]), C = !1); - t = Math.floor((g[v].y < g[v + 1].y ? p : w) / this.tileH); - m = Math.floor((g[u].y > g[u - 1].y ? r : B) / this.tileH); - e(s, this, l, t, m); - if (A && y) { + var C, y, z, B; + n[v + 1].x < k ? (C = n[v + 1].y, z = !0) : (C = c(k, n[v], n[v + 1]), z = !1); + n[r - 1].x < k ? (y = n[r - 1].y, B = !0) : (y = c(k, n[r], n[r - 1]), B = !1); + s = Math.floor((n[v].y < n[v + 1].y ? p : C) / this.tileH); + u = Math.floor((n[r].y > n[r - 1].y ? l : y) / this.tileH); + d(h, this, g, s, u); + if (z && t) { break; } - A ? (y = !0, v++, p = c(n, g[v], g[v + 1])) : p = w; - C ? (u--, r = c(n, g[u], g[u - 1])) : r = B; - l++; - n = (l + 1) * this.tileW; - } while (v < u); - return s; + z ? (t = !0, v++, p = c(k, n[v], n[v + 1])) : p = C; + B ? (r--, l = c(k, n[r], n[r - 1])) : l = y; + g++; + k = (g + 1) * this.tileW; + } while (v < r); + return h; }; a._points = p.createEmptyPoints(4); return a; }(); - e.TileCache = u; - t = function() { - function a(b, d, c) { + g.TileCache = d; + s = function() { + function c(b, a, d) { this._cacheLevels = []; this._source = b; - this._tileSize = d; - this._minUntiledSize = c; + this._tileSize = a; + this._minUntiledSize = d; } - a.prototype._getTilesAtScale = function(a, d, c) { - var h = Math.max(d.getAbsoluteScaleX(), d.getAbsoluteScaleY()), e = 0; - 1 !== h && (e = k(Math.round(Math.log(1 / h) / Math.LN2), -5, 3)); - h = b(e); + c.prototype._getTilesAtScale = function(b, f, c) { + var e = Math.max(f.getAbsoluteScaleX(), f.getAbsoluteScaleY()), h = 0; + 1 !== e && (h = m(Math.round(Math.log(1 / e) / Math.LN2), -5, 3)); + e = a(h); if (this._source.hasFlags(1048576)) { for (;;) { - h = b(e); - if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(h, h))) { + e = a(h); + if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(e, e))) { break; } - e--; - n(-5 <= e); + h--; } } - this._source.hasFlags(2097152) || (e = k(e, -5, 0)); - h = b(e); - c = 5 + e; - e = this._cacheLevels[c]; - if (!e) { - var e = this._source.getBounds().getAbsoluteBounds().clone().scale(h, h), g, l; - this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(e.w, e.h) <= this._minUntiledSize ? (g = e.w, l = e.h) : g = l = this._tileSize; - e = this._cacheLevels[c] = new u(e.w, e.h, g, l, h); + this._source.hasFlags(2097152) || (h = m(h, -5, 0)); + e = a(h); + c = 5 + h; + h = this._cacheLevels[c]; + if (!h) { + var h = this._source.getBounds().getAbsoluteBounds().clone().scale(e, e), n, g; + this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(h.w, h.h) <= this._minUntiledSize ? (n = h.w, g = h.h) : n = g = this._tileSize; + h = this._cacheLevels[c] = new d(h.w, h.h, n, g, e); } - return e.getTiles(a, d.scaleClone(h, h)); + return h.getTiles(b, f.scaleClone(e, e)); }; - a.prototype.fetchTiles = function(a, b, c, h) { - var e = new v(0, 0, c.canvas.width, c.canvas.height); - a = this._getTilesAtScale(a, b, e); - var g; - b = this._source; - for (var l = 0;l < a.length;l++) { - var n = a[l]; - n.cachedSurfaceRegion && n.cachedSurfaceRegion.surface && !b.hasFlags(1048592) || (g || (g = []), g.push(n)); - } - g && this._cacheTiles(c, g, h, e); - b.removeFlags(16); - return a; - }; - a.prototype._getTileBounds = function(a) { - for (var b = v.createEmpty(), c = 0;c < a.length;c++) { - b.union(a[c].bounds); + c.prototype.fetchTiles = function(b, a, c, d) { + var e = new u(0, 0, c.canvas.width, c.canvas.height); + b = this._getTilesAtScale(b, a, e); + var h; + a = this._source; + for (var n = 0;n < b.length;n++) { + var g = b[n]; + g.cachedSurfaceRegion && g.cachedSurfaceRegion.surface && !a.hasFlags(1048592) || (h || (h = []), h.push(g)); } + h && this._cacheTiles(c, h, d, e); + a.removeFlags(16); return b; }; - a.prototype._cacheTiles = function(a, b, c, h, e) { - void 0 === e && (e = 4); - n(0 < e, "Infinite recursion is likely."); - var g = this._getTileBounds(b); - a.save(); - a.setTransform(1, 0, 0, 1, 0, 0); - a.clearRect(0, 0, h.w, h.h); - a.translate(-g.x, -g.y); - a.scale(b[0].scale, b[0].scale); - var l = this._source.getBounds(); - a.translate(-l.x, -l.y); - 2 <= m.traceLevel && m.writer && m.writer.writeLn("Rendering Tiles: " + g); - this._source.render(a, 0); - a.restore(); - for (var l = null, k = 0;k < b.length;k++) { - var p = b[k], r = p.bounds.clone(); - r.x -= g.x; - r.y -= g.y; - h.contains(r) || (l || (l = []), l.push(p)); - p.cachedSurfaceRegion = c(p.cachedSurfaceRegion, a, r); + c.prototype._getTileBounds = function(b) { + for (var a = u.createEmpty(), c = 0;c < b.length;c++) { + a.union(b[c].bounds); } - l && (2 <= l.length ? (b = l.slice(0, l.length / 2 | 0), g = l.slice(b.length), this._cacheTiles(a, b, c, h, e - 1), this._cacheTiles(a, g, c, h, e - 1)) : this._cacheTiles(a, l, c, h, e - 1)); + return a; }; - return a; + c.prototype._cacheTiles = function(b, a, c, d, e) { + void 0 === e && (e = 4); + var h = this._getTileBounds(a); + b.save(); + b.setTransform(1, 0, 0, 1, 0, 0); + b.clearRect(0, 0, d.w, d.h); + b.translate(-h.x, -h.y); + b.scale(a[0].scale, a[0].scale); + var n = this._source.getBounds(); + b.translate(-n.x, -n.y); + 2 <= r.traceLevel && r.writer && r.writer.writeLn("Rendering Tiles: " + h); + this._source.render(b, 0); + b.restore(); + for (var n = null, g = 0;g < a.length;g++) { + var k = a[g], p = k.bounds.clone(); + p.x -= h.x; + p.y -= h.y; + d.contains(p) || (n || (n = []), n.push(k)); + k.cachedSurfaceRegion = c(k.cachedSurfaceRegion, b, p); + } + n && (2 <= n.length ? (a = n.slice(0, n.length / 2 | 0), h = n.slice(a.length), this._cacheTiles(b, a, c, d, e - 1), this._cacheTiles(b, h, c, d, e - 1)) : this._cacheTiles(b, n, c, d, e - 1)); + }; + return c; }(); - e.RenderableTileCache = t; - })(m.Geometry || (m.Geometry = {})); - })(g.GFX || (g.GFX = {})); + g.RenderableTileCache = s; + })(r.Geometry || (r.Geometry = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(g, m) { - function e() { - this.constructor = g; +__extends = this.__extends || function(l, r) { + function g() { + this.constructor = l; } - for (var c in m) { - m.hasOwnProperty(c) && (g[c] = m[c]); + for (var c in r) { + r.hasOwnProperty(c) && (l[c] = r[c]); } - e.prototype = m.prototype; - g.prototype = new e; + g.prototype = r.prototype; + l.prototype = new g; }; -(function(g) { - (function(m) { - var e = g.IntegerUtilities.roundToMultipleOfPowerOfTwo, c = g.Debug.assert, w = m.Geometry.Rectangle; - (function(g) { - var b = function(a) { - function b() { +(function(l) { + (function(r) { + var g = l.IntegerUtilities.roundToMultipleOfPowerOfTwo, c = r.Geometry.Rectangle; + (function(l) { + var m = function(a) { + function c() { a.apply(this, arguments); } - __extends(b, a); - return b; - }(m.Geometry.Rectangle); - g.Region = b; + __extends(c, a); + return c; + }(r.Geometry.Rectangle); + l.Region = m; var a = function() { - function a(b, c) { - this._root = new n(0, 0, b | 0, c | 0, !1); + function a(c, d) { + this._root = new h(0, 0, c | 0, d | 0, !1); } - a.prototype.allocate = function(a, b) { + a.prototype.allocate = function(a, c) { a = Math.ceil(a); - b = Math.ceil(b); - c(0 < a && 0 < b); - var h = this._root.insert(a, b); - h && (h.allocator = this, h.allocated = !0); - return h; + c = Math.ceil(c); + var e = this._root.insert(a, c); + e && (e.allocator = this, e.allocated = !0); + return e; }; a.prototype.free = function(a) { - c(a.allocator === this); a.clear(); a.allocated = !1; }; @@ -7923,134 +8279,130 @@ __extends = this.__extends || function(g, m) { a.MAX_DEPTH = 256; return a; }(); - g.CompactAllocator = a; - var n = function(b) { - function c(a, h, f, d, q) { - b.call(this, a, h, f, d); + l.CompactAllocator = a; + var h = function(c) { + function h(a, e, b, f, q) { + c.call(this, a, e, b, f); this._children = null; this._horizontal = q; this.allocated = !1; } - __extends(c, b); - c.prototype.clear = function() { + __extends(h, c); + h.prototype.clear = function() { this._children = null; this.allocated = !1; }; - c.prototype.insert = function(a, b) { - return this._insert(a, b, 0); + h.prototype.insert = function(a, c) { + return this._insert(a, c, 0); }; - c.prototype._insert = function(b, h, f) { - if (!(f > a.MAX_DEPTH || this.allocated || this.w < b || this.h < h)) { + h.prototype._insert = function(c, e, b) { + if (!(b > a.MAX_DEPTH || this.allocated || this.w < c || this.h < e)) { if (this._children) { - var d; - if ((d = this._children[0]._insert(b, h, f + 1)) || (d = this._children[1]._insert(b, h, f + 1))) { - return d; + var f; + if ((f = this._children[0]._insert(c, e, b + 1)) || (f = this._children[1]._insert(c, e, b + 1))) { + return f; } } else { - return d = !this._horizontal, a.RANDOM_ORIENTATION && (d = .5 <= Math.random()), this._children = this._horizontal ? [new c(this.x, this.y, this.w, h, !1), new c(this.x, this.y + h, this.w, this.h - h, d)] : [new c(this.x, this.y, b, this.h, !0), new c(this.x + b, this.y, this.w - b, this.h, d)], d = this._children[0], d.w === b && d.h === h ? (d.allocated = !0, d) : this._insert(b, h, f + 1); + return f = !this._horizontal, a.RANDOM_ORIENTATION && (f = .5 <= Math.random()), this._children = this._horizontal ? [new h(this.x, this.y, this.w, e, !1), new h(this.x, this.y + e, this.w, this.h - e, f)] : [new h(this.x, this.y, c, this.h, !0), new h(this.x + c, this.y, this.w - c, this.h, f)], f = this._children[0], f.w === c && f.h === e ? (f.allocated = !0, f) : this._insert(c, e, b + 1); } } }; - return c; - }(g.Region), p = function() { - function a(b, c, h, f) { - this._columns = b / h | 0; - this._rows = c / f | 0; - this._sizeW = h; - this._sizeH = f; + return h; + }(l.Region), p = function() { + function a(c, d, e, b) { + this._columns = c / e | 0; + this._rows = d / b | 0; + this._sizeW = e; + this._sizeH = b; this._freeList = []; this._index = 0; this._total = this._columns * this._rows; } - a.prototype.allocate = function(a, b) { + a.prototype.allocate = function(a, c) { a = Math.ceil(a); - b = Math.ceil(b); - c(0 < a && 0 < b); - var h = this._sizeW, f = this._sizeH; - if (a > h || b > f) { + c = Math.ceil(c); + var e = this._sizeW, b = this._sizeH; + if (a > e || c > b) { return null; } - var d = this._freeList, q = this._index; - return 0 < d.length ? (h = d.pop(), c(!1 === h.allocated), h.w = a, h.h = b, h.allocated = !0, h) : q < this._total ? (d = q / this._columns | 0, h = new y((q - d * this._columns) * h, d * f, a, b), h.index = q, h.allocator = this, h.allocated = !0, this._index++, h) : null; + var f = this._freeList, q = this._index; + return 0 < f.length ? (e = f.pop(), e.w = a, e.h = c, e.allocated = !0, e) : q < this._total ? (f = q / this._columns | 0, e = new k((q - f * this._columns) * e, f * b, a, c), e.index = q, e.allocator = this, e.allocated = !0, this._index++, e) : null; }; a.prototype.free = function(a) { - c(a.allocator === this); a.allocated = !1; this._freeList.push(a); }; return a; }(); - g.GridAllocator = p; - var y = function(a) { - function b(c, h, f, d) { - a.call(this, c, h, f, d); + l.GridAllocator = p; + var k = function(a) { + function c(d, e, b, f) { + a.call(this, d, e, b, f); this.index = -1; } - __extends(b, a); - return b; - }(g.Region); - g.GridCell = y; - var v = function() { - return function(a, b, c) { + __extends(c, a); + return c; + }(l.Region); + l.GridCell = k; + var u = function() { + return function(a, c, d) { this.size = a; - this.region = b; - this.allocator = c; + this.region = c; + this.allocator = d; }; - }(), l = function(a) { - function b(c, h, f, d, q) { - a.call(this, c, h, f, d); + }(), n = function(a) { + function c(d, e, b, f, q) { + a.call(this, d, e, b, f); this.region = q; } - __extends(b, a); - return b; - }(g.Region); - g.BucketCell = l; - b = function() { - function a(b, e) { - c(0 < b && 0 < e); + __extends(c, a); + return c; + }(l.Region); + l.BucketCell = n; + m = function() { + function a(c, d) { this._buckets = []; - this._w = b | 0; - this._h = e | 0; + this._w = c | 0; + this._h = d | 0; this._filled = 0; } - a.prototype.allocate = function(a, b) { + a.prototype.allocate = function(a, d) { a = Math.ceil(a); - b = Math.ceil(b); - c(0 < a && 0 < b); - var h = Math.max(a, b); - if (a > this._w || b > this._h) { + d = Math.ceil(d); + var e = Math.max(a, d); + if (a > this._w || d > this._h) { return null; } - var f = null, d, q = this._buckets; + var b = null, f, q = this._buckets; do { - for (var g = 0;g < q.length && !(q[g].size >= h && (d = q[g], f = d.allocator.allocate(a, b)));g++) { + for (var h = 0;h < q.length && !(q[h].size >= e && (f = q[h], b = f.allocator.allocate(a, d)));h++) { } - if (!f) { - var s = this._h - this._filled; - if (s < b) { + if (!b) { + var k = this._h - this._filled; + if (k < d) { return null; } - var g = e(h, 8), n = 2 * g; - n > s && (n = s); - if (n < g) { + var h = g(e, 8), m = 2 * h; + m > k && (m = k); + if (m < h) { return null; } - s = new w(0, this._filled, this._w, n); - this._buckets.push(new v(g, s, new p(s.w, s.h, g, g))); - this._filled += n; + k = new c(0, this._filled, this._w, m); + this._buckets.push(new u(h, k, new p(k.w, k.h, h, h))); + this._filled += m; } - } while (!f); - return new l(d.region.x + f.x, d.region.y + f.y, f.w, f.h, f); + } while (!b); + return new n(f.region.x + b.x, f.region.y + b.y, b.w, b.h, b); }; a.prototype.free = function(a) { a.region.allocator.free(a.region); }; return a; }(); - g.BucketAllocator = b; - })(m.RegionAllocator || (m.RegionAllocator = {})); + l.BucketAllocator = m; + })(r.RegionAllocator || (r.RegionAllocator = {})); (function(c) { - var b = function() { + var g = function() { function a(a) { this._createSurface = a; this._surfaces = []; @@ -8058,207 +8410,207 @@ __extends = this.__extends || function(g, m) { Object.defineProperty(a.prototype, "surfaces", {get:function() { return this._surfaces; }, enumerable:!0, configurable:!0}); - a.prototype._createNewSurface = function(a, b) { - var c = this._createSurface(a, b); - this._surfaces.push(c); - return c; + a.prototype._createNewSurface = function(a, c) { + var g = this._createSurface(a, c); + this._surfaces.push(g); + return g; }; a.prototype.addSurface = function(a) { this._surfaces.push(a); }; - a.prototype.allocate = function(a, b) { - for (var c = 0;c < this._surfaces.length;c++) { - var e = this._surfaces[c].allocate(a, b); - if (e) { - return e; + a.prototype.allocate = function(a, c, g) { + for (var m = 0;m < this._surfaces.length;m++) { + var n = this._surfaces[m]; + if (n !== g && (n = n.allocate(a, c))) { + return n; } } - return this._createNewSurface(a, b).allocate(a, b); + return this._createNewSurface(a, c).allocate(a, c); }; a.prototype.free = function(a) { }; return a; }(); - c.SimpleAllocator = b; - })(m.SurfaceRegionAllocator || (m.SurfaceRegionAllocator = {})); - })(g.GFX || (g.GFX = {})); + c.SimpleAllocator = g; + })(r.SurfaceRegionAllocator || (r.SurfaceRegionAllocator = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = m.Geometry.Rectangle, c = m.Geometry.Matrix, w = m.Geometry.DirtyRegion, k = g.Debug.assert; - (function(a) { - a[a.Normal = 1] = "Normal"; - a[a.Layer = 2] = "Layer"; - a[a.Multiply = 3] = "Multiply"; - a[a.Screen = 4] = "Screen"; - a[a.Lighten = 5] = "Lighten"; - a[a.Darken = 6] = "Darken"; - a[a.Difference = 7] = "Difference"; - a[a.Add = 8] = "Add"; - a[a.Subtract = 9] = "Subtract"; - a[a.Invert = 10] = "Invert"; - a[a.Alpha = 11] = "Alpha"; - a[a.Erase = 12] = "Erase"; - a[a.Overlay = 13] = "Overlay"; - a[a.HardLight = 14] = "HardLight"; - })(m.BlendMode || (m.BlendMode = {})); - var b = m.BlendMode; - (function(a) { - a[a.None = 0] = "None"; - a[a.BoundsAutoCompute = 2] = "BoundsAutoCompute"; - a[a.IsMask = 4] = "IsMask"; - a[a.Dirty = 16] = "Dirty"; - a[a.InvalidBounds = 256] = "InvalidBounds"; - a[a.InvalidConcatenatedMatrix = 512] = "InvalidConcatenatedMatrix"; - a[a.InvalidInvertedConcatenatedMatrix = 1024] = "InvalidInvertedConcatenatedMatrix"; - a[a.InvalidConcatenatedColorMatrix = 2048] = "InvalidConcatenatedColorMatrix"; - a[a.UpOnAddedOrRemoved = a.InvalidBounds | a.Dirty] = "UpOnAddedOrRemoved"; - a[a.UpOnMoved = a.InvalidBounds | a.Dirty] = "UpOnMoved"; - a[a.DownOnAddedOrRemoved = a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.InvalidConcatenatedColorMatrix] = "DownOnAddedOrRemoved"; - a[a.DownOnMoved = a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.InvalidConcatenatedColorMatrix] = "DownOnMoved"; - a[a.UpOnColorMatrixChanged = a.Dirty] = "UpOnColorMatrixChanged"; - a[a.DownOnColorMatrixChanged = a.InvalidConcatenatedColorMatrix] = "DownOnColorMatrixChanged"; - a[a.Visible = 65536] = "Visible"; - a[a.UpOnInvalidate = a.InvalidBounds | a.Dirty] = "UpOnInvalidate"; - a[a.Default = a.BoundsAutoCompute | a.InvalidBounds | a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.Visible] = "Default"; - a[a.CacheAsBitmap = 131072] = "CacheAsBitmap"; - a[a.PixelSnapping = 262144] = "PixelSnapping"; - a[a.ImageSmoothing = 524288] = "ImageSmoothing"; - a[a.Dynamic = 1048576] = "Dynamic"; - a[a.Scalable = 2097152] = "Scalable"; - a[a.Tileable = 4194304] = "Tileable"; - a[a.Transparent = 32768] = "Transparent"; - })(m.NodeFlags || (m.NodeFlags = {})); - var a = m.NodeFlags; - (function(a) { - a[a.Node = 1] = "Node"; - a[a.Shape = 3] = "Shape"; - a[a.Group = 5] = "Group"; - a[a.Stage = 13] = "Stage"; - a[a.Renderable = 33] = "Renderable"; - })(m.NodeType || (m.NodeType = {})); - var n = m.NodeType; - (function(a) { - a[a.None = 0] = "None"; - a[a.OnStageBoundsChanged = 1] = "OnStageBoundsChanged"; - })(m.NodeEventType || (m.NodeEventType = {})); +(function(l) { + (function(r) { + var g = r.Geometry.Rectangle, c = r.Geometry.Matrix, t = r.Geometry.DirtyRegion; + (function(b) { + b[b.Normal = 1] = "Normal"; + b[b.Layer = 2] = "Layer"; + b[b.Multiply = 3] = "Multiply"; + b[b.Screen = 4] = "Screen"; + b[b.Lighten = 5] = "Lighten"; + b[b.Darken = 6] = "Darken"; + b[b.Difference = 7] = "Difference"; + b[b.Add = 8] = "Add"; + b[b.Subtract = 9] = "Subtract"; + b[b.Invert = 10] = "Invert"; + b[b.Alpha = 11] = "Alpha"; + b[b.Erase = 12] = "Erase"; + b[b.Overlay = 13] = "Overlay"; + b[b.HardLight = 14] = "HardLight"; + })(r.BlendMode || (r.BlendMode = {})); + var m = r.BlendMode; + (function(b) { + b[b.None = 0] = "None"; + b[b.BoundsAutoCompute = 2] = "BoundsAutoCompute"; + b[b.IsMask = 4] = "IsMask"; + b[b.Dirty = 16] = "Dirty"; + b[b.InvalidBounds = 256] = "InvalidBounds"; + b[b.InvalidConcatenatedMatrix = 512] = "InvalidConcatenatedMatrix"; + b[b.InvalidInvertedConcatenatedMatrix = 1024] = "InvalidInvertedConcatenatedMatrix"; + b[b.InvalidConcatenatedColorMatrix = 2048] = "InvalidConcatenatedColorMatrix"; + b[b.UpOnAddedOrRemoved = b.InvalidBounds | b.Dirty] = "UpOnAddedOrRemoved"; + b[b.UpOnMoved = b.InvalidBounds | b.Dirty] = "UpOnMoved"; + b[b.DownOnAddedOrRemoved = b.InvalidConcatenatedMatrix | b.InvalidInvertedConcatenatedMatrix | b.InvalidConcatenatedColorMatrix] = "DownOnAddedOrRemoved"; + b[b.DownOnMoved = b.InvalidConcatenatedMatrix | b.InvalidInvertedConcatenatedMatrix | b.InvalidConcatenatedColorMatrix] = "DownOnMoved"; + b[b.UpOnColorMatrixChanged = b.Dirty] = "UpOnColorMatrixChanged"; + b[b.DownOnColorMatrixChanged = b.InvalidConcatenatedColorMatrix] = "DownOnColorMatrixChanged"; + b[b.Visible = 65536] = "Visible"; + b[b.UpOnInvalidate = b.InvalidBounds | b.Dirty] = "UpOnInvalidate"; + b[b.Default = b.BoundsAutoCompute | b.InvalidBounds | b.InvalidConcatenatedMatrix | b.InvalidInvertedConcatenatedMatrix | b.Visible] = "Default"; + b[b.CacheAsBitmap = 131072] = "CacheAsBitmap"; + b[b.PixelSnapping = 262144] = "PixelSnapping"; + b[b.ImageSmoothing = 524288] = "ImageSmoothing"; + b[b.Dynamic = 1048576] = "Dynamic"; + b[b.Scalable = 2097152] = "Scalable"; + b[b.Tileable = 4194304] = "Tileable"; + b[b.Transparent = 32768] = "Transparent"; + })(r.NodeFlags || (r.NodeFlags = {})); + var a = r.NodeFlags; + (function(b) { + b[b.Node = 1] = "Node"; + b[b.Shape = 3] = "Shape"; + b[b.Group = 5] = "Group"; + b[b.Stage = 13] = "Stage"; + b[b.Renderable = 33] = "Renderable"; + })(r.NodeType || (r.NodeType = {})); + var h = r.NodeType; + (function(b) { + b[b.None = 0] = "None"; + b[b.OnStageBoundsChanged = 1] = "OnStageBoundsChanged"; + })(r.NodeEventType || (r.NodeEventType = {})); var p = function() { - function a() { + function b() { } - a.prototype.visitNode = function(a, b) { + b.prototype.visitNode = function(b, a) { }; - a.prototype.visitShape = function(a, b) { - this.visitNode(a, b); + b.prototype.visitShape = function(b, a) { + this.visitNode(b, a); }; - a.prototype.visitGroup = function(a, b) { - this.visitNode(a, b); - for (var c = a.getChildren(), f = 0;f < c.length;f++) { - c[f].visit(this, b); + b.prototype.visitGroup = function(b, a) { + this.visitNode(b, a); + for (var c = b.getChildren(), d = 0;d < c.length;d++) { + c[d].visit(this, a); } }; - a.prototype.visitStage = function(a, b) { - this.visitGroup(a, b); + b.prototype.visitStage = function(b, a) { + this.visitGroup(b, a); }; - a.prototype.visitRenderable = function(a, b) { - this.visitNode(a, b); + b.prototype.visitRenderable = function(b, a) { + this.visitNode(b, a); }; - return a; + return b; }(); - m.NodeVisitor = p; - var y = function() { + r.NodeVisitor = p; + var k = function() { return function() { }; }(); - m.State = y; - var v = function(a) { - function b() { - a.call(this); + r.State = k; + var u = function(b) { + function a() { + b.call(this); this.matrix = c.createIdentity(); } - __extends(b, a); - b.prototype.transform = function(a) { - var b = this.clone(); - b.matrix.preMultiply(a.getMatrix()); - return b; - }; - b.allocate = function() { - var a = b._dirtyStack, c = null; - a.length && (c = a.pop()); - return c; - }; - b.prototype.clone = function() { - var a = b.allocate(); - a || (a = new b); - a.set(this); + __extends(a, b); + a.prototype.transform = function(b) { + var a = this.clone(); + a.matrix.preMultiply(b.getMatrix()); return a; }; - b.prototype.set = function(a) { - this.matrix.set(a.matrix); + a.allocate = function() { + var b = a._dirtyStack, c = null; + b.length && (c = b.pop()); + return c; }; - b.prototype.free = function() { - b._dirtyStack.push(this); + a.prototype.clone = function() { + var b = a.allocate(); + b || (b = new a); + b.set(this); + return b; }; - b._dirtyStack = []; - return b; - }(y); - m.MatrixState = v; - var l = function(a) { - function b() { - a.apply(this, arguments); + a.prototype.set = function(b) { + this.matrix.set(b.matrix); + }; + a.prototype.free = function() { + a._dirtyStack.push(this); + }; + a._dirtyStack = []; + return a; + }(k); + r.MatrixState = u; + var n = function(b) { + function a() { + b.apply(this, arguments); this.isDirty = !0; } - __extends(b, a); - b.prototype.start = function(a, b) { - this._dirtyRegion = b; - var d = new v; - d.matrix.setIdentity(); - a.visit(this, d); - d.free(); + __extends(a, b); + a.prototype.start = function(b, a) { + this._dirtyRegion = a; + var c = new u; + c.matrix.setIdentity(); + b.visit(this, c); + c.free(); }; - b.prototype.visitGroup = function(a, b) { - var d = a.getChildren(); - this.visitNode(a, b); - for (var c = 0;c < d.length;c++) { - var f = d[c], h = b.transform(f.getTransform()); - f.visit(this, h); - h.free(); + a.prototype.visitGroup = function(b, a) { + var c = b.getChildren(); + this.visitNode(b, a); + for (var f = 0;f < c.length;f++) { + var d = c[f], e = a.transform(d.getTransform()); + d.visit(this, e); + e.free(); } }; - b.prototype.visitNode = function(a, b) { - a.hasFlags(16) && (this.isDirty = !0); - a.toggleFlags(16, !1); + a.prototype.visitNode = function(b, a) { + b.hasFlags(16) && (this.isDirty = !0); + b.toggleFlags(16, !1); }; - return b; + return a; }(p); - m.DirtyNodeVisitor = l; - y = function(a) { - function b(d) { - a.call(this); - this.writer = d; + r.DirtyNodeVisitor = n; + k = function(b) { + function a(c) { + b.call(this); + this.writer = c; } - __extends(b, a); - b.prototype.visitNode = function(a, b) { + __extends(a, b); + a.prototype.visitNode = function(b, a) { }; - b.prototype.visitShape = function(a, b) { - this.writer.writeLn(a.toString()); - this.visitNode(a, b); + a.prototype.visitShape = function(b, a) { + this.writer.writeLn(b.toString()); + this.visitNode(b, a); }; - b.prototype.visitGroup = function(a, b) { - this.visitNode(a, b); - var d = a.getChildren(); - this.writer.enter(a.toString() + " " + d.length); - for (var c = 0;c < d.length;c++) { - d[c].visit(this, b); + a.prototype.visitGroup = function(b, a) { + this.visitNode(b, a); + var c = b.getChildren(); + this.writer.enter(b.toString() + " " + c.length); + for (var f = 0;f < c.length;f++) { + c[f].visit(this, a); } this.writer.outdent(); }; - b.prototype.visitStage = function(a, b) { - this.visitGroup(a, b); + a.prototype.visitStage = function(b, a) { + this.visitGroup(b, a); }; - return b; + return a; }(p); - m.TracingNodeVisitor = y; - var t = function() { + r.TracingNodeVisitor = k; + var s = function() { function b() { this._clip = -1; this._eventListeners = null; @@ -8271,17 +8623,17 @@ __extends = this.__extends || function(g, m) { Object.defineProperty(b.prototype, "id", {get:function() { return this._id; }, enumerable:!0, configurable:!0}); - b.prototype._dispatchEvent = function(a) { + b.prototype._dispatchEvent = function(b) { if (this._eventListeners) { - for (var b = this._eventListeners, c = 0;c < b.length;c++) { - var f = b[c]; - f.type === a && f.listener(this, a); + for (var a = this._eventListeners, c = 0;c < a.length;c++) { + var d = a[c]; + d.type === b && d.listener(this, b); } } }; - b.prototype.addEventListener = function(a, b) { + b.prototype.addEventListener = function(b, a) { this._eventListeners || (this._eventListeners = []); - this._eventListeners.push({type:a, listener:b}); + this._eventListeners.push({type:b, listener:a}); }; Object.defineProperty(b.prototype, "properties", {get:function() { return this._properties || (this._properties = {}); @@ -8292,28 +8644,28 @@ __extends = this.__extends || function(g, m) { }; Object.defineProperty(b.prototype, "clip", {get:function() { return this._clip; - }, set:function(a) { - this._clip = a; + }, set:function(b) { + this._clip = b; }, enumerable:!0, configurable:!0}); Object.defineProperty(b.prototype, "parent", {get:function() { return this._parent; }, enumerable:!0, configurable:!0}); - b.prototype.getTransformedBounds = function(a) { - var b = this.getBounds(!0); - if (a !== this && !b.isEmpty()) { + b.prototype.getTransformedBounds = function(b) { + var a = this.getBounds(!0); + if (b !== this && !a.isEmpty()) { var c = this.getTransform().getConcatenatedMatrix(); - a ? (a = a.getTransform().getInvertedConcatenatedMatrix(), a.preMultiply(c), a.transformRectangleAABB(b), a.free()) : c.transformRectangleAABB(b); + b ? (b = b.getTransform().getInvertedConcatenatedMatrix(), b.preMultiply(c), b.transformRectangleAABB(a), b.free()) : c.transformRectangleAABB(a); } - return b; + return a; }; b.prototype._markCurrentBoundsAsDirtyRegion = function() { }; - b.prototype.getStage = function(a) { - void 0 === a && (a = !0); - for (var b = this._parent;b;) { - if (b.isType(13)) { - var c = b; - if (a) { + b.prototype.getStage = function(b) { + void 0 === b && (b = !0); + for (var a = this._parent;a;) { + if (a.isType(13)) { + var c = a; + if (b) { if (c.dirtyRegion) { return c; } @@ -8321,83 +8673,79 @@ __extends = this.__extends || function(g, m) { return c; } } - b = b._parent; + a = a._parent; } return null; }; - b.prototype.getChildren = function(a) { - throw g.Debug.abstractMethod("Node::getChildren"); + b.prototype.getChildren = function(b) { + throw void 0; }; - b.prototype.getBounds = function(a) { - throw g.Debug.abstractMethod("Node::getBounds"); + b.prototype.getBounds = function(b) { + throw void 0; }; - b.prototype.setBounds = function(a) { - k(!(this._flags & 2)); - (this._bounds || (this._bounds = e.createEmpty())).set(a); + b.prototype.setBounds = function(b) { + (this._bounds || (this._bounds = g.createEmpty())).set(b); this.removeFlags(256); }; b.prototype.clone = function() { - throw g.Debug.abstractMethod("Node::clone"); + throw void 0; }; - b.prototype.setFlags = function(a) { - this._flags |= a; + b.prototype.setFlags = function(b) { + this._flags |= b; }; - b.prototype.hasFlags = function(a) { - return(this._flags & a) === a; + b.prototype.hasFlags = function(b) { + return(this._flags & b) === b; }; - b.prototype.hasAnyFlags = function(a) { - return!!(this._flags & a); + b.prototype.hasAnyFlags = function(b) { + return!!(this._flags & b); }; - b.prototype.removeFlags = function(a) { - this._flags &= ~a; + b.prototype.removeFlags = function(b) { + this._flags &= ~b; }; - b.prototype.toggleFlags = function(a, b) { - this._flags = b ? this._flags | a : this._flags & ~a; + b.prototype.toggleFlags = function(b, a) { + this._flags = a ? this._flags | b : this._flags & ~b; }; - b.prototype._propagateFlagsUp = function(a) { - if (0 !== a && !this.hasFlags(a)) { - this.hasFlags(2) || (a &= -257); - this.setFlags(a); - var b = this._parent; - b && b._propagateFlagsUp(a); + b.prototype._propagateFlagsUp = function(b) { + if (0 !== b && !this.hasFlags(b)) { + this.hasFlags(2) || (b &= -257); + this.setFlags(b); + var a = this._parent; + a && a._propagateFlagsUp(b); } }; - b.prototype._propagateFlagsDown = function(a) { - throw g.Debug.abstractMethod("Node::_propagateFlagsDown"); + b.prototype._propagateFlagsDown = function(b) { + throw void 0; }; - b.prototype.isAncestor = function(a) { - for (;a;) { - if (a === this) { + b.prototype.isAncestor = function(b) { + for (;b;) { + if (b === this) { return!0; } - k(a !== a._parent); - a = a._parent; + b = b._parent; } return!1; }; b._getAncestors = function(a, c) { - var h = b._path; - for (h.length = 0;a && a !== c;) { - k(a !== a._parent), h.push(a), a = a._parent; + var d = b._path; + for (d.length = 0;a && a !== c;) { + d.push(a), a = a._parent; } - k(a === c, "Last ancestor is not an ancestor."); - return h; + return d; }; b.prototype._findClosestAncestor = function() { - for (var a = this;a;) { - if (!1 === a.hasFlags(512)) { - return a; + for (var b = this;b;) { + if (!1 === b.hasFlags(512)) { + return b; } - k(a !== a._parent); - a = a._parent; + b = b._parent; } return null; }; - b.prototype.isType = function(a) { - return this._type === a; + b.prototype.isType = function(b) { + return this._type === b; }; - b.prototype.isTypeOf = function(a) { - return(this._type & a) === a; + b.prototype.isTypeOf = function(b) { + return(this._type & b) === b; }; b.prototype.isLeaf = function() { return this.isType(33) || this.isType(3); @@ -8407,88 +8755,82 @@ __extends = this.__extends || function(g, m) { return!0; } if (this.isType(5)) { - var a = this._children; - if (1 === a.length && a[0].isLinear()) { + var b = this._children; + if (1 === b.length && b[0].isLinear()) { return!0; } } return!1; }; b.prototype.getTransformMatrix = function() { - var a; - void 0 === a && (a = !1); - return this.getTransform().getMatrix(a); + var b; + void 0 === b && (b = !1); + return this.getTransform().getMatrix(b); }; b.prototype.getTransform = function() { - null === this._transform && (this._transform = new u(this)); + null === this._transform && (this._transform = new d(this)); return this._transform; }; b.prototype.getLayer = function() { - null === this._layer && (this._layer = new h(this)); + null === this._layer && (this._layer = new e(this)); return this._layer; }; - b.prototype.visit = function(a, b) { + b.prototype.visit = function(b, a) { switch(this._type) { case 1: - a.visitNode(this, b); + b.visitNode(this, a); break; case 5: - a.visitGroup(this, b); + b.visitGroup(this, a); break; case 13: - a.visitStage(this, b); + b.visitStage(this, a); break; case 3: - a.visitShape(this, b); + b.visitShape(this, a); break; case 33: - a.visitRenderable(this, b); + b.visitRenderable(this, a); break; default: - g.Debug.unexpectedCase(); + l.Debug.unexpectedCase(); } }; b.prototype.invalidate = function() { this._propagateFlagsUp(a.UpOnInvalidate); }; - b.prototype.toString = function(a) { - void 0 === a && (a = !1); - var b = n[this._type] + " " + this._id; - a && (b += " " + this._bounds.toString()); - return b; + b.prototype.toString = function(b) { + void 0 === b && (b = !1); + var a = h[this._type] + " " + this._id; + b && (a += " " + this._bounds.toString()); + return a; }; b._path = []; b._nextId = 0; return b; }(); - m.Node = t; - var r = function(b) { - function d() { + r.Node = s; + var v = function(b) { + function c() { b.call(this); this._type = 5; this._children = []; } - __extends(d, b); - d.prototype.getChildren = function(a) { - void 0 === a && (a = !1); - return a ? this._children.slice(0) : this._children; + __extends(c, b); + c.prototype.getChildren = function(b) { + void 0 === b && (b = !1); + return b ? this._children.slice(0) : this._children; }; - d.prototype.childAt = function(a) { - k(0 <= a && a < this._children.length); - return this._children[a]; + c.prototype.childAt = function(b) { + return this._children[b]; }; - Object.defineProperty(d.prototype, "child", {get:function() { - k(1 === this._children.length); + Object.defineProperty(c.prototype, "child", {get:function() { return this._children[0]; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "groupChild", {get:function() { - k(1 === this._children.length); - k(this._children[0] instanceof d); + Object.defineProperty(c.prototype, "groupChild", {get:function() { return this._children[0]; }, enumerable:!0, configurable:!0}); - d.prototype.addChild = function(b) { - k(b); - k(!b.isAncestor(this)); + c.prototype.addChild = function(b) { b._parent && b._parent.removeChildAt(b._index); b._parent = this; b._index = this._children.length; @@ -8496,59 +8838,57 @@ __extends = this.__extends || function(g, m) { this._propagateFlagsUp(a.UpOnAddedOrRemoved); b._propagateFlagsDown(a.DownOnAddedOrRemoved); }; - d.prototype.removeChildAt = function(b) { - k(0 <= b && b < this._children.length); - var d = this._children[b]; - k(b === d._index); + c.prototype.removeChildAt = function(b) { + var c = this._children[b]; this._children.splice(b, 1); - d._index = -1; - d._parent = null; + c._index = -1; + c._parent = null; this._propagateFlagsUp(a.UpOnAddedOrRemoved); - d._propagateFlagsDown(a.DownOnAddedOrRemoved); + c._propagateFlagsDown(a.DownOnAddedOrRemoved); }; - d.prototype.clearChildren = function() { + c.prototype.clearChildren = function() { for (var b = 0;b < this._children.length;b++) { - var d = this._children[b]; - d && (d._index = -1, d._parent = null, d._propagateFlagsDown(a.DownOnAddedOrRemoved)); + var c = this._children[b]; + c && (c._index = -1, c._parent = null, c._propagateFlagsDown(a.DownOnAddedOrRemoved)); } this._children.length = 0; this._propagateFlagsUp(a.UpOnAddedOrRemoved); }; - d.prototype._propagateFlagsDown = function(a) { - if (!this.hasFlags(a)) { - this.setFlags(a); - for (var b = this._children, d = 0;d < b.length;d++) { - b[d]._propagateFlagsDown(a); + c.prototype._propagateFlagsDown = function(b) { + if (!this.hasFlags(b)) { + this.setFlags(b); + for (var a = this._children, c = 0;c < a.length;c++) { + a[c]._propagateFlagsDown(b); } } }; - d.prototype.getBounds = function(a) { - void 0 === a && (a = !1); - var b = this._bounds || (this._bounds = e.createEmpty()); + c.prototype.getBounds = function(b) { + void 0 === b && (b = !1); + var a = this._bounds || (this._bounds = g.createEmpty()); if (this.hasFlags(256)) { - b.setEmpty(); - for (var d = this._children, c = e.allocate(), f = 0;f < d.length;f++) { - var h = d[f]; - c.set(h.getBounds()); - h.getTransformMatrix().transformRectangleAABB(c); - b.union(c); + a.setEmpty(); + for (var c = this._children, f = g.allocate(), d = 0;d < c.length;d++) { + var e = c[d]; + f.set(e.getBounds()); + e.getTransformMatrix().transformRectangleAABB(f); + a.union(f); } - c.free(); + f.free(); this.removeFlags(256); } - return a ? b.clone() : b; + return b ? a.clone() : a; }; - return d; - }(t); - m.Group = r; - var u = function() { - function b(a) { - this._node = a; + return c; + }(s); + r.Group = v; + var d = function() { + function b(b) { + this._node = b; this._matrix = c.createIdentity(); - this._colorMatrix = m.ColorMatrix.createIdentity(); + this._colorMatrix = r.ColorMatrix.createIdentity(); this._concatenatedMatrix = c.createIdentity(); this._invertedConcatenatedMatrix = c.createIdentity(); - this._concatenatedColorMatrix = m.ColorMatrix.createIdentity(); + this._concatenatedColorMatrix = r.ColorMatrix.createIdentity(); } b.prototype.setMatrix = function(b) { this._matrix.isEqual(b) || (this._matrix.set(b), this._node._propagateFlagsUp(a.UpOnMoved), this._node._propagateFlagsDown(a.DownOnMoved)); @@ -8558,100 +8898,98 @@ __extends = this.__extends || function(g, m) { this._node._propagateFlagsUp(a.UpOnColorMatrixChanged); this._node._propagateFlagsDown(a.DownOnColorMatrixChanged); }; - b.prototype.getMatrix = function(a) { - void 0 === a && (a = !1); - return a ? this._matrix.clone() : this._matrix; + b.prototype.getMatrix = function(b) { + void 0 === b && (b = !1); + return b ? this._matrix.clone() : this._matrix; }; b.prototype.hasColorMatrix = function() { return null !== this._colorMatrix; }; b.prototype.getColorMatrix = function() { - var a; - void 0 === a && (a = !1); - null === this._colorMatrix && (this._colorMatrix = m.ColorMatrix.createIdentity()); - return a ? this._colorMatrix.clone() : this._colorMatrix; + var b; + void 0 === b && (b = !1); + null === this._colorMatrix && (this._colorMatrix = r.ColorMatrix.createIdentity()); + return b ? this._colorMatrix.clone() : this._colorMatrix; }; - b.prototype.getConcatenatedMatrix = function(a) { - void 0 === a && (a = !1); + b.prototype.getConcatenatedMatrix = function(b) { + void 0 === b && (b = !1); if (this._node.hasFlags(512)) { - for (var b = this._node._findClosestAncestor(), f = t._getAncestors(this._node, b), h = b ? b.getTransform()._concatenatedMatrix.clone() : c.createIdentity(), e = f.length - 1;0 <= e;e--) { - var b = f[e], g = b.getTransform(); - k(b.hasFlags(512)); - h.preMultiply(g._matrix); - g._concatenatedMatrix.set(h); - b.removeFlags(512); + for (var a = this._node._findClosestAncestor(), d = s._getAncestors(this._node, a), e = a ? a.getTransform()._concatenatedMatrix.clone() : c.createIdentity(), h = d.length - 1;0 <= h;h--) { + var a = d[h], n = a.getTransform(); + e.preMultiply(n._matrix); + n._concatenatedMatrix.set(e); + a.removeFlags(512); } } - return a ? this._concatenatedMatrix.clone() : this._concatenatedMatrix; + return b ? this._concatenatedMatrix.clone() : this._concatenatedMatrix; }; b.prototype.getInvertedConcatenatedMatrix = function() { - var a = !0; - void 0 === a && (a = !1); + var b = !0; + void 0 === b && (b = !1); this._node.hasFlags(1024) && (this.getConcatenatedMatrix().inverse(this._invertedConcatenatedMatrix), this._node.removeFlags(1024)); - return a ? this._invertedConcatenatedMatrix.clone() : this._invertedConcatenatedMatrix; + return b ? this._invertedConcatenatedMatrix.clone() : this._invertedConcatenatedMatrix; }; b.prototype.toString = function() { return this._matrix.toString(); }; return b; }(); - m.Transform = u; - var h = function() { - function a(b) { + r.Transform = d; + var e = function() { + function b(b) { this._node = b; this._mask = null; this._blendMode = 1; } - Object.defineProperty(a.prototype, "filters", {get:function() { + Object.defineProperty(b.prototype, "filters", {get:function() { return this._filters; - }, set:function(a) { - this._filters = a; + }, set:function(b) { + this._filters = b; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "blendMode", {get:function() { + Object.defineProperty(b.prototype, "blendMode", {get:function() { return this._blendMode; - }, set:function(a) { - this._blendMode = a; + }, set:function(b) { + this._blendMode = b; }, enumerable:!0, configurable:!0}); - Object.defineProperty(a.prototype, "mask", {get:function() { + Object.defineProperty(b.prototype, "mask", {get:function() { return this._mask; - }, set:function(a) { - this._mask && this._mask !== a && this._mask.removeFlags(4); - (this._mask = a) && this._mask.setFlags(4); + }, set:function(b) { + this._mask && this._mask !== b && this._mask.removeFlags(4); + (this._mask = b) && this._mask.setFlags(4); }, enumerable:!0, configurable:!0}); - a.prototype.toString = function() { - return b[this._blendMode]; + b.prototype.toString = function() { + return m[this._blendMode]; }; - return a; + return b; }(); - m.Layer = h; - y = function(a) { - function b(d) { - a.call(this); - k(d); - this._source = d; + r.Layer = e; + k = function(b) { + function a(c) { + b.call(this); + this._source = c; this._type = 3; this.ratio = 0; } - __extends(b, a); - b.prototype.getBounds = function(a) { - void 0 === a && (a = !1); - var b = this._bounds || (this._bounds = e.createEmpty()); - this.hasFlags(256) && (b.set(this._source.getBounds()), this.removeFlags(256)); - return a ? b.clone() : b; + __extends(a, b); + a.prototype.getBounds = function(b) { + void 0 === b && (b = !1); + var a = this._bounds || (this._bounds = g.createEmpty()); + this.hasFlags(256) && (a.set(this._source.getBounds()), this.removeFlags(256)); + return b ? a.clone() : a; }; - Object.defineProperty(b.prototype, "source", {get:function() { + Object.defineProperty(a.prototype, "source", {get:function() { return this._source; }, enumerable:!0, configurable:!0}); - b.prototype._propagateFlagsDown = function(a) { - this.setFlags(a); + a.prototype._propagateFlagsDown = function(b) { + this.setFlags(b); }; - b.prototype.getChildren = function(a) { + a.prototype.getChildren = function(b) { return[this._source]; }; - return b; - }(t); - m.Shape = y; - m.RendererOptions = function() { + return a; + }(s); + r.Shape = k; + r.RendererOptions = function() { return function() { this.debug = !1; this.paintRenderable = !0; @@ -8659,124 +8997,124 @@ __extends = this.__extends || function(g, m) { this.clear = !0; }; }(); - (function(a) { - a[a.Canvas2D = 0] = "Canvas2D"; - a[a.WebGL = 1] = "WebGL"; - a[a.Both = 2] = "Both"; - a[a.DOM = 3] = "DOM"; - a[a.SVG = 4] = "SVG"; - })(m.Backend || (m.Backend = {})); - p = function(a) { - function b(d, c, h) { - a.call(this); - this._container = d; - this._stage = c; - this._options = h; - this._viewport = e.createSquare(); + (function(b) { + b[b.Canvas2D = 0] = "Canvas2D"; + b[b.WebGL = 1] = "WebGL"; + b[b.Both = 2] = "Both"; + b[b.DOM = 3] = "DOM"; + b[b.SVG = 4] = "SVG"; + })(r.Backend || (r.Backend = {})); + p = function(b) { + function a(c, f, d) { + b.call(this); + this._container = c; + this._stage = f; + this._options = d; + this._viewport = g.createSquare(); this._devicePixelRatio = 1; } - __extends(b, a); - Object.defineProperty(b.prototype, "viewport", {set:function(a) { - this._viewport.set(a); + __extends(a, b); + Object.defineProperty(a.prototype, "viewport", {set:function(b) { + this._viewport.set(b); }, enumerable:!0, configurable:!0}); - b.prototype.render = function() { - throw g.Debug.abstractMethod("Renderer::render"); + a.prototype.render = function() { + throw void 0; }; - b.prototype.resize = function() { - throw g.Debug.abstractMethod("Renderer::resize"); + a.prototype.resize = function() { + throw void 0; }; - b.prototype.screenShot = function(a, b) { - throw g.Debug.abstractMethod("Renderer::screenShot"); + a.prototype.screenShot = function(b, a) { + throw void 0; }; - return b; + return a; }(p); - m.Renderer = p; - p = function(a) { - function b(c, h, g) { - void 0 === g && (g = !1); - a.call(this); - this._dirtyVisitor = new l; + r.Renderer = p; + p = function(b) { + function a(c, d, e) { + void 0 === e && (e = !1); + b.call(this); + this._dirtyVisitor = new n; this._flags &= -3; this._type = 13; - this._scaleMode = b.DEFAULT_SCALE; - this._align = b.DEFAULT_ALIGN; - this._content = new r; + this._scaleMode = a.DEFAULT_SCALE; + this._align = a.DEFAULT_ALIGN; + this._content = new v; this._content._flags &= -3; this.addChild(this._content); this.setFlags(16); - this.setBounds(new e(0, 0, c, h)); - g ? (this._dirtyRegion = new w(c, h), this._dirtyRegion.addDirtyRectangle(new e(0, 0, c, h))) : this._dirtyRegion = null; + this.setBounds(new g(0, 0, c, d)); + e ? (this._dirtyRegion = new t(c, d), this._dirtyRegion.addDirtyRectangle(new g(0, 0, c, d))) : this._dirtyRegion = null; this._updateContentMatrix(); } - __extends(b, a); - Object.defineProperty(b.prototype, "dirtyRegion", {get:function() { + __extends(a, b); + Object.defineProperty(a.prototype, "dirtyRegion", {get:function() { return this._dirtyRegion; }, enumerable:!0, configurable:!0}); - b.prototype.setBounds = function(b) { - a.prototype.setBounds.call(this, b); + a.prototype.setBounds = function(a) { + b.prototype.setBounds.call(this, a); this._updateContentMatrix(); this._dispatchEvent(1); - this._dirtyRegion && (this._dirtyRegion = new w(b.w, b.h), this._dirtyRegion.addDirtyRectangle(b)); + this._dirtyRegion && (this._dirtyRegion = new t(a.w, a.h), this._dirtyRegion.addDirtyRectangle(a)); }; - Object.defineProperty(b.prototype, "content", {get:function() { + Object.defineProperty(a.prototype, "content", {get:function() { return this._content; }, enumerable:!0, configurable:!0}); - b.prototype.readyToRender = function() { + a.prototype.readyToRender = function() { this._dirtyVisitor.isDirty = !1; this._dirtyVisitor.start(this, this._dirtyRegion); return this._dirtyVisitor.isDirty ? !0 : !1; }; - Object.defineProperty(b.prototype, "align", {get:function() { + Object.defineProperty(a.prototype, "align", {get:function() { return this._align; - }, set:function(a) { - this._align = a; + }, set:function(b) { + this._align = b; this._updateContentMatrix(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "scaleMode", {get:function() { + Object.defineProperty(a.prototype, "scaleMode", {get:function() { return this._scaleMode; - }, set:function(a) { - this._scaleMode = a; + }, set:function(b) { + this._scaleMode = b; this._updateContentMatrix(); }, enumerable:!0, configurable:!0}); - b.prototype._updateContentMatrix = function() { - if (this._scaleMode === b.DEFAULT_SCALE && this._align === b.DEFAULT_ALIGN) { + a.prototype._updateContentMatrix = function() { + if (this._scaleMode === a.DEFAULT_SCALE && this._align === a.DEFAULT_ALIGN) { this._content.getTransform().setMatrix(new c(1, 0, 0, 1, 0, 0)); } else { - var a = this.getBounds(), f = this._content.getBounds(), h = a.w / f.w, e = a.h / f.h; + var b = this.getBounds(), d = this._content.getBounds(), e = b.w / d.w, h = b.h / d.h; switch(this._scaleMode) { case 2: - h = e = Math.max(h, e); + e = h = Math.max(e, h); break; case 4: - h = e = 1; + e = h = 1; break; case 1: break; default: - h = e = Math.min(h, e); + e = h = Math.min(e, h); } - var g; - g = this._align & 4 ? 0 : this._align & 8 ? a.w - f.w * h : (a.w - f.w * h) / 2; - a = this._align & 1 ? 0 : this._align & 2 ? a.h - f.h * e : (a.h - f.h * e) / 2; - this._content.getTransform().setMatrix(new c(h, 0, 0, e, g, a)); + var n; + n = this._align & 4 ? 0 : this._align & 8 ? b.w - d.w * e : (b.w - d.w * e) / 2; + b = this._align & 1 ? 0 : this._align & 2 ? b.h - d.h * h : (b.h - d.h * h) / 2; + this._content.getTransform().setMatrix(new c(e, 0, 0, h, n, b)); } }; - b.DEFAULT_SCALE = 4; - b.DEFAULT_ALIGN = 5; - return b; - }(r); - m.Stage = p; - })(g.GFX || (g.GFX = {})); + a.DEFAULT_SCALE = 4; + a.DEFAULT_ALIGN = 5; + return a; + }(v); + r.Stage = p; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - function e(a, b, c) { +(function(l) { + (function(r) { + function g(a, b, c) { return a + (b - a) * c; } function c(a, b, c) { - return e(a >> 24 & 255, b >> 24 & 255, c) << 24 | e(a >> 16 & 255, b >> 16 & 255, c) << 16 | e(a >> 8 & 255, b >> 8 & 255, c) << 8 | e(a & 255, b & 255, c); + return g(a >> 24 & 255, b >> 24 & 255, c) << 24 | g(a >> 16 & 255, b >> 16 & 255, c) << 16 | g(a >> 8 & 255, b >> 8 & 255, c) << 8 | g(a & 255, b & 255, c); } - var w = m.Geometry.Point, k = m.Geometry.Rectangle, b = m.Geometry.Matrix, a = g.Debug.assertUnreachable, n = g.Debug.assert, p = g.ArrayUtilities.indexOf, y = function(a) { + var t = r.Geometry.Point, m = r.Geometry.Rectangle, a = r.Geometry.Matrix, h = l.ArrayUtilities.indexOf, p = function(a) { function b() { a.call(this); this._parents = []; @@ -8786,105 +9124,104 @@ __extends = this.__extends || function(g, m) { this._type = 33; } __extends(b, a); - b.prototype.addParent = function(a) { - n(a); - var b = p(this._parents, a); - n(0 > b); - this._parents.push(a); + b.prototype.addParent = function(b) { + h(this._parents, b); + this._parents.push(b); }; - b.prototype.addRenderableParent = function(a) { - n(a); - var b = p(this._renderableParents, a); - n(0 > b); - this._renderableParents.push(a); + b.prototype.addRenderableParent = function(b) { + h(this._renderableParents, b); + this._renderableParents.push(b); }; b.prototype.wrap = function() { - for (var a, b = this._parents, d = 0;d < b.length;d++) { - if (a = b[d], !a._parent) { - return a; + for (var b, a = this._parents, c = 0;c < a.length;c++) { + if (b = a[c], !b._parent) { + return b; } } - a = new m.Shape(this); - this.addParent(a); - return a; + b = new r.Shape(this); + this.addParent(b); + return b; }; b.prototype.invalidate = function() { this.setFlags(16); - for (var a = this._parents, b = 0;b < a.length;b++) { - a[b].invalidate(); + for (var b = this._parents, a = 0;a < b.length;a++) { + b[a].invalidate(); } - a = this._renderableParents; - for (b = 0;b < a.length;b++) { - a[b].invalidate(); + b = this._renderableParents; + for (a = 0;a < b.length;a++) { + b[a].invalidate(); } - if (a = this._invalidateEventListeners) { - for (b = 0;b < a.length;b++) { - a[b](this); + if (b = this._invalidateEventListeners) { + for (a = 0;a < b.length;a++) { + b[a](this); } } }; - b.prototype.addInvalidateEventListener = function(a) { + b.prototype.addInvalidateEventListener = function(b) { this._invalidateEventListeners || (this._invalidateEventListeners = []); - var b = p(this._invalidateEventListeners, a); - n(0 > b); - this._invalidateEventListeners.push(a); + h(this._invalidateEventListeners, b); + this._invalidateEventListeners.push(b); }; - b.prototype.getBounds = function(a) { - void 0 === a && (a = !1); - return a ? this._bounds.clone() : this._bounds; + b.prototype.getBounds = function(b) { + void 0 === b && (b = !1); + return b ? this._bounds.clone() : this._bounds; }; - b.prototype.getChildren = function(a) { + b.prototype.getChildren = function(b) { return null; }; - b.prototype._propagateFlagsUp = function(a) { - if (0 !== a && !this.hasFlags(a)) { - for (var b = 0;b < this._parents.length;b++) { - this._parents[b]._propagateFlagsUp(a); + b.prototype._propagateFlagsUp = function(b) { + if (0 !== b && !this.hasFlags(b)) { + for (var a = 0;a < this._parents.length;a++) { + this._parents[a]._propagateFlagsUp(b); } } }; - b.prototype.render = function(a, b, d, c, f) { + b.prototype.render = function(b, a, c, d, e) { }; return b; - }(m.Node); - m.Renderable = y; - var v = function(a) { - function b(d, c) { + }(r.Node); + r.Renderable = p; + var k = function(a) { + function b(b, c) { a.call(this); - this.setBounds(d); + this.setBounds(b); this.render = c; } __extends(b, a); return b; - }(y); - m.CustomRenderable = v; + }(p); + r.CustomRenderable = k; (function(a) { a[a.Idle = 1] = "Idle"; a[a.Playing = 2] = "Playing"; a[a.Paused = 3] = "Paused"; - })(m.RenderableVideoState || (m.RenderableVideoState = {})); - v = function(a) { - function b(c, h) { + a[a.Ended = 4] = "Ended"; + })(r.RenderableVideoState || (r.RenderableVideoState = {})); + k = function(a) { + function b(c, d) { a.call(this); this._flags = 1048592; this._lastPausedTime = this._lastTimeInvalidated = 0; - this._seekHappens = !1; + this._pauseHappening = this._seekHappening = !1; this._isDOMElement = !0; - this.setBounds(new k(0, 0, 1, 1)); + this.setBounds(new m(0, 0, 1, 1)); this._assetId = c; - this._eventSerializer = h; - var e = document.createElement("video"), g = this._handleVideoEvent.bind(this); - e.preload = "metadata"; - e.addEventListener("play", g); - e.addEventListener("ended", g); - e.addEventListener("loadeddata", g); - e.addEventListener("progress", g); - e.addEventListener("waiting", g); - e.addEventListener("loadedmetadata", g); - e.addEventListener("error", g); - e.addEventListener("seeking", g); - this._video = e; - this._videoEventHandler = g; + this._eventSerializer = d; + var h = document.createElement("video"), n = this._handleVideoEvent.bind(this); + h.preload = "metadata"; + h.addEventListener("play", n); + h.addEventListener("pause", n); + h.addEventListener("ended", n); + h.addEventListener("loadeddata", n); + h.addEventListener("progress", n); + h.addEventListener("suspend", n); + h.addEventListener("loadedmetadata", n); + h.addEventListener("error", n); + h.addEventListener("seeking", n); + h.addEventListener("seeked", n); + h.addEventListener("canplay", n); + this._video = h; + this._videoEventHandler = n; b._renderableVideos.push(this); "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(-1, -1, this); this._state = 1; @@ -8904,79 +9241,108 @@ __extends = this.__extends || function(g, m) { this._video.pause(); this._state = 3; }; - b.prototype._handleVideoEvent = function(a) { - var b = null, d = this._video; - switch(a.type) { + b.prototype._handleVideoEvent = function(b) { + var a = null, c = this._video; + switch(b.type) { case "play": - a = 1; + if (!this._pauseHappening) { + return; + } + b = 7; + break; + case "pause": + b = 6; + this._pauseHappening = !0; break; case "ended": - a = 2; + this._state = 4; + this._notifyNetStream(3, a); + b = 4; break; case "loadeddata": - a = 3; + this._pauseHappening = !1; + this._notifyNetStream(2, a); + this.play(); + return; + case "canplay": + if (this._pauseHappening) { + return; + } + b = 5; break; case "progress": - a = 4; - break; - case "waiting": - a = 5; + b = 10; break; + case "suspend": + return; case "loadedmetadata": - a = 7; - b = {videoWidth:d.videoWidth, videoHeight:d.videoHeight, duration:d.duration}; + b = 1; + a = {videoWidth:c.videoWidth, videoHeight:c.videoHeight, duration:c.duration}; break; case "error": - a = 6; - b = {code:d.error.code}; + b = 11; + a = {code:c.error.code}; break; case "seeking": - a = 8; - this._seekHappens = !0; + if (!this._seekHappening) { + return; + } + b = 8; + break; + case "seeked": + if (!this._seekHappening) { + return; + } + b = 9; + this._seekHappening = !1; break; default: return; } - this._notifyNetStream(a, b); + this._notifyNetStream(b, a); }; - b.prototype._notifyNetStream = function(a, b) { - this._eventSerializer.sendVideoPlaybackEvent(this._assetId, a, b); + b.prototype._notifyNetStream = function(b, a) { + this._eventSerializer.sendVideoPlaybackEvent(this._assetId, b, a); }; - b.prototype.processControlRequest = function(a, b) { - var d = this._video; - switch(a) { + b.prototype.processControlRequest = function(b, a) { + var c = this._video; + switch(b) { case 1: - d.src = b.url; + c.src = a.url; + 1 < this._state && this.play(); this._notifyNetStream(0, null); break; + case 9: + c.paused && c.play(); + break; case 2: - d && (b.paused && !d.paused ? (this._lastPausedTime = isNaN(b.time) ? d.currentTime : d.currentTime = b.time, this.pause()) : !b.paused && d.paused && (this.play(), isNaN(b.time) || this._lastPausedTime === b.time || (d.currentTime = b.time), this._seekHappens && (this._seekHappens = !1, this._notifyNetStream(3, null)))); + c && (a.paused && !c.paused ? (isNaN(a.time) ? this._lastPausedTime = c.currentTime : (0 !== c.seekable.length && (c.currentTime = a.time), this._lastPausedTime = a.time), this.pause()) : !a.paused && c.paused && (this.play(), isNaN(a.time) || this._lastPausedTime === a.time || 0 === c.seekable.length || (c.currentTime = a.time))); break; case 3: - d && (d.currentTime = b.time); + c && 0 !== c.seekable.length && (this._seekHappening = !0, c.currentTime = a.time); break; case 4: - return d ? d.currentTime : 0; + return c ? c.currentTime : 0; case 5: - return d ? d.duration : 0; + return c ? c.duration : 0; case 6: - d && (d.volume = b.volume); + c && (c.volume = a.volume); break; case 7: - if (!d) { + if (!c) { return 0; } - var c = -1; - if (d.buffered) { - for (var f = 0;f < d.buffered.length;f++) { - c = Math.max(c, d.buffered.end(f)); + var d = -1; + if (c.buffered) { + for (var e = 0;e < c.buffered.length;e++) { + d = Math.max(d, c.buffered.end(e)); } } else { - c = d.duration; + d = c.duration; } - return Math.round(500 * c); + return Math.round(500 * d); case 8: - return d ? Math.round(500 * d.duration) : 0; + return c ? Math.round(500 * c.duration) : 0; } }; b.prototype.checkForUpdate = function() { @@ -8988,982 +9354,938 @@ __extends = this.__extends || function(g, m) { a[c].checkForUpdate(); } }; - b.prototype.render = function(a, b, d) { - (b = this._video) && 0 < b.videoWidth && a.drawImage(b, 0, 0, b.videoWidth, b.videoHeight, 0, 0, this._bounds.w, this._bounds.h); + b.prototype.render = function(b, a, c) { + (a = this._video) && 0 < a.videoWidth && b.drawImage(a, 0, 0, a.videoWidth, a.videoHeight, 0, 0, this._bounds.w, this._bounds.h); }; b._renderableVideos = []; return b; - }(y); - m.RenderableVideo = v; - v = function(a) { - function b(d, c) { + }(p); + r.RenderableVideo = k; + k = function(a) { + function b(b, c) { a.call(this); this._flags = 1048592; this.properties = {}; this.setBounds(c); - d instanceof HTMLCanvasElement ? this._initializeSourceCanvas(d) : this._sourceImage = d; + b instanceof HTMLCanvasElement ? this._initializeSourceCanvas(b) : this._sourceImage = b; } __extends(b, a); - b.FromDataBuffer = function(a, c, f) { - var h = document.createElement("canvas"); - h.width = f.w; - h.height = f.h; - f = new b(h, f); - f.updateFromDataBuffer(a, c); - return f; + b.FromDataBuffer = function(a, c, d) { + var e = document.createElement("canvas"); + e.width = d.w; + e.height = d.h; + d = new b(e, d); + d.updateFromDataBuffer(a, c); + return d; }; - b.FromNode = function(a, c, f, h, e) { - var g = document.createElement("canvas"), l = a.getBounds(); - g.width = l.w; - g.height = l.h; - g = new b(g, l); - g.drawNode(a, c, f, h, e); - return g; + b.FromNode = function(a, c, d, e, h) { + var n = document.createElement("canvas"), g = a.getBounds(); + n.width = g.w; + n.height = g.h; + n = new b(n, g); + n.drawNode(a, c, d, e, h); + return n; }; b.FromImage = function(a) { - return new b(a, new k(0, 0, -1, -1)); + return new b(a, new m(0, 0, -1, -1)); }; - b.prototype.updateFromDataBuffer = function(a, b) { - if (m.imageUpdateOption.value) { - var d = b.buffer; - if (4 === a || 5 === a || 6 === a) { - g.Debug.assertUnreachable("Mustn't encounter un-decoded images here"); - } else { - var c = this._bounds, f = this._imageData; - f && f.width === c.w && f.height === c.h || (f = this._imageData = this._context.createImageData(c.w, c.h)); - m.imageConvertOption.value && (d = new Int32Array(d), c = new Int32Array(f.data.buffer), g.ColorUtilities.convertImage(a, 3, d, c)); + b.prototype.updateFromDataBuffer = function(b, a) { + if (r.imageUpdateOption.value) { + var c = a.buffer; + if (4 !== b && 5 !== b && 6 !== b) { + var d = this._bounds, e = this._imageData; + e && e.width === d.w && e.height === d.h || (e = this._imageData = this._context.createImageData(d.w, d.h)); + r.imageConvertOption.value && (c = new Int32Array(c), d = new Int32Array(e.data.buffer), l.ColorUtilities.convertImage(b, 3, c, d)); this._ensureSourceCanvas(); - this._context.putImageData(f, 0, 0); + this._context.putImageData(e, 0, 0); } this.invalidate(); } }; - b.prototype.readImageData = function(a) { - a.writeRawBytes(this.imageData.data); + b.prototype.readImageData = function(b) { + b.writeRawBytes(this.imageData.data); }; - b.prototype.render = function(a, b, d) { - this.renderSource ? a.drawImage(this.renderSource, 0, 0) : this._renderFallback(a); + b.prototype.render = function(b, a, c) { + this.renderSource ? b.drawImage(this.renderSource, 0, 0) : this._renderFallback(b); }; - b.prototype.drawNode = function(a, b, d, c, f) { - d = m.Canvas2D; - c = this.getBounds(); - (new d.Canvas2DRenderer(this._canvas, null)).renderNode(a, f || c, b); + b.prototype.drawNode = function(b, a, c, d, e) { + c = r.Canvas2D; + d = this.getBounds(); + (new c.Canvas2DRenderer(this._canvas, null)).renderNode(b, e || d, a); }; - b.prototype._initializeSourceCanvas = function(a) { - this._canvas = a; + b.prototype._initializeSourceCanvas = function(b) { + this._canvas = b; this._context = this._canvas.getContext("2d"); }; b.prototype._ensureSourceCanvas = function() { if (!this._canvas) { - var a = document.createElement("canvas"), b = this._bounds; - a.width = b.w; - a.height = b.h; - this._initializeSourceCanvas(a); + var b = document.createElement("canvas"), a = this._bounds; + b.width = a.w; + b.height = a.h; + this._initializeSourceCanvas(b); } }; Object.defineProperty(b.prototype, "imageData", {get:function() { - this._canvas || (n(this._sourceImage), this._ensureSourceCanvas(), this._context.drawImage(this._sourceImage, 0, 0), this._sourceImage = null); + this._canvas || (this._ensureSourceCanvas(), this._context.drawImage(this._sourceImage, 0, 0), this._sourceImage = null); return this._context.getImageData(0, 0, this._bounds.w, this._bounds.h); }, enumerable:!0, configurable:!0}); Object.defineProperty(b.prototype, "renderSource", {get:function() { return this._canvas || this._sourceImage; }, enumerable:!0, configurable:!0}); - b.prototype._renderFallback = function(a) { - this.fillStyle || (this.fillStyle = g.ColorStyle.randomStyle()); - var b = this._bounds; - a.save(); - a.beginPath(); - a.lineWidth = 2; - a.fillStyle = this.fillStyle; - a.fillRect(b.x, b.y, b.w, b.h); - a.restore(); + b.prototype._renderFallback = function(b) { }; return b; - }(y); - m.RenderableBitmap = v; + }(p); + r.RenderableBitmap = k; (function(a) { a[a.Fill = 0] = "Fill"; a[a.Stroke = 1] = "Stroke"; a[a.StrokeFill = 2] = "StrokeFill"; - })(m.PathType || (m.PathType = {})); - var l = function() { - return function(a, b, c, h) { + })(r.PathType || (r.PathType = {})); + var u = function() { + return function(a, b, c, d) { this.type = a; this.style = b; this.smoothImage = c; - this.strokeProperties = h; + this.strokeProperties = d; this.path = new Path2D; - n(1 === a === !!h); }; }(); - m.StyledPath = l; - var t = function() { - return function(a, b, c, h, e) { + r.StyledPath = u; + var n = function() { + return function(a, b, c, d, h) { this.thickness = a; this.scaleMode = b; this.capsStyle = c; - this.jointsStyle = h; - this.miterLimit = e; + this.jointsStyle = d; + this.miterLimit = h; }; }(); - m.StrokeProperties = t; - var r = function(c) { - function d(a, b, d, h) { + r.StrokeProperties = n; + var s = function(c) { + function b(b, a, d, h) { c.call(this); this._flags = 6291472; this.properties = {}; this.setBounds(h); - this._id = a; - this._pathData = b; + this._id = b; + this._pathData = a; this._textures = d; d.length && this.setFlags(1048576); } - __extends(d, c); - d.prototype.update = function(a, b, d) { - this.setBounds(d); - this._pathData = a; + __extends(b, c); + b.prototype.update = function(b, a, c) { + this.setBounds(c); + this._pathData = b; this._paths = null; - this._textures = b; + this._textures = a; this.setFlags(1048576); this.invalidate(); }; - d.prototype.render = function(a, b, d, c, f) { - void 0 === c && (c = !1); - void 0 === f && (f = !1); - a.fillStyle = a.strokeStyle = "transparent"; - b = this._deserializePaths(this._pathData, a, b); - n(b); - for (d = 0;d < b.length;d++) { - var h = b[d]; - a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = h.smoothImage; + b.prototype.render = function(b, a, c, d, e) { + void 0 === d && (d = !1); + void 0 === e && (e = !1); + b.fillStyle = b.strokeStyle = "transparent"; + a = this._deserializePaths(this._pathData, b, a); + for (c = 0;c < a.length;c++) { + var h = a[c]; + b.mozImageSmoothingEnabled = b.msImageSmoothingEnabled = b.imageSmoothingEnabled = h.smoothImage; if (0 === h.type) { - a.fillStyle = f ? "#FF4981" : h.style, c ? a.clip(h.path, "evenodd") : a.fill(h.path, "evenodd"), a.fillStyle = "transparent"; + d ? b.clip(h.path, "evenodd") : (b.fillStyle = e ? "#000000" : h.style, b.fill(h.path, "evenodd"), b.fillStyle = "transparent"); } else { - if (!c && !f) { - a.strokeStyle = h.style; - var e = 1; - h.strokeProperties && (e = h.strokeProperties.scaleMode, a.lineWidth = h.strokeProperties.thickness, a.lineCap = h.strokeProperties.capsStyle, a.lineJoin = h.strokeProperties.jointsStyle, a.miterLimit = h.strokeProperties.miterLimit); - var g = a.lineWidth; - (g = 1 === g || 3 === g) && a.translate(.5, .5); - a.flashStroke(h.path, e); - g && a.translate(-.5, -.5); - a.strokeStyle = "transparent"; + if (!d && !e) { + b.strokeStyle = h.style; + var n = 1; + h.strokeProperties && (n = h.strokeProperties.scaleMode, b.lineWidth = h.strokeProperties.thickness, b.lineCap = h.strokeProperties.capsStyle, b.lineJoin = h.strokeProperties.jointsStyle, b.miterLimit = h.strokeProperties.miterLimit); + var g = b.lineWidth; + (g = 1 === g || 3 === g) && b.translate(.5, .5); + b.flashStroke(h.path, n); + g && b.translate(-.5, -.5); + b.strokeStyle = "transparent"; } } } }; - d.prototype._deserializePaths = function(b, c, f) { - n(b ? !this._paths : this._paths); + b.prototype._deserializePaths = function(a, c, d) { if (this._paths) { return this._paths; } - f = this._paths = []; - for (var h = null, e = null, l = 0, k = 0, p, r, v = !1, m = 0, y = 0, u = b.commands, w = b.coordinates, B = b.styles, A = B.position = 0, C = b.commandsPosition, D = 0;D < C;D++) { - switch(p = u[D], p) { + d = this._paths = []; + var e = null, h = null, g = 0, k = 0, p, m, s = !1, u = 0, r = 0, v = a.commands, t = a.coordinates, C = a.styles, y = C.position = 0; + a = a.commandsPosition; + for (var z = 0;z < a;z++) { + switch(v[z]) { case 9: - n(A <= b.coordinatesPosition - 2); - v && h && (h.lineTo(m, y), e && e.lineTo(m, y)); - v = !0; - l = m = w[A++] / 20; - k = y = w[A++] / 20; - h && h.moveTo(l, k); - e && e.moveTo(l, k); + s && e && (e.lineTo(u, r), h && h.lineTo(u, r)); + s = !0; + g = u = t[y++] / 20; + k = r = t[y++] / 20; + e && e.moveTo(g, k); + h && h.moveTo(g, k); break; case 10: - n(A <= b.coordinatesPosition - 2); - l = w[A++] / 20; - k = w[A++] / 20; - h && h.lineTo(l, k); - e && e.lineTo(l, k); + g = t[y++] / 20; + k = t[y++] / 20; + e && e.lineTo(g, k); + h && h.lineTo(g, k); break; case 11: - n(A <= b.coordinatesPosition - 4); - p = w[A++] / 20; - r = w[A++] / 20; - l = w[A++] / 20; - k = w[A++] / 20; - h && h.quadraticCurveTo(p, r, l, k); - e && e.quadraticCurveTo(p, r, l, k); + p = t[y++] / 20; + m = t[y++] / 20; + g = t[y++] / 20; + k = t[y++] / 20; + e && e.quadraticCurveTo(p, m, g, k); + h && h.quadraticCurveTo(p, m, g, k); break; case 12: - n(A <= b.coordinatesPosition - 6); - p = w[A++] / 20; - r = w[A++] / 20; - var z = w[A++] / 20, E = w[A++] / 20, l = w[A++] / 20, k = w[A++] / 20; - h && h.bezierCurveTo(p, r, z, E, l, k); - e && e.bezierCurveTo(p, r, z, E, l, k); + p = t[y++] / 20; + m = t[y++] / 20; + var B = t[y++] / 20, x = t[y++] / 20, g = t[y++] / 20, k = t[y++] / 20; + e && e.bezierCurveTo(p, m, B, x, g, k); + h && h.bezierCurveTo(p, m, B, x, g, k); break; case 1: - n(4 <= B.bytesAvailable); - h = this._createPath(0, g.ColorUtilities.rgbaToCSSStyle(B.readUnsignedInt()), !1, null, l, k); + e = this._createPath(0, l.ColorUtilities.rgbaToCSSStyle(C.readUnsignedInt()), !1, null, g, k); break; case 3: - p = this._readBitmap(B, c); - h = this._createPath(0, p.style, p.smoothImage, null, l, k); + p = this._readBitmap(C, c); + e = this._createPath(0, p.style, p.smoothImage, null, g, k); break; case 2: - h = this._createPath(0, this._readGradient(B, c), !1, null, l, k); + e = this._createPath(0, this._readGradient(C, c), !1, null, g, k); + break; + case 4: + e = null; + break; + case 5: + h = l.ColorUtilities.rgbaToCSSStyle(C.readUnsignedInt()); + C.position += 1; + p = C.readByte(); + m = b.LINE_CAPS_STYLES[C.readByte()]; + B = b.LINE_JOINTS_STYLES[C.readByte()]; + p = new n(t[y++] / 20, p, m, B, C.readByte()); + h = this._createPath(1, h, !1, p, g, k); + break; + case 6: + h = this._createPath(2, this._readGradient(C, c), !1, null, g, k); + break; + case 7: + p = this._readBitmap(C, c); + h = this._createPath(2, p.style, p.smoothImage, null, g, k); + break; + case 8: + h = null; + } + } + s && e && (e.lineTo(u, r), h && h.lineTo(u, r)); + this._pathData = null; + return d; + }; + b.prototype._createPath = function(b, a, c, d, e, h) { + b = new u(b, a, c, d); + this._paths.push(b); + b.path.moveTo(e, h); + return b.path; + }; + b.prototype._readMatrix = function(b) { + return new a(b.readFloat(), b.readFloat(), b.readFloat(), b.readFloat(), b.readFloat(), b.readFloat()); + }; + b.prototype._readGradient = function(b, a) { + var c = b.readUnsignedByte(), d = 2 * b.readShort() / 255, e = this._readMatrix(b), c = 16 === c ? a.createLinearGradient(-1, 0, 1, 0) : a.createRadialGradient(d, 0, 0, 0, 0, 1); + c.setTransform && c.setTransform(e.toSVGMatrix()); + e = b.readUnsignedByte(); + for (d = 0;d < e;d++) { + var h = b.readUnsignedByte() / 255, n = l.ColorUtilities.rgbaToCSSStyle(b.readUnsignedInt()); + c.addColorStop(h, n); + } + b.position += 2; + return c; + }; + b.prototype._readBitmap = function(b, a) { + var c = b.readUnsignedInt(), d = this._readMatrix(b), e = b.readBoolean() ? "repeat" : "no-repeat", h = b.readBoolean(); + (c = this._textures[c]) ? (e = a.createPattern(c.renderSource, e), e.setTransform(d.toSVGMatrix())) : e = null; + return{style:e, smoothImage:h}; + }; + b.prototype._renderFallback = function(b) { + this.fillStyle || (this.fillStyle = l.ColorStyle.randomStyle()); + var a = this._bounds; + b.save(); + b.beginPath(); + b.lineWidth = 2; + b.fillStyle = this.fillStyle; + b.fillRect(a.x, a.y, a.w, a.h); + b.restore(); + }; + b.LINE_CAPS_STYLES = ["round", "butt", "square"]; + b.LINE_JOINTS_STYLES = ["round", "bevel", "miter"]; + return b; + }(p); + r.RenderableShape = s; + k = function(d) { + function b() { + d.apply(this, arguments); + this._flags = 7340048; + this._morphPaths = Object.create(null); + } + __extends(b, d); + b.prototype._deserializePaths = function(b, a, d) { + if (this._morphPaths[d]) { + return this._morphPaths[d]; + } + var e = this._morphPaths[d] = [], h = null, k = null, p = 0, m = 0, u, r, v = !1, t = 0, P = 0, H = b.commands, C = b.coordinates, y = b.morphCoordinates, z = b.styles, B = b.morphStyles; + z.position = 0; + var x = B.position = 0; + b = b.commandsPosition; + for (var E = 0;E < b;E++) { + switch(H[E]) { + case 9: + v && h && (h.lineTo(t, P), k && k.lineTo(t, P)); + v = !0; + p = t = g(C[x], y[x++], d) / 20; + m = P = g(C[x], y[x++], d) / 20; + h && h.moveTo(p, m); + k && k.moveTo(p, m); + break; + case 10: + p = g(C[x], y[x++], d) / 20; + m = g(C[x], y[x++], d) / 20; + h && h.lineTo(p, m); + k && k.lineTo(p, m); + break; + case 11: + u = g(C[x], y[x++], d) / 20; + r = g(C[x], y[x++], d) / 20; + p = g(C[x], y[x++], d) / 20; + m = g(C[x], y[x++], d) / 20; + h && h.quadraticCurveTo(u, r, p, m); + k && k.quadraticCurveTo(u, r, p, m); + break; + case 12: + u = g(C[x], y[x++], d) / 20; + r = g(C[x], y[x++], d) / 20; + var A = g(C[x], y[x++], d) / 20, D = g(C[x], y[x++], d) / 20, p = g(C[x], y[x++], d) / 20, m = g(C[x], y[x++], d) / 20; + h && h.bezierCurveTo(u, r, A, D, p, m); + k && k.bezierCurveTo(u, r, A, D, p, m); + break; + case 1: + h = this._createMorphPath(0, d, l.ColorUtilities.rgbaToCSSStyle(c(z.readUnsignedInt(), B.readUnsignedInt(), d)), !1, null, p, m); + break; + case 3: + u = this._readMorphBitmap(z, B, d, a); + h = this._createMorphPath(0, d, u.style, u.smoothImage, null, p, m); + break; + case 2: + u = this._readMorphGradient(z, B, d, a); + h = this._createMorphPath(0, d, u, !1, null, p, m); break; case 4: h = null; break; case 5: - e = g.ColorUtilities.rgbaToCSSStyle(B.readUnsignedInt()); - B.position += 1; - p = B.readByte(); - r = d.LINE_CAPS_STYLES[B.readByte()]; - z = d.LINE_JOINTS_STYLES[B.readByte()]; - p = new t(w[A++] / 20, p, r, z, B.readByte()); - e = this._createPath(1, e, !1, p, l, k); + u = g(C[x], y[x++], d) / 20; + k = l.ColorUtilities.rgbaToCSSStyle(c(z.readUnsignedInt(), B.readUnsignedInt(), d)); + z.position += 1; + r = z.readByte(); + A = s.LINE_CAPS_STYLES[z.readByte()]; + D = s.LINE_JOINTS_STYLES[z.readByte()]; + u = new n(u, r, A, D, z.readByte()); + k = this._createMorphPath(1, d, k, !1, u, p, m); break; case 6: - e = this._createPath(2, this._readGradient(B, c), !1, null, l, k); + u = this._readMorphGradient(z, B, d, a); + k = this._createMorphPath(2, d, u, !1, null, p, m); break; case 7: - p = this._readBitmap(B, c); - e = this._createPath(2, p.style, p.smoothImage, null, l, k); - break; - case 8: - e = null; - break; - default: - a("Invalid command " + p + " encountered at index" + D + " of " + C); - } - } - n(0 === B.bytesAvailable); - n(D === C); - n(A === b.coordinatesPosition); - v && h && (h.lineTo(m, y), e && e.lineTo(m, y)); - this._pathData = null; - return f; - }; - d.prototype._createPath = function(a, b, d, c, f, h) { - a = new l(a, b, d, c); - this._paths.push(a); - a.path.moveTo(f, h); - return a.path; - }; - d.prototype._readMatrix = function(a) { - return new b(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat()); - }; - d.prototype._readGradient = function(a, b) { - n(34 <= a.bytesAvailable); - var d = a.readUnsignedByte(), c = 2 * a.readShort() / 255; - n(-1 <= c && 1 >= c); - var f = this._readMatrix(a), d = 16 === d ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(c, 0, 0, 0, 0, 1); - d.setTransform && d.setTransform(f.toSVGMatrix()); - f = a.readUnsignedByte(); - for (c = 0;c < f;c++) { - var h = a.readUnsignedByte() / 255, e = g.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt()); - d.addColorStop(h, e); - } - a.position += 2; - return d; - }; - d.prototype._readBitmap = function(a, b) { - n(30 <= a.bytesAvailable); - var d = a.readUnsignedInt(), c = this._readMatrix(a), f = a.readBoolean() ? "repeat" : "no-repeat", h = a.readBoolean(); - (d = this._textures[d]) ? (f = b.createPattern(d.renderSource, f), f.setTransform(c.toSVGMatrix())) : f = null; - return{style:f, smoothImage:h}; - }; - d.prototype._renderFallback = function(a) { - this.fillStyle || (this.fillStyle = g.ColorStyle.randomStyle()); - var b = this._bounds; - a.save(); - a.beginPath(); - a.lineWidth = 2; - a.fillStyle = this.fillStyle; - a.fillRect(b.x, b.y, b.w, b.h); - a.restore(); - }; - d.LINE_CAPS_STYLES = ["round", "butt", "square"]; - d.LINE_JOINTS_STYLES = ["round", "bevel", "miter"]; - return d; - }(y); - m.RenderableShape = r; - v = function(f) { - function d() { - f.apply(this, arguments); - this._flags = 7340048; - this._morphPaths = Object.create(null); - } - __extends(d, f); - d.prototype._deserializePaths = function(b, d, f) { - if (this._morphPaths[f]) { - return this._morphPaths[f]; - } - var h = this._morphPaths[f] = [], l = null, k = null, p = 0, v = 0, m, y, u = !1, w = 0, P = 0, U = b.commands, B = b.coordinates, A = b.morphCoordinates, C = b.styles, D = b.morphStyles; - C.position = 0; - for (var z = D.position = 0, E = b.commandsPosition, G = 0;G < E;G++) { - switch(m = U[G], m) { - case 9: - n(z <= b.coordinatesPosition - 2); - u && l && (l.lineTo(w, P), k && k.lineTo(w, P)); - u = !0; - p = w = e(B[z], A[z++], f) / 20; - v = P = e(B[z], A[z++], f) / 20; - l && l.moveTo(p, v); - k && k.moveTo(p, v); - break; - case 10: - n(z <= b.coordinatesPosition - 2); - p = e(B[z], A[z++], f) / 20; - v = e(B[z], A[z++], f) / 20; - l && l.lineTo(p, v); - k && k.lineTo(p, v); - break; - case 11: - n(z <= b.coordinatesPosition - 4); - m = e(B[z], A[z++], f) / 20; - y = e(B[z], A[z++], f) / 20; - p = e(B[z], A[z++], f) / 20; - v = e(B[z], A[z++], f) / 20; - l && l.quadraticCurveTo(m, y, p, v); - k && k.quadraticCurveTo(m, y, p, v); - break; - case 12: - n(z <= b.coordinatesPosition - 6); - m = e(B[z], A[z++], f) / 20; - y = e(B[z], A[z++], f) / 20; - var F = e(B[z], A[z++], f) / 20, H = e(B[z], A[z++], f) / 20, p = e(B[z], A[z++], f) / 20, v = e(B[z], A[z++], f) / 20; - l && l.bezierCurveTo(m, y, F, H, p, v); - k && k.bezierCurveTo(m, y, F, H, p, v); - break; - case 1: - n(4 <= C.bytesAvailable); - l = this._createMorphPath(0, f, g.ColorUtilities.rgbaToCSSStyle(c(C.readUnsignedInt(), D.readUnsignedInt(), f)), !1, null, p, v); - break; - case 3: - m = this._readMorphBitmap(C, D, f, d); - l = this._createMorphPath(0, f, m.style, m.smoothImage, null, p, v); - break; - case 2: - m = this._readMorphGradient(C, D, f, d); - l = this._createMorphPath(0, f, m, !1, null, p, v); - break; - case 4: - l = null; - break; - case 5: - m = e(B[z], A[z++], f) / 20; - k = g.ColorUtilities.rgbaToCSSStyle(c(C.readUnsignedInt(), D.readUnsignedInt(), f)); - C.position += 1; - y = C.readByte(); - F = r.LINE_CAPS_STYLES[C.readByte()]; - H = r.LINE_JOINTS_STYLES[C.readByte()]; - m = new t(m, y, F, H, C.readByte()); - k = this._createMorphPath(1, f, k, !1, m, p, v); - break; - case 6: - m = this._readMorphGradient(C, D, f, d); - k = this._createMorphPath(2, f, m, !1, null, p, v); - break; - case 7: - m = this._readMorphBitmap(C, D, f, d); - k = this._createMorphPath(2, f, m.style, m.smoothImage, null, p, v); + u = this._readMorphBitmap(z, B, d, a); + k = this._createMorphPath(2, d, u.style, u.smoothImage, null, p, m); break; case 8: k = null; - break; - default: - a("Invalid command " + m + " encountered at index" + G + " of " + E); } } - n(0 === C.bytesAvailable); - n(G === E); - n(z === b.coordinatesPosition); - u && l && (l.lineTo(w, P), k && k.lineTo(w, P)); - return h; + v && h && (h.lineTo(t, P), k && k.lineTo(t, P)); + return e; }; - d.prototype._createMorphPath = function(a, b, d, c, f, h, e) { - a = new l(a, d, c, f); - this._morphPaths[b].push(a); - a.path.moveTo(h, e); - return a.path; + b.prototype._createMorphPath = function(b, a, c, d, e, h, n) { + b = new u(b, c, d, e); + this._morphPaths[a].push(b); + b.path.moveTo(h, n); + return b.path; }; - d.prototype._readMorphMatrix = function(a, d, c) { - return new b(e(a.readFloat(), d.readFloat(), c), e(a.readFloat(), d.readFloat(), c), e(a.readFloat(), d.readFloat(), c), e(a.readFloat(), d.readFloat(), c), e(a.readFloat(), d.readFloat(), c), e(a.readFloat(), d.readFloat(), c)); + b.prototype._readMorphMatrix = function(b, c, d) { + return new a(g(b.readFloat(), c.readFloat(), d), g(b.readFloat(), c.readFloat(), d), g(b.readFloat(), c.readFloat(), d), g(b.readFloat(), c.readFloat(), d), g(b.readFloat(), c.readFloat(), d), g(b.readFloat(), c.readFloat(), d)); }; - d.prototype._readMorphGradient = function(a, b, d, f) { - n(34 <= a.bytesAvailable); - var h = a.readUnsignedByte(), l = 2 * a.readShort() / 255; - n(-1 <= l && 1 >= l); - var k = this._readMorphMatrix(a, b, d); - f = 16 === h ? f.createLinearGradient(-1, 0, 1, 0) : f.createRadialGradient(l, 0, 0, 0, 0, 1); - f.setTransform && f.setTransform(k.toSVGMatrix()); - k = a.readUnsignedByte(); + b.prototype._readMorphGradient = function(b, a, d, e) { + var h = b.readUnsignedByte(), n = 2 * b.readShort() / 255, k = this._readMorphMatrix(b, a, d); + e = 16 === h ? e.createLinearGradient(-1, 0, 1, 0) : e.createRadialGradient(n, 0, 0, 0, 0, 1); + e.setTransform && e.setTransform(k.toSVGMatrix()); + k = b.readUnsignedByte(); for (h = 0;h < k;h++) { - var l = e(a.readUnsignedByte() / 255, b.readUnsignedByte() / 255, d), p = c(a.readUnsignedInt(), b.readUnsignedInt(), d), p = g.ColorUtilities.rgbaToCSSStyle(p); - f.addColorStop(l, p); + var n = g(b.readUnsignedByte() / 255, a.readUnsignedByte() / 255, d), p = c(b.readUnsignedInt(), a.readUnsignedInt(), d), p = l.ColorUtilities.rgbaToCSSStyle(p); + e.addColorStop(n, p); } - a.position += 2; - return f; + b.position += 2; + return e; }; - d.prototype._readMorphBitmap = function(a, b, d, c) { - n(30 <= a.bytesAvailable); - var f = a.readUnsignedInt(); - b = this._readMorphMatrix(a, b, d); - d = a.readBoolean() ? "repeat" : "no-repeat"; - a = a.readBoolean(); - f = this._textures[f]; - n(f._canvas); - c = c.createPattern(f._canvas, d); - c.setTransform(b.toSVGMatrix()); - return{style:c, smoothImage:a}; + b.prototype._readMorphBitmap = function(b, a, c, d) { + var e = b.readUnsignedInt(); + a = this._readMorphMatrix(b, a, c); + c = b.readBoolean() ? "repeat" : "no-repeat"; + b = b.readBoolean(); + d = d.createPattern(this._textures[e]._canvas, c); + d.setTransform(a.toSVGMatrix()); + return{style:d, smoothImage:b}; }; - return d; - }(r); - m.RenderableMorphShape = v; - var u = function() { + return b; + }(s); + r.RenderableMorphShape = k; + var v = function() { function a() { this.align = this.leading = this.descent = this.ascent = this.width = this.y = this.x = 0; this.runs = []; } - a.prototype.addRun = function(b, c, e, g) { - if (e) { + a.prototype.addRun = function(b, c, h, n) { + if (h) { a._measureContext.font = b; - var l = a._measureContext.measureText(e).width | 0; - this.runs.push(new h(b, c, e, l, g)); - this.width += l; + var g = a._measureContext.measureText(h).width | 0; + this.runs.push(new d(b, c, h, g, n)); + this.width += g; } }; a.prototype.wrap = function(b) { - var c = [this], e = this.runs, g = this; - g.width = 0; - g.runs = []; - for (var l = a._measureContext, n = 0;n < e.length;n++) { - var k = e[n], p = k.text; - k.text = ""; - k.width = 0; - l.font = k.font; - for (var r = b, t = p.split(/[\s.-]/), m = 0, v = 0;v < t.length;v++) { - var y = t[v], u = p.substr(m, y.length + 1), w = l.measureText(u).width | 0; - if (w > r) { + var c = [this], h = this.runs, n = this; + n.width = 0; + n.runs = []; + for (var g = a._measureContext, k = 0;k < h.length;k++) { + var p = h[k], m = p.text; + p.text = ""; + p.width = 0; + g.font = p.font; + for (var l = b, s = m.split(/[\s.-]/), u = 0, r = 0;r < s.length;r++) { + var v = s[r], t = m.substr(u, v.length + 1), H = g.measureText(t).width | 0; + if (H > l) { do { - if (k.text && (g.runs.push(k), g.width += k.width, k = new h(k.font, k.fillStyle, "", 0, k.underline), r = new a, r.y = g.y + g.descent + g.leading + g.ascent | 0, r.ascent = g.ascent, r.descent = g.descent, r.leading = g.leading, r.align = g.align, c.push(r), g = r), r = b - w, 0 > r) { - var w = u.length, B, A; + if (p.text && (n.runs.push(p), n.width += p.width, p = new d(p.font, p.fillStyle, "", 0, p.underline), l = new a, l.y = n.y + n.descent + n.leading + n.ascent | 0, l.ascent = n.ascent, l.descent = n.descent, l.leading = n.leading, l.align = n.align, c.push(l), n = l), l = b - H, 0 > l) { + var H = t.length, C, y; do { - w--; - if (1 > w) { + H--; + if (1 > H) { throw Error("Shall never happen: bad maxWidth?"); } - B = u.substr(0, w); - A = l.measureText(B).width | 0; - } while (A > b); - k.text = B; - k.width = A; - u = u.substr(w); - w = l.measureText(u).width | 0; + C = t.substr(0, H); + y = g.measureText(C).width | 0; + } while (y > b); + p.text = C; + p.width = y; + t = t.substr(H); + H = g.measureText(t).width | 0; } - } while (0 > r); + } while (0 > l); } else { - r -= w; + l -= H; } - k.text += u; - k.width += w; - m += y.length + 1; + p.text += t; + p.width += H; + u += v.length + 1; } - g.runs.push(k); - g.width += k.width; + n.runs.push(p); + n.width += p.width; } return c; }; a._measureContext = document.createElement("canvas").getContext("2d"); return a; }(); - m.TextLine = u; - var h = function() { - return function(a, b, c, h, e) { + r.TextLine = v; + var d = function() { + return function(a, b, c, d, h) { void 0 === a && (a = ""); void 0 === b && (b = ""); void 0 === c && (c = ""); - void 0 === h && (h = 0); - void 0 === e && (e = !1); + void 0 === d && (d = 0); + void 0 === h && (h = !1); this.font = a; this.fillStyle = b; this.text = c; - this.width = h; - this.underline = e; + this.width = d; + this.underline = h; }; }(); - m.TextRun = h; - v = function(a) { - function d(d) { - a.call(this); + r.TextRun = d; + k = function(c) { + function b(b) { + c.call(this); this._flags = 1048592; this.properties = {}; - this._textBounds = d.clone(); + this._textBounds = b.clone(); this._textRunData = null; this._plainText = ""; this._borderColor = this._backgroundColor = 0; - this._matrix = b.createIdentity(); + this._matrix = a.createIdentity(); this._coords = null; this._scrollV = 1; this._scrollH = 0; - this.textRect = d.clone(); + this.textRect = b.clone(); this.lines = []; - this.setBounds(d); + this.setBounds(b); } - __extends(d, a); - d.prototype.setBounds = function(b) { - a.prototype.setBounds.call(this, b); + __extends(b, c); + b.prototype.setBounds = function(b) { + c.prototype.setBounds.call(this, b); this._textBounds.set(b); this.textRect.setElements(b.x + 2, b.y + 2, b.w - 2, b.h - 2); }; - d.prototype.setContent = function(a, b, d, c) { - this._textRunData = b; - this._plainText = a; - this._matrix.set(d); - this._coords = c; + b.prototype.setContent = function(b, a, c, d) { + this._textRunData = a; + this._plainText = b; + this._matrix.set(c); + this._coords = d; this.lines = []; }; - d.prototype.setStyle = function(a, b, d, c) { - this._backgroundColor = a; - this._borderColor = b; - this._scrollV = d; - this._scrollH = c; + b.prototype.setStyle = function(b, a, c, d) { + this._backgroundColor = b; + this._borderColor = a; + this._scrollV = c; + this._scrollH = d; }; - d.prototype.reflow = function(a, b) { - var d = this._textRunData; - if (d) { - for (var c = this._bounds, f = c.w - 4, h = this._plainText, e = this.lines, l = new u, k = 0, n = 0, p = 0, r = 0, t = 0, m = -1;d.position < d.length;) { - var v = d.readInt(), y = d.readInt(), w = d.readInt(), D = d.readUTF(), z = d.readInt(), E = d.readInt(), G = d.readInt(); - z > p && (p = z); - E > r && (r = E); - G > t && (t = G); - z = d.readBoolean(); + b.prototype.reflow = function(b, a) { + var c = this._textRunData; + if (c) { + for (var d = this._bounds, e = d.w - 4, h = this._plainText, n = this.lines, g = new v, k = 0, p = 0, m = 0, s = 0, u = 0, r = -1;c.position < c.length;) { + var t = c.readInt(), y = c.readInt(), z = c.readInt(), B = c.readUTF(), x = c.readInt(), E = c.readInt(), A = c.readInt(); + x > m && (m = x); + E > s && (s = E); + A > u && (u = A); + x = c.readBoolean(); E = ""; - d.readBoolean() && (E += "italic "); - z && (E += "bold "); - w = E + w + "px " + D; - D = d.readInt(); - D = g.ColorUtilities.rgbToHex(D); - z = d.readInt(); - -1 === m && (m = z); - d.readBoolean(); - d.readInt(); - d.readInt(); - d.readInt(); - d.readInt(); - d.readInt(); - for (var z = d.readBoolean(), F = "", E = !1;!E;v++) { - E = v >= y - 1; - G = h[v]; - if ("\r" !== G && "\n" !== G && (F += G, v < h.length - 1)) { + c.readBoolean() && (E += "italic "); + x && (E += "bold "); + z = E + z + "px " + B; + B = c.readInt(); + B = l.ColorUtilities.rgbToHex(B); + x = c.readInt(); + -1 === r && (r = x); + c.readBoolean(); + c.readInt(); + c.readInt(); + c.readInt(); + c.readInt(); + c.readInt(); + for (var x = c.readBoolean(), D = "", E = !1;!E;t++) { + E = t >= y - 1; + A = h[t]; + if ("\r" !== A && "\n" !== A && (D += A, t < h.length - 1)) { continue; } - l.addRun(w, D, F, z); - if (l.runs.length) { - e.length && (k += t); - k += p; - l.y = k | 0; - k += r; - l.ascent = p; - l.descent = r; - l.leading = t; - l.align = m; - if (b && l.width > f) { - for (l = l.wrap(f), F = 0;F < l.length;F++) { - var H = l[F], k = H.y + H.descent + H.leading; - e.push(H); - H.width > n && (n = H.width); + g.addRun(z, B, D, x); + if (g.runs.length) { + n.length && (k += u); + k += m; + g.y = k | 0; + k += s; + g.ascent = m; + g.descent = s; + g.leading = u; + g.align = r; + if (a && g.width > e) { + for (g = g.wrap(e), D = 0;D < g.length;D++) { + var F = g[D], k = F.y + F.descent + F.leading; + n.push(F); + F.width > p && (p = F.width); } } else { - e.push(l), l.width > n && (n = l.width); + n.push(g), g.width > p && (p = g.width); } - l = new u; + g = new v; } else { - k += p + r + t; + k += m + s + u; } - F = ""; + D = ""; if (E) { - t = r = p = 0; - m = -1; + u = s = m = 0; + r = -1; break; } - "\r" === G && "\n" === h[v + 1] && v++; + "\r" === A && "\n" === h[t + 1] && t++; } - l.addRun(w, D, F, z); + g.addRun(z, B, D, x); } - d = h[h.length - 1]; - "\r" !== d && "\n" !== d || e.push(l); - d = this.textRect; - d.w = n; - d.h = k; - if (a) { - if (!b) { - f = n; - n = c.w; - switch(a) { + c = h[h.length - 1]; + "\r" !== c && "\n" !== c || n.push(g); + c = this.textRect; + c.w = p; + c.h = k; + if (b) { + if (!a) { + e = p; + p = d.w; + switch(b) { case 1: - d.x = n - (f + 4) >> 1; + c.x = p - (e + 4) >> 1; break; case 3: - d.x = n - (f + 4); + c.x = p - (e + 4); } - this._textBounds.setElements(d.x - 2, d.y - 2, d.w + 4, d.h + 4); + this._textBounds.setElements(c.x - 2, c.y - 2, c.w + 4, c.h + 4); } - c.h = k + 4; + d.h = k + 4; } else { - this._textBounds = c; + this._textBounds = d; } - for (v = 0;v < e.length;v++) { - if (c = e[v], c.width < f) { - switch(c.align) { + for (t = 0;t < n.length;t++) { + if (d = n[t], d.width < e) { + switch(d.align) { case 1: - c.x = f - c.width | 0; + d.x = e - d.width | 0; break; case 2: - c.x = (f - c.width) / 2 | 0; + d.x = (e - d.width) / 2 | 0; } } } this.invalidate(); } }; - d.roundBoundPoints = function(a) { - n(a === d.absoluteBoundPoints); - for (var b = 0;b < a.length;b++) { - var c = a[b]; + b.roundBoundPoints = function(b) { + for (var a = 0;a < b.length;a++) { + var c = b[a]; c.x = Math.floor(c.x + .1) + .5; c.y = Math.floor(c.y + .1) + .5; } }; - d.prototype.render = function(a) { - a.save(); - var c = this._textBounds; - this._backgroundColor && (a.fillStyle = g.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(c.x, c.y, c.w, c.h)); + b.prototype.render = function(c) { + c.save(); + var d = this._textBounds; + this._backgroundColor && (c.fillStyle = l.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), c.fillRect(d.x, d.y, d.w, d.h)); if (this._borderColor) { - a.strokeStyle = g.ColorUtilities.rgbaToCSSStyle(this._borderColor); - a.lineCap = "square"; - a.lineWidth = 1; - var f = d.absoluteBoundPoints, h = a.currentTransform; - h ? (c = c.clone(), (new b(h.a, h.b, h.c, h.d, h.e, h.f)).transformRectangle(c, f), a.setTransform(1, 0, 0, 1, 0, 0)) : (f[0].x = c.x, f[0].y = c.y, f[1].x = c.x + c.w, f[1].y = c.y, f[2].x = c.x + c.w, f[2].y = c.y + c.h, f[3].x = c.x, f[3].y = c.y + c.h); - d.roundBoundPoints(f); - c = new Path2D; - c.moveTo(f[0].x, f[0].y); - c.lineTo(f[1].x, f[1].y); - c.lineTo(f[2].x, f[2].y); - c.lineTo(f[3].x, f[3].y); - c.lineTo(f[0].x, f[0].y); - a.stroke(c); - h && a.setTransform(h.a, h.b, h.c, h.d, h.e, h.f); + c.strokeStyle = l.ColorUtilities.rgbaToCSSStyle(this._borderColor); + c.lineCap = "square"; + c.lineWidth = 1; + var e = b.absoluteBoundPoints, h = c.currentTransform; + h ? (d = d.clone(), (new a(h.a, h.b, h.c, h.d, h.e, h.f)).transformRectangle(d, e), c.setTransform(1, 0, 0, 1, 0, 0)) : (e[0].x = d.x, e[0].y = d.y, e[1].x = d.x + d.w, e[1].y = d.y, e[2].x = d.x + d.w, e[2].y = d.y + d.h, e[3].x = d.x, e[3].y = d.y + d.h); + b.roundBoundPoints(e); + d = new Path2D; + d.moveTo(e[0].x, e[0].y); + d.lineTo(e[1].x, e[1].y); + d.lineTo(e[2].x, e[2].y); + d.lineTo(e[3].x, e[3].y); + d.lineTo(e[0].x, e[0].y); + c.stroke(d); + h && c.setTransform(h.a, h.b, h.c, h.d, h.e, h.f); } - this._coords ? this._renderChars(a) : this._renderLines(a); - a.restore(); + this._coords ? this._renderChars(c) : this._renderLines(c); + c.restore(); }; - d.prototype._renderChars = function(a) { + b.prototype._renderChars = function(b) { if (this._matrix) { - var b = this._matrix; - a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty); + var a = this._matrix; + b.transform(a.a, a.b, a.c, a.d, a.tx, a.ty); } - for (var b = this.lines, d = this._coords, c = d.position = 0;c < b.length;c++) { - for (var f = b[c].runs, h = 0;h < f.length;h++) { - var e = f[h]; - a.font = e.font; - a.fillStyle = e.fillStyle; - for (var e = e.text, g = 0;g < e.length;g++) { - var l = d.readInt() / 20, k = d.readInt() / 20; - a.fillText(e[g], l, k); + for (var a = this.lines, c = this._coords, d = c.position = 0;d < a.length;d++) { + for (var e = a[d].runs, h = 0;h < e.length;h++) { + var n = e[h]; + b.font = n.font; + b.fillStyle = n.fillStyle; + for (var n = n.text, g = 0;g < n.length;g++) { + var k = c.readInt() / 20, p = c.readInt() / 20; + b.fillText(n[g], k, p); } } } }; - d.prototype._renderLines = function(a) { - var b = this._textBounds; - a.beginPath(); - a.rect(b.x + 2, b.y + 2, b.w - 4, b.h - 4); - a.clip(); - a.translate(b.x - this._scrollH + 2, b.y + 2); - for (var d = this.lines, c = this._scrollV, f = 0, h = 0;h < d.length;h++) { - var e = d[h], g = e.x, l = e.y; - if (h + 1 < c) { - f = l + e.descent + e.leading; + b.prototype._renderLines = function(b) { + var a = this._textBounds; + b.beginPath(); + b.rect(a.x + 2, a.y + 2, a.w - 4, a.h - 4); + b.clip(); + b.translate(a.x - this._scrollH + 2, a.y + 2); + for (var c = this.lines, d = this._scrollV, e = 0, h = 0;h < c.length;h++) { + var n = c[h], g = n.x, k = n.y; + if (h + 1 < d) { + e = k + n.descent + n.leading; } else { - l -= f; - if (h + 1 - c && l > b.h) { + k -= e; + if (h + 1 - d && k > a.h) { break; } - for (var k = e.runs, n = 0;n < k.length;n++) { - var p = k[n]; - a.font = p.font; - a.fillStyle = p.fillStyle; - p.underline && a.fillRect(g, l + e.descent / 2 | 0, p.width, 1); - a.textAlign = "left"; - a.textBaseline = "alphabetic"; - a.fillText(p.text, g, l); - g += p.width; + for (var p = n.runs, m = 0;m < p.length;m++) { + var l = p[m]; + b.font = l.font; + b.fillStyle = l.fillStyle; + l.underline && b.fillRect(g, k + n.descent / 2 | 0, l.width, 1); + b.textAlign = "left"; + b.textBaseline = "alphabetic"; + b.fillText(l.text, g, k); + g += l.width; } } } }; - d.absoluteBoundPoints = [new w(0, 0), new w(0, 0), new w(0, 0), new w(0, 0)]; - return d; - }(y); - m.RenderableText = v; - y = function(a) { - function b(d, c) { + b.absoluteBoundPoints = [new t(0, 0), new t(0, 0), new t(0, 0), new t(0, 0)]; + return b; + }(p); + r.RenderableText = k; + p = function(a) { + function b(b, c) { a.call(this); this._flags = 3145728; this.properties = {}; - this.setBounds(new k(0, 0, d, c)); + this.setBounds(new m(0, 0, b, c)); } __extends(b, a); Object.defineProperty(b.prototype, "text", {get:function() { return this._text; - }, set:function(a) { - this._text = a; + }, set:function(b) { + this._text = b; }, enumerable:!0, configurable:!0}); - b.prototype.render = function(a, b, d) { - a.save(); - a.textBaseline = "top"; - a.fillStyle = "white"; - a.fillText(this.text, 0, 0); - a.restore(); + b.prototype.render = function(b, a, c) { + b.save(); + b.textBaseline = "top"; + b.fillStyle = "white"; + b.fillText(this.text, 0, 0); + b.restore(); }; return b; - }(y); - m.Label = y; - })(g.GFX || (g.GFX = {})); + }(p); + r.Label = p; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = g.ColorUtilities.clampByte, c = g.Debug.assert, w = function() { +(function(l) { + (function(r) { + var g = l.ColorUtilities.clampByte, c = function() { return function() { }; }(); - m.Filter = w; - var k = function(b) { - function a(a, c, e) { - b.call(this); + r.Filter = c; + var t = function(c) { + function a(a, g, k) { + c.call(this); this.blurX = a; - this.blurY = c; - this.quality = e; - } - __extends(a, b); - return a; - }(w); - m.BlurFilter = k; - k = function(b) { - function a(a, c, e, g, l, k, r, m, h, f, d) { - b.call(this); - this.alpha = a; - this.angle = c; - this.blurX = e; this.blurY = g; - this.color = l; - this.distance = k; + this.quality = k; + } + __extends(a, c); + return a; + }(c); + r.BlurFilter = t; + t = function(c) { + function a(a, g, k, l, n, s, r, d, e, b, f) { + c.call(this); + this.alpha = a; + this.angle = g; + this.blurX = k; + this.blurY = l; + this.color = n; + this.distance = s; this.hideObject = r; - this.inner = m; - this.knockout = h; - this.quality = f; + this.inner = d; + this.knockout = e; + this.quality = b; + this.strength = f; + } + __extends(a, c); + return a; + }(c); + r.DropshadowFilter = t; + c = function(c) { + function a(a, g, k, l, n, s, r, d) { + c.call(this); + this.alpha = a; + this.blurX = g; + this.blurY = k; + this.color = l; + this.inner = n; + this.knockout = s; + this.quality = r; this.strength = d; } - __extends(a, b); + __extends(a, c); return a; - }(w); - m.DropshadowFilter = k; - w = function(b) { - function a(a, c, e, g, l, k, r, m) { - b.call(this); - this.alpha = a; - this.blurX = c; - this.blurY = e; - this.color = g; - this.inner = l; - this.knockout = k; - this.quality = r; - this.strength = m; - } - __extends(a, b); - return a; - }(w); - m.GlowFilter = w; - (function(b) { - b[b.Unknown = 0] = "Unknown"; - b[b.Identity = 1] = "Identity"; - })(m.ColorMatrixType || (m.ColorMatrixType = {})); - w = function() { - function b(a) { - c(20 === a.length); + }(c); + r.GlowFilter = c; + (function(c) { + c[c.Unknown = 0] = "Unknown"; + c[c.Identity = 1] = "Identity"; + })(r.ColorMatrixType || (r.ColorMatrixType = {})); + c = function() { + function c(a) { this._data = new Float32Array(a); this._type = 0; } - b.prototype.clone = function() { - var a = new b(this._data); + c.prototype.clone = function() { + var a = new c(this._data); a._type = this._type; return a; }; - b.prototype.set = function(a) { + c.prototype.set = function(a) { this._data.set(a._data); this._type = a._type; }; - b.prototype.toWebGLMatrix = function() { + c.prototype.toWebGLMatrix = function() { return new Float32Array(this._data); }; - b.prototype.asWebGLMatrix = function() { + c.prototype.asWebGLMatrix = function() { return this._data.subarray(0, 16); }; - b.prototype.asWebGLVector = function() { + c.prototype.asWebGLVector = function() { return this._data.subarray(16, 20); }; - b.prototype.isIdentity = function() { + c.prototype.isIdentity = function() { if (this._type & 1) { return!0; } var a = this._data; return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 1 == a[15] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19]; }; - b.createIdentity = function() { - var a = new b([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]); + c.createIdentity = function() { + var a = new c([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]); a._type = 1; return a; }; - b.prototype.setMultipliersAndOffsets = function(a, b, c, e, g, l, k, r) { - for (var m = this._data, h = 0;h < m.length;h++) { - m[h] = 0; + c.prototype.setMultipliersAndOffsets = function(a, c, g, k, m, n, l, r) { + for (var d = this._data, e = 0;e < d.length;e++) { + d[e] = 0; } - m[0] = a; - m[5] = b; - m[10] = c; - m[15] = e; - m[16] = g / 255; - m[17] = l / 255; - m[18] = k / 255; - m[19] = r / 255; + d[0] = a; + d[5] = c; + d[10] = g; + d[15] = k; + d[16] = m / 255; + d[17] = n / 255; + d[18] = l / 255; + d[19] = r / 255; this._type = 0; }; - b.prototype.transformRGBA = function(a) { - var b = a >> 24 & 255, c = a >> 16 & 255, g = a >> 8 & 255, k = a & 255, l = this._data; - a = e(b * l[0] + c * l[1] + g * l[2] + k * l[3] + 255 * l[16]); - var t = e(b * l[4] + c * l[5] + g * l[6] + k * l[7] + 255 * l[17]), r = e(b * l[8] + c * l[9] + g * l[10] + k * l[11] + 255 * l[18]), b = e(b * l[12] + c * l[13] + g * l[14] + k * l[15] + 255 * l[19]); - return a << 24 | t << 16 | r << 8 | b; + c.prototype.transformRGBA = function(a) { + var c = a >> 24 & 255, p = a >> 16 & 255, k = a >> 8 & 255, m = a & 255, n = this._data; + a = g(c * n[0] + p * n[1] + k * n[2] + m * n[3] + 255 * n[16]); + var l = g(c * n[4] + p * n[5] + k * n[6] + m * n[7] + 255 * n[17]), r = g(c * n[8] + p * n[9] + k * n[10] + m * n[11] + 255 * n[18]), c = g(c * n[12] + p * n[13] + k * n[14] + m * n[15] + 255 * n[19]); + return a << 24 | l << 16 | r << 8 | c; }; - b.prototype.multiply = function(a) { + c.prototype.multiply = function(a) { if (!(a._type & 1)) { - var b = this._data, c = a._data; - a = b[0]; - var e = b[1], g = b[2], l = b[3], k = b[4], r = b[5], m = b[6], h = b[7], f = b[8], d = b[9], q = b[10], x = b[11], s = b[12], O = b[13], w = b[14], V = b[15], fa = b[16], ga = b[17], ha = b[18], ia = b[19], W = c[0], X = c[1], P = c[2], U = c[3], B = c[4], A = c[5], C = c[6], D = c[7], z = c[8], E = c[9], G = c[10], F = c[11], H = c[12], I = c[13], J = c[14], K = c[15], L = c[16], M = c[17], N = c[18], c = c[19]; - b[0] = a * W + k * X + f * P + s * U; - b[1] = e * W + r * X + d * P + O * U; - b[2] = g * W + m * X + q * P + w * U; - b[3] = l * W + h * X + x * P + V * U; - b[4] = a * B + k * A + f * C + s * D; - b[5] = e * B + r * A + d * C + O * D; - b[6] = g * B + m * A + q * C + w * D; - b[7] = l * B + h * A + x * C + V * D; - b[8] = a * z + k * E + f * G + s * F; - b[9] = e * z + r * E + d * G + O * F; - b[10] = g * z + m * E + q * G + w * F; - b[11] = l * z + h * E + x * G + V * F; - b[12] = a * H + k * I + f * J + s * K; - b[13] = e * H + r * I + d * J + O * K; - b[14] = g * H + m * I + q * J + w * K; - b[15] = l * H + h * I + x * J + V * K; - b[16] = a * L + k * M + f * N + s * c + fa; - b[17] = e * L + r * M + d * N + O * c + ga; - b[18] = g * L + m * M + q * N + w * c + ha; - b[19] = l * L + h * M + x * N + V * c + ia; + var c = this._data, g = a._data; + a = c[0]; + var k = c[1], m = c[2], n = c[3], l = c[4], r = c[5], d = c[6], e = c[7], b = c[8], f = c[9], q = c[10], w = c[11], G = c[12], U = c[13], t = c[14], Q = c[15], ea = c[16], fa = c[17], ga = c[18], ha = c[19], W = g[0], P = g[1], H = g[2], C = g[3], y = g[4], z = g[5], B = g[6], x = g[7], E = g[8], A = g[9], D = g[10], F = g[11], I = g[12], J = g[13], K = g[14], L = g[15], M = g[16], N = g[17], O = g[18], g = g[19]; + c[0] = a * W + l * P + b * H + G * C; + c[1] = k * W + r * P + f * H + U * C; + c[2] = m * W + d * P + q * H + t * C; + c[3] = n * W + e * P + w * H + Q * C; + c[4] = a * y + l * z + b * B + G * x; + c[5] = k * y + r * z + f * B + U * x; + c[6] = m * y + d * z + q * B + t * x; + c[7] = n * y + e * z + w * B + Q * x; + c[8] = a * E + l * A + b * D + G * F; + c[9] = k * E + r * A + f * D + U * F; + c[10] = m * E + d * A + q * D + t * F; + c[11] = n * E + e * A + w * D + Q * F; + c[12] = a * I + l * J + b * K + G * L; + c[13] = k * I + r * J + f * K + U * L; + c[14] = m * I + d * J + q * K + t * L; + c[15] = n * I + e * J + w * K + Q * L; + c[16] = a * M + l * N + b * O + G * g + ea; + c[17] = k * M + r * N + f * O + U * g + fa; + c[18] = m * M + d * N + q * O + t * g + ga; + c[19] = n * M + e * N + w * O + Q * g + ha; this._type = 0; } }; - Object.defineProperty(b.prototype, "alphaMultiplier", {get:function() { + Object.defineProperty(c.prototype, "alphaMultiplier", {get:function() { return this._data[15]; }, enumerable:!0, configurable:!0}); - b.prototype.hasOnlyAlphaMultiplier = function() { + c.prototype.hasOnlyAlphaMultiplier = function() { var a = this._data; return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19]; }; - b.prototype.equals = function(a) { + c.prototype.equals = function(a) { if (!a) { return!1; } if (this._type === a._type && 1 === this._type) { return!0; } - var b = this._data; + var c = this._data; a = a._data; - for (var c = 0;20 > c;c++) { - if (.001 < Math.abs(b[c] - a[c])) { + for (var g = 0;20 > g;g++) { + if (.001 < Math.abs(c[g] - a[g])) { return!1; } } return!0; }; - b.prototype.toSVGFilterMatrix = function() { + c.prototype.toSVGFilterMatrix = function() { var a = this._data; return[a[0], a[4], a[8], a[12], a[16], a[1], a[5], a[9], a[13], a[17], a[2], a[6], a[10], a[14], a[18], a[3], a[7], a[11], a[15], a[19]].join(" "); }; - return b; + return c; }(); - m.ColorMatrix = w; - })(g.GFX || (g.GFX = {})); + r.ColorMatrix = c; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - function c(a, b) { - return-1 !== a.indexOf(b, this.length - b.length); +(function(l) { + (function(r) { + (function(g) { + function c(a, c) { + return-1 !== a.indexOf(c, this.length - c.length); } - var w = m.Geometry.Point3D, k = m.Geometry.Matrix3D, b = m.Geometry.degreesToRadian, a = g.Debug.assert, n = g.Debug.unexpected, p = g.Debug.notImplemented; - e.SHADER_ROOT = "shaders/"; - var y = function() { - function v(b, c) { - this._fillColor = g.Color.Red; - this._surfaceRegionCache = new g.LRUList; - this.modelViewProjectionMatrix = k.createIdentity(); - this._canvas = b; + var t = r.Geometry.Point3D, m = r.Geometry.Matrix3D, a = r.Geometry.degreesToRadian, h = l.Debug.unexpected, p = l.Debug.notImplemented; + g.SHADER_ROOT = "shaders/"; + var k = function() { + function k(a, c) { + this._fillColor = l.Color.Red; + this._surfaceRegionCache = new l.LRUList; + this.modelViewProjectionMatrix = m.createIdentity(); + this._canvas = a; this._options = c; - this.gl = b.getContext("experimental-webgl", {preserveDrawingBuffer:!1, antialias:!0, stencil:!0, premultipliedAlpha:!1}); - a(this.gl, "Cannot create WebGL context."); + this.gl = a.getContext("experimental-webgl", {preserveDrawingBuffer:!1, antialias:!0, stencil:!0, premultipliedAlpha:!1}); this._programCache = Object.create(null); this._resize(); this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, c.unpackPremultiplyAlpha ? this.gl.ONE : this.gl.ZERO); - this._backgroundColor = g.Color.Black; - this._geometry = new e.WebGLGeometry(this); - this._tmpVertices = e.Vertex.createEmptyVertices(e.Vertex, 64); + this._backgroundColor = l.Color.Black; + this._geometry = new g.WebGLGeometry(this); + this._tmpVertices = g.Vertex.createEmptyVertices(g.Vertex, 64); this._maxSurfaces = c.maxSurfaces; this._maxSurfaceSize = c.maxSurfaceSize; this.gl.blendFunc(this.gl.ONE, this.gl.ONE_MINUS_SRC_ALPHA); this.gl.enable(this.gl.BLEND); - this.modelViewProjectionMatrix = k.create2DProjection(this._w, this._h, 2E3); - var n = this; - this._surfaceRegionAllocator = new m.SurfaceRegionAllocator.SimpleAllocator(function() { - var a = n._createTexture(); - return new e.WebGLSurface(1024, 1024, a); + this.modelViewProjectionMatrix = m.create2DProjection(this._w, this._h, 2E3); + var h = this; + this._surfaceRegionAllocator = new r.SurfaceRegionAllocator.SimpleAllocator(function() { + var a = h._createTexture(); + return new g.WebGLSurface(1024, 1024, a); }); } - Object.defineProperty(v.prototype, "surfaces", {get:function() { + Object.defineProperty(k.prototype, "surfaces", {get:function() { return this._surfaceRegionAllocator.surfaces; }, enumerable:!0, configurable:!0}); - Object.defineProperty(v.prototype, "fillStyle", {set:function(a) { - this._fillColor.set(g.Color.parseColor(a)); + Object.defineProperty(k.prototype, "fillStyle", {set:function(a) { + this._fillColor.set(l.Color.parseColor(a)); }, enumerable:!0, configurable:!0}); - v.prototype.setBlendMode = function(a) { - var b = this.gl; + k.prototype.setBlendMode = function(a) { + var c = this.gl; switch(a) { case 8: - b.blendFunc(b.SRC_ALPHA, b.DST_ALPHA); + c.blendFunc(c.SRC_ALPHA, c.DST_ALPHA); break; case 3: - b.blendFunc(b.DST_COLOR, b.ONE_MINUS_SRC_ALPHA); + c.blendFunc(c.DST_COLOR, c.ONE_MINUS_SRC_ALPHA); break; case 4: - b.blendFunc(b.SRC_ALPHA, b.ONE); + c.blendFunc(c.SRC_ALPHA, c.ONE); break; case 2: ; case 1: - b.blendFunc(b.ONE, b.ONE_MINUS_SRC_ALPHA); + c.blendFunc(c.ONE, c.ONE_MINUS_SRC_ALPHA); break; default: p("Blend Mode: " + a); } }; - v.prototype.setBlendOptions = function() { + k.prototype.setBlendOptions = function() { this.gl.blendFunc(this._options.sourceBlendFactor, this._options.destinationBlendFactor); }; - v.glSupportedBlendMode = function(a) { + k.glSupportedBlendMode = function(a) { switch(a) { case 8: ; @@ -9977,151 +10299,150 @@ __extends = this.__extends || function(g, m) { return!1; } }; - v.prototype.create2DProjectionMatrix = function() { - return k.create2DProjection(this._w, this._h, -this._w); + k.prototype.create2DProjectionMatrix = function() { + return m.create2DProjection(this._w, this._h, -this._w); }; - v.prototype.createPerspectiveMatrix = function(a, c, e) { - e = b(e); - c = k.createPerspective(b(c)); - var g = new w(0, 1, 0), h = new w(0, 0, 0); - a = new w(0, 0, a); - a = k.createCameraLookAt(a, h, g); - a = k.createInverse(a); - g = k.createIdentity(); - g = k.createMultiply(g, k.createTranslation(-this._w / 2, -this._h / 2)); - g = k.createMultiply(g, k.createScale(1 / this._w, -1 / this._h, .01)); - g = k.createMultiply(g, k.createYRotation(e)); - g = k.createMultiply(g, a); - return g = k.createMultiply(g, c); + k.prototype.createPerspectiveMatrix = function(c, h, g) { + g = a(g); + h = m.createPerspective(a(h)); + var d = new t(0, 1, 0), e = new t(0, 0, 0); + c = new t(0, 0, c); + c = m.createCameraLookAt(c, e, d); + c = m.createInverse(c); + d = m.createIdentity(); + d = m.createMultiply(d, m.createTranslation(-this._w / 2, -this._h / 2)); + d = m.createMultiply(d, m.createScale(1 / this._w, -1 / this._h, .01)); + d = m.createMultiply(d, m.createYRotation(g)); + d = m.createMultiply(d, c); + return d = m.createMultiply(d, h); }; - v.prototype.discardCachedImages = function() { - 2 <= m.traceLevel && m.writer && m.writer.writeLn("Discard Cache"); - for (var a = this._surfaceRegionCache.count / 2 | 0, b = 0;b < a;b++) { - var c = this._surfaceRegionCache.pop(); - 2 <= m.traceLevel && m.writer && m.writer.writeLn("Discard: " + c); - c.texture.atlas.remove(c.region); - c.texture = null; + k.prototype.discardCachedImages = function() { + 2 <= r.traceLevel && r.writer && r.writer.writeLn("Discard Cache"); + for (var a = this._surfaceRegionCache.count / 2 | 0, c = 0;c < a;c++) { + var h = this._surfaceRegionCache.pop(); + 2 <= r.traceLevel && r.writer && r.writer.writeLn("Discard: " + h); + h.texture.atlas.remove(h.region); + h.texture = null; } }; - v.prototype.cacheImage = function(a) { - var b = this.allocateSurfaceRegion(a.width, a.height); - 2 <= m.traceLevel && m.writer && m.writer.writeLn("Uploading Image: @ " + b.region); - this._surfaceRegionCache.use(b); - this.updateSurfaceRegion(a, b); - return b; + k.prototype.cacheImage = function(a) { + var c = this.allocateSurfaceRegion(a.width, a.height); + 2 <= r.traceLevel && r.writer && r.writer.writeLn("Uploading Image: @ " + c.region); + this._surfaceRegionCache.use(c); + this.updateSurfaceRegion(a, c); + return c; }; - v.prototype.allocateSurfaceRegion = function(a, b) { - return this._surfaceRegionAllocator.allocate(a, b); + k.prototype.allocateSurfaceRegion = function(a, c) { + return this._surfaceRegionAllocator.allocate(a, c, null); }; - v.prototype.updateSurfaceRegion = function(a, b) { - var c = this.gl; - c.bindTexture(c.TEXTURE_2D, b.surface.texture); - c.texSubImage2D(c.TEXTURE_2D, 0, b.region.x, b.region.y, c.RGBA, c.UNSIGNED_BYTE, a); + k.prototype.updateSurfaceRegion = function(a, c) { + var h = this.gl; + h.bindTexture(h.TEXTURE_2D, c.surface.texture); + h.texSubImage2D(h.TEXTURE_2D, 0, c.region.x, c.region.y, h.RGBA, h.UNSIGNED_BYTE, a); }; - v.prototype._resize = function() { + k.prototype._resize = function() { var a = this.gl; this._w = this._canvas.width; this._h = this._canvas.height; a.viewport(0, 0, this._w, this._h); - for (var b in this._programCache) { - this._initializeProgram(this._programCache[b]); + for (var c in this._programCache) { + this._initializeProgram(this._programCache[c]); } }; - v.prototype._initializeProgram = function(a) { + k.prototype._initializeProgram = function(a) { this.gl.useProgram(a); }; - v.prototype._createShaderFromFile = function(b) { - var g = e.SHADER_ROOT + b, k = this.gl; - b = new XMLHttpRequest; - b.open("GET", g, !1); - b.send(); - a(200 === b.status || 0 === b.status, "File : " + g + " not found."); - if (c(g, ".vert")) { - g = k.VERTEX_SHADER; + k.prototype._createShaderFromFile = function(a) { + var h = g.SHADER_ROOT + a, k = this.gl; + a = new XMLHttpRequest; + a.open("GET", h, !1); + a.send(); + if (c(h, ".vert")) { + h = k.VERTEX_SHADER; } else { - if (c(g, ".frag")) { - g = k.FRAGMENT_SHADER; + if (c(h, ".frag")) { + h = k.FRAGMENT_SHADER; } else { throw "Shader Type: not supported."; } } - return this._createShader(g, b.responseText); + return this._createShader(h, a.responseText); }; - v.prototype.createProgramFromFiles = function() { + k.prototype.createProgramFromFiles = function() { var a = this._programCache["combined.vert-combined.frag"]; a || (a = this._createProgram([this._createShaderFromFile("combined.vert"), this._createShaderFromFile("combined.frag")]), this._queryProgramAttributesAndUniforms(a), this._initializeProgram(a), this._programCache["combined.vert-combined.frag"] = a); return a; }; - v.prototype._createProgram = function(a) { - var b = this.gl, c = b.createProgram(); + k.prototype._createProgram = function(a) { + var c = this.gl, g = c.createProgram(); a.forEach(function(a) { - b.attachShader(c, a); + c.attachShader(g, a); }); - b.linkProgram(c); - b.getProgramParameter(c, b.LINK_STATUS) || (n("Cannot link program: " + b.getProgramInfoLog(c)), b.deleteProgram(c)); - return c; + c.linkProgram(g); + c.getProgramParameter(g, c.LINK_STATUS) || (h("Cannot link program: " + c.getProgramInfoLog(g)), c.deleteProgram(g)); + return g; }; - v.prototype._createShader = function(a, b) { - var c = this.gl, e = c.createShader(a); - c.shaderSource(e, b); - c.compileShader(e); - return c.getShaderParameter(e, c.COMPILE_STATUS) ? e : (n("Cannot compile shader: " + c.getShaderInfoLog(e)), c.deleteShader(e), null); + k.prototype._createShader = function(a, c) { + var g = this.gl, d = g.createShader(a); + g.shaderSource(d, c); + g.compileShader(d); + return g.getShaderParameter(d, g.COMPILE_STATUS) ? d : (h("Cannot compile shader: " + g.getShaderInfoLog(d)), g.deleteShader(d), null); }; - v.prototype._createTexture = function() { - var a = this.gl, b = a.createTexture(); - a.bindTexture(a.TEXTURE_2D, b); + k.prototype._createTexture = function() { + var a = this.gl, c = a.createTexture(); + a.bindTexture(a.TEXTURE_2D, c); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR); a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, 1024, 1024, 0, a.RGBA, a.UNSIGNED_BYTE, null); - return b; - }; - v.prototype._createFramebuffer = function(a) { - var b = this.gl, c = b.createFramebuffer(); - b.bindFramebuffer(b.FRAMEBUFFER, c); - b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, a, 0); - b.bindFramebuffer(b.FRAMEBUFFER, null); return c; }; - v.prototype._queryProgramAttributesAndUniforms = function(a) { + k.prototype._createFramebuffer = function(a) { + var c = this.gl, h = c.createFramebuffer(); + c.bindFramebuffer(c.FRAMEBUFFER, h); + c.framebufferTexture2D(c.FRAMEBUFFER, c.COLOR_ATTACHMENT0, c.TEXTURE_2D, a, 0); + c.bindFramebuffer(c.FRAMEBUFFER, null); + return h; + }; + k.prototype._queryProgramAttributesAndUniforms = function(a) { a.uniforms = {}; a.attributes = {}; - for (var b = this.gl, c = 0, e = b.getProgramParameter(a, b.ACTIVE_ATTRIBUTES);c < e;c++) { - var h = b.getActiveAttrib(a, c); - a.attributes[h.name] = h; - h.location = b.getAttribLocation(a, h.name); + for (var c = this.gl, h = 0, d = c.getProgramParameter(a, c.ACTIVE_ATTRIBUTES);h < d;h++) { + var e = c.getActiveAttrib(a, h); + a.attributes[e.name] = e; + e.location = c.getAttribLocation(a, e.name); } - c = 0; - for (e = b.getProgramParameter(a, b.ACTIVE_UNIFORMS);c < e;c++) { - h = b.getActiveUniform(a, c), a.uniforms[h.name] = h, h.location = b.getUniformLocation(a, h.name); + h = 0; + for (d = c.getProgramParameter(a, c.ACTIVE_UNIFORMS);h < d;h++) { + e = c.getActiveUniform(a, h), a.uniforms[e.name] = e, e.location = c.getUniformLocation(a, e.name); } }; - Object.defineProperty(v.prototype, "target", {set:function(a) { - var b = this.gl; - a ? (b.viewport(0, 0, a.w, a.h), b.bindFramebuffer(b.FRAMEBUFFER, a.framebuffer)) : (b.viewport(0, 0, this._w, this._h), b.bindFramebuffer(b.FRAMEBUFFER, null)); + Object.defineProperty(k.prototype, "target", {set:function(a) { + var c = this.gl; + a ? (c.viewport(0, 0, a.w, a.h), c.bindFramebuffer(c.FRAMEBUFFER, a.framebuffer)) : (c.viewport(0, 0, this._w, this._h), c.bindFramebuffer(c.FRAMEBUFFER, null)); }, enumerable:!0, configurable:!0}); - v.prototype.clear = function(a) { + k.prototype.clear = function(a) { a = this.gl; a.clearColor(0, 0, 0, 0); a.clear(a.COLOR_BUFFER_BIT); }; - v.prototype.clearTextureRegion = function(a, b) { - void 0 === b && (b = g.Color.None); - var c = this.gl, e = a.region; + k.prototype.clearTextureRegion = function(a, c) { + void 0 === c && (c = l.Color.None); + var h = this.gl, d = a.region; this.target = a.surface; - c.enable(c.SCISSOR_TEST); - c.scissor(e.x, e.y, e.w, e.h); - c.clearColor(b.r, b.g, b.b, b.a); - c.clear(c.COLOR_BUFFER_BIT | c.DEPTH_BUFFER_BIT); - c.disable(c.SCISSOR_TEST); + h.enable(h.SCISSOR_TEST); + h.scissor(d.x, d.y, d.w, d.h); + h.clearColor(c.r, c.g, c.b, c.a); + h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT); + h.disable(h.SCISSOR_TEST); }; - v.prototype.sizeOf = function(a) { - var b = this.gl; + k.prototype.sizeOf = function(a) { + var c = this.gl; switch(a) { - case b.UNSIGNED_BYTE: + case c.UNSIGNED_BYTE: return 1; - case b.UNSIGNED_SHORT: + case c.UNSIGNED_SHORT: return 2; case this.gl.INT: ; @@ -10131,235 +10452,235 @@ __extends = this.__extends || function(g, m) { p(a); } }; - v.MAX_SURFACES = 8; - return v; + k.MAX_SURFACES = 8; + return k; }(); - e.WebGLContext = y; - })(m.WebGL || (m.WebGL = {})); - })(g.GFX || (g.GFX = {})); + g.WebGLContext = k; + })(r.WebGL || (r.WebGL = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(g, m) { - function e() { - this.constructor = g; +__extends = this.__extends || function(l, r) { + function g() { + this.constructor = l; } - for (var c in m) { - m.hasOwnProperty(c) && (g[c] = m[c]); + for (var c in r) { + r.hasOwnProperty(c) && (l[c] = r[c]); } - e.prototype = m.prototype; - g.prototype = new e; + g.prototype = r.prototype; + l.prototype = new g; }; -(function(g) { - (function(m) { - (function(e) { - var c = g.Debug.assert, w = function(b) { - function a() { - b.apply(this, arguments); +(function(l) { + (function(r) { + (function(g) { + var c = l.Debug.assert, t = function(a) { + function h() { + a.apply(this, arguments); } - __extends(a, b); - a.prototype.ensureVertexCapacity = function(a) { + __extends(h, a); + h.prototype.ensureVertexCapacity = function(a) { c(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 8 * a); }; - a.prototype.writeVertex = function(a, b) { + h.prototype.writeVertex = function(a, h) { c(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 8); - this.writeVertexUnsafe(a, b); + this.writeVertexUnsafe(a, h); }; - a.prototype.writeVertexUnsafe = function(a, b) { - var c = this._offset >> 2; - this._f32[c] = a; - this._f32[c + 1] = b; + h.prototype.writeVertexUnsafe = function(a, c) { + var h = this._offset >> 2; + this._f32[h] = a; + this._f32[h + 1] = c; this._offset += 8; }; - a.prototype.writeVertex3D = function(a, b, e) { + h.prototype.writeVertex3D = function(a, h, g) { c(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 12); - this.writeVertex3DUnsafe(a, b, e); + this.writeVertex3DUnsafe(a, h, g); }; - a.prototype.writeVertex3DUnsafe = function(a, b, c) { - var e = this._offset >> 2; - this._f32[e] = a; - this._f32[e + 1] = b; - this._f32[e + 2] = c; + h.prototype.writeVertex3DUnsafe = function(a, c, h) { + var g = this._offset >> 2; + this._f32[g] = a; + this._f32[g + 1] = c; + this._f32[g + 2] = h; this._offset += 12; }; - a.prototype.writeTriangleElements = function(a, b, e) { + h.prototype.writeTriangleElements = function(a, h, g) { c(0 === (this._offset & 1)); this.ensureCapacity(this._offset + 6); - var g = this._offset >> 1; - this._u16[g] = a; - this._u16[g + 1] = b; - this._u16[g + 2] = e; + var n = this._offset >> 1; + this._u16[n] = a; + this._u16[n + 1] = h; + this._u16[n + 2] = g; this._offset += 6; }; - a.prototype.ensureColorCapacity = function(a) { + h.prototype.ensureColorCapacity = function(a) { c(0 === (this._offset & 2)); this.ensureCapacity(this._offset + 16 * a); }; - a.prototype.writeColorFloats = function(a, b, e, g) { + h.prototype.writeColorFloats = function(a, h, g, n) { c(0 === (this._offset & 2)); this.ensureCapacity(this._offset + 16); - this.writeColorFloatsUnsafe(a, b, e, g); + this.writeColorFloatsUnsafe(a, h, g, n); }; - a.prototype.writeColorFloatsUnsafe = function(a, b, c, e) { - var g = this._offset >> 2; - this._f32[g] = a; - this._f32[g + 1] = b; - this._f32[g + 2] = c; - this._f32[g + 3] = e; + h.prototype.writeColorFloatsUnsafe = function(a, c, h, g) { + var m = this._offset >> 2; + this._f32[m] = a; + this._f32[m + 1] = c; + this._f32[m + 2] = h; + this._f32[m + 3] = g; this._offset += 16; }; - a.prototype.writeColor = function() { - var a = Math.random(), b = Math.random(), e = Math.random(), g = Math.random() / 2; + h.prototype.writeColor = function() { + var a = Math.random(), h = Math.random(), g = Math.random(), n = Math.random() / 2; c(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 4); - this._i32[this._offset >> 2] = g << 24 | e << 16 | b << 8 | a; + this._i32[this._offset >> 2] = n << 24 | g << 16 | h << 8 | a; this._offset += 4; }; - a.prototype.writeColorUnsafe = function(a, b, c, e) { - this._i32[this._offset >> 2] = e << 24 | c << 16 | b << 8 | a; + h.prototype.writeColorUnsafe = function(a, c, h, g) { + this._i32[this._offset >> 2] = g << 24 | h << 16 | c << 8 | a; this._offset += 4; }; - a.prototype.writeRandomColor = function() { + h.prototype.writeRandomColor = function() { this.writeColor(); }; - return a; - }(g.ArrayUtilities.ArrayWriter); - e.BufferWriter = w; - e.WebGLAttribute = function() { - return function(b, a, c, e) { - void 0 === e && (e = !1); - this.name = b; - this.size = a; - this.type = c; - this.normalized = e; + return h; + }(l.ArrayUtilities.ArrayWriter); + g.BufferWriter = t; + g.WebGLAttribute = function() { + return function(a, c, g, k) { + void 0 === k && (k = !1); + this.name = a; + this.size = c; + this.type = g; + this.normalized = k; }; }(); - var k = function() { - function b(a) { + var m = function() { + function a(a) { this.size = 0; this.attributes = a; } - b.prototype.initialize = function(a) { - for (var b = 0, c = 0;c < this.attributes.length;c++) { - this.attributes[c].offset = b, b += a.sizeOf(this.attributes[c].type) * this.attributes[c].size; + a.prototype.initialize = function(a) { + for (var c = 0, g = 0;g < this.attributes.length;g++) { + this.attributes[g].offset = c, c += a.sizeOf(this.attributes[g].type) * this.attributes[g].size; } - this.size = b; + this.size = c; }; - return b; + return a; }(); - e.WebGLAttributeList = k; - k = function() { - function b(a) { + g.WebGLAttributeList = m; + m = function() { + function a(a) { this._elementOffset = this.triangleCount = 0; this.context = a; - this.array = new w(8); + this.array = new t(8); this.buffer = a.gl.createBuffer(); - this.elementArray = new w(8); + this.elementArray = new t(8); this.elementBuffer = a.gl.createBuffer(); } - Object.defineProperty(b.prototype, "elementOffset", {get:function() { + Object.defineProperty(a.prototype, "elementOffset", {get:function() { return this._elementOffset; }, enumerable:!0, configurable:!0}); - b.prototype.addQuad = function() { + a.prototype.addQuad = function() { var a = this._elementOffset; this.elementArray.writeTriangleElements(a, a + 1, a + 2); this.elementArray.writeTriangleElements(a, a + 2, a + 3); this.triangleCount += 2; this._elementOffset += 4; }; - b.prototype.resetElementOffset = function() { + a.prototype.resetElementOffset = function() { this._elementOffset = 0; }; - b.prototype.reset = function() { + a.prototype.reset = function() { this.array.reset(); this.elementArray.reset(); this.resetElementOffset(); this.triangleCount = 0; }; - b.prototype.uploadBuffers = function() { + a.prototype.uploadBuffers = function() { var a = this.context.gl; a.bindBuffer(a.ARRAY_BUFFER, this.buffer); a.bufferData(a.ARRAY_BUFFER, this.array.subU8View(), a.DYNAMIC_DRAW); a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.elementBuffer); a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.elementArray.subU8View(), a.DYNAMIC_DRAW); }; - return b; - }(); - e.WebGLGeometry = k; - k = function(b) { - function a(a, c, e) { - b.call(this, a, c, e); - } - __extends(a, b); - a.createEmptyVertices = function(a, b) { - for (var c = [], e = 0;e < b;e++) { - c.push(new a(0, 0, 0)); - } - return c; - }; return a; - }(m.Geometry.Point3D); - e.Vertex = k; - (function(b) { - b[b.ZERO = 0] = "ZERO"; - b[b.ONE = 1] = "ONE"; - b[b.SRC_COLOR = 768] = "SRC_COLOR"; - b[b.ONE_MINUS_SRC_COLOR = 769] = "ONE_MINUS_SRC_COLOR"; - b[b.DST_COLOR = 774] = "DST_COLOR"; - b[b.ONE_MINUS_DST_COLOR = 775] = "ONE_MINUS_DST_COLOR"; - b[b.SRC_ALPHA = 770] = "SRC_ALPHA"; - b[b.ONE_MINUS_SRC_ALPHA = 771] = "ONE_MINUS_SRC_ALPHA"; - b[b.DST_ALPHA = 772] = "DST_ALPHA"; - b[b.ONE_MINUS_DST_ALPHA = 773] = "ONE_MINUS_DST_ALPHA"; - b[b.SRC_ALPHA_SATURATE = 776] = "SRC_ALPHA_SATURATE"; - b[b.CONSTANT_COLOR = 32769] = "CONSTANT_COLOR"; - b[b.ONE_MINUS_CONSTANT_COLOR = 32770] = "ONE_MINUS_CONSTANT_COLOR"; - b[b.CONSTANT_ALPHA = 32771] = "CONSTANT_ALPHA"; - b[b.ONE_MINUS_CONSTANT_ALPHA = 32772] = "ONE_MINUS_CONSTANT_ALPHA"; - })(e.WebGLBlendFactor || (e.WebGLBlendFactor = {})); - })(m.WebGL || (m.WebGL = {})); - })(g.GFX || (g.GFX = {})); -})(Shumway || (Shumway = {})); -(function(g) { - (function(g) { - (function(e) { - var c = function() { - function c(b, a, e) { - this.texture = e; - this.w = b; - this.h = a; - this._regionAllocator = new g.RegionAllocator.CompactAllocator(this.w, this.h); + }(); + g.WebGLGeometry = m; + m = function(a) { + function c(h, g, m) { + a.call(this, h, g, m); } - c.prototype.allocate = function(b, a) { - var c = this._regionAllocator.allocate(b, a); - return c ? new w(this, c) : null; + __extends(c, a); + c.createEmptyVertices = function(a, c) { + for (var h = [], g = 0;g < c;g++) { + h.push(new a(0, 0, 0)); + } + return h; }; - c.prototype.free = function(b) { - this._regionAllocator.free(b.region); + return c; + }(r.Geometry.Point3D); + g.Vertex = m; + (function(a) { + a[a.ZERO = 0] = "ZERO"; + a[a.ONE = 1] = "ONE"; + a[a.SRC_COLOR = 768] = "SRC_COLOR"; + a[a.ONE_MINUS_SRC_COLOR = 769] = "ONE_MINUS_SRC_COLOR"; + a[a.DST_COLOR = 774] = "DST_COLOR"; + a[a.ONE_MINUS_DST_COLOR = 775] = "ONE_MINUS_DST_COLOR"; + a[a.SRC_ALPHA = 770] = "SRC_ALPHA"; + a[a.ONE_MINUS_SRC_ALPHA = 771] = "ONE_MINUS_SRC_ALPHA"; + a[a.DST_ALPHA = 772] = "DST_ALPHA"; + a[a.ONE_MINUS_DST_ALPHA = 773] = "ONE_MINUS_DST_ALPHA"; + a[a.SRC_ALPHA_SATURATE = 776] = "SRC_ALPHA_SATURATE"; + a[a.CONSTANT_COLOR = 32769] = "CONSTANT_COLOR"; + a[a.ONE_MINUS_CONSTANT_COLOR = 32770] = "ONE_MINUS_CONSTANT_COLOR"; + a[a.CONSTANT_ALPHA = 32771] = "CONSTANT_ALPHA"; + a[a.ONE_MINUS_CONSTANT_ALPHA = 32772] = "ONE_MINUS_CONSTANT_ALPHA"; + })(g.WebGLBlendFactor || (g.WebGLBlendFactor = {})); + })(r.WebGL || (r.WebGL = {})); + })(l.GFX || (l.GFX = {})); +})(Shumway || (Shumway = {})); +(function(l) { + (function(l) { + (function(g) { + var c = function() { + function c(a, h, g) { + this.texture = g; + this.w = a; + this.h = h; + this._regionAllocator = new l.RegionAllocator.CompactAllocator(this.w, this.h); + } + c.prototype.allocate = function(a, c) { + var g = this._regionAllocator.allocate(a, c); + return g ? new t(this, g) : null; + }; + c.prototype.free = function(a) { + this._regionAllocator.free(a.region); }; return c; }(); - e.WebGLSurface = c; - var w = function() { - return function(c, b) { + g.WebGLSurface = c; + var t = function() { + return function(c, a) { this.surface = c; - this.region = b; + this.region = a; this.next = this.previous = null; }; }(); - e.WebGLSurfaceRegion = w; - })(g.WebGL || (g.WebGL = {})); - })(g.GFX || (g.GFX = {})); + g.WebGLSurfaceRegion = t; + })(l.WebGL || (l.WebGL = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.Color; - e.TILE_SIZE = 256; - e.MIN_UNTILED_SIZE = 256; - var w = m.Geometry.Matrix, k = m.Geometry.Rectangle, b = function(a) { - function b() { +(function(l) { + (function(r) { + (function(g) { + var c = l.Color; + g.TILE_SIZE = 256; + g.MIN_UNTILED_SIZE = 256; + var t = r.Geometry.Matrix, m = r.Geometry.Rectangle, a = function(a) { + function c() { a.apply(this, arguments); this.maxSurfaces = 8; this.maxSurfaceSize = 4096; @@ -10374,20 +10695,20 @@ __extends = this.__extends || function(g, m) { this.sourceBlendFactor = 1; this.destinationBlendFactor = 771; } - __extends(b, a); - return b; - }(m.RendererOptions); - e.WebGLRendererOptions = b; - var a = function(a) { - function g(c, k, l) { - void 0 === l && (l = new b); - a.call(this, c, k, l); - this._tmpVertices = e.Vertex.createEmptyVertices(e.Vertex, 64); + __extends(c, a); + return c; + }(r.RendererOptions); + g.WebGLRendererOptions = a; + var h = function(h) { + function k(c, n, k) { + void 0 === k && (k = new a); + h.call(this, c, n, k); + this._tmpVertices = g.Vertex.createEmptyVertices(g.Vertex, 64); this._cachedTiles = []; - c = this._context = new e.WebGLContext(this._canvas, l); + c = this._context = new g.WebGLContext(this._canvas, k); this._updateSize(); - this._brush = new e.WebGLCombinedBrush(c, new e.WebGLGeometry(c)); - this._stencilBrush = new e.WebGLCombinedBrush(c, new e.WebGLGeometry(c)); + this._brush = new g.WebGLCombinedBrush(c, new g.WebGLGeometry(c)); + this._stencilBrush = new g.WebGLCombinedBrush(c, new g.WebGLGeometry(c)); this._scratchCanvas = document.createElement("canvas"); this._scratchCanvas.width = this._scratchCanvas.height = 2048; this._scratchCanvasContext = this._scratchCanvas.getContext("2d", {willReadFrequently:!0}); @@ -10397,105 +10718,103 @@ __extends = this.__extends || function(g, m) { this._uploadCanvas = document.createElement("canvas"); this._uploadCanvas.width = this._uploadCanvas.height = 0; this._uploadCanvasContext = this._uploadCanvas.getContext("2d", {willReadFrequently:!0}); - l.showTemporaryCanvases && (document.getElementById("temporaryCanvasPanelContainer").appendChild(this._uploadCanvas), document.getElementById("temporaryCanvasPanelContainer").appendChild(this._scratchCanvas)); + k.showTemporaryCanvases && (document.getElementById("temporaryCanvasPanelContainer").appendChild(this._uploadCanvas), document.getElementById("temporaryCanvasPanelContainer").appendChild(this._scratchCanvas)); this._clipStack = []; } - __extends(g, a); - g.prototype.resize = function() { + __extends(k, h); + k.prototype.resize = function() { this._updateSize(); this.render(); }; - g.prototype._updateSize = function() { - this._viewport = new k(0, 0, this._canvas.width, this._canvas.height); + k.prototype._updateSize = function() { + this._viewport = new m(0, 0, this._canvas.width, this._canvas.height); this._context._resize(); }; - g.prototype._cacheImageCallback = function(a, b, c) { - var e = c.w, g = c.h, k = c.x; - c = c.y; - this._uploadCanvas.width = e + 2; - this._uploadCanvas.height = g + 2; - this._uploadCanvasContext.drawImage(b.canvas, k, c, e, g, 1, 1, e, g); - this._uploadCanvasContext.drawImage(b.canvas, k, c, e, 1, 1, 0, e, 1); - this._uploadCanvasContext.drawImage(b.canvas, k, c + g - 1, e, 1, 1, g + 1, e, 1); - this._uploadCanvasContext.drawImage(b.canvas, k, c, 1, g, 0, 1, 1, g); - this._uploadCanvasContext.drawImage(b.canvas, k + e - 1, c, 1, g, e + 1, 1, 1, g); + k.prototype._cacheImageCallback = function(a, c, h) { + var g = h.w, d = h.h, e = h.x; + h = h.y; + this._uploadCanvas.width = g + 2; + this._uploadCanvas.height = d + 2; + this._uploadCanvasContext.drawImage(c.canvas, e, h, g, d, 1, 1, g, d); + this._uploadCanvasContext.drawImage(c.canvas, e, h, g, 1, 1, 0, g, 1); + this._uploadCanvasContext.drawImage(c.canvas, e, h + d - 1, g, 1, 1, d + 1, g, 1); + this._uploadCanvasContext.drawImage(c.canvas, e, h, 1, d, 0, 1, 1, d); + this._uploadCanvasContext.drawImage(c.canvas, e + g - 1, h, 1, d, g + 1, 1, 1, d); return a && a.surface ? (this._options.disableSurfaceUploads || this._context.updateSurfaceRegion(this._uploadCanvas, a), a) : this._context.cacheImage(this._uploadCanvas); }; - g.prototype._enterClip = function(a, b, c, e) { - c.flush(); - b = this._context.gl; - 0 === this._clipStack.length && (b.enable(b.STENCIL_TEST), b.clear(b.STENCIL_BUFFER_BIT), b.stencilFunc(b.ALWAYS, 1, 1)); + k.prototype._enterClip = function(a, c, h, g) { + h.flush(); + c = this._context.gl; + 0 === this._clipStack.length && (c.enable(c.STENCIL_TEST), c.clear(c.STENCIL_BUFFER_BIT), c.stencilFunc(c.ALWAYS, 1, 1)); this._clipStack.push(a); - b.colorMask(!1, !1, !1, !1); - b.stencilOp(b.KEEP, b.KEEP, b.INCR); - c.flush(); - b.colorMask(!0, !0, !0, !0); - b.stencilFunc(b.NOTEQUAL, 0, this._clipStack.length); - b.stencilOp(b.KEEP, b.KEEP, b.KEEP); + c.colorMask(!1, !1, !1, !1); + c.stencilOp(c.KEEP, c.KEEP, c.INCR); + h.flush(); + c.colorMask(!0, !0, !0, !0); + c.stencilFunc(c.NOTEQUAL, 0, this._clipStack.length); + c.stencilOp(c.KEEP, c.KEEP, c.KEEP); }; - g.prototype._leaveClip = function(a, b, c, e) { - c.flush(); - b = this._context.gl; + k.prototype._leaveClip = function(a, c, h, g) { + h.flush(); + c = this._context.gl; if (a = this._clipStack.pop()) { - b.colorMask(!1, !1, !1, !1), b.stencilOp(b.KEEP, b.KEEP, b.DECR), c.flush(), b.colorMask(!0, !0, !0, !0), b.stencilFunc(b.NOTEQUAL, 0, this._clipStack.length), b.stencilOp(b.KEEP, b.KEEP, b.KEEP); + c.colorMask(!1, !1, !1, !1), c.stencilOp(c.KEEP, c.KEEP, c.DECR), h.flush(), c.colorMask(!0, !0, !0, !0), c.stencilFunc(c.NOTEQUAL, 0, this._clipStack.length), c.stencilOp(c.KEEP, c.KEEP, c.KEEP); } - 0 === this._clipStack.length && b.disable(b.STENCIL_TEST); + 0 === this._clipStack.length && c.disable(c.STENCIL_TEST); }; - g.prototype._renderFrame = function(a, b, c, e) { + k.prototype._renderFrame = function(a, c, h, g) { }; - g.prototype._renderSurfaces = function(a) { - var b = this._options, g = this._context, n = this._viewport; - if (b.drawSurfaces) { - var p = g.surfaces, g = w.createIdentity(); - if (0 <= b.drawSurface && b.drawSurface < p.length) { - for (var b = p[b.drawSurface | 0], p = new k(0, 0, b.w, b.h), m = p.clone();m.w > n.w;) { - m.scale(.5, .5); + k.prototype._renderSurfaces = function(a) { + var h = this._options, k = this._context, l = this._viewport; + if (h.drawSurfaces) { + var d = k.surfaces, k = t.createIdentity(); + if (0 <= h.drawSurface && h.drawSurface < d.length) { + for (var h = d[h.drawSurface | 0], d = new m(0, 0, h.w, h.h), e = d.clone();e.w > l.w;) { + e.scale(.5, .5); } - a.drawImage(new e.WebGLSurfaceRegion(b, p), m, c.White, null, g, .2); + a.drawImage(new g.WebGLSurfaceRegion(h, d), e, c.White, null, k, .2); } else { - m = n.w / 5; - m > n.h / p.length && (m = n.h / p.length); - a.fillRectangle(new k(n.w - m, 0, m, n.h), new c(0, 0, 0, .5), g, .1); - for (var h = 0;h < p.length;h++) { - var b = p[h], f = new k(n.w - m, h * m, m, m); - a.drawImage(new e.WebGLSurfaceRegion(b, new k(0, 0, b.w, b.h)), f, c.White, null, g, .2); + e = l.w / 5; + e > l.h / d.length && (e = l.h / d.length); + a.fillRectangle(new m(l.w - e, 0, e, l.h), new c(0, 0, 0, .5), k, .1); + for (var b = 0;b < d.length;b++) { + var h = d[b], f = new m(l.w - e, b * e, e, e); + a.drawImage(new g.WebGLSurfaceRegion(h, new m(0, 0, h.w, h.h)), f, c.White, null, k, .2); } } a.flush(); } }; - g.prototype.render = function() { - var a = this._options, b = this._context.gl; + k.prototype.render = function() { + var a = this._options, h = this._context.gl; this._context.modelViewProjectionMatrix = a.perspectiveCamera ? this._context.createPerspectiveMatrix(a.perspectiveCameraDistance + (a.animateZoom ? .8 * Math.sin(Date.now() / 3E3) : 0), a.perspectiveCameraFOV, a.perspectiveCameraAngle) : this._context.create2DProjectionMatrix(); - var e = this._brush; - b.clearColor(0, 0, 0, 0); - b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT); - e.reset(); - b = this._viewport; - e.flush(); - a.paintViewport && (e.fillRectangle(b, new c(.5, 0, 0, .25), w.createIdentity(), 0), e.flush()); - this._renderSurfaces(e); + var g = this._brush; + h.clearColor(0, 0, 0, 0); + h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT); + g.reset(); + h = this._viewport; + g.flush(); + a.paintViewport && (g.fillRectangle(h, new c(.5, 0, 0, .25), t.createIdentity(), 0), g.flush()); + this._renderSurfaces(g); }; - return g; - }(m.Renderer); - e.WebGLRenderer = a; - })(m.WebGL || (m.WebGL = {})); - })(g.GFX || (g.GFX = {})); + return k; + }(r.Renderer); + g.WebGLRenderer = h; + })(r.WebGL || (r.WebGL = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.Color, w = m.Geometry.Point, k = m.Geometry.Matrix3D, b = function() { - function a(b, c, e) { - this._target = e; - this._context = b; - this._geometry = c; +(function(l) { + (function(r) { + (function(g) { + var c = l.Color, t = r.Geometry.Point, m = r.Geometry.Matrix3D, a = function() { + function a(c, h, g) { + this._target = g; + this._context = c; + this._geometry = h; } a.prototype.reset = function() { - g.Debug.abstractMethod("reset"); }; a.prototype.flush = function() { - g.Debug.abstractMethod("flush"); }; Object.defineProperty(a.prototype, "target", {get:function() { return this._target; @@ -10505,26 +10824,26 @@ __extends = this.__extends || function(g, m) { }, enumerable:!0, configurable:!0}); return a; }(); - e.WebGLBrush = b; + g.WebGLBrush = a; (function(a) { a[a.FillColor = 0] = "FillColor"; a[a.FillTexture = 1] = "FillTexture"; a[a.FillTextureWithColorMatrix = 2] = "FillTextureWithColorMatrix"; - })(e.WebGLCombinedBrushKind || (e.WebGLCombinedBrushKind = {})); - var a = function(a) { - function b(e, g, k) { - a.call(this, e, g, k); + })(g.WebGLCombinedBrushKind || (g.WebGLCombinedBrushKind = {})); + var h = function(a) { + function h(g, k, l) { + a.call(this, g, k, l); this.kind = 0; this.color = new c(0, 0, 0, 0); this.sampler = 0; - this.coordinate = new w(0, 0); + this.coordinate = new t(0, 0); } - __extends(b, a); - b.initializeAttributeList = function(a) { + __extends(h, a); + h.initializeAttributeList = function(a) { var c = a.gl; - b.attributeList || (b.attributeList = new e.WebGLAttributeList([new e.WebGLAttribute("aPosition", 3, c.FLOAT), new e.WebGLAttribute("aCoordinate", 2, c.FLOAT), new e.WebGLAttribute("aColor", 4, c.UNSIGNED_BYTE, !0), new e.WebGLAttribute("aKind", 1, c.FLOAT), new e.WebGLAttribute("aSampler", 1, c.FLOAT)]), b.attributeList.initialize(a)); + h.attributeList || (h.attributeList = new g.WebGLAttributeList([new g.WebGLAttribute("aPosition", 3, c.FLOAT), new g.WebGLAttribute("aCoordinate", 2, c.FLOAT), new g.WebGLAttribute("aColor", 4, c.UNSIGNED_BYTE, !0), new g.WebGLAttribute("aKind", 1, c.FLOAT), new g.WebGLAttribute("aSampler", 1, c.FLOAT)]), h.attributeList.initialize(a)); }; - b.prototype.writeTo = function(a) { + h.prototype.writeTo = function(a) { a = a.array; a.ensureAdditionalCapacity(); a.writeVertex3DUnsafe(this.x, this.y, this.z); @@ -10533,134 +10852,107 @@ __extends = this.__extends || function(g, m) { a.writeFloatUnsafe(this.kind); a.writeFloatUnsafe(this.sampler); }; - return b; - }(e.Vertex); - e.WebGLCombinedBrushVertex = a; - b = function(b) { - function c(e, g, k) { - void 0 === k && (k = null); - b.call(this, e, g, k); + return h; + }(g.Vertex); + g.WebGLCombinedBrushVertex = h; + a = function(a) { + function c(g, k, l) { + void 0 === l && (l = null); + a.call(this, g, k, l); this._blendMode = 1; - this._program = e.createProgramFromFiles(); + this._program = g.createProgramFromFiles(); this._surfaces = []; - a.initializeAttributeList(this._context); + h.initializeAttributeList(this._context); } - __extends(c, b); + __extends(c, a); c.prototype.reset = function() { this._surfaces = []; this._geometry.reset(); }; - c.prototype.drawImage = function(a, b, e, g, k, n, h) { - void 0 === n && (n = 0); - void 0 === h && (h = 1); + c.prototype.drawImage = function(a, h, g, l, d, e, b) { + void 0 === e && (e = 0); + void 0 === b && (b = 1); if (!a || !a.surface) { return!0; } - b = b.clone(); - this._colorMatrix && (g && this._colorMatrix.equals(g) || this.flush()); - this._colorMatrix = g; - this._blendMode !== h && (this.flush(), this._blendMode = h); - h = this._surfaces.indexOf(a.surface); - 0 > h && (8 === this._surfaces.length && this.flush(), this._surfaces.push(a.surface), h = this._surfaces.length - 1); - var f = c._tmpVertices, d = a.region.clone(); - d.offset(1, 1).resize(-2, -2); - d.scale(1 / a.surface.w, 1 / a.surface.h); - k.transformRectangle(b, f); + h = h.clone(); + this._colorMatrix && (l && this._colorMatrix.equals(l) || this.flush()); + this._colorMatrix = l; + this._blendMode !== b && (this.flush(), this._blendMode = b); + b = this._surfaces.indexOf(a.surface); + 0 > b && (8 === this._surfaces.length && this.flush(), this._surfaces.push(a.surface), b = this._surfaces.length - 1); + var f = c._tmpVertices, q = a.region.clone(); + q.offset(1, 1).resize(-2, -2); + q.scale(1 / a.surface.w, 1 / a.surface.h); + d.transformRectangle(h, f); for (a = 0;4 > a;a++) { - f[a].z = n; + f[a].z = e; } - f[0].coordinate.x = d.x; - f[0].coordinate.y = d.y; - f[1].coordinate.x = d.x + d.w; - f[1].coordinate.y = d.y; - f[2].coordinate.x = d.x + d.w; - f[2].coordinate.y = d.y + d.h; - f[3].coordinate.x = d.x; - f[3].coordinate.y = d.y + d.h; + f[0].coordinate.x = q.x; + f[0].coordinate.y = q.y; + f[1].coordinate.x = q.x + q.w; + f[1].coordinate.y = q.y; + f[2].coordinate.x = q.x + q.w; + f[2].coordinate.y = q.y + q.h; + f[3].coordinate.x = q.x; + f[3].coordinate.y = q.y + q.h; for (a = 0;4 > a;a++) { - n = c._tmpVertices[a], n.kind = g ? 2 : 1, n.color.set(e), n.sampler = h, n.writeTo(this._geometry); + e = c._tmpVertices[a], e.kind = l ? 2 : 1, e.color.set(g), e.sampler = b, e.writeTo(this._geometry); } this._geometry.addQuad(); return!0; }; - c.prototype.fillRectangle = function(a, b, e, g) { - void 0 === g && (g = 0); - e.transformRectangle(a, c._tmpVertices); + c.prototype.fillRectangle = function(a, h, g, l) { + void 0 === l && (l = 0); + g.transformRectangle(a, c._tmpVertices); for (a = 0;4 > a;a++) { - e = c._tmpVertices[a], e.kind = 0, e.color.set(b), e.z = g, e.writeTo(this._geometry); + g = c._tmpVertices[a], g.kind = 0, g.color.set(h), g.z = l, g.writeTo(this._geometry); } this._geometry.addQuad(); }; c.prototype.flush = function() { - var b = this._geometry, c = this._program, e = this._context.gl, g; - b.uploadBuffers(); - e.useProgram(c); - this._target ? (g = k.create2DProjection(this._target.w, this._target.h, 2E3), g = k.createMultiply(g, k.createScale(1, -1, 1))) : g = this._context.modelViewProjectionMatrix; - e.uniformMatrix4fv(c.uniforms.uTransformMatrix3D.location, !1, g.asWebGLMatrix()); - this._colorMatrix && (e.uniformMatrix4fv(c.uniforms.uColorMatrix.location, !1, this._colorMatrix.asWebGLMatrix()), e.uniform4fv(c.uniforms.uColorVector.location, this._colorMatrix.asWebGLVector())); - for (g = 0;g < this._surfaces.length;g++) { - e.activeTexture(e.TEXTURE0 + g), e.bindTexture(e.TEXTURE_2D, this._surfaces[g].texture); + var a = this._geometry, c = this._program, g = this._context.gl, k; + a.uploadBuffers(); + g.useProgram(c); + this._target ? (k = m.create2DProjection(this._target.w, this._target.h, 2E3), k = m.createMultiply(k, m.createScale(1, -1, 1))) : k = this._context.modelViewProjectionMatrix; + g.uniformMatrix4fv(c.uniforms.uTransformMatrix3D.location, !1, k.asWebGLMatrix()); + this._colorMatrix && (g.uniformMatrix4fv(c.uniforms.uColorMatrix.location, !1, this._colorMatrix.asWebGLMatrix()), g.uniform4fv(c.uniforms.uColorVector.location, this._colorMatrix.asWebGLVector())); + for (k = 0;k < this._surfaces.length;k++) { + g.activeTexture(g.TEXTURE0 + k), g.bindTexture(g.TEXTURE_2D, this._surfaces[k].texture); } - e.uniform1iv(c.uniforms["uSampler[0]"].location, [0, 1, 2, 3, 4, 5, 6, 7]); - e.bindBuffer(e.ARRAY_BUFFER, b.buffer); - var n = a.attributeList.size, p = a.attributeList.attributes; - for (g = 0;g < p.length;g++) { - var h = p[g], f = c.attributes[h.name].location; - e.enableVertexAttribArray(f); - e.vertexAttribPointer(f, h.size, h.type, h.normalized, n, h.offset); + g.uniform1iv(c.uniforms["uSampler[0]"].location, [0, 1, 2, 3, 4, 5, 6, 7]); + g.bindBuffer(g.ARRAY_BUFFER, a.buffer); + var d = h.attributeList.size, e = h.attributeList.attributes; + for (k = 0;k < e.length;k++) { + var b = e[k], f = c.attributes[b.name].location; + g.enableVertexAttribArray(f); + g.vertexAttribPointer(f, b.size, b.type, b.normalized, d, b.offset); } this._context.setBlendOptions(); this._context.target = this._target; - e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, b.elementBuffer); - e.drawElements(e.TRIANGLES, 3 * b.triangleCount, e.UNSIGNED_SHORT, 0); + g.bindBuffer(g.ELEMENT_ARRAY_BUFFER, a.elementBuffer); + g.drawElements(g.TRIANGLES, 3 * a.triangleCount, g.UNSIGNED_SHORT, 0); this.reset(); }; - c._tmpVertices = e.Vertex.createEmptyVertices(a, 4); + c._tmpVertices = g.Vertex.createEmptyVertices(h, 4); c._depth = 1; return c; - }(b); - e.WebGLCombinedBrush = b; - })(m.WebGL || (m.WebGL = {})); - })(g.GFX || (g.GFX = {})); + }(a); + g.WebGLCombinedBrush = a; + })(r.WebGL || (r.WebGL = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - function c() { - void 0 === this.stackDepth && (this.stackDepth = 0); - void 0 === this.clipStack ? this.clipStack = [0] : this.clipStack.push(0); - this.stackDepth++; - y.call(this); - } - function w() { - this.stackDepth--; - this.clipStack.pop(); - r.call(this); - } - function k() { - p(!this.buildingClippingRegionDepth); - l.apply(this, arguments); - } - function b() { - p(m.debugClipping.value || !this.buildingClippingRegionDepth); - t.apply(this, arguments); - } - function a() { - u.call(this); - } - function n() { - void 0 === this.clipStack && (this.clipStack = [0]); - this.clipStack[this.clipStack.length - 1]++; - m.debugClipping.value ? (this.strokeStyle = g.ColorStyle.Pink, this.stroke.apply(this, arguments)) : v.apply(this, arguments); - } - var p = g.Debug.assert, y = CanvasRenderingContext2D.prototype.save, v = CanvasRenderingContext2D.prototype.clip, l = CanvasRenderingContext2D.prototype.fill, t = CanvasRenderingContext2D.prototype.stroke, r = CanvasRenderingContext2D.prototype.restore, u = CanvasRenderingContext2D.prototype.beginPath; - e.notifyReleaseChanged = function() { +(function(l) { + (function(l) { + (function(g) { + var c = CanvasRenderingContext2D.prototype.save, l = CanvasRenderingContext2D.prototype.clip, m = CanvasRenderingContext2D.prototype.fill, a = CanvasRenderingContext2D.prototype.stroke, h = CanvasRenderingContext2D.prototype.restore, p = CanvasRenderingContext2D.prototype.beginPath; + g.notifyReleaseChanged = function() { CanvasRenderingContext2D.prototype.save = c; - CanvasRenderingContext2D.prototype.clip = n; - CanvasRenderingContext2D.prototype.fill = k; - CanvasRenderingContext2D.prototype.stroke = b; - CanvasRenderingContext2D.prototype.restore = w; - CanvasRenderingContext2D.prototype.beginPath = a; + CanvasRenderingContext2D.prototype.clip = l; + CanvasRenderingContext2D.prototype.fill = m; + CanvasRenderingContext2D.prototype.stroke = a; + CanvasRenderingContext2D.prototype.restore = h; + CanvasRenderingContext2D.prototype.beginPath = p; }; CanvasRenderingContext2D.prototype.enterBuildingClippingRegion = function() { this.buildingClippingRegionDepth || (this.buildingClippingRegionDepth = 0); @@ -10669,190 +10961,190 @@ __extends = this.__extends || function(g, m) { CanvasRenderingContext2D.prototype.leaveBuildingClippingRegion = function() { this.buildingClippingRegionDepth--; }; - })(m.Canvas2D || (m.Canvas2D = {})); - })(g.GFX || (g.GFX = {})); + })(l.Canvas2D || (l.Canvas2D = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { +(function(l) { + (function(r) { + (function(g) { function c(a) { - var b = "source-over"; + var c = "source-over"; switch(a) { case 1: ; case 2: break; case 3: - b = "multiply"; + c = "multiply"; break; case 8: ; case 4: - b = "screen"; + c = "screen"; break; case 5: - b = "lighten"; + c = "lighten"; break; case 6: - b = "darken"; + c = "darken"; break; case 7: - b = "difference"; + c = "difference"; break; case 13: - b = "overlay"; + c = "overlay"; break; case 14: - b = "hard-light"; + c = "hard-light"; break; case 11: - b = "destination-in"; + c = "destination-in"; break; case 12: - b = "destination-out"; + c = "destination-out"; break; default: - g.Debug.somewhatImplemented("Blend Mode: " + m.BlendMode[a]); + l.Debug.somewhatImplemented("Blend Mode: " + r.BlendMode[a]); } - return b; + return c; } - var w = g.NumberUtilities.clamp; + var t = l.NumberUtilities.clamp; navigator.userAgent.indexOf("Firefox"); - var k = function() { + var m = function() { function a() { } a._prepareSVGFilters = function() { if (!a._svgBlurFilter) { - var b = document.createElementNS("http://www.w3.org/2000/svg", "svg"), c = document.createElementNS("http://www.w3.org/2000/svg", "defs"), e = document.createElementNS("http://www.w3.org/2000/svg", "filter"); - e.setAttribute("id", "svgBlurFilter"); - var g = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); - g.setAttribute("stdDeviation", "0 0"); - e.appendChild(g); - c.appendChild(e); - a._svgBlurFilter = g; - e = document.createElementNS("http://www.w3.org/2000/svg", "filter"); - e.setAttribute("id", "svgDropShadowFilter"); - g = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); - g.setAttribute("in", "SourceAlpha"); - g.setAttribute("stdDeviation", "3"); - e.appendChild(g); - a._svgDropshadowFilterBlur = g; - g = document.createElementNS("http://www.w3.org/2000/svg", "feOffset"); - g.setAttribute("dx", "0"); - g.setAttribute("dy", "0"); - g.setAttribute("result", "offsetblur"); - e.appendChild(g); - a._svgDropshadowFilterOffset = g; - g = document.createElementNS("http://www.w3.org/2000/svg", "feFlood"); - g.setAttribute("flood-color", "rgba(0,0,0,1)"); - e.appendChild(g); - a._svgDropshadowFilterFlood = g; - g = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); - g.setAttribute("in2", "offsetblur"); - g.setAttribute("operator", "in"); - e.appendChild(g); - var g = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"), k = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); - g.appendChild(k); - k = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); - k.setAttribute("in", "SourceGraphic"); - g.appendChild(k); - e.appendChild(g); - c.appendChild(e); - e = document.createElementNS("http://www.w3.org/2000/svg", "filter"); - e.setAttribute("id", "svgColorMatrixFilter"); - g = document.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix"); - g.setAttribute("color-interpolation-filters", "sRGB"); - g.setAttribute("in", "SourceGraphic"); - g.setAttribute("type", "matrix"); - e.appendChild(g); - c.appendChild(e); - a._svgColorMatrixFilter = g; - b.appendChild(c); - document.documentElement.appendChild(b); + var c = document.createElementNS("http://www.w3.org/2000/svg", "svg"), g = document.createElementNS("http://www.w3.org/2000/svg", "defs"), l = document.createElementNS("http://www.w3.org/2000/svg", "filter"); + l.setAttribute("id", "svgBlurFilter"); + var n = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); + n.setAttribute("stdDeviation", "0 0"); + l.appendChild(n); + g.appendChild(l); + a._svgBlurFilter = n; + l = document.createElementNS("http://www.w3.org/2000/svg", "filter"); + l.setAttribute("id", "svgDropShadowFilter"); + n = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); + n.setAttribute("in", "SourceAlpha"); + n.setAttribute("stdDeviation", "3"); + l.appendChild(n); + a._svgDropshadowFilterBlur = n; + n = document.createElementNS("http://www.w3.org/2000/svg", "feOffset"); + n.setAttribute("dx", "0"); + n.setAttribute("dy", "0"); + n.setAttribute("result", "offsetblur"); + l.appendChild(n); + a._svgDropshadowFilterOffset = n; + n = document.createElementNS("http://www.w3.org/2000/svg", "feFlood"); + n.setAttribute("flood-color", "rgba(0,0,0,1)"); + l.appendChild(n); + a._svgDropshadowFilterFlood = n; + n = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); + n.setAttribute("in2", "offsetblur"); + n.setAttribute("operator", "in"); + l.appendChild(n); + var n = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"), m = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); + n.appendChild(m); + m = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); + m.setAttribute("in", "SourceGraphic"); + n.appendChild(m); + l.appendChild(n); + g.appendChild(l); + l = document.createElementNS("http://www.w3.org/2000/svg", "filter"); + l.setAttribute("id", "svgColorMatrixFilter"); + n = document.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix"); + n.setAttribute("color-interpolation-filters", "sRGB"); + n.setAttribute("in", "SourceGraphic"); + n.setAttribute("type", "matrix"); + l.appendChild(n); + g.appendChild(l); + a._svgColorMatrixFilter = n; + c.appendChild(g); + document.documentElement.appendChild(c); } }; - a._applyColorMatrixFilter = function(b, c) { + a._applyColorMatrixFilter = function(c, g) { a._prepareSVGFilters(); - a._svgColorMatrixFilter.setAttribute("values", c.toSVGFilterMatrix()); - b.filter = "url(#svgColorMatrixFilter)"; + a._svgColorMatrixFilter.setAttribute("values", g.toSVGFilterMatrix()); + c.filter = "url(#svgColorMatrixFilter)"; }; - a._applyFilters = function(b, c, e) { - function k(a) { - var c = b / 2; + a._applyFilters = function(c, g, m) { + function n(a) { + var b = c / 2; switch(a) { case 0: return 0; case 1: - return c / 2.7; + return b / 2.7; case 2: - return c / 1.28; + return b / 1.28; default: - return c; + return b; } } a._prepareSVGFilters(); - a._removeFilters(c); - for (var l = 0;l < e.length;l++) { - var t = e[l]; - if (t instanceof m.BlurFilter) { - var r = t, t = k(r.quality); - a._svgBlurFilter.setAttribute("stdDeviation", r.blurX * t + " " + r.blurY * t); - c.filter = "url(#svgBlurFilter)"; + a._removeFilters(g); + for (var s = 0;s < m.length;s++) { + var v = m[s]; + if (v instanceof r.BlurFilter) { + var d = v, v = n(d.quality); + a._svgBlurFilter.setAttribute("stdDeviation", d.blurX * v + " " + d.blurY * v); + g.filter = "url(#svgBlurFilter)"; } else { - t instanceof m.DropshadowFilter && (r = t, t = k(r.quality), a._svgDropshadowFilterBlur.setAttribute("stdDeviation", r.blurX * t + " " + r.blurY * t), a._svgDropshadowFilterOffset.setAttribute("dx", String(Math.cos(r.angle * Math.PI / 180) * r.distance * b)), a._svgDropshadowFilterOffset.setAttribute("dy", String(Math.sin(r.angle * Math.PI / 180) * r.distance * b)), a._svgDropshadowFilterFlood.setAttribute("flood-color", g.ColorUtilities.rgbaToCSSStyle(r.color << 8 | Math.round(255 * - r.alpha))), c.filter = "url(#svgDropShadowFilter)"); + v instanceof r.DropshadowFilter && (d = v, v = n(d.quality), a._svgDropshadowFilterBlur.setAttribute("stdDeviation", d.blurX * v + " " + d.blurY * v), a._svgDropshadowFilterOffset.setAttribute("dx", String(Math.cos(d.angle * Math.PI / 180) * d.distance * c)), a._svgDropshadowFilterOffset.setAttribute("dy", String(Math.sin(d.angle * Math.PI / 180) * d.distance * c)), a._svgDropshadowFilterFlood.setAttribute("flood-color", l.ColorUtilities.rgbaToCSSStyle(d.color << 8 | Math.round(255 * + d.alpha))), g.filter = "url(#svgDropShadowFilter)"); } } }; a._removeFilters = function(a) { a.filter = "none"; }; - a._applyColorMatrix = function(b, c) { - a._removeFilters(b); - c.isIdentity() ? (b.globalAlpha = 1, b.globalColorMatrix = null) : c.hasOnlyAlphaMultiplier() ? (b.globalAlpha = w(c.alphaMultiplier, 0, 1), b.globalColorMatrix = null) : (b.globalAlpha = 1, a._svgFiltersAreSupported ? (a._applyColorMatrixFilter(b, c), b.globalColorMatrix = null) : b.globalColorMatrix = c); + a._applyColorMatrix = function(c, g) { + a._removeFilters(c); + g.isIdentity() ? (c.globalAlpha = 1, c.globalColorMatrix = null) : g.hasOnlyAlphaMultiplier() ? (c.globalAlpha = t(g.alphaMultiplier, 0, 1), c.globalColorMatrix = null) : (c.globalAlpha = 1, a._svgFiltersAreSupported ? (a._applyColorMatrixFilter(c, g), c.globalColorMatrix = null) : c.globalColorMatrix = g); }; a._svgFiltersAreSupported = !!Object.getOwnPropertyDescriptor(CanvasRenderingContext2D.prototype, "filter"); return a; }(); - e.Filters = k; - var b = function() { - function a(a, b, c, e) { - this.surface = a; - this.region = b; - this.w = c; - this.h = e; + g.Filters = m; + var a = function() { + function a(c, h, g, n) { + this.surface = c; + this.region = h; + this.w = g; + this.h = n; } a.prototype.free = function() { this.surface.free(this); }; - a._ensureCopyCanvasSize = function(b, c) { - var e; + a._ensureCopyCanvasSize = function(c, g) { + var m; if (a._copyCanvasContext) { - if (e = a._copyCanvasContext.canvas, e.width < b || e.height < c) { - e.width = g.IntegerUtilities.nearestPowerOfTwo(b), e.height = g.IntegerUtilities.nearestPowerOfTwo(c); + if (m = a._copyCanvasContext.canvas, m.width < c || m.height < g) { + m.width = l.IntegerUtilities.nearestPowerOfTwo(c), m.height = l.IntegerUtilities.nearestPowerOfTwo(g); } } else { - e = document.createElement("canvas"), "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(e), e.width = 512, e.height = 512, a._copyCanvasContext = e.getContext("2d"); + m = document.createElement("canvas"), "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(m), m.width = 512, m.height = 512, a._copyCanvasContext = m.getContext("2d"); } }; - a.prototype.draw = function(b, e, g, k, l, m) { + a.prototype.draw = function(g, k, l, n, m, r) { this.context.setTransform(1, 0, 0, 1, 0, 0); - var r, u = 0, h = 0; - b.context.canvas === this.context.canvas ? (a._ensureCopyCanvasSize(k, l), r = a._copyCanvasContext, r.clearRect(0, 0, k, l), r.drawImage(b.surface.canvas, b.region.x, b.region.y, k, l, 0, 0, k, l), r = r.canvas, h = u = 0) : (r = b.surface.canvas, u = b.region.x, h = b.region.y); + var d, e = 0, b = 0; + g.context.canvas === this.context.canvas ? (a._ensureCopyCanvasSize(n, m), d = a._copyCanvasContext, d.clearRect(0, 0, n, m), d.drawImage(g.surface.canvas, g.region.x, g.region.y, n, m, 0, 0, n, m), d = d.canvas, b = e = 0) : (d = g.surface.canvas, e = g.region.x, b = g.region.y); a: { - switch(m) { + switch(r) { case 11: - b = !0; + g = !0; break a; default: - b = !1; + g = !1; } } - b && (this.context.save(), this.context.beginPath(), this.context.rect(e, g, k, l), this.context.clip()); - this.context.globalCompositeOperation = c(m); - this.context.drawImage(r, u, h, k, l, e, g, k, l); + g && (this.context.save(), this.context.beginPath(), this.context.rect(k, l, n, m), this.context.clip()); + this.context.globalCompositeOperation = c(r); + this.context.drawImage(d, e, b, n, m, k, l, n, m); this.context.globalCompositeOperation = c(1); - b && this.context.restore(); + g && this.context.restore(); }; Object.defineProperty(a.prototype, "context", {get:function() { return this.surface.context; @@ -10870,86 +11162,86 @@ __extends = this.__extends || function(g, m) { a.globalCompositeOperation = c(1); }; a.prototype.fill = function(a) { - var b = this.surface.context, c = this.region; - b.fillStyle = a; - b.fillRect(c.x, c.y, c.w, c.h); + var c = this.surface.context, g = this.region; + c.fillStyle = a; + c.fillRect(g.x, g.y, g.w, g.h); }; a.prototype.clear = function(a) { - var b = this.surface.context, c = this.region; - a || (a = c); - b.clearRect(a.x, a.y, a.w, a.h); + var c = this.surface.context, g = this.region; + a || (a = g); + c.clearRect(a.x, a.y, a.w, a.h); }; return a; }(); - e.Canvas2DSurfaceRegion = b; - k = function() { - function a(a, b) { + g.Canvas2DSurfaceRegion = a; + m = function() { + function c(a, g) { this.canvas = a; this.context = a.getContext("2d"); this.w = a.width; this.h = a.height; - this._regionAllocator = b; + this._regionAllocator = g; } - a.prototype.allocate = function(a, c) { - var e = this._regionAllocator.allocate(a, c); - return e ? new b(this, e, a, c) : null; + c.prototype.allocate = function(c, g) { + var h = this._regionAllocator.allocate(c, g); + return h ? new a(this, h, c, g) : null; }; - a.prototype.free = function(a) { + c.prototype.free = function(a) { this._regionAllocator.free(a.region); }; + return c; + }(); + g.Canvas2DSurface = m; + })(r.Canvas2D || (r.Canvas2D = {})); + })(l.GFX || (l.GFX = {})); +})(Shumway || (Shumway = {})); +(function(l) { + (function(r) { + (function(g) { + var c = l.Debug.assert, t = l.GFX.Geometry.Rectangle, m = l.GFX.Geometry.Point, a = l.GFX.Geometry.Matrix, h = l.NumberUtilities.clamp, p = l.NumberUtilities.pow2, k = new l.IndentingWriter(!1, dumpLine), u = function() { + return function(a, c) { + this.surfaceRegion = a; + this.scale = c; + }; + }(); + g.MipMapLevel = u; + var n = function() { + function a(b, c, d, e) { + this._node = c; + this._levels = []; + this._surfaceRegionAllocator = d; + this._size = e; + this._renderer = b; + } + a.prototype.getLevel = function(a) { + a = Math.max(a.getAbsoluteScaleX(), a.getAbsoluteScaleY()); + var b = 0; + 1 !== a && (b = h(Math.round(Math.log(a) / Math.LN2), -5, 3)); + this._node.hasFlags(2097152) || (b = h(b, -5, 0)); + a = p(b); + var c = 5 + b, b = this._levels[c]; + if (!b) { + var d = this._node.getBounds().clone(); + d.scale(a, a); + d.snap(); + var e = this._surfaceRegionAllocator.allocate(d.w, d.h, null), g = e.region, b = this._levels[c] = new u(e, a), c = new v(e); + c.clip.set(g); + c.matrix.setElements(a, 0, 0, a, g.x - d.x, g.y - d.y); + c.flags |= 64; + this._renderer.renderNodeWithState(this._node, c); + c.free(); + } + return b; + }; return a; }(); - e.Canvas2DSurface = k; - })(m.Canvas2D || (m.Canvas2D = {})); - })(g.GFX || (g.GFX = {})); -})(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.Debug.assert, w = g.GFX.Geometry.Rectangle, k = g.GFX.Geometry.Point, b = g.GFX.Geometry.Matrix, a = g.NumberUtilities.clamp, n = g.NumberUtilities.pow2, p = new g.IndentingWriter(!1, dumpLine), y = function() { - return function(a, b) { - this.surfaceRegion = a; - this.scale = b; - }; - }(); - e.MipMapLevel = y; - var v = function() { - function b(a, c, e, h) { - this._node = c; - this._levels = []; - this._surfaceRegionAllocator = e; - this._size = h; - this._renderer = a; - } - b.prototype.getLevel = function(b) { - b = Math.max(b.getAbsoluteScaleX(), b.getAbsoluteScaleY()); - var c = 0; - 1 !== b && (c = a(Math.round(Math.log(b) / Math.LN2), -5, 3)); - this._node.hasFlags(2097152) || (c = a(c, -5, 0)); - b = n(c); - var e = 5 + c, c = this._levels[e]; - if (!c) { - var h = this._node.getBounds().clone(); - h.scale(b, b); - h.snap(); - var g = this._surfaceRegionAllocator.allocate(h.w, h.h), k = g.region, c = this._levels[e] = new y(g, b), e = new t(g); - e.clip.set(k); - e.matrix.setElements(b, 0, 0, b, k.x - h.x, k.y - h.y); - e.flags |= 64; - this._renderer.renderNodeWithState(this._node, e); - e.free(); - } - return c; - }; - return b; - }(); - e.MipMap = v; + g.MipMap = n; (function(a) { a[a.NonZero = 0] = "NonZero"; a[a.EvenOdd = 1] = "EvenOdd"; - })(e.FillRule || (e.FillRule = {})); - var l = function(a) { - function b() { + })(g.FillRule || (g.FillRule = {})); + var s = function(a) { + function c() { a.apply(this, arguments); this.blending = this.imageSmoothing = this.snapToDevicePixels = !0; this.debugLayers = !1; @@ -10959,10 +11251,10 @@ __extends = this.__extends || function(g, m) { this.cacheShapesThreshold = 16; this.alpha = !1; } - __extends(b, a); - return b; - }(m.RendererOptions); - e.Canvas2DRendererOptions = l; + __extends(c, a); + return c; + }(r.RendererOptions); + g.Canvas2DRendererOptions = s; (function(a) { a[a.None = 0] = "None"; a[a.IgnoreNextLayer = 1] = "IgnoreNextLayer"; @@ -10978,28 +11270,28 @@ __extends = this.__extends || function(g, m) { a[a.PaintDirtyRegion = 2048] = "PaintDirtyRegion"; a[a.ImageSmoothing = 4096] = "ImageSmoothing"; a[a.PixelSnapping = 8192] = "PixelSnapping"; - })(e.RenderFlags || (e.RenderFlags = {})); - w.createMaxI16(); - var t = function(a) { + })(g.RenderFlags || (g.RenderFlags = {})); + t.createMaxI16(); + var v = function(b) { function c(d) { - a.call(this); - this.clip = w.createEmpty(); + b.call(this); + this.clip = t.createEmpty(); this.clipList = []; this.flags = 0; this.target = null; - this.matrix = b.createIdentity(); - this.colorMatrix = m.ColorMatrix.createIdentity(); + this.matrix = a.createIdentity(); + this.colorMatrix = r.ColorMatrix.createIdentity(); c.allocationCount++; this.target = d; } - __extends(c, a); + __extends(c, b); c.prototype.set = function(a) { this.clip.set(a.clip); this.target = a.target; this.matrix.set(a.matrix); this.colorMatrix.set(a.colorMatrix); this.flags = a.flags; - g.ArrayUtilities.copyFrom(this.clipList, a.clipList); + l.ArrayUtilities.copyFrom(this.clipList, a.clipList); }; c.prototype.clone = function() { var a = c.allocate(); @@ -11033,50 +11325,50 @@ __extends = this.__extends || function(g, m) { c.allocationCount = 0; c._dirtyStack = []; return c; - }(m.State); - e.RenderState = t; - var r = function() { - function a() { + }(r.State); + g.RenderState = v; + var d = function() { + function b() { this.culledNodes = this.groups = this.shapes = this._count = 0; } - a.prototype.enter = function(a) { + b.prototype.enter = function(a) { this._count++; - p && (p.enter("> Frame: " + this._count), this._enterTime = performance.now(), this.culledNodes = this.groups = this.shapes = 0); + k && (k.enter("> Frame: " + this._count), this._enterTime = performance.now(), this.culledNodes = this.groups = this.shapes = 0); }; - a.prototype.leave = function() { - p && (p.writeLn("Shapes: " + this.shapes + ", Groups: " + this.groups + ", Culled Nodes: " + this.culledNodes), p.writeLn("Elapsed: " + (performance.now() - this._enterTime).toFixed(2)), p.writeLn("Rectangle: " + w.allocationCount + ", Matrix: " + b.allocationCount + ", State: " + t.allocationCount), p.leave("<")); + b.prototype.leave = function() { + k && (k.writeLn("Shapes: " + this.shapes + ", Groups: " + this.groups + ", Culled Nodes: " + this.culledNodes), k.writeLn("Elapsed: " + (performance.now() - this._enterTime).toFixed(2)), k.writeLn("Rectangle: " + t.allocationCount + ", Matrix: " + a.allocationCount + ", State: " + v.allocationCount), k.leave("<")); }; - return a; + return b; }(); - e.FrameInfo = r; - var u = function(a) { - function f(b, c, e) { - void 0 === e && (e = new l); - a.call(this, b, c, e); + g.FrameInfo = d; + var e = function(b) { + function e(a, c, g) { + void 0 === g && (g = new s); + b.call(this, a, c, g); this._visited = 0; - this._frameInfo = new r; + this._frameInfo = new d; this._fontSize = 0; this._layers = []; - if (b instanceof HTMLCanvasElement) { - var g = b; - this._viewport = new w(0, 0, g.width, g.height); - this._target = this._createTarget(g); + if (a instanceof HTMLCanvasElement) { + var h = a; + this._viewport = new t(0, 0, h.width, h.height); + this._target = this._createTarget(h); } else { this._addLayer("Background Layer"); - e = this._addLayer("Canvas Layer"); - g = document.createElement("canvas"); - e.appendChild(g); - this._viewport = new w(0, 0, b.scrollWidth, b.scrollHeight); + g = this._addLayer("Canvas Layer"); + h = document.createElement("canvas"); + g.appendChild(h); + this._viewport = new t(0, 0, a.scrollWidth, a.scrollHeight); var k = this; c.addEventListener(1, function() { - k._onStageBoundsChanged(g); + k._onStageBoundsChanged(h); }); - this._onStageBoundsChanged(g); + this._onStageBoundsChanged(h); } - f._prepareSurfaceAllocators(); + e._prepareSurfaceAllocators(); } - __extends(f, a); - f.prototype._addLayer = function(a) { + __extends(e, b); + e.prototype._addLayer = function(a) { a = document.createElement("div"); a.style.position = "absolute"; a.style.overflow = "hidden"; @@ -11086,128 +11378,128 @@ __extends = this.__extends || function(g, m) { this._layers.push(a); return a; }; - Object.defineProperty(f.prototype, "_backgroundVideoLayer", {get:function() { + Object.defineProperty(e.prototype, "_backgroundVideoLayer", {get:function() { return this._layers[0]; }, enumerable:!0, configurable:!0}); - f.prototype._createTarget = function(a) { - return new e.Canvas2DSurfaceRegion(new e.Canvas2DSurface(a), new m.RegionAllocator.Region(0, 0, a.width, a.height), a.width, a.height); + e.prototype._createTarget = function(a) { + return new g.Canvas2DSurfaceRegion(new g.Canvas2DSurface(a), new r.RegionAllocator.Region(0, 0, a.width, a.height), a.width, a.height); }; - f.prototype._onStageBoundsChanged = function(a) { + e.prototype._onStageBoundsChanged = function(a) { var b = this._stage.getBounds(!0); b.snap(); - for (var c = this._devicePixelRatio = window.devicePixelRatio || 1, e = b.w / c + "px", c = b.h / c + "px", f = 0;f < this._layers.length;f++) { - var g = this._layers[f]; - g.style.width = e; - g.style.height = c; + for (var c = this._devicePixelRatio = window.devicePixelRatio || 1, d = b.w / c + "px", c = b.h / c + "px", e = 0;e < this._layers.length;e++) { + var f = this._layers[e]; + f.style.width = d; + f.style.height = c; } a.width = b.w; a.height = b.h; a.style.position = "absolute"; - a.style.width = e; + a.style.width = d; a.style.height = c; this._target = this._createTarget(a); this._fontSize = 10 * this._devicePixelRatio; }; - f._prepareSurfaceAllocators = function() { - f._initializedCaches || (f._surfaceCache = new m.SurfaceRegionAllocator.SimpleAllocator(function(a, b) { + e._prepareSurfaceAllocators = function() { + e._initializedCaches || (e._surfaceCache = new r.SurfaceRegionAllocator.SimpleAllocator(function(a, b) { var c = document.createElement("canvas"); "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(c); - var f = Math.max(1024, a), g = Math.max(1024, b); - c.width = f; - c.height = g; - var h = null, h = 512 <= a || 512 <= b ? new m.RegionAllocator.GridAllocator(f, g, f, g) : new m.RegionAllocator.BucketAllocator(f, g); - return new e.Canvas2DSurface(c, h); - }), f._shapeCache = new m.SurfaceRegionAllocator.SimpleAllocator(function(a, b) { + var d = Math.max(1024, a), e = Math.max(1024, b); + c.width = d; + c.height = e; + var f = null, f = 512 <= a || 512 <= b ? new r.RegionAllocator.GridAllocator(d, e, d, e) : new r.RegionAllocator.BucketAllocator(d, e); + return new g.Canvas2DSurface(c, f); + }), e._shapeCache = new r.SurfaceRegionAllocator.SimpleAllocator(function(a, b) { var c = document.createElement("canvas"); "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(c); c.width = 1024; c.height = 1024; - var f = f = new m.RegionAllocator.CompactAllocator(1024, 1024); - return new e.Canvas2DSurface(c, f); - }), f._initializedCaches = !0); + var d = d = new r.RegionAllocator.CompactAllocator(1024, 1024); + return new g.Canvas2DSurface(c, d); + }), e._initializedCaches = !0); }; - f.prototype.render = function() { - var a = this._stage, b = this._target, c = this._options, e = this._viewport; + e.prototype.render = function() { + var a = this._stage, b = this._target, c = this._options, d = this._viewport; b.reset(); b.context.save(); b.context.beginPath(); - b.context.rect(e.x, e.y, e.w, e.h); + b.context.rect(d.x, d.y, d.w, d.h); b.context.clip(); - this._renderStageToTarget(b, a, e); + this._renderStageToTarget(b, a, d); b.reset(); - c.paintViewport && (b.context.beginPath(), b.context.rect(e.x, e.y, e.w, e.h), b.context.strokeStyle = "#FF4981", b.context.lineWidth = 2, b.context.stroke()); + c.paintViewport && (b.context.beginPath(), b.context.rect(d.x, d.y, d.w, d.h), b.context.strokeStyle = "#FF4981", b.context.lineWidth = 2, b.context.stroke()); b.context.restore(); }; - f.prototype.renderNode = function(a, b, c) { - var e = new t(this._target); - e.clip.set(b); - e.flags = 256; - e.matrix.set(c); - a.visit(this, e); - e.free(); + e.prototype.renderNode = function(a, b, c) { + var d = new v(this._target); + d.clip.set(b); + d.flags = 256; + d.matrix.set(c); + a.visit(this, d); + d.free(); }; - f.prototype.renderNodeWithState = function(a, b) { + e.prototype.renderNodeWithState = function(a, b) { a.visit(this, b); }; - f.prototype._renderWithCache = function(a, b) { - var c = b.matrix, e = a.getBounds(); - if (e.isEmpty()) { + e.prototype._renderWithCache = function(a, b) { + var c = b.matrix, d = a.getBounds(); + if (d.isEmpty()) { return!1; } var g = this._options.cacheShapesMaxSize, h = Math.max(c.getAbsoluteScaleX(), c.getAbsoluteScaleY()), k = !!(b.flags & 16), l = !!(b.flags & 8); if (b.hasFlags(256)) { - if (l || k || !b.colorMatrix.isIdentity() || a.hasFlags(1048576) || 100 < this._options.cacheShapesThreshold || e.w * h > g || e.h * h > g) { + if (l || k || !b.colorMatrix.isIdentity() || a.hasFlags(1048576) || 100 < this._options.cacheShapesThreshold || d.w * h > g || d.h * h > g) { return!1; } - (h = a.properties.mipMap) || (h = a.properties.mipMap = new v(this, a, f._shapeCache, g)); + (h = a.properties.mipMap) || (h = a.properties.mipMap = new n(this, a, e._shapeCache, g)); k = h.getLevel(c); g = k.surfaceRegion; h = g.region; - return k ? (k = b.target.context, k.imageSmoothingEnabled = k.mozImageSmoothingEnabled = !0, k.setTransform(c.a, c.b, c.c, c.d, c.tx, c.ty), k.drawImage(g.surface.canvas, h.x, h.y, h.w, h.h, e.x, e.y, e.w, e.h), !0) : !1; + return k ? (k = b.target.context, k.imageSmoothingEnabled = k.mozImageSmoothingEnabled = !0, k.setTransform(c.a, c.b, c.c, c.d, c.tx, c.ty), k.drawImage(g.surface.canvas, h.x, h.y, h.w, h.h, d.x, d.y, d.w, d.h), !0) : !1; } }; - f.prototype._intersectsClipList = function(a, b) { - var c = a.getBounds(!0), e = !1; + e.prototype._intersectsClipList = function(a, b) { + var c = a.getBounds(!0), d = !1; b.matrix.transformRectangleAABB(c); - b.clip.intersects(c) && (e = !0); - var f = b.clipList; - if (e && f.length) { - for (var e = !1, g = 0;g < f.length;g++) { - if (c.intersects(f[g])) { - e = !0; + b.clip.intersects(c) && (d = !0); + var e = b.clipList; + if (d && e.length) { + for (var d = !1, f = 0;f < e.length;f++) { + if (c.intersects(e[f])) { + d = !0; break; } } } c.free(); - return e; + return d; }; - f.prototype.visitGroup = function(a, b) { + e.prototype.visitGroup = function(a, b) { this._frameInfo.groups++; a.getBounds(); if ((!a.hasFlags(4) || b.flags & 4) && a.hasFlags(65536)) { if (b.flags & 1 || 1 === a.getLayer().blendMode && !a.getLayer().mask || !this._options.blending) { if (this._intersectsClipList(a, b)) { - for (var c = null, e = a.getChildren(), f = 0;f < e.length;f++) { - var g = e[f], h = b.transform(g.getTransform()); - h.toggleFlags(4096, g.hasFlags(524288)); - if (0 <= g.clip) { - c = c || new Uint8Array(e.length); - c[g.clip + f]++; - var k = h.clone(); + for (var c = null, d = a.getChildren(), e = 0;e < d.length;e++) { + var f = d[e], g = b.transform(f.getTransform()); + g.toggleFlags(4096, f.hasFlags(524288)); + if (0 <= f.clip) { + c = c || new Uint8Array(d.length); + c[f.clip + e]++; + var h = g.clone(); b.target.context.save(); - k.flags |= 16; - g.visit(this, k); - k.free(); + h.flags |= 16; + f.visit(this, h); + h.free(); } else { - g.visit(this, h); + f.visit(this, g); } - if (c && 0 < c[f]) { - for (;c[f]--;) { + if (c && 0 < c[e]) { + for (;c[e]--;) { b.target.context.restore(); } } - h.free(); + g.free(); } } else { this._frameInfo.culledNodes++; @@ -11218,31 +11510,31 @@ __extends = this.__extends || function(g, m) { this._renderDebugInfo(a, b); } }; - f.prototype._renderDebugInfo = function(a, b) { + e.prototype._renderDebugInfo = function(a, b) { if (b.flags & 1024) { - var c = b.target.context, e = a.getBounds(!0), h = a.properties.style; - h || (h = a.properties.style = g.Color.randomColor().toCSSStyle()); - c.strokeStyle = h; - b.matrix.transformRectangleAABB(e); + var c = b.target.context, d = a.getBounds(!0), g = a.properties.style; + g || (g = a.properties.style = l.Color.randomColor().toCSSStyle()); + c.strokeStyle = g; + b.matrix.transformRectangleAABB(d); c.setTransform(1, 0, 0, 1, 0, 0); - e.free(); - e = a.getBounds(); - h = f._debugPoints; - b.matrix.transformRectangle(e, h); + d.free(); + d = a.getBounds(); + g = e._debugPoints; + b.matrix.transformRectangle(d, g); c.lineWidth = 1; c.beginPath(); - c.moveTo(h[0].x, h[0].y); - c.lineTo(h[1].x, h[1].y); - c.lineTo(h[2].x, h[2].y); - c.lineTo(h[3].x, h[3].y); - c.lineTo(h[0].x, h[0].y); + c.moveTo(g[0].x, g[0].y); + c.lineTo(g[1].x, g[1].y); + c.lineTo(g[2].x, g[2].y); + c.lineTo(g[3].x, g[3].y); + c.lineTo(g[0].x, g[0].y); c.stroke(); } }; - f.prototype.visitStage = function(a, b) { - var c = b.target.context, e = a.getBounds(!0); - b.matrix.transformRectangleAABB(e); - e.intersect(b.clip); + e.prototype.visitStage = function(a, b) { + var c = b.target.context, d = a.getBounds(!0); + b.matrix.transformRectangleAABB(d); + d.intersect(b.clip); b.target.reset(); b = b.clone(); this._options.clear && b.target.clear(b.clip); @@ -11251,34 +11543,34 @@ __extends = this.__extends || function(g, m) { a.dirtyRegion && (c.restore(), b.target.reset(), c.globalAlpha = .4, b.hasFlags(2048) && a.dirtyRegion.render(b.target.context), a.dirtyRegion.clear()); b.free(); }; - f.prototype.visitShape = function(a, b) { + e.prototype.visitShape = function(a, b) { if (this._intersectsClipList(a, b)) { var c = b.matrix; b.flags & 8192 && (c = c.clone(), c.snap()); - var f = b.target.context; - e.Filters._applyColorMatrix(f, b.colorMatrix); - a.source instanceof m.RenderableVideo ? this.visitRenderableVideo(a.source, b) : 0 < f.globalAlpha && this.visitRenderable(a.source, b, a.ratio); + var d = b.target.context; + g.Filters._applyColorMatrix(d, b.colorMatrix); + a.source instanceof r.RenderableVideo ? this.visitRenderableVideo(a.source, b) : 0 < d.globalAlpha && this.visitRenderable(a.source, b, a.ratio); b.flags & 8192 && c.free(); } }; - f.prototype.visitRenderableVideo = function(a, b) { + e.prototype.visitRenderableVideo = function(a, b) { if (a.video && a.video.videoWidth) { - var c = this._devicePixelRatio, e = b.matrix.clone(); - e.scale(1 / c, 1 / c); - var c = a.getBounds(), f = g.GFX.Geometry.Matrix.createIdentity(); - f.scale(c.w / a.video.videoWidth, c.h / a.video.videoHeight); - e.preMultiply(f); - f.free(); - c = e.toCSSTransform(); + var c = this._devicePixelRatio, d = b.matrix.clone(); + d.scale(1 / c, 1 / c); + var c = a.getBounds(), e = l.GFX.Geometry.Matrix.createIdentity(); + e.scale(c.w / a.video.videoWidth, c.h / a.video.videoHeight); + d.preMultiply(e); + e.free(); + c = d.toCSSTransform(); a.video.style.transformOrigin = "0 0"; a.video.style.transform = c; this._backgroundVideoLayer !== a.video.parentElement && (this._backgroundVideoLayer.appendChild(a.video), 1 === a.state && a.play()); - e.free(); + d.free(); } }; - f.prototype.visitRenderable = function(a, b, c) { - var e = a.getBounds(), f = b.matrix, h = b.target.context, k = !!(b.flags & 16), l = !!(b.flags & 8), p = !!(b.flags & 512); - if (!(e.isEmpty() || b.flags & 32)) { + e.prototype.visitRenderable = function(a, b, c) { + var d = a.getBounds(); + if (!(b.flags & 32 || d.isEmpty())) { if (b.hasFlags(64)) { b.removeFlags(64); } else { @@ -11286,63 +11578,60 @@ __extends = this.__extends || function(g, m) { return; } } - h.setTransform(f.a, f.b, f.c, f.d, f.tx, f.ty); - var n = 0; - p && (n = performance.now()); + var e = b.matrix, d = b.target.context, f = !!(b.flags & 16), g = !!(b.flags & 8); + d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty); this._frameInfo.shapes++; - h.imageSmoothingEnabled = h.mozImageSmoothingEnabled = b.hasFlags(4096); + d.imageSmoothingEnabled = d.mozImageSmoothingEnabled = b.hasFlags(4096); b = a.properties.renderCount || 0; - Math.max(f.getAbsoluteScaleX(), f.getAbsoluteScaleY()); a.properties.renderCount = ++b; - a.render(h, c, null, k, l); - p && (a = performance.now() - n, h.fillStyle = g.ColorStyle.gradientColor(.1 / a), h.globalAlpha = .3 + .1 * Math.random(), h.fillRect(e.x, e.y, e.w, e.h)); + a.render(d, c, null, f, g); } }; - f.prototype._renderLayer = function(a, b) { - var c = a.getLayer(), e = c.mask; - if (e) { - this._renderWithMask(a, e, c.blendMode, !a.hasFlags(131072) || !e.hasFlags(131072), b); + e.prototype._renderLayer = function(a, b) { + var c = a.getLayer(), d = c.mask; + if (d) { + this._renderWithMask(a, d, c.blendMode, !a.hasFlags(131072) || !d.hasFlags(131072), b); } else { - var e = w.allocate(), f = this._renderToTemporarySurface(a, b, e); - f && (b.target.draw(f, e.x, e.y, e.w, e.h, c.blendMode), f.free()); - e.free(); + var d = t.allocate(), e = this._renderToTemporarySurface(a, b, d, null); + e && (b.target.draw(e, d.x, d.y, d.w, d.h, c.blendMode), e.free()); + d.free(); } }; - f.prototype._renderWithMask = function(a, b, c, e, f) { - var g = b.getTransform().getConcatenatedMatrix(!0); - b.parent || (g = g.scale(this._devicePixelRatio, this._devicePixelRatio)); - var h = a.getBounds().clone(); - f.matrix.transformRectangleAABB(h); - h.snap(); - if (!h.isEmpty()) { - var k = b.getBounds().clone(); - g.transformRectangleAABB(k); - k.snap(); - if (!k.isEmpty()) { - var l = f.clip.clone(); - l.intersect(h); - l.intersect(k); - l.snap(); - l.isEmpty() || (h = f.clone(), h.clip.set(l), a = this._renderToTemporarySurface(a, h, w.createEmpty()), h.free(), h = f.clone(), h.clip.set(l), h.matrix = g, h.flags |= 4, e && (h.flags |= 8), b = this._renderToTemporarySurface(b, h, w.createEmpty()), h.free(), a.draw(b, 0, 0, l.w, l.h, 11), f.target.draw(a, l.x, l.y, l.w, l.h, c), b.free(), a.free()); + e.prototype._renderWithMask = function(a, b, c, d, e) { + var f = b.getTransform().getConcatenatedMatrix(!0); + b.parent || (f = f.scale(this._devicePixelRatio, this._devicePixelRatio)); + var g = a.getBounds().clone(); + e.matrix.transformRectangleAABB(g); + g.snap(); + if (!g.isEmpty()) { + var h = b.getBounds().clone(); + f.transformRectangleAABB(h); + h.snap(); + if (!h.isEmpty()) { + var k = e.clip.clone(); + k.intersect(g); + k.intersect(h); + k.snap(); + k.isEmpty() || (g = e.clone(), g.clip.set(k), a = this._renderToTemporarySurface(a, g, t.createEmpty(), null), g.free(), g = e.clone(), g.clip.set(k), g.matrix = f, g.flags |= 4, d && (g.flags |= 8), b = this._renderToTemporarySurface(b, g, t.createEmpty(), a.surface), g.free(), a.draw(b, 0, 0, k.w, k.h, 11), e.target.draw(a, k.x, k.y, k.w, k.h, c), b.free(), a.free()); } } }; - f.prototype._renderStageToTarget = function(a, c, e) { - w.allocationCount = b.allocationCount = t.allocationCount = 0; - a = new t(a); - a.clip.set(e); - this._options.paintRenderable || (a.flags |= 32); - this._options.paintBounds && (a.flags |= 1024); - this._options.paintDirtyRegion && (a.flags |= 2048); - this._options.paintFlashing && (a.flags |= 512); - this._options.cacheShapes && (a.flags |= 256); - this._options.imageSmoothing && (a.flags |= 4096); - this._options.snapToDevicePixels && (a.flags |= 8192); - this._frameInfo.enter(a); - c.visit(this, a); + e.prototype._renderStageToTarget = function(b, c, d) { + t.allocationCount = a.allocationCount = v.allocationCount = 0; + b = new v(b); + b.clip.set(d); + this._options.paintRenderable || (b.flags |= 32); + this._options.paintBounds && (b.flags |= 1024); + this._options.paintDirtyRegion && (b.flags |= 2048); + this._options.paintFlashing && (b.flags |= 512); + this._options.cacheShapes && (b.flags |= 256); + this._options.imageSmoothing && (b.flags |= 4096); + this._options.snapToDevicePixels && (b.flags |= 8192); + this._frameInfo.enter(b); + c.visit(this, b); this._frameInfo.leave(); }; - f.prototype._renderToTemporarySurface = function(a, b, c) { + e.prototype._renderToTemporarySurface = function(a, b, c, d) { var e = b.matrix, f = a.getBounds().clone(); e.transformRectangleAABB(f); f.snap(); @@ -11352,340 +11641,339 @@ __extends = this.__extends || function(g, m) { if (c.isEmpty()) { return null; } - var f = this._allocateSurface(c.w, c.h), h = f.region, h = new w(h.x, h.y, c.w, c.h); - f.context.setTransform(1, 0, 0, 1, 0, 0); - f.clear(); + d = this._allocateSurface(c.w, c.h, d); + f = d.region; + f = new t(f.x, f.y, c.w, c.h); + d.context.setTransform(1, 0, 0, 1, 0, 0); + d.clear(); e = e.clone(); - e.translate(h.x - c.x, h.y - c.y); - f.context.save(); + e.translate(f.x - c.x, f.y - c.y); + d.context.save(); b = b.clone(); - b.target = f; + b.target = d; b.matrix = e; - b.clip.set(h); + b.clip.set(f); a.visit(this, b); b.free(); - f.context.restore(); - return f; + d.context.restore(); + return d; }; - f.prototype._allocateSurface = function(a, b) { - var c = f._surfaceCache.allocate(a, b); - c.fill("#FF4981"); - return c; + e.prototype._allocateSurface = function(a, b, c) { + return e._surfaceCache.allocate(a, b, c); }; - f.prototype.screenShot = function(a, b) { + e.prototype.screenShot = function(a, b) { if (b) { - var e = this._stage.content.groupChild.child; - c(e instanceof m.Stage); - a = e.content.getBounds(!0); - e.content.getTransform().getConcatenatedMatrix().transformRectangleAABB(a); + var d = this._stage.content.groupChild.child; + c(d instanceof r.Stage); + a = d.content.getBounds(!0); + d.content.getTransform().getConcatenatedMatrix().transformRectangleAABB(a); a.intersect(this._viewport); } - a || (a = new w(0, 0, this._target.w, this._target.h)); - e = document.createElement("canvas"); - e.width = a.w; - e.height = a.h; - var f = e.getContext("2d"); - f.fillStyle = this._container.style.backgroundColor; - f.fillRect(0, 0, a.w, a.h); - f.drawImage(this._target.context.canvas, a.x, a.y, a.w, a.h, 0, 0, a.w, a.h); - return new m.ScreenShot(e.toDataURL("image/png"), a.w, a.h); + a || (a = new t(0, 0, this._target.w, this._target.h)); + d = document.createElement("canvas"); + d.width = a.w; + d.height = a.h; + var e = d.getContext("2d"); + e.fillStyle = this._container.style.backgroundColor; + e.fillRect(0, 0, a.w, a.h); + e.drawImage(this._target.context.canvas, a.x, a.y, a.w, a.h, 0, 0, a.w, a.h); + return new r.ScreenShot(d.toDataURL("image/png"), a.w, a.h); }; - f._initializedCaches = !1; - f._debugPoints = k.createEmptyPoints(4); - return f; - }(m.Renderer); - e.Canvas2DRenderer = u; - })(m.Canvas2D || (m.Canvas2D = {})); - })(g.GFX || (g.GFX = {})); + e._initializedCaches = !1; + e._debugPoints = m.createEmptyPoints(4); + return e; + }(r.Renderer); + g.Canvas2DRenderer = e; + })(r.Canvas2D || (r.Canvas2D = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = g.Debug.assert, c = m.Geometry.Point, w = m.Geometry.Matrix, k = m.Geometry.Rectangle, b = g.Tools.Mini.FPS, a = function() { +(function(l) { + (function(r) { + var g = r.Geometry.Point, c = r.Geometry.Matrix, t = r.Geometry.Rectangle, m = l.Tools.Mini.FPS, a = function() { function a() { } - a.prototype.onMouseUp = function(a, b) { + a.prototype.onMouseUp = function(a, c) { a.state = this; }; - a.prototype.onMouseDown = function(a, b) { + a.prototype.onMouseDown = function(a, c) { a.state = this; }; - a.prototype.onMouseMove = function(a, b) { + a.prototype.onMouseMove = function(a, c) { a.state = this; }; - a.prototype.onMouseWheel = function(a, b) { + a.prototype.onMouseWheel = function(a, c) { a.state = this; }; - a.prototype.onMouseClick = function(a, b) { + a.prototype.onMouseClick = function(a, c) { a.state = this; }; - a.prototype.onKeyUp = function(a, b) { + a.prototype.onKeyUp = function(a, c) { a.state = this; }; - a.prototype.onKeyDown = function(a, b) { + a.prototype.onKeyDown = function(a, c) { a.state = this; }; - a.prototype.onKeyPress = function(a, b) { + a.prototype.onKeyPress = function(a, c) { a.state = this; }; return a; }(); - m.UIState = a; - var n = function(a) { - function b() { + r.UIState = a; + var h = function(a) { + function c() { a.apply(this, arguments); this._keyCodes = []; } - __extends(b, a); - b.prototype.onMouseDown = function(a, b) { - b.altKey && (a.state = new y(a.worldView, a.getMousePosition(b, null), a.worldView.getTransform().getMatrix(!0))); + __extends(c, a); + c.prototype.onMouseDown = function(a, c) { + c.altKey && (a.state = new k(a.worldView, a.getMousePosition(c, null), a.worldView.getTransform().getMatrix(!0))); }; - b.prototype.onMouseClick = function(a, b) { + c.prototype.onMouseClick = function(a, c) { }; - b.prototype.onKeyDown = function(a, b) { - this._keyCodes[b.keyCode] = !0; + c.prototype.onKeyDown = function(a, c) { + this._keyCodes[c.keyCode] = !0; }; - b.prototype.onKeyUp = function(a, b) { - this._keyCodes[b.keyCode] = !1; + c.prototype.onKeyUp = function(a, c) { + this._keyCodes[c.keyCode] = !1; }; - return b; + return c; }(a), p = function(a) { - function b() { + function c() { a.apply(this, arguments); this._keyCodes = []; this._paused = !1; - this._mousePosition = new c(0, 0); + this._mousePosition = new g(0, 0); } - __extends(b, a); - b.prototype.onMouseMove = function(a, b) { - this._mousePosition = a.getMousePosition(b, null); + __extends(c, a); + c.prototype.onMouseMove = function(a, c) { + this._mousePosition = a.getMousePosition(c, null); this._update(a); }; - b.prototype.onMouseDown = function(a, b) { + c.prototype.onMouseDown = function(a, c) { }; - b.prototype.onMouseClick = function(a, b) { + c.prototype.onMouseClick = function(a, c) { }; - b.prototype.onMouseWheel = function(a, b) { - var c = "DOMMouseScroll" === b.type ? -b.detail : b.wheelDelta / 40; - if (b.altKey) { - b.preventDefault(); - var e = a.getMousePosition(b, null), f = a.worldView.getTransform().getMatrix(!0), c = 1 + c / 1E3; - f.translate(-e.x, -e.y); - f.scale(c, c); - f.translate(e.x, e.y); - a.worldView.getTransform().setMatrix(f); + c.prototype.onMouseWheel = function(a, c) { + var d = "DOMMouseScroll" === c.type ? -c.detail : c.wheelDelta / 40; + if (c.altKey) { + c.preventDefault(); + var e = a.getMousePosition(c, null), b = a.worldView.getTransform().getMatrix(!0), d = 1 + d / 1E3; + b.translate(-e.x, -e.y); + b.scale(d, d); + b.translate(e.x, e.y); + a.worldView.getTransform().setMatrix(b); } }; - b.prototype.onKeyPress = function(a, b) { - if (b.altKey) { - var c = b.keyCode || b.which; - console.info("onKeyPress Code: " + c); - switch(c) { + c.prototype.onKeyPress = function(a, c) { + if (c.altKey) { + var d = c.keyCode || c.which; + console.info("onKeyPress Code: " + d); + switch(d) { case 248: this._paused = !this._paused; - b.preventDefault(); + c.preventDefault(); break; case 223: a.toggleOption("paintRenderable"); - b.preventDefault(); + c.preventDefault(); break; case 8730: a.toggleOption("paintViewport"); - b.preventDefault(); + c.preventDefault(); break; case 8747: a.toggleOption("paintBounds"); - b.preventDefault(); + c.preventDefault(); break; case 8706: a.toggleOption("paintDirtyRegion"); - b.preventDefault(); + c.preventDefault(); break; case 231: a.toggleOption("clear"); - b.preventDefault(); + c.preventDefault(); break; case 402: - a.toggleOption("paintFlashing"), b.preventDefault(); + a.toggleOption("paintFlashing"), c.preventDefault(); } this._update(a); } }; - b.prototype.onKeyDown = function(a, b) { - this._keyCodes[b.keyCode] = !0; + c.prototype.onKeyDown = function(a, c) { + this._keyCodes[c.keyCode] = !0; this._update(a); }; - b.prototype.onKeyUp = function(a, b) { - this._keyCodes[b.keyCode] = !1; + c.prototype.onKeyUp = function(a, c) { + this._keyCodes[c.keyCode] = !1; this._update(a); }; - b.prototype._update = function(a) { + c.prototype._update = function(a) { a.paused = this._paused; if (a.getOption()) { - var b = m.viewportLoupeDiameter.value, c = m.viewportLoupeDiameter.value; - a.viewport = new k(this._mousePosition.x - b / 2, this._mousePosition.y - c / 2, b, c); + var c = r.viewportLoupeDiameter.value, d = r.viewportLoupeDiameter.value; + a.viewport = new t(this._mousePosition.x - c / 2, this._mousePosition.y - d / 2, c, d); } else { a.viewport = null; } }; - return b; + return c; }(a); (function(a) { - function b() { + function c() { a.apply(this, arguments); this._startTime = Date.now(); } - __extends(b, a); - b.prototype.onMouseMove = function(a, b) { + __extends(c, a); + c.prototype.onMouseMove = function(a, c) { if (!(10 > Date.now() - this._startTime)) { - var c = a._world; - c && (a.state = new y(c, a.getMousePosition(b, null), c.getTransform().getMatrix(!0))); + var d = a._world; + d && (a.state = new k(d, a.getMousePosition(c, null), d.getTransform().getMatrix(!0))); } }; - b.prototype.onMouseUp = function(a, b) { - a.state = new n; - a.selectNodeUnderMouse(b); + c.prototype.onMouseUp = function(a, c) { + a.state = new h; + a.selectNodeUnderMouse(c); }; - return b; + return c; })(a); - var y = function(a) { - function b(c, e, g) { + var k = function(a) { + function c(g, h, d) { a.call(this); - this._target = c; - this._startPosition = e; - this._startMatrix = g; + this._target = g; + this._startPosition = h; + this._startMatrix = d; } - __extends(b, a); - b.prototype.onMouseMove = function(a, b) { - b.preventDefault(); - var c = a.getMousePosition(b, null); - c.sub(this._startPosition); - this._target.getTransform().setMatrix(this._startMatrix.clone().translate(c.x, c.y)); + __extends(c, a); + c.prototype.onMouseMove = function(a, c) { + c.preventDefault(); + var d = a.getMousePosition(c, null); + d.sub(this._startPosition); + this._target.getTransform().setMatrix(this._startMatrix.clone().translate(d.x, d.y)); a.state = this; }; - b.prototype.onMouseUp = function(a, b) { - a.state = new n; + c.prototype.onMouseUp = function(a, c) { + a.state = new h; }; - return b; + return c; }(a), a = function() { - function a(c, k, r) { - function v(a) { - d._state.onMouseWheel(d, a); - d._persistentState.onMouseWheel(d, a); + function a(c, g, k) { + function d(a) { + f._state.onMouseWheel(f, a); + f._persistentState.onMouseWheel(f, a); } - void 0 === k && (k = !1); - void 0 === r && (r = void 0); - this._state = new n; + void 0 === g && (g = !1); + void 0 === k && (k = void 0); + this._state = new h; this._persistentState = new p; this.paused = !1; this.viewport = null; this._selectedNodes = []; this._eventListeners = Object.create(null); this._fullScreen = !1; - e(c && 0 === c.children.length, "Easel container must be empty."); this._container = c; - this._stage = new m.Stage(512, 512, !0); + this._stage = new r.Stage(512, 512, !0); this._worldView = this._stage.content; - this._world = new m.Group; + this._world = new r.Group; this._worldView.addChild(this._world); - this._disableHiDPI = k; - k = document.createElement("div"); - k.style.position = "absolute"; - k.style.width = "100%"; - k.style.height = "100%"; - c.appendChild(k); - if (m.hud.value) { - var h = document.createElement("div"); - h.style.position = "absolute"; - h.style.width = "100%"; - h.style.height = "100%"; - h.style.pointerEvents = "none"; - var f = document.createElement("div"); - f.style.position = "absolute"; - f.style.width = "100%"; - f.style.height = "20px"; - f.style.pointerEvents = "none"; - h.appendChild(f); - c.appendChild(h); - this._fps = new b(f); + this._disableHiDPI = g; + g = document.createElement("div"); + g.style.position = "absolute"; + g.style.width = "100%"; + g.style.height = "100%"; + c.appendChild(g); + if (r.hud.value) { + var e = document.createElement("div"); + e.style.position = "absolute"; + e.style.width = "100%"; + e.style.height = "100%"; + e.style.pointerEvents = "none"; + var b = document.createElement("div"); + b.style.position = "absolute"; + b.style.width = "100%"; + b.style.height = "20px"; + b.style.pointerEvents = "none"; + e.appendChild(b); + c.appendChild(e); + this._fps = new m(b); } else { this._fps = null; } - this.transparent = h = 0 === r; - void 0 === r || 0 === r || g.ColorUtilities.rgbaToCSSStyle(r); - this._options = new m.Canvas2D.Canvas2DRendererOptions; - this._options.alpha = h; - this._renderer = new m.Canvas2D.Canvas2DRenderer(k, this._stage, this._options); + this.transparent = e = 0 === k; + void 0 === k || 0 === k || l.ColorUtilities.rgbaToCSSStyle(k); + this._options = new r.Canvas2D.Canvas2DRendererOptions; + this._options.alpha = e; + this._renderer = new r.Canvas2D.Canvas2DRenderer(g, this._stage, this._options); this._listenForContainerSizeChanges(); this._onMouseUp = this._onMouseUp.bind(this); this._onMouseDown = this._onMouseDown.bind(this); this._onMouseMove = this._onMouseMove.bind(this); - var d = this; + var f = this; window.addEventListener("mouseup", function(a) { - d._state.onMouseUp(d, a); - d._render(); + f._state.onMouseUp(f, a); + f._render(); }, !1); window.addEventListener("mousemove", function(a) { - d._state.onMouseMove(d, a); - d._persistentState.onMouseMove(d, a); + f._state.onMouseMove(f, a); + f._persistentState.onMouseMove(f, a); }, !1); - window.addEventListener("DOMMouseScroll", v); - window.addEventListener("mousewheel", v); + window.addEventListener("DOMMouseScroll", d); + window.addEventListener("mousewheel", d); c.addEventListener("mousedown", function(a) { - d._state.onMouseDown(d, a); + f._state.onMouseDown(f, a); }); window.addEventListener("keydown", function(a) { - d._state.onKeyDown(d, a); - if (d._state !== d._persistentState) { - d._persistentState.onKeyDown(d, a); + f._state.onKeyDown(f, a); + if (f._state !== f._persistentState) { + f._persistentState.onKeyDown(f, a); } }, !1); window.addEventListener("keypress", function(a) { - d._state.onKeyPress(d, a); - if (d._state !== d._persistentState) { - d._persistentState.onKeyPress(d, a); + f._state.onKeyPress(f, a); + if (f._state !== f._persistentState) { + f._persistentState.onKeyPress(f, a); } }, !1); window.addEventListener("keyup", function(a) { - d._state.onKeyUp(d, a); - if (d._state !== d._persistentState) { - d._persistentState.onKeyUp(d, a); + f._state.onKeyUp(f, a); + if (f._state !== f._persistentState) { + f._persistentState.onKeyUp(f, a); } }, !1); this._enterRenderLoop(); } a.prototype._listenForContainerSizeChanges = function() { - var a = this._containerWidth, b = this._containerHeight; + var a = this._containerWidth, c = this._containerHeight; this._onContainerSizeChanged(); - var c = this; + var g = this; setInterval(function() { - if (a !== c._containerWidth || b !== c._containerHeight) { - c._onContainerSizeChanged(), a = c._containerWidth, b = c._containerHeight; + if (a !== g._containerWidth || c !== g._containerHeight) { + g._onContainerSizeChanged(), a = g._containerWidth, c = g._containerHeight; } }, 10); }; a.prototype._onContainerSizeChanged = function() { - var a = this.getRatio(), b = Math.ceil(this._containerWidth * a), c = Math.ceil(this._containerHeight * a); - this._stage.setBounds(new k(0, 0, b, c)); - this._stage.content.setBounds(new k(0, 0, b, c)); - this._worldView.getTransform().setMatrix(new w(a, 0, 0, a, 0, 0)); + var a = this.getRatio(), g = Math.ceil(this._containerWidth * a), h = Math.ceil(this._containerHeight * a); + this._stage.setBounds(new t(0, 0, g, h)); + this._stage.content.setBounds(new t(0, 0, g, h)); + this._worldView.getTransform().setMatrix(new c(a, 0, 0, a, 0, 0)); this._dispatchEvent("resize"); }; - a.prototype.addEventListener = function(a, b) { + a.prototype.addEventListener = function(a, c) { this._eventListeners[a] || (this._eventListeners[a] = []); - this._eventListeners[a].push(b); + this._eventListeners[a].push(c); }; a.prototype._dispatchEvent = function(a) { if (a = this._eventListeners[a]) { - for (var b = 0;b < a.length;b++) { - a[b](); + for (var c = 0;c < a.length;c++) { + a[c](); } } }; a.prototype._enterRenderLoop = function() { var a = this; - requestAnimationFrame(function r() { + requestAnimationFrame(function v() { a.render(); - requestAnimationFrame(r); + requestAnimationFrame(v); }); }; Object.defineProperty(a.prototype, "state", {set:function(a) { @@ -11695,17 +11983,17 @@ __extends = this.__extends || function(g, m) { this._container.style.cursor = a; }, enumerable:!0, configurable:!0}); a.prototype._render = function() { - m.RenderableVideo.checkForVideoUpdates(); - var a = (this._stage.readyToRender() || m.forcePaint.value) && !this.paused, b = 0; + r.RenderableVideo.checkForVideoUpdates(); + var a = (this._stage.readyToRender() || r.forcePaint.value) && !this.paused, c = 0; if (a) { - var c = this._renderer; - c.viewport = this.viewport ? this.viewport : this._stage.getBounds(); + var g = this._renderer; + g.viewport = this.viewport ? this.viewport : this._stage.getBounds(); this._dispatchEvent("render"); - b = performance.now(); - c.render(); - b = performance.now() - b; + c = performance.now(); + g.render(); + c = performance.now() - c; } - this._fps && this._fps.tickAndRender(!a, b); + this._fps && this._fps.tickAndRender(!a, c); }; a.prototype.render = function() { this._render(); @@ -11726,16 +12014,16 @@ __extends = this.__extends || function(g, m) { return{stageWidth:this._containerWidth, stageHeight:this._containerHeight, pixelRatio:this.getRatio(), screenWidth:window.screen ? window.screen.width : 640, screenHeight:window.screen ? window.screen.height : 480}; }; a.prototype.toggleOption = function(a) { - var b = this._options; - b[a] = !b[a]; + var c = this._options; + c[a] = !c[a]; }; a.prototype.getOption = function() { return this._options.paintViewport; }; a.prototype.getRatio = function() { - var a = window.devicePixelRatio || 1, b = 1; - 1 === a || this._disableHiDPI || (b = a / 1); - return b; + var a = window.devicePixelRatio || 1, c = 1; + 1 === a || this._disableHiDPI || (c = a / 1); + return c; }; Object.defineProperty(a.prototype, "_containerWidth", {get:function() { return this._container.clientWidth; @@ -11750,15 +12038,15 @@ __extends = this.__extends || function(g, m) { (a = this._world) && this._selectedNodes.push(a); this._render(); }; - a.prototype.getMousePosition = function(a, b) { - var e = this._container, g = e.getBoundingClientRect(), h = this.getRatio(), e = new c(e.scrollWidth / g.width * (a.clientX - g.left) * h, e.scrollHeight / g.height * (a.clientY - g.top) * h); - if (!b) { - return e; + a.prototype.getMousePosition = function(a, h) { + var k = this._container, d = k.getBoundingClientRect(), e = this.getRatio(), k = new g(k.scrollWidth / d.width * (a.clientX - d.left) * e, k.scrollHeight / d.height * (a.clientY - d.top) * e); + if (!h) { + return k; } - g = w.createIdentity(); - b.getTransform().getConcatenatedMatrix().inverse(g); - g.transformPoint(e); - return e; + d = c.createIdentity(); + h.getTransform().getConcatenatedMatrix().inverse(d); + d.transformPoint(k); + return k; }; a.prototype.getMouseWorldPosition = function(a) { return this.getMousePosition(a, this._world); @@ -11769,113 +12057,113 @@ __extends = this.__extends || function(g, m) { }; a.prototype._onMouseMove = function(a) { }; - a.prototype.screenShot = function(a, b) { - return this._renderer.screenShot(a, b); + a.prototype.screenShot = function(a, c) { + return this._renderer.screenShot(a, c); }; return a; }(); - m.Easel = a; - })(g.GFX || (g.GFX = {})); + r.Easel = a; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = g.GFX.Geometry.Matrix; +(function(l) { + (function(r) { + var g = l.GFX.Geometry.Matrix; (function(c) { c[c.Simple = 0] = "Simple"; - })(m.Layout || (m.Layout = {})); + })(r.Layout || (r.Layout = {})); var c = function(c) { - function b() { + function a() { c.apply(this, arguments); this.layout = 0; } - __extends(b, c); - return b; - }(m.RendererOptions); - m.TreeRendererOptions = c; - var w = function(g) { - function b(a, b, e) { - void 0 === e && (e = new c); - g.call(this, a, b, e); + __extends(a, c); + return a; + }(r.RendererOptions); + r.TreeRendererOptions = c; + var t = function(l) { + function a(a, g, k) { + void 0 === k && (k = new c); + l.call(this, a, g, k); this._canvas = document.createElement("canvas"); this._container.appendChild(this._canvas); this._context = this._canvas.getContext("2d"); this._listenForContainerSizeChanges(); } - __extends(b, g); - b.prototype._listenForContainerSizeChanges = function() { - var a = this._containerWidth, b = this._containerHeight; + __extends(a, l); + a.prototype._listenForContainerSizeChanges = function() { + var a = this._containerWidth, c = this._containerHeight; this._onContainerSizeChanged(); - var c = this; + var g = this; setInterval(function() { - if (a !== c._containerWidth || b !== c._containerHeight) { - c._onContainerSizeChanged(), a = c._containerWidth, b = c._containerHeight; + if (a !== g._containerWidth || c !== g._containerHeight) { + g._onContainerSizeChanged(), a = g._containerWidth, c = g._containerHeight; } }, 10); }; - b.prototype._getRatio = function() { - var a = window.devicePixelRatio || 1, b = 1; - 1 !== a && (b = a / 1); - return b; + a.prototype._getRatio = function() { + var a = window.devicePixelRatio || 1, c = 1; + 1 !== a && (c = a / 1); + return c; }; - b.prototype._onContainerSizeChanged = function() { - var a = this._getRatio(), b = Math.ceil(this._containerWidth * a), c = Math.ceil(this._containerHeight * a), e = this._canvas; - 0 < a ? (e.width = b * a, e.height = c * a, e.style.width = b + "px", e.style.height = c + "px") : (e.width = b, e.height = c); + a.prototype._onContainerSizeChanged = function() { + var a = this._getRatio(), c = Math.ceil(this._containerWidth * a), g = Math.ceil(this._containerHeight * a), l = this._canvas; + 0 < a ? (l.width = c * a, l.height = g * a, l.style.width = c + "px", l.style.height = g + "px") : (l.width = c, l.height = g); }; - Object.defineProperty(b.prototype, "_containerWidth", {get:function() { + Object.defineProperty(a.prototype, "_containerWidth", {get:function() { return this._container.clientWidth; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "_containerHeight", {get:function() { + Object.defineProperty(a.prototype, "_containerHeight", {get:function() { return this._container.clientHeight; }, enumerable:!0, configurable:!0}); - b.prototype.render = function() { + a.prototype.render = function() { var a = this._context; a.save(); a.clearRect(0, 0, this._canvas.width, this._canvas.height); a.scale(1, 1); - 0 === this._options.layout && this._renderNodeSimple(this._context, this._stage, e.createIdentity()); + 0 === this._options.layout && this._renderNodeSimple(this._context, this._stage, g.createIdentity()); a.restore(); }; - b.prototype._renderNodeSimple = function(a, b, c) { - function e(b) { + a.prototype._renderNodeSimple = function(a, c, g) { + function l(b) { var c = b.getChildren(); a.fillStyle = b.hasFlags(16) ? "red" : "white"; - var d = String(b.id); - b instanceof m.RenderableText ? d = "T" + d : b instanceof m.RenderableShape ? d = "S" + d : b instanceof m.RenderableBitmap ? d = "B" + d : b instanceof m.RenderableVideo && (d = "V" + d); - b instanceof m.Renderable && (d = d + " [" + b._parents.length + "]"); - b = a.measureText(d).width; - a.fillText(d, k, t); + var g = String(b.id); + b instanceof r.RenderableText ? g = "T" + g : b instanceof r.RenderableShape ? g = "S" + g : b instanceof r.RenderableBitmap ? g = "B" + g : b instanceof r.RenderableVideo && (g = "V" + g); + b instanceof r.Renderable && (g = g + " [" + b._parents.length + "]"); + b = a.measureText(g).width; + a.fillText(g, s, t); if (c) { - k += b + 4; - u = Math.max(u, k + 20); - for (d = 0;d < c.length;d++) { - e(c[d]), d < c.length - 1 && (t += 18, t > g._canvas.height && (a.fillStyle = "gray", k = k - r + u + 8, r = u + 8, t = 0, a.fillStyle = "white")); + s += b + 4; + e = Math.max(e, s + 20); + for (g = 0;g < c.length;g++) { + l(c[g]), g < c.length - 1 && (t += 18, t > m._canvas.height && (a.fillStyle = "gray", s = s - d + e + 8, d = e + 8, t = 0, a.fillStyle = "white")); } - k -= b + 4; + s -= b + 4; } } - var g = this; + var m = this; a.save(); a.font = "16px Arial"; a.fillStyle = "white"; - var k = 0, t = 0, r = 0, u = 0; - e(b); + var s = 0, t = 0, d = 0, e = 0; + l(c); a.restore(); }; - return b; - }(m.Renderer); - m.TreeRenderer = w; - })(g.GFX || (g.GFX = {})); + return a; + }(r.Renderer); + r.TreeRenderer = t; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.GFX.BlurFilter, w = g.GFX.DropshadowFilter, k = g.GFX.Shape, b = g.GFX.Group, a = g.GFX.RenderableShape, n = g.GFX.RenderableMorphShape, p = g.GFX.RenderableBitmap, y = g.GFX.RenderableVideo, v = g.GFX.RenderableText, l = g.GFX.ColorMatrix, t = g.ShapeData, r = g.ArrayUtilities.DataBuffer, u = g.GFX.Stage, h = g.GFX.Geometry.Matrix, f = g.GFX.Geometry.Rectangle, d = g.Debug.assert, q = function() { +(function(l) { + (function(r) { + (function(g) { + var c = l.GFX.BlurFilter, t = l.GFX.DropshadowFilter, m = l.GFX.Shape, a = l.GFX.Group, h = l.GFX.RenderableShape, p = l.GFX.RenderableMorphShape, k = l.GFX.RenderableBitmap, u = l.GFX.RenderableVideo, n = l.GFX.RenderableText, s = l.GFX.ColorMatrix, v = l.ShapeData, d = l.ArrayUtilities.DataBuffer, e = l.GFX.Stage, b = l.GFX.Geometry.Matrix, f = l.GFX.Geometry.Rectangle, q = function() { function a() { } a.prototype.writeMouseEvent = function(a, b) { var c = this.output; c.writeInt(300); - var d = g.Remoting.MouseEventNames.indexOf(a.type); + var d = l.Remoting.MouseEventNames.indexOf(a.type); c.writeInt(d); c.writeFloat(b.x); c.writeFloat(b.y); @@ -11885,7 +12173,7 @@ __extends = this.__extends || function(g, m) { a.prototype.writeKeyboardEvent = function(a) { var b = this.output; b.writeInt(301); - var c = g.Remoting.KeyboardEventNames.indexOf(a.type); + var c = l.Remoting.KeyboardEventNames.indexOf(a.type); b.writeInt(c); b.writeInt(a.keyCode); b.writeInt(a.charCode); @@ -11899,21 +12187,21 @@ __extends = this.__extends || function(g, m) { }; return a; }(); - e.GFXChannelSerializer = q; + g.GFXChannelSerializer = q; q = function() { function a(b, c, d) { - function e(a) { + function f(a) { a = a.getBounds(!0); var c = b.easel.getRatio(); a.scale(1 / c, 1 / c); a.snap(); - f.setBounds(a); + g.setBounds(a); } - var f = this.stage = new u(128, 512); - "undefined" !== typeof registerInspectorStage && registerInspectorStage(f); - e(b.stage); - b.stage.addEventListener(1, e); - b.content = f.content; + var g = this.stage = new e(128, 512); + "undefined" !== typeof registerInspectorStage && registerInspectorStage(g); + f(b.stage); + b.stage.addEventListener(1, f); + b.content = g.content; d && this.stage.setFlags(32768); c.addChild(this.stage); this._nodes = []; @@ -11924,7 +12212,6 @@ __extends = this.__extends || function(g, m) { } a.prototype._registerAsset = function(a, b, c) { "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(a, b, c); - this._assets[a] && console.warn("Asset already exists: " + a + ". old:", this._assets[a], "new: " + c); this._assets[a] = c; }; a.prototype._makeNode = function(a) { @@ -11932,9 +12219,7 @@ __extends = this.__extends || function(g, m) { return null; } var b = null; - a & 134217728 ? (a &= -134217729, b = this._assets[a].wrap()) : b = this._nodes[a]; - d(b, "Node " + b + " of " + a + " has not been sent yet."); - return b; + return b = a & 134217728 ? this._assets[a & -134217729].wrap() : this._nodes[a]; }; a.prototype._getAsset = function(a) { return this._assets[a]; @@ -11949,40 +12234,39 @@ __extends = this.__extends || function(g, m) { return this._assets[a]; }; a.prototype.registerFont = function(a, b, c) { - g.registerCSSFont(a, b.data, !inFirefox); + l.registerCSSFont(a, b.data, !inFirefox); inFirefox ? c(null) : window.setTimeout(c, 400); }; a.prototype.registerImage = function(a, b, c, d) { this._registerAsset(a, b, this._decodeImage(c.dataType, c.data, d)); }; a.prototype.registerVideo = function(a) { - this._registerAsset(a, 0, new y(a, this)); + this._registerAsset(a, 0, new u(a, this)); }; a.prototype._decodeImage = function(a, b, c) { - var e = new Image, h = p.FromImage(e); - e.src = URL.createObjectURL(new Blob([b], {type:g.getMIMETypeForImageType(a)})); - e.onload = function() { - d(!h.parent); - h.setBounds(new f(0, 0, e.width, e.height)); - h.invalidate(); - c({width:e.width, height:e.height}); + var d = new Image, e = k.FromImage(d); + d.src = URL.createObjectURL(new Blob([b], {type:l.getMIMETypeForImageType(a)})); + d.onload = function() { + e.setBounds(new f(0, 0, d.width, d.height)); + e.invalidate(); + c({width:d.width, height:d.height}); }; - e.onerror = function() { + d.onerror = function() { c(null); }; - return h; + return e; }; a.prototype.sendVideoPlaybackEvent = function(a, b, c) { this._easelHost.sendVideoPlaybackEvent(a, b, c); }; return a; }(); - e.GFXChannelDeserializerContext = q; + g.GFXChannelDeserializerContext = q; q = function() { function e() { } e.prototype.read = function() { - for (var a = 0, b = this.input, c = 0, e = 0, f = 0, g = 0, h = 0, k = 0, l = 0, p = 0;0 < b.bytesAvailable;) { + for (var a = 0, b = this.input, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, k = 0, l = 0;0 < b.bytesAvailable;) { switch(a = b.readInt(), a) { case 0: return; @@ -11991,35 +12275,31 @@ __extends = this.__extends || function(g, m) { this._readUpdateGraphics(); break; case 102: - e++; + d++; this._readUpdateBitmapData(); break; case 103: - f++; + e++; this._readUpdateTextContent(); break; case 100: - g++; + f++; this._readUpdateFrame(); break; case 104: - h++; + g++; this._readUpdateStage(); break; case 105: - k++; + h++; this._readUpdateNetStream(); break; case 200: - l++; + k++; this._readDrawToBitmap(); break; case 106: - p++; - this._readRequestBitmapData(); - break; - default: - d(!1, "Unknown MessageReader tag: " + a); + l++, this._readRequestBitmapData(); } } }; @@ -12034,7 +12314,7 @@ __extends = this.__extends || function(g, m) { return b; }; e.prototype._readColorMatrix = function() { - var a = this.input, b = e._temporaryReadColorMatrix, c = 1, d = 1, f = 1, g = 1, h = 0, k = 0, l = 0, p = 0; + var a = this.input, b = e._temporaryReadColorMatrix, c = 1, d = 1, f = 1, g = 1, h = 0, k = 0, l = 0, m = 0; switch(a.readInt()) { case 0: return e._temporaryReadColorMatrixIdentity; @@ -12042,9 +12322,9 @@ __extends = this.__extends || function(g, m) { g = a.readFloat(); break; case 2: - c = a.readFloat(), d = a.readFloat(), f = a.readFloat(), g = a.readFloat(), h = a.readInt(), k = a.readInt(), l = a.readInt(), p = a.readInt(); + c = a.readFloat(), d = a.readFloat(), f = a.readFloat(), g = a.readFloat(), h = a.readInt(), k = a.readInt(), l = a.readInt(), m = a.readInt(); } - b.setMultipliersAndOffsets(c, d, f, g, h, k, l, p); + b.setMultipliersAndOffsets(c, d, f, g, h, k, l, m); return b; }; e.prototype._readAsset = function() { @@ -12053,36 +12333,35 @@ __extends = this.__extends || function(g, m) { return b; }; e.prototype._readUpdateGraphics = function() { - for (var b = this.input, c = this.context, d = b.readInt(), e = b.readInt(), f = c._getAsset(d), g = this._readRectangle(), h = t.FromPlainObject(this._readAsset()), k = b.readInt(), l = [], p = 0;p < k;p++) { - var m = b.readInt(); - l.push(c._getBitmapAsset(m)); + for (var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), e = b._getAsset(c), f = this._readRectangle(), g = v.FromPlainObject(this._readAsset()), k = a.readInt(), l = [], m = 0;m < k;m++) { + var n = a.readInt(); + l.push(b._getBitmapAsset(n)); } - if (f) { - f.update(h, l, g); + if (e) { + e.update(g, l, f); } else { - b = h.morphCoordinates ? new n(d, h, l, g) : new a(d, h, l, g); - for (p = 0;p < l.length;p++) { - l[p] && l[p].addRenderableParent(b); + a = g.morphCoordinates ? new p(c, g, l, f) : new h(c, g, l, f); + for (m = 0;m < l.length;m++) { + l[m] && l[m].addRenderableParent(a); } - c._registerAsset(d, e, b); + b._registerAsset(c, d, a); } }; e.prototype._readUpdateBitmapData = function() { - var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), e = b._getBitmapAsset(c), f = this._readRectangle(), a = a.readInt(), g = r.FromPlainObject(this._readAsset()); - e ? e.updateFromDataBuffer(a, g) : (e = p.FromDataBuffer(a, g, f), b._registerAsset(c, d, e)); + var a = this.input, b = this.context, c = a.readInt(), e = a.readInt(), f = b._getBitmapAsset(c), g = this._readRectangle(), a = a.readInt(), h = d.FromPlainObject(this._readAsset()); + f ? f.updateFromDataBuffer(a, h) : (f = k.FromDataBuffer(a, h, g), b._registerAsset(c, e, f)); }; e.prototype._readUpdateTextContent = function() { - var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), e = b._getTextAsset(c), f = this._readRectangle(), g = this._readMatrix(), h = a.readInt(), k = a.readInt(), l = a.readInt(), p = a.readBoolean(), n = a.readInt(), m = a.readInt(), q = this._readAsset(), t = r.FromPlainObject(this._readAsset()), u = null, w = a.readInt(); - w && (u = new r(4 * w), a.readBytes(u, 4 * w)); - e ? (e.setBounds(f), e.setContent(q, t, g, u), e.setStyle(h, k, n, m), e.reflow(l, p)) : (e = new v(f), e.setContent(q, t, g, u), e.setStyle(h, k, n, m), e.reflow(l, p), b._registerAsset(c, d, e)); + var a = this.input, b = this.context, c = a.readInt(), e = a.readInt(), f = b._getTextAsset(c), g = this._readRectangle(), h = this._readMatrix(), k = a.readInt(), l = a.readInt(), m = a.readInt(), p = a.readBoolean(), q = a.readInt(), r = a.readInt(), s = this._readAsset(), u = d.FromPlainObject(this._readAsset()), t = null, v = a.readInt(); + v && (t = new d(4 * v), a.readBytes(t, 4 * v)); + f ? (f.setBounds(g), f.setContent(s, u, h, t), f.setStyle(k, l, q, r), f.reflow(m, p)) : (f = new n(g), f.setContent(s, u, h, t), f.setStyle(k, l, q, r), f.reflow(m, p), b._registerAsset(c, e, f)); if (this.output) { - for (a = e.textRect, this.output.writeInt(20 * a.w), this.output.writeInt(20 * a.h), this.output.writeInt(20 * a.x), e = e.lines, a = e.length, this.output.writeInt(a), b = 0;b < a;b++) { - this._writeLineMetrics(e[b]); + for (a = f.textRect, this.output.writeInt(20 * a.w), this.output.writeInt(20 * a.h), this.output.writeInt(20 * a.x), f = f.lines, a = f.length, this.output.writeInt(a), b = 0;b < a;b++) { + this._writeLineMetrics(f[b]); } } }; e.prototype._writeLineMetrics = function(a) { - d(this.output); this.output.writeInt(a.x); this.output.writeInt(a.width); this.output.writeInt(a.ascent); @@ -12094,13 +12373,13 @@ __extends = this.__extends || function(g, m) { a._nodes[b] || (a._nodes[b] = a.stage.content); var b = this.input.readInt(), c = this._readRectangle(); a.stage.content.setBounds(c); - a.stage.color = g.Color.FromARGB(b); + a.stage.color = l.Color.FromARGB(b); a.stage.align = this.input.readInt(); a.stage.scaleMode = this.input.readInt(); b = this.input.readInt(); this.input.readInt(); c = this.input.readInt(); - a._easelHost.cursor = g.UI.toCSSCursor(c); + a._easelHost.cursor = l.UI.toCSSCursor(c); a._easelHost.fullscreen = 0 === b || 1 === b; }; e.prototype._readUpdateNetStream = function() { @@ -12112,218 +12391,217 @@ __extends = this.__extends || function(g, m) { var b = this.input, d = b.readInt(), e = []; if (d) { for (var f = 0;f < d;f++) { - var h = b.readInt(); - switch(h) { + var g = b.readInt(); + switch(g) { case 0: e.push(new c(b.readFloat(), b.readFloat(), b.readInt())); break; case 1: - e.push(new w(b.readFloat(), b.readFloat(), b.readFloat(), b.readFloat(), b.readInt(), b.readFloat(), b.readBoolean(), b.readBoolean(), b.readBoolean(), b.readInt(), b.readFloat())); + e.push(new t(b.readFloat(), b.readFloat(), b.readFloat(), b.readFloat(), b.readInt(), b.readFloat(), b.readBoolean(), b.readBoolean(), b.readBoolean(), b.readInt(), b.readFloat())); break; default: - g.Debug.somewhatImplemented(m.FilterType[h]); + l.Debug.somewhatImplemented(r.FilterType[g]); } } a.getLayer().filters = e; } }; e.prototype._readUpdateFrame = function() { - var a = this.input, c = this.context, e = a.readInt(), f = 0, g = c._nodes[e]; - g || (g = c._nodes[e] = new b); - var h = a.readInt(); - h & 1 && g.getTransform().setMatrix(this._readMatrix()); - h & 8 && g.getTransform().setColorMatrix(this._readColorMatrix()); - if (h & 64) { - var l = a.readInt(); - 0 <= l && (g.getLayer().mask = c._makeNode(l)); + var b = this.input, c = this.context, d = b.readInt(), e = 0, f = c._nodes[d]; + f || (f = c._nodes[d] = new a); + d = b.readInt(); + d & 1 && f.getTransform().setMatrix(this._readMatrix()); + d & 8 && f.getTransform().setColorMatrix(this._readColorMatrix()); + if (d & 64) { + var g = b.readInt(); + 0 <= g && (f.getLayer().mask = c._makeNode(g)); } - h & 128 && (g.clip = a.readInt()); - h & 32 && (f = a.readInt() / 65535, d(0 <= f && 1 >= f), l = a.readInt(), 1 !== l && (g.getLayer().blendMode = l), this._readFilters(g), g.toggleFlags(65536, a.readBoolean()), g.toggleFlags(131072, a.readBoolean()), g.toggleFlags(262144, !!a.readInt()), g.toggleFlags(524288, !!a.readInt())); - if (h & 4) { - h = a.readInt(); - l = g; - l.clearChildren(); - for (var p = 0;p < h;p++) { - var n = a.readInt(), m = c._makeNode(n); - d(m, "Child " + n + " of " + e + " has not been sent yet."); - l.addChild(m); + d & 128 && (f.clip = b.readInt()); + d & 32 && (e = b.readInt() / 65535, g = b.readInt(), 1 !== g && (f.getLayer().blendMode = g), this._readFilters(f), f.toggleFlags(65536, b.readBoolean()), f.toggleFlags(131072, b.readBoolean()), f.toggleFlags(262144, !!b.readInt()), f.toggleFlags(524288, !!b.readInt())); + if (d & 4) { + d = b.readInt(); + g = f; + g.clearChildren(); + for (var h = 0;h < d;h++) { + var k = b.readInt(), k = c._makeNode(k); + g.addChild(k); } } - f && (m = g.getChildren()[0], m instanceof k && (m.ratio = f)); + e && (k = f.getChildren()[0], k instanceof m && (k.ratio = e)); }; e.prototype._readDrawToBitmap = function() { - var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), e = a.readInt(), f, g, k; - f = e & 1 ? this._readMatrix().clone() : h.createIdentity(); - e & 8 && (g = this._readColorMatrix()); - e & 16 && (k = this._readRectangle()); - e = a.readInt(); + var a = this.input, c = this.context, d = a.readInt(), e = a.readInt(), f = a.readInt(), g, h, l; + g = f & 1 ? this._readMatrix().clone() : b.createIdentity(); + f & 8 && (h = this._readColorMatrix()); + f & 16 && (l = this._readRectangle()); + f = a.readInt(); a.readBoolean(); - a = b._getBitmapAsset(c); - d = b._makeNode(d); - a ? a.drawNode(d, f, g, e, k) : b._registerAsset(c, -1, p.FromNode(d, f, g, e, k)); + a = c._getBitmapAsset(d); + e = c._makeNode(e); + a ? a.drawNode(e, g, h, f, l) : c._registerAsset(d, -1, k.FromNode(e, g, h, f, l)); }; e.prototype._readRequestBitmapData = function() { var a = this.output, b = this.context, c = this.input.readInt(); b._getBitmapAsset(c).readImageData(a); }; - e._temporaryReadMatrix = h.createIdentity(); + e._temporaryReadMatrix = b.createIdentity(); e._temporaryReadRectangle = f.createEmpty(); - e._temporaryReadColorMatrix = l.createIdentity(); - e._temporaryReadColorMatrixIdentity = l.createIdentity(); + e._temporaryReadColorMatrix = s.createIdentity(); + e._temporaryReadColorMatrixIdentity = s.createIdentity(); return e; }(); - e.GFXChannelDeserializer = q; - })(m.GFX || (m.GFX = {})); - })(g.Remoting || (g.Remoting = {})); + g.GFXChannelDeserializer = q; + })(r.GFX || (r.GFX = {})); + })(l.Remoting || (l.Remoting = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - var e = g.GFX.Geometry.Point, c = g.ArrayUtilities.DataBuffer, w = function() { - function k(b) { - this._easel = b; - var a = b.transparent; - this._group = b.world; +(function(l) { + (function(r) { + var g = l.GFX.Geometry.Point, c = l.ArrayUtilities.DataBuffer, t = function() { + function m(a) { + this._easel = a; + var c = a.transparent; + this._group = a.world; this._content = null; this._fullscreen = !1; - this._context = new g.Remoting.GFX.GFXChannelDeserializerContext(this, this._group, a); + this._context = new l.Remoting.GFX.GFXChannelDeserializerContext(this, this._group, c); this._addEventListeners(); } - k.prototype.onSendUpdates = function(b, a) { + m.prototype.onSendUpdates = function(a, c) { throw Error("This method is abstract"); }; - Object.defineProperty(k.prototype, "easel", {get:function() { + Object.defineProperty(m.prototype, "easel", {get:function() { return this._easel; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "stage", {get:function() { + Object.defineProperty(m.prototype, "stage", {get:function() { return this._easel.stage; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "content", {set:function(b) { - this._content = b; + Object.defineProperty(m.prototype, "content", {set:function(a) { + this._content = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "cursor", {set:function(b) { - this._easel.cursor = b; + Object.defineProperty(m.prototype, "cursor", {set:function(a) { + this._easel.cursor = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "fullscreen", {set:function(b) { - if (this._fullscreen !== b) { - this._fullscreen = b; - var a = window.FirefoxCom; - a && a.request("setFullscreen", b, null); + Object.defineProperty(m.prototype, "fullscreen", {set:function(a) { + if (this._fullscreen !== a) { + this._fullscreen = a; + var c = window.FirefoxCom; + c && c.request("setFullscreen", a, null); } }, enumerable:!0, configurable:!0}); - k.prototype._mouseEventListener = function(b) { - var a = this._easel.getMousePosition(b, this._content), a = new e(a.x, a.y), k = new c, p = new g.Remoting.GFX.GFXChannelSerializer; - p.output = k; - p.writeMouseEvent(b, a); - this.onSendUpdates(k, []); + m.prototype._mouseEventListener = function(a) { + var h = this._easel.getMousePosition(a, this._content), h = new g(h.x, h.y), m = new c, k = new l.Remoting.GFX.GFXChannelSerializer; + k.output = m; + k.writeMouseEvent(a, h); + this.onSendUpdates(m, []); }; - k.prototype._keyboardEventListener = function(b) { - var a = new c, e = new g.Remoting.GFX.GFXChannelSerializer; - e.output = a; - e.writeKeyboardEvent(b); - this.onSendUpdates(a, []); + m.prototype._keyboardEventListener = function(a) { + var g = new c, m = new l.Remoting.GFX.GFXChannelSerializer; + m.output = g; + m.writeKeyboardEvent(a); + this.onSendUpdates(g, []); }; - k.prototype._addEventListeners = function() { - for (var b = this._mouseEventListener.bind(this), a = this._keyboardEventListener.bind(this), c = k._mouseEvents, e = 0;e < c.length;e++) { - window.addEventListener(c[e], b); + m.prototype._addEventListeners = function() { + for (var a = this._mouseEventListener.bind(this), c = this._keyboardEventListener.bind(this), g = m._mouseEvents, k = 0;k < g.length;k++) { + window.addEventListener(g[k], a); } - b = k._keyboardEvents; - for (e = 0;e < b.length;e++) { - window.addEventListener(b[e], a); + a = m._keyboardEvents; + for (k = 0;k < a.length;k++) { + window.addEventListener(a[k], c); } this._addFocusEventListeners(); this._easel.addEventListener("resize", this._resizeEventListener.bind(this)); }; - k.prototype._sendFocusEvent = function(b) { - var a = new c, e = new g.Remoting.GFX.GFXChannelSerializer; - e.output = a; - e.writeFocusEvent(b); - this.onSendUpdates(a, []); + m.prototype._sendFocusEvent = function(a) { + var g = new c, m = new l.Remoting.GFX.GFXChannelSerializer; + m.output = g; + m.writeFocusEvent(a); + this.onSendUpdates(g, []); }; - k.prototype._addFocusEventListeners = function() { - var b = this; - document.addEventListener("visibilitychange", function(a) { - b._sendFocusEvent(document.hidden ? 0 : 1); + m.prototype._addFocusEventListeners = function() { + var a = this; + document.addEventListener("visibilitychange", function(c) { + a._sendFocusEvent(document.hidden ? 0 : 1); }); - window.addEventListener("focus", function(a) { - b._sendFocusEvent(3); + window.addEventListener("focus", function(c) { + a._sendFocusEvent(3); }); - window.addEventListener("blur", function(a) { - b._sendFocusEvent(2); + window.addEventListener("blur", function(c) { + a._sendFocusEvent(2); }); }; - k.prototype._resizeEventListener = function() { + m.prototype._resizeEventListener = function() { this.onDisplayParameters(this._easel.getDisplayParameters()); }; - k.prototype.onDisplayParameters = function(b) { + m.prototype.onDisplayParameters = function(a) { throw Error("This method is abstract"); }; - k.prototype.processUpdates = function(b, a, c) { - void 0 === c && (c = null); - var e = new g.Remoting.GFX.GFXChannelDeserializer; - e.input = b; - e.inputAssets = a; - e.output = c; - e.context = this._context; - e.read(); + m.prototype.processUpdates = function(a, c, g) { + void 0 === g && (g = null); + var k = new l.Remoting.GFX.GFXChannelDeserializer; + k.input = a; + k.inputAssets = c; + k.output = g; + k.context = this._context; + k.read(); }; - k.prototype.processExternalCommand = function(b) { - if ("isEnabled" === b.action) { - b.result = !1; + m.prototype.processExternalCommand = function(a) { + if ("isEnabled" === a.action) { + a.result = !1; } else { throw Error("This command is not supported"); } }; - k.prototype.processVideoControl = function(b, a, c) { - var e = this._context, g = e._getVideoAsset(b); - if (!g) { - if (1 != a) { + m.prototype.processVideoControl = function(a, c, g) { + var k = this._context, l = k._getVideoAsset(a); + if (!l) { + if (1 !== c) { return; } - e.registerVideo(b); - g = e._getVideoAsset(b); + k.registerVideo(a); + l = k._getVideoAsset(a); } - return g.processControlRequest(a, c); + return l.processControlRequest(c, g); }; - k.prototype.processRegisterFontOrImage = function(b, a, c, e, k) { - "font" === c ? this._context.registerFont(b, e, k) : (g.Debug.assert("image" === c), this._context.registerImage(b, a, e, k)); + m.prototype.processRegisterFontOrImage = function(a, c, g, k, l) { + "font" === g ? this._context.registerFont(a, k, l) : this._context.registerImage(a, c, k, l); }; - k.prototype.processFSCommand = function(b, a) { + m.prototype.processFSCommand = function(a, c) { }; - k.prototype.processFrame = function() { + m.prototype.processFrame = function() { }; - k.prototype.onExernalCallback = function(b) { + m.prototype.onExernalCallback = function(a) { throw Error("This method is abstract"); }; - k.prototype.sendExernalCallback = function(b, a) { - var c = {functionName:b, args:a}; - this.onExernalCallback(c); - if (c.error) { - throw Error(c.error); + m.prototype.sendExernalCallback = function(a, c) { + var g = {functionName:a, args:c}; + this.onExernalCallback(g); + if (g.error) { + throw Error(g.error); } - return c.result; + return g.result; }; - k.prototype.onVideoPlaybackEvent = function(b, a, c) { + m.prototype.onVideoPlaybackEvent = function(a, c, g) { throw Error("This method is abstract"); }; - k.prototype.sendVideoPlaybackEvent = function(b, a, c) { - this.onVideoPlaybackEvent(b, a, c); + m.prototype.sendVideoPlaybackEvent = function(a, c, g) { + this.onVideoPlaybackEvent(a, c, g); }; - k._mouseEvents = g.Remoting.MouseEventNames; - k._keyboardEvents = g.Remoting.KeyboardEventNames; - return k; + m._mouseEvents = l.Remoting.MouseEventNames; + m._keyboardEvents = l.Remoting.KeyboardEventNames; + return m; }(); - m.EaselHost = w; - })(g.GFX || (g.GFX = {})); + r.EaselHost = t; + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.ArrayUtilities.DataBuffer, w = g.CircularBuffer, k = g.Tools.Profiler.TimelineBuffer, b = function(a) { - function b(c, e, g) { +(function(l) { + (function(r) { + (function(g) { + var c = l.ArrayUtilities.DataBuffer, t = l.CircularBuffer, m = l.Tools.Profiler.TimelineBuffer, a = function(a) { + function g(c, l, m) { a.call(this, c); this._timelineRequests = Object.create(null); - this._playerWindow = e; - this._window = g; + this._playerWindow = l; + this._window = m; this._window.addEventListener("message", function(a) { this.onWindowMessage(a.data); }.bind(this)); @@ -12331,130 +12609,130 @@ __extends = this.__extends || function(g, m) { this.onWindowMessage(a.detail, !1); }.bind(this)); } - __extends(b, a); - b.prototype.onSendUpdates = function(a, b) { - var c = a.getBytes(); - this._playerWindow.postMessage({type:"gfx", updates:c, assets:b}, "*", [c.buffer]); + __extends(g, a); + g.prototype.onSendUpdates = function(a, c) { + var g = a.getBytes(); + this._playerWindow.postMessage({type:"gfx", updates:g, assets:c}, "*", [g.buffer]); }; - b.prototype.onExernalCallback = function(a) { - var b = this._playerWindow.document.createEvent("CustomEvent"); - b.initCustomEvent("syncmessage", !1, !1, {type:"externalCallback", request:a}); - this._playerWindow.dispatchEvent(b); + g.prototype.onExernalCallback = function(a) { + var c = this._playerWindow.document.createEvent("CustomEvent"); + c.initCustomEvent("syncmessage", !1, !1, {type:"externalCallback", request:a}); + this._playerWindow.dispatchEvent(c); }; - b.prototype.onDisplayParameters = function(a) { + g.prototype.onDisplayParameters = function(a) { this._playerWindow.postMessage({type:"displayParameters", params:a}, "*"); }; - b.prototype.onVideoPlaybackEvent = function(a, b, c) { - var e = this._playerWindow.document.createEvent("CustomEvent"); - e.initCustomEvent("syncmessage", !1, !1, {type:"videoPlayback", id:a, eventType:b, data:c}); - this._playerWindow.dispatchEvent(e); + g.prototype.onVideoPlaybackEvent = function(a, c, g) { + var h = this._playerWindow.document.createEvent("CustomEvent"); + h.initCustomEvent("syncmessage", !1, !1, {type:"videoPlayback", id:a, eventType:c, data:g}); + this._playerWindow.dispatchEvent(h); }; - b.prototype.requestTimeline = function(a, b) { - return new Promise(function(c) { - this._timelineRequests[a] = c; - this._playerWindow.postMessage({type:"timeline", cmd:b, request:a}, "*"); + g.prototype.requestTimeline = function(a, c) { + return new Promise(function(g) { + this._timelineRequests[a] = g; + this._playerWindow.postMessage({type:"timeline", cmd:c, request:a}, "*"); }.bind(this)); }; - b.prototype.onWindowMessage = function(a, b) { - void 0 === b && (b = !0); + g.prototype.onWindowMessage = function(a, g) { + void 0 === g && (g = !0); if ("object" === typeof a && null !== a) { if ("player" === a.type) { - var e = c.FromArrayBuffer(a.updates.buffer); - if (b) { - this.processUpdates(e, a.assets); + var h = c.FromArrayBuffer(a.updates.buffer); + if (g) { + this.processUpdates(h, a.assets); } else { - var g = new c; - this.processUpdates(e, a.assets, g); - a.result = g.toPlainObject(); + var l = new c; + this.processUpdates(h, a.assets, l); + a.result = l.toPlainObject(); } } else { - "frame" !== a.type && ("external" === a.type ? this.processExternalCommand(a.request) : "videoControl" === a.type ? a.result = this.processVideoControl(a.id, a.eventType, a.data) : "registerFontOrImage" === a.type ? this.processRegisterFontOrImage(a.syncId, a.symbolId, a.assetType, a.data, a.resolve) : "fscommand" !== a.type && "timelineResponse" === a.type && a.timeline && (a.timeline.__proto__ = k.prototype, a.timeline._marks.__proto__ = w.prototype, a.timeline._times.__proto__ = - w.prototype, this._timelineRequests[a.request](a.timeline))); + "frame" !== a.type && ("external" === a.type ? this.processExternalCommand(a.request) : "videoControl" === a.type ? a.result = this.processVideoControl(a.id, a.eventType, a.data) : "registerFontOrImage" === a.type ? this.processRegisterFontOrImage(a.syncId, a.symbolId, a.assetType, a.data, a.resolve) : "fscommand" !== a.type && "timelineResponse" === a.type && a.timeline && (a.timeline.__proto__ = m.prototype, a.timeline._marks.__proto__ = t.prototype, a.timeline._times.__proto__ = + t.prototype, this._timelineRequests[a.request](a.timeline))); } } }; - return b; - }(m.EaselHost); - e.WindowEaselHost = b; - })(m.Window || (m.Window = {})); - })(g.GFX || (g.GFX = {})); + return g; + }(r.EaselHost); + g.WindowEaselHost = a; + })(r.Window || (r.Window = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); -(function(g) { - (function(m) { - (function(e) { - var c = g.ArrayUtilities.DataBuffer, w = function(e) { - function b(a) { - e.call(this, a); - this._worker = g.Player.Test.FakeSyncWorker.instance; +(function(l) { + (function(r) { + (function(g) { + var c = l.ArrayUtilities.DataBuffer, t = function(g) { + function a(a) { + g.call(this, a); + this._worker = l.Player.Test.FakeSyncWorker.instance; this._worker.addEventListener("message", this._onWorkerMessage.bind(this)); this._worker.addEventListener("syncmessage", this._onSyncWorkerMessage.bind(this)); } - __extends(b, e); - b.prototype.onSendUpdates = function(a, b) { - var c = a.getBytes(); - this._worker.postMessage({type:"gfx", updates:c, assets:b}, [c.buffer]); + __extends(a, g); + a.prototype.onSendUpdates = function(a, c) { + var g = a.getBytes(); + this._worker.postMessage({type:"gfx", updates:g, assets:c}, [g.buffer]); }; - b.prototype.onExernalCallback = function(a) { + a.prototype.onExernalCallback = function(a) { this._worker.postSyncMessage({type:"externalCallback", request:a}); }; - b.prototype.onDisplayParameters = function(a) { + a.prototype.onDisplayParameters = function(a) { this._worker.postMessage({type:"displayParameters", params:a}); }; - b.prototype.onVideoPlaybackEvent = function(a, b, c) { - this._worker.postMessage({type:"videoPlayback", id:a, eventType:b, data:c}); + a.prototype.onVideoPlaybackEvent = function(a, c, g) { + this._worker.postMessage({type:"videoPlayback", id:a, eventType:c, data:g}); }; - b.prototype.requestTimeline = function(a, b) { - var c; + a.prototype.requestTimeline = function(a, c) { + var g; switch(a) { case "AVM2": - c = g.AVM2.timelineBuffer; + g = l.AVM2.timelineBuffer; break; case "Player": - c = g.Player.timelineBuffer; + g = l.Player.timelineBuffer; break; case "SWF": - c = g.SWF.timelineBuffer; + g = l.SWF.timelineBuffer; } - "clear" === b && c && c.reset(); - return Promise.resolve(c); + "clear" === c && g && g.reset(); + return Promise.resolve(g); }; - b.prototype._onWorkerMessage = function(a, b) { - void 0 === b && (b = !0); - var e = a.data; - if ("object" === typeof e && null !== e) { - switch(e.type) { + a.prototype._onWorkerMessage = function(a, g) { + void 0 === g && (g = !0); + var k = a.data; + if ("object" === typeof k && null !== k) { + switch(k.type) { case "player": - var g = c.FromArrayBuffer(e.updates.buffer); - if (b) { - this.processUpdates(g, e.assets); + var l = c.FromArrayBuffer(k.updates.buffer); + if (g) { + this.processUpdates(l, k.assets); } else { - var k = new c; - this.processUpdates(g, e.assets, k); - a.result = k.toPlainObject(); + var m = new c; + this.processUpdates(l, k.assets, m); + a.result = m.toPlainObject(); a.handled = !0; } break; case "external": - a.result = this.processExternalCommand(e.command); + a.result = this.processExternalCommand(k.command); a.handled = !0; break; case "videoControl": - a.result = this.processVideoControl(e.id, e.eventType, e.data); + a.result = this.processVideoControl(k.id, k.eventType, k.data); a.handled = !0; break; case "registerFontOrImage": - this.processRegisterFontOrImage(e.syncId, e.symbolId, e.assetType, e.data, e.resolve), a.handled = !0; + this.processRegisterFontOrImage(k.syncId, k.symbolId, k.assetType, k.data, k.resolve), a.handled = !0; } } }; - b.prototype._onSyncWorkerMessage = function(a) { + a.prototype._onSyncWorkerMessage = function(a) { return this._onWorkerMessage(a, !1); }; - return b; - }(m.EaselHost); - e.TestEaselHost = w; - })(m.Test || (m.Test = {})); - })(g.GFX || (g.GFX = {})); + return a; + }(r.EaselHost); + g.TestEaselHost = t; + })(r.Test || (r.Test = {})); + })(l.GFX || (l.GFX = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load GFX Dependencies"); diff --git a/browser/extensions/shumway/content/shumway.player.js b/browser/extensions/shumway/content/shumway.player.js index 6355792cd675..58093311622a 100644 --- a/browser/extensions/shumway/content/shumway.player.js +++ b/browser/extensions/shumway/content/shumway.player.js @@ -16,245 +16,244 @@ */ console.time("Load Player Dependencies"); console.time("Load Shared Dependencies"); +var Shumway, Shumway$$inline_20 = Shumway || (Shumway = {}); +Shumway$$inline_20.version = "0.9.3775"; +Shumway$$inline_20.build = "a82ac47"; var jsGlobal = function() { return this || (0,eval)("this//# sourceURL=jsGlobal-getter"); }(), inBrowser = "undefined" !== typeof window && "document" in window && "plugins" in window.document, inFirefox = "undefined" !== typeof navigator && 0 <= navigator.userAgent.indexOf("Firefox"); jsGlobal.performance || (jsGlobal.performance = {}); jsGlobal.performance.now || (jsGlobal.performance.now = "undefined" !== typeof dateNow ? dateNow : Date.now); -var START_TIME = performance.now(), Shumway; -(function(c) { - function h(d) { - return(d | 0) === d; +function lazyInitializer(d, k) { + Object.defineProperty(d, "callWriter", {get:function() { + var a = k(); + Object.defineProperty(d, "callWriter", {value:a, configurable:!0, enumerable:!0}); + return a; + }, configurable:!0, enumerable:!0}); +} +var START_TIME = performance.now(); +(function(d) { + function k(f) { + return(f | 0) === f; } - function a(d) { - return "object" === typeof d || "function" === typeof d; + function a(f) { + return "object" === typeof f || "function" === typeof f; } - function s(d) { - return String(Number(d)) === d; + function r(f) { + return String(Number(f)) === f; } - function v(d) { + function v(f) { var b = 0; - if ("number" === typeof d) { - return b = d | 0, d === b && 0 <= b ? !0 : d >>> 0 === d; + if ("number" === typeof f) { + return b = f | 0, f === b && 0 <= b ? !0 : f >>> 0 === f; } - if ("string" !== typeof d) { + if ("string" !== typeof f) { return!1; } - var g = d.length; - if (0 === g) { + var e = f.length; + if (0 === e) { return!1; } - if ("0" === d) { + if ("0" === f) { return!0; } - if (g > c.UINT32_CHAR_BUFFER_LENGTH) { + if (e > d.UINT32_CHAR_BUFFER_LENGTH) { return!1; } - var r = 0, b = d.charCodeAt(r++) - 48; + var q = 0, b = f.charCodeAt(q++) - 48; if (1 > b || 9 < b) { return!1; } - for (var w = 0, f = 0;r < g;) { - f = d.charCodeAt(r++) - 48; - if (0 > f || 9 < f) { + for (var n = 0, x = 0;q < e;) { + x = f.charCodeAt(q++) - 48; + if (0 > x || 9 < x) { return!1; } - w = b; - b = 10 * b + f; + n = b; + b = 10 * b + x; } - return w < c.UINT32_MAX_DIV_10 || w === c.UINT32_MAX_DIV_10 && f <= c.UINT32_MAX_MOD_10 ? !0 : !1; + return n < d.UINT32_MAX_DIV_10 || n === d.UINT32_MAX_DIV_10 && x <= d.UINT32_MAX_MOD_10 ? !0 : !1; } - (function(d) { - d[d._0 = 48] = "_0"; - d[d._1 = 49] = "_1"; - d[d._2 = 50] = "_2"; - d[d._3 = 51] = "_3"; - d[d._4 = 52] = "_4"; - d[d._5 = 53] = "_5"; - d[d._6 = 54] = "_6"; - d[d._7 = 55] = "_7"; - d[d._8 = 56] = "_8"; - d[d._9 = 57] = "_9"; - })(c.CharacterCodes || (c.CharacterCodes = {})); - c.UINT32_CHAR_BUFFER_LENGTH = 10; - c.UINT32_MAX = 4294967295; - c.UINT32_MAX_DIV_10 = 429496729; - c.UINT32_MAX_MOD_10 = 5; - c.isString = function(d) { - return "string" === typeof d; + (function(f) { + f[f._0 = 48] = "_0"; + f[f._1 = 49] = "_1"; + f[f._2 = 50] = "_2"; + f[f._3 = 51] = "_3"; + f[f._4 = 52] = "_4"; + f[f._5 = 53] = "_5"; + f[f._6 = 54] = "_6"; + f[f._7 = 55] = "_7"; + f[f._8 = 56] = "_8"; + f[f._9 = 57] = "_9"; + })(d.CharacterCodes || (d.CharacterCodes = {})); + d.UINT32_CHAR_BUFFER_LENGTH = 10; + d.UINT32_MAX = 4294967295; + d.UINT32_MAX_DIV_10 = 429496729; + d.UINT32_MAX_MOD_10 = 5; + d.isString = function(f) { + return "string" === typeof f; }; - c.isFunction = function(d) { - return "function" === typeof d; + d.isFunction = function(f) { + return "function" === typeof f; }; - c.isNumber = function(d) { - return "number" === typeof d; + d.isNumber = function(f) { + return "number" === typeof f; }; - c.isInteger = h; - c.isArray = function(d) { - return d instanceof Array; + d.isInteger = k; + d.isArray = function(f) { + return f instanceof Array; }; - c.isNumberOrString = function(d) { - return "number" === typeof d || "string" === typeof d; + d.isNumberOrString = function(f) { + return "number" === typeof f || "string" === typeof f; }; - c.isObject = a; - c.toNumber = function(d) { - return+d; + d.isObject = a; + d.toNumber = function(f) { + return+f; }; - c.isNumericString = s; - c.isNumeric = function(d) { - if ("number" === typeof d) { + d.isNumericString = r; + d.isNumeric = function(f) { + if ("number" === typeof f) { return!0; } - if ("string" === typeof d) { - var b = d.charCodeAt(0); - return 65 <= b && 90 >= b || 97 <= b && 122 >= b || 36 === b || 95 === b ? !1 : v(d) || s(d); + if ("string" === typeof f) { + var b = f.charCodeAt(0); + return 65 <= b && 90 >= b || 97 <= b && 122 >= b || 36 === b || 95 === b ? !1 : v(f) || r(f); } return!1; }; - c.isIndex = v; - c.isNullOrUndefined = function(d) { - return void 0 == d; + d.isIndex = v; + d.isNullOrUndefined = function(f) { + return void 0 == f; }; - var p; - (function(d) { - d.error = function(b) { + var u; + (function(f) { + f.error = function(b) { console.error(b); throw Error(b); }; - d.assert = function(b, r) { - void 0 === r && (r = "assertion failed"); + f.assert = function(b, q) { + void 0 === q && (q = "assertion failed"); "" === b && (b = !0); if (!b) { if ("undefined" !== typeof console && "assert" in console) { - throw console.assert(!1, r), Error(r); + throw console.assert(!1, q), Error(q); } - d.error(r.toString()); + f.error(q.toString()); } }; - d.assertUnreachable = function(b) { - var r = Error().stack.split("\n")[1]; - throw Error("Reached unreachable location " + r + b); + f.assertUnreachable = function(b) { + var q = Error().stack.split("\n")[1]; + throw Error("Reached unreachable location " + q + b); }; - d.assertNotImplemented = function(b, r) { - b || d.error("notImplemented: " + r); + f.assertNotImplemented = function(b, q) { + b || f.error("notImplemented: " + q); }; - d.warning = function(b, r, d) { - console.warn.apply(console, arguments); + f.warning = function(b, q, n) { }; - d.notUsed = function(b) { - d.assert(!1, "Not Used " + b); + f.notUsed = function(b) { }; - d.notImplemented = function(b) { - d.assert(!1, "Not Implemented " + b); + f.notImplemented = function(b) { }; - d.dummyConstructor = function(b) { - d.assert(!1, "Dummy Constructor: " + b); + f.dummyConstructor = function(b) { }; - d.abstractMethod = function(b) { - d.assert(!1, "Abstract Method " + b); + f.abstractMethod = function(b) { }; var b = {}; - d.somewhatImplemented = function(g) { - b[g] || (b[g] = !0, d.warning("somewhatImplemented: " + g)); + f.somewhatImplemented = function(e) { + b[e] || (b[e] = !0); }; - d.unexpected = function(b) { - d.assert(!1, "Unexpected: " + b); + f.unexpected = function(b) { + f.assert(!1, "Unexpected: " + b); }; - d.unexpectedCase = function(b) { - d.assert(!1, "Unexpected Case: " + b); + f.unexpectedCase = function(b) { + f.assert(!1, "Unexpected Case: " + b); }; - })(p = c.Debug || (c.Debug = {})); - c.getTicks = function() { + })(u = d.Debug || (d.Debug = {})); + d.getTicks = function() { return performance.now(); }; - var u; - (function(d) { - function b(b, g) { - for (var r = 0, d = b.length;r < d;r++) { - if (b[r] === g) { - return r; + (function(f) { + function b(b, n) { + for (var e = 0, f = b.length;e < f;e++) { + if (b[e] === n) { + return e; } } - b.push(g); + b.push(n); return b.length - 1; } - var g = c.Debug.assert; - d.popManyInto = function(b, r, d) { - g(b.length >= r); - for (var f = r - 1;0 <= f;f--) { - d[f] = b.pop(); + f.popManyInto = function(b, n, e) { + for (var f = n - 1;0 <= f;f--) { + e[f] = b.pop(); } - d.length = r; + e.length = n; }; - d.popMany = function(b, r) { - g(b.length >= r); - var d = b.length - r, f = b.slice(d, this.length); - b.length = d; + f.popMany = function(b, n) { + var e = b.length - n, f = b.slice(e, this.length); + b.length = e; return f; }; - d.popManyIntoVoid = function(b, r) { - g(b.length >= r); - b.length -= r; + f.popManyIntoVoid = function(b, n) { + b.length -= n; }; - d.pushMany = function(b, g) { - for (var r = 0;r < g.length;r++) { - b.push(g[r]); + f.pushMany = function(b, n) { + for (var e = 0;e < n.length;e++) { + b.push(n[e]); } }; - d.top = function(b) { + f.top = function(b) { return b.length && b[b.length - 1]; }; - d.last = function(b) { + f.last = function(b) { return b.length && b[b.length - 1]; }; - d.peek = function(b) { - g(0 < b.length); + f.peek = function(b) { return b[b.length - 1]; }; - d.indexOf = function(b, g) { - for (var r = 0, d = b.length;r < d;r++) { - if (b[r] === g) { - return r; + f.indexOf = function(b, n) { + for (var e = 0, f = b.length;e < f;e++) { + if (b[e] === n) { + return e; } } return-1; }; - d.equals = function(b, g) { - if (b.length !== g.length) { + f.equals = function(b, n) { + if (b.length !== n.length) { return!1; } - for (var r = 0;r < b.length;r++) { - if (b[r] !== g[r]) { + for (var e = 0;e < b.length;e++) { + if (b[e] !== n[e]) { return!1; } } return!0; }; - d.pushUnique = b; - d.unique = function(g) { - for (var r = [], d = 0;d < g.length;d++) { - b(r, g[d]); + f.pushUnique = b; + f.unique = function(e) { + for (var n = [], f = 0;f < e.length;f++) { + b(n, e[f]); } - return r; + return n; }; - d.copyFrom = function(b, g) { + f.copyFrom = function(b, n) { b.length = 0; - d.pushMany(b, g); + f.pushMany(b, n); }; - d.ensureTypedArrayCapacity = function(b, g) { - if (b.length < g) { - var r = b; - b = new b.constructor(c.IntegerUtilities.nearestPowerOfTwo(g)); - b.set(r, 0); + f.ensureTypedArrayCapacity = function(b, n) { + if (b.length < n) { + var e = b; + b = new b.constructor(d.IntegerUtilities.nearestPowerOfTwo(n)); + b.set(e, 0); } return b; }; - var r = function() { - function b(g) { - void 0 === g && (g = 16); + var e = function() { + function b(n) { + void 0 === n && (n = 16); this._f32 = this._i32 = this._u16 = this._u8 = null; this._offset = 0; - this.ensureCapacity(g); + this.ensureCapacity(n); } b.prototype.reset = function() { this._offset = 0; @@ -263,10 +262,7 @@ var START_TIME = performance.now(), Shumway; return this._offset; }, enumerable:!0, configurable:!0}); b.prototype.getIndex = function(b) { - g(1 === b || 2 === b || 4 === b || 8 === b || 16 === b); - b = this._offset / b; - g((b | 0) === b); - return b; + return this._offset / b; }; b.prototype.ensureAdditionalCapacity = function(b) { this.ensureCapacity(this._offset + b); @@ -279,9 +275,9 @@ var START_TIME = performance.now(), Shumway; return; } } - var g = 2 * this._u8.length; - g < b && (g = b); - b = new Uint8Array(g); + var e = 2 * this._u8.length; + e < b && (e = b); + b = new Uint8Array(e); b.set(this._u8, 0); this._u8 = b; this._u16 = new Uint16Array(b.buffer); @@ -289,22 +285,18 @@ var START_TIME = performance.now(), Shumway; this._f32 = new Float32Array(b.buffer); }; b.prototype.writeInt = function(b) { - g(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 4); this.writeIntUnsafe(b); }; - b.prototype.writeIntAt = function(b, r) { - g(0 <= r && r <= this._offset); - g(0 === (r & 3)); - this.ensureCapacity(r + 4); - this._i32[r >> 2] = b; + b.prototype.writeIntAt = function(b, e) { + this.ensureCapacity(e + 4); + this._i32[e >> 2] = b; }; b.prototype.writeIntUnsafe = function(b) { this._i32[this._offset >> 2] = b; this._offset += 4; }; b.prototype.writeFloat = function(b) { - g(0 === (this._offset & 3)); this.ensureCapacity(this._offset + 4); this.writeFloatUnsafe(b); }; @@ -312,32 +304,30 @@ var START_TIME = performance.now(), Shumway; this._f32[this._offset >> 2] = b; this._offset += 4; }; - b.prototype.write4Floats = function(b, r, d, w) { - g(0 === (this._offset & 3)); + b.prototype.write4Floats = function(b, e, q, f) { this.ensureCapacity(this._offset + 16); - this.write4FloatsUnsafe(b, r, d, w); + this.write4FloatsUnsafe(b, e, q, f); }; - b.prototype.write4FloatsUnsafe = function(b, g, r, d) { - var w = this._offset >> 2; - this._f32[w + 0] = b; - this._f32[w + 1] = g; - this._f32[w + 2] = r; - this._f32[w + 3] = d; + b.prototype.write4FloatsUnsafe = function(b, e, q, f) { + var g = this._offset >> 2; + this._f32[g + 0] = b; + this._f32[g + 1] = e; + this._f32[g + 2] = q; + this._f32[g + 3] = f; this._offset += 16; }; - b.prototype.write6Floats = function(b, r, d, w, f, k) { - g(0 === (this._offset & 3)); + b.prototype.write6Floats = function(b, e, q, f, g, c) { this.ensureCapacity(this._offset + 24); - this.write6FloatsUnsafe(b, r, d, w, f, k); + this.write6FloatsUnsafe(b, e, q, f, g, c); }; - b.prototype.write6FloatsUnsafe = function(b, g, r, d, w, f) { - var k = this._offset >> 2; - this._f32[k + 0] = b; - this._f32[k + 1] = g; - this._f32[k + 2] = r; - this._f32[k + 3] = d; - this._f32[k + 4] = w; - this._f32[k + 5] = f; + b.prototype.write6FloatsUnsafe = function(b, e, q, f, g, c) { + var s = this._offset >> 2; + this._f32[s + 0] = b; + this._f32[s + 1] = e; + this._f32[s + 2] = q; + this._f32[s + 3] = f; + this._f32[s + 4] = g; + this._f32[s + 5] = c; this._offset += 24; }; b.prototype.subF32View = function() { @@ -352,10 +342,10 @@ var START_TIME = performance.now(), Shumway; b.prototype.subU8View = function() { return this._u8.subarray(0, this._offset); }; - b.prototype.hashWords = function(b, g, r) { - g = this._i32; - for (var d = 0;d < r;d++) { - b = (31 * b | 0) + g[d] | 0; + b.prototype.hashWords = function(b, e, q) { + e = this._i32; + for (var f = 0;f < q;f++) { + b = (31 * b | 0) + e[f] | 0; } return b; }; @@ -366,289 +356,277 @@ var START_TIME = performance.now(), Shumway; }; return b; }(); - d.ArrayWriter = r; - })(u = c.ArrayUtilities || (c.ArrayUtilities = {})); - var l = function() { - function d(b) { + f.ArrayWriter = e; + })(d.ArrayUtilities || (d.ArrayUtilities = {})); + var t = function() { + function f(b) { this._u8 = new Uint8Array(b); this._u16 = new Uint16Array(b); this._i32 = new Int32Array(b); this._f32 = new Float32Array(b); this._offset = 0; } - Object.defineProperty(d.prototype, "offset", {get:function() { + Object.defineProperty(f.prototype, "offset", {get:function() { return this._offset; }, enumerable:!0, configurable:!0}); - d.prototype.isEmpty = function() { + f.prototype.isEmpty = function() { return this._offset === this._u8.length; }; - d.prototype.readInt = function() { - p.assert(0 === (this._offset & 3)); - p.assert(this._offset <= this._u8.length - 4); + f.prototype.readInt = function() { var b = this._i32[this._offset >> 2]; this._offset += 4; return b; }; - d.prototype.readFloat = function() { - p.assert(0 === (this._offset & 3)); - p.assert(this._offset <= this._u8.length - 4); + f.prototype.readFloat = function() { var b = this._f32[this._offset >> 2]; this._offset += 4; return b; }; - return d; + return f; }(); - c.ArrayReader = l; - (function(d) { - function b(b, g) { - return Object.prototype.hasOwnProperty.call(b, g); + d.ArrayReader = t; + (function(f) { + function b(b, n) { + return Object.prototype.hasOwnProperty.call(b, n); } - function g(g, d) { - for (var f in d) { - b(d, f) && (g[f] = d[f]); + function e(e, n) { + for (var f in n) { + b(n, f) && (e[f] = n[f]); } } - d.boxValue = function(b) { + f.boxValue = function(b) { return void 0 == b || a(b) ? b : Object(b); }; - d.toKeyValueArray = function(b) { - var g = Object.prototype.hasOwnProperty, d = [], f; + f.toKeyValueArray = function(b) { + var n = Object.prototype.hasOwnProperty, e = [], f; for (f in b) { - g.call(b, f) && d.push([f, b[f]]); + n.call(b, f) && e.push([f, b[f]]); } - return d; + return e; }; - d.isPrototypeWriteable = function(b) { + f.isPrototypeWriteable = function(b) { return Object.getOwnPropertyDescriptor(b, "prototype").writable; }; - d.hasOwnProperty = b; - d.propertyIsEnumerable = function(b, g) { - return Object.prototype.propertyIsEnumerable.call(b, g); + f.hasOwnProperty = b; + f.propertyIsEnumerable = function(b, n) { + return Object.prototype.propertyIsEnumerable.call(b, n); }; - d.getOwnPropertyDescriptor = function(b, g) { - return Object.getOwnPropertyDescriptor(b, g); + f.getOwnPropertyDescriptor = function(b, n) { + return Object.getOwnPropertyDescriptor(b, n); }; - d.hasOwnGetter = function(b, g) { - var d = Object.getOwnPropertyDescriptor(b, g); - return!(!d || !d.get); + f.hasOwnGetter = function(b, n) { + var e = Object.getOwnPropertyDescriptor(b, n); + return!(!e || !e.get); }; - d.getOwnGetter = function(b, g) { - var d = Object.getOwnPropertyDescriptor(b, g); - return d ? d.get : null; + f.getOwnGetter = function(b, n) { + var e = Object.getOwnPropertyDescriptor(b, n); + return e ? e.get : null; }; - d.hasOwnSetter = function(b, g) { - var d = Object.getOwnPropertyDescriptor(b, g); - return!(!d || !d.set); + f.hasOwnSetter = function(b, n) { + var e = Object.getOwnPropertyDescriptor(b, n); + return!(!e || !e.set); }; - d.createMap = function() { + f.createMap = function() { return Object.create(null); }; - d.createArrayMap = function() { + f.createArrayMap = function() { return[]; }; - d.defineReadOnlyProperty = function(b, g, d) { - Object.defineProperty(b, g, {value:d, writable:!1, configurable:!0, enumerable:!1}); + f.defineReadOnlyProperty = function(b, n, e) { + Object.defineProperty(b, n, {value:e, writable:!1, configurable:!0, enumerable:!1}); }; - d.getOwnPropertyDescriptors = function(b) { - for (var g = d.createMap(), f = Object.getOwnPropertyNames(b), k = 0;k < f.length;k++) { - g[f[k]] = Object.getOwnPropertyDescriptor(b, f[k]); + f.getOwnPropertyDescriptors = function(b) { + for (var n = f.createMap(), e = Object.getOwnPropertyNames(b), g = 0;g < e.length;g++) { + n[e[g]] = Object.getOwnPropertyDescriptor(b, e[g]); } - return g; + return n; }; - d.cloneObject = function(b) { - var d = Object.create(Object.getPrototypeOf(b)); - g(d, b); - return d; + f.cloneObject = function(b) { + var n = Object.create(Object.getPrototypeOf(b)); + e(n, b); + return n; }; - d.copyProperties = function(b, g) { - for (var d in g) { - b[d] = g[d]; + f.copyProperties = function(b, n) { + for (var e in n) { + b[e] = n[e]; } }; - d.copyOwnProperties = g; - d.copyOwnPropertyDescriptors = function(g, d, f) { + f.copyOwnProperties = e; + f.copyOwnPropertyDescriptors = function(e, n, f) { void 0 === f && (f = !0); - for (var k in d) { - if (b(d, k)) { - var e = Object.getOwnPropertyDescriptor(d, k); - if (f || !b(g, k)) { - p.assert(e); + for (var g in n) { + if (b(n, g)) { + var c = Object.getOwnPropertyDescriptor(n, g); + if (f || !b(e, g)) { try { - Object.defineProperty(g, k, e); - } catch (n) { + Object.defineProperty(e, g, c); + } catch (s) { } } } } }; - d.getLatestGetterOrSetterPropertyDescriptor = function(b, g) { - for (var d = {};b;) { - var f = Object.getOwnPropertyDescriptor(b, g); - f && (d.get = d.get || f.get, d.set = d.set || f.set); - if (d.get && d.set) { + f.getLatestGetterOrSetterPropertyDescriptor = function(b, n) { + for (var e = {};b;) { + var f = Object.getOwnPropertyDescriptor(b, n); + f && (e.get = e.get || f.get, e.set = e.set || f.set); + if (e.get && e.set) { break; } b = Object.getPrototypeOf(b); } - return d; + return e; }; - d.defineNonEnumerableGetterOrSetter = function(b, g, f, k) { - var e = d.getLatestGetterOrSetterPropertyDescriptor(b, g); - e.configurable = !0; - e.enumerable = !1; - k ? e.get = f : e.set = f; - Object.defineProperty(b, g, e); + f.defineNonEnumerableGetterOrSetter = function(b, n, e, g) { + var c = f.getLatestGetterOrSetterPropertyDescriptor(b, n); + c.configurable = !0; + c.enumerable = !1; + g ? c.get = e : c.set = e; + Object.defineProperty(b, n, c); }; - d.defineNonEnumerableGetter = function(b, g, d) { - Object.defineProperty(b, g, {get:d, configurable:!0, enumerable:!1}); + f.defineNonEnumerableGetter = function(b, n, e) { + Object.defineProperty(b, n, {get:e, configurable:!0, enumerable:!1}); }; - d.defineNonEnumerableSetter = function(b, g, d) { - Object.defineProperty(b, g, {set:d, configurable:!0, enumerable:!1}); + f.defineNonEnumerableSetter = function(b, n, e) { + Object.defineProperty(b, n, {set:e, configurable:!0, enumerable:!1}); }; - d.defineNonEnumerableProperty = function(b, g, d) { - Object.defineProperty(b, g, {value:d, writable:!0, configurable:!0, enumerable:!1}); + f.defineNonEnumerableProperty = function(b, n, e) { + Object.defineProperty(b, n, {value:e, writable:!0, configurable:!0, enumerable:!1}); }; - d.defineNonEnumerableForwardingProperty = function(b, g, d) { - Object.defineProperty(b, g, {get:e.makeForwardingGetter(d), set:e.makeForwardingSetter(d), writable:!0, configurable:!0, enumerable:!1}); + f.defineNonEnumerableForwardingProperty = function(b, n, e) { + Object.defineProperty(b, n, {get:l.makeForwardingGetter(e), set:l.makeForwardingSetter(e), writable:!0, configurable:!0, enumerable:!1}); }; - d.defineNewNonEnumerableProperty = function(b, g, f) { - p.assert(!Object.prototype.hasOwnProperty.call(b, g), "Property: " + g + " already exits."); - d.defineNonEnumerableProperty(b, g, f); + f.defineNewNonEnumerableProperty = function(b, n, e) { + f.defineNonEnumerableProperty(b, n, e); }; - d.createPublicAliases = function(b, g) { - for (var d = {value:null, writable:!0, configurable:!0, enumerable:!1}, f = 0;f < g.length;f++) { - var k = g[f]; - d.value = b[k]; - Object.defineProperty(b, "$Bg" + k, d); + f.createPublicAliases = function(b, n) { + for (var e = {value:null, writable:!0, configurable:!0, enumerable:!1}, f = 0;f < n.length;f++) { + var g = n[f]; + e.value = b[g]; + Object.defineProperty(b, "$Bg" + g, e); } }; - })(c.ObjectUtilities || (c.ObjectUtilities = {})); - var e; - (function(d) { - d.makeForwardingGetter = function(b) { + })(d.ObjectUtilities || (d.ObjectUtilities = {})); + var l; + (function(f) { + f.makeForwardingGetter = function(b) { return new Function('return this["' + b + '"]//# sourceURL=fwd-get-' + b + ".as"); }; - d.makeForwardingSetter = function(b) { + f.makeForwardingSetter = function(b) { return new Function("value", 'this["' + b + '"] = value;//# sourceURL=fwd-set-' + b + ".as"); }; - d.bindSafely = function(b, g) { - function d() { - return b.apply(g, arguments); + f.bindSafely = function(b, e) { + function f() { + return b.apply(e, arguments); } - p.assert(!b.boundTo); - p.assert(g); - d.boundTo = g; - return d; + f.boundTo = e; + return f; }; - })(e = c.FunctionUtilities || (c.FunctionUtilities = {})); - (function(d) { + })(l = d.FunctionUtilities || (d.FunctionUtilities = {})); + (function(f) { function b(b) { return "string" === typeof b ? '"' + b + '"' : "number" === typeof b || "boolean" === typeof b ? String(b) : b instanceof Array ? "[] " + b.length : typeof b; } - var g = c.Debug.assert; - d.repeatString = function(b, g) { - for (var d = "", r = 0;r < g;r++) { - d += b; + f.repeatString = function(b, n) { + for (var e = "", f = 0;f < n;f++) { + e += b; } - return d; + return e; }; - d.memorySizeToString = function(b) { + f.memorySizeToString = function(b) { b |= 0; return 1024 > b ? b + " B" : 1048576 > b ? (b / 1024).toFixed(2) + "KB" : (b / 1048576).toFixed(2) + "MB"; }; - d.toSafeString = b; - d.toSafeArrayString = function(g) { - for (var d = [], r = 0;r < g.length;r++) { - d.push(b(g[r])); + f.toSafeString = b; + f.toSafeArrayString = function(n) { + for (var e = [], f = 0;f < n.length;f++) { + e.push(b(n[f])); } - return d.join(", "); + return e.join(", "); }; - d.utf8decode = function(b) { - for (var g = new Uint8Array(4 * b.length), d = 0, r = 0, w = b.length;r < w;r++) { - var f = b.charCodeAt(r); - if (127 >= f) { - g[d++] = f; + f.utf8decode = function(b) { + for (var n = new Uint8Array(4 * b.length), e = 0, f = 0, q = b.length;f < q;f++) { + var g = b.charCodeAt(f); + if (127 >= g) { + n[e++] = g; } else { - if (55296 <= f && 56319 >= f) { - var k = b.charCodeAt(r + 1); - 56320 <= k && 57343 >= k && (f = ((f & 1023) << 10) + (k & 1023) + 65536, ++r); + if (55296 <= g && 56319 >= g) { + var c = b.charCodeAt(f + 1); + 56320 <= c && 57343 >= c && (g = ((g & 1023) << 10) + (c & 1023) + 65536, ++f); } - 0 !== (f & 4292870144) ? (g[d++] = 248 | f >>> 24 & 3, g[d++] = 128 | f >>> 18 & 63, g[d++] = 128 | f >>> 12 & 63, g[d++] = 128 | f >>> 6 & 63) : 0 !== (f & 4294901760) ? (g[d++] = 240 | f >>> 18 & 7, g[d++] = 128 | f >>> 12 & 63, g[d++] = 128 | f >>> 6 & 63) : 0 !== (f & 4294965248) ? (g[d++] = 224 | f >>> 12 & 15, g[d++] = 128 | f >>> 6 & 63) : g[d++] = 192 | f >>> 6 & 31; - g[d++] = 128 | f & 63; + 0 !== (g & 4292870144) ? (n[e++] = 248 | g >>> 24 & 3, n[e++] = 128 | g >>> 18 & 63, n[e++] = 128 | g >>> 12 & 63, n[e++] = 128 | g >>> 6 & 63) : 0 !== (g & 4294901760) ? (n[e++] = 240 | g >>> 18 & 7, n[e++] = 128 | g >>> 12 & 63, n[e++] = 128 | g >>> 6 & 63) : 0 !== (g & 4294965248) ? (n[e++] = 224 | g >>> 12 & 15, n[e++] = 128 | g >>> 6 & 63) : n[e++] = 192 | g >>> 6 & 31; + n[e++] = 128 | g & 63; } } - return g.subarray(0, d); + return n.subarray(0, e); }; - d.utf8encode = function(b) { - for (var g = 0, d = "";g < b.length;) { - var r = b[g++] & 255; - if (127 >= r) { - d += String.fromCharCode(r); + f.utf8encode = function(b) { + for (var n = 0, e = "";n < b.length;) { + var f = b[n++] & 255; + if (127 >= f) { + e += String.fromCharCode(f); } else { - var f = 192, w = 5; + var q = 192, g = 5; do { - if ((r & (f >> 1 | 128)) === f) { + if ((f & (q >> 1 | 128)) === q) { break; } - f = f >> 1 | 128; - --w; - } while (0 <= w); - if (0 >= w) { - d += String.fromCharCode(r); + q = q >> 1 | 128; + --g; + } while (0 <= g); + if (0 >= g) { + e += String.fromCharCode(f); } else { - for (var r = r & (1 << w) - 1, f = !1, k = 5;k >= w;--k) { - var e = b[g++]; - if (128 != (e & 192)) { - f = !0; + for (var f = f & (1 << g) - 1, q = !1, c = 5;c >= g;--c) { + var x = b[n++]; + if (128 != (x & 192)) { + q = !0; break; } - r = r << 6 | e & 63; + f = f << 6 | x & 63; } - if (f) { - for (w = g - (7 - k);w < g;++w) { - d += String.fromCharCode(b[w] & 255); + if (q) { + for (g = n - (7 - c);g < n;++g) { + e += String.fromCharCode(b[g] & 255); } } else { - d = 65536 <= r ? d + String.fromCharCode(r - 65536 >> 10 & 1023 | 55296, r & 1023 | 56320) : d + String.fromCharCode(r); + e = 65536 <= f ? e + String.fromCharCode(f - 65536 >> 10 & 1023 | 55296, f & 1023 | 56320) : e + String.fromCharCode(f); } } } } - return d; + return e; }; - d.base64ArrayBuffer = function(b) { - var g = ""; + f.base64ArrayBuffer = function(b) { + var n = ""; b = new Uint8Array(b); - for (var d = b.byteLength, r = d % 3, d = d - r, f, w, k, e, n = 0;n < d;n += 3) { - e = b[n] << 16 | b[n + 1] << 8 | b[n + 2], f = (e & 16515072) >> 18, w = (e & 258048) >> 12, k = (e & 4032) >> 6, e &= 63, g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[w] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[k] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]; + for (var e = b.byteLength, f = e % 3, e = e - f, q, g, c, x, s = 0;s < e;s += 3) { + x = b[s] << 16 | b[s + 1] << 8 | b[s + 2], q = (x & 16515072) >> 18, g = (x & 258048) >> 12, c = (x & 4032) >> 6, x &= 63, n += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[q] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[g] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[c] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[x]; } - 1 == r ? (e = b[d], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 3) << 4] + "==") : 2 == r && (e = b[d] << 8 | b[d + 1], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 15) << + 1 == f ? (x = b[e], n += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(x & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(x & 3) << 4] + "==") : 2 == f && (x = b[e] << 8 | b[e + 1], n += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(x & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(x & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(x & 15) << 2] + "="); - return g; + return n; }; - d.escapeString = function(b) { + f.escapeString = function(b) { void 0 !== b && (b = b.replace(/[^\w$]/gi, "$"), /^\d/.test(b) && (b = "$" + b)); return b; }; - d.fromCharCodeArray = function(b) { - for (var g = "", d = 0;d < b.length;d += 16384) { - var r = Math.min(b.length - d, 16384), g = g + String.fromCharCode.apply(null, b.subarray(d, d + r)) + f.fromCharCodeArray = function(b) { + for (var n = "", e = 0;e < b.length;e += 16384) { + var f = Math.min(b.length - e, 16384), n = n + String.fromCharCode.apply(null, b.subarray(e, e + f)) } - return g; + return n; }; - d.variableLengthEncodeInt32 = function(b) { - var r = 32 - Math.clz32(b); - g(32 >= r, r); - for (var f = Math.ceil(r / 6), w = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[f], k = f - 1;0 <= k;k--) { - w += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b >> 6 * k & 63]; + f.variableLengthEncodeInt32 = function(b) { + for (var n = 32 - Math.clz32(b), e = Math.ceil(n / 6), n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[e], e = e - 1;0 <= e;e--) { + n += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b >> 6 * e & 63]; } - g(d.variableLengthDecodeInt32(w) === b, b + " : " + w + " - " + f + " bits: " + r); - return w; + return n; }; - d.toEncoding = function(b) { + f.toEncoding = function(b) { return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b]; }; - d.fromEncoding = function(b) { + f.fromEncoding = function(b) { b = b.charCodeAt(0); if (65 <= b && 90 >= b) { return b - 65; @@ -665,315 +643,314 @@ var START_TIME = performance.now(), Shumway; if (95 === b) { return 63; } - g(!1, "Invalid Encoding"); }; - d.variableLengthDecodeInt32 = function(b) { - for (var g = d.fromEncoding(b[0]), r = 0, f = 0;f < g;f++) { - var w = 6 * (g - f - 1), r = r | d.fromEncoding(b[1 + f]) << w - } - return r; - }; - d.trimMiddle = function(b, g) { - if (b.length <= g) { - return b; - } - var d = g >> 1, r = g - d - 1; - return b.substr(0, d) + "\u2026" + b.substr(b.length - r, r); - }; - d.multiple = function(b, g) { - for (var d = "", r = 0;r < g;r++) { - d += b; - } - return d; - }; - d.indexOfAny = function(b, g, d) { - for (var r = b.length, f = 0;f < g.length;f++) { - var w = b.indexOf(g[f], d); - 0 <= w && (r = Math.min(r, w)); - } - return r === b.length ? -1 : r; - }; - var r = Array(3), w = Array(4), f = Array(5), k = Array(6), e = Array(7), n = Array(8), m = Array(9); - d.concat3 = function(b, g, d) { - r[0] = b; - r[1] = g; - r[2] = d; - return r.join(""); - }; - d.concat4 = function(b, g, d, r) { - w[0] = b; - w[1] = g; - w[2] = d; - w[3] = r; - return w.join(""); - }; - d.concat5 = function(b, g, d, r, w) { - f[0] = b; - f[1] = g; - f[2] = d; - f[3] = r; - f[4] = w; - return f.join(""); - }; - d.concat6 = function(b, g, d, r, f, w) { - k[0] = b; - k[1] = g; - k[2] = d; - k[3] = r; - k[4] = f; - k[5] = w; - return k.join(""); - }; - d.concat7 = function(b, g, d, r, f, w, k) { - e[0] = b; - e[1] = g; - e[2] = d; - e[3] = r; - e[4] = f; - e[5] = w; - e[6] = k; - return e.join(""); - }; - d.concat8 = function(b, g, d, r, f, w, k, e) { - n[0] = b; - n[1] = g; - n[2] = d; - n[3] = r; - n[4] = f; - n[5] = w; - n[6] = k; - n[7] = e; - return n.join(""); - }; - d.concat9 = function(b, g, d, r, f, w, k, e, n) { - m[0] = b; - m[1] = g; - m[2] = d; - m[3] = r; - m[4] = f; - m[5] = w; - m[6] = k; - m[7] = e; - m[8] = n; - return m.join(""); - }; - })(c.StringUtilities || (c.StringUtilities = {})); - (function(d) { - var b = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), g = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, - 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, - -145523070, -1120210379, 718787259, -343485551]); - d.hashBytesTo32BitsMD5 = function(d, f, k) { - var e = 1732584193, n = -271733879, m = -1732584194, l = 271733878, q = k + 72 & -64, a = new Uint8Array(q), t; - for (t = 0;t < k;++t) { - a[t] = d[f++]; - } - a[t++] = 128; - for (d = q - 8;t < d;) { - a[t++] = 0; - } - a[t++] = k << 3 & 255; - a[t++] = k >> 5 & 255; - a[t++] = k >> 13 & 255; - a[t++] = k >> 21 & 255; - a[t++] = k >>> 29 & 255; - a[t++] = 0; - a[t++] = 0; - a[t++] = 0; - d = new Int32Array(16); - for (t = 0;t < q;) { - for (k = 0;16 > k;++k, t += 4) { - d[k] = a[t] | a[t + 1] << 8 | a[t + 2] << 16 | a[t + 3] << 24; - } - var c = e; - f = n; - var s = m, u = l, p, h; - for (k = 0;64 > k;++k) { - 16 > k ? (p = f & s | ~f & u, h = k) : 32 > k ? (p = u & f | ~u & s, h = 5 * k + 1 & 15) : 48 > k ? (p = f ^ s ^ u, h = 3 * k + 5 & 15) : (p = s ^ (f | ~u), h = 7 * k & 15); - var v = u, c = c + p + g[k] + d[h] | 0; - p = b[k]; - u = s; - s = f; - f = f + (c << p | c >>> 32 - p) | 0; - c = v; - } - e = e + c | 0; - n = n + f | 0; - m = m + s | 0; - l = l + u | 0; + f.variableLengthDecodeInt32 = function(b) { + for (var n = f.fromEncoding(b[0]), e = 0, q = 0;q < n;q++) { + var g = 6 * (n - q - 1), e = e | f.fromEncoding(b[1 + q]) << g } return e; }; - d.hashBytesTo32BitsAdler = function(b, g, d) { - var f = 1, k = 0; - for (d = g + d;g < d;++g) { - f = (f + (b[g] & 255)) % 65521, k = (k + f) % 65521; + f.trimMiddle = function(b, n) { + if (b.length <= n) { + return b; } - return k << 16 | f; + var e = n >> 1, f = n - e - 1; + return b.substr(0, e) + "\u2026" + b.substr(b.length - f, f); }; - })(c.HashUtilities || (c.HashUtilities = {})); - var m = function() { - function d() { + f.multiple = function(b, n) { + for (var e = "", f = 0;f < n;f++) { + e += b; + } + return e; + }; + f.indexOfAny = function(b, n, e) { + for (var f = b.length, q = 0;q < n.length;q++) { + var g = b.indexOf(n[q], e); + 0 <= g && (f = Math.min(f, g)); + } + return f === b.length ? -1 : f; + }; + var e = Array(3), q = Array(4), n = Array(5), g = Array(6), c = Array(7), s = Array(8), p = Array(9); + f.concat3 = function(b, n, f) { + e[0] = b; + e[1] = n; + e[2] = f; + return e.join(""); + }; + f.concat4 = function(b, n, e, f) { + q[0] = b; + q[1] = n; + q[2] = e; + q[3] = f; + return q.join(""); + }; + f.concat5 = function(b, e, f, q, g) { + n[0] = b; + n[1] = e; + n[2] = f; + n[3] = q; + n[4] = g; + return n.join(""); + }; + f.concat6 = function(b, n, e, f, q, c) { + g[0] = b; + g[1] = n; + g[2] = e; + g[3] = f; + g[4] = q; + g[5] = c; + return g.join(""); + }; + f.concat7 = function(b, n, e, f, q, g, x) { + c[0] = b; + c[1] = n; + c[2] = e; + c[3] = f; + c[4] = q; + c[5] = g; + c[6] = x; + return c.join(""); + }; + f.concat8 = function(b, n, e, f, q, g, c, x) { + s[0] = b; + s[1] = n; + s[2] = e; + s[3] = f; + s[4] = q; + s[5] = g; + s[6] = c; + s[7] = x; + return s.join(""); + }; + f.concat9 = function(b, n, e, f, q, g, c, x, s) { + p[0] = b; + p[1] = n; + p[2] = e; + p[3] = f; + p[4] = q; + p[5] = g; + p[6] = c; + p[7] = x; + p[8] = s; + return p.join(""); + }; + })(d.StringUtilities || (d.StringUtilities = {})); + (function(f) { + var b = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), e = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, + 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, + -145523070, -1120210379, 718787259, -343485551]); + f.hashBytesTo32BitsMD5 = function(f, n, g) { + var c = 1732584193, s = -271733879, p = -1732584194, m = 271733878, h = g + 72 & -64, l = new Uint8Array(h), a; + for (a = 0;a < g;++a) { + l[a] = f[n++]; + } + l[a++] = 128; + for (f = h - 8;a < f;) { + l[a++] = 0; + } + l[a++] = g << 3 & 255; + l[a++] = g >> 5 & 255; + l[a++] = g >> 13 & 255; + l[a++] = g >> 21 & 255; + l[a++] = g >>> 29 & 255; + l[a++] = 0; + l[a++] = 0; + l[a++] = 0; + f = new Int32Array(16); + for (a = 0;a < h;) { + for (g = 0;16 > g;++g, a += 4) { + f[g] = l[a] | l[a + 1] << 8 | l[a + 2] << 16 | l[a + 3] << 24; + } + var r = c; + n = s; + var t = p, d = m, u, k; + for (g = 0;64 > g;++g) { + 16 > g ? (u = n & t | ~n & d, k = g) : 32 > g ? (u = d & n | ~d & t, k = 5 * g + 1 & 15) : 48 > g ? (u = n ^ t ^ d, k = 3 * g + 5 & 15) : (u = t ^ (n | ~d), k = 7 * g & 15); + var v = d, r = r + u + e[g] + f[k] | 0; + u = b[g]; + d = t; + t = n; + n = n + (r << u | r >>> 32 - u) | 0; + r = v; + } + c = c + r | 0; + s = s + n | 0; + p = p + t | 0; + m = m + d | 0; + } + return c; + }; + f.hashBytesTo32BitsAdler = function(b, n, e) { + var f = 1, g = 0; + for (e = n + e;n < e;++n) { + f = (f + (b[n] & 255)) % 65521, g = (g + f) % 65521; + } + return g << 16 | f; + }; + })(d.HashUtilities || (d.HashUtilities = {})); + var c = function() { + function f() { } - d.seed = function(b) { - d._state[0] = b; - d._state[1] = b; + f.seed = function(b) { + f._state[0] = b; + f._state[1] = b; }; - d.next = function() { - var b = this._state, g = Math.imul(18273, b[0] & 65535) + (b[0] >>> 16) | 0; - b[0] = g; - var d = Math.imul(36969, b[1] & 65535) + (b[1] >>> 16) | 0; - b[1] = d; - b = (g << 16) + (d & 65535) | 0; + f.next = function() { + var b = this._state, e = Math.imul(18273, b[0] & 65535) + (b[0] >>> 16) | 0; + b[0] = e; + var f = Math.imul(36969, b[1] & 65535) + (b[1] >>> 16) | 0; + b[1] = f; + b = (e << 16) + (f & 65535) | 0; return 2.3283064365386963E-10 * (0 > b ? b + 4294967296 : b); }; - d._state = new Uint32Array([57005, 48879]); - return d; + f._state = new Uint32Array([57005, 48879]); + return f; }(); - c.Random = m; + d.Random = c; Math.random = function() { - return m.next(); + return c.next(); }; (function() { - function d() { + function f() { this.id = "$weakmap" + b++; } if ("function" !== typeof jsGlobal.WeakMap) { var b = 0; - d.prototype = {has:function(b) { + f.prototype = {has:function(b) { return b.hasOwnProperty(this.id); - }, get:function(b, d) { - return b.hasOwnProperty(this.id) ? b[this.id] : d; - }, set:function(b, d) { - Object.defineProperty(b, this.id, {value:d, enumerable:!1, configurable:!0}); + }, get:function(b, f) { + return b.hasOwnProperty(this.id) ? b[this.id] : f; + }, set:function(b, f) { + Object.defineProperty(b, this.id, {value:f, enumerable:!1, configurable:!0}); }}; - jsGlobal.WeakMap = d; + jsGlobal.WeakMap = f; } })(); - l = function() { - function d() { + t = function() { + function f() { "undefined" !== typeof netscape && netscape.security.PrivilegeManager ? this._map = new WeakMap : this._list = []; } - d.prototype.clear = function() { + f.prototype.clear = function() { this._map ? this._map.clear() : this._list.length = 0; }; - d.prototype.push = function(b) { - this._map ? (p.assert(!this._map.has(b)), this._map.set(b, null)) : (p.assert(-1 === this._list.indexOf(b)), this._list.push(b)); + f.prototype.push = function(b) { + this._map ? this._map.set(b, null) : this._list.push(b); }; - d.prototype.remove = function(b) { - this._map ? (p.assert(this._map.has(b)), this._map.delete(b)) : (p.assert(-1 < this._list.indexOf(b)), this._list[this._list.indexOf(b)] = null, p.assert(-1 === this._list.indexOf(b))); + f.prototype.remove = function(b) { + this._map ? this._map.delete(b) : this._list[this._list.indexOf(b)] = null; }; - d.prototype.forEach = function(b) { + f.prototype.forEach = function(b) { if (this._map) { - "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(g) { - 0 !== g._referenceCount && b(g); + "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(n) { + 0 !== n._referenceCount && b(n); }); } else { - for (var g = this._list, d = 0, f = 0;f < g.length;f++) { - var k = g[f]; - k && (0 === k._referenceCount ? (g[f] = null, d++) : b(k)); + for (var e = this._list, f = 0, n = 0;n < e.length;n++) { + var g = e[n]; + g && (0 === g._referenceCount ? (e[n] = null, f++) : b(g)); } - if (16 < d && d > g.length >> 2) { - d = []; - for (f = 0;f < g.length;f++) { - (k = g[f]) && 0 < k._referenceCount && d.push(k); + if (16 < f && f > e.length >> 2) { + f = []; + for (n = 0;n < e.length;n++) { + (g = e[n]) && 0 < g._referenceCount && f.push(g); } - this._list = d; + this._list = f; } } }; - Object.defineProperty(d.prototype, "length", {get:function() { + Object.defineProperty(f.prototype, "length", {get:function() { return this._map ? -1 : this._list.length; }, enumerable:!0, configurable:!0}); - return d; + return f; }(); - c.WeakList = l; - var t; - (function(d) { - d.pow2 = function(b) { + d.WeakList = t; + var h; + (function(f) { + f.pow2 = function(b) { return b === (b | 0) ? 0 > b ? 1 / (1 << -b) : 1 << b : Math.pow(2, b); }; - d.clamp = function(b, g, d) { - return Math.max(g, Math.min(d, b)); + f.clamp = function(b, e, f) { + return Math.max(e, Math.min(f, b)); }; - d.roundHalfEven = function(b) { + f.roundHalfEven = function(b) { if (.5 === Math.abs(b % 1)) { - var g = Math.floor(b); - return 0 === g % 2 ? g : Math.ceil(b); + var e = Math.floor(b); + return 0 === e % 2 ? e : Math.ceil(b); } return Math.round(b); }; - d.epsilonEquals = function(b, g) { - return 1E-7 > Math.abs(b - g); + f.epsilonEquals = function(b, e) { + return 1E-7 > Math.abs(b - e); }; - })(t = c.NumberUtilities || (c.NumberUtilities = {})); - (function(d) { - d[d.MaxU16 = 65535] = "MaxU16"; - d[d.MaxI16 = 32767] = "MaxI16"; - d[d.MinI16 = -32768] = "MinI16"; - })(c.Numbers || (c.Numbers = {})); - var q; - (function(d) { + })(h = d.NumberUtilities || (d.NumberUtilities = {})); + (function(f) { + f[f.MaxU16 = 65535] = "MaxU16"; + f[f.MaxI16 = 32767] = "MaxI16"; + f[f.MinI16 = -32768] = "MinI16"; + })(d.Numbers || (d.Numbers = {})); + var p; + (function(f) { function b(b) { return 256 * b << 16 >> 16; } - var g = new ArrayBuffer(8); - d.i8 = new Int8Array(g); - d.u8 = new Uint8Array(g); - d.i32 = new Int32Array(g); - d.f32 = new Float32Array(g); - d.f64 = new Float64Array(g); - d.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; - d.floatToInt32 = function(b) { - d.f32[0] = b; - return d.i32[0]; + var e = new ArrayBuffer(8); + f.i8 = new Int8Array(e); + f.u8 = new Uint8Array(e); + f.i32 = new Int32Array(e); + f.f32 = new Float32Array(e); + f.f64 = new Float64Array(e); + f.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; + f.floatToInt32 = function(b) { + f.f32[0] = b; + return f.i32[0]; }; - d.int32ToFloat = function(b) { - d.i32[0] = b; - return d.f32[0]; + f.int32ToFloat = function(b) { + f.i32[0] = b; + return f.f32[0]; }; - d.swap16 = function(b) { + f.swap16 = function(b) { return(b & 255) << 8 | b >> 8 & 255; }; - d.swap32 = function(b) { + f.swap32 = function(b) { return(b & 255) << 24 | (b & 65280) << 8 | b >> 8 & 65280 | b >> 24 & 255; }; - d.toS8U8 = b; - d.fromS8U8 = function(b) { + f.toS8U8 = b; + f.fromS8U8 = function(b) { return b / 256; }; - d.clampS8U8 = function(g) { - return b(g) / 256; + f.clampS8U8 = function(e) { + return b(e) / 256; }; - d.toS16 = function(b) { + f.toS16 = function(b) { return b << 16 >> 16; }; - d.bitCount = function(b) { + f.bitCount = function(b) { b -= b >> 1 & 1431655765; b = (b & 858993459) + (b >> 2 & 858993459); return 16843009 * (b + (b >> 4) & 252645135) >> 24; }; - d.ones = function(b) { + f.ones = function(b) { b -= b >> 1 & 1431655765; b = (b & 858993459) + (b >> 2 & 858993459); return 16843009 * (b + (b >> 4) & 252645135) >> 24; }; - d.trailingZeros = function(b) { - return d.ones((b & -b) - 1); + f.trailingZeros = function(b) { + return f.ones((b & -b) - 1); }; - d.getFlags = function(b, g) { - var d = ""; - for (b = 0;b < g.length;b++) { - b & 1 << b && (d += g[b] + " "); + f.getFlags = function(b, n) { + var e = ""; + for (b = 0;b < n.length;b++) { + b & 1 << b && (e += n[b] + " "); } - return 0 === d.length ? "" : d.trim(); + return 0 === e.length ? "" : e.trim(); }; - d.isPowerOfTwo = function(b) { + f.isPowerOfTwo = function(b) { return b && 0 === (b & b - 1); }; - d.roundToMultipleOfFour = function(b) { + f.roundToMultipleOfFour = function(b) { return b + 3 & -4; }; - d.nearestPowerOfTwo = function(b) { + f.nearestPowerOfTwo = function(b) { b--; b |= b >> 1; b |= b >> 2; @@ -983,229 +960,227 @@ var START_TIME = performance.now(), Shumway; b++; return b; }; - d.roundToMultipleOfPowerOfTwo = function(b, g) { - var d = (1 << g) - 1; - return b + d & ~d; + f.roundToMultipleOfPowerOfTwo = function(b, n) { + var e = (1 << n) - 1; + return b + e & ~e; }; - Math.imul || (Math.imul = function(b, g) { - var d = b & 65535, f = g & 65535; - return d * f + ((b >>> 16 & 65535) * f + d * (g >>> 16 & 65535) << 16 >>> 0) | 0; + Math.imul || (Math.imul = function(b, n) { + var e = b & 65535, f = n & 65535; + return e * f + ((b >>> 16 & 65535) * f + e * (n >>> 16 & 65535) << 16 >>> 0) | 0; }); Math.clz32 || (Math.clz32 = function(b) { b |= b >> 1; b |= b >> 2; b |= b >> 4; b |= b >> 8; - return 32 - d.ones(b | b >> 16); + return 32 - f.ones(b | b >> 16); }); - })(q = c.IntegerUtilities || (c.IntegerUtilities = {})); - (function(d) { - function b(b, d, f, k, e, n) { - return(f - b) * (n - d) - (k - d) * (e - b); + })(p = d.IntegerUtilities || (d.IntegerUtilities = {})); + (function(f) { + function b(b, f, n, g, c, s) { + return(n - b) * (s - f) - (g - f) * (c - b); } - d.pointInPolygon = function(b, d, f) { - for (var k = 0, e = f.length - 2, n = 0;n < e;n += 2) { - var m = f[n + 0], l = f[n + 1], q = f[n + 2], a = f[n + 3]; - (l <= d && a > d || l > d && a <= d) && b < m + (d - l) / (a - l) * (q - m) && k++; + f.pointInPolygon = function(b, f, n) { + for (var g = 0, c = n.length - 2, s = 0;s < c;s += 2) { + var p = n[s + 0], m = n[s + 1], h = n[s + 2], l = n[s + 3]; + (m <= f && l > f || m > f && l <= f) && b < p + (f - m) / (l - m) * (h - p) && g++; } - return 1 === (k & 1); + return 1 === (g & 1); }; - d.signedArea = b; - d.counterClockwise = function(g, d, f, k, e, n) { - return 0 < b(g, d, f, k, e, n); + f.signedArea = b; + f.counterClockwise = function(e, f, n, g, c, s) { + return 0 < b(e, f, n, g, c, s); }; - d.clockwise = function(g, d, f, k, e, n) { - return 0 > b(g, d, f, k, e, n); + f.clockwise = function(e, f, n, g, c, s) { + return 0 > b(e, f, n, g, c, s); }; - d.pointInPolygonInt32 = function(b, d, f) { + f.pointInPolygonInt32 = function(b, f, n) { b |= 0; - d |= 0; - for (var k = 0, e = f.length - 2, n = 0;n < e;n += 2) { - var m = f[n + 0], l = f[n + 1], q = f[n + 2], a = f[n + 3]; - (l <= d && a > d || l > d && a <= d) && b < m + (d - l) / (a - l) * (q - m) && k++; + f |= 0; + for (var g = 0, c = n.length - 2, s = 0;s < c;s += 2) { + var p = n[s + 0], m = n[s + 1], h = n[s + 2], l = n[s + 3]; + (m <= f && l > f || m > f && l <= f) && b < p + (f - m) / (l - m) * (h - p) && g++; } - return 1 === (k & 1); + return 1 === (g & 1); }; - })(c.GeometricUtilities || (c.GeometricUtilities = {})); - (function(d) { - d[d.Error = 1] = "Error"; - d[d.Warn = 2] = "Warn"; - d[d.Debug = 4] = "Debug"; - d[d.Log = 8] = "Log"; - d[d.Info = 16] = "Info"; - d[d.All = 31] = "All"; - })(c.LogLevel || (c.LogLevel = {})); - l = function() { - function d(b, g) { + })(d.GeometricUtilities || (d.GeometricUtilities = {})); + (function(f) { + f[f.Error = 1] = "Error"; + f[f.Warn = 2] = "Warn"; + f[f.Debug = 4] = "Debug"; + f[f.Log = 8] = "Log"; + f[f.Info = 16] = "Info"; + f[f.All = 31] = "All"; + })(d.LogLevel || (d.LogLevel = {})); + t = function() { + function f(b, e) { void 0 === b && (b = !1); this._tab = " "; this._padding = ""; this._suppressOutput = b; - this._out = g || d._consoleOut; - this._outNoNewline = g || d._consoleOutNoNewline; + this._out = e || f._consoleOut; + this._outNoNewline = e || f._consoleOutNoNewline; } - d.prototype.write = function(b, g) { + f.prototype.write = function(b, e) { void 0 === b && (b = ""); - void 0 === g && (g = !1); - this._suppressOutput || this._outNoNewline((g ? this._padding : "") + b); + void 0 === e && (e = !1); + this._suppressOutput || this._outNoNewline((e ? this._padding : "") + b); }; - d.prototype.writeLn = function(b) { + f.prototype.writeLn = function(b) { void 0 === b && (b = ""); this._suppressOutput || this._out(this._padding + b); }; - d.prototype.writeObject = function(b, g) { + f.prototype.writeObject = function(b, e) { void 0 === b && (b = ""); - this._suppressOutput || this._out(this._padding + b, g); + this._suppressOutput || this._out(this._padding + b, e); }; - d.prototype.writeTimeLn = function(b) { + f.prototype.writeTimeLn = function(b) { void 0 === b && (b = ""); this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + b); }; - d.prototype.writeComment = function(b) { + f.prototype.writeComment = function(b) { b = b.split("\n"); if (1 === b.length) { this.writeLn("// " + b[0]); } else { this.writeLn("/**"); - for (var g = 0;g < b.length;g++) { - this.writeLn(" * " + b[g]); + for (var e = 0;e < b.length;e++) { + this.writeLn(" * " + b[e]); } this.writeLn(" */"); } }; - d.prototype.writeLns = function(b) { + f.prototype.writeLns = function(b) { b = b.split("\n"); - for (var g = 0;g < b.length;g++) { - this.writeLn(b[g]); + for (var e = 0;e < b.length;e++) { + this.writeLn(b[e]); } }; - d.prototype.errorLn = function(b) { - d.logLevel & 1 && this.boldRedLn(b); + f.prototype.errorLn = function(b) { + f.logLevel & 1 && this.boldRedLn(b); }; - d.prototype.warnLn = function(b) { - d.logLevel & 2 && this.yellowLn(b); + f.prototype.warnLn = function(b) { + f.logLevel & 2 && this.yellowLn(b); }; - d.prototype.debugLn = function(b) { - d.logLevel & 4 && this.purpleLn(b); + f.prototype.debugLn = function(b) { + f.logLevel & 4 && this.purpleLn(b); }; - d.prototype.logLn = function(b) { - d.logLevel & 8 && this.writeLn(b); + f.prototype.logLn = function(b) { + f.logLevel & 8 && this.writeLn(b); }; - d.prototype.infoLn = function(b) { - d.logLevel & 16 && this.writeLn(b); + f.prototype.infoLn = function(b) { + f.logLevel & 16 && this.writeLn(b); }; - d.prototype.yellowLn = function(b) { - this.colorLn(d.YELLOW, b); + f.prototype.yellowLn = function(b) { + this.colorLn(f.YELLOW, b); }; - d.prototype.greenLn = function(b) { - this.colorLn(d.GREEN, b); + f.prototype.greenLn = function(b) { + this.colorLn(f.GREEN, b); }; - d.prototype.boldRedLn = function(b) { - this.colorLn(d.BOLD_RED, b); + f.prototype.boldRedLn = function(b) { + this.colorLn(f.BOLD_RED, b); }; - d.prototype.redLn = function(b) { - this.colorLn(d.RED, b); + f.prototype.redLn = function(b) { + this.colorLn(f.RED, b); }; - d.prototype.purpleLn = function(b) { - this.colorLn(d.PURPLE, b); + f.prototype.purpleLn = function(b) { + this.colorLn(f.PURPLE, b); }; - d.prototype.colorLn = function(b, g) { - this._suppressOutput || (inBrowser ? this._out(this._padding + g) : this._out(this._padding + b + g + d.ENDC)); + f.prototype.colorLn = function(b, e) { + this._suppressOutput || (inBrowser ? this._out(this._padding + e) : this._out(this._padding + b + e + f.ENDC)); }; - d.prototype.redLns = function(b) { - this.colorLns(d.RED, b); + f.prototype.redLns = function(b) { + this.colorLns(f.RED, b); }; - d.prototype.colorLns = function(b, g) { - for (var d = g.split("\n"), f = 0;f < d.length;f++) { - this.colorLn(b, d[f]); + f.prototype.colorLns = function(b, e) { + for (var f = e.split("\n"), n = 0;n < f.length;n++) { + this.colorLn(b, f[n]); } }; - d.prototype.enter = function(b) { + f.prototype.enter = function(b) { this._suppressOutput || this._out(this._padding + b); this.indent(); }; - d.prototype.leaveAndEnter = function() { + f.prototype.leaveAndEnter = function() { this.leave("Slots"); this.indent(); }; - d.prototype.leave = function(b) { + f.prototype.leave = function(b) { this.outdent(); !this._suppressOutput && b && this._out(this._padding + b); }; - d.prototype.indent = function() { + f.prototype.indent = function() { this._padding += this._tab; }; - d.prototype.outdent = function() { + f.prototype.outdent = function() { 0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length)); }; - d.prototype.writeArray = function(b, g, d) { - void 0 === g && (g = !1); - void 0 === d && (d = !1); - g = g || !1; - for (var f = 0, k = b.length;f < k;f++) { - var e = ""; - g && (e = null === b[f] ? "null" : void 0 === b[f] ? "undefined" : b[f].constructor.name, e += " "); - var n = d ? "" : ("" + f).padRight(" ", 4); - this.writeLn(n + e + b[f]); + f.prototype.writeArray = function(b, e, f) { + void 0 === e && (e = !1); + void 0 === f && (f = !1); + e = e || !1; + for (var n = 0, g = b.length;n < g;n++) { + var c = ""; + e && (c = null === b[n] ? "null" : void 0 === b[n] ? "undefined" : b[n].constructor.name, c += " "); + var s = f ? "" : ("" + n).padRight(" ", 4); + this.writeLn(s + c + b[n]); } }; - d.PURPLE = "\u001b[94m"; - d.YELLOW = "\u001b[93m"; - d.GREEN = "\u001b[92m"; - d.RED = "\u001b[91m"; - d.BOLD_RED = "\u001b[1;91m"; - d.ENDC = "\u001b[0m"; - d.logLevel = 31; - d._consoleOut = console.info.bind(console); - d._consoleOutNoNewline = console.info.bind(console); - return d; + f.PURPLE = "\u001b[94m"; + f.YELLOW = "\u001b[93m"; + f.GREEN = "\u001b[92m"; + f.RED = "\u001b[91m"; + f.BOLD_RED = "\u001b[1;91m"; + f.ENDC = "\u001b[0m"; + f.logLevel = 31; + f._consoleOut = console.info.bind(console); + f._consoleOutNoNewline = console.info.bind(console); + return f; }(); - c.IndentingWriter = l; - var n = function() { - return function(d, b) { - this.value = d; + d.IndentingWriter = t; + var s = function() { + return function(f, b) { + this.value = f; this.next = b; }; - }(), l = function() { - function d(b) { - p.assert(b); + }(), t = function() { + function f(b) { this._compare = b; this._head = null; this._length = 0; } - d.prototype.push = function(b) { - p.assert(void 0 !== b); + f.prototype.push = function(b) { this._length++; if (this._head) { - var g = this._head, d = null; - b = new n(b, null); - for (var f = this._compare;g;) { - if (0 < f(g.value, b.value)) { - d ? (b.next = g, d.next = b) : (b.next = this._head, this._head = b); + var e = this._head, f = null; + b = new s(b, null); + for (var n = this._compare;e;) { + if (0 < n(e.value, b.value)) { + f ? (b.next = e, f.next = b) : (b.next = this._head, this._head = b); return; } - d = g; - g = g.next; + f = e; + e = e.next; } - d.next = b; + f.next = b; } else { - this._head = new n(b, null); + this._head = new s(b, null); } }; - d.prototype.forEach = function(b) { - for (var g = this._head, r = null;g;) { - var f = b(g.value); - if (f === d.RETURN) { + f.prototype.forEach = function(b) { + for (var e = this._head, q = null;e;) { + var n = b(e.value); + if (n === f.RETURN) { break; } else { - f === d.DELETE ? g = r ? r.next = g.next : this._head = this._head.next : (r = g, g = g.next); + n === f.DELETE ? e = q ? q.next = e.next : this._head = this._head.next : (q = e, e = e.next); } } }; - d.prototype.isEmpty = function() { + f.prototype.isEmpty = function() { return!this._head; }; - d.prototype.pop = function() { + f.prototype.pop = function() { if (this._head) { this._length--; var b = this._head; @@ -1213,633 +1188,630 @@ var START_TIME = performance.now(), Shumway; return b.value; } }; - d.prototype.contains = function(b) { - for (var g = this._head;g;) { - if (g.value === b) { + f.prototype.contains = function(b) { + for (var e = this._head;e;) { + if (e.value === b) { return!0; } - g = g.next; + e = e.next; } return!1; }; - d.prototype.toString = function() { - for (var b = "[", g = this._head;g;) { - b += g.value.toString(), (g = g.next) && (b += ","); + f.prototype.toString = function() { + for (var b = "[", e = this._head;e;) { + b += e.value.toString(), (e = e.next) && (b += ","); } return b + "]"; }; - d.RETURN = 1; - d.DELETE = 2; - return d; + f.RETURN = 1; + f.DELETE = 2; + return f; }(); - c.SortedList = l; - l = function() { - function d(b, g) { - void 0 === g && (g = 12); + d.SortedList = t; + t = function() { + function f(b, e) { + void 0 === e && (e = 12); this.start = this.index = 0; - this._size = 1 << g; + this._size = 1 << e; this._mask = this._size - 1; this.array = new b(this._size); } - d.prototype.get = function(b) { + f.prototype.get = function(b) { return this.array[b]; }; - d.prototype.forEachInReverse = function(b) { + f.prototype.forEachInReverse = function(b) { if (!this.isEmpty()) { - for (var g = 0 === this.index ? this._size - 1 : this.index - 1, d = this.start - 1 & this._mask;g !== d && !b(this.array[g], g);) { - g = 0 === g ? this._size - 1 : g - 1; + for (var e = 0 === this.index ? this._size - 1 : this.index - 1, f = this.start - 1 & this._mask;e !== f && !b(this.array[e], e);) { + e = 0 === e ? this._size - 1 : e - 1; } } }; - d.prototype.write = function(b) { + f.prototype.write = function(b) { this.array[this.index] = b; this.index = this.index + 1 & this._mask; this.index === this.start && (this.start = this.start + 1 & this._mask); }; - d.prototype.isFull = function() { + f.prototype.isFull = function() { return(this.index + 1 & this._mask) === this.start; }; - d.prototype.isEmpty = function() { + f.prototype.isEmpty = function() { return this.index === this.start; }; - d.prototype.reset = function() { + f.prototype.reset = function() { this.start = this.index = 0; }; - return d; + return f; }(); - c.CircularBuffer = l; - (function(d) { + d.CircularBuffer = t; + (function(f) { function b(b) { - return b + (d.BITS_PER_WORD - 1) >> d.ADDRESS_BITS_PER_WORD << d.ADDRESS_BITS_PER_WORD; + return b + (f.BITS_PER_WORD - 1) >> f.ADDRESS_BITS_PER_WORD << f.ADDRESS_BITS_PER_WORD; } - function g(b, g) { + function e(b, n) { b = b || "1"; - g = g || "0"; - for (var d = "", r = 0;r < length;r++) { - d += this.get(r) ? b : g; + n = n || "0"; + for (var e = "", f = 0;f < length;f++) { + e += this.get(f) ? b : n; } - return d; + return e; } - function r(b) { - for (var g = [], d = 0;d < length;d++) { - this.get(d) && g.push(b ? b[d] : d); + function q(b) { + for (var n = [], e = 0;e < length;e++) { + this.get(e) && n.push(b ? b[e] : e); } - return g.join(", "); + return n.join(", "); } - var f = c.Debug.assert; - d.ADDRESS_BITS_PER_WORD = 5; - d.BITS_PER_WORD = 1 << d.ADDRESS_BITS_PER_WORD; - d.BIT_INDEX_MASK = d.BITS_PER_WORD - 1; - var k = function() { - function g(r) { - this.size = b(r); + f.ADDRESS_BITS_PER_WORD = 5; + f.BITS_PER_WORD = 1 << f.ADDRESS_BITS_PER_WORD; + f.BIT_INDEX_MASK = f.BITS_PER_WORD - 1; + var n = function() { + function n(e) { + this.size = b(e); this.dirty = this.count = 0; - this.length = r; - this.bits = new Uint32Array(this.size >> d.ADDRESS_BITS_PER_WORD); + this.length = e; + this.bits = new Uint32Array(this.size >> f.ADDRESS_BITS_PER_WORD); } - g.prototype.recount = function() { + n.prototype.recount = function() { if (this.dirty) { - for (var b = this.bits, g = 0, d = 0, r = b.length;d < r;d++) { - var f = b[d], f = f - (f >> 1 & 1431655765), f = (f & 858993459) + (f >> 2 & 858993459), g = g + (16843009 * (f + (f >> 4) & 252645135) >> 24) + for (var b = this.bits, n = 0, e = 0, f = b.length;e < f;e++) { + var q = b[e], q = q - (q >> 1 & 1431655765), q = (q & 858993459) + (q >> 2 & 858993459), n = n + (16843009 * (q + (q >> 4) & 252645135) >> 24) } - this.count = g; + this.count = n; this.dirty = 0; } }; - g.prototype.set = function(b) { - var g = b >> d.ADDRESS_BITS_PER_WORD, r = this.bits[g]; - b = r | 1 << (b & d.BIT_INDEX_MASK); - this.bits[g] = b; - this.dirty |= r ^ b; + n.prototype.set = function(b) { + var n = b >> f.ADDRESS_BITS_PER_WORD, e = this.bits[n]; + b = e | 1 << (b & f.BIT_INDEX_MASK); + this.bits[n] = b; + this.dirty |= e ^ b; }; - g.prototype.setAll = function() { - for (var b = this.bits, g = 0, d = b.length;g < d;g++) { - b[g] = 4294967295; + n.prototype.setAll = function() { + for (var b = this.bits, n = 0, e = b.length;n < e;n++) { + b[n] = 4294967295; } this.count = this.size; this.dirty = 0; }; - g.prototype.assign = function(b) { + n.prototype.assign = function(b) { this.count = b.count; this.dirty = b.dirty; this.size = b.size; - for (var g = 0, d = this.bits.length;g < d;g++) { - this.bits[g] = b.bits[g]; + for (var n = 0, e = this.bits.length;n < e;n++) { + this.bits[n] = b.bits[n]; } }; - g.prototype.clear = function(b) { - var g = b >> d.ADDRESS_BITS_PER_WORD, r = this.bits[g]; - b = r & ~(1 << (b & d.BIT_INDEX_MASK)); - this.bits[g] = b; - this.dirty |= r ^ b; + n.prototype.clear = function(b) { + var n = b >> f.ADDRESS_BITS_PER_WORD, e = this.bits[n]; + b = e & ~(1 << (b & f.BIT_INDEX_MASK)); + this.bits[n] = b; + this.dirty |= e ^ b; }; - g.prototype.get = function(b) { - return 0 !== (this.bits[b >> d.ADDRESS_BITS_PER_WORD] & 1 << (b & d.BIT_INDEX_MASK)); + n.prototype.get = function(b) { + return 0 !== (this.bits[b >> f.ADDRESS_BITS_PER_WORD] & 1 << (b & f.BIT_INDEX_MASK)); }; - g.prototype.clearAll = function() { - for (var b = this.bits, g = 0, d = b.length;g < d;g++) { - b[g] = 0; + n.prototype.clearAll = function() { + for (var b = this.bits, n = 0, e = b.length;n < e;n++) { + b[n] = 0; } this.dirty = this.count = 0; }; - g.prototype._union = function(b) { - var g = this.dirty, d = this.bits; + n.prototype._union = function(b) { + var n = this.dirty, e = this.bits; b = b.bits; - for (var r = 0, f = d.length;r < f;r++) { - var k = d[r], w = k | b[r]; - d[r] = w; - g |= k ^ w; + for (var f = 0, q = e.length;f < q;f++) { + var g = e[f], c = g | b[f]; + e[f] = c; + n |= g ^ c; } - this.dirty = g; + this.dirty = n; }; - g.prototype.intersect = function(b) { - var g = this.dirty, d = this.bits; + n.prototype.intersect = function(b) { + var n = this.dirty, e = this.bits; b = b.bits; - for (var r = 0, f = d.length;r < f;r++) { - var k = d[r], w = k & b[r]; - d[r] = w; - g |= k ^ w; + for (var f = 0, q = e.length;f < q;f++) { + var g = e[f], c = g & b[f]; + e[f] = c; + n |= g ^ c; } - this.dirty = g; + this.dirty = n; }; - g.prototype.subtract = function(b) { - var g = this.dirty, d = this.bits; + n.prototype.subtract = function(b) { + var n = this.dirty, e = this.bits; b = b.bits; - for (var r = 0, f = d.length;r < f;r++) { - var k = d[r], w = k & ~b[r]; - d[r] = w; - g |= k ^ w; + for (var f = 0, q = e.length;f < q;f++) { + var g = e[f], c = g & ~b[f]; + e[f] = c; + n |= g ^ c; } - this.dirty = g; + this.dirty = n; }; - g.prototype.negate = function() { - for (var b = this.dirty, g = this.bits, d = 0, r = g.length;d < r;d++) { - var f = g[d], k = ~f; - g[d] = k; - b |= f ^ k; + n.prototype.negate = function() { + for (var b = this.dirty, n = this.bits, e = 0, f = n.length;e < f;e++) { + var q = n[e], g = ~q; + n[e] = g; + b |= q ^ g; } this.dirty = b; }; - g.prototype.forEach = function(b) { - f(b); - for (var g = this.bits, r = 0, k = g.length;r < k;r++) { - var e = g[r]; - if (e) { - for (var n = 0;n < d.BITS_PER_WORD;n++) { - e & 1 << n && b(r * d.BITS_PER_WORD + n); + n.prototype.forEach = function(b) { + for (var n = this.bits, e = 0, q = n.length;e < q;e++) { + var g = n[e]; + if (g) { + for (var c = 0;c < f.BITS_PER_WORD;c++) { + g & 1 << c && b(e * f.BITS_PER_WORD + c); } } } }; - g.prototype.toArray = function() { - for (var b = [], g = this.bits, r = 0, f = g.length;r < f;r++) { - var k = g[r]; - if (k) { - for (var w = 0;w < d.BITS_PER_WORD;w++) { - k & 1 << w && b.push(r * d.BITS_PER_WORD + w); + n.prototype.toArray = function() { + for (var b = [], n = this.bits, e = 0, q = n.length;e < q;e++) { + var g = n[e]; + if (g) { + for (var c = 0;c < f.BITS_PER_WORD;c++) { + g & 1 << c && b.push(e * f.BITS_PER_WORD + c); } } } return b; }; - g.prototype.equals = function(b) { + n.prototype.equals = function(b) { if (this.size !== b.size) { return!1; } - var g = this.bits; + var n = this.bits; b = b.bits; - for (var d = 0, r = g.length;d < r;d++) { - if (g[d] !== b[d]) { + for (var e = 0, f = n.length;e < f;e++) { + if (n[e] !== b[e]) { return!1; } } return!0; }; - g.prototype.contains = function(b) { + n.prototype.contains = function(b) { if (this.size !== b.size) { return!1; } - var g = this.bits; + var n = this.bits; b = b.bits; - for (var d = 0, r = g.length;d < r;d++) { - if ((g[d] | b[d]) !== g[d]) { + for (var e = 0, f = n.length;e < f;e++) { + if ((n[e] | b[e]) !== n[e]) { return!1; } } return!0; }; - g.prototype.isEmpty = function() { + n.prototype.isEmpty = function() { this.recount(); return 0 === this.count; }; - g.prototype.clone = function() { - var b = new g(this.length); + n.prototype.clone = function() { + var b = new n(this.length); b._union(this); return b; }; - return g; + return n; }(); - d.Uint32ArrayBitSet = k; - var e = function() { - function g(d) { + f.Uint32ArrayBitSet = n; + var g = function() { + function n(e) { this.dirty = this.count = 0; - this.size = b(d); + this.size = b(e); this.bits = 0; this.singleWord = !0; - this.length = d; + this.length = e; } - g.prototype.recount = function() { + n.prototype.recount = function() { if (this.dirty) { var b = this.bits, b = b - (b >> 1 & 1431655765), b = (b & 858993459) + (b >> 2 & 858993459); this.count = 0 + (16843009 * (b + (b >> 4) & 252645135) >> 24); this.dirty = 0; } }; - g.prototype.set = function(b) { - var g = this.bits; - this.bits = b = g | 1 << (b & d.BIT_INDEX_MASK); - this.dirty |= g ^ b; + n.prototype.set = function(b) { + var n = this.bits; + this.bits = b = n | 1 << (b & f.BIT_INDEX_MASK); + this.dirty |= n ^ b; }; - g.prototype.setAll = function() { + n.prototype.setAll = function() { this.bits = 4294967295; this.count = this.size; this.dirty = 0; }; - g.prototype.assign = function(b) { + n.prototype.assign = function(b) { this.count = b.count; this.dirty = b.dirty; this.size = b.size; this.bits = b.bits; }; - g.prototype.clear = function(b) { - var g = this.bits; - this.bits = b = g & ~(1 << (b & d.BIT_INDEX_MASK)); - this.dirty |= g ^ b; + n.prototype.clear = function(b) { + var n = this.bits; + this.bits = b = n & ~(1 << (b & f.BIT_INDEX_MASK)); + this.dirty |= n ^ b; }; - g.prototype.get = function(b) { - return 0 !== (this.bits & 1 << (b & d.BIT_INDEX_MASK)); + n.prototype.get = function(b) { + return 0 !== (this.bits & 1 << (b & f.BIT_INDEX_MASK)); }; - g.prototype.clearAll = function() { + n.prototype.clearAll = function() { this.dirty = this.count = this.bits = 0; }; - g.prototype._union = function(b) { - var g = this.bits; - this.bits = b = g | b.bits; - this.dirty = g ^ b; + n.prototype._union = function(b) { + var n = this.bits; + this.bits = b = n | b.bits; + this.dirty = n ^ b; }; - g.prototype.intersect = function(b) { - var g = this.bits; - this.bits = b = g & b.bits; - this.dirty = g ^ b; + n.prototype.intersect = function(b) { + var n = this.bits; + this.bits = b = n & b.bits; + this.dirty = n ^ b; }; - g.prototype.subtract = function(b) { - var g = this.bits; - this.bits = b = g & ~b.bits; - this.dirty = g ^ b; + n.prototype.subtract = function(b) { + var n = this.bits; + this.bits = b = n & ~b.bits; + this.dirty = n ^ b; }; - g.prototype.negate = function() { - var b = this.bits, g = ~b; - this.bits = g; - this.dirty = b ^ g; + n.prototype.negate = function() { + var b = this.bits, n = ~b; + this.bits = n; + this.dirty = b ^ n; }; - g.prototype.forEach = function(b) { - f(b); - var g = this.bits; - if (g) { - for (var r = 0;r < d.BITS_PER_WORD;r++) { - g & 1 << r && b(r); + n.prototype.forEach = function(b) { + var n = this.bits; + if (n) { + for (var e = 0;e < f.BITS_PER_WORD;e++) { + n & 1 << e && b(e); } } }; - g.prototype.toArray = function() { - var b = [], g = this.bits; - if (g) { - for (var r = 0;r < d.BITS_PER_WORD;r++) { - g & 1 << r && b.push(r); + n.prototype.toArray = function() { + var b = [], n = this.bits; + if (n) { + for (var e = 0;e < f.BITS_PER_WORD;e++) { + n & 1 << e && b.push(e); } } return b; }; - g.prototype.equals = function(b) { + n.prototype.equals = function(b) { return this.bits === b.bits; }; - g.prototype.contains = function(b) { - var g = this.bits; - return(g | b.bits) === g; + n.prototype.contains = function(b) { + var n = this.bits; + return(n | b.bits) === n; }; - g.prototype.isEmpty = function() { + n.prototype.isEmpty = function() { this.recount(); return 0 === this.count; }; - g.prototype.clone = function() { - var b = new g(this.length); + n.prototype.clone = function() { + var b = new n(this.length); b._union(this); return b; }; - return g; + return n; }(); - d.Uint32BitSet = e; - e.prototype.toString = r; - e.prototype.toBitString = g; - k.prototype.toString = r; - k.prototype.toBitString = g; - d.BitSetFunctor = function(g) { - var r = 1 === b(g) >> d.ADDRESS_BITS_PER_WORD ? e : k; + f.Uint32BitSet = g; + g.prototype.toString = q; + g.prototype.toBitString = e; + n.prototype.toString = q; + n.prototype.toBitString = e; + f.BitSetFunctor = function(e) { + var q = 1 === b(e) >> f.ADDRESS_BITS_PER_WORD ? g : n; return function() { - return new r(g); + return new q(e); }; }; - })(c.BitSets || (c.BitSets = {})); - l = function() { - function d() { + })(d.BitSets || (d.BitSets = {})); + t = function() { + function f() { } - d.randomStyle = function() { - d._randomStyleCache || (d._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" ")); - return d._randomStyleCache[d._nextStyle++ % d._randomStyleCache.length]; + f.randomStyle = function() { + f._randomStyleCache || (f._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" ")); + return f._randomStyleCache[f._nextStyle++ % f._randomStyleCache.length]; }; - d.gradientColor = function(b) { - return d._gradient[d._gradient.length * t.clamp(b, 0, 1) | 0]; + f.gradientColor = function(b) { + return f._gradient[f._gradient.length * h.clamp(b, 0, 1) | 0]; }; - d.contrastStyle = function(b) { + f.contrastStyle = function(b) { b = parseInt(b.substr(1), 16); return 128 <= (299 * (b >> 16) + 587 * (b >> 8 & 255) + 114 * (b & 255)) / 1E3 ? "#000000" : "#ffffff"; }; - d.reset = function() { - d._nextStyle = 0; + f.reset = function() { + f._nextStyle = 0; }; - d.TabToolbar = "#252c33"; - d.Toolbars = "#343c45"; - d.HighlightBlue = "#1d4f73"; - d.LightText = "#f5f7fa"; - d.ForegroundText = "#b6babf"; - d.Black = "#000000"; - d.VeryDark = "#14171a"; - d.Dark = "#181d20"; - d.Light = "#a9bacb"; - d.Grey = "#8fa1b2"; - d.DarkGrey = "#5f7387"; - d.Blue = "#46afe3"; - d.Purple = "#6b7abb"; - d.Pink = "#df80ff"; - d.Red = "#eb5368"; - d.Orange = "#d96629"; - d.LightOrange = "#d99b28"; - d.Green = "#70bf53"; - d.BlueGrey = "#5e88b0"; - d._nextStyle = 0; - d._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); - return d; + f.TabToolbar = "#252c33"; + f.Toolbars = "#343c45"; + f.HighlightBlue = "#1d4f73"; + f.LightText = "#f5f7fa"; + f.ForegroundText = "#b6babf"; + f.Black = "#000000"; + f.VeryDark = "#14171a"; + f.Dark = "#181d20"; + f.Light = "#a9bacb"; + f.Grey = "#8fa1b2"; + f.DarkGrey = "#5f7387"; + f.Blue = "#46afe3"; + f.Purple = "#6b7abb"; + f.Pink = "#df80ff"; + f.Red = "#eb5368"; + f.Orange = "#d96629"; + f.LightOrange = "#d99b28"; + f.Green = "#70bf53"; + f.BlueGrey = "#5e88b0"; + f._nextStyle = 0; + f._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); + return f; }(); - c.ColorStyle = l; - l = function() { - function d(b, g, d, f) { + d.ColorStyle = t; + t = function() { + function f(b, e, f, n) { this.xMin = b | 0; - this.yMin = g | 0; - this.xMax = d | 0; - this.yMax = f | 0; + this.yMin = e | 0; + this.xMax = f | 0; + this.yMax = n | 0; } - d.FromUntyped = function(b) { - return new d(b.xMin, b.yMin, b.xMax, b.yMax); + f.FromUntyped = function(b) { + return new f(b.xMin, b.yMin, b.xMax, b.yMax); }; - d.FromRectangle = function(b) { - return new d(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0); + f.FromRectangle = function(b) { + return new f(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0); }; - d.prototype.setElements = function(b, g, d, f) { + f.prototype.setElements = function(b, e, f, n) { this.xMin = b; - this.yMin = g; - this.xMax = d; - this.yMax = f; + this.yMin = e; + this.xMax = f; + this.yMax = n; }; - d.prototype.copyFrom = function(b) { + f.prototype.copyFrom = function(b) { this.setElements(b.xMin, b.yMin, b.xMax, b.yMax); }; - d.prototype.contains = function(b, g) { - return b < this.xMin !== b < this.xMax && g < this.yMin !== g < this.yMax; + f.prototype.contains = function(b, e) { + return b < this.xMin !== b < this.xMax && e < this.yMin !== e < this.yMax; }; - d.prototype.unionInPlace = function(b) { + f.prototype.unionInPlace = function(b) { b.isEmpty() || (this.extendByPoint(b.xMin, b.yMin), this.extendByPoint(b.xMax, b.yMax)); }; - d.prototype.extendByPoint = function(b, g) { + f.prototype.extendByPoint = function(b, e) { this.extendByX(b); - this.extendByY(g); + this.extendByY(e); }; - d.prototype.extendByX = function(b) { + f.prototype.extendByX = function(b) { 134217728 === this.xMin ? this.xMin = this.xMax = b : (this.xMin = Math.min(this.xMin, b), this.xMax = Math.max(this.xMax, b)); }; - d.prototype.extendByY = function(b) { + f.prototype.extendByY = function(b) { 134217728 === this.yMin ? this.yMin = this.yMax = b : (this.yMin = Math.min(this.yMin, b), this.yMax = Math.max(this.yMax, b)); }; - d.prototype.intersects = function(b) { + f.prototype.intersects = function(b) { return this.contains(b.xMin, b.yMin) || this.contains(b.xMax, b.yMax); }; - d.prototype.isEmpty = function() { + f.prototype.isEmpty = function() { return this.xMax <= this.xMin || this.yMax <= this.yMin; }; - Object.defineProperty(d.prototype, "width", {get:function() { + Object.defineProperty(f.prototype, "width", {get:function() { return this.xMax - this.xMin; }, set:function(b) { this.xMax = this.xMin + b; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "height", {get:function() { + Object.defineProperty(f.prototype, "height", {get:function() { return this.yMax - this.yMin; }, set:function(b) { this.yMax = this.yMin + b; }, enumerable:!0, configurable:!0}); - d.prototype.getBaseWidth = function(b) { + f.prototype.getBaseWidth = function(b) { return Math.abs(Math.cos(b)) * (this.xMax - this.xMin) + Math.abs(Math.sin(b)) * (this.yMax - this.yMin); }; - d.prototype.getBaseHeight = function(b) { + f.prototype.getBaseHeight = function(b) { return Math.abs(Math.sin(b)) * (this.xMax - this.xMin) + Math.abs(Math.cos(b)) * (this.yMax - this.yMin); }; - d.prototype.setEmpty = function() { + f.prototype.setEmpty = function() { this.xMin = this.yMin = this.xMax = this.yMax = 0; }; - d.prototype.setToSentinels = function() { + f.prototype.setToSentinels = function() { this.xMin = this.yMin = this.xMax = this.yMax = 134217728; }; - d.prototype.clone = function() { - return new d(this.xMin, this.yMin, this.xMax, this.yMax); + f.prototype.clone = function() { + return new f(this.xMin, this.yMin, this.xMax, this.yMax); }; - d.prototype.toString = function() { + f.prototype.toString = function() { return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }"; }; - return d; + return f; }(); - c.Bounds = l; - l = function() { - function d(b, g, d, f) { - p.assert(h(b)); - p.assert(h(g)); - p.assert(h(d)); - p.assert(h(f)); + d.Bounds = t; + t = function() { + function f(b, e, f, n) { + u.assert(k(b)); + u.assert(k(e)); + u.assert(k(f)); + u.assert(k(n)); this._xMin = b | 0; - this._yMin = g | 0; - this._xMax = d | 0; - this._yMax = f | 0; + this._yMin = e | 0; + this._xMax = f | 0; + this._yMax = n | 0; } - d.FromUntyped = function(b) { - return new d(b.xMin, b.yMin, b.xMax, b.yMax); + f.FromUntyped = function(b) { + return new f(b.xMin, b.yMin, b.xMax, b.yMax); }; - d.FromRectangle = function(b) { - return new d(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0); + f.FromRectangle = function(b) { + return new f(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0); }; - d.prototype.setElements = function(b, g, d, f) { + f.prototype.setElements = function(b, e, f, n) { this.xMin = b; - this.yMin = g; - this.xMax = d; - this.yMax = f; + this.yMin = e; + this.xMax = f; + this.yMax = n; }; - d.prototype.copyFrom = function(b) { + f.prototype.copyFrom = function(b) { this.setElements(b.xMin, b.yMin, b.xMax, b.yMax); }; - d.prototype.contains = function(b, g) { - return b < this.xMin !== b < this.xMax && g < this.yMin !== g < this.yMax; + f.prototype.contains = function(b, e) { + return b < this.xMin !== b < this.xMax && e < this.yMin !== e < this.yMax; }; - d.prototype.unionInPlace = function(b) { + f.prototype.unionInPlace = function(b) { b.isEmpty() || (this.extendByPoint(b.xMin, b.yMin), this.extendByPoint(b.xMax, b.yMax)); }; - d.prototype.extendByPoint = function(b, g) { + f.prototype.extendByPoint = function(b, e) { this.extendByX(b); - this.extendByY(g); + this.extendByY(e); }; - d.prototype.extendByX = function(b) { + f.prototype.extendByX = function(b) { 134217728 === this.xMin ? this.xMin = this.xMax = b : (this.xMin = Math.min(this.xMin, b), this.xMax = Math.max(this.xMax, b)); }; - d.prototype.extendByY = function(b) { + f.prototype.extendByY = function(b) { 134217728 === this.yMin ? this.yMin = this.yMax = b : (this.yMin = Math.min(this.yMin, b), this.yMax = Math.max(this.yMax, b)); }; - d.prototype.intersects = function(b) { + f.prototype.intersects = function(b) { return this.contains(b._xMin, b._yMin) || this.contains(b._xMax, b._yMax); }; - d.prototype.isEmpty = function() { + f.prototype.isEmpty = function() { return this._xMax <= this._xMin || this._yMax <= this._yMin; }; - Object.defineProperty(d.prototype, "xMin", {get:function() { + Object.defineProperty(f.prototype, "xMin", {get:function() { return this._xMin; }, set:function(b) { - p.assert(h(b)); + u.assert(k(b)); this._xMin = b; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "yMin", {get:function() { + Object.defineProperty(f.prototype, "yMin", {get:function() { return this._yMin; }, set:function(b) { - p.assert(h(b)); + u.assert(k(b)); this._yMin = b | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "xMax", {get:function() { + Object.defineProperty(f.prototype, "xMax", {get:function() { return this._xMax; }, set:function(b) { - p.assert(h(b)); + u.assert(k(b)); this._xMax = b | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "width", {get:function() { + Object.defineProperty(f.prototype, "width", {get:function() { return this._xMax - this._xMin; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "yMax", {get:function() { + Object.defineProperty(f.prototype, "yMax", {get:function() { return this._yMax; }, set:function(b) { - p.assert(h(b)); + u.assert(k(b)); this._yMax = b | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "height", {get:function() { + Object.defineProperty(f.prototype, "height", {get:function() { return this._yMax - this._yMin; }, enumerable:!0, configurable:!0}); - d.prototype.getBaseWidth = function(b) { + f.prototype.getBaseWidth = function(b) { return Math.abs(Math.cos(b)) * (this._xMax - this._xMin) + Math.abs(Math.sin(b)) * (this._yMax - this._yMin); }; - d.prototype.getBaseHeight = function(b) { + f.prototype.getBaseHeight = function(b) { return Math.abs(Math.sin(b)) * (this._xMax - this._xMin) + Math.abs(Math.cos(b)) * (this._yMax - this._yMin); }; - d.prototype.setEmpty = function() { + f.prototype.setEmpty = function() { this._xMin = this._yMin = this._xMax = this._yMax = 0; }; - d.prototype.clone = function() { - return new d(this.xMin, this.yMin, this.xMax, this.yMax); + f.prototype.clone = function() { + return new f(this.xMin, this.yMin, this.xMax, this.yMax); }; - d.prototype.toString = function() { + f.prototype.toString = function() { return "{ xMin: " + this._xMin + ", xMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }"; }; - d.prototype.assertValid = function() { + f.prototype.assertValid = function() { }; - return d; + return f; }(); - c.DebugBounds = l; - l = function() { - function d(b, g, d, f) { + d.DebugBounds = t; + t = function() { + function f(b, e, f, n) { this.r = b; - this.g = g; - this.b = d; - this.a = f; + this.g = e; + this.b = f; + this.a = n; } - d.FromARGB = function(b) { - return new d((b >> 16 & 255) / 255, (b >> 8 & 255) / 255, (b >> 0 & 255) / 255, (b >> 24 & 255) / 255); + f.FromARGB = function(b) { + return new f((b >> 16 & 255) / 255, (b >> 8 & 255) / 255, (b >> 0 & 255) / 255, (b >> 24 & 255) / 255); }; - d.FromRGBA = function(b) { - return d.FromARGB(k.RGBAToARGB(b)); + f.FromRGBA = function(b) { + return f.FromARGB(m.RGBAToARGB(b)); }; - d.prototype.toRGBA = function() { + f.prototype.toRGBA = function() { return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a; }; - d.prototype.toCSSStyle = function() { - return k.rgbaToCSSStyle(this.toRGBA()); + f.prototype.toCSSStyle = function() { + return m.rgbaToCSSStyle(this.toRGBA()); }; - d.prototype.set = function(b) { + f.prototype.set = function(b) { this.r = b.r; this.g = b.g; this.b = b.b; this.a = b.a; }; - d.randomColor = function(b) { + f.randomColor = function(b) { void 0 === b && (b = 1); - return new d(Math.random(), Math.random(), Math.random(), b); + return new f(Math.random(), Math.random(), Math.random(), b); }; - d.parseColor = function(b) { - d.colorCache || (d.colorCache = Object.create(null)); - if (d.colorCache[b]) { - return d.colorCache[b]; + f.parseColor = function(b) { + f.colorCache || (f.colorCache = Object.create(null)); + if (f.colorCache[b]) { + return f.colorCache[b]; } - var g = document.createElement("span"); - document.body.appendChild(g); - g.style.backgroundColor = b; - var r = getComputedStyle(g).backgroundColor; - document.body.removeChild(g); - (g = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(r)) || (g = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(r)); - r = new d(0, 0, 0, 0); - r.r = parseFloat(g[1]) / 255; - r.g = parseFloat(g[2]) / 255; - r.b = parseFloat(g[3]) / 255; - r.a = g[4] ? parseFloat(g[4]) / 255 : 1; - return d.colorCache[b] = r; + var e = document.createElement("span"); + document.body.appendChild(e); + e.style.backgroundColor = b; + var q = getComputedStyle(e).backgroundColor; + document.body.removeChild(e); + (e = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(q)) || (e = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(q)); + q = new f(0, 0, 0, 0); + q.r = parseFloat(e[1]) / 255; + q.g = parseFloat(e[2]) / 255; + q.b = parseFloat(e[3]) / 255; + q.a = e[4] ? parseFloat(e[4]) / 255 : 1; + return f.colorCache[b] = q; }; - d.Red = new d(1, 0, 0, 1); - d.Green = new d(0, 1, 0, 1); - d.Blue = new d(0, 0, 1, 1); - d.None = new d(0, 0, 0, 0); - d.White = new d(1, 1, 1, 1); - d.Black = new d(0, 0, 0, 1); - d.colorCache = {}; - return d; + f.Red = new f(1, 0, 0, 1); + f.Green = new f(0, 1, 0, 1); + f.Blue = new f(0, 0, 1, 1); + f.None = new f(0, 0, 0, 0); + f.White = new f(1, 1, 1, 1); + f.Black = new f(0, 0, 0, 1); + f.colorCache = {}; + return f; }(); - c.Color = l; - var k; - (function(d) { + d.Color = t; + var m; + (function(f) { function b(b) { - var g, d, r = b >> 24 & 255; - d = (Math.imul(b >> 16 & 255, r) + 127) / 255 | 0; - g = (Math.imul(b >> 8 & 255, r) + 127) / 255 | 0; - b = (Math.imul(b >> 0 & 255, r) + 127) / 255 | 0; - return r << 24 | d << 16 | g << 8 | b; + var e, f, q = b >> 24 & 255; + f = (Math.imul(b >> 16 & 255, q) + 127) / 255 | 0; + e = (Math.imul(b >> 8 & 255, q) + 127) / 255 | 0; + b = (Math.imul(b >> 0 & 255, q) + 127) / 255 | 0; + return q << 24 | f << 16 | e << 8 | b; } - d.RGBAToARGB = function(b) { + f.RGBAToARGB = function(b) { return b >> 8 & 16777215 | (b & 255) << 24; }; - d.ARGBToRGBA = function(b) { + f.ARGBToRGBA = function(b) { return b << 8 | b >> 24 & 255; }; - d.rgbaToCSSStyle = function(b) { - return c.StringUtilities.concat9("rgba(", b >> 24 & 255, ",", b >> 16 & 255, ",", b >> 8 & 255, ",", (b & 255) / 255, ")"); + f.rgbaToCSSStyle = function(b) { + return d.StringUtilities.concat9("rgba(", b >> 24 & 255, ",", b >> 16 & 255, ",", b >> 8 & 255, ",", (b & 255) / 255, ")"); }; - d.cssStyleToRGBA = function(b) { + f.cssStyleToRGBA = function(b) { if ("#" === b[0]) { if (7 === b.length) { return parseInt(b.substring(1), 16) << 8 | 255; @@ -1851,153 +1823,151 @@ var START_TIME = performance.now(), Shumway; } return 4278190335; }; - d.hexToRGB = function(b) { + f.hexToRGB = function(b) { return parseInt(b.slice(1), 16); }; - d.rgbToHex = function(b) { + f.rgbToHex = function(b) { return "#" + ("000000" + (b >>> 0).toString(16)).slice(-6); }; - d.isValidHexColor = function(b) { + f.isValidHexColor = function(b) { return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(b); }; - d.clampByte = function(b) { + f.clampByte = function(b) { return Math.max(0, Math.min(255, b)); }; - d.unpremultiplyARGB = function(b) { - var g, d, r = b >> 24 & 255; - d = Math.imul(255, b >> 16 & 255) / r & 255; - g = Math.imul(255, b >> 8 & 255) / r & 255; - b = Math.imul(255, b >> 0 & 255) / r & 255; - return r << 24 | d << 16 | g << 8 | b; + f.unpremultiplyARGB = function(b) { + var e, f, q = b >> 24 & 255; + f = Math.imul(255, b >> 16 & 255) / q & 255; + e = Math.imul(255, b >> 8 & 255) / q & 255; + b = Math.imul(255, b >> 0 & 255) / q & 255; + return q << 24 | f << 16 | e << 8 | b; }; - d.premultiplyARGB = b; - var g; - d.ensureUnpremultiplyTable = function() { - if (!g) { - g = new Uint8Array(65536); + f.premultiplyARGB = b; + var e; + f.ensureUnpremultiplyTable = function() { + if (!e) { + e = new Uint8Array(65536); for (var b = 0;256 > b;b++) { - for (var d = 0;256 > d;d++) { - g[(d << 8) + b] = Math.imul(255, b) / d; + for (var f = 0;256 > f;f++) { + e[(f << 8) + b] = Math.imul(255, b) / f; } } } }; - d.tableLookupUnpremultiplyARGB = function(b) { + f.tableLookupUnpremultiplyARGB = function(b) { b |= 0; - var d = b >> 24 & 255; - if (0 === d) { + var f = b >> 24 & 255; + if (0 === f) { return 0; } - if (255 === d) { + if (255 === f) { return b; } - var r, f, k = d << 8, e = g; - f = e[k + (b >> 16 & 255)]; - r = e[k + (b >> 8 & 255)]; - b = e[k + (b >> 0 & 255)]; - return d << 24 | f << 16 | r << 8 | b; + var q, g, c = f << 8, s = e; + g = s[c + (b >> 16 & 255)]; + q = s[c + (b >> 8 & 255)]; + b = s[c + (b >> 0 & 255)]; + return f << 24 | g << 16 | q << 8 | b; }; - d.blendPremultipliedBGRA = function(b, g) { - var d, r; - r = 256 - (g & 255); - d = Math.imul(b & 16711935, r) >> 8; - r = Math.imul(b >> 8 & 16711935, r) >> 8; - return((g >> 8 & 16711935) + r & 16711935) << 8 | (g & 16711935) + d & 16711935; + f.blendPremultipliedBGRA = function(b, e) { + var f, q; + q = 256 - (e & 255); + f = Math.imul(b & 16711935, q) >> 8; + q = Math.imul(b >> 8 & 16711935, q) >> 8; + return((e >> 8 & 16711935) + q & 16711935) << 8 | (e & 16711935) + f & 16711935; }; - var r = q.swap32; - d.convertImage = function(d, k, e, n) { - e !== n && p.assert(e.buffer !== n.buffer, "Can't handle overlapping views."); - var m = e.length; - if (d === k) { - if (e !== n) { - for (d = 0;d < m;d++) { - n[d] = e[d]; + var q = p.swap32; + f.convertImage = function(n, f, c, s) { + var p = c.length; + if (n === f) { + if (c !== s) { + for (n = 0;n < p;n++) { + s[n] = c[n]; } } } else { - if (1 === d && 3 === k) { - for (c.ColorUtilities.ensureUnpremultiplyTable(), d = 0;d < m;d++) { - var l = e[d]; - k = l & 255; - if (0 === k) { - n[d] = 0; + if (1 === n && 3 === f) { + for (d.ColorUtilities.ensureUnpremultiplyTable(), n = 0;n < p;n++) { + var m = c[n]; + f = m & 255; + if (0 === f) { + s[n] = 0; } else { - if (255 === k) { - n[d] = 4278190080 | l >> 8 & 16777215; + if (255 === f) { + s[n] = 4278190080 | m >> 8 & 16777215; } else { - var q = l >> 24 & 255, a = l >> 16 & 255, l = l >> 8 & 255, t = k << 8, s = g, l = s[t + l], a = s[t + a], q = s[t + q]; - n[d] = k << 24 | q << 16 | a << 8 | l; + var h = m >> 24 & 255, l = m >> 16 & 255, m = m >> 8 & 255, a = f << 8, r = e, m = r[a + m], l = r[a + l], h = r[a + h]; + s[n] = f << 24 | h << 16 | l << 8 | m; } } } } else { - if (2 === d && 3 === k) { - for (d = 0;d < m;d++) { - n[d] = r(e[d]); + if (2 === n && 3 === f) { + for (n = 0;n < p;n++) { + s[n] = q(c[n]); } } else { - if (3 === d && 1 === k) { - for (d = 0;d < m;d++) { - k = e[d], n[d] = r(b(k & 4278255360 | k >> 16 & 255 | (k & 255) << 16)); + if (3 === n && 1 === f) { + for (n = 0;n < p;n++) { + f = c[n], s[n] = q(b(f & 4278255360 | f >> 16 & 255 | (f & 255) << 16)); } } else { - for (p.somewhatImplemented("Image Format Conversion: " + f[d] + " -> " + f[k]), d = 0;d < m;d++) { - n[d] = e[d]; + for (u.somewhatImplemented("Image Format Conversion: " + g[n] + " -> " + g[f]), n = 0;n < p;n++) { + s[n] = c[n]; } } } } } }; - })(k = c.ColorUtilities || (c.ColorUtilities = {})); - l = function() { - function d(b) { + })(m = d.ColorUtilities || (d.ColorUtilities = {})); + t = function() { + function f(b) { void 0 === b && (b = 32); this._list = []; this._maxSize = b; } - d.prototype.acquire = function(b) { - if (d._enabled) { - for (var g = this._list, r = 0;r < g.length;r++) { - var f = g[r]; - if (f.byteLength >= b) { - return g.splice(r, 1), f; + f.prototype.acquire = function(b) { + if (f._enabled) { + for (var e = this._list, q = 0;q < e.length;q++) { + var n = e[q]; + if (n.byteLength >= b) { + return e.splice(q, 1), n; } } } return new ArrayBuffer(b); }; - d.prototype.release = function(b) { - if (d._enabled) { - var g = this._list; - p.assert(0 > u.indexOf(g, b)); - g.length === this._maxSize && g.shift(); - g.push(b); + f.prototype.release = function(b) { + if (f._enabled) { + var e = this._list; + e.length === this._maxSize && e.shift(); + e.push(b); } }; - d.prototype.ensureUint8ArrayLength = function(b, g) { - if (b.length >= g) { + f.prototype.ensureUint8ArrayLength = function(b, e) { + if (b.length >= e) { return b; } - var d = Math.max(b.length + g, (3 * b.length >> 1) + 1), d = new Uint8Array(this.acquire(d), 0, d); - d.set(b); + var f = Math.max(b.length + e, (3 * b.length >> 1) + 1), f = new Uint8Array(this.acquire(f), 0, f); + f.set(b); this.release(b.buffer); - return d; + return f; }; - d.prototype.ensureFloat64ArrayLength = function(b, g) { - if (b.length >= g) { + f.prototype.ensureFloat64ArrayLength = function(b, e) { + if (b.length >= e) { return b; } - var d = Math.max(b.length + g, (3 * b.length >> 1) + 1), d = new Float64Array(this.acquire(d * Float64Array.BYTES_PER_ELEMENT), 0, d); - d.set(b); + var f = Math.max(b.length + e, (3 * b.length >> 1) + 1), f = new Float64Array(this.acquire(f * Float64Array.BYTES_PER_ELEMENT), 0, f); + f.set(b); this.release(b.buffer); - return d; + return f; }; - d._enabled = !0; - return d; + f._enabled = !0; + return f; }(); - c.ArrayBufferPool = l; - (function(d) { + d.ArrayBufferPool = t; + (function(f) { (function(b) { b[b.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE"; b[b.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE"; @@ -2005,30 +1975,28 @@ var START_TIME = performance.now(), Shumway; b[b.VIDEO_FEATURE = 4] = "VIDEO_FEATURE"; b[b.SOUND_FEATURE = 5] = "SOUND_FEATURE"; b[b.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE"; - })(d.Feature || (d.Feature = {})); + })(f.Feature || (f.Feature = {})); (function(b) { b[b.AVM1_ERROR = 1] = "AVM1_ERROR"; b[b.AVM2_ERROR = 2] = "AVM2_ERROR"; - })(d.ErrorTypes || (d.ErrorTypes = {})); - d.instance; - })(c.Telemetry || (c.Telemetry = {})); - (function(d) { - d.instance; - })(c.FileLoadingService || (c.FileLoadingService = {})); - c.registerCSSFont = function(d, b, g) { + })(f.ErrorTypes || (f.ErrorTypes = {})); + f.instance; + })(d.Telemetry || (d.Telemetry = {})); + (function(f) { + f.instance; + })(d.FileLoadingService || (d.FileLoadingService = {})); + d.registerCSSFont = function(f, b, e) { if (inBrowser) { - var r = document.head; - r.insertBefore(document.createElement("style"), r.firstChild); - r = document.styleSheets[0]; - b = "@font-face{font-family:swffont" + d + ";src:url(data:font/opentype;base64," + c.StringUtilities.base64ArrayBuffer(b) + ")}"; - r.insertRule(b, r.cssRules.length); - g && (g = document.createElement("div"), g.style.fontFamily = "swffont" + d, g.innerHTML = "hello", document.body.appendChild(g), document.body.removeChild(g)); - } else { - p.warning("Cannot register CSS font outside the browser"); + var q = document.head; + q.insertBefore(document.createElement("style"), q.firstChild); + q = document.styleSheets[0]; + b = "@font-face{font-family:swffont" + f + ";src:url(data:font/opentype;base64," + d.StringUtilities.base64ArrayBuffer(b) + ")}"; + q.insertRule(b, q.cssRules.length); + e && (e = document.createElement("div"), e.style.fontFamily = "swffont" + f, e.innerHTML = "hello", document.body.appendChild(e), document.body.removeChild(e)); } }; - (function(d) { - d.instance = {enabled:!1, initJS:function(b) { + (function(f) { + f.instance = {enabled:!1, initJS:function(b) { }, registerCallback:function(b) { }, unregisterCallback:function(b) { }, eval:function(b) { @@ -2036,77 +2004,76 @@ var START_TIME = performance.now(), Shumway; }, getId:function() { return null; }}; - })(c.ExternalInterfaceService || (c.ExternalInterfaceService = {})); - l = function() { - function d() { + })(d.ExternalInterfaceService || (d.ExternalInterfaceService = {})); + t = function() { + function f() { } - d.prototype.setClipboard = function(b) { - p.abstractMethod("public ClipboardService::setClipboard"); + f.prototype.setClipboard = function(b) { }; - d.instance = null; - return d; + f.instance = null; + return f; }(); - c.ClipboardService = l; - l = function() { - function d() { + d.ClipboardService = t; + t = function() { + function f() { this._queues = {}; } - d.prototype.register = function(b, g) { - p.assert(b); - p.assert(g); - var d = this._queues[b]; - if (d) { - if (-1 < d.indexOf(g)) { + f.prototype.register = function(b, e) { + u.assert(b); + u.assert(e); + var f = this._queues[b]; + if (f) { + if (-1 < f.indexOf(e)) { return; } } else { - d = this._queues[b] = []; + f = this._queues[b] = []; } - d.push(g); + f.push(e); }; - d.prototype.unregister = function(b, g) { - p.assert(b); - p.assert(g); - var d = this._queues[b]; - if (d) { - var f = d.indexOf(g); - -1 !== f && d.splice(f, 1); - 0 === d.length && (this._queues[b] = null); + f.prototype.unregister = function(b, e) { + u.assert(b); + u.assert(e); + var f = this._queues[b]; + if (f) { + var n = f.indexOf(e); + -1 !== n && f.splice(n, 1); + 0 === f.length && (this._queues[b] = null); } }; - d.prototype.notify = function(b, g) { - var d = this._queues[b]; - if (d) { - d = d.slice(); - g = Array.prototype.slice.call(arguments, 0); - for (var f = 0;f < d.length;f++) { - d[f].apply(null, g); + f.prototype.notify = function(b, e) { + var f = this._queues[b]; + if (f) { + f = f.slice(); + e = Array.prototype.slice.call(arguments, 0); + for (var n = 0;n < f.length;n++) { + f[n].apply(null, e); } } }; - d.prototype.notify1 = function(b, g) { - var d = this._queues[b]; - if (d) { - for (var d = d.slice(), f = 0;f < d.length;f++) { - (0,d[f])(b, g); + f.prototype.notify1 = function(b, e) { + var f = this._queues[b]; + if (f) { + for (var f = f.slice(), n = 0;n < f.length;n++) { + (0,f[n])(b, e); } } }; - return d; + return f; }(); - c.Callback = l; - (function(d) { - d[d.None = 0] = "None"; - d[d.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB"; - d[d.StraightAlphaARGB = 2] = "StraightAlphaARGB"; - d[d.StraightAlphaRGBA = 3] = "StraightAlphaRGBA"; - d[d.JPEG = 4] = "JPEG"; - d[d.PNG = 5] = "PNG"; - d[d.GIF = 6] = "GIF"; - })(c.ImageType || (c.ImageType = {})); - var f = c.ImageType; - c.getMIMETypeForImageType = function(d) { - switch(d) { + d.Callback = t; + (function(f) { + f[f.None = 0] = "None"; + f[f.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB"; + f[f.StraightAlphaARGB = 2] = "StraightAlphaARGB"; + f[f.StraightAlphaRGBA = 3] = "StraightAlphaRGBA"; + f[f.JPEG = 4] = "JPEG"; + f[f.PNG = 5] = "PNG"; + f[f.GIF = 6] = "GIF"; + })(d.ImageType || (d.ImageType = {})); + var g = d.ImageType; + d.getMIMETypeForImageType = function(f) { + switch(f) { case 4: return "image/jpeg"; case 5: @@ -2117,8 +2084,8 @@ var START_TIME = performance.now(), Shumway; return "text/plain"; } }; - (function(d) { - d.toCSSCursor = function(b) { + (function(f) { + f.toCSSCursor = function(b) { switch(b) { case 0: return "auto"; @@ -2132,159 +2099,159 @@ var START_TIME = performance.now(), Shumway; return "default"; } }; - })(c.UI || (c.UI = {})); - l = function() { - function d() { - this.promise = new Promise(function(b, d) { + })(d.UI || (d.UI = {})); + t = function() { + function f() { + this.promise = new Promise(function(b, e) { this.resolve = b; - this.reject = d; + this.reject = e; }.bind(this)); } - d.prototype.then = function(b, d) { - return this.promise.then(b, d); + f.prototype.then = function(b, e) { + return this.promise.then(b, e); }; - return d; + return f; }(); - c.PromiseWrapper = l; + d.PromiseWrapper = t; })(Shumway || (Shumway = {})); (function() { - function c(b) { + function d(b) { if ("function" !== typeof b) { throw new TypeError("Invalid deferred constructor"); } - var d = n(); - b = new b(d); - var g = d.resolve; - if ("function" !== typeof g) { + var e = m(); + b = new b(e); + var f = e.resolve; + if ("function" !== typeof f) { throw new TypeError("Invalid resolve construction function"); } - d = d.reject; - if ("function" !== typeof d) { + e = e.reject; + if ("function" !== typeof e) { throw new TypeError("Invalid reject construction function"); } - return{promise:b, resolve:g, reject:d}; + return{promise:b, resolve:f, reject:e}; } - function h(b, d) { + function k(b, e) { if ("object" !== typeof b || null === b) { return!1; } try { - var g = b.then; - if ("function" !== typeof g) { + var f = b.then; + if ("function" !== typeof f) { return!1; } - g.call(b, d.resolve, d.reject); - } catch (f) { - g = d.reject, g(f); + f.call(b, e.resolve, e.reject); + } catch (q) { + f = e.reject, f(q); } return!0; } function a(b) { return "object" === typeof b && null !== b && "undefined" !== typeof b.promiseStatus; } - function s(b, d) { + function r(b, e) { if ("unresolved" === b.promiseStatus) { - var g = b.rejectReactions; - b.result = d; + var f = b.rejectReactions; + b.result = e; b.resolveReactions = void 0; b.rejectReactions = void 0; b.promiseStatus = "has-rejection"; - v(g, d); + v(f, e); } } - function v(b, d) { - for (var g = 0;g < b.length;g++) { - p({reaction:b[g], argument:d}); + function v(b, e) { + for (var f = 0;f < b.length;f++) { + u({reaction:b[f], argument:e}); } } - function p(b) { - 0 === g.length && setTimeout(l, 0); - g.push(b); + function u(b) { + 0 === q.length && setTimeout(l, 0); + q.push(b); } - function u(b, d) { - var g = b.deferred, f = b.handler, k, e; + function t(b, e) { + var f = b.deferred, q = b.handler, g, c; try { - k = f(d); - } catch (n) { - return g = g.reject, g(n); + g = q(e); + } catch (s) { + return f = f.reject, f(s); } - if (k === g.promise) { - return g = g.reject, g(new TypeError("Self resolution")); + if (g === f.promise) { + return f = f.reject, f(new TypeError("Self resolution")); } try { - if (e = h(k, g), !e) { - var m = g.resolve; - return m(k); + if (c = k(g, f), !c) { + var p = f.resolve; + return p(g); } - } catch (l) { - return g = g.reject, g(l); + } catch (m) { + return f = f.reject, f(m); } } function l() { - for (;0 < g.length;) { - var b = g[0]; + for (;0 < q.length;) { + var e = q[0]; try { - u(b.reaction, b.argument); + t(e.reaction, e.argument); } catch (f) { - if ("function" === typeof d.onerror) { - d.onerror(f); + if ("function" === typeof b.onerror) { + b.onerror(f); } } - g.shift(); + q.shift(); } } - function e(b) { + function c(b) { throw b; } - function m(b) { + function h(b) { return b; } - function t(b) { - return function(d) { - s(b, d); + function p(b) { + return function(e) { + r(b, e); }; } - function q(b) { - return function(d) { + function s(b) { + return function(e) { if ("unresolved" === b.promiseStatus) { - var g = b.resolveReactions; - b.result = d; + var f = b.resolveReactions; + b.result = e; b.resolveReactions = void 0; b.rejectReactions = void 0; b.promiseStatus = "has-resolution"; - v(g, d); + v(f, e); } }; } - function n() { - function b(d, g) { - b.resolve = d; - b.reject = g; + function m() { + function b(e, f) { + b.resolve = e; + b.reject = f; } return b; } - function k(b, d, g) { - return function(f) { - if (f === b) { - return g(new TypeError("Self resolution")); + function g(b, e, f) { + return function(q) { + if (q === b) { + return f(new TypeError("Self resolution")); } - var k = b.promiseConstructor; - if (a(f) && f.promiseConstructor === k) { - return f.then(d, g); + var g = b.promiseConstructor; + if (a(q) && q.promiseConstructor === g) { + return q.then(e, f); } - k = c(k); - return h(f, k) ? k.promise.then(d, g) : d(f); + g = d(g); + return k(q, g) ? g.promise.then(e, f) : e(q); }; } - function f(b, d, g, f) { - return function(k) { - d[b] = k; - f.countdown--; - 0 === f.countdown && g.resolve(d); + function f(b, e, f, q) { + return function(g) { + e[b] = g; + q.countdown--; + 0 === q.countdown && f.resolve(e); }; } - function d(b) { - if ("function" !== typeof b) { + function b(e) { + if ("function" !== typeof e) { throw new TypeError("resolver is not a function"); } if ("object" !== typeof this) { @@ -2294,290 +2261,289 @@ var START_TIME = performance.now(), Shumway; this.resolveReactions = []; this.rejectReactions = []; this.result = void 0; - var g = q(this), f = t(this); + var f = s(this), q = p(this); try { - b(g, f); - } catch (k) { - s(this, k); + e(f, q); + } catch (g) { + r(this, g); } - this.promiseConstructor = d; + this.promiseConstructor = b; return this; } - var b = Function("return this")(); - if (b.Promise) { - "function" !== typeof b.Promise.all && (b.Promise.all = function(d) { - var g = 0, f = [], k, e, n = new b.Promise(function(b, d) { - k = b; - e = d; + var e = Function("return this")(); + if (e.Promise) { + "function" !== typeof e.Promise.all && (e.Promise.all = function(b) { + var f = 0, q = [], g, c, s = new e.Promise(function(b, e) { + g = b; + c = e; }); - d.forEach(function(b, d) { - g++; + b.forEach(function(b, e) { + f++; b.then(function(b) { - f[d] = b; - g--; - 0 === g && k(f); - }, e); + q[e] = b; + f--; + 0 === f && g(q); + }, c); }); - 0 === g && k(f); - return n; - }), "function" !== typeof b.Promise.resolve && (b.Promise.resolve = function(d) { - return new b.Promise(function(b) { - b(d); + 0 === f && g(q); + return s; + }), "function" !== typeof e.Promise.resolve && (e.Promise.resolve = function(b) { + return new e.Promise(function(e) { + e(b); }); }); } else { - var g = []; - d.all = function(b) { - var d = c(this), g = [], k = {countdown:0}, e = 0; + var q = []; + b.all = function(b) { + var e = d(this), q = [], g = {countdown:0}, c = 0; b.forEach(function(b) { - this.cast(b).then(f(e, g, d, k), d.reject); - e++; - k.countdown++; + this.cast(b).then(f(c, q, e, g), e.reject); + c++; + g.countdown++; }, this); - 0 === e && d.resolve(g); - return d.promise; + 0 === c && e.resolve(q); + return e.promise; }; - d.cast = function(b) { + b.cast = function(b) { if (a(b)) { return b; } - var d = c(this); - d.resolve(b); - return d.promise; + var e = d(this); + e.resolve(b); + return e.promise; }; - d.reject = function(b) { - var d = c(this); - d.reject(b); - return d.promise; + b.reject = function(b) { + var e = d(this); + e.reject(b); + return e.promise; }; - d.resolve = function(b) { - var d = c(this); - d.resolve(b); - return d.promise; + b.resolve = function(b) { + var e = d(this); + e.resolve(b); + return e.promise; }; - d.prototype = {"catch":function(b) { + b.prototype = {"catch":function(b) { this.then(void 0, b); - }, then:function(b, d) { + }, then:function(b, e) { if (!a(this)) { throw new TypeError("this is not a Promises"); } - var g = c(this.promiseConstructor), f = "function" === typeof d ? d : e, n = {deferred:g, handler:k(this, "function" === typeof b ? b : m, f)}, f = {deferred:g, handler:f}; + var f = d(this.promiseConstructor), q = "function" === typeof e ? e : c, s = {deferred:f, handler:g(this, "function" === typeof b ? b : h, q)}, q = {deferred:f, handler:q}; switch(this.promiseStatus) { case "unresolved": - this.resolveReactions.push(n); - this.rejectReactions.push(f); + this.resolveReactions.push(s); + this.rejectReactions.push(q); break; case "has-resolution": - p({reaction:n, argument:this.result}); + u({reaction:s, argument:this.result}); break; case "has-rejection": - p({reaction:f, argument:this.result}); + u({reaction:q, argument:this.result}); } - return g.promise; + return f.promise; }}; - b.Promise = d; + e.Promise = b; } })(); "undefined" !== typeof exports && (exports.Shumway = Shumway); (function() { - function c(c, a, s) { - c[a] || Object.defineProperty(c, a, {value:s, writable:!0, configurable:!0, enumerable:!1}); + function d(d, a, r) { + d[a] || Object.defineProperty(d, a, {value:r, writable:!0, configurable:!0, enumerable:!1}); } - c(String.prototype, "padRight", function(c, a) { - var s = this, v = s.replace(/\033\[[0-9]*m/g, "").length; - if (!c || v >= a) { - return s; + d(String.prototype, "padRight", function(d, a) { + var r = this, v = r.replace(/\033\[[0-9]*m/g, "").length; + if (!d || v >= a) { + return r; } - for (var v = (a - v) / c.length, p = 0;p < v;p++) { - s += c; + for (var v = (a - v) / d.length, u = 0;u < v;u++) { + r += d; } - return s; + return r; }); - c(String.prototype, "padLeft", function(c, a) { - var s = this, v = s.length; - if (!c || v >= a) { - return s; + d(String.prototype, "padLeft", function(d, a) { + var r = this, v = r.length; + if (!d || v >= a) { + return r; } - for (var v = (a - v) / c.length, p = 0;p < v;p++) { - s = c + s; + for (var v = (a - v) / d.length, u = 0;u < v;u++) { + r = d + r; } - return s; + return r; }); - c(String.prototype, "trim", function() { + d(String.prototype, "trim", function() { return this.replace(/^\s+|\s+$/g, ""); }); - c(String.prototype, "endsWith", function(c) { - return-1 !== this.indexOf(c, this.length - c.length); + d(String.prototype, "endsWith", function(d) { + return-1 !== this.indexOf(d, this.length - d.length); }); - c(Array.prototype, "replace", function(c, a) { - if (c === a) { + d(Array.prototype, "replace", function(d, a) { + if (d === a) { return 0; } - for (var s = 0, v = 0;v < this.length;v++) { - this[v] === c && (this[v] = a, s++); + for (var r = 0, v = 0;v < this.length;v++) { + this[v] === d && (this[v] = a, r++); } - return s; + return r; }); })(); -(function(c) { - (function(h) { - var a = c.isObject, s = c.Debug.assert, v = function() { - function e(e, l, q, n) { - this.shortName = e; - this.longName = l; - this.type = q; - n = n || {}; - this.positional = n.positional; - this.parseFn = n.parse; - this.value = n.defaultValue; +(function(d) { + (function(k) { + var a = d.isObject, r = function() { + function a(l, c, h, p) { + this.shortName = l; + this.longName = c; + this.type = h; + p = p || {}; + this.positional = p.positional; + this.parseFn = p.parse; + this.value = p.defaultValue; } - e.prototype.parse = function(e) { - "boolean" === this.type ? (s("boolean" === typeof e), this.value = e) : "number" === this.type ? (s(!isNaN(e), e + " is not a number"), this.value = parseInt(e, 10)) : this.value = e; + a.prototype.parse = function(l) { + this.value = "boolean" === this.type ? l : "number" === this.type ? parseInt(l, 10) : l; this.parseFn && this.parseFn(this.value); }; - return e; + return a; }(); - h.Argument = v; - var p = function() { - function e() { + k.Argument = r; + var v = function() { + function a() { this.args = []; } - e.prototype.addArgument = function(e, l, q, n) { - e = new v(e, l, q, n); - this.args.push(e); - return e; + a.prototype.addArgument = function(l, c, h, p) { + l = new r(l, c, h, p); + this.args.push(l); + return l; }; - e.prototype.addBoundOption = function(e) { - this.args.push(new v(e.shortName, e.longName, e.type, {parse:function(l) { - e.value = l; + a.prototype.addBoundOption = function(l) { + this.args.push(new r(l.shortName, l.longName, l.type, {parse:function(c) { + l.value = c; }})); }; - e.prototype.addBoundOptionSet = function(e) { - var a = this; - e.options.forEach(function(e) { - e instanceof u ? a.addBoundOptionSet(e) : (s(e instanceof l), a.addBoundOption(e)); + a.prototype.addBoundOptionSet = function(l) { + var c = this; + l.options.forEach(function(h) { + h instanceof u ? c.addBoundOptionSet(h) : c.addBoundOption(h); }); }; - e.prototype.getUsage = function() { - var e = ""; - this.args.forEach(function(l) { - e = l.positional ? e + l.longName : e + ("[-" + l.shortName + "|--" + l.longName + ("boolean" === l.type ? "" : " " + l.type[0].toUpperCase()) + "]"); - e += " "; + a.prototype.getUsage = function() { + var l = ""; + this.args.forEach(function(c) { + l = c.positional ? l + c.longName : l + ("[-" + c.shortName + "|--" + c.longName + ("boolean" === c.type ? "" : " " + c.type[0].toUpperCase()) + "]"); + l += " "; }); - return e; + return l; }; - e.prototype.parse = function(e) { - var l = {}, q = []; - this.args.forEach(function(b) { - b.positional ? q.push(b) : (l["-" + b.shortName] = b, l["--" + b.longName] = b); + a.prototype.parse = function(l) { + var c = {}, h = []; + this.args.forEach(function(f) { + f.positional ? h.push(f) : (c["-" + f.shortName] = f, c["--" + f.longName] = f); }); - for (var n = [];e.length;) { - var k = e.shift(), f = null, d = k; - if ("--" == k) { - n = n.concat(e); + for (var p = [];l.length;) { + var s = l.shift(), m = null, g = s; + if ("--" == s) { + p = p.concat(l); break; } else { - if ("-" == k.slice(0, 1) || "--" == k.slice(0, 2)) { - f = l[k]; - if (!f) { + if ("-" == s.slice(0, 1) || "--" == s.slice(0, 2)) { + m = c[s]; + if (!m) { continue; } - "boolean" !== f.type ? (d = e.shift(), s("-" !== d && "--" !== d, "Argument " + k + " must have a value.")) : d = !0; + g = "boolean" !== m.type ? l.shift() : !0; } else { - q.length ? f = q.shift() : n.push(d); + h.length ? m = h.shift() : p.push(g); } } - f && f.parse(d); + m && m.parse(g); } - s(0 === q.length, "Missing positional arguments."); - return n; + return p; }; - return e; + return a; }(); - h.ArgumentParser = p; + k.ArgumentParser = v; var u = function() { - function e(e, l) { - void 0 === l && (l = null); + function r(l, c) { + void 0 === c && (c = null); this.open = !1; - this.name = e; - this.settings = l || {}; + this.name = l; + this.settings = c || {}; this.options = []; } - e.prototype.register = function(m) { - if (m instanceof e) { - for (var l = 0;l < this.options.length;l++) { - var q = this.options[l]; - if (q instanceof e && q.name === m.name) { - return q; + r.prototype.register = function(l) { + if (l instanceof r) { + for (var c = 0;c < this.options.length;c++) { + var h = this.options[c]; + if (h instanceof r && h.name === l.name) { + return h; } } } - this.options.push(m); + this.options.push(l); if (this.settings) { - if (m instanceof e) { - l = this.settings[m.name], a(l) && (m.settings = l.settings, m.open = l.open); + if (l instanceof r) { + c = this.settings[l.name], a(c) && (l.settings = c.settings, l.open = c.open); } else { - if ("undefined" !== typeof this.settings[m.longName]) { - switch(m.type) { + if ("undefined" !== typeof this.settings[l.longName]) { + switch(l.type) { case "boolean": - m.value = !!this.settings[m.longName]; + l.value = !!this.settings[l.longName]; break; case "number": - m.value = +this.settings[m.longName]; + l.value = +this.settings[l.longName]; break; default: - m.value = this.settings[m.longName]; + l.value = this.settings[l.longName]; } } } } - return m; + return l; }; - e.prototype.trace = function(e) { - e.enter(this.name + " {"); - this.options.forEach(function(l) { - l.trace(e); + r.prototype.trace = function(l) { + l.enter(this.name + " {"); + this.options.forEach(function(c) { + c.trace(l); }); - e.leave("}"); + l.leave("}"); }; - e.prototype.getSettings = function() { - var m = {}; - this.options.forEach(function(l) { - l instanceof e ? m[l.name] = {settings:l.getSettings(), open:l.open} : m[l.longName] = l.value; + r.prototype.getSettings = function() { + var l = {}; + this.options.forEach(function(c) { + c instanceof r ? l[c.name] = {settings:c.getSettings(), open:c.open} : l[c.longName] = c.value; }); - return m; + return l; }; - e.prototype.setSettings = function(m) { - m && this.options.forEach(function(l) { - l instanceof e ? l.name in m && l.setSettings(m[l.name].settings) : l.longName in m && (l.value = m[l.longName]); + r.prototype.setSettings = function(l) { + l && this.options.forEach(function(c) { + c instanceof r ? c.name in l && c.setSettings(l[c.name].settings) : c.longName in l && (c.value = l[c.longName]); }); }; - return e; + return r; }(); - h.OptionSet = u; - var l = function() { - function e(e, l, q, n, k, f) { - void 0 === f && (f = null); - this.longName = l; - this.shortName = e; - this.type = q; - this.value = this.defaultValue = n; - this.description = k; - this.config = f; + k.OptionSet = u; + v = function() { + function a(l, c, h, p, s, m) { + void 0 === m && (m = null); + this.longName = c; + this.shortName = l; + this.type = h; + this.value = this.defaultValue = p; + this.description = s; + this.config = m; } - e.prototype.parse = function(e) { - this.value = e; + a.prototype.parse = function(l) { + this.value = l; }; - e.prototype.trace = function(e) { - e.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")"); + a.prototype.trace = function(l) { + l.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")"); }; - return e; + return a; }(); - h.Option = l; - })(c.Options || (c.Options = {})); + k.Option = v; + })(d.Options || (d.Options = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { function a() { try { return "undefined" !== typeof window && "localStorage" in window && null !== window.localStorage; @@ -2585,74 +2551,74 @@ var START_TIME = performance.now(), Shumway; return!1; } } - function s(c) { - void 0 === c && (c = h.ROOT); - var s = {}; - if (a() && (c = window.localStorage[c])) { + function r(r) { + void 0 === r && (r = k.ROOT); + var d = {}; + if (a() && (r = window.localStorage[r])) { try { - s = JSON.parse(c); - } catch (u) { + d = JSON.parse(r); + } catch (t) { } } - return s; + return d; } - h.ROOT = "Shumway Options"; - h.shumwayOptions = new c.Options.OptionSet(h.ROOT, s()); - h.isStorageSupported = a; - h.load = s; - h.save = function(c, s) { - void 0 === c && (c = null); - void 0 === s && (s = h.ROOT); + k.ROOT = "Shumway Options"; + k.shumwayOptions = new d.Options.OptionSet(k.ROOT, r()); + k.isStorageSupported = a; + k.load = r; + k.save = function(r, d) { + void 0 === r && (r = null); + void 0 === d && (d = k.ROOT); if (a()) { try { - window.localStorage[s] = JSON.stringify(c ? c : h.shumwayOptions.getSettings()); - } catch (u) { + window.localStorage[d] = JSON.stringify(r ? r : k.shumwayOptions.getSettings()); + } catch (t) { } } }; - h.setSettings = function(a) { - h.shumwayOptions.setSettings(a); + k.setSettings = function(a) { + k.shumwayOptions.setSettings(a); }; - h.getSettings = function(a) { - return h.shumwayOptions.getSettings(); + k.getSettings = function(a) { + return k.shumwayOptions.getSettings(); }; - })(c.Settings || (c.Settings = {})); + })(d.Settings || (d.Settings = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { var a = function() { - function a(s, p) { - this._parent = s; - this._timers = c.ObjectUtilities.createMap(); - this._name = p; + function a(r, u) { + this._parent = r; + this._timers = d.ObjectUtilities.createMap(); + this._name = u; this._count = this._total = this._last = this._begin = 0; } - a.time = function(c, p) { - a.start(c); - p(); + a.time = function(d, u) { + a.start(d); + u(); a.stop(); }; - a.start = function(c) { - a._top = a._top._timers[c] || (a._top._timers[c] = new a(a._top, c)); + a.start = function(d) { + a._top = a._top._timers[d] || (a._top._timers[d] = new a(a._top, d)); a._top.start(); - c = a._flat._timers[c] || (a._flat._timers[c] = new a(a._flat, c)); - c.start(); - a._flatStack.push(c); + d = a._flat._timers[d] || (a._flat._timers[d] = new a(a._flat, d)); + d.start(); + a._flatStack.push(d); }; a.stop = function() { a._top.stop(); a._top = a._top._parent; a._flatStack.pop().stop(); }; - a.stopStart = function(c) { + a.stopStart = function(d) { a.stop(); - a.start(c); + a.start(d); }; a.prototype.start = function() { - this._begin = c.getTicks(); + this._begin = d.getTicks(); }; a.prototype.stop = function() { - this._last = c.getTicks() - this._begin; + this._last = d.getTicks() - this._begin; this._total += this._last; this._count += 1; }; @@ -2661,14 +2627,14 @@ var START_TIME = performance.now(), Shumway; }; a.prototype.trace = function(a) { a.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms"); - for (var c in this._timers) { - this._timers[c].trace(a); + for (var r in this._timers) { + this._timers[r].trace(a); } a.outdent(); }; - a.trace = function(c) { - a._base.trace(c); - a._flat.trace(c); + a.trace = function(d) { + a._base.trace(d); + a._flat.trace(d); }; a._base = new a(null, "Total"); a._top = a._base; @@ -2676,10 +2642,10 @@ var START_TIME = performance.now(), Shumway; a._flatStack = []; return a; }(); - h.Timer = a; + k.Timer = a; a = function() { - function a(c) { - this._enabled = c; + function a(r) { + this._enabled = r; this.clear(); } Object.defineProperty(a.prototype, "counts", {get:function() { @@ -2689,64 +2655,64 @@ var START_TIME = performance.now(), Shumway; this._enabled = a; }; a.prototype.clear = function() { - this._counts = c.ObjectUtilities.createMap(); - this._times = c.ObjectUtilities.createMap(); + this._counts = d.ObjectUtilities.createMap(); + this._times = d.ObjectUtilities.createMap(); }; a.prototype.toJSON = function() { return{counts:this._counts, times:this._times}; }; - a.prototype.count = function(a, c, s) { - void 0 === c && (c = 1); - void 0 === s && (s = 0); + a.prototype.count = function(a, r, t) { + void 0 === r && (r = 1); + void 0 === t && (t = 0); if (this._enabled) { - return void 0 === this._counts[a] && (this._counts[a] = 0, this._times[a] = 0), this._counts[a] += c, this._times[a] += s, this._counts[a]; + return void 0 === this._counts[a] && (this._counts[a] = 0, this._times[a] = 0), this._counts[a] += r, this._times[a] += t, this._counts[a]; } }; a.prototype.trace = function(a) { - for (var c in this._counts) { - a.writeLn(c + ": " + this._counts[c]); + for (var r in this._counts) { + a.writeLn(r + ": " + this._counts[r]); } }; - a.prototype._pairToString = function(a, c) { - var s = c[0], l = c[1], e = a[s], s = s + ": " + l; - e && (s += ", " + e.toFixed(4), 1 < l && (s += " (" + (e / l).toFixed(4) + ")")); - return s; + a.prototype._pairToString = function(a, r) { + var t = r[0], l = r[1], c = a[t], t = t + ": " + l; + c && (t += ", " + c.toFixed(4), 1 < l && (t += " (" + (c / l).toFixed(4) + ")")); + return t; }; a.prototype.toStringSorted = function() { - var a = this, c = this._times, s = [], l; + var a = this, r = this._times, t = [], l; for (l in this._counts) { - s.push([l, this._counts[l]]); + t.push([l, this._counts[l]]); } - s.sort(function(e, m) { - return m[1] - e[1]; + t.sort(function(c, h) { + return h[1] - c[1]; }); - return s.map(function(e) { - return a._pairToString(c, e); + return t.map(function(c) { + return a._pairToString(r, c); }).join(", "); }; a.prototype.traceSorted = function(a) { - var c = !0; - void 0 === c && (c = !1); - var s = this, l = this._times, e = [], m; - for (m in this._counts) { - e.push([m, this._counts[m]]); + var r = !0; + void 0 === r && (r = !1); + var t = this, l = this._times, c = [], h; + for (h in this._counts) { + c.push([h, this._counts[h]]); } - e.sort(function(e, m) { - return m[1] - e[1]; + c.sort(function(c, s) { + return s[1] - c[1]; }); - c ? a.writeLn(e.map(function(e) { - return s._pairToString(l, e); - }).join(", ")) : e.forEach(function(e) { - a.writeLn(s._pairToString(l, e)); + r ? a.writeLn(c.map(function(c) { + return t._pairToString(l, c); + }).join(", ")) : c.forEach(function(c) { + a.writeLn(t._pairToString(l, c)); }); }; a.instance = new a(!0); return a; }(); - h.Counter = a; + k.Counter = a; a = function() { - function a(c) { - this._samples = new Float64Array(c); + function a(r) { + this._samples = new Float64Array(r); this._index = this._count = 0; } a.prototype.push = function(a) { @@ -2755,48 +2721,48 @@ var START_TIME = performance.now(), Shumway; this._samples[this._index % this._samples.length] = a; }; a.prototype.average = function() { - for (var a = 0, c = 0;c < this._count;c++) { - a += this._samples[c]; + for (var a = 0, r = 0;r < this._count;r++) { + a += this._samples[r]; } return a / this._count; }; return a; }(); - h.Average = a; - })(c.Metrics || (c.Metrics = {})); + k.Average = a; + })(d.Metrics || (d.Metrics = {})); })(Shumway || (Shumway = {})); -var __extends = this.__extends || function(c, h) { +var __extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { +(function(d) { + (function(d) { function a(b) { - for (var d = Math.max.apply(null, b), f = b.length, k = 1 << d, e = new Uint32Array(k), n = d << 16 | 65535, m = 0;m < k;m++) { - e[m] = n; + for (var f = Math.max.apply(null, b), n = b.length, g = 1 << f, c = new Uint32Array(g), s = f << 16 | 65535, p = 0;p < g;p++) { + c[p] = s; } - for (var n = 0, m = 1, l = 2;m <= d;n <<= 1, ++m, l <<= 1) { - for (var q = 0;q < f;++q) { - if (b[q] === m) { - for (var a = 0, t = 0;t < m;++t) { - a = 2 * a + (n >> t & 1); + for (var s = 0, p = 1, m = 2;p <= f;s <<= 1, ++p, m <<= 1) { + for (var h = 0;h < n;++h) { + if (b[h] === p) { + for (var l = 0, a = 0;a < p;++a) { + l = 2 * l + (s >> a & 1); } - for (t = a;t < k;t += l) { - e[t] = m << 16 | q; + for (a = l;a < g;a += m) { + c[a] = p << 16 | h; } - ++n; + ++s; } } } - return{codes:e, maxBits:d}; + return{codes:c, maxBits:f}; } - var s; + var r; (function(b) { b[b.INIT = 0] = "INIT"; b[b.BLOCK_0 = 1] = "BLOCK_0"; @@ -2806,100 +2772,97 @@ var __extends = this.__extends || function(c, h) { b[b.DONE = 5] = "DONE"; b[b.ERROR = 6] = "ERROR"; b[b.VERIFY_HEADER = 7] = "VERIFY_HEADER"; - })(s || (s = {})); - s = function() { - function b(b) { - this._error = null; + })(r || (r = {})); + r = function() { + function b(e) { } - Object.defineProperty(b.prototype, "error", {get:function() { - return this._error; - }, enumerable:!0, configurable:!0}); b.prototype.push = function(b) { - c.Debug.abstractMethod("Inflate.push"); }; b.prototype.close = function() { }; b.create = function(b) { - return "undefined" !== typeof SpecialInflate ? new k(b) : new v(b); + return "undefined" !== typeof SpecialInflate ? new g(b) : new v(b); }; - b.prototype._processZLibHeader = function(b, d, f) { - if (d + 2 > f) { + b.prototype._processZLibHeader = function(b, e, f) { + if (e + 2 > f) { return 0; } - b = b[d] << 8 | b[d + 1]; - d = null; - 2048 !== (b & 3840) ? d = "inflate: unknown compression method" : 0 !== b % 31 ? d = "inflate: bad FCHECK" : 0 !== (b & 32) && (d = "inflate: FDICT bit set"); - return d ? (this._error = d, -1) : 2; + b = b[e] << 8 | b[e + 1]; + e = null; + 2048 !== (b & 3840) ? e = "inflate: unknown compression method" : 0 !== b % 31 ? e = "inflate: bad FCHECK" : 0 !== (b & 32) && (e = "inflate: FDICT bit set"); + if (e) { + if (this.onError) { + this.onError(e); + } + return-1; + } + return 2; }; - b.inflate = function(d, f, k) { - var e = new Uint8Array(f), n = 0; - f = b.create(k); - f.onData = function(b) { - e.set(b, n); - n += b.length; + b.inflate = function(f, n, g) { + var c = new Uint8Array(n), s = 0; + n = b.create(g); + n.onData = function(b) { + c.set(b, s); + s += b.length; }; - f.push(d); - f.close(); - return e; + n.push(f); + n.close(); + return c; }; return b; }(); - h.Inflate = s; + d.Inflate = r; var v = function(b) { - function d(g) { - b.call(this, g); + function f(n) { + b.call(this, n); this._buffer = null; this._bitLength = this._bitBuffer = this._bufferPosition = this._bufferSize = 0; this._window = new Uint8Array(65794); this._windowPosition = 0; - this._state = g ? 7 : 0; + this._state = n ? 7 : 0; this._isFinalBlock = !1; this._distanceTable = this._literalTable = null; this._block0Read = 0; this._block2State = null; this._copyState = {state:0, len:0, lenBits:0, dist:0, distBits:0}; - this._error = void 0; - if (!n) { - p = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); - u = new Uint16Array(30); + if (!m) { + u = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + t = new Uint16Array(30); l = new Uint8Array(30); - for (var f = g = 0, k = 1;30 > g;++g) { - u[g] = k, k += 1 << (l[g] = ~~((f += 2 < g ? 1 : 0) / 2)); + for (var g = n = 0, q = 1;30 > n;++n) { + t[n] = q, q += 1 << (l[n] = ~~((g += 2 < n ? 1 : 0) / 2)); } - var A = new Uint8Array(288); - for (g = 0;32 > g;++g) { - A[g] = 5; + var r = new Uint8Array(288); + for (n = 0;32 > n;++n) { + r[n] = 5; } - e = a(A.subarray(0, 32)); - m = new Uint16Array(29); - t = new Uint8Array(29); - f = g = 0; - for (k = 3;29 > g;++g) { - m[g] = k - (28 == g ? 1 : 0), k += 1 << (t[g] = ~~((f += 4 < g ? 1 : 0) / 4 % 6)); + c = a(r.subarray(0, 32)); + h = new Uint16Array(29); + p = new Uint8Array(29); + g = n = 0; + for (q = 3;29 > n;++n) { + h[n] = q - (28 == n ? 1 : 0), q += 1 << (p[n] = ~~((g += 4 < n ? 1 : 0) / 4 % 6)); } - for (g = 0;288 > g;++g) { - A[g] = 144 > g || 279 < g ? 8 : 256 > g ? 9 : 7; + for (n = 0;288 > n;++n) { + r[n] = 144 > n || 279 < n ? 8 : 256 > n ? 9 : 7; } - q = a(A); - n = !0; + s = a(r); + m = !0; } } - __extends(d, b); - Object.defineProperty(d.prototype, "error", {get:function() { - return this._error; - }, enumerable:!0, configurable:!0}); - d.prototype.push = function(b) { + __extends(f, b); + f.prototype.push = function(b) { if (!this._buffer || this._buffer.length < this._bufferSize + b.length) { - var d = new Uint8Array(this._bufferSize + b.length); - this._buffer && d.set(this._buffer); - this._buffer = d; + var e = new Uint8Array(this._bufferSize + b.length); + this._buffer && e.set(this._buffer); + this._buffer = e; } this._buffer.set(b, this._bufferSize); this._bufferSize += b.length; this._bufferPosition = 0; b = !1; do { - d = this._windowPosition; + e = this._windowPosition; if (0 === this._state && (b = this._decodeInitState())) { break; } @@ -2923,35 +2886,35 @@ var __extends = this.__extends || function(c, h) { this._bufferPosition = this._bufferSize; break; case 7: - var g = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize); - 0 < g ? (this._bufferPosition += g, this._state = 0) : 0 === g ? b = !0 : this._state = 6; + var f = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize); + 0 < f ? (this._bufferPosition += f, this._state = 0) : 0 === f ? b = !0 : this._state = 6; } - if (0 < this._windowPosition - d) { - this.onData(this._window.subarray(d, this._windowPosition)); + if (0 < this._windowPosition - e) { + this.onData(this._window.subarray(e, this._windowPosition)); } 65536 <= this._windowPosition && ("copyWithin" in this._buffer ? this._window.copyWithin(0, this._windowPosition - 32768, this._windowPosition) : this._window.set(this._window.subarray(this._windowPosition - 32768, this._windowPosition)), this._windowPosition = 32768); } while (!b && this._bufferPosition < this._bufferSize); this._bufferPosition < this._bufferSize ? ("copyWithin" in this._buffer ? this._buffer.copyWithin(0, this._bufferPosition, this._bufferSize) : this._buffer.set(this._buffer.subarray(this._bufferPosition, this._bufferSize)), this._bufferSize -= this._bufferPosition) : this._bufferSize = 0; }; - d.prototype._decodeInitState = function() { + f.prototype._decodeInitState = function() { if (this._isFinalBlock) { return this._state = 5, !1; } - var b = this._buffer, d = this._bufferSize, g = this._bitBuffer, f = this._bitLength, k = this._bufferPosition; - if (3 > (d - k << 3) + f) { + var b = this._buffer, e = this._bufferSize, f = this._bitBuffer, g = this._bitLength, q = this._bufferPosition; + if (3 > (e - q << 3) + g) { return!0; } - 3 > f && (g |= b[k++] << f, f += 8); - var n = g & 7, g = g >> 3, f = f - 3; - switch(n >> 1) { + 3 > g && (f |= b[q++] << g, g += 8); + var p = f & 7, f = f >> 3, g = g - 3; + switch(p >> 1) { case 0: - f = g = 0; - if (4 > d - k) { + g = f = 0; + if (4 > e - q) { return!0; } - var m = b[k] | b[k + 1] << 8, b = b[k + 2] | b[k + 3] << 8, k = k + 4; + var m = b[q] | b[q + 1] << 8, b = b[q + 2] | b[q + 3] << 8, q = q + 4; if (65535 !== (m ^ b)) { - this._error = "inflate: invalid block 0 length"; + this._error("inflate: invalid block 0 length"); b = 6; break; } @@ -2959,285 +2922,290 @@ var __extends = this.__extends || function(c, h) { break; case 1: b = 2; - this._literalTable = q; - this._distanceTable = e; + this._literalTable = s; + this._distanceTable = c; break; case 2: - if (26 > (d - k << 3) + f) { + if (26 > (e - q << 3) + g) { return!0; } - for (;14 > f;) { - g |= b[k++] << f, f += 8; + for (;14 > g;) { + f |= b[q++] << g, g += 8; } - m = (g >> 10 & 15) + 4; - if ((d - k << 3) + f < 14 + 3 * m) { + m = (f >> 10 & 15) + 4; + if ((e - q << 3) + g < 14 + 3 * m) { return!0; } - for (var d = {numLiteralCodes:(g & 31) + 257, numDistanceCodes:(g >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, g = g >> 14, f = f - 14, l = new Uint8Array(19), t = 0;t < m;++t) { - 3 > f && (g |= b[k++] << f, f += 8), l[p[t]] = g & 7, g >>= 3, f -= 3; + for (var e = {numLiteralCodes:(f & 31) + 257, numDistanceCodes:(f >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, f = f >> 14, g = g - 14, h = new Uint8Array(19), l = 0;l < m;++l) { + 3 > g && (f |= b[q++] << g, g += 8), h[u[l]] = f & 7, f >>= 3, g -= 3; } - for (;19 > t;t++) { - l[p[t]] = 0; + for (;19 > l;l++) { + h[u[l]] = 0; } - d.bitLengths = new Uint8Array(d.numLiteralCodes + d.numDistanceCodes); - d.codeLengthTable = a(l); - this._block2State = d; + e.bitLengths = new Uint8Array(e.numLiteralCodes + e.numDistanceCodes); + e.codeLengthTable = a(h); + this._block2State = e; b = 3; break; default: - return this._error = "inflate: unsupported block type", !1; + return this._error("inflate: unsupported block type"), !1; } - this._isFinalBlock = !!(n & 1); + this._isFinalBlock = !!(p & 1); this._state = b; - this._bufferPosition = k; - this._bitBuffer = g; - this._bitLength = f; + this._bufferPosition = q; + this._bitBuffer = f; + this._bitLength = g; return!1; }; - d.prototype._decodeBlock0 = function() { - var b = this._bufferPosition, d = this._windowPosition, g = this._block0Read, f = 65794 - d, k = this._bufferSize - b, e = k < g, n = Math.min(f, k, g); - this._window.set(this._buffer.subarray(b, b + n), d); - this._windowPosition = d + n; - this._bufferPosition = b + n; - this._block0Read = g - n; - return g === n ? (this._state = 0, !1) : e && f < k; - }; - d.prototype._readBits = function(b) { - var d = this._bitBuffer, g = this._bitLength; - if (b > g) { - var f = this._bufferPosition, k = this._bufferSize; - do { - if (f >= k) { - return this._bufferPosition = f, this._bitBuffer = d, this._bitLength = g, -1; - } - d |= this._buffer[f++] << g; - g += 8; - } while (b > g); - this._bufferPosition = f; + f.prototype._error = function(b) { + if (this.onError) { + this.onError(b); } - this._bitBuffer = d >> b; - this._bitLength = g - b; - return d & (1 << b) - 1; }; - d.prototype._readCode = function(b) { - var d = this._bitBuffer, g = this._bitLength, f = b.maxBits; - if (f > g) { - var k = this._bufferPosition, e = this._bufferSize; + f.prototype._decodeBlock0 = function() { + var b = this._bufferPosition, e = this._windowPosition, f = this._block0Read, g = 65794 - e, q = this._bufferSize - b, c = q < f, s = Math.min(g, q, f); + this._window.set(this._buffer.subarray(b, b + s), e); + this._windowPosition = e + s; + this._bufferPosition = b + s; + this._block0Read = f - s; + return f === s ? (this._state = 0, !1) : c && g < q; + }; + f.prototype._readBits = function(b) { + var e = this._bitBuffer, f = this._bitLength; + if (b > f) { + var g = this._bufferPosition, q = this._bufferSize; do { - if (k >= e) { - return this._bufferPosition = k, this._bitBuffer = d, this._bitLength = g, -1; + if (g >= q) { + return this._bufferPosition = g, this._bitBuffer = e, this._bitLength = f, -1; } - d |= this._buffer[k++] << g; - g += 8; - } while (f > g); - this._bufferPosition = k; + e |= this._buffer[g++] << f; + f += 8; + } while (b > f); + this._bufferPosition = g; } - b = b.codes[d & (1 << f) - 1]; - f = b >> 16; + this._bitBuffer = e >> b; + this._bitLength = f - b; + return e & (1 << b) - 1; + }; + f.prototype._readCode = function(b) { + var e = this._bitBuffer, f = this._bitLength, g = b.maxBits; + if (g > f) { + var q = this._bufferPosition, c = this._bufferSize; + do { + if (q >= c) { + return this._bufferPosition = q, this._bitBuffer = e, this._bitLength = f, -1; + } + e |= this._buffer[q++] << f; + f += 8; + } while (g > f); + this._bufferPosition = q; + } + b = b.codes[e & (1 << g) - 1]; + g = b >> 16; if (b & 32768) { - return this._error = "inflate: invalid encoding", this._state = 6, -1; + return this._error("inflate: invalid encoding"), this._state = 6, -1; } - this._bitBuffer = d >> f; - this._bitLength = g - f; + this._bitBuffer = e >> g; + this._bitLength = f - g; return b & 65535; }; - d.prototype._decodeBlock2Pre = function() { - var b = this._block2State, d = b.numLiteralCodes + b.numDistanceCodes, g = b.bitLengths, f = b.codesRead, k = 0 < f ? g[f - 1] : 0, e = b.codeLengthTable, n; + f.prototype._decodeBlock2Pre = function() { + var b = this._block2State, e = b.numLiteralCodes + b.numDistanceCodes, f = b.bitLengths, g = b.codesRead, q = 0 < g ? f[g - 1] : 0, c = b.codeLengthTable, s; if (0 < b.dupBits) { - n = this._readBits(b.dupBits); - if (0 > n) { + s = this._readBits(b.dupBits); + if (0 > s) { return!0; } - for (;n--;) { - g[f++] = k; + for (;s--;) { + f[g++] = q; } b.dupBits = 0; } - for (;f < d;) { - var m = this._readCode(e); - if (0 > m) { - return b.codesRead = f, !0; + for (;g < e;) { + var p = this._readCode(c); + if (0 > p) { + return b.codesRead = g, !0; } - if (16 > m) { - g[f++] = k = m; + if (16 > p) { + f[g++] = q = p; } else { - var l; - switch(m) { + var m; + switch(p) { case 16: - l = 2; - n = 3; - m = k; + m = 2; + s = 3; + p = q; break; case 17: - n = l = 3; - m = 0; + s = m = 3; + p = 0; break; case 18: - l = 7, n = 11, m = 0; + m = 7, s = 11, p = 0; } - for (;n--;) { - g[f++] = m; + for (;s--;) { + f[g++] = p; } - n = this._readBits(l); - if (0 > n) { - return b.codesRead = f, b.dupBits = l, !0; + s = this._readBits(m); + if (0 > s) { + return b.codesRead = g, b.dupBits = m, !0; } - for (;n--;) { - g[f++] = m; + for (;s--;) { + f[g++] = p; } - k = m; + q = p; } } - this._literalTable = a(g.subarray(0, b.numLiteralCodes)); - this._distanceTable = a(g.subarray(b.numLiteralCodes)); + this._literalTable = a(f.subarray(0, b.numLiteralCodes)); + this._distanceTable = a(f.subarray(b.numLiteralCodes)); this._state = 4; this._block2State = null; return!1; }; - d.prototype._decodeBlock = function() { - var b = this._literalTable, d = this._distanceTable, g = this._window, f = this._windowPosition, k = this._copyState, e, n, q, a; - if (0 !== k.state) { - switch(k.state) { + f.prototype._decodeBlock = function() { + var b = this._literalTable, e = this._distanceTable, f = this._window, g = this._windowPosition, q = this._copyState, c, s, m, a; + if (0 !== q.state) { + switch(q.state) { case 1: - if (0 > (e = this._readBits(k.lenBits))) { + if (0 > (c = this._readBits(q.lenBits))) { return!0; } - k.len += e; - k.state = 2; + q.len += c; + q.state = 2; case 2: - if (0 > (e = this._readCode(d))) { + if (0 > (c = this._readCode(e))) { return!0; } - k.distBits = l[e]; - k.dist = u[e]; - k.state = 3; + q.distBits = l[c]; + q.dist = t[c]; + q.state = 3; case 3: - e = 0; - if (0 < k.distBits && 0 > (e = this._readBits(k.distBits))) { + c = 0; + if (0 < q.distBits && 0 > (c = this._readBits(q.distBits))) { return!0; } - a = k.dist + e; - n = k.len; - for (e = f - a;n--;) { - g[f++] = g[e++]; + a = q.dist + c; + s = q.len; + for (c = g - a;s--;) { + f[g++] = f[c++]; } - k.state = 0; - if (65536 <= f) { - return this._windowPosition = f, !1; + q.state = 0; + if (65536 <= g) { + return this._windowPosition = g, !1; } break; } } do { - e = this._readCode(b); - if (0 > e) { - return this._windowPosition = f, !0; + c = this._readCode(b); + if (0 > c) { + return this._windowPosition = g, !0; } - if (256 > e) { - g[f++] = e; + if (256 > c) { + f[g++] = c; } else { - if (256 < e) { - this._windowPosition = f; - e -= 257; - q = t[e]; - n = m[e]; - e = 0 === q ? 0 : this._readBits(q); - if (0 > e) { - return k.state = 1, k.len = n, k.lenBits = q, !0; + if (256 < c) { + this._windowPosition = g; + c -= 257; + m = p[c]; + s = h[c]; + c = 0 === m ? 0 : this._readBits(m); + if (0 > c) { + return q.state = 1, q.len = s, q.lenBits = m, !0; } - n += e; - e = this._readCode(d); - if (0 > e) { - return k.state = 2, k.len = n, !0; + s += c; + c = this._readCode(e); + if (0 > c) { + return q.state = 2, q.len = s, !0; } - q = l[e]; - a = u[e]; - e = 0 === q ? 0 : this._readBits(q); - if (0 > e) { - return k.state = 3, k.len = n, k.dist = a, k.distBits = q, !0; + m = l[c]; + a = t[c]; + c = 0 === m ? 0 : this._readBits(m); + if (0 > c) { + return q.state = 3, q.len = s, q.dist = a, q.distBits = m, !0; } - a += e; - for (e = f - a;n--;) { - g[f++] = g[e++]; + a += c; + for (c = g - a;s--;) { + f[g++] = f[c++]; } } else { this._state = 0; break; } } - } while (65536 > f); - this._windowPosition = f; + } while (65536 > g); + this._windowPosition = g; return!1; }; - return d; - }(s), p, u, l, e, m, t, q, n = !1, k = function(b) { - function d(g) { - b.call(this, g); - this._verifyHeader = g; + return f; + }(r), u, t, l, c, h, p, s, m = !1, g = function(b) { + function f(n) { + b.call(this, n); + this._verifyHeader = n; this._specialInflate = new SpecialInflate; this._specialInflate.onData = function(b) { this.onData(b); }.bind(this); } - __extends(d, b); - d.prototype.push = function(b) { + __extends(f, b); + f.prototype.push = function(b) { if (this._verifyHeader) { - var d; - this._buffer ? (d = new Uint8Array(this._buffer.length + b.length), d.set(this._buffer), d.set(b, this._buffer.length), this._buffer = null) : d = new Uint8Array(b); - var g = this._processZLibHeader(d, 0, d.length); - if (0 === g) { - this._buffer = d; + var e; + this._buffer ? (e = new Uint8Array(this._buffer.length + b.length), e.set(this._buffer), e.set(b, this._buffer.length), this._buffer = null) : e = new Uint8Array(b); + var f = this._processZLibHeader(e, 0, e.length); + if (0 === f) { + this._buffer = e; return; } this._verifyHeader = !0; - 0 < g && (b = d.subarray(g)); + 0 < f && (b = e.subarray(f)); } - this._error || this._specialInflate.push(b); + this._specialInflate.push(b); }; - d.prototype.close = function() { + f.prototype.close = function() { this._specialInflate && (this._specialInflate.close(), this._specialInflate = null); }; - return d; - }(s), f; + return f; + }(r), f; (function(b) { b[b.WRITE = 0] = "WRITE"; b[b.DONE = 1] = "DONE"; b[b.ZLIB_HEADER = 2] = "ZLIB_HEADER"; })(f || (f = {})); - var d = function() { + var b = function() { function b() { this.a = 1; this.b = 0; } - b.prototype.update = function(b, d, f) { - for (var k = this.a, e = this.b;d < f;++d) { - k = (k + (b[d] & 255)) % 65521, e = (e + k) % 65521; + b.prototype.update = function(b, e, f) { + for (var g = this.a, c = this.b;e < f;++e) { + g = (g + (b[e] & 255)) % 65521, c = (c + g) % 65521; } - this.a = k; - this.b = e; + this.a = g; + this.b = c; }; b.prototype.getChecksum = function() { return this.b << 16 | this.a; }; return b; }(); - h.Adler32 = d; + d.Adler32 = b; f = function() { - function b(b) { - this._state = (this._writeZlibHeader = b) ? 2 : 0; - this._adler32 = b ? new d : null; + function e(e) { + this._state = (this._writeZlibHeader = e) ? 2 : 0; + this._adler32 = e ? new b : null; } - b.prototype.push = function(b) { + e.prototype.push = function(b) { 2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0); - for (var d = b.length, f = new Uint8Array(d + 5 * Math.ceil(d / 65535)), k = 0, e = 0;65535 < d;) { - f.set(new Uint8Array([0, 255, 255, 0, 0]), k), k += 5, f.set(b.subarray(e, e + 65535), k), e += 65535, k += 65535, d -= 65535; + for (var e = b.length, f = new Uint8Array(e + 5 * Math.ceil(e / 65535)), g = 0, c = 0;65535 < e;) { + f.set(new Uint8Array([0, 255, 255, 0, 0]), g), g += 5, f.set(b.subarray(c, c + 65535), g), c += 65535, g += 65535, e -= 65535; } - f.set(new Uint8Array([0, d & 255, d >> 8 & 255, ~d & 255, ~d >> 8 & 255]), k); - f.set(b.subarray(e, d), k + 5); + f.set(new Uint8Array([0, e & 255, e >> 8 & 255, ~e & 255, ~e >> 8 & 255]), g); + f.set(b.subarray(c, e), g + 5); this.onData(f); - this._adler32 && this._adler32.update(b, 0, d); + this._adler32 && this._adler32.update(b, 0, e); }; - b.prototype.finish = function() { + e.prototype.close = function() { this._state = 1; this.onData(new Uint8Array([1, 0, 0, 255, 255])); if (this._adler32) { @@ -3245,130 +3213,523 @@ var __extends = this.__extends || function(c, h) { this.onData(new Uint8Array([b & 255, b >> 8 & 255, b >> 16 & 255, b >>> 24 & 255])); } }; - return b; + return e; }(); - h.Deflate = f; - })(c.ArrayUtilities || (c.ArrayUtilities = {})); + d.Deflate = f; + })(d.ArrayUtilities || (d.ArrayUtilities = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - function a(k, f) { - k !== l(k, 0, f) && throwError("RangeError", Errors.ParamRangeError); - } - function s(k) { - return "string" === typeof k ? k : void 0 == k ? null : k + ""; - } - var v = c.Debug.notImplemented, p = c.StringUtilities.utf8decode, u = c.StringUtilities.utf8encode, l = c.NumberUtilities.clamp, e = function() { - return function(k, f, d) { - this.buffer = k; - this.length = f; - this.littleEndian = d; - }; - }(); - h.PlainObjectDataBuffer = e; - for (var m = new Uint32Array(33), t = 1, q = 0;32 >= t;t++) { - m[t] = q = q << 1 | 1; - } - var n; - (function(k) { - k[k.U8 = 1] = "U8"; - k[k.I32 = 2] = "I32"; - k[k.F32 = 4] = "F32"; - })(n || (n = {})); - t = function() { - function k(f) { - void 0 === f && (f = k.INITIAL_SIZE); - this._buffer || (this._buffer = new ArrayBuffer(f), this._position = this._length = 0, this._resetViews(), this._littleEndian = k._nativeLittleEndian, this._bitLength = this._bitBuffer = 0); +(function(d) { + (function(d) { + function a(b) { + for (var e = new Uint16Array(b), f = 0;f < b;f++) { + e[f] = 1024; } - k.FromArrayBuffer = function(f, d) { - void 0 === d && (d = -1); - var b = Object.create(k.prototype); - b._buffer = f; - b._length = -1 === d ? f.byteLength : d; - b._position = 0; - b._resetViews(); - b._littleEndian = k._nativeLittleEndian; - b._bitBuffer = 0; - b._bitLength = 0; + return e; + } + function r(b, e, f, g) { + for (var c = 1, s = 0, p = 0;p < f;p++) { + var m = g.decodeBit(b, c + e), c = (c << 1) + m, s = s | m << p + } + return s; + } + function v(b, e) { + var f = []; + f.length = e; + for (var g = 0;g < e;g++) { + f[g] = new h(b); + } + return f; + } + var u = function() { + function b() { + this.pos = this.available = 0; + this.buffer = new Uint8Array(2E3); + } + b.prototype.append = function(b) { + var e = this.pos + this.available, f = e + b.length; + if (f > this.buffer.length) { + for (var g = 2 * this.buffer.length;g < f;) { + g *= 2; + } + f = new Uint8Array(g); + f.set(this.buffer); + this.buffer = f; + } + this.buffer.set(b, e); + this.available += b.length; + }; + b.prototype.compact = function() { + 0 !== this.available && (this.buffer.set(this.buffer.subarray(this.pos, this.pos + this.available), 0), this.pos = 0); + }; + b.prototype.readByte = function() { + if (0 >= this.available) { + throw Error("Unexpected end of file"); + } + this.available--; + return this.buffer[this.pos++]; + }; + return b; + }(), t = function() { + function b(e) { + this.onData = e; + this.processed = 0; + } + b.prototype.writeBytes = function(b) { + this.onData.call(null, b); + this.processed += b.length; + }; + return b; + }(), l = function() { + function b(e) { + this.outStream = e; + this.buf = null; + this.size = this.pos = 0; + this.isFull = !1; + this.totalPos = this.writePos = 0; + } + b.prototype.create = function(b) { + this.buf = new Uint8Array(b); + this.pos = 0; + this.size = b; + this.isFull = !1; + this.totalPos = this.writePos = 0; + }; + b.prototype.putByte = function(b) { + this.totalPos++; + this.buf[this.pos++] = b; + this.pos === this.size && (this.flush(), this.pos = 0, this.isFull = !0); + }; + b.prototype.getByte = function(b) { + return this.buf[b <= this.pos ? this.pos - b : this.size - b + this.pos]; + }; + b.prototype.flush = function() { + this.writePos < this.pos && (this.outStream.writeBytes(this.buf.subarray(this.writePos, this.pos)), this.writePos = this.pos === this.size ? 0 : this.pos); + }; + b.prototype.copyMatch = function(b, e) { + for (var f = this.pos, g = this.size, q = this.buf, c = b <= f ? f - b : g - b + f, s = e;0 < s;) { + for (var p = Math.min(Math.min(s, g - f), g - c), m = 0;m < p;m++) { + var h = q[c++]; + q[f++] = h; + } + f === g && (this.pos = f, this.flush(), f = 0, this.isFull = !0); + c === g && (c = 0); + s -= p; + } + this.pos = f; + this.totalPos += e; + }; + b.prototype.checkDistance = function(b) { + return b <= this.pos || this.isFull; + }; + b.prototype.isEmpty = function() { + return 0 === this.pos && !this.isFull; + }; + return b; + }(), c = function() { + function b(e) { + this.inStream = e; + this.code = this.range = 0; + this.corrupted = !1; + } + b.prototype.init = function() { + 0 !== this.inStream.readByte() && (this.corrupted = !0); + this.range = -1; + for (var b = 0, e = 0;4 > e;e++) { + b = b << 8 | this.inStream.readByte(); + } + b === this.range && (this.corrupted = !0); + this.code = b; + }; + b.prototype.isFinishedOK = function() { + return 0 === this.code; + }; + b.prototype.decodeDirectBits = function(b) { + var e = 0, f = this.range, g = this.code; + do { + var f = f >>> 1 | 0, g = g - f | 0, q = g >> 31, g = g + (f & q) | 0; + g === f && (this.corrupted = !0); + 0 <= f && 16777216 > f && (f <<= 8, g = g << 8 | this.inStream.readByte()); + e = (e << 1) + q + 1 | 0; + } while (--b); + this.range = f; + this.code = g; + return e; + }; + b.prototype.decodeBit = function(b, e) { + var f = this.range, g = this.code, q = b[e], c = (f >>> 11) * q; + g >>> 0 < c ? (q = q + (2048 - q >> 5) | 0, f = c | 0, c = 0) : (q = q - (q >> 5) | 0, g = g - c | 0, f = f - c | 0, c = 1); + b[e] = q & 65535; + 0 <= f && 16777216 > f && (f <<= 8, g = g << 8 | this.inStream.readByte()); + this.range = f; + this.code = g; + return c; + }; + return b; + }(), h = function() { + function b(e) { + this.numBits = e; + this.probs = a(1 << e); + } + b.prototype.decode = function(b) { + for (var e = 1, f = 0;f < this.numBits;f++) { + e = (e << 1) + b.decodeBit(this.probs, e); + } + return e - (1 << this.numBits); + }; + b.prototype.reverseDecode = function(b) { + return r(this.probs, 0, this.numBits, b); + }; + return b; + }(), p = function() { + function b() { + this.choice = a(2); + this.lowCoder = v(3, 16); + this.midCoder = v(3, 16); + this.highCoder = new h(8); + } + b.prototype.decode = function(b, e) { + return 0 === b.decodeBit(this.choice, 0) ? this.lowCoder[e].decode(b) : 0 === b.decodeBit(this.choice, 1) ? 8 + this.midCoder[e].decode(b) : 16 + this.highCoder.decode(b); + }; + return b; + }(), s = function() { + function e(b, f) { + this.rangeDec = new c(b); + this.outWindow = new l(f); + this.markerIsMandatory = !1; + this.dictSizeInProperties = this.dictSize = this.lp = this.pb = this.lc = 0; + this.leftToUnpack = this.unpackSize = void 0; + this.reps = new Int32Array(4); + this.state = 0; + } + e.prototype.decodeProperties = function(b) { + var e = b[0]; + if (225 <= e) { + throw Error("Incorrect LZMA properties"); + } + this.lc = e % 9; + e = e / 9 | 0; + this.pb = e / 5 | 0; + this.lp = e % 5; + for (e = this.dictSizeInProperties = 0;4 > e;e++) { + this.dictSizeInProperties |= b[e + 1] << 8 * e; + } + this.dictSize = this.dictSizeInProperties; + 4096 > this.dictSize && (this.dictSize = 4096); + }; + e.prototype.create = function() { + this.outWindow.create(this.dictSize); + this.init(); + this.rangeDec.init(); + this.reps[0] = 0; + this.reps[1] = 0; + this.reps[2] = 0; + this.state = this.reps[3] = 0; + this.leftToUnpack = this.unpackSize; + }; + e.prototype.decodeLiteral = function(b, e) { + var f = this.outWindow, g = this.rangeDec, q = 0; + f.isEmpty() || (q = f.getByte(1)); + var c = 1, q = 768 * (((f.totalPos & (1 << this.lp) - 1) << this.lc) + (q >> 8 - this.lc)); + if (7 <= b) { + f = f.getByte(e + 1); + do { + var s = f >> 7 & 1, f = f << 1, p = g.decodeBit(this.litProbs, q + ((1 + s << 8) + c)), c = c << 1 | p; + if (s !== p) { + break; + } + } while (256 > c); + } + for (;256 > c;) { + c = c << 1 | g.decodeBit(this.litProbs, q + c); + } + return c - 256 & 255; + }; + e.prototype.decodeDistance = function(b) { + var e = b; + 3 < e && (e = 3); + b = this.rangeDec; + e = this.posSlotDecoder[e].decode(b); + if (4 > e) { + return e; + } + var f = (e >> 1) - 1, g = (2 | e & 1) << f; + 14 > e ? g = g + r(this.posDecoders, g - e, f, b) | 0 : (g = g + (b.decodeDirectBits(f - 4) << 4) | 0, g = g + this.alignDecoder.reverseDecode(b) | 0); + return g; + }; + e.prototype.init = function() { + this.litProbs = a(768 << this.lc + this.lp); + this.posSlotDecoder = v(6, 4); + this.alignDecoder = new h(4); + this.posDecoders = a(115); + this.isMatch = a(192); + this.isRep = a(12); + this.isRepG0 = a(12); + this.isRepG1 = a(12); + this.isRepG2 = a(12); + this.isRep0Long = a(192); + this.lenDecoder = new p; + this.repLenDecoder = new p; + }; + e.prototype.decode = function(e) { + for (var q = this.rangeDec, c = this.outWindow, s = this.pb, p = this.dictSize, h = this.markerIsMandatory, l = this.leftToUnpack, a = this.isMatch, r = this.isRep, t = this.isRepG0, d = this.isRepG1, u = this.isRepG2, k = this.isRep0Long, v = this.lenDecoder, G = this.repLenDecoder, C = this.reps[0], I = this.reps[1], P = this.reps[2], T = this.reps[3], O = this.state;;) { + if (e && 48 > q.inStream.available) { + this.outWindow.flush(); + break; + } + if (0 === l && !h && (this.outWindow.flush(), q.isFinishedOK())) { + return f; + } + var Q = c.totalPos & (1 << s) - 1; + if (0 === q.decodeBit(a, (O << 4) + Q)) { + if (0 === l) { + return m; + } + c.putByte(this.decodeLiteral(O, C)); + O = 4 > O ? 0 : 10 > O ? O - 3 : O - 6; + l--; + } else { + if (0 !== q.decodeBit(r, O)) { + if (0 === l || c.isEmpty()) { + return m; + } + if (0 === q.decodeBit(t, O)) { + if (0 === q.decodeBit(k, (O << 4) + Q)) { + O = 7 > O ? 9 : 11; + c.putByte(c.getByte(C + 1)); + l--; + continue; + } + } else { + var S; + 0 === q.decodeBit(d, O) ? S = I : (0 === q.decodeBit(u, O) ? S = P : (S = T, T = P), P = I); + I = C; + C = S; + } + Q = G.decode(q, Q); + O = 7 > O ? 8 : 11; + } else { + T = P; + P = I; + I = C; + Q = v.decode(q, Q); + O = 7 > O ? 7 : 10; + C = this.decodeDistance(Q); + if (-1 === C) { + return this.outWindow.flush(), q.isFinishedOK() ? g : m; + } + if (0 === l || C >= p || !c.checkDistance(C)) { + return m; + } + } + Q += 2; + S = !1; + void 0 !== l && l < Q && (Q = l, S = !0); + c.copyMatch(C + 1, Q); + l -= Q; + if (S) { + return m; + } + } + } + this.state = O; + this.reps[0] = C; + this.reps[1] = I; + this.reps[2] = P; + this.reps[3] = T; + this.leftToUnpack = l; return b; }; - k.FromPlainObject = function(f) { - var d = k.FromArrayBuffer(f.buffer, f.length); - d._littleEndian = f.littleEndian; - return d; + return e; + }(), m = 0, g = 1, f = 2, b = 3, e; + (function(b) { + b[b.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER"; + b[b.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER"; + b[b.PROCESS_DATA = 2] = "PROCESS_DATA"; + b[b.CLOSED = 3] = "CLOSED"; + })(e || (e = {})); + e = function() { + function e(b) { + void 0 === b && (b = !1); + this._state = b ? 1 : 0; + this.buffer = null; + } + e.prototype.push = function(e) { + if (2 > this._state) { + var f = this.buffer ? this.buffer.length : 0, g = (1 === this._state ? 17 : 13) + 5; + if (f + e.length < g) { + g = new Uint8Array(f + e.length); + 0 < f && g.set(this.buffer); + g.set(e, f); + this.buffer = g; + return; + } + var c = new Uint8Array(g); + 0 < f && c.set(this.buffer); + c.set(e.subarray(0, g - f), f); + this._inStream = new u; + this._inStream.append(c.subarray(g - 5)); + this._outStream = new t(function(b) { + this.onData.call(null, b); + }.bind(this)); + this._decoder = new s(this._inStream, this._outStream); + if (1 === this._state) { + this._decoder.decodeProperties(c.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((c[4] | c[5] << 8 | c[6] << 16 | c[7] << 24) >>> 0) - 8; + } else { + this._decoder.decodeProperties(c.subarray(0, 5)); + for (var f = 0, q = !1, p = 0;8 > p;p++) { + var m = c[5 + p]; + 255 !== m && (q = !0); + f |= m << 8 * p; + } + this._decoder.markerIsMandatory = !q; + this._decoder.unpackSize = q ? f : void 0; + } + this._decoder.create(); + e = e.subarray(g); + this._state = 2; + } + this._inStream.append(e); + e = this._decoder.decode(!0); + this._inStream.compact(); + e !== b && this._checkError(e); }; - k.prototype.toPlainObject = function() { - return new e(this._buffer, this._length, this._littleEndian); + e.prototype.close = function() { + this._state = 3; + var b = this._decoder.decode(!1); + this._checkError(b); + this._decoder = null; }; - k.prototype._resetViews = function() { + e.prototype._checkError = function(e) { + var f; + e === m ? f = "LZMA decoding error" : e === b ? f = "Decoding is not complete" : e === g ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (f = "Finished with end marker before than specified size") : f = "Internal LZMA Error"; + if (f && this.onError) { + this.onError(f); + } + }; + return e; + }(); + d.LzmaDecoder = e; + })(d.ArrayUtilities || (d.ArrayUtilities = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + function a(g, f) { + g !== l(g, 0, f) && throwError("RangeError", Errors.ParamRangeError); + } + function r(g) { + return "string" === typeof g ? g : void 0 == g ? null : g + ""; + } + var v = d.Debug.notImplemented, u = d.StringUtilities.utf8decode, t = d.StringUtilities.utf8encode, l = d.NumberUtilities.clamp, c = function() { + return function(g, f, b) { + this.buffer = g; + this.length = f; + this.littleEndian = b; + }; + }(); + k.PlainObjectDataBuffer = c; + for (var h = new Uint32Array(33), p = 1, s = 0;32 >= p;p++) { + h[p] = s = s << 1 | 1; + } + var m; + (function(g) { + g[g.U8 = 1] = "U8"; + g[g.I32 = 2] = "I32"; + g[g.F32 = 4] = "F32"; + })(m || (m = {})); + p = function() { + function g(f) { + void 0 === f && (f = g.INITIAL_SIZE); + this._buffer || (this._buffer = new ArrayBuffer(f), this._position = this._length = 0, this._resetViews(), this._littleEndian = g._nativeLittleEndian, this._bitLength = this._bitBuffer = 0); + } + g.FromArrayBuffer = function(f, b) { + void 0 === b && (b = -1); + var e = Object.create(g.prototype); + e._buffer = f; + e._length = -1 === b ? f.byteLength : b; + e._position = 0; + e._resetViews(); + e._littleEndian = g._nativeLittleEndian; + e._bitBuffer = 0; + e._bitLength = 0; + return e; + }; + g.FromPlainObject = function(f) { + var b = g.FromArrayBuffer(f.buffer, f.length); + b._littleEndian = f.littleEndian; + return b; + }; + g.prototype.toPlainObject = function() { + return new c(this._buffer, this._length, this._littleEndian); + }; + g.prototype._resetViews = function() { this._u8 = new Uint8Array(this._buffer); this._f32 = this._i32 = null; }; - k.prototype._requestViews = function(f) { + g.prototype._requestViews = function(f) { 0 === (this._buffer.byteLength & 3) && (null === this._i32 && f & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && f & 4 && (this._f32 = new Float32Array(this._buffer))); }; - k.prototype.getBytes = function() { + g.prototype.getBytes = function() { return new Uint8Array(this._buffer, 0, this._length); }; - k.prototype._ensureCapacity = function(f) { - var d = this._buffer; - if (d.byteLength < f) { - for (var b = Math.max(d.byteLength, 1);b < f;) { - b *= 2; + g.prototype._ensureCapacity = function(f) { + var b = this._buffer; + if (b.byteLength < f) { + for (var e = Math.max(b.byteLength, 1);e < f;) { + e *= 2; } - f = k._arrayBufferPool.acquire(b); - b = this._u8; + f = g._arrayBufferPool.acquire(e); + e = this._u8; this._buffer = f; this._resetViews(); - this._u8.set(b); - k._arrayBufferPool.release(d); + this._u8.set(e); + g._arrayBufferPool.release(b); } }; - k.prototype.clear = function() { + g.prototype.clear = function() { this._position = this._length = 0; }; - k.prototype.readBoolean = function() { + g.prototype.readBoolean = function() { return 0 !== this.readUnsignedByte(); }; - k.prototype.readByte = function() { + g.prototype.readByte = function() { return this.readUnsignedByte() << 24 >> 24; }; - k.prototype.readUnsignedByte = function() { + g.prototype.readUnsignedByte = function() { this._position + 1 > this._length && throwError("EOFError", Errors.EOFError); return this._u8[this._position++]; }; - k.prototype.readBytes = function(f, d, b) { - void 0 === d && (d = 0); + g.prototype.readBytes = function(f, b, e) { void 0 === b && (b = 0); + void 0 === e && (e = 0); var g = this._position; - d || (d = 0); - b || (b = this._length - g); - g + b > this._length && throwError("EOFError", Errors.EOFError); - f.length < d + b && (f._ensureCapacity(d + b), f.length = d + b); - f._u8.set(new Uint8Array(this._buffer, g, b), d); - this._position += b; + b || (b = 0); + e || (e = this._length - g); + g + e > this._length && throwError("EOFError", Errors.EOFError); + f.length < b + e && (f._ensureCapacity(b + e), f.length = b + e); + f._u8.set(new Uint8Array(this._buffer, g, e), b); + this._position += e; }; - k.prototype.readShort = function() { + g.prototype.readShort = function() { return this.readUnsignedShort() << 16 >> 16; }; - k.prototype.readUnsignedShort = function() { - var f = this._u8, d = this._position; - d + 2 > this._length && throwError("EOFError", Errors.EOFError); - var b = f[d + 0], f = f[d + 1]; - this._position = d + 2; - return this._littleEndian ? f << 8 | b : b << 8 | f; + g.prototype.readUnsignedShort = function() { + var f = this._u8, b = this._position; + b + 2 > this._length && throwError("EOFError", Errors.EOFError); + var e = f[b + 0], f = f[b + 1]; + this._position = b + 2; + return this._littleEndian ? f << 8 | e : e << 8 | f; }; - k.prototype.readInt = function() { - var f = this._u8, d = this._position; - d + 4 > this._length && throwError("EOFError", Errors.EOFError); - var b = f[d + 0], g = f[d + 1], k = f[d + 2], f = f[d + 3]; - this._position = d + 4; - return this._littleEndian ? f << 24 | k << 16 | g << 8 | b : b << 24 | g << 16 | k << 8 | f; + g.prototype.readInt = function() { + var f = this._u8, b = this._position; + b + 4 > this._length && throwError("EOFError", Errors.EOFError); + var e = f[b + 0], g = f[b + 1], n = f[b + 2], f = f[b + 3]; + this._position = b + 4; + return this._littleEndian ? f << 24 | n << 16 | g << 8 | e : e << 24 | g << 16 | n << 8 | f; }; - k.prototype.readUnsignedInt = function() { + g.prototype.readUnsignedInt = function() { return this.readInt() >>> 0; }; - k.prototype.readFloat = function() { + g.prototype.readFloat = function() { var f = this._position; f + 4 > this._length && throwError("EOFError", Errors.EOFError); this._position = f + 4; @@ -3376,152 +3737,152 @@ var __extends = this.__extends || function(c, h) { if (this._littleEndian && 0 === (f & 3) && this._f32) { return this._f32[f >> 2]; } - var d = this._u8, b = c.IntegerUtilities.u8; - this._littleEndian ? (b[0] = d[f + 0], b[1] = d[f + 1], b[2] = d[f + 2], b[3] = d[f + 3]) : (b[3] = d[f + 0], b[2] = d[f + 1], b[1] = d[f + 2], b[0] = d[f + 3]); - return c.IntegerUtilities.f32[0]; + var b = this._u8, e = d.IntegerUtilities.u8; + this._littleEndian ? (e[0] = b[f + 0], e[1] = b[f + 1], e[2] = b[f + 2], e[3] = b[f + 3]) : (e[3] = b[f + 0], e[2] = b[f + 1], e[1] = b[f + 2], e[0] = b[f + 3]); + return d.IntegerUtilities.f32[0]; }; - k.prototype.readDouble = function() { - var f = this._u8, d = this._position; - d + 8 > this._length && throwError("EOFError", Errors.EOFError); - var b = c.IntegerUtilities.u8; - this._littleEndian ? (b[0] = f[d + 0], b[1] = f[d + 1], b[2] = f[d + 2], b[3] = f[d + 3], b[4] = f[d + 4], b[5] = f[d + 5], b[6] = f[d + 6], b[7] = f[d + 7]) : (b[0] = f[d + 7], b[1] = f[d + 6], b[2] = f[d + 5], b[3] = f[d + 4], b[4] = f[d + 3], b[5] = f[d + 2], b[6] = f[d + 1], b[7] = f[d + 0]); - this._position = d + 8; - return c.IntegerUtilities.f64[0]; + g.prototype.readDouble = function() { + var f = this._u8, b = this._position; + b + 8 > this._length && throwError("EOFError", Errors.EOFError); + var e = d.IntegerUtilities.u8; + this._littleEndian ? (e[0] = f[b + 0], e[1] = f[b + 1], e[2] = f[b + 2], e[3] = f[b + 3], e[4] = f[b + 4], e[5] = f[b + 5], e[6] = f[b + 6], e[7] = f[b + 7]) : (e[0] = f[b + 7], e[1] = f[b + 6], e[2] = f[b + 5], e[3] = f[b + 4], e[4] = f[b + 3], e[5] = f[b + 2], e[6] = f[b + 1], e[7] = f[b + 0]); + this._position = b + 8; + return d.IntegerUtilities.f64[0]; }; - k.prototype.writeBoolean = function(f) { + g.prototype.writeBoolean = function(f) { this.writeByte(f ? 1 : 0); }; - k.prototype.writeByte = function(f) { - var d = this._position + 1; - this._ensureCapacity(d); + g.prototype.writeByte = function(f) { + var b = this._position + 1; + this._ensureCapacity(b); this._u8[this._position++] = f; - d > this._length && (this._length = d); + b > this._length && (this._length = b); }; - k.prototype.writeUnsignedByte = function(f) { - var d = this._position + 1; - this._ensureCapacity(d); + g.prototype.writeUnsignedByte = function(f) { + var b = this._position + 1; + this._ensureCapacity(b); this._u8[this._position++] = f; - d > this._length && (this._length = d); + b > this._length && (this._length = b); }; - k.prototype.writeRawBytes = function(f) { - var d = this._position + f.length; - this._ensureCapacity(d); + g.prototype.writeRawBytes = function(f) { + var b = this._position + f.length; + this._ensureCapacity(b); this._u8.set(f, this._position); - this._position = d; - d > this._length && (this._length = d); + this._position = b; + b > this._length && (this._length = b); }; - k.prototype.writeBytes = function(f, d, b) { - void 0 === d && (d = 0); + g.prototype.writeBytes = function(f, b, e) { void 0 === b && (b = 0); - c.isNullOrUndefined(f) && throwError("TypeError", Errors.NullPointerError, "bytes"); - 2 > arguments.length && (d = 0); - 3 > arguments.length && (b = 0); - a(d, f.length); - a(d + b, f.length); - 0 === b && (b = f.length - d); - this.writeRawBytes(new Int8Array(f._buffer, d, b)); + void 0 === e && (e = 0); + d.isNullOrUndefined(f) && throwError("TypeError", Errors.NullPointerError, "bytes"); + 2 > arguments.length && (b = 0); + 3 > arguments.length && (e = 0); + a(b, f.length); + a(b + e, f.length); + 0 === e && (e = f.length - b); + this.writeRawBytes(new Int8Array(f._buffer, b, e)); }; - k.prototype.writeShort = function(f) { + g.prototype.writeShort = function(f) { this.writeUnsignedShort(f); }; - k.prototype.writeUnsignedShort = function(f) { - var d = this._position; - this._ensureCapacity(d + 2); - var b = this._u8; - this._littleEndian ? (b[d + 0] = f, b[d + 1] = f >> 8) : (b[d + 0] = f >> 8, b[d + 1] = f); - this._position = d += 2; - d > this._length && (this._length = d); + g.prototype.writeUnsignedShort = function(f) { + var b = this._position; + this._ensureCapacity(b + 2); + var e = this._u8; + this._littleEndian ? (e[b + 0] = f, e[b + 1] = f >> 8) : (e[b + 0] = f >> 8, e[b + 1] = f); + this._position = b += 2; + b > this._length && (this._length = b); }; - k.prototype.writeInt = function(f) { + g.prototype.writeInt = function(f) { this.writeUnsignedInt(f); }; - k.prototype.write2Ints = function(f, d) { - this.write2UnsignedInts(f, d); + g.prototype.write2Ints = function(f, b) { + this.write2UnsignedInts(f, b); }; - k.prototype.write4Ints = function(f, d, b, g) { - this.write4UnsignedInts(f, d, b, g); + g.prototype.write4Ints = function(f, b, e, g) { + this.write4UnsignedInts(f, b, e, g); }; - k.prototype.writeUnsignedInt = function(f) { - var d = this._position; - this._ensureCapacity(d + 4); + g.prototype.writeUnsignedInt = function(f) { + var b = this._position; + this._ensureCapacity(b + 4); this._requestViews(2); - if (this._littleEndian === k._nativeLittleEndian && 0 === (d & 3) && this._i32) { - this._i32[d >> 2] = f; + if (this._littleEndian === g._nativeLittleEndian && 0 === (b & 3) && this._i32) { + this._i32[b >> 2] = f; } else { - var b = this._u8; - this._littleEndian ? (b[d + 0] = f, b[d + 1] = f >> 8, b[d + 2] = f >> 16, b[d + 3] = f >> 24) : (b[d + 0] = f >> 24, b[d + 1] = f >> 16, b[d + 2] = f >> 8, b[d + 3] = f); + var e = this._u8; + this._littleEndian ? (e[b + 0] = f, e[b + 1] = f >> 8, e[b + 2] = f >> 16, e[b + 3] = f >> 24) : (e[b + 0] = f >> 24, e[b + 1] = f >> 16, e[b + 2] = f >> 8, e[b + 3] = f); } - this._position = d += 4; - d > this._length && (this._length = d); + this._position = b += 4; + b > this._length && (this._length = b); }; - k.prototype.write2UnsignedInts = function(f, d) { + g.prototype.write2UnsignedInts = function(f, b) { + var e = this._position; + this._ensureCapacity(e + 8); + this._requestViews(2); + this._littleEndian === g._nativeLittleEndian && 0 === (e & 3) && this._i32 ? (this._i32[(e >> 2) + 0] = f, this._i32[(e >> 2) + 1] = b, this._position = e += 8, e > this._length && (this._length = e)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(b)); + }; + g.prototype.write4UnsignedInts = function(f, b, e, c) { + var n = this._position; + this._ensureCapacity(n + 16); + this._requestViews(2); + this._littleEndian === g._nativeLittleEndian && 0 === (n & 3) && this._i32 ? (this._i32[(n >> 2) + 0] = f, this._i32[(n >> 2) + 1] = b, this._i32[(n >> 2) + 2] = e, this._i32[(n >> 2) + 3] = c, this._position = n += 16, n > this._length && (this._length = n)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(b), this.writeUnsignedInt(e), this.writeUnsignedInt(c)); + }; + g.prototype.writeFloat = function(f) { + var b = this._position; + this._ensureCapacity(b + 4); + this._requestViews(4); + if (this._littleEndian === g._nativeLittleEndian && 0 === (b & 3) && this._f32) { + this._f32[b >> 2] = f; + } else { + var e = this._u8; + d.IntegerUtilities.f32[0] = f; + f = d.IntegerUtilities.u8; + this._littleEndian ? (e[b + 0] = f[0], e[b + 1] = f[1], e[b + 2] = f[2], e[b + 3] = f[3]) : (e[b + 0] = f[3], e[b + 1] = f[2], e[b + 2] = f[1], e[b + 3] = f[0]); + } + this._position = b += 4; + b > this._length && (this._length = b); + }; + g.prototype.write6Floats = function(f, b, e, c, n, s) { + var p = this._position; + this._ensureCapacity(p + 24); + this._requestViews(4); + this._littleEndian === g._nativeLittleEndian && 0 === (p & 3) && this._f32 ? (this._f32[(p >> 2) + 0] = f, this._f32[(p >> 2) + 1] = b, this._f32[(p >> 2) + 2] = e, this._f32[(p >> 2) + 3] = c, this._f32[(p >> 2) + 4] = n, this._f32[(p >> 2) + 5] = s, this._position = p += 24, p > this._length && (this._length = p)) : (this.writeFloat(f), this.writeFloat(b), this.writeFloat(e), this.writeFloat(c), this.writeFloat(n), this.writeFloat(s)); + }; + g.prototype.writeDouble = function(f) { var b = this._position; this._ensureCapacity(b + 8); - this._requestViews(2); - this._littleEndian === k._nativeLittleEndian && 0 === (b & 3) && this._i32 ? (this._i32[(b >> 2) + 0] = f, this._i32[(b >> 2) + 1] = d, this._position = b += 8, b > this._length && (this._length = b)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(d)); + var e = this._u8; + d.IntegerUtilities.f64[0] = f; + f = d.IntegerUtilities.u8; + this._littleEndian ? (e[b + 0] = f[0], e[b + 1] = f[1], e[b + 2] = f[2], e[b + 3] = f[3], e[b + 4] = f[4], e[b + 5] = f[5], e[b + 6] = f[6], e[b + 7] = f[7]) : (e[b + 0] = f[7], e[b + 1] = f[6], e[b + 2] = f[5], e[b + 3] = f[4], e[b + 4] = f[3], e[b + 5] = f[2], e[b + 6] = f[1], e[b + 7] = f[0]); + this._position = b += 8; + b > this._length && (this._length = b); }; - k.prototype.write4UnsignedInts = function(f, d, b, g) { - var r = this._position; - this._ensureCapacity(r + 16); - this._requestViews(2); - this._littleEndian === k._nativeLittleEndian && 0 === (r & 3) && this._i32 ? (this._i32[(r >> 2) + 0] = f, this._i32[(r >> 2) + 1] = d, this._i32[(r >> 2) + 2] = b, this._i32[(r >> 2) + 3] = g, this._position = r += 16, r > this._length && (this._length = r)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(d), this.writeUnsignedInt(b), this.writeUnsignedInt(g)); - }; - k.prototype.writeFloat = function(f) { - var d = this._position; - this._ensureCapacity(d + 4); - this._requestViews(4); - if (this._littleEndian === k._nativeLittleEndian && 0 === (d & 3) && this._f32) { - this._f32[d >> 2] = f; - } else { - var b = this._u8; - c.IntegerUtilities.f32[0] = f; - f = c.IntegerUtilities.u8; - this._littleEndian ? (b[d + 0] = f[0], b[d + 1] = f[1], b[d + 2] = f[2], b[d + 3] = f[3]) : (b[d + 0] = f[3], b[d + 1] = f[2], b[d + 2] = f[1], b[d + 3] = f[0]); - } - this._position = d += 4; - d > this._length && (this._length = d); - }; - k.prototype.write6Floats = function(f, d, b, g, r, e) { - var n = this._position; - this._ensureCapacity(n + 24); - this._requestViews(4); - this._littleEndian === k._nativeLittleEndian && 0 === (n & 3) && this._f32 ? (this._f32[(n >> 2) + 0] = f, this._f32[(n >> 2) + 1] = d, this._f32[(n >> 2) + 2] = b, this._f32[(n >> 2) + 3] = g, this._f32[(n >> 2) + 4] = r, this._f32[(n >> 2) + 5] = e, this._position = n += 24, n > this._length && (this._length = n)) : (this.writeFloat(f), this.writeFloat(d), this.writeFloat(b), this.writeFloat(g), this.writeFloat(r), this.writeFloat(e)); - }; - k.prototype.writeDouble = function(f) { - var d = this._position; - this._ensureCapacity(d + 8); - var b = this._u8; - c.IntegerUtilities.f64[0] = f; - f = c.IntegerUtilities.u8; - this._littleEndian ? (b[d + 0] = f[0], b[d + 1] = f[1], b[d + 2] = f[2], b[d + 3] = f[3], b[d + 4] = f[4], b[d + 5] = f[5], b[d + 6] = f[6], b[d + 7] = f[7]) : (b[d + 0] = f[7], b[d + 1] = f[6], b[d + 2] = f[5], b[d + 3] = f[4], b[d + 4] = f[3], b[d + 5] = f[2], b[d + 6] = f[1], b[d + 7] = f[0]); - this._position = d += 8; - d > this._length && (this._length = d); - }; - k.prototype.readRawBytes = function() { + g.prototype.readRawBytes = function() { return new Int8Array(this._buffer, 0, this._length); }; - k.prototype.writeUTF = function(f) { - f = s(f); - f = p(f); + g.prototype.writeUTF = function(f) { + f = r(f); + f = u(f); this.writeShort(f.length); this.writeRawBytes(f); }; - k.prototype.writeUTFBytes = function(f) { - f = s(f); - f = p(f); + g.prototype.writeUTFBytes = function(f) { + f = r(f); + f = u(f); this.writeRawBytes(f); }; - k.prototype.readUTF = function() { + g.prototype.readUTF = function() { return this.readUTFBytes(this.readShort()); }; - k.prototype.readUTFBytes = function(f) { + g.prototype.readUTFBytes = function(f) { f >>>= 0; - var d = this._position; - d + f > this._length && throwError("EOFError", Errors.EOFError); + var b = this._position; + b + f > this._length && throwError("EOFError", Errors.EOFError); this._position += f; - return u(new Int8Array(this._buffer, d, f)); + return t(new Int8Array(this._buffer, b, f)); }; - Object.defineProperty(k.prototype, "length", {get:function() { + Object.defineProperty(g.prototype, "length", {get:function() { return this._length; }, set:function(f) { f >>>= 0; @@ -3529,69 +3890,69 @@ var __extends = this.__extends || function(c, h) { this._length = f; this._position = l(this._position, 0, this._length); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "bytesAvailable", {get:function() { + Object.defineProperty(g.prototype, "bytesAvailable", {get:function() { return this._length - this._position; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "position", {get:function() { + Object.defineProperty(g.prototype, "position", {get:function() { return this._position; }, set:function(f) { this._position = f >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "buffer", {get:function() { + Object.defineProperty(g.prototype, "buffer", {get:function() { return this._buffer; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "bytes", {get:function() { + Object.defineProperty(g.prototype, "bytes", {get:function() { return this._u8; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "ints", {get:function() { + Object.defineProperty(g.prototype, "ints", {get:function() { this._requestViews(2); return this._i32; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "objectEncoding", {get:function() { + Object.defineProperty(g.prototype, "objectEncoding", {get:function() { return this._objectEncoding; }, set:function(f) { this._objectEncoding = f >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "endian", {get:function() { + Object.defineProperty(g.prototype, "endian", {get:function() { return this._littleEndian ? "littleEndian" : "bigEndian"; }, set:function(f) { - f = s(f); - this._littleEndian = "auto" === f ? k._nativeLittleEndian : "littleEndian" === f; + f = r(f); + this._littleEndian = "auto" === f ? g._nativeLittleEndian : "littleEndian" === f; }, enumerable:!0, configurable:!0}); - k.prototype.toString = function() { - return u(new Int8Array(this._buffer, 0, this._length)); + g.prototype.toString = function() { + return t(new Int8Array(this._buffer, 0, this._length)); }; - k.prototype.toBlob = function(f) { + g.prototype.toBlob = function(f) { return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:f}); }; - k.prototype.writeMultiByte = function(f, d) { + g.prototype.writeMultiByte = function(f, b) { v("packageInternal flash.utils.ObjectOutput::writeMultiByte"); }; - k.prototype.readMultiByte = function(f, d) { + g.prototype.readMultiByte = function(f, b) { v("packageInternal flash.utils.ObjectInput::readMultiByte"); }; - k.prototype.getValue = function(f) { + g.prototype.getValue = function(f) { f |= 0; return f >= this._length ? void 0 : this._u8[f]; }; - k.prototype.setValue = function(f, d) { + g.prototype.setValue = function(f, b) { f |= 0; - var b = f + 1; - this._ensureCapacity(b); - this._u8[f] = d; - b > this._length && (this._length = b); + var e = f + 1; + this._ensureCapacity(e); + this._u8[f] = b; + e > this._length && (this._length = e); }; - k.prototype.readFixed = function() { + g.prototype.readFixed = function() { return this.readInt() / 65536; }; - k.prototype.readFixed8 = function() { + g.prototype.readFixed8 = function() { return this.readShort() / 256; }; - k.prototype.readFloat16 = function() { - var f = this.readUnsignedShort(), d = f >> 15 ? -1 : 1, b = (f & 31744) >> 10, f = f & 1023; - return b ? 31 === b ? f ? NaN : Infinity * d : d * Math.pow(2, b - 15) * (1 + f / 1024) : f / 1024 * Math.pow(2, -14) * d; + g.prototype.readFloat16 = function() { + var f = this.readUnsignedShort(), b = f >> 15 ? -1 : 1, e = (f & 31744) >> 10, f = f & 1023; + return e ? 31 === e ? f ? NaN : Infinity * b : b * Math.pow(2, e - 15) * (1 + f / 1024) : f / 1024 * Math.pow(2, -14) * b; }; - k.prototype.readEncodedU32 = function() { + g.prototype.readEncodedU32 = function() { var f = this.readUnsignedByte(); if (!(f & 128)) { return f; @@ -3607,91 +3968,97 @@ var __extends = this.__extends || function(c, h) { f = f & 2097151 | this.readUnsignedByte() << 21; return f & 268435456 ? f & 268435455 | this.readUnsignedByte() << 28 : f; }; - k.prototype.readBits = function(f) { + g.prototype.readBits = function(f) { return this.readUnsignedBits(f) << 32 - f >> 32 - f; }; - k.prototype.readUnsignedBits = function(f) { - for (var d = this._bitBuffer, b = this._bitLength;f > b;) { - d = d << 8 | this.readUnsignedByte(), b += 8; + g.prototype.readUnsignedBits = function(f) { + for (var b = this._bitBuffer, e = this._bitLength;f > e;) { + b = b << 8 | this.readUnsignedByte(), e += 8; } - b -= f; - f = d >>> b & m[f]; - this._bitBuffer = d; - this._bitLength = b; + e -= f; + f = b >>> e & h[f]; + this._bitBuffer = b; + this._bitLength = e; return f; }; - k.prototype.readFixedBits = function(f) { + g.prototype.readFixedBits = function(f) { return this.readBits(f) / 65536; }; - k.prototype.readString = function(f) { - var d = this._position; + g.prototype.readString = function(f) { + var b = this._position; if (f) { - d + f > this._length && throwError("EOFError", Errors.EOFError), this._position += f; + b + f > this._length && throwError("EOFError", Errors.EOFError), this._position += f; } else { f = 0; - for (var b = d;b < this._length && this._u8[b];b++) { + for (var e = b;e < this._length && this._u8[e];e++) { f++; } this._position += f + 1; } - return u(new Int8Array(this._buffer, d, f)); + return t(new Int8Array(this._buffer, b, f)); }; - k.prototype.align = function() { + g.prototype.align = function() { this._bitLength = this._bitBuffer = 0; }; - k.prototype._compress = function(f) { - f = s(f); + g.prototype._compress = function(f) { + f = r(f); switch(f) { case "zlib": - f = new h.Deflate(!0); + f = new k.Deflate(!0); break; case "deflate": - f = new h.Deflate(!1); + f = new k.Deflate(!1); break; default: return; } - var d = new k; - f.onData = d.writeRawBytes.bind(d); + var b = new g; + f.onData = b.writeRawBytes.bind(b); f.push(this._u8.subarray(0, this._length)); - f.finish(); - this._ensureCapacity(d._u8.length); - this._u8.set(d._u8); - this.length = d.length; - this._position = 0; - }; - k.prototype._uncompress = function(f) { - f = s(f); - switch(f) { - case "zlib": - f = h.Inflate.create(!0); - break; - case "deflate": - f = h.Inflate.create(!1); - break; - default: - return; - } - var d = new k; - f.onData = d.writeRawBytes.bind(d); - f.push(this._u8.subarray(0, this._length)); - f.error && throwError("IOError", Errors.CompressedDataError); f.close(); - this._ensureCapacity(d._u8.length); - this._u8.set(d._u8); - this.length = d.length; + this._ensureCapacity(b._u8.length); + this._u8.set(b._u8); + this.length = b.length; this._position = 0; }; - k._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; - k.INITIAL_SIZE = 128; - k._arrayBufferPool = new c.ArrayBufferPool; - return k; + g.prototype._uncompress = function(f) { + f = r(f); + switch(f) { + case "zlib": + f = k.Inflate.create(!0); + break; + case "deflate": + f = k.Inflate.create(!1); + break; + case "lzma": + f = new k.LzmaDecoder(!1); + break; + default: + return; + } + var b = new g, e; + f.onData = b.writeRawBytes.bind(b); + f.onError = function(b) { + return e = b; + }; + f.push(this._u8.subarray(0, this._length)); + e && throwError("IOError", Errors.CompressedDataError); + f.close(); + this._ensureCapacity(b._u8.length); + this._u8.set(b._u8); + this.length = b.length; + this._position = 0; + }; + g._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0]; + g.INITIAL_SIZE = 128; + g._arrayBufferPool = new d.ArrayBufferPool; + return g; }(); - h.DataBuffer = t; - })(c.ArrayUtilities || (c.ArrayUtilities = {})); + k.DataBuffer = p; + })(d.ArrayUtilities || (d.ArrayUtilities = {})); })(Shumway || (Shumway = {})); -(function(c) { - var h = c.ArrayUtilities.DataBuffer, a = c.ArrayUtilities.ensureTypedArrayCapacity, s = c.Debug.assert; +(function(d) { + var k = d.ArrayUtilities.DataBuffer, a = d.ArrayUtilities.ensureTypedArrayCapacity; (function(a) { a[a.BeginSolidFill = 1] = "BeginSolidFill"; a[a.BeginGradientFill = 2] = "BeginGradientFill"; @@ -3705,233 +4072,229 @@ var __extends = this.__extends || function(c, h) { a[a.LineTo = 10] = "LineTo"; a[a.CurveTo = 11] = "CurveTo"; a[a.CubicCurveTo = 12] = "CubicCurveTo"; - })(c.PathCommand || (c.PathCommand = {})); + })(d.PathCommand || (d.PathCommand = {})); (function(a) { a[a.Linear = 16] = "Linear"; a[a.Radial = 18] = "Radial"; - })(c.GradientType || (c.GradientType = {})); + })(d.GradientType || (d.GradientType = {})); (function(a) { a[a.Pad = 0] = "Pad"; a[a.Reflect = 1] = "Reflect"; a[a.Repeat = 2] = "Repeat"; - })(c.GradientSpreadMethod || (c.GradientSpreadMethod = {})); + })(d.GradientSpreadMethod || (d.GradientSpreadMethod = {})); (function(a) { a[a.RGB = 0] = "RGB"; a[a.LinearRGB = 1] = "LinearRGB"; - })(c.GradientInterpolationMethod || (c.GradientInterpolationMethod = {})); + })(d.GradientInterpolationMethod || (d.GradientInterpolationMethod = {})); (function(a) { a[a.None = 0] = "None"; a[a.Normal = 1] = "Normal"; a[a.Vertical = 2] = "Vertical"; a[a.Horizontal = 3] = "Horizontal"; - })(c.LineScaleMode || (c.LineScaleMode = {})); - var v = function() { - return function(a, l, e, m, t, q, n, k, f, d, b) { + })(d.LineScaleMode || (d.LineScaleMode = {})); + var r = function() { + return function(a, r, l, c, h, p, s, m, g, f, b) { this.commands = a; - this.commandsPosition = l; - this.coordinates = e; - this.morphCoordinates = m; - this.coordinatesPosition = t; - this.styles = q; - this.stylesLength = n; - this.morphStyles = k; - this.morphStylesLength = f; - this.hasFills = d; + this.commandsPosition = r; + this.coordinates = l; + this.morphCoordinates = c; + this.coordinatesPosition = h; + this.styles = p; + this.stylesLength = s; + this.morphStyles = m; + this.morphStylesLength = g; + this.hasFills = f; this.hasLines = b; }; }(); - c.PlainObjectShapeData = v; - var p; + d.PlainObjectShapeData = r; + var v; (function(a) { a[a.Commands = 32] = "Commands"; a[a.Coordinates = 128] = "Coordinates"; a[a.Styles = 16] = "Styles"; - })(p || (p = {})); - p = function() { - function c(l) { - void 0 === l && (l = !0); - l && this.clear(); + })(v || (v = {})); + v = function() { + function d(a) { + void 0 === a && (a = !0); + a && this.clear(); } - c.FromPlainObject = function(l) { - var e = new c(!1); - e.commands = l.commands; - e.coordinates = l.coordinates; - e.morphCoordinates = l.morphCoordinates; - e.commandsPosition = l.commandsPosition; - e.coordinatesPosition = l.coordinatesPosition; - e.styles = h.FromArrayBuffer(l.styles, l.stylesLength); - e.styles.endian = "auto"; - l.morphStyles && (e.morphStyles = h.FromArrayBuffer(l.morphStyles, l.morphStylesLength), e.morphStyles.endian = "auto"); - e.hasFills = l.hasFills; - e.hasLines = l.hasLines; - return e; + d.FromPlainObject = function(a) { + var l = new d(!1); + l.commands = a.commands; + l.coordinates = a.coordinates; + l.morphCoordinates = a.morphCoordinates; + l.commandsPosition = a.commandsPosition; + l.coordinatesPosition = a.coordinatesPosition; + l.styles = k.FromArrayBuffer(a.styles, a.stylesLength); + l.styles.endian = "auto"; + a.morphStyles && (l.morphStyles = k.FromArrayBuffer(a.morphStyles, a.morphStylesLength), l.morphStyles.endian = "auto"); + l.hasFills = a.hasFills; + l.hasLines = a.hasLines; + return l; }; - c.prototype.moveTo = function(l, e) { + d.prototype.moveTo = function(a, l) { this.ensurePathCapacities(1, 2); this.commands[this.commandsPosition++] = 9; + this.coordinates[this.coordinatesPosition++] = a; this.coordinates[this.coordinatesPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; }; - c.prototype.lineTo = function(l, e) { + d.prototype.lineTo = function(a, l) { this.ensurePathCapacities(1, 2); this.commands[this.commandsPosition++] = 10; + this.coordinates[this.coordinatesPosition++] = a; this.coordinates[this.coordinatesPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; }; - c.prototype.curveTo = function(l, e, m, a) { + d.prototype.curveTo = function(a, l, c, h) { this.ensurePathCapacities(1, 4); this.commands[this.commandsPosition++] = 11; - this.coordinates[this.coordinatesPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; - this.coordinates[this.coordinatesPosition++] = m; this.coordinates[this.coordinatesPosition++] = a; + this.coordinates[this.coordinatesPosition++] = l; + this.coordinates[this.coordinatesPosition++] = c; + this.coordinates[this.coordinatesPosition++] = h; }; - c.prototype.cubicCurveTo = function(l, e, m, a, q, n) { + d.prototype.cubicCurveTo = function(a, l, c, h, p, s) { this.ensurePathCapacities(1, 6); this.commands[this.commandsPosition++] = 12; - this.coordinates[this.coordinatesPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; - this.coordinates[this.coordinatesPosition++] = m; this.coordinates[this.coordinatesPosition++] = a; - this.coordinates[this.coordinatesPosition++] = q; - this.coordinates[this.coordinatesPosition++] = n; + this.coordinates[this.coordinatesPosition++] = l; + this.coordinates[this.coordinatesPosition++] = c; + this.coordinates[this.coordinatesPosition++] = h; + this.coordinates[this.coordinatesPosition++] = p; + this.coordinates[this.coordinatesPosition++] = s; }; - c.prototype.beginFill = function(l) { + d.prototype.beginFill = function(a) { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 1; - this.styles.writeUnsignedInt(l); + this.styles.writeUnsignedInt(a); this.hasFills = !0; }; - c.prototype.writeMorphFill = function(l) { - this.morphStyles.writeUnsignedInt(l); + d.prototype.writeMorphFill = function(a) { + this.morphStyles.writeUnsignedInt(a); }; - c.prototype.endFill = function() { + d.prototype.endFill = function() { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 4; }; - c.prototype.endLine = function() { + d.prototype.endLine = function() { this.ensurePathCapacities(1, 0); this.commands[this.commandsPosition++] = 8; }; - c.prototype.lineStyle = function(l, e, m, a, q, n, k) { - s(l === (l | 0), 0 <= l && 5100 >= l); + d.prototype.lineStyle = function(a, l, c, h, p, s, m) { this.ensurePathCapacities(2, 0); this.commands[this.commandsPosition++] = 5; - this.coordinates[this.coordinatesPosition++] = l; - l = this.styles; - l.writeUnsignedInt(e); - l.writeBoolean(m); - l.writeUnsignedByte(a); - l.writeUnsignedByte(q); - l.writeUnsignedByte(n); - l.writeUnsignedByte(k); + this.coordinates[this.coordinatesPosition++] = a; + a = this.styles; + a.writeUnsignedInt(l); + a.writeBoolean(c); + a.writeUnsignedByte(h); + a.writeUnsignedByte(p); + a.writeUnsignedByte(s); + a.writeUnsignedByte(m); this.hasLines = !0; }; - c.prototype.writeMorphLineStyle = function(l, e) { - this.morphCoordinates[this.coordinatesPosition - 1] = l; - this.morphStyles.writeUnsignedInt(e); + d.prototype.writeMorphLineStyle = function(a, l) { + this.morphCoordinates[this.coordinatesPosition - 1] = a; + this.morphStyles.writeUnsignedInt(l); }; - c.prototype.beginBitmap = function(l, e, m, a, q) { - s(3 === l || 7 === l); + d.prototype.beginBitmap = function(a, l, c, h, p) { this.ensurePathCapacities(1, 0); - this.commands[this.commandsPosition++] = l; - l = this.styles; - l.writeUnsignedInt(e); - this._writeStyleMatrix(m, !1); - l.writeBoolean(a); - l.writeBoolean(q); + this.commands[this.commandsPosition++] = a; + a = this.styles; + a.writeUnsignedInt(l); + this._writeStyleMatrix(c, !1); + a.writeBoolean(h); + a.writeBoolean(p); this.hasFills = !0; }; - c.prototype.writeMorphBitmap = function(l) { - this._writeStyleMatrix(l, !0); + d.prototype.writeMorphBitmap = function(a) { + this._writeStyleMatrix(a, !0); }; - c.prototype.beginGradient = function(l, e, m, a, q, n, k, f) { - s(2 === l || 6 === l); + d.prototype.beginGradient = function(a, l, c, h, p, s, m, g) { this.ensurePathCapacities(1, 0); - this.commands[this.commandsPosition++] = l; - l = this.styles; - l.writeUnsignedByte(a); - s(f === (f | 0)); - l.writeShort(f); - this._writeStyleMatrix(q, !1); - a = e.length; - l.writeByte(a); - for (q = 0;q < a;q++) { - l.writeUnsignedByte(m[q]), l.writeUnsignedInt(e[q]); + this.commands[this.commandsPosition++] = a; + a = this.styles; + a.writeUnsignedByte(h); + a.writeShort(g); + this._writeStyleMatrix(p, !1); + h = l.length; + a.writeByte(h); + for (p = 0;p < h;p++) { + a.writeUnsignedByte(c[p]), a.writeUnsignedInt(l[p]); } - l.writeUnsignedByte(n); - l.writeUnsignedByte(k); + a.writeUnsignedByte(s); + a.writeUnsignedByte(m); this.hasFills = !0; }; - c.prototype.writeMorphGradient = function(l, e, m) { - this._writeStyleMatrix(m, !0); - m = this.morphStyles; - for (var a = 0;a < l.length;a++) { - m.writeUnsignedByte(e[a]), m.writeUnsignedInt(l[a]); + d.prototype.writeMorphGradient = function(a, l, c) { + this._writeStyleMatrix(c, !0); + c = this.morphStyles; + for (var h = 0;h < a.length;h++) { + c.writeUnsignedByte(l[h]), c.writeUnsignedInt(a[h]); } }; - c.prototype.writeCommandAndCoordinates = function(l, e, m) { + d.prototype.writeCommandAndCoordinates = function(a, l, c) { this.ensurePathCapacities(1, 2); - this.commands[this.commandsPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; - this.coordinates[this.coordinatesPosition++] = m; - }; - c.prototype.writeCoordinates = function(l, e) { - this.ensurePathCapacities(0, 2); + this.commands[this.commandsPosition++] = a; this.coordinates[this.coordinatesPosition++] = l; - this.coordinates[this.coordinatesPosition++] = e; + this.coordinates[this.coordinatesPosition++] = c; }; - c.prototype.writeMorphCoordinates = function(l, e) { + d.prototype.writeCoordinates = function(a, l) { + this.ensurePathCapacities(0, 2); + this.coordinates[this.coordinatesPosition++] = a; + this.coordinates[this.coordinatesPosition++] = l; + }; + d.prototype.writeMorphCoordinates = function(r, l) { this.morphCoordinates = a(this.morphCoordinates, this.coordinatesPosition); - this.morphCoordinates[this.coordinatesPosition - 2] = l; - this.morphCoordinates[this.coordinatesPosition - 1] = e; + this.morphCoordinates[this.coordinatesPosition - 2] = r; + this.morphCoordinates[this.coordinatesPosition - 1] = l; }; - c.prototype.clear = function() { + d.prototype.clear = function() { this.commandsPosition = this.coordinatesPosition = 0; this.commands = new Uint8Array(32); this.coordinates = new Int32Array(128); - this.styles = new h(16); + this.styles = new k(16); this.styles.endian = "auto"; this.hasFills = this.hasLines = !1; }; - c.prototype.isEmpty = function() { + d.prototype.isEmpty = function() { return 0 === this.commandsPosition; }; - c.prototype.clone = function() { - var l = new c(!1); - l.commands = new Uint8Array(this.commands); - l.commandsPosition = this.commandsPosition; - l.coordinates = new Int32Array(this.coordinates); - l.coordinatesPosition = this.coordinatesPosition; - l.styles = new h(this.styles.length); - l.styles.writeRawBytes(this.styles.bytes); - this.morphStyles && (l.morphStyles = new h(this.morphStyles.length), l.morphStyles.writeRawBytes(this.morphStyles.bytes)); - l.hasFills = this.hasFills; - l.hasLines = this.hasLines; - return l; + d.prototype.clone = function() { + var a = new d(!1); + a.commands = new Uint8Array(this.commands); + a.commandsPosition = this.commandsPosition; + a.coordinates = new Int32Array(this.coordinates); + a.coordinatesPosition = this.coordinatesPosition; + a.styles = new k(this.styles.length); + a.styles.writeRawBytes(this.styles.bytes); + this.morphStyles && (a.morphStyles = new k(this.morphStyles.length), a.morphStyles.writeRawBytes(this.morphStyles.bytes)); + a.hasFills = this.hasFills; + a.hasLines = this.hasLines; + return a; }; - c.prototype.toPlainObject = function() { - return new v(this.commands, this.commandsPosition, this.coordinates, this.morphCoordinates, this.coordinatesPosition, this.styles.buffer, this.styles.length, this.morphStyles && this.morphStyles.buffer, this.morphStyles ? this.morphStyles.length : 0, this.hasFills, this.hasLines); + d.prototype.toPlainObject = function() { + return new r(this.commands, this.commandsPosition, this.coordinates, this.morphCoordinates, this.coordinatesPosition, this.styles.buffer, this.styles.length, this.morphStyles && this.morphStyles.buffer, this.morphStyles ? this.morphStyles.length : 0, this.hasFills, this.hasLines); }; - Object.defineProperty(c.prototype, "buffers", {get:function() { - var l = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer]; - this.morphCoordinates && l.push(this.morphCoordinates.buffer); - this.morphStyles && l.push(this.morphStyles.buffer); - return l; + Object.defineProperty(d.prototype, "buffers", {get:function() { + var a = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer]; + this.morphCoordinates && a.push(this.morphCoordinates.buffer); + this.morphStyles && a.push(this.morphStyles.buffer); + return a; }, enumerable:!0, configurable:!0}); - c.prototype._writeStyleMatrix = function(l, e) { - (e ? this.morphStyles : this.styles).write6Floats(l.a, l.b, l.c, l.d, l.tx, l.ty); + d.prototype._writeStyleMatrix = function(a, l) { + (l ? this.morphStyles : this.styles).write6Floats(a.a, a.b, a.c, a.d, a.tx, a.ty); }; - c.prototype.ensurePathCapacities = function(l, e) { - this.commands = a(this.commands, this.commandsPosition + l); - this.coordinates = a(this.coordinates, this.coordinatesPosition + e); + d.prototype.ensurePathCapacities = function(r, l) { + this.commands = a(this.commands, this.commandsPosition + r); + this.coordinates = a(this.coordinates, this.coordinatesPosition + l); }; - return c; + return d; }(); - c.ShapeData = p; + d.ShapeData = v; })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { a[a.CODE_END = 0] = "CODE_END"; @@ -4107,78 +4470,78 @@ var __extends = this.__extends || function(c, h) { a[a.KeyPress = 131072] = "KeyPress"; a[a.Construct = 262144] = "Construct"; })(a.AVM1ClipEvents || (a.AVM1ClipEvents = {})); - })(c.Parser || (c.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - var h = c.Debug.unexpected, a = function() { - function a(c, p, u, l) { - this.url = c; - this.method = p; - this.mimeType = u; +(function(d) { + var k = d.Debug.unexpected, a = function() { + function a(d, r, t, l) { + this.url = d; + this.method = r; + this.mimeType = t; this.data = l; } a.prototype.readAll = function(a) { - var c = this.url, u = new XMLHttpRequest({mozSystem:!0}); - u.open(this.method || "GET", this.url, !0); - u.responseType = "arraybuffer"; - u.onreadystatechange = function(l) { - 4 === u.readyState && (200 !== u.status && 0 !== u.status || null === u.response ? (h("Path: " + c + " not found."), a(null, u.statusText)) : a(u.response)); + var d = this.url, t = new XMLHttpRequest({mozSystem:!0}); + t.open(this.method || "GET", this.url, !0); + t.responseType = "arraybuffer"; + t.onreadystatechange = function(l) { + 4 === t.readyState && (200 !== t.status && 0 !== t.status || null === t.response ? (k("Path: " + d + " not found."), a(null, t.statusText)) : a(t.response)); }; - this.mimeType && u.setRequestHeader("Content-Type", this.mimeType); - u.send(this.data || null); + this.mimeType && t.setRequestHeader("Content-Type", this.mimeType); + t.send(this.data || null); }; - a.prototype.readChunked = function(a, c, u, l, e, m) { + a.prototype.readChunked = function(a, d, t, l, c, h) { if (0 >= a) { - this.readAsync(c, u, l, e, m); + this.readAsync(d, t, l, c, h); } else { - var t = 0, q = new Uint8Array(a), n = 0, k; - this.readAsync(function(f, d) { - k = d.total; - for (var b = f.length, g = 0;t + b >= a;) { - var r = a - t; - q.set(f.subarray(g, g + r), t); - g += r; - b -= r; - n += a; - c(q, {loaded:n, total:k}); - t = 0; + var p = 0, s = new Uint8Array(a), m = 0, g; + this.readAsync(function(f, b) { + g = b.total; + for (var e = f.length, c = 0;p + e >= a;) { + var n = a - p; + s.set(f.subarray(c, c + n), p); + c += n; + e -= n; + m += a; + d(s, {loaded:m, total:g}); + p = 0; } - q.set(f.subarray(g), t); - t += b; - }, u, l, function() { - 0 < t && (n += t, c(q.subarray(0, t), {loaded:n, total:k}), t = 0); - e && e(); - }, m); + s.set(f.subarray(c), p); + p += e; + }, t, l, function() { + 0 < p && (m += p, d(s.subarray(0, p), {loaded:m, total:g}), p = 0); + c && c(); + }, h); } }; - a.prototype.readAsync = function(a, c, u, l, e) { - var m = new XMLHttpRequest({mozSystem:!0}), t = this.url, q = 0, n = 0; - m.open(this.method || "GET", t, !0); - m.responseType = "moz-chunked-arraybuffer"; - var k = "moz-chunked-arraybuffer" !== m.responseType; - k && (m.responseType = "arraybuffer"); - m.onprogress = function(f) { - k || (q = f.loaded, n = f.total, a(new Uint8Array(m.response), {loaded:q, total:n})); + a.prototype.readAsync = function(a, d, t, l, c) { + var h = new XMLHttpRequest({mozSystem:!0}), p = this.url, s = 0, m = 0; + h.open(this.method || "GET", p, !0); + h.responseType = "moz-chunked-arraybuffer"; + var g = "moz-chunked-arraybuffer" !== h.responseType; + g && (h.responseType = "arraybuffer"); + h.onprogress = function(f) { + g || (s = f.loaded, m = f.total, a(new Uint8Array(h.response), {loaded:s, total:m})); }; - m.onreadystatechange = function(f) { - 2 === m.readyState && e && e(t, m.status, m.getAllResponseHeaders()); - 4 === m.readyState && (200 !== m.status && 0 !== m.status || null === m.response && (0 === n || q !== n) ? c(m.statusText) : (k && (f = m.response, a(new Uint8Array(f), {loaded:0, total:f.byteLength})), l && l())); + h.onreadystatechange = function(f) { + 2 === h.readyState && c && c(p, h.status, h.getAllResponseHeaders()); + 4 === h.readyState && (200 !== h.status && 0 !== h.status || null === h.response && (0 === m || s !== m) ? d(h.statusText) : (g && (f = h.response, a(new Uint8Array(f), {loaded:0, total:f.byteLength})), l && l())); }; - this.mimeType && m.setRequestHeader("Content-Type", this.mimeType); - m.send(this.data || null); - u && u(); + this.mimeType && h.setRequestHeader("Content-Type", this.mimeType); + h.send(this.data || null); + t && t(); }; return a; }(); - c.BinaryFileReader = a; + d.BinaryFileReader = a; })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { a[a.Objects = 0] = "Objects"; a[a.References = 1] = "References"; - })(c.RemotingPhase || (c.RemotingPhase = {})); + })(d.RemotingPhase || (d.RemotingPhase = {})); (function(a) { a[a.HasMatrix = 1] = "HasMatrix"; a[a.HasBounds = 2] = "HasBounds"; @@ -4188,11 +4551,11 @@ var __extends = this.__extends || function(c, h) { a[a.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties"; a[a.HasMask = 64] = "HasMask"; a[a.HasClip = 128] = "HasClip"; - })(c.MessageBits || (c.MessageBits = {})); + })(d.MessageBits || (d.MessageBits = {})); (function(a) { a[a.None = 0] = "None"; a[a.Asset = 134217728] = "Asset"; - })(c.IDMask || (c.IDMask = {})); + })(d.IDMask || (d.IDMask = {})); (function(a) { a[a.EOF = 0] = "EOF"; a[a.UpdateFrame = 100] = "UpdateFrame"; @@ -4206,27 +4569,30 @@ var __extends = this.__extends || function(c, h) { a[a.MouseEvent = 300] = "MouseEvent"; a[a.KeyboardEvent = 301] = "KeyboardEvent"; a[a.FocusEvent = 302] = "FocusEvent"; - })(c.MessageTag || (c.MessageTag = {})); + })(d.MessageTag || (d.MessageTag = {})); (function(a) { a[a.Blur = 0] = "Blur"; a[a.DropShadow = 1] = "DropShadow"; - })(c.FilterType || (c.FilterType = {})); + })(d.FilterType || (d.FilterType = {})); (function(a) { a[a.Identity = 0] = "Identity"; a[a.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly"; a[a.All = 2] = "All"; - })(c.ColorTransformEncoding || (c.ColorTransformEncoding = {})); + })(d.ColorTransformEncoding || (d.ColorTransformEncoding = {})); (function(a) { a[a.Initialized = 0] = "Initialized"; - a[a.PlayStart = 1] = "PlayStart"; - a[a.PlayStop = 2] = "PlayStop"; - a[a.BufferFull = 3] = "BufferFull"; - a[a.Progress = 4] = "Progress"; - a[a.BufferEmpty = 5] = "BufferEmpty"; - a[a.Error = 6] = "Error"; - a[a.Metadata = 7] = "Metadata"; + a[a.Metadata = 1] = "Metadata"; + a[a.PlayStart = 2] = "PlayStart"; + a[a.PlayStop = 3] = "PlayStop"; + a[a.BufferEmpty = 4] = "BufferEmpty"; + a[a.BufferFull = 5] = "BufferFull"; + a[a.Pause = 6] = "Pause"; + a[a.Unpause = 7] = "Unpause"; a[a.Seeking = 8] = "Seeking"; - })(c.VideoPlaybackEvent || (c.VideoPlaybackEvent = {})); + a[a.Seeked = 9] = "Seeked"; + a[a.Progress = 10] = "Progress"; + a[a.Error = 11] = "Error"; + })(d.VideoPlaybackEvent || (d.VideoPlaybackEvent = {})); (function(a) { a[a.Init = 1] = "Init"; a[a.Pause = 2] = "Pause"; @@ -4236,13 +4602,14 @@ var __extends = this.__extends || function(c, h) { a[a.SetSoundLevels = 6] = "SetSoundLevels"; a[a.GetBytesLoaded = 7] = "GetBytesLoaded"; a[a.GetBytesTotal = 8] = "GetBytesTotal"; - })(c.VideoControlEvent || (c.VideoControlEvent = {})); + a[a.EnsurePlaying = 9] = "EnsurePlaying"; + })(d.VideoControlEvent || (d.VideoControlEvent = {})); (function(a) { a[a.ShowAll = 0] = "ShowAll"; a[a.ExactFit = 1] = "ExactFit"; a[a.NoBorder = 2] = "NoBorder"; a[a.NoScale = 4] = "NoScale"; - })(c.StageScaleMode || (c.StageScaleMode = {})); + })(d.StageScaleMode || (d.StageScaleMode = {})); (function(a) { a[a.None = 0] = "None"; a[a.Top = 1] = "Top"; @@ -4253,225 +4620,225 @@ var __extends = this.__extends || function(c, h) { a[a.BottomLeft = a.Bottom | a.Left] = "BottomLeft"; a[a.BottomRight = a.Bottom | a.Right] = "BottomRight"; a[a.TopRight = a.Top | a.Right] = "TopRight"; - })(c.StageAlignFlags || (c.StageAlignFlags = {})); - c.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" "); - c.KeyboardEventNames = ["keydown", "keypress", "keyup"]; + })(d.StageAlignFlags || (d.StageAlignFlags = {})); + d.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" "); + d.KeyboardEventNames = ["keydown", "keypress", "keyup"]; (function(a) { a[a.CtrlKey = 1] = "CtrlKey"; a[a.AltKey = 2] = "AltKey"; a[a.ShiftKey = 4] = "ShiftKey"; - })(c.KeyboardEventFlags || (c.KeyboardEventFlags = {})); + })(d.KeyboardEventFlags || (d.KeyboardEventFlags = {})); (function(a) { a[a.DocumentHidden = 0] = "DocumentHidden"; a[a.DocumentVisible = 1] = "DocumentVisible"; a[a.WindowBlur = 2] = "WindowBlur"; a[a.WindowFocus = 3] = "WindowFocus"; - })(c.FocusEventType || (c.FocusEventType = {})); - })(c.Remoting || (c.Remoting = {})); + })(d.FocusEventType || (d.FocusEventType = {})); + })(d.Remoting || (d.Remoting = {})); })(Shumway || (Shumway = {})); var throwError, Errors; -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { + var d = function() { function a() { } - a.toRGBA = function(a, l, e, m) { - void 0 === m && (m = 1); - return "rgba(" + a + "," + l + "," + e + "," + m + ")"; + a.toRGBA = function(a, l, c, h) { + void 0 === h && (h = 1); + return "rgba(" + a + "," + l + "," + c + "," + h + ")"; }; return a; }(); - a.UI = c; - var h = function() { + a.UI = d; + var k = function() { function a() { } a.prototype.tabToolbar = function(a) { void 0 === a && (a = 1); - return c.toRGBA(37, 44, 51, a); + return d.toRGBA(37, 44, 51, a); }; a.prototype.toolbars = function(a) { void 0 === a && (a = 1); - return c.toRGBA(52, 60, 69, a); + return d.toRGBA(52, 60, 69, a); }; a.prototype.selectionBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(29, 79, 115, a); + return d.toRGBA(29, 79, 115, a); }; a.prototype.selectionText = function(a) { void 0 === a && (a = 1); - return c.toRGBA(245, 247, 250, a); + return d.toRGBA(245, 247, 250, a); }; a.prototype.splitters = function(a) { void 0 === a && (a = 1); - return c.toRGBA(0, 0, 0, a); + return d.toRGBA(0, 0, 0, a); }; a.prototype.bodyBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(17, 19, 21, a); + return d.toRGBA(17, 19, 21, a); }; a.prototype.sidebarBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(24, 29, 32, a); + return d.toRGBA(24, 29, 32, a); }; a.prototype.attentionBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(161, 134, 80, a); + return d.toRGBA(161, 134, 80, a); }; a.prototype.bodyText = function(a) { void 0 === a && (a = 1); - return c.toRGBA(143, 161, 178, a); + return d.toRGBA(143, 161, 178, a); }; a.prototype.foregroundTextGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(182, 186, 191, a); + return d.toRGBA(182, 186, 191, a); }; a.prototype.contentTextHighContrast = function(a) { void 0 === a && (a = 1); - return c.toRGBA(169, 186, 203, a); + return d.toRGBA(169, 186, 203, a); }; a.prototype.contentTextGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(143, 161, 178, a); + return d.toRGBA(143, 161, 178, a); }; a.prototype.contentTextDarkGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(95, 115, 135, a); + return d.toRGBA(95, 115, 135, a); }; a.prototype.blueHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(70, 175, 227, a); + return d.toRGBA(70, 175, 227, a); }; a.prototype.purpleHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(107, 122, 187, a); + return d.toRGBA(107, 122, 187, a); }; a.prototype.pinkHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(223, 128, 255, a); + return d.toRGBA(223, 128, 255, a); }; a.prototype.redHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(235, 83, 104, a); + return d.toRGBA(235, 83, 104, a); }; a.prototype.orangeHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(217, 102, 41, a); + return d.toRGBA(217, 102, 41, a); }; a.prototype.lightOrangeHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(217, 155, 40, a); + return d.toRGBA(217, 155, 40, a); }; a.prototype.greenHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(112, 191, 83, a); + return d.toRGBA(112, 191, 83, a); }; a.prototype.blueGreyHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(94, 136, 176, a); + return d.toRGBA(94, 136, 176, a); }; return a; }(); - a.UIThemeDark = h; - h = function() { + a.UIThemeDark = k; + k = function() { function a() { } a.prototype.tabToolbar = function(a) { void 0 === a && (a = 1); - return c.toRGBA(235, 236, 237, a); + return d.toRGBA(235, 236, 237, a); }; a.prototype.toolbars = function(a) { void 0 === a && (a = 1); - return c.toRGBA(240, 241, 242, a); + return d.toRGBA(240, 241, 242, a); }; a.prototype.selectionBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(76, 158, 217, a); + return d.toRGBA(76, 158, 217, a); }; a.prototype.selectionText = function(a) { void 0 === a && (a = 1); - return c.toRGBA(245, 247, 250, a); + return d.toRGBA(245, 247, 250, a); }; a.prototype.splitters = function(a) { void 0 === a && (a = 1); - return c.toRGBA(170, 170, 170, a); + return d.toRGBA(170, 170, 170, a); }; a.prototype.bodyBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(252, 252, 252, a); + return d.toRGBA(252, 252, 252, a); }; a.prototype.sidebarBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(247, 247, 247, a); + return d.toRGBA(247, 247, 247, a); }; a.prototype.attentionBackground = function(a) { void 0 === a && (a = 1); - return c.toRGBA(161, 134, 80, a); + return d.toRGBA(161, 134, 80, a); }; a.prototype.bodyText = function(a) { void 0 === a && (a = 1); - return c.toRGBA(24, 25, 26, a); + return d.toRGBA(24, 25, 26, a); }; a.prototype.foregroundTextGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(88, 89, 89, a); + return d.toRGBA(88, 89, 89, a); }; a.prototype.contentTextHighContrast = function(a) { void 0 === a && (a = 1); - return c.toRGBA(41, 46, 51, a); + return d.toRGBA(41, 46, 51, a); }; a.prototype.contentTextGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(143, 161, 178, a); + return d.toRGBA(143, 161, 178, a); }; a.prototype.contentTextDarkGrey = function(a) { void 0 === a && (a = 1); - return c.toRGBA(102, 115, 128, a); + return d.toRGBA(102, 115, 128, a); }; a.prototype.blueHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(0, 136, 204, a); + return d.toRGBA(0, 136, 204, a); }; a.prototype.purpleHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(91, 95, 255, a); + return d.toRGBA(91, 95, 255, a); }; a.prototype.pinkHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(184, 46, 229, a); + return d.toRGBA(184, 46, 229, a); }; a.prototype.redHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(237, 38, 85, a); + return d.toRGBA(237, 38, 85, a); }; a.prototype.orangeHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(241, 60, 0, a); + return d.toRGBA(241, 60, 0, a); }; a.prototype.lightOrangeHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(217, 126, 0, a); + return d.toRGBA(217, 126, 0, a); }; a.prototype.greenHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(44, 187, 15, a); + return d.toRGBA(44, 187, 15, a); }; a.prototype.blueGreyHighlight = function(a) { void 0 === a && (a = 1); - return c.toRGBA(95, 136, 176, a); + return d.toRGBA(95, 136, 176, a); }; return a; }(); - a.UIThemeLight = h; - })(c.Theme || (c.Theme = {})); - })(c.Tools || (c.Tools = {})); + a.UIThemeLight = k; + })(d.Theme || (d.Theme = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { - function a(c) { - this._buffers = c || []; + var d = function() { + function a(d) { + this._buffers = d || []; this._snapshots = []; this._maxDepth = 0; } @@ -4509,70 +4876,70 @@ var throwError, Errors; return this._maxDepth; }, enumerable:!0, configurable:!0}); a.prototype.forEachSnapshot = function(a) { - for (var c = 0, l = this.snapshotCount;c < l;c++) { - a(this._snapshots[c], c); + for (var d = 0, l = this.snapshotCount;d < l;d++) { + a(this._snapshots[d], d); } }; a.prototype.createSnapshots = function() { - var a = Number.MAX_VALUE, c = Number.MIN_VALUE, l = 0; + var a = Number.MAX_VALUE, d = Number.MIN_VALUE, l = 0; for (this._snapshots = [];0 < this._buffers.length;) { - var e = this._buffers.shift().createSnapshot(); - e && (a > e.startTime && (a = e.startTime), c < e.endTime && (c = e.endTime), l < e.maxDepth && (l = e.maxDepth), this._snapshots.push(e)); + var c = this._buffers.shift().createSnapshot(); + c && (a > c.startTime && (a = c.startTime), d < c.endTime && (d = c.endTime), l < c.maxDepth && (l = c.maxDepth), this._snapshots.push(c)); } this._startTime = a; - this._endTime = c; + this._endTime = d; this._windowStart = a; - this._windowEnd = c; + this._windowEnd = d; this._maxDepth = l; }; - a.prototype.setWindow = function(a, c) { - if (a > c) { + a.prototype.setWindow = function(a, d) { + if (a > d) { var l = a; - a = c; - c = l; + a = d; + d = l; } - l = Math.min(c - a, this.totalTime); - a < this._startTime ? (a = this._startTime, c = this._startTime + l) : c > this._endTime && (a = this._endTime - l, c = this._endTime); + l = Math.min(d - a, this.totalTime); + a < this._startTime ? (a = this._startTime, d = this._startTime + l) : d > this._endTime && (a = this._endTime - l, d = this._endTime); this._windowStart = a; - this._windowEnd = c; + this._windowEnd = d; }; a.prototype.moveWindowTo = function(a) { this.setWindow(a - this.windowLength / 2, a + this.windowLength / 2); }; return a; }(); - a.Profile = c; - })(c.Profiler || (c.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.Profile = d; + })(d.Profiler || (d.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { + var d = function() { return function(a) { this.kind = a; this.totalTime = this.selfTime = this.count = 0; }; }(); - a.TimelineFrameStatistics = c; - var h = function() { - function a(c, l, e, m, t, q) { - this.parent = c; + a.TimelineFrameStatistics = d; + var k = function() { + function a(d, l, c, h, p, s) { + this.parent = d; this.kind = l; - this.startData = e; - this.endData = m; - this.startTime = t; - this.endTime = q; + this.startData = c; + this.endData = h; + this.startTime = p; + this.endTime = s; this.maxDepth = 0; } Object.defineProperty(a.prototype, "totalTime", {get:function() { @@ -4581,25 +4948,25 @@ __extends = this.__extends || function(c, h) { Object.defineProperty(a.prototype, "selfTime", {get:function() { var a = this.totalTime; if (this.children) { - for (var l = 0, e = this.children.length;l < e;l++) { - var m = this.children[l], a = a - (m.endTime - m.startTime) + for (var l = 0, c = this.children.length;l < c;l++) { + var h = this.children[l], a = a - (h.endTime - h.startTime) } } return a; }, enumerable:!0, configurable:!0}); a.prototype.getChildIndex = function(a) { - for (var l = this.children, e = 0;e < l.length;e++) { - if (l[e].endTime > a) { - return e; + for (var l = this.children, c = 0;c < l.length;c++) { + if (l[c].endTime > a) { + return c; } } return 0; }; a.prototype.getChildRange = function(a, l) { if (this.children && a <= this.endTime && l >= this.startTime && l >= a) { - var e = this._getNearestChild(a), m = this._getNearestChildReverse(l); - if (e <= m) { - return a = this.children[e].startTime, l = this.children[m].endTime, {startIndex:e, endIndex:m, startTime:a, endTime:l, totalTime:l - a}; + var c = this._getNearestChild(a), h = this._getNearestChildReverse(l); + if (c <= h) { + return a = this.children[c].startTime, l = this.children[h].endTime, {startIndex:c, endIndex:h, startTime:a, endTime:l, totalTime:l - a}; } } return null; @@ -4610,34 +4977,34 @@ __extends = this.__extends || function(c, h) { if (a <= l[0].endTime) { return 0; } - for (var e, m = 0, c = l.length - 1;c > m;) { - e = (m + c) / 2 | 0; - var q = l[e]; - if (a >= q.startTime && a <= q.endTime) { - return e; + for (var c, h = 0, p = l.length - 1;p > h;) { + c = (h + p) / 2 | 0; + var s = l[c]; + if (a >= s.startTime && a <= s.endTime) { + return c; } - a > q.endTime ? m = e + 1 : c = e; + a > s.endTime ? h = c + 1 : p = c; } - return Math.ceil((m + c) / 2); + return Math.ceil((h + p) / 2); } return 0; }; a.prototype._getNearestChildReverse = function(a) { var l = this.children; if (l && l.length) { - var e = l.length - 1; - if (a >= l[e].startTime) { - return e; + var c = l.length - 1; + if (a >= l[c].startTime) { + return c; } - for (var m, c = 0;e > c;) { - m = Math.ceil((c + e) / 2); - var q = l[m]; - if (a >= q.startTime && a <= q.endTime) { - return m; + for (var h, p = 0;c > p;) { + h = Math.ceil((p + c) / 2); + var s = l[h]; + if (a >= s.startTime && a <= s.endTime) { + return h; } - a > q.endTime ? c = m : e = m - 1; + a > s.endTime ? p = h : c = h - 1; } - return(c + e) / 2 | 0; + return(p + c) / 2 | 0; } return 0; }; @@ -4647,17 +5014,17 @@ __extends = this.__extends || function(c, h) { } var l = this.children; if (l && 0 < l.length) { - for (var e, m = 0, c = l.length - 1;c > m;) { - var q = (m + c) / 2 | 0; - e = l[q]; - if (a >= e.startTime && a <= e.endTime) { - return e.query(a); + for (var c, h = 0, p = l.length - 1;p > h;) { + var s = (h + p) / 2 | 0; + c = l[s]; + if (a >= c.startTime && a <= c.endTime) { + return c.query(a); } - a > e.endTime ? m = q + 1 : c = q; + a > c.endTime ? h = s + 1 : p = s; } - e = l[c]; - if (a >= e.startTime && a <= e.endTime) { - return e.query(a); + c = l[p]; + if (a >= c.startTime && a <= c.endTime) { + return c.query(a); } } return this; @@ -4679,14 +5046,14 @@ __extends = this.__extends || function(c, h) { return a; }; a.prototype.calculateStatistics = function() { - function a(e) { - if (e.kind) { - var m = l[e.kind.id] || (l[e.kind.id] = new c(e.kind)); - m.count++; - m.selfTime += e.selfTime; - m.totalTime += e.totalTime; + function a(c) { + if (c.kind) { + var h = l[c.kind.id] || (l[c.kind.id] = new d(c.kind)); + h.count++; + h.selfTime += c.selfTime; + h.totalTime += c.totalTime; } - e.children && e.children.forEach(a); + c.children && c.children.forEach(a); } var l = this.statistics = []; a(this); @@ -4705,108 +5072,108 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - a.TimelineFrame = h; - h = function(a) { - function c(l) { + a.TimelineFrame = k; + k = function(a) { + function d(l) { a.call(this, null, null, null, null, NaN, NaN); this.name = l; } - __extends(c, a); - return c; - }(h); - a.TimelineBufferSnapshot = h; - })(c.Profiler || (c.Profiler = {})); - })(c.Tools || (c.Tools = {})); + __extends(d, a); + return d; + }(k); + a.TimelineBufferSnapshot = k; + })(d.Profiler || (d.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = function() { - function s(a, h) { + var r = function() { + function r(a, t) { void 0 === a && (a = ""); this.name = a || ""; - this._startTime = c.isNullOrUndefined(h) ? jsGlobal.START_TIME : h; + this._startTime = d.isNullOrUndefined(t) ? jsGlobal.START_TIME : t; } - s.prototype.getKind = function(a) { + r.prototype.getKind = function(a) { return this._kinds[a]; }; - Object.defineProperty(s.prototype, "kinds", {get:function() { + Object.defineProperty(r.prototype, "kinds", {get:function() { return this._kinds.concat(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(s.prototype, "depth", {get:function() { + Object.defineProperty(r.prototype, "depth", {get:function() { return this._depth; }, enumerable:!0, configurable:!0}); - s.prototype._initialize = function() { + r.prototype._initialize = function() { this._depth = 0; this._stack = []; this._data = []; this._kinds = []; this._kindNameMap = Object.create(null); - this._marks = new c.CircularBuffer(Int32Array, 20); - this._times = new c.CircularBuffer(Float64Array, 20); + this._marks = new d.CircularBuffer(Int32Array, 20); + this._times = new d.CircularBuffer(Float64Array, 20); }; - s.prototype._getKindId = function(a) { - var c = s.MAX_KINDID; + r.prototype._getKindId = function(a) { + var d = r.MAX_KINDID; if (void 0 === this._kindNameMap[a]) { - if (c = this._kinds.length, c < s.MAX_KINDID) { - var l = {id:c, name:a, visible:!0}; + if (d = this._kinds.length, d < r.MAX_KINDID) { + var l = {id:d, name:a, visible:!0}; this._kinds.push(l); this._kindNameMap[a] = l; } else { - c = s.MAX_KINDID; + d = r.MAX_KINDID; } } else { - c = this._kindNameMap[a].id; + d = this._kindNameMap[a].id; } - return c; + return d; }; - s.prototype._getMark = function(a, h, l) { - var e = s.MAX_DATAID; - c.isNullOrUndefined(l) || h === s.MAX_KINDID || (e = this._data.length, e < s.MAX_DATAID ? this._data.push(l) : e = s.MAX_DATAID); - return a | e << 16 | h; + r.prototype._getMark = function(a, t, l) { + var c = r.MAX_DATAID; + d.isNullOrUndefined(l) || t === r.MAX_KINDID || (c = this._data.length, c < r.MAX_DATAID ? this._data.push(l) : c = r.MAX_DATAID); + return a | c << 16 | t; }; - s.prototype.enter = function(a, h, l) { - l = (c.isNullOrUndefined(l) ? performance.now() : l) - this._startTime; + r.prototype.enter = function(a, t, l) { + l = (d.isNullOrUndefined(l) ? performance.now() : l) - this._startTime; this._marks || this._initialize(); this._depth++; a = this._getKindId(a); - this._marks.write(this._getMark(s.ENTER, a, h)); + this._marks.write(this._getMark(r.ENTER, a, t)); this._times.write(l); this._stack.push(a); }; - s.prototype.leave = function(a, h, l) { - l = (c.isNullOrUndefined(l) ? performance.now() : l) - this._startTime; - var e = this._stack.pop(); - a && (e = this._getKindId(a)); - this._marks.write(this._getMark(s.LEAVE, e, h)); + r.prototype.leave = function(a, t, l) { + l = (d.isNullOrUndefined(l) ? performance.now() : l) - this._startTime; + var c = this._stack.pop(); + a && (c = this._getKindId(a)); + this._marks.write(this._getMark(r.LEAVE, c, t)); this._times.write(l); this._depth--; }; - s.prototype.count = function(a, c, l) { + r.prototype.count = function(a, d, l) { }; - s.prototype.createSnapshot = function() { - var p; - void 0 === p && (p = Number.MAX_VALUE); + r.prototype.createSnapshot = function() { + var u; + void 0 === u && (u = Number.MAX_VALUE); if (!this._marks) { return null; } - var h = this._times, l = this._kinds, e = this._data, m = new a.TimelineBufferSnapshot(this.name), t = [m], q = 0; + var t = this._times, l = this._kinds, c = this._data, h = new a.TimelineBufferSnapshot(this.name), p = [h], s = 0; this._marks || this._initialize(); - this._marks.forEachInReverse(function(n, k) { - var f = e[n >>> 16 & s.MAX_DATAID], d = l[n & s.MAX_KINDID]; - if (c.isNullOrUndefined(d) || d.visible) { - var b = n & 2147483648, g = h.get(k), r = t.length; - if (b === s.LEAVE) { - if (1 === r && (q++, q > p)) { + this._marks.forEachInReverse(function(m, g) { + var f = c[m >>> 16 & r.MAX_DATAID], b = l[m & r.MAX_KINDID]; + if (d.isNullOrUndefined(b) || b.visible) { + var e = m & 2147483648, q = t.get(g), n = p.length; + if (e === r.LEAVE) { + if (1 === n && (s++, s > u)) { return!0; } - t.push(new a.TimelineFrame(t[r - 1], d, null, f, NaN, g)); + p.push(new a.TimelineFrame(p[n - 1], b, null, f, NaN, q)); } else { - if (b === s.ENTER) { - if (d = t.pop(), b = t[t.length - 1]) { - for (b.children ? b.children.unshift(d) : b.children = [d], b = t.length, d.depth = b, d.startData = f, d.startTime = g;d;) { - if (d.maxDepth < b) { - d.maxDepth = b, d = d.parent; + if (e === r.ENTER) { + if (b = p.pop(), e = p[p.length - 1]) { + for (e.children ? e.children.unshift(b) : e.children = [b], e = p.length, b.depth = e, b.startData = f, b.startTime = q;b;) { + if (b.maxDepth < e) { + b.maxDepth = e, b = b.parent; } else { break; } @@ -4818,159 +5185,159 @@ __extends = this.__extends || function(c, h) { } } }); - m.children && m.children.length && (m.startTime = m.children[0].startTime, m.endTime = m.children[m.children.length - 1].endTime); - return m; + h.children && h.children.length && (h.startTime = h.children[0].startTime, h.endTime = h.children[h.children.length - 1].endTime); + return h; }; - s.prototype.reset = function(a) { - this._startTime = c.isNullOrUndefined(a) ? performance.now() : a; + r.prototype.reset = function(a) { + this._startTime = d.isNullOrUndefined(a) ? performance.now() : a; this._marks ? (this._depth = 0, this._data = [], this._marks.reset(), this._times.reset()) : this._initialize(); }; - s.FromFirefoxProfile = function(a, c) { - for (var l = a.profile.threads[0].samples, e = new s(c, l[0].time), m = [], t, q = 0;q < l.length;q++) { - t = l[q]; - var n = t.time, k = t.frames, f = 0; - for (t = Math.min(k.length, m.length);f < t && k[f].location === m[f].location;) { + r.FromFirefoxProfile = function(a, d) { + for (var l = a.profile.threads[0].samples, c = new r(d, l[0].time), h = [], p, s = 0;s < l.length;s++) { + p = l[s]; + var m = p.time, g = p.frames, f = 0; + for (p = Math.min(g.length, h.length);f < p && g[f].location === h[f].location;) { f++; } - for (var d = m.length - f, b = 0;b < d;b++) { - t = m.pop(), e.leave(t.location, null, n); + for (var b = h.length - f, e = 0;e < b;e++) { + p = h.pop(), c.leave(p.location, null, m); } - for (;f < k.length;) { - t = k[f++], e.enter(t.location, null, n); + for (;f < g.length;) { + p = g[f++], c.enter(p.location, null, m); } - m = k; + h = g; } - for (;t = m.pop();) { - e.leave(t.location, null, n); + for (;p = h.pop();) { + c.leave(p.location, null, m); } - return e; + return c; }; - s.FromChromeProfile = function(a, c) { - var l = a.timestamps, e = a.samples, m = new s(c, l[0] / 1E3), t = [], q = {}, n; - s._resolveIds(a.head, q); - for (var k = 0;k < l.length;k++) { - var f = l[k] / 1E3, d = []; - for (n = q[e[k]];n;) { - d.unshift(n), n = n.parent; + r.FromChromeProfile = function(a, d) { + var l = a.timestamps, c = a.samples, h = new r(d, l[0] / 1E3), p = [], s = {}, m; + r._resolveIds(a.head, s); + for (var g = 0;g < l.length;g++) { + var f = l[g] / 1E3, b = []; + for (m = s[c[g]];m;) { + b.unshift(m), m = m.parent; } - var b = 0; - for (n = Math.min(d.length, t.length);b < n && d[b] === t[b];) { - b++; + var e = 0; + for (m = Math.min(b.length, p.length);e < m && b[e] === p[e];) { + e++; } - for (var g = t.length - b, r = 0;r < g;r++) { - n = t.pop(), m.leave(n.functionName, null, f); + for (var q = p.length - e, n = 0;n < q;n++) { + m = p.pop(), h.leave(m.functionName, null, f); } - for (;b < d.length;) { - n = d[b++], m.enter(n.functionName, null, f); + for (;e < b.length;) { + m = b[e++], h.enter(m.functionName, null, f); } - t = d; + p = b; } - for (;n = t.pop();) { - m.leave(n.functionName, null, f); + for (;m = p.pop();) { + h.leave(m.functionName, null, f); } - return m; + return h; }; - s._resolveIds = function(a, c) { - c[a.id] = a; + r._resolveIds = function(a, d) { + d[a.id] = a; if (a.children) { for (var l = 0;l < a.children.length;l++) { - a.children[l].parent = a, s._resolveIds(a.children[l], c); + a.children[l].parent = a, r._resolveIds(a.children[l], d); } } }; - s.ENTER = 0; - s.LEAVE = -2147483648; - s.MAX_KINDID = 65535; - s.MAX_DATAID = 32767; - return s; + r.ENTER = 0; + r.LEAVE = -2147483648; + r.MAX_KINDID = 65535; + r.MAX_DATAID = 32767; + return r; }(); - a.TimelineBuffer = s; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.TimelineBuffer = r; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { a[a.DARK = 0] = "DARK"; a[a.LIGHT = 1] = "LIGHT"; })(a.UIThemeType || (a.UIThemeType = {})); - var s = function() { - function s(a, c) { - void 0 === c && (c = 0); + var r = function() { + function r(a, d) { + void 0 === d && (d = 0); this._container = a; this._headers = []; this._charts = []; this._profiles = []; this._activeProfile = null; - this.themeType = c; + this.themeType = d; this._tooltip = this._createTooltip(); } - s.prototype.createProfile = function(c, s) { - void 0 === s && (s = !0); - var l = new a.Profile(c); + r.prototype.createProfile = function(d, r) { + void 0 === r && (r = !0); + var l = new a.Profile(d); l.createSnapshots(); this._profiles.push(l); - s && this.activateProfile(l); + r && this.activateProfile(l); return l; }; - s.prototype.activateProfile = function(a) { + r.prototype.activateProfile = function(a) { this.deactivateProfile(); this._activeProfile = a; this._createViews(); this._initializeViews(); }; - s.prototype.activateProfileAt = function(a) { + r.prototype.activateProfileAt = function(a) { this.activateProfile(this.getProfileAt(a)); }; - s.prototype.deactivateProfile = function() { + r.prototype.deactivateProfile = function() { this._activeProfile && (this._destroyViews(), this._activeProfile = null); }; - s.prototype.resize = function() { + r.prototype.resize = function() { this._onResize(); }; - s.prototype.getProfileAt = function(a) { + r.prototype.getProfileAt = function(a) { return this._profiles[a]; }; - Object.defineProperty(s.prototype, "activeProfile", {get:function() { + Object.defineProperty(r.prototype, "activeProfile", {get:function() { return this._activeProfile; }, enumerable:!0, configurable:!0}); - Object.defineProperty(s.prototype, "profileCount", {get:function() { + Object.defineProperty(r.prototype, "profileCount", {get:function() { return this._profiles.length; }, enumerable:!0, configurable:!0}); - Object.defineProperty(s.prototype, "container", {get:function() { + Object.defineProperty(r.prototype, "container", {get:function() { return this._container; }, enumerable:!0, configurable:!0}); - Object.defineProperty(s.prototype, "themeType", {get:function() { + Object.defineProperty(r.prototype, "themeType", {get:function() { return this._themeType; }, set:function(a) { switch(a) { case 0: - this._theme = new h.Theme.UIThemeDark; + this._theme = new k.Theme.UIThemeDark; break; case 1: - this._theme = new h.Theme.UIThemeLight; + this._theme = new k.Theme.UIThemeLight; } }, enumerable:!0, configurable:!0}); - Object.defineProperty(s.prototype, "theme", {get:function() { + Object.defineProperty(r.prototype, "theme", {get:function() { return this._theme; }, enumerable:!0, configurable:!0}); - s.prototype.getSnapshotAt = function(a) { + r.prototype.getSnapshotAt = function(a) { return this._activeProfile.getSnapshotAt(a); }; - s.prototype._createViews = function() { + r.prototype._createViews = function() { if (this._activeProfile) { - var c = this; + var d = this; this._overviewHeader = new a.FlameChartHeader(this, 0); this._overview = new a.FlameChartOverview(this, 0); - this._activeProfile.forEachSnapshot(function(s, l) { - c._headers.push(new a.FlameChartHeader(c, 1)); - c._charts.push(new a.FlameChart(c, s)); + this._activeProfile.forEachSnapshot(function(r, l) { + d._headers.push(new a.FlameChartHeader(d, 1)); + d._charts.push(new a.FlameChart(d, r)); }); window.addEventListener("resize", this._onResize.bind(this)); } }; - s.prototype._destroyViews = function() { + r.prototype._destroyViews = function() { if (this._activeProfile) { this._overviewHeader.destroy(); for (this._overview.destroy();this._headers.length;) { @@ -4982,116 +5349,116 @@ __extends = this.__extends || function(c, h) { window.removeEventListener("resize", this._onResize.bind(this)); } }; - s.prototype._initializeViews = function() { + r.prototype._initializeViews = function() { if (this._activeProfile) { - var a = this, c = this._activeProfile.startTime, l = this._activeProfile.endTime; - this._overviewHeader.initialize(c, l); - this._overview.initialize(c, l); - this._activeProfile.forEachSnapshot(function(e, m) { - a._headers[m].initialize(c, l); - a._charts[m].initialize(c, l); + var a = this, d = this._activeProfile.startTime, l = this._activeProfile.endTime; + this._overviewHeader.initialize(d, l); + this._overview.initialize(d, l); + this._activeProfile.forEachSnapshot(function(c, h) { + a._headers[h].initialize(d, l); + a._charts[h].initialize(d, l); }); } }; - s.prototype._onResize = function() { + r.prototype._onResize = function() { if (this._activeProfile) { - var a = this, c = this._container.offsetWidth; - this._overviewHeader.setSize(c); - this._overview.setSize(c); - this._activeProfile.forEachSnapshot(function(l, e) { - a._headers[e].setSize(c); - a._charts[e].setSize(c); + var a = this, d = this._container.offsetWidth; + this._overviewHeader.setSize(d); + this._overview.setSize(d); + this._activeProfile.forEachSnapshot(function(l, c) { + a._headers[c].setSize(d); + a._charts[c].setSize(d); }); } }; - s.prototype._updateViews = function() { + r.prototype._updateViews = function() { if (this._activeProfile) { - var a = this, c = this._activeProfile.windowStart, l = this._activeProfile.windowEnd; - this._overviewHeader.setWindow(c, l); - this._overview.setWindow(c, l); - this._activeProfile.forEachSnapshot(function(e, m) { - a._headers[m].setWindow(c, l); - a._charts[m].setWindow(c, l); + var a = this, d = this._activeProfile.windowStart, l = this._activeProfile.windowEnd; + this._overviewHeader.setWindow(d, l); + this._overview.setWindow(d, l); + this._activeProfile.forEachSnapshot(function(c, h) { + a._headers[h].setWindow(d, l); + a._charts[h].setWindow(d, l); }); } }; - s.prototype._drawViews = function() { + r.prototype._drawViews = function() { }; - s.prototype._createTooltip = function() { + r.prototype._createTooltip = function() { var a = document.createElement("div"); a.classList.add("profiler-tooltip"); a.style.display = "none"; this._container.insertBefore(a, this._container.firstChild); return a; }; - s.prototype.setWindow = function(a, c) { - this._activeProfile.setWindow(a, c); + r.prototype.setWindow = function(a, d) { + this._activeProfile.setWindow(a, d); this._updateViews(); }; - s.prototype.moveWindowTo = function(a) { + r.prototype.moveWindowTo = function(a) { this._activeProfile.moveWindowTo(a); this._updateViews(); }; - s.prototype.showTooltip = function(a, c, l, e) { + r.prototype.showTooltip = function(a, d, l, c) { this.removeTooltipContent(); - this._tooltip.appendChild(this.createTooltipContent(a, c)); + this._tooltip.appendChild(this.createTooltipContent(a, d)); this._tooltip.style.display = "block"; - var m = this._tooltip.firstChild; - c = m.clientWidth; - m = m.clientHeight; - l += l + c >= a.canvas.clientWidth - 50 ? -(c + 20) : 25; - e += a.canvas.offsetTop - m / 2; + var h = this._tooltip.firstChild; + d = h.clientWidth; + h = h.clientHeight; + l += l + d >= a.canvas.clientWidth - 50 ? -(d + 20) : 25; + c += a.canvas.offsetTop - h / 2; this._tooltip.style.left = l + "px"; - this._tooltip.style.top = e + "px"; + this._tooltip.style.top = c + "px"; }; - s.prototype.hideTooltip = function() { + r.prototype.hideTooltip = function() { this._tooltip.style.display = "none"; }; - s.prototype.createTooltipContent = function(a, c) { - var l = Math.round(1E5 * c.totalTime) / 1E5, e = Math.round(1E5 * c.selfTime) / 1E5, m = Math.round(1E4 * c.selfTime / c.totalTime) / 100, t = document.createElement("div"), q = document.createElement("h1"); - q.textContent = c.kind.name; - t.appendChild(q); - q = document.createElement("p"); - q.textContent = "Total: " + l + " ms"; - t.appendChild(q); + r.prototype.createTooltipContent = function(a, d) { + var l = Math.round(1E5 * d.totalTime) / 1E5, c = Math.round(1E5 * d.selfTime) / 1E5, h = Math.round(1E4 * d.selfTime / d.totalTime) / 100, p = document.createElement("div"), s = document.createElement("h1"); + s.textContent = d.kind.name; + p.appendChild(s); + s = document.createElement("p"); + s.textContent = "Total: " + l + " ms"; + p.appendChild(s); l = document.createElement("p"); - l.textContent = "Self: " + e + " ms (" + m + "%)"; - t.appendChild(l); - if (e = a.getStatistics(c.kind)) { - m = document.createElement("p"), m.textContent = "Count: " + e.count, t.appendChild(m), m = Math.round(1E5 * e.totalTime) / 1E5, l = document.createElement("p"), l.textContent = "All Total: " + m + " ms", t.appendChild(l), e = Math.round(1E5 * e.selfTime) / 1E5, m = document.createElement("p"), m.textContent = "All Self: " + e + " ms", t.appendChild(m); + l.textContent = "Self: " + c + " ms (" + h + "%)"; + p.appendChild(l); + if (c = a.getStatistics(d.kind)) { + h = document.createElement("p"), h.textContent = "Count: " + c.count, p.appendChild(h), h = Math.round(1E5 * c.totalTime) / 1E5, l = document.createElement("p"), l.textContent = "All Total: " + h + " ms", p.appendChild(l), c = Math.round(1E5 * c.selfTime) / 1E5, h = document.createElement("p"), h.textContent = "All Self: " + c + " ms", p.appendChild(h); } - this.appendDataElements(t, c.startData); - this.appendDataElements(t, c.endData); - return t; + this.appendDataElements(p, d.startData); + this.appendDataElements(p, d.endData); + return p; }; - s.prototype.appendDataElements = function(a, s) { - if (!c.isNullOrUndefined(s)) { + r.prototype.appendDataElements = function(a, r) { + if (!d.isNullOrUndefined(r)) { a.appendChild(document.createElement("hr")); var l; - if (c.isObject(s)) { - for (var e in s) { - l = document.createElement("p"), l.textContent = e + ": " + s[e], a.appendChild(l); + if (d.isObject(r)) { + for (var c in r) { + l = document.createElement("p"), l.textContent = c + ": " + r[c], a.appendChild(l); } } else { - l = document.createElement("p"), l.textContent = s.toString(), a.appendChild(l); + l = document.createElement("p"), l.textContent = r.toString(), a.appendChild(l); } } }; - s.prototype.removeTooltipContent = function() { + r.prototype.removeTooltipContent = function() { for (var a = this._tooltip;a.firstChild;) { a.removeChild(a.firstChild); } }; - return s; + return r; }(); - a.Controller = s; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.Controller = r; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.NumberUtilities.clamp, h = function() { + var r = d.NumberUtilities.clamp, k = function() { function a(l) { this.value = l; } @@ -5134,11 +5501,11 @@ __extends = this.__extends || function(c, h) { a.GRABBING = new a("grabbing"); return a; }(); - a.MouseCursor = h; - var p = function() { - function a(l, e) { + a.MouseCursor = k; + var u = function() { + function a(l, c) { this._target = l; - this._eventTarget = e; + this._eventTarget = c; this._wheelDisabled = !1; this._boundOnMouseDown = this._onMouseDown.bind(this); this._boundOnMouseUp = this._onMouseUp.bind(this); @@ -5147,10 +5514,10 @@ __extends = this.__extends || function(c, h) { this._boundOnMouseMove = this._onMouseMove.bind(this); this._boundOnMouseWheel = this._onMouseWheel.bind(this); this._boundOnDrag = this._onDrag.bind(this); - e.addEventListener("mousedown", this._boundOnMouseDown, !1); - e.addEventListener("mouseover", this._boundOnMouseOver, !1); - e.addEventListener("mouseout", this._boundOnMouseOut, !1); - e.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1); + c.addEventListener("mousedown", this._boundOnMouseDown, !1); + c.addEventListener("mouseover", this._boundOnMouseOver, !1); + c.addEventListener("mouseout", this._boundOnMouseOut, !1); + c.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1); } a.prototype.destroy = function() { var a = this._eventTarget; @@ -5165,36 +5532,36 @@ __extends = this.__extends || function(c, h) { }; a.prototype.updateCursor = function(l) { if (!a._cursorOwner || a._cursorOwner === this._target) { - var e = this._eventTarget.parentElement; + var c = this._eventTarget.parentElement; a._cursor !== l && (a._cursor = l, ["", "-moz-", "-webkit-"].forEach(function(a) { - e.style.cursor = a + l; + c.style.cursor = a + l; })); - a._cursorOwner = a._cursor === h.DEFAULT ? null : this._target; + a._cursorOwner = a._cursor === k.DEFAULT ? null : this._target; } }; a.prototype._onMouseDown = function(a) { this._killHoverCheck(); if (0 === a.button) { - var e = this._getTargetMousePos(a, a.target); - this._dragInfo = {start:e, current:e, delta:{x:0, y:0}, hasMoved:!1, originalTarget:a.target}; + var c = this._getTargetMousePos(a, a.target); + this._dragInfo = {start:c, current:c, delta:{x:0, y:0}, hasMoved:!1, originalTarget:a.target}; window.addEventListener("mousemove", this._boundOnDrag, !1); window.addEventListener("mouseup", this._boundOnMouseUp, !1); - this._target.onMouseDown(e.x, e.y); + this._target.onMouseDown(c.x, c.y); } }; a.prototype._onDrag = function(a) { - var e = this._dragInfo; - a = this._getTargetMousePos(a, e.originalTarget); - var m = {x:a.x - e.start.x, y:a.y - e.start.y}; - e.current = a; - e.delta = m; - e.hasMoved = !0; - this._target.onDrag(e.start.x, e.start.y, a.x, a.y, m.x, m.y); + var c = this._dragInfo; + a = this._getTargetMousePos(a, c.originalTarget); + var h = {x:a.x - c.start.x, y:a.y - c.start.y}; + c.current = a; + c.delta = h; + c.hasMoved = !0; + this._target.onDrag(c.start.x, c.start.y, a.x, a.y, h.x, h.y); }; a.prototype._onMouseUp = function(a) { window.removeEventListener("mousemove", this._boundOnDrag); window.removeEventListener("mouseup", this._boundOnMouseUp); - var e = this; + var c = this; a = this._dragInfo; if (a.hasMoved) { this._target.onDragEnd(a.start.x, a.start.y, a.current.x, a.current.y, a.delta.x, a.delta.y); @@ -5204,14 +5571,14 @@ __extends = this.__extends || function(c, h) { this._dragInfo = null; this._wheelDisabled = !0; setTimeout(function() { - e._wheelDisabled = !1; + c._wheelDisabled = !1; }, 500); }; a.prototype._onMouseOver = function(a) { a.target.addEventListener("mousemove", this._boundOnMouseMove, !1); if (!this._dragInfo) { - var e = this._getTargetMousePos(a, a.target); - this._target.onMouseOver(e.x, e.y); + var c = this._getTargetMousePos(a, a.target); + this._target.onMouseOver(c.x, c.y); this._startHoverCheck(a); } }; @@ -5224,17 +5591,17 @@ __extends = this.__extends || function(c, h) { }; a.prototype._onMouseMove = function(a) { if (!this._dragInfo) { - var e = this._getTargetMousePos(a, a.target); - this._target.onMouseMove(e.x, e.y); + var c = this._getTargetMousePos(a, a.target); + this._target.onMouseMove(c.x, c.y); this._killHoverCheck(); this._startHoverCheck(a); } }; a.prototype._onMouseWheel = function(a) { if (!(a.altKey || a.metaKey || a.ctrlKey || a.shiftKey || (a.preventDefault(), this._dragInfo || this._wheelDisabled))) { - var e = this._getTargetMousePos(a, a.target); - a = s("undefined" !== typeof a.deltaY ? a.deltaY / 16 : -a.wheelDelta / 40, -1, 1); - this._target.onMouseWheel(e.x, e.y, Math.pow(1.2, a) - 1); + var c = this._getTargetMousePos(a, a.target); + a = r("undefined" !== typeof a.deltaY ? a.deltaY / 16 : -a.wheelDelta / 40, -1, 1); + this._target.onMouseWheel(c.x, c.y, Math.pow(1.2, a) - 1); } }; a.prototype._startHoverCheck = function(l) { @@ -5254,20 +5621,20 @@ __extends = this.__extends || function(c, h) { a.isHovering = !0; this._target.onHoverStart(a.pos.x, a.pos.y); }; - a.prototype._getTargetMousePos = function(a, e) { - var m = e.getBoundingClientRect(); - return{x:a.clientX - m.left, y:a.clientY - m.top}; + a.prototype._getTargetMousePos = function(a, c) { + var h = c.getBoundingClientRect(); + return{x:a.clientX - h.left, y:a.clientY - h.top}; }; a.HOVER_TIMEOUT = 500; - a._cursor = h.DEFAULT; + a._cursor = k.DEFAULT; return a; }(); - a.MouseController = p; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.MouseController = u; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { a[a.NONE = 0] = "NONE"; @@ -5276,532 +5643,532 @@ __extends = this.__extends || function(c, h) { a[a.HANDLE_RIGHT = 3] = "HANDLE_RIGHT"; a[a.HANDLE_BOTH = 4] = "HANDLE_BOTH"; })(a.FlameChartDragTarget || (a.FlameChartDragTarget = {})); - var c = function() { - function c(s) { - this._controller = s; + var d = function() { + function d(r) { + this._controller = r; this._initialized = !1; this._canvas = document.createElement("canvas"); this._context = this._canvas.getContext("2d"); this._mouseController = new a.MouseController(this, this._canvas); - s = s.container; - s.appendChild(this._canvas); - s = s.getBoundingClientRect(); - this.setSize(s.width); + r = r.container; + r.appendChild(this._canvas); + r = r.getBoundingClientRect(); + this.setSize(r.width); } - Object.defineProperty(c.prototype, "canvas", {get:function() { + Object.defineProperty(d.prototype, "canvas", {get:function() { return this._canvas; }, enumerable:!0, configurable:!0}); - c.prototype.setSize = function(a, c) { - void 0 === c && (c = 20); + d.prototype.setSize = function(a, d) { + void 0 === d && (d = 20); this._width = a; - this._height = c; + this._height = d; this._resetCanvas(); this.draw(); }; - c.prototype.initialize = function(a, c) { + d.prototype.initialize = function(a, d) { this._initialized = !0; - this.setRange(a, c); - this.setWindow(a, c, !1); + this.setRange(a, d); + this.setWindow(a, d, !1); this.draw(); }; - c.prototype.setWindow = function(a, c, l) { + d.prototype.setWindow = function(a, d, l) { void 0 === l && (l = !0); this._windowStart = a; - this._windowEnd = c; + this._windowEnd = d; !l || this.draw(); }; - c.prototype.setRange = function(a, c) { + d.prototype.setRange = function(a, d) { var l = !1; void 0 === l && (l = !0); this._rangeStart = a; - this._rangeEnd = c; + this._rangeEnd = d; !l || this.draw(); }; - c.prototype.destroy = function() { + d.prototype.destroy = function() { this._mouseController.destroy(); this._mouseController = null; this._controller.container.removeChild(this._canvas); this._controller = null; }; - c.prototype._resetCanvas = function() { - var a = window.devicePixelRatio, c = this._canvas; - c.width = this._width * a; - c.height = this._height * a; - c.style.width = this._width + "px"; - c.style.height = this._height + "px"; + d.prototype._resetCanvas = function() { + var a = window.devicePixelRatio, d = this._canvas; + d.width = this._width * a; + d.height = this._height * a; + d.style.width = this._width + "px"; + d.style.height = this._height + "px"; }; - c.prototype.draw = function() { + d.prototype.draw = function() { }; - c.prototype._almostEq = function(a, c) { + d.prototype._almostEq = function(a, d) { var l; void 0 === l && (l = 10); - return Math.abs(a - c) < 1 / Math.pow(10, l); + return Math.abs(a - d) < 1 / Math.pow(10, l); }; - c.prototype._windowEqRange = function() { + d.prototype._windowEqRange = function() { return this._almostEq(this._windowStart, this._rangeStart) && this._almostEq(this._windowEnd, this._rangeEnd); }; - c.prototype._decimalPlaces = function(a) { + d.prototype._decimalPlaces = function(a) { return(+a).toFixed(10).replace(/^-?\d*\.?|0+$/g, "").length; }; - c.prototype._toPixelsRelative = function(a) { + d.prototype._toPixelsRelative = function(a) { return 0; }; - c.prototype._toPixels = function(a) { + d.prototype._toPixels = function(a) { return 0; }; - c.prototype._toTimeRelative = function(a) { + d.prototype._toTimeRelative = function(a) { return 0; }; - c.prototype._toTime = function(a) { + d.prototype._toTime = function(a) { return 0; }; - c.prototype.onMouseWheel = function(a, s, l) { + d.prototype.onMouseWheel = function(a, r, l) { a = this._toTime(a); - s = this._windowStart; - var e = this._windowEnd, m = e - s; - l = Math.max((c.MIN_WINDOW_LEN - m) / m, l); - this._controller.setWindow(s + (s - a) * l, e + (e - a) * l); + r = this._windowStart; + var c = this._windowEnd, h = c - r; + l = Math.max((d.MIN_WINDOW_LEN - h) / h, l); + this._controller.setWindow(r + (r - a) * l, c + (c - a) * l); this.onHoverEnd(); }; - c.prototype.onMouseDown = function(a, c) { + d.prototype.onMouseDown = function(a, d) { }; - c.prototype.onMouseMove = function(a, c) { + d.prototype.onMouseMove = function(a, d) { }; - c.prototype.onMouseOver = function(a, c) { + d.prototype.onMouseOver = function(a, d) { }; - c.prototype.onMouseOut = function() { + d.prototype.onMouseOut = function() { }; - c.prototype.onDrag = function(a, c, l, e, m, t) { + d.prototype.onDrag = function(a, d, l, c, h, p) { }; - c.prototype.onDragEnd = function(a, c, l, e, m, t) { + d.prototype.onDragEnd = function(a, d, l, c, h, p) { }; - c.prototype.onClick = function(a, c) { + d.prototype.onClick = function(a, d) { }; - c.prototype.onHoverStart = function(a, c) { + d.prototype.onHoverStart = function(a, d) { }; - c.prototype.onHoverEnd = function() { + d.prototype.onHoverEnd = function() { }; - c.DRAGHANDLE_WIDTH = 4; - c.MIN_WINDOW_LEN = .1; - return c; + d.DRAGHANDLE_WIDTH = 4; + d.MIN_WINDOW_LEN = .1; + return d; }(); - a.FlameChartBase = c; - })(c.Profiler || (c.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.FlameChartBase = d; + })(d.Profiler || (d.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.StringUtilities.trimMiddle, h = function(h) { - function v(a, e) { - h.call(this, a); + var r = d.StringUtilities.trimMiddle, k = function(k) { + function t(a, c) { + k.call(this, a); this._textWidth = {}; this._minFrameWidthInPixels = 1; - this._snapshot = e; + this._snapshot = c; this._kindStyle = Object.create(null); } - __extends(v, h); - v.prototype.setSize = function(a, e) { - h.prototype.setSize.call(this, a, e || this._initialized ? 12.5 * this._maxDepth : 100); + __extends(t, k); + t.prototype.setSize = function(a, c) { + k.prototype.setSize.call(this, a, c || this._initialized ? 12.5 * this._maxDepth : 100); }; - v.prototype.initialize = function(a, e) { + t.prototype.initialize = function(a, c) { this._initialized = !0; this._maxDepth = this._snapshot.maxDepth; - this.setRange(a, e); - this.setWindow(a, e, !1); + this.setRange(a, c); + this.setWindow(a, c, !1); this.setSize(this._width, 12.5 * this._maxDepth); }; - v.prototype.destroy = function() { - h.prototype.destroy.call(this); + t.prototype.destroy = function() { + k.prototype.destroy.call(this); this._snapshot = null; }; - v.prototype.draw = function() { - var a = this._context, e = window.devicePixelRatio; - c.ColorStyle.reset(); + t.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio; + d.ColorStyle.reset(); a.save(); - a.scale(e, e); + a.scale(c, c); a.fillStyle = this._controller.theme.bodyBackground(1); a.fillRect(0, 0, this._width, this._height); this._initialized && this._drawChildren(this._snapshot); a.restore(); }; - v.prototype._drawChildren = function(a, e) { - void 0 === e && (e = 0); - var m = a.getChildRange(this._windowStart, this._windowEnd); - if (m) { - for (var c = m.startIndex;c <= m.endIndex;c++) { - var q = a.children[c]; - this._drawFrame(q, e) && this._drawChildren(q, e + 1); + t.prototype._drawChildren = function(a, c) { + void 0 === c && (c = 0); + var h = a.getChildRange(this._windowStart, this._windowEnd); + if (h) { + for (var p = h.startIndex;p <= h.endIndex;p++) { + var s = a.children[p]; + this._drawFrame(s, c) && this._drawChildren(s, c + 1); } } }; - v.prototype._drawFrame = function(a, e) { - var m = this._context, t = this._toPixels(a.startTime), q = this._toPixels(a.endTime), n = q - t; - if (n <= this._minFrameWidthInPixels) { - return m.fillStyle = this._controller.theme.tabToolbar(1), m.fillRect(t, 12.5 * e, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1; + t.prototype._drawFrame = function(a, c) { + var h = this._context, p = this._toPixels(a.startTime), s = this._toPixels(a.endTime), m = s - p; + if (m <= this._minFrameWidthInPixels) { + return h.fillStyle = this._controller.theme.tabToolbar(1), h.fillRect(p, 12.5 * c, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1; } - 0 > t && (q = n + t, t = 0); - var q = q - t, k = this._kindStyle[a.kind.id]; - k || (k = c.ColorStyle.randomStyle(), k = this._kindStyle[a.kind.id] = {bgColor:k, textColor:c.ColorStyle.contrastStyle(k)}); - m.save(); - m.fillStyle = k.bgColor; - m.fillRect(t, 12.5 * e, q, 12); - 12 < n && (n = a.kind.name) && n.length && (n = this._prepareText(m, n, q - 4), n.length && (m.fillStyle = k.textColor, m.textBaseline = "bottom", m.fillText(n, t + 2, 12.5 * (e + 1) - 1))); - m.restore(); + 0 > p && (s = m + p, p = 0); + var s = s - p, g = this._kindStyle[a.kind.id]; + g || (g = d.ColorStyle.randomStyle(), g = this._kindStyle[a.kind.id] = {bgColor:g, textColor:d.ColorStyle.contrastStyle(g)}); + h.save(); + h.fillStyle = g.bgColor; + h.fillRect(p, 12.5 * c, s, 12); + 12 < m && (m = a.kind.name) && m.length && (m = this._prepareText(h, m, s - 4), m.length && (h.fillStyle = g.textColor, h.textBaseline = "bottom", h.fillText(m, p + 2, 12.5 * (c + 1) - 1))); + h.restore(); return!0; }; - v.prototype._prepareText = function(a, e, m) { - var c = this._measureWidth(a, e); - if (m > c) { - return e; + t.prototype._prepareText = function(a, c, h) { + var p = this._measureWidth(a, c); + if (h > p) { + return c; } - for (var c = 3, q = e.length;c < q;) { - var n = c + q >> 1; - this._measureWidth(a, s(e, n)) < m ? c = n + 1 : q = n; + for (var p = 3, s = c.length;p < s;) { + var m = p + s >> 1; + this._measureWidth(a, r(c, m)) < h ? p = m + 1 : s = m; } - e = s(e, q - 1); - c = this._measureWidth(a, e); - return c <= m ? e : ""; + c = r(c, s - 1); + p = this._measureWidth(a, c); + return p <= h ? c : ""; }; - v.prototype._measureWidth = function(a, e) { - var m = this._textWidth[e]; - m || (m = a.measureText(e).width, this._textWidth[e] = m); - return m; + t.prototype._measureWidth = function(a, c) { + var h = this._textWidth[c]; + h || (h = a.measureText(c).width, this._textWidth[c] = h); + return h; }; - v.prototype._toPixelsRelative = function(a) { + t.prototype._toPixelsRelative = function(a) { return a * this._width / (this._windowEnd - this._windowStart); }; - v.prototype._toPixels = function(a) { + t.prototype._toPixels = function(a) { return this._toPixelsRelative(a - this._windowStart); }; - v.prototype._toTimeRelative = function(a) { + t.prototype._toTimeRelative = function(a) { return a * (this._windowEnd - this._windowStart) / this._width; }; - v.prototype._toTime = function(a) { + t.prototype._toTime = function(a) { return this._toTimeRelative(a) + this._windowStart; }; - v.prototype._getFrameAtPosition = function(a, e) { - var m = 1 + e / 12.5 | 0, c = this._snapshot.query(this._toTime(a)); - if (c && c.depth >= m) { - for (;c && c.depth > m;) { - c = c.parent; + t.prototype._getFrameAtPosition = function(a, c) { + var h = 1 + c / 12.5 | 0, p = this._snapshot.query(this._toTime(a)); + if (p && p.depth >= h) { + for (;p && p.depth > h;) { + p = p.parent; } - return c; + return p; } return null; }; - v.prototype.onMouseDown = function(l, e) { + t.prototype.onMouseDown = function(l, c) { this._windowEqRange() || (this._mouseController.updateCursor(a.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1}); }; - v.prototype.onMouseMove = function(a, e) { + t.prototype.onMouseMove = function(a, c) { }; - v.prototype.onMouseOver = function(a, e) { + t.prototype.onMouseOver = function(a, c) { }; - v.prototype.onMouseOut = function() { + t.prototype.onMouseOut = function() { }; - v.prototype.onDrag = function(a, e, m, c, q, n) { + t.prototype.onDrag = function(a, c, h, p, s, m) { if (a = this._dragInfo) { - q = this._toTimeRelative(-q), this._controller.setWindow(a.windowStartInitial + q, a.windowEndInitial + q); + s = this._toTimeRelative(-s), this._controller.setWindow(a.windowStartInitial + s, a.windowEndInitial + s); } }; - v.prototype.onDragEnd = function(l, e, m, c, q, n) { + t.prototype.onDragEnd = function(l, c, h, p, s, m) { this._dragInfo = null; this._mouseController.updateCursor(a.MouseCursor.DEFAULT); }; - v.prototype.onClick = function(l, e) { + t.prototype.onClick = function(l, c) { this._dragInfo = null; this._mouseController.updateCursor(a.MouseCursor.DEFAULT); }; - v.prototype.onHoverStart = function(a, e) { - var m = this._getFrameAtPosition(a, e); - m && (this._hoveredFrame = m, this._controller.showTooltip(this, m, a, e)); + t.prototype.onHoverStart = function(a, c) { + var h = this._getFrameAtPosition(a, c); + h && (this._hoveredFrame = h, this._controller.showTooltip(this, h, a, c)); }; - v.prototype.onHoverEnd = function() { + t.prototype.onHoverEnd = function() { this._hoveredFrame && (this._hoveredFrame = null, this._controller.hideTooltip()); }; - v.prototype.getStatistics = function(a) { - var e = this._snapshot; - e.statistics || e.calculateStatistics(); - return e.statistics[a.id]; + t.prototype.getStatistics = function(a) { + var c = this._snapshot; + c.statistics || c.calculateStatistics(); + return c.statistics[a.id]; }; - return v; + return t; }(a.FlameChartBase); - a.FlameChart = h; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.FlameChart = k; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.NumberUtilities.clamp; + var r = d.NumberUtilities.clamp; (function(a) { a[a.OVERLAY = 0] = "OVERLAY"; a[a.STACK = 1] = "STACK"; a[a.UNION = 2] = "UNION"; })(a.FlameChartOverviewMode || (a.FlameChartOverviewMode = {})); - var h = function(c) { - function h(a, e) { - void 0 === e && (e = 1); - this._mode = e; + var k = function(d) { + function k(a, c) { + void 0 === c && (c = 1); + this._mode = c; this._overviewCanvasDirty = !0; this._overviewCanvas = document.createElement("canvas"); this._overviewContext = this._overviewCanvas.getContext("2d"); - c.call(this, a); + d.call(this, a); } - __extends(h, c); - h.prototype.setSize = function(a, e) { - c.prototype.setSize.call(this, a, e || 64); + __extends(k, d); + k.prototype.setSize = function(a, c) { + d.prototype.setSize.call(this, a, c || 64); }; - Object.defineProperty(h.prototype, "mode", {set:function(a) { + Object.defineProperty(k.prototype, "mode", {set:function(a) { this._mode = a; this.draw(); }, enumerable:!0, configurable:!0}); - h.prototype._resetCanvas = function() { - c.prototype._resetCanvas.call(this); + k.prototype._resetCanvas = function() { + d.prototype._resetCanvas.call(this); this._overviewCanvas.width = this._canvas.width; this._overviewCanvas.height = this._canvas.height; this._overviewCanvasDirty = !0; }; - h.prototype.draw = function() { - var a = this._context, e = window.devicePixelRatio, m = this._width, c = this._height; + k.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio, h = this._width, p = this._height; a.save(); - a.scale(e, e); + a.scale(c, c); a.fillStyle = this._controller.theme.bodyBackground(1); - a.fillRect(0, 0, m, c); + a.fillRect(0, 0, h, p); a.restore(); this._initialized && (this._overviewCanvasDirty && (this._drawChart(), this._overviewCanvasDirty = !1), a.drawImage(this._overviewCanvas, 0, 0), this._drawSelection()); }; - h.prototype._drawSelection = function() { - var a = this._context, e = this._height, m = window.devicePixelRatio, c = this._selection ? this._selection.left : this._toPixels(this._windowStart), q = this._selection ? this._selection.right : this._toPixels(this._windowEnd), n = this._controller.theme; + k.prototype._drawSelection = function() { + var a = this._context, c = this._height, h = window.devicePixelRatio, p = this._selection ? this._selection.left : this._toPixels(this._windowStart), s = this._selection ? this._selection.right : this._toPixels(this._windowEnd), m = this._controller.theme; a.save(); - a.scale(m, m); - this._selection ? (a.fillStyle = n.selectionText(.15), a.fillRect(c, 1, q - c, e - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(c + .5, 0, q - c - 1, 4), a.fillRect(c + .5, e - 4, q - c - 1, 4)) : (a.fillStyle = n.bodyBackground(.4), a.fillRect(0, 1, c, e - 1), a.fillRect(q, 1, this._width, e - 1)); + a.scale(h, h); + this._selection ? (a.fillStyle = m.selectionText(.15), a.fillRect(p, 1, s - p, c - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(p + .5, 0, s - p - 1, 4), a.fillRect(p + .5, c - 4, s - p - 1, 4)) : (a.fillStyle = m.bodyBackground(.4), a.fillRect(0, 1, p, c - 1), a.fillRect(s, 1, this._width, c - 1)); a.beginPath(); - a.moveTo(c, 0); - a.lineTo(c, e); - a.moveTo(q, 0); - a.lineTo(q, e); + a.moveTo(p, 0); + a.lineTo(p, c); + a.moveTo(s, 0); + a.lineTo(s, c); a.lineWidth = .5; - a.strokeStyle = n.foregroundTextGrey(1); + a.strokeStyle = m.foregroundTextGrey(1); a.stroke(); - e = Math.abs((this._selection ? this._toTime(this._selection.right) : this._windowEnd) - (this._selection ? this._toTime(this._selection.left) : this._windowStart)); - a.fillStyle = n.selectionText(.5); + c = Math.abs((this._selection ? this._toTime(this._selection.right) : this._windowEnd) - (this._selection ? this._toTime(this._selection.left) : this._windowStart)); + a.fillStyle = m.selectionText(.5); a.font = "8px sans-serif"; a.textBaseline = "alphabetic"; a.textAlign = "end"; - a.fillText(e.toFixed(2), Math.min(c, q) - 4, 10); - a.fillText((e / 60).toFixed(2), Math.min(c, q) - 4, 20); + a.fillText(c.toFixed(2), Math.min(p, s) - 4, 10); + a.fillText((c / 60).toFixed(2), Math.min(p, s) - 4, 20); a.restore(); }; - h.prototype._drawChart = function() { - var a = window.devicePixelRatio, e = this._height, m = this._controller.activeProfile, c = 4 * this._width, q = m.totalTime / c, n = this._overviewContext, k = this._controller.theme.blueHighlight(1); - n.save(); - n.translate(0, a * e); - var f = -a * e / (m.maxDepth - 1); - n.scale(a / 4, f); - n.clearRect(0, 0, c, m.maxDepth - 1); - 1 == this._mode && n.scale(1, 1 / m.snapshotCount); - for (var d = 0, b = m.snapshotCount;d < b;d++) { - var g = m.getSnapshotAt(d); - if (g) { - var r = null, w = 0; - n.beginPath(); - n.moveTo(0, 0); - for (var z = 0;z < c;z++) { - w = m.startTime + z * q, w = (r = r ? r.queryNext(w) : g.query(w)) ? r.getDepth() - 1 : 0, n.lineTo(z, w); + k.prototype._drawChart = function() { + var a = window.devicePixelRatio, c = this._height, h = this._controller.activeProfile, p = 4 * this._width, s = h.totalTime / p, m = this._overviewContext, g = this._controller.theme.blueHighlight(1); + m.save(); + m.translate(0, a * c); + var f = -a * c / (h.maxDepth - 1); + m.scale(a / 4, f); + m.clearRect(0, 0, p, h.maxDepth - 1); + 1 == this._mode && m.scale(1, 1 / h.snapshotCount); + for (var b = 0, e = h.snapshotCount;b < e;b++) { + var q = h.getSnapshotAt(b); + if (q) { + var n = null, x = 0; + m.beginPath(); + m.moveTo(0, 0); + for (var d = 0;d < p;d++) { + x = h.startTime + d * s, x = (n = n ? n.queryNext(x) : q.query(x)) ? n.getDepth() - 1 : 0, m.lineTo(d, x); } - n.lineTo(z, 0); - n.fillStyle = k; - n.fill(); - 1 == this._mode && n.translate(0, -e * a / f); + m.lineTo(d, 0); + m.fillStyle = g; + m.fill(); + 1 == this._mode && m.translate(0, -c * a / f); } } - n.restore(); + m.restore(); }; - h.prototype._toPixelsRelative = function(a) { + k.prototype._toPixelsRelative = function(a) { return a * this._width / (this._rangeEnd - this._rangeStart); }; - h.prototype._toPixels = function(a) { + k.prototype._toPixels = function(a) { return this._toPixelsRelative(a - this._rangeStart); }; - h.prototype._toTimeRelative = function(a) { + k.prototype._toTimeRelative = function(a) { return a * (this._rangeEnd - this._rangeStart) / this._width; }; - h.prototype._toTime = function(a) { + k.prototype._toTime = function(a) { return this._toTimeRelative(a) + this._rangeStart; }; - h.prototype._getDragTargetUnderCursor = function(c, e) { - if (0 <= e && e < this._height) { - var m = this._toPixels(this._windowStart), t = this._toPixels(this._windowEnd), q = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, n = c >= m - q && c <= m + q, k = c >= t - q && c <= t + q; - if (n && k) { + k.prototype._getDragTargetUnderCursor = function(l, c) { + if (0 <= c && c < this._height) { + var h = this._toPixels(this._windowStart), p = this._toPixels(this._windowEnd), s = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, m = l >= h - s && l <= h + s, g = l >= p - s && l <= p + s; + if (m && g) { return 4; } - if (n) { + if (m) { return 2; } - if (k) { + if (g) { return 3; } - if (!this._windowEqRange() && c > m + q && c < t - q) { + if (!this._windowEqRange() && l > h + s && l < p - s) { return 1; } } return 0; }; - h.prototype.onMouseDown = function(c, e) { - var m = this._getDragTargetUnderCursor(c, e); - 0 === m ? (this._selection = {left:c, right:c}, this.draw()) : (1 === m && this._mouseController.updateCursor(a.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:m}); + k.prototype.onMouseDown = function(l, c) { + var h = this._getDragTargetUnderCursor(l, c); + 0 === h ? (this._selection = {left:l, right:l}, this.draw()) : (1 === h && this._mouseController.updateCursor(a.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:h}); }; - h.prototype.onMouseMove = function(c, e) { - var m = a.MouseCursor.DEFAULT, t = this._getDragTargetUnderCursor(c, e); - 0 === t || this._selection || (m = 1 === t ? a.MouseCursor.GRAB : a.MouseCursor.EW_RESIZE); - this._mouseController.updateCursor(m); + k.prototype.onMouseMove = function(l, c) { + var h = a.MouseCursor.DEFAULT, p = this._getDragTargetUnderCursor(l, c); + 0 === p || this._selection || (h = 1 === p ? a.MouseCursor.GRAB : a.MouseCursor.EW_RESIZE); + this._mouseController.updateCursor(h); }; - h.prototype.onMouseOver = function(a, e) { - this.onMouseMove(a, e); + k.prototype.onMouseOver = function(a, c) { + this.onMouseMove(a, c); }; - h.prototype.onMouseOut = function() { + k.prototype.onMouseOut = function() { this._mouseController.updateCursor(a.MouseCursor.DEFAULT); }; - h.prototype.onDrag = function(c, e, m, t, q, n) { + k.prototype.onDrag = function(l, c, h, p, s, m) { if (this._selection) { - this._selection = {left:c, right:s(m, 0, this._width - 1)}, this.draw(); + this._selection = {left:l, right:r(h, 0, this._width - 1)}, this.draw(); } else { - c = this._dragInfo; - if (4 === c.target) { - if (0 !== q) { - c.target = 0 > q ? 2 : 3; + l = this._dragInfo; + if (4 === l.target) { + if (0 !== s) { + l.target = 0 > s ? 2 : 3; } else { return; } } - e = this._windowStart; - m = this._windowEnd; - q = this._toTimeRelative(q); - switch(c.target) { + c = this._windowStart; + h = this._windowEnd; + s = this._toTimeRelative(s); + switch(l.target) { case 1: - e = c.windowStartInitial + q; - m = c.windowEndInitial + q; + c = l.windowStartInitial + s; + h = l.windowEndInitial + s; break; case 2: - e = s(c.windowStartInitial + q, this._rangeStart, m - a.FlameChartBase.MIN_WINDOW_LEN); + c = r(l.windowStartInitial + s, this._rangeStart, h - a.FlameChartBase.MIN_WINDOW_LEN); break; case 3: - m = s(c.windowEndInitial + q, e + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); + h = r(l.windowEndInitial + s, c + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); break; default: return; } - this._controller.setWindow(e, m); + this._controller.setWindow(c, h); } }; - h.prototype.onDragEnd = function(a, e, m, c, q, n) { - this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(m))); + k.prototype.onDragEnd = function(a, c, h, p, s, m) { + this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(h))); this._dragInfo = null; - this.onMouseMove(m, c); + this.onMouseMove(h, p); }; - h.prototype.onClick = function(a, e) { + k.prototype.onClick = function(a, c) { this._selection = this._dragInfo = null; - this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, e) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, e)); + this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, c) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, c)); this.draw(); }; - h.prototype.onHoverStart = function(a, e) { + k.prototype.onHoverStart = function(a, c) { }; - h.prototype.onHoverEnd = function() { + k.prototype.onHoverEnd = function() { }; - return h; + return k; }(a.FlameChartBase); - a.FlameChartOverview = h; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.FlameChartOverview = k; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.NumberUtilities.clamp; + var r = d.NumberUtilities.clamp; (function(a) { a[a.OVERVIEW = 0] = "OVERVIEW"; a[a.CHART = 1] = "CHART"; })(a.FlameChartHeaderType || (a.FlameChartHeaderType = {})); - var h = function(c) { - function h(a, e) { - this._type = e; - c.call(this, a); + var k = function(d) { + function k(a, c) { + this._type = c; + d.call(this, a); } - __extends(h, c); - h.prototype.draw = function() { - var a = this._context, e = window.devicePixelRatio, m = this._width, c = this._height; + __extends(k, d); + k.prototype.draw = function() { + var a = this._context, c = window.devicePixelRatio, h = this._width, p = this._height; a.save(); - a.scale(e, e); + a.scale(c, c); a.fillStyle = this._controller.theme.tabToolbar(1); - a.fillRect(0, 0, m, c); - this._initialized && (0 == this._type ? (e = this._toPixels(this._windowStart), m = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(e, 0, m - e, c), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(e), this._drawDragHandle(m)) : this._drawLabels(this._windowStart, this._windowEnd)); + a.fillRect(0, 0, h, p); + this._initialized && (0 == this._type ? (c = this._toPixels(this._windowStart), h = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(c, 0, h - c, p), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(c), this._drawDragHandle(h)) : this._drawLabels(this._windowStart, this._windowEnd)); a.restore(); }; - h.prototype._drawLabels = function(a, e) { - var m = this._context, c = this._calculateTickInterval(a, e), q = Math.ceil(a / c) * c, n = 500 <= c, k = n ? 1E3 : 1, f = this._decimalPlaces(c / k), n = n ? "s" : "ms", d = this._toPixels(q), b = this._height / 2, g = this._controller.theme; - m.lineWidth = 1; - m.strokeStyle = g.contentTextDarkGrey(.5); - m.fillStyle = g.contentTextDarkGrey(1); - m.textAlign = "right"; - m.textBaseline = "middle"; - m.font = "11px sans-serif"; - for (g = this._width + h.TICK_MAX_WIDTH;d < g;) { - m.fillText((q / k).toFixed(f) + " " + n, d - 7, b + 1), m.beginPath(), m.moveTo(d, 0), m.lineTo(d, this._height + 1), m.closePath(), m.stroke(), q += c, d = this._toPixels(q); + k.prototype._drawLabels = function(a, c) { + var h = this._context, p = this._calculateTickInterval(a, c), s = Math.ceil(a / p) * p, m = 500 <= p, g = m ? 1E3 : 1, f = this._decimalPlaces(p / g), m = m ? "s" : "ms", b = this._toPixels(s), e = this._height / 2, q = this._controller.theme; + h.lineWidth = 1; + h.strokeStyle = q.contentTextDarkGrey(.5); + h.fillStyle = q.contentTextDarkGrey(1); + h.textAlign = "right"; + h.textBaseline = "middle"; + h.font = "11px sans-serif"; + for (q = this._width + k.TICK_MAX_WIDTH;b < q;) { + h.fillText((s / g).toFixed(f) + " " + m, b - 7, e + 1), h.beginPath(), h.moveTo(b, 0), h.lineTo(b, this._height + 1), h.closePath(), h.stroke(), s += p, b = this._toPixels(s); } }; - h.prototype._calculateTickInterval = function(a, e) { - var m = (e - a) / (this._width / h.TICK_MAX_WIDTH), c = Math.pow(10, Math.floor(Math.log(m) / Math.LN10)), m = m / c; - return 5 < m ? 10 * c : 2 < m ? 5 * c : 1 < m ? 2 * c : c; + k.prototype._calculateTickInterval = function(a, c) { + var h = (c - a) / (this._width / k.TICK_MAX_WIDTH), p = Math.pow(10, Math.floor(Math.log(h) / Math.LN10)), h = h / p; + return 5 < h ? 10 * p : 2 < h ? 5 * p : 1 < h ? 2 * p : p; }; - h.prototype._drawDragHandle = function(c) { - var e = this._context; - e.lineWidth = 2; - e.strokeStyle = this._controller.theme.bodyBackground(1); - e.fillStyle = this._controller.theme.foregroundTextGrey(.7); - this._drawRoundedRect(e, c - a.FlameChartBase.DRAGHANDLE_WIDTH / 2, a.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2); + k.prototype._drawDragHandle = function(l) { + var c = this._context; + c.lineWidth = 2; + c.strokeStyle = this._controller.theme.bodyBackground(1); + c.fillStyle = this._controller.theme.foregroundTextGrey(.7); + this._drawRoundedRect(c, l - a.FlameChartBase.DRAGHANDLE_WIDTH / 2, a.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2); }; - h.prototype._drawRoundedRect = function(a, e, m, c) { - var q, n = !0; - void 0 === n && (n = !0); - void 0 === q && (q = !0); + k.prototype._drawRoundedRect = function(a, c, h, p) { + var s, m = !0; + void 0 === m && (m = !0); + void 0 === s && (s = !0); a.beginPath(); - a.moveTo(e + 2, 1); - a.lineTo(e + m - 2, 1); - a.quadraticCurveTo(e + m, 1, e + m, 3); - a.lineTo(e + m, 1 + c - 2); - a.quadraticCurveTo(e + m, 1 + c, e + m - 2, 1 + c); - a.lineTo(e + 2, 1 + c); - a.quadraticCurveTo(e, 1 + c, e, 1 + c - 2); - a.lineTo(e, 3); - a.quadraticCurveTo(e, 1, e + 2, 1); + a.moveTo(c + 2, 1); + a.lineTo(c + h - 2, 1); + a.quadraticCurveTo(c + h, 1, c + h, 3); + a.lineTo(c + h, 1 + p - 2); + a.quadraticCurveTo(c + h, 1 + p, c + h - 2, 1 + p); + a.lineTo(c + 2, 1 + p); + a.quadraticCurveTo(c, 1 + p, c, 1 + p - 2); + a.lineTo(c, 3); + a.quadraticCurveTo(c, 1, c + 2, 1); a.closePath(); - n && a.stroke(); - q && a.fill(); + m && a.stroke(); + s && a.fill(); }; - h.prototype._toPixelsRelative = function(a) { + k.prototype._toPixelsRelative = function(a) { return a * this._width / (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart); }; - h.prototype._toPixels = function(a) { + k.prototype._toPixels = function(a) { return this._toPixelsRelative(a - (0 === this._type ? this._rangeStart : this._windowStart)); }; - h.prototype._toTimeRelative = function(a) { + k.prototype._toTimeRelative = function(a) { return a * (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart) / this._width; }; - h.prototype._toTime = function(a) { + k.prototype._toTime = function(a) { return this._toTimeRelative(a) + (0 === this._type ? this._rangeStart : this._windowStart); }; - h.prototype._getDragTargetUnderCursor = function(c, e) { - if (0 <= e && e < this._height) { + k.prototype._getDragTargetUnderCursor = function(l, c) { + if (0 <= c && c < this._height) { if (0 === this._type) { - var m = this._toPixels(this._windowStart), t = this._toPixels(this._windowEnd), q = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, m = c >= m - q && c <= m + q, t = c >= t - q && c <= t + q; - if (m && t) { + var h = this._toPixels(this._windowStart), p = this._toPixels(this._windowEnd), s = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, h = l >= h - s && l <= h + s, p = l >= p - s && l <= p + s; + if (h && p) { return 4; } - if (m) { + if (h) { return 2; } - if (t) { + if (p) { return 3; } } @@ -5811,134 +6178,134 @@ __extends = this.__extends || function(c, h) { } return 0; }; - h.prototype.onMouseDown = function(c, e) { - var m = this._getDragTargetUnderCursor(c, e); - 1 === m && this._mouseController.updateCursor(a.MouseCursor.GRABBING); - this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:m}; + k.prototype.onMouseDown = function(l, c) { + var h = this._getDragTargetUnderCursor(l, c); + 1 === h && this._mouseController.updateCursor(a.MouseCursor.GRABBING); + this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:h}; }; - h.prototype.onMouseMove = function(c, e) { - var m = a.MouseCursor.DEFAULT, t = this._getDragTargetUnderCursor(c, e); - 0 !== t && (1 !== t ? m = a.MouseCursor.EW_RESIZE : 1 !== t || this._windowEqRange() || (m = a.MouseCursor.GRAB)); - this._mouseController.updateCursor(m); + k.prototype.onMouseMove = function(l, c) { + var h = a.MouseCursor.DEFAULT, p = this._getDragTargetUnderCursor(l, c); + 0 !== p && (1 !== p ? h = a.MouseCursor.EW_RESIZE : 1 !== p || this._windowEqRange() || (h = a.MouseCursor.GRAB)); + this._mouseController.updateCursor(h); }; - h.prototype.onMouseOver = function(a, e) { - this.onMouseMove(a, e); + k.prototype.onMouseOver = function(a, c) { + this.onMouseMove(a, c); }; - h.prototype.onMouseOut = function() { + k.prototype.onMouseOut = function() { this._mouseController.updateCursor(a.MouseCursor.DEFAULT); }; - h.prototype.onDrag = function(c, e, m, t, q, n) { - c = this._dragInfo; - if (4 === c.target) { - if (0 !== q) { - c.target = 0 > q ? 2 : 3; + k.prototype.onDrag = function(l, c, h, p, s, m) { + l = this._dragInfo; + if (4 === l.target) { + if (0 !== s) { + l.target = 0 > s ? 2 : 3; } else { return; } } - e = this._windowStart; - m = this._windowEnd; - q = this._toTimeRelative(q); - switch(c.target) { + c = this._windowStart; + h = this._windowEnd; + s = this._toTimeRelative(s); + switch(l.target) { case 1: - m = 0 === this._type ? 1 : -1; - e = c.windowStartInitial + m * q; - m = c.windowEndInitial + m * q; + h = 0 === this._type ? 1 : -1; + c = l.windowStartInitial + h * s; + h = l.windowEndInitial + h * s; break; case 2: - e = s(c.windowStartInitial + q, this._rangeStart, m - a.FlameChartBase.MIN_WINDOW_LEN); + c = r(l.windowStartInitial + s, this._rangeStart, h - a.FlameChartBase.MIN_WINDOW_LEN); break; case 3: - m = s(c.windowEndInitial + q, e + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); + h = r(l.windowEndInitial + s, c + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd); break; default: return; } - this._controller.setWindow(e, m); + this._controller.setWindow(c, h); }; - h.prototype.onDragEnd = function(a, e, m, c, q, n) { + k.prototype.onDragEnd = function(a, c, h, p, s, m) { this._dragInfo = null; - this.onMouseMove(m, c); + this.onMouseMove(h, p); }; - h.prototype.onClick = function(c, e) { + k.prototype.onClick = function(l, c) { 1 === this._dragInfo.target && this._mouseController.updateCursor(a.MouseCursor.GRAB); }; - h.prototype.onHoverStart = function(a, e) { + k.prototype.onHoverStart = function(a, c) { }; - h.prototype.onHoverEnd = function() { + k.prototype.onHoverEnd = function() { }; - h.TICK_MAX_WIDTH = 75; - return h; + k.TICK_MAX_WIDTH = 75; + return k; }(a.FlameChartBase); - a.FlameChartHeader = h; - })(h.Profiler || (h.Profiler = {})); - })(c.Tools || (c.Tools = {})); + a.FlameChartHeader = k; + })(k.Profiler || (k.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - var c = function() { - function a(c, e, m, t, q) { - this.pageLoaded = c; - this.threadsTotal = e; - this.threadsLoaded = m; - this.threadFilesTotal = t; - this.threadFilesLoaded = q; + var d = function() { + function a(l, c, h, p, s) { + this.pageLoaded = l; + this.threadsTotal = c; + this.threadsLoaded = h; + this.threadFilesTotal = p; + this.threadFilesLoaded = s; } a.prototype.toString = function() { - return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, e, m) { + return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, c, h) { return a + ":" + this[a]; }, this).join(", ") + "]"; }; return a; }(); - a.TraceLoggerProgressInfo = c; - var h = function() { - function h(a) { + a.TraceLoggerProgressInfo = d; + var k = function() { + function k(a) { this._baseUrl = a; this._threads = []; this._progressInfo = null; } - h.prototype.loadPage = function(a, e, m) { + k.prototype.loadPage = function(a, c, h) { this._threads = []; - this._pageLoadCallback = e; - this._pageLoadProgressCallback = m; - this._progressInfo = new c(!1, 0, 0, 0, 0); + this._pageLoadCallback = c; + this._pageLoadProgressCallback = h; + this._progressInfo = new d(!1, 0, 0, 0, 0); this._loadData([a], this._onLoadPage.bind(this)); }; - Object.defineProperty(h.prototype, "buffers", {get:function() { - for (var a = [], e = 0, m = this._threads.length;e < m;e++) { - a.push(this._threads[e].buffer); + Object.defineProperty(k.prototype, "buffers", {get:function() { + for (var a = [], c = 0, h = this._threads.length;c < h;c++) { + a.push(this._threads[c].buffer); } return a; }, enumerable:!0, configurable:!0}); - h.prototype._onProgress = function() { + k.prototype._onProgress = function() { this._pageLoadProgressCallback && this._pageLoadProgressCallback.call(this, this._progressInfo); }; - h.prototype._onLoadPage = function(c) { - if (c && 1 == c.length) { - var e = this, m = 0; - c = c[0]; - var t = c.length; - this._threads = Array(t); + k.prototype._onLoadPage = function(l) { + if (l && 1 == l.length) { + var c = this, h = 0; + l = l[0]; + var p = l.length; + this._threads = Array(p); this._progressInfo.pageLoaded = !0; - this._progressInfo.threadsTotal = t; - for (var q = 0;q < c.length;q++) { - var n = c[q], k = [n.dict, n.tree]; - n.corrections && k.push(n.corrections); - this._progressInfo.threadFilesTotal += k.length; - this._loadData(k, function(f) { - return function(d) { - d && (d = new a.Thread(d), d.buffer.name = "Thread " + f, e._threads[f] = d); - m++; - e._progressInfo.threadsLoaded++; - e._onProgress(); - m === t && e._pageLoadCallback.call(e, null, e._threads); + this._progressInfo.threadsTotal = p; + for (var s = 0;s < l.length;s++) { + var m = l[s], g = [m.dict, m.tree]; + m.corrections && g.push(m.corrections); + this._progressInfo.threadFilesTotal += g.length; + this._loadData(g, function(f) { + return function(b) { + b && (b = new a.Thread(b), b.buffer.name = "Thread " + f, c._threads[f] = b); + h++; + c._progressInfo.threadsLoaded++; + c._onProgress(); + h === p && c._pageLoadCallback.call(c, null, c._threads); }; - }(q), function(a) { - e._progressInfo.threadFilesLoaded++; - e._onProgress(); + }(s), function(f) { + c._progressInfo.threadFilesLoaded++; + c._onProgress(); }); } this._onProgress(); @@ -5946,49 +6313,49 @@ __extends = this.__extends || function(c, h) { this._pageLoadCallback.call(this, "Error loading page.", null); } }; - h.prototype._loadData = function(a, e, m) { - var c = 0, q = 0, n = a.length, k = []; - k.length = n; - for (var f = 0;f < n;f++) { - var d = this._baseUrl + a[f], b = new XMLHttpRequest, g = /\.tl$/i.test(d) ? "arraybuffer" : "json"; - b.open("GET", d, !0); - b.responseType = g; - b.onload = function(b, d) { - return function(g) { - if ("json" === d) { - if (g = this.response, "string" === typeof g) { + k.prototype._loadData = function(a, c, h) { + var p = 0, s = 0, m = a.length, g = []; + g.length = m; + for (var f = 0;f < m;f++) { + var b = this._baseUrl + a[f], e = new XMLHttpRequest, q = /\.tl$/i.test(b) ? "arraybuffer" : "json"; + e.open("GET", b, !0); + e.responseType = q; + e.onload = function(b, e) { + return function(f) { + if ("json" === e) { + if (f = this.response, "string" === typeof f) { try { - g = JSON.parse(g), k[b] = g; + f = JSON.parse(f), g[b] = f; } catch (a) { - q++; + s++; } } else { - k[b] = g; + g[b] = f; } } else { - k[b] = this.response; + g[b] = this.response; } - ++c; - m && m(c); - c === n && e(k); + ++p; + h && h(p); + p === m && c(g); }; - }(f, g); - b.send(); + }(f, q); + e.send(); } }; - h.colors = "#0044ff #8c4b00 #cc5c33 #ff80c4 #ffbfd9 #ff8800 #8c5e00 #adcc33 #b380ff #bfd9ff #ffaa00 #8c0038 #bf8f30 #f780ff #cc99c9 #aaff00 #000073 #452699 #cc8166 #cca799 #000066 #992626 #cc6666 #ccc299 #ff6600 #526600 #992663 #cc6681 #99ccc2 #ff0066 #520066 #269973 #61994d #739699 #ffcc00 #006629 #269199 #94994d #738299 #ff0000 #590000 #234d8c #8c6246 #7d7399 #ee00ff #00474d #8c2385 #8c7546 #7c8c69 #eeff00 #4d003d #662e1a #62468c #8c6969 #6600ff #4c2900 #1a6657 #8c464f #8c6981 #44ff00 #401100 #1a2466 #663355 #567365 #d90074 #403300 #101d40 #59562d #66614d #cc0000 #002b40 #234010 #4c2626 #4d5e66 #00a3cc #400011 #231040 #4c3626 #464359 #0000bf #331b00 #80e6ff #311a33 #4d3939 #a69b00 #003329 #80ffb2 #331a20 #40303d #00a658 #40ffd9 #ffc480 #ffe1bf #332b26 #8c2500 #9933cc #80fff6 #ffbfbf #303326 #005e8c #33cc47 #b2ff80 #c8bfff #263332 #00708c #cc33ad #ffe680 #f2ffbf #262a33 #388c00 #335ccc #8091ff #bfffd9".split(" "); - return h; + k.colors = "#0044ff #8c4b00 #cc5c33 #ff80c4 #ffbfd9 #ff8800 #8c5e00 #adcc33 #b380ff #bfd9ff #ffaa00 #8c0038 #bf8f30 #f780ff #cc99c9 #aaff00 #000073 #452699 #cc8166 #cca799 #000066 #992626 #cc6666 #ccc299 #ff6600 #526600 #992663 #cc6681 #99ccc2 #ff0066 #520066 #269973 #61994d #739699 #ffcc00 #006629 #269199 #94994d #738299 #ff0000 #590000 #234d8c #8c6246 #7d7399 #ee00ff #00474d #8c2385 #8c7546 #7c8c69 #eeff00 #4d003d #662e1a #62468c #8c6969 #6600ff #4c2900 #1a6657 #8c464f #8c6981 #44ff00 #401100 #1a2466 #663355 #567365 #d90074 #403300 #101d40 #59562d #66614d #cc0000 #002b40 #234010 #4c2626 #4d5e66 #00a3cc #400011 #231040 #4c3626 #464359 #0000bf #331b00 #80e6ff #311a33 #4d3939 #a69b00 #003329 #80ffb2 #331a20 #40303d #00a658 #40ffd9 #ffc480 #ffe1bf #332b26 #8c2500 #9933cc #80fff6 #ffbfbf #303326 #005e8c #33cc47 #b2ff80 #c8bfff #263332 #00708c #cc33ad #ffe680 #f2ffbf #262a33 #388c00 #335ccc #8091ff #bfffd9".split(" "); + return k; }(); - a.TraceLogger = h; + a.TraceLogger = k; })(a.TraceLogger || (a.TraceLogger = {})); - })(c.Profiler || (c.Profiler = {})); - })(c.Tools || (c.Tools = {})); + })(d.Profiler || (d.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - var h; + (function(d) { + var k; (function(a) { a[a.START_HI = 0] = "START_HI"; a[a.START_LO = 4] = "START_LO"; @@ -5996,36 +6363,36 @@ __extends = this.__extends || function(c, h) { a[a.STOP_LO = 12] = "STOP_LO"; a[a.TEXTID = 16] = "TEXTID"; a[a.NEXTID = 20] = "NEXTID"; - })(h || (h = {})); - h = function() { - function c(s) { - 2 <= s.length && (this._text = s[0], this._data = new DataView(s[1]), this._buffer = new a.TimelineBuffer, this._walkTree(0)); + })(k || (k = {})); + k = function() { + function d(r) { + 2 <= r.length && (this._text = r[0], this._data = new DataView(r[1]), this._buffer = new a.TimelineBuffer, this._walkTree(0)); } - Object.defineProperty(c.prototype, "buffer", {get:function() { + Object.defineProperty(d.prototype, "buffer", {get:function() { return this._buffer; }, enumerable:!0, configurable:!0}); - c.prototype._walkTree = function(a) { - var l = this._data, e = this._buffer; + d.prototype._walkTree = function(a) { + var l = this._data, c = this._buffer; do { - var m = a * c.ITEM_SIZE, t = 4294967295 * l.getUint32(m + 0) + l.getUint32(m + 4), q = 4294967295 * l.getUint32(m + 8) + l.getUint32(m + 12), n = l.getUint32(m + 16), m = l.getUint32(m + 20), k = 1 === (n & 1), n = n >>> 1, n = this._text[n]; - e.enter(n, null, t / 1E6); - k && this._walkTree(a + 1); - e.leave(n, null, q / 1E6); - a = m; + var h = a * d.ITEM_SIZE, p = 4294967295 * l.getUint32(h + 0) + l.getUint32(h + 4), s = 4294967295 * l.getUint32(h + 8) + l.getUint32(h + 12), m = l.getUint32(h + 16), h = l.getUint32(h + 20), g = 1 === (m & 1), m = m >>> 1, m = this._text[m]; + c.enter(m, null, p / 1E6); + g && this._walkTree(a + 1); + c.leave(m, null, s / 1E6); + a = h; } while (0 !== a); }; - c.ITEM_SIZE = 24; - return c; + d.ITEM_SIZE = 24; + return d; }(); - c.Thread = h; + d.Thread = k; })(a.TraceLogger || (a.TraceLogger = {})); - })(c.Profiler || (c.Profiler = {})); - })(c.Tools || (c.Tools = {})); + })(d.Profiler || (d.Profiler = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.NumberUtilities.clamp, h = function() { + var r = d.NumberUtilities.clamp, k = function() { function a() { this.length = 0; this.lines = []; @@ -6034,9 +6401,9 @@ __extends = this.__extends || function(c, h) { this.repeat = []; this.length = 0; } - a.prototype.append = function(a, e) { - var m = this.lines; - 0 < m.length && m[m.length - 1] === a ? this.repeat[m.length - 1]++ : (this.lines.push(a), this.repeat.push(1), this.format.push(e ? {backgroundFillStyle:e} : void 0), this.time.push(performance.now()), this.length++); + a.prototype.append = function(a, c) { + var h = this.lines; + 0 < h.length && h[h.length - 1] === a ? this.repeat[h.length - 1]++ : (this.lines.push(a), this.repeat.push(1), this.format.push(c ? {backgroundFillStyle:c} : void 0), this.time.push(performance.now()), this.length++); }; a.prototype.get = function(a) { return this.lines[a]; @@ -6052,9 +6419,9 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - a.Buffer = h; - var p = function() { - function a(c) { + a.Buffer = k; + var u = function() { + function a(l) { this.lineColor = "#2A2A2A"; this.alternateLineColor = "#262626"; this.textColor = "#FFFFFF"; @@ -6063,9 +6430,9 @@ __extends = this.__extends || function(c, h) { this.ratio = 1; this.showLineNumbers = !0; this.showLineCounter = this.showLineTime = !1; - this.canvas = c; + this.canvas = l; this.canvas.focus(); - this.context = c.getContext("2d", {original:!0}); + this.context = l.getContext("2d", {original:!0}); this.context.fillStyle = "#FFFFFF"; this.fontSize = 10; this.columnIndex = this.pageIndex = this.lineIndex = 0; @@ -6076,83 +6443,83 @@ __extends = this.__extends || function(c, h) { this._resizeHandler(); this.textMarginBottom = this.textMarginLeft = 4; this.refreshFrequency = 0; - this.buffer = new h; - c.addEventListener("keydown", function(a) { - var c = 0; + this.buffer = new k; + l.addEventListener("keydown", function(a) { + var l = 0; switch(a.keyCode) { - case r: + case n: this.showLineNumbers = !this.showLineNumbers; break; - case w: + case x: this.showLineTime = !this.showLineTime; break; - case n: - c = -1; - break; - case k: - c = 1; - break; - case e: - c = -this.pageLineCount; - break; case m: - c = this.pageLineCount; + l = -1; break; - case t: - c = -this.lineIndex; + case g: + l = 1; break; - case q: - c = this.buffer.length - this.lineIndex; + case c: + l = -this.pageLineCount; + break; + case h: + l = this.pageLineCount; + break; + case p: + l = -this.lineIndex; + break; + case s: + l = this.buffer.length - this.lineIndex; break; case f: this.columnIndex -= a.metaKey ? 10 : 1; 0 > this.columnIndex && (this.columnIndex = 0); a.preventDefault(); break; - case d: + case b: this.columnIndex += a.metaKey ? 10 : 1; a.preventDefault(); break; - case b: + case e: a.metaKey && (this.selection = {start:0, end:this.buffer.length}, a.preventDefault()); break; - case g: + case q: if (a.metaKey) { - var l = ""; + var d = ""; if (this.selection) { - for (var s = this.selection.start;s <= this.selection.end;s++) { - l += this.buffer.get(s) + "\n"; + for (var r = this.selection.start;r <= this.selection.end;r++) { + d += this.buffer.get(r) + "\n"; } } else { - l = this.buffer.get(this.lineIndex); + d = this.buffer.get(this.lineIndex); } - alert(l); + alert(d); } ; } - a.metaKey && (c *= this.pageLineCount); - c && (this.scroll(c), a.preventDefault()); - c && a.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < c ? this.selection = {start:this.lineIndex - c, end:this.lineIndex} : 0 > c && (this.selection = {start:this.lineIndex, end:this.lineIndex - c}) : c && (this.selection = null); + a.metaKey && (l *= this.pageLineCount); + l && (this.scroll(l), a.preventDefault()); + l && a.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < l ? this.selection = {start:this.lineIndex - l, end:this.lineIndex} : 0 > l && (this.selection = {start:this.lineIndex, end:this.lineIndex - l}) : l && (this.selection = null); this.paint(); }.bind(this), !1); - c.addEventListener("focus", function(b) { + l.addEventListener("focus", function(b) { this.hasFocus = !0; }.bind(this), !1); - c.addEventListener("blur", function(b) { + l.addEventListener("blur", function(b) { this.hasFocus = !1; }.bind(this), !1); - var e = 33, m = 34, t = 36, q = 35, n = 38, k = 40, f = 37, d = 39, b = 65, g = 67, r = 78, w = 84; + var c = 33, h = 34, p = 36, s = 35, m = 38, g = 40, f = 37, b = 39, e = 65, q = 67, n = 78, x = 84; } a.prototype.resize = function() { this._resizeHandler(); }; a.prototype._resizeHandler = function() { - var a = this.canvas.parentElement, e = a.clientWidth, a = a.clientHeight - 1, m = window.devicePixelRatio || 1; - 1 !== m ? (this.ratio = m / 1, this.canvas.width = e * this.ratio, this.canvas.height = a * this.ratio, this.canvas.style.width = e + "px", this.canvas.style.height = a + "px") : (this.ratio = 1, this.canvas.width = e, this.canvas.height = a); + var a = this.canvas.parentElement, c = a.clientWidth, a = a.clientHeight - 1, h = window.devicePixelRatio || 1; + 1 !== h ? (this.ratio = h / 1, this.canvas.width = c * this.ratio, this.canvas.height = a * this.ratio, this.canvas.style.width = c + "px", this.canvas.style.height = a + "px") : (this.ratio = 1, this.canvas.width = c, this.canvas.height = a); this.pageLineCount = Math.floor(this.canvas.height / this.lineHeight); }; a.prototype.gotoLine = function(a) { - this.lineIndex = s(a, 0, this.buffer.length - 1); + this.lineIndex = r(a, 0, this.buffer.length - 1); }; a.prototype.scrollIntoView = function() { this.lineIndex < this.pageIndex ? this.pageIndex = this.lineIndex : this.lineIndex >= this.pageIndex + this.pageLineCount && (this.pageIndex = this.lineIndex - this.pageLineCount + 1); @@ -6164,70 +6531,70 @@ __extends = this.__extends || function(c, h) { a.prototype.paint = function() { var a = this.pageLineCount; this.pageIndex + a > this.buffer.length && (a = this.buffer.length - this.pageIndex); - var e = this.textMarginLeft, m = e + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), c = m + (this.showLineTime ? 40 : 10), q = c + 25; + var c = this.textMarginLeft, h = c + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), p = h + (this.showLineTime ? 40 : 10), s = p + 25; this.context.font = this.fontSize + 'px Consolas, "Liberation Mono", Courier, monospace'; this.context.setTransform(this.ratio, 0, 0, this.ratio, 0, 0); - for (var n = this.canvas.width, k = this.lineHeight, f = 0;f < a;f++) { - var d = f * this.lineHeight, b = this.pageIndex + f, g = this.buffer.get(b), r = this.buffer.getFormat(b), w = this.buffer.getRepeat(b), z = 1 < b ? this.buffer.getTime(b) - this.buffer.getTime(0) : 0; - this.context.fillStyle = b % 2 ? this.lineColor : this.alternateLineColor; - r && r.backgroundFillStyle && (this.context.fillStyle = r.backgroundFillStyle); - this.context.fillRect(0, d, n, k); + for (var m = this.canvas.width, g = this.lineHeight, f = 0;f < a;f++) { + var b = f * this.lineHeight, e = this.pageIndex + f, q = this.buffer.get(e), n = this.buffer.getFormat(e), x = this.buffer.getRepeat(e), d = 1 < e ? this.buffer.getTime(e) - this.buffer.getTime(0) : 0; + this.context.fillStyle = e % 2 ? this.lineColor : this.alternateLineColor; + n && n.backgroundFillStyle && (this.context.fillStyle = n.backgroundFillStyle); + this.context.fillRect(0, b, m, g); this.context.fillStyle = this.selectionTextColor; this.context.fillStyle = this.textColor; - this.selection && b >= this.selection.start && b <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, d, n, k), this.context.fillStyle = this.selectionTextColor); - this.hasFocus && b === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, d, n, k), this.context.fillStyle = this.selectionTextColor); - 0 < this.columnIndex && (g = g.substring(this.columnIndex)); - d = (f + 1) * this.lineHeight - this.textMarginBottom; - this.showLineNumbers && this.context.fillText(String(b), e, d); - this.showLineTime && this.context.fillText(z.toFixed(1).padLeft(" ", 6), m, d); - 1 < w && this.context.fillText(String(w).padLeft(" ", 3), c, d); - this.context.fillText(g, q, d); + this.selection && e >= this.selection.start && e <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, b, m, g), this.context.fillStyle = this.selectionTextColor); + this.hasFocus && e === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, b, m, g), this.context.fillStyle = this.selectionTextColor); + 0 < this.columnIndex && (q = q.substring(this.columnIndex)); + b = (f + 1) * this.lineHeight - this.textMarginBottom; + this.showLineNumbers && this.context.fillText(String(e), c, b); + this.showLineTime && this.context.fillText(d.toFixed(1).padLeft(" ", 6), h, b); + 1 < x && this.context.fillText(String(x).padLeft(" ", 3), p, b); + this.context.fillText(q, s, b); } }; a.prototype.refreshEvery = function(a) { - function e() { - m.paint(); - m.refreshFrequency && setTimeout(e, m.refreshFrequency); + function c() { + h.paint(); + h.refreshFrequency && setTimeout(c, h.refreshFrequency); } - var m = this; + var h = this; this.refreshFrequency = a; - m.refreshFrequency && setTimeout(e, m.refreshFrequency); + h.refreshFrequency && setTimeout(c, h.refreshFrequency); }; a.prototype.isScrolledToBottom = function() { return this.lineIndex === this.buffer.length - 1; }; return a; }(); - a.Terminal = p; - })(h.Terminal || (h.Terminal = {})); - })(c.Tools || (c.Tools = {})); + a.Terminal = u; + })(k.Terminal || (k.Terminal = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { - function a(c) { + var d = function() { + function a(d) { this._lastWeightedTime = this._lastTime = this._index = 0; this._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" "); - this._container = c; + this._container = d; this._canvas = document.createElement("canvas"); this._container.appendChild(this._canvas); this._context = this._canvas.getContext("2d"); this._listenForContainerSizeChanges(); } a.prototype._listenForContainerSizeChanges = function() { - var a = this._containerWidth, c = this._containerHeight; + var a = this._containerWidth, d = this._containerHeight; this._onContainerSizeChanged(); var l = this; setInterval(function() { - if (a !== l._containerWidth || c !== l._containerHeight) { - l._onContainerSizeChanged(), a = l._containerWidth, c = l._containerHeight; + if (a !== l._containerWidth || d !== l._containerHeight) { + l._onContainerSizeChanged(), a = l._containerWidth, d = l._containerHeight; } }, 10); }; a.prototype._onContainerSizeChanged = function() { - var a = this._containerWidth, c = this._containerHeight, l = window.devicePixelRatio || 1; - 1 !== l ? (this._ratio = l / 1, this._canvas.width = a * this._ratio, this._canvas.height = c * this._ratio, this._canvas.style.width = a + "px", this._canvas.style.height = c + "px") : (this._ratio = 1, this._canvas.width = a, this._canvas.height = c); + var a = this._containerWidth, d = this._containerHeight, l = window.devicePixelRatio || 1; + 1 !== l ? (this._ratio = l / 1, this._canvas.width = a * this._ratio, this._canvas.height = d * this._ratio, this._canvas.style.width = a + "px", this._canvas.style.height = d + "px") : (this._ratio = 1, this._canvas.width = a, this._canvas.height = d); }; Object.defineProperty(a.prototype, "_containerWidth", {get:function() { return this._container.clientWidth; @@ -6235,66 +6602,66 @@ __extends = this.__extends || function(c, h) { Object.defineProperty(a.prototype, "_containerHeight", {get:function() { return this._container.clientHeight; }, enumerable:!0, configurable:!0}); - a.prototype.tickAndRender = function(a, c) { + a.prototype.tickAndRender = function(a, d) { void 0 === a && (a = !1); - void 0 === c && (c = 0); + void 0 === d && (d = 0); if (0 === this._lastTime) { this._lastTime = performance.now(); } else { - var l = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, e = this._context, m = 2 * this._ratio, t = 30 * this._ratio, q = performance; - q.memory && (t += 30 * this._ratio); - var n = (this._canvas.width - t) / (m + 1) | 0, k = this._index++; - this._index > n && (this._index = 0); - n = this._canvas.height; - e.globalAlpha = 1; - e.fillStyle = "black"; - e.fillRect(t + k * (m + 1), 0, 4 * m, this._canvas.height); + var l = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, c = this._context, h = 2 * this._ratio, p = 30 * this._ratio, s = performance; + s.memory && (p += 30 * this._ratio); + var m = (this._canvas.width - p) / (h + 1) | 0, g = this._index++; + this._index > m && (this._index = 0); + m = this._canvas.height; + c.globalAlpha = 1; + c.fillStyle = "black"; + c.fillRect(p + g * (h + 1), 0, 4 * h, this._canvas.height); var f = Math.min(1E3 / 60 / l, 1); - e.fillStyle = "#00FF00"; - e.globalAlpha = a ? .5 : 1; - f = n / 2 * f | 0; - e.fillRect(t + k * (m + 1), n - f, m, f); - c && (f = Math.min(1E3 / 240 / c, 1), e.fillStyle = "#FF6347", f = n / 2 * f | 0, e.fillRect(t + k * (m + 1), n / 2 - f, m, f)); - 0 === k % 16 && (e.globalAlpha = 1, e.fillStyle = "black", e.fillRect(0, 0, t, this._canvas.height), e.fillStyle = "white", e.font = 8 * this._ratio + "px Arial", e.textBaseline = "middle", m = (1E3 / l).toFixed(0), c && (m += " " + c.toFixed(0)), q.memory && (m += " " + (q.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), e.fillText(m, 2 * this._ratio, this._containerHeight / 2 * this._ratio)); + c.fillStyle = "#00FF00"; + c.globalAlpha = a ? .5 : 1; + f = m / 2 * f | 0; + c.fillRect(p + g * (h + 1), m - f, h, f); + d && (f = Math.min(1E3 / 240 / d, 1), c.fillStyle = "#FF6347", f = m / 2 * f | 0, c.fillRect(p + g * (h + 1), m / 2 - f, h, f)); + 0 === g % 16 && (c.globalAlpha = 1, c.fillStyle = "black", c.fillRect(0, 0, p, this._canvas.height), c.fillStyle = "white", c.font = 8 * this._ratio + "px Arial", c.textBaseline = "middle", h = (1E3 / l).toFixed(0), d && (h += " " + d.toFixed(0)), s.memory && (h += " " + (s.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), c.fillText(h, 2 * this._ratio, this._containerHeight / 2 * this._ratio)); this._lastTime = performance.now(); this._lastWeightedTime = l; } }; return a; }(); - a.FPS = c; - })(c.Mini || (c.Mini = {})); - })(c.Tools || (c.Tools = {})); + a.FPS = d; + })(d.Mini || (d.Mini = {})); + })(d.Tools || (d.Tools = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load Shared Dependencies"); console.time("Load AVM2 Dependencies"); -(function(c) { - (function(h) { - h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("AVM2"); - h.counter = new c.Metrics.Counter(!0); - h.countTimeline = function(a, c) { - void 0 === c && (c = 1); - h.timelineBuffer && h.timelineBuffer.count(a, c); +(function(d) { + (function(k) { + k.timelineBuffer = new d.Tools.Profiler.TimelineBuffer("AVM2"); + k.counter = new d.Metrics.Counter(!1); + k.countTimeline = function(a, d) { + void 0 === d && (d = 1); + k.timelineBuffer && k.timelineBuffer.count(a, d); }; - h.enterTimeline = function(a, c) { + k.enterTimeline = function(a, d) { }; - h.leaveTimeline = function(a) { + k.leaveTimeline = function(a) { }; - })(c.AVM2 || (c.AVM2 = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { function a(a) { - for (var c = [], h = 1;h < arguments.length;h++) { - c[h - 1] = arguments[h]; + for (var d = [], k = 1;k < arguments.length;k++) { + d[k - 1] = arguments[k]; } - var u = a.message; - c.forEach(function(a, e) { - u = u.replace("%" + (e + 1), a); + var t = a.message; + d.forEach(function(a, c) { + t = t.replace("%" + (c + 1), a); }); - return "Error #" + a.code + ": " + u; + return "Error #" + a.code + ": " + t; } - h.Errors = {CallOfNonFunctionError:{code:1006, message:"%1 is not a function."}, ConvertNullToObjectError:{code:1009, message:"Cannot access a property or method of a null object reference."}, ConvertUndefinedToObjectError:{code:1010, message:"A term is undefined and has no properties."}, ClassNotFoundError:{code:1014, message:"Class %1 could not be found."}, CheckTypeFailedError:{code:1034, message:"Type Coercion failed: cannot convert %1 to %2."}, WrongArgumentCountError:{code:1063, message:"Argument count mismatch on %1. Expected %2, got %3."}, + k.Errors = {CallOfNonFunctionError:{code:1006, message:"%1 is not a function."}, ConvertNullToObjectError:{code:1009, message:"Cannot access a property or method of a null object reference."}, ConvertUndefinedToObjectError:{code:1010, message:"A term is undefined and has no properties."}, ClassNotFoundError:{code:1014, message:"Class %1 could not be found."}, CheckTypeFailedError:{code:1034, message:"Type Coercion failed: cannot convert %1 to %2."}, WrongArgumentCountError:{code:1063, message:"Argument count mismatch on %1. Expected %2, got %3."}, ConstWriteError:{code:1074, message:"Illegal write to read-only property %1 on %2."}, XMLOnlyWorksWithOneItemLists:{code:1086, message:"The %1 method only works on lists containing one item."}, XMLAssignmentToIndexedXMLNotAllowed:{code:1087, message:"Assignment to indexed XML is not allowed."}, XMLMarkupMustBeWellFormed:{code:1088, message:"The markup in the document following the root element must be well-formed."}, XMLAssigmentOneItemLists:{code:1089, message:"Assignment to lists with more than one item is not supported."}, XMLNamespaceWithPrefixAndNoURI:{code:1098, message:"Illegal prefix %1 for no namespace."}, OutOfRangeError:{code:1125, message:"The index %1 is out of range %2."}, VectorFixedError:{code:1126, message:"Cannot change the length of a fixed Vector."}, InvalidRangeError:{code:1506, message:"The specified range is invalid."}, NullArgumentError:{code:1507, message:"Argument %1 cannot be null."}, InvalidArgumentError:{code:1508, message:"The value specified for argument %1 is invalid."}, InvalidParamError:{code:2004, message:"One of the parameters is invalid."}, ParamRangeError:{code:2006, message:"The supplied index is out of bounds."}, NullPointerError:{code:2007, message:"Parameter %1 must be non-null."}, InvalidEnumError:{code:2008, message:"Parameter %1 must be one of the accepted values."}, CantInstantiateError:{code:2012, message:"%1 class cannot be instantiated."}, InvalidBitmapData:{code:2015, message:"Invalid BitmapData."}, EOFError:{code:2030, message:"End of file was encountered.", fqn:"flash.errors.EOFError"}, @@ -6302,47 +6669,47 @@ console.time("Load AVM2 Dependencies"); message:"The Timer delay specified is out of range."}, ExternalInterfaceNotAvailableError:{code:2067, message:"The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime."}, InvalidLoaderMethodError:{code:2069, message:"The Loader class does not implement this method."}, InvalidStageMethodError:{code:2071, message:"The Stage class does not implement this property or method."}, LoadingObjectNotSWFError:{code:2098, message:"The loading object is not a .swf file, you cannot request SWF properties from it."}, LoadingObjectNotInitializedError:{code:2099, message:"The loading object is not sufficiently loaded to provide this information."}, DecodeParamError:{code:2101, message:"The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs."}, SceneNotFoundError:{code:2108, message:"Scene %1 was not found."}, FrameLabelNotFoundError:{code:2109, message:"Frame label %1 not found in scene %2."}, InvalidLoaderInfoMethodError:{code:2118, message:"The LoaderInfo class does not implement this method."}, CantAddParentError:{code:2150, message:"An object cannot be added as a child to one of it's children (or children's children, etc.)."}, ObjectWithStringsParamError:{code:2196, message:"Parameter %1 must be an Object with only String values."}}; - h.getErrorMessage = function(a) { - if (!c.AVM2.Runtime.debuggerMode.value) { + k.getErrorMessage = function(a) { + if (!d.AVM2.Runtime.debuggerMode.value) { return "Error #" + a; } - for (var v in h.Errors) { - if (h.Errors[v].code == a) { - return "Error #" + a + ": " + h.Errors[v].message; + for (var v in k.Errors) { + if (k.Errors[v].code == a) { + return "Error #" + a + ": " + k.Errors[v].message; } } return "Error #" + a + ": (unknown)"; }; - h.formatErrorMessage = a; - h.translateErrorMessage = function(s) { - if (s.type) { - switch(s.type) { + k.formatErrorMessage = a; + k.translateErrorMessage = function(r) { + if (r.type) { + switch(r.type) { case "undefined_method": - return a(h.Errors.CallOfNonFunctionError, "value"); + return a(k.Errors.CallOfNonFunctionError, "value"); default: - throw c.Debug.notImplemented(s.type);; + throw d.Debug.notImplemented(r.type);; } } else { - return 0 <= s.message.indexOf("is not a function") ? a(h.Errors.CallOfNonFunctionError, "value") : s.message; + return 0 <= r.message.indexOf("is not a function") ? a(k.Errors.CallOfNonFunctionError, "value") : r.message; } }; - })(c.AVM2 || (c.AVM2 = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); Errors = Shumway.AVM2.Errors; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = null; - "undefined" !== typeof TextDecoder && (s = new TextDecoder); - var h = function() { - function a(c) { - this._bytes = c; - this._view = new DataView(c.buffer, c.byteOffset); + var r = null; + "undefined" !== typeof TextDecoder && (r = new TextDecoder); + var k = function() { + function a(d) { + this._bytes = d; + this._view = new DataView(d.buffer, d.byteOffset); this._position = 0; } - a._getResultBuffer = function(c) { - if (!a._resultBuffer || a._resultBuffer.length < c) { - a._resultBuffer = new Int32Array(2 * c); + a._getResultBuffer = function(d) { + if (!a._resultBuffer || a._resultBuffer.length < d) { + a._resultBuffer = new Int32Array(2 * d); } return a._resultBuffer; }; @@ -6359,10 +6726,10 @@ Errors = Shumway.AVM2.Errors; return this._bytes[this._position++]; }; a.prototype.readU8s = function(a) { - var c = new Uint8Array(a); - c.set(this._bytes.subarray(this._position, this._position + a), 0); + var l = new Uint8Array(a); + l.set(this._bytes.subarray(this._position, this._position + a), 0); this._position += a; - return c; + return l; }; a.prototype.readS8 = function() { return this._bytes[this._position++] << 24 >> 24; @@ -6397,136 +6764,125 @@ Errors = Shumway.AVM2.Errors; this._position += 8; return a; }; - a.prototype.readUTFString = function(h) { - if (s) { + a.prototype.readUTFString = function(k) { + if (r) { var l = this._position; - this._position += h; - return s.decode(this._bytes.subarray(l, l + h)); + this._position += k; + return r.decode(this._bytes.subarray(l, l + k)); } - var l = this._position, e = l + h, m = this._bytes, t = 0; - for (h = a._getResultBuffer(2 * h);l < e;) { - var q = m[l++]; - if (127 >= q) { - h[t++] = q; + var l = this._position, c = l + k, h = this._bytes, p = 0; + for (k = a._getResultBuffer(2 * k);l < c;) { + var s = h[l++]; + if (127 >= s) { + k[p++] = s; } else { - if (192 <= q) { - var n = 0; - 224 > q ? n = (q & 31) << 6 | m[l++] & 63 : 240 > q ? n = (q & 15) << 12 | (m[l++] & 63) << 6 | m[l++] & 63 : (n = ((q & 7) << 18 | (m[l++] & 63) << 12 | (m[l++] & 63) << 6 | m[l++] & 63) - 65536, h[t++] = ((n & 1047552) >>> 10) + 55296, n = (n & 1023) + 56320); - h[t++] = n; + if (192 <= s) { + var m = 0; + 224 > s ? m = (s & 31) << 6 | h[l++] & 63 : 240 > s ? m = (s & 15) << 12 | (h[l++] & 63) << 6 | h[l++] & 63 : (m = ((s & 7) << 18 | (h[l++] & 63) << 12 | (h[l++] & 63) << 6 | h[l++] & 63) - 65536, k[p++] = ((m & 1047552) >>> 10) + 55296, m = (m & 1023) + 56320); + k[p++] = m; } } } this._position = l; - return c.StringUtilities.fromCharCodeArray(h.subarray(0, t)); + return d.StringUtilities.fromCharCodeArray(k.subarray(0, p)); }; a._resultBuffer = new Int32Array(256); return a; }(); - a.AbcStream = h; - })(h.ABC || (h.ABC = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.AbcStream = k; + })(k.ABC || (k.ABC = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.isString, v = c.isNumeric, p = c.isObject, u = c.Debug.assert, l = c.Debug.notImplemented, e = function() { - return function(b, d, g, a) { - void 0 === a && (a = !1); + var r = d.isNumeric, v = d.isObject, u = d.Debug.notImplemented, t = function() { + return function(b, e, a, f) { this.name = b; - this.type = d; - this.value = g; - this.optional = a; + this.type = e; + this.value = a; + this.optional = f; }; }(); - a.Parameter = e; - var m = function() { - function b(a, f, k) { - var r = a.constantPool, e = a.methods, n = a.classes, c = a.metadata; - this.holder = k; - this.name = r.multinames[f.readU30()]; - k = f.readU8(); - this.kind = k & 15; - this.attributes = k >> 4 & 15; - u(g.isQName(this.name), "Name must be a QName: " + this.name + ", kind: " + this.kind); + a.Parameter = t; + var l = function() { + function e(b, a, f) { + var n = b.constantPool, c = b.methods, q = b.classes, s = b.metadata; + this.holder = f; + this.name = n.multinames[a.readU30()]; + f = a.readU8(); + this.kind = f & 15; + this.attributes = f >> 4 & 15; switch(this.kind) { case 0: ; case 6: - this.slotId = f.readU30(); - this.typeName = r.multinames[f.readU30()]; - a = f.readU30(); + this.slotId = a.readU30(); + this.typeName = n.multinames[a.readU30()]; + b = a.readU30(); this.value = void 0; - 0 !== a && (this.hasDefaultValue = !0, this.value = r.getValue(f.readU8(), a)); + 0 !== b && (this.hasDefaultValue = !0, this.value = n.getValue(a.readU8(), b)); break; case 1: ; case 3: ; case 2: - this.dispId = f.readU30(); - this.methodInfo = e[f.readU30()]; + this.dispId = a.readU30(); + this.methodInfo = c[a.readU30()]; this.methodInfo.name = this.name; - d.attachHolder(this.methodInfo, this.holder); - this.methodInfo.abc = a; + g.attachHolder(this.methodInfo, this.holder); + this.methodInfo.abc = b; break; case 4: - this.slotId = f.readU30(); - u(n, "Classes should be passed down here, I'm guessing whenever classes are being parsed."); - this.classInfo = n[f.readU30()]; - break; - case 5: - u(!1, "Function encountered in the wild, should not happen"); - break; - default: - u(!1, "Unknown trait kind: " + w[this.kind]); + this.slotId = a.readU30(), this.classInfo = q[a.readU30()]; } if (this.attributes & 4) { - var m, r = 0; - for (a = f.readU30();r < a;r++) { - e = c[f.readU30()], "__go_to_definition_help" !== e.name && "__go_to_ctor_definition_help" !== e.name && (m || (m = {}), m[e.name] = e); + var p, n = 0; + for (b = a.readU30();n < b;n++) { + c = s[a.readU30()], "__go_to_definition_help" !== c.name && "__go_to_ctor_definition_help" !== c.name && (p || (p = {}), p[c.name] = c); } - m && (this.isClass() && (this.classInfo.metadata = m), this.metadata = m); + p && (this.isClass() && (this.classInfo.metadata = p), this.metadata = p); } } - b.prototype.isSlot = function() { + e.prototype.isSlot = function() { return 0 === this.kind; }; - b.prototype.isConst = function() { + e.prototype.isConst = function() { return 6 === this.kind; }; - b.prototype.isMethod = function() { + e.prototype.isMethod = function() { return 1 === this.kind; }; - b.prototype.isClass = function() { + e.prototype.isClass = function() { return 4 === this.kind; }; - b.prototype.isGetter = function() { + e.prototype.isGetter = function() { return 2 === this.kind; }; - b.prototype.isSetter = function() { + e.prototype.isSetter = function() { return 3 === this.kind; }; - b.prototype.isAccessor = function() { + e.prototype.isAccessor = function() { return this.isGetter() || this.isSetter(); }; - b.prototype.isMethodOrAccessor = function() { + e.prototype.isMethodOrAccessor = function() { return this.isMethod() || this.isGetter() || this.isSetter(); }; - b.prototype.isProtected = function() { - u(g.isQName(this.name)); + e.prototype.isProtected = function() { return this.name.namespaces[0].isProtected(); }; - b.prototype.kindName = function() { + e.prototype.kindName = function() { switch(this.kind) { case 0: return "Slot"; @@ -6543,186 +6899,205 @@ __extends = this.__extends || function(c, h) { case 5: return "Function"; } - c.Debug.unexpected(); + d.Debug.unexpected(); }; - b.prototype.isOverride = function() { + e.prototype.isOverride = function() { return this.attributes & 2; }; - b.prototype.isFinal = function() { + e.prototype.isFinal = function() { return this.attributes & 1; }; - b.prototype.toString = function() { - var b = c.IntegerUtilities.getFlags(this.attributes, ["final", "override", "metadata"]); - b && (b += " "); - b += g.getQualifiedName(this.name); + e.prototype.toString = function() { + var e = d.IntegerUtilities.getFlags(this.attributes, ["final", "override", "metadata"]); + e && (e += " "); + e += b.getQualifiedName(this.name); switch(this.kind) { case 0: ; case 6: - return b + ", typeName: " + this.typeName + ", slotId: " + this.slotId + ", value: " + this.value; + return e + ", typeName: " + this.typeName + ", slotId: " + this.slotId + ", value: " + this.value; case 1: ; case 3: ; case 2: - return b + ", " + this.kindName() + ": " + this.methodInfo.name; + return e + ", " + this.kindName() + ": " + this.methodInfo.name; case 4: - return b + ", slotId: " + this.slotId + ", class: " + this.classInfo; + return e + ", slotId: " + this.slotId + ", class: " + this.classInfo; } }; - b.parseTraits = function(d, a, g) { - for (var f = a.readU30(), k = [], r = 0;r < f;r++) { - k.push(new b(d, a, g)); + e.parseTraits = function(b, a, f) { + for (var g = a.readU30(), c = [], q = 0;q < g;q++) { + c.push(new e(b, a, f)); } - return k; + return c; }; - return b; + return e; }(); - a.Trait = m; - var t = function() { - return function(b, d, a) { + a.Trait = l; + var c = function() { + return function(b, e, a) { + this.traits = null; this.abc = b; - this.index = d; - this.hash = b.hash & 65535 | a | d << 19; + this.index = e; + this.hash = b.hash & 65535 | a | e << 19; }; }(); - a.Info = t; - var q = function(b) { - function d(a, g, f) { - b.call(this, a, g, 131072); + a.Info = c; + var h = function(b) { + function e(a, f, g) { + b.call(this, a, f, 131072); + this.holder = null; + this.maxScopeDepth = this.initScopeDepth = this.localCount = this.maxStack = 0; + this.analysis = this.activationPrototype = this.lastBoundMethod = this.cachedMemoizer = this.cachedMethodOrTrampoline = this.freeMethod = this.exceptions = this.code = null; a = a.constantPool; - g = f.readU30(); - this.returnType = a.multinames[f.readU30()]; + f = g.readU30(); + this.returnType = a.multinames[g.readU30()]; this.parameters = []; - for (var k = 0;k < g;k++) { - this.parameters.push(new e(void 0, a.multinames[f.readU30()], void 0)); + for (var c = 0;c < f;c++) { + this.parameters.push(new t(void 0, a.multinames[g.readU30()], void 0, !1)); } - this.debugName = a.strings[f.readU30()]; - this.flags = f.readU8(); - k = 0; + g.readU30(); + this.flags = g.readU8(); if (this.flags & 8) { - for (k = f.readU30(), u(g >= k), k = g - k;k < g;k++) { - var r = f.readU30(); - this.parameters[k].value = a.getValue(f.readU8(), r); - this.parameters[k].optional = !0; + for (c = g.readU30(), c = f - c;c < f;c++) { + var q = g.readU30(); + this.parameters[c].value = a.getValue(g.readU8(), q); + this.parameters[c].optional = !0; } } if (this.flags & 128) { - for (k = 0;k < g;k++) { - d.parseParameterNames ? this.parameters[k].name = a.strings[f.readU30()] : (f.readU30(), this.parameters[k].name = d._getParameterName(k)); + for (c = 0;c < f;c++) { + e.parseParameterNames ? this.parameters[c].name = a.strings[g.readU30()] : (g.readU30(), this.parameters[c].name = e._getParameterName(c)); } } else { - for (k = 0;k < g;k++) { - this.parameters[k].name = d._getParameterName(k); + for (c = 0;c < f;c++) { + this.parameters[c].name = e._getParameterName(c); } } } - __extends(d, b); - d._getParameterName = function(b) { + __extends(e, b); + Object.defineProperty(e.prototype, "hasBody", {get:function() { + return!!(this.flags & 256); + }, set:function(b) { + this.flags |= 256; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(e.prototype, "isInstanceInitializer", {get:function() { + return!!(this.flags & 512); + }, set:function(b) { + this.flags |= 512; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(e.prototype, "isClassInitializer", {get:function() { + return!!(this.flags & 1024); + }, set:function(b) { + this.flags |= 1024; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(e.prototype, "isScriptInitializer", {get:function() { + return!!(this.flags & 2048); + }, set:function(b) { + this.flags |= 2048; + }, enumerable:!0, configurable:!0}); + e._getParameterName = function(b) { return 26 > b ? String.fromCharCode(65 + b) : "P" + (b - 26); }; - d.prototype.toString = function() { - var b = c.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL SET_DXN HAS_PARAM_NAMES".split(" ")); + e.prototype.toString = function() { + var b = d.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL SET_DXN HAS_PARAM_NAMES".split(" ")); return(b ? b + " " : "") + this.name; }; - d.prototype.hasOptional = function() { + e.prototype.hasOptional = function() { return!!(this.flags & 8); }; - d.prototype.needsActivation = function() { + e.prototype.needsActivation = function() { return!!(this.flags & 2); }; - d.prototype.needsRest = function() { + e.prototype.needsRest = function() { return!!(this.flags & 4); }; - d.prototype.needsArguments = function() { + e.prototype.needsArguments = function() { return!!(this.flags & 1); }; - d.prototype.isNative = function() { + e.prototype.isNative = function() { return!!(this.flags & 32); }; - d.prototype.isClassMember = function() { - return this.holder instanceof k; + e.prototype.isClassMember = function() { + return this.holder instanceof s; }; - d.prototype.isInstanceMember = function() { - return this.holder instanceof n; + e.prototype.isInstanceMember = function() { + return this.holder instanceof p; }; - d.prototype.isScriptMember = function() { - return this.holder instanceof f; + e.prototype.isScriptMember = function() { + return this.holder instanceof m; }; - d.prototype.hasSetsDxns = function() { + e.prototype.hasSetsDxns = function() { return!!(this.flags & 64); }; - d.parseException = function(b, d) { - var a = b.constantPool.multinames, a = {start:d.readU30(), end:d.readU30(), target:d.readU30(), typeName:a[d.readU30()], varName:a[d.readU30()]}; - u(!a.typeName || !a.typeName.isRuntime()); - u(!a.varName || a.varName.isQName()); - return a; + e.parseException = function(b, e) { + var a = b.constantPool.multinames; + return{start:e.readU30(), end:e.readU30(), target:e.readU30(), typeName:a[e.readU30()], varName:a[e.readU30()]}; }; - d.parseBody = function(b, a) { - var g = b.methods, f = a.readU30(), g = g[f]; - g.index = f; - g.hasBody = !0; - u(!g.isNative()); - g.maxStack = a.readU30(); - g.localCount = a.readU30(); - g.initScopeDepth = a.readU30(); - g.maxScopeDepth = a.readU30(); - g.code = a.readU8s(a.readU30()); - for (var f = [], k = a.readU30(), r = 0;r < k;++r) { - f.push(d.parseException(b, a)); + e.parseBody = function(b, a) { + var f = b.methods, n = a.readU30(), f = f[n]; + f.index = n; + f.hasBody = !0; + f.maxStack = a.readU30(); + f.localCount = a.readU30(); + f.initScopeDepth = a.readU30(); + f.maxScopeDepth = a.readU30(); + f.code = a.readU8s(a.readU30()); + for (var n = [], g = a.readU30(), c = 0;c < g;++c) { + n.push(e.parseException(b, a)); } - g.exceptions = f; - g.traits = m.parseTraits(b, a, g); + f.exceptions = n; + f.traits = l.parseTraits(b, a, f); }; - d.prototype.hasExceptions = function() { + e.prototype.hasExceptions = function() { return 0 < this.exceptions.length; }; - d.parseParameterNames = !1; - return d; - }(t); - a.MethodInfo = q; - var n = function(b) { - function a(f, k, r) { - b.call(this, f, k, 65536); - this.runtimeId = a.nextID++; - k = f.constantPool; - var e = f.methods; - this.name = k.multinames[r.readU30()]; - u(g.isQName(this.name)); - this.superName = k.multinames[r.readU30()]; - this.flags = r.readU8(); + e.parseParameterNames = !1; + return e; + }(c); + a.MethodInfo = h; + var p = function(b) { + function e(a, f, c) { + b.call(this, a, f, 65536); + this.runtimeId = e.nextID++; + f = a.constantPool; + var q = a.methods; + this.name = f.multinames[c.readU30()]; + this.superName = f.multinames[c.readU30()]; + this.flags = c.readU8(); this.protectedNs = void 0; - this.flags & 8 && (this.protectedNs = k.namespaces[r.readU30()]); - var n = r.readU30(); + this.flags & 8 && (this.protectedNs = f.namespaces[c.readU30()]); + var s = c.readU30(); this.interfaces = []; - for (var w = 0;w < n;w++) { - this.interfaces[w] = k.multinames[r.readU30()]; + for (var p = 0;p < s;p++) { + this.interfaces[p] = f.multinames[c.readU30()]; } - this.init = e[r.readU30()]; + this.init = q[c.readU30()]; this.init.isInstanceInitializer = !0; this.init.name = this.name; - d.attachHolder(this.init, this); - this.traits = m.parseTraits(f, r, this); + g.attachHolder(this.init, this); + this.traits = l.parseTraits(a, c, this); } - __extends(a, b); - a.prototype.toString = function() { - var b = c.IntegerUtilities.getFlags(this.flags & 8, ["sealed", "final", "interface", "protected"]), b = (b ? b + " " : "") + this.name; + __extends(e, b); + e.prototype.toString = function() { + var b = d.IntegerUtilities.getFlags(this.flags & 8, ["sealed", "final", "interface", "protected"]), b = (b ? b + " " : "") + this.name; this.superName && (b += " extends " + this.superName); return b; }; - a.prototype.isFinal = function() { + e.prototype.isFinal = function() { return!!(this.flags & 2); }; - a.prototype.isSealed = function() { + e.prototype.isSealed = function() { return!!(this.flags & 1); }; - a.prototype.isInterface = function() { + e.prototype.isInterface = function() { return!!(this.flags & 4); }; - a.nextID = 1; - return a; - }(t); - a.InstanceInfo = n; + e.nextID = 1; + return e; + }(c); + a.InstanceInfo = p; (function(b) { b[b.AbcMask = 65535] = "AbcMask"; b[b.KindMask = 458752] = "KindMask"; @@ -6733,106 +7108,105 @@ __extends = this.__extends || function(c, h) { b[b.NamespaceSet = 262144] = "NamespaceSet"; b[b.IndexOffset = 19] = "IndexOffset"; })(a.Hashes || (a.Hashes = {})); - var k = function(b) { - function a(g, f, k) { - b.call(this, g, f, 0); + var s = function(e) { + function a(b, f, c) { + e.call(this, b, f, 0); this.runtimeId = a.nextID++; - this.init = g.methods[k.readU30()]; + this.init = b.methods[c.readU30()]; this.init.isClassInitializer = !0; - d.attachHolder(this.init, this); - this.traits = m.parseTraits(g, k, this); - this.instanceInfo = g.instances[f]; + g.attachHolder(this.init, this); + this.traits = l.parseTraits(b, c, this); + this.instanceInfo = b.instances[f]; this.instanceInfo.classInfo = this; this.defaultValue = a._getDefaultValue(this.instanceInfo.name); } - __extends(a, b); - a._getDefaultValue = function(b) { - return g.getQualifiedName(b) === g.Int || g.getQualifiedName(b) === g.Uint ? 0 : g.getQualifiedName(b) === g.Number ? NaN : g.getQualifiedName(b) === g.Boolean ? !1 : null; + __extends(a, e); + a._getDefaultValue = function(e) { + return b.getQualifiedName(e) === b.Int || b.getQualifiedName(e) === b.Uint ? 0 : b.getQualifiedName(e) === b.Number ? NaN : b.getQualifiedName(e) === b.Boolean ? !1 : null; }; a.prototype.toString = function() { return this.instanceInfo.name.toString(); }; a.nextID = 1; return a; - }(t); - a.ClassInfo = k; - var f = function(b) { - function a(g, f, r) { - b.call(this, g, f, 196608); - this.runtimeId = k.nextID++; - this.name = g.name + "$script" + f; - this.init = g.methods[r.readU30()]; + }(c); + a.ClassInfo = s; + var m = function(b) { + function e(a, f, c) { + b.call(this, a, f, 196608); + this.runtimeId = s.nextID++; + this.name = a.name + "$script" + f; + this.init = a.methods[c.readU30()]; this.init.isScriptInitializer = !0; - d.attachHolder(this.init, this); - this.traits = m.parseTraits(g, r, this); + g.attachHolder(this.init, this); + this.traits = l.parseTraits(a, c, this); } - __extends(a, b); - Object.defineProperty(a.prototype, "entryPoint", {get:function() { + __extends(e, b); + Object.defineProperty(e.prototype, "entryPoint", {get:function() { return this.init; }, enumerable:!0, configurable:!0}); - a.prototype.toString = function() { + e.prototype.toString = function() { return this.name; }; - a.nextID = 1; - return a; - }(t); - a.ScriptInfo = f; - var d = function() { - function b(d, g, e) { - void 0 === e && (e = 0); - h.enterTimeline("Parse ABC"); + e.nextID = 1; + return e; + }(c); + a.ScriptInfo = m; + var g = function() { + function b(f, g, c) { + void 0 === c && (c = 0); + k.enterTimeline("Parse ABC"); this.name = g; this.env = {}; - h.enterTimeline("Adler"); - g = c.HashUtilities.hashBytesTo32BitsAdler(d, 0, d.length); - h.leaveTimeline(); - e ? (this.hash = e, u(e === g)) : this.hash = g; - g = new a.AbcStream(d); - b._checkMagic(g); - h.enterTimeline("Parse constantPool"); - this.constantPool = new z(g, this); - h.leaveTimeline(); - h.enterTimeline("Parse Method Infos"); + var l; + c || (k.enterTimeline("Adler"), l = d.HashUtilities.hashBytesTo32BitsAdler(f, 0, f.length), k.leaveTimeline()); + this.hash = c ? c : l; + c = new a.AbcStream(f); + b._checkMagic(c); + k.enterTimeline("Parse constantPool"); + this.constantPool = new q(c, this); + k.leaveTimeline(); + k.enterTimeline("Parse Method Infos"); this.methods = []; - d = g.readU30(); - for (e = 0;e < d;++e) { - this.methods.push(new q(this, e, g)); + f = c.readU30(); + for (g = 0;g < f;++g) { + this.methods.push(new h(this, g, c)); } - h.leaveTimeline(); - h.enterTimeline("Parse MetaData Infos"); + k.leaveTimeline(); + k.enterTimeline("Parse MetaData Infos"); this.metadata = []; - d = g.readU30(); - for (e = 0;e < d;++e) { - this.metadata.push(new r(this, g)); + f = c.readU30(); + for (g = 0;g < f;++g) { + this.metadata.push(new e(this, c)); } - h.leaveTimeline(); - h.enterTimeline("Parse Instance Infos"); + k.leaveTimeline(); + k.enterTimeline("Parse Instance Infos"); this.instances = []; - d = g.readU30(); - for (e = 0;e < d;++e) { - this.instances.push(new n(this, e, g)); + f = c.readU30(); + for (g = 0;g < f;++g) { + this.instances.push(new p(this, g, c)); } - h.leaveTimeline(); - h.enterTimeline("Parse Class Infos"); + k.leaveTimeline(); + k.enterTimeline("Parse Class Infos"); this.classes = []; - for (e = 0;e < d;++e) { - this.classes.push(new k(this, e, g)); + for (g = 0;g < f;++g) { + this.classes.push(new s(this, g, c)); } - h.leaveTimeline(); - h.enterTimeline("Parse Script Infos"); + k.leaveTimeline(); + k.enterTimeline("Parse Script Infos"); this.scripts = []; - d = g.readU30(); - for (e = 0;e < d;++e) { - this.scripts.push(new f(this, e, g)); + f = c.readU30(); + for (g = 0;g < f;++g) { + this.scripts.push(new m(this, g, c)); } - h.leaveTimeline(); - h.enterTimeline("Parse Method Body Info"); - d = g.readU30(); - for (e = 0;e < d;++e) { - q.parseBody(this, g); + k.leaveTimeline(); + k.enterTimeline("Parse Method Body Info"); + f = c.readU30(); + for (g = 0;g < f;++g) { + h.parseBody(this, c); } - h.leaveTimeline(); - h.leaveTimeline(); + k.leaveTimeline(); + k.leaveTimeline(); } b._checkMagic = function(b) { b = b.readWord(); @@ -6841,99 +7215,95 @@ __extends = this.__extends || function(c, h) { } }; Object.defineProperty(b.prototype, "lastScript", {get:function() { - u(0 < this.scripts.length); return this.scripts[this.scripts.length - 1]; }, enumerable:!0, configurable:!0}); - b.attachHolder = function(b, d) { - u(!b.holder); - b.holder = d; + b.attachHolder = function(b, e) { + b.holder = e; }; b.prototype.toString = function() { return this.name; }; b.prototype.getConstant = function(b) { - u((this.hash & 65535) === (b & 65535)); - var d = b >> 19; + var e = b >> 19; switch(b & 458752) { case 0: - return this.classes[d]; + return this.classes[e]; case 65536: - return this.instances[d]; + return this.instances[e]; case 131072: - return this.methods[d]; + return this.methods[e]; case 196608: - return this.scripts[d]; + return this.scripts[e]; case 262144: - return this.constantPool.namespaceSets[d]; + return this.constantPool.namespaceSets[e]; default: - l("Kind"); + u("Kind"); } }; return b; }(); - a.AbcFile = d; - var b = function() { - function b(d, a, g, f) { + a.AbcFile = g; + var f = function() { + function b(e, a, f, n) { void 0 === a && (a = ""); void 0 === a && (a = ""); - this.kind = d; + this.kind = e; this.uri = a; - this.prefix = g; + this.prefix = f; this.qualifiedName = void 0; - this._buildNamespace(f); + this._buildNamespace(n); } - b.prototype._buildNamespace = function(d) { + b.prototype._buildNamespace = function(e) { 22 === this.kind && (this.kind = 8); - this.isPublic() && this.uri ? (d = this.uri.length - 1, this.uri.charCodeAt(d) > b._MIN_API_MARK && (u(!1, "What's this code for?"), this.uri = this.uri.substring(0, d - 1))) : this.isUnique() && (u(void 0 !== d), this.uri = "private " + d); + this.isPublic() && this.uri ? (e = this.uri.length - 1, this.uri.charCodeAt(e) > b._MIN_API_MARK && (this.uri = this.uri.substring(0, e - 1))) : this.isUnique() && (this.uri = "private " + e); 26 === this.kind && (this.uri = "*"); this.qualifiedName = b._qualifyNamespace(this.kind, this.uri, this.prefix ? this.prefix : ""); }; - b._hashNamespace = function(d, a, g) { - var f = b._knownURIs.indexOf(a); - if (0 <= f) { - return d << 2 | f; + b._hashNamespace = function(e, a, f) { + var g = b._knownURIs.indexOf(a); + if (0 <= g) { + return e << 2 | g; } - var f = new Int32Array(1 + a.length + g.length), k = 0; - f[k++] = d; - for (d = 0;d < a.length;d++) { - f[k++] = a.charCodeAt(d); + var g = new Int32Array(1 + a.length + f.length), c = 0; + g[c++] = e; + for (e = 0;e < a.length;e++) { + g[c++] = a.charCodeAt(e); } - for (d = 0;d < g.length;d++) { - f[k++] = g.charCodeAt(d); + for (e = 0;e < f.length;e++) { + g[c++] = f.charCodeAt(e); } - return c.HashUtilities.hashBytesTo32BitsMD5(f, 0, k); + return d.HashUtilities.hashBytesTo32BitsMD5(g, 0, c); }; - b._qualifyNamespace = function(d, a, g) { - var f = d + a, k = b._mangledNamespaceCache[f]; - if (k) { - return k; + b._qualifyNamespace = function(e, a, f) { + var g = e + a, c = b._mangledNamespaceCache[g]; + if (c) { + return c; } - k = c.StringUtilities.variableLengthEncodeInt32(b._hashNamespace(d, a, g)); - b._mangledNamespaceMap[k] = {kind:d, uri:a, prefix:g}; - return b._mangledNamespaceCache[f] = k; + c = d.StringUtilities.variableLengthEncodeInt32(b._hashNamespace(e, a, f)); + b._mangledNamespaceMap[c] = {kind:e, uri:a, prefix:f}; + return b._mangledNamespaceCache[g] = c; }; - b.fromQualifiedName = function(d) { - var a = c.StringUtilities.fromEncoding(d[0]); - d = b._mangledNamespaceMap[d.substring(0, a + 1)]; - return new b(d.kind, d.uri, d.prefix); + b.fromQualifiedName = function(e) { + var a = d.StringUtilities.fromEncoding(e[0]); + e = b._mangledNamespaceMap[e.substring(0, a + 1)]; + return new b(e.kind, e.uri, e.prefix); }; - b.kindFromString = function(d) { + b.kindFromString = function(e) { for (var a in b._kinds) { - if (b._kinds[a] === d) { + if (b._kinds[a] === e) { return a; } } - u(!1, "Cannot find kind " + d); return NaN; }; - b.createNamespace = function(d, a) { + b.createNamespace = function(e, a) { void 0 === a && (a = void 0); - return new b(8, d, a); + return new b(8, e, a); }; - b.parse = function(d, a, g) { - var f = a.readU8(); - d = d.strings[a.readU30()]; - return new b(f, d, void 0, g); + b.parse = function(e, a, f) { + var g = a.readU8(); + e = e.strings[a.readU30()]; + return new b(g, e, void 0, f); }; b.prototype.isPublic = function() { return 8 === this.kind || 22 === this.kind; @@ -6960,19 +7330,19 @@ __extends = this.__extends || function(c, h) { return b._kinds[this.kind] + (this.uri ? " " + this.uri : ""); }; b.prototype.clone = function() { - var d = Object.create(b.prototype); - d.kind = this.kind; - d.uri = this.uri; - d.prefix = this.prefix; - d.qualifiedName = this.qualifiedName; - return d; + var e = Object.create(b.prototype); + e.kind = this.kind; + e.uri = this.uri; + e.prefix = this.prefix; + e.qualifiedName = this.qualifiedName; + return e; }; b.prototype.isEqualTo = function(b) { return this.qualifiedName === b.qualifiedName; }; b.prototype.inNamespaceSet = function(b) { - for (var d = 0;d < b.length;d++) { - if (b[d].qualifiedName === this.qualifiedName) { + for (var e = 0;e < b.length;e++) { + if (b[e].qualifiedName === this.qualifiedName) { return!0; } } @@ -6984,97 +7354,94 @@ __extends = this.__extends || function(c, h) { b.prototype.getQualifiedName = function() { return this.qualifiedName; }; - b.fromSimpleName = function(d) { - if (d in b._simpleNameCache) { - return b._simpleNameCache[d]; + b.fromSimpleName = function(e) { + if (e in b._simpleNameCache) { + return b._simpleNameCache[e]; } var a; - 0 === d.indexOf("[") ? (u("]" === d[d.length - 1]), a = d.substring(1, d.length - 1).split(",")) : a = [d]; - return b._simpleNameCache[d] = a.map(function(d) { - d = d.trim(); + a = 0 === e.indexOf("[") ? e.substring(1, e.length - 1).split(",") : [e]; + return b._simpleNameCache[e] = a.map(function(e) { + e = e.trim(); var a; - 0 < d.indexOf(" ") ? (a = d.substring(0, d.indexOf(" ")).trim(), d = d.substring(d.indexOf(" ") + 1).trim()) : (a = b._kinds, d === a[8] || d === a[23] || d === a[5] || d === a[24] || d === a[25] || d === a[26] ? (a = d, d = "") : a = b._publicPrefix); - return new b(b.kindFromString(a), d); + 0 < e.indexOf(" ") ? (a = e.substring(0, e.indexOf(" ")).trim(), e = e.substring(e.indexOf(" ") + 1).trim()) : (a = b._kinds, e === a[8] || e === a[23] || e === a[5] || e === a[24] || e === a[25] || e === a[26] ? (a = e, e = "") : a = b._publicPrefix); + return new b(b.kindFromString(a), e); }); }; b._publicPrefix = "public"; b._kinds = function() { - var d = c.ObjectUtilities.createMap(); - d[8] = b._publicPrefix; - d[23] = "packageInternal"; - d[5] = "private"; - d[24] = "protected"; - d[25] = "explicit"; - d[26] = "staticProtected"; - return d; + var e = d.ObjectUtilities.createMap(); + e[8] = b._publicPrefix; + e[23] = "packageInternal"; + e[5] = "private"; + e[24] = "protected"; + e[25] = "explicit"; + e[26] = "staticProtected"; + return e; }(); b._MIN_API_MARK = 58004; b._MAX_API_MARK = 63743; b._knownURIs = [""]; - b._mangledNamespaceCache = c.ObjectUtilities.createMap(); - b._mangledNamespaceMap = c.ObjectUtilities.createMap(); + b._mangledNamespaceCache = d.ObjectUtilities.createMap(); + b._mangledNamespaceMap = d.ObjectUtilities.createMap(); b.PUBLIC = new b(8); b.PROTECTED = new b(24); b.PROXY = new b(8, "http://www.adobe.com/2006/actionscript/flash/proxy"); b.VECTOR = new b(8, "__AS3__.vec"); b.VECTOR_PACKAGE = new b(23, "__AS3__.vec"); b.BUILTIN = new b(5, "builtin.as$0"); - b._simpleNameCache = c.ObjectUtilities.createMap(); + b._simpleNameCache = d.ObjectUtilities.createMap(); return b; }(); - a.Namespace = b; - b.prototype = Object.create(b.prototype); - var g = function() { - function d(b, a, g) { - void 0 === a || u(null === a || s(a), "Multiname name must be a string. " + a); - this.runtimeId = d._nextID++; - this.namespaces = b; + a.Namespace = f; + f.prototype = Object.create(f.prototype); + var b = function() { + function b(e, a, f) { + this.runtimeId = b._nextID++; + this.namespaces = e; this.name = a; - this.flags = g | 0; + this.flags = f | 0; } - d.parse = function(b, a, g, f, k) { - var r = 0, e = a.readU8(), n, w = [], m = 0; - switch(e) { + b.parse = function(e, a, f, g, c) { + var q = 0, s = a.readU8(), p, m = [], h = 0; + switch(s) { case 7: ; case 13: - (r = a.readU30()) ? w = [b.namespaces[r]] : m &= ~d.RUNTIME_NAME; - (r = a.readU30()) && (n = b.strings[r]); + (q = a.readU30()) ? m = [e.namespaces[q]] : h &= ~b.RUNTIME_NAME; + (q = a.readU30()) && (p = e.strings[q]); break; case 15: ; case 16: - (r = a.readU30()) ? n = b.strings[r] : m &= ~d.RUNTIME_NAME; - m |= d.RUNTIME_NAMESPACE; + (q = a.readU30()) ? p = e.strings[q] : h &= ~b.RUNTIME_NAME; + h |= b.RUNTIME_NAMESPACE; break; case 17: ; case 18: - m |= d.RUNTIME_NAMESPACE; - m |= d.RUNTIME_NAME; + h |= b.RUNTIME_NAMESPACE; + h |= b.RUNTIME_NAME; break; case 9: ; case 14: - (r = a.readU30()) ? n = b.strings[r] : m &= ~d.RUNTIME_NAME; - r = a.readU30(); - u(0 !== r); - w = b.namespaceSets[r]; + (q = a.readU30()) ? p = e.strings[q] : h &= ~b.RUNTIME_NAME; + q = a.readU30(); + m = e.namespaceSets[q]; break; case 27: ; case 28: - m |= d.RUNTIME_NAME; - r = a.readU30(); - u(0 !== r); - w = b.namespaceSets[r]; + h |= b.RUNTIME_NAME; + q = a.readU30(); + m = e.namespaceSets[q]; break; case 29: - return b = a.readU32(), r = a.readU32(), u(1 === r), a = a.readU32(), r = void 0, g[b] && g[a] ? (r = new d(g[b].namespaces, g[b].name, m), r.typeParameter = g[a]) : f.push({index:k, factoryTypeIndex:b, typeParameterIndex:a, flags:m}), r; + return e = a.readU32(), a.readU32(), a = a.readU32(), q = void 0, f[e] && f[a] ? (q = new b(f[e].namespaces, f[e].name, h), q.typeParameter = f[a]) : g.push({index:c, factoryTypeIndex:e, typeParameterIndex:a, flags:h}), q; default: - c.Debug.unexpected(); + d.Debug.unexpected(); } - switch(e) { + switch(s) { case 13: ; case 16: @@ -7084,187 +7451,171 @@ __extends = this.__extends || function(c, h) { case 14: ; case 28: - m |= d.ATTRIBUTE; + h |= b.ATTRIBUTE; } - return new d(w, n, m); + return new b(m, p, h); }; - d.isMultiname = function(b) { - return "number" === typeof b || "string" === typeof b || b instanceof d || b instanceof Number; + b.isMultiname = function(e) { + return "number" === typeof e || "string" === typeof e || e instanceof b || e instanceof Number; }; - d.needsResolution = function(b) { - return b instanceof d && 1 < b.namespaces.length; + b.needsResolution = function(e) { + return e instanceof b && 1 < e.namespaces.length; }; - d.isQName = function(b) { - return b instanceof d ? b.namespaces && 1 === b.namespaces.length : !0; + b.isQName = function(e) { + return e instanceof b ? e.namespaces && 1 === e.namespaces.length : !0; }; - d.isRuntimeName = function(b) { - return b instanceof d && b.isRuntimeName(); + b.isRuntimeName = function(e) { + return e instanceof b && e.isRuntimeName(); }; - d.isRuntimeNamespace = function(b) { - return b instanceof d && b.isRuntimeNamespace(); + b.isRuntimeNamespace = function(e) { + return e instanceof b && e.isRuntimeNamespace(); }; - d.isRuntime = function(b) { - return b instanceof d && b.isRuntimeName() || b.isRuntimeNamespace(); + b.isRuntime = function(e) { + return e instanceof b && e.isRuntimeName() || e.isRuntimeNamespace(); }; - d.getQualifiedName = function(b) { - u(d.isQName(b)); - if (b instanceof d) { - if (void 0 !== b.qualifiedName) { - return b.qualifiedName; + b.getQualifiedName = function(e) { + if (e instanceof b) { + if (void 0 !== e.qualifiedName) { + return e.qualifiedName; } - var a = String(b.name); - if (v(a) && b.namespaces[0].isPublic()) { - return b.qualifiedName = a; + var a = String(e.name); + if (r(a) && e.namespaces[0].isPublic()) { + return e.qualifiedName = a; } - b = b.qualifiedName = d.qualifyName(b.namespaces[0], a); + e = e.qualifiedName = b.qualifyName(e.namespaces[0], a); } - return b; + return e; }; - d.qualifyName = function(b, d) { - return c.StringUtilities.concat3("$", b.qualifiedName, d); + b.qualifyName = function(b, e) { + return d.StringUtilities.concat3("$", b.qualifiedName, e); }; - d.stripPublicQualifier = function(d) { - var a = "$" + b.PUBLIC.qualifiedName; - return 0 !== d.indexOf(a) ? void 0 : d.substring(a.length); + b.stripPublicQualifier = function(b) { + var e = "$" + f.PUBLIC.qualifiedName; + return 0 !== b.indexOf(e) ? void 0 : b.substring(e.length); }; - d.fromQualifiedName = function(a) { - if (a instanceof d) { - return a; + b.fromQualifiedName = function(e) { + if (e instanceof b) { + return e; } - if (v(a)) { - return new d([b.PUBLIC], a, 0); + if (r(e)) { + return new b([f.PUBLIC], e, 0); } - if ("$" === a[0]) { - var g = b.fromQualifiedName(a.substring(1)); - return new d([g], a.substring(1 + g.qualifiedName.length), 0); + if ("$" === e[0]) { + var a = f.fromQualifiedName(e.substring(1)); + return new b([a], e.substring(1 + a.qualifiedName.length), 0); } }; - d.getNameFromPublicQualifiedName = function(b) { - b = d.fromQualifiedName(b); - u(b.getNamespace().isPublic()); - return b.name; + b.getNameFromPublicQualifiedName = function(e) { + return b.fromQualifiedName(e).name; }; - d.getFullQualifiedName = function(b) { - var a = d.getQualifiedName(b); - b instanceof d && b.typeParameter && (a += "$" + d.getFullQualifiedName(b.typeParameter)); + b.getFullQualifiedName = function(e) { + var a = b.getQualifiedName(e); + e instanceof b && e.typeParameter && (a += "$" + b.getFullQualifiedName(e.typeParameter)); return a; }; - d.getPublicQualifiedName = function(a) { - var g; - if ("string" === typeof a && (g = d._publicQualifiedNameCache[a])) { - return g; - } - if (v(a)) { - return c.toNumber(a); - } - if (null !== a && p(a)) { + b.getPublicQualifiedName = function(e) { + var a; + if ("string" === typeof e && (a = b._publicQualifiedNameCache[e])) { return a; } - g = d.qualifyName(b.PUBLIC, a); - "string" === typeof a && (d._publicQualifiedNameCache[a] = g); - return g; - }; - d.isPublicQualifiedName = function(d) { - return "number" === typeof d || v(d) || 1 === d.indexOf(b.PUBLIC.qualifiedName); - }; - d.getAccessModifier = function(b) { - u(d.isQName(b)); - if ("number" === typeof b || "string" === typeof b || b instanceof Number) { - return "public"; + if (r(e)) { + return d.toNumber(e); } - u(b instanceof d); - return b.namespaces[0].getAccessModifier(); + if (null !== e && v(e)) { + return e; + } + a = b.qualifyName(f.PUBLIC, e); + "string" === typeof e && (b._publicQualifiedNameCache[e] = a); + return a; }; - d.isNumeric = function(b) { - return "number" === typeof b ? !0 : "string" === typeof b ? v(b) : !isNaN(parseInt(d.getName(b), 10)); + b.isPublicQualifiedName = function(b) { + return "number" === typeof b || r(b) || 1 === b.indexOf(f.PUBLIC.qualifiedName); }; - d.getName = function(b) { - u(b instanceof d); - u(!b.isRuntimeName()); + b.getAccessModifier = function(b) { + return "number" === typeof b || "string" === typeof b || b instanceof Number ? "public" : b.namespaces[0].getAccessModifier(); + }; + b.isNumeric = function(e) { + return "number" === typeof e ? !0 : "string" === typeof e ? r(e) : !isNaN(parseInt(b.getName(e), 10)); + }; + b.getName = function(b) { return b.getName(); }; - d.isAnyName = function(b) { + b.isAnyName = function(b) { return "object" === typeof b && !b.isRuntimeName() && !b.name; }; - d.fromSimpleName = function(a) { - u(a); - if (a in d._simpleNameCache) { - return d._simpleNameCache[a]; + b.fromSimpleName = function(e) { + if (e in b._simpleNameCache) { + return b._simpleNameCache[e]; } - var g, f; - g = a.lastIndexOf("."); - 0 >= g && (g = a.lastIndexOf(" ")); - 0 < g && g < a.length - 1 ? (f = a.substring(g + 1).trim(), g = a.substring(0, g).trim()) : (f = a, g = ""); - return d._simpleNameCache[a] = new d(b.fromSimpleName(g), f, 0); + var a, g; + a = e.lastIndexOf("."); + 0 >= a && (a = e.lastIndexOf(" ")); + 0 < a && a < e.length - 1 ? (g = e.substring(a + 1).trim(), a = e.substring(0, a).trim()) : (g = e, a = ""); + return b._simpleNameCache[e] = new b(f.fromSimpleName(a), g, 0); }; - d.prototype.getQName = function(b) { - u(0 <= b && b < this.namespaces.length); + b.prototype.getQName = function(e) { this._qualifiedNameCache || (this._qualifiedNameCache = []); - var a = this._qualifiedNameCache[b]; - a || (a = this._qualifiedNameCache[b] = new d([this.namespaces[b]], this.name, this.flags)); + var a = this._qualifiedNameCache[e]; + a || (a = this._qualifiedNameCache[e] = new b([this.namespaces[e]], this.name, this.flags)); return a; }; - d.prototype.hasQName = function(b) { - u(b instanceof d); + b.prototype.hasQName = function(b) { if (this.name !== b.name) { return!1; } - for (var a = 0;a < this.namespaces.length;a++) { - if (this.namespaces[a].isEqualTo(b.namespaces[0])) { + for (var e = 0;e < this.namespaces.length;e++) { + if (this.namespaces[e].isEqualTo(b.namespaces[0])) { return!0; } } return!1; }; - d.prototype.isAttribute = function() { - return!!(this.flags & d.ATTRIBUTE); + b.prototype.isAttribute = function() { + return!!(this.flags & b.ATTRIBUTE); }; - d.prototype.isAnyName = function() { - return d.isAnyName(this); + b.prototype.isAnyName = function() { + return b.isAnyName(this); }; - d.prototype.isAnyNamespace = function() { + b.prototype.isAnyNamespace = function() { return!this.isRuntimeNamespace() && (0 === this.namespaces.length || this.isAnyName() && 1 !== this.namespaces.length); }; - d.prototype.isRuntimeName = function() { - return!!(this.flags & d.RUNTIME_NAME); + b.prototype.isRuntimeName = function() { + return!!(this.flags & b.RUNTIME_NAME); }; - d.prototype.isRuntimeNamespace = function() { - return!!(this.flags & d.RUNTIME_NAMESPACE); + b.prototype.isRuntimeNamespace = function() { + return!!(this.flags & b.RUNTIME_NAMESPACE); }; - d.prototype.isRuntime = function() { - return!!(this.flags & (d.RUNTIME_NAME | d.RUNTIME_NAMESPACE)); + b.prototype.isRuntime = function() { + return!!(this.flags & (b.RUNTIME_NAME | b.RUNTIME_NAMESPACE)); }; - d.prototype.isQName = function() { + b.prototype.isQName = function() { return 1 === this.namespaces.length && !this.isAnyName(); }; - d.prototype.hasTypeParameter = function() { + b.prototype.hasTypeParameter = function() { return!!this.typeParameter; }; - d.prototype.getName = function() { + b.prototype.getName = function() { return this.name; }; - d.prototype.getOriginalName = function() { - u(this.isQName()); + b.prototype.getOriginalName = function() { var b = this.namespaces[0].uri; b && (b += "."); return b + this.name; }; - d.prototype.getNamespace = function() { - u(!this.isRuntimeNamespace()); - u(1 === this.namespaces.length); + b.prototype.getNamespace = function() { return this.namespaces[0]; }; - d.prototype.nameToString = function() { + b.prototype.nameToString = function() { if (this.isAnyName()) { return "*"; } var b = this.getName(); return this.isRuntimeName() ? "[]" : b; }; - d.prototype.hasObjectName = function() { + b.prototype.hasObjectName = function() { return "object" === typeof this.name; }; - d.prototype.toString = function() { + b.prototype.toString = function() { var b = this.isAttribute() ? "@" : ""; if (this.isAnyNamespace()) { b += "*::" + this.nameToString(); @@ -7275,8 +7626,8 @@ __extends = this.__extends || function(c, h) { if (1 === this.namespaces.length && this.isQName()) { b += this.namespaces[0].toString() + "::", b += this.nameToString(); } else { - for (var b = b + "{", d = 0, a = this.namespaces.length;d < a;d++) { - b += this.namespaces[d].toString(), d + 1 < a && (b += ","); + for (var b = b + "{", e = 0, a = this.namespaces.length;e < a;e++) { + b += this.namespaces[e].toString(), e + 1 < a && (b += ","); } b += "}::" + this.nameToString(); } @@ -7285,47 +7636,47 @@ __extends = this.__extends || function(c, h) { this.hasTypeParameter() && (b += "<" + this.typeParameter.toString() + ">"); return b; }; - d.ATTRIBUTE = 1; - d.RUNTIME_NAMESPACE = 2; - d.RUNTIME_NAME = 4; - d._nextID = 0; - d._publicQualifiedNameCache = c.ObjectUtilities.createMap(); - d._simpleNameCache = c.ObjectUtilities.createMap(); - d.Int = d.getPublicQualifiedName("int"); - d.Uint = d.getPublicQualifiedName("uint"); - d.Class = d.getPublicQualifiedName("Class"); - d.Array = d.getPublicQualifiedName("Array"); - d.Object = d.getPublicQualifiedName("Object"); - d.String = d.getPublicQualifiedName("String"); - d.Number = d.getPublicQualifiedName("Number"); - d.Boolean = d.getPublicQualifiedName("Boolean"); - d.Function = d.getPublicQualifiedName("Function"); - d.XML = d.getPublicQualifiedName("XML"); - d.XMLList = d.getPublicQualifiedName("XMLList"); - d.TO_STRING = d.getPublicQualifiedName("toString"); - d.VALUE_OF = d.getPublicQualifiedName("valueOf"); - d.TEMPORARY = new d([], "", 0); - return d; + b.ATTRIBUTE = 1; + b.RUNTIME_NAMESPACE = 2; + b.RUNTIME_NAME = 4; + b._nextID = 0; + b._publicQualifiedNameCache = d.ObjectUtilities.createMap(); + b._simpleNameCache = d.ObjectUtilities.createMap(); + b.Int = b.getPublicQualifiedName("int"); + b.Uint = b.getPublicQualifiedName("uint"); + b.Class = b.getPublicQualifiedName("Class"); + b.Array = b.getPublicQualifiedName("Array"); + b.Object = b.getPublicQualifiedName("Object"); + b.String = b.getPublicQualifiedName("String"); + b.Number = b.getPublicQualifiedName("Number"); + b.Boolean = b.getPublicQualifiedName("Boolean"); + b.Function = b.getPublicQualifiedName("Function"); + b.XML = b.getPublicQualifiedName("XML"); + b.XMLList = b.getPublicQualifiedName("XMLList"); + b.TO_STRING = b.getPublicQualifiedName("toString"); + b.VALUE_OF = b.getPublicQualifiedName("valueOf"); + b.TEMPORARY = new b([], "", 0); + return b; }(); - a.Multiname = g; - var r = function() { - function b(d, a) { - for (var g = d.constantPool.strings, f = this.name = g[a.readU30()], k = a.readU30(), r = [], e = [], n = 0;n < k;n++) { - r[n] = g[a.readU30()]; + a.Multiname = b; + var e = function() { + function b(e, a) { + for (var f = e.constantPool.strings, n = this.name = f[a.readU30()], g = a.readU30(), c = [], q = [], s = 0;s < g;s++) { + c[s] = f[a.readU30()]; } - for (n = 0;n < k;n++) { - var w = r[n]; - e[n] = {key:w, value:g[a.readU30()]}; - w && "native" === f && (u(!this.hasOwnProperty(w)), this[w] = e[n].value); + for (s = 0;s < g;s++) { + var p = c[s]; + q[s] = {key:p, value:f[a.readU30()]}; + p && "native" === n && (this[p] = q[s].value); } - this.value = e; + this.value = q; } b.prototype.toString = function() { return "[" + this.name + "]"; }; return b; }(); - a.MetaDataInfo = r; + a.MetaDataInfo = e; (function(b) { b[b.Undefined = 0] = "Undefined"; b[b.Utf8 = 1] = "Utf8"; @@ -7371,6 +7722,10 @@ __extends = this.__extends || function(c, h) { b[b.Native = 32] = "Native"; b[b.Setsdxns = 64] = "Setsdxns"; b[b.HasParamNames = 128] = "HasParamNames"; + b[b.HasBody = 256] = "HasBody"; + b[b.InstanceInitializer = 512] = "InstanceInitializer"; + b[b.ClassInitializer = 1024] = "ClassInitializer"; + b[b.ScriptInitializer = 2048] = "ScriptInitializer"; })(a.METHOD || (a.METHOD = {})); (function(b) { b[b.Slot = 0] = "Slot"; @@ -7381,7 +7736,6 @@ __extends = this.__extends || function(c, h) { b[b.Function = 5] = "Function"; b[b.Const = 6] = "Const"; })(a.TRAIT || (a.TRAIT = {})); - var w = a.TRAIT; (function(b) { b[b.Final = 1] = "Final"; b[b.Override = 2] = "Override"; @@ -7394,92 +7748,90 @@ __extends = this.__extends || function(c, h) { b[b.RETURNINDEXEDARRAY = 8] = "RETURNINDEXEDARRAY"; b[b.NUMERIC = 16] = "NUMERIC"; })(a.SORT || (a.SORT = {})); - var z = function() { - function d(a, f) { - var k, r = [0]; - k = a.readU30(); - for (var e = 1;e < k;++e) { - r.push(a.readS32()); + var q = function() { + function e(a, g) { + var c, q = [0]; + c = a.readU30(); + for (var s = 1;s < c;++s) { + q.push(a.readS32()); } - var n = [0]; - k = a.readU30(); - for (e = 1;e < k;++e) { - n.push(a.readU32()); + var p = [0]; + c = a.readU30(); + for (s = 1;s < c;++s) { + p.push(a.readU32()); } - var w = [NaN]; - k = a.readU30(); - for (e = 1;e < k;++e) { - w.push(a.readDouble()); + var m = [NaN]; + c = a.readU30(); + for (s = 1;s < c;++s) { + m.push(a.readDouble()); } - h.enterTimeline("Parse Strings"); - var m = [""]; - k = a.readU30(); - for (e = 1;e < k;++e) { - m.push(a.readUTFString(a.readU30())); + k.enterTimeline("Parse Strings"); + var h = [""]; + c = a.readU30(); + for (s = 1;s < c;++s) { + h.push(a.readUTFString(a.readU30())); } - h.leaveTimeline(); - this.ints = r; - this.uints = n; - this.doubles = w; - this.strings = m; - h.enterTimeline("Parse Namespaces"); - r = [void 0]; - k = a.readU30(); - for (e = 1;e < k;++e) { - r.push(b.parse(this, a, f.hash + e)); + k.leaveTimeline(); + this.ints = q; + this.uints = p; + this.doubles = m; + this.strings = h; + k.enterTimeline("Parse Namespaces"); + q = [void 0]; + c = a.readU30(); + for (s = 1;s < c;++s) { + q.push(f.parse(this, a, g.hash + s)); } - h.leaveTimeline(); - h.enterTimeline("Parse Namespace Sets"); - n = [void 0]; - k = a.readU30(); - for (e = 1;e < k;++e) { - w = a.readU30(); - m = []; - m.runtimeId = d._nextNamespaceSetID++; - m.hash = f.hash & 65535 | 262144 | e << 19; - for (var c = 0;c < w;++c) { - m.push(r[a.readU30()]); + k.leaveTimeline(); + k.enterTimeline("Parse Namespace Sets"); + p = [void 0]; + c = a.readU30(); + for (s = 1;s < c;++s) { + m = a.readU30(); + h = []; + h.runtimeId = e._nextNamespaceSetID++; + h.hash = g.hash & 65535 | 262144 | s << 19; + for (var l = 0;l < m;++l) { + h.push(q[a.readU30()]); } - n.push(m); + p.push(h); } - h.leaveTimeline(); - this.namespaces = r; - this.namespaceSets = n; - h.enterTimeline("Parse Multinames"); - r = [void 0]; - n = []; - k = a.readU30(); - for (e = 1;e < k;++e) { - r.push(g.parse(this, a, r, n, e)); + k.leaveTimeline(); + this.namespaces = q; + this.namespaceSets = p; + k.enterTimeline("Parse Multinames"); + q = [void 0]; + p = []; + c = a.readU30(); + for (s = 1;s < c;++s) { + q.push(b.parse(this, a, q, p, s)); } - for (e = 0;e < n.length;e++) { - k = n[e], m = r[k.factoryTypeIndex], w = r[k.typeParameterIndex], u(m && w), m = new g(m.namespaces, m.name, k.flags), m.typeParameter = w, r[k.index] = m; + for (s = 0;s < p.length;s++) { + c = p[s], h = q[c.factoryTypeIndex], m = q[c.typeParameterIndex], h = new b(h.namespaces, h.name, c.flags), h.typeParameter = m, q[c.index] = h; } - h.leaveTimeline(); - this.multinames = r; + k.leaveTimeline(); + this.multinames = q; } - d.prototype.getValue = function(b, d) { + e.prototype.getValue = function(b, e) { switch(b) { case 3: - return this.ints[d]; + return this.ints[e]; case 4: - return this.uints[d]; + return this.uints[e]; case 6: - return this.doubles[d]; + return this.doubles[e]; case 1: - return this.strings[d]; + return this.strings[e]; case 11: return!0; case 10: return!1; case 12: return null; - case 0: - break; case 8: ; case 23: - return this.namespaces[d]; + return this.namespaces[e]; case 7: ; case 14: @@ -7495,183 +7847,172 @@ __extends = this.__extends || function(c, h) { case 19: ; case 20: - return this.multinames[d]; - case 2: - c.Debug.warning("TODO: CONSTANT.Float may be deprecated?"); - break; - default: - u(!1, "Not Implemented Kind " + b); + return this.multinames[e]; } }; - d._nextNamespaceSetID = 1; - return d; + e._nextNamespaceSetID = 1; + return e; }(); - a.ConstantPool = z; - })(h.ABC || (h.ABC = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.ConstantPool = q; + })(k.ABC || (k.ABC = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(a, e, k, f) { - void 0 === f && (f = null); - 0 !== k.length && (a.enter(e + " {"), k.forEach(function(d, b) { - d.trace(a, f); + function r(a, c, m, g) { + void 0 === g && (g = null); + 0 !== m.length && (a.enter(c + " {"), m.forEach(function(f, b) { + f.trace(a, g); }), a.leave("}")); } - function h(a, e, k) { - var f; - void 0 === f && (f = !1); - var d = k.position, b = ""; - null === a.operands ? b = "null" : a.operands.forEach(function(d, f) { - var w = b, m; + function v(a, c, m) { + var g; + void 0 === g && (g = !1); + var f = m.position, b = ""; + null === a.operands ? b = "null" : a.operands.forEach(function(e, f) { + var g = b, h; a: { - m = 0; - switch(d.size) { - case "s08": - m = k.readS8(); + h = 0; + switch(e.size) { + case 1: + h = m.readS8(); break; - case "u08": - m = k.readU8(); + case 0: + h = m.readU8(); break; - case "s16": - m = k.readS16(); + case 2: + h = m.readS16(); break; - case "s24": - m = k.readS24(); + case 3: + h = m.readS24(); break; - case "u30": - m = k.readU30(); + case 4: + h = m.readU30(); break; - case "u32": - m = k.readU32(); - break; - default: - l(!1); + case 5: + h = m.readU32(); } - var c = ""; - switch(d.type) { + var l = ""; + switch(e.type) { case "": break; case "I": - c = e.constantPool.ints[m]; + l = c.constantPool.ints[h]; break; case "U": - c = e.constantPool.uints[m]; + l = c.constantPool.uints[h]; break; case "D": - c = e.constantPool.doubles[m]; + l = c.constantPool.doubles[h]; break; case "S": - c = e.constantPool.strings[m]; + l = c.constantPool.strings[h]; break; case "N": - c = e.constantPool.namespaces[m]; + l = c.constantPool.namespaces[h]; break; case "CI": - c = e.classes[m]; + l = c.classes[h]; break; case "M": - m = e.constantPool.multinames[m]; + h = c.constantPool.multinames[h]; break a; default: - c = "?"; + l = "?"; } - m = d.name + ":" + m + ("" === c ? "" : " (" + c + ")"); + h = e.name + ":" + h + ("" === l ? "" : " (" + l + ")"); } - b = w + m; + b = g + h; f < a.operands.length - 1 && (b += ", "); }); - f && k.seek(d); + g && m.seek(f); return b; } - function p(a, e) { - var k = new t(a); - e.scripts.forEach(function(a) { - k.traceTraits(a.traits); + function u(a, c) { + var m = new h(a); + c.scripts.forEach(function(a) { + m.traceTraits(a.traits); }); } - function u(e, n) { - var k = new c.Metrics.Counter(!0), f = new c.Metrics.Counter(!0), d = new c.Metrics.Counter(!0), b = new c.Metrics.Counter(!0), g = {}, r = {}, w = {}; - n.classes.forEach(function(b) { - g[b.instanceInfo.name.name] = !0; + function t(c, s) { + var m = new d.Metrics.Counter(!0), g = new d.Metrics.Counter(!0), f = new d.Metrics.Counter(!0), b = new d.Metrics.Counter(!0), e = {}, q = {}, n = {}; + s.classes.forEach(function(b) { + e[b.instanceInfo.name.name] = !0; }); - n.scripts.forEach(function(b) { + s.scripts.forEach(function(b) { b.traits.forEach(function(b) { if (b.isClass()) { - var d = b.classInfo.instanceInfo.superName ? b.classInfo.instanceInfo.superName.name : "?"; - d in g || f.count(d); + var a = b.classInfo.instanceInfo.superName ? b.classInfo.instanceInfo.superName.name : "?"; + a in e || g.count(a); b.classInfo.traits.forEach(function(b) { - b.isMethod() ? r[b.name.name] = !0 : w[b.name.name] = !0; + b.isMethod() ? q[b.name.name] = !0 : n[b.name.name] = !0; }); b.classInfo.instanceInfo.traits.forEach(function(b) { - !b.isMethod() || b.attributes & 2 ? w[b.name.name] = !0 : r[b.name.name] = !0; + !b.isMethod() || b.attributes & 2 ? n[b.name.name] = !0 : q[b.name.name] = !0; }); } }); }); - var m = new c.Metrics.Counter(!0); - n.methods.forEach(function(f) { - function e(b) { - var d = 0; + var h = new d.Metrics.Counter(!0); + s.methods.forEach(function(g) { + function c(b) { + var e = 0; switch(b.size) { - case "s08": - d = q.readS8(); + case 1: + e = p.readS8(); break; - case "u08": - d = q.readU8(); + case 0: + e = p.readU8(); break; - case "s16": - d = q.readS16(); + case 2: + e = p.readS16(); break; - case "s24": - d = q.readS24(); + case 3: + e = p.readS24(); break; - case "u30": - d = q.readU30(); + case 4: + e = p.readU30(); break; - case "u32": - d = q.readU32(); - break; - default: - l(!1); + case 5: + e = p.readU32(); } var a = ""; switch(b.type) { case "": break; case "I": - a = n.constantPool.ints[d]; + a = s.constantPool.ints[e]; break; case "U": - a = n.constantPool.uints[d]; + a = s.constantPool.uints[e]; break; case "D": - a = n.constantPool.doubles[d]; + a = s.constantPool.doubles[e]; break; case "S": - a = n.constantPool.strings[d]; + a = s.constantPool.strings[e]; break; case "N": - a = n.constantPool.namespaces[d]; + a = s.constantPool.namespaces[e]; break; case "CI": - a = n.classes[d]; + a = s.classes[e]; break; case "M": - a = n.constantPool.multinames[d]; + a = s.constantPool.multinames[e]; break; default: a = "?"; } return a; } - if (f.code) { - for (var q = new a.AbcStream(f.code);0 < q.remaining();) { - f = q.readU8(); - var t = c.AVM2.opcodeTable[f], s = null; - if (t) { - switch(m.count(t.name), t.operands && (s = t.operands.map(e)), f) { + if (g.code) { + for (var p = new a.AbcStream(g.code);0 < p.remaining();) { + g = p.readU8(); + var l = k.opcodeTable[g], d = null; + if (l) { + switch(h.count(k.opcodeName(l)), l.operands && (d = l.operands.map(c)), g) { case 65: ; case 67: @@ -7687,164 +8028,164 @@ __extends = this.__extends || function(c, h) { case 69: ; case 78: - !s[0] || s[0].name in r || d.count(s[0].name); + !d[0] || d[0].name in q || f.count(d[0].name); break; case 74: - !s[0] || s[0].name in g || k.count(s[0].name); + !d[0] || d[0].name in e || m.count(d[0].name); break; case 102: ; case 97: - !s[0] || s[0].name in w || b.count(s[0].name); + !d[0] || d[0].name in n || b.count(d[0].name); } } } } }); - e.writeLn(JSON.stringify({definedClasses:g, definedMethods:r, definedProperties:w, libraryClasses:k.counts, librarySuperClasses:f.counts, libraryMethods:d.counts, libraryProperties:b.counts, operations:m.counts}, null, 2)); + c.writeLn(JSON.stringify({definedClasses:e, definedMethods:q, definedProperties:n, libraryClasses:m.counts, librarySuperClasses:g.counts, libraryMethods:f.counts, libraryProperties:b.counts, operations:h.counts}, null, 2)); } - var l = c.Debug.assert, e = c.Debug.notImplemented, m = new c.Options.Option("f", "filter", "string", "SpciMsmNtu", "[S]ource, constant[p]ool, [c]lasses, [i]nstances, [M]etadata, [s]cripts, [m]ethods, multi[N]ames, S[t]atistics, [u]tf"); + var l = d.Debug.notImplemented, c = new d.Options.Option("f", "filter", "string", "SpciMsmNtu", "[S]ource, constant[p]ool, [c]lasses, [i]nstances, [M]etadata, [s]cripts, [m]ethods, multi[N]ames, S[t]atistics, [u]tf"); a.AbcFile.prototype.trace = function(a) { - 0 <= m.value.indexOf("p") && this.constantPool.trace(a); - 0 <= m.value.indexOf("N") && a.writeArray(this.constantPool.multinames, null, !0); - 0 <= m.value.indexOf("c") && s(a, "classes", this.classes); - 0 <= m.value.indexOf("i") && s(a, "instances", this.instances); - 0 <= m.value.indexOf("M") && s(a, "metadata", this.metadata); - 0 <= m.value.indexOf("s") && s(a, "scripts", this.scripts); - 0 <= m.value.indexOf("m") && s(a, "methods", this.methods, this); - 0 <= m.value.indexOf("S") && p(a, this); - 0 <= m.value.indexOf("t") && u(a, this); + 0 <= c.value.indexOf("p") && this.constantPool.trace(a); + 0 <= c.value.indexOf("N") && a.writeArray(this.constantPool.multinames, null, !0); + 0 <= c.value.indexOf("c") && r(a, "classes", this.classes); + 0 <= c.value.indexOf("i") && r(a, "instances", this.instances); + 0 <= c.value.indexOf("M") && r(a, "metadata", this.metadata); + 0 <= c.value.indexOf("s") && r(a, "scripts", this.scripts); + 0 <= c.value.indexOf("m") && r(a, "methods", this.methods, this); + 0 <= c.value.indexOf("S") && u(a, this); + 0 <= c.value.indexOf("t") && t(a, this); }; a.ConstantPool.prototype.trace = function(a) { a.enter("constantPool {"); - for (var e in this) { - "namespaces" === e ? (a.enter("namespaces {"), this.namespaces.forEach(function(k, f) { - a.writeLn(("" + f).padRight(" ", 3) + (k ? k.toString() : "*")); - }), a.leave("}")) : this[e] instanceof Array && (a.enter(e + " " + this[e].length + " {"), a.writeArray(this[e]), a.leave("}")); + for (var c in this) { + "namespaces" === c ? (a.enter("namespaces {"), this.namespaces.forEach(function(c, g) { + a.writeLn(("" + g).padRight(" ", 3) + (c ? c.toString() : "*")); + }), a.leave("}")) : this[c] instanceof Array && (a.enter(c + " " + this[c].length + " {"), a.writeArray(this[c]), a.leave("}")); } a.leave("}"); }; a.ClassInfo.prototype.trace = function(a) { a.enter("class " + this + " {"); - s(a, "traits", this.traits); + r(a, "traits", this.traits); a.leave("}"); }; a.MetaDataInfo.prototype.trace = function(a) { a.enter(this + " {"); - this.value.forEach(function(e) { - a.writeLn((e.key ? e.key + ": " : "") + '"' + e.value + '"'); + this.value.forEach(function(c) { + a.writeLn((c.key ? c.key + ": " : "") + '"' + c.value + '"'); }); a.leave("}"); }; a.InstanceInfo.prototype.trace = function(a) { a.enter("instance " + this + " {"); - s(a, "traits", this.traits); + r(a, "traits", this.traits); a.leave("}"); }; a.ScriptInfo.prototype.trace = function(a) { a.enter("script " + this + " {"); - s(a, "traits", this.traits); + r(a, "traits", this.traits); a.leave("}"); }; a.Trait.prototype.trace = function(a) { if (this.metadata) { - for (var e in this.metadata) { - this.metadata.hasOwnProperty(e) && this.metadata[e].trace(a); + for (var c in this.metadata) { + this.metadata.hasOwnProperty(c) && this.metadata[c].trace(a); } } a.writeLn(this); }; - a.MethodInfo.prototype.trace = function(e) { - var n = this.abc; - e.enter("method" + (this.name ? " " + this.name : "") + " {"); - e.writeLn("flags: " + c.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL NATIVE SET_DXN HAS_PARAM_NAMES".split(" "))); - e.writeLn("parameters: " + this.parameters.map(function(b) { + a.MethodInfo.prototype.trace = function(c) { + var s = this.abc; + c.enter("method" + (this.name ? " " + this.name : "") + " {"); + c.writeLn("flags: " + d.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL NATIVE SET_DXN HAS_PARAM_NAMES".split(" "))); + c.writeLn("parameters: " + this.parameters.map(function(b) { return(b.type ? a.Multiname.getQualifiedName(b.type) + "::" : "") + b.name; })); if (this.code) { - var k = new a.AbcStream(this.code); - s(e, "traits", this.traits); - for (e.enter("code {");0 < k.remaining();) { - var f = k.readU8(), d = c.AVM2.opcodeTable[f], b; - b = ("" + k.position).padRight(" ", 6); - switch(f) { + var m = new a.AbcStream(this.code); + r(c, "traits", this.traits); + for (c.enter("code {");0 < m.remaining();) { + var g = m.readU8(), f = d.AVM2.opcodeTable[g], b; + b = ("" + m.position).padRight(" ", 6); + switch(g) { case 27: - b += d.name + ": defaultOffset: " + k.readS24(); - f = k.readU30(); - b += ", caseCount: " + f; - for (d = 0;d < f + 1;d++) { - b += " offset: " + k.readS24(); + b += k.opcodeName(g) + ": defaultOffset: " + m.readS24(); + g = m.readU30(); + b += ", caseCount: " + g; + for (f = 0;f < g + 1;f++) { + b += " offset: " + m.readS24(); } - e.writeLn(b); + c.writeLn(b); break; default: - d ? (b += d.name.padRight(" ", 20), d.operands ? (0 < d.operands.length && (b += h(d, n, k)), e.writeLn(b)) : l(!1, "Opcode: " + d.name + " has undefined operands.")) : l(!1, "Opcode: " + f + " is not implemented."); + f && (b += k.opcodeName(g).padRight(" ", 20), f.operands && (0 < f.operands.length && (b += v(f, s, m)), c.writeLn(b))); } } - e.leave("}"); + c.leave("}"); } - e.leave("}"); + c.leave("}"); }; - var t = function() { - function m(a) { + var h = function() { + function c(a) { return void 0 === a ? "undefined" : null === a ? "null" : "string" === typeof a ? '"' + a + '"' : String(a); } - function n(a, d) { - void 0 === d && (d = !1); + function s(a, f) { + void 0 === f && (f = !1); return a.parameters.map(function(b) { - var a = b.name; - d || (b.type && (a += ":" + b.type.getName()), void 0 !== b.value && (a += " = " + m(b.value))); - return a; + var e = b.name; + f || (b.type && (e += ":" + b.type.getName()), void 0 !== b.value && (e += " = " + c(b.value))); + return e; }).join(", "); } - function k(a) { + function m(a) { this.writer = a; } - k.prototype = {traceTraits:function(f, d, b) { - var g = this.writer, k = this; - f.forEach(function(f) { - var c; - c = a.Multiname.getAccessModifier(f.name); - var l = f.name.namespaces[0].uri; - l && ("http://adobe.com/AS3/2006/builtin" === l && (l = "AS3"), c = "public" === c ? b === l ? "" : l : c); - d && (c += " static"); - if (f.isSlot() || f.isConst()) { - k.traceMetadata(f.metadata), c = f.isConst() ? c + " const" : c + " var", c += " " + f.name.getName(), f.typeName && (c += ":" + f.typeName.getName()), f.value && (c += " = " + m(f.value)), g.writeLn(c + ";"); + m.prototype = {traceTraits:function(g, f, b) { + var e = this.writer, q = this; + g.forEach(function(g) { + var m; + m = a.Multiname.getAccessModifier(g.name); + var h = g.name.namespaces[0].uri; + h && ("http://adobe.com/AS3/2006/builtin" === h && (h = "AS3"), m = "public" === m ? b === h ? "" : h : m); + f && (m += " static"); + if (g.isSlot() || g.isConst()) { + q.traceMetadata(g.metadata), m = g.isConst() ? m + " const" : m + " var", m += " " + g.name.getName(), g.typeName && (m += ":" + g.typeName.getName()), g.value && (m += " = " + c(g.value)), e.writeLn(m + ";"); } else { - if (f.isMethod() || f.isGetter() || f.isSetter()) { - k.traceMetadata(f.metadata); - l = f.methodInfo; - f.attributes & 2 && (c += " override"); - l.isNative() && (c += " native"); - c = c + " function" + (f.isGetter() ? " get" : f.isSetter() ? " set" : ""); - c += " " + f.name.getName(); - c += "(" + n(l) + ")"; - c += l.returnType ? ":" + l.returnType.getName() : ""; - var t; - f.holder instanceof a.ClassInfo ? (t = f.holder.instanceInfo.name, t.getName()) : f.holder instanceof a.InstanceInfo && (t = f.holder.name, t.getName()); - l.isNative(); - l.isNative() ? g.writeLn(c + ";") : b ? g.writeLn(c + ";") : g.writeLn(c + ' { notImplemented("' + f.name.getName() + '"); }'); + if (g.isMethod() || g.isGetter() || g.isSetter()) { + q.traceMetadata(g.metadata); + h = g.methodInfo; + g.attributes & 2 && (m += " override"); + h.isNative() && (m += " native"); + m = m + " function" + (g.isGetter() ? " get" : g.isSetter() ? " set" : ""); + m += " " + g.name.getName(); + m += "(" + s(h) + ")"; + m += h.returnType ? ":" + h.returnType.getName() : ""; + var d; + g.holder instanceof a.ClassInfo ? (d = g.holder.instanceInfo.name, d.getName()) : g.holder instanceof a.InstanceInfo && (d = g.holder.name, d.getName()); + h.isNative(); + h.isNative() ? e.writeLn(m + ";") : b ? e.writeLn(m + ";") : e.writeLn(m + ' { notImplemented("' + g.name.getName() + '"); }'); } else { - f.isClass() ? (t = f.classInfo.instanceInfo.name, g.enter("package " + t.namespaces[0].uri + " {\n"), k.traceMetadata(f.metadata), k.traceClass(f.classInfo), g.leave("\n}"), k.traceClassStub(f)) : e(f); + g.isClass() ? (d = g.classInfo.instanceInfo.name, e.enter("package " + d.namespaces[0].uri + " {\n"), q.traceMetadata(g.metadata), q.traceClass(g.classInfo), e.leave("\n}"), q.traceClassStub(g)) : l(g); } } }); }, traceClassStub2:function(a) { - function d(d, a) { + function f(e, a) { void 0 === a && (a = !1); - var g = []; - d.forEach(function(b, d) { - (b.isMethod() || b.isGetter() || b.isSetter()) && b.methodInfo.isNative() && g.push(b); + var f = []; + e.forEach(function(b, e) { + (b.isMethod() || b.isGetter() || b.isSetter()) && b.methodInfo.isNative() && f.push(b); }); - g.forEach(function(d, a) { - var f = d.methodInfo, k = d.name.getName(); - b.writeLn("// " + k + " :: " + (f.parameters.length ? n(f) : "void") + " -> " + (f.returnType ? f.returnType.getName() : "any")); - b.enter((d.isGetter() ? '"get ' + k + '"' : d.isSetter() ? '"set ' + k + '"' : k) + ": function " + k + "(" + n(f, !0) + ") {"); - b.writeLn(' notImplemented("' + e + "." + k + '");'); - b.leave("}" + (a === g.length - 1 ? "" : ",\n")); + f.forEach(function(e, a) { + var g = e.methodInfo, c = e.name.getName(); + b.writeLn("// " + c + " :: " + (g.parameters.length ? s(g) : "void") + " -> " + (g.returnType ? g.returnType.getName() : "any")); + b.enter((e.isGetter() ? '"get ' + c + '"' : e.isSetter() ? '"set ' + c + '"' : c) + ": function " + c + "(" + s(g, !0) + ") {"); + b.writeLn(' notImplemented("' + n + "." + c + '");'); + b.leave("}" + (a === f.length - 1 ? "" : ",\n")); }); } - var b = this.writer, g = a.classInfo, k = g.instanceInfo, e = k.name.getName(); + var b = this.writer, e = a.classInfo, c = e.instanceInfo, n = c.name.getName(); a = a.metadata ? a.metadata.native : null; if (!a) { return!1; @@ -7852,20 +8193,20 @@ __extends = this.__extends || function(c, h) { b.writeLn("Cut and paste the following into `native.js' and edit accordingly"); b.writeLn("8< --------------------------------------------------------------"); b.enter("natives." + a.cls + " = function " + a.cls + "(runtime, scope, instanceConstructor, baseClass) {"); - b.writeLn('var c = new Class("' + e + '", instanceConstructor, ApplicationDomain.passthroughCallable(instanceConstructor));'); + b.writeLn('var c = new Class("' + n + '", instanceConstructor, ApplicationDomain.passthroughCallable(instanceConstructor));'); b.writeLn("c.extend(baseClass);\n"); b.enter("c.nativeStatics = {"); - d(g.traits, !0); + f(e.traits, !0); b.leave("};\n"); b.enter("c.nativeMethods = {"); - d(k.traits); + f(c.traits); b.leave("};\n"); b.writeLn("return c;"); b.leave("};"); b.writeLn("-------------------------------------------------------------- >8"); return!0; }, traceClassStub:function(a) { - function d(b) { + function f(b) { return{properties:b.filter(function(b) { return!1; }), methods:b.filter(function(b) { @@ -7873,99 +8214,99 @@ __extends = this.__extends || function(c, h) { })}; } function b(b, a) { - function f(b, d) { - var k = b.methodInfo, r = b.name.getName(), m = "// (" + (k.parameters.length ? n(k) : "void") + ") -> " + (k.returnType ? k.returnType.getName() : "any"), c = r; - b.isGetter() ? c = "get" : b.isSetter() && (c = "set"); - g.enter(c + ": function " + r + "(" + n(k, !0) + ") { " + m); - g.writeLn('notImplemented("' + e + "." + r + '");'); - a || (b.isGetter() ? g.writeLn("return this._" + r + ";") : b.isSetter() && g.writeLn("this._" + r + " = " + k.parameters[0].name + ";")); - g.leave("}" + (d ? "," : "")); + function g(b, f) { + var c = b.methodInfo, q = b.name.getName(), m = "// (" + (c.parameters.length ? s(c) : "void") + ") -> " + (c.returnType ? c.returnType.getName() : "any"), p = q; + b.isGetter() ? p = "get" : b.isSetter() && (p = "set"); + e.enter(p + ": function " + q + "(" + s(c, !0) + ") { " + m); + e.writeLn('notImplemented("' + n + "." + q + '");'); + a || (b.isGetter() ? e.writeLn("return this._" + q + ";") : b.isSetter() && e.writeLn("this._" + q + " = " + c.parameters[0].name + ";")); + e.leave("}" + (f ? "," : "")); } void 0 === a && (a = !1); - b = d(b); - var k = [], r = Object.create(null); - b.methods.forEach(function(b, d) { + b = f(b); + var c = [], q = Object.create(null); + b.methods.forEach(function(b, e) { var a = b.name.getName(); - b.isGetter() || b.isSetter() ? (r[a] || (r[a] = []), r[a].push(b)) : k.push(b); + b.isGetter() || b.isSetter() ? (q[a] || (q[a] = []), q[a].push(b)) : c.push(b); }); - for (var m = 0;m < k.length;m++) { - f(k[m], m < k.length - 1); + for (var m = 0;m < c.length;m++) { + g(c[m], m < c.length - 1); } - for (var q = c.ObjectUtilities.toKeyValueArray(r), l = 0;l < q.length;l++) { - g.enter(q[l][0] + ": {"); - for (var t = q[l][1], m = 0;m < t.length;m++) { - f(t[m], m < t.length - 1); + for (var p = d.ObjectUtilities.toKeyValueArray(q), h = 0;h < p.length;h++) { + e.enter(p[h][0] + ": {"); + for (var l = p[h][1], m = 0;m < l.length;m++) { + g(l[m], m < l.length - 1); } - g.leave("}" + (l < q.length - 1 ? "," : "")); + e.leave("}" + (h < p.length - 1 ? "," : "")); } - b.properties.forEach(function(d, a) { - var f = d.name.getName(), k = a === b.properties.length - 1; - d.name.getNamespace().isPublic() && g.writeLn(f + ": " + ("'public " + d.name.name + "'") + (k ? "" : ",")); + b.properties.forEach(function(a, f) { + var g = a.name.getName(), c = f === b.properties.length - 1; + a.name.getNamespace().isPublic() && e.writeLn(g + ": " + ("'public " + a.name.name + "'") + (c ? "" : ",")); }); } - var g = this.writer; + var e = this.writer; a = a.classInfo; - var k = a.instanceInfo, e = k.name.getName(); - g.writeLn("Cut and paste the following glue and edit accordingly."); - g.writeLn("Class " + k); - g.writeLn("8< --------------------------------------------------------------"); - var m = k.name.namespaces[0].uri; - g.enter("var " + e + "Definition = (function () {"); - g.enter("return {"); - g.writeLn("// (" + n(k.init, !1) + ")"); - g.writeLn('__class__: "' + m + "." + e + '",'); - g.enter("initialize: function () {"); - g.leave("},"); - g.enter("__glue__: {"); - g.enter("native: {"); - g.enter("static: {"); + var c = a.instanceInfo, n = c.name.getName(); + e.writeLn("Cut and paste the following glue and edit accordingly."); + e.writeLn("Class " + c); + e.writeLn("8< --------------------------------------------------------------"); + var m = c.name.namespaces[0].uri; + e.enter("var " + n + "Definition = (function () {"); + e.enter("return {"); + e.writeLn("// (" + s(c.init, !1) + ")"); + e.writeLn('__class__: "' + m + "." + n + '",'); + e.enter("initialize: function () {"); + e.leave("},"); + e.enter("__glue__: {"); + e.enter("native: {"); + e.enter("static: {"); b(a.traits, !0); - g.leave("},"); - g.enter("instance: {"); - b(k.traits); - g.leave("}"); - g.leave("},"); - g.enter("script: {"); - g.writeLn("instance: Glue.ALL"); - g.leave("}"); - g.leave("}"); - g.leave("};"); - g.leave("}).call(this);"); - g.writeLn("-------------------------------------------------------------- >8"); + e.leave("},"); + e.enter("instance: {"); + b(c.traits); + e.leave("}"); + e.leave("},"); + e.enter("script: {"); + e.writeLn("instance: Glue.ALL"); + e.leave("}"); + e.leave("}"); + e.leave("};"); + e.leave("}).call(this);"); + e.writeLn("-------------------------------------------------------------- >8"); return!0; - }, traceClass:function(f) { - var d = this.writer, b = f.instanceInfo, g = b.name, k = a.Multiname.getAccessModifier(g); - b.isFinal() && (k += " final"); - b.isSealed() || (k += " dynamic"); - k += b.isInterface() ? " interface " : " class "; - k += g.getName(); - b.superName && "Object" !== b.superName.getName() && (k += " extends " + b.superName.getName()); - b.interfaces.length && (k += " implements " + b.interfaces.map(function(b) { + }, traceClass:function(g) { + var f = this.writer, b = g.instanceInfo, e = b.name, c = a.Multiname.getAccessModifier(e); + b.isFinal() && (c += " final"); + b.isSealed() || (c += " dynamic"); + c += b.isInterface() ? " interface " : " class "; + c += e.getName(); + b.superName && "Object" !== b.superName.getName() && (c += " extends " + b.superName.getName()); + b.interfaces.length && (c += " implements " + b.interfaces.map(function(b) { return b.getName(); }).join(", ")); - d.enter(k + " {"); - b.isInterface() || d.writeLn("public function " + g.getName() + "(" + n(b.init) + ") {}"); - var e; - b.isInterface() && (e = g.namespaces[0].uri + ":" + g.name); - this.traceTraits(f.traits, !0, e); - this.traceTraits(b.traits, !1, e); - d.leave("}"); + f.enter(c + " {"); + b.isInterface() || f.writeLn("public function " + e.getName() + "(" + s(b.init) + ") {}"); + var n; + b.isInterface() && (n = e.namespaces[0].uri + ":" + e.name); + this.traceTraits(g.traits, !0, n); + this.traceTraits(b.traits, !1, n); + f.leave("}"); }, traceMetadata:function(a) { - var d = this.writer, b; + var f = this.writer, b; for (b in a) { - a.hasOwnProperty(b) && 0 !== b.indexOf("__") && d.writeLn("[" + b + "(" + a[b].value.map(function(b) { + a.hasOwnProperty(b) && 0 !== b.indexOf("__") && f.writeLn("[" + b + "(" + a[b].value.map(function(b) { return(b.key ? b.key + "=" : "") + '"' + b.value + '"'; }).join(", ") + ")]"); } }}; - return k; + return m; }(); - })(h.ABC || (h.ABC = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.ABC || (k.ABC = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = c.Debug.assert, s = c.Debug.unexpected, v = c.AVM2.ABC.AbcStream, p = c.ArrayUtilities.top, u = c.ArrayUtilities.peek; +(function(d) { + (function(k) { + var a = d.AVM2.ABC.AbcStream, r = d.ArrayUtilities.top, v = d.ArrayUtilities.peek; (function(a) { a[a.bkpt = 1] = "bkpt"; a[a.nop = 2] = "nop"; @@ -8146,76 +8487,86 @@ __extends = this.__extends || function(c, h) { a[a["typeof"] = 149] = "typeof"; a[a["instanceof"] = 177] = "instanceof"; a[a["in"] = 180] = "in"; - })(h.OP || (h.OP = {})); - h.opcodeTable = [null, {name:"bkpt", canThrow:!1, operands:[]}, {name:"nop", canThrow:!1, operands:[]}, {name:"throw", canThrow:!0, operands:[]}, {name:"getsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"setsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"dxns", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"dxnslate", canThrow:!0, operands:[]}, {name:"kill", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, - {name:"label", canThrow:!1, operands:[]}, {name:"lf32x4", canThrow:!0, operands:[]}, {name:"sf32x4", canThrow:!0, operands:[]}, {name:"ifnlt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifnle", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifngt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifnge", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"jump", canThrow:!1, operands:[{name:"offset", size:"s24", - type:""}]}, {name:"iftrue", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"iffalse", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifeq", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifne", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"iflt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifle", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifgt", canThrow:!0, - operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifge", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifstricteq", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifstrictne", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"lookupswitch", canThrow:!1, operands:null}, {name:"pushwith", canThrow:!1, operands:[]}, {name:"popscope", canThrow:!1, operands:[]}, {name:"nextname", canThrow:!0, operands:[]}, {name:"hasnext", canThrow:!0, - operands:[]}, {name:"pushnull", canThrow:!1, operands:[]}, {name:"pushundefined", canThrow:!1, operands:[]}, null, {name:"nextvalue", canThrow:!0, operands:[]}, {name:"pushbyte", canThrow:!1, operands:[{name:"value", size:"s08", type:""}]}, {name:"pushshort", canThrow:!1, operands:[{name:"value", size:"s16", type:""}]}, {name:"pushtrue", canThrow:!1, operands:[]}, {name:"pushfalse", canThrow:!1, operands:[]}, {name:"pushnan", canThrow:!1, operands:[]}, {name:"pop", canThrow:!1, operands:[]}, - {name:"dup", canThrow:!1, operands:[]}, {name:"swap", canThrow:!1, operands:[]}, {name:"pushstring", canThrow:!1, operands:[{name:"index", size:"u30", type:"S"}]}, {name:"pushint", canThrow:!1, operands:[{name:"index", size:"u30", type:"I"}]}, {name:"pushuint", canThrow:!1, operands:[{name:"index", size:"u30", type:"U"}]}, {name:"pushdouble", canThrow:!1, operands:[{name:"index", size:"u30", type:"D"}]}, {name:"pushscope", canThrow:!1, operands:[]}, {name:"pushnamespace", canThrow:!1, operands:[{name:"index", - size:"u30", type:"N"}]}, {name:"hasnext2", canThrow:!0, operands:[{name:"object", size:"u30", type:""}, {name:"index", size:"u30", type:""}]}, {name:"lix8", canThrow:!0, operands:null}, {name:"lix16", canThrow:!0, operands:null}, {name:"li8", canThrow:!0, operands:[]}, {name:"li16", canThrow:!0, operands:[]}, {name:"li32", canThrow:!0, operands:[]}, {name:"lf32", canThrow:!0, operands:[]}, {name:"lf64", canThrow:!0, operands:[]}, {name:"si8", canThrow:!0, operands:[]}, {name:"si16", canThrow:!0, - operands:[]}, {name:"si32", canThrow:!0, operands:[]}, {name:"sf32", canThrow:!0, operands:[]}, {name:"sf64", canThrow:!0, operands:[]}, null, {name:"newfunction", canThrow:!0, operands:[{name:"index", size:"u30", type:"MI"}]}, {name:"call", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"construct", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"callmethod", canThrow:!0, operands:[{name:"index", size:"u30", type:""}, {name:"argCount", size:"u30", - type:""}]}, {name:"callstatic", canThrow:!0, operands:[{name:"index", size:"u30", type:"MI"}, {name:"argCount", size:"u30", type:""}]}, {name:"callsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"returnvoid", canThrow:!1, operands:[]}, {name:"returnvalue", canThrow:!0, operands:[]}, {name:"constructsuper", - canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"constructprop", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callsuperid", canThrow:!0, operands:null}, {name:"callproplex", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callinterface", canThrow:!0, operands:null}, {name:"callsupervoid", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, - {name:"argCount", size:"u30", type:""}]}, {name:"callpropvoid", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"sxi1", canThrow:!1, operands:[]}, {name:"sxi8", canThrow:!1, operands:[]}, {name:"sxi16", canThrow:!1, operands:[]}, {name:"applytype", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"pushfloat4", canThrow:!1, operands:null}, {name:"newobject", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, - {name:"newarray", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"newactivation", canThrow:!0, operands:[]}, {name:"newclass", canThrow:!0, operands:[{name:"index", size:"u30", type:"CI"}]}, {name:"getdescendants", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"newcatch", canThrow:!0, operands:[{name:"index", size:"u30", type:"EI"}]}, {name:"findpropglobalstrict", canThrow:!0, operands:null}, {name:"findpropglobal", canThrow:!0, operands:null}, {name:"findpropstrict", - canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"findproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"finddef", canThrow:!0, operands:null}, {name:"getlex", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"setproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"getlocal", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"setlocal", canThrow:!1, operands:[{name:"index", size:"u30", - type:""}]}, {name:"getglobalscope", canThrow:!1, operands:[]}, {name:"getscopeobject", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"getproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"getouterscope", canThrow:!1, operands:null}, {name:"initproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, null, {name:"deleteproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, null, {name:"getslot", canThrow:!0, - operands:[{name:"index", size:"u30", type:""}]}, {name:"setslot", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"getglobalslot", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"setglobalslot", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"convert_s", canThrow:!0, operands:[]}, {name:"esc_xelem", canThrow:!0, operands:[]}, {name:"esc_xattr", canThrow:!0, operands:[]}, {name:"convert_i", canThrow:!0, operands:[]}, {name:"convert_u", - canThrow:!0, operands:[]}, {name:"convert_d", canThrow:!0, operands:[]}, {name:"convert_b", canThrow:!0, operands:[]}, {name:"convert_o", canThrow:!0, operands:[]}, {name:"checkfilter", canThrow:!0, operands:[]}, {name:"convert_f", canThrow:!0, operands:[]}, {name:"unplus", canThrow:!0, operands:[]}, {name:"convert_f4", canThrow:!0, operands:[]}, null, null, null, null, {name:"coerce", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"coerce_b", canThrow:!0, operands:[]}, - {name:"coerce_a", canThrow:!0, operands:[]}, {name:"coerce_i", canThrow:!0, operands:[]}, {name:"coerce_d", canThrow:!0, operands:[]}, {name:"coerce_s", canThrow:!0, operands:[]}, {name:"astype", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"astypelate", canThrow:!0, operands:[]}, {name:"coerce_u", canThrow:!0, operands:[]}, {name:"coerce_o", canThrow:!0, operands:[]}, null, null, null, null, null, null, {name:"negate", canThrow:!0, operands:[]}, {name:"increment", canThrow:!0, - operands:[]}, {name:"inclocal", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"decrement", canThrow:!0, operands:[]}, {name:"declocal", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"typeof", canThrow:!1, operands:[]}, {name:"not", canThrow:!1, operands:[]}, {name:"bitnot", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {name:"add", canThrow:!0, operands:[]}, {name:"subtract", canThrow:!0, operands:[]}, {name:"multiply", - canThrow:!0, operands:[]}, {name:"divide", canThrow:!0, operands:[]}, {name:"modulo", canThrow:!0, operands:[]}, {name:"lshift", canThrow:!0, operands:[]}, {name:"rshift", canThrow:!0, operands:[]}, {name:"urshift", canThrow:!0, operands:[]}, {name:"bitand", canThrow:!0, operands:[]}, {name:"bitor", canThrow:!0, operands:[]}, {name:"bitxor", canThrow:!0, operands:[]}, {name:"equals", canThrow:!0, operands:[]}, {name:"strictequals", canThrow:!0, operands:[]}, {name:"lessthan", canThrow:!0, operands:[]}, - {name:"lessequals", canThrow:!0, operands:[]}, {name:"greaterthan", canThrow:!0, operands:[]}, {name:"greaterequals", canThrow:!0, operands:[]}, {name:"instanceof", canThrow:!0, operands:[]}, {name:"istype", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"istypelate", canThrow:!0, operands:[]}, {name:"in", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, null, null, null, {name:"increment_i", canThrow:!0, operands:[]}, {name:"decrement_i", canThrow:!0, - operands:[]}, {name:"inclocal_i", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"declocal_i", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"negate_i", canThrow:!0, operands:[]}, {name:"add_i", canThrow:!0, operands:[]}, {name:"subtract_i", canThrow:!0, operands:[]}, {name:"multiply_i", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {name:"getlocal0", canThrow:!1, operands:[]}, {name:"getlocal1", canThrow:!1, operands:[]}, - {name:"getlocal2", canThrow:!1, operands:[]}, {name:"getlocal3", canThrow:!1, operands:[]}, {name:"setlocal0", canThrow:!1, operands:[]}, {name:"setlocal1", canThrow:!1, operands:[]}, {name:"setlocal2", canThrow:!1, operands:[]}, {name:"setlocal3", canThrow:!1, operands:[]}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {name:"invalid", canThrow:!1, operands:[]}, null, {name:"debug", canThrow:!0, operands:[{name:"debugType", - size:"u08", type:""}, {name:"index", size:"u30", type:"S"}, {name:"reg", size:"u08", type:""}, {name:"extra", size:"u30", type:""}]}, {name:"debugline", canThrow:!0, operands:[{name:"lineNumber", size:"u30", type:""}]}, {name:"debugfile", canThrow:!0, operands:[{name:"index", size:"u30", type:"S"}]}, null, null, null, null, null, null, null, null, null, null, null, null, null, null]; - h.opcodeName = function(a) { - return h.opcodeTable[a].name; + })(k.OP || (k.OP = {})); + var u = k.OP; + k.opcodeTable = [null, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"offset", size:3, + type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, + operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:[{name:"offset", size:3, type:""}]}, {canThrow:!1, operands:null}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!1, + operands:[]}, {canThrow:!1, operands:[]}, null, {canThrow:!0, operands:[]}, {canThrow:!1, operands:[{name:"value", size:1, type:""}]}, {canThrow:!1, operands:[{name:"value", size:2, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[{name:"index", size:4, type:"S"}]}, {canThrow:!1, operands:[{name:"index", size:4, type:"I"}]}, {canThrow:!1, operands:[{name:"index", + size:4, type:"U"}]}, {canThrow:!1, operands:[{name:"index", size:4, type:"D"}]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[{name:"index", size:4, type:"N"}]}, {canThrow:!0, operands:[{name:"object", size:4, type:""}, {name:"index", size:4, type:""}]}, {canThrow:!0, operands:null}, {canThrow:!0, operands:null}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, + operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, null, {canThrow:!0, operands:[{name:"index", size:4, type:"MI"}]}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"MI"}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", + size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:null}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, + operands:null}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}, {name:"argCount", size:4, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, {canThrow:!1, operands:null}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"argCount", size:4, type:""}]}, + {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", size:4, type:"CI"}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"EI"}]}, {canThrow:!0, operands:null}, {canThrow:!0, operands:null}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:null}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[{name:"index", + size:4, type:"M"}]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!1, operands:null}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, null, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, null, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, + {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, + operands:[]}, null, null, null, null, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, null, null, null, null, null, null, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", + size:4, type:""}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, + operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", size:4, type:"M"}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, null, null, null, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[{name:"index", + size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:""}]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, {canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, {canThrow:!1, operands:[]}, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {canThrow:!1, operands:[]}, null, {canThrow:!0, operands:[{name:"value", size:0, type:""}, {name:"index", size:4, type:"S"}, {name:"object", size:0, type:""}, {name:"argCount", size:4, type:""}]}, {canThrow:!0, operands:[{name:"offset", size:4, type:""}]}, {canThrow:!0, operands:[{name:"index", size:4, type:"S"}]}, null, null, null, null, null, null, null, null, null, null, null, null, null, null]; + (function(a) { + a[a.u08 = 0] = "u08"; + a[a.s08 = 1] = "s08"; + a[a.s16 = 2] = "s16"; + a[a.s24 = 3] = "s24"; + a[a.u30 = 4] = "u30"; + a[a.u32 = 5] = "u32"; + })(k.OpcodeSize || (k.OpcodeSize = {})); + k.opcodeName = function(a) { + return u[a]; }; - var l = function() { - function a(k) { - var f = k.readU8(); - this.op = f; - this.originalPosition = k.position; - var d = c.AVM2.opcodeTable[f]; - d || s("Unknown Op " + f); - this.canThrow = d.canThrow; - var b; - if (27 === f) { - d = k.readS24(); - this.offsets = []; - b = k.readU30() + 1; - for (f = 0;f < b;f++) { - this.offsets.push(k.readS24()); - } - this.offsets.push(d); - } else { - for (f = 0, b = d.operands.length;f < b;f++) { - var g = d.operands[f]; - switch(g.size) { - case "u08": - this[g.name] = k.readU8(); - break; - case "s08": - this[g.name] = k.readS8(); - break; - case "s16": - this[g.name] = k.readS16(); - break; - case "s24": - this[g.name] = k.readS24(); - break; - case "u30": - this[g.name] = k.readU30(); - break; - case "u32": - this[g.name] = k.readU32(); - break; - default: - s(); + var t = function() { + function a(c) { + this.ti = null; + this.position = 0; + this.targets = this.target = this.offsets = null; + this.level = 0; + this.spbacks = this.region = this.end = this.dominator = this.dominatees = this.preds = this.succs = null; + this.bdo = 0; + this.hasCatches = !1; + this.verifierEntryState = null; + this.value = this.offset = this.argCount = this.object = this.index = 0; + if (c) { + var g = c.readU8(); + this.op = g; + var f = k.opcodeTable[g]; + this.canThrow = f.canThrow; + var b; + if (27 === g) { + f = c.readS24(); + this.offsets = []; + b = c.readU30() + 1; + for (g = 0;g < b;g++) { + this.offsets.push(c.readS24()); + } + this.offsets.push(f); + } else { + for (g = 0, b = f.operands.length;g < b;g++) { + var e = f.operands[g]; + switch(e.size) { + case 0: + this[e.name] = c.readU8(); + break; + case 1: + this[e.name] = c.readS8(); + break; + case 2: + this[e.name] = c.readS16(); + break; + case 3: + this[e.name] = c.readS24(); + break; + case 4: + this[e.name] = c.readU30(); + break; + case 5: + this[e.name] = c.readU32(); + } } } + } else { + this.op = 237, this.canThrow = !0; } } a.prototype.makeBlockHead = function(a) { @@ -8232,147 +8583,145 @@ __extends = this.__extends || function(c, h) { this.succs && a.writeLn("#" + this.bid); }; a.prototype.toString = function(a) { - var f = c.AVM2.opcodeTable[this.op], d = f.name.padRight(" ", 20), b, g; + var c = d.AVM2.opcodeTable[this.op], f = u[this.op].padRight(" ", 20), b, e; if (27 === this.op) { - for (d += "targets:", b = 0, g = this.targets.length;b < g;b++) { - d += (0 < b ? "," : "") + this.targets[b].position; + for (f += "targets:", b = 0, e = this.targets.length;b < e;b++) { + f += (0 < b ? "," : "") + this.targets[b].position; } } else { - for (b = 0, g = f.operands.length;b < g;b++) { - var e = f.operands[b]; - if ("offset" === e.name) { - d += "target:" + this.target.position; + for (b = 0, e = c.operands.length;b < e;b++) { + var q = c.operands[b]; + if ("offset" === q.name) { + f += "target:" + this.target.position; } else { - var d = d + (e.name + ": "), w = this[e.name]; + var f = f + (q.name + ": "), n = this[q.name]; if (a) { - switch(e.type) { + switch(q.type) { case "": - d += w; + f += n; break; case "I": - d += a.constantPool.ints[w]; + f += a.constantPool.ints[n]; break; case "U": - d += a.constantPool.uints[w]; + f += a.constantPool.uints[n]; break; case "D": - d += a.constantPool.doubles[w]; + f += a.constantPool.doubles[n]; break; case "S": - d += a.constantPool.strings[w]; + f += a.constantPool.strings[n]; break; case "N": - d += a.constantPool.namespaces[w]; + f += a.constantPool.namespaces[n]; break; case "CI": - d += a.classes[w]; + f += a.classes[n]; break; case "M": - d += a.constantPool.multinames[w]; + f += a.constantPool.multinames[n]; break; default: - d += "?"; + f += "?"; } } else { - d += w; + f += n; } } - b < g - 1 && (d += ", "); + b < e - 1 && (f += ", "); } } - return d; + return f; }; return a; }(); - h.Bytecode = l; - var e = c.BitSets.BITS_PER_WORD, m = c.BitSets.ADDRESS_BITS_PER_WORD, t = c.BitSets.BIT_INDEX_MASK, q = function(c) { - function k(a, d) { - c.call(this, a); - this.blockById = d; + k.Bytecode = t; + var l = d.BitSets.BITS_PER_WORD, c = d.BitSets.ADDRESS_BITS_PER_WORD, h = d.BitSets.BIT_INDEX_MASK, p = function(a) { + function p(c, f) { + a.call(this, c); + this.blockById = f; } - __extends(k, c); - k.prototype.forEachBlock = function(f) { - a(f); - for (var d = this.blockById, b = this.bits, g = 0, k = b.length;g < k;g++) { - var w = b[g]; - if (w) { - for (var m = 0;m < e;m++) { - w & 1 << m && f(d[g * e + m]); + __extends(p, a); + p.prototype.forEachBlock = function(a) { + for (var f = this.blockById, b = this.bits, e = 0, c = b.length;e < c;e++) { + var n = b[e]; + if (n) { + for (var p = 0;p < l;p++) { + n & 1 << p && a(f[e * l + p]); } } } }; - k.prototype.choose = function() { - for (var a = this.blockById, d = this.bits, b = 0, g = d.length;b < g;b++) { - var k = d[b]; - if (k) { - for (var w = 0;w < e;w++) { - if (k & 1 << w) { - return a[b * e + w]; + p.prototype.choose = function() { + for (var a = this.blockById, f = this.bits, b = 0, e = f.length;b < e;b++) { + var c = f[b]; + if (c) { + for (var n = 0;n < l;n++) { + if (c & 1 << n) { + return a[b * l + n]; } } } } }; - k.prototype.members = function() { - for (var a = this.blockById, d = [], b = this.bits, g = 0, k = b.length;g < k;g++) { - var w = b[g]; - if (w) { - for (var m = 0;m < e;m++) { - w & 1 << m && d.push(a[g * e + m]); + p.prototype.members = function() { + for (var a = this.blockById, f = [], b = this.bits, e = 0, c = b.length;e < c;e++) { + var n = b[e]; + if (n) { + for (var p = 0;p < l;p++) { + n & 1 << p && f.push(a[e * l + p]); } } } - return d; + return f; }; - k.prototype.setBlocks = function(a) { - for (var d = this.bits, b = 0, g = a.length;b < g;b++) { - var k = a[b].bid; - d[k >> m] |= 1 << (k & t); + p.prototype.setBlocks = function(a) { + for (var f = this.bits, b = 0, e = a.length;b < e;b++) { + var q = a[b].bid; + f[q >> c] |= 1 << (q & h); } }; - return k; - }(c.BitSets.Uint32ArrayBitSet); - h.BlockSet = q; - q = function() { - function e(a) { + return p; + }(d.BitSets.Uint32ArrayBitSet); + k.BlockSet = p; + p = function() { + function c(a) { this.methodInfo = a; - this.methodInfo.code && (h.enterTimeline("normalizeBytecode"), this.normalizeBytecode(), h.leaveTimeline()); + this.boundBlockSet = this.bytecodes = this.blocks = null; + this.analyzedControlFlow = this.markedLoops = !1; + a.code && (k.enterTimeline("normalizeBytecode"), this.normalizeBytecode(), k.leaveTimeline()); } - e.prototype.makeBlockSetFactory = function(k, f) { - a(!this.boundBlockSet); + c.prototype.makeBlockSetFactory = function(a, c) { this.boundBlockSet = function() { - return new c.AVM2.BlockSet(k, f); + return new d.AVM2.BlockSet(a, c); }; }; - e.prototype.accessLocal = function(a) { + c.prototype.accessLocal = function(a) { 0 !== a-- && a < this.methodInfo.parameters.length && (this.methodInfo.parameters[a].isUsed = !0); }; - e.prototype.getInvalidTarget = function(a, f) { - if (a && a[f]) { - return a[f]; + c.prototype.getInvalidTarget = function(a, c) { + if (a && a[c]) { + return a[c]; } - var d = Object.create(l.prototype); - d.op = 237; - d.position = f; - a && (a[f] = d); - return d; + var f = new t(null); + f.position = c; + a && (a[c] = f); + return f; }; - e.prototype.normalizeBytecode = function() { - for (var a = [], f = [], d = new v(this.methodInfo.code), b;0 < d.remaining();) { - var g = d.position; - b = new l(d); - switch(b.op) { + c.prototype.normalizeBytecode = function() { + for (var c = this.methodInfo, g = [], f = [], b = new a(c.code), e;0 < b.remaining();) { + var q = b.position; + e = new t(b); + switch(e.op) { case 2: ; case 9: - a[g] = f.length; + g[q] = f.length; continue; case 27: - this.methodInfo.hasLookupSwitches = !0; - b.targets = []; - for (var e = b.offsets, w = 0, m = e.length;w < m;w++) { - e[w] += g; + e.targets = []; + for (var n = e.offsets, p = 0, h = n.length;p < h;p++) { + n[p] += q; } break; case 16: @@ -8404,7 +8753,7 @@ __extends = this.__extends || function(c, h) { case 17: ; case 18: - b.offset += d.position; + e.offset += b.position; break; case 208: ; @@ -8413,22 +8762,22 @@ __extends = this.__extends || function(c, h) { case 210: ; case 211: - this.accessLocal(b.op - 208); + this.accessLocal(e.op - 208); break; case 98: - this.accessLocal(b.index); + this.accessLocal(e.index); } - b.position = f.length; - a[g] = f.length; - f.push(b); + e.position = f.length; + g[q] = f.length; + f.push(e); } - for (var d = {}, c = 0, q = f.length;c < q;c++) { - switch(b = f[c], b.op) { + for (var b = {}, s = 0, l = f.length;s < l;s++) { + switch(e = f[s], e.op) { case 27: - e = b.offsets; - w = 0; - for (m = e.length;w < m;w++) { - g = a[e[w]], b.targets.push(f[g] || this.getInvalidTarget(d, e[w])), e[w] = g; + n = e.offsets; + p = 0; + for (h = n.length;p < h;p++) { + q = g[n[p]], e.targets.push(f[q] || this.getInvalidTarget(b, n[p])), n[p] = q; } break; case 16: @@ -8460,45 +8809,44 @@ __extends = this.__extends || function(c, h) { case 17: ; case 18: - g = a[b.offset], b.target = f[g] || this.getInvalidTarget(d, b.offset), b.offset = g; + q = g[e.offset], e.target = f[q] || this.getInvalidTarget(b, e.offset), e.offset = q; } } this.bytecodes = f; - b = this.methodInfo.exceptions; - w = 0; - for (m = b.length;w < m;w++) { - e = b[w], e.start = a[e.start], e.end = a[e.end], e.offset = a[e.target], e.target = f[e.offset], e.target.exception = e; + c = c.exceptions; + p = 0; + for (h = c.length;p < h;p++) { + e = c[p], e.start = g[e.start], e.end = g[e.end], e.offset = g[e.target], e.target = f[e.offset], e.target.exception = e; } }; - e.prototype.analyzeControlFlow = function() { - a(this.bytecodes); - h.enterTimeline("analyzeControlFlow"); + c.prototype.analyzeControlFlow = function() { + k.enterTimeline("analyzeControlFlow"); this.detectBasicBlocks(); this.normalizeReachableBlocks(); this.computeDominance(); this.analyzedControlFlow = !0; - h.leaveTimeline(); + k.leaveTimeline(); return!0; }; - e.prototype.detectBasicBlocks = function() { - var k = this.bytecodes, f = this.methodInfo.exceptions, d = 0 < f.length, b = {}, g, e, w, m; - m = k[0].makeBlockHead(0); - e = 0; - for (w = k.length - 1;e < w;e++) { - switch(g = k[e], g.op) { + c.prototype.detectBasicBlocks = function() { + var a = this.bytecodes, c = this.methodInfo.exceptions, f = 0 < c.length, b = {}, e, q, n, p; + p = a[0].makeBlockHead(0); + q = 0; + for (n = a.length - 1;q < n;q++) { + switch(e = a[q], e.op) { case 71: ; case 72: ; case 3: - m = k[e + 1].makeBlockHead(m); + p = a[q + 1].makeBlockHead(p); break; case 27: - g = g.targets; - for (var c = 0, q = g.length;c < q;c++) { - m = g[c].makeBlockHead(m); + e = e.targets; + for (var h = 0, s = e.length;h < s;h++) { + p = e[h].makeBlockHead(p); } - m = k[e + 1].makeBlockHead(m); + p = a[q + 1].makeBlockHead(p); break; case 16: ; @@ -8529,20 +8877,20 @@ __extends = this.__extends || function(c, h) { case 17: ; case 18: - m = g.target.makeBlockHead(m), m = k[e + 1].makeBlockHead(m); + p = e.target.makeBlockHead(p), p = a[q + 1].makeBlockHead(p); } } - g = k[w]; - switch(g.op) { + e = a[n]; + switch(e.op) { case 27: - g = g.targets; - c = 0; - for (q = g.length;c < q;c++) { - m = g[c].makeBlockHead(m); + e = e.targets; + h = 0; + for (s = e.length;h < s;h++) { + p = e[h].makeBlockHead(p); } break; case 16: - m = g.target.makeBlockHead(m); + p = e.target.makeBlockHead(p); break; case 21: ; @@ -8571,23 +8919,22 @@ __extends = this.__extends || function(c, h) { case 17: ; case 18: - m = g.target.makeBlockHead(m), k[e + 1] = this.getInvalidTarget(null, e + 1), m = k[e + 1].makeBlockHead(m); + p = e.target.makeBlockHead(p), a[q + 1] = this.getInvalidTarget(null, q + 1), p = a[q + 1].makeBlockHead(p); } - if (d) { - for (c = 0;c < f.length;c++) { - e = f[c], w = k[e.end + 1], m = k[e.start].makeBlockHead(m), w && (m = w.makeBlockHead(m)), m = e.target.makeBlockHead(m); + if (f) { + for (h = 0;h < c.length;h++) { + q = c[h], n = a[q.end + 1], p = a[q.start].makeBlockHead(p), n && (p = n.makeBlockHead(p)), p = q.target.makeBlockHead(p); } } - var n = k[0]; - e = 1; - for (w = k.length;e < w;e++) { - if (k[e].succs) { - a(n.succs); - b[n.bid] = n; - g = k[e - 1]; - n.end = g; - var l = k[e]; - switch(g.op) { + var l = a[0]; + q = 1; + for (n = a.length;q < n;q++) { + if (a[q].succs) { + b[l.bid] = l; + e = a[q - 1]; + l.end = e; + var d = a[q]; + switch(e.op) { case 71: ; case 72: @@ -8595,13 +8942,13 @@ __extends = this.__extends || function(c, h) { case 3: break; case 27: - c = 0; - for (q = g.targets.length;c < q;c++) { - n.succs.push(g.targets[c]); + h = 0; + for (s = e.targets.length;h < s;h++) { + l.succs.push(e.targets[h]); } break; case 16: - n.succs.push(g.target); + l.succs.push(e.target); break; case 21: ; @@ -8630,140 +8977,137 @@ __extends = this.__extends || function(c, h) { case 17: ; case 18: - n.succs.push(g.target); - g.target !== l && n.succs.push(l); + l.succs.push(e.target); + e.target !== d && l.succs.push(d); break; default: - n.succs.push(l); + l.succs.push(d); } - if (d) { - c = n; - q = []; - g = 0; - for (var t = f.length;g < t;g++) { - var s = f[g]; - c.position >= s.start && c.end.position <= s.end && q.push(s.target); + if (f) { + h = l; + s = []; + e = 0; + for (var r = c.length;e < r;e++) { + var k = c[e]; + h.position >= k.start && h.end.position <= k.end && s.push(k.target); } - g = q; - n.hasCatches = 0 < g.length; - n.succs.push.apply(n.succs, g); + e = s; + l.hasCatches = 0 < e.length; + l.succs.push.apply(l.succs, e); } - n = l; + l = d; } } - b[n.bid] = n; - g = k[w - 1]; - switch(g.op) { + b[l.bid] = l; + e = a[n - 1]; + switch(e.op) { case 27: - c = 0; - for (q = g.targets.length;c < q;c++) { - n.succs.push(g.targets[c]); + h = 0; + for (s = e.targets.length;h < s;h++) { + l.succs.push(e.targets[h]); } break; case 16: - n.succs.push(g.target); + l.succs.push(e.target); } - n.end = g; - this.makeBlockSetFactory(m, b); + l.end = e; + this.makeBlockSetFactory(p, b); }; - e.prototype.normalizeReachableBlocks = function() { - var k = this.bytecodes[0]; - a(0 === k.preds.length); - var f = [], d = {}, b = {}, g = [k]; - for (b[k.bid] = !0;k = p(g);) { - if (d[k.bid]) { - if (1 === d[k.bid]) { - d[k.bid] = 2; - f.push(k); - for (var e = k.succs, m = 0, c = e.length;m < c;m++) { - e[m].preds.push(k); + c.prototype.normalizeReachableBlocks = function() { + var a = this.bytecodes[0], c = [], f = {}, b = {}, e = [a]; + for (b[a.bid] = !0;a = r(e);) { + if (f[a.bid]) { + if (1 === f[a.bid]) { + f[a.bid] = 2; + c.push(a); + for (var q = a.succs, n = 0, p = q.length;n < p;n++) { + q[n].preds.push(a); } } - b[k.bid] = !1; - g.pop(); + b[a.bid] = !1; + e.pop(); } else { - for (d[k.bid] = 1, b[k.bid] = !0, e = k.succs, m = 0, c = e.length;m < c;m++) { - var q = e[m]; - b[q.bid] && (k.spbacks || (k.spbacks = new this.boundBlockSet), k.spbacks.set(q.bid)); - !d[q.bid] && g.push(q); + for (f[a.bid] = 1, b[a.bid] = !0, q = a.succs, n = 0, p = q.length;n < p;n++) { + var h = q[n]; + b[h.bid] && (a.spbacks || (a.spbacks = new this.boundBlockSet), a.spbacks.set(h.bid)); + !f[h.bid] && e.push(h); } } } - this.blocks = f.reverse(); + this.blocks = c.reverse(); }; - e.prototype.computeDominance = function() { - var k = this.blocks, f = k.length, d = Array(f); - d[0] = 0; - for (var b = {}, g = 0;g < f;g++) { - b[k[g].bid] = g; + c.prototype.computeDominance = function() { + var a = this.blocks, c = a.length, f = Array(c); + f[0] = 0; + for (var b = {}, e = 0;e < c;e++) { + b[a[e].bid] = e; } - for (var e = !0;e;) { - for (e = !1, g = 1;g < f;g++) { - var m = k[g].preds, c = m.length, q = b[m[0].bid]; - if (!(q in d)) { - for (var n = 1;n < c && !(q = b[m[n].bid], q in d);n++) { + for (var q = !0;q;) { + for (q = !1, e = 1;e < c;e++) { + var n = a[e].preds, p = n.length, h = b[n[0].bid]; + if (!(h in f)) { + for (var s = 1;s < p && !(h = b[n[s].bid], h in f);s++) { } } - a(q in d); - for (n = 0;n < c;n++) { - var l = b[m[n].bid]; - if (l !== q && l in d) { - for (;l !== q;) { - for (;l > q;) { - l = d[l]; + for (s = 0;s < p;s++) { + var l = b[n[s].bid]; + if (l !== h && l in f) { + for (;l !== h;) { + for (;l > h;) { + l = f[l]; } - for (;q > l;) { - q = d[q]; + for (;h > l;) { + h = f[h]; } } - q = l; + h = l; } } - d[g] !== q && (d[g] = q, e = !0); + f[e] !== h && (f[e] = h, q = !0); } } - k[0].dominator = k[0]; - for (g = 1;g < f;g++) { - b = k[g], n = k[d[g]], b.dominator = n, n.dominatees.push(b), b.npreds = b.preds.length; + a[0].dominator = a[0]; + for (e = 1;e < c;e++) { + b = a[e], s = a[f[e]], b.dominator = s, s.dominatees.push(b), b.npreds = b.preds.length; } - f = [k[0]]; - for (k[0].level || (k[0].level = 0);b = f.shift();) { - k = b.dominatees; - for (n = 0;n < k.length;n++) { - k[n].level = b.level + 1; + c = [a[0]]; + for (a[0].level || (a[0].level = 0);b = c.shift();) { + a = b.dominatees; + for (s = 0;s < a.length;s++) { + a[s].level = b.level + 1; } - f.push.apply(f, k); + c.push.apply(c, a); } }; - e.prototype.markLoops = function() { + c.prototype.markLoops = function() { function a(b) { - var d = 1, g = {}, f = {}, k = [], e = [], r = [], m = b.level + 1; + var e = 1, f = {}, c = {}, g = [], n = [], q = [], p = b.level + 1; b = [b]; - for (var w, c;w = p(b);) { - if (g[w.bid]) { - if (u(e) === w) { - e.pop(); - var q = []; + for (var h, m;h = r(b);) { + if (f[h.bid]) { + if (v(n) === h) { + n.pop(); + var s = []; do { - c = k.pop(), f[c.bid] = !0, q.push(c); - } while (c !== w); - (1 < q.length || c.spbacks && c.spbacks.get(c.bid)) && r.push(q); + m = g.pop(), c[m.bid] = !0, s.push(m); + } while (m !== h); + (1 < s.length || m.spbacks && m.spbacks.get(m.bid)) && q.push(s); } b.pop(); } else { - g[w.bid] = d++; - k.push(w); - e.push(w); - c = w.succs; - for (var q = 0, n = c.length;q < n;q++) { - if (w = c[q], !(w.level < m)) { - var l = w.bid; - if (!g[l]) { - b.push(w); + f[h.bid] = e++; + g.push(h); + n.push(h); + m = h.succs; + for (var s = 0, l = m.length;s < l;s++) { + if (h = m[s], !(h.level < p)) { + var d = h.bid; + if (!f[d]) { + b.push(h); } else { - if (!f[l]) { - for (;g[u(e).bid] > g[l];) { - e.pop(); + if (!c[d]) { + for (;f[v(n).bid] > f[d];) { + n.pop(); } } } @@ -8771,14 +9115,14 @@ __extends = this.__extends || function(c, h) { } } } - return r; + return q; } - function f(a, d) { - var g = new b; - g.setBlocks(a); - g.recount(); - this.id = d; - this.body = g; + function c(a, e) { + var f = new b; + f.setBlocks(a); + f.recount(); + this.id = e; + this.body = f; this.exit = new b; this.save = {}; this.head = new b; @@ -8788,17 +9132,17 @@ __extends = this.__extends || function(c, h) { if (!this.analyzedControlFlow && !this.analyzeControlFlow()) { return!1; } - var d = this.bytecodes, b = this.boundBlockSet; - f.prototype.getDirtyLocals = function() { + var f = this.bytecodes, b = this.boundBlockSet; + c.prototype.getDirtyLocals = function() { if (this._dirtyLocals) { return this._dirtyLocals; } var b = this._dirtyLocals = []; this.body.members().forEach(function(a) { - var g = a.position; - for (a = a.end.position;g <= a;g++) { - var f = d[g], k = f.op; - switch(k) { + var e = a.position; + for (a = a.end.position;e <= a;e++) { + var c = f[e], g = c.op; + switch(g) { case 146: ; case 148: @@ -8808,11 +9152,11 @@ __extends = this.__extends || function(c, h) { case 194: ; case 195: - b[f.index] = !0; + b[c.index] = !0; break; case 50: - b[f.index] = !0; - b[f.object] = !0; + b[c.index] = !0; + b[c.object] = !0; break; case 212: ; @@ -8821,274 +9165,260 @@ __extends = this.__extends || function(c, h) { case 214: ; case 215: - b[k - 212] = !0; + b[g - 212] = !0; } } }); return b; }; - var g = function(a) { - for (var d = new b, g = 0, f = a.length;g < f;g++) { - var k = a[g], e = k.spbacks; - if (e) { - for (var k = k.succs, r = 0, m = k.length;r < m;r++) { - var w = k[r]; - e.get(w.bid) && d.set(w.dominator.bid); + var e = function(a) { + for (var e = new b, f = 0, c = a.length;f < c;f++) { + var g = a[f], n = g.spbacks; + if (n) { + for (var g = g.succs, q = 0, p = g.length;q < p;q++) { + var h = g[q]; + n.get(h.bid) && e.set(h.dominator.bid); } } } - return d.members(); + return e.members(); }(this.blocks); - if (0 >= g.length) { + if (0 >= e.length) { return this.markedLoops = !0; } - for (var g = g.sort(function(b, a) { + for (var e = e.sort(function(b, a) { return b.level - a.level; - }), e = 0, m = g.length - 1;0 <= m;m--) { - var c = g[m], q = a(c); - if (0 !== q.length) { - for (var n = 0, l = q.length;n < l;n++) { - for (var t = q[n], s = new f(t, e++), h = 0, v = t.length;h < v;h++) { - var L = t[h]; - if (L.level === c.level + 1 && !L.loop) { - L.loop = s; - s.head.set(L.bid); - for (var H = L.preds, J = 0, C = H.length;J < C;J++) { - s.body.get(H[J].bid) && L.npreds--; + }), q = 0, n = e.length - 1;0 <= n;n--) { + var p = e[n], h = a(p); + if (0 !== h.length) { + for (var s = 0, l = h.length;s < l;s++) { + for (var d = h[s], k = new c(d, q++), u = 0, t = d.length;u < t;u++) { + var D = d[u]; + if (D.level === p.level + 1 && !D.loop) { + D.loop = k; + k.head.set(D.bid); + for (var B = D.preds, E = 0, y = B.length;E < y;E++) { + k.body.get(B[E].bid) && D.npreds--; } - s.npreds += L.npreds; + k.npreds += D.npreds; } } - h = 0; - for (v = t.length;h < v;h++) { - L = t[h], L.level === c.level + 1 && (L.npreds = s.npreds); + u = 0; + for (t = d.length;u < t;u++) { + D = d[u], D.level === p.level + 1 && (D.npreds = k.npreds); } - s.head.recount(); + k.head.recount(); } } } return this.markedLoops = !0; }; - return e; + return c; }(); - h.Analysis = q; - })(c.AVM2 || (c.AVM2 = {})); + k.Analysis = p; + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); var Bytecode = Shumway.AVM2.Bytecode, Analysis = Shumway.AVM2.Analysis; -(function(c) { - (function(h) { - var a = c.Options.Option, s = c.Options.OptionSet, v = c.Settings.shumwayOptions.register(new s("AVM2")); - (function(c) { - var h = v.register(new s("Runtime")); - c.traceExecution = h.register(new a("tx", "traceExecution", "number", 0, "trace script execution", {choices:{off:0, normal:2, verbose:3}})); - c.traceCallExecution = h.register(new a("txc", "traceCallExecution", "number", 0, "trace call execution", {choices:{off:0, normal:1, verbose:2}})); - c.traceFunctions = h.register(new a("t", "traceFunctions", "number", 0, "trace functions", {choices:{off:0, compiled:1, "compiled & abc":2}})); - c.traceClasses = h.register(new a("tc", "traceClasses", "boolean", !1, "trace class creation")); - c.traceDomain = h.register(new a("td", "traceDomain", "boolean", !1, "trace domain property access")); - c.debuggerMode = h.register(new a("db", "debuggerMode", "boolean", !0, "enable debugger mode")); - c.globalMultinameAnalysis = h.register(new a("ga", "globalMultinameAnalysis", "boolean", !1, "Global multiname analysis.")); - c.codeCaching = h.register(new a("cc", "codeCaching", "boolean", !1, "Enable code caching.")); - c.compilerEnableExceptions = h.register(new a("cex", "exceptions", "boolean", !1, "Compile functions with catch blocks.")); - c.compilerMaximumMethodSize = h.register(new a("cmms", "maximumMethodSize", "number", 4096, "Compiler maximum method size.")); - c = c.ExecutionMode || (c.ExecutionMode = {}); - c[c.INTERPRET = 1] = "INTERPRET"; - c[c.COMPILE = 2] = "COMPILE"; - })(h.Runtime || (h.Runtime = {})); - (function(c) { - c.options = v.register(new s("Compiler")); - c.traceLevel = c.options.register(new a("tc4", "tc4", "number", 0, "Compiler Trace Level")); - c.breakFilter = c.options.register(new a("", "break", "string", "", "Set a break point at methods whose qualified name matches this string pattern.")); - c.compileFilter = c.options.register(new a("", "compile", "string", "", "Only compile methods whose qualified name matches this string pattern.")); - c.enableDirtyLocals = c.options.register(new a("dl", "dirtyLocals", "boolean", !0, "Performe dirty local analysis to minimise PHI nodes.")); - })(h.Compiler || (h.Compiler = {})); - (function(c) { - c.options = v.register(new s("Verifier")); - c.enabled = c.options.register(new a("verifier", "verifier", "boolean", !0, "Enable verifier.")); - c.traceLevel = c.options.register(new a("tv", "tv", "number", 0, "Verifier Trace Level")); - })(h.Verifier || (h.Verifier = {})); - })(c.AVM2 || (c.AVM2 = {})); +(function(d) { + (function(k) { + var a = d.Options.Option, r = d.Options.OptionSet, v = d.Settings.shumwayOptions.register(new r("AVM2")); + (function(d) { + var k = v.register(new r("Runtime")); + d.traceExecution = k.register(new a("tx", "traceExecution", "number", 0, "trace script execution", {choices:{off:0, normal:2, verbose:3}})); + d.traceCallExecution = k.register(new a("txc", "traceCallExecution", "number", 0, "trace call execution", {choices:{off:0, normal:1, verbose:2}})); + d.traceFunctions = k.register(new a("t", "traceFunctions", "number", 0, "trace functions", {choices:{off:0, compiled:1, "compiled & abc":2}})); + d.traceClasses = k.register(new a("tc", "traceClasses", "boolean", !1, "trace class creation")); + d.traceDomain = k.register(new a("td", "traceDomain", "boolean", !1, "trace domain property access")); + d.debuggerMode = k.register(new a("db", "debuggerMode", "boolean", !0, "enable debugger mode")); + d.globalMultinameAnalysis = k.register(new a("ga", "globalMultinameAnalysis", "boolean", !1, "Global multiname analysis.")); + d.codeCaching = k.register(new a("cc", "codeCaching", "boolean", !1, "Enable code caching.")); + d.compilerEnableExceptions = k.register(new a("cex", "exceptions", "boolean", !1, "Compile functions with catch blocks.")); + d.compilerMaximumMethodSize = k.register(new a("cmms", "maximumMethodSize", "number", 4096, "Compiler maximum method size.")); + d = d.ExecutionMode || (d.ExecutionMode = {}); + d[d.INTERPRET = 1] = "INTERPRET"; + d[d.COMPILE = 2] = "COMPILE"; + })(k.Runtime || (k.Runtime = {})); + (function(d) { + d.options = v.register(new r("Compiler")); + d.traceLevel = d.options.register(new a("tc4", "tc4", "number", 0, "Compiler Trace Level")); + d.breakFilter = d.options.register(new a("", "break", "string", "", "Set a break point at methods whose qualified name matches this string pattern.")); + d.compileFilter = d.options.register(new a("", "compile", "string", "", "Only compile methods whose qualified name matches this string pattern.")); + d.enableDirtyLocals = d.options.register(new a("dl", "dirtyLocals", "boolean", !0, "Performe dirty local analysis to minimise PHI nodes.")); + })(k.Compiler || (k.Compiler = {})); + (function(d) { + d.options = v.register(new r("Verifier")); + d.enabled = d.options.register(new a("verifier", "verifier", "boolean", !0, "Enable verifier.")); + d.traceLevel = d.options.register(new a("tv", "tv", "number", 0, "Verifier Trace Level")); + })(k.Verifier || (k.Verifier = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); var Namespace = Shumway.AVM2.ABC.Namespace; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(b) { - var d = this.resolutionMap[b.runtimeId]; - if (d) { - return d; + function r(b) { + var e = this.resolutionMap[b.runtimeId]; + if (e) { + return e; } - var d = this.resolutionMap[b.runtimeId] = c.ObjectUtilities.createMap(), g = this.bindings, f; - for (f in g.map) { - var k = f, e = g.map[f].trait; - if (e.isGetter() || e.isSetter()) { - k = k.substring(a.Binding.KEY_PREFIX_LENGTH); + var e = this.resolutionMap[b.runtimeId] = d.ObjectUtilities.createMap(), f = this.bindings, c; + for (c in f.map) { + var g = c, n = f.map[c].trait; + if (n.isGetter() || n.isSetter()) { + g = g.substring(a.Binding.KEY_PREFIX_LENGTH); } - k = T.fromQualifiedName(k); - k.getNamespace().inNamespaceSet(b) && (d[k.getName()] = T.getQualifiedName(e.name)); + g = W.fromQualifiedName(g); + g.getNamespace().inNamespaceSet(b) && (e[g.getName()] = W.getQualifiedName(n.name)); } - return d; + return e; } - function v(b, a, d) { - qa(a) ? a = String(S(a)) : "object" === typeof a && (a = String(a)); - return c.isNumeric(a) ? c.toNumber(a) : b ? 1 < b.length ? (b = this.getNamespaceResolutionMap(b)[a]) ? b : T.getPublicQualifiedName(a) : T.qualifyName(b[0], a) : T.getPublicQualifiedName(a); + function v(b, a, e) { + ta(a) ? a = String(Q(a)) : "object" === typeof a && (a = String(a)); + return d.isNumeric(a) ? d.toNumber(a) : b ? 1 < b.length ? (b = this.getNamespaceResolutionMap(b)[a]) ? b : W.getPublicQualifiedName(a) : W.qualifyName(b[0], a) : W.getPublicQualifiedName(a); } - function p(b) { + function u(b) { return this.asGetProperty(void 0, b, 0); } - function u(b, a, d) { - b = this.resolveMultinameProperty(b, a, d); - return this.asGetNumericProperty && T.isNumeric(b) ? this.asGetNumericProperty(b) : this[b]; + function t(b, a, e) { + b = this.resolveMultinameProperty(b, a, e); + return this.asGetNumericProperty && W.isNumeric(b) ? this.asGetNumericProperty(b) : this[b]; } function l(b) { - pa(c.isString(b)); return this[b]; } - function e(b, a, d) { + function c(b, a, e) { a = a ? null : this; - var g = this.asOpenMethods; - return(a && g && g[b] ? g[b] : this[b]).asApply(a, d); + var f = this.asOpenMethods; + return a && f && f[b] ? f[b].apply(a, e) : this[b].asApply(a, e); } - function m(b, a) { + function h(b, a) { return this.asSetProperty(void 0, b, 0, a); } - function t(b, d) { - d === T.VALUE_OF ? (ha(b, "original_valueOf", b.valueOf), b.valueOf = a.forwardValueOf) : d === T.TO_STRING && (ha(b, "original_toString", b.toString), b.toString = a.forwardToString); + function p(b, e) { + e === W.VALUE_OF ? (ha(b, "original_valueOf", b.valueOf), b.valueOf = a.forwardValueOf) : e === W.TO_STRING && (ha(b, "original_toString", b.toString), b.toString = a.forwardToString); } - function q(b, a, d, g) { + function s(b, a, e, f) { "object" === typeof a && (a = String(a)); - b = this.resolveMultinameProperty(b, a, d); - if (this.asSetNumericProperty && T.isNumeric(b)) { - return this.asSetNumericProperty(b, g); + b = this.resolveMultinameProperty(b, a, e); + if (this.asSetNumericProperty && W.isNumeric(b)) { + return this.asSetNumericProperty(b, f); } - (a = this.asSlots.byQN[b]) && (a = a.type) && a.coerce && (g = a.coerce(g)); - t(this, b); - this[b] = g; + (a = this.asSlots.byQN[b]) && (a = a.type) && a.coerce && (f = a.coerce(f)); + p(this, b); + this[b] = f; } - function n(b, a) { + function m(b, a) { return this.asDefineProperty(void 0, b, 0, a); } - function k(b, a, d, g) { + function g(b, a, e, f) { "object" === typeof a && (a = String(a)); - b = this.resolveMultinameProperty(b, a, d); - Object.defineProperty(this, b, g); + b = this.resolveMultinameProperty(b, a, e); + Object.defineProperty(this, b, f); } - function f(b, a, d) { + function f(b, a, e) { "object" === typeof a && (a = String(a)); - b = this.resolveMultinameProperty(b, a, d); + b = this.resolveMultinameProperty(b, a, e); return Object.getOwnPropertyDescriptor(this, b); } - function d(b, a) { + function b(b, a) { return this.asCallProperty(void 0, b, 0, !1, a); } - function b(b, d, g, f, k) { - a.traceCallExecution.value && a.callWriter.enter("call " + (this.class ? this.class + " " : "") + d + "(" + xa(k) + ") #" + ia.count(d)); + function e(b, a, e, f, c) { f = f ? null : this; - b = this.resolveMultinameProperty(b, d, g); - this.asGetNumericProperty && T.isNumeric(b) ? b = this.asGetNumericProperty(b) : (d = this.asOpenMethods, b = f && d && d[b] ? d[b] : this[b]); - k = b.asApply(f, k); - 0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(k)); - return k; + b = this.resolveMultinameProperty(b, a, e); + this.asGetNumericProperty && W.isNumeric(b) ? (b = this.asGetNumericProperty(b), c = b.asApply(f, c)) : (a = this.asOpenMethods, c = f && a && a[b] ? a[b].apply(f, c) : this[b].asApply(f, c)); + return c; } - function g(b, d, g, f, k) { - a.traceCallExecution.value && a.callWriter.enter("call super " + (this.class ? this.class + " " : "") + g + "(" + xa(k) + ") #" + ia.count(g)); + function q(b, a, e, f, c) { b = b.object.baseClass; - d = b.traitsPrototype.resolveMultinameProperty(d, g, f); - g = b.traitsPrototype.asOpenMethods; - pa(g && g[d]); - k = g[d].asApply(this, k); - 0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(k)); - return k; + a = b.traitsPrototype.resolveMultinameProperty(a, e, f); + return b.traitsPrototype.asOpenMethods[a].apply(this, c); } - function r(b, d, g, f, k) { - a.traceCallExecution.value && a.callWriter.enter("set super " + (this.class ? this.class + " " : "") + g + "(" + va(k) + ") #" + ia.count(g)); + function n(b, e, f, c, g) { b = b.object.baseClass; - var e = b.traitsPrototype.resolveMultinameProperty(d, g, f); - this.asSlots.byQN[e] ? this.asSetProperty(d, g, f, k) : b.traitsPrototype[a.VM_OPEN_SET_METHOD_PREFIX + e].call(this, k); - 0 < a.traceCallExecution.value && a.callWriter.leave(""); + var n = b.traitsPrototype.resolveMultinameProperty(e, f, c); + this.asSlots.byQN[n] ? this.asSetProperty(e, f, c, g) : b.traitsPrototype[a.VM_OPEN_SET_METHOD_PREFIX + n].call(this, g); } - function w(b, d, g, f) { - a.traceCallExecution.value && a.callWriter.enter("get super " + (this.class ? this.class + " " : "") + g + " #" + ia.count(g)); + function x(b, e, f, c) { b = b.object.baseClass; - var k = b.traitsPrototype.resolveMultinameProperty(d, g, f); - d = this.asSlots.byQN[k] ? this.asGetProperty(d, g, f) : b.traitsPrototype[a.VM_OPEN_GET_METHOD_PREFIX + k].call(this); - 0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(d)); - return d; + var g = b.traitsPrototype.resolveMultinameProperty(e, f, c); + return this.asSlots.byQN[g] ? this.asGetProperty(e, f, c) : b.traitsPrototype[a.VM_OPEN_GET_METHOD_PREFIX + g].call(this); } - function z(b, a) { + function L(b, a) { if (b.classInfo) { - var d = T.getQualifiedName(b.classInfo.instanceInfo.name); - if (d === T.String) { - return String.asApply(null, a); + var e = W.getQualifiedName(b.classInfo.instanceInfo.name); + if (e === W.String) { + return String.apply(null, a); } - if (d === T.Boolean) { - return Boolean.asApply(null, a); + if (e === W.Boolean) { + return Boolean.apply(null, a); } - if (d === T.Number) { - return Number.asApply(null, a); + if (e === W.Number) { + return Number.apply(null, a); } } - d = b.instanceConstructor; + e = b.instanceConstructor; switch(a.length) { case 0: - return new d; + return new e; case 1: - return new d(a[0]); + return new e(a[0]); case 2: - return new d(a[0], a[1]); + return new e(a[0], a[1]); case 3: - return new d(a[0], a[1], a[2]); + return new e(a[0], a[1], a[2]); case 4: - return new d(a[0], a[1], a[2], a[3]); + return new e(a[0], a[1], a[2], a[3]); case 5: - return new d(a[0], a[1], a[2], a[3], a[4]); + return new e(a[0], a[1], a[2], a[3], a[4]); case 6: - return new d(a[0], a[1], a[2], a[3], a[4], a[5]); + return new e(a[0], a[1], a[2], a[3], a[4], a[5]); case 7: - return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6]); + return new e(a[0], a[1], a[2], a[3], a[4], a[5], a[6]); case 8: - return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]); + return new e(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]); case 9: - return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + return new e(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); case 10: - return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]); + return new e(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]); } - for (var g = [], f = 0;f < a.length;f++) { - g[f + 1] = a[f]; + for (var f = [], c = 0;c < a.length;c++) { + f[c + 1] = a[c]; } - return new (Function.bind.asApply(d, g)); + return new (Function.bind.apply(e, f)); } - function A(b, d, g, f) { - b = this.asGetProperty(b, d, g); - a.traceCallExecution.value && a.callWriter.enter("construct " + d + "(" + xa(f) + ") #" + ia.count(d)); - d = z(b, f); - 0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(d)); - return d; + function A(b, e, f, c) { + b = this.asGetProperty(b, e, f); + a.traceCallExecution.value && a.callWriter.enter("construct " + e + "(" + (c ? Ba(c) : "") + ") #" + ea.count(e)); + e = L(b, c); + 0 < a.traceCallExecution.value && a.callWriter.leave("return " + Ca(e)); + return e; } - function B(b, a, d) { - return this.resolveMultinameProperty(b, a, d) in this; + function H(b, a, e) { + return this.resolveMultinameProperty(b, a, e) in this; } - function M(b, a, d) { - b = this.resolveMultinameProperty(b, a, d); - return ra(this, b) || 0 <= this.asBindings.indexOf(b); + function K(b, a, e) { + b = this.resolveMultinameProperty(b, a, e); + return pa(this, b) || 0 <= this.asBindings.indexOf(b); } - function N(b, a, d) { - b = this.resolveMultinameProperty(b, a, d); - return wa(this, b); + function F(b, a, e) { + b = this.resolveMultinameProperty(b, a, e); + return Da(this, b); } - function K(b, a, d) { - return this.asHasTraitProperty(b, a, d) ? !1 : delete this[this.resolveMultinameProperty(b, a, d)]; + function J(b, a, e) { + return this.asHasTraitProperty(b, a, e) ? !1 : delete this[this.resolveMultinameProperty(b, a, e)]; } - function y(b, a, d) { - b = this.resolveMultinameProperty(b, a, d); + function M(b, a, e) { + b = this.resolveMultinameProperty(b, a, e); return 0 <= this.asBindings.indexOf(b); } function D(b) { return this[b]; } - function L(b, a) { + function B(b, a) { this[b] = a; } - function H(b) { + function E(b) { 0 === b && ha(this, "asEnumerableKeys", this.asGetEnumerableKeys()); for (var a = this.asEnumerableKeys;b < a.length;) { if (this.asHasProperty(void 0, a[b], 0)) { @@ -9098,21 +9428,19 @@ var Namespace = Shumway.AVM2.ABC.Namespace; } return 0; } - function J(b) { - var a = this.asEnumerableKeys; - pa(a && 0 < b && b < a.length + 1); - return a[b - 1]; + function y(b) { + return this.asEnumerableKeys[b - 1]; } - function C(b) { + function z(b) { return this.asGetPublicProperty(this.asNextName(b)); } - function E(b) { - if (qa(b.object)) { + function G(b) { + if (ta(b.object)) { b.index = 0, b.object = null; } else { - var a = ya(b.object), d = a.asNextNameIndex(b.index); - if (0 < d) { - b.index = d, b.object = a; + var a = Ea(b.object), e = a.asNextNameIndex(b.index); + if (0 < e) { + b.index = e, b.object = a; } else { for (;;) { a = Object.getPrototypeOf(a); @@ -9121,9 +9449,9 @@ var Namespace = Shumway.AVM2.ABC.Namespace; b.object = null; break; } - d = a.asNextNameIndex(0); - if (0 < d) { - b.index = d; + e = a.asNextNameIndex(0); + if (0 < e) { + b.index = e; b.object = a; break; } @@ -9131,109 +9459,109 @@ var Namespace = Shumway.AVM2.ABC.Namespace; } } } - function F() { + function C() { if (this instanceof String || this instanceof Number) { return[]; } - for (var b = Object.keys(this), a = [], d = 0;d < b.length;d++) { - var g = b[d]; - c.isNumeric(g) ? a.push(g) : (g = T.stripPublicQualifier(g), void 0 !== g && a.push(g)); + for (var b = Object.keys(this), a = [], e = 0;e < b.length;e++) { + var f = b[e]; + d.isNumeric(f) ? a.push(f) : (f = W.stripPublicQualifier(f), void 0 !== f && a.push(f)); } return a; } function I(b, a) { - b || G("TypeError", h.Errors.NullPointerError, a); + b || P("TypeError", k.Errors.NullPointerError, a); } - function G(b, d, g, f, k, e) { - d.fqn && (b = d.fqn); - var r = c.AVM2.formatErrorMessage.apply(null, Array.prototype.slice.call(arguments, 1)), m = a.AVM2.currentDomain(), w = d.code; - throw new (m.getClass(b).instanceConstructor)(r, w); + function P(b, e, f, c, g, n) { + e.fqn && (b = e.fqn); + var q = d.AVM2.formatErrorMessage.apply(null, Array.prototype.slice.call(arguments, 1)), p = a.AVM2.currentDomain(), h = e.code; + throw new (p.getClass(b).instanceConstructor)(q, h); } - function Z(b) { - return b instanceof h.AS.ASXML || b instanceof h.AS.ASXMLList || b instanceof h.AS.ASQName || b instanceof h.AS.ASNamespace; + function T(b) { + return b instanceof k.AS.ASXML || b instanceof k.AS.ASXMLList || b instanceof k.AS.ASQName || b instanceof k.AS.ASNamespace; } - function Q(b, a) { + function O(b, a) { return b.coerce(a); } - function S(b) { + function Q(b) { return "string" === typeof b ? b : void 0 == b ? null : b + ""; } - function O(b) { + function S(b) { return b instanceof Boolean ? b.valueOf() : void 0 == b ? null : "string" === typeof b || "number" === typeof b ? b : Object(b); } - function P(b, a) { + function V(b, a) { return String(b).localeCompare(String(a)); } - function V(b) { - return b instanceof h.AS.ASXML || b instanceof h.AS.ASXMLList; + function aa(b) { + return b instanceof k.AS.ASXML || b instanceof k.AS.ASXMLList; } - function $(c) { + function $(p) { "Object Number Boolean String Array Date RegExp".split(" ").forEach(function(b) { - Ha(c[b].prototype, a.VM_NATIVE_PROTOTYPE_FLAG, !0); + Fa(p[b].prototype, a.VM_NATIVE_PROTOTYPE_FLAG, !0); }); - ha(c.Object.prototype, "getNamespaceResolutionMap", s); - ha(c.Object.prototype, "resolveMultinameProperty", v); - ha(c.Object.prototype, "asGetProperty", u); - ha(c.Object.prototype, "asGetPublicProperty", p); - ha(c.Object.prototype, "asGetResolvedStringProperty", l); - ha(c.Object.prototype, "asSetProperty", q); - ha(c.Object.prototype, "asSetPublicProperty", m); - ha(c.Object.prototype, "asDefineProperty", k); - ha(c.Object.prototype, "asDefinePublicProperty", n); - ha(c.Object.prototype, "asGetPropertyDescriptor", f); - ha(c.Object.prototype, "asCallProperty", b); - ha(c.Object.prototype, "asCallSuper", g); - ha(c.Object.prototype, "asGetSuper", w); - ha(c.Object.prototype, "asSetSuper", r); - ha(c.Object.prototype, "asCallPublicProperty", d); - ha(c.Object.prototype, "asCallResolvedStringProperty", e); - ha(c.Object.prototype, "asConstructProperty", A); - ha(c.Object.prototype, "asHasProperty", B); - ha(c.Object.prototype, "asHasPropertyInternal", B); - ha(c.Object.prototype, "asHasOwnProperty", M); - ha(c.Object.prototype, "asPropertyIsEnumerable", N); - ha(c.Object.prototype, "asHasTraitProperty", y); - ha(c.Object.prototype, "asDeleteProperty", K); - ha(c.Object.prototype, "asHasNext2", E); - ha(c.Object.prototype, "asNextName", J); - ha(c.Object.prototype, "asNextValue", C); - ha(c.Object.prototype, "asNextNameIndex", H); - ha(c.Object.prototype, "asGetEnumerableKeys", F); - ha(c.Function.prototype, "asCall", c.Function.prototype.call); - ha(c.Function.prototype, "asApply", c.Function.prototype.apply); + ha(p.Object.prototype, "getNamespaceResolutionMap", r); + ha(p.Object.prototype, "resolveMultinameProperty", v); + ha(p.Object.prototype, "asGetProperty", t); + ha(p.Object.prototype, "asGetPublicProperty", u); + ha(p.Object.prototype, "asGetResolvedStringProperty", l); + ha(p.Object.prototype, "asSetProperty", s); + ha(p.Object.prototype, "asSetPublicProperty", h); + ha(p.Object.prototype, "asDefineProperty", g); + ha(p.Object.prototype, "asDefinePublicProperty", m); + ha(p.Object.prototype, "asGetPropertyDescriptor", f); + ha(p.Object.prototype, "asCallProperty", e); + ha(p.Object.prototype, "asCallSuper", q); + ha(p.Object.prototype, "asGetSuper", x); + ha(p.Object.prototype, "asSetSuper", n); + ha(p.Object.prototype, "asCallPublicProperty", b); + ha(p.Object.prototype, "asCallResolvedStringProperty", c); + ha(p.Object.prototype, "asConstructProperty", A); + ha(p.Object.prototype, "asHasProperty", H); + ha(p.Object.prototype, "asHasPropertyInternal", H); + ha(p.Object.prototype, "asHasOwnProperty", K); + ha(p.Object.prototype, "asPropertyIsEnumerable", F); + ha(p.Object.prototype, "asHasTraitProperty", M); + ha(p.Object.prototype, "asDeleteProperty", J); + ha(p.Object.prototype, "asHasNext2", G); + ha(p.Object.prototype, "asNextName", y); + ha(p.Object.prototype, "asNextValue", z); + ha(p.Object.prototype, "asNextNameIndex", E); + ha(p.Object.prototype, "asGetEnumerableKeys", C); + ha(p.Function.prototype, "asCall", p.Function.prototype.call); + ha(p.Function.prototype, "asApply", p.Function.prototype.apply); "Array Object Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" ").forEach(function(b) { - b in c ? (ha(c[b].prototype, "asGetNumericProperty", D), ha(c[b].prototype, "asSetNumericProperty", L)) : console.warn(b + " was not found in globals"); + b in p ? (ha(p[b].prototype, "asGetNumericProperty", D), ha(p[b].prototype, "asSetNumericProperty", B)) : console.warn(b + " was not found in globals"); }); - c.Array.prototype.asGetProperty = function(b, a, d) { - return "number" === typeof a ? this[a] : u.call(this, b, a, d); + p.Array.prototype.asGetProperty = function(b, a, e) { + return "number" === typeof a ? this[a] : t.call(this, b, a, e); }; - c.Array.prototype.asSetProperty = function(b, a, d, g) { + p.Array.prototype.asSetProperty = function(b, a, e, f) { if ("number" === typeof a) { - this[a] = g; + this[a] = f; } else { - return q.call(this, b, a, d, g); + return s.call(this, b, a, e, f); } }; } - function W(b, d) { - d && (new a.CatchBindings(new a.Scope(null, this), d)).applyTo(b, this); + function w(b, e) { + e && (new a.CatchBindings(new a.Scope(null, this), e)).applyTo(b, this); } - function x(b, a) { + function U(b, a) { void 0 === a && (a = 0); return Array.prototype.slice.call(b, a); } - function ea(b) { + function ba(b) { return!b.hasBody || b.hasExceptions() && !a.compilerEnableExceptions.value || b.hasSetsDxns() || b.code.length > a.compilerMaximumMethodSize.value ? !1 : !0; } - function Y(b) { - return!ea(b) || b.isClassInitializer || b.isScriptInitializer ? !1 : !0; - } function R(b) { + return!ba(b) || b.isClassInitializer || b.isScriptInitializer ? !1 : !0; + } + function N(b) { if (b.hasExceptions()) { return!1; } b = b.holder; - b instanceof fa && (b = b.instanceInfo); + b instanceof Y && (b = b.instanceInfo); if (b instanceof la) { switch(b.name.namespaces[0].uri) { case "flash.geom": @@ -9248,135 +9576,135 @@ var Namespace = Shumway.AVM2.ABC.Namespace; } return!1; } - function U(b) { + function Z(b) { if (a.codeCaching.value) { - var d = a.CODE_CACHE[b.abc.hash]; - if (d) { - d.isInitialized || (d.isInitialized = !0); - if (d = d.methods[b.index]) { - return console.log("Linking CC: " + b), h.countTimeline("Code Cache Hit"), d; + var e = a.CODE_CACHE[b.abc.hash]; + if (e) { + e.isInitialized || (e.isInitialized = !0); + if (e = e.methods[b.index]) { + return console.log("Linking CC: " + b), k.countTimeline("Code Cache Hit"), e; } - b.isInstanceInitializer || b.isClassInitializer ? h.countTimeline("Code Cache Query On Initializer") : (h.countTimeline("Code Cache MISS ON OTHER"), console.warn("Shouldn't MISS: " + b + " " + b.debugName)); - h.countTimeline("Code Cache Miss"); + b.isInstanceInitializer || b.isClassInitializer ? k.countTimeline("Code Cache Query On Initializer") : (k.countTimeline("Code Cache MISS ON OTHER"), console.warn("Shouldn't MISS: " + b + " " + b.debugName)); + k.countTimeline("Code Cache Miss"); } else { - console.warn("Cannot Find Code Cache For ABC, name: " + b.abc.name + ", hash: " + b.abc.hash), h.countTimeline("Code Cache ABC Miss"); + console.warn("Cannot Find Code Cache For ABC, name: " + b.abc.name + ", hash: " + b.abc.hash), k.countTimeline("Code Cache ABC Miss"); } } } - function ba(b, a, d) { - var g = !1, f = b.parameters.map(function(b) { - void 0 !== b.value && (g = !0); + function fa(b) { + var a = b.name ? W.getFullQualifiedName(b.name) : "fn" + xa; + if (b.holder) { + var e = ""; + b.holder instanceof Y ? e = "static$" + b.holder.instanceInfo.name.getName() : b.holder instanceof la ? e = b.holder.name.getName() : b.holder instanceof ma && (e = "script"); + a = e + "$" + a; + } + a = d.StringUtilities.escapeString(a); + b.verified && (a += "$V"); + return a; + } + function X(b, a, e) { + var f = !1, c = b.parameters.map(function(b) { + void 0 !== b.value && (f = !0); return b.value; }); - d = d ? function(a) { - var d = this === jsGlobal ? a.global.object : this, k = x(arguments, 1); - g && k.length < f.length && (k = k.concat(f.slice(k.length - f.length))); - return c.AVM2.Interpreter.interpretMethod(d, b, a, k); + e = e ? function(a) { + var e = this === jsGlobal ? a.global.object : this, g = U(arguments, 1); + f && g.length < c.length && (g = g.concat(c.slice(g.length - c.length))); + return d.AVM2.Interpreter.interpretMethod(e, b, a, g); } : function() { - var d = this === jsGlobal ? a.global.object : this, k = x(arguments); - g && k.length < f.length && (k = k.concat(f.slice(arguments.length - f.length))); - return c.AVM2.Interpreter.interpretMethod(d, b, a, k); + var e = this === jsGlobal ? a.global.object : this, g = U(arguments); + f && g.length < c.length && (g = g.concat(c.slice(arguments.length - c.length))); + return d.AVM2.Interpreter.interpretMethod(e, b, a, g); }; - b.hasSetsDxns() && (d = function(b) { + b.hasSetsDxns() && (e = function(b) { return function() { - var a = c.AVM2.AS.ASXML.defaultNamespace; + var a = d.AVM2.AS.ASXML.defaultNamespace; try { - var d = b.apply(this, arguments); - c.AVM2.AS.ASXML.defaultNamespace = a; - return d; - } catch (g) { - throw c.AVM2.AS.ASXML.defaultNamespace = a, g; + var e = b.apply(this, arguments); + d.AVM2.AS.ASXML.defaultNamespace = a; + return e; + } catch (f) { + throw d.AVM2.AS.ASXML.defaultNamespace = a, f; } }; - }(d)); - d.instanceConstructor = d; - d.debugName = "Interpreter Function #" + Ia++; - return d; + }(e)); + e.instanceConstructor = e; + var g = fa(b); + e.displayName = e.debugName = g; + e.methodInfo = b; + return jsGlobal[g] = e; } - function X(b, d, g, f, k) { - k = U(b); - var e; - k || (e = h.Compiler.compileMethod(b, d, g)); - d = b.name ? T.getQualifiedName(b.name) : "fn" + Ca; - b.holder && (g = "", b.holder instanceof fa ? g = "static$" + b.holder.instanceInfo.name.getName() : b.holder instanceof la ? g = b.holder.name.getName() : b.holder instanceof ca && (g = "script"), d = g + "$" + d); - d = c.StringUtilities.escapeString(d); - b.verified && (d += "$V"); - f || (g = c.AVM2.Compiler.breakFilter.value) && 0 <= d.search(g) && (f = !0); - g = e.body; - f && (g = "{ debugger; \n" + g + "}"); - if (!k) { - var r = "function " + d + " (" + e.parameters.join(", ") + ") " + g, r = r + ("//# sourceURL=fun-" + d + ".as") + function ia(b, a, e, f, c) { + c = Z(b); + var g; + c || (g = k.Compiler.compileMethod(b, a, e)); + a = fa(b); + f || (e = d.AVM2.Compiler.breakFilter.value) && 0 <= a.search(e) && (f = !0); + e = g.body; + f && (e = "{ debugger; \n" + e + "}"); + if (!c) { + var n = "jsGlobal. " + a + " = function " + a + " (" + g.parameters.join(", ") + ") " + e, n = n + ("//# sourceURL=fun-" + a + ".as") } - 1 < a.traceFunctions.value && b.trace(new ma, b.abc); - b.debugTrace = function() { - b.trace(new ma, b.abc); - }; - 0 < a.traceFunctions.value && console.log(r); - f = k || (new Function("return " + r))(); - f.debugName = "Compiled Function #" + Ja++; + (new Function("return " + (c || n)))(); + f = jsGlobal[a]; + f.debugName = a; + f.methodInfo = b; return f; } - function ga(b, d, g, f, k) { - void 0 === k && (k = !1); - pa(!b.isNative(), "Method should have a builtin: " + b.name); + function ga(b, e, f, c, g) { + void 0 === g && (g = !1); if (b.freeMethod) { - return g ? a.bindFreeMethodScope(b, d) : b.freeMethod; + return f ? a.bindFreeMethodScope(b, e) : b.freeMethod; } - var e; - if (e = a.checkMethodOverrides(b)) { - return pa(!g), e; + var n; + if ((n = a.checkMethodOverrides(b)) || (n = a.checkCommonMethodPatterns(b))) { + return n; } - if (e = a.checkCommonMethodPatterns(b)) { - return e; - } - ja(b); - 1 !== b.abc.applicationDomain.mode && Y(b) || R(b) || (k = !0); - (e = c.AVM2.Compiler.compileFilter.value) && b.name && 0 > T.getQualifiedName(b.name).search(e) && (k = !0); - k ? b.freeMethod = ba(b, d, g) : (Ca++, b.freeMethod = X(b, d, g, f, b.isInstanceInitializer)); + ca(b); + 1 !== b.abc.applicationDomain.mode && R(b) || N(b) || (g = !0); + (n = d.AVM2.Compiler.compileFilter.value) && b.name && 0 > W.getQualifiedName(b.name).search(n) && (g = !0); + g ? b.freeMethod = X(b, e, f) : (xa++, b.freeMethod = ia(b, e, f, c, b.isInstanceInitializer)); b.freeMethod.methodInfo = b; - return g ? a.bindFreeMethodScope(b, d) : b.freeMethod; + return f ? a.bindFreeMethodScope(b, e) : b.freeMethod; } - function ja(b) { + function ca(b) { if (!b.analysis) { - b.analysis = new h.Analysis(b); - b.needsActivation() && (b.activationPrototype = new Da(b), (new a.ActivationBindings(b)).applyTo(b.abc.applicationDomain, b.activationPrototype)); - for (var d = b.exceptions, g = 0, f = d.length;g < f;g++) { - var k = d[g]; - if (k.varName) { - var e = Object.create(na.prototype); - e.kind = 0; - e.name = k.varName; - e.typeName = k.typeName; - e.holder = b; - k.scopeObject = new W(b.abc.applicationDomain, e); + b.analysis = new k.Analysis(b); + b.needsActivation() && (b.activationPrototype = new ya(b), (new a.ActivationBindings(b)).applyTo(b.abc.applicationDomain, b.activationPrototype)); + for (var e = b.exceptions, f = 0, c = e.length;f < c;f++) { + var g = e[f]; + if (g.varName) { + var n = Object.create(na.prototype); + n.kind = 0; + n.name = g.varName; + n.typeName = g.typeName; + n.holder = b; + g.scopeObject = new w(b.abc.applicationDomain, n); } else { - k.scopeObject = new W(void 0, void 0); + g.scopeObject = new w(void 0, void 0); } } } } - function aa(b, d, g) { - pa(d); - pa(b.isMethod() || b.isGetter() || b.isSetter()); - var f = b.methodInfo, k; + function da(b, a, e) { + var f = b.methodInfo, c; if (f.isNative()) { - if (2 <= a.traceExecution.value && console.log("Retrieving Native For Trait: " + b.holder + " " + b), (d = b.metadata) && d.native ? k = c.AVM2.AS.getNative(d.native.value[0].value) : g && (k = c.AVM2.AS.getMethodOrAccessorNative(b, g)), !k) { + if ((a = b.metadata) && a.native ? c = d.AVM2.AS.getNative(a.native.value[0].value) : e && (c = d.AVM2.AS.getMethodOrAccessorNative(b, e)), !c) { return function(a) { return function() { - c.Debug.warning("Calling undefined native method: " + b.kindName() + " " + a.holder.name + "::" + T.getQualifiedName(a.name)); + d.Debug.warning("Calling undefined native method: " + b.kindName() + " " + a.holder.name + "::" + W.getQualifiedName(a.name)); }; }(f); } } else { - 2 <= a.traceExecution.value && console.log("Creating Function For Trait: " + b.holder + " " + b), k = ga(f, d, !1, !1), pa(k); + c = ga(f, a, !1, !1); } - 3 <= a.traceExecution.value && console.log("Made Function: " + T.getQualifiedName(f.name)); - return k; + return c; } a.sealConstTraits = !1; a.useAsAdd = !0; - var ia = new c.Metrics.Counter(!0), T = c.AVM2.ABC.Multiname, da = c.AVM2.ABC.Namespace, fa = c.AVM2.ABC.ClassInfo, la = c.AVM2.ABC.InstanceInfo, ca = c.AVM2.ABC.ScriptInfo, na = c.AVM2.ABC.Trait, ma = c.IndentingWriter, ra = c.ObjectUtilities.hasOwnProperty, wa = c.ObjectUtilities.propertyIsEnumerable, qa = c.isNullOrUndefined, ya = c.ObjectUtilities.boxValue, pa = c.Debug.assert, za = c.ObjectUtilities.defineNonEnumerableGetterOrSetter, ha = c.ObjectUtilities.defineNonEnumerableProperty, - Ha = c.ObjectUtilities.defineReadOnlyProperty, Ma = c.ObjectUtilities.defineNonEnumerableGetter, va = c.StringUtilities.toSafeString, xa = c.StringUtilities.toSafeArrayString; + var ea = new d.Metrics.Counter(!0), W = d.AVM2.ABC.Multiname, ka = d.AVM2.ABC.Namespace, Y = d.AVM2.ABC.ClassInfo, la = d.AVM2.ABC.InstanceInfo, ma = d.AVM2.ABC.ScriptInfo, na = d.AVM2.ABC.Trait, sa = d.IndentingWriter, pa = d.ObjectUtilities.hasOwnProperty, Da = d.ObjectUtilities.propertyIsEnumerable, ta = d.isNullOrUndefined, Ea = d.ObjectUtilities.boxValue, ua = d.ObjectUtilities.defineNonEnumerableGetterOrSetter, ha = d.ObjectUtilities.defineNonEnumerableProperty, Fa = d.ObjectUtilities.defineReadOnlyProperty, + Ia = d.ObjectUtilities.defineNonEnumerableGetter, Ca = d.StringUtilities.toSafeString, Ba = d.StringUtilities.toSafeArrayString; a.VM_SLOTS = "asSlots"; a.VM_LENGTH = "asLength"; a.VM_BINDINGS = "asBindings"; @@ -9388,72 +9716,72 @@ var Namespace = Shumway.AVM2.ABC.Namespace; a.VM_OPEN_GET_METHOD_PREFIX = "g"; a.SAVED_SCOPE_NAME = "$SS"; a.VM_METHOD_OVERRIDES = Object.create(null); - var Ia = 1, Ja = 1, Ca = 0; + var xa = 0; a.isNativePrototype = function(b) { return Object.prototype.hasOwnProperty.call(b, a.VM_NATIVE_PROTOTYPE_FLAG); }; a.traitsWriter = null; - a.callWriter = new ma; - a.patch = function(b, d) { - pa(c.isFunction(d)); - for (var g = 0;g < b.length;g++) { - var f = b[g]; + a.callWriter = null; + lazyInitializer(d.AVM2.Runtime, function() { + return new sa; + }); + a.patch = function(b, e) { + for (var f = 0;f < b.length;f++) { + var c = b[f]; if (3 <= a.traceExecution.value) { - var k = "Patching: "; - f.name ? k += f.name : f.get ? k += "get " + f.get : f.set && (k += "set " + f.set); - a.traitsWriter && a.traitsWriter.redLn(k); + var g = "Patching: "; + c.name ? g += c.name : c.get ? g += "get " + c.get : c.set && (g += "set " + c.set); + a.traitsWriter && a.traitsWriter.redLn(g); } - f.get ? za(f.object, f.get, d, !0) : f.set ? za(f.object, f.set, d, !1) : ha(f.object, f.name, d); + c.get ? ua(c.object, c.get, e, !0) : c.set ? ua(c.object, c.set, e, !1) : ha(c.object, c.name, e); } }; - a.applyMethodTrait = function(b, d, g, f) { - var k = g.trait; - pa(k); - var e = k.isMethod(), r = k.isGetter(), c = e ? a.VM_OPEN_METHOD_PREFIX : r ? a.VM_OPEN_GET_METHOD_PREFIX : a.VM_OPEN_SET_METHOD_PREFIX, m = k.methodInfo.cachedMethodOrTrampoline, w; - m ? m.isTrampoline && (w = m.patchTargets) : (k.methodInfo.isNative() ? m = aa(k, g.scope, g.natives) : (w = [], m = a.makeTrampoline(k, g.scope, g.natives, w, e ? k.methodInfo.parameters.length : 0, String(k.name))), pa(m), k.methodInfo.cachedMethodOrTrampoline = m); - w && (w.push({object:d, name:c + b}), e ? w.push({object:d.asOpenMethods, name:b}) : (g = {object:d}, r ? g.get = b : g.set = b, w.push(g))); - ha(d, c + b, m); - e ? (d.asOpenMethods[b] = m, f ? (f = k.methodInfo.cachedMemoizer, f || (m = {value:m}, w && w.push({object:m, name:"value"}), f = a.makeMemoizer(b, m), k.methodInfo.cachedMemoizer = f), Ma(d, b, f), t(d, b)) : ha(d, b, m)) : (za(d, b, m, r), f && ha(d, c + b, m)); + a.applyMethodTrait = function(b, e, f, c) { + var g = f.trait, n = g.isMethod(), q = g.isGetter(), h = n ? a.VM_OPEN_METHOD_PREFIX : q ? a.VM_OPEN_GET_METHOD_PREFIX : a.VM_OPEN_SET_METHOD_PREFIX, m = g.methodInfo.cachedMethodOrTrampoline, s; + m ? m.isTrampoline && (s = m.patchTargets) : (g.methodInfo.isNative() ? m = da(g, f.scope, f.natives) : (s = [], m = a.makeTrampoline(g, f.scope, f.natives, s, n ? g.methodInfo.parameters.length : 0, String(g.name))), g.methodInfo.cachedMethodOrTrampoline = m); + s && (s.push({object:e, name:h + b}), n ? s.push({object:e.asOpenMethods, name:b}) : (f = {object:e}, q ? f.get = b : f.set = b, s.push(f))); + ha(e, h + b, m); + n ? (e.asOpenMethods[b] = m, c ? (c = g.methodInfo.cachedMemoizer, c || (m = {value:m}, s && s.push({object:m, name:"value"}), c = a.makeMemoizer(b, m), g.methodInfo.cachedMemoizer = c), Ia(e, b, c), p(e, b)) : ha(e, b, m)) : (ua(e, b, m, q), c && ha(e, h + b, m)); }; - a.getNamespaceResolutionMap = s; + a.getNamespaceResolutionMap = r; a.resolveMultinameProperty = v; - a.asGetPublicProperty = p; - a.asGetProperty = u; + a.asGetPublicProperty = u; + a.asGetProperty = t; a.asGetResolvedStringProperty = l; - a.asCallResolvedStringProperty = e; + a.asCallResolvedStringProperty = c; a.asGetResolvedStringPropertyFallback = function(b) { - b = T.getNameFromPublicQualifiedName(b); - return this.asGetProperty([da.PUBLIC], b, 0); + b = W.getNameFromPublicQualifiedName(b); + return this.asGetProperty([ka.PUBLIC], b, 0); }; - a.asSetPublicProperty = m; - a.forwardValueOf = new Function("", "return this." + T.VALUE_OF + ".apply(this, arguments)//# sourceURL=forward-valueOf.as"); - a.forwardToString = new Function("", "return this." + T.TO_STRING + ".apply(this, arguments)//# sourceURL=forward-toString.as"); - a.asSetProperty = q; - a.asDefinePublicProperty = n; - a.asDefineProperty = k; + a.asSetPublicProperty = h; + a.forwardValueOf = new Function("", "return this." + W.VALUE_OF + ".apply(this, arguments)//# sourceURL=forward-valueOf.as"); + a.forwardToString = new Function("", "return this." + W.TO_STRING + ".apply(this, arguments)//# sourceURL=forward-toString.as"); + a.asSetProperty = s; + a.asDefinePublicProperty = m; + a.asDefineProperty = g; a.asGetPropertyDescriptor = f; - a.asCallPublicProperty = d; - a.asCallProperty = b; - a.asCallSuper = g; - a.asSetSuper = r; - a.asGetSuper = w; - a.construct = z; + a.asCallPublicProperty = b; + a.asCallProperty = e; + a.asCallSuper = q; + a.asSetSuper = n; + a.asGetSuper = x; + a.construct = L; a.asConstructProperty = A; - a.asHasProperty = B; - a.asHasOwnProperty = M; - a.asPropertyIsEnumerable = N; - a.asDeleteProperty = K; - a.asHasTraitProperty = y; + a.asHasProperty = H; + a.asHasOwnProperty = K; + a.asPropertyIsEnumerable = F; + a.asDeleteProperty = J; + a.asHasTraitProperty = M; a.asGetNumericProperty = D; - a.asSetNumericProperty = L; - a.asGetDescendants = function(b, a, d) { - c.Debug.notImplemented("asGetDescendants"); + a.asSetNumericProperty = B; + a.asGetDescendants = function(b, a, e) { + d.Debug.notImplemented("asGetDescendants"); }; - a.asNextNameIndex = H; - a.asNextName = J; - a.asNextValue = C; - a.asHasNext2 = E; - a.asGetEnumerableKeys = F; + a.asNextNameIndex = E; + a.asNextName = y; + a.asNextValue = z; + a.asHasNext2 = G; + a.asGetEnumerableKeys = C; a.asTypeOf = function(b) { if (b) { if (b.constructor === String) { @@ -9465,54 +9793,54 @@ var Namespace = Shumway.AVM2.ABC.Namespace; if (b.constructor === Boolean) { return "boolean"; } - if (b instanceof c.AVM2.AS.ASXML || b instanceof c.AVM2.AS.ASXMLList) { + if (b instanceof d.AVM2.AS.ASXML || b instanceof d.AVM2.AS.ASXMLList) { return "xml"; } - if (c.AVM2.AS.ASClass.isType(b)) { + if (d.AVM2.AS.ASClass.isType(b)) { return "object"; } } return typeof b; }; a.publicizeProperties = function(b) { - for (var a = Object.keys(b), d = 0;d < a.length;d++) { - var g = a[d]; - if (!T.isPublicQualifiedName(g)) { - var f = b[g]; - b[T.getPublicQualifiedName(g)] = f; - delete b[g]; + for (var a = Object.keys(b), e = 0;e < a.length;e++) { + var f = a[e]; + if (!W.isPublicQualifiedName(f)) { + var c = b[f]; + b[W.getPublicQualifiedName(f)] = c; + delete b[f]; } } }; a.asGetSlot = function(b, a) { return b[b.asSlots.byID[a].name]; }; - a.asSetSlot = function(b, a, d) { + a.asSetSlot = function(b, a, e) { a = b.asSlots.byID[a]; if (!a.const) { - var g = a.type; - b[a.name] = g && g.coerce ? g.coerce(d) : d; + var f = a.type; + b[a.name] = f && f.coerce ? f.coerce(e) : e; } }; - a.asCheckVectorSetNumericProperty = function(b, a, d) { - (0 > b || b > a || b === a && d || !c.isNumeric(b)) && G("RangeError", h.Errors.OutOfRangeError, b, a); + a.asCheckVectorSetNumericProperty = function(b, a, e) { + (0 > b || b > a || b === a && e || !d.isNumeric(b)) && P("RangeError", k.Errors.OutOfRangeError, b, a); }; a.asCheckVectorGetNumericProperty = function(b, a) { - (0 > b || b >= a || !c.isNumeric(b)) && G("RangeError", h.Errors.OutOfRangeError, b, a); + (0 > b || b >= a || !d.isNumeric(b)) && P("RangeError", k.Errors.OutOfRangeError, b, a); }; a.checkNullParameter = I; - a.checkParameterType = function(b, a, d) { + a.checkParameterType = function(b, a, e) { I(b, a); - d.isType(b) || G("TypeError", h.Errors.CheckTypeFailedError, b, d.classInfo.instanceInfo.name.getOriginalName()); + e.isType(b) || P("TypeError", k.Errors.CheckTypeFailedError, b, e.classInfo.instanceInfo.name.getOriginalName()); }; - a.throwError = G; + a.throwError = P; a.translateError = function(b, a) { if (a instanceof Error) { - var d = b.getClass(a.name); - if (d) { - return new d.instanceConstructor(c.AVM2.translateErrorMessage(a)); + var e = b.getClass(a.name); + if (e) { + return new e.instanceConstructor(d.AVM2.translateErrorMessage(a)); } - c.Debug.unexpected("Can't translate error: " + a); + d.Debug.unexpected("Can't translate error: " + a); } return a; }; @@ -9526,34 +9854,33 @@ var Namespace = Shumway.AVM2.ABC.Namespace; return b.isType(a) ? a : null; }; a.escapeXMLAttribute = function(b) { - return h.AS.escapeAttributeValue(b); + return k.AS.escapeAttributeValue(b); }; a.escapeXMLElement = function(b) { - return h.AS.escapeElementValue(b); + return k.AS.escapeElementValue(b); }; a.asEquals = function(b, a) { - return Z(b) ? b.equals(a) : Z(a) ? a.equals(b) : b == a; + return T(b) ? b.equals(a) : T(a) ? a.equals(b) : b == a; }; - a.asCoerceByMultiname = function(b, a, d) { - pa(a.isQName()); - switch(T.getQualifiedName(a)) { - case T.Int: - return d | 0; - case T.Uint: - return d >>> 0; - case T.String: - return S(d); - case T.Number: - return+d; - case T.Boolean: - return!!d; - case T.Object: - return O(d); + a.asCoerceByMultiname = function(b, a, e) { + switch(W.getQualifiedName(a)) { + case W.Int: + return e | 0; + case W.Uint: + return e >>> 0; + case W.String: + return Q(e); + case W.Number: + return+e; + case W.Boolean: + return!!e; + case W.Object: + return S(e); } - return Q(b.abc.applicationDomain.getType(a), d); + return O(b.abc.applicationDomain.getType(a), e); }; - a.asCoerce = Q; - a.asCoerceString = S; + a.asCoerce = O; + a.asCoerceString = Q; a.asCoerceInt = function(b) { return b | 0; }; @@ -9566,50 +9893,48 @@ var Namespace = Shumway.AVM2.ABC.Namespace; a.asCoerceBoolean = function(b) { return!!b; }; - a.asCoerceObject = O; - a.asDefaultCompareFunction = P; - a.asCompare = function(b, a, d, g) { - c.Debug.assertNotImplemented(!(d & 4), "UNIQUESORT"); - c.Debug.assertNotImplemented(!(d & 8), "RETURNINDEXEDARRAY"); - var f = 0; - g || (g = P); - d & 1 && (b = String(b).toLowerCase(), a = String(a).toLowerCase()); - d & 16 ? (b = c.toNumber(b), a = c.toNumber(a), f = b < a ? -1 : b > a ? 1 : 0) : f = g(b, a); - d & 2 && (f *= -1); - return f; + a.asCoerceObject = S; + a.asDefaultCompareFunction = V; + a.asCompare = function(b, a, e, f) { + var c = 0; + f || (f = V); + e & 1 && (b = String(b).toLowerCase(), a = String(a).toLowerCase()); + e & 16 ? (b = d.toNumber(b), a = d.toNumber(a), c = b < a ? -1 : b > a ? 1 : 0) : c = f(b, a); + e & 2 && (c *= -1); + return c; }; a.asAdd = function(b, a) { - return "string" === typeof b || "string" === typeof a ? String(b) + String(a) : V(b) && V(a) ? c.AVM2.AS.ASXMLList.addXML(b, a) : b + a; + return "string" === typeof b || "string" === typeof a ? String(b) + String(a) : aa(b) && aa(a) ? d.AVM2.AS.ASXMLList.addXML(b, a) : b + a; }; a.getDescendants = function(b, a) { - if (!V(b)) { + if (!aa(b)) { throw "Not XML object in getDescendants"; } return b.descendants(a); }; a.checkFilter = function(b) { - if (!b.class || !V(b)) { + if (!b.class || !aa(b)) { throw "TypeError operand of childFilter not of XML type"; } return b; }; a.initializeGlobalObject = $; $(jsGlobal); - a.nameInTraits = function(b, d) { - if (b.hasOwnProperty(a.VM_BINDINGS) && b.hasOwnProperty(d)) { + a.nameInTraits = function(b, e) { + if (b.hasOwnProperty(a.VM_BINDINGS) && b.hasOwnProperty(e)) { return!0; } - var g = Object.getPrototypeOf(b); - return g.hasOwnProperty(a.VM_BINDINGS) && g.hasOwnProperty(d); + var f = Object.getPrototypeOf(b); + return f.hasOwnProperty(a.VM_BINDINGS) && f.hasOwnProperty(e); }; - a.CatchScopeObject = W; - var ta = function() { - function b(d) { - this.scriptInfo = d; - d.global = this; - this.scriptBindings = new a.ScriptBindings(d, new a.Scope(null, this, !1)); - this.scriptBindings.applyTo(d.abc.applicationDomain, this); - d.loaded = !0; + a.CatchScopeObject = w; + var qa = function() { + function b(e) { + this.scriptInfo = e; + e.global = this; + this.scriptBindings = new a.ScriptBindings(e, new a.Scope(null, this, !1)); + this.scriptBindings.applyTo(e.abc.applicationDomain, this); + e.loaded = !0; } b.prototype.toString = function() { return "[object global]"; @@ -9621,18 +9946,17 @@ var Namespace = Shumway.AVM2.ABC.Namespace; return this.scriptInfo.executing; }; b.prototype.ensureExecuted = function() { - c.AVM2.Runtime.ensureScriptIsExecuted(this.scriptInfo); + d.AVM2.Runtime.ensureScriptIsExecuted(this.scriptInfo); }; return b; }(); - a.Global = ta; - ha(ta.prototype, T.getPublicQualifiedName("toString"), function() { + a.Global = qa; + ha(qa.prototype, W.getPublicQualifiedName("toString"), function() { return this.toString(); }); - ta = function() { + qa = function() { function b(a) { this._isLazyInitializer = !0; - pa(!a.asLazyInitializer); this._target = a; this._resolved = null; } @@ -9643,153 +9967,149 @@ var Namespace = Shumway.AVM2.ABC.Namespace; if (this._resolved) { return this._resolved; } - if (this._target instanceof ca) { + if (this._target instanceof ma) { var b = this._target; a.ensureScriptIsExecuted(b, "Lazy Initializer"); return this._resolved = b.global; } - if (this._target instanceof fa) { + if (this._target instanceof Y) { return b = this._target, b.classObject ? this._resolved = b.classObject : this._resolved = b.abc.applicationDomain.getProperty(b.instanceInfo.name, !1, !1); } - c.Debug.notImplemented(String(this._target)); + d.Debug.notImplemented(String(this._target)); }; return b; }(); - a.LazyInitializer = ta; - a.forEachPublicProperty = function(b, a, d) { + a.LazyInitializer = qa; + a.forEachPublicProperty = function(b, a, e) { if (!b.asBindings) { - for (var g in b) { - a.call(d, g, b[g]); + for (var f in b) { + a.call(e, f, b[f]); } } else { - for (g in b) { - if (c.isNumeric(g)) { - a.call(d, g, b[g]); + for (f in b) { + if (d.isNumeric(f)) { + a.call(e, f, b[f]); } else { - if (T.isPublicQualifiedName(g) && 0 > b.asBindings.indexOf(g)) { - var f = T.stripPublicQualifier(g); - a.call(d, f, b[g]); + if (W.isPublicQualifiedName(f) && 0 > b.asBindings.indexOf(f)) { + var c = W.stripPublicQualifier(f); + a.call(e, c, b[f]); } } } } }; a.wrapJSObject = function(b) { - var a = Object.create(b), d; - for (d in b) { - Object.defineProperty(a, T.getPublicQualifiedName(d), function(b, a) { + var a = Object.create(b), e; + for (e in b) { + Object.defineProperty(a, W.getPublicQualifiedName(e), function(b, a) { return{get:function() { return b[a]; - }, set:function(d) { - b[a] = d; + }, set:function(e) { + b[a] = e; }, enumerable:!0}; - }(b, d)); + }(b, e)); } return a; }; a.asCreateActivation = function(b) { return Object.create(b.activationPrototype); }; - ta = function() { + qa = function() { function b() { } b.updateTraits = function(a) { - for (var d = 0;d < a.length;d++) { - var g = a[d], f = g.name.name, g = g.name.getNamespace(); - g.isDynamic() || (b.hasNonDynamicNamespaces[f] = !0, b.wasResolved[f] && c.Debug.notImplemented("We have to the undo the optimization, " + f + " can now bind to " + g)); + for (var e = 0;e < a.length;e++) { + var f = a[e], c = f.name.name, f = f.name.getNamespace(); + f.isDynamic() || (b.hasNonDynamicNamespaces[c] = !0, b.wasResolved[c] && d.Debug.notImplemented("We have to the undo the optimization, " + c + " can now bind to " + f)); } }; - b.loadAbc = function(d) { + b.loadAbc = function(e) { if (a.globalMultinameAnalysis.value) { - var g = d.scripts, f = d.classes; - d = d.methods; - for (var k = 0;k < g.length;k++) { - b.updateTraits(g[k].traits); + var f = e.scripts, c = e.classes; + e = e.methods; + for (var g = 0;g < f.length;g++) { + b.updateTraits(f[g].traits); } - for (k = 0;k < f.length;k++) { - b.updateTraits(f[k].traits), b.updateTraits(f[k].instanceInfo.traits); + for (g = 0;g < c.length;g++) { + b.updateTraits(c[g].traits), b.updateTraits(c[g].instanceInfo.traits); } - for (k = 0;k < d.length;k++) { - d[k].traits && b.updateTraits(d[k].traits); + for (g = 0;g < e.length;g++) { + e[g].traits && b.updateTraits(e[g].traits); } } }; b.resolveMultiname = function(a) { - var d = a.name; - if (!b.hasNonDynamicNamespaces[d]) { - return b.wasResolved[d] = !0, new T([da.PUBLIC], a.name, 0); + var e = a.name; + if (!b.hasNonDynamicNamespaces[e]) { + return b.wasResolved[e] = !0, new W([ka.PUBLIC], a.name, 0); } }; b.hasNonDynamicNamespaces = Object.create(null); b.wasResolved = Object.create(null); return b; }(); - a.GlobalMultinameResolver = ta; - var Da = function() { + a.GlobalMultinameResolver = qa; + var ya = function() { return function(b) { this.methodInfo = b; }; }(); - a.ActivationInfo = Da; + a.ActivationInfo = ya; a.HasNext2Info = function() { return function(b, a) { this.object = b; this.index = a; }; }(); - a.sliceArguments = x; - a.canCompile = ea; - a.shouldCompile = Y; - a.forceCompile = R; + a.sliceArguments = U; + a.canCompile = ba; + a.shouldCompile = R; + a.forceCompile = N; a.CODE_CACHE = Object.create(null); - a.searchCodeCache = U; - a.createInterpretedFunction = ba; + a.searchCodeCache = Z; + a.createInterpretedFunction = X; a.debugName = function(b) { - return c.isFunction(b) ? b.debugName : b; + return d.isFunction(b) ? b.name : b; }; - a.createCompiledFunction = X; + a.createCompiledFunction = ia; a.createFunction = ga; - a.ensureFunctionIsInitialized = ja; - a.getTraitFunction = aa; - a.createClass = function(b, d, g) { - var f = b.instanceInfo, k = b.abc.applicationDomain, e = T.getName(f.name); - h.enterTimeline("createClass", {className:e, classInfo:b}); - a.traceExecution.value && console.log("Creating " + (f.isInterface() ? "Interface" : "Class") + ": " + e + (b.native ? " replaced with native " + b.native.cls : "")); - d = f.isInterface() ? c.AVM2.AS.createInterface(b) : c.AVM2.AS.createClass(b, d, g); - a.traceClasses.value && (k.loadedClasses.push(d), k.traceLoadedClasses()); - if (f.isInterface()) { - return h.leaveTimeline(), d; + a.ensureFunctionIsInitialized = ca; + a.getTraitFunction = da; + a.createClass = function(b, e, f) { + var c = b.instanceInfo, g = b.abc.applicationDomain, n = W.getName(c.name); + k.enterTimeline("createClass", {className:n, classInfo:b}); + e = c.isInterface() ? d.AVM2.AS.createInterface(b) : d.AVM2.AS.createClass(b, e, f); + a.traceClasses.value && (g.loadedClasses.push(e), g.traceLoadedClasses()); + if (c.isInterface()) { + return k.leaveTimeline(), e; } - k.onMessage.notify1("classCreated", d); - b.classObject = d; - a.traceExecution.value && console.log("Running " + (f.isInterface() ? "Interface" : "Class") + ": " + e + " Static Constructor"); - h.enterTimeline("staticInitializer"); - ga(b.init, g, !1, !1, !0).call(d); - h.leaveTimeline(); - a.traceExecution.value && console.log("Done With Static Constructor"); - a.sealConstTraits && this.sealConstantTraits(d, b.traits); - h.leaveTimeline(); - return d; + g.onMessage.notify1("classCreated", e); + b.classObject = e; + k.enterTimeline("staticInitializer"); + ga(b.init, f, !1, !1, !0).call(e); + k.leaveTimeline(); + a.sealConstTraits && this.sealConstantTraits(e, b.traits); + k.leaveTimeline(); + return e; }; a.sealConstantTraits = function(b, a) { - for (var d = 0, g = a.length;d < g;d++) { - var f = a[d]; - f.isConst() && (f = T.getQualifiedName(f.name), function(a, d) { + for (var e = 0, f = a.length;e < f;e++) { + var c = a[e]; + c.isConst() && (c = W.getQualifiedName(c.name), function(a, e) { Object.defineProperty(b, a, {configurable:!1, enumerable:!1, get:function() { - return d; + return e; }, set:function() { - G("ReferenceError", h.Errors.ConstWriteError, a); + P("ReferenceError", k.Errors.ConstWriteError, a); }}); - }(f, b[f])); + }(c, b[c])); } }; - a.applyType = function(b, a, d) { + a.applyType = function(b, a, e) { a = a.classInfo.instanceInfo.name.name; if ("Vector" === a) { - pa(1 === d.length); - d = d[0]; - if (!qa(d)) { - switch(a = d.classInfo.instanceInfo.name.name.toLowerCase(), a) { + e = e[0]; + if (!ta(e)) { + switch(a = e.classInfo.instanceInfo.name.name.toLowerCase(), a) { case "number": a = "double"; case "int": @@ -9800,40 +10120,39 @@ var Namespace = Shumway.AVM2.ABC.Namespace; return b.abc.applicationDomain.getClass("packageInternal __AS3__.vec.Vector$" + a); } } - return b.abc.applicationDomain.getClass("packageInternal __AS3__.vec.Vector$object").applyType(d); + return b.abc.applicationDomain.getClass("packageInternal __AS3__.vec.Vector$object").applyType(e); } - c.Debug.notImplemented(a); + d.Debug.notImplemented(a); }; - a.createName = function(b, a, d) { + a.createName = function(b, a, e) { void 0 === a && (a = "*"); - return new T(b, a, d); + return new W(b, a, e); }; - })(h.Runtime || (h.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Runtime || (k.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); throwError = Shumway.AVM2.Runtime.throwError; var CC = Shumway.AVM2.Runtime.CODE_CACHE, HasNext2Info = Shumway.AVM2.Runtime.HasNext2Info, asCreateActivation = Shumway.AVM2.Runtime.asCreateActivation, asIsInstanceOf = Shumway.AVM2.Runtime.asIsInstanceOf, asIsType = Shumway.AVM2.Runtime.asIsType, asAsType = Shumway.AVM2.Runtime.asAsType, asEquals = Shumway.AVM2.Runtime.asEquals, asTypeOf = Shumway.AVM2.Runtime.asTypeOf, asCoerceByMultiname = Shumway.AVM2.Runtime.asCoerceByMultiname, asCoerce = Shumway.AVM2.Runtime.asCoerce, asCoerceString = Shumway.AVM2.Runtime.asCoerceString, asCoerceInt = Shumway.AVM2.Runtime.asCoerceInt, asCoerceUint = Shumway.AVM2.Runtime.asCoerceUint, asCoerceNumber = Shumway.AVM2.Runtime.asCoerceNumber, asCoerceBoolean = Shumway.AVM2.Runtime.asCoerceBoolean, asCoerceObject = Shumway.AVM2.Runtime.asCoerceObject, asCompare = Shumway.AVM2.Runtime.asCompare, asAdd = Shumway.AVM2.Runtime.asAdd, applyType = Shumway.AVM2.Runtime.applyType, escapeXMLAttribute = Shumway.AVM2.Runtime.escapeXMLAttribute, escapeXMLElement = Shumway.AVM2.Runtime.escapeXMLElement, asGetSlot = Shumway.AVM2.Runtime.asGetSlot, asSetSlot = Shumway.AVM2.Runtime.asSetSlot, asHasNext2 = Shumway.AVM2.Runtime.asHasNext2, getDescendants = Shumway.AVM2.Runtime.getDescendants, checkFilter = Shumway.AVM2.Runtime.checkFilter, sliceArguments = Shumway.AVM2.Runtime.sliceArguments, createFunction = Shumway.AVM2.Runtime.createFunction, createName = Shumway.AVM2.Runtime.createName; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.AVM2.ABC.Multiname, v = c.Debug.assert, p = c.ObjectUtilities.boxValue, u = function() { - function a(e, m, l) { - void 0 === l && (l = !1); - this.parent = e; - this.object = p(m); - v(c.isObject(this.object)); - this.global = e ? e.global : this; - this.isWith = l; + var r = d.AVM2.ABC.Multiname, v = d.ObjectUtilities.boxValue, u = function() { + function a(l, c, h) { + void 0 === h && (h = !1); + this.parent = l; + this.object = v(c); + this.global = l ? l.global : this; + this.isWith = h; this.cache = Object.create(null); } a.prototype.findDepth = function(a) { - for (var c = this, l = 0;c;) { + for (var c = this, h = 0;c;) { if (c.object === a) { - return l; + return h; } - l++; + h++; c = c.parent; } return-1; @@ -9844,85 +10163,86 @@ asGetSlot = Shumway.AVM2.Runtime.asGetSlot, asSetSlot = Shumway.AVM2.Runtime.asS } return a; }; - a.prototype.findScopeProperty = function(a, m, l, q, n, k) { - h.countTimeline("findScopeProperty"); - var f, d; - d = a ? 1 < a.length ? a.runtimeId + "$" + m : a[0].qualifiedName + "$" + m : m; - if (!k && (f = this.cache[d])) { - return f; + a.prototype.findScopeProperty = function(a, c, h, p, s, m) { + k.countTimeline("findScopeProperty"); + var g, f; + f = a ? 1 < a.length ? a.runtimeId + "$" + c : a[0].qualifiedName + "$" + c : c; + if (!m && (g = this.cache[f])) { + return g; } - if (this.object.asHasPropertyInternal(a, m, l)) { - return this.isWith ? this.object : this.cache[d] = this.object; + if (this.object.asHasPropertyInternal(a, c, h)) { + return this.isWith ? this.object : this.cache[f] = this.object; } if (this.parent) { - return this.cache[d] = this.parent.findScopeProperty(a, m, l, q, n, k); + return this.cache[f] = this.parent.findScopeProperty(a, c, h, p, s, m); } - if (k) { + if (m) { return null; } - if (f = q.abc.applicationDomain.findDomainProperty(new s(a, m, l), n, !0)) { - return f; + if (g = p.abc.applicationDomain.findDomainProperty(new r(a, c, h), s, !0)) { + return g; } - n && c.Debug.unexpected("Cannot find property " + m); + s && d.Debug.unexpected("Cannot find property " + c); return this.global.object; }; return a; }(); a.Scope = u; - a.bindFreeMethodScope = function(a, e) { + a.bindFreeMethodScope = function(a, d) { var c = a.freeMethod; - if (a.lastBoundMethod && a.lastBoundMethod.scope === e) { + if (a.lastBoundMethod && a.lastBoundMethod.scope === d) { return a.lastBoundMethod.boundMethod; } - v(c, "There should already be a cached method."); - var t, q = e.global.object; + var h, p = d.global.object; if (!a.hasOptional() && !a.needsArguments() && !a.needsRest()) { switch(a.parameters.length) { case 0: - t = function() { - return c.call(this === jsGlobal ? q : this, e); + h = function() { + return c.call(this === jsGlobal ? p : this, d); }; break; case 1: - t = function(a) { - return c.call(this === jsGlobal ? q : this, e, a); + h = function(a) { + return c.call(this === jsGlobal ? p : this, d, a); }; break; case 2: - t = function(a, k) { - return c.call(this === jsGlobal ? q : this, e, a, k); + h = function(a, h) { + return c.call(this === jsGlobal ? p : this, d, a, h); }; break; case 3: - t = function(a, k, f) { - return c.call(this === jsGlobal ? q : this, e, a, k, f); + h = function(a, h, g) { + return c.call(this === jsGlobal ? p : this, d, a, h, g); }; } } - t || (h.countTimeline("Bind Scope - Slow Path"), t = function() { - Array.prototype.unshift.call(arguments, e); - return c.asApply(this === jsGlobal ? e.global.object : this, arguments); + h || (h = function() { + for (var a = [d], p = 0;p < arguments.length;p++) { + a.push(arguments[p]); + } + return c.apply(this === jsGlobal ? d.global.object : this, a); }); - t.methodInfo = a; - t.instanceConstructor = t; - a.lastBoundMethod = {scope:e, boundMethod:t}; - return t; + h.methodInfo = a; + h.instanceConstructor = h; + a.lastBoundMethod = {scope:d, boundMethod:h}; + return h; }; - })(h.Runtime || (h.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Runtime || (k.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); var Scope = Shumway.AVM2.Runtime.Scope; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.AVM2.ABC.Multiname, h = c.AVM2.ABC.Trait, p = c.ObjectUtilities.hasOwnProperty, u = c.ObjectUtilities.createMap, l = c.ObjectUtilities.cloneObject, e = c.ObjectUtilities.copyProperties, m = c.Debug.assert, t = c.ObjectUtilities.defineNonEnumerableProperty, q = c.ObjectUtilities.defineNonEnumerableGetter, n = c.FunctionUtilities.makeForwardingGetter, k = c.ArrayUtilities.pushUnique, f = function() { + var r = d.AVM2.ABC.Multiname, k = d.ObjectUtilities.createMap, u = d.ObjectUtilities.cloneObject, t = d.ObjectUtilities.copyProperties, l = d.ObjectUtilities.defineNonEnumerableProperty, c = d.ObjectUtilities.defineNonEnumerableGetter, h = d.FunctionUtilities.makeForwardingGetter, p = d.ArrayUtilities.pushUnique, s = function() { function b(a) { this.trait = a; } - b.getKey = function(a, d) { - var g = a; - d.isGetter() ? g = b.GET_PREFIX + a : d.isSetter() && (g = b.SET_PREFIX + a); - return g; + b.getKey = function(a, e) { + var f = a; + e.isGetter() ? f = b.GET_PREFIX + a : e.isSetter() && (f = b.SET_PREFIX + a); + return f; }; b.prototype.toString = function() { return String(this.trait); @@ -9932,200 +10252,192 @@ var Scope = Shumway.AVM2.Runtime.Scope; b.KEY_PREFIX_LENGTH = 4; return b; }(); - a.Binding = f; - var d = function() { - return function(b, a, d, g) { + a.Binding = s; + var m = function() { + return function(b, a, e, f) { this.name = b; this.isConst = a; - this.type = d; - this.trait = g; + this.type = e; + this.trait = f; }; }(); - a.SlotInfo = d; - var b = function() { - return function() { - this.byID = u(); - this.byQN = u(); - }; - }(); - a.SlotInfoMap = b; + a.SlotInfo = m; var g = function() { - function g() { - this.map = u(); + return function() { + this.byID = k(); + this.byQN = k(); + }; + }(); + a.SlotInfoMap = g; + var f = function() { + function b() { + this.map = k(); this.slots = []; this.nextSlotId = 1; } - g.prototype.assignNextSlot = function(b) { - m(b instanceof h); - m(b.isSlot() || b.isConst() || b.isClass()); + b.prototype.assignNextSlot = function(b) { b.slotId ? this.nextSlotId = b.slotId + 1 : b.slotId = this.nextSlotId++; - m(!this.slots[b.slotId], "Trait slot already taken."); this.slots[b.slotId] = b; }; - g.prototype.trace = function(b) { + b.prototype.trace = function(b) { b.enter("Bindings"); for (var a in this.map) { - var d = this.map[a]; - b.writeLn(d.trait.kindName() + ": " + a + " -> " + d); + var e = this.map[a]; + b.writeLn(e.trait.kindName() + ": " + a + " -> " + e); } b.leaveAndEnter(); b.writeArray(this.slots); b.outdent(); }; - g.prototype.applyTo = function(g, e, r) { - void 0 === r && (r = !1); - r || (m(!p(e, a.VM_SLOTS), "Already has VM_SLOTS."), m(!p(e, a.VM_BINDINGS), "Already has VM_BINDINGS."), m(!p(e, a.VM_OPEN_METHODS), "Already has VM_OPEN_METHODS."), t(e, a.VM_SLOTS, new b), t(e, a.VM_BINDINGS, []), t(e, a.VM_OPEN_METHODS, u()), t(e, "bindings", this), t(e, "resolutionMap", [])); - z && z.greenLn("Applying Traits" + (r ? " (Append)" : "")); - for (var c in this.map) { - var l = this.map[c]; - r = l.trait; - var A = s.getQualifiedName(r.name); - if (r.isSlot() || r.isConst() || r.isClass()) { - l = void 0; - if (r.isSlot() || r.isConst()) { - if (r.hasDefaultValue) { - l = r.value; + b.prototype.applyTo = function(b, f, n) { + void 0 === n && (n = !1); + n || (l(f, a.VM_SLOTS, new g), l(f, a.VM_BINDINGS, []), l(f, a.VM_OPEN_METHODS, k()), l(f, "bindings", this), l(f, "resolutionMap", [])); + q && q.greenLn("Applying Traits" + (n ? " (Append)" : "")); + for (var d in this.map) { + var u = this.map[d]; + n = u.trait; + var t = r.getQualifiedName(n.name); + if (n.isSlot() || n.isConst() || n.isClass()) { + u = void 0; + if (n.isSlot() || n.isConst()) { + if (n.hasDefaultValue) { + u = n.value; } else { - if (r.typeName) { - var h = g.findClassInfo(r.typeName); - h && (l = h.defaultValue); + if (n.typeName) { + var J = b.findClassInfo(n.typeName); + J && (u = J.defaultValue); } } } - c !== A ? (z && z.yellowLn("Binding Trait: " + c + " -> " + A), q(e, c, n(A)), k(e.asBindings, c)) : (z && z.greenLn("Applying Trait " + r.kindName() + ": " + r), t(e, A, l), k(e.asBindings, A), l = new d(A, r.isConst(), r.typeName ? g.getProperty(r.typeName, !1, !1) : null, r), e.asSlots.byID[r.slotId] = l, e.asSlots.byQN[A] = l); + d !== t ? (q && q.yellowLn("Binding Trait: " + d + " -> " + t), c(f, d, h(t)), p(f.asBindings, d)) : (q && q.greenLn("Applying Trait " + n.kindName() + ": " + n), l(f, t, u), p(f.asBindings, t), u = new m(t, n.isConst(), n.typeName ? b.getProperty(n.typeName, !1, !1) : null, n), f.asSlots.byID[n.slotId] = u, f.asSlots.byQN[t] = u); } else { - if (r.isMethod() || r.isGetter() || r.isSetter()) { - if (r.isGetter() || r.isSetter()) { - c = c.substring(f.KEY_PREFIX_LENGTH); + if (n.isMethod() || n.isGetter() || n.isSetter()) { + if (n.isGetter() || n.isSetter()) { + d = d.substring(s.KEY_PREFIX_LENGTH); } - c !== A ? z && z.yellowLn("Binding Trait: " + c + " -> " + A) : z && z.greenLn("Applying Trait " + r.kindName() + ": " + r); - k(e.asBindings, c); - a.applyMethodTrait(c, e, l, !(this instanceof w)); + d !== t ? q && q.yellowLn("Binding Trait: " + d + " -> " + t) : q && q.greenLn("Applying Trait " + n.kindName() + ": " + n); + p(f.asBindings, d); + a.applyMethodTrait(d, f, u, !(this instanceof e)); } } } }; - return g; + return b; }(); - a.Bindings = g; - var r = function(b) { - function a(d) { + a.Bindings = f; + var b = function(b) { + function a(e) { b.call(this); - m(d.needsActivation()); - this.methodInfo = d; - d = d.traits; - for (var g = 0;g < d.length;g++) { - var k = d[g]; - m(k.isSlot() || k.isConst(), "Only slot or constant traits are allowed in activation objects."); - var e = s.getQualifiedName(k.name); - this.map[e] = new f(k); - this.assignNextSlot(k); + this.methodInfo = e; + e = e.traits; + for (var f = 0;f < e.length;f++) { + var c = e[f], g = r.getQualifiedName(c.name); + this.map[g] = new s(c); + this.assignNextSlot(c); } } __extends(a, b); return a; - }(g); - a.ActivationBindings = r; - r = function(b) { - function a(d, g) { + }(f); + a.ActivationBindings = b; + b = function(b) { + function a(e, f) { b.call(this); - var k = s.getQualifiedName(g.name); - this.map[k] = new f(g); - m(g.isSlot(), "Only slot traits are allowed in catch objects."); - this.assignNextSlot(g); + var c = r.getQualifiedName(f.name); + this.map[c] = new s(f); + this.assignNextSlot(f); } __extends(a, b); return a; - }(g); - a.CatchBindings = r; - var w = function(b) { - function a(d, g) { - b.call(this); - this.scope = g; - this.scriptInfo = d; - for (var k = d.traits, e = 0;e < k.length;e++) { - var r = k[e], c = s.getQualifiedName(r.name), c = f.getKey(c, r), c = this.map[c] = new f(r); - (r.isSlot() || r.isConst() || r.isClass()) && this.assignNextSlot(r); - r.isClass() && r.metadata && r.metadata.native && (r.classInfo.native = r.metadata.native); - if (r.isMethod() || r.isGetter() || r.isSetter()) { - c.scope = this.scope; - } - } - } - __extends(a, b); - return a; - }(g); - a.ScriptBindings = w; - r = function(b) { - function a(d, g, k) { - b.call(this); - this.scope = g; - this.natives = k; - this.classInfo = d; - d = d.traits; - for (g = 0;g < d.length;g++) { - k = d[g]; - var e = s.getQualifiedName(k.name), e = f.getKey(e, k), e = this.map[e] = new f(k); - (k.isSlot() || k.isConst()) && this.assignNextSlot(k); - if (k.isMethod() || k.isGetter() || k.isSetter()) { - e.scope = this.scope, e.natives = this.natives; - } - } - } - __extends(a, b); - return a; - }(g); - a.ClassBindings = r; - g = function(b) { - function a(d, g, f, k) { + }(f); + a.CatchBindings = b; + var e = function(b) { + function a(e, f) { b.call(this); this.scope = f; - this.natives = k; - this.parent = d; - this.instanceInfo = g; - this.implementedInterfaces = d ? l(d.implementedInterfaces) : Object.create(null); - d && (this.slots = d.slots.slice(), this.nextSlotId = d.nextSlotId); - this.extend(d); + this.scriptInfo = e; + for (var c = e.traits, g = 0;g < c.length;g++) { + var q = c[g], p = r.getQualifiedName(q.name), p = s.getKey(p, q), p = this.map[p] = new s(q); + (q.isSlot() || q.isConst() || q.isClass()) && this.assignNextSlot(q); + q.isClass() && q.metadata && q.metadata.native && (q.classInfo.native = q.metadata.native); + if (q.isMethod() || q.isGetter() || q.isSetter()) { + p.scope = this.scope; + } + } + } + __extends(a, b); + return a; + }(f); + a.ScriptBindings = e; + b = function(b) { + function a(e, f, c) { + b.call(this); + this.scope = f; + this.natives = c; + this.classInfo = e; + e = e.traits; + for (f = 0;f < e.length;f++) { + c = e[f]; + var g = r.getQualifiedName(c.name), g = s.getKey(g, c), g = this.map[g] = new s(c); + (c.isSlot() || c.isConst()) && this.assignNextSlot(c); + if (c.isMethod() || c.isGetter() || c.isSetter()) { + g.scope = this.scope, g.natives = this.natives; + } + } + } + __extends(a, b); + return a; + }(f); + a.ClassBindings = b; + f = function(b) { + function a(e, f, c, g) { + b.call(this); + this.scope = c; + this.natives = g; + this.parent = e; + this.instanceInfo = f; + this.implementedInterfaces = e ? u(e.implementedInterfaces) : Object.create(null); + e && (this.slots = e.slots.slice(), this.nextSlotId = e.nextSlotId); + this.extend(e); } __extends(a, b); a.prototype.extend = function(b) { - var a = this.instanceInfo, d, g = this.map, k, r, c, w; + var a = this.instanceInfo, e, f = this.map, c, g, n, q; if (b) { - for (r in b.map) { - k = b.map[r], c = k.trait, g[r] = k, c.isProtected() && (w = s.getQualifiedName(new s([a.protectedNs], c.name.getName(), 0)), w = f.getKey(w, c), g[w] = k); + for (g in b.map) { + c = b.map[g], n = c.trait, f[g] = c, n.isProtected() && (q = r.getQualifiedName(new r([a.protectedNs], n.name.getName(), 0)), q = s.getKey(q, n), f[q] = c); } } - var q = a.traits; - for (b = 0;b < q.length;b++) { - c = q[b]; - k = s.getQualifiedName(c.name); - r = f.getKey(k, c); - k = new f(c); - d = g; - w = k; - var n = w.trait, l = d[r]; - l ? (m(!l.trait.isFinal(), "Cannot redefine a final trait: " + n), m(n.isOverride() || "length" === n.name.getName(), "Overriding a trait that is not marked for override: " + n)) : m(!n.isOverride(), "Trait marked override must override another trait: " + n); - d[r] = w; - if (c.isProtected()) { - for (d = this.parent;d && d.instanceInfo.protectedNs;) { - w = s.getQualifiedName(new s([d.instanceInfo.protectedNs], c.name.getName(), 0)), w = f.getKey(w, c), w in g && (g[w] = k), d = d.parent; + var p = a.traits; + for (b = 0;b < p.length;b++) { + n = p[b]; + c = r.getQualifiedName(n.name); + g = s.getKey(c, n); + c = new s(n); + e = f; + q = c; + var h = e[g]; + e[g] = q; + if (n.isProtected()) { + for (e = this.parent;e && e.instanceInfo.protectedNs;) { + q = r.getQualifiedName(new r([e.instanceInfo.protectedNs], n.name.getName(), 0)), q = s.getKey(q, n), q in f && (f[q] = c), e = e.parent; } } - (c.isSlot() || c.isConst()) && this.assignNextSlot(c); - if (c.isMethod() || c.isGetter() || c.isSetter()) { - k.scope = this.scope, k.natives = this.natives; + (n.isSlot() || n.isConst()) && this.assignNextSlot(n); + if (n.isMethod() || n.isGetter() || n.isSetter()) { + c.scope = this.scope, c.natives = this.natives; } } - c = a.abc.applicationDomain; - k = a.interfaces; - for (b = 0;b < k.length;b++) { - q = c.getProperty(k[b], !0, !0), m(q), e(this.implementedInterfaces, q.interfaceBindings.implementedInterfaces), this.implementedInterfaces[s.getQualifiedName(q.classInfo.instanceInfo.name)] = q; + n = a.abc.applicationDomain; + c = a.interfaces; + for (b = 0;b < c.length;b++) { + p = n.getProperty(c[b], !0, !0), t(this.implementedInterfaces, p.interfaceBindings.implementedInterfaces), this.implementedInterfaces[r.getQualifiedName(p.classInfo.instanceInfo.name)] = p; } - for (var t in this.implementedInterfaces) { - q = this.implementedInterfaces[t]; - d = q.interfaceBindings; - for (var z in d.map) { - b = d.map[z], a.isInterface() ? g[z] = b : (k = s.getPublicQualifiedName(b.trait.name.getName()), r = f.getKey(k, b.trait), g[z] = g[r]); + for (var m in this.implementedInterfaces) { + p = this.implementedInterfaces[m]; + e = p.interfaceBindings; + for (var d in e.map) { + b = e.map[d], a.isInterface() ? f[d] = b : (c = r.getPublicQualifiedName(b.trait.name.getName()), g = s.getKey(c, b.trait), f[d] = f[g]); } } }; @@ -10133,434 +10445,430 @@ var Scope = Shumway.AVM2.Runtime.Scope; return this.instanceInfo.toString(); }; return a; - }(g); - a.InstanceBindings = g; - var z = null; - })(h.Runtime || (h.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + }(f); + a.InstanceBindings = f; + var q = null; + })(k.Runtime || (k.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); var Binding = Shumway.AVM2.Runtime.Binding, Bindings = Shumway.AVM2.Runtime.Bindings, ActivationBindings = Shumway.AVM2.Runtime.ActivationBindings, CatchBindings = Shumway.AVM2.Runtime.CatchBindings, ScriptBindings = Shumway.AVM2.Runtime.ScriptBindings, ClassBindings = Shumway.AVM2.Runtime.ClassBindings, InstanceBindings = Shumway.AVM2.Runtime.InstanceBindings; -(function(c) { - (function(c) { - c.XRegExp = function() { - function a(b, a, d) { - var g; - if (d) { +(function(d) { + (function(d) { + d.XRegExp = function() { + function a(b, a, e) { + var f; + if (e) { if (b.__proto__) { - b.__proto__ = k.prototype; + b.__proto__ = g.prototype; } else { - for (g in k.prototype) { - b[g] = k.prototype[g]; + for (f in g.prototype) { + b[f] = g.prototype[f]; } } } b.xregexp = {captureNames:a}; return b; } - function c(b) { - return d.replace.call(b, /([\s\S])(?=[\s\S]*\1)/g, ""); + function d(a) { + return b.replace.call(a, /([\s\S])(?=[\s\S]*\1)/g, ""); } - function h(b, g) { - if (!k.isRegExp(b)) { + function k(e, f) { + if (!g.isRegExp(e)) { throw new TypeError("Type RegExp expected"); } - var f = d.exec.call(/\/([a-z]*)$/i, String(b))[1]; - g = g || {}; - g.add && (f = c(f + g.add)); - g.remove && (f = d.replace.call(f, new RegExp("[" + g.remove + "]+", "g"), "")); - return b = a(new RegExp(b.source, f), b.xregexp && b.xregexp.captureNames ? b.xregexp.captureNames.slice(0) : null, g.addProto); + var c = b.exec.call(/\/([a-z]*)$/i, String(e))[1]; + f = f || {}; + f.add && (c = d(c + f.add)); + f.remove && (c = b.replace.call(c, new RegExp("[" + f.remove + "]+", "g"), "")); + return e = a(new RegExp(e.source, c), e.xregexp && e.xregexp.captureNames ? e.xregexp.captureNames.slice(0) : null, f.addProto); } - function p(b, a) { + function u(b, a) { if (Array.prototype.indexOf) { return b.indexOf(a); } - var d = b.length, g; - for (g = 0;g < d;++g) { - if (b[g] === a) { - return g; + var e = b.length, f; + for (f = 0;f < e;++f) { + if (b[f] === a) { + return f; } } return-1; } - function u(b, a) { - return K.call(b) === "[object " + a + "]"; + function t(b, a) { + return J.call(b) === "[object " + a + "]"; } - function l(b, a, g) { - return d.test.call(-1 < g.indexOf("x") ? /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, b.slice(a)); + function l(a, e, f) { + return b.test.call(-1 < f.indexOf("x") ? /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, a.slice(e)); } - function e(b, a) { - var g; - if (c(a) !== a) { - throw new SyntaxError("Invalid duplicate regex flag " + a); + function c(a, e) { + var f; + if (d(e) !== e) { + throw new SyntaxError("Invalid duplicate regex flag " + e); } - b = d.replace.call(b, /^\(\?([\w$]+)\)/, function(b, g) { - if (d.test.call(/[gy]/, g)) { - throw new SyntaxError("Cannot use flag g or y in mode modifier " + b); + a = b.replace.call(a, /^\(\?([\w$]+)\)/, function(a, f) { + if (b.test.call(/[gy]/, f)) { + throw new SyntaxError("Cannot use flag g or y in mode modifier " + a); } - a = c(a + g); + e = d(e + f); return ""; }); - for (g = 0;g < a.length;++g) { - if (!N[a.charAt(g)]) { - throw new SyntaxError("Unknown regex flag " + a.charAt(g)); + for (f = 0;f < e.length;++f) { + if (!F[e.charAt(f)]) { + throw new SyntaxError("Unknown regex flag " + e.charAt(f)); } } - return{pattern:b, flags:a}; + return{pattern:a, flags:e}; } - function m(b) { + function h(b) { b = b || {}; - u(b, "String") && (b = k.forEach(b, /[^\s,]+/, function(b) { + t(b, "String") && (b = g.forEach(b, /[^\s,]+/, function(b) { this[b] = !0; }, {})); return b; } - function t(b) { + function p(b) { if (!/^[\w$]$/.test(b)) { throw Error("Flag must be a single character A-Za-z0-9_$"); } - N[b] = !0; + F[b] = !0; } - function q(a) { - RegExp.prototype.exec = (a ? b : d).exec; - RegExp.prototype.test = (a ? b : d).test; - String.prototype.match = (a ? b : d).match; - String.prototype.replace = (a ? b : d).replace; - String.prototype.split = (a ? b : d).split; + function s(a) { + RegExp.prototype.exec = (a ? e : b).exec; + RegExp.prototype.test = (a ? e : b).test; + String.prototype.match = (a ? e : b).match; + String.prototype.replace = (a ? e : b).replace; + String.prototype.split = (a ? e : b).split; f.natives = a; } - function n(b) { + function m(b) { if (null == b) { throw new TypeError("Cannot convert null or undefined to object"); } return b; } - var k, f = {astral:!1, natives:!1}, d = {exec:RegExp.prototype.exec, test:RegExp.prototype.test, match:String.prototype.match, replace:String.prototype.replace, split:String.prototype.split}, b = {}, g = {}, r = {}, w = [], z = {"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, "class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/}, A = /\$(?:{([\w$]+)}|([\d$&`']))/g, - B = void 0 === d.exec.call(/()??/, "")[1], M = void 0 !== RegExp.prototype.sticky, N = {g:!0, i:!0, m:!0, y:M}, K = {}.toString, y; - k = function(b, g) { - var f = {hasNamedCapture:!1, captureNames:[]}, c = "default", m = "", q = 0, n, l; - if (k.isRegExp(b)) { - if (void 0 !== g) { + var g, f = {astral:!1, natives:!1}, b = {exec:RegExp.prototype.exec, test:RegExp.prototype.test, match:String.prototype.match, replace:String.prototype.replace, split:String.prototype.split}, e = {}, q = {}, n = {}, x = [], L = {"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, "class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/}, A = /\$(?:{([\w$]+)}|([\d$&`']))/g, + H = void 0 === b.exec.call(/()??/, "")[1], K = void 0 !== RegExp.prototype.sticky, F = {g:!0, i:!0, m:!0, y:K}, J = {}.toString, M; + g = function(e, f) { + var q = {hasNamedCapture:!1, captureNames:[]}, p = "default", h = "", m = 0, s, d; + if (g.isRegExp(e)) { + if (void 0 !== f) { throw new TypeError("Cannot supply flags when copying a RegExp"); } - return h(b, {addProto:!0}); + return k(e, {addProto:!0}); } - b = void 0 === b ? "" : String(b); - g = void 0 === g ? "" : String(g); - l = b + "***" + g; - if (!r[l]) { - n = e(b, g); - b = n.pattern; - for (g = n.flags;q < b.length;) { + e = void 0 === e ? "" : String(e); + f = void 0 === f ? "" : String(f); + d = e + "***" + f; + if (!n[d]) { + s = c(e, f); + e = s.pattern; + for (f = s.flags;m < e.length;) { do { - n = b; - for (var t = g, s = q, A = c, p = f, B = w.length, u = null, y = void 0, M = void 0;B--;) { - if (M = w[B], (M.scope === A || "all" === M.scope) && (!M.flag || -1 < t.indexOf(M.flag)) && (y = k.exec(n, M.regex, s, "sticky"))) { - u = {matchLength:y[0].length, output:M.handler.call(p, y, A, t), reparse:M.reparse}; + s = e; + for (var l = f, r = m, u = p, t = q, A = x.length, K = null, H = void 0, F = void 0;A--;) { + if (F = x[A], (F.scope === u || "all" === F.scope) && (!F.flag || -1 < l.indexOf(F.flag)) && (H = g.exec(s, F.regex, r, "sticky"))) { + K = {matchLength:H[0].length, output:F.handler.call(t, H, u, l), reparse:F.reparse}; break; } } - (n = u) && n.reparse && (b = b.slice(0, q) + n.output + b.slice(q + n.matchLength)); - } while (n && n.reparse); - n ? (m += n.output, q += n.matchLength || 1) : (n = k.exec(b, z[c], q, "sticky")[0], m += n, q += n.length, "[" === n && "default" === c ? c = "class" : "]" === n && "class" === c && (c = "default")); + (s = K) && s.reparse && (e = e.slice(0, m) + s.output + e.slice(m + s.matchLength)); + } while (s && s.reparse); + s ? (h += s.output, m += s.matchLength || 1) : (s = g.exec(e, L[p], m, "sticky")[0], h += s, m += s.length, "[" === s && "default" === p ? p = "class" : "]" === s && "class" === p && (p = "default")); } - r[l] = {pattern:d.replace.call(m, /\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g, ""), flags:d.replace.call(g, /[^gimy]+/g, ""), captures:f.hasNamedCapture ? f.captureNames : null}; + n[d] = {pattern:b.replace.call(h, /\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g, ""), flags:b.replace.call(f, /[^gimy]+/g, ""), captures:q.hasNamedCapture ? q.captureNames : null}; } - l = r[l]; - return a(new RegExp(l.pattern, l.flags), l.captures, !0); + d = n[d]; + return a(new RegExp(d.pattern, d.flags), d.captures, !0); }; - k.prototype = RegExp(); - k.version = "3.0.0-pre"; - k.addToken = function(b, a, g) { - g = g || {}; - var f = g.optionalFlags, e; - g.flag && t(g.flag); - if (f) { - for (f = d.split.call(f, ""), e = 0;e < f.length;++e) { - t(f[e]); + g.prototype = RegExp(); + g.version = "3.0.0-pre"; + g.addToken = function(a, e, f) { + f = f || {}; + var c = f.optionalFlags, n; + f.flag && p(f.flag); + if (c) { + for (c = b.split.call(c, ""), n = 0;n < c.length;++n) { + p(c[n]); } } - w.push({regex:h(b, {add:"g" + (M ? "y" : "")}), handler:a, scope:g.scope || "default", flag:g.flag, reparse:g.reparse}); - k.cache.flush("patterns"); + x.push({regex:k(a, {add:"g" + (K ? "y" : "")}), handler:e, scope:f.scope || "default", flag:f.flag, reparse:f.reparse}); + g.cache.flush("patterns"); }; - k.cache = function(b, a) { - var d = b + "***" + (a || ""); - return g[d] || (g[d] = k(b, a)); + g.cache = function(b, a) { + var e = b + "***" + (a || ""); + return q[e] || (q[e] = g(b, a)); }; - k.cache.flush = function(b) { - "patterns" === b ? r = {} : g = {}; + g.cache.flush = function(b) { + "patterns" === b ? n = {} : q = {}; }; - k.escape = function(b) { - return d.replace.call(n(b), /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + g.escape = function(a) { + return b.replace.call(m(a), /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); }; - k.exec = function(a, d, g, f) { - var k = "g"; - M && (f || d.sticky && !1 !== f) && (k += "y"); - d.xregexp = d.xregexp || {captureNames:null}; - k = d.xregexp[k] || (d.xregexp[k] = h(d, {add:k, remove:!1 === f ? "y" : ""})); - k.lastIndex = g = g || 0; - a = b.exec.call(k, a); - f && a && a.index !== g && (a = null); - d.global && (d.lastIndex = a ? k.lastIndex : 0); - return a; + g.exec = function(b, a, f, c) { + var g = "g"; + K && (c || a.sticky && !1 !== c) && (g += "y"); + a.xregexp = a.xregexp || {captureNames:null}; + g = a.xregexp[g] || (a.xregexp[g] = k(a, {add:g, remove:!1 === c ? "y" : ""})); + g.lastIndex = f = f || 0; + b = e.exec.call(g, b); + c && b && b.index !== f && (b = null); + a.global && (a.lastIndex = b ? g.lastIndex : 0); + return b; }; - k.forEach = function(b, a, d, g) { - for (var f = 0, e = -1;f = k.exec(b, a, f);) { - d.call(g, f, ++e, b, a), f = f.index + (f[0].length || 1); + g.forEach = function(b, a, e, f) { + for (var c = 0, n = -1;c = g.exec(b, a, c);) { + e.call(f, c, ++n, b, a), c = c.index + (c[0].length || 1); } - return g; + return f; }; - k.globalize = function(b) { - return h(b, {add:"g", addProto:!0}); + g.globalize = function(b) { + return k(b, {add:"g", addProto:!0}); }; - k.install = function() { - var b = {natives:!0}, b = m(b); - !f.astral && b.astral && (k.cache.flush("patterns"), f.astral = !0); - !f.natives && b.natives && q(!0); + g.install = function() { + var b = {natives:!0}, b = h(b); + !f.astral && b.astral && (g.cache.flush("patterns"), f.astral = !0); + !f.natives && b.natives && s(!0); }; - k.isInstalled = function(b) { + g.isInstalled = function(b) { return!!f[b]; }; - k.isRegExp = function(b) { - return "[object RegExp]" === K.call(b); + g.isRegExp = function(b) { + return "[object RegExp]" === J.call(b); }; - k.match = function(b, a, g) { - var f = a.global && "one" !== g || "all" === g, k = (f ? "g" : "") + (a.sticky ? "y" : ""); - a.xregexp = a.xregexp || {captureNames:null}; - k = a.xregexp[k || "noGY"] || (a.xregexp[k || "noGY"] = h(a, {add:k, remove:"one" === g ? "g" : ""})); - b = d.match.call(n(b), k); - a.global && (a.lastIndex = "one" === g && b ? b.index + b[0].length : 0); - return f ? b || [] : b && b[0]; + g.match = function(a, e, f) { + var c = e.global && "one" !== f || "all" === f, g = (c ? "g" : "") + (e.sticky ? "y" : ""); + e.xregexp = e.xregexp || {captureNames:null}; + g = e.xregexp[g || "noGY"] || (e.xregexp[g || "noGY"] = k(e, {add:g, remove:"one" === f ? "g" : ""})); + a = b.match.call(m(a), g); + e.global && (e.lastIndex = "one" === f && a ? a.index + a[0].length : 0); + return c ? a || [] : a && a[0]; }; - k.matchChain = function(b, a) { - return function J(b, d) { - function g(b) { - if (f.backref) { - if (!(b.hasOwnProperty(f.backref) || +f.backref < b.length)) { - throw new ReferenceError("Backreference to undefined group: " + f.backref); + g.matchChain = function(b, a) { + return function y(b, e) { + function f(b) { + if (c.backref) { + if (!(b.hasOwnProperty(c.backref) || +c.backref < b.length)) { + throw new ReferenceError("Backreference to undefined group: " + c.backref); } - e.push(b[f.backref] || ""); + n.push(b[c.backref] || ""); } else { - e.push(b[0]); + n.push(b[0]); } } - var f = a[d].regex ? a[d] : {regex:a[d]}, e = [], r; - for (r = 0;r < b.length;++r) { - k.forEach(b[r], f.regex, g); + var c = a[e].regex ? a[e] : {regex:a[e]}, n = [], q; + for (q = 0;q < b.length;++q) { + g.forEach(b[q], c.regex, f); } - return d !== a.length - 1 && e.length ? J(e, d + 1) : e; + return e !== a.length - 1 && n.length ? y(n, e + 1) : n; }([b], 0); }; - k.replace = function(a, d, g, f) { - var e = k.isRegExp(d), r = d.global && "one" !== f || "all" === f, c = (r ? "g" : "") + (d.sticky ? "y" : ""), m = d; - e ? (d.xregexp = d.xregexp || {captureNames:null}, m = d.xregexp[c || "noGY"] || (d.xregexp[c || "noGY"] = h(d, {add:c, remove:"one" === f ? "g" : ""}))) : r && (m = new RegExp(k.escape(String(d)), "g")); - a = b.replace.call(n(a), m, g); - e && d.global && (d.lastIndex = 0); - return a; + g.replace = function(b, a, f, c) { + var n = g.isRegExp(a), q = a.global && "one" !== c || "all" === c, p = (q ? "g" : "") + (a.sticky ? "y" : ""), h = a; + n ? (a.xregexp = a.xregexp || {captureNames:null}, h = a.xregexp[p || "noGY"] || (a.xregexp[p || "noGY"] = k(a, {add:p, remove:"one" === c ? "g" : ""}))) : q && (h = new RegExp(g.escape(String(a)), "g")); + b = e.replace.call(m(b), h, f); + n && a.global && (a.lastIndex = 0); + return b; }; - k.replaceEach = function(b, a) { - var d, g; - for (d = 0;d < a.length;++d) { - g = a[d], b = k.replace(b, g[0], g[1], g[2]); + g.replaceEach = function(b, a) { + var e, f; + for (e = 0;e < a.length;++e) { + f = a[e], b = g.replace(b, f[0], f[1], f[2]); } return b; }; - k.split = function(a, d, g) { - return b.split.call(n(a), d, g); + g.split = function(b, a, f) { + return e.split.call(m(b), a, f); }; - k.test = function(b, a, d, g) { - return!!k.exec(b, a, d, g); + g.test = function(b, a, e, f) { + return!!g.exec(b, a, e, f); }; - k.uninstall = function(b) { - b = m(b); - f.astral && b.astral && (k.cache.flush("patterns"), f.astral = !1); - f.natives && b.natives && q(!1); + g.uninstall = function(b) { + b = h(b); + f.astral && b.astral && (g.cache.flush("patterns"), f.astral = !1); + f.natives && b.natives && s(!1); }; - k.union = function(b, a) { - function g(b, a, d) { - var f = m[r - c]; + g.union = function(a, e) { + function f(b, a, e) { + var c = h[q - p]; if (a) { - if (++r, f) { - return "(?<" + f + ">"; + if (++q, c) { + return "(?<" + c + ">"; } } else { - if (d) { - return "\\" + (+d + c); + if (e) { + return "\\" + (+e + p); } } return b; } - var f = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, e = [], r = 0, c, m, w, q; - if (!u(b, "Array") || !b.length) { + var c = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, n = [], q = 0, p, h, m, s; + if (!t(a, "Array") || !a.length) { throw new TypeError("Must provide a nonempty array of patterns to merge"); } - for (q = 0;q < b.length;++q) { - w = b[q], k.isRegExp(w) ? (c = r, m = w.xregexp && w.xregexp.captureNames || [], e.push(d.replace.call(k(w.source).source, f, g))) : e.push(k.escape(w)); + for (s = 0;s < a.length;++s) { + m = a[s], g.isRegExp(m) ? (p = q, h = m.xregexp && m.xregexp.captureNames || [], n.push(b.replace.call(g(m.source).source, c, f))) : n.push(g.escape(m)); } - return k(e.join("|"), a); + return g(n.join("|"), e); }; - b.exec = function(b) { - var a = this.lastIndex, g = d.exec.apply(this, arguments), f, k; - if (g) { - !B && 1 < g.length && -1 < p(g, "") && (f = h(this, {remove:"g"}), d.replace.call(String(b).slice(g.index), f, function() { + e.exec = function(a) { + var e = this.lastIndex, f = b.exec.apply(this, arguments), c, g; + if (f) { + !H && 1 < f.length && -1 < u(f, "") && (c = k(this, {remove:"g"}), b.replace.call(String(a).slice(f.index), c, function() { var b = arguments.length, a; for (a = 1;a < b - 2;++a) { - void 0 === arguments[a] && (g[a] = void 0); + void 0 === arguments[a] && (f[a] = void 0); } })); if (this.xregexp && this.xregexp.captureNames) { - for (k = 1;k < g.length;++k) { - (f = this.xregexp.captureNames[k - 1]) && (g[f] = g[k]); + for (g = 1;g < f.length;++g) { + (c = this.xregexp.captureNames[g - 1]) && (f[c] = f[g]); } } - this.global && !g[0].length && this.lastIndex > g.index && (this.lastIndex = g.index); + this.global && !f[0].length && this.lastIndex > f.index && (this.lastIndex = f.index); } - this.global || (this.lastIndex = a); - return g; + this.global || (this.lastIndex = e); + return f; }; - b.test = function(a) { - return!!b.exec.call(this, a); + e.test = function(b) { + return!!e.exec.call(this, b); }; - b.match = function(a) { - var g; - if (!k.isRegExp(a)) { + e.match = function(a) { + var f; + if (!g.isRegExp(a)) { a = new RegExp(a); } else { if (a.global) { - return g = d.match.apply(this, arguments), a.lastIndex = 0, g; + return f = b.match.apply(this, arguments), a.lastIndex = 0, f; } } - return b.exec.call(a, n(this)); + return e.exec.call(a, m(this)); }; - b.replace = function(b, a) { - var g = k.isRegExp(b), f, e, r; - g ? (b.xregexp && (e = b.xregexp.captureNames), f = b.lastIndex) : b += ""; - r = u(a, "Function") ? d.replace.call(String(this), b, function() { - var d = arguments, f; - if (e) { - for (d[0] = new String(d[0]), f = 0;f < e.length;++f) { - e[f] && (d[0][e[f]] = d[f + 1]); + e.replace = function(a, e) { + var f = g.isRegExp(a), c, n, q; + f ? (a.xregexp && (n = a.xregexp.captureNames), c = a.lastIndex) : a += ""; + q = t(e, "Function") ? b.replace.call(String(this), a, function() { + var b = arguments, c; + if (n) { + for (b[0] = new String(b[0]), c = 0;c < n.length;++c) { + n[c] && (b[0][n[c]] = b[c + 1]); } } - g && b.global && (b.lastIndex = d[d.length - 2] + d[0].length); - return a.apply(void 0, d); - }) : d.replace.call(null == this ? this : String(this), b, function() { - var b = arguments; - return d.replace.call(String(a), A, function(a, d, g) { - if (d) { - g = +d; - if (g <= b.length - 3) { - return b[g] || ""; + f && a.global && (a.lastIndex = b[b.length - 2] + b[0].length); + return e.apply(void 0, b); + }) : b.replace.call(null == this ? this : String(this), a, function() { + var a = arguments; + return b.replace.call(String(e), A, function(b, e, f) { + if (e) { + f = +e; + if (f <= a.length - 3) { + return a[f] || ""; } - g = e ? p(e, d) : -1; - if (0 > g) { - throw new SyntaxError("Backreference to undefined group " + a); + f = n ? u(n, e) : -1; + if (0 > f) { + throw new SyntaxError("Backreference to undefined group " + b); } - return b[g + 1] || ""; + return a[f + 1] || ""; } - if ("$" === g) { + if ("$" === f) { return "$"; } - if ("&" === g || 0 === +g) { - return b[0]; + if ("&" === f || 0 === +f) { + return a[0]; } - if ("`" === g) { - return b[b.length - 1].slice(0, b[b.length - 2]); + if ("`" === f) { + return a[a.length - 1].slice(0, a[a.length - 2]); } - if ("'" === g) { - return b[b.length - 1].slice(b[b.length - 2] + b[0].length); + if ("'" === f) { + return a[a.length - 1].slice(a[a.length - 2] + a[0].length); } - g = +g; - if (!isNaN(g)) { - if (g > b.length - 3) { - throw new SyntaxError("Backreference to undefined group " + a); + f = +f; + if (!isNaN(f)) { + if (f > a.length - 3) { + throw new SyntaxError("Backreference to undefined group " + b); } - return b[g] || ""; + return a[f] || ""; } - throw new SyntaxError("Invalid token " + a); + throw new SyntaxError("Invalid token " + b); }); }); - g && (b.lastIndex = b.global ? 0 : f); - return r; + f && (a.lastIndex = a.global ? 0 : c); + return q; }; - b.split = function(b, a) { - if (!k.isRegExp(b)) { - return d.split.apply(this, arguments); + e.split = function(a, e) { + if (!g.isRegExp(a)) { + return b.split.apply(this, arguments); } - var g = String(this), f = [], e = b.lastIndex, r = 0, c; - a = (void 0 === a ? -1 : a) >>> 0; - k.forEach(g, b, function(b) { - b.index + b[0].length > r && (f.push(g.slice(r, b.index)), 1 < b.length && b.index < g.length && Array.prototype.push.apply(f, b.slice(1)), c = b[0].length, r = b.index + c); + var f = String(this), c = [], n = a.lastIndex, q = 0, p; + e = (void 0 === e ? -1 : e) >>> 0; + g.forEach(f, a, function(b) { + b.index + b[0].length > q && (c.push(f.slice(q, b.index)), 1 < b.length && b.index < f.length && Array.prototype.push.apply(c, b.slice(1)), p = b[0].length, q = b.index + p); }); - r === g.length ? d.test.call(b, "") && !c || f.push("") : f.push(g.slice(r)); - b.lastIndex = e; - return f.length > a ? f.slice(0, a) : f; + q === f.length ? b.test.call(a, "") && !p || c.push("") : c.push(f.slice(q)); + a.lastIndex = n; + return c.length > e ? c.slice(0, e) : c; }; - y = k.addToken; - y(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/, function(b, a) { + M = g.addToken; + M(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/, function(b, a) { if ("B" === b[1] && "default" === a) { return b[0]; } throw new SyntaxError("Invalid escape " + b[0]); }, {scope:"all"}); - y(/\[(\^?)]/, function(b) { + M(/\[(\^?)]/, function(b) { return b[1] ? "[\\s\\S]" : "\\b\\B"; }); - y(/\(\?#[^)]*\)/, function(b, a, d) { - return l(b.input, b.index + b[0].length, d) ? "" : "(?:)"; + M(/\(\?#[^)]*\)/, function(b, a, e) { + return l(b.input, b.index + b[0].length, e) ? "" : "(?:)"; }); - y(/\s+|#.*/, function(b, a, d) { - return l(b.input, b.index + b[0].length, d) ? "" : "(?:)"; + M(/\s+|#.*/, function(b, a, e) { + return l(b.input, b.index + b[0].length, e) ? "" : "(?:)"; }, {flag:"x"}); - y(/\./, function() { + M(/\./, function() { return "[\\s\\S]"; }, {flag:"s"}); - y(/\\k<([\w$]+)>/, function(b) { - var a = isNaN(b[1]) ? p(this.captureNames, b[1]) + 1 : +b[1], d = b.index + b[0].length; + M(/\\k<([\w$]+)>/, function(b) { + var a = isNaN(b[1]) ? u(this.captureNames, b[1]) + 1 : +b[1], e = b.index + b[0].length; if (!a || a > this.captureNames.length) { throw new SyntaxError("Backreference to undefined group " + b[0]); } - return "\\" + a + (d === b.input.length || isNaN(b.input.charAt(d)) ? "" : "(?:)"); + return "\\" + a + (e === b.input.length || isNaN(b.input.charAt(e)) ? "" : "(?:)"); }); - y(/\\(\d+)/, function(b, a) { + M(/\\(\d+)/, function(b, a) { if (!("default" === a && /^[1-9]/.test(b[1]) && +b[1] <= this.captureNames.length) && "0" !== b[1]) { throw new SyntaxError("Cannot use octal escape or backreference to undefined group " + b[0]); } return b[0]; }, {scope:"all"}); - y(/\(\?P?<([\w$]+)>/, function(b) { + M(/\(\?P?<([\w$]+)>/, function(b) { if (!isNaN(b[1])) { throw new SyntaxError("Cannot use integer as capture name " + b[0]); } if ("length" === b[1] || "__proto__" === b[1]) { throw new SyntaxError("Cannot use reserved word as capture name " + b[0]); } - if (-1 < p(this.captureNames, b[1])) { + if (-1 < u(this.captureNames, b[1])) { throw new SyntaxError("Cannot use same name for multiple groups " + b[0]); } this.captureNames.push(b[1]); this.hasNamedCapture = !0; return "("; }); - y(/\((?!\?)/, function(b, a, d) { - if (-1 < d.indexOf("n")) { + M(/\((?!\?)/, function(b, a, e) { + if (-1 < e.indexOf("n")) { return "(?:"; } this.captureNames.push(null); return "("; }, {optionalFlags:"n"}); - return k; + return g; }(); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); Shumway.AVM2.XRegExp.install(); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(b, a) { - g(!da[b], "Native function: " + b + " is already registered."); - da[b] = a; - } - function v(b) { + function r(b) { switch(b) { case "prototype": return "native_prototype"; @@ -10574,38 +10882,36 @@ Shumway.AVM2.XRegExp.install(); return b; } } - function p(b) { - for (var a = b.split("."), d = ca, f = 0, k = a.length;f < k;f++) { - d = d && d[a[f]]; + function v(b) { + for (var a = b.split("."), e = ea, f = 0, c = a.length;f < c;f++) { + e = e && e[a[f]]; } - d || (d = da[b]); - g(d, "getNative(" + b + ") not found."); - g(0 > la.indexOf(d), "Leaking illegal function."); - return d; + e || (e = ca[b]); + return e; } - var u = c.AVM2.ABC.Multiname, l = c.AVM2.Runtime.Scope, e = c.ObjectUtilities.hasOwnProperty, m = c.ObjectUtilities.hasOwnGetter, t = c.ObjectUtilities.defineNonEnumerableProperty, q = c.isNumber, n = c.isNullOrUndefined, k = c.ObjectUtilities.isPrototypeWriteable, f = c.ObjectUtilities.getOwnPropertyDescriptor, d = c.Debug.notImplemented, b = c.AVM2.Runtime.asCoerceString, g = c.Debug.assert, r = c.AVM2.Runtime.createFunction, w = c.AVM2.Runtime, z = c.ObjectUtilities.boxValue, A = c.AVM2.Runtime.ClassBindings, - B = c.AVM2.Runtime.InstanceBindings, M = c.AVM2.Runtime.asCompare; + var u = d.AVM2.ABC.Multiname, t = d.AVM2.Runtime.Scope, l = d.ObjectUtilities.hasOwnProperty, c = d.ObjectUtilities.defineNonEnumerableProperty, h = d.isNumber, p = d.isNullOrUndefined, s = d.ObjectUtilities.isPrototypeWriteable, m = d.ObjectUtilities.getOwnPropertyDescriptor, g = d.Debug.notImplemented, f = d.AVM2.Runtime.asCoerceString, b = d.AVM2.Runtime.createFunction, e = d.AVM2.Runtime, q = d.ObjectUtilities.boxValue, n = d.AVM2.Runtime.ClassBindings, x = d.AVM2.Runtime.InstanceBindings, + L = d.AVM2.Runtime.asCompare; (function(b) { b[b.NONE = 0] = "NONE"; b[b.OWN_INITIALIZE = 1] = "OWN_INITIALIZE"; b[b.SUPER_INITIALIZE = 2] = "SUPER_INITIALIZE"; })(a.InitializationFlags || (a.InitializationFlags = {})); - var N = function() { + var A = function() { function b() { } b.morphIntoASClass = function(b) { this.classInfo = b; - this.__proto__ = y.prototype; + this.__proto__ = K.prototype; }; - b.create = function(b, a, d) { - y.create(b, a, this.instanceConstructor); + b.create = function(b, a, e) { + K.create(b, a, this.instanceConstructor); }; b.initializeFrom = function(b) { - return D.initializeFrom.call(this, b); + return F.initializeFrom.call(this, b); }; b.asCall = function(b) { - for (var a = [], d = 1;d < arguments.length;d++) { - a[d - 1] = arguments[d]; + for (var a = [], e = 1;e < arguments.length;e++) { + a[e - 1] = arguments[e]; } return this.callableConstructor.apply(b, a); }; @@ -10613,26 +10919,26 @@ Shumway.AVM2.XRegExp.install(); return this.callableConstructor.apply(b, a); }; b.verify = function() { - D.verify.call(this); + F.verify.call(this); }; b.trace = function(b) { - D.trace.call(this, b); + F.trace.call(this, b); }; b.getQualifiedClassName = function() { - return D.getQualifiedClassName.call(this); + return F.getQualifiedClassName.call(this); }; - b._setPropertyIsEnumerable = function(b, a, d) { + b._setPropertyIsEnumerable = function(b, a, e) { a = u.getPublicQualifiedName(a); - d = f(b, a); - d.enumerable = !1; - Object.defineProperty(b, a, d); + e = m(b, a); + e.enumerable = !1; + Object.defineProperty(b, a, e); }; b._dontEnumPrototype = function(b) { for (var a in b) { if (u.isPublicQualifiedName(a)) { - var d = f(b, a); - d.enumerable = !1; - Object.defineProperty(b, a, d); + var e = m(b, a); + e.enumerable = !1; + Object.defineProperty(b, a, e); } } }; @@ -10646,7 +10952,7 @@ Shumway.AVM2.XRegExp.install(); b._dontEnumPrototype(this.dynamicPrototype); }; b.prototype.native_isPrototypeOf = function(b) { - d("isPrototypeOf"); + g("isPrototypeOf"); return!1; }; b.prototype.native_hasOwnProperty = function(b) { @@ -10655,12 +10961,12 @@ Shumway.AVM2.XRegExp.install(); b.prototype.native_propertyIsEnumerable = function(b) { return this.asPropertyIsEnumerable(null, b, 0); }; - b.prototype.setPropertyIsEnumerable = function(a, d) { - b._setPropertyIsEnumerable(this, a, d); + b.prototype.setPropertyIsEnumerable = function(a, e) { + b._setPropertyIsEnumerable(this, a, e); }; b.prototype.toString = function() { - var b = z(this); - return b instanceof y ? c.StringUtilities.concat3("[class ", b.classInfo.instanceInfo.name.name, "]") : c.StringUtilities.concat3("[object ", b.class.classInfo.instanceInfo.name.name, "]"); + var b = q(this); + return b instanceof K ? d.StringUtilities.concat3("[class ", b.classInfo.instanceInfo.name.name, "]") : d.StringUtilities.concat3("[object ", b.class.classInfo.instanceInfo.name.name, "]"); }; b.baseClass = null; b.instanceConstructor = Object; @@ -10673,12 +10979,12 @@ Shumway.AVM2.XRegExp.install(); b.initializationFlags = 0; b.call = Function.prototype.call; b.apply = Function.prototype.apply; - b.coerce = w.asCoerceObject; + b.coerce = e.asCoerceObject; b.defineProperty = Object.defineProperty; return b; }(); - a.ASObject = N; - var K = function(b) { + a.ASObject = A; + var H = function(b) { function a() { b.apply(this, arguments); } @@ -10696,9 +11002,9 @@ Shumway.AVM2.XRegExp.install(); a.defaultValue = null; a.initializationFlags = 0; return a; - }(N); - a.ASNative = K; - var y = function(b) { + }(A); + a.ASNative = H; + var K = function(b) { function a(b) { this.classInfo = b; this.instanceNatives = this.staticNatives = null; @@ -10707,7 +11013,6 @@ Shumway.AVM2.XRegExp.install(); } __extends(a, b); a.configureBuiltinPrototype = function(b, a) { - g(b.instanceConstructor); b.baseClass = a; b.dynamicPrototype = b.traitsPrototype = b.instanceConstructor.prototype; }; @@ -10715,90 +11020,89 @@ Shumway.AVM2.XRegExp.install(); b.baseClass = a; b.dynamicPrototype = Object.create(a.dynamicPrototype); b.traitsPrototype = Object.create(b.dynamicPrototype); - for (var d = b.traitsPrototype, g = [];b;) { - g.push(b), b = b.baseClass; + for (var e = b.traitsPrototype, f = [];b;) { + f.push(b), b = b.baseClass; } - for (var f = 0;f < g.length;f++) { - var k = [g[f].typeScriptPrototype]; - g[f].instanceNatives && c.ArrayUtilities.pushMany(k, g[f].instanceNatives); - for (var r = 0;r < k.length;r++) { - var m = k[r], w; - for (w in m) { - if (!(0 < f && "toString" === w) && e(m, w) && !e(d, w)) { - var q = Object.getOwnPropertyDescriptor(m, w); - c.Debug.assert(q); + for (var c = 0;c < f.length;c++) { + var g = [f[c].typeScriptPrototype]; + f[c].instanceNatives && d.ArrayUtilities.pushMany(g, f[c].instanceNatives); + for (var n = 0;n < g.length;n++) { + var q = g[n], p; + for (p in q) { + if (!(0 < c && "toString" === p) && l(q, p) && !l(e, p)) { + var h = Object.getOwnPropertyDescriptor(q, p); try { - Object.defineProperty(d, w, q); - } catch (n) { + Object.defineProperty(e, p, h); + } catch (m) { } } } } } }; - a.create = function(b, d, f) { - g(!b.instanceConstructorNoInitialize, "This should not be set yet."); - g(!b.dynamicPrototype && !b.traitsPrototype, "These should not be set yet."); + a.create = function(b, e, f) { b.typeScriptPrototype = b.prototype; - b.instanceConstructor && !k(b.instanceConstructor) ? a.configureBuiltinPrototype(b, d) : a.configurePrototype(b, d); + b.instanceConstructor && !s(b.instanceConstructor) ? a.configureBuiltinPrototype(b, e) : a.configurePrototype(b, e); b.instanceConstructor || (b.instanceConstructor = f, b !== f && (b.instanceConstructor.__proto__ = b)); b.callableConstructor || (b.callableConstructor = b.coerce.bind(b)); b.instanceConstructorNoInitialize = b.instanceConstructor; b.instanceConstructor.prototype = b.traitsPrototype; - t(b.instanceConstructor.prototype, "class", b); - t(b.dynamicPrototype, u.getPublicQualifiedName("constructor"), b); - b.protocol && c.ObjectUtilities.copyOwnPropertyDescriptors(b.traitsPrototype, b.protocol); + c(b.instanceConstructor.prototype, "class", b); + c(b.dynamicPrototype, u.getPublicQualifiedName("constructor"), b); + b.protocol && d.ObjectUtilities.copyOwnPropertyDescriptors(b.traitsPrototype, b.protocol); }; a.prototype.initializeFrom = function(b) { - var d = Object.create(this.traitsPrototype); - a.runInitializers(d, b); - return d; + var e = Object.create(this.traitsPrototype); + a.runInitializers(e, b); + return e; }; a.runInitializers = function(b, a) { a = a || b.class.defaultInitializerArgument; - var d = b.class.initializers; - if (d) { - for (var g = 0;g < d.length;g++) { - d[g].call(b, a); + var e = b.class.initializers; + if (e) { + for (var f = 0;f < e.length;f++) { + e[f].call(b, a); } } }; a.configureInitializers = function(b) { b.baseClass && b.baseClass.initializers && (b.initializers = b.baseClass.initializers.slice(0)); b.initializer && (b.initializers || (b.initializers = []), b.initializers.push(b.initializer)); - b.initializers && (g(b.instanceConstructorNoInitialize === b.instanceConstructor), b.instanceConstructor = function() { + b.initializers && (b.instanceConstructor = function() { a.runInitializers(this, void 0); return b.instanceConstructorNoInitialize.apply(this, arguments); - }, b.instanceConstructor.prototype = b.traitsPrototype, t(b.instanceConstructor.prototype, "class", b), b.instanceConstructor.classInfo = b.classInfo, b.instanceConstructor.__proto__ = b); + }, b.instanceConstructor.prototype = b.traitsPrototype, c(b.instanceConstructor.prototype, "class", b), b.instanceConstructor.classInfo = b.classInfo, b.instanceConstructor.__proto__ = b); }; a.runClassInitializer = function(b) { b.classInitializer && b.classInitializer(); }; a.linkSymbols = function(b) { - function a(b, f, k) { - for (var e = 0;e < f.length;e++) { - var r = f[e], c; + function a(b, e, f) { + for (var c = 0;c < e.length;c++) { + var n = e[c], q; a: { - c = b; - for (var w = r.name.name, q = 0;q < c.length;q++) { - var n = c[q]; - if (0 <= n.indexOf(w) && ("!" === n[n.length - 1] && (n = n.slice(0, n.length - 1)), w === n)) { - c = !0; - break a; + q = b; + for (var p = n.name.name, h = 0;h < q.length;h++) { + var m = q[h]; + if (0 <= m.indexOf(p)) { + var s = "!" === m[m.length - 1]; + s && (m = m.slice(0, m.length - 1)); + if (p === m) { + q = s; + break a; + } } } - c = !1; + q = !1; } - if (c) { - g(!r.name.getNamespace().isPrivate(), "Why are you linking against private members?"); - if (r.isConst()) { - d("Don't link against const traits."); + if (q) { + if (n.isConst()) { + g("Don't link against const traits."); break; } - c = r.name.name; - w = u.getQualifiedName(r.name); - r.isSlot() ? Object.defineProperty(k, c, {get:new Function("", "return this." + w + "//# sourceURL=get-" + w + ".as"), set:new Function("v", "this." + w + " = v;//# sourceURL=set-" + w + ".as")}) : r.isMethod() ? (g(!k[c], "Symbol should not already exist."), g(k.asOpenMethods[w], "There should be an open method for this symbol."), k[c] = k.asOpenMethods[w]) : r.isGetter() ? (g(m(k, w), "There should be an getter method for this symbol."), Object.defineProperty(k, c, {get:new Function("", - "return this." + w + "//# sourceURL=get-" + w + ".as")})) : d(r); + q = n.name.name; + p = u.getQualifiedName(n.name); + n.isSlot() ? Object.defineProperty(f, q, {get:new Function("", "return this." + p + "//# sourceURL=get-" + p + ".as"), set:new Function("v", "this." + p + " = v;//# sourceURL=set-" + p + ".as")}) : n.isMethod() ? f[q] = f.asOpenMethods[p] : n.isGetter() ? Object.defineProperty(f, q, {get:new Function("", "return this." + p + "//# sourceURL=get-" + p + ".as")}) : g(n); } } } @@ -10806,11 +11110,8 @@ Shumway.AVM2.XRegExp.install(); b.instanceSymbols && a(b.instanceSymbols, b.classInfo.instanceInfo.traits, b.traitsPrototype); }; a.prototype.morphIntoASClass = function(b) { - g(this.classInfo === b); - g(this instanceof a); }; Object.defineProperty(a.prototype, "native_prototype", {get:function() { - g(this.dynamicPrototype); return this.dynamicPrototype; }, enumerable:!0, configurable:!0}); a.prototype.asCall = function(b, a) { @@ -10827,15 +11128,14 @@ Shumway.AVM2.XRegExp.install(); return this.isInterface() ? !1 : this.isType(b); }; a.prototype.isType = function(b) { - if (c.isNullOrUndefined(b)) { + if (d.isNullOrUndefined(b)) { return!1; } - b = z(b); + b = q(b); if (this.isInterface()) { if (null === b || "object" !== typeof b) { return!1; } - g(b.class.implementedInterfaces, "No 'implementedInterfaces' map found on class " + b.class); var a = u.getQualifiedName(this.classInfo.instanceInfo.name); return void 0 !== b.class.implementedInterfaces[a]; } @@ -10861,38 +11161,36 @@ Shumway.AVM2.XRegExp.install(); return a ? a + "::" + b.name : b.name; }; a.prototype.verify = function() { - function b(a, d, g) { - for (var f = 0;f < a.length;f++) { - if (d(a[f], g)) { + function b(a, e, f) { + for (var c = 0;c < a.length;c++) { + if (e(a[c], f)) { return!0; } } return!1; } if (!this.isInterface()) { - var a = [this.classInfo.traits, this.classInfo.instanceInfo.traits], d = [this]; - this.staticNatives && c.ArrayUtilities.pushMany(d, this.staticNatives); + var a = [this.classInfo.traits, this.classInfo.instanceInfo.traits], e = [this]; + this.staticNatives && d.ArrayUtilities.pushMany(e, this.staticNatives); var f = [this.prototype]; - this.instanceNatives && c.ArrayUtilities.pushMany(f, this.instanceNatives); - this === N ? g(!this.baseClass, "ASObject should have no base class.") : (g(this.baseClass, this.classInfo.instanceInfo.name + " has no base class."), g(this.baseClass !== this)); - g(this.traitsPrototype === this.instanceConstructor.prototype, "The traitsPrototype is not set correctly."); - for (var k = 0;k < a.length;k++) { - for (var e = 0 === k, r = 0;r < a[k].length;r++) { - var m = a[k][r], w = v(m.name.name); - if (m.isMethodOrAccessor() && m.methodInfo.isNative()) { - var q = e ? d : f; - m.isMethod() ? b(q, c.ObjectUtilities.hasOwnProperty, w) : m.isGetter() ? b(q, c.ObjectUtilities.hasOwnGetter, w) : m.isSetter() && b(q, c.ObjectUtilities.hasOwnSetter, w); + this.instanceNatives && d.ArrayUtilities.pushMany(f, this.instanceNatives); + for (var c = 0;c < a.length;c++) { + for (var g = 0 === c, n = 0;n < a[c].length;n++) { + var q = a[c][n], p = r(q.name.name); + if (q.isMethodOrAccessor() && q.methodInfo.isNative()) { + var h = g ? e : f; + q.isMethod() ? b(h, d.ObjectUtilities.hasOwnProperty, p) : q.isGetter() ? b(h, d.ObjectUtilities.hasOwnGetter, p) : q.isSetter() && b(h, d.ObjectUtilities.hasOwnSetter, p); } } } - c.Debug.assert(this.instanceConstructor, "Must have a constructor function."); + d.Debug.assert(this.instanceConstructor, "Must have a constructor function."); } }; a.labelObject = function(b) { if (!b) { return b; } - e(b, "labelId") || (b.labelId = a.labelCounter++); + l(b, "labelId") || (b.labelId = a.labelCounter++); return b instanceof Function ? "Function [#" + b.labelId + "]" : "Object [#" + b.labelId + "]"; }; a.prototype.trace = function(b) { @@ -10916,12 +11214,12 @@ Shumway.AVM2.XRegExp.install(); a.instanceNatives = null; a.labelCounter = 0; return a; - }(N); - a.ASClass = y; - var D = y.prototype; - D.call = Function.prototype.call; - D.apply = Function.prototype.apply; - var L = function(b) { + }(A); + a.ASClass = K; + var F = K.prototype; + F.call = Function.prototype.call; + F.apply = Function.prototype.apply; + var J = function(b) { function a() { } __extends(a, b); @@ -10931,7 +11229,7 @@ Shumway.AVM2.XRegExp.install(); this.prototype = b; }, enumerable:!0, configurable:!0}); Object.defineProperty(a.prototype, "native_length", {get:function() { - return this.hasOwnProperty(w.VM_LENGTH) ? this.asLength : this.length; + return this.hasOwnProperty(e.VM_LENGTH) ? this.asLength : this.length; }, enumerable:!0, configurable:!0}); a.prototype.toString = function() { return "function Function() {}"; @@ -10941,9 +11239,9 @@ Shumway.AVM2.XRegExp.install(); a.staticNatives = [Function]; a.instanceNatives = [Function.prototype]; return a; - }(N); - a.ASFunction = L; - var H = function(b) { + }(A); + a.ASFunction = J; + var M = function(b) { function a(b) { } __extends(a, b); @@ -10951,17 +11249,17 @@ Shumway.AVM2.XRegExp.install(); a.callableConstructor = a.instanceConstructor; a.staticNatives = null; a.instanceNatives = null; - a.coerce = w.asCoerceBoolean; + a.coerce = e.asCoerceBoolean; return a; - }(N); - a.ASBoolean = H; - H.prototype.toString = Boolean.prototype.toString; - H.prototype.valueOf = Boolean.prototype.valueOf; - var J = function(b) { - function a(b, d) { - var g = c.FunctionUtilities.bindSafely(d, b); - t(this, "call", g.call.bind(g)); - t(this, "apply", g.apply.bind(g)); + }(A); + a.ASBoolean = M; + M.prototype.toString = Boolean.prototype.toString; + M.prototype.valueOf = Boolean.prototype.valueOf; + var D = function(b) { + function a(b, e) { + var f = d.FunctionUtilities.bindSafely(e, b); + c(this, "call", f.call.bind(f)); + c(this, "apply", f.apply.bind(f)); } __extends(a, b); a.prototype.toString = function() { @@ -10970,9 +11268,9 @@ Shumway.AVM2.XRegExp.install(); a.staticNatives = null; a.instanceNatives = null; return a.instanceConstructor = a; - }(L); - a.ASMethodClosure = J; - var C = function(b) { + }(J); + a.ASMethodClosure = D; + var B = function(b) { function a() { b.apply(this, arguments); } @@ -10988,10 +11286,10 @@ Shumway.AVM2.XRegExp.install(); a.staticNatives = [Math]; a.instanceNatives = [Number.prototype]; a.defaultValue = Number(0); - a.coerce = w.asCoerceNumber; + a.coerce = e.asCoerceNumber; return a; - }(N); - a.ASNumber = C; + }(A); + a.ASNumber = B; var E = function(b) { function a(b) { return Object(Number(b | 0)); @@ -11007,18 +11305,18 @@ Shumway.AVM2.XRegExp.install(); return!1; }; a.isType = function(b) { - return q(b) || b instanceof Number ? (b = +b, (b | 0) === b) : !1; + return h(b) || b instanceof Number ? (b = +b, (b | 0) === b) : !1; }; a.instanceConstructor = a; a.callableConstructor = a.instanceConstructor; a.staticNatives = [Math]; a.instanceNatives = [Number.prototype]; a.defaultValue = 0; - a.coerce = w.asCoerceInt; + a.coerce = e.asCoerceInt; return a; - }(N); + }(A); a.ASInt = E; - var F = function(b) { + var y = function(b) { function a(b) { return Object(Number(b >>> 0)); } @@ -11033,66 +11331,66 @@ Shumway.AVM2.XRegExp.install(); return!1; }; a.isType = function(b) { - return q(b) || b instanceof Number ? (b = +b, b >>> 0 === b) : !1; + return h(b) || b instanceof Number ? (b = +b, b >>> 0 === b) : !1; }; a.instanceConstructor = a; a.callableConstructor = a.instanceConstructor; a.staticNatives = [Math]; a.instanceNatives = [Number.prototype]; a.defaultValue = 0; - a.coerce = w.asCoerceUint; + a.coerce = e.asCoerceUint; return a; - }(N); - a.ASUint = F; - var I = function(a) { - function d() { - a.apply(this, arguments); + }(A); + a.ASUint = y; + var z = function(b) { + function a() { + b.apply(this, arguments); } - __extends(d, a); - Object.defineProperty(d.prototype, "native_length", {get:function() { + __extends(a, b); + Object.defineProperty(a.prototype, "native_length", {get:function() { return this.length; }, enumerable:!0, configurable:!0}); - d.prototype.match = function(b) { + a.prototype.match = function(b) { if (void 0 === b || null === b) { return null; } - if (b instanceof h.XRegExp && b.global) { - for (var a = [], d;d = b.exec(this);) { - a.push(d[0]); + if (b instanceof k.XRegExp && b.global) { + for (var a = [], e;e = b.exec(this);) { + a.push(e[0]); } return a; } - b instanceof h.XRegExp || "string" === typeof b || (b = String(b)); + b instanceof k.XRegExp || "string" === typeof b || (b = String(b)); return this.match(b); }; - d.prototype.search = function(a) { - return a instanceof h.XRegExp ? this.search(a) : this.indexOf(b(a)); + a.prototype.search = function(b) { + return b instanceof k.XRegExp ? this.search(b) : this.indexOf(f(b)); }; - d.prototype.toUpperCase = function() { + a.prototype.toUpperCase = function() { var b = String.prototype.toUpperCase.apply(this); return b = b.replace(/\u039C/g, String.fromCharCode(181)); }; - d.prototype.toLocaleUpperCase = function() { + a.prototype.toLocaleUpperCase = function() { var b = String.prototype.toLocaleUpperCase.apply(this); return b = b.replace(/\u039C/g, String.fromCharCode(181)); }; - d.instanceConstructor = String; - d.callableConstructor = d.instanceConstructor; - d.staticNatives = [String]; - d.instanceNatives = [String.prototype]; - d.coerce = w.asCoerceString; - return d; - }(N); - a.ASString = I; + a.instanceConstructor = String; + a.callableConstructor = a.instanceConstructor; + a.staticNatives = [String]; + a.instanceNatives = [String.prototype]; + a.coerce = e.asCoerceString; + return a; + }(A); + a.ASString = z; a.arraySort = function(b, a) { if (0 === a.length) { return b.sort(); } - var d, g = 0; - a[0] instanceof Function ? d = a[0] : q(a[0]) && (g = a[0]); - q(a[1]) && (g = a[1]); + var e, f = 0; + a[0] instanceof Function ? e = a[0] : h(a[0]) && (f = a[0]); + h(a[1]) && (f = a[1]); b.sort(function(b, a) { - return M(b, a, g, d); + return L(b, a, f, e); }); return b; }; @@ -11102,51 +11400,51 @@ Shumway.AVM2.XRegExp.install(); } __extends(a, b); a.prototype.toLocaleString = function() { - for (var b = a.coerce(this), d = "", g = 0, f = b.length;g < f;g++) { - var k = b[g]; - null !== k && void 0 !== k && (d += k.toLocaleString()); - g + 1 < f && (d += ","); + for (var b = a.coerce(this), e = "", f = 0, c = b.length;f < c;f++) { + var g = b[f]; + null !== g && void 0 !== g && (e += g.toLocaleString()); + f + 1 < c && (e += ","); } - return d; + return e; }; a.prototype.splice = function() { return 0 === arguments.length ? void 0 : this.splice.apply(this, arguments); }; a.prototype.every = function(b, a) { - for (var d = 0;d < this.length && !0 === b.call(a, this[d], d, this);d++) { + for (var e = 0;e < this.length && !0 === b.call(a, this[e], e, this);e++) { } return!1; }; a.prototype.filter = function(b, a) { - for (var d = [], g = 0;g < this.length;g++) { - !0 === b.call(a, this[g], g, this) && d.push(this[g]); + for (var e = [], f = 0;f < this.length;f++) { + !0 === b.call(a, this[f], f, this) && e.push(this[f]); } - return d; + return e; }; a.prototype.sort = function() { if (0 === arguments.length) { return this.sort(); } var b, a = 0; - arguments[0] instanceof Function ? b = arguments[0] : q(arguments[0]) && (a = arguments[0]); - q(arguments[1]) && (a = arguments[1]); - this.sort(function(d, g) { - return w.asCompare(d, g, a, b); + arguments[0] instanceof Function ? b = arguments[0] : h(arguments[0]) && (a = arguments[0]); + h(arguments[1]) && (a = arguments[1]); + this.sort(function(f, c) { + return e.asCompare(f, c, a, b); }); return this; }; - a.prototype.sortOn = function(b, d) { - c.isString(b) && (b = [b]); - n(d) ? d = [] : q(d) && (d = [d]); - for (var g = b.length - 1;0 <= g;g--) { - var f = u.getPublicQualifiedName(b[g]); - if (a.CACHE_NUMERIC_COMPARATORS && d[g] & 16) { - var k = "var x = +(a." + f + "), y = +(b." + f + ");", k = d[g] & 2 ? k + "return x < y ? 1 : (x > y ? -1 : 0);" : k + "return x < y ? -1 : (x > y ? 1 : 0);", e = a.numericComparatorCache[k]; - e || (e = a.numericComparatorCache[k] = new Function("a", "b", k)); - this.sort(e); + a.prototype.sortOn = function(b, f) { + d.isString(b) && (b = [b]); + p(f) ? f = [] : h(f) && (f = [f]); + for (var c = b.length - 1;0 <= c;c--) { + var g = u.getPublicQualifiedName(b[c]); + if (a.CACHE_NUMERIC_COMPARATORS && f[c] & 16) { + var n = "var x = +(a." + g + "), y = +(b." + g + ");", n = f[c] & 2 ? n + "return x < y ? 1 : (x > y ? -1 : 0);" : n + "return x < y ? -1 : (x > y ? 1 : 0);", q = a.numericComparatorCache[n]; + q || (q = a.numericComparatorCache[n] = new Function("a", "b", n)); + this.sort(q); } else { this.sort(function(b, a) { - return w.asCompare(b[f], a[f], d[g] | 0); + return e.asCompare(b[g], a[g], f[c] | 0); }); } } @@ -11161,34 +11459,34 @@ Shumway.AVM2.XRegExp.install(); a.staticNatives = [Array]; a.instanceNatives = [Array.prototype]; a.classInitializer = function() { - var b = Array.prototype, d = a.prototype; - t(b, "$Bgjoin", b.join); - t(b, "$BgtoString", b.join); - t(b, "$BgtoLocaleString", d.toLocaleString); - t(b, "$Bgpop", b.pop); - t(b, "$Bgpush", b.push); - t(b, "$Bgreverse", b.reverse); - t(b, "$Bgconcat", b.concat); - t(b, "$Bgsplice", d.splice); - t(b, "$Bgslice", b.slice); - t(b, "$Bgshift", b.shift); - t(b, "$Bgunshift", b.unshift); - t(b, "$BgindexOf", b.indexOf); - t(b, "$BglastIndexOf", b.lastIndexOf); - t(b, "$BgforEach", b.forEach); - t(b, "$Bgmap", b.map); - t(b, "$Bgfilter", b.filter); - t(b, "$Bgsome", b.some); - t(b, "$Bgevery", d.every); - t(b, "$Bgsort", d.sort); - t(b, "$BgsortOn", d.sortOn); + var b = Array.prototype, e = a.prototype; + c(b, "$Bgjoin", b.join); + c(b, "$BgtoString", b.join); + c(b, "$BgtoLocaleString", e.toLocaleString); + c(b, "$Bgpop", b.pop); + c(b, "$Bgpush", b.push); + c(b, "$Bgreverse", b.reverse); + c(b, "$Bgconcat", b.concat); + c(b, "$Bgsplice", e.splice); + c(b, "$Bgslice", b.slice); + c(b, "$Bgshift", b.shift); + c(b, "$Bgunshift", b.unshift); + c(b, "$BgindexOf", b.indexOf); + c(b, "$BglastIndexOf", b.lastIndexOf); + c(b, "$BgforEach", b.forEach); + c(b, "$Bgmap", b.map); + c(b, "$Bgfilter", b.filter); + c(b, "$Bgsome", b.some); + c(b, "$Bgevery", e.every); + c(b, "$Bgsort", e.sort); + c(b, "$BgsortOn", e.sortOn); }; a.CACHE_NUMERIC_COMPARATORS = !0; a.numericComparatorCache = Object.create(null); return a; - }(N); + }(A); a.ASArray = G; - var Z = function(b) { + var C = function(b) { function a() { b.apply(this, arguments); } @@ -11201,53 +11499,53 @@ Shumway.AVM2.XRegExp.install(); a.instanceConstructor = a; a.callableConstructor = null; return a; - }(K); - a.ASVector = Z; - var Q = function(a) { - function d() { - a.apply(this, arguments); + }(H); + a.ASVector = C; + var I = function(b) { + function a() { + b.apply(this, arguments); } - __extends(d, a); - d.transformJSValueToAS = function(b, a) { - if ("object" !== typeof b || n(b)) { + __extends(a, b); + a.transformJSValueToAS = function(b, e) { + if ("object" !== typeof b || p(b)) { return b; } - for (var g = Object.keys(b), f = Array.isArray(b) ? [] : {}, k = 0;k < g.length;k++) { - var e = b[g[k]]; - a && (e = d.transformJSValueToAS(e, !0)); - f.asSetPublicProperty(g[k], e); + for (var f = Object.keys(b), c = Array.isArray(b) ? [] : {}, g = 0;g < f.length;g++) { + var n = b[f[g]]; + e && (n = a.transformJSValueToAS(n, !0)); + c.asSetPublicProperty(f[g], n); } - return f; + return c; }; - d.transformASValueToJS = function(b, a) { - if ("object" !== typeof b || n(b)) { + a.transformASValueToJS = function(b, e) { + if ("object" !== typeof b || p(b)) { return b; } - for (var g = Object.keys(b), f = Array.isArray(b) ? [] : {}, k = 0;k < g.length;k++) { - var e = g[k], r = e; - c.isNumeric(e) || (r = u.getNameFromPublicQualifiedName(e)); - e = b[e]; - a && (e = d.transformASValueToJS(e, !0)); - f[r] = e; + for (var f = Object.keys(b), c = Array.isArray(b) ? [] : {}, g = 0;g < f.length;g++) { + var n = f[g], q = n; + d.isNumeric(n) || (q = u.getNameFromPublicQualifiedName(n)); + n = b[n]; + e && (n = a.transformASValueToJS(n, !0)); + c[q] = n; } - return f; + return c; }; - d.parseCore = function(a) { - a = b(a); - return d.transformJSValueToAS(JSON.parse(a), !0); + a.parseCore = function(b) { + b = f(b); + return a.transformJSValueToAS(JSON.parse(b), !0); }; - d.stringifySpecializedToString = function(b, a, g, f) { - return JSON.stringify(d.transformASValueToJS(b, !0), g, f); + a.stringifySpecializedToString = function(b, e, f, c) { + return JSON.stringify(a.transformASValueToJS(b, !0), f, c); }; - d.instanceConstructor = d; - d.staticNatives = null; - d.instanceNatives = null; - return d; - }(N); - a.ASJSON = Q; - var S = function(b) { - function a(b, g) { - d("ASError"); + a.instanceConstructor = a; + a.staticNatives = null; + a.instanceNatives = null; + return a; + }(A); + a.ASJSON = I; + var P = function(b) { + function a(b, e) { + g("ASError"); } __extends(a, b); a.prototype.getStackTrace = function() { @@ -11256,99 +11554,99 @@ Shumway.AVM2.XRegExp.install(); a.instanceConstructor = null; a.staticNatives = null; a.instanceNatives = null; - a.getErrorMessage = c.AVM2.getErrorMessage; + a.getErrorMessage = d.AVM2.getErrorMessage; return a; - }(K); - a.ASError = S; + }(H); + a.ASError = P; + var T = function(b) { + function a() { + b.apply(this, arguments); + } + __extends(a, b); + return a; + }(P); + a.ASDefinitionError = T; var O = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASDefinitionError = O; - var P = function(b) { + }(P); + a.ASEvalError = O; + var Q = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASEvalError = P; + }(P); + a.ASRangeError = Q; + var S = function(b) { + function a() { + b.apply(this, arguments); + } + __extends(a, b); + return a; + }(P); + a.ASReferenceError = S; var V = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASRangeError = V; + }(P); + a.ASSecurityError = V; + var aa = function(b) { + function a() { + b.apply(this, arguments); + } + __extends(a, b); + return a; + }(P); + a.ASSyntaxError = aa; var $ = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASReferenceError = $; - var W = function(b) { + }(P); + a.ASTypeError = $; + var w = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASSecurityError = W; - var x = function(b) { - function a() { - b.apply(this, arguments); - } - __extends(a, b); - return a; - }(S); - a.ASSyntaxError = x; - var ea = function(b) { - function a() { - b.apply(this, arguments); - } - __extends(a, b); - return a; - }(S); - a.ASTypeError = ea; - var Y = function(b) { - function a() { - b.apply(this, arguments); - } - __extends(a, b); - return a; - }(S); - a.ASURIError = Y; - var R = function(b) { - function a() { - b.apply(this, arguments); - } - __extends(a, b); - return a; - }(S); - a.ASVerifyError = R; + }(P); + a.ASURIError = w; var U = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASUninitializedError = U; + }(P); + a.ASVerifyError = U; var ba = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); return a; - }(S); - a.ASArgumentError = ba; - var X = function(b) { + }(P); + a.ASUninitializedError = ba; + var R = function(b) { + function a() { + b.apply(this, arguments); + } + __extends(a, b); + return a; + }(P); + a.ASArgumentError = R; + var N = function(b) { function a() { b.apply(this, arguments); } @@ -11382,29 +11680,29 @@ Shumway.AVM2.XRegExp.install(); if (!a) { return a; } - for (var d = Object.keys(a), g = 0;g < d.length;g++) { - var f = d[g]; - c.isNumeric(f) || void 0 === a[f] && (a[f] = ""); + for (var e = Object.keys(a), f = 0;f < e.length;f++) { + var c = e[f]; + d.isNumeric(c) || void 0 === a[c] && (a[c] = ""); } - c.AVM2.Runtime.publicizeProperties(a); + d.AVM2.Runtime.publicizeProperties(a); return a; }; - a.instanceConstructor = h.XRegExp; - a.staticNatives = [h.XRegExp]; - a.instanceNatives = [h.XRegExp.prototype]; + a.instanceConstructor = k.XRegExp; + a.staticNatives = [k.XRegExp]; + a.instanceNatives = [k.XRegExp.prototype]; return a; - }(N); - a.ASRegExp = X; - var ga = function(b) { + }(A); + a.ASRegExp = N; + var Z = function(b) { function a() { b.apply(this, arguments); } __extends(a, b); a.staticNatives = [Math]; return a; - }(K); - a.ASMath = ga; - var ja = function(b) { + }(H); + a.ASMath = Z; + var fa = function(b) { function a() { b.apply(this, arguments); } @@ -11413,96 +11711,92 @@ Shumway.AVM2.XRegExp.install(); a.instanceNatives = [Date.prototype]; a.instanceConstructor = Date; return a; - }(K); - a.ASDate = ja; - var aa = c.ObjectUtilities.createMap(), ia = !1; + }(H); + a.ASDate = fa; + var X = d.ObjectUtilities.createMap(), ia = !1; a.initialize = function(b) { - ia || (aa.ObjectClass = N, aa.Class = y, aa.FunctionClass = L, aa.BooleanClass = H, aa.MethodClosureClass = J, aa.NamespaceClass = a.ASNamespace, aa.NumberClass = C, aa.IntClass = E, aa.UIntClass = F, aa.StringClass = I, aa.ArrayClass = G, aa.VectorClass = Z, aa.ObjectVectorClass = a.GenericVector, aa.IntVectorClass = a.Int32Vector, aa.UIntVectorClass = a.Uint32Vector, aa.DoubleVectorClass = a.Float64Vector, aa.JSONClass = Q, aa.XMLClass = a.ASXML, aa.XMLListClass = a.ASXMLList, aa.QNameClass = - a.ASQName, aa.ErrorClass = S, aa.DefinitionErrorClass = O, aa.EvalErrorClass = P, aa.RangeErrorClass = V, aa.ReferenceErrorClass = $, aa.SecurityErrorClass = W, aa.SyntaxErrorClass = x, aa.TypeErrorClass = ea, aa.URIErrorClass = Y, aa.VerifyErrorClass = R, aa.UninitializedErrorClass = U, aa.ArgumentErrorClass = ba, aa.DateClass = ja, aa.MathClass = ga, aa.RegExpClass = X, aa.ProxyClass = a.flash.utils.OriginalProxy, aa.DictionaryClass = a.flash.utils.OriginalDictionary, aa.ByteArrayClass = - a.flash.utils.OriginalByteArray, aa.SystemClass = a.flash.system.OriginalSystem, ia = !0); + ia || (X.ObjectClass = A, X.Class = K, X.FunctionClass = J, X.BooleanClass = M, X.MethodClosureClass = D, X.NamespaceClass = a.ASNamespace, X.NumberClass = B, X.IntClass = E, X.UIntClass = y, X.StringClass = z, X.ArrayClass = G, X.VectorClass = C, X.ObjectVectorClass = a.GenericVector, X.IntVectorClass = a.Int32Vector, X.UIntVectorClass = a.Uint32Vector, X.DoubleVectorClass = a.Float64Vector, X.JSONClass = I, X.XMLClass = a.ASXML, X.XMLListClass = a.ASXMLList, X.QNameClass = a.ASQName, X.ErrorClass = + P, X.DefinitionErrorClass = T, X.EvalErrorClass = O, X.RangeErrorClass = Q, X.ReferenceErrorClass = S, X.SecurityErrorClass = V, X.SyntaxErrorClass = aa, X.TypeErrorClass = $, X.URIErrorClass = w, X.VerifyErrorClass = U, X.UninitializedErrorClass = ba, X.ArgumentErrorClass = R, X.DateClass = fa, X.MathClass = Z, X.RegExpClass = N, X.ProxyClass = a.flash.utils.OriginalProxy, X.DictionaryClass = a.flash.utils.OriginalDictionary, X.ByteArrayClass = a.flash.utils.OriginalByteArray, X.SystemClass = + a.flash.system.OriginalSystem, ia = !0); }; - var T = c.ObjectUtilities.createMap(), da = c.ObjectUtilities.createMap(); + var ga = d.ObjectUtilities.createMap(), ca = d.ObjectUtilities.createMap(); a.registerNativeClass = function(b, a) { - g(!T[b], "Native class: " + b + " is already registered."); - T[b] = a; + ga[b] = a; + }; + a.registerNativeFunction = function(b, a) { + ca[b] = a; }; - a.registerNativeFunction = s; a.createInterface = function(b) { var a = b.instanceInfo; - g(a.isInterface()); - b = new y(b); - b.interfaceBindings = new B(null, a, null, null); + b = new K(b); + b.interfaceBindings = new x(null, a, null, null); b.verify(); return b; }; - var fa = []; - a.createClass = function(b, a, d) { - var f = b.instanceInfo, k = b.abc.applicationDomain, e = b.native, m; - e ? ((m = aa[b.native.cls]) || (m = T[b.native.cls]), m || c.Debug.unexpected("No native class for " + b.native.cls), m.morphIntoASClass(b), fa && fa.push(m)) : m = new y(b); - d = new l(d, null); - d.object = m; - var w = null; - f.init.isNative() ? (g(e), w = m) : w = r(f.init, d, !1, !1); - var q = null, n = null; - e && (q = [m], m.staticNatives && c.ArrayUtilities.pushMany(q, m.staticNatives), n = [m.prototype], m.instanceNatives && c.ArrayUtilities.pushMany(n, m.instanceNatives)); - y.create(m, a, w); - m.verify(); - if ("Class" === b.instanceInfo.name.name) { - for (e = 0;e < fa.length;e++) { - fa[e].__proto__ = y.prototype; + var da = []; + a.createClass = function(a, e, f) { + var c = a.instanceInfo, g = a.abc.applicationDomain, q = a.native, p; + q ? ((p = X[a.native.cls]) || (p = ga[a.native.cls]), p || d.Debug.unexpected("No native class for " + a.native.cls), p.morphIntoASClass(a), da && da.push(p)) : p = new K(a); + f = new t(f, null); + f.object = p; + var h = null, h = c.init.isNative() ? p : b(c.init, f, !1, !1), m = null, s = null; + q && (m = [p], p.staticNatives && d.ArrayUtilities.pushMany(m, p.staticNatives), s = [p.prototype], p.instanceNatives && d.ArrayUtilities.pushMany(s, p.instanceNatives)); + K.create(p, e, h); + if ("Class" === a.instanceInfo.name.name) { + for (q = 0;q < da.length;q++) { + da[q].__proto__ = K.prototype; } - fa = null; + da = null; } - h.enterTimeline("InstanceBindings"); - m.instanceBindings = new B(a ? a.instanceBindings : null, f, d, n); - m.instanceConstructor && (h.enterTimeline("applyTo"), m.instanceBindings.applyTo(k, m.traitsPrototype), h.leaveTimeline()); - h.leaveTimeline(); - h.enterTimeline("ClassBindings"); - m.classBindings = new A(b, d, q); - h.enterTimeline("applyTo"); - m.classBindings.applyTo(k, m); - m === y ? m.instanceBindings.applyTo(k, N, !0) : y.instanceBindings && y.instanceBindings.applyTo(k, m, !0); - h.leaveTimeline(); - h.leaveTimeline(); - m.implementedInterfaces = m.instanceBindings.implementedInterfaces; - h.enterTimeline("Configure"); - y.configureInitializers(m); - y.linkSymbols(m); - y.runClassInitializer(m); - h.leaveTimeline(); - return m; + k.enterTimeline("InstanceBindings"); + p.instanceBindings = new x(e ? e.instanceBindings : null, c, f, s); + p.instanceConstructor && (k.enterTimeline("applyTo"), p.instanceBindings.applyTo(g, p.traitsPrototype), k.leaveTimeline()); + k.leaveTimeline(); + k.enterTimeline("ClassBindings"); + p.classBindings = new n(a, f, m); + k.enterTimeline("applyTo"); + p.classBindings.applyTo(g, p); + p === K ? p.instanceBindings.applyTo(g, A, !0) : K.instanceBindings && K.instanceBindings.applyTo(g, p, !0); + k.leaveTimeline(); + k.leaveTimeline(); + p.implementedInterfaces = p.instanceBindings.implementedInterfaces; + k.enterTimeline("Configure"); + K.configureInitializers(p); + K.linkSymbols(p); + K.runClassInitializer(p); + k.leaveTimeline(); + return p; }; - var la = [w.forwardValueOf, w.forwardToString]; a.getMethodOrAccessorNative = function(b, a) { - for (var d = v(u.getName(b.name)), k = 0;k < a.length;k++) { - var r = a[k], m = d; - e(r, "original_" + d) && (m = "original_" + d); - !e(r, d) && e(r, "native_" + d) && (m = "native_" + d); - if (e(r, m)) { - return b.isAccessor() ? (d = f(r, m), d = b.isGetter() ? d.get : d.set) : (g(b.isMethod()), d = r[m]), g(d, "Method or Accessor property exists but it's undefined: " + b), g(0 > la.indexOf(d), "Leaking illegal function."), d; + for (var e = r(u.getName(b.name)), f = 0;f < a.length;f++) { + var c = a[f], g = e; + l(c, "original_" + e) && (g = "original_" + e); + !l(c, e) && l(c, "native_" + e) && (g = "native_" + e); + if (l(c, g)) { + return b.isAccessor() ? (e = m(c, g), e = b.isGetter() ? e.get : e.set) : e = c[g], e; } } - c.Debug.warning("No native method for: " + b.kindName() + " " + b.methodInfo.holder + "::" + u.getQualifiedName(b.name) + ", make sure you've got the static keyword for static methods."); + d.Debug.warning("No native method for: " + b.kindName() + " " + b.methodInfo.holder + "::" + u.getQualifiedName(b.name) + ", make sure you've got the static keyword for static methods."); return null; }; - a.escapeNativeName = v; - var ca; + a.escapeNativeName = r; + var ea; (function(b) { function a(b) { - for (var d = {prototype:Object.create(null)}, g = Object.getOwnPropertyNames(b.prototype), f = 0;f < g.length;f++) { - d.prototype[g[f]] = b.prototype[g[f]]; + for (var e = {prototype:Object.create(null)}, f = Object.getOwnPropertyNames(b.prototype), c = 0;c < f.length;c++) { + e.prototype[f[c]] = b.prototype[f[c]]; } - return d; + return e; } b.String = jsGlobal.String; b.Function = jsGlobal.Function; b.Boolean = jsGlobal.Boolean; b.Number = jsGlobal.Number; b.Date = jsGlobal.Date; - b.ASObject = c.AVM2.AS.ASObject; - b.ASFunction = c.AVM2.AS.ASFunction; + b.ASObject = d.AVM2.AS.ASObject; + b.ASFunction = d.AVM2.AS.ASFunction; b.Original = {Date:a(b.Date), Array:a(Array), String:a(b.String), Number:a(b.Number), Boolean:a(b.Boolean)}; - b.print = function(b, a, d, g, f) { + b.print = function(b, a, e, f, c) { jsGlobal.print.apply(null, arguments); }; b.debugBreak = function(b) { @@ -11526,7 +11820,7 @@ Shumway.AVM2.XRegExp.install(); b.escape = jsGlobal.escape; b.unescape = jsGlobal.unescape; b.isXMLName; - b.notImplemented = c.Debug.notImplemented; + b.notImplemented = d.Debug.notImplemented; b.getQualifiedClassName = function(b) { if (null === b) { return "null"; @@ -11537,205 +11831,200 @@ Shumway.AVM2.XRegExp.install(); if (E.isType(b)) { return "int"; } - b = z(b); - return y.isType(b) ? b.getQualifiedClassName() : b.class.getQualifiedClassName(); + b = q(b); + return K.isType(b) ? b.getQualifiedClassName() : b.class.getQualifiedClassName(); }; b.getQualifiedSuperclassName = function(b) { - if (n(b)) { + if (p(b)) { return "null"; } - b = z(b); - b = y.isType(b) ? b : b.class; + b = q(b); + b = K.isType(b) ? b : b.class; return b.baseClass ? b.baseClass.getQualifiedClassName() : "null"; }; b.getDefinitionByName = function(a) { a = b.String(a).replace("::", "."); - return c.AVM2.Runtime.AVM2.currentDomain().getClass(a, !1) || null; + return d.AVM2.Runtime.AVM2.currentDomain().getClass(a, !1) || null; }; b.describeType = function(b, a) { - return c.AVM2.AS.describeType(b, a); + return d.AVM2.AS.describeType(b, a); }; b.describeTypeJSON = function(b, a) { - return c.AVM2.AS.describeTypeJSON(b, a); + return d.AVM2.AS.describeTypeJSON(b, a); }; - })(ca = a.Natives || (a.Natives = {})); - a.getNative = p; - s("unsafeJSNative", p); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(ea = a.Natives || (a.Natives = {})); + a.getNative = v; + ca.unsafeJSNative = v; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.assert, v = c.Debug.assertNotImplemented, p = c.AVM2.Runtime.asCoerceString, u = c.ObjectUtilities.defineNonEnumerableProperty, l = c.AVM2.Runtime.throwError, e = c.AVM2.Runtime.asCheckVectorGetNumericProperty, m = c.AVM2.Runtime.asCheckVectorSetNumericProperty, t = function(q) { - function n(k, f, d) { - void 0 === k && (k = 0); - void 0 === f && (f = !1); - void 0 === d && (d = a.ASObject); - k >>>= 0; - this._fixed = !!f; - this._buffer = Array(k); - this._defaultValue = (this._type = d) ? d.defaultValue : null; - this._fill(k, this._defaultValue); + var r = d.AVM2.Runtime.asCoerceString, v = d.ObjectUtilities.defineNonEnumerableProperty, u = d.AVM2.Runtime.throwError, t = d.AVM2.Runtime.asCheckVectorGetNumericProperty, l = d.AVM2.Runtime.asCheckVectorSetNumericProperty, c = function(c) { + function p(c, p, g) { + void 0 === c && (c = 0); + void 0 === p && (p = !1); + void 0 === g && (g = a.ASObject); + c >>>= 0; + this._fixed = !!p; + this._buffer = Array(c); + this._defaultValue = (this._type = g) ? g.defaultValue : null; + this._fill(c, this._defaultValue); } - __extends(n, q); - n.prototype.newThisType = function() { - return new n; + __extends(p, c); + p.prototype.newThisType = function() { + return new p; }; - n.defaultCompareFunction = function(a, f) { - return String(a).localeCompare(String(f)); + p.defaultCompareFunction = function(a, c) { + return String(a).localeCompare(String(c)); }; - n.compare = function(a, f, d, b) { - v(!(d & n.CASEINSENSITIVE), "CASEINSENSITIVE"); - v(!(d & n.UNIQUESORT), "UNIQUESORT"); - v(!(d & n.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY"); - var g = 0; - b || (b = n.defaultCompareFunction); - d & n.NUMERIC ? (a = c.toNumber(a), f = c.toNumber(f), g = a < f ? -1 : a > f ? 1 : 0) : g = b(a, f); - d & n.DESCENDING && (g *= -1); - return g; + p.compare = function(a, c, g, f) { + var b = 0; + f || (f = p.defaultCompareFunction); + g & p.NUMERIC ? (a = d.toNumber(a), c = d.toNumber(c), b = a < c ? -1 : a > c ? 1 : 0) : b = f(a, c); + g & p.DESCENDING && (b *= -1); + return b; }; - n.applyType = function(k) { - function f(a, b) { - Function.prototype.call.call(n.instanceConstructor, this, a, b, k); + p.applyType = function(c) { + function h(a, f) { + Function.prototype.call.call(p.instanceConstructor, this, a, f, c); } - f.prototype = n.prototype; - f.instanceConstructor = f; - f.callableConstructor = function(d) { - if (d instanceof a.Int32Vector) { - return d; + h.prototype = p.prototype; + h.instanceConstructor = h; + h.callableConstructor = function(c) { + if (c instanceof a.Int32Vector) { + return c; } - var b = d.asGetProperty(void 0, "length"); - if (void 0 !== b) { - for (var g = new f(b, !1), k = 0;k < b;k++) { - g.asSetNumericProperty(k, d.asGetPublicProperty(k)); + var f = c.asGetProperty(void 0, "length"); + if (void 0 !== f) { + for (var b = new h(f, !1), e = 0;e < f;e++) { + b.asSetNumericProperty(e, c.asGetPublicProperty(e)); } - return g; + return b; } - c.Debug.unexpected(); + d.Debug.unexpected(); }; - f.__proto__ = n; - return f; + h.__proto__ = p; + return h; }; - n.prototype._fill = function(a, f) { - for (var d = 0;d < a;d++) { - this._buffer[0 + d] = f; + p.prototype._fill = function(a, c) { + for (var g = 0;g < a;g++) { + this._buffer[0 + g] = c; } }; - n.prototype.toString = function() { - for (var a = "", f = 0;f < this._buffer.length;f++) { - a += this._buffer[f], f < this._buffer.length - 1 && (a += ","); + p.prototype.toString = function() { + for (var a = "", c = 0;c < this._buffer.length;c++) { + a += this._buffer[c], c < this._buffer.length - 1 && (a += ","); } return a; }; - n.prototype.toLocaleString = function() { - for (var a = "", f = 0;f < this._buffer.length;f++) { - a += this._buffer[f].asCallPublicProperty("toLocaleString"), f < this._buffer.length - 1 && (a += ","); + p.prototype.toLocaleString = function() { + for (var a = "", c = 0;c < this._buffer.length;c++) { + a += this._buffer[c].asCallPublicProperty("toLocaleString"), c < this._buffer.length - 1 && (a += ","); } return a; }; - n.prototype.sort = function(k) { + p.prototype.sort = function(a) { if (0 === arguments.length) { return this._buffer.sort(); } - if (k instanceof Function) { - return this._buffer.sort(k); + if (a instanceof Function) { + return this._buffer.sort(a); } - var f = k | 0; - v(!(f & a.Int32Vector.UNIQUESORT), "UNIQUESORT"); - v(!(f & a.Int32Vector.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY"); - return f && n.NUMERIC ? f & n.DESCENDING ? this._buffer.sort(function(a, b) { - return asCoerceNumber(b) - asCoerceNumber(a); - }) : this._buffer.sort(function(a, b) { - return asCoerceNumber(a) - asCoerceNumber(b); - }) : f && n.CASEINSENSITIVE ? f & n.DESCENDING ? this._buffer.sort(function(a, b) { - return p(b).toLowerCase() - p(a).toLowerCase(); - }) : this._buffer.sort(function(a, b) { - return p(a).toLowerCase() - p(b).toLowerCase(); - }) : f & n.DESCENDING ? this._buffer.sort(function(a, b) { - return b - a; + var c = a | 0; + return c && p.NUMERIC ? c & p.DESCENDING ? this._buffer.sort(function(a, f) { + return asCoerceNumber(f) - asCoerceNumber(a); + }) : this._buffer.sort(function(a, f) { + return asCoerceNumber(a) - asCoerceNumber(f); + }) : c && p.CASEINSENSITIVE ? c & p.DESCENDING ? this._buffer.sort(function(a, f) { + return r(f).toLowerCase() - r(a).toLowerCase(); + }) : this._buffer.sort(function(a, f) { + return r(a).toLowerCase() - r(f).toLowerCase(); + }) : c & p.DESCENDING ? this._buffer.sort(function(a, f) { + return f - a; }) : this._buffer.sort(); }; - n.prototype.every = function(a, f) { - for (var d = 0;d < this._buffer.length;d++) { - if (!a.call(f, this.asGetNumericProperty(d), d, this)) { + p.prototype.every = function(a, c) { + for (var g = 0;g < this._buffer.length;g++) { + if (!a.call(c, this.asGetNumericProperty(g), g, this)) { return!1; } } return!0; }; - n.prototype.filter = function(a, f) { - for (var d = new n(0, !1, this._type), b = 0;b < this._buffer.length;b++) { - a.call(f, this.asGetNumericProperty(b), b, this) && d.push(this.asGetNumericProperty(b)); + p.prototype.filter = function(a, c) { + for (var g = new p(0, !1, this._type), f = 0;f < this._buffer.length;f++) { + a.call(c, this.asGetNumericProperty(f), f, this) && g.push(this.asGetNumericProperty(f)); } - return d; + return g; }; - n.prototype.some = function(a, f) { - 2 !== arguments.length ? l("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError); - for (var d = 0;d < this._buffer.length;d++) { - if (a.call(f, this.asGetNumericProperty(d), d, this)) { + p.prototype.some = function(a, c) { + 2 !== arguments.length ? u("ArgumentError", k.Errors.WrongArgumentCountError) : d.isFunction(a) || u("ArgumentError", k.Errors.CheckTypeFailedError); + for (var g = 0;g < this._buffer.length;g++) { + if (a.call(c, this.asGetNumericProperty(g), g, this)) { return!0; } } return!1; }; - n.prototype.forEach = function(a, f) { - c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError); - for (var d = 0;d < this._buffer.length;d++) { - a.call(f, this.asGetNumericProperty(d), d, this); + p.prototype.forEach = function(a, c) { + d.isFunction(a) || u("ArgumentError", k.Errors.CheckTypeFailedError); + for (var g = 0;g < this._buffer.length;g++) { + a.call(c, this.asGetNumericProperty(g), g, this); } }; - n.prototype.join = function(a) { + p.prototype.join = function(a) { void 0 === a && (a = ","); - for (var f = this._buffer, d = this._buffer.length, b = "", g = 0;g < d - 1;g++) { - b += f[g] + a; + for (var c = this._buffer, g = this._buffer.length, f = "", b = 0;b < g - 1;b++) { + f += c[b] + a; } - 0 < d && (b += f[d - 1]); - return b; + 0 < g && (f += c[g - 1]); + return f; }; - n.prototype.indexOf = function(a, f) { - void 0 === f && (f = 0); - return this._buffer.indexOf(a, f); + p.prototype.indexOf = function(a, c) { + void 0 === c && (c = 0); + return this._buffer.indexOf(a, c); }; - n.prototype.lastIndexOf = function(a, f) { - void 0 === f && (f = 2147483647); - return this._buffer.lastIndexOf(a, f); + p.prototype.lastIndexOf = function(a, c) { + void 0 === c && (c = 2147483647); + return this._buffer.lastIndexOf(a, c); }; - n.prototype.map = function(a, f) { - c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError); - for (var d = new n(0, !1, this._type), b = 0;b < this._buffer.length;b++) { - d.push(a.call(f, this.asGetNumericProperty(b), b, this)); + p.prototype.map = function(a, c) { + d.isFunction(a) || u("ArgumentError", k.Errors.CheckTypeFailedError); + for (var g = new p(0, !1, this._type), f = 0;f < this._buffer.length;f++) { + g.push(a.call(c, this.asGetNumericProperty(f), f, this)); } - return d; + return g; }; - n.prototype.push = function(a, f, d, b, g, e, c, m) { + p.prototype.push = function(a, c, g, f, b, e, q, n) { this._checkFixed(); - for (var q = 0;q < arguments.length;q++) { - this._buffer.push(this._coerce(arguments[q])); + for (var p = 0;p < arguments.length;p++) { + this._buffer.push(this._coerce(arguments[p])); } }; - n.prototype.pop = function() { + p.prototype.pop = function() { this._checkFixed(); return 0 === this._buffer.length ? void 0 : this._buffer.pop(); }; - n.prototype.concat = function() { - for (var a = [], f = 0;f < arguments.length;f++) { - a.push(this._coerce(arguments[f])._buffer); + p.prototype.concat = function() { + for (var a = [], c = 0;c < arguments.length;c++) { + a.push(this._coerce(arguments[c])._buffer); } return this._buffer.concat.apply(this._buffer, a); }; - n.prototype.reverse = function() { + p.prototype.reverse = function() { this._buffer.reverse(); return this; }; - n.prototype._coerce = function(a) { + p.prototype._coerce = function(a) { return this._type ? this._type.coerce(a) : void 0 === a ? null : a; }; - n.prototype.shift = function() { + p.prototype.shift = function() { this._checkFixed(); return 0 === this._buffer.length ? void 0 : this._buffer.shift(); }; - n.prototype.unshift = function() { + p.prototype.unshift = function() { if (arguments.length) { this._checkFixed(); for (var a = 0;a < arguments.length;a++) { @@ -11743,398 +12032,81 @@ Shumway.AVM2.XRegExp.install(); } } }; - n.prototype.slice = function(a, f) { + p.prototype.slice = function(a, c) { void 0 === a && (a = 0); - void 0 === f && (f = 2147483647); - var d = this._buffer, b = d.length, g = Math.min(Math.max(a, 0), b), b = Math.min(Math.max(f, g), b), e = new n(b - g, this.fixed, this._type); - e._buffer = d.slice(g, b); + void 0 === c && (c = 2147483647); + var g = this._buffer, f = g.length, b = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, b), f), e = new p(f - b, this.fixed, this._type); + e._buffer = g.slice(b, f); return e; }; - n.prototype.splice = function(a, f) { - var d = this._buffer, b = d.length, g = Math.min(Math.max(a, 0), b), b = Math.min(Math.max(f, 0), b - g), e = arguments.length - 2; - b !== e && this._checkFixed(); - for (var g = [g, b], c = 2;c < e + 2;c++) { - g[c] = this._coerce(arguments[c]); + p.prototype.splice = function(a, c) { + var g = this._buffer, f = g.length, b = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, 0), f - b), e = arguments.length - 2; + f !== e && this._checkFixed(); + for (var b = [b, f], q = 2;q < e + 2;q++) { + b[q] = this._coerce(arguments[q]); } - b = new n(b, this.fixed, this._type); - b._buffer = d.splice.apply(d, g); - return b; + f = new p(f, this.fixed, this._type); + f._buffer = g.splice.apply(g, b); + return f; }; - Object.defineProperty(n.prototype, "length", {get:function() { + Object.defineProperty(p.prototype, "length", {get:function() { return this._buffer.length; }, set:function(a) { a >>>= 0; if (a > this._buffer.length) { - for (var f = this._buffer.length;f < a;f++) { - this._buffer[f] = this._defaultValue; + for (var c = this._buffer.length;c < a;c++) { + this._buffer[c] = this._defaultValue; } } else { this._buffer.length = a; } - s(this._buffer.length === a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "fixed", {get:function() { + Object.defineProperty(p.prototype, "fixed", {get:function() { return this._fixed; }, set:function(a) { this._fixed = !!a; }, enumerable:!0, configurable:!0}); - n.prototype._checkFixed = function() { - this._fixed && l("RangeError", h.Errors.VectorFixedError); + p.prototype._checkFixed = function() { + this._fixed && u("RangeError", k.Errors.VectorFixedError); }; - n.prototype.asNextName = function(a) { + p.prototype.asNextName = function(a) { return a - 1; }; - n.prototype.asNextValue = function(a) { + p.prototype.asNextValue = function(a) { return this._buffer[a - 1]; }; - n.prototype.asNextNameIndex = function(a) { + p.prototype.asNextNameIndex = function(a) { a += 1; return a <= this._buffer.length ? a : 0; }; - n.prototype.asHasProperty = function(a, f, d) { - if (n.prototype === this || !c.isNumeric(f)) { - return Object.prototype.asHasProperty.call(this, a, f, d); + p.prototype.asHasProperty = function(a, c, g) { + if (p.prototype === this || !d.isNumeric(c)) { + return Object.prototype.asHasProperty.call(this, a, c, g); } - a = c.toNumber(f); + a = d.toNumber(c); return 0 <= a && a < this._buffer.length; }; - n.prototype.asGetNumericProperty = function(a) { - e(a, this._buffer.length); + p.prototype.asGetNumericProperty = function(a) { + t(a, this._buffer.length); return this._buffer[a]; }; - n.prototype.asSetNumericProperty = function(a, f) { - m(a, this._buffer.length, this._fixed); - this._buffer[a] = this._coerce(f); + p.prototype.asSetNumericProperty = function(a, c) { + l(a, this._buffer.length, this._fixed); + this._buffer[a] = this._coerce(c); }; - n.prototype.asHasNext2 = function(a) { + p.prototype.asHasNext2 = function(a) { a.index = this.asNextNameIndex(a.index); }; - n.CASEINSENSITIVE = 1; - n.DESCENDING = 2; - n.UNIQUESORT = 4; - n.RETURNINDEXEDARRAY = 8; - n.NUMERIC = 16; - n.instanceConstructor = n; - n.staticNatives = [n]; - n.instanceNatives = [n.prototype]; - n.classInitializer = function() { - var a = n.prototype; - u(a, "$Bgjoin", a.join); - u(a, "$BgtoString", a.join); - u(a, "$BgtoLocaleString", a.toLocaleString); - u(a, "$Bgpop", a.pop); - u(a, "$Bgpush", a.push); - u(a, "$Bgreverse", a.reverse); - u(a, "$Bgconcat", a.concat); - u(a, "$Bgsplice", a.splice); - u(a, "$Bgslice", a.slice); - u(a, "$Bgshift", a.shift); - u(a, "$Bgunshift", a.unshift); - u(a, "$BgindexOf", a.indexOf); - u(a, "$BglastIndexOf", a.lastIndexOf); - u(a, "$BgforEach", a.forEach); - u(a, "$Bgmap", a.map); - u(a, "$Bgfilter", a.filter); - u(a, "$Bgsome", a.some); - u(a, "$Bgevery", a.every); - u(a, "$Bgsort", a.sort); - }; - return n; - }(a.ASVector); - a.GenericVector = t; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) { - function e(a, c) { - void 0 === a && (a = 0); - void 0 === c && (c = !1); - a >>>= 0; - this._fixed = !!c; - this._buffer = new Int32Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY)); - this._offset = 0; - this._length = a; - } - __extends(e, a); - e.prototype.newThisType = function() { - return new e; - }; - e.callable = function(a) { - if (a instanceof e) { - return a; - } - var m = a.asGetProperty(void 0, "length"); - if (void 0 !== m) { - for (var k = new e(m, !1), f = 0;f < m;f++) { - k.asSetNumericProperty(f, a.asGetPublicProperty(f)); - } - return k; - } - c.Debug.unexpected(); - }; - e.prototype.internalToString = function() { - for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) { - f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ","); - } - this._offset + this._length === this._buffer.length && (a += "]"); - return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length; - }; - e.prototype.toString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); - } - return a; - }; - e.prototype.toLocaleString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); - } - return a; - }; - e.prototype._view = function() { - return this._buffer.subarray(this._offset, this._offset + this._length); - }; - e.prototype._ensureCapacity = function(a) { - var e = this._offset + a; - e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Int32Array(a), e.set(this._buffer, 0), this._buffer = e)); - }; - e.prototype.concat = function() { - for (var a = this._length, c = 0;c < arguments.length;c++) { - var k = arguments[c]; - k._buffer instanceof Int32Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector."); - a += k._length; - } - var a = new e(a), f = a._buffer; - f.set(this._buffer); - for (var d = this._length, c = 0;c < arguments.length;c++) { - k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length; - } - return a; - }; - e.prototype.every = function(a, e) { - for (var k = 0;k < this._length;k++) { - if (!a.call(e, this._buffer[this._offset + k], k, this)) { - return!1; - } - } - return!0; - }; - e.prototype.filter = function(a, c) { - for (var k = new e, f = 0;f < this._length;f++) { - a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]); - } - return k; - }; - e.prototype.some = function(a, e) { - 2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = 0;k < this._length;k++) { - if (a.call(e, this._buffer[this._offset + k], k, this)) { - return!0; - } - } - return!1; - }; - e.prototype.forEach = function(a, e) { - for (var k = 0;k < this._length;k++) { - a.call(e, this._buffer[this._offset + k], k, this); - } - }; - e.prototype.join = function(a) { - void 0 === a && (a = ","); - for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) { - d += k[f + b] + a; - } - 0 < e && (d += k[f + e - 1]); - return d; - }; - e.prototype.indexOf = function(a, e) { - void 0 === e && (e = 0); - var k = this._length, f = e | 0; - if (0 > f) { - f += k, 0 > f && (f = 0); - } else { - if (f >= k) { - return-1; - } - } - for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) { - if (d[f] === a) { - return f - b; - } - } - return-1; - }; - e.prototype.lastIndexOf = function(a, e) { - void 0 === e && (e = 2147483647); - var k = this._length, f = e | 0; - if (0 > f) { - if (f += k, 0 > f) { - return-1; - } - } else { - f >= k && (f = k); - } - for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) { - if (k[f] === a) { - return f - d; - } - } - return-1; - }; - e.prototype.map = function(a, m) { - c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = new e, f = 0;f < this._length;f++) { - k.push(a.call(m, this._buffer[this._offset + f], f, this)); - } - return k; - }; - e.prototype.push = function(a, e, k, f, d, b, g, r) { - this._checkFixed(); - this._ensureCapacity(this._length + arguments.length); - for (var c = 0;c < arguments.length;c++) { - this._buffer[this._offset + this._length++] = arguments[c]; - } - }; - e.prototype.pop = function() { - this._checkFixed(); - if (0 === this._length) { - return e.DEFAULT_VALUE; - } - this._length--; - return this._buffer[this._offset + this._length]; - }; - e.prototype.reverse = function() { - for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) { - var f = k[a]; - k[a] = k[e]; - k[e] = f; - a++; - e--; - } - return this; - }; - e.prototype.sort = function(a) { - if (0 === arguments.length) { - return Array.prototype.sort.call(this._view()); - } - if (a instanceof Function) { - return Array.prototype.sort.call(this._view(), a); - } - var c = a | 0; - s(!(c & e.UNIQUESORT), "UNIQUESORT"); - s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY"); - return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, f) { - return f - a; - }) : Array.prototype.sort.call(this._view(), function(a, f) { - return a - f; - }); - }; - e.prototype.shift = function() { - this._checkFixed(); - if (0 === this._length) { - return 0; - } - this._length--; - return this._buffer[this._offset++]; - }; - e.prototype.unshift = function() { - this._checkFixed(); - if (arguments.length) { - this._ensureCapacity(this._length + arguments.length); - this._slide(arguments.length); - this._offset -= arguments.length; - this._length += arguments.length; - for (var a = 0;a < arguments.length;a++) { - this._buffer[this._offset + a] = arguments[a]; - } - } - }; - e.prototype.slice = function(a, c) { - void 0 === a && (a = 0); - void 0 === c && (c = 2147483647); - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed); - b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset); - return b; - }; - e.prototype.splice = function(a, c) { - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed); - 0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset)); - this._ensureCapacity(f - g + d); - k.set(k.subarray(b + g, f), b + d); - this._length += d - g; - for (f = 0;f < d;f++) { - k[b + f] = arguments[f + 2]; - } - return m; - }; - e.prototype._slide = function(a) { - this._buffer.set(this._view(), this._offset + a); - this._offset += a; - }; - Object.defineProperty(e.prototype, "length", {get:function() { - return this._length; - }, set:function(a) { - a >>>= 0; - if (a > this._length) { - this._ensureCapacity(a); - for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) { - this._buffer[c] = e.DEFAULT_VALUE; - } - } - this._length = a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "fixed", {get:function() { - return this._fixed; - }, set:function(a) { - this._fixed = !!a; - }, enumerable:!0, configurable:!0}); - e.prototype._checkFixed = function() { - this._fixed && p("RangeError", h.Errors.VectorFixedError); - }; - e.prototype.asGetNumericProperty = function(a) { - u(a, this._length); - return this._buffer[this._offset + a]; - }; - e.prototype.asSetNumericProperty = function(a, e) { - l(a, this._length, this._fixed); - a === this._length && (this._ensureCapacity(this._length + 1), this._length++); - this._buffer[this._offset + a] = e; - }; - e.prototype.asHasProperty = function(a, m, k) { - if (e.prototype === this || !c.isNumeric(m)) { - return Object.prototype.asHasProperty.call(this, a, m, k); - } - a = c.toNumber(m); - return 0 <= a && a < this._length; - }; - e.prototype.asNextName = function(a) { - return a - 1; - }; - e.prototype.asNextValue = function(a) { - return this._buffer[this._offset + a - 1]; - }; - e.prototype.asNextNameIndex = function(a) { - a += 1; - return a <= this._length ? a : 0; - }; - e.prototype.asHasNext2 = function(a) { - a.index = this.asNextNameIndex(a.index); - }; - e.EXTRA_CAPACITY = 4; - e.INITIAL_CAPACITY = 10; - e.DEFAULT_VALUE = 0; - e.DESCENDING = 2; - e.UNIQUESORT = 4; - e.RETURNINDEXEDARRAY = 8; - e.instanceConstructor = e; - e.staticNatives = [e]; - e.instanceNatives = [e.prototype]; - e.callableConstructor = e.callable; - e.classInitializer = function() { - var a = e.prototype; + p.CASEINSENSITIVE = 1; + p.DESCENDING = 2; + p.UNIQUESORT = 4; + p.RETURNINDEXEDARRAY = 8; + p.NUMERIC = 16; + p.instanceConstructor = p; + p.staticNatives = [p]; + p.instanceNatives = [p.prototype]; + p.classInitializer = function() { + var a = p.prototype; v(a, "$Bgjoin", a.join); v(a, "$BgtoString", a.join); v(a, "$BgtoLocaleString", a.toLocaleString); @@ -12155,200 +12127,191 @@ Shumway.AVM2.XRegExp.install(); v(a, "$Bgevery", a.every); v(a, "$Bgsort", a.sort); }; - return e; + return p; }(a.ASVector); - a.Int32Vector = e; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.GenericVector = c; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) { - function e(a, c) { + var r = d.ObjectUtilities.defineNonEnumerableProperty, v = d.AVM2.Runtime.throwError, u = d.AVM2.Runtime.asCheckVectorGetNumericProperty, t = d.AVM2.Runtime.asCheckVectorSetNumericProperty, l = function(a) { + function h(a, c) { void 0 === a && (a = 0); void 0 === c && (c = !1); a >>>= 0; this._fixed = !!c; - this._buffer = new Uint32Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY)); + this._buffer = new Int32Array(Math.max(h.INITIAL_CAPACITY, a + h.EXTRA_CAPACITY)); this._offset = 0; this._length = a; } - __extends(e, a); - e.prototype.newThisType = function() { - return new e; + __extends(h, a); + h.prototype.newThisType = function() { + return new h; }; - e.callable = function(a) { - if (a instanceof e) { + h.callable = function(a) { + if (a instanceof h) { return a; } - var m = a.asGetProperty(void 0, "length"); - if (void 0 !== m) { - for (var k = new e(m, !1), f = 0;f < m;f++) { - k.asSetNumericProperty(f, a.asGetPublicProperty(f)); + var c = a.asGetProperty(void 0, "length"); + if (void 0 !== c) { + for (var m = new h(c, !1), g = 0;g < c;g++) { + m.asSetNumericProperty(g, a.asGetPublicProperty(g)); } - return k; + return m; } - c.Debug.unexpected(); + d.Debug.unexpected(); }; - e.prototype.internalToString = function() { - for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) { - f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ","); + h.prototype.internalToString = function() { + for (var a = "", c = this._offset, h = c + this._length, g = 0;g < this._buffer.length;g++) { + g === c && (a += "["), g === h && (a += "]"), a += this._buffer[g], g < this._buffer.length - 1 && (a += ","); } this._offset + this._length === this._buffer.length && (a += "]"); return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length; }; - e.prototype.toString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); + h.prototype.toString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); } return a; }; - e.prototype.toLocaleString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); + h.prototype.toLocaleString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); } return a; }; - e.prototype._view = function() { + h.prototype._view = function() { return this._buffer.subarray(this._offset, this._offset + this._length); }; - e.prototype._ensureCapacity = function(a) { - var e = this._offset + a; - e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Uint32Array(a), e.set(this._buffer, 0), this._buffer = e)); + h.prototype._ensureCapacity = function(a) { + var c = this._offset + a; + c < this._buffer.length || (a <= this._buffer.length ? (c = this._buffer.length - a >> 2, this._buffer.set(this._view(), c), this._offset = c) : (a = (3 * this._buffer.length >> 1) + 1, a < c && (a = c), c = new Int32Array(a), c.set(this._buffer, 0), this._buffer = c)); }; - e.prototype.concat = function() { + h.prototype.concat = function() { for (var a = this._length, c = 0;c < arguments.length;c++) { - var k = arguments[c]; - k._buffer instanceof Uint32Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector."); - a += k._length; + var m = arguments[c]; + m._buffer instanceof Int32Array || v("TypeError", k.Errors.CheckTypeFailedError, m.constructor.name, "__AS3__.vec.Vector."); + a += m._length; } - var a = new e(a), f = a._buffer; - f.set(this._buffer); - for (var d = this._length, c = 0;c < arguments.length;c++) { - k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length; + var a = new h(a), g = a._buffer; + g.set(this._buffer); + for (var f = this._length, c = 0;c < arguments.length;c++) { + m = arguments[c], f + m._buffer.length < m._buffer.length ? g.set(m._buffer, f) : g.set(m._buffer.subarray(0, m._length), f), f += m._length; } return a; }; - e.prototype.every = function(a, e) { - for (var k = 0;k < this._length;k++) { - if (!a.call(e, this._buffer[this._offset + k], k, this)) { + h.prototype.every = function(a, c) { + for (var h = 0;h < this._length;h++) { + if (!a.call(c, this._buffer[this._offset + h], h, this)) { return!1; } } return!0; }; - e.prototype.filter = function(a, c) { - for (var k = new e, f = 0;f < this._length;f++) { - a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]); + h.prototype.filter = function(a, c) { + for (var m = new h, g = 0;g < this._length;g++) { + a.call(c, this._buffer[this._offset + g], g, this) && m.push(this._buffer[this._offset + g]); } - return k; + return m; }; - e.prototype.some = function(a, e) { - 2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = 0;k < this._length;k++) { - if (a.call(e, this._buffer[this._offset + k], k, this)) { + h.prototype.some = function(a, c) { + 2 !== arguments.length ? v("ArgumentError", k.Errors.WrongArgumentCountError) : d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var h = 0;h < this._length;h++) { + if (a.call(c, this._buffer[this._offset + h], h, this)) { return!0; } } return!1; }; - e.prototype.forEach = function(a, e) { - for (var k = 0;k < this._length;k++) { - a.call(e, this._buffer[this._offset + k], k, this); + h.prototype.forEach = function(a, c) { + for (var h = 0;h < this._length;h++) { + a.call(c, this._buffer[this._offset + h], h, this); } }; - e.prototype.join = function(a) { + h.prototype.join = function(a) { void 0 === a && (a = ","); - for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) { - d += k[f + b] + a; + for (var c = this.length, h = this._buffer, g = this._offset, f = "", b = 0;b < c - 1;b++) { + f += h[g + b] + a; } - 0 < e && (d += k[f + e - 1]); - return d; + 0 < c && (f += h[g + c - 1]); + return f; }; - e.prototype.indexOf = function(a, e) { - void 0 === e && (e = 0); - var k = this._length, f = e | 0; - if (0 > f) { - f += k, 0 > f && (f = 0); + h.prototype.indexOf = function(a, c) { + void 0 === c && (c = 0); + var h = this._length, g = c | 0; + if (0 > g) { + g += h, 0 > g && (g = 0); } else { - if (f >= k) { + if (g >= h) { return-1; } } - for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) { - if (d[f] === a) { - return f - b; + for (var f = this._buffer, h = this._length, b = this._offset, h = b + h, g = g + b;g < h;g++) { + if (f[g] === a) { + return g - b; } } return-1; }; - e.prototype.lastIndexOf = function(a, e) { - void 0 === e && (e = 2147483647); - var k = this._length, f = e | 0; - if (0 > f) { - if (f += k, 0 > f) { + h.prototype.lastIndexOf = function(a, c) { + void 0 === c && (c = 2147483647); + var h = this._length, g = c | 0; + if (0 > g) { + if (g += h, 0 > g) { return-1; } } else { - f >= k && (f = k); + g >= h && (g = h); } - for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) { - if (k[f] === a) { - return f - d; + for (var h = this._buffer, f = this._offset, g = g + f;g-- > f;) { + if (h[g] === a) { + return g - f; } } return-1; }; - e.prototype.map = function(a, m) { - c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = new e, f = 0;f < this._length;f++) { - k.push(a.call(m, this._buffer[this._offset + f], f, this)); + h.prototype.map = function(a, c) { + d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var m = new h, g = 0;g < this._length;g++) { + m.push(a.call(c, this._buffer[this._offset + g], g, this)); } - return k; + return m; }; - e.prototype.push = function(a, e, k, f, d, b, g, r) { + h.prototype.push = function(a, c, h, g, f, b, e, q) { this._checkFixed(); this._ensureCapacity(this._length + arguments.length); - for (var c = 0;c < arguments.length;c++) { - this._buffer[this._offset + this._length++] = arguments[c]; + for (var n = 0;n < arguments.length;n++) { + this._buffer[this._offset + this._length++] = arguments[n]; } }; - e.prototype.pop = function() { + h.prototype.pop = function() { this._checkFixed(); if (0 === this._length) { - return e.DEFAULT_VALUE; + return h.DEFAULT_VALUE; } this._length--; return this._buffer[this._offset + this._length]; }; - e.prototype.reverse = function() { - for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) { - var f = k[a]; - k[a] = k[e]; - k[e] = f; + h.prototype.reverse = function() { + for (var a = this._offset, c = this._offset + this._length - 1, h = this._buffer;a < c;) { + var g = h[a]; + h[a] = h[c]; + h[c] = g; a++; - e--; + c--; } return this; }; - e.prototype.sort = function(a) { - if (0 === arguments.length) { - return Array.prototype.sort.call(this._view()); - } - if (a instanceof Function) { - return Array.prototype.sort.call(this._view(), a); - } - var c = a | 0; - s(!(c & e.UNIQUESORT), "UNIQUESORT"); - s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY"); - return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, f) { - return f - a; - }) : Array.prototype.sort.call(this._view(), function(a, f) { - return a - f; + h.prototype.sort = function(a) { + return 0 === arguments.length ? Array.prototype.sort.call(this._view()) : a instanceof Function ? Array.prototype.sort.call(this._view(), a) : (a | 0) & h.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, c) { + return c - a; + }) : Array.prototype.sort.call(this._view(), function(a, c) { + return a - c; }); }; - e.prototype.shift = function() { + h.prototype.shift = function() { this._checkFixed(); if (0 === this._length) { return 0; @@ -12356,7 +12319,7 @@ Shumway.AVM2.XRegExp.install(); this._length--; return this._buffer[this._offset++]; }; - e.prototype.unshift = function() { + h.prototype.unshift = function() { this._checkFixed(); if (arguments.length) { this._ensureCapacity(this._length + arguments.length); @@ -12368,303 +12331,294 @@ Shumway.AVM2.XRegExp.install(); } } }; - e.prototype.slice = function(a, c) { + h.prototype.slice = function(a, c) { void 0 === a && (a = 0); void 0 === c && (c = 2147483647); - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed); - b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset); + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), g = Math.min(Math.max(c, f), g), b = new h(g - f, this.fixed); + b._buffer.set(m.subarray(this._offset + f, this._offset + g), b._offset); return b; }; - e.prototype.splice = function(a, c) { - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed); - 0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset)); - this._ensureCapacity(f - g + d); - k.set(k.subarray(b + g, f), b + d); - this._length += d - g; - for (f = 0;f < d;f++) { - k[b + f] = arguments[f + 2]; + h.prototype.splice = function(a, c) { + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), b = this._offset + f, e = Math.min(Math.max(c, 0), g - f), f = arguments.length - 2, q, n = new h(e, this.fixed); + 0 < e && (q = m.subarray(b, b + e), n._buffer.set(q, n._offset)); + this._ensureCapacity(g - e + f); + m.set(m.subarray(b + e, g), b + f); + this._length += f - e; + for (g = 0;g < f;g++) { + m[b + g] = arguments[g + 2]; } - return m; + return n; }; - e.prototype._slide = function(a) { + h.prototype._slide = function(a) { this._buffer.set(this._view(), this._offset + a); this._offset += a; }; - Object.defineProperty(e.prototype, "length", {get:function() { + Object.defineProperty(h.prototype, "length", {get:function() { return this._length; }, set:function(a) { a >>>= 0; if (a > this._length) { this._ensureCapacity(a); - for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) { - this._buffer[c] = e.DEFAULT_VALUE; + for (var c = this._offset + this._length, m = this._offset + a;c < m;c++) { + this._buffer[c] = h.DEFAULT_VALUE; } } this._length = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "fixed", {get:function() { + Object.defineProperty(h.prototype, "fixed", {get:function() { return this._fixed; }, set:function(a) { this._fixed = !!a; }, enumerable:!0, configurable:!0}); - e.prototype._checkFixed = function() { - this._fixed && p("RangeError", h.Errors.VectorFixedError); + h.prototype._checkFixed = function() { + this._fixed && v("RangeError", k.Errors.VectorFixedError); }; - e.prototype.asGetNumericProperty = function(a) { + h.prototype.asGetNumericProperty = function(a) { u(a, this._length); return this._buffer[this._offset + a]; }; - e.prototype.asSetNumericProperty = function(a, e) { - l(a, this._length, this._fixed); + h.prototype.asSetNumericProperty = function(a, c) { + t(a, this._length, this._fixed); a === this._length && (this._ensureCapacity(this._length + 1), this._length++); - this._buffer[this._offset + a] = e; + this._buffer[this._offset + a] = c; }; - e.prototype.asHasProperty = function(a, m, k) { - if (e.prototype === this || !c.isNumeric(m)) { - return Object.prototype.asHasProperty.call(this, a, m, k); + h.prototype.asHasProperty = function(a, c, m) { + if (h.prototype === this || !d.isNumeric(c)) { + return Object.prototype.asHasProperty.call(this, a, c, m); } - a = c.toNumber(m); + a = d.toNumber(c); return 0 <= a && a < this._length; }; - e.prototype.asNextName = function(a) { + h.prototype.asNextName = function(a) { return a - 1; }; - e.prototype.asNextValue = function(a) { + h.prototype.asNextValue = function(a) { return this._buffer[this._offset + a - 1]; }; - e.prototype.asNextNameIndex = function(a) { + h.prototype.asNextNameIndex = function(a) { a += 1; return a <= this._length ? a : 0; }; - e.prototype.asHasNext2 = function(a) { + h.prototype.asHasNext2 = function(a) { a.index = this.asNextNameIndex(a.index); }; - e.EXTRA_CAPACITY = 4; - e.INITIAL_CAPACITY = 10; - e.DEFAULT_VALUE = 0; - e.DESCENDING = 2; - e.UNIQUESORT = 4; - e.RETURNINDEXEDARRAY = 8; - e.instanceConstructor = e; - e.staticNatives = [e]; - e.instanceNatives = [e.prototype]; - e.callableConstructor = e.callable; - e.classInitializer = function() { - var a = e.prototype; - v(a, "$Bgjoin", a.join); - v(a, "$BgtoString", a.join); - v(a, "$BgtoLocaleString", a.toLocaleString); - v(a, "$Bgpop", a.pop); - v(a, "$Bgpush", a.push); - v(a, "$Bgreverse", a.reverse); - v(a, "$Bgconcat", a.concat); - v(a, "$Bgsplice", a.splice); - v(a, "$Bgslice", a.slice); - v(a, "$Bgshift", a.shift); - v(a, "$Bgunshift", a.unshift); - v(a, "$BgindexOf", a.indexOf); - v(a, "$BglastIndexOf", a.lastIndexOf); - v(a, "$BgforEach", a.forEach); - v(a, "$Bgmap", a.map); - v(a, "$Bgfilter", a.filter); - v(a, "$Bgsome", a.some); - v(a, "$Bgevery", a.every); - v(a, "$Bgsort", a.sort); + h.EXTRA_CAPACITY = 4; + h.INITIAL_CAPACITY = 10; + h.DEFAULT_VALUE = 0; + h.DESCENDING = 2; + h.UNIQUESORT = 4; + h.RETURNINDEXEDARRAY = 8; + h.instanceConstructor = h; + h.staticNatives = [h]; + h.instanceNatives = [h.prototype]; + h.callableConstructor = h.callable; + h.classInitializer = function() { + var a = h.prototype; + r(a, "$Bgjoin", a.join); + r(a, "$BgtoString", a.join); + r(a, "$BgtoLocaleString", a.toLocaleString); + r(a, "$Bgpop", a.pop); + r(a, "$Bgpush", a.push); + r(a, "$Bgreverse", a.reverse); + r(a, "$Bgconcat", a.concat); + r(a, "$Bgsplice", a.splice); + r(a, "$Bgslice", a.slice); + r(a, "$Bgshift", a.shift); + r(a, "$Bgunshift", a.unshift); + r(a, "$BgindexOf", a.indexOf); + r(a, "$BglastIndexOf", a.lastIndexOf); + r(a, "$BgforEach", a.forEach); + r(a, "$Bgmap", a.map); + r(a, "$Bgfilter", a.filter); + r(a, "$Bgsome", a.some); + r(a, "$Bgevery", a.every); + r(a, "$Bgsort", a.sort); }; - return e; + return h; }(a.ASVector); - a.Uint32Vector = e; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.Int32Vector = l; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) { - function e(a, c) { + var r = d.ObjectUtilities.defineNonEnumerableProperty, v = d.AVM2.Runtime.throwError, u = d.AVM2.Runtime.asCheckVectorGetNumericProperty, t = d.AVM2.Runtime.asCheckVectorSetNumericProperty, l = function(a) { + function h(a, c) { void 0 === a && (a = 0); void 0 === c && (c = !1); a >>>= 0; this._fixed = !!c; - this._buffer = new Float64Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY)); + this._buffer = new Uint32Array(Math.max(h.INITIAL_CAPACITY, a + h.EXTRA_CAPACITY)); this._offset = 0; this._length = a; } - __extends(e, a); - e.prototype.newThisType = function() { - return new e; + __extends(h, a); + h.prototype.newThisType = function() { + return new h; }; - e.callable = function(a) { - if (a instanceof e) { + h.callable = function(a) { + if (a instanceof h) { return a; } - var m = a.asGetProperty(void 0, "length"); - if (void 0 !== m) { - for (var k = new e(m, !1), f = 0;f < m;f++) { - k.asSetNumericProperty(f, a.asGetPublicProperty(f)); + var c = a.asGetProperty(void 0, "length"); + if (void 0 !== c) { + for (var m = new h(c, !1), g = 0;g < c;g++) { + m.asSetNumericProperty(g, a.asGetPublicProperty(g)); } - return k; + return m; } - c.Debug.unexpected(); + d.Debug.unexpected(); }; - e.prototype.internalToString = function() { - for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) { - f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ","); + h.prototype.internalToString = function() { + for (var a = "", c = this._offset, h = c + this._length, g = 0;g < this._buffer.length;g++) { + g === c && (a += "["), g === h && (a += "]"), a += this._buffer[g], g < this._buffer.length - 1 && (a += ","); } this._offset + this._length === this._buffer.length && (a += "]"); return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length; }; - e.prototype.toString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); + h.prototype.toString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); } return a; }; - e.prototype.toLocaleString = function() { - for (var a = "", e = 0;e < this._length;e++) { - a += this._buffer[this._offset + e], e < this._length - 1 && (a += ","); + h.prototype.toLocaleString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); } return a; }; - e.prototype._view = function() { + h.prototype._view = function() { return this._buffer.subarray(this._offset, this._offset + this._length); }; - e.prototype._ensureCapacity = function(a) { - var e = this._offset + a; - e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Float64Array(a), e.set(this._buffer, 0), this._buffer = e)); + h.prototype._ensureCapacity = function(a) { + var c = this._offset + a; + c < this._buffer.length || (a <= this._buffer.length ? (c = this._buffer.length - a >> 2, this._buffer.set(this._view(), c), this._offset = c) : (a = (3 * this._buffer.length >> 1) + 1, a < c && (a = c), c = new Uint32Array(a), c.set(this._buffer, 0), this._buffer = c)); }; - e.prototype.concat = function() { + h.prototype.concat = function() { for (var a = this._length, c = 0;c < arguments.length;c++) { - var k = arguments[c]; - k._buffer instanceof Float64Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector."); - a += k._length; + var m = arguments[c]; + m._buffer instanceof Uint32Array || v("TypeError", k.Errors.CheckTypeFailedError, m.constructor.name, "__AS3__.vec.Vector."); + a += m._length; } - var a = new e(a), f = a._buffer; - f.set(this._buffer); - for (var d = this._length, c = 0;c < arguments.length;c++) { - k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length; + var a = new h(a), g = a._buffer; + g.set(this._buffer); + for (var f = this._length, c = 0;c < arguments.length;c++) { + m = arguments[c], f + m._buffer.length < m._buffer.length ? g.set(m._buffer, f) : g.set(m._buffer.subarray(0, m._length), f), f += m._length; } return a; }; - e.prototype.every = function(a, e) { - for (var k = 0;k < this._length;k++) { - if (!a.call(e, this._buffer[this._offset + k], k, this)) { + h.prototype.every = function(a, c) { + for (var h = 0;h < this._length;h++) { + if (!a.call(c, this._buffer[this._offset + h], h, this)) { return!1; } } return!0; }; - e.prototype.filter = function(a, c) { - for (var k = new e, f = 0;f < this._length;f++) { - a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]); + h.prototype.filter = function(a, c) { + for (var m = new h, g = 0;g < this._length;g++) { + a.call(c, this._buffer[this._offset + g], g, this) && m.push(this._buffer[this._offset + g]); } - return k; + return m; }; - e.prototype.some = function(a, e) { - 2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = 0;k < this._length;k++) { - if (a.call(e, this._buffer[this._offset + k], k, this)) { + h.prototype.some = function(a, c) { + 2 !== arguments.length ? v("ArgumentError", k.Errors.WrongArgumentCountError) : d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var h = 0;h < this._length;h++) { + if (a.call(c, this._buffer[this._offset + h], h, this)) { return!0; } } return!1; }; - e.prototype.forEach = function(a, e) { - for (var k = 0;k < this._length;k++) { - a.call(e, this._buffer[this._offset + k], k, this); + h.prototype.forEach = function(a, c) { + for (var h = 0;h < this._length;h++) { + a.call(c, this._buffer[this._offset + h], h, this); } }; - e.prototype.join = function(a) { + h.prototype.join = function(a) { void 0 === a && (a = ","); - for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) { - d += k[f + b] + a; + for (var c = this.length, h = this._buffer, g = this._offset, f = "", b = 0;b < c - 1;b++) { + f += h[g + b] + a; } - 0 < e && (d += k[f + e - 1]); - return d; + 0 < c && (f += h[g + c - 1]); + return f; }; - e.prototype.indexOf = function(a, e) { - void 0 === e && (e = 0); - var k = this._length, f = e | 0; - if (0 > f) { - f += k, 0 > f && (f = 0); + h.prototype.indexOf = function(a, c) { + void 0 === c && (c = 0); + var h = this._length, g = c | 0; + if (0 > g) { + g += h, 0 > g && (g = 0); } else { - if (f >= k) { + if (g >= h) { return-1; } } - for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) { - if (d[f] === a) { - return f - b; + for (var f = this._buffer, h = this._length, b = this._offset, h = b + h, g = g + b;g < h;g++) { + if (f[g] === a) { + return g - b; } } return-1; }; - e.prototype.lastIndexOf = function(a, e) { - void 0 === e && (e = 2147483647); - var k = this._length, f = e | 0; - if (0 > f) { - if (f += k, 0 > f) { + h.prototype.lastIndexOf = function(a, c) { + void 0 === c && (c = 2147483647); + var h = this._length, g = c | 0; + if (0 > g) { + if (g += h, 0 > g) { return-1; } } else { - f >= k && (f = k); + g >= h && (g = h); } - for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) { - if (k[f] === a) { - return f - d; + for (var h = this._buffer, f = this._offset, g = g + f;g-- > f;) { + if (h[g] === a) { + return g - f; } } return-1; }; - e.prototype.map = function(a, m) { - c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError); - for (var k = new e, f = 0;f < this._length;f++) { - k.push(a.call(m, this._buffer[this._offset + f], f, this)); + h.prototype.map = function(a, c) { + d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var m = new h, g = 0;g < this._length;g++) { + m.push(a.call(c, this._buffer[this._offset + g], g, this)); } - return k; + return m; }; - e.prototype.push = function(a, e, k, f, d, b, g, r) { + h.prototype.push = function(a, c, h, g, f, b, e, q) { this._checkFixed(); this._ensureCapacity(this._length + arguments.length); - for (var c = 0;c < arguments.length;c++) { - this._buffer[this._offset + this._length++] = arguments[c]; + for (var n = 0;n < arguments.length;n++) { + this._buffer[this._offset + this._length++] = arguments[n]; } }; - e.prototype.pop = function() { + h.prototype.pop = function() { this._checkFixed(); if (0 === this._length) { - return e.DEFAULT_VALUE; + return h.DEFAULT_VALUE; } this._length--; return this._buffer[this._offset + this._length]; }; - e.prototype.reverse = function() { - for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) { - var f = k[a]; - k[a] = k[e]; - k[e] = f; + h.prototype.reverse = function() { + for (var a = this._offset, c = this._offset + this._length - 1, h = this._buffer;a < c;) { + var g = h[a]; + h[a] = h[c]; + h[c] = g; a++; - e--; + c--; } return this; }; - e.prototype.sort = function(a) { - if (0 === arguments.length) { - return Array.prototype.sort.call(this._view()); - } - if (a instanceof Function) { - return Array.prototype.sort.call(this._view(), a); - } - var c = a | 0; - s(!(c & e.UNIQUESORT), "UNIQUESORT"); - s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY"); - return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, e) { - return e - a; - }) : Array.prototype.sort.call(this._view(), function(a, e) { - return a - e; + h.prototype.sort = function(a) { + return 0 === arguments.length ? Array.prototype.sort.call(this._view()) : a instanceof Function ? Array.prototype.sort.call(this._view(), a) : (a | 0) & h.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, c) { + return c - a; + }) : Array.prototype.sort.call(this._view(), function(a, c) { + return a - c; }); }; - e.prototype.shift = function() { + h.prototype.shift = function() { this._checkFixed(); if (0 === this._length) { return 0; @@ -12672,7 +12626,7 @@ Shumway.AVM2.XRegExp.install(); this._length--; return this._buffer[this._offset++]; }; - e.prototype.unshift = function() { + h.prototype.unshift = function() { this._checkFixed(); if (arguments.length) { this._ensureCapacity(this._length + arguments.length); @@ -12684,119 +12638,426 @@ Shumway.AVM2.XRegExp.install(); } } }; - e.prototype.slice = function(a, c) { + h.prototype.slice = function(a, c) { void 0 === a && (a = 0); void 0 === c && (c = 2147483647); - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed); - b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset); + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), g = Math.min(Math.max(c, f), g), b = new h(g - f, this.fixed); + b._buffer.set(m.subarray(this._offset + f, this._offset + g), b._offset); return b; }; - e.prototype.splice = function(a, c) { - var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed); - 0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset)); - this._ensureCapacity(f - g + d); - k.set(k.subarray(b + g, f), b + d); - this._length += d - g; - for (f = 0;f < d;f++) { - k[b + f] = arguments[f + 2]; + h.prototype.splice = function(a, c) { + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), b = this._offset + f, e = Math.min(Math.max(c, 0), g - f), f = arguments.length - 2, q, n = new h(e, this.fixed); + 0 < e && (q = m.subarray(b, b + e), n._buffer.set(q, n._offset)); + this._ensureCapacity(g - e + f); + m.set(m.subarray(b + e, g), b + f); + this._length += f - e; + for (g = 0;g < f;g++) { + m[b + g] = arguments[g + 2]; } - return m; + return n; }; - e.prototype._slide = function(a) { + h.prototype._slide = function(a) { this._buffer.set(this._view(), this._offset + a); this._offset += a; }; - Object.defineProperty(e.prototype, "length", {get:function() { + Object.defineProperty(h.prototype, "length", {get:function() { return this._length; }, set:function(a) { a >>>= 0; if (a > this._length) { this._ensureCapacity(a); - for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) { - this._buffer[c] = e.DEFAULT_VALUE; + for (var c = this._offset + this._length, m = this._offset + a;c < m;c++) { + this._buffer[c] = h.DEFAULT_VALUE; } } this._length = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "fixed", {get:function() { + Object.defineProperty(h.prototype, "fixed", {get:function() { return this._fixed; }, set:function(a) { this._fixed = !!a; }, enumerable:!0, configurable:!0}); - e.prototype._checkFixed = function() { - this._fixed && p("RangeError", h.Errors.VectorFixedError); + h.prototype._checkFixed = function() { + this._fixed && v("RangeError", k.Errors.VectorFixedError); }; - e.prototype.asGetNumericProperty = function(a) { + h.prototype.asGetNumericProperty = function(a) { u(a, this._length); return this._buffer[this._offset + a]; }; - e.prototype.asSetNumericProperty = function(a, e) { - l(a, this._length, this._fixed); + h.prototype.asSetNumericProperty = function(a, c) { + t(a, this._length, this._fixed); a === this._length && (this._ensureCapacity(this._length + 1), this._length++); - this._buffer[this._offset + a] = e; + this._buffer[this._offset + a] = c; }; - e.prototype.asHasProperty = function(a, m, k) { - if (e.prototype === this || !c.isNumeric(m)) { - return Object.prototype.asHasProperty.call(this, a, m, k); + h.prototype.asHasProperty = function(a, c, m) { + if (h.prototype === this || !d.isNumeric(c)) { + return Object.prototype.asHasProperty.call(this, a, c, m); } - a = c.toNumber(m); + a = d.toNumber(c); return 0 <= a && a < this._length; }; - e.prototype.asNextName = function(a) { + h.prototype.asNextName = function(a) { return a - 1; }; - e.prototype.asNextValue = function(a) { + h.prototype.asNextValue = function(a) { return this._buffer[this._offset + a - 1]; }; - e.prototype.asNextNameIndex = function(a) { + h.prototype.asNextNameIndex = function(a) { a += 1; return a <= this._length ? a : 0; }; - e.prototype.asHasNext2 = function(a) { + h.prototype.asHasNext2 = function(a) { a.index = this.asNextNameIndex(a.index); }; - e.EXTRA_CAPACITY = 4; - e.INITIAL_CAPACITY = 10; - e.DEFAULT_VALUE = 0; - e.DESCENDING = 2; - e.UNIQUESORT = 4; - e.RETURNINDEXEDARRAY = 8; - e.instanceConstructor = e; - e.staticNatives = [e]; - e.instanceNatives = [e.prototype]; - e.callableConstructor = e.callable; - e.classInitializer = function() { - var a = e.prototype; - v(a, "$Bgjoin", a.join); - v(a, "$BgtoString", a.join); - v(a, "$BgtoLocaleString", a.toLocaleString); - v(a, "$Bgpop", a.pop); - v(a, "$Bgpush", a.push); - v(a, "$Bgreverse", a.reverse); - v(a, "$Bgconcat", a.concat); - v(a, "$Bgsplice", a.splice); - v(a, "$Bgslice", a.slice); - v(a, "$Bgshift", a.shift); - v(a, "$Bgunshift", a.unshift); - v(a, "$BgindexOf", a.indexOf); - v(a, "$BglastIndexOf", a.lastIndexOf); - v(a, "$BgforEach", a.forEach); - v(a, "$Bgmap", a.map); - v(a, "$Bgfilter", a.filter); - v(a, "$Bgsome", a.some); - v(a, "$Bgevery", a.every); - v(a, "$Bgsort", a.sort); + h.EXTRA_CAPACITY = 4; + h.INITIAL_CAPACITY = 10; + h.DEFAULT_VALUE = 0; + h.DESCENDING = 2; + h.UNIQUESORT = 4; + h.RETURNINDEXEDARRAY = 8; + h.instanceConstructor = h; + h.staticNatives = [h]; + h.instanceNatives = [h.prototype]; + h.callableConstructor = h.callable; + h.classInitializer = function() { + var a = h.prototype; + r(a, "$Bgjoin", a.join); + r(a, "$BgtoString", a.join); + r(a, "$BgtoLocaleString", a.toLocaleString); + r(a, "$Bgpop", a.pop); + r(a, "$Bgpush", a.push); + r(a, "$Bgreverse", a.reverse); + r(a, "$Bgconcat", a.concat); + r(a, "$Bgsplice", a.splice); + r(a, "$Bgslice", a.slice); + r(a, "$Bgshift", a.shift); + r(a, "$Bgunshift", a.unshift); + r(a, "$BgindexOf", a.indexOf); + r(a, "$BglastIndexOf", a.lastIndexOf); + r(a, "$BgforEach", a.forEach); + r(a, "$Bgmap", a.map); + r(a, "$Bgfilter", a.filter); + r(a, "$Bgsome", a.some); + r(a, "$Bgevery", a.every); + r(a, "$Bgsort", a.sort); }; - return e; + return h; }(a.ASVector); - a.Float64Vector = e; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.Uint32Vector = l; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(b) { + var r = d.ObjectUtilities.defineNonEnumerableProperty, v = d.AVM2.Runtime.throwError, u = d.AVM2.Runtime.asCheckVectorGetNumericProperty, t = d.AVM2.Runtime.asCheckVectorSetNumericProperty, l = function(a) { + function h(a, c) { + void 0 === a && (a = 0); + void 0 === c && (c = !1); + a >>>= 0; + this._fixed = !!c; + this._buffer = new Float64Array(Math.max(h.INITIAL_CAPACITY, a + h.EXTRA_CAPACITY)); + this._offset = 0; + this._length = a; + } + __extends(h, a); + h.prototype.newThisType = function() { + return new h; + }; + h.callable = function(a) { + if (a instanceof h) { + return a; + } + var c = a.asGetProperty(void 0, "length"); + if (void 0 !== c) { + for (var m = new h(c, !1), g = 0;g < c;g++) { + m.asSetNumericProperty(g, a.asGetPublicProperty(g)); + } + return m; + } + d.Debug.unexpected(); + }; + h.prototype.internalToString = function() { + for (var a = "", c = this._offset, h = c + this._length, g = 0;g < this._buffer.length;g++) { + g === c && (a += "["), g === h && (a += "]"), a += this._buffer[g], g < this._buffer.length - 1 && (a += ","); + } + this._offset + this._length === this._buffer.length && (a += "]"); + return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length; + }; + h.prototype.toString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); + } + return a; + }; + h.prototype.toLocaleString = function() { + for (var a = "", c = 0;c < this._length;c++) { + a += this._buffer[this._offset + c], c < this._length - 1 && (a += ","); + } + return a; + }; + h.prototype._view = function() { + return this._buffer.subarray(this._offset, this._offset + this._length); + }; + h.prototype._ensureCapacity = function(a) { + var c = this._offset + a; + c < this._buffer.length || (a <= this._buffer.length ? (c = this._buffer.length - a >> 2, this._buffer.set(this._view(), c), this._offset = c) : (a = (3 * this._buffer.length >> 1) + 1, a < c && (a = c), c = new Float64Array(a), c.set(this._buffer, 0), this._buffer = c)); + }; + h.prototype.concat = function() { + for (var a = this._length, c = 0;c < arguments.length;c++) { + var m = arguments[c]; + m._buffer instanceof Float64Array || v("TypeError", k.Errors.CheckTypeFailedError, m.constructor.name, "__AS3__.vec.Vector."); + a += m._length; + } + var a = new h(a), g = a._buffer; + g.set(this._buffer); + for (var f = this._length, c = 0;c < arguments.length;c++) { + m = arguments[c], f + m._buffer.length < m._buffer.length ? g.set(m._buffer, f) : g.set(m._buffer.subarray(0, m._length), f), f += m._length; + } + return a; + }; + h.prototype.every = function(a, c) { + for (var h = 0;h < this._length;h++) { + if (!a.call(c, this._buffer[this._offset + h], h, this)) { + return!1; + } + } + return!0; + }; + h.prototype.filter = function(a, c) { + for (var m = new h, g = 0;g < this._length;g++) { + a.call(c, this._buffer[this._offset + g], g, this) && m.push(this._buffer[this._offset + g]); + } + return m; + }; + h.prototype.some = function(a, c) { + 2 !== arguments.length ? v("ArgumentError", k.Errors.WrongArgumentCountError) : d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var h = 0;h < this._length;h++) { + if (a.call(c, this._buffer[this._offset + h], h, this)) { + return!0; + } + } + return!1; + }; + h.prototype.forEach = function(a, c) { + for (var h = 0;h < this._length;h++) { + a.call(c, this._buffer[this._offset + h], h, this); + } + }; + h.prototype.join = function(a) { + void 0 === a && (a = ","); + for (var c = this.length, h = this._buffer, g = this._offset, f = "", b = 0;b < c - 1;b++) { + f += h[g + b] + a; + } + 0 < c && (f += h[g + c - 1]); + return f; + }; + h.prototype.indexOf = function(a, c) { + void 0 === c && (c = 0); + var h = this._length, g = c | 0; + if (0 > g) { + g += h, 0 > g && (g = 0); + } else { + if (g >= h) { + return-1; + } + } + for (var f = this._buffer, h = this._length, b = this._offset, h = b + h, g = g + b;g < h;g++) { + if (f[g] === a) { + return g - b; + } + } + return-1; + }; + h.prototype.lastIndexOf = function(a, c) { + void 0 === c && (c = 2147483647); + var h = this._length, g = c | 0; + if (0 > g) { + if (g += h, 0 > g) { + return-1; + } + } else { + g >= h && (g = h); + } + for (var h = this._buffer, f = this._offset, g = g + f;g-- > f;) { + if (h[g] === a) { + return g - f; + } + } + return-1; + }; + h.prototype.map = function(a, c) { + d.isFunction(a) || v("ArgumentError", k.Errors.CheckTypeFailedError); + for (var m = new h, g = 0;g < this._length;g++) { + m.push(a.call(c, this._buffer[this._offset + g], g, this)); + } + return m; + }; + h.prototype.push = function(a, c, h, g, f, b, e, q) { + this._checkFixed(); + this._ensureCapacity(this._length + arguments.length); + for (var n = 0;n < arguments.length;n++) { + this._buffer[this._offset + this._length++] = arguments[n]; + } + }; + h.prototype.pop = function() { + this._checkFixed(); + if (0 === this._length) { + return h.DEFAULT_VALUE; + } + this._length--; + return this._buffer[this._offset + this._length]; + }; + h.prototype.reverse = function() { + for (var a = this._offset, c = this._offset + this._length - 1, h = this._buffer;a < c;) { + var g = h[a]; + h[a] = h[c]; + h[c] = g; + a++; + c--; + } + return this; + }; + h.prototype.sort = function(a) { + return 0 === arguments.length ? Array.prototype.sort.call(this._view()) : a instanceof Function ? Array.prototype.sort.call(this._view(), a) : (a | 0) & h.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, c) { + return c - a; + }) : Array.prototype.sort.call(this._view(), function(a, c) { + return a - c; + }); + }; + h.prototype.shift = function() { + this._checkFixed(); + if (0 === this._length) { + return 0; + } + this._length--; + return this._buffer[this._offset++]; + }; + h.prototype.unshift = function() { + this._checkFixed(); + if (arguments.length) { + this._ensureCapacity(this._length + arguments.length); + this._slide(arguments.length); + this._offset -= arguments.length; + this._length += arguments.length; + for (var a = 0;a < arguments.length;a++) { + this._buffer[this._offset + a] = arguments[a]; + } + } + }; + h.prototype.slice = function(a, c) { + void 0 === a && (a = 0); + void 0 === c && (c = 2147483647); + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), g = Math.min(Math.max(c, f), g), b = new h(g - f, this.fixed); + b._buffer.set(m.subarray(this._offset + f, this._offset + g), b._offset); + return b; + }; + h.prototype.splice = function(a, c) { + var m = this._buffer, g = this._length, f = Math.min(Math.max(a, 0), g), b = this._offset + f, e = Math.min(Math.max(c, 0), g - f), f = arguments.length - 2, q, n = new h(e, this.fixed); + 0 < e && (q = m.subarray(b, b + e), n._buffer.set(q, n._offset)); + this._ensureCapacity(g - e + f); + m.set(m.subarray(b + e, g), b + f); + this._length += f - e; + for (g = 0;g < f;g++) { + m[b + g] = arguments[g + 2]; + } + return n; + }; + h.prototype._slide = function(a) { + this._buffer.set(this._view(), this._offset + a); + this._offset += a; + }; + Object.defineProperty(h.prototype, "length", {get:function() { + return this._length; + }, set:function(a) { + a >>>= 0; + if (a > this._length) { + this._ensureCapacity(a); + for (var c = this._offset + this._length, m = this._offset + a;c < m;c++) { + this._buffer[c] = h.DEFAULT_VALUE; + } + } + this._length = a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(h.prototype, "fixed", {get:function() { + return this._fixed; + }, set:function(a) { + this._fixed = !!a; + }, enumerable:!0, configurable:!0}); + h.prototype._checkFixed = function() { + this._fixed && v("RangeError", k.Errors.VectorFixedError); + }; + h.prototype.asGetNumericProperty = function(a) { + u(a, this._length); + return this._buffer[this._offset + a]; + }; + h.prototype.asSetNumericProperty = function(a, c) { + t(a, this._length, this._fixed); + a === this._length && (this._ensureCapacity(this._length + 1), this._length++); + this._buffer[this._offset + a] = c; + }; + h.prototype.asHasProperty = function(a, c, m) { + if (h.prototype === this || !d.isNumeric(c)) { + return Object.prototype.asHasProperty.call(this, a, c, m); + } + a = d.toNumber(c); + return 0 <= a && a < this._length; + }; + h.prototype.asNextName = function(a) { + return a - 1; + }; + h.prototype.asNextValue = function(a) { + return this._buffer[this._offset + a - 1]; + }; + h.prototype.asNextNameIndex = function(a) { + a += 1; + return a <= this._length ? a : 0; + }; + h.prototype.asHasNext2 = function(a) { + a.index = this.asNextNameIndex(a.index); + }; + h.EXTRA_CAPACITY = 4; + h.INITIAL_CAPACITY = 10; + h.DEFAULT_VALUE = 0; + h.DESCENDING = 2; + h.UNIQUESORT = 4; + h.RETURNINDEXEDARRAY = 8; + h.instanceConstructor = h; + h.staticNatives = [h]; + h.instanceNatives = [h.prototype]; + h.callableConstructor = h.callable; + h.classInitializer = function() { + var a = h.prototype; + r(a, "$Bgjoin", a.join); + r(a, "$BgtoString", a.join); + r(a, "$BgtoLocaleString", a.toLocaleString); + r(a, "$Bgpop", a.pop); + r(a, "$Bgpush", a.push); + r(a, "$Bgreverse", a.reverse); + r(a, "$Bgconcat", a.concat); + r(a, "$Bgsplice", a.splice); + r(a, "$Bgslice", a.slice); + r(a, "$Bgshift", a.shift); + r(a, "$Bgunshift", a.unshift); + r(a, "$BgindexOf", a.indexOf); + r(a, "$BglastIndexOf", a.lastIndexOf); + r(a, "$BgforEach", a.forEach); + r(a, "$Bgmap", a.map); + r(a, "$Bgfilter", a.filter); + r(a, "$Bgsome", a.some); + r(a, "$Bgevery", a.every); + r(a, "$Bgsort", a.sort); + }; + return h; + }(a.ASVector); + a.Float64Vector = l; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + function r(b) { return b instanceof a.ASXML || b instanceof a.ASXMLList; } function v(b) { @@ -12810,280 +13071,280 @@ Shumway.AVM2.XRegExp.install(); return b._value; default: if (b.hasSimpleContent()) { - for (var d = "", g = 0;g < b._children.length;g++) { - var e = b._children[g]; - 4 !== e._kind && 5 !== e._kind && (d += v(e)); + for (var e = "", f = 0;f < b._children.length;f++) { + var c = b._children[f]; + 4 !== c._kind && 5 !== c._kind && (e += v(c)); } - return d; + return e; } - return q(b); + return s(b); } } - function p(b) { - for (var a = 0, d;a < b.length && "&" !== (d = b[a]) && "<" !== d && ">" !== d;) { - a++; - } - if (a >= b.length) { - return b; - } - for (var g = b.substring(0, a);a < b.length;) { - switch(d = b[a++], d) { - case "&": - g += "&"; - break; - case "<": - g += "<"; - break; - case ">": - g += ">"; - break; - default: - g += d; - } - } - return g; - } function u(b) { - for (var a = 0, d;a < b.length && "&" !== (d = b[a]) && "<" !== d && '"' !== d && "\n" !== d && "\r" !== d && "\t" !== d;) { + for (var a = 0, e;a < b.length && "&" !== (e = b[a]) && "<" !== e && ">" !== e;) { a++; } if (a >= b.length) { return b; } - for (var g = b.substring(0, a);a < b.length;) { - switch(d = b[a++], d) { + for (var f = b.substring(0, a);a < b.length;) { + switch(e = b[a++], e) { case "&": - g += "&"; + f += "&"; break; case "<": - g += "<"; + f += "<"; break; - case '"': - g += """; - break; - case "\n": - g += " "; - break; - case "\r": - g += " "; - break; - case "\t": - g += " "; + case ">": + f += ">"; break; default: - g += d; + f += e; } } - return g; + return f; + } + function t(b) { + for (var a = 0, e;a < b.length && "&" !== (e = b[a]) && "<" !== e && '"' !== e && "\n" !== e && "\r" !== e && "\t" !== e;) { + a++; + } + if (a >= b.length) { + return b; + } + for (var f = b.substring(0, a);a < b.length;) { + switch(e = b[a++], e) { + case "&": + f += "&"; + break; + case "<": + f += "<"; + break; + case '"': + f += """; + break; + case "\n": + f += " "; + break; + case "\r": + f += " "; + break; + case "\t": + f += " "; + break; + default: + f += e; + } + } + return f; } function l(b, a) { - var d = b[a]; - return " " === d || "\n" === d || "\r" === d || "\t" === d; + var e = b[a]; + return " " === e || "\n" === e || "\r" === e || "\t" === e; } - function e(b) { + function c(b) { for (var a = 0;a < b.length && l(b, a);) { a++; } if (a >= b.length) { return ""; } - for (var d = b.length - 1;l(b, d);) { - d--; + for (var e = b.length - 1;l(b, e);) { + e--; } - return 0 === a && d === b.length - 1 ? b : b.substring(a, d + 1); + return 0 === a && e === b.length - 1 ? b : b.substring(a, e + 1); } - function m(b) { + function h(b) { if (0 < b) { - if (void 0 !== F[b]) { - return F[b]; + if (void 0 !== G[b]) { + return G[b]; } - for (var a = "", d = 0;d < b;d++) { + for (var a = "", e = 0;e < b;e++) { a += " "; } - return F[b] = a; + return G[b] = a; } return ""; } - function t(b) { - for (var a = 1, d;;) { - d = "_ns" + a; + function p(b) { + for (var a = 1, e;;) { + e = "_ns" + a; if (!b.some(function(b) { - return b.prefix == d; + return b.prefix == e; })) { break; } a++; } - return d; + return e; } - function q(b, d, g) { + function s(b, e, f) { if (null === b || void 0 === b) { throw new TypeError; } - if (!(b instanceof P)) { + if (!(b instanceof S)) { return b instanceof V ? b._children.map(function(b) { - return q(b, d); - }).join(P.prettyPrinting ? "\n" : "") : p(String(b)); + return s(b, e); + }).join(S.prettyPrinting ? "\n" : "") : u(String(b)); } - var f = P.prettyPrinting; - g |= 0; - var k = f ? m(g) : "", r = b._kind; - switch(r) { + var g = S.prettyPrinting; + f |= 0; + var n = g ? h(f) : ""; + switch(b._kind) { case 3: - return f ? k + p(e(b._value)) : p(b._value); + return g ? n + u(c(b._value)) : u(b._value); case 2: - return k + u(b._value); + return n + t(b._value); case 4: - return k + "\x3c!--" + b._value + "--\x3e"; + return n + "\x3c!--" + b._value + "--\x3e"; case 5: - return k + ""; - default: - z(1 === r); + return n + ""; } - d = d || []; - for (var c = [], w = 0;b._inScopeNamespaces && w < b._inScopeNamespaces.length;w++) { - var l = b._inScopeNamespaces[w].prefix, n = b._inScopeNamespaces[w].uri; - d.every(function(b) { - return b.uri != n || b.prefix != l; - }) && (r = new a.ASNamespace(l, n), c.push(r)); + e = e || []; + for (var q = [], m = 0;b._inScopeNamespaces && m < b._inScopeNamespaces.length;m++) { + var d = b._inScopeNamespaces[m].prefix, l = b._inScopeNamespaces[m].uri; + if (e.every(function(b) { + return b.uri != l || b.prefix != d; + })) { + var x = new a.ASNamespace(d, l); + q.push(x); + } } - var s = d.concat(c), r = b._name.getNamespace(s); - void 0 === r.prefix && (w = t(s), w = new a.ASNamespace(w, r.uri), c.push(w), s.push(w)); - var h = (r.prefix ? r.prefix + ":" : "") + b._name.localName, k = k + ("<" + h); + var r = e.concat(q), x = b._name.getNamespace(r); + void 0 === x.prefix && (m = p(r), m = new a.ASNamespace(m, x.uri), q.push(m), r.push(m)); + var k = (x.prefix ? x.prefix + ":" : "") + b._name.localName, n = n + ("<" + k); b._attributes && b._attributes.forEach(function(b) { - b = b._name.getNamespace(s); + b = b._name.getNamespace(r); if (void 0 === b.prefix) { - var d = t(s); - b = new a.ASNamespace(d, b.uri); - c.push(b); - s.push(b); + var e = p(r); + b = new a.ASNamespace(e, b.uri); + q.push(b); + r.push(b); } }); - for (w = 0;w < c.length;w++) { - r = c[w], k += " " + (r.prefix ? "xmlns:" + r.prefix : "xmlns") + '="' + u(r.uri) + '"'; + for (m = 0;m < q.length;m++) { + x = q[m], n += " " + (x.prefix ? "xmlns:" + x.prefix : "xmlns") + '="' + t(x.uri) + '"'; } b._attributes && b._attributes.forEach(function(b) { - var a = b._name, g = a.getNamespace(d); - k += " " + (g.prefix ? g.prefix + ":" + a.localName : a.localName) + '="' + u(b._value) + '"'; + var a = b._name, f = a.getNamespace(e); + n += " " + (f.prefix ? f.prefix + ":" + a.localName : a.localName) + '="' + t(b._value) + '"'; }); if (0 === b.length()) { - return k += "/>"; + return n += "/>"; } - var k = k + ">", A = 1 < b._children.length || 1 === b._children.length && 3 !== b._children[0]._kind, v = f && A ? g + P.prettyIndent : 0; + var n = n + ">", L = 1 < b._children.length || 1 === b._children.length && 3 !== b._children[0]._kind, A = g && L ? f + S.prettyIndent : 0; b._children.forEach(function(b, a) { - f && A && (k += "\n"); - var d = q(b, s, v); - k += d; + g && L && (n += "\n"); + var e = s(b, r, A); + n += e; }); - f && A && (k += "\n" + m(g)); - return k += ""; + g && L && (n += "\n" + h(f)); + return n += ""; } - function n(b) { + function m(b) { if (null === b) { - throw new TypeError(h.formatErrorMessage(h.Errors.ConvertNullToObjectError)); + throw new TypeError(k.formatErrorMessage(k.Errors.ConvertNullToObjectError)); } if (void 0 === b) { - throw new TypeError(h.formatErrorMessage(h.Errors.ConvertUndefinedToObjectError)); + throw new TypeError(k.formatErrorMessage(k.Errors.ConvertUndefinedToObjectError)); } - if (b instanceof P) { + if (b instanceof S) { return b; } if (b instanceof V) { - return 1 !== b._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLMarkupMustBeWellFormed), b._children[0]; + return 1 !== b._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLMarkupMustBeWellFormed), b._children[0]; } - b = I.parseFromString(M(b)); + b = C.parseFromString(H(b)); var a = b.length(); if (0 === a) { - return w(3); + return x(3); } if (1 === a) { return b._children[0]._parent = null, b._children[0]; } - h.Runtime.throwError("TypeError", h.Errors.XMLMarkupMustBeWellFormed); + k.Runtime.throwError("TypeError", k.Errors.XMLMarkupMustBeWellFormed); } - function k(b, a) { - z(!(b instanceof V)); - null === b && h.Runtime.throwError("TypeError", h.Errors.ConvertNullToObjectError); - void 0 === b && h.Runtime.throwError("TypeError", h.Errors.ConvertUndefinedToObjectError); - if (b instanceof P) { + function g(b, a) { + null === b && k.Runtime.throwError("TypeError", k.Errors.ConvertNullToObjectError); + void 0 === b && k.Runtime.throwError("TypeError", k.Errors.ConvertUndefinedToObjectError); + if (b instanceof S) { a.append(b); } else { - var d = n('' + b + "")._children; - if (d) { - for (var g = 0;g < d.length;g++) { - var e = d[g]; - e._parent = null; - a.append(e); + var e = m('' + b + "")._children; + if (e) { + for (var f = 0;f < e.length;f++) { + var c = e[f]; + c._parent = null; + a.append(c); } } } } function f(b) { - void 0 !== b && null !== b && "boolean" !== typeof b && "number" !== typeof b || h.Runtime.throwError("TypeError", h.Errors.ConvertUndefinedToObjectError); + void 0 !== b && null !== b && "boolean" !== typeof b && "number" !== typeof b || k.Runtime.throwError("TypeError", k.Errors.ConvertUndefinedToObjectError); if ("object" === typeof b) { - if (b instanceof Q) { + if (b instanceof T) { return new a.ASQName(b.uri, b.localName, !0); } - if (A.isQName(b)) { - return Q.fromMultiname(b); + if (L.isQName(b)) { + return T.fromMultiname(b); } } b = v(b); return new a.ASQName(void 0, b, !0); } - function d(b) { + function b(b) { if (void 0 === b) { return new a.ASQName("*"); } if ("object" === typeof b && null !== b) { - if (b instanceof Q) { + if (b instanceof T) { return b; } - if (A.isQName(b)) { - return Q.fromMultiname(b); + if (L.isQName(b)) { + return T.fromMultiname(b); } - var d; - d = b instanceof P || b instanceof V ? v(b) : b instanceof A ? b.name : b.toString(); + var e; + e = b instanceof S || b instanceof V ? v(b) : b instanceof L ? b.name : b.toString(); } else { if ("string" === typeof b) { - d = b; + e = b; } else { throw new TypeError; } } - return "@" === d[0] ? f(d.substring(1)) : new a.ASQName(void 0, d, !!(b.flags & 1)); + return "@" === e[0] ? f(e.substring(1)) : new a.ASQName(void 0, e, !!(b.flags & 1)); } - function b(b) { - return b instanceof Q && !!(b.name.flags & 1); + function e(b) { + return b instanceof T && !!(b.name.flags & 1); } - function g(b, d, g) { - return b && 1 === b.length && b[0] instanceof G && ("string" === typeof d || void 0 === d) ? new a.ASQName(b[0], d || "*", g) : d; + function q(b, e, f) { + return b && 1 === b.length && b[0] instanceof I && ("string" === typeof e || void 0 === e) ? new a.ASQName(b[0], e || "*", f) : e; } - function r(b) { + function n(b) { try { new a.ASQName(b); - } catch (d) { + } catch (e) { return!1; } return!0; } - function w(b, d, g, e) { - var f = new a.ASXML; + function x(b, e, f, c) { + var g = new a.ASXML; void 0 === b && (b = 3); - void 0 === d && (d = ""); - void 0 === g && (g = ""); - f.init(b, d, g, e); - return f; + void 0 === e && (e = ""); + void 0 === f && (f = ""); + g.init(b, e, f, c); + return g; } - var z = c.Debug.assert, A = c.AVM2.ABC.Multiname, B = c.Debug.notImplemented, M = c.AVM2.Runtime.asCoerceString, N = c.ObjectUtilities.defineNonEnumerableProperty, K = c.ObjectUtilities.createPublicAliases, y = Object.prototype.asGetProperty, D = Object.prototype.asSetProperty, L = Object.prototype.asCallProperty, H = Object.prototype.asHasProperty, J = Object.prototype.asHasOwnProperty, C = Object.prototype.asDeleteProperty, E = Object.prototype.asGetEnumerableKeys; - a.escapeElementValue = p; - a.escapeAttributeValue = u; - var F = []; - a.isXMLName = r; - c.AVM2.AS.Natives.isXMLName = r; - var I = new function() { - function b(a, d) { - function g(b) { + var L = d.AVM2.ABC.Multiname, A = d.Debug.notImplemented, H = d.AVM2.Runtime.asCoerceString, K = d.ObjectUtilities.defineNonEnumerableProperty, F = d.ObjectUtilities.createPublicAliases, J = Object.prototype.asGetProperty, M = Object.prototype.asSetProperty, D = Object.prototype.asCallProperty, B = Object.prototype.asHasProperty, E = Object.prototype.asHasOwnProperty, y = Object.prototype.asDeleteProperty, z = Object.prototype.asGetEnumerableKeys; + a.escapeElementValue = u; + a.escapeAttributeValue = t; + var G = []; + a.isXMLName = n; + d.AVM2.AS.Natives.isXMLName = n; + var C = new function() { + function b(a, e) { + function f(b) { return b.replace(/&([^;]+);/g, function(b, a) { if ("#x" === a.substring(0, 2)) { return String.fromCharCode(parseInt(a.substring(2), 16)); @@ -13104,144 +13365,144 @@ Shumway.AVM2.XRegExp.install(); return b; }); } - function f() { - for (var b = q.length - 1;0 <= b;--b) { - if ("preserve" === q[b].space) { + function g() { + for (var b = s.length - 1;0 <= b;--b) { + if ("preserve" === s[b].space) { return!0; } } return!1; } - function k() { - for (var b = q.length - 1;0 <= b;--b) { - if ("xmlns" in q[b]) { - return q[b].xmlns; + function n() { + for (var b = s.length - 1;0 <= b;--b) { + if ("xmlns" in s[b]) { + return s[b].xmlns; } } return ""; } - function r(b) { - for (var a = q.length - 1;0 <= a;--a) { - if (b in q[a].lookup) { - return q[a].lookup[b]; + function q(b) { + for (var a = s.length - 1;0 <= a;--a) { + if (b in s[a].lookup) { + return s[a].lookup[b]; } } } - function c(b, a) { - var d = b.indexOf(":"); - if (0 <= d) { - var g = b.substring(0, d), e = r(g); - if (void 0 === e) { - throw "Unknown namespace: " + g; + function h(b, a) { + var e = b.indexOf(":"); + if (0 <= e) { + var f = b.substring(0, e), c = q(f); + if (void 0 === c) { + throw "Unknown namespace: " + f; } - d = b.substring(d + 1); - return{name:e + "::" + d, localName:d, prefix:g, namespace:e}; + e = b.substring(e + 1); + return{name:c + "::" + e, localName:e, prefix:f, namespace:c}; } - return a ? {name:b, localName:b, prefix:"", namespace:k()} : {name:b, localName:b, prefix:"", namespace:""}; + return a ? {name:b, localName:b, prefix:"", namespace:n()} : {name:b, localName:b, prefix:"", namespace:""}; } function m(b, a) { - function d() { - for (;e < b.length && l(b, e);) { - ++e; + function e() { + for (;c < b.length && l(b, c);) { + ++c; } } - for (var e = a, f, k = [];e < b.length && !l(b, e) && ">" !== b[e] && "/" !== b[e];) { - ++e; + for (var c = a, g, n = [];c < b.length && !l(b, c) && ">" !== b[c] && "/" !== b[c];) { + ++c; } - f = b.substring(a, e); - for (d();e < b.length && ">" !== b[e] && "/" !== b[e] && "?" !== b[e];) { - d(); - for (var r = "", c = "";e < b.length && !l(b, e) && "=" !== b[e];) { - r += b[e], ++e; + g = b.substring(a, c); + for (e();c < b.length && ">" !== b[c] && "/" !== b[c] && "?" !== b[c];) { + e(); + for (var q = "", h = "";c < b.length && !l(b, c) && "=" !== b[c];) { + q += b[c], ++c; } - d(); - if ("=" !== b[e]) { + e(); + if ("=" !== b[c]) { throw "'=' expected"; } - ++e; - d(); - c = b[e]; - if ('"' !== c && "'" !== c) { + ++c; + e(); + h = b[c]; + if ('"' !== h && "'" !== h) { throw "Quote expected"; } - var w = b.indexOf(c, ++e); - if (0 > w) { + var p = b.indexOf(h, ++c); + if (0 > p) { throw "Unexpected EOF[6]"; } - c = b.substring(e, w); - k.push({name:r, value:g(c)}); - e = w + 1; - d(); + h = b.substring(c, p); + n.push({name:q, value:f(h)}); + c = p + 1; + e(); } - return{name:f, attributes:k, parsed:e - a}; + return{name:g, attributes:n, parsed:c - a}; } - function w(b, a) { - for (var d = a, g;d < b.length && !l(b, d) && ">" !== b[d] && "/" !== b[d];) { - ++d; + function p(b, a) { + for (var e = a, f;e < b.length && !l(b, e) && ">" !== b[e] && "/" !== b[e];) { + ++e; } - for (g = b.substring(a, d);d < b.length && l(b, d);) { - ++d; + for (f = b.substring(a, e);e < b.length && l(b, e);) { + ++e; } - for (var e = d;d < b.length && ("?" !== b[d] || ">" != b[d + 1]);) { - ++d; + for (var c = e;e < b.length && ("?" !== b[e] || ">" != b[e + 1]);) { + ++e; } - return{name:g, value:b.substring(e, d), parsed:d - a}; + return{name:f, value:b.substring(c, e), parsed:e - a}; } - for (var n = 0, q = [{namespaces:[], lookup:{xmlns:"http://www.w3.org/2000/xmlns/", xml:"http://www.w3.org/XML/1998/namespace"}, inScopes:P.defaultNamespace ? [{uri:P.defaultNamespace, prefix:""}] : [], space:"default", xmlns:P.defaultNamespace || ""}];n < a.length;) { - var z = n; - if ("<" === a[n]) { - switch(++z, a[z]) { + for (var d = 0, s = [{namespaces:[], lookup:{xmlns:"http://www.w3.org/2000/xmlns/", xml:"http://www.w3.org/XML/1998/namespace"}, inScopes:S.defaultNamespace ? [{uri:S.defaultNamespace, prefix:""}] : [], space:"default", xmlns:S.defaultNamespace || ""}];d < a.length;) { + var x = d; + if ("<" === a[d]) { + switch(++x, a[x]) { case "/": - ++z; - n = a.indexOf(">", z); - if (0 > n) { + ++x; + d = a.indexOf(">", x); + if (0 > d) { throw "Unexpected EOF[1]"; } - z = c(a.substring(z, n), !0); - d.endElement(z); - q.pop(); - z = n + 1; + x = h(a.substring(x, d), !0); + e.endElement(x); + s.pop(); + x = d + 1; break; case "?": - ++z; - n = w(a, z); - if ("?>" != a.substring(z + n.parsed, z + n.parsed + 2)) { + ++x; + d = p(a, x); + if ("?>" != a.substring(x + d.parsed, x + d.parsed + 2)) { throw "Unexpected EOF[2]"; } - d.pi(n.name, n.value); - z += n.parsed + 2; + e.pi(d.name, d.value); + x += d.parsed + 2; break; case "!": - if ("--" === a.substring(z + 1, z + 3)) { - n = a.indexOf("--\x3e", z + 3); - if (0 > n) { + if ("--" === a.substring(x + 1, x + 3)) { + d = a.indexOf("--\x3e", x + 3); + if (0 > d) { throw "Unexpected EOF[3]"; } - d.comment(a.substring(z + 3, n)); - z = n + 3; + e.comment(a.substring(x + 3, d)); + x = d + 3; } else { - if ("[CDATA[" === a.substring(z + 1, z + 8)) { - n = a.indexOf("]]\x3e", z + 8); - if (0 > n) { + if ("[CDATA[" === a.substring(x + 1, x + 8)) { + d = a.indexOf("]]\x3e", x + 8); + if (0 > d) { throw "Unexpected EOF[4]"; } - d.cdata(a.substring(z + 8, n)); - z = n + 3; + e.cdata(a.substring(x + 8, d)); + x = d + 3; } else { - if ("DOCTYPE" === a.substring(z + 1, z + 8)) { - var t = a.indexOf("[", z + 8), s = !1, n = a.indexOf(">", z + 8); - if (0 > n) { + if ("DOCTYPE" === a.substring(x + 1, x + 8)) { + var r = a.indexOf("[", x + 8), k = !1, d = a.indexOf(">", x + 8); + if (0 > d) { throw "Unexpected EOF[5]"; } - if (0 < t && n > t) { - n = a.indexOf("]>", z + 8); - if (0 > n) { + if (0 < r && d > r) { + d = a.indexOf("]>", x + 8); + if (0 > d) { throw "Unexpected EOF[7]"; } - s = !0; + k = !0; } - d.doctype(a.substring(z + 8, n + (s ? 1 : 0))); - z = n + (s ? 2 : 1); + e.doctype(a.substring(x + 8, d + (k ? 1 : 0))); + x = d + (k ? 2 : 1); } else { throw "Unknown !tag"; } @@ -13249,139 +13510,139 @@ Shumway.AVM2.XRegExp.install(); } break; default: - t = m(a, z); - s = !1; - if ("/>" === a.substring(z + t.parsed, z + t.parsed + 2)) { - s = !0; + r = m(a, x); + k = !1; + if ("/>" === a.substring(x + r.parsed, x + r.parsed + 2)) { + k = !0; } else { - if (">" !== a.substring(z + t.parsed, z + t.parsed + 1)) { + if (">" !== a.substring(x + r.parsed, x + r.parsed + 1)) { throw "Unexpected EOF[2]"; } } - for (var h = {namespaces:[], lookup:Object.create(null)}, A = t.attributes, n = 0;n < A.length;++n) { - var p = A[n], v = p.name; - if ("xmlns:" === v.substring(0, 6)) { - v = v.substring(6), p = p.value, r(v) !== p && (h.lookup[v] = e(p), h.namespaces.push({uri:p, prefix:v})), delete A[n]; + for (var L = {namespaces:[], lookup:Object.create(null)}, u = r.attributes, d = 0;d < u.length;++d) { + var t = u[d], A = t.name; + if ("xmlns:" === A.substring(0, 6)) { + A = A.substring(6), t = t.value, q(A) !== t && (L.lookup[A] = c(t), L.namespaces.push({uri:t, prefix:A})), delete u[d]; } else { - if ("xmlns" === v) { - p = p.value, k() !== p && (h.xmlns = e(p), h.namespaces.push({uri:p, prefix:""})), delete A[n]; + if ("xmlns" === A) { + t = t.value, n() !== t && (L.xmlns = c(t), L.namespaces.push({uri:t, prefix:""})), delete u[d]; } else { - if ("xml:" === v.substring(0, 4)) { - var B = v.substring(4); - if ("space" !== B && "lang" !== B && "base" !== B && "id" !== B) { - throw "Invalid xml attribute: " + v; + if ("xml:" === A.substring(0, 4)) { + var v = A.substring(4); + if ("space" !== v && "lang" !== v && "base" !== v && "id" !== v) { + throw "Invalid xml attribute: " + A; } - h[B] = e(p.value); + L[v] = c(t.value); } else { - if ("xml" === v.substring(0, 3)) { + if ("xml" === A.substring(0, 3)) { throw "Invalid xml attribute"; } } } } } - var u = []; - h.namespaces.forEach(function(b) { - b.prefix && h.lookup[b.prefix] !== b.uri || u.push(b); + var K = []; + L.namespaces.forEach(function(b) { + b.prefix && L.lookup[b.prefix] !== b.uri || K.push(b); }); - q[q.length - 1].inScopes.forEach(function(b) { - (!b.prefix || b.prefix in h.lookup) && (b.prefix || "xmlns" in h) || u.push(b); + s[s.length - 1].inScopes.forEach(function(b) { + (!b.prefix || b.prefix in L.lookup) && (b.prefix || "xmlns" in L) || K.push(b); }); - h.inScopes = u; - q.push(h); - v = []; - for (n = 0;n < A.length;++n) { - (p = A[n]) && v.push({name:c(p.name, !1), value:p.value}); + L.inScopes = K; + s.push(L); + A = []; + for (d = 0;d < u.length;++d) { + (t = u[d]) && A.push({name:h(t.name, !1), value:t.value}); } - d.beginElement(c(t.name, !0), v, u, s); - z += t.parsed + (s ? 2 : 1); - s && q.pop(); + e.beginElement(h(r.name, !0), A, K, k); + x += r.parsed + (k ? 2 : 1); + k && s.pop(); } } else { - for (;z++ < a.length && "<" !== a[z];) { + for (;x++ < a.length && "<" !== a[x];) { } - d.text(g(a.substring(n, z)), f()); + e.text(f(a.substring(d, x)), g()); } - n = z; + d = x; } } - this.parseFromString = function(d, g) { - var f = w(1, "", "", ""), k = []; - b(d, {beginElement:function(b, d, g, e) { - var r = f; - k.push(r); - f = w(1, b.namespace, b.localName, b.prefix); - for (b = 0;b < d.length;++b) { - var c = d[b], m = w(2, c.name.namespace, c.name.localName, c.name.prefix); - m._value = c.value; - m._parent = f; - f._attributes.push(m); + this.parseFromString = function(e, f) { + var g = x(1, "", "", ""), n = []; + b(e, {beginElement:function(b, e, f, c) { + var q = g; + n.push(q); + g = x(1, b.namespace, b.localName, b.prefix); + for (b = 0;b < e.length;++b) { + var h = e[b], m = x(2, h.name.namespace, h.name.localName, h.name.prefix); + m._value = h.value; + m._parent = g; + g._attributes.push(m); } - for (b = 0;b < g.length;++b) { - d = g[b], d = new a.ASNamespace(d.prefix, d.uri), f._inScopeNamespaces.push(d); + for (b = 0;b < f.length;++b) { + e = f[b], e = new a.ASNamespace(e.prefix, e.uri), g._inScopeNamespaces.push(e); } - r.insert(r.length(), f); - e && (f = k.pop()); + q.insert(q.length(), g); + c && (g = n.pop()); }, endElement:function(b) { - f = k.pop(); + g = n.pop(); }, text:function(b, a) { - P.ignoreWhitespace && (b = e(b)); - if (!(0 === b.length || a && P.ignoreWhitespace)) { - var d = w(3, "", "", void 0); - d._value = b; - f.insert(f.length(), d); + S.ignoreWhitespace && (b = c(b)); + if (!(0 === b.length || a && S.ignoreWhitespace)) { + var e = x(3, "", "", void 0); + e._value = b; + g.insert(g.length(), e); } }, cdata:function(b) { - var a = w(3, "", "", void 0); + var a = x(3, "", "", void 0); a._value = b; - f.insert(f.length(), a); + g.insert(g.length(), a); }, comment:function(b) { - if (!P.ignoreComments) { - var a = w(4, "", "", void 0); + if (!S.ignoreComments) { + var a = x(4, "", "", void 0); a._value = b; - f.insert(f.length(), a); + g.insert(g.length(), a); } }, pi:function(b, a) { - if (!P.ignoreProcessingInstructions) { - var d = w(5, "", b, void 0); - d._value = a; - f.insert(f.length(), d); + if (!S.ignoreProcessingInstructions) { + var e = x(5, "", b, void 0); + e._value = a; + g.insert(g.length(), e); } }, doctype:function(b) { }}); - return f; + return g; }; - }, G = function(b) { - function d(b, a) { - var g = "", e = ""; - 0 !== arguments.length && (1 === arguments.length ? (g = b, c.isObject(g) && g instanceof d ? (e = g.prefix, g = g.uri) : c.isObject(g) && g instanceof Q && null !== g.uri ? g = g.uri : (g = v(g), e = "" === g ? "" : void 0)) : (g = a, g = c.isObject(g) && g instanceof Q && null !== g.uri ? g.uri : v(g), "" === g ? void 0 === b || "" === v(b) ? e = "" : h.Runtime.throwError("TypeError", h.Errors.XMLNamespaceWithPrefixAndNoURI, b) : e = void 0 === b ? void 0 : !1 === r(b) ? void 0 : v(b))); - this._ns = Namespace.createNamespace(g, e); + }, I = function(b) { + function e(b, a) { + var f = "", c = ""; + 0 !== arguments.length && (1 === arguments.length ? (f = b, d.isObject(f) && f instanceof e ? (c = f.prefix, f = f.uri) : d.isObject(f) && f instanceof T && null !== f.uri ? f = f.uri : (f = v(f), c = "" === f ? "" : void 0)) : (f = a, f = d.isObject(f) && f instanceof T && null !== f.uri ? f.uri : v(f), "" === f ? void 0 === b || "" === v(b) ? c = "" : k.Runtime.throwError("TypeError", k.Errors.XMLNamespaceWithPrefixAndNoURI, b) : c = void 0 === b ? void 0 : !1 === n(b) ? void 0 : v(b))); + this._ns = Namespace.createNamespace(f, c); } - __extends(d, b); - d.prototype.equals = function(b) { - return b instanceof d && b._ns.uri === this._ns.uri || "string" === typeof b && this._ns.uri === b; + __extends(e, b); + e.prototype.equals = function(b) { + return b instanceof e && b._ns.uri === this._ns.uri || "string" === typeof b && this._ns.uri === b; }; - Object.defineProperty(d.prototype, "prefix", {get:function() { + Object.defineProperty(e.prototype, "prefix", {get:function() { return this._ns.prefix; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "uri", {get:function() { + Object.defineProperty(e.prototype, "uri", {get:function() { return this._ns.uri; }, enumerable:!0, configurable:!0}); - d.prototype.toString = function() { - return this === d.prototype ? "" : this._ns.uri; + e.prototype.toString = function() { + return this === e.prototype ? "" : this._ns.uri; }; - d.prototype.valueOf = function() { - return this === d.prototype ? "" : this._ns.uri; + e.prototype.valueOf = function() { + return this === e.prototype ? "" : this._ns.uri; }; - d.staticNatives = null; - d.instanceNatives = null; - d.instanceConstructor = d; - d.classInitializer = function() { - var b = d.prototype; - N(b, "$BgtoString", b.toString); + e.staticNatives = null; + e.instanceNatives = null; + e.instanceConstructor = e; + e.classInitializer = function() { + var b = e.prototype; + K(b, "$BgtoString", b.toString); }; - d.callableConstructor = function(b, g) { - if (1 === arguments.length && c.isObject(b) && b instanceof d) { + e.callableConstructor = function(b, f) { + if (1 === arguments.length && d.isObject(b) && b instanceof e) { return b; } switch(arguments.length) { @@ -13390,83 +13651,83 @@ Shumway.AVM2.XRegExp.install(); case 1: return new a.ASNamespace(b); default: - return new a.ASNamespace(b, g); + return new a.ASNamespace(b, f); } }; - return d; + return e; }(a.ASObject); - a.ASNamespace = G; - var Z; + a.ASNamespace = I; + var P; (function(b) { b[b.ATTR_NAME = 1] = "ATTR_NAME"; b[b.ELEM_NAME = 2] = "ELEM_NAME"; b[b.ANY_NAME = 4] = "ANY_NAME"; b[b.ANY_NAMESPACE = 8] = "ANY_NAMESPACE"; - })(Z || (Z = {})); - var Q = function(b) { - function d(b, g, e) { - var f, k; - 0 === arguments.length ? f = "" : 1 === arguments.length ? f = b : (k = b, f = g); - if (c.isObject(f) && f instanceof d) { + })(P || (P = {})); + var T = function(b) { + function e(b, f, c) { + var g, n; + 0 === arguments.length ? g = "" : 1 === arguments.length ? g = b : (n = b, g = f); + if (d.isObject(g) && g instanceof e) { if (2 > arguments.length) { - return f; + return g; } - f = f.localName; + g = g.localName; } - f = void 0 === f || 0 === arguments.length ? "" : v(f); - if (void 0 === k || 2 > arguments.length) { - k = "*" === f ? null : new a.ASNamespace("", P.defaultNamespace); + g = void 0 === g || 0 === arguments.length ? "" : v(g); + if (void 0 === n || 2 > arguments.length) { + n = "*" === g ? null : new a.ASNamespace("", S.defaultNamespace); } - var r = f; - null !== k && (k = k instanceof G ? k : new a.ASNamespace(k)); - var m = e ? 1 : 2; - "*" === f && (m |= 4); - null === k && (m |= 8); - this.name = new A([k ? k._ns : null], r, m); + var q = g; + null !== n && (n = n instanceof I ? n : new a.ASNamespace(n)); + var h = c ? 1 : 2; + "*" === g && (h |= 4); + null === n && (h |= 8); + this.name = new L([n ? n._ns : null], q, h); } - __extends(d, b); - d.fromMultiname = function(b) { - var a = Object.create(d.prototype); + __extends(e, b); + e.fromMultiname = function(b) { + var a = Object.create(e.prototype); a.name = b; return a; }; - d.prototype.equals = function(b) { - return b instanceof d && b.uri === this.uri && b.name.name === this.name.name || "string" === typeof b && this.toString() === b; + e.prototype.equals = function(b) { + return b instanceof e && b.uri === this.uri && b.name.name === this.name.name || "string" === typeof b && this.toString() === b; }; - Object.defineProperty(d.prototype, "localName", {get:function() { + Object.defineProperty(e.prototype, "localName", {get:function() { return this.name.name; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "uri", {get:function() { + Object.defineProperty(e.prototype, "uri", {get:function() { return this.name.namespaces[0] ? this.name.namespaces[0].uri : null; }, enumerable:!0, configurable:!0}); - d.prototype.setUri = function() { + e.prototype.setUri = function() { this.name.namespaces[0] || this.name.namespaces.push(Namespace.createNamespace("")); this.name.namespaces[0].uri = ""; }; - d.prototype.toString = function() { + e.prototype.toString = function() { var b = this.uri; return b ? b + "::" + this.name.name : this.name.name; }; - Object.defineProperty(d.prototype, "prefix", {get:function() { + Object.defineProperty(e.prototype, "prefix", {get:function() { return this.name.namespaces[0] ? this.name.namespaces[0].prefix : null; }, enumerable:!0, configurable:!0}); - d.prototype.getNamespace = function(b) { + e.prototype.getNamespace = function(b) { if (null === this.uri) { throw "TypeError in QName.prototype.getNamespace()"; } b || (b = []); - for (var d, g = 0;g < b.length;g++) { - this.uri === b[g].uri && (d = b[g]); + for (var e, f = 0;f < b.length;f++) { + this.uri === b[f].uri && (e = b[f]); } - d || (d = new a.ASNamespace(this.prefix, this.uri)); - return d; + e || (e = new a.ASNamespace(this.prefix, this.uri)); + return e; }; - Object.defineProperty(d.prototype, "flags", {get:function() { + Object.defineProperty(e.prototype, "flags", {get:function() { return this.name.flags; }, enumerable:!0, configurable:!0}); - d.instanceConstructor = d; - d.callableConstructor = function(b, g) { - if (1 === arguments.length && c.isObject(b) && b instanceof d) { + e.instanceConstructor = e; + e.callableConstructor = function(b, f) { + if (1 === arguments.length && d.isObject(b) && b instanceof e) { return b; } switch(arguments.length) { @@ -13475,20 +13736,20 @@ Shumway.AVM2.XRegExp.install(); case 1: return new a.ASQName(b); default: - return new a.ASQName(b, g); + return new a.ASQName(b, f); } }; - return d; + return e; }(a.ASNative); - a.ASQName = Q; - var S; + a.ASQName = T; + var O; (function(b) { b[b.FLAG_IGNORE_COMMENTS = 1] = "FLAG_IGNORE_COMMENTS"; b[b.FLAG_IGNORE_PROCESSING_INSTRUCTIONS = 2] = "FLAG_IGNORE_PROCESSING_INSTRUCTIONS"; b[b.FLAG_IGNORE_WHITESPACE = 4] = "FLAG_IGNORE_WHITESPACE"; b[b.FLAG_PRETTY_PRINTING = 8] = "FLAG_PRETTY_PRINTING"; b[b.ALL = b.FLAG_IGNORE_COMMENTS | b.FLAG_IGNORE_PROCESSING_INSTRUCTIONS | b.FLAG_IGNORE_WHITESPACE | b.FLAG_PRETTY_PRINTING] = "ALL"; - })(S || (S = {})); + })(O || (O = {})); (function(b) { b[b.Unknown = 0] = "Unknown"; b[b.Element = 1] = "Element"; @@ -13497,38 +13758,38 @@ Shumway.AVM2.XRegExp.install(); b[b.Comment = 4] = "Comment"; b[b.ProcessingInstruction = 5] = "ProcessingInstruction"; })(a.ASXMLKind || (a.ASXMLKind = {})); - var O = [null, "element", "attribute", "text", "comment", "processing-instruction"], P = function(e) { - function f(b) { + var Q = [null, "element", "attribute", "text", "comment", "processing-instruction"], S = function(f) { + function c(b) { this._parent = null; - c.isNullOrUndefined(b) && (b = ""); + d.isNullOrUndefined(b) && (b = ""); if ("string" === typeof b && 0 === b.length) { this._kind = 3, this._value = ""; } else { - var a = n(b); - s(b) && (a = a._deepCopy()); + var a = m(b); + r(b) && (a = a._deepCopy()); return a; } } - __extends(f, e); - f.native_settings = function() { - return{$BgignoreComments:f.ignoreComments, $BgignoreProcessingInstructions:f.ignoreProcessingInstructions, $BgignoreWhitespace:f.ignoreWhitespace, $BgprettyPrinting:f.prettyPrinting, $BgprettyIndent:f.prettyIndent}; + __extends(c, f); + c.native_settings = function() { + return{$BgignoreComments:c.ignoreComments, $BgignoreProcessingInstructions:c.ignoreProcessingInstructions, $BgignoreWhitespace:c.ignoreWhitespace, $BgprettyPrinting:c.prettyPrinting, $BgprettyIndent:c.prettyIndent}; }; - f.native_setSettings = function(b) { - c.isNullOrUndefined(b) ? (f.ignoreComments = !0, f.ignoreProcessingInstructions = !0, f.ignoreWhitespace = !0, f.prettyPrinting = !0, f.prettyIndent = 2) : ("boolean" === typeof b.$BgignoreComments && (f.ignoreComments = b.$BgignoreComments), "boolean" === typeof b.$BgignoreProcessingInstructions && (f.ignoreProcessingInstructions = b.$BgignoreProcessingInstructions), "boolean" === typeof b.$BgignoreWhitespace && (f.ignoreWhitespace = b.$BgignoreWhitespace), "boolean" === b.$BgprettyPrinting && - (f.prettyPrinting = b.$BgprettyPrinting), "number" === b.$BgprettyIndent && (f.prettyIndent = b.$BgprettyIndent)); + c.native_setSettings = function(b) { + d.isNullOrUndefined(b) ? (c.ignoreComments = !0, c.ignoreProcessingInstructions = !0, c.ignoreWhitespace = !0, c.prettyPrinting = !0, c.prettyIndent = 2) : ("boolean" === typeof b.$BgignoreComments && (c.ignoreComments = b.$BgignoreComments), "boolean" === typeof b.$BgignoreProcessingInstructions && (c.ignoreProcessingInstructions = b.$BgignoreProcessingInstructions), "boolean" === typeof b.$BgignoreWhitespace && (c.ignoreWhitespace = b.$BgignoreWhitespace), "boolean" === b.$BgprettyPrinting && + (c.prettyPrinting = b.$BgprettyPrinting), "number" === b.$BgprettyIndent && (c.prettyIndent = b.$BgprettyIndent)); }; - f.native_defaultSettings = function() { + c.native_defaultSettings = function() { return{$BgignoreComments:!0, $BgignoreProcessingInstructions:!0, $BgignoreWhitespace:!0, $BgprettyPrinting:!0, $BgprettyIndent:2}; }; - f.prototype.valueOf = function() { + c.prototype.valueOf = function() { return this; }; - f.prototype.equals = function(b) { - return b instanceof V ? b.equals(this) : b instanceof f ? (3 === this._kind || 2 === this._kind) && b.hasSimpleContent() || (3 === b._kind || 2 === b._kind) && this.hasSimpleContent() ? this.toString() === b.toString() : this._deepEquals(b) : this.hasSimpleContent() && this.toString() === M(b); + c.prototype.equals = function(b) { + return b instanceof V ? b.equals(this) : b instanceof c ? (3 === this._kind || 2 === this._kind) && b.hasSimpleContent() || (3 === b._kind || 2 === b._kind) && this.hasSimpleContent() ? this.toString() === b.toString() : this._deepEquals(b) : this.hasSimpleContent() && this.toString() === H(b); }; - f.prototype.init = function(b, d, g, f) { - d = d || f ? new a.ASNamespace(f, d) : void 0; - this._name = new a.ASQName(d, g, 2 === b); + c.prototype.init = function(b, e, f, c) { + e = e || c ? new a.ASNamespace(c, e) : void 0; + this._name = new a.ASQName(e, f, 2 === b); this._kind = b; this._parent = null; switch(b) { @@ -13548,57 +13809,57 @@ Shumway.AVM2.XRegExp.install(); } return this; }; - f.prototype._deepEquals = function(b) { - if (!(b instanceof f) || this._kind !== b._kind || !!this._name !== !!b._name || this._name && !this._name.equals(b._name)) { + c.prototype._deepEquals = function(b) { + if (!(b instanceof c) || this._kind !== b._kind || !!this._name !== !!b._name || this._name && !this._name.equals(b._name)) { return!1; } if (1 !== this._kind) { return this._value !== b._value ? !1 : !0; } - var a = this._attributes, d = b._attributes; - if (a.length !== d.length) { + var a = this._attributes, e = b._attributes; + if (a.length !== e.length) { return!1; } - var g = this._children; + var f = this._children; b = b._children; - if (g.length !== b.length) { + if (f.length !== b.length) { return!1; } - var e = 0; - a: for (;e < a.length;e++) { - for (var k = a[e], r = 0;r < d.length;r++) { - var c = d[r]; - if (c._name.equals(k._name) && c._value === k._value) { + var g = 0; + a: for (;g < a.length;g++) { + for (var n = a[g], q = 0;q < e.length;q++) { + var h = e[q]; + if (h._name.equals(n._name) && h._value === n._value) { continue a; } } return!1; } - for (e = 0;e < g.length;e++) { - if (!g[e].equals(b[e])) { + for (g = 0;g < f.length;g++) { + if (!f[g].equals(b[g])) { return!1; } } return!0; }; - f.prototype._deepCopy = function() { - var b = this._kind, d = new a.ASXML; - d._kind = b; - d._name = this._name; + c.prototype._deepCopy = function() { + var b = this._kind, e = new a.ASXML; + e._kind = b; + e._name = this._name; switch(b) { case 1: - d._inScopeNamespaces = []; + e._inScopeNamespaces = []; 0 < this._inScopeNamespaces.length && this._inScopeNamespaces.forEach(function(b) { - d._inScopeNamespaces.push(new a.ASNamespace(b.prefix, b.uri)); + e._inScopeNamespaces.push(new a.ASNamespace(b.prefix, b.uri)); }); - d._attributes = this._attributes.map(function(b) { + e._attributes = this._attributes.map(function(b) { b = b._deepCopy(); - b._parent = d; + b._parent = e; return b; }); - d._children = this._children.map(function(b) { + e._children = this._children.map(function(b) { b = b._deepCopy(); - b._parent = d; + b._parent = e; return b; }); break; @@ -13609,179 +13870,178 @@ Shumway.AVM2.XRegExp.install(); case 2: ; case 3: - d._value = this._value; + e._value = this._value; } - return d; + return e; }; - f.prototype.resolveValue = function() { + c.prototype.resolveValue = function() { return this; }; - f.prototype._addInScopeNamespaces = function(b) { + c.prototype._addInScopeNamespaces = function(b) { this._inScopeNamespaces.some(function(a) { return a.uri === b.uri && a.prefix === b.prefix; }) || this._inScopeNamespaces.push(b); }; - Object.defineProperty(f, "ignoreComments", {get:function() { - return!!(f._flags & 1); + Object.defineProperty(c, "ignoreComments", {get:function() { + return!!(c._flags & 1); }, set:function(b) { - f._flags = b ? f._flags | 1 : f._flags & -2; + c._flags = b ? c._flags | 1 : c._flags & -2; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f, "ignoreProcessingInstructions", {get:function() { - return!!(f._flags & 2); + Object.defineProperty(c, "ignoreProcessingInstructions", {get:function() { + return!!(c._flags & 2); }, set:function(b) { - f._flags = b ? f._flags | 2 : f._flags & -3; + c._flags = b ? c._flags | 2 : c._flags & -3; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f, "ignoreWhitespace", {get:function() { - return!!(f._flags & 4); + Object.defineProperty(c, "ignoreWhitespace", {get:function() { + return!!(c._flags & 4); }, set:function(b) { - f._flags = b ? f._flags | 4 : f._flags & -5; + c._flags = b ? c._flags | 4 : c._flags & -5; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f, "prettyPrinting", {get:function() { - return!!(f._flags & 8); + Object.defineProperty(c, "prettyPrinting", {get:function() { + return!!(c._flags & 8); }, set:function(b) { - f._flags = b ? f._flags | 8 : f._flags & -9; + c._flags = b ? c._flags | 8 : c._flags & -9; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f, "prettyIndent", {get:function() { - return f._prettyIndent; + Object.defineProperty(c, "prettyIndent", {get:function() { + return c._prettyIndent; }, set:function(b) { - f._prettyIndent = b | 0; + c._prettyIndent = b | 0; }, enumerable:!0, configurable:!0}); - f.prototype.toString = function() { - return f.isTraitsOrDynamicPrototype(this) ? "" : this.hasComplexContent() ? this.toXMLString() : v(this); + c.prototype.toString = function() { + return c.isTraitsOrDynamicPrototype(this) ? "" : this.hasComplexContent() ? this.toXMLString() : v(this); }; - f.prototype.native_hasOwnProperty = function(b) { - if (f.isTraitsOrDynamicPrototype(this)) { - return a.ASObject.prototype.native_hasOwnProperty.call(this, b); + c.prototype.native_hasOwnProperty = function(e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return a.ASObject.prototype.native_hasOwnProperty.call(this, e); } - var g = d(b); - return this.hasProperty(g, !!(g.flags & 1), !1) ? !0 : J.call(this, String(b)); + var f = b(e); + return this.hasProperty(f, !!(f.flags & 1), !1) ? !0 : E.call(this, String(e)); }; - f.prototype.native_propertyIsEnumerable = function(b) { + c.prototype.native_propertyIsEnumerable = function(b) { void 0 === b && (b = void 0); return "0" === String(b); }; - f.prototype.addNamespace = function(b) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.addNamespace = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); this._addInScopeNamespaces(new a.ASNamespace(b)); return this; }; - f.prototype.appendChild = function(b) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.appendChild = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); if (b._parent) { var a = b._parent._children.indexOf(b); - z(0 <= a); b._parent._children.splice(a, 1); } this._children.push(b); b._parent = this; return this; }; - f.prototype.attribute = function(b) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.attribute = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this.getProperty(b, !0); }; - f.prototype.attributes = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.attributes = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); var b = a.ASXMLList.createList(this, this._name); Array.prototype.push.apply(b._children, this._attributes); return b; }; - f.prototype.child = function(d) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - if (c.isIndex(d)) { - var g = a.ASXMLList.createList(); - this._children && d < this._children.length && g.append(this._children[d | 0]); - return g; + c.prototype.child = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + if (d.isIndex(b)) { + var f = a.ASXMLList.createList(); + this._children && b < this._children.length && f.append(this._children[b | 0]); + return f; } - return this.getProperty(d, b(d)); + return this.getProperty(b, e(b)); }; - f.prototype.childIndex = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.childIndex = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._parent && 2 !== this._kind ? this._parent._children.indexOf(this) : -1; }; - f.prototype.children = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.children = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); var b = a.ASXMLList.createList(this, this._name); Array.prototype.push.apply(b._children, this._children); return b; }; - f.prototype.comments = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.comments = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); var b = a.ASXMLList.createList(this, this._name); - this._children && this._children.forEach(function(a, d) { + this._children && this._children.forEach(function(a, e) { 4 === a._kind && b.append(a); }); return b; }; - f.prototype.contains = function(b) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.contains = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this === b; }; - f.prototype.copy = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.copy = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._deepCopy(); }; - f.prototype.descendants = function(b) { - void 0 === b && (b = "*"); - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - var g = a.ASXMLList.createList(this, this._name); - b = d(b); - return this.descendantsInto(b, g); + c.prototype.descendants = function(e) { + void 0 === e && (e = "*"); + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + var f = a.ASXMLList.createList(this, this._name); + e = b(e); + return this.descendantsInto(e, f); }; - f.prototype.elements = function(b) { + c.prototype.elements = function(b) { void 0 === b && (b = "*"); - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this.getProperty(b, !1); }; - f.prototype.hasComplexContent = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.hasComplexContent = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return 2 === this._kind || 4 === this._kind || 5 === this._kind || 3 === this._kind ? !1 : this._children.some(function(b) { return 1 === b._kind; }); }; - f.prototype.hasSimpleContent = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.hasSimpleContent = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return 4 === this._kind || 5 === this._kind ? !1 : 1 !== this._kind || !this._children && 0 === this._children.length ? !0 : this._children.every(function(b) { return 1 !== b._kind; }); }; - f.prototype.inScopeNamespaces = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.inScopeNamespaces = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._inScopeNamespacesImpl(!1); }; - f.prototype._inScopeNamespacesImpl = function(b) { - var a = this, d = []; - for (b = b ? d : {};null !== a;) { - for (var g = a._inScopeNamespaces, f = 0;g && f < g.length;f++) { - var e = g[f]; - b[e.prefix] || (b[e.prefix] = e, d.push(e)); + c.prototype._inScopeNamespacesImpl = function(b) { + var a = this, e = []; + for (b = b ? e : {};null !== a;) { + for (var f = a._inScopeNamespaces, c = 0;f && c < f.length;c++) { + var g = f[c]; + b[g.prefix] || (b[g.prefix] = g, e.push(g)); } a = a._parent; } - return d; + return e; }; - f.prototype.insertChildAfter = function(b, a) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - B("public.XML::insertChildAfter"); + c.prototype.insertChildAfter = function(b, a) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + A("public.XML::insertChildAfter"); }; - f.prototype.insertChildBefore = function(b, a) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - B("public.XML::insertChildBefore"); + c.prototype.insertChildBefore = function(b, a) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + A("public.XML::insertChildBefore"); }; - f.prototype.length = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.length = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._children ? this._children.length : 0; }; - f.prototype.localName = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.localName = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._name.localName; }; - f.prototype.name = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.name = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); return this._name; }; - f.prototype.namespace = function(b) { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.namespace = function(b) { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); if (0 === arguments.length && 3 <= this._kind) { return null; } @@ -13789,24 +14049,24 @@ Shumway.AVM2.XRegExp.install(); if (0 === arguments.length) { return this._name.getNamespace(a); } - b = M(b); - for (var d = 0;d < a.length;d++) { - var g = a[d]; - if (g.prefix === b) { - return g; + b = H(b); + for (var e = 0;e < a.length;e++) { + var f = a[e]; + if (f.prefix === b) { + return f; } } }; - f.prototype.namespaceDeclarations = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - B("public.XML::namespaceDeclarations"); + c.prototype.namespaceDeclarations = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + A("public.XML::namespaceDeclarations"); }; - f.prototype.nodeKind = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); - return O[this._kind]; + c.prototype.nodeKind = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); + return Q[this._kind]; }; - f.prototype.normalize = function() { - this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML"); + c.prototype.normalize = function() { + this instanceof c || k.Runtime.throwError("TypeError", k.Errors.CheckTypeFailedError, this, "XML"); for (var b = 0;b < this._children.length;) { var a = this._children[b]; if (1 === a._kind) { @@ -13814,11 +14074,11 @@ Shumway.AVM2.XRegExp.install(); } else { if (3 === a._kind) { for (b++;b < this._children.length;) { - var d = this._children[b]; - if (3 !== d._kind) { + var e = this._children[b]; + if (3 !== e._kind) { break; } - a._value += d._value; + a._value += e._value; this.removeByIndex(b); } 0 === a._value.length ? this.removeByIndex(b) : b++; @@ -13829,452 +14089,446 @@ Shumway.AVM2.XRegExp.install(); } return this; }; - f.prototype.removeByIndex = function(b) { + c.prototype.removeByIndex = function(b) { this._children[b]._parent = null; this._children.splice(b, 1); }; - f.prototype.parent = function() { + c.prototype.parent = function() { return this._parent || void 0; }; - f.prototype.processingInstructions = function(b) { - void 0 === b && (b = "*"); - var g = d(b).localName, f = a.ASXMLList.createList(this, this._name); - f._targetObject = this; - f._targetProperty = null; - return this.processingInstructionsInto(b, g, f); + c.prototype.processingInstructions = function(e) { + void 0 === e && (e = "*"); + var f = b(e).localName, c = a.ASXMLList.createList(this, this._name); + c._targetObject = this; + c._targetProperty = null; + return this.processingInstructionsInto(e, f, c); }; - f.prototype.processingInstructionsInto = function(b, a, d) { - var g = this._children; - if (!g) { - return d; + c.prototype.processingInstructionsInto = function(b, a, e) { + var f = this._children; + if (!f) { + return e; } - for (var f = 0;f < g.length;f++) { - var e = g[f]; - 5 !== e._kind || "*" !== b && e._name.localName !== a || d._children.push(e); + for (var c = 0;c < f.length;c++) { + var g = f[c]; + 5 !== g._kind || "*" !== b && g._name.localName !== a || e._children.push(g); } - return d; + return e; }; - f.prototype.prependChild = function(b) { - B("public.XML::prependChild"); + c.prototype.prependChild = function(b) { + A("public.XML::prependChild"); }; - f.prototype.removeNamespace = function(b) { - B("public.XML::removeNamespace"); + c.prototype.removeNamespace = function(b) { + A("public.XML::removeNamespace"); }; - f.prototype.replace = function(b, a) { - var d, g = this; - if (3 === g._kind || 4 === g._kind || 5 === g._kind || 2 === g._kind) { - return g; + c.prototype.replace = function(b, a) { + var e, f = this; + if (3 === f._kind || 4 === f._kind || 5 === f._kind || 2 === f._kind) { + return f; } if (1 === a._kind) { - for (d = g;d;) { - if (d === a) { + for (e = f;e;) { + if (e === a) { throw "Error in XML.prototype.replace()"; } - d = d._parent; + e = e._parent; } } - d = b >>> 0; - if (String(b) === String(d)) { - d >= g.length() && (b = String(g.length())), g._children && g._children[b] && (g._children[b]._parent = null); + e = b >>> 0; + if (String(b) === String(e)) { + e >= f.length() && (b = String(f.length())), f._children && f._children[b] && (f._children[b]._parent = null); } else { - d = this.getProperty(b, !1); - if (0 === d.length()) { - return g; + e = this.getProperty(b, !1); + if (0 === e.length()) { + return f; } - g._children && d._children.forEach(function(a, d) { - var f = g._children.indexOf(a); + f._children && e._children.forEach(function(a, e) { + var c = f._children.indexOf(a); a._parent = null; - 0 === d ? (b = String(f), g._children.splice(f, 1, void 0)) : g._children.splice(f, 1); + 0 === e ? (b = String(c), f._children.splice(c, 1, void 0)) : f._children.splice(c, 1); }); } if (1 === a._kind || 3 === a._kind || 4 === a._kind || 5 === a._kind) { - a._parent = g, g._children || (g._children = []), g._children[b] = a; + a._parent = f, f._children || (f._children = []), f._children[b] = a; } else { - d = v(a); - var f = w(); - f._parent = g; - f._value = d; - g._children || (g._children = []); - g._children[b] = f; + e = v(a); + var c = x(); + c._parent = f; + c._value = e; + f._children || (f._children = []); + f._children[b] = c; } - return g; + return f; }; - f.prototype.setChildren = function(b) { + c.prototype.setChildren = function(b) { this.setProperty("*", !1, b); return this; }; - f.prototype.setLocalName = function(b) { - B("public.XML::setLocalName"); + c.prototype.setLocalName = function(b) { + A("public.XML::setLocalName"); }; - f.prototype.setName = function(b) { + c.prototype.setName = function(b) { if (3 !== this._kind && 4 !== this._kind) { b instanceof a.ASQName && null === b.uri && (b = b.localName); - b = new Q(b); + b = new T(b); 5 === this._kind && b.setUri(); this._name = b; - var d = this; + var e = this; if (2 === this._kind) { if (null === this._parent) { return; } - d = this._parent; + e = this._parent; } - d.addInScopeNamespace(new a.ASNamespace(b.uri)); + e.addInScopeNamespace(new a.ASNamespace(b.uri)); } }; - f.prototype.setNamespace = function(b) { - B("public.XML::setNamespace"); + c.prototype.setNamespace = function(b) { + A("public.XML::setNamespace"); }; - f.prototype.text = function() { + c.prototype.text = function() { var b = a.ASXMLList.createList(this, this._name); - this._children && this._children.forEach(function(a, d) { + this._children && this._children.forEach(function(a, e) { 3 === a._kind && b.append(a); }); return b; }; - f.prototype.toXMLString = function() { - return q(this); + c.prototype.toXMLString = function() { + return s(this); }; - f.prototype.toJSON = function(b) { + c.prototype.toJSON = function(b) { return "XML"; }; - f.isTraitsOrDynamicPrototype = function(b) { - return b === f.traitsPrototype || b === f.dynamicPrototype; + c.isTraitsOrDynamicPrototype = function(b) { + return b === c.traitsPrototype || b === c.dynamicPrototype; }; - f.prototype.asGetEnumerableKeys = function() { - if (f.isTraitsOrDynamicPrototype(this)) { - return E.call(this); + c.prototype.asGetEnumerableKeys = function() { + if (c.isTraitsOrDynamicPrototype(this)) { + return z.call(this); } var b = []; - this._children.forEach(function(a, d) { + this._children.forEach(function(a, e) { b.push(a.name); }); return b; }; - f.prototype.setProperty = function(b, g, f) { - b === b >>> 0 && h.Runtime.throwError("TypeError", h.Errors.XMLAssignmentToIndexedXMLNotAllowed); + c.prototype.setProperty = function(e, f, c) { + e === e >>> 0 && k.Runtime.throwError("TypeError", k.Errors.XMLAssignmentToIndexedXMLNotAllowed); if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) { - if (f = s(f) && 3 !== f._kind && 2 !== f._kind ? f._deepCopy() : v(f), b = d(b), g) { - if (r(b.name)) { - if (f instanceof a.ASXMLList) { - if (0 === f._children.length) { - f = ""; + if (c = r(c) && 3 !== c._kind && 2 !== c._kind ? c._deepCopy() : v(c), e = b(e), f) { + if (n(e.name)) { + if (c instanceof a.ASXMLList) { + if (0 === c._children.length) { + c = ""; } else { - g = v(f._children[0]); - for (var e = 1;e < f._children.length;e++) { - g += " " + v(f._children[e]); + f = v(c._children[0]); + for (var g = 1;g < c._children.length;g++) { + f += " " + v(c._children[g]); } - f = g; + c = f; } } else { - f = M(f); + c = H(c); } - g = null; - for (var k = this._attributes, c = this._attributes = [], e = 0;k && e < k.length;e++) { - var m = k[e]; - if (m._name.equals(b)) { - if (g) { + f = null; + for (var q = this._attributes, h = this._attributes = [], g = 0;q && g < q.length;g++) { + var m = q[g]; + if (m._name.equals(e)) { + if (f) { m._parent = null; continue; } else { - g = m; + f = m; } } - c.push(m); + h.push(m); } - g || (g = w(2, b.uri, b.localName), g._parent = this, c.push(g)); - g._value = f; + f || (f = x(2, e.uri, e.localName), f._parent = this, h.push(f)); + f._value = c; } } else { - g = !s(f) && "*" !== b.localName; - k = b.flags & 4; - c = b.flags & 8; + f = !r(c) && "*" !== e.localName; + q = e.flags & 4; + h = e.flags & 8; for (m = this.length() - 1;0 <= m;m--) { - (k || 1 === this._children[m]._kind && this._children[m]._name.localName === b.localName) && (c || 1 === this._children[m]._kind && this._children[m]._name.uri === b.uri) && (void 0 !== e && this.deleteByIndex(e), e = m); + (q || 1 === this._children[m]._kind && this._children[m]._name.localName === e.localName) && (h || 1 === this._children[m]._kind && this._children[m]._name.uri === e.uri) && (void 0 !== g && this.deleteByIndex(g), g = m); } - void 0 === e && (e = this.length(), g && (k = null === b.uri ? new a.ASQName(new a.ASNamespace("", P.defaultNamespace), b) : new a.ASQName(b), b = w(1, k.uri, k.localName, k.prefix), b._parent = this, k = k.getNamespace(), this.replace(String(e), b), b.addInScopeNamespace(k))); - g ? (this._children[e]._children = [], g = v(f), "" !== g && this._children[e].replace("0", g)) : this.replace(String(e), f); + void 0 === g && (g = this.length(), f && (q = null === e.uri ? new a.ASQName(new a.ASNamespace("", S.defaultNamespace), e) : new a.ASQName(e), e = x(1, q.uri, q.localName, q.prefix), e._parent = this, q = q.getNamespace(), this.replace(String(g), e), e.addInScopeNamespace(q))); + f ? (this._children[g]._children = [], f = v(c), "" !== f && this._children[g].replace("0", f)) : this.replace(String(g), c); } } }; - f.prototype.asSetProperty = function(b, a, d, e) { - if (f.isTraitsOrDynamicPrototype(this)) { - return D.call(this, b, a, d, e); + c.prototype.asSetProperty = function(b, a, e, f) { + if (c.isTraitsOrDynamicPrototype(this)) { + return M.call(this, b, a, e, f); } - d = !!(d & A.ATTRIBUTE); - this.setProperty(g(b, a, d), d, e); + e = !!(e & L.ATTRIBUTE); + this.setProperty(q(b, a, e), e, f); }; - f.prototype.getProperty = function(b, g) { - if (c.isIndex(b) || !A.isQName(b) && c.isNumeric(b)) { - return 0 === (b | 0) ? this : null; + c.prototype.getProperty = function(e, f) { + if (d.isIndex(e) || !L.isQName(e) && d.isNumeric(e)) { + return 0 === (e | 0) ? this : null; } - var f = d(b), e = a.ASXMLList.createList(this, this._name); - e._targetObject = this; - e._targetProperty = f; - var k = 0, r = f.name.flags, m = r & 4, w = r & 8; - if (g || r & 1) { - for (r = 0;this._attributes && r < this._attributes.length;r++) { - var l = this._attributes[r]; - !m && l._name.localName !== f.localName || !w && l._name.uri !== f.uri || (e._children[k++] = l); + var c = b(e), g = a.ASXMLList.createList(this, this._name); + g._targetObject = this; + g._targetProperty = c; + var n = 0, q = c.name.flags, h = q & 4, m = q & 8; + if (f || q & 1) { + for (q = 0;this._attributes && q < this._attributes.length;q++) { + var p = this._attributes[q]; + !h && p._name.localName !== c.localName || !m && p._name.uri !== c.uri || (g._children[n++] = p); } - return e; + return g; } - for (r = 0;this._children && r < this._children.length;r++) { - l = this._children[r], (m || 1 === l._kind && l._name.localName === f.localName) && (w || 1 === l._kind && l._name.uri === f.uri) && (e._children[k++] = l); + for (q = 0;this._children && q < this._children.length;q++) { + p = this._children[q], (h || 1 === p._kind && p._name.localName === c.localName) && (m || 1 === p._kind && p._name.uri === c.uri) && (g._children[n++] = p); } - return e; + return g; }; - f.prototype.asGetNumericProperty = function(b) { + c.prototype.asGetNumericProperty = function(b) { return this.asGetProperty(null, b, 0); }; - f.prototype.asSetNumericProperty = function(b, a) { + c.prototype.asSetNumericProperty = function(b, a) { this.asSetProperty(null, b, 0, a); }; - f.prototype.asGetProperty = function(b, a, d) { - if (f.isTraitsOrDynamicPrototype(this)) { - return y.call(this, b, a, d); + c.prototype.asGetProperty = function(b, a, e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return J.call(this, b, a, e); } - d = !!(d & A.ATTRIBUTE); - return this.getProperty(g(b, a, d), d); + e = !!(e & L.ATTRIBUTE); + return this.getProperty(q(b, a, e), e); }; - f.prototype.hasProperty = function(b, a, g) { - if (g) { - return a = A.isQName(b) ? b : this.resolveMultinameProperty(b.namespaces, b.name, b.flags), !!this[A.getQualifiedName(a)]; + c.prototype.hasProperty = function(a, e, f) { + if (f) { + return e = L.isQName(a) ? a : this.resolveMultinameProperty(a.namespaces, a.name, a.flags), !!this[L.getQualifiedName(e)]; } - if (c.isIndex(b)) { - return 0 === Number(b); + if (d.isIndex(a)) { + return 0 === Number(a); } - b = d(b); - var f = b.name.flags; - g = f & 4; - f &= 8; - if (a) { - for (a = 0;this._attributes && a < this._attributes.length;a++) { - var e = this._attributes[a]; - if (g || e._name.localName === b.localName && (f || e._name.uri === b.uri)) { + a = b(a); + var c = a.name.flags; + f = c & 4; + c &= 8; + if (e) { + for (e = 0;this._attributes && e < this._attributes.length;e++) { + var g = this._attributes[e]; + if (f || g._name.localName === a.localName && (c || g._name.uri === a.uri)) { return!0; } } return!1; } - for (a = 0;a < this._children.length;a++) { - if (e = this._children[a], (g || 1 === e._kind && e._name.localName === b.localName) && (f || 1 === e._kind && e._name.uri === b.uri)) { + for (e = 0;e < this._children.length;e++) { + if (g = this._children[e], (f || 1 === g._kind && g._name.localName === a.localName) && (c || 1 === g._kind && g._name.uri === a.uri)) { return!0; } } }; - f.prototype.deleteProperty = function(b, a) { - if (c.isIndex(b)) { + c.prototype.deleteProperty = function(a, e) { + if (d.isIndex(a)) { return!0; } - var g = d(b), f = g.localName, e = g.uri, k = g.name.flags, r = k & 4, m = k & 8; - if (a) { - if (k = this._attributes) { - for (var w = this._attributes = [], l = 0;l < k.length;l++) { - var n = k[l], q = n._name; - !r && q.localName !== f || !m && q.uri !== e ? w.push(n) : n._parent = null; + var f = b(a), c = f.localName, g = f.uri, n = f.name.flags, q = n & 4, h = n & 8; + if (e) { + if (n = this._attributes) { + for (var m = this._attributes = [], p = 0;p < n.length;p++) { + var l = n[p], x = l._name; + !q && x.localName !== c || !h && x.uri !== g ? m.push(l) : l._parent = null; } } } else { if (this._children.some(function(b, a) { - return(r || 1 === b._kind && b._name.localName === g.localName) && (m || 1 === b._kind && b._name.uri === g.uri); + return(q || 1 === b._kind && b._name.localName === f.localName) && (h || 1 === b._kind && b._name.uri === f.uri); })) { return!0; } } }; - f.prototype.asHasProperty = function(b, a, d) { - if (f.isTraitsOrDynamicPrototype(this)) { - return H.call(this, b, a, d); + c.prototype.asHasProperty = function(b, a, e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return B.call(this, b, a, e); } - var e = !!(d & A.ATTRIBUTE); - a = g(b, a, e); - if (this.hasProperty(a, e, !1)) { + var f = !!(e & L.ATTRIBUTE); + a = q(b, a, f); + if (this.hasProperty(a, f, !1)) { return!0; } - b = A.isQName(a) ? a : this.resolveMultinameProperty(b, a, d); - return!!this[A.getQualifiedName(b)]; + b = L.isQName(a) ? a : this.resolveMultinameProperty(b, a, e); + return!!this[L.getQualifiedName(b)]; }; - f.prototype._asDeleteProperty = function(b, a, d) { - if (f.isTraitsOrDynamicPrototype(this)) { - return C.call(this, b, a, d); + c.prototype._asDeleteProperty = function(b, a, e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return y.call(this, b, a, e); } - var e = !!(d & A.ATTRIBUTE); - a = g(b, a, e); - if (this.deleteProperty(a, e)) { + var f = !!(e & L.ATTRIBUTE); + a = q(b, a, f); + if (this.deleteProperty(a, f)) { return!0; } - b = A.isQName(a) ? a : this.resolveMultinameProperty(b, a, d); - return delete this[A.getQualifiedName(b)]; + b = L.isQName(a) ? a : this.resolveMultinameProperty(b, a, e); + return delete this[L.getQualifiedName(b)]; }; - f.prototype.asHasPropertyInternal = function(b, a, d) { - return this.asHasProperty(b, a, d); + c.prototype.asHasPropertyInternal = function(b, a, e) { + return this.asHasProperty(b, a, e); }; - f.prototype.asCallProperty = function(b, a, d, g, e) { - if (f.isTraitsOrDynamicPrototype(this) || g) { - return L.call(this, b, a, d, g, e); + c.prototype.asCallProperty = function(b, a, e, f, g) { + if (c.isTraitsOrDynamicPrototype(this) || f) { + return D.call(this, b, a, e, f, g); } - var k; - k = this.resolveMultinameProperty(b, a, d); - if (this.asGetNumericProperty && A.isNumeric(k)) { - k = this.asGetNumericProperty(k); - } else { - var r = this.asOpenMethods; - k = r && r[k] || this[k]; - } - if (k) { - return k.asApply(g ? null : this, e); + var n; + n = this.resolveMultinameProperty(b, a, e); + if (n = this.asOpenMethods[n] || this[n]) { + return n.apply(f ? null : this, g); } if (this.hasSimpleContent()) { - return Object(v(this)).asCallProperty(b, a, d, g, e); + return Object(v(this)).asCallProperty(b, a, e, f, g); } - throw new TypeError; + throwError("TypeError", k.Errors.CallOfNonFunctionError, "value"); }; - f.prototype._delete = function(b, a) { - B("XML.[[Delete]]"); + c.prototype._delete = function(b, a) { + A("XML.[[Delete]]"); }; - f.prototype.deleteByIndex = function(b) { + c.prototype.deleteByIndex = function(b) { if (String(b >>> 0) !== String(b)) { throw "TypeError in XML.prototype.deleteByIndex(): invalid index " + b; } var a = this._children; b < a.length && a[b] && (a[b]._parent = null, a.splice(b, 1)); }; - f.prototype.insert = function(b, a) { - var d, g; + c.prototype.insert = function(b, a) { + var e, f; if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) { - d = b >>> 0; - if (String(b) !== String(d)) { + e = b >>> 0; + if (String(b) !== String(e)) { throw "TypeError in XML.prototype.insert(): invalid property name " + b; } if (1 === this._kind) { - for (g = this;g;) { - if (g === a) { + for (f = this;f;) { + if (f === a) { throw "Error in XML.prototype.insert()"; } - g = g._parent; + f = f._parent; } } if (this instanceof V) { - if (g = this.length(), 0 === g) { + if (f = this.length(), 0 === f) { return; } } else { - g = 1; + f = 1; } - for (var f = this.length() - 1;f >= d;f--) { - this._children[f + g] = this._children[f]; + for (var c = this.length() - 1;c >= e;c--) { + this._children[c + f] = this._children[c]; } if (this instanceof V) { - for (g = a.length(), f = 0;f < g;f++) { - a._children[f]._parent = this, this[d + f] = a[f]; + for (f = a.length(), c = 0;c < f;c++) { + a._children[c]._parent = this, this[e + c] = a[c]; } } else { - a._parent = this, this._children || (this._children = []), this._children[d] = a; + a._parent = this, this._children || (this._children = []), this._children[e] = a; } } }; - f.prototype.addInScopeNamespace = function(b) { + c.prototype.addInScopeNamespace = function(b) { var a = this; if (3 !== a._kind && 4 !== a._kind && 5 !== a._kind && 2 !== a._kind && void 0 !== b.prefix && ("" !== b.prefix || "" !== a._name.uri)) { - var d = null; - a._inScopeNamespaces.forEach(function(a, g) { - a.prefix === b.prefix && (d = a); + var e = null; + a._inScopeNamespaces.forEach(function(a, f) { + a.prefix === b.prefix && (e = a); }); - null !== d && d.uri !== b.uri && a._inScopeNamespaces.forEach(function(g, f) { - g.prefix === d.prefix && (a._inScopeNamespaces[f] = b); + null !== e && e.uri !== b.uri && a._inScopeNamespaces.forEach(function(f, c) { + f.prefix === e.prefix && (a._inScopeNamespaces[c] = b); }); a._name.prefix === b.prefix && (a._name.prefix = void 0); - a._attributes.forEach(function(a, d) { + a._attributes.forEach(function(a, e) { a._name.prefix === b.prefix && (a._name.prefix = void 0); }); } }; - f.prototype.descendantsInto = function(b, a) { - var d = b.flags; + c.prototype.descendantsInto = function(b, a) { + var e = b.flags; if (1 !== this._kind) { return a; } - var g = a._children.length, f = b.localName, e = b.uri, k = d & 4; - d & 1 ? this._attributes.forEach(function(b, d) { - if (k || f === b._name.localName && e === b._name.uri) { - a._children[g++] = b; + var f = a._children.length, c = b.localName, g = b.uri, n = e & 4; + e & 1 ? this._attributes.forEach(function(b, e) { + if (n || c === b._name.localName && g === b._name.uri) { + a._children[f++] = b; } - }) : this._children.forEach(function(b, d) { - if (k || f === b._name.localName && e === b._name.uri) { - a._children[g++] = b; + }) : this._children.forEach(function(b, e) { + if (n || c === b._name.localName && g === b._name.uri) { + a._children[f++] = b; } }); - this._children.forEach(function(d, g) { - d.descendantsInto(b, a); + this._children.forEach(function(e, f) { + e.descendantsInto(b, a); }); return a; }; - f.instanceConstructor = f; - f.classInitializer = function() { - var b = f.prototype; - N(b, "asDeleteProperty", b._asDeleteProperty); - N(b, "$BgvalueOf", Object.prototype.$BgvalueOf); - N(b, "$BghasOwnProperty", b.native_hasOwnProperty); - N(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable); - K(f, ["settings", "setSettings", "defaultSettings"]); - K(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" ")); + c.instanceConstructor = c; + c.classInitializer = function() { + var b = c.prototype; + K(b, "asDeleteProperty", b._asDeleteProperty); + K(b, "$BgvalueOf", Object.prototype.$BgvalueOf); + K(b, "$BghasOwnProperty", b.native_hasOwnProperty); + K(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable); + F(c, ["settings", "setSettings", "defaultSettings"]); + F(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" ")); }; - f.callableConstructor = function(b) { - c.isNullOrUndefined(b) && (b = ""); - return n(b); + c.callableConstructor = function(b) { + d.isNullOrUndefined(b) && (b = ""); + return m(b); }; - f.defaultNamespace = ""; - f._flags = S.ALL; - f._prettyIndent = 2; - return f; + c.defaultNamespace = ""; + c._flags = O.ALL; + c._prettyIndent = 2; + return c; }(a.ASNative); - a.ASXML = P; + a.ASXML = S; var V = function(f) { - function e(b) { + function c(b) { this._children = []; - c.isNullOrUndefined(b) && (b = ""); + d.isNullOrUndefined(b) && (b = ""); if (b) { - if (b instanceof e) { + if (b instanceof c) { b = b._children; for (var a = 0;a < b.length;a++) { this._children[a] = b[a]; } } else { - k(b, this); + g(b, this); } } } - __extends(e, f); - e.addXML = function(b, d) { - var g; - b instanceof P ? (g = new a.ASXMLList, g.append(b)) : g = b; - g.append(d); - return g; + __extends(c, f); + c.addXML = function(b, e) { + var f; + b instanceof S ? (f = new a.ASXMLList, f.append(b)) : f = b; + f.append(e); + return f; }; - e.createList = function(b, d) { + c.createList = function(b, e) { void 0 === b && (b = null); - void 0 === d && (d = null); - var g = new a.ASXMLList; - g._targetObject = b; - g._targetProperty = d; - return g; + void 0 === e && (e = null); + var f = new a.ASXMLList; + f._targetObject = b; + f._targetProperty = e; + return f; }; - e.prototype.valueOf = function() { + c.prototype.valueOf = function() { return this; }; - e.prototype.equals = function(b) { + c.prototype.equals = function(b) { var a = this._children; if (void 0 === b && 0 === a.length) { return!0; } - if (b instanceof e) { + if (b instanceof c) { b = b._children; if (b.length !== a.length) { return!1; } - for (var d = 0;d < a.length;d++) { - if (!a[d].equals(b[d])) { + for (var e = 0;e < a.length;e++) { + if (!a[e].equals(b[e])) { return!1; } } @@ -14282,7 +14536,7 @@ Shumway.AVM2.XRegExp.install(); } return 1 === a.length && a[0].equals(b); }; - e.prototype.toString = function() { + c.prototype.toString = function() { if (this.hasComplexContent()) { return this.toXMLString(); } @@ -14291,90 +14545,90 @@ Shumway.AVM2.XRegExp.install(); } return b; }; - e.prototype._deepCopy = function() { - for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), d = this.length(), g = 0;g < d;g++) { - b._children[g] = this._children[g]._deepCopy(); + c.prototype._deepCopy = function() { + for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), e = this.length(), f = 0;f < e;f++) { + b._children[f] = this._children[f]._deepCopy(); } return b; }; - e.prototype._shallowCopy = function() { - for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), d = this.length(), g = 0;g < d;g++) { - b._children[g] = this._children[g]; + c.prototype._shallowCopy = function() { + for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), e = this.length(), f = 0;f < e;f++) { + b._children[f] = this._children[f]; } return b; }; - e.prototype.native_hasOwnProperty = function(b) { - b = M(b); - if (e.isTraitsOrDynamicPrototype(this)) { - return a.ASObject.prototype.native_hasOwnProperty.call(this, b); + c.prototype.native_hasOwnProperty = function(e) { + e = H(e); + if (c.isTraitsOrDynamicPrototype(this)) { + return a.ASObject.prototype.native_hasOwnProperty.call(this, e); } - if (c.isIndex(b)) { - return(b | 0) < this._children.length; + if (d.isIndex(e)) { + return(e | 0) < this._children.length; } - b = d(b); - for (var g = !!(b.flags & 1), f = this._children, k = 0;k < f.length;k++) { - var r = f[k]; - if (1 === r._kind && r.hasProperty(b, g, !1)) { + e = b(e); + for (var f = !!(e.flags & 1), g = this._children, n = 0;n < g.length;n++) { + var q = g[n]; + if (1 === q._kind && q.hasProperty(e, f, !1)) { return!0; } } return!1; }; - e.prototype.native_propertyIsEnumerable = function(b) { - return c.isIndex(b) && (b | 0) < this._children.length; + c.prototype.native_propertyIsEnumerable = function(b) { + return d.isIndex(b) && (b | 0) < this._children.length; }; - e.prototype.attribute = function(b) { + c.prototype.attribute = function(b) { return this.getProperty(b, !0); }; - e.prototype.attributes = function() { + c.prototype.attributes = function() { return this.getProperty("*", !0); }; - e.prototype.child = function(b) { - if (c.isIndex(b)) { - var d = a.ASXMLList.createList(this._targetObject, this._targetProperty); - b < this._children.length && (d._children[0] = this._children[b | 0]._deepCopy()); - return d; + c.prototype.child = function(b) { + if (d.isIndex(b)) { + var e = a.ASXMLList.createList(this._targetObject, this._targetProperty); + b < this._children.length && (e._children[0] = this._children[b | 0]._deepCopy()); + return e; } return this.getProperty(b, !1); }; - e.prototype.children = function() { + c.prototype.children = function() { return this.getProperty("*", !1); }; - e.prototype.descendants = function(b) { - b = d(b); - for (var g = a.ASXMLList.createList(this._targetObject, this._targetProperty), f = 0;f < this._children.length;f++) { - var e = this._children[f]; - 1 === e._kind && e.descendantsInto(b, g); + c.prototype.descendants = function(e) { + e = b(e); + for (var f = a.ASXMLList.createList(this._targetObject, this._targetProperty), c = 0;c < this._children.length;c++) { + var g = this._children[c]; + 1 === g._kind && g.descendantsInto(e, f); } - return g; + return f; }; - e.prototype.comments = function() { + c.prototype.comments = function() { var b = a.ASXMLList.createList(this._targetObject, this._targetProperty); this._children.forEach(function(a) { 1 === a._kind && (a = a.comments(), Array.prototype.push.apply(b._children, a._children)); }); return b; }; - e.prototype.contains = function(b) { - for (var a = this._children, d = 0;d < a.length;d++) { - if (a[d].equals(b)) { + c.prototype.contains = function(b) { + for (var a = this._children, e = 0;e < a.length;e++) { + if (a[e].equals(b)) { return!0; } } return!1; }; - e.prototype.copy = function() { + c.prototype.copy = function() { return this._deepCopy(); }; - e.prototype.elements = function(b) { - void 0 === b && (b = "*"); - var g = d(b), f = a.ASXMLList.createList(this._targetObject, g); + c.prototype.elements = function(e) { + void 0 === e && (e = "*"); + var f = b(e), c = a.ASXMLList.createList(this._targetObject, f); this._children.forEach(function(b) { - 1 === b._kind && (b = b.elements(g), Array.prototype.push.apply(f._children, b._children)); + 1 === b._kind && (b = b.elements(f), Array.prototype.push.apply(c._children, b._children)); }); - return f; + return c; }; - e.prototype.hasComplexContent = function() { + c.prototype.hasComplexContent = function() { switch(this.length()) { case 0: return!1; @@ -14386,7 +14640,7 @@ Shumway.AVM2.XRegExp.install(); }); } }; - e.prototype.hasSimpleContent = function() { + c.prototype.hasSimpleContent = function() { switch(this.length()) { case 0: return!0; @@ -14398,13 +14652,13 @@ Shumway.AVM2.XRegExp.install(); }); } }; - e.prototype.length = function() { + c.prototype.length = function() { return this._children.length; }; - e.prototype.name = function() { + c.prototype.name = function() { return this._children[0].name(); }; - e.prototype.normalize = function() { + c.prototype.normalize = function() { for (var b = 0;b < this._children.length;) { var a = this._children[b]; if (1 === a._kind) { @@ -14412,11 +14666,11 @@ Shumway.AVM2.XRegExp.install(); } else { if (3 === a._kind) { for (b++;b < this._children.length;) { - var d = this._children[b]; - if (3 !== d._kind) { + var e = this._children[b]; + if (3 !== e._kind) { break; } - a._value += d._value; + a._value += e._value; this.removeByIndex(b); } 0 === a._value.length ? this.removeByIndex(b) : b++; @@ -14427,284 +14681,283 @@ Shumway.AVM2.XRegExp.install(); } return this; }; - e.prototype.parent = function() { + c.prototype.parent = function() { var b = this._children; if (0 !== b.length) { - for (var a = b[0]._parent, d = 1;d < b.length;d++) { - if (b[d]._parent !== a) { + for (var a = b[0]._parent, e = 1;e < b.length;e++) { + if (b[e]._parent !== a) { return; } } return a; } }; - e.prototype.processingInstructions = function(b) { - void 0 === b && (b = "*"); - var g = d(b).localName, f = a.ASXMLList.createList(this._targetObject, this._targetProperty); - f._targetObject = this; - f._targetProperty = null; - for (var e = this._children, k = 0;k < e.length;k++) { - e[k].processingInstructionsInto(b, g, f); + c.prototype.processingInstructions = function(e) { + void 0 === e && (e = "*"); + var f = b(e).localName, c = a.ASXMLList.createList(this._targetObject, this._targetProperty); + c._targetObject = this; + c._targetProperty = null; + for (var g = this._children, n = 0;n < g.length;n++) { + g[n].processingInstructionsInto(e, f, c); } - return f; + return c; }; - e.prototype.text = function() { + c.prototype.text = function() { var b = a.ASXMLList.createList(this._targetObject, this._targetProperty); - this._children.forEach(function(a, d) { + this._children.forEach(function(a, e) { if (1 === a._kind) { - var g = a.text(); - 0 < g.length() && b._children.push(g); + var f = a.text(); + 0 < f.length() && b._children.push(f); } }); return b; }; - e.prototype.toXMLString = function() { - return q(this); + c.prototype.toXMLString = function() { + return s(this); }; - e.prototype.toJSON = function(b) { + c.prototype.toJSON = function(b) { return "XMLList"; }; - e.prototype.addNamespace = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "addNamespace"); + c.prototype.addNamespace = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "addNamespace"); var a = this._children[0]; a.addNamespace(b); return a; }; - e.prototype.appendChild = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "appendChild"); + c.prototype.appendChild = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "appendChild"); var a = this._children[0]; a.appendChild(b); return a; }; - e.prototype.append = function(b) { - var d = this._children, g = d.length, f = 1; + c.prototype.append = function(b) { + var e = this._children, f = e.length, c = 1; if (b instanceof a.ASXMLList) { - if (this._targetObject = b._targetObject, this._targetProperty = b._targetProperty, b = b._children, f = b.length, 0 !== f) { - for (f = 0;f < b.length;f++) { - d[g + f] = b[f]; + if (this._targetObject = b._targetObject, this._targetProperty = b._targetProperty, b = b._children, c = b.length, 0 !== c) { + for (c = 0;c < b.length;c++) { + e[f + c] = b[c]; } } } else { - z(b instanceof a.ASXML), d[g] = b, this._targetProperty = b._name; + e[f] = b, this._targetProperty = b._name; } }; - e.prototype.childIndex = function() { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "childIndex"); + c.prototype.childIndex = function() { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "childIndex"); return this._children[0].childIndex(); }; - e.prototype.inScopeNamespaces = function() { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "inScopeNamespaces"); + c.prototype.inScopeNamespaces = function() { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "inScopeNamespaces"); return this._children[0].inScopeNamespaces(); }; - e.prototype.insertChildAfter = function(b, a) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "insertChildAfter"); + c.prototype.insertChildAfter = function(b, a) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "insertChildAfter"); return this._children[0].insertChildAfter(b, a); }; - e.prototype.insertChildBefore = function(b, a) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "insertChildBefore"); + c.prototype.insertChildBefore = function(b, a) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "insertChildBefore"); return this._children[0].insertChildBefore(b, a); }; - e.prototype.nodeKind = function() { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "nodeKind"); + c.prototype.nodeKind = function() { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "nodeKind"); return this._children[0].nodeKind(); }; - e.prototype.namespace = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "namespace"); + c.prototype.namespace = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "namespace"); var a = this._children[0]; return arguments.length ? a.namespace(b) : a.namespace(); }; - e.prototype.localName = function() { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "localName"); + c.prototype.localName = function() { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "localName"); return this._children[0].localName(); }; - e.prototype.namespaceDeclarations = function() { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "namespaceDeclarations"); + c.prototype.namespaceDeclarations = function() { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "namespaceDeclarations"); return this._children[0].namespaceDeclarations(); }; - e.prototype.prependChild = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "prependChild"); + c.prototype.prependChild = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "prependChild"); return this._children[0].prependChild(b); }; - e.prototype.removeNamespace = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "removeNamespace"); + c.prototype.removeNamespace = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "removeNamespace"); return this._children[0].removeNamespace(b); }; - e.prototype.replace = function(b, a) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "replace"); + c.prototype.replace = function(b, a) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "replace"); return this._children[0].replace(b, a); }; - e.prototype.setChildren = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setChildren"); + c.prototype.setChildren = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "setChildren"); return this._children[0].setChildren(b); }; - e.prototype.setLocalName = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setLocalName"); + c.prototype.setLocalName = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "setLocalName"); return this._children[0].setLocalName(b); }; - e.prototype.setName = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setName"); + c.prototype.setName = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "setName"); return this._children[0].setName(b); }; - e.prototype.setNamespace = function(b) { - 1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setNamespace"); + c.prototype.setNamespace = function(b) { + 1 !== this._children.length && k.Runtime.throwError("TypeError", k.Errors.XMLOnlyWorksWithOneItemLists, "setNamespace"); return this._children[0].setNamespace(b); }; - e.isTraitsOrDynamicPrototype = function(b) { - return b === e.traitsPrototype || b === e.dynamicPrototype; + c.isTraitsOrDynamicPrototype = function(b) { + return b === c.traitsPrototype || b === c.dynamicPrototype; }; - e.prototype.asGetEnumerableKeys = function() { - return e.isTraitsOrDynamicPrototype(this) ? E.call(this) : this._children.asGetEnumerableKeys(); + c.prototype.asGetEnumerableKeys = function() { + return c.isTraitsOrDynamicPrototype(this) ? z.call(this) : this._children.asGetEnumerableKeys(); }; - e.prototype.getProperty = function(b, g) { - if (c.isIndex(b)) { - return this._children[b]; + c.prototype.getProperty = function(e, f) { + if (d.isIndex(e)) { + return this._children[e]; } - var f = d(b), e = a.ASXMLList.createList(this._targetObject, f); + var c = b(e), g = a.ASXMLList.createList(this._targetObject, c); this._children.forEach(function(b, a) { if (1 === b._kind) { - var d = b.getProperty(f, g); - if (0 < d.length()) { - for (var d = d._children, k = 0;k < d.length;k++) { - e._children.push(d[k]); + var e = b.getProperty(c, f); + if (0 < e.length()) { + for (var e = e._children, n = 0;n < e.length;n++) { + g._children.push(e[n]); } } } }); - return e; + return g; }; - e.prototype.asGetNumericProperty = function(b) { + c.prototype.asGetNumericProperty = function(b) { return this.asGetProperty(null, b, 0); }; - e.prototype.asSetNumericProperty = function(b, a) { + c.prototype.asSetNumericProperty = function(b, a) { this.asSetProperty(null, b, 0, a); }; - e.prototype.asGetProperty = function(b, a, d) { - if (e.isTraitsOrDynamicPrototype(this)) { - return y.call(this, b, a, d); + c.prototype.asGetProperty = function(b, a, e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return J.call(this, b, a, e); } - d = !!(d & A.ATTRIBUTE); - return this.getProperty(g(b, a, d), d); + e = !!(e & L.ATTRIBUTE); + return this.getProperty(q(b, a, e), e); }; - e.prototype.hasProperty = function(b, a) { - return c.isIndex(b) ? Number(b) < this._children.length : !0; + c.prototype.hasProperty = function(b, a) { + return d.isIndex(b) ? Number(b) < this._children.length : !0; }; - e.prototype.asHasProperty = function(b, a, d) { - if (e.isTraitsOrDynamicPrototype(this)) { - return y.call(this, b, a, d); + c.prototype.asHasProperty = function(b, a, e) { + if (c.isTraitsOrDynamicPrototype(this)) { + return J.call(this, b, a, e); } - d = !!(d & A.ATTRIBUTE); - return this.hasProperty(g(b, a, d), d); + e = !!(e & L.ATTRIBUTE); + return this.hasProperty(q(b, a, e), e); }; - e.prototype.asHasPropertyInternal = function(b, a, d) { - d = !!(d & A.ATTRIBUTE); - return this.hasProperty(g(b, a, d), d); + c.prototype.asHasPropertyInternal = function(b, a, e) { + e = !!(e & L.ATTRIBUTE); + return this.hasProperty(q(b, a, e), e); }; - e.prototype.resolveValue = function() { + c.prototype.resolveValue = function() { return this; }; - e.prototype.setProperty = function(d, g, f) { - if (c.isIndex(d)) { - d |= 0; - var e = null; - if (this._targetObject && (e = this._targetObject.resolveValue(), null === e)) { + c.prototype.setProperty = function(b, f, c) { + if (d.isIndex(b)) { + b |= 0; + var g = null; + if (this._targetObject && (g = this._targetObject.resolveValue(), null === g)) { return; } - g = this.length(); - if (d >= g) { - if (e instanceof a.ASXMLList) { - if (1 !== e.length()) { + f = this.length(); + if (b >= f) { + if (g instanceof a.ASXMLList) { + if (1 !== g.length()) { return; } - e = e._children[0]; + g = g._children[0]; } - z(null === e || e instanceof a.ASXML); - if (e && 1 !== e._kind) { + if (g && 1 !== g._kind) { return; } - var k = new a.ASXML; - k._parent = e; - k._name = this._targetProperty; - if (b(this._targetProperty)) { - if (e.hasProperty(this._targetProperty, !0, !1)) { + var n = new a.ASXML; + n._parent = g; + n._name = this._targetProperty; + if (e(this._targetProperty)) { + if (g.hasProperty(this._targetProperty, !0, !1)) { return; } - k._kind = 2; + n._kind = 2; } else { - c.isNullOrUndefined(this._targetProperty) || "*" === this._targetProperty.localName ? (k._name = null, k._kind = 3) : k._kind = 1; + d.isNullOrUndefined(this._targetProperty) || "*" === this._targetProperty.localName ? (n._name = null, n._kind = 3) : n._kind = 1; } - d = g; - if (2 !== k._kind) { - if (null !== e) { - var r; - if (0 < d) { - var m = this._children[d - 1]; - for (r = 0;r < e.length - 1 && e._children[r] !== m;r++) { + b = f; + if (2 !== n._kind) { + if (null !== g) { + var q; + if (0 < b) { + var h = this._children[b - 1]; + for (q = 0;q < g.length - 1 && g._children[q] !== h;q++) { } } else { - r = e.length() - 1; + q = g.length() - 1; } - e._children[r + 1] = k; - k._parent = e; + g._children[q + 1] = n; + n._parent = g; } - f instanceof a.ASXML ? k._name = f._name : f instanceof a.ASXMLList && (k._name = f._targetProperty); - this.append(k); + c instanceof a.ASXML ? n._name = c._name : c instanceof a.ASXMLList && (n._name = c._targetProperty); + this.append(n); } } - s(f) && 3 !== f._kind && 2 !== f._kind || (f += ""); - r = this._children[d]; - k = r._kind; - e = r._parent; - if (2 === k) { - var w = e._children.indexOf(r); - e.setProperty(r._name, !0, !1); - this._children[d] = e._children[w]; + r(c) && 3 !== c._kind && 2 !== c._kind || (c += ""); + q = this._children[b]; + n = q._kind; + g = q._parent; + if (2 === n) { + var m = g._children.indexOf(q); + g.setProperty(q._name, !0, !1); + this._children[b] = g._children[m]; } else { - if (f instanceof a.ASXMLList) { - w = f._shallowCopy(); - f = w.length(); - if (null !== e) { - for (k = e._children.indexOf(r), e.replace(k, w), r = 0;r < f;r++) { - w.setProperty(r, !1, e._children[k + r]); + if (c instanceof a.ASXMLList) { + m = c._shallowCopy(); + c = m.length(); + if (null !== g) { + for (n = g._children.indexOf(q), g.replace(n, m), q = 0;q < c;q++) { + m.setProperty(q, !1, g._children[n + q]); } } - if (0 === f) { - for (r = d + 1;r < g;r++) { - this._children[r - 1] = this._children[r]; + if (0 === c) { + for (q = b + 1;q < f;q++) { + this._children[q - 1] = this._children[q]; } this._children.length--; } else { - for (r = g - 1;r > d;r--) { - this._children[r + f - 1] = this._children[r]; + for (q = f - 1;q > b;q--) { + this._children[q + c - 1] = this._children[q]; } } - for (r = 0;r < f;r++) { - this._children[d + r] = w._children[r]; + for (q = 0;q < c;q++) { + this._children[b + q] = m._children[q]; } } else { - f instanceof a.ASXML || 3 <= k ? (null !== e && (k = e._children.indexOf(r), e.replace(k, w), f = e._children[k]), "string" === typeof f ? (w = new a.ASXML(f), this._children[d] = w) : this._children[d] = f) : r.setProperty("*", !1, f); + c instanceof a.ASXML || 3 <= n ? (null !== g && (n = g._children.indexOf(q), g.replace(n, m), c = g._children[n]), "string" === typeof c ? (m = new a.ASXML(c), this._children[b] = m) : this._children[b] = c) : q.setProperty("*", !1, c); } } } else { if (0 === this._children.length) { - e = this.resolveValue(); - if (null === e || 1 !== e._children.length) { + g = this.resolveValue(); + if (null === g || 1 !== g._children.length) { return; } - this.append(e._children[0]); + this.append(g._children[0]); } - 1 === this._children.length ? this._children[0].setProperty(d, g, f) : h.Runtime.throwError("TypeError", h.Errors.XMLAssigmentOneItemLists); + 1 === this._children.length ? this._children[0].setProperty(b, f, c) : k.Runtime.throwError("TypeError", k.Errors.XMLAssigmentOneItemLists); } }; - e.prototype.asSetProperty = function(b, a, d, f) { - if (e.isTraitsOrDynamicPrototype(this)) { - return D.call(this, b, a, d, f); + c.prototype.asSetProperty = function(b, a, e, f) { + if (c.isTraitsOrDynamicPrototype(this)) { + return M.call(this, b, a, e, f); } - d = !!(d & A.ATTRIBUTE); - a = g(b, a, d); - return this.setProperty(a, d, f); + e = !!(e & L.ATTRIBUTE); + a = q(b, a, e); + return this.setProperty(a, e, f); }; - e.prototype._asDeleteProperty = function(b, a, d) { - if (c.isIndex(a)) { + c.prototype._asDeleteProperty = function(b, a, e) { + if (d.isIndex(a)) { b = a | 0; if (b >= this._children.length) { return!0; @@ -14712,78 +14965,72 @@ Shumway.AVM2.XRegExp.install(); this.removeByIndex(b); return!0; } - d = !!(d & A.ATTRIBUTE); - a = g(b, a, d); + e = !!(e & L.ATTRIBUTE); + a = q(b, a, e); for (b = 0;b < this._children.length;b++) { var f = this._children[b]; - 1 === f._kind && f.deleteProperty(a, d); + 1 === f._kind && f.deleteProperty(a, e); } return!0; }; - e.prototype.removeByIndex = function(b) { - var a = this._children[b], d = a._parent; - d && (a._parent = null, d._children.splice(d._children.indexOf(a), 1)); + c.prototype.removeByIndex = function(b) { + var a = this._children[b], e = a._parent; + e && (a._parent = null, e._children.splice(e._children.indexOf(a), 1)); this._children.splice(b, 1); }; - e.prototype.asCallProperty = function(b, a, d, g, f) { - if (e.isTraitsOrDynamicPrototype(this) || g) { - return L.call(this, b, a, d, g, f); + c.prototype.asCallProperty = function(b, a, e, f, g) { + if (c.isTraitsOrDynamicPrototype(this) || f) { + return D.call(this, b, a, e, f, g); } - var k; - k = this.resolveMultinameProperty(b, a, d); - if (this.asGetNumericProperty && A.isNumeric(k)) { - k = this.asGetNumericProperty(k); - } else { - var r = this.asOpenMethods; - k = r && r[k] || this[k]; - } - if (k) { - return k.asApply(g ? null : this, f); + var n; + n = this.resolveMultinameProperty(b, a, e); + if (n = this.asOpenMethods[n] || this[n]) { + return n.apply(f ? null : this, g); } if (1 === this.length()) { - return this._children[0].asCallProperty(b, a, d, g, f); + return this._children[0].asCallProperty(b, a, e, f, g); } - throw new TypeError; + throwError("TypeError", k.Errors.CallOfNonFunctionError, "value"); }; - e.instanceConstructor = e; - e.classInitializer = function() { - var b = e.prototype; - N(b, "asDeleteProperty", b._asDeleteProperty); - N(b, "$BgvalueOf", Object.prototype.$BgvalueOf); - N(b, "$BghasOwnProperty", b.native_hasOwnProperty); - N(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable); - K(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" ")); + c.instanceConstructor = c; + c.classInitializer = function() { + var b = c.prototype; + K(b, "asDeleteProperty", b._asDeleteProperty); + K(b, "$BgvalueOf", Object.prototype.$BgvalueOf); + K(b, "$BghasOwnProperty", b.native_hasOwnProperty); + K(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable); + F(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" ")); }; - e.callableConstructor = function(b) { - c.isNullOrUndefined(b) && (b = ""); - if (b instanceof e) { + c.callableConstructor = function(b) { + d.isNullOrUndefined(b) && (b = ""); + if (b instanceof c) { return b; } - var d = new a.ASXMLList; - k(b, d); - return d; + var e = new a.ASXMLList; + g(b, e); + return e; }; - return e; + return c; }(a.ASNative); a.ASXMLList = V; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(b, a) { - var d = (b | 0) === b; - if (a & 512 && (c.isNullOrUndefined(b) || d)) { + function r(b, a) { + var e = (b | 0) === b; + if (a & 512 && (d.isNullOrUndefined(b) || e)) { return null; } - var g = !1; + var f = !1; if (b instanceof Function) { if ("boundTo" in b) { if (a & 512) { return null; } - g = !0; + f = !0; } else { if ("methodInfo" in b && b.methodInfo && "lastBoundMethod" in b.methodInfo) { return null; @@ -14791,193 +15038,183 @@ Shumway.AVM2.XRegExp.install(); } } b = Object(b); - var f = b.classInfo ? b : Object.getPrototypeOf(b).class; - n(f, "No class found for object " + b); - var k = f === b && !(a & 512), r = f.classInfo, m = {}; - m[w] = d ? "int" : g ? "builtin.as$0::MethodClosure" : e(r.instanceInfo.name); - m[l("isDynamic")] = k || !(r.instanceInfo.flags & 1) && !g; - m[l("isFinal")] = k || !!(r.instanceInfo.flags & 2) || g; - m[l("isStatic")] = k; + var g = b.classInfo ? b : Object.getPrototypeOf(b).class, q = g === b && !(a & 512), h = g.classInfo, m = {}; + m[n] = e ? "int" : f ? "builtin.as$0::MethodClosure" : c(h.instanceInfo.name); + m[l("isDynamic")] = q || !(h.instanceInfo.flags & 1) && !f; + m[l("isFinal")] = q || !!(h.instanceInfo.flags & 2) || f; + m[l("isStatic")] = q; if (a & 256) { - var z = m[l("traits")] = q(f, r, k, a) + var p = m[l("traits")] = s(g, h, q, a) } - g && (z[l("bases")].unshift("Function"), z[l("accessors")][1][l("declaredBy")] = "builtin.as$0::MethodClosure"); + f && (p[l("bases")].unshift("Function"), p[l("accessors")][1][l("declaredBy")] = "builtin.as$0::MethodClosure"); return m; } - function v(b, d) { - for (var g = 0, f = d[l("bases")], e = 0;f && e < f.length;e++) { - var k = new a.ASXML(''); - b.appendChild(k); - g++; + function v(b, e) { + for (var f = 0, c = e[l("bases")], g = 0;c && g < c.length;g++) { + var n = new a.ASXML(''); + b.appendChild(n); + f++; } - f = d[l("interfaces")]; - for (e = 0;f && e < f.length;e++) { - k = new a.ASXML(''), b.appendChild(k), g++; + c = e[l("interfaces")]; + for (g = 0;c && g < c.length;g++) { + n = new a.ASXML(''), b.appendChild(n), f++; } - null !== d[l("constructor")] && (k = new a.ASXML(""), p(k, d[l("constructor")]), b.appendChild(k), g++); - f = d[l("variables")]; - for (e = 0;f && e < f.length;e++) { - var r = f[e], k = "readonly" === r[l("access")] ? "constant" : "variable", k = new a.ASXML("<" + k + ' name="' + a.escapeAttributeValue(r[l("name")]) + '" type="' + r[l("type")] + '"/>'); - null !== r[l("uri")] && k.setProperty("uri", !0, r[l("uri")]); - null !== r[l("metadata")] && u(k, r[l("metadata")]); - b.appendChild(k); - g++; + null !== e[l("constructor")] && (n = new a.ASXML(""), u(n, e[l("constructor")]), b.appendChild(n), f++); + c = e[l("variables")]; + for (g = 0;c && g < c.length;g++) { + var q = c[g], n = "readonly" === q[l("access")] ? "constant" : "variable", n = new a.ASXML("<" + n + ' name="' + a.escapeAttributeValue(q[l("name")]) + '" type="' + q[l("type")] + '"/>'); + null !== q[l("uri")] && n.setProperty("uri", !0, q[l("uri")]); + null !== q[l("metadata")] && t(n, q[l("metadata")]); + b.appendChild(n); + f++; } - f = d[l("accessors")]; - for (e = 0;f && e < f.length;e++) { - var c = f[e], k = new a.ASXML(''); - null !== c[l("uri")] && k.setProperty("uri", !0, c[l("uri")]); - null !== c[l("metadata")] && u(k, r[l("metadata")]); - b.appendChild(k); - g++; + c = e[l("accessors")]; + for (g = 0;c && g < c.length;g++) { + q = c[g], n = new a.ASXML(''), null !== q[l("uri")] && n.setProperty("uri", !0, q[l("uri")]), null !== q[l("metadata")] && t(n, q[l("metadata")]), b.appendChild(n), f++; } - f = d[l("methods")]; - for (e = 0;f && e < f.length;e++) { - c = f[e], k = new a.ASXML(''), p(k, c[l("parameters")]), null !== c[l("uri")] && k.setProperty("uri", !0, c[l("uri")]), null !== c[l("metadata")] && u(k, r[l("metadata")]), b.appendChild(k), g++; + c = e[l("methods")]; + for (g = 0;c && g < c.length;g++) { + q = c[g], n = new a.ASXML(''), u(n, q[l("parameters")]), null !== q[l("uri")] && n.setProperty("uri", !0, q[l("uri")]), null !== q[l("metadata")] && t(n, q[l("metadata")]), b.appendChild(n), f++; } - u(b, d[l("metadata")]); - return 0 < g; + t(b, e[l("metadata")]); + return 0 < f; } - function p(b, d) { - if (d) { - for (var g = 0;g < d.length;g++) { - var f = d[g], f = new a.ASXML(''); - b.appendChild(f); + function u(b, e) { + if (e) { + for (var f = 0;f < e.length;f++) { + var c = e[f], c = new a.ASXML(''); + b.appendChild(c); } } } - function u(b, d) { - if (d) { - for (var g = 0;g < d.length;g++) { - for (var f = d[g], e = new a.ASXML(''), f = f[l("value")], k = 0;k < f.length;k++) { - var r = f[k], r = new a.ASXML(''); - e.appendChild(r); + function t(b, e) { + if (e) { + for (var f = 0;f < e.length;f++) { + for (var c = e[f], g = new a.ASXML(''), c = c[l("value")], n = 0;n < c.length;n++) { + var q = c[n], q = new a.ASXML(''); + g.appendChild(q); } - b.appendChild(e); + b.appendChild(g); } } } function l(b) { - return k.getPublicQualifiedName(b); + return m.getPublicQualifiedName(b); } - function e(b) { + function c(b) { var a = b.name; return(b = b.namespaces[0]) && b.uri ? b.uri + "::" + a : a; } - function m(b) { + function h(b) { if (!b) { return null; } - var a = [], d; - for (d in b) { - "native" !== d && a.push(t(b[d])); + var a = [], e; + for (e in b) { + "native" !== e && a.push(p(b[e])); } return a; } - function t(b) { + function p(b) { var a = {}; - a[w] = b.name; - a[B] = b.value.map(function(b) { + a[n] = b.name; + a[A] = b.value.map(function(b) { var a = {}; - a[B] = b.value; - a[M] = b.key; + a[A] = b.value; + a[H] = b.key; return a; }); return a; } - function q(f, k, c, q) { - function t(a) { - n(a, "No traits array found on class" + f.classInfo.instanceInfo.name); - for (var k = a.length;k--;) { - var l = a[k], s = l.name.getNamespace(); - if (!(!s.isPublic() && !l.name.uri || q & 1 && s.uri)) { - var p = e(l.name); - if (P[p] !== V[p]) { - s = O[p], s[g] = "readwrite", 2 === l.kind && (s[z] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*"); + function s(g, m, p, d) { + function s(a) { + for (var g = a.length;g--;) { + var m = a[g], l = m.name.getNamespace(); + if (!(!l.isPublic() && !m.name.uri || d & 1 && l.uri)) { + var r = c(m.name); + if (S[r] !== V[r]) { + l = Q[r], l[e] = "readwrite", 2 === m.kind && (l[x] = m.methodInfo.returnType ? c(m.methodInfo.returnType) : "*"); } else { - if (!O[p]) { - switch(s = {}, O[p] = s, l.kind) { + if (!Q[r]) { + switch(l = {}, Q[r] = l, m.kind) { case 6: ; case 0: - if (!(q & 8)) { + if (!(d & 8)) { continue; } - s[w] = p; - s[r] = void 0 === l.name.uri ? null : l.name.uri; - s[z] = l.typeName ? e(l.typeName) : "*"; - s[g] = "readwrite"; - s[b] = q & 64 ? m(l.metadata) : null; - v.push(s); + l[n] = r; + l[q] = void 0 === m.name.uri ? null : m.name.uri; + l[x] = m.typeName ? c(m.typeName) : "*"; + l[e] = "readwrite"; + l[b] = d & 64 ? h(m.metadata) : null; + t.push(l); break; case 1: - if (!h) { + if (!k) { continue; } - s[A] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*"; - s[b] = q & 64 ? m(l.metadata) : null; - s[w] = p; - s[r] = void 0 === l.name.uri ? null : l.name.uri; - for (var p = s[N] = [], l = l.methodInfo.parameters, u = 0;u < l.length;u++) { - var M = l[u], D = {}; - D[z] = M.type ? e(M.type) : "*"; - D[K] = "value" in M; - p.push(D); + l[L] = m.methodInfo.returnType ? c(m.methodInfo.returnType) : "*"; + l[b] = d & 64 ? h(m.metadata) : null; + l[n] = r; + l[q] = void 0 === m.name.uri ? null : m.name.uri; + for (var r = l[K] = [], m = m.methodInfo.parameters, u = 0;u < m.length;u++) { + var v = m[u], H = {}; + H[x] = v.type ? c(v.type) : "*"; + H[F] = "value" in v; + r.push(H); } - s[d] = $; - S.push(s); + l[f] = aa; + O.push(l); break; case 2: ; case 3: - if (!(q & 16) || c) { + if (!(d & 16) || p) { continue; } - s[w] = p; - 2 === l.kind ? (s[z] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*", P[p] = s) : (u = l.methodInfo.parameters[0].type, s[z] = u ? e(u) : "*", V[p] = s); - s[g] = 2 === l.kind ? "readonly" : "writeonly"; - s[b] = q & 64 ? m(l.metadata) : null; - s[r] = void 0 === l.name.uri ? null : l.name.uri; - s[d] = $; - B.push(s); - break; - default: - n(!1, "Unknown trait type: " + l.kind); + l[n] = r; + 2 === m.kind ? (l[x] = m.methodInfo.returnType ? c(m.methodInfo.returnType) : "*", S[r] = l) : (u = m.methodInfo.parameters[0].type, l[x] = u ? c(u) : "*", V[r] = l); + l[e] = 2 === m.kind ? "readonly" : "writeonly"; + l[b] = d & 64 ? h(m.metadata) : null; + l[q] = void 0 === m.name.uri ? null : m.name.uri; + l[f] = aa; + A.push(l); } } } } } } - var s = q & 2, h = q & 32 && !c, p = {}, v = p[l("variables")] = q & 8 ? [] : null, B = p[l("accessors")] = q & 16 ? [] : null, u = null; - q & 64 && (u = c ? [] : m(k.metadata) || []); - p[b] = u; - p[l("constructor")] = null; - if (q & 4) { - if (k = p[l("interfaces")] = [], !c) { - for (var M in f.implementedInterfaces) { - u = f.implementedInterfaces[M].getQualifiedClassName(), k.push(u); + var r = d & 2, k = d & 32 && !p, u = {}, t = u[l("variables")] = d & 8 ? [] : null, A = u[l("accessors")] = d & 16 ? [] : null, v = null; + d & 64 && (v = p ? [] : h(m.metadata) || []); + u[b] = v; + u[l("constructor")] = null; + if (d & 4) { + if (m = u[l("interfaces")] = [], !p) { + for (var H in g.implementedInterfaces) { + v = g.implementedInterfaces[H].getQualifiedClassName(), m.push(v); } } } else { - p[l("interfaces")] = null; + u[l("interfaces")] = null; } - var S = p[l("methods")] = h ? [] : null; - M = p[l("bases")] = s ? [] : null; - var O = {}, P = {}, V = {}; - for (k = !1;f;) { - var $ = e(f.classInfo.instanceInfo.name); - s && k && !c ? M.push($) : k = !0; - if (q & 1024 && f === a.ASObject) { + var O = u[l("methods")] = k ? [] : null; + H = u[l("bases")] = r ? [] : null; + var Q = {}, S = {}, V = {}; + for (m = !1;g;) { + var aa = c(g.classInfo.instanceInfo.name); + r && m && !p ? H.push(aa) : m = !0; + if (d & 1024 && g === a.ASObject) { break; } - c ? t(f.classInfo.traits) : t(f.classInfo.instanceInfo.traits); - f = f.baseClass; + p ? s(g.classInfo.traits) : s(g.classInfo.instanceInfo.traits); + g = g.baseClass; } - c && (q & 16 && (k = {}, k[w] = "prototype", k[z] = "*", k[g] = "readonly", k[b] = null, k[r] = null, k[d] = "Class", B.push(k)), s && (M.pop(), M.push("Class", "Object"), f = a.ASClass)); - return p; + p && (d & 16 && (g = {}, g[n] = "prototype", g[x] = "*", g[e] = "readonly", g[b] = null, g[q] = null, g[f] = "Class", A.push(g)), r && (H.pop(), H.push("Class", "Object"), g = a.ASClass)); + return u; } - var n = c.Debug.assert, k = c.AVM2.ABC.Multiname, f; + var m = d.AVM2.ABC.Multiname, g; (function(b) { b[b.HIDE_NSURI_METHODS = 1] = "HIDE_NSURI_METHODS"; b[b.INCLUDE_BASES = 2] = "INCLUDE_BASES"; @@ -14990,409 +15227,409 @@ Shumway.AVM2.XRegExp.install(); b[b.INCLUDE_TRAITS = 256] = "INCLUDE_TRAITS"; b[b.USE_ITRAITS = 512] = "USE_ITRAITS"; b[b.HIDE_OBJECT = 1024] = "HIDE_OBJECT"; - })(f || (f = {})); - var d = l("declaredBy"), b = l("metadata"), g = l("access"), r = l("uri"), w = l("name"), z = l("type"), A = l("returnType"), B = l("value"), M = l("key"), N = l("parameters"), K = l("optional"); - a.describeTypeJSON = s; - a.describeType = function(b, d) { - var g = s(b, d), f = h.Runtime.AVM2.instance.systemDomain; - f.getClass("XML"); - f.getClass("XMLList"); - f.getClass("QName"); - f.getClass("Namespace"); - f = new a.ASXML(""); - f.setProperty("name", !0, g[l("name")]); - var e = g[l("traits")][l("bases")]; - e.length && f.setProperty("base", !0, e[0]); - f.setProperty("isDynamic", !0, g[l("isDynamic")].toString()); - f.setProperty("isFinal", !0, g[l("isFinal")].toString()); - f.setProperty("isStatic", !0, g[l("isStatic")].toString()); - v(f, g[l("traits")]); - if (g = s(b, d | 512)) { - e = new a.ASXML(""), e.setProperty("type", !0, g[l("name")]), v(e, g[l("traits")]) && f.appendChild(e); + })(g || (g = {})); + var f = l("declaredBy"), b = l("metadata"), e = l("access"), q = l("uri"), n = l("name"), x = l("type"), L = l("returnType"), A = l("value"), H = l("key"), K = l("parameters"), F = l("optional"); + a.describeTypeJSON = r; + a.describeType = function(b, e) { + var f = r(b, e), c = k.Runtime.AVM2.instance.systemDomain; + c.getClass("XML"); + c.getClass("XMLList"); + c.getClass("QName"); + c.getClass("Namespace"); + c = new a.ASXML(""); + c.setProperty("name", !0, f[l("name")]); + var g = f[l("traits")][l("bases")]; + g.length && c.setProperty("base", !0, g[0]); + c.setProperty("isDynamic", !0, f[l("isDynamic")].toString()); + c.setProperty("isFinal", !0, f[l("isFinal")].toString()); + c.setProperty("isStatic", !0, f[l("isStatic")].toString()); + v(c, f[l("traits")]); + if (f = r(b, e | 512)) { + g = new a.ASXML(""), g.setProperty("type", !0, f[l("name")]), v(g, f[l("traits")]) && c.appendChild(g); } - return f; + return c; }; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { - var s = c.Debug.assert; - (function(c) { - (function(c) { - var h = Object.prototype.asGetProperty, l = Object.prototype.asSetProperty, e = Object.prototype.asHasProperty, m = Object.prototype.asDeleteProperty, t = Object.prototype.asGetEnumerableKeys, q = function(a) { - function k(a) { + (function(d) { + (function(d) { + var r = Object.prototype.asGetProperty, k = Object.prototype.asSetProperty, l = Object.prototype.asHasProperty, c = Object.prototype.asDeleteProperty, h = Object.prototype.asGetEnumerableKeys, p = function(a) { + function m(a) { } - __extends(k, a); - k.isTraitsOrDynamicPrototype = function(a) { - return a === k.traitsPrototype || a === k.dynamicPrototype; + __extends(m, a); + m.isTraitsOrDynamicPrototype = function(a) { + return a === m.traitsPrototype || a === m.dynamicPrototype; }; - k.makePrimitiveKey = function(a) { + m.makePrimitiveKey = function(a) { if ("string" === typeof a || "number" === typeof a) { return a; } - s("object" === typeof a || "function" === typeof a, typeof a); }; - k.prototype.init = function(a) { + m.prototype.init = function(a) { this.weakKeys = !!a; this.map = new WeakMap; a || (this.keys = []); this.primitiveMap = Object.create(null); }; - k.prototype.asGetNumericProperty = function(a) { + m.prototype.asGetNumericProperty = function(a) { return this.asGetProperty(null, a, 0); }; - k.prototype.asSetNumericProperty = function(a, d) { - this.asSetProperty(null, a, 0, d); + m.prototype.asSetNumericProperty = function(a, f) { + this.asSetProperty(null, a, 0, f); }; - k.prototype.asGetProperty = function(a, d, b) { - if (k.isTraitsOrDynamicPrototype(this)) { - return h.call(this, a, d, b); + m.prototype.asGetProperty = function(a, f, b) { + if (m.isTraitsOrDynamicPrototype(this)) { + return r.call(this, a, f, b); } - a = k.makePrimitiveKey(d); - return void 0 !== a ? this.primitiveMap[a] : this.map.get(Object(d)); + a = m.makePrimitiveKey(f); + return void 0 !== a ? this.primitiveMap[a] : this.map.get(Object(f)); }; - k.prototype.asSetProperty = function(a, d, b, g) { - if (k.isTraitsOrDynamicPrototype(this)) { - return l.call(this, a, d, b, g); + m.prototype.asSetProperty = function(a, f, b, e) { + if (m.isTraitsOrDynamicPrototype(this)) { + return k.call(this, a, f, b, e); } - a = k.makePrimitiveKey(d); - void 0 !== a ? this.primitiveMap[a] = g : (this.map.set(Object(d), g), !this.weakKeys && 0 > this.keys.indexOf(d) && this.keys.push(d)); + a = m.makePrimitiveKey(f); + void 0 !== a ? this.primitiveMap[a] = e : (this.map.set(Object(f), e), !this.weakKeys && 0 > this.keys.indexOf(f) && this.keys.push(f)); }; - k.prototype.asHasProperty = function(a, d, b) { - if (k.isTraitsOrDynamicPrototype(this)) { - return e.call(this, a, d, b); + m.prototype.asHasProperty = function(a, f, b) { + if (m.isTraitsOrDynamicPrototype(this)) { + return l.call(this, a, f, b); } - a = k.makePrimitiveKey(d); - return void 0 !== a ? a in this.primitiveMap : this.map.has(Object(d)); + a = m.makePrimitiveKey(f); + return void 0 !== a ? a in this.primitiveMap : this.map.has(Object(f)); }; - k.prototype.asDeleteProperty = function(a, d, b) { - if (k.isTraitsOrDynamicPrototype(this)) { - return m.call(this, a, d, b); + m.prototype.asDeleteProperty = function(a, f, b) { + if (m.isTraitsOrDynamicPrototype(this)) { + return c.call(this, a, f, b); } - a = k.makePrimitiveKey(d); + a = m.makePrimitiveKey(f); void 0 !== a && delete this.primitiveMap[a]; - this.map.delete(Object(d)); - var g; - !this.weakKeys && 0 <= (g = this.keys.indexOf(d)) && this.keys.splice(g, 1); + this.map.delete(Object(f)); + var e; + !this.weakKeys && 0 <= (e = this.keys.indexOf(f)) && this.keys.splice(e, 1); return!0; }; - k.prototype.asGetEnumerableKeys = function() { - if (k.isTraitsOrDynamicPrototype(this)) { - return t.call(this); + m.prototype.asGetEnumerableKeys = function() { + if (m.isTraitsOrDynamicPrototype(this)) { + return h.call(this); } - var a = [], d; - for (d in this.primitiveMap) { - a.push(d); + var a = [], f; + for (f in this.primitiveMap) { + a.push(f); } return this.weakKeys ? a : a.concat(this.keys); }; - k.protocol = k.prototype; - return k; + m.protocol = m.prototype; + return m; }(a.ASNative); - c.Dictionary = q; - c.OriginalDictionary = q; - })(c.utils || (c.utils = {})); + d.Dictionary = p; + d.OriginalDictionary = p; + })(d.utils || (d.utils = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.notImplemented, h = c.AVM2.ABC.Namespace; - (function(c) { - (function(c) { - var l = Object.prototype.asGetProperty, e = Object.prototype.asSetProperty, m = Object.prototype.asCallProperty, t = Object.prototype.asHasProperty, q = Object.prototype.asHasOwnProperty, n = Object.prototype.asHasTraitProperty, k = Object.prototype.asDeleteProperty, f = function(a) { - function b() { - a.apply(this, arguments); + var r = d.Debug.notImplemented, k = d.AVM2.ABC.Namespace; + (function(d) { + (function(d) { + var l = Object.prototype.asGetProperty, c = Object.prototype.asSetProperty, h = Object.prototype.asCallProperty, p = Object.prototype.asHasProperty, s = Object.prototype.asHasOwnProperty, m = Object.prototype.asHasTraitProperty, g = Object.prototype.asDeleteProperty, f = function(b) { + function a() { + b.apply(this, arguments); } - __extends(b, a); - b.prototype.asGetProperty = function(b, a, d) { - return n.call(this, b, a, d) ? l.call(this, b, a, d) : m.call(this, [h.PROXY], "getProperty", 0, !1, [a]); + __extends(a, b); + a.prototype.asGetProperty = function(b, a, e) { + return m.call(this, b, a, e) ? l.call(this, b, a, e) : h.call(this, [k.PROXY], "getProperty", 0, !1, [a]); }; - b.prototype.asGetNumericProperty = function(b) { + a.prototype.asGetNumericProperty = function(b) { return this.asGetProperty(null, b, 0); }; - b.prototype.asSetNumericProperty = function(b, a) { + a.prototype.asSetNumericProperty = function(b, a) { this.asSetProperty(null, b, 0, a); }; - b.prototype.asSetProperty = function(b, a, d, f) { - n.call(this, b, a, d) ? e.call(this, b, a, d, f) : m.call(this, [h.PROXY], "setProperty", 0, !1, [a, f]); + a.prototype.asSetProperty = function(b, a, e, f) { + m.call(this, b, a, e) ? c.call(this, b, a, e, f) : h.call(this, [k.PROXY], "setProperty", 0, !1, [a, f]); }; - b.prototype.asCallProperty = function(b, a, d, f, e) { - return n.call(this, b, a, d) ? m.call(this, b, a, d, !1, e) : m.call(this, [h.PROXY], "callProperty", 0, !1, [a].concat(e)); + a.prototype.asCallProperty = function(b, a, e, f, c) { + return m.call(this, b, a, e) ? h.call(this, b, a, e, !1, c) : h.call(this, [k.PROXY], "callProperty", 0, !1, [a].concat(c)); }; - b.prototype.asHasProperty = function(b, a, d) { - return n.call(this, b, a, d) ? t.call(this, b, a, d) : m.call(this, [h.PROXY], "hasProperty", 0, !1, [a]); + a.prototype.asHasProperty = function(b, a, e) { + return m.call(this, b, a, e) ? p.call(this, b, a, e) : h.call(this, [k.PROXY], "hasProperty", 0, !1, [a]); }; - b.prototype.asHasOwnProperty = function(b, a, d) { - return n.call(this, b, a, d) ? q.call(this, b, a, d) : m.call(this, [h.PROXY], "hasProperty", 0, !1, [a]); + a.prototype.asHasOwnProperty = function(b, a, e) { + return m.call(this, b, a, e) ? s.call(this, b, a, e) : h.call(this, [k.PROXY], "hasProperty", 0, !1, [a]); }; - b.prototype.asDeleteProperty = function(b, a, d) { - return n.call(this, b, a, d) ? k.call(this, b, a, d) : m.call(this, [h.PROXY], "deleteProperty", 0, !1, [a]); + a.prototype.asDeleteProperty = function(b, a, e) { + return m.call(this, b, a, e) ? g.call(this, b, a, e) : h.call(this, [k.PROXY], "deleteProperty", 0, !1, [a]); }; - b.prototype.asNextName = function(b) { - s("Proxy asNextName"); + a.prototype.asNextName = function(b) { + r("Proxy asNextName"); }; - b.prototype.asNextValue = function(b) { - s("Proxy asNextValue"); + a.prototype.asNextValue = function(b) { + r("Proxy asNextValue"); }; - b.prototype.asNextNameIndex = function(b) { - s("Proxy asNextNameIndex"); + a.prototype.asNextNameIndex = function(b) { + r("Proxy asNextNameIndex"); }; - b.protocol = b.prototype; - return b; + a.protocol = a.prototype; + return a; }(a.ASNative); - c.Proxy = f; - c.OriginalProxy = f; - })(c.utils || (c.utils = {})); + d.Proxy = f; + d.OriginalProxy = f; + })(d.utils || (d.utils = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.notImplemented, v = c.Debug.unexpected, p = c.ArrayUtilities.DataBuffer, u = c.Debug.assert; - (function(c) { - (function(e) { + var r = d.Debug.notImplemented, v = d.Debug.unexpected, u = d.ArrayUtilities.DataBuffer; + (function(d) { + (function(d) { var c = function(a) { - function e() { + function c() { a.apply(this, arguments); } - __extends(e, a); - Object.defineProperty(e, "dynamicPropertyWriter", {get:function() { - s("public flash.net.ObjectEncoding::get dynamicPropertyWriter"); + __extends(c, a); + Object.defineProperty(c, "dynamicPropertyWriter", {get:function() { + r("public flash.net.ObjectEncoding::get dynamicPropertyWriter"); return null; }, set:function(a) { - s("public flash.net.ObjectEncoding::set dynamicPropertyWriter"); + r("public flash.net.ObjectEncoding::set dynamicPropertyWriter"); }, enumerable:!0, configurable:!0}); - e.AMF0 = 0; - e.AMF3 = 3; - e.DEFAULT = e.AMF3; - return e; + c.AMF0 = 0; + c.AMF3 = 3; + c.DEFAULT = c.AMF3; + return c; }(a.ASNative); - e.ObjectEncoding = c; - })(c.net || (c.net = {})); + d.ObjectEncoding = c; + })(d.net || (d.net = {})); })(a.flash || (a.flash = {})); - (function(l) { - (function(e) { - var m = function(a) { - function e() { + (function(r) { + (function(l) { + var c = function(a) { + function c() { } - __extends(e, a); - Object.defineProperty(e, "defaultObjectEncoding", {get:function() { + __extends(c, a); + Object.defineProperty(c, "defaultObjectEncoding", {get:function() { return this._defaultObjectEncoding; }, set:function(a) { this._defaultObjectEncoding = a >>> 0; }, enumerable:!0, configurable:!0}); - e.prototype.readObject = function() { + c.prototype.readObject = function() { switch(this._objectEncoding) { - case l.net.ObjectEncoding.AMF0: - return h.AMF0.read(this); - case l.net.ObjectEncoding.AMF3: - return h.AMF3.read(this); + case r.net.ObjectEncoding.AMF0: + return k.AMF0.read(this); + case r.net.ObjectEncoding.AMF3: + return k.AMF3.read(this); default: v("Object Encoding"); } }; - e.prototype.writeObject = function(a) { + c.prototype.writeObject = function(a) { switch(this._objectEncoding) { - case l.net.ObjectEncoding.AMF0: - return h.AMF0.write(this, a); - case l.net.ObjectEncoding.AMF3: - return h.AMF3.write(this, a); + case r.net.ObjectEncoding.AMF0: + return k.AMF0.write(this, a); + case r.net.ObjectEncoding.AMF3: + return k.AMF3.write(this, a); default: v("Object Encoding"); } }; - e.instanceConstructor = p; - e.staticNatives = [p]; - e.instanceNatives = [p.prototype]; - e.callableConstructor = null; - e.initializer = function(a) { - var k, f = 0; - a ? (a instanceof ArrayBuffer ? k = a.slice() : Array.isArray(a) ? k = (new Uint8Array(a)).buffer : "buffer" in a ? a.buffer instanceof ArrayBuffer ? k = (new Uint8Array(a)).buffer : a.buffer instanceof Uint8Array ? (k = a.buffer.byteOffset, k = a.buffer.buffer.slice(k, k + a.buffer.length)) : (u(a.buffer instanceof ArrayBuffer), k = a.buffer.slice()) : c.Debug.unexpected("Source type."), f = k.byteLength) : k = new ArrayBuffer(e.INITIAL_SIZE); - this._buffer = k; - this._length = f; + c.instanceConstructor = u; + c.staticNatives = [u]; + c.instanceNatives = [u.prototype]; + c.callableConstructor = null; + c.initializer = function(a) { + var h, g = 0; + a ? (a instanceof ArrayBuffer ? h = a.slice() : Array.isArray(a) ? h = (new Uint8Array(a)).buffer : "buffer" in a ? a.buffer instanceof ArrayBuffer ? h = (new Uint8Array(a)).buffer : a.buffer instanceof Uint8Array ? (h = a.buffer.byteOffset, h = a.buffer.buffer.slice(h, h + a.buffer.length)) : h = a.buffer.slice() : d.Debug.unexpected("Source type."), g = h.byteLength) : h = new ArrayBuffer(c.INITIAL_SIZE); + this._buffer = h; + this._length = g; this._position = 0; this._resetViews(); - this._objectEncoding = e.defaultObjectEncoding; + this._objectEncoding = c.defaultObjectEncoding; this._littleEndian = !1; this._bitLength = this._bitBuffer = 0; }; - e.protocol = e.prototype; - e.INITIAL_SIZE = 128; - e._defaultObjectEncoding = l.net.ObjectEncoding.DEFAULT; - return e; + c.protocol = c.prototype; + c.INITIAL_SIZE = 128; + c._defaultObjectEncoding = r.net.ObjectEncoding.DEFAULT; + return c; }(a.ASNative); - e.ByteArray = m; - m.prototype.asGetNumericProperty = p.prototype.getValue; - m.prototype.asSetNumericProperty = p.prototype.setValue; - e.OriginalByteArray = m; - })(l.utils || (l.utils = {})); + l.ByteArray = c; + c.prototype.asGetNumericProperty = u.prototype.getValue; + c.prototype.asSetNumericProperty = u.prototype.setValue; + l.OriginalByteArray = c; + })(r.utils || (r.utils = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.notImplemented, h = c.Debug.somewhatImplemented, p = c.AVM2.Runtime.asCoerceString; - (function(u) { + var r = d.Debug.notImplemented, k = d.Debug.somewhatImplemented, u = d.AVM2.Runtime.asCoerceString; + (function(t) { (function(l) { - var e = function(a) { - function e() { + var c = function(a) { + function c() { } - __extends(e, a); - Object.defineProperty(e, "enabled", {get:function() { - s("public flash.system.IME::static get enabled"); + __extends(c, a); + Object.defineProperty(c, "enabled", {get:function() { + r("public flash.system.IME::static get enabled"); }, set:function(a) { - s("public flash.system.IME::static set enabled"); + r("public flash.system.IME::static set enabled"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "conversionMode", {get:function() { - s("public flash.system.IME::static get conversionMode"); + Object.defineProperty(c, "conversionMode", {get:function() { + r("public flash.system.IME::static get conversionMode"); }, set:function(a) { - p(a); - s("public flash.system.IME::static set conversionMode"); + u(a); + r("public flash.system.IME::static set conversionMode"); }, enumerable:!0, configurable:!0}); - e.setCompositionString = function(a) { - p(a); - s("public flash.system.IME::static setCompositionString"); + c.setCompositionString = function(a) { + u(a); + r("public flash.system.IME::static setCompositionString"); }; - e.doConversion = function() { - s("public flash.system.IME::static doConversion"); + c.doConversion = function() { + r("public flash.system.IME::static doConversion"); }; - e.compositionSelectionChanged = function(a, e) { - s("public flash.system.IME::static compositionSelectionChanged"); + c.compositionSelectionChanged = function(a, c) { + r("public flash.system.IME::static compositionSelectionChanged"); }; - e.compositionAbandoned = function() { - s("public flash.system.IME::static compositionAbandoned"); + c.compositionAbandoned = function() { + r("public flash.system.IME::static compositionAbandoned"); }; - Object.defineProperty(e, "isSupported", {get:function() { - h("public flash.system.IME::static get isSupported"); + Object.defineProperty(c, "isSupported", {get:function() { + k("public flash.system.IME::static get isSupported"); return!1; }, enumerable:!0, configurable:!0}); - return e; + return c; }(a.ASNative); - l.IME = e; - e = function(a) { - function e() { + l.IME = c; + c = function(a) { + function c() { a.apply(this, arguments); } - __extends(e, a); - Object.defineProperty(e, "ime", {get:function() { - s("public flash.system.System::get ime"); + __extends(c, a); + Object.defineProperty(c, "ime", {get:function() { + r("public flash.system.System::get ime"); }, enumerable:!0, configurable:!0}); - e.setClipboard = function(a) { - a = p(a); - null === c.ClipboardService.instance ? console.warn("setClipboard is only available in the Firefox extension") : c.ClipboardService.instance.setClipboard(a); + c.setClipboard = function(a) { + a = u(a); + null === d.ClipboardService.instance ? console.warn("setClipboard is only available in the Firefox extension") : d.ClipboardService.instance.setClipboard(a); }; - Object.defineProperty(e, "totalMemoryNumber", {get:function() { - h("public flash.system.System::get totalMemoryNumber"); + Object.defineProperty(c, "totalMemoryNumber", {get:function() { + k("public flash.system.System::get totalMemoryNumber"); return 2097152; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "freeMemory", {get:function() { - h("public flash.system.System::get freeMemory"); + Object.defineProperty(c, "freeMemory", {get:function() { + k("public flash.system.System::get freeMemory"); return 1048576; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "privateMemory", {get:function() { - h("public flash.system.System::get privateMemory"); + Object.defineProperty(c, "privateMemory", {get:function() { + k("public flash.system.System::get privateMemory"); return 1048576; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "useCodePage", {get:function() { - return e._useCodePage; + Object.defineProperty(c, "useCodePage", {get:function() { + return c._useCodePage; }, set:function(a) { - e._useCodePage = !!a; + c._useCodePage = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "vmVersion", {get:function() { + Object.defineProperty(c, "vmVersion", {get:function() { return "1.0 Shumway - Mozilla Research"; }, enumerable:!0, configurable:!0}); - e.pause = function() { + c.pause = function() { }; - e.resume = function() { + c.resume = function() { }; - e.exit = function(a) { + c.exit = function(a) { }; - e.gc = function() { + c.gc = function() { }; - e.pauseForGCIfCollectionImminent = function(a) { + c.pauseForGCIfCollectionImminent = function(a) { }; - e.disposeXML = function(a) { + c.disposeXML = function(a) { }; - Object.defineProperty(e, "swfVersion", {get:function() { + Object.defineProperty(c, "swfVersion", {get:function() { return 19; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e, "apiVersion", {get:function() { + Object.defineProperty(c, "apiVersion", {get:function() { return 26; }, enumerable:!0, configurable:!0}); - e.getArgv = function() { + c.getArgv = function() { return[]; }; - e.getRunmode = function() { + c.getRunmode = function() { return "mixed"; }; - e._useCodePage = !1; - return e; + c._useCodePage = !1; + return c; }(a.ASNative); - l.System = e; - l.OriginalSystem = e; - })(u.system || (u.system = {})); + l.System = c; + l.OriginalSystem = c; + })(t.system || (t.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.AVM2.ABC.Multiname, v = c.AVM2.ABC.ClassInfo, p = c.AVM2.ABC.ScriptInfo, u = c.AVM2.ABC.InstanceInfo, l = c.AVM2.ABC.Info, e = c.AVM2.ABC.MethodInfo, m = c.Debug.assert, t = c.Debug.notImplemented, q = c.ArrayUtilities.popManyIntoVoid, n = function() { + var r = d.AVM2.ABC.Multiname, v = d.AVM2.ABC.ClassInfo, u = d.AVM2.ABC.ScriptInfo, t = d.AVM2.ABC.InstanceInfo, l = d.AVM2.ABC.Info, c = d.AVM2.ABC.MethodInfo, h = d.Debug.notImplemented, p = d.ArrayUtilities.popManyIntoVoid, s = function() { return function(b) { void 0 === b && (b = ""); this.message = b; this.name = "VerifierError"; }; }(); - a.VerifierError = n; - var k = function() { + a.VerifierError = s; + var m = function() { return function() { + this.object = this.baseClass = this.type = null; + this.scopeDepth = -1; + this.trait = null; + this.noCallSuperNeeded = this.noCoercionNeeded = !1; }; }(); - a.TypeInformation = k; - var f = function() { + a.TypeInformation = m; + var g = function() { function a() { } - a.from = function(d, g) { - m(d.hash); - var e = a._cache[d.hash]; - e || (e = a._cache[d.hash] = new b(d, g)); - return e; + a.from = function(e, c) { + var f = a._cache[e.hash]; + f || (f = a._cache[e.hash] = new b(e, c)); + return f; }; - a.fromSimpleName = function(b, d) { - return a.fromName(s.fromSimpleName(b), d); + a.fromSimpleName = function(b, e) { + return a.fromName(r.fromSimpleName(b), e); }; - a.fromName = function(b, d) { + a.fromName = function(b, e) { if (void 0 === b) { return a.Undefined; } - var g = s.isQName(b) ? s.getFullQualifiedName(b) : void 0; - if (g) { - var e = a._cache.byQN[g]; - if (e) { - return e; + var c = r.isQName(b) ? r.getFullQualifiedName(b) : void 0; + if (c) { + var f = a._cache.byQN[c]; + if (f) { + return f; } } - if (g === s.getPublicQualifiedName("void")) { + if (c === r.getPublicQualifiedName("void")) { return a.Void; } - m(d, "An ApplicationDomain is needed."); - e = (e = d.findClassInfo(b)) ? a.from(e, d) : a.Any; - b.hasTypeParameter() && (e = new w(e, a.fromName(b.typeParameter, d))); - return a._cache.byQN[g] = e; + f = (f = e.findClassInfo(b)) ? a.from(f, e) : a.Any; + b.hasTypeParameter() && (f = new n(f, a.fromName(b.typeParameter, e))); + return a._cache.byQN[c] = f; }; a.initializeTypes = function(b) { - a._typesInitialized || (a.Any = new d("any", "?"), a.Null = new d("Null", "X"), a.Void = new d("Void", "V"), a.Undefined = new d("Undefined", "_"), a.Int = a.fromSimpleName("int", b).instanceType(), a.Uint = a.fromSimpleName("uint", b).instanceType(), a.Class = a.fromSimpleName("Class", b).instanceType(), a.Array = a.fromSimpleName("Array", b).instanceType(), a.Object = a.fromSimpleName("Object", b).instanceType(), a.String = a.fromSimpleName("String", b).instanceType(), a.Number = a.fromSimpleName("Number", + a._typesInitialized || (a.Any = new f("any", "?"), a.Null = new f("Null", "X"), a.Void = new f("Void", "V"), a.Undefined = new f("Undefined", "_"), a.Int = a.fromSimpleName("int", b).instanceType(), a.Uint = a.fromSimpleName("uint", b).instanceType(), a.Class = a.fromSimpleName("Class", b).instanceType(), a.Array = a.fromSimpleName("Array", b).instanceType(), a.Object = a.fromSimpleName("Object", b).instanceType(), a.String = a.fromSimpleName("String", b).instanceType(), a.Number = a.fromSimpleName("Number", b).instanceType(), a.Boolean = a.fromSimpleName("Boolean", b).instanceType(), a.Function = a.fromSimpleName("Function", b).instanceType(), a.XML = a.fromSimpleName("XML", b).instanceType(), a.XMLList = a.fromSimpleName("XMLList", b).instanceType(), a.QName = a.fromSimpleName("QName", b).instanceType(), a.Namespace = a.fromSimpleName("Namespace", b).instanceType(), a.Dictionary = a.fromSimpleName("flash.utils.Dictionary", b).instanceType(), a._typesInitialized = !0); }; a.prototype.equals = function(b) { @@ -15414,13 +15651,12 @@ Shumway.AVM2.XRegExp.install(); return a.Any; }; a.prototype.super = function() { - c.Debug.abstractMethod("super"); return null; }; a.prototype.applyType = function(b) { return null; }; - a.prototype.getTrait = function(b, a, d) { + a.prototype.getTrait = function(b, a, e) { return null; }; a.prototype.isNumeric = function() { @@ -15445,138 +15681,128 @@ Shumway.AVM2.XRegExp.install(); return this instanceof b; }; a.prototype.isParameterizedType = function() { - return this instanceof w; + return this instanceof n; }; a.prototype.isMethodType = function() { - return this instanceof g; + return this instanceof e; }; a.prototype.isMultinameType = function() { - return this instanceof r; + return this instanceof q; }; a.prototype.isConstantType = function() { - return this instanceof z; + return this instanceof x; }; a.prototype.isSubtypeOf = function(b) { return this === b || this.equals(b) ? !0 : this.merge(b) === this; }; a.prototype.asTraitsType = function() { - m(this.isTraitsType()); return this; }; a.prototype.asMethodType = function() { - m(this.isMethodType()); return this; }; a.prototype.asMultinameType = function() { - m(this.isMultinameType()); return this; }; a.prototype.asConstantType = function() { - m(this.isConstantType()); return this; }; a.prototype.getConstantValue = function() { - m(this.isConstantType()); return this.value; }; a.prototype.asParameterizedType = function() { - m(this.isParameterizedType()); return this; }; a._cache = {byQN:Object.create(null), byHash:Object.create(null)}; a._typesInitialized = !1; return a; }(); - a.Type = f; - var d = function(b) { - function a(d, g) { + a.Type = g; + var f = function(b) { + function a(e, f) { b.call(this); - this.name = d; - this.symbol = g; + this.name = e; + this.symbol = f; } __extends(a, b); a.prototype.toString = function() { return this.symbol; }; a.prototype.instanceType = function() { - return f.Any; + return g.Any; }; return a; - }(f); - a.AtomType = d; + }(g); + a.AtomType = f; var b = function(b) { - function a(d, g) { + function a(e, f) { b.call(this); - this.info = d; - this.domain = g; + this.info = e; + this.domain = f; } __extends(a, b); a.prototype.instanceType = function() { - m(this.info instanceof v); var b = this.info; - return this._cachedType || (this._cachedType = f.from(b.instanceInfo, this.domain)); + return this._cachedType || (this._cachedType = g.from(b.instanceInfo, this.domain)); }; a.prototype.classType = function() { - m(this.info instanceof u); var b = this.info; - return this._cachedType || (this._cachedType = f.from(b.classInfo, this.domain)); + return this._cachedType || (this._cachedType = g.from(b.classInfo, this.domain)); }; a.prototype.super = function() { if (this.info instanceof v) { - return f.Class; + return g.Class; } - m(this.info instanceof u); var b = this.info; - return b.superName ? (b = f.fromName(b.superName, this.domain).instanceType(), m(b instanceof a && b.info instanceof u), b) : null; + return b.superName ? g.fromName(b.superName, this.domain).instanceType() : null; }; - a.prototype.findTraitByName = function(b, a, d) { - var g = !d, e; - if (s.isQName(a)) { - for (a = s.getQualifiedName(a), k = 0;k < b.length;k++) { - if (e = b[k], s.getQualifiedName(e.name) === a && !(d && e.isGetter() || g && e.isSetter())) { - return e; + a.prototype.findTraitByName = function(b, a, e) { + var f = !e, c; + if (r.isQName(a)) { + for (a = r.getQualifiedName(a), n = 0;n < b.length;n++) { + if (c = b[n], r.getQualifiedName(c.name) === a && !(e && c.isGetter() || f && c.isSetter())) { + return c; } } } else { - m(a instanceof s); - for (var f, k = 0;k < a.namespaces.length;k++) { - if (g = a.getQName(k), a.namespaces[k].isDynamic()) { - f = g; + for (var g, n = 0;n < a.namespaces.length;n++) { + if (f = a.getQName(n), a.namespaces[n].isDynamic()) { + g = f; } else { - if (e = this.findTraitByName(b, g, d)) { - return e; + if (c = this.findTraitByName(b, f, e)) { + return c; } } } - if (f) { - return this.findTraitByName(b, f, d); + if (g) { + return this.findTraitByName(b, g, e); } } }; - a.prototype.getTrait = function(b, a, d) { + a.prototype.getTrait = function(b, a, e) { if (b.isMultinameType()) { return null; } - var g = b.getConstantValue(); - if (g.isAttribute()) { + var f = b.value; + if (f.isAttribute()) { return null; } - if (d && (this.isInstanceInfo() || this.isClassInfo())) { - d = this; + if (e && (this.isInstanceInfo() || this.isClassInfo())) { + e = this; do { - (g = d.getTrait(b, a, !1)) || (d = d.super()); - } while (!g && d); - return g; + (f = e.getTrait(b, a, !1)) || (e = e.super()); + } while (!f && e); + return f; } - return this.findTraitByName(this.info.traits, g, a); + return this.findTraitByName(this.info.traits, f, a); }; a.prototype.getTraitAt = function(b) { - for (var a = this.info.traits, d = a.length - 1;0 <= d;d--) { - if (a[d].slotId === b) { - return a[d]; + for (var a = this.info.traits, e = a.length - 1;0 <= e;e--) { + if (a[e].slotId === b) { + return a[e]; } } - c.Debug.unexpected("Cannot find trait with slotId: " + b + " in " + a); + d.Debug.unexpected("Cannot find trait with slotId: " + b + " in " + a); }; a.prototype.equals = function(b) { return b.isTraitsType() && this.info.traits === b.info.traits; @@ -15587,124 +15813,123 @@ Shumway.AVM2.XRegExp.install(); return this; } if (this.isNumeric() && b.isNumeric()) { - return f.Number; + return g.Number; } if (this.isInstanceInfo() && b.isInstanceInfo()) { - for (var a = [], d = this;d;d = d.super()) { - a.push(d); + for (var a = [], e = this;e;e = e.super()) { + a.push(e); } - for (d = b;d;d = d.super()) { + for (e = b;e;e = e.super()) { for (b = 0;b < a.length;b++) { - if (a[b].equals(d)) { - return d; + if (a[b].equals(e)) { + return e; } } } - return f.Object; + return g.Object; } } - return f.Any; + return g.Any; }; a.prototype.isScriptInfo = function() { - return this.info instanceof p; + return this.info instanceof u; }; a.prototype.isClassInfo = function() { return this.info instanceof v; }; a.prototype.isMethodInfo = function() { - return this.info instanceof e; + return this.info instanceof c; }; a.prototype.isInstanceInfo = function() { - return this.info instanceof u; + return this.info instanceof t; }; a.prototype.isInstanceOrClassInfo = function() { return this.isInstanceInfo() || this.isClassInfo(); }; a.prototype.applyType = function(b) { - return new w(this, b); + return new n(this, b); }; a.prototype._getInfoName = function() { - if (this.info instanceof p) { + if (this.info instanceof u) { return "SI"; } if (this.info instanceof v) { return "CI:" + this.info.instanceInfo.name.name; } - if (this.info instanceof u) { + if (this.info instanceof t) { return "II:" + this.info.name.name; } - if (this.info instanceof e) { + if (this.info instanceof c) { return "MI"; } - m(!1); }; a.prototype.toString = function() { switch(this) { - case f.Int: + case g.Int: return "I"; - case f.Uint: + case g.Uint: return "U"; - case f.Array: + case g.Array: return "A"; - case f.Object: + case g.Object: return "O"; - case f.String: + case g.String: return "S"; - case f.Number: + case g.Number: return "N"; - case f.Boolean: + case g.Boolean: return "B"; - case f.Function: + case g.Function: return "F"; } return this._getInfoName(); }; return a; - }(f); + }(g); a.TraitsType = b; - var g = function(b) { - function a(d, g) { - b.call(this, f.Function.info, g); - this.methodInfo = d; + var e = function(b) { + function a(e, f) { + b.call(this, g.Function.info, f); + this.methodInfo = e; } __extends(a, b); a.prototype.toString = function() { return "MT " + this.methodInfo; }; a.prototype.returnType = function() { - return this._cachedType || (this._cachedType = f.fromName(this.methodInfo.returnType, this.domain)); + return this._cachedType || (this._cachedType = g.fromName(this.methodInfo.returnType, this.domain)); }; return a; }(b); - a.MethodType = g; - var r = function(b) { - function a(d, g, e) { + a.MethodType = e; + var q = function(b) { + function a(e, f, c) { b.call(this); - this.namespaces = d; - this.name = g; - this.flags = e; + this.namespaces = e; + this.name = f; + this.flags = c; } __extends(a, b); a.prototype.toString = function() { return "MN"; }; return a; - }(f); - a.MultinameType = r; - var w = function(b) { - function a(d, g) { - b.call(this, d.info, d.domain); - this.type = d; - this.parameter = g; + }(g); + a.MultinameType = q; + var n = function(b) { + function a(e, f) { + b.call(this, e.info, e.domain); + this.type = e; + this.parameter = f; } __extends(a, b); return a; }(b); - a.ParameterizedType = w; - var z = function(b) { - function a(d) { + a.ParameterizedType = n; + var x = function(b) { + function a(e) { b.call(this); - this.value = d; + this.value = e; } __extends(a, b); a.prototype.toString = function() { @@ -15719,11 +15944,11 @@ Shumway.AVM2.XRegExp.install(); }); }; return a; - }(f); - a.ConstantType = z; - var A = function() { + }(g); + a.ConstantType = x; + var L = function() { function b() { - this.id = b.id += 1; + this.originalId = this.id = b.id += 1; this.stack = []; this.scope = []; this.local = []; @@ -15749,8 +15974,8 @@ Shumway.AVM2.XRegExp.install(); if (b.length != a.length) { return!1; } - for (var d = b.length - 1;0 <= d;d--) { - if (!b[d].equals(a[d])) { + for (var e = b.length - 1;0 <= e;e--) { + if (!b[e].equals(a[e])) { return!1; } } @@ -15763,8 +15988,8 @@ Shumway.AVM2.XRegExp.install(); if (b.length != a.length) { return!1; } - for (var d = b.length - 1;0 <= d;d--) { - if (b[d] !== a[d] && !b[d].equals(a[d]) && b[d].merge(a[d]) !== b[d]) { + for (var e = b.length - 1;0 <= e;e--) { + if (b[e] !== a[e] && !b[e].equals(a[e]) && b[e].merge(a[e]) !== b[e]) { return!1; } } @@ -15776,220 +16001,209 @@ Shumway.AVM2.XRegExp.install(); b._mergeArrays(this.scope, a.scope); }; b._mergeArrays = function(b, a) { - m(b.length === a.length, "a: " + b + " b: " + a); - for (var d = b.length - 1;0 <= d;d--) { - m(void 0 !== b[d] && void 0 !== a[d]), b[d] !== a[d] && (b[d] = b[d].merge(a[d])); + for (var e = b.length - 1;0 <= e;e--) { + b[e] !== a[e] && (b[e] = b[e].merge(a[e])); } }; b.id = 0; return b; }(); - a.State = A; - var B = function() { - function a(b, d, g) { + a.State = L; + var A = function() { + function a(b, e, f) { this.methodInfo = b; - this.domain = d; - this.savedScope = g; - this.writer = new c.IndentingWriter; + this.domain = e; + this.savedScope = f; + this.thisType = this.writer = null; this.pushAnyCount = this.pushCount = 0; - f.initializeTypes(d); - this.writer = c.AVM2.Verifier.traceLevel.value ? new c.IndentingWriter : null; + g.initializeTypes(e); + d.AVM2.Verifier.traceLevel.value && (this.writer = new d.IndentingWriter); this.multinames = b.abc.constantPool.multinames; - this.returnType = f.Undefined; + this.returnType = g.Undefined; } a.prototype.verify = function() { - var b = this.methodInfo; this.writer && this.methodInfo.trace(this.writer); - m(b.localCount >= b.parameters.length + 1); this._verifyBlocks(this._prepareEntryState()); }; a.prototype._prepareEntryState = function() { - var b = new A, a = this.methodInfo; - this.thisType = a.holder ? f.from(a.holder, this.domain) : f.Any; + var b = new L, a = this.methodInfo; + this.thisType = a.holder ? g.from(a.holder, this.domain) : g.Any; b.local.push(this.thisType); - for (var d = a.parameters, g = 0;g < d.length;g++) { - b.local.push(f.fromName(d[g].type, this.domain).instanceType()); + for (var e = a.parameters, f = 0;f < e.length;f++) { + b.local.push(g.fromName(e[f].type, this.domain).instanceType()); } - d = a.localCount - a.parameters.length - 1; + e = a.localCount - a.parameters.length - 1; if (a.needsRest() || a.needsArguments()) { - b.local.push(f.Array), d -= 1; + b.local.push(g.Array), e -= 1; } - for (g = 0;g < d;g++) { - b.local.push(f.Undefined); + for (f = 0;f < e;f++) { + b.local.push(g.Undefined); } - m(b.local.length === a.localCount); return b; }; a.prototype._verifyBlocks = function(b) { - var a = this.writer, d = this.methodInfo.analysis.blocks; - d.forEach(function(b) { - b.verifierEntryState = b.verifierExitState = null; - }); - for (var g = 0;g < d.length;g++) { - d[g].bdo = g; + for (var a = this.writer, e = this.methodInfo.analysis.blocks, f = 0;f < e.length;f++) { + e[f].bdo = f; } - var e = new c.SortedList(function(b, a) { + var c = new d.SortedList(function(b, a) { return b.bdo - a.bdo; }); - d[0].verifierEntryState = b; - for (e.push(d[0]);!e.isEmpty();) { - var f = e.pop(), k = f.verifierExitState = f.verifierEntryState.clone(); - this._verifyBlock(f, k); - f.succs.forEach(function(b) { - e.contains(b) ? (a && a.writeLn("Forward Merged Block: " + b.bid + " " + k.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(k), a && a.writeLn("Merged State: " + b.verifierEntryState)) : b.verifierEntryState ? b.verifierEntryState.isSubset(k) || (a && a.writeLn("Backward Merged Block: " + f.bid + " with " + b.bid + " " + k.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(k), e.push(b), a && a.writeLn("Merged State: " + - b.verifierEntryState)) : (b.verifierEntryState = k.clone(), e.push(b), a && a.writeLn("Added Block: " + b.bid + " to worklist: " + b.verifierEntryState.toString())); + e[0].verifierEntryState = b; + for (c.push(e[0]);!c.isEmpty();) { + var g = c.pop(), n = g.verifierEntryState.clone(); + this._verifyBlock(g, n); + g.succs.forEach(function(b) { + c.contains(b) ? (a && a.writeLn("Forward Merged Block: " + b.bid + " " + n.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(n), a && a.writeLn("Merged State: " + b.verifierEntryState)) : b.verifierEntryState ? b.verifierEntryState.isSubset(n) || (a && a.writeLn("Backward Merged Block: " + g.bid + " with " + b.bid + " " + n.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(n), c.push(b), a && a.writeLn("Merged State: " + + b.verifierEntryState)) : (b.verifierEntryState = n, c.push(b), a && a.writeLn("Added Block: " + b.bid + " to worklist: " + b.verifierEntryState.toString())); }); } a && (a.writeLn("Inferred return type: " + this.returnType), a.writeLn("Quality pushCount: " + this.pushCount + ", pushAnyCount: " + this.pushAnyCount)); this.methodInfo.inferredReturnType = this.returnType; }; - a.prototype._verifyBlock = function(a, d) { - function e() { - return ea.ti || (ea.ti = new k); + a.prototype._verifyBlock = function(a, f) { + function c() { + return U.ti || (U.ti = new m); } - function w(b) { - m(b); - e().type = b; - W.push(b); - S.pushCount++; - b === f.Any && S.pushAnyCount++; + function n(b) { + c().type = b; + $.push(b); + O.pushCount++; + b === g.Any && O.pushAnyCount++; } function l(b) { - return W.pop(); + return $.pop(); } - function A() { - t("Bytecode not implemented in verifier: " + ea); + function L() { + h("Bytecode not implemented in verifier: " + U); } - function p() { - var b = S.multinames[ea.index]; + function u() { + var b = O.multinames[U.index]; if (b.isRuntime()) { var a; - a = b.isRuntimeName() ? l() : z.from(b.name); - var d; - d = b.isRuntimeNamespace() ? [l()] : z.fromArray(b.namespaces); - return new r(d, a, b.flags); + a = b.isRuntimeName() ? l() : x.from(b.name); + var e; + e = b.isRuntimeNamespace() ? [l()] : x.fromArray(b.namespaces); + return new q(e, a, b.flags); } - return z.from(b); + return x.from(b); } - function v(b) { - return b.isMultinameType() && b.asMultinameType().name.isNumeric() || b.isConstantType() && s.isNumeric(b.getConstantValue()) ? !0 : !1; + function t(b) { + return b.isMultinameType() && b.asMultinameType().name.isNumeric() || b.isConstantType() && r.isNumeric(b.value) ? !0 : !1; } - function B(b, a) { + function A(b, a) { if (b.isTraitsType() || b.isParameterizedType()) { - var d = b.getTrait(a, !1, !0); - if (d) { - O && O.debugLn("getProperty(" + a + ") -> " + d); - e().trait = d; - if (d.isSlot() || d.isConst()) { - return f.fromName(d.typeName, S.domain).instanceType(); + var f = b.getTrait(a, !1, !0); + if (f) { + Q && Q.debugLn("getProperty(" + a + ") -> " + f); + c().trait = f; + if (f.isSlot() || f.isConst()) { + return g.fromName(f.typeName, O.domain).instanceType(); } - if (d.isGetter()) { - return f.fromName(d.methodInfo.returnType, S.domain).instanceType(); + if (f.isGetter()) { + return g.fromName(f.methodInfo.returnType, O.domain).instanceType(); } - if (d.isClass()) { - return f.from(d.classInfo, S.domain); + if (f.isClass()) { + return g.from(f.classInfo, O.domain); } - if (d.isMethod()) { - return new g(d.methodInfo, S.domain); + if (f.isMethod()) { + return new e(f.methodInfo, O.domain); } } else { - if (v(a) && b.isParameterizedType()) { - return d = b.asParameterizedType().parameter, O && O.debugLn("getProperty(" + a + ") -> " + d), d; + if (t(a) && b.isParameterizedType()) { + return f = b.asParameterizedType().parameter, Q && Q.debugLn("getProperty(" + a + ") -> " + f), f; } - b !== f.Array && O && O.warnLn("getProperty(" + a + ")"); + b !== g.Array && Q && Q.warnLn("getProperty(" + a + ")"); } } - return f.Any; + return g.Any; } - function u(b, a, d) { + function v(b, a, e) { if (b.isTraitsType() || b.isParameterizedType()) { - (d = b.getTrait(a, !0, !0)) ? (O && O.debugLn("setProperty(" + a + ") -> " + d), e().trait = d) : v(a) && b.isParameterizedType() || b !== f.Array && O && O.warnLn("setProperty(" + a + ")"); + (e = b.getTrait(a, !0, !0)) ? (Q && Q.debugLn("setProperty(" + a + ") -> " + e), c().trait = e) : t(a) && b.isParameterizedType() || b !== g.Array && Q && Q.warnLn("setProperty(" + a + ")"); } } - function M(b, a) { + function H(b, a) { if (b.isMultinameType()) { - return f.Any; + return g.Any; } - for (var d = S.savedScope, g = x.length - 1;g >= -d.length;g--) { - var k = 0 <= g ? x[g] : d[d.length + g]; - if (k.isTraitsType()) { - if (k.getTrait(b, !1, !0)) { - e().scopeDepth = x.length - g - 1; - if (k.isClassInfo() || k.isScriptInfo()) { - e().object = h.Runtime.LazyInitializer.create(k.info); + for (var e = O.savedScope, f = w.length - 1;f >= -e.length;f--) { + var n = 0 <= f ? w[f] : e[e.length + f]; + if (n.isTraitsType()) { + if (n.getTrait(b, !1, !0)) { + c().scopeDepth = w.length - f - 1; + if (n.isClassInfo() || n.isScriptInfo()) { + c().object = k.Runtime.LazyInitializer.create(n.info); } - O && O.debugLn("findProperty(" + b + ") -> " + k); - return k; + Q && Q.debugLn("findProperty(" + b + ") -> " + n); + return n; } } else { - return O && O.warnLn("findProperty(" + b + ")"), f.Any; + return Q && Q.warnLn("findProperty(" + b + ")"), g.Any; } } - if (d = S.domain.findDefiningScript(b.getConstantValue(), !1)) { - return e().object = h.Runtime.LazyInitializer.create(d.script), k = f.from(d.script, S.domain), O && O.debugLn("findProperty(" + b + ") -> " + k), k; + if (e = O.domain.findDefiningScript(b.value, !1)) { + return c().object = k.Runtime.LazyInitializer.create(e.script), n = g.from(e.script, O.domain), Q && Q.debugLn("findProperty(" + b + ") -> " + n), n; } - if (b.isConstantType() && "unsafeJSNative" === b.getConstantValue().name) { - return f.Any; + if (b.isConstantType() && "unsafeJSNative" === b.value.name) { + return g.Any; } - O && O.warnLn("findProperty(" + b + ")"); - return f.Any; + Q && Q.warnLn("findProperty(" + b + ")"); + return g.Any; } - function N(a) { - if (a instanceof b && (a = a.getTraitAt(ea.index), O && O.debugLn("accessSlot() -> " + a), a)) { - e().trait = a; + function K(a) { + if (a instanceof b && (a = a.getTraitAt(U.index), Q && Q.debugLn("accessSlot() -> " + a), a)) { + c().trait = a; if (a.isSlot()) { - return f.fromName(a.typeName, S.domain).instanceType(); + return g.fromName(a.typeName, O.domain).instanceType(); } if (a.isClass()) { - return f.from(a.classInfo, S.domain); + return g.from(a.classInfo, O.domain); } } - return f.Any; + return g.Any; } - function Q(b) { + function T(b) { if (b.isTraitsType() || b.isParameterizedType()) { - return b === f.Function || b === f.Class || b === f.Object ? f.Object : b.instanceType(); + return b === g.Function || b === g.Class || b === g.Object ? g.Object : b.instanceType(); } - O && O.warnLn("construct(" + b + ")"); - return f.Any; + Q && Q.warnLn("construct(" + b + ")"); + return g.Any; } - for (var S = this, O = this.writer, P = this.methodInfo, V = P.analysis.bytecodes, $ = d.local, W = d.stack, x = d.scope, ea, Y = this.savedScope[0], R, U, ba, X = a.position, ga = a.end.position;X <= ga;X++) { - if (ea = V[X], R = ea.op, 240 !== R && 241 !== R) { - switch(O && 1 < c.AVM2.Verifier.traceLevel.value && O.writeLn(("stateBefore: " + d.toString() + " $$[" + this.savedScope.join(", ") + "]").padRight(" ", 100) + " : " + X + ", " + ea.toString(P.abc)), R) { + for (var O = this, Q = this.writer, S = this.methodInfo, V = S.analysis.bytecodes, aa = f.local, $ = f.stack, w = f.scope, U, ba = this.savedScope[0], R, N, Z, fa = a.position, X = a.end.position;fa <= X;fa++) { + if (U = V[fa], R = U.op, 240 !== R && 241 !== R) { + switch(Q && 1 < d.AVM2.Verifier.traceLevel.value && Q.writeLn(("stateBefore: " + f.toString() + " $$[" + this.savedScope.join(", ") + "]").padRight(" ", 100) + " : " + fa + ", " + U.toString(S.abc)), R) { case 1: break; case 3: l(); break; case 4: - ba = p(); - U = l(); - m(U.super()); - e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); - w(B(U.super(), ba)); + Z = u(); + N = l(); + c().baseClass = k.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); + n(A(N.super(), Z)); break; case 5: R = l(); - ba = p(); - U = l(); - m(U.super()); - e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); - u(U.super(), ba, R); + Z = u(); + N = l(); + c().baseClass = k.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); + v(N.super(), Z, R); break; case 6: - A(); + L(); break; case 7: - A(); + L(); break; case 8: - d.local[ea.index] = f.Undefined; + f.local[U.index] = g.Undefined; break; case 10: - A(); + L(); break; case 11: - A(); + L(); break; case 12: ; @@ -16025,121 +16239,121 @@ Shumway.AVM2.XRegExp.install(); l(); break; case 27: - l(f.Int); + l(g.Int); break; case 29: - x.pop(); + w.pop(); break; case 30: ; case 35: - l(f.Int); + l(g.Int); l(); - w(f.Any); + n(g.Any); break; case 31: - w(f.Boolean); + n(g.Boolean); break; case 50: - w(f.Boolean); + n(g.Boolean); break; case 32: - w(f.Null); + n(g.Null); break; case 33: - w(f.Undefined); + n(g.Undefined); break; case 34: - A(); + L(); break; case 36: - w(f.Int); + n(g.Int); break; case 37: - w(f.Int); + n(g.Int); break; case 44: - w(f.String); + n(g.String); break; case 45: - w(f.Int); + n(g.Int); break; case 46: - w(f.Uint); + n(g.Uint); break; case 47: - w(f.Number); + n(g.Number); break; case 38: - w(f.Boolean); + n(g.Boolean); break; case 39: - w(f.Boolean); + n(g.Boolean); break; case 40: - w(f.Number); + n(g.Number); break; case 41: l(); break; case 42: R = l(); - w(R); - w(R); + n(R); + n(R); break; case 43: - U = l(); - ba = l(); - w(U); - w(ba); + N = l(); + Z = l(); + n(N); + n(Z); break; case 28: l(); - x.push(f.Any); + w.push(g.Any); break; case 48: - x.push(l()); + w.push(l()); break; case 49: - A(); + L(); break; case 53: ; case 54: ; case 55: - w(f.Int); + n(g.Int); break; case 56: ; case 57: - w(f.Number); + n(g.Number); break; case 58: ; case 59: ; case 60: - l(f.Int); + l(g.Int); break; case 61: ; case 62: - l(f.Number); + l(g.Number); break; case 64: - w(f.Function); + n(g.Function); break; case 65: - q(W, ea.argCount); - U = l(); + p($, U.argCount); + N = l(); l(); - w(f.Any); + n(g.Any); break; case 67: - throw new n("callmethod");; + throw new s("callmethod");; case 68: - A(); + L(); break; case 69: ; @@ -16150,45 +16364,45 @@ Shumway.AVM2.XRegExp.install(); case 70: ; case 76: - q(W, ea.argCount); - ba = p(); - U = l(); + p($, U.argCount); + Z = u(); + N = l(); if (69 === R || 78 === R) { - U = this.thisType.super(), e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); + N = this.thisType.super(), c().baseClass = k.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); } - U = B(U, ba); + N = A(N, Z); if (79 === R || 78 === R) { break; } - U = U.isMethodType() ? U.asMethodType().returnType().instanceType() : U.isTraitsType() && U.isClassInfo() ? U.instanceType() : f.Any; - w(U); + N = N.isMethodType() ? N.asMethodType().returnType().instanceType() : N.isTraitsType() && N.isClassInfo() ? N.instanceType() : g.Any; + n(N); break; case 71: - this.returnType.merge(f.Undefined); + this.returnType.merge(g.Undefined); break; case 72: - U = l(); - P.returnType && (ba = f.fromName(P.returnType, this.domain).instanceType(), ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0)); + N = l(); + S.returnType && (Z = g.fromName(S.returnType, this.domain).instanceType(), Z.isSubtypeOf(N) && (c().noCoercionNeeded = !0)); break; case 73: - q(W, ea.argCount); - W.pop(); - this.thisType.isInstanceInfo() && this.thisType.super() === f.Object ? e().noCallSuperNeeded = !0 : e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); + p($, U.argCount); + $.pop(); + this.thisType.isInstanceInfo() && this.thisType.super() === g.Object ? c().noCallSuperNeeded = !0 : c().baseClass = k.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info); break; case 66: - q(W, ea.argCount); - w(Q(l())); + p($, U.argCount); + n(T(l())); break; case 74: - q(W, ea.argCount); - ba = p(); - w(Q(B(W.pop(), ba))); + p($, U.argCount); + Z = u(); + n(T(A($.pop(), Z))); break; case 75: - A(); + L(); break; case 77: - A(); + L(); break; case 80: ; @@ -16197,179 +16411,178 @@ Shumway.AVM2.XRegExp.install(); case 82: break; case 83: - m(1 === ea.argCount); R = l(); - U = l(); - U === f.Any ? w(f.Any) : w(U.applyType(R)); + N = l(); + N === g.Any ? n(g.Any) : n(N.applyType(R)); break; case 84: - A(); + L(); break; case 85: - q(W, 2 * ea.argCount); - w(f.Object); + p($, 2 * U.argCount); + n(g.Object); break; case 86: - q(W, ea.argCount); - w(f.Array); + p($, U.argCount); + n(g.Array); break; case 87: - w(f.from(this.methodInfo, this.domain)); + n(g.from(this.methodInfo, this.domain)); break; case 88: - w(f.Any); + n(g.Any); break; case 89: - p(); + u(); l(); - w(f.XMLList); + n(g.XMLList); break; case 90: - w(f.Any); + n(g.Any); break; case 93: - w(M(p(), !0)); + n(H(u(), !0)); break; case 94: - w(M(p(), !1)); + n(H(u(), !1)); break; case 95: - A(); + L(); break; case 96: - ba = p(); - w(B(M(ba, !0), ba)); + Z = u(); + n(A(H(Z, !0), Z)); break; case 104: ; case 97: R = l(); - ba = p(); - U = l(); - u(U, ba, R); + Z = u(); + N = l(); + v(N, Z, R); break; case 98: - w($[ea.index]); + n(aa[U.index]); break; case 99: - $[ea.index] = l(); + aa[U.index] = l(); break; case 100: - w(Y); - e().object = h.Runtime.LazyInitializer.create(Y.asTraitsType().info); + n(ba); + c().object = k.Runtime.LazyInitializer.create(ba.asTraitsType().info); break; case 101: - w(x[ea.index]); + n(w[U.index]); break; case 102: - ba = p(); - U = l(); - w(B(U, ba)); + Z = u(); + N = l(); + n(A(N, Z)); break; case 103: - A(); + L(); break; case 105: - A(); + L(); break; case 106: - p(); + u(); l(); - w(f.Boolean); + n(g.Boolean); break; case 107: - A(); + L(); break; case 108: - w(N(l())); + n(K(l())); break; case 109: R = l(); - U = l(); - N(U); + N = l(); + K(N); break; case 110: - A(); + L(); break; case 111: - A(); + L(); break; case 112: l(); - w(f.String); + n(g.String); break; case 113: l(); - w(f.String); + n(g.String); break; case 114: l(); - w(f.String); + n(g.String); break; case 131: ; case 115: l(); - w(f.Int); + n(g.Int); break; case 136: ; case 116: l(); - w(f.Uint); + n(g.Uint); break; case 132: ; case 117: l(); - w(f.Number); + n(g.Number); break; case 129: ; case 118: l(); - w(f.Boolean); + n(g.Boolean); break; case 119: - A(); + L(); break; case 120: break; case 121: l(); - w(f.Number); + n(g.Number); break; case 122: - A(); + L(); break; case 123: - A(); + L(); break; case 128: - U = l(); - ba = f.fromName(this.multinames[ea.index], this.domain).instanceType(); - ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0); - w(ba); + N = l(); + Z = g.fromName(this.multinames[U.index], this.domain).instanceType(); + Z.isSubtypeOf(N) && (c().noCoercionNeeded = !0); + n(Z); break; case 130: break; case 133: l(); - w(f.String); + n(g.String); break; case 134: - U = l(); - ba = f.fromName(this.multinames[ea.index], this.domain).instanceType(); - ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0); - w(ba); + N = l(); + Z = g.fromName(this.multinames[U.index], this.domain).instanceType(); + Z.isSubtypeOf(N) && (c().noCoercionNeeded = !0); + n(Z); break; case 135: - U = l(); + N = l(); l(); - U === f.Class ? w(U) : U.isTraitsType() ? w(U.instanceType()) : w(f.Any); + N === g.Class ? n(N) : N.isTraitsType() ? n(N.instanceType()) : n(g.Any); break; case 137: - A(); + L(); break; case 144: ; @@ -16377,25 +16590,25 @@ Shumway.AVM2.XRegExp.install(); ; case 147: l(); - w(f.Number); + n(g.Number); break; case 146: ; case 148: - $[ea.index] = f.Number; + aa[U.index] = g.Number; break; case 149: l(); - w(f.String); + n(g.String); break; case 150: l(); - w(f.Boolean); + n(g.Boolean); break; case 160: - ba = l(); - U = l(); - U.isNumeric() && ba.isNumeric() ? w(f.Number) : U === f.String || ba === f.String ? w(f.String) : w(f.Any); + Z = l(); + N = l(); + N.isNumeric() && Z.isNumeric() ? n(g.Number) : N === g.String || Z === g.String ? n(g.String) : n(g.Any); break; case 161: ; @@ -16406,7 +16619,7 @@ Shumway.AVM2.XRegExp.install(); case 164: l(); l(); - w(f.Number); + n(g.Number); break; case 168: ; @@ -16421,11 +16634,11 @@ Shumway.AVM2.XRegExp.install(); case 167: l(); l(); - w(f.Int); + n(g.Int); break; case 151: l(); - w(f.Int); + n(g.Int); break; case 171: ; @@ -16444,21 +16657,21 @@ Shumway.AVM2.XRegExp.install(); case 180: l(); l(); - w(f.Boolean); + n(g.Boolean); break; case 178: l(); - w(f.Boolean); + n(g.Boolean); break; case 179: l(); l(); - w(f.Boolean); + n(g.Boolean); break; case 194: ; case 195: - $[ea.index] = f.Int; + aa[U.index] = g.Int; break; case 193: ; @@ -16466,7 +16679,7 @@ Shumway.AVM2.XRegExp.install(); ; case 196: l(); - w(f.Int); + n(g.Int); break; case 197: ; @@ -16475,7 +16688,7 @@ Shumway.AVM2.XRegExp.install(); case 199: l(); l(); - w(f.Int); + n(g.Int); break; case 208: ; @@ -16484,7 +16697,7 @@ Shumway.AVM2.XRegExp.install(); case 210: ; case 211: - w($[R - 208]); + n(aa[R - 208]); break; case 212: ; @@ -16493,7 +16706,7 @@ Shumway.AVM2.XRegExp.install(); case 214: ; case 215: - $[R - 212] = l(); + aa[R - 212] = l(); break; case 239: break; @@ -16502,82 +16715,66 @@ Shumway.AVM2.XRegExp.install(); case 243: break; default: - console.info("Not Implemented: " + ea); + console.info("Not Implemented: " + U); } } } }; return a; - }(), M = function() { + }(), H = function() { function b() { } b.prototype._prepareScopeObjects = function(b, a) { - var d = b.abc.applicationDomain; + var e = b.abc.applicationDomain; return a.getScopeObjects().map(function(b) { - if (b instanceof l) { - return f.from(b, d); - } - if (b instanceof c.AVM2.Runtime.Global) { - return f.from(b.scriptInfo, d); - } - if (b instanceof c.AVM2.AS.ASClass) { - return f.from(b.classInfo, d); - } - if (b instanceof c.AVM2.Runtime.ActivationInfo) { - return f.from(b.methodInfo, d); - } - if (b.class) { - return f.from(b.class.classInfo.instanceInfo, d); - } - m(!1, b.toString()); - return f.Any; + return b instanceof l ? g.from(b, e) : b instanceof d.AVM2.Runtime.Global ? g.from(b.scriptInfo, e) : b instanceof d.AVM2.AS.ASClass ? g.from(b.classInfo, e) : b instanceof d.AVM2.Runtime.ActivationInfo ? g.from(b.methodInfo, e) : b.class ? g.from(b.class.classInfo.instanceInfo, e) : g.Any; }); }; b.prototype.verifyMethod = function(b, a) { - var d = this._prepareScopeObjects(b, a); - (new B(b, b.abc.applicationDomain, d)).verify(); + var e = this._prepareScopeObjects(b, a); + (new A(b, b.abc.applicationDomain, e)).verify(); }; return b; }(); - a.Verifier = M; - })(h.Verifier || (h.Verifier = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.Verifier = H; + })(k.Verifier || (k.Verifier = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - function h(b, a) { - for (var d = 0;d < b.length;d++) { - a(b[d]); + function k(b, a) { + for (var e = 0;e < b.length;e++) { + a(b[e]); } } - function p(a) { - var w, n = c.StringUtilities; - if (a instanceof g) { - return a.value instanceof l ? a.value.name : a.value; - } - if (a instanceof d) { - return a.name; + function u(a) { + var n, p = d.StringUtilities; + if (a instanceof e) { + return a.value instanceof t ? a.value.name : a.value; } if (a instanceof f) { - return w = n.concat3("|", a.id, "|"), w; + return a.name; } - if (a instanceof t) { - return w = n.concat3("{", a.id, "}"), w; + if (a instanceof g) { + return n = p.concat3("|", a.id, "|"), n; + } + if (a instanceof h) { + return n = p.concat3("{", a.id, "}"), n; } if (a instanceof b) { - return 3 === a.type ? (w = n.concat5("[", a.id, "->", a.argument.id, "]"), w) : (w = n.concat3("(", a.id, ")"), w); - } - if (a instanceof k) { - return w = n.concat3("(", a.id, ")"), w; + return 3 === a.type ? (n = p.concat5("[", a.id, "->", a.argument.id, "]"), n) : (n = p.concat3("(", a.id, ")"), n); } if (a instanceof m) { + return n = p.concat3("(", a.id, ")"), n; + } + if (a instanceof c) { return a.id; } - e(a + " " + typeof a); + l(a + " " + typeof a); } - var u = c.Debug.assert, l = c.AVM2.ABC.Multiname, e = c.Debug.unexpected; + var t = d.AVM2.ABC.Multiname, l = d.Debug.unexpected; (function(b) { b[b.NumericProperty = 1] = "NumericProperty"; b[b.RESOLVED = 2] = "RESOLVED"; @@ -16585,7 +16782,7 @@ Shumway.AVM2.XRegExp.install(); b[b.IS_METHOD = 8] = "IS_METHOD"; b[b.AS_CALL = 16] = "AS_CALL"; })(a.Flags || (a.Flags = {})); - var m = function() { + var c = function() { function b() { this.id = b.getNextID(); } @@ -16602,89 +16799,89 @@ Shumway.AVM2.XRegExp.install(); }; b.prototype.toString = function(b) { if (b) { - return p(this); + return u(this); } var a = []; this.visitInputs(function(b) { - a.push(p(b)); + a.push(u(b)); }); - b = p(this) + " = " + this.nodeName.toUpperCase(); + b = u(this) + " = " + this.nodeName.toUpperCase(); a.length && (b += " " + a.join(", ")); return b; }; b.prototype.visitInputsNoConstants = function(b) { - this.visitInputs(function(d) { - a.isConstant(d) || b(d); + this.visitInputs(function(e) { + a.isConstant(e) || b(e); }); }; - b.prototype.replaceInput = function(a, d) { - var g = 0, e; - for (e in this) { - var f = this[e]; - f instanceof b && f === a && (this[e] = d, g++); - f instanceof Array && (g += f.replace(a, d)); + b.prototype.replaceInput = function(a, e) { + var f = 0, c; + for (c in this) { + var g = this[c]; + g instanceof b && g === a && (this[c] = e, f++); + g instanceof Array && (f += g.replace(a, e)); } - return g; + return f; }; b._nextID = []; return b; }(); - a.Node = m; - m.prototype.nodeName = "Node"; - var t = function(b) { + a.Node = c; + c.prototype.nodeName = "Node"; + var h = function(b) { function a() { b.call(this); } __extends(a, b); return a; - }(m); - a.Control = t; - t.prototype.nodeName = "Control"; - var q = function(b) { - function a(d) { + }(c); + a.Control = h; + h.prototype.nodeName = "Control"; + var p = function(b) { + function a(e) { b.call(this); - this.predecessors = d ? [d] : []; + this.predecessors = e ? [e] : []; } __extends(a, b); a.prototype.visitInputs = function(b) { - h(this.predecessors, b); + k(this.predecessors, b); }; return a; - }(t); - a.Region = q; - q.prototype.nodeName = "Region"; - q = function(b) { + }(h); + a.Region = p; + p.prototype.nodeName = "Region"; + p = function(b) { function a() { b.call(this, null); this.control = this; } __extends(a, b); a.prototype.visitInputs = function(b) { - h(this.predecessors, b); + k(this.predecessors, b); b(this.scope); }; return a; - }(q); - a.Start = q; - q.prototype.nodeName = "Start"; - q = function(b) { - function a(d) { + }(p); + a.Start = p; + p.prototype.nodeName = "Start"; + p = function(b) { + function a(e) { b.call(this); - this.control = d; + this.control = e; } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.control); }; return a; - }(t); - a.End = q; - q.prototype.nodeName = "End"; - var n = function(b) { - function a(d, g, e) { - b.call(this, d); - this.store = g; - this.argument = e; + }(h); + a.End = p; + p.prototype.nodeName = "End"; + var s = function(b) { + function a(e, f, c) { + b.call(this, e); + this.store = f; + this.argument = c; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16693,13 +16890,13 @@ Shumway.AVM2.XRegExp.install(); b(this.argument); }; return a; - }(q); - a.Stop = n; - n.prototype.nodeName = "Stop"; - n = function(b) { - function a(d, g) { - b.call(this, d); - this.predicate = g; + }(p); + a.Stop = s; + s.prototype.nodeName = "Stop"; + s = function(b) { + function a(e, f) { + b.call(this, e); + this.predicate = f; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16707,13 +16904,13 @@ Shumway.AVM2.XRegExp.install(); b(this.predicate); }; return a; - }(q); - a.If = n; - n.prototype.nodeName = "If"; - n = function(b) { - function a(d, g) { - b.call(this, d); - this.determinant = g; + }(p); + a.If = s; + s.prototype.nodeName = "If"; + s = function(b) { + function a(e, f) { + b.call(this, e); + this.determinant = f; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16721,221 +16918,220 @@ Shumway.AVM2.XRegExp.install(); b(this.determinant); }; return a; - }(q); - a.Switch = n; - n.prototype.nodeName = "Switch"; - q = function(b) { - function a(d) { - b.call(this, d); + }(p); + a.Switch = s; + s.prototype.nodeName = "Switch"; + p = function(b) { + function a(e) { + b.call(this, e); } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.control); }; return a; - }(q); - a.Jump = q; - q.prototype.nodeName = "Jump"; - var k = function(b) { + }(p); + a.Jump = p; + p.prototype.nodeName = "Jump"; + var m = function(b) { + function a() { + b.call(this); + } + __extends(a, b); + return a; + }(c); + a.Value = m; + m.prototype.nodeName = "Value"; + p = function(b) { function a() { b.call(this); } __extends(a, b); return a; }(m); - a.Value = k; - k.prototype.nodeName = "Value"; - q = function(b) { - function a() { + a.Store = p; + p.prototype.nodeName = "Store"; + p = function(b) { + function a(e, f) { b.call(this); - } - __extends(a, b); - return a; - }(k); - a.Store = q; - q.prototype.nodeName = "Store"; - q = function(b) { - function a(d, g) { - b.call(this); - this.control = d; - this.store = g; + this.control = e; + this.store = f; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); }; return a; - }(k); - a.StoreDependent = q; - q.prototype.nodeName = "StoreDependent"; - n = function(b) { - function a(d, g, e, f, k, c) { - b.call(this, d, g); - this.callee = e; - this.object = f; - this.args = k; - this.flags = c; + }(m); + a.StoreDependent = p; + p.prototype.nodeName = "StoreDependent"; + s = function(b) { + function a(e, f, c, g, n, h) { + b.call(this, e, f); + this.callee = c; + this.object = g; + this.args = n; + this.flags = h; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.callee); this.object && b(this.object); - h(this.args, b); + k(this.args, b); }; return a; - }(q); - a.Call = n; - n.prototype.nodeName = "Call"; - n = function(b) { - function a(d, g, e, f) { - b.call(this, d, g); - this.callee = e; - this.args = f; + }(p); + a.Call = s; + s.prototype.nodeName = "Call"; + s = function(b) { + function a(e, f, c, g) { + b.call(this, e, f); + this.callee = c; + this.args = g; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.callee); - h(this.args, b); + k(this.args, b); }; return a; - }(q); - a.New = n; - n.prototype.nodeName = "New"; - n = function(b) { - function a(d, g, e, f) { - b.call(this, d, g); - this.object = e; - this.name = f; + }(p); + a.New = s; + s.prototype.nodeName = "New"; + s = function(b) { + function a(e, f, c, g) { + b.call(this, e, f); + this.object = c; + this.name = g; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.object); b(this.name); }; return a; - }(q); - a.GetProperty = n; - n.prototype.nodeName = "GetProperty"; - n = function(b) { - function a(d, g, e, f, k) { - b.call(this, d, g); - this.object = e; - this.name = f; - this.value = k; + }(p); + a.GetProperty = s; + s.prototype.nodeName = "GetProperty"; + s = function(b) { + function a(e, f, c, g, n) { + b.call(this, e, f); + this.object = c; + this.name = g; + this.value = n; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.object); b(this.name); b(this.value); }; return a; - }(q); - a.SetProperty = n; - n.prototype.nodeName = "SetProperty"; - n = function(b) { - function a(d, g, e, f) { - b.call(this, d, g); - this.object = e; - this.name = f; + }(p); + a.SetProperty = s; + s.prototype.nodeName = "SetProperty"; + s = function(b) { + function a(e, f, c, g) { + b.call(this, e, f); + this.object = c; + this.name = g; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.object); b(this.name); }; return a; - }(q); - a.DeleteProperty = n; - n.prototype.nodeName = "DeleteProperty"; - q = function(b) { - function a(d, g, e, f, k, c) { - b.call(this, d, g); - this.object = e; - this.name = f; - this.args = k; - this.flags = c; + }(p); + a.DeleteProperty = s; + s.prototype.nodeName = "DeleteProperty"; + p = function(b) { + function a(e, f, c, g, n, h) { + b.call(this, e, f); + this.object = c; + this.name = g; + this.args = n; + this.flags = h; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); this.store && b(this.store); - this.loads && h(this.loads, b); + this.loads && k(this.loads, b); b(this.object); b(this.name); - h(this.args, b); + k(this.args, b); }; return a; - }(q); - a.CallProperty = q; - q.prototype.nodeName = "CallProperty"; - var f = function(b) { - function a(d, g) { + }(p); + a.CallProperty = p; + p.prototype.nodeName = "CallProperty"; + var g = function(b) { + function a(e, f) { b.call(this); - this.control = this.control = d; - this.args = g ? [g] : []; + this.control = this.control = e; + this.args = f ? [f] : []; } __extends(a, b); a.prototype.visitInputs = function(b) { this.control && b(this.control); - h(this.args, b); + k(this.args, b); }; a.prototype.seal = function() { this.sealed = !0; }; a.prototype.pushValue = function(b) { - u(!this.sealed); this.args.push(b); }; return a; - }(k); - a.Phi = f; - f.prototype.nodeName = "Phi"; - var d = function(b) { - function a(d) { + }(m); + a.Phi = g; + g.prototype.nodeName = "Phi"; + var f = function(b) { + function a(e) { b.call(this); - this.name = d; + this.name = e; } __extends(a, b); return a; - }(k); - a.Variable = d; - d.prototype.nodeName = "Variable"; - q = function(b) { - function a(d) { + }(m); + a.Variable = f; + f.prototype.nodeName = "Variable"; + p = function(b) { + function a(e) { b.call(this); - this.argument = d; + this.argument = e; } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.argument); }; return a; - }(k); - a.Copy = q; - q.prototype.nodeName = "Copy"; - q = function(b) { - function a(d, g) { + }(m); + a.Copy = p; + p.prototype.nodeName = "Copy"; + p = function(b) { + function a(e, f) { b.call(this); - this.to = d; - this.from = g; + this.to = e; + this.from = f; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16943,9 +17139,9 @@ Shumway.AVM2.XRegExp.install(); b(this.from); }; return a; - }(k); - a.Move = q; - q.prototype.nodeName = "Move"; + }(m); + a.Move = p; + p.prototype.nodeName = "Move"; (function(b) { b[b.CASE = 0] = "CASE"; b[b.TRUE = 1] = "TRUE"; @@ -16954,11 +17150,11 @@ Shumway.AVM2.XRegExp.install(); b[b.SCOPE = 4] = "SCOPE"; })(a.ProjectionType || (a.ProjectionType = {})); var b = function(b) { - function a(d, g, e) { + function a(e, f, c) { b.call(this); - this.argument = d; - this.type = g; - this.selector = e; + this.argument = e; + this.type = f; + this.selector = c; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16968,16 +17164,16 @@ Shumway.AVM2.XRegExp.install(); return this.argument; }; return a; - }(k); + }(m); a.Projection = b; b.prototype.nodeName = "Projection"; - q = function(b) { - function a(d, g, e, f) { + p = function(b) { + function a(e, f, c, g) { b.call(this); - this.control = d; - this.condition = g; - this.left = e; - this.right = f; + this.control = e; + this.condition = f; + this.left = c; + this.right = g; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -16987,14 +17183,14 @@ Shumway.AVM2.XRegExp.install(); b(this.right); }; return a; - }(k); - a.Latch = q; - q.prototype.nodeName = "Latch"; - q = function() { - function b(a, d, g) { + }(m); + a.Latch = p; + p.prototype.nodeName = "Latch"; + p = function() { + function b(a, e, f) { this.name = a; - this.evaluate = d; - this.isBinary = g; + this.evaluate = e; + this.isBinary = f; b.byName[a] = this; } b.linkOpposites = function(b, a) { @@ -17085,16 +17281,16 @@ Shumway.AVM2.XRegExp.install(); }, !0); return b; }(); - a.Operator = q; - q.linkOpposites(q.SEQ, q.SNE); - q.linkOpposites(q.EQ, q.NE); - q.linkOpposites(q.TRUE, q.FALSE); - q = function(b) { - function a(d, g, e) { + a.Operator = p; + p.linkOpposites(p.SEQ, p.SNE); + p.linkOpposites(p.EQ, p.NE); + p.linkOpposites(p.TRUE, p.FALSE); + p = function(b) { + function a(e, f, c) { b.call(this); - this.operator = d; - this.left = g; - this.right = e; + this.operator = e; + this.left = f; + this.right = c; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -17102,134 +17298,134 @@ Shumway.AVM2.XRegExp.install(); b(this.right); }; return a; - }(k); - a.Binary = q; - q.prototype.nodeName = "Binary"; - q = function(b) { - function a(d, g) { + }(m); + a.Binary = p; + p.prototype.nodeName = "Binary"; + p = function(b) { + function a(e, f) { b.call(this); - this.operator = d; - this.argument = g; + this.operator = e; + this.argument = f; } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.argument); }; return a; - }(k); - a.Unary = q; - q.prototype.nodeName = "Unary"; - var g = function(b) { - function a(d) { + }(m); + a.Unary = p; + p.prototype.nodeName = "Unary"; + var e = function(b) { + function a(e) { b.call(this); - this.value = d; + this.value = e; } __extends(a, b); return a; - }(k); - a.Constant = g; - g.prototype.nodeName = "Constant"; - q = function(b) { - function a(d) { + }(m); + a.Constant = e; + e.prototype.nodeName = "Constant"; + p = function(b) { + function a(e) { b.call(this); - this.name = d; - } - __extends(a, b); - return a; - }(k); - a.GlobalProperty = q; - q.prototype.nodeName = "GlobalProperty"; - q = function(b) { - function a(d) { - b.call(this); - this.control = d; - } - __extends(a, b); - a.prototype.visitInputs = function(b) { - b(this.control); - }; - return a; - }(k); - a.This = q; - q.prototype.nodeName = "This"; - q = function(b) { - function a(d, g) { - b.call(this); - this.control = d; - this.argument = g; - } - __extends(a, b); - a.prototype.visitInputs = function(b) { - b(this.control); - b(this.argument); - }; - return a; - }(k); - a.Throw = q; - q.prototype.nodeName = "Throw"; - q = function(b) { - function a(d) { - b.call(this); - this.control = d; - } - __extends(a, b); - a.prototype.visitInputs = function(b) { - b(this.control); - }; - return a; - }(k); - a.Arguments = q; - q.prototype.nodeName = "Arguments"; - q = function(b) { - function a(d, g, e) { - b.call(this); - this.control = d; - this.index = g; this.name = e; } __extends(a, b); - a.prototype.visitInputs = function(b) { - b(this.control); - }; return a; - }(k); - a.Parameter = q; - q.prototype.nodeName = "Parameter"; - q = function(b) { - function a(d, g) { + }(m); + a.GlobalProperty = p; + p.prototype.nodeName = "GlobalProperty"; + p = function(b) { + function a(e) { b.call(this); - this.control = d; - this.elements = g; + this.control = e; } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.control); - h(this.elements, b); }; return a; - }(k); - a.NewArray = q; - q.prototype.nodeName = "NewArray"; - q = function(b) { - function a(d, g) { + }(m); + a.This = p; + p.prototype.nodeName = "This"; + p = function(b) { + function a(e, f) { b.call(this); - this.control = d; - this.properties = g; + this.control = e; + this.argument = f; } __extends(a, b); a.prototype.visitInputs = function(b) { b(this.control); - h(this.properties, b); + b(this.argument); }; return a; - }(k); - a.NewObject = q; - q.prototype.nodeName = "NewObject"; - q = function(b) { - function a(d, g) { + }(m); + a.Throw = p; + p.prototype.nodeName = "Throw"; + p = function(b) { + function a(e) { b.call(this); - this.key = d; - this.value = g; + this.control = e; + } + __extends(a, b); + a.prototype.visitInputs = function(b) { + b(this.control); + }; + return a; + }(m); + a.Arguments = p; + p.prototype.nodeName = "Arguments"; + p = function(b) { + function a(e, f, c) { + b.call(this); + this.control = e; + this.index = f; + this.name = c; + } + __extends(a, b); + a.prototype.visitInputs = function(b) { + b(this.control); + }; + return a; + }(m); + a.Parameter = p; + p.prototype.nodeName = "Parameter"; + p = function(b) { + function a(e, f) { + b.call(this); + this.control = e; + this.elements = f; + } + __extends(a, b); + a.prototype.visitInputs = function(b) { + b(this.control); + k(this.elements, b); + }; + return a; + }(m); + a.NewArray = p; + p.prototype.nodeName = "NewArray"; + p = function(b) { + function a(e, f) { + b.call(this); + this.control = e; + this.properties = f; + } + __extends(a, b); + a.prototype.visitInputs = function(b) { + b(this.control); + k(this.properties, b); + }; + return a; + }(m); + a.NewObject = p; + p.prototype.nodeName = "NewObject"; + p = function(b) { + function a(e, f) { + b.call(this); + this.key = e; + this.value = f; } __extends(a, b); a.prototype.visitInputs = function(b) { @@ -17237,119 +17433,111 @@ Shumway.AVM2.XRegExp.install(); b(this.value); }; return a; - }(k); - a.KeyValuePair = q; - q.prototype.mustFloat = !0; - q.prototype.nodeName = "KeyValuePair"; - a.nameOf = p; + }(m); + a.KeyValuePair = p; + p.prototype.mustFloat = !0; + p.prototype.nodeName = "KeyValuePair"; + a.nameOf = u; })(a.IR || (a.IR = {})); - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { function v(b) { return b.id; } - function p(b) { + function u(b) { return b instanceof a.Phi; } - function u(b) { - return b instanceof a.Constant && b.value instanceof d; + function t(b) { + return b instanceof a.Constant && b.value instanceof f; } function l(b) { - return p(b) || b instanceof a.Store || q(b, 3); + return u(b) || b instanceof a.Store || s(b, 3); } - function e(b) { + function c(b) { return b instanceof a.Constant; } - function m(b) { + function h(b) { return b instanceof a.Control; } - function t(b) { + function p(b) { return b instanceof a.Value; } - function q(b, d) { - return b instanceof a.Projection && (!d || b.type === d); + function s(b, e) { + return b instanceof a.Projection && (!e || b.type === e); } - function n(b) { + function m(b) { return b instanceof a.Projection ? b.project() : b; } - var k = c.Debug.assert, f = c.Debug.unexpected, d = c.AVM2.ABC.Multiname, b = c.ArrayUtilities.top, g = c.IntegerUtilities.bitCount, r = c.ArrayUtilities.pushUnique, w = c.ArrayUtilities.unique; + var g = d.Debug.unexpected, f = d.AVM2.ABC.Multiname, b = d.ArrayUtilities.top, e = d.ArrayUtilities.pushUnique, q = d.ArrayUtilities.unique; a.isNotPhi = function(b) { - return!p(b); + return!u(b); }; - a.isPhi = p; + a.isPhi = u; a.isScope = function(b) { - return p(b) || b instanceof a.ASScope || q(b, 4); + return u(b) || b instanceof a.ASScope || s(b, 4); }; - a.isMultinameConstant = u; + a.isMultinameConstant = t; a.isMultiname = function(b) { - return u(b) || b instanceof a.ASMultiname; + return t(b) || b instanceof a.ASMultiname; }; a.isStore = l; - a.isConstant = e; + a.isConstant = c; a.isControlOrNull = function(b) { - return m(b) || null === b; + return h(b) || null === b; }; a.isStoreOrNull = function(b) { return l(b) || null === b; }; - a.isControl = m; + a.isControl = h; a.isValueOrNull = function(b) { - return t(b) || null === b; + return p(b) || null === b; }; - a.isValue = t; - a.isProjection = q; + a.isValue = p; + a.isProjection = s; a.Null = new a.Constant(null); a.Undefined = new a.Constant(void 0); a.True = new a.Constant(!0); a.False = new a.Constant(!1); - var z = function() { - function b(a, d, g) { + var n = function() { + function b(a, e, f) { this.id = a; - this.nodes = [d, g]; - this.region = d; + this.nodes = [e, f]; + this.region = e; this.successors = []; this.predecessors = []; } b.prototype.pushSuccessorAt = function(b, a) { - k(b); - k(!this.successors[a]); this.successors[a] = b; b.pushPredecessor(this); }; b.prototype.pushSuccessor = function(b, a) { - k(b); this.successors.push(b); a && b.pushPredecessor(this); }; b.prototype.pushPredecessor = function(b) { - k(b); this.predecessors.push(b); }; b.prototype.visitNodes = function(b) { - for (var a = this.nodes, d = 0, g = a.length;d < g;d++) { - b(a[d]); + for (var a = this.nodes, e = 0, f = a.length;e < f;e++) { + b(a[e]); } }; b.prototype.visitSuccessors = function(b) { - for (var a = this.successors, d = 0, g = a.length;d < g;d++) { - b(a[d]); + for (var a = this.successors, e = 0, f = a.length;e < f;e++) { + b(a[e]); } }; b.prototype.visitPredecessors = function(b) { - for (var a = this.predecessors, d = 0, g = a.length;d < g;d++) { - b(a[d]); + for (var a = this.predecessors, e = 0, f = a.length;e < f;e++) { + b(a[e]); } }; b.prototype.append = function(b) { - k(2 <= this.nodes.length); - k(t(b), b); - k(!p(b)); - k(0 > this.nodes.indexOf(b)); b.mustFloat || this.nodes.splice(this.nodes.length - 1, 0, b); }; b.prototype.toString = function() { @@ -17360,101 +17548,101 @@ Shumway.AVM2.XRegExp.install(); }; return b; }(); - a.Block = z; - var A = function() { - function d(b) { + a.Block = n; + var x = function() { + function e(b) { this.exit = this.exit = b; } - d.prototype.buildCFG = function() { - return M.fromDFG(this); + e.prototype.buildCFG = function() { + return A.fromDFG(this); }; - d.preOrderDepthFirstSearch = function(b, a, d) { - var g = []; + e.preOrderDepthFirstSearch = function(b, a, e) { + var f = []; b = [b]; - for (var e = b.push.bind(b), f;f = b.pop();) { - 1 !== g[f.id] && (g[f.id] = 1, d(f), b.push(f), a(f, e)); + for (var c = b.push.bind(b), g;g = b.pop();) { + 1 !== f[g.id] && (f[g.id] = 1, e(g), b.push(g), a(g, c)); } }; - d.postOrderDepthFirstSearch = function(a, d, g) { - function e(b) { - f[b.id] || k.push(b); + e.postOrderDepthFirstSearch = function(a, e, f) { + function c(b) { + g[b.id] || n.push(b); } - for (var f = [], k = [a];a = b(k);) { - f[a.id] ? (1 === f[a.id] && (f[a.id] = 2, g(a)), k.pop()) : (f[a.id] = 1, d(a, e)); + for (var g = [], n = [a];a = b(n);) { + g[a.id] ? (1 === g[a.id] && (g[a.id] = 2, f(a)), n.pop()) : (g[a.id] = 1, e(a, c)); } }; - d.prototype.forEachInPreOrderDepthFirstSearch = function(b) { - function d(b) { - e(b) || (k(b instanceof a.Node), f.push(b)); + e.prototype.forEachInPreOrderDepthFirstSearch = function(b) { + function a(b) { + c(b) || f.push(b); } - for (var g = Array(1024), f = [this.exit], c;c = f.pop();) { - g[c.id] || (g[c.id] = 1, b && b(c), f.push(c), c.visitInputs(d)); + for (var e = Array(1024), f = [this.exit], g;g = f.pop();) { + e[g.id] || (e[g.id] = 1, b && b(g), f.push(g), g.visitInputs(a)); } }; - d.prototype.forEach = function(b, a) { - (a ? d.postOrderDepthFirstSearch : d.preOrderDepthFirstSearch)(this.exit, function(b, a) { + e.prototype.forEach = function(b, a) { + (a ? e.postOrderDepthFirstSearch : e.preOrderDepthFirstSearch)(this.exit, function(b, a) { b.visitInputsNoConstants(a); }, b); }; - d.prototype.traceMetrics = function(b) { - var a = new c.Metrics.Counter(!0); - d.preOrderDepthFirstSearch(this.exit, function(b, a) { + e.prototype.traceMetrics = function(b) { + var a = new d.Metrics.Counter(!0); + e.preOrderDepthFirstSearch(this.exit, function(b, a) { b.visitInputsNoConstants(a); }, function(b) { - h.countTimeline(b.nodeName); + k.countTimeline(b.nodeName); }); a.trace(b); }; - d.prototype.trace = function(b) { - function d(b) { + e.prototype.trace = function(b) { + function e(b) { return b instanceof a.Control ? "yellow" : b instanceof a.Phi ? "purple" : b instanceof a.Value ? "green" : "white"; } - function g(b) { + function f(b) { return b instanceof a.Projection ? b.project() : b; } - function e(b) { - b = g(b); - k[b.id] || (k[b.id] = !0, b.block && c.push(b.block), f.push(b), b.visitInputsNoConstants(e)); + function c(b) { + b = f(b); + n[b.id] || (n[b.id] = !0, b.block && q.push(b.block), g.push(b), b.visitInputsNoConstants(c)); } - var f = [], k = {}, c = []; - e(this.exit); + var g = [], n = {}, q = []; + c(this.exit); b.writeLn(""); b.enter("digraph DFG {"); b.writeLn("graph [bgcolor = gray10];"); b.writeLn("edge [color = white];"); b.writeLn("node [shape = box, fontname = Consolas, fontsize = 11, color = white, fontcolor = white];"); b.writeLn("rankdir = BT;"); - c.forEach(function(a) { + q.forEach(function(a) { b.enter("subgraph cluster" + a.nodes[0].id + " { bgcolor = gray20;"); a.visitNodes(function(a) { - a = g(a); + a = f(a); b.writeLn("N" + a.id + ";"); }); b.leave("}"); }); - f.forEach(function(a) { - b.writeLn("N" + a.id + ' [label = "' + a.toString() + '", color = "' + d(a) + '"];'); + g.forEach(function(a) { + b.writeLn("N" + a.id + ' [label = "' + a.toString() + '", color = "' + e(a) + '"];'); }); - f.forEach(function(a) { - a.visitInputsNoConstants(function(e) { - e = g(e); - b.writeLn("N" + a.id + " -> N" + e.id + " [color=" + d(e) + "];"); + g.forEach(function(a) { + a.visitInputsNoConstants(function(c) { + c = f(c); + b.writeLn("N" + a.id + " -> N" + c.id + " [color=" + e(c) + "];"); }); }); b.leave("}"); b.writeLn(""); }; - return d; + return e; }(); - a.DFG = A; - var B = function() { + a.DFG = x; + var L = function() { function b() { this.entries = []; } b.prototype.addUse = function(b, a) { - var d = this.entries[b.id]; - d || (d = this.entries[b.id] = {def:b, uses:[]}); - r(d.uses, a); + var f = this.entries[b.id]; + f || (f = this.entries[b.id] = {def:b, uses:[]}); + e(f.uses, a); }; b.prototype.trace = function(b) { b.enter("> Uses"); @@ -17464,125 +17652,117 @@ Shumway.AVM2.XRegExp.install(); b.leave("<"); }; b.prototype.replace = function(b, a) { - var d = this.entries[b.id]; - if (0 === d.uses.length) { + var e = this.entries[b.id]; + if (0 === e.uses.length) { return!1; } - var g = 0; - d.uses.forEach(function(d) { - g += d.replaceInput(b, a); + var f = 0; + e.uses.forEach(function(e) { + f += e.replaceInput(b, a); }); - k(g >= d.uses.length); - d.uses = []; + e.uses = []; return!0; }; - b.prototype.updateUses = function(b, a, d, g) { - d = d[b.id]; - if (0 === d.uses.length) { + b.prototype.updateUses = function(b, a, e, f) { + e = e[b.id]; + if (0 === e.uses.length) { return!1; } - var e = 0; - d.uses.forEach(function(d) { - e += d.replaceInput(b, a); + var c = 0; + e.uses.forEach(function(e) { + c += e.replaceInput(b, a); }); - k(e >= d.uses.length); - d.uses = []; + e.uses = []; return!0; }; return b; }(); - a.Uses = B; - var M = function() { + a.Uses = L; + var A = function() { function b() { this.nextBlockID = 0; this.blocks = []; } - b.fromDFG = function(d) { - function g(b) { + b.fromDFG = function(e) { + function f(b) { b instanceof a.Projection && (b = b.project()); - k(b instanceof a.End || b instanceof a.Start, b); - if (!f[b.id]) { - f[b.id] = !0; - var d = b.control; - d instanceof a.Region || (d = b.control = new a.Region(d)); - b = d.block = e.buildBlock(d, b); - d instanceof a.Start && (e.root = b); - for (var c = 0;c < d.predecessors.length;c++) { - var r = d.predecessors[c], m, w = !1; - r instanceof a.Projection ? (m = r.project(), w = 1 === r.type) : m = r; - m instanceof a.Region && (m = new a.Jump(r), m = new a.Projection(m, 1), d.predecessors[c] = m, m = m.project(), w = !0); - g(m); - var l = m.control.block; - m instanceof a.Switch ? (k(q(r, 0)), l.pushSuccessorAt(b, r.selector.value)) : w && 0 < l.successors.length ? (l.pushSuccessor(b, !0), l.hasFlippedSuccessors = !0) : l.pushSuccessor(b, !0); + if (!g[b.id]) { + g[b.id] = !0; + var e = b.control; + e instanceof a.Region || (e = b.control = new a.Region(e)); + b = e.block = c.buildBlock(e, b); + e instanceof a.Start && (c.root = b); + for (var n = 0;n < e.predecessors.length;n++) { + var q = e.predecessors[n], h, m = !1; + q instanceof a.Projection ? (h = q.project(), m = 1 === q.type) : h = q; + h instanceof a.Region && (h = new a.Jump(q), h = new a.Projection(h, 1), e.predecessors[n] = h, h = h.project(), m = !0); + f(h); + var d = h.control.block; + h instanceof a.Switch ? d.pushSuccessorAt(b, q.selector.value) : m && 0 < d.successors.length ? (d.pushSuccessor(b, !0), d.hasFlippedSuccessors = !0) : d.pushSuccessor(b, !0); } } } - var e = new b; - k(d && d instanceof A); - e.dfg = d; - var f = []; - g(d.exit); - e.splitCriticalEdges(); - e.exit = d.exit.control.block; - e.computeDominators(); - return e; + var c = new b; + c.dfg = e; + var g = []; + f(e.exit); + c.splitCriticalEdges(); + c.exit = e.exit.control.block; + c.computeDominators(); + return c; }; b.prototype.buildRootAndExit = function() { - k(!this.root && !this.exit); - 0 < this.blocks[0].predecessors.length ? (this.root = new z(this.nextBlockID++), this.blocks.push(this.root), this.root.pushSuccessor(this.blocks[0], !0)) : this.root = this.blocks[0]; + 0 < this.blocks[0].predecessors.length ? (this.root = new n(this.nextBlockID++), this.blocks.push(this.root), this.root.pushSuccessor(this.blocks[0], !0)) : this.root = this.blocks[0]; for (var b = [], a = 0;a < this.blocks.length;a++) { - var d = this.blocks[a]; - 0 === d.successors.length && b.push(d); + var e = this.blocks[a]; + 0 === e.successors.length && b.push(e); } if (0 === b.length) { - f("Must have an exit block."); + g("Must have an exit block."); } else { if (1 === b.length && b[0] !== this.root) { this.exit = b[0]; } else { - for (this.exit = new z(this.nextBlockID++), this.blocks.push(this.exit), a = 0;a < b.length;a++) { + for (this.exit = new n(this.nextBlockID++), this.blocks.push(this.exit), a = 0;a < b.length;a++) { b[a].pushSuccessor(this.exit, !0); } } } - k(this.root && this.exit); - k(this.root !== this.exit); }; b.prototype.fromString = function(b, a) { - function d(b) { - var a = e[b]; + function e(b) { + var a = c[b]; if (a) { return a; } - e[b] = a = new z(g.nextBlockID++); + c[b] = a = new n(f.nextBlockID++); a.name = b; - f.push(a); + g.push(a); return a; } - var g = this, e = g.blockNames || (g.blockNames = {}), f = g.blocks; + var f = this, c = f.blockNames || (f.blockNames = {}), g = f.blocks; b.replace(/\ /g, "").split(",").forEach(function(b) { b = b.split("->"); - for (var a = null, g = 0;g < b.length;g++) { - var e = b[g]; + for (var a = null, f = 0;f < b.length;f++) { + var c = b[f]; if (a) { - var f = e; - d(a).pushSuccessor(d(f), !0); + var g = c; + e(a).pushSuccessor(e(g), !0); } else { - d(e); + e(c); } - a = e; + a = c; } }); - k(a && e[a]); - this.root = e[a]; + this.root = c[a]; }; b.prototype.buildBlock = function(b, a) { - var d = new z(this.nextBlockID++, b, a); - this.blocks.push(d); - return d; + var e = new n(this.nextBlockID++, b, a); + this.blocks.push(e); + return e; }; b.prototype.createBlockSet = function() { - this.setConstructor || (this.setConstructor = c.BitSets.BitSetFunctor(this.blocks.length)); + this.setConstructor || (this.setConstructor = d.BitSets.BitSetFunctor(this.blocks.length)); return new this.setConstructor; }; b.prototype.computeReversePostOrder = function() { @@ -17598,284 +17778,264 @@ Shumway.AVM2.XRegExp.install(); return b; }; b.prototype.depthFirstSearch = function(b, a) { - function d(e) { - g.set(e.id); - b && b(e); - for (var f = e.successors, k = 0, c = f.length;k < c;k++) { - var r = f[k]; - g.get(r.id) || d(r); + function e(c) { + f.set(c.id); + b && b(c); + for (var g = c.successors, n = 0, q = g.length;n < q;n++) { + var h = g[n]; + f.get(h.id) || e(h); } - a && a(e); + a && a(c); } - var g = this.createBlockSet(); - d(this.root); + var f = this.createBlockSet(); + e(this.root); }; b.prototype.computeDominators = function() { function b(a) { - var d; + var e; if (void 0 !== a.dominatorDepth) { return a.dominatorDepth; } - d = a.dominator ? b(a.dominator) + 1 : 0; - return a.dominatorDepth = d; + e = a.dominator ? b(a.dominator) + 1 : 0; + return a.dominatorDepth = e; } - k(0 === this.root.predecessors.length, "Root node " + this.root + " must not have predecessors."); - for (var a = new Int32Array(this.blocks.length), d = 0;d < a.length;d++) { - a[d] = -1; + for (var a = new Int32Array(this.blocks.length), e = 0;e < a.length;e++) { + a[e] = -1; } - var g = this.createBlockSet(); + var f = this.createBlockSet(); this.depthFirstSearch(function(b) { - for (var d = b.successors, e = 0, f = d.length;e < f;e++) { - var k = d[e].id, c = b.id, r = k; - if (!(0 > a[k])) { - k = a[k]; - for (g.clearAll();0 <= k;) { - g.set(k), k = a[k]; + for (var e = b.successors, c = 0, g = e.length;c < g;c++) { + var n = e[c].id, q = b.id, h = n; + if (!(0 > a[n])) { + n = a[n]; + for (f.clearAll();0 <= n;) { + f.set(n), n = a[n]; } - for (;0 <= c && !g.get(c);) { - c = a[c]; + for (;0 <= q && !f.get(q);) { + q = a[q]; } } - a[r] = c; + a[h] = q; } }); - for (var d = 0, e = this.blocks.length;d < e;d++) { - this.blocks[d].dominator = this.blocks[a[d]]; + for (var e = 0, c = this.blocks.length;e < c;e++) { + this.blocks[e].dominator = this.blocks[a[e]]; } - d = 0; - for (e = this.blocks.length;d < e;d++) { - b(this.blocks[d]); + e = 0; + for (c = this.blocks.length;e < c;e++) { + b(this.blocks[e]); } return a; }; b.prototype.computeLoops = function() { - function b(f) { - if (d.get(f.id)) { - return a.get(f.id) && (f.isLoopHeader || (k(32 > e, "Can't handle too many loops, fall back on BitMaps if it's a problem."), f.isLoopHeader = !0, f.loops = 1 << e, e += 1), k(1 === g(f.loops))), f.loops; + function b(c) { + if (e.get(c.id)) { + return a.get(c.id) && !c.isLoopHeader && (c.isLoopHeader = !0, c.loops = 1 << f, f += 1), c.loops; } - d.set(f.id); - a.set(f.id); - for (var c = 0, r = 0, m = f.successors.length;r < m;r++) { - c |= b(f.successors[r]); + e.set(c.id); + a.set(c.id); + for (var g = 0, n = 0, q = c.successors.length;n < q;n++) { + g |= b(c.successors[n]); } - f.isLoopHeader && (k(1 === g(f.loops)), c &= ~f.loops); - f.loops = c; - a.clear(f.id); - return c; + c.isLoopHeader && (g &= ~c.loops); + c.loops = g; + a.clear(c.id); + return g; } - var a = this.createBlockSet(), d = this.createBlockSet(), e = 0, f = b(this.root); - k(0 === f); + var a = this.createBlockSet(), e = this.createBlockSet(), f = 0; + b(this.root); }; b.prototype.computeUses = function() { - h.enterTimeline("computeUses"); - var b = this.dfg, a = new B; + k.enterTimeline("computeUses"); + var b = this.dfg, a = new L; b.forEachInPreOrderDepthFirstSearch(function(b) { - b.visitInputs(function(d) { - a.addUse(d, b); + b.visitInputs(function(e) { + a.addUse(e, b); }); }); - h.leaveTimeline(); + k.leaveTimeline(); return a; }; b.prototype.verify = function() { this.computeReversePostOrder().forEach(function(b) { - b.phis && b.phis.forEach(function(a) { - k(a.control === b.region); - k(a.args.length === b.predecessors.length); + b.phis && b.phis.forEach(function(b) { }); }); }; b.prototype.optimizePhis = function() { - function b(a, d) { - d = w(d); - if (1 === d.length) { - return d[0]; + function b(a, e) { + e = q(e); + if (1 === e.length) { + return e[0]; } - if (2 === d.length) { - if (d[0] === a) { - return d[1]; + if (2 === e.length) { + if (e[0] === a) { + return e[1]; } - if (d[1] === a) { - return d[0]; + if (e[1] === a) { + return e[0]; } } return a; } - var a = [], d = this.computeUses().entries; - d.forEach(function(b) { - p(b.def) && a.push(b.def); + var a = [], e = this.computeUses().entries; + e.forEach(function(b) { + u(b.def) && a.push(b.def); }); - for (var g = 0, e = 0, f = !0;f;) { - e++, f = !1, a.forEach(function(a) { - var e = b(a, a.args); - if (e !== a) { - var c = d[a.id]; - if (0 === c.uses.length) { + for (var f = 0, c = 0, g = !0;g;) { + c++, g = !1, a.forEach(function(a) { + var c = b(a, a.args); + if (c !== a) { + var n = e[a.id]; + if (0 === n.uses.length) { a = !1; } else { - for (var r = 0, m = c.uses, w = 0, l = m.length;w < l;w++) { - r += m[w].replaceInput(a, e); + for (var q = 0, h = n.uses, m = 0, d = h.length;m < d;m++) { + q += h[m].replaceInput(a, c); } - k(r >= c.uses.length); - c.uses = []; + n.uses = []; a = !0; } - a && (f = !0, g++); + a && (g = !0, f++); } }); } }; b.prototype.splitCriticalEdges = function() { - for (var b = this.blocks, d = [], g = 0;g < b.length;g++) { - var e = b[g].successors; - if (1 < e.length) { - for (var f = 0;f < e.length;f++) { - 1 < e[f].predecessors.length && d.push({from:b[g], to:e[f]}); + for (var b = this.blocks, e = [], f = 0;f < b.length;f++) { + var c = b[f].successors; + if (1 < c.length) { + for (var g = 0;g < c.length;g++) { + 1 < c[g].predecessors.length && e.push({from:b[f], to:c[g]}); } } } - for (var b = d.length, c;c = d.pop();) { - g = c.from.successors.indexOf(c.to); - e = c.to.predecessors.indexOf(c.from); - k(0 <= g && 0 <= e); - var f = c.to, r = f.region, m = new a.Region(r.predecessors[e]), w = new a.Jump(m), m = this.buildBlock(m, w); - r.predecessors[e] = new a.Projection(w, 1); - c = c.from; - c.successors[g] = m; - m.pushPredecessor(c); - m.pushSuccessor(f); - f.predecessors[e] = m; + for (var b = e.length, n;n = e.pop();) { + var f = n.from.successors.indexOf(n.to), c = n.to.predecessors.indexOf(n.from), g = n.to, q = g.region, h = new a.Region(q.predecessors[c]), m = new a.Jump(h), h = this.buildBlock(h, m); + q.predecessors[c] = new a.Projection(m, 1); + n = n.from; + n.successors[f] = h; + h.pushPredecessor(n); + h.pushSuccessor(g); + g.predecessors[c] = h; } - b && k(0 === this.splitCriticalEdges()); return b; }; b.prototype.allocateVariables = function() { - function b(d) { - !(q(d, 3) || d instanceof a.SetProperty) && d instanceof a.Value && (d.variable = new a.Variable("v" + d.id)); + function b(e) { + !(s(e, 3) || e instanceof a.SetProperty) && e instanceof a.Value && (e.variable = new a.Variable("v" + e.id)); } - var d = this.computeReversePostOrder(); - d.forEach(function(a) { + var e = this.computeReversePostOrder(); + e.forEach(function(a) { a.nodes.forEach(b); a.phis && a.phis.forEach(b); }); - for (var g = [], e = 0;e < d.length;e++) { - var f = d[e], c = f.phis, f = f.predecessors; - if (c) { - for (var r = 0;r < c.length;r++) { - var m = c[r], w = m.args; - k(f.length === w.length); - for (var l = 0;l < f.length;l++) { - var n = f[l], t = w[l]; - t.abstract || q(t, 3) || (n = g[n.id] || (g[n.id] = []), t = t.variable || t, m.variable !== t && n.push(new a.Move(m.variable, t))); + for (var f = [], c = 0;c < e.length;c++) { + var g = e[c], n = g.phis, g = g.predecessors; + if (n) { + for (var q = 0;q < n.length;q++) { + for (var h = n[q], m = h.args, d = 0;d < g.length;d++) { + var l = g[d], p = m[d]; + p.abstract || s(p, 3) || (l = f[l.id] || (f[l.id] = []), p = p.variable || p, h.variable !== p && l.push(new a.Move(h.variable, p))); } } } } - var z = this.blocks; - g.forEach(function(b, d) { - for (var g = z[d], e = 0;b.length;) { - for (var f = 0;f < b.length;f++) { - for (var k = b[f], c = 0;c < b.length;c++) { - if (f !== c && b[c].from === k.to) { - k = null; + var x = this.blocks; + f.forEach(function(b, e) { + for (var f = x[e], c = 0;b.length;) { + for (var g = 0;g < b.length;g++) { + for (var n = b[g], q = 0;q < b.length;q++) { + if (g !== q && b[q].from === n.to) { + n = null; break; } } - k && (b.splice(f--, 1), g.append(k)); + n && (b.splice(g--, 1), f.append(n)); } if (b.length) { - for (k = b[0], c = new a.Variable("t" + e++), z[d].append(new a.Move(c, k.to)), f = 1;f < b.length;f++) { - b[f].from === k.to && (b[f].from = c); + for (n = b[0], q = new a.Variable("t" + c++), x[e].append(new a.Move(q, n.to)), g = 1;g < b.length;g++) { + b[g].from === n.to && (b[g].from = q); } } } }); }; b.prototype.scheduleEarly = function() { - function b(d) { - return d.mustNotFloat || d.shouldNotFloat ? !1 : d.mustFloat || d.shouldFloat || d instanceof a.Parameter || d instanceof a.This || d instanceof a.Arguments ? !0 : d instanceof a.Binary || d instanceof a.Unary || d instanceof a.Parameter; + function b(e) { + return e.mustNotFloat || e.shouldNotFloat ? !1 : e.mustFloat || e.shouldFloat || e instanceof a.Parameter || e instanceof a.This || e instanceof a.Arguments ? !0 : e instanceof a.Binary || e instanceof a.Unary || e instanceof a.Parameter; } - function d(a) { - k(!m[a.id], "Already scheduled " + a); - m[a.id] = !0; - k(a.control, a); + function e(a) { + q[a.id] = !0; b(a) || a.control.block.append(a); } - function g(b, a) { - k(!b.control, b); - k(!m[b.id]); - k(a); + function f(b, a) { b.control = a; - d(b); + e(b); } - function f(b) { - var k = []; + function g(b) { + var h = []; b.visitInputs(function(b) { - e(b) || t(b) && k.push(n(b)); + c(b) || p(b) && h.push(m(b)); }); - for (var r = 0;r < k.length;r++) { - var w = k[r]; - p(w) || m[w.id] || f(w); + for (var d = 0;d < h.length;d++) { + var l = h[d]; + u(l) || q[l.id] || g(l); } if (b.control) { - b instanceof a.End || b instanceof a.Phi || b instanceof a.Start || m[b.id] || d(b); + b instanceof a.End || b instanceof a.Phi || b instanceof a.Start || q[b.id] || e(b); } else { - if (k.length) { - w = k[0].control; - for (r = 1;r < k.length;r++) { - var l = k[r].control; - w.block.dominatorDepth < l.block.dominatorDepth && (w = l); + if (h.length) { + l = h[0].control; + for (d = 1;d < h.length;d++) { + var s = h[d].control; + l.block.dominatorDepth < s.block.dominatorDepth && (l = s); } - g(b, w); + f(b, l); } else { - g(b, c.root.region); + f(b, n.root.region); } } } - var c = this, r = this.dfg, m = [], w = []; - r.forEachInPreOrderDepthFirstSearch(function(d) { - d instanceof a.Region || d instanceof a.Jump || (d.control && w.push(d), p(d) && d.args.forEach(function(a) { + var n = this, q = [], h = []; + this.dfg.forEachInPreOrderDepthFirstSearch(function(e) { + e instanceof a.Region || e instanceof a.Jump || (e.control && h.push(e), u(e) && e.args.forEach(function(a) { b(a) && (a.mustNotFloat = !0); })); }); - for (var l = 0;l < w.length;l++) { - var q = w[l]; - if (q instanceof a.Phi) { - var z = q.control.block; - (z.phis || (z.phis = [])).push(q); + for (var d = 0;d < h.length;d++) { + var l = h[d]; + if (l instanceof a.Phi) { + var s = l.control.block; + (s.phis || (s.phis = [])).push(l); } - q.control && f(q); + l.control && g(l); } - w.forEach(function(b) { - b = n(b); - b === r.start || b instanceof a.Region || k(b.control, "Node is not scheduled: " + b); + h.forEach(function(b) { + m(b); }); }; b.prototype.trace = function(b) { function a(b) { - g[b.id] || (g[b.id] = !0, e.push(b), b.visitSuccessors(a)); + e[b.id] || (e[b.id] = !0, f.push(b), b.visitSuccessors(a)); } - function d(b) { - k(b); - return b === f ? "house" : b === c ? "invhouse" : "box"; - } - var g = [], e = [], f = this.root, c = this.exit; - a(f); + var e = [], f = [], c = this.root, g = this.exit; + a(c); b.writeLn(""); b.enter("digraph CFG {"); b.writeLn("graph [bgcolor = gray10];"); b.writeLn("edge [fontname = Consolas, fontsize = 11, color = white, fontcolor = white];"); b.writeLn("node [shape = box, fontname = Consolas, fontsize = 11, color = white, fontcolor = white, style = filled];"); b.writeLn("rankdir = TB;"); - e.forEach(function(a) { - var g = ""; - void 0 !== a.name && (g += " " + a.name); - void 0 !== a.rpo && (g += " O: " + a.rpo); - b.writeLn("B" + a.id + ' [label = "B' + a.id + g + '", fillcolor = "black", shape=' + d(a) + ", style=filled];"); + f.forEach(function(a) { + var e = ""; + void 0 !== a.name && (e += " " + a.name); + void 0 !== a.rpo && (e += " O: " + a.rpo); + b.writeLn("B" + a.id + ' [label = "B' + a.id + e + '", fillcolor = "black", shape=' + (a === c ? "house" : a === g ? "invhouse" : "box") + ", style=filled];"); }); - e.forEach(function(a) { - a.visitSuccessors(function(d) { - b.writeLn("B" + a.id + " -> B" + d.id); + f.forEach(function(a) { + a.visitSuccessors(function(e) { + b.writeLn("B" + a.id + " -> B" + e.id); }); a.dominator && b.writeLn("B" + a.id + " -> B" + a.dominator.id + " [color = orange];"); a.follow && b.writeLn("B" + a.id + " -> B" + a.follow.id + " [color = purple];"); @@ -17885,210 +18045,199 @@ Shumway.AVM2.XRegExp.install(); }; return b; }(); - a.CFG = M; - var N = function() { + a.CFG = A; + x = function() { function b() { } - b.prototype.foldUnary = function(b, d) { - k(b instanceof a.Unary); - if (e(b.argument)) { + b.prototype.foldUnary = function(b, e) { + if (c(b.argument)) { return new a.Constant(b.operator.evaluate(b.argument.value)); } - if (d) { - var g = this.fold(b.argument, !0); + if (e) { + var f = this.fold(b.argument, !0); if (b.operator === a.Operator.TRUE) { - return g; + return f; } - if (g instanceof a.Unary) { - if (b.operator === a.Operator.FALSE && g.operator === a.Operator.FALSE) { - return g.argument; + if (f instanceof a.Unary) { + if (b.operator === a.Operator.FALSE && f.operator === a.Operator.FALSE) { + return f.argument; } } else { - return new a.Unary(b.operator, g); + return new a.Unary(b.operator, f); } } return b; }; - b.prototype.foldBinary = function(b, d) { - k(b instanceof a.Binary); - return e(b.left) && e(b.right) ? new a.Constant(b.operator.evaluate(b.left.value, b.right.value)) : b; + b.prototype.foldBinary = function(b, e) { + return c(b.left) && c(b.right) ? new a.Constant(b.operator.evaluate(b.left.value, b.right.value)) : b; }; - b.prototype.fold = function(b, d) { - return b instanceof a.Unary ? this.foldUnary(b, d) : b instanceof a.Binary ? this.foldBinary(b, d) : b; + b.prototype.fold = function(b, e) { + return b instanceof a.Unary ? this.foldUnary(b, e) : b instanceof a.Binary ? this.foldBinary(b, e) : b; }; return b; }(); - a.PeepholeOptimizer = N; + a.PeepholeOptimizer = x; })(a.IR || (a.IR = {})); - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(b) { - H(b instanceof Y); - return b; + function r(b) { + return b instanceof w && d.isString(b.value); } function v(b) { - return b instanceof Y && c.isString(b.value); - } - function p(b) { - return b instanceof Y && c.isNumeric(b.value) ? !0 : b.ty && b.ty.isNumeric(); + return b instanceof w && d.isNumeric(b.value) ? !0 : b.ty && b.ty.isNumeric(); } function u(b, a) { - return p(b) && p(a) || l(b) && l(a) ? !0 : !1; + return v(b) && v(a) || t(b) && t(a) ? !0 : !1; + } + function t(b) { + return r(b) ? !0 : b.ty && b.ty.isString(); } function l(b) { - return v(b) ? !0 : b.ty && b.ty.isString(); + return new w(b); } - function e(b) { - return new Y(b); - } - function m(b) { + function c(b) { switch(b) { case 161: - return X.SUB; + return N.SUB; case 162: - return X.MUL; + return N.MUL; case 163: - return X.DIV; + return N.DIV; case 164: - return X.MOD; + return N.MOD; case 165: - return X.LSH; + return N.LSH; case 166: - return X.RSH; + return N.RSH; case 167: - return X.URSH; + return N.URSH; case 168: - return X.AND; + return N.AND; case 169: - return X.OR; + return N.OR; case 170: - return X.XOR; + return N.XOR; case 20: - return X.NE; + return N.NE; case 26: - return X.SNE; + return N.SNE; case 19: ; case 171: - return X.EQ; + return N.EQ; case 25: ; case 172: - return X.SEQ; + return N.SEQ; case 21: ; case 173: - return X.LT; + return N.LT; case 22: ; case 174: - return X.LE; + return N.LE; case 23: ; case 175: - return X.GT; + return N.GT; case 24: ; case 176: - return X.GE; + return N.GE; case 144: - return X.NEG; + return N.NEG; case 196: - return X.NEG; + return N.NEG; case 197: - return X.ADD; + return N.ADD; case 198: - return X.SUB; + return N.SUB; case 199: - return X.MUL; + return N.MUL; case 17: - return X.TRUE; + return N.TRUE; case 18: - return X.FALSE; + return N.FALSE; case 150: - return X.FALSE; + return N.FALSE; case 151: - return X.BITWISE_NOT; + return N.BITWISE_NOT; default: - J("Invalid operator op: " + b); + D("Invalid operator op: " + b); } } - function t(b, d, g) { - H(c.isString(g)); - g = g.split("."); - for (var f = 0;f < g.length;f++) { - d = new a.IR.GetProperty(null, b.store, d, e(g[f])), d.shouldFloat = !0, b.loads.push(d); + function h(b, e, f) { + f = f.split("."); + for (var c = 0;c < f.length;c++) { + e = new a.IR.GetProperty(null, b.store, e, l(f[c])), e.shouldFloat = !0, b.loads.push(e); } - return d; + return e; } - function q(b) { + function p(b) { b = new a.IR.GlobalProperty(b); b.mustFloat = !0; return b; } - function n(b, a) { - var d = new ea(b, a); - fa && (d = fa.fold(d)); - return d; + function s(b, a) { + var e = new $(b, a); + da && (e = da.fold(e)); + return e; } - function k(b, a, d) { - var g = new x(b, a, d); - if (b === X.EQ || b === X.NE) { - if (a.ty && a.ty.isStrictComparableWith(d.ty)) { - g.operator = b === X.EQ ? X.SEQ : X.SNE; + function m(b, a, e) { + var f = new aa(b, a, e); + if (b === N.EQ || b === N.NE) { + if (a.ty && a.ty.isStrictComparableWith(e.ty)) { + f.operator = b === N.EQ ? N.SEQ : N.SNE; } else { - if (!a.ty || a.ty.canBeXML() || !d.ty || d.ty.canBeXML()) { - g = new R(null, null, q("asEquals"), null, [a, d], 0), b === X.NE && (g = n(X.FALSE, g)); + if (!a.ty || a.ty.canBeXML() || !e.ty || e.ty.canBeXML()) { + f = new U(null, null, p("asEquals"), null, [a, e], 0), b === N.NE && (f = s(N.FALSE, f)); } } } - fa && (g = fa.fold(g)); - return g; - } - function f(b) { - return k(X.OR, b, e(0)); - } - function d(b) { - return k(X.URSH, b, e(0)); - } - function b(b) { - return p(b) ? b : n(X.PLUS, b); + da && (f = da.fold(f)); + return f; } function g(b) { - return n(X.FALSE, n(X.FALSE, b)); + return m(N.OR, b, l(0)); } - function r(b) { + function f(b) { + return m(N.URSH, b, l(0)); + } + function b(b) { + return v(b) ? b : s(N.PLUS, b); + } + function e(b) { + return s(N.FALSE, s(N.FALSE, b)); + } + function q(b) { b.shouldNotFloat = !0; return b; } - function w(b, a) { - return new R(null, null, b, null, a, 4); + function n(b, a) { + return new U(null, null, b, null, a, 4); } - function z(b, a) { - return w(q(b), [a]); + function x(b, a) { + return n(p(b), [a]); + } + function L(b) { + return r(b) ? b : n(p("String"), [b]); } function A(b) { - return v(b) ? b : w(q("String"), [b]); + return r(b) ? b : ga(b) ? new w(y.asCoerceString(b.value)) : n(p("asCoerceString"), [b]); } - function B(b) { - return v(b) ? b : T(b) ? new Y(F.asCoerceString(s(b).value)) : w(q("asCoerceString"), [b]); - } - function M(b) { - return T(b) ? new Y(F.escapeXMLAttribute(s(b).value)) : w(q("escapeXMLAttribute"), [b]); - } - function N(b) { - return T(b) ? new Y(F.escapeXMLElement(s(b).value)) : w(q("escapeXMLElement"), [b]); + function H(b) { + return ga(b) ? new w(y.escapeXMLAttribute(b.value)) : n(p("escapeXMLAttribute"), [b]); } function K(b) { - H(b instanceof y); - return na[y.getQualifiedName(b)]; + return ga(b) ? new w(y.escapeXMLElement(b.value)) : n(p("escapeXMLElement"), [b]); } - var y = c.AVM2.ABC.Multiname, D = c.AVM2.ABC.InstanceInfo, L = c.Debug.notImplemented, H = c.Debug.assert, J = c.Debug.assertUnreachable, C = c.ArrayUtilities.top, E = c.ArrayUtilities.unique, F = c.AVM2.Runtime, I = c.AVM2.Runtime.GlobalMultinameResolver, G = a.IR.Node, Z = a.IR.Start, Q = a.IR.Region, S = a.IR.Null, O = a.IR.Undefined, P = a.IR.True, V = a.IR.False, $ = a.IR.This, W = a.IR.Projection, x = a.IR.Binary, ea = a.IR.Unary, Y = a.IR.Constant, R = a.IR.Call, U = a.IR.Phi, ba = a.IR.Stop, - X = a.IR.Operator, ga = a.IR.Parameter, ja = a.IR.NewArray, aa = a.IR.NewObject, ia = a.IR.KeyValuePair, T = a.IR.isConstant, da = new c.IndentingWriter, fa = new a.IR.PeepholeOptimizer, la = function() { + var F = d.AVM2.ABC.Multiname, J = d.AVM2.ABC.InstanceInfo, M = d.Debug.notImplemented, D = d.Debug.assertUnreachable, B = d.ArrayUtilities.top, E = d.ArrayUtilities.unique, y = d.AVM2.Runtime, z = d.AVM2.Runtime.GlobalMultinameResolver, G = a.IR.Node, C = a.IR.Start, I = a.IR.Region, P = a.IR.Null, T = a.IR.Undefined, O = a.IR.True, Q = a.IR.False, S = a.IR.This, V = a.IR.Projection, aa = a.IR.Binary, $ = a.IR.Unary, w = a.IR.Constant, U = a.IR.Call, ba = a.IR.Phi, R = a.IR.Stop, N = a.IR.Operator, + Z = a.IR.Parameter, fa = a.IR.NewArray, X = a.IR.NewObject, ia = a.IR.KeyValuePair, ga = a.IR.isConstant, ca = new d.IndentingWriter, da = new a.IR.PeepholeOptimizer, ea = function() { function b(a) { void 0 === a && (a = 0); this.id = b._nextID += 1; @@ -18096,51 +18245,50 @@ Shumway.AVM2.XRegExp.install(); this.local = []; this.stack = []; this.scope = []; - this.store = O; + this.store = T; this.loads = []; - this.saved = O; + this.saved = T; } b.prototype.clone = function(a) { - var d = new b; - d.index = void 0 !== a ? a : this.index; - d.local = this.local.slice(0); - d.stack = this.stack.slice(0); - d.scope = this.scope.slice(0); - d.loads = this.loads.slice(0); - d.saved = this.saved; - d.store = this.store; - return d; + var e = new b; + e.index = void 0 !== a ? a : this.index; + e.local = this.local.slice(0); + e.stack = this.stack.slice(0); + e.scope = this.scope.slice(0); + e.loads = this.loads.slice(0); + e.saved = this.saved; + e.store = this.store; + return e; }; b.prototype.matches = function(b) { return this.stack.length === b.stack.length && this.scope.length === b.scope.length && this.local.length === b.local.length; }; - b.prototype.makeLoopPhis = function(a, d) { - function g(b) { - b = new U(a, b); + b.prototype.makeLoopPhis = function(a, e) { + function f(b) { + b = new ba(a, b); b.isLoop = !0; return b; } - var e = new b; - H(a); - e.index = this.index; - e.local = this.local.map(function(b, a) { - return d[a] ? g(b) : b; + var c = new b; + c.index = this.index; + c.local = this.local.map(function(b, a) { + return e[a] ? f(b) : b; }); - e.stack = this.stack.map(g); - e.scope = this.scope.map(g); - e.loads = this.loads.slice(0); - e.saved = this.saved; - e.store = g(this.store); - return e; + c.stack = this.stack.map(f); + c.scope = this.scope.map(f); + c.loads = this.loads.slice(0); + c.saved = this.saved; + c.store = f(this.store); + return c; }; b.tryOptimizePhi = function(b) { - if (b instanceof U) { + if (b instanceof ba) { if (b.isLoop) { return b; } var a = E(b.args); if (1 === a.length) { - return b.seal(), h.countTimeline("Builder: OptimizedPhi"), a[0]; + return b.seal(), k.countTimeline("Builder: OptimizedPhi"), a[0]; } } return b; @@ -18152,23 +18300,21 @@ Shumway.AVM2.XRegExp.install(); this.saved = b.tryOptimizePhi(this.saved); this.store = b.tryOptimizePhi(this.store); }; - b.mergeValue = function(b, a, d) { - b = a instanceof U && a.control === b ? a : new U(b, a); - b.pushValue(d); + b.mergeValue = function(b, a, e) { + b = a instanceof ba && a.control === b ? a : new ba(b, a); + b.pushValue(e); return b; }; - b.mergeValues = function(a, d, g) { - for (var e = 0;e < d.length;e++) { - d[e] = b.mergeValue(a, d[e], g[e]); + b.mergeValues = function(a, e, f) { + for (var c = 0;c < e.length;c++) { + e[c] = b.mergeValue(a, e[c], f[c]); } }; - b.prototype.merge = function(a, d) { - H(a); - H(this.matches(d), this + " !== " + d); - b.mergeValues(a, this.local, d.local); - b.mergeValues(a, this.stack, d.stack); - b.mergeValues(a, this.scope, d.scope); - this.store = b.mergeValue(a, this.store, d.store); + b.prototype.merge = function(a, e) { + b.mergeValues(a, this.local, e.local); + b.mergeValues(a, this.stack, e.stack); + b.mergeValues(a, this.scope, e.scope); + this.store = b.mergeValue(a, this.store, e.store); this.store.abstract = !0; }; b.prototype.trace = function(b) { @@ -18182,26 +18328,26 @@ Shumway.AVM2.XRegExp.install(); }; b._nextID = 0; return b; - }(), ca = z.bind(null, "asCoerceObject"), na = Object.create(null); - na[y.Int] = f; - na[y.Uint] = d; - na[y.Number] = b; - na[y.String] = B; - na[y.Object] = ca; - na[y.Boolean] = g; - var ma = Object.create(null); - ma[y.Int] = f; - ma[y.Uint] = d; - ma[y.Number] = z.bind(null, "Number"); - ma[y.String] = z.bind(null, "String"); - ma[y.Object] = z.bind(null, "Object"); - ma[y.Boolean] = z.bind(null, "Boolean"); - var ra = z.bind(null, "Object"), wa = function() { - function l(b, a, d, g) { + }(), W = x.bind(null, "asCoerceObject"), ka = Object.create(null); + ka[F.Int] = g; + ka[F.Uint] = f; + ka[F.Number] = b; + ka[F.String] = A; + ka[F.Object] = W; + ka[F.Boolean] = e; + var Y = Object.create(null); + Y[F.Int] = g; + Y[F.Uint] = f; + Y[F.Number] = x.bind(null, "Number"); + Y[F.String] = x.bind(null, "String"); + Y[F.Object] = x.bind(null, "Object"); + Y[F.Boolean] = x.bind(null, "Boolean"); + var la = x.bind(null, "Object"), ma = function() { + function x(b, a, e, f) { this.builder = b; this.region = a; - this.block = d; - this.state = g; + this.block = e; + this.state = f; this.abc = b.abc; this.methodInfoConstant = b.methodInfoConstant; this.bytecodes = b.methodInfo.analysis.bytecodes; @@ -18209,45 +18355,40 @@ Shumway.AVM2.XRegExp.install(); this.traceBuilder = b.traceBuilder; this.methodInfo = b.methodInfo; } - l.prototype.popMultiname = function() { - var b = this.constantPool.multinames[this.bc.index], d, g; - b.isRuntimeName() ? (d = this.state.stack.pop(), g = e(0)) : (d = e(b.name), g = e(b.flags)); - b.isRuntimeNamespace() ? (b = new ja(this.region, [this.state.stack.pop()]), H(!(b instanceof a.IR.GetProperty), "Cannot float node : " + b), b.shouldFloat = !0) : b = e(b.namespaces); - return new a.IR.ASMultiname(b, d, g); + x.prototype.popMultiname = function() { + var b = this.constantPool.multinames[this.bc.index], e, f; + b.isRuntimeName() ? (e = this.state.stack.pop(), f = l(0)) : (e = l(b.name), f = l(b.flags)); + b.isRuntimeNamespace() ? (b = new fa(this.region, [this.state.stack.pop()]), b.shouldFloat = !0) : b = l(b.namespaces); + return new a.IR.ASMultiname(b, e, f); }; - l.prototype.setIfStops = function(b) { - H(!this.stops); + x.prototype.setIfStops = function(b) { b = new a.IR.If(this.region, b); - this.stops = [{control:new W(b, 2), target:this.bytecodes[this.bc.position + 1], state:this.state}, {control:new W(b, 1), target:this.bc.target, state:this.state}]; + this.stops = [{control:new V(b, 2), target:this.bytecodes[this.bc.position + 1], state:this.state}, {control:new V(b, 1), target:this.bc.target, state:this.state}]; }; - l.prototype.setJumpStop = function() { - H(!this.stops); + x.prototype.setJumpStop = function() { this.stops = [{control:this.region, target:this.bc.target, state:this.state}]; }; - l.prototype.setThrowStop = function() { - H(!this.stops); + x.prototype.setThrowStop = function() { this.stops = []; }; - l.prototype.setReturnStop = function() { - H(!this.stops); + x.prototype.setReturnStop = function() { this.stops = []; }; - l.prototype.setSwitchStops = function(b) { - H(!this.stops); + x.prototype.setSwitchStops = function(b) { if (2 < this.bc.targets.length) { this.stops = []; b = new a.IR.Switch(this.region, b); - for (var d = 0;d < this.bc.targets.length;d++) { - this.stops.push({control:new W(b, 0, e(d)), target:this.bc.targets[d], state:this.state}); + for (var e = 0;e < this.bc.targets.length;e++) { + this.stops.push({control:new V(b, 0, l(e)), target:this.bc.targets[e], state:this.state}); } } else { - H(2 === this.bc.targets.length), b = k(X.SEQ, b, e(0)), b = new a.IR.If(this.region, b), this.stops = [{control:new W(b, 2), target:this.bc.targets[1], state:this.state}, {control:new W(b, 1), target:this.bc.targets[0], state:this.state}]; + b = m(N.SEQ, b, l(0)), b = new a.IR.If(this.region, b), this.stops = [{control:new V(b, 2), target:this.bc.targets[1], state:this.state}, {control:new V(b, 1), target:this.bc.targets[0], state:this.state}]; } }; - l.prototype.savedScope = function() { + x.prototype.savedScope = function() { return this.state.saved; }; - l.prototype.topScope = function(b) { + x.prototype.topScope = function(b) { var a = this.state.scope; if (void 0 !== b) { if (b < a.length) { @@ -18256,235 +18397,230 @@ Shumway.AVM2.XRegExp.install(); if (b === a.length) { return this.savedScope(); } - var d = this.savedScope(); + var e = this.savedScope(); b -= a.length; for (a = 0;a < b;a++) { - d = t(this.state, d, "parent"); + e = h(this.state, e, "parent"); } - return d; + return e; } - return 0 < a.length ? C(a) : this.savedScope(); + return 0 < a.length ? B(a) : this.savedScope(); }; - l.prototype.getGlobalScope = function() { + x.prototype.getGlobalScope = function() { var b = this.bc.ti; - return b && b.object ? e(b.object) : new a.IR.ASGlobal(null, this.savedScope()); + return b && b.object ? l(b.object) : new a.IR.ASGlobal(null, this.savedScope()); }; - l.prototype.getScopeObject = function(b) { - return b instanceof a.IR.ASScope ? b.object : t(this.state, b, "object"); + x.prototype.getScopeObject = function(b) { + return b instanceof a.IR.ASScope ? b.object : h(this.state, b, "object"); }; - l.prototype.findProperty = function(b, d) { - var g = this.bc.ti, f = new a.IR.ASFindProperty(this.region, this.state.store, this.topScope(), b, this.methodInfoConstant, d); - if (g) { - if (g.object) { - return g.object instanceof c.AVM2.Runtime.Global && !g.object.scriptInfo.executing ? f : e(g.object); + x.prototype.findProperty = function(b, e) { + var f = this.bc.ti, c = new a.IR.ASFindProperty(this.region, this.state.store, this.topScope(), b, this.methodInfoConstant, e); + if (f) { + if (f.object) { + return f.object instanceof d.AVM2.Runtime.Global && !f.object.scriptInfo.executing ? c : l(f.object); } - if (void 0 !== g.scopeDepth) { - return this.getScopeObject(this.topScope(g.scopeDepth)); + if (-1 !== f.scopeDepth) { + return this.getScopeObject(this.topScope(f.scopeDepth)); } } - return f; + return c; }; - l.prototype.coerce = function(b, a) { - var d = K(b); - return d ? d(a) : a; + x.prototype.coerce = function(b, a) { + var e = ka[F.getQualifiedName(b)]; + return e ? e(a) : a; }; - l.prototype.store = function(b) { + x.prototype.store = function(b) { var a = this.state; - a.store = new W(b, 3); + a.store = new V(b, 3); b.loads = a.loads.slice(0); a.loads.length = 0; return b; }; - l.prototype.load = function(b) { + x.prototype.load = function(b) { this.state.loads.push(b); return b; }; - l.prototype.call = function(b, a, d) { - return this.store(new R(this.region, this.state.store, b, a, d, 4)); + x.prototype.call = function(b, a, e) { + return this.store(new U(this.region, this.state.store, b, a, e, 4)); }; - l.prototype.callCall = function(b, a, d) { - return this.store(new R(this.region, this.state.store, b, a, d, 16)); + x.prototype.callCall = function(b, a, e) { + return this.store(new U(this.region, this.state.store, b, a, e, 16)); }; - l.prototype.callProperty = function(b, d, g, f) { - var k = this.bc.ti, c = this.region, r = this.state; - if (k && k.trait) { - if (k.trait.isMethod()) { - return k = k.trait.holder instanceof D && k.trait.holder.isInterface() ? y.getPublicQualifiedName(y.getName(k.trait.name)) : y.getQualifiedName(k.trait.name), k = F.VM_OPEN_METHOD_PREFIX + k, this.store(new a.IR.CallProperty(c, r.store, b, e(k), g, 4)); + x.prototype.callProperty = function(b, e, f, c) { + var g = this.bc.ti, n = this.region, q = this.state; + if (g && g.trait) { + if (g.trait.isMethod()) { + return e = g.trait.holder instanceof J && g.trait.holder.isInterface() ? F.getPublicQualifiedName(F.getName(g.trait.name)) : F.getQualifiedName(g.trait.name), e = y.VM_OPEN_METHOD_PREFIX + e, this.store(new a.IR.CallProperty(n, q.store, b, l(e), f, 4)); } - if (k.trait.isClass()) { - d = k.trait.name; - H(d instanceof y); - if (d = ma[y.getQualifiedName(d)]) { - return d(g[0]); + if (g.trait.isClass()) { + if (e = Y[F.getQualifiedName(g.trait.name)]) { + return e(f[0]); } - k = y.getQualifiedName(k.trait.name); - return this.store(new a.IR.CallProperty(c, r.store, b, e(k), g, 16)); + e = F.getQualifiedName(g.trait.name); + return this.store(new a.IR.CallProperty(n, q.store, b, l(e), f, 16)); } } - return(k = this.resolveMultinameGlobally(d)) ? this.store(new a.IR.ASCallProperty(c, r.store, b, e(y.getQualifiedName(k)), g, 6, f)) : this.store(new a.IR.ASCallProperty(c, r.store, b, d, g, 4, f)); + return(g = this.resolveMultinameGlobally(e)) ? this.store(new a.IR.ASCallProperty(n, q.store, b, l(F.getQualifiedName(g)), f, 6, c)) : this.store(new a.IR.ASCallProperty(n, q.store, b, e, f, 4, c)); }; - l.prototype.getProperty = function(b, d, g) { - var f = this.bc.ti, k = this.region, c = this.state; - H(d instanceof a.IR.ASMultiname); - g = !!g; - if (f && f.trait) { - if (f.trait.isConst() && f.trait.hasDefaultValue) { - return e(f.trait.value); + x.prototype.getProperty = function(b, e, f) { + var c = this.bc.ti, g = this.region, n = this.state; + f = !!f; + if (c && c.trait) { + if (c.trait.isConst() && c.trait.hasDefaultValue) { + return l(c.trait.value); } - b = new a.IR.GetProperty(k, c.store, b, e(y.getQualifiedName(f.trait.name))); - return f.trait.isGetter() ? this.store(b) : this.load(b); + b = new a.IR.GetProperty(g, n.store, b, l(F.getQualifiedName(c.trait.name))); + return c.trait.isGetter() ? this.store(b) : this.load(b); } - if (p(d.name)) { - return this.store(new a.IR.ASGetProperty(k, c.store, b, d, 1)); + if (v(e.name)) { + return this.store(new a.IR.ASGetProperty(g, n.store, b, e, 1)); } - if (f = this.resolveMultinameGlobally(d)) { - return this.store(new a.IR.ASGetProperty(k, c.store, b, e(y.getQualifiedName(f)), 2 | (g ? 8 : 0))); + if (c = this.resolveMultinameGlobally(e)) { + return this.store(new a.IR.ASGetProperty(g, n.store, b, l(F.getQualifiedName(c)), 2 | (f ? 8 : 0))); } - h.countTimeline("Compiler: Slow ASGetProperty"); - return this.store(new a.IR.ASGetProperty(k, c.store, b, d, g ? 8 : 0)); + k.countTimeline("Compiler: Slow ASGetProperty"); + return this.store(new a.IR.ASGetProperty(g, n.store, b, e, f ? 8 : 0)); }; - l.prototype.setProperty = function(b, d, g) { - var f = this.bc.ti, k = this.region, c = this.state; - H(d instanceof a.IR.ASMultiname); - if (f && f.trait) { - (d = f.trait.typeName ? K(f.trait.typeName) : null) && (g = d(g)), this.store(new a.IR.SetProperty(k, c.store, b, e(y.getQualifiedName(f.trait.name)), g)); + x.prototype.setProperty = function(b, e, f) { + var c = this.bc.ti, g = this.region, n = this.state; + if (c && c.trait) { + (e = c.trait.typeName ? ka[F.getQualifiedName(c.trait.typeName)] : null) && (f = e(f)), this.store(new a.IR.SetProperty(g, n.store, b, l(F.getQualifiedName(c.trait.name)), f)); } else { - if (p(d.name)) { - return this.store(new a.IR.ASSetProperty(k, c.store, b, d, g, 1)); + if (v(e.name)) { + return this.store(new a.IR.ASSetProperty(g, n.store, b, e, f, 1)); } - this.resolveMultinameGlobally(d); - return this.store(new a.IR.ASSetProperty(k, c.store, b, d, g, 0)); + this.resolveMultinameGlobally(e); + return this.store(new a.IR.ASSetProperty(g, n.store, b, e, f, 0)); } }; - l.prototype.callSuper = function(b, d, g, f) { - var k = this.bc.ti, c = this.region, r = this.state; - return k && k.trait && k.trait.isMethod() && k.baseClass ? (b = F.VM_OPEN_METHOD_PREFIX + y.getQualifiedName(k.trait.name), k = this.getJSProperty(e(k.baseClass), "traitsPrototype." + b), this.call(k, d, f)) : this.store(new a.IR.ASCallSuper(c, r.store, d, g, f, 4, b)); + x.prototype.callSuper = function(b, e, f, c) { + var g = this.bc.ti, n = this.region, q = this.state; + return g && g.trait && g.trait.isMethod() && g.baseClass ? (b = y.VM_OPEN_METHOD_PREFIX + F.getQualifiedName(g.trait.name), g = this.getJSProperty(l(g.baseClass), "traitsPrototype." + b), this.call(g, e, c)) : this.store(new a.IR.ASCallSuper(n, q.store, e, f, c, 4, b)); }; - l.prototype.getSuper = function(b, d, g) { - var f = this.bc.ti, k = this.region, c = this.state; - return f && f.trait && f.trait.isGetter() && f.baseClass ? (b = F.VM_OPEN_GET_METHOD_PREFIX + y.getQualifiedName(f.trait.name), f = this.getJSProperty(e(f.baseClass), "traitsPrototype." + b), this.call(f, d, [])) : this.store(new a.IR.ASGetSuper(k, c.store, d, g, b)); + x.prototype.getSuper = function(b, e, f) { + var c = this.bc.ti, g = this.region, n = this.state; + return c && c.trait && c.trait.isGetter() && c.baseClass ? (b = y.VM_OPEN_GET_METHOD_PREFIX + F.getQualifiedName(c.trait.name), c = this.getJSProperty(l(c.baseClass), "traitsPrototype." + b), this.call(c, e, [])) : this.store(new a.IR.ASGetSuper(g, n.store, e, f, b)); }; - l.prototype.setSuper = function(b, d, g, f) { - var k = this.bc.ti, c = this.region, r = this.state; - return k && k.trait && k.trait.isSetter() && k.baseClass ? (b = F.VM_OPEN_SET_METHOD_PREFIX + y.getQualifiedName(k.trait.name), k = this.getJSProperty(e(k.baseClass), "traitsPrototype." + b), this.call(k, d, [f])) : this.store(new a.IR.ASSetSuper(c, r.store, d, g, f, b)); + x.prototype.setSuper = function(b, e, f, c) { + var g = this.bc.ti, n = this.region, q = this.state; + return g && g.trait && g.trait.isSetter() && g.baseClass ? (b = y.VM_OPEN_SET_METHOD_PREFIX + F.getQualifiedName(g.trait.name), g = this.getJSProperty(l(g.baseClass), "traitsPrototype." + b), this.call(g, e, [c])) : this.store(new a.IR.ASSetSuper(n, q.store, e, f, c, b)); }; - l.prototype.constructSuper = function(b, a, d) { - var g = this.bc.ti; - if (g) { - if (g.noCallSuperNeeded) { + x.prototype.constructSuper = function(b, a, e) { + var f = this.bc.ti; + if (f) { + if (f.noCallSuperNeeded) { return; } - if (g.baseClass) { - b = this.getJSProperty(e(g.baseClass), "instanceConstructorNoInitialize"); - this.call(b, a, d); + if (f.baseClass) { + b = this.getJSProperty(l(f.baseClass), "instanceConstructorNoInitialize"); + this.call(b, a, e); return; } } b = this.getJSProperty(b, "object.baseClass.instanceConstructorNoInitialize"); - this.call(b, a, d); + this.call(b, a, e); }; - l.prototype.getSlot = function(b, d) { - var g = this.bc.ti, f = this.region, k = this.state; - if (g) { - var c = g.trait; - if (c) { - if (c.isConst() && g.trait.hasDefaultValue) { - return e(c.value); + x.prototype.getSlot = function(b, e) { + var f = this.bc.ti, c = this.region, g = this.state; + if (f) { + var n = f.trait; + if (n) { + if (n.isConst() && f.trait.hasDefaultValue) { + return l(n.value); } - g = y.getQualifiedName(c.name); - return this.store(new a.IR.GetProperty(f, k.store, b, e(g))); + f = F.getQualifiedName(n.name); + return this.store(new a.IR.GetProperty(c, g.store, b, l(f))); } } - return this.store(new a.IR.ASGetSlot(null, k.store, b, d)); + return this.store(new a.IR.ASGetSlot(null, g.store, b, e)); }; - l.prototype.setSlot = function(b, d, g) { - var f = this.bc.ti, k = this.region, c = this.state; - if (f && (f = f.trait)) { - d = y.getQualifiedName(f.name); - this.store(new a.IR.SetProperty(k, c.store, b, e(d), g)); + x.prototype.setSlot = function(b, e, f) { + var c = this.bc.ti, g = this.region, n = this.state; + if (c && (c = c.trait)) { + e = F.getQualifiedName(c.name); + this.store(new a.IR.SetProperty(g, n.store, b, l(e), f)); return; } - this.store(new a.IR.ASSetSlot(k, c.store, b, d, g)); + this.store(new a.IR.ASSetSlot(g, n.store, b, e, f)); }; - l.prototype.resolveMultinameGlobally = function(b) { - var a = b.namespaces, d = b.name; - if (c.AVM2.Runtime.globalMultinameAnalysis.value) { - if (T(a) && T(d) && !b.isAttribute()) { - if (!c.isNumeric(d.value) && c.isString(d.value) && d.value) { - return I.resolveMultiname(new y(a.value, d.value, b.flags)); + x.prototype.resolveMultinameGlobally = function(b) { + var a = b.namespaces, e = b.name; + if (d.AVM2.Runtime.globalMultinameAnalysis.value) { + if (ga(a) && ga(e) && !b.isAttribute()) { + if (!d.isNumeric(e.value) && d.isString(e.value) && e.value) { + return z.resolveMultiname(new F(a.value, e.value, b.flags)); } - h.countTimeline("GlobalMultinameResolver: Cannot resolve numeric or any names."); + k.countTimeline("GlobalMultinameResolver: Cannot resolve numeric or any names."); } else { - h.countTimeline("GlobalMultinameResolver: Cannot resolve runtime multiname or attribute."); + k.countTimeline("GlobalMultinameResolver: Cannot resolve runtime multiname or attribute."); } } }; - l.prototype.getJSProperty = function(b, a) { - return t(this.state, b, a); + x.prototype.getJSProperty = function(b, a) { + return h(this.state, b, a); }; - l.prototype.setJSProperty = function(b, d, g) { - this.store(new a.IR.SetProperty(null, this.state.store, b, e(d), g)); + x.prototype.setJSProperty = function(b, e, f) { + this.store(new a.IR.SetProperty(null, this.state.store, b, l(e), f)); }; - l.prototype.simplifyName = function(b) { - return b instanceof Y && b.value instanceof y && y.isQName(b.value) ? e(y.getQualifiedName(b.value)) : b; + x.prototype.simplifyName = function(b) { + return b instanceof w && b.value instanceof F && F.isQName(b.value) ? l(F.getQualifiedName(b.value)) : b; }; - l.prototype.getDescendants = function(b, d) { - var g = this.region, e = this.state; - d = this.simplifyName(d); - return new a.IR.ASGetDescendants(g, e.store, b, d); + x.prototype.getDescendants = function(b, e) { + var f = this.region, c = this.state; + e = this.simplifyName(e); + return new a.IR.ASGetDescendants(f, c.store, b, e); }; - l.prototype.truthyCondition = function(b) { - var a = this.state.stack, d; - b.isBinary && (d = a.pop()); + x.prototype.truthyCondition = function(b) { + var a = this.state.stack, e; + b.isBinary && (e = a.pop()); a = a.pop(); - b = d ? k(b, a, d) : n(b, a); - fa && (b = fa.fold(b, !0)); + b = e ? m(b, a, e) : s(b, a); + da && (b = da.fold(b, !0)); return b; }; - l.prototype.negatedTruthyCondition = function(b) { - b = n(X.FALSE, this.truthyCondition(b)); - fa && (b = fa.fold(b, !0)); + x.prototype.negatedTruthyCondition = function(b) { + b = s(N.FALSE, this.truthyCondition(b)); + da && (b = da.fold(b, !0)); return b; }; - l.prototype.pushExpression = function(b, a) { - var d = this.state.stack, g; - b.isBinary ? (g = d.pop(), d = d.pop(), a && (g = f(g), d = f(d)), this.push(k(b, d, g))) : (d = d.pop(), a && (d = f(d)), this.push(n(b, d))); + x.prototype.pushExpression = function(b, a) { + var e = this.state.stack, f; + b.isBinary ? (f = e.pop(), e = e.pop(), a && (f = g(f), e = g(e)), this.push(m(b, e, f))) : (e = e.pop(), a && (e = g(e)), this.push(s(b, e))); }; - l.prototype.push = function(b) { - var d = this.bc; - H(b instanceof a.IR.Node); - d.ti && !b.ty && (b.ty = d.ti.type); + x.prototype.push = function(b) { + var a = this.bc; + a.ti && !b.ty && (b.ty = a.ti.type); this.state.stack.push(b); }; - l.prototype.pushLocal = function(b) { + x.prototype.pushLocal = function(b) { this.push(this.state.local[b]); }; - l.prototype.popLocal = function(b) { + x.prototype.popLocal = function(b) { var a = this.state; - a.local[b] = r(a.stack.pop()); + a.local[b] = q(a.stack.pop()); }; - l.prototype.build = function() { - function l() { - return p.pop(); + x.prototype.build = function() { + function h() { + return v.pop(); } - function n(b) { - return c.ArrayUtilities.popMany(p, b); + function s(b) { + return d.ArrayUtilities.popMany(v, b); } - var t = this.block, z = this.state, s = this.state.local, p = this.state.stack, v = this.state.scope, D = this.region, K = this.bytecodes, J, C, E, x = this.push.bind(this); + var x = this.block, r = this.state, t = this.state.local, v = this.state.stack, E = this.state.scope, B = this.region, D = this.bytecodes, y, J, z, w = this.push.bind(this); this.stops = null; - this.traceBuilder && (da.writeLn("Processing Region: " + D + ", Block: " + t.bid), da.enter(("> state: " + D.entryState.toString()).padRight(" ", 100))); - for (var F = t.position, I = t.end.position;F <= I;F++) { - this.bc = t = K[F]; - var G = t.op; - z.index = F; - switch(G) { + this.traceBuilder && (ca.writeLn("Processing Region: " + B + ", Block: " + x.bid), ca.enter(("> state: " + B.entryState.toString()).padRight(" ", 100))); + for (var G = x.position, I = x.end.position;G <= I;G++) { + this.bc = x = D[G]; + var C = x.op; + r.index = G; + switch(C) { case 3: - this.store(new a.IR.Throw(D, l())); - this.builder.stopPoints.push({region:D, store:z.store, value:O}); + this.store(new a.IR.Throw(B, h())); + this.builder.stopPoints.push({region:B, store:r.store, value:T}); this.setThrowStop(); break; case 98: - this.pushLocal(t.index); + this.pushLocal(x.index); break; case 208: ; @@ -18493,10 +18629,10 @@ Shumway.AVM2.XRegExp.install(); case 210: ; case 211: - this.pushLocal(G - 208); + this.pushLocal(C - 208); break; case 99: - this.popLocal(t.index); + this.popLocal(x.index); break; case 212: ; @@ -18505,257 +18641,257 @@ Shumway.AVM2.XRegExp.install(); case 214: ; case 215: - this.popLocal(G - 212); + this.popLocal(C - 212); break; case 28: ; case 48: - v.push(new a.IR.ASScope(this.topScope(), l(), 28 === G)); + E.push(new a.IR.ASScope(this.topScope(), h(), 28 === C)); break; case 29: - v.pop(); + E.pop(); break; case 100: - x(this.getGlobalScope()); + w(this.getGlobalScope()); break; case 101: - x(this.getScopeObject(z.scope[t.index])); + w(this.getScopeObject(r.scope[x.index])); break; case 94: ; case 93: - x(this.findProperty(this.popMultiname(), 93 === G)); + w(this.findProperty(this.popMultiname(), 93 === C)); break; case 102: - E = this.popMultiname(); - C = l(); - x(this.getProperty(C, E, !1)); + z = this.popMultiname(); + J = h(); + w(this.getProperty(J, z, !1)); break; case 89: - E = this.popMultiname(); - C = l(); - x(this.getDescendants(C, E)); + z = this.popMultiname(); + J = h(); + w(this.getDescendants(J, z)); break; case 96: - E = this.popMultiname(); - x(this.getProperty(this.findProperty(E, !0), E, !1)); + z = this.popMultiname(); + w(this.getProperty(this.findProperty(z, !0), z, !1)); break; case 104: ; case 97: - J = l(); - E = this.popMultiname(); - C = l(); - this.setProperty(C, E, J); + y = h(); + z = this.popMultiname(); + J = h(); + this.setProperty(J, z, y); break; case 106: - E = this.popMultiname(); - C = l(); - x(this.store(new a.IR.ASDeleteProperty(D, z.store, C, E))); + z = this.popMultiname(); + J = h(); + w(this.store(new a.IR.ASDeleteProperty(B, r.store, J, z))); break; case 108: - C = l(); - x(this.getSlot(C, e(t.index))); + J = h(); + w(this.getSlot(J, l(x.index))); break; case 109: - J = l(); - C = l(); - this.setSlot(C, e(t.index), J); + y = h(); + J = h(); + this.setSlot(J, l(x.index), y); break; case 4: - E = this.popMultiname(); - C = l(); - x(this.getSuper(this.savedScope(), C, E)); + z = this.popMultiname(); + J = h(); + w(this.getSuper(this.savedScope(), J, z)); break; case 5: - J = l(); - E = this.popMultiname(); - C = l(); - this.setSuper(this.savedScope(), C, E, J); + y = h(); + z = this.popMultiname(); + J = h(); + this.setSuper(this.savedScope(), J, z, y); break; case 241: ; case 240: break; case 64: - x(w(this.builder.createFunctionCallee, [e(this.abc.methods[t.index]), this.topScope(), e(!0)])); + w(n(this.builder.createFunctionCallee, [l(this.abc.methods[x.index]), this.topScope(), l(!0)])); break; case 65: - J = n(t.argCount); - C = l(); - E = l(); - x(this.callCall(E, C, J)); + y = s(x.argCount); + J = h(); + z = h(); + w(this.callCall(z, J, y)); break; case 70: ; case 79: ; case 76: - J = n(t.argCount); - E = this.popMultiname(); - C = l(); - J = this.callProperty(C, E, J, 76 === G); - 79 !== G && x(J); + y = s(x.argCount); + z = this.popMultiname(); + J = h(); + y = this.callProperty(J, z, y, 76 === C); + 79 !== C && w(y); break; case 69: ; case 78: - E = this.popMultiname(); - J = n(t.argCount); - C = l(); - J = this.callSuper(this.savedScope(), C, E, J); - 78 !== G && x(J); + z = this.popMultiname(); + y = s(x.argCount); + J = h(); + y = this.callSuper(this.savedScope(), J, z, y); + 78 !== C && w(y); break; case 66: - J = n(t.argCount); - C = l(); - x(this.store(new a.IR.ASNew(D, z.store, C, J))); + y = s(x.argCount); + J = h(); + w(this.store(new a.IR.ASNew(B, r.store, J, y))); break; case 73: - J = n(t.argCount); - C = l(); - this.constructSuper(this.savedScope(), C, J); + y = s(x.argCount); + J = h(); + this.constructSuper(this.savedScope(), J, y); break; case 74: - J = n(t.argCount); - E = this.popMultiname(); - C = l(); - E = this.getProperty(C, E, !1); - x(this.store(new a.IR.ASNew(D, z.store, E, J))); + y = s(x.argCount); + z = this.popMultiname(); + J = h(); + z = this.getProperty(J, z, !1); + w(this.store(new a.IR.ASNew(B, r.store, z, y))); break; case 128: - if (t.ti && t.ti.noCoercionNeeded) { - h.countTimeline("Compiler: NoCoercionNeeded"); + if (x.ti && x.ti.noCoercionNeeded) { + k.countTimeline("Compiler: NoCoercionNeeded"); break; } else { - h.countTimeline("Compiler: CoercionNeeded"); + k.countTimeline("Compiler: CoercionNeeded"); } - J = l(); - x(this.coerce(this.constantPool.multinames[t.index], J)); + y = h(); + w(this.coerce(this.constantPool.multinames[x.index], y)); break; case 131: ; case 115: - x(f(l())); + w(g(h())); break; case 136: ; case 116: - x(d(l())); + w(f(h())); break; case 132: ; case 117: - x(b(l())); + w(b(h())); break; case 129: ; case 118: - x(g(l())); + w(e(h())); break; case 120: - x(this.call(q("checkFilter"), null, [l()])); + w(this.call(p("checkFilter"), null, [h()])); break; case 130: break; case 133: - x(B(l())); + w(A(h())); break; case 112: - x(A(l())); + w(L(h())); break; case 114: - x(M(l())); + w(H(h())); break; case 113: - x(N(l())); + w(K(h())); break; case 134: - if (t.ti && t.ti.noCoercionNeeded) { - h.countTimeline("Compiler: NoCoercionNeeded"); + if (x.ti && x.ti.noCoercionNeeded) { + k.countTimeline("Compiler: NoCoercionNeeded"); break; } else { - h.countTimeline("Compiler: CoercionNeeded"); + k.countTimeline("Compiler: CoercionNeeded"); } - J = l(); - C = this.constantPool.multinames[t.index]; - E = new a.IR.ASMultiname(e(C.namespaces), e(C.name), e(C.flags)); - C = this.getProperty(this.findProperty(E, !1), E); - x(this.call(q("asAsType"), null, [C, J])); + y = h(); + J = this.constantPool.multinames[x.index]; + z = new a.IR.ASMultiname(l(J.namespaces), l(J.name), l(J.flags)); + J = this.getProperty(this.findProperty(z, !1), z); + w(this.call(p("asAsType"), null, [J, y])); break; case 135: - C = l(); - J = l(); - x(this.call(q("asAsType"), null, [C, J])); + J = h(); + y = h(); + w(this.call(p("asAsType"), null, [J, y])); break; case 72: ; case 71: - J = O; - 72 === G && (J = l(), this.methodInfo.returnType && (t.ti && t.ti.noCoercionNeeded || (J = this.coerce(this.methodInfo.returnType, J)))); - this.builder.stopPoints.push({region:D, store:z.store, value:J}); + y = T; + 72 === C && (y = h(), this.methodInfo.returnType && (x.ti && x.ti.noCoercionNeeded || (y = this.coerce(this.methodInfo.returnType, y)))); + this.builder.stopPoints.push({region:B, store:r.store, value:y}); this.setReturnStop(); break; case 30: ; case 35: - J = l(); - C = l(); - x(new a.IR.CallProperty(D, z.store, C, e(30 === G ? "asNextName" : "asNextValue"), [J], 4)); + y = h(); + J = h(); + w(new a.IR.CallProperty(B, r.store, J, l(30 === C ? "asNextName" : "asNextValue"), [y], 4)); break; case 50: - J = new a.IR.ASNewHasNext2; - this.setJSProperty(J, "object", s[t.object]); - this.setJSProperty(J, "index", s[t.index]); - this.store(new a.IR.CallProperty(D, z.store, ra(s[t.object]), e("asHasNext2"), [J], 4)); - s[t.object] = this.getJSProperty(J, "object"); - x(s[t.index] = this.getJSProperty(J, "index")); + y = new a.IR.ASNewHasNext2; + this.setJSProperty(y, "object", t[x.object]); + this.setJSProperty(y, "index", t[x.index]); + this.store(new a.IR.CallProperty(B, r.store, la(t[x.object]), l("asHasNext2"), [y], 4)); + t[x.object] = this.getJSProperty(y, "object"); + w(t[x.index] = this.getJSProperty(y, "index")); break; case 32: - x(S); + w(P); break; case 33: - x(O); + w(T); break; case 38: - x(P); + w(O); break; case 39: - x(V); + w(Q); break; case 40: - x(e(NaN)); + w(l(NaN)); break; case 34: - L(String(t)); + M(String(x)); break; case 36: ; case 37: - x(e(t.value)); + w(l(x.value)); break; case 44: - x(e(this.constantPool.strings[t.index])); + w(l(this.constantPool.strings[x.index])); break; case 45: - x(e(this.constantPool.ints[t.index])); + w(l(this.constantPool.ints[x.index])); break; case 46: - x(e(this.constantPool.uints[t.index])); + w(l(this.constantPool.uints[x.index])); break; case 47: - x(e(this.constantPool.doubles[t.index])); + w(l(this.constantPool.doubles[x.index])); break; case 41: - l(); + h(); break; case 42: - J = r(l()); - x(J); - x(J); + y = q(h()); + w(y); + w(y); break; case 43: - z.stack.push(l(), l()); + r.stack.push(h(), h()); break; case 239: ; @@ -18767,16 +18903,16 @@ Shumway.AVM2.XRegExp.install(); this.setJumpStop(); break; case 12: - this.setIfStops(this.negatedTruthyCondition(X.LT)); + this.setIfStops(this.negatedTruthyCondition(N.LT)); break; case 15: - this.setIfStops(this.negatedTruthyCondition(X.GE)); + this.setIfStops(this.negatedTruthyCondition(N.GE)); break; case 14: - this.setIfStops(this.negatedTruthyCondition(X.GT)); + this.setIfStops(this.negatedTruthyCondition(N.GT)); break; case 13: - this.setIfStops(this.negatedTruthyCondition(X.LE)); + this.setIfStops(this.negatedTruthyCondition(N.LE)); break; case 24: ; @@ -18797,16 +18933,16 @@ Shumway.AVM2.XRegExp.install(); case 25: ; case 26: - this.setIfStops(this.truthyCondition(m(G))); + this.setIfStops(this.truthyCondition(c(C))); break; case 27: - this.setSwitchStops(l()); + this.setSwitchStops(h()); break; case 160: - C = l(); - J = l(); - E = u(J, C) ? X.ADD : c.AVM2.Runtime.useAsAdd ? X.AS_ADD : X.ADD; - x(k(E, J, C)); + J = h(); + y = h(); + z = u(y, J) ? N.ADD : d.AVM2.Runtime.useAsAdd ? N.AS_ADD : N.ADD; + w(m(z, y, J)); break; case 161: ; @@ -18845,7 +18981,7 @@ Shumway.AVM2.XRegExp.install(); case 150: ; case 151: - this.pushExpression(m(G)); + this.pushExpression(c(C)); break; case 196: ; @@ -18854,7 +18990,7 @@ Shumway.AVM2.XRegExp.install(); case 198: ; case 199: - this.pushExpression(m(G), !0); + this.pushExpression(c(C), !0); break; case 145: ; @@ -18863,9 +18999,9 @@ Shumway.AVM2.XRegExp.install(); case 147: ; case 193: - x(e(1)); - 145 === G || 147 === G ? x(b(l())) : x(f(l())); - 145 === G || 192 === G ? this.pushExpression(X.ADD) : this.pushExpression(X.SUB); + w(l(1)); + 145 === C || 147 === C ? w(b(h())) : w(g(h())); + 145 === C || 192 === C ? this.pushExpression(N.ADD) : this.pushExpression(N.SUB); break; case 146: ; @@ -18874,408 +19010,401 @@ Shumway.AVM2.XRegExp.install(); case 148: ; case 195: - x(e(1)); - 146 === G || 148 === G ? x(b(s[t.index])) : x(f(s[t.index])); - 146 === G || 194 === G ? this.pushExpression(X.ADD) : this.pushExpression(X.SUB); - this.popLocal(t.index); + w(l(1)); + 146 === C || 148 === C ? w(b(t[x.index])) : w(g(t[x.index])); + 146 === C || 194 === C ? this.pushExpression(N.ADD) : this.pushExpression(N.SUB); + this.popLocal(x.index); break; case 177: - C = l(); - J = l(); - x(this.call(this.getJSProperty(C, "isInstanceOf"), null, [J])); + J = h(); + y = h(); + w(this.call(this.getJSProperty(J, "isInstanceOf"), null, [y])); break; case 178: - J = l(); - E = this.popMultiname(); - C = this.getProperty(this.findProperty(E, !1), E); - x(this.call(q("asIsType"), null, [C, J])); + y = h(); + z = this.popMultiname(); + J = this.getProperty(this.findProperty(z, !1), z); + w(this.call(p("asIsType"), null, [J, y])); break; case 179: - C = l(); - J = l(); - x(this.call(q("asIsType"), null, [C, J])); + J = h(); + y = h(); + w(this.call(p("asIsType"), null, [J, y])); break; case 180: - C = l(); - J = l(); - E = new a.IR.ASMultiname(O, J, e(0)); - x(this.store(new a.IR.ASHasProperty(D, z.store, C, E))); + J = h(); + y = h(); + z = new a.IR.ASMultiname(T, y, l(0)); + w(this.store(new a.IR.ASHasProperty(B, r.store, J, z))); break; case 149: - x(this.call(q("asTypeOf"), null, [l()])); + w(this.call(p("asTypeOf"), null, [h()])); break; case 8: - x(O); - this.popLocal(t.index); + w(T); + this.popLocal(x.index); break; case 83: - J = n(t.argCount); - C = l(); - E = q("applyType"); - x(this.call(E, null, [this.methodInfoConstant, C, new ja(D, J)])); + y = s(x.argCount); + J = h(); + z = p("applyType"); + w(this.call(z, null, [this.methodInfoConstant, J, new fa(B, y)])); break; case 86: - J = n(t.argCount); - x(new ja(D, J)); + y = s(x.argCount); + w(new fa(B, y)); break; case 85: - C = []; - for (E = 0;E < t.argCount;E++) { - J = l(); - var Q = l(); - H(T(Q) && c.isString(Q.value)); - Q = e(y.getPublicQualifiedName(Q.value)); - C.push(new ia(Q, J)); + J = []; + for (z = 0;z < x.argCount;z++) { + y = h(); + var da = h(), da = l(F.getPublicQualifiedName(da.value)); + J.push(new ia(da, y)); } - x(new aa(D, C)); + w(new X(B, J)); break; case 87: - x(new a.IR.ASNewActivation(e(this.methodInfo))); + w(new a.IR.ASNewActivation(l(this.methodInfo))); break; case 88: - E = q("createClass"); - x(this.call(E, null, [e(this.abc.classes[t.index]), l(), this.topScope()])); + z = p("createClass"); + w(this.call(z, null, [l(this.abc.classes[x.index]), h(), this.topScope()])); break; default: - L(String(t)); + M(String(x)); } - 239 !== G && 241 !== G && 240 !== G && this.traceBuilder && da.writeLn(("state: " + z.toString()).padRight(" ", 100) + " : " + F + ", " + t.toString(this.abc)); + 239 !== C && 241 !== C && 240 !== C && this.traceBuilder && ca.writeLn(("state: " + r.toString()).padRight(" ", 100) + " : " + G + ", " + x.toString(this.abc)); } - this.traceBuilder && da.leave(("< state: " + z.toString()).padRight(" ", 100)); + this.traceBuilder && ca.leave(("< state: " + r.toString()).padRight(" ", 100)); }; - return l; - }(), qa = function() { - function b(a, d, g) { - H(a && a.abc && d); + return x; + }(), na = function() { + function b(a, e, f) { this.abc = a.abc; - this.methodInfoConstant = new Y(a); - this.scope = d; + this.methodInfoConstant = new w(a); + this.scope = e; this.methodInfo = a; - this.hasDynamicScope = g; - this.traceBuilder = 3 < c.AVM2.Compiler.traceLevel.value; - this.createFunctionCallee = q("createFunction"); + this.hasDynamicScope = f; + this.traceBuilder = 3 < d.AVM2.Compiler.traceLevel.value; + this.createFunctionCallee = p("createFunction"); this.stopPoints = []; this.bytecodes = this.methodInfo.analysis.bytecodes; } b.prototype.buildStart = function(b) { - var d = this.methodInfo, g = b.entryState = new la(0); - g.local.push(new $(b)); - for (var f = this.hasDynamicScope ? 1 : 0, k = d.parameters.length, c = 0;c < k;c++) { - g.local.push(new ga(b, f + c, d.parameters[c].name)); + var e = this.methodInfo, f = b.entryState = new ea(0); + f.local.push(new S(b)); + for (var c = this.hasDynamicScope ? 1 : 0, g = e.parameters.length, n = 0;n < g;n++) { + f.local.push(new Z(b, c + n, e.parameters[n].name)); } - for (c = k;c < d.localCount;c++) { - g.local.push(O); + for (n = g;n < e.localCount;n++) { + f.local.push(T); } - g.store = new W(b, 3); - b.scope = this.hasDynamicScope ? new ga(b, 0, F.SAVED_SCOPE_NAME) : new Y(this.scope); - g.saved = new W(b, 4); - c = new a.IR.Arguments(b); - if (d.needsRest() || d.needsArguments()) { - var r = e(f + (d.needsRest() ? k : 0)); - g.local[k + 1] = new R(b, g.store, q("sliceArguments"), null, [c, r], 4); + f.store = new V(b, 3); + b.scope = this.hasDynamicScope ? new Z(b, 0, y.SAVED_SCOPE_NAME) : new w(this.scope); + f.saved = new V(b, 4); + n = new a.IR.Arguments(b); + if (e.needsRest() || e.needsArguments()) { + var q = l(c + (e.needsRest() ? g : 0)); + f.local[g + 1] = new U(b, f.store, p("sliceArguments"), null, [n, q], 4); } - r = t(g, c, "length"); - for (c = 0;c < k;c++) { - var m = d.parameters[c], w = c + 1, l = g.local[w]; + q = h(f, n, "length"); + for (n = 0;n < g;n++) { + var m = e.parameters[n], d = n + 1, s = f.local[d]; if (void 0 !== m.value) { - var n; - n = new a.IR.Binary(X.LT, r, e(f + c + 1)); - l = new a.IR.Latch(null, n, e(m.value), l); + var x; + x = new a.IR.Binary(N.LT, q, l(c + n + 1)); + s = new a.IR.Latch(null, x, l(m.value), s); } - m.type && !m.type.isAnyName() && (m = K(m.type)) && (l = m(l)); - g.local[w] = l; + m.type && !m.type.isAnyName() && (m = ka[F.getQualifiedName(m.type)]) && (s = m(s)); + f.local[d] = s; } return b; }; b.prototype.buildGraph = function() { - for (var b = this.methodInfo.analysis.blocks, d = this.traceBuilder, g = 0;g < b.length;g++) { - b[g].bdo = g, b[g].region = null; + for (var b = this.methodInfo.analysis.blocks, e = this.traceBuilder, f = 0;f < b.length;f++) { + b[f].bdo = f, b[f].region = null; } - var e = new c.SortedList(function(b, a) { + var c = new d.SortedList(function(b, a) { return b.block.bdo - a.block.bdo; - }), g = new Z; - this.buildStart(g); - for (e.push({region:g, block:b[0]});b = e.pop();) { + }), f = new C; + this.buildStart(f); + for (c.push({region:f, block:b[0]});b = c.pop();) { this.buildBlock(b.region, b.block, b.region.entryState.clone()).forEach(function(b) { - var g = b.target, f = g.region; - if (f) { - d && da.enter("Merging into region: " + f + " @ " + g.position + ", block " + g.bid + " {"), d && da.writeLn(" R " + f.entryState), d && da.writeLn("+ I " + b.state), f.entryState.merge(f, b.state), f.predecessors.push(b.control), d && da.writeLn(" = " + f.entryState), d && da.leave("}"); + var f = b.target, g = f.region; + if (g) { + e && ca.enter("Merging into region: " + g + " @ " + f.position + ", block " + f.bid + " {"), e && ca.writeLn(" R " + g.entryState), e && ca.writeLn("+ I " + b.state), g.entryState.merge(g, b.state), g.predecessors.push(b.control), e && ca.writeLn(" = " + g.entryState), e && ca.leave("}"); } else { - var f = g.region = new Q(b.control), k = null; - g.loop && (k = a.enableDirtyLocals.value && g.loop.getDirtyLocals(), d && da.writeLn("Adding PHIs to loop region. " + k)); - f.entryState = g.loop ? b.state.makeLoopPhis(f, k) : b.state.clone(g.position); - d && da.writeLn("Adding new region: " + f + " @ " + g.position + " to worklist."); - e.push({region:f, block:g}); + var g = f.region = new I(b.control), n = null; + f.loop && (n = a.enableDirtyLocals.value && f.loop.getDirtyLocals(), e && ca.writeLn("Adding PHIs to loop region. " + n)); + g.entryState = f.loop ? b.state.makeLoopPhis(g, n) : b.state.clone(f.position); + e && ca.writeLn("Adding new region: " + g + " @ " + f.position + " to worklist."); + c.push({region:g, block:f}); } - }), d && da.enter("Worklist: {"), e.forEach(function(b) { - d && da.writeLn(b.region + " " + b.block.bdo + " " + b.region.entryState); - }), d && da.leave("}"); + }), e && ca.enter("Worklist: {"), c.forEach(function(b) { + e && ca.writeLn(b.region + " " + b.block.bdo + " " + b.region.entryState); + }), e && ca.leave("}"); } - d && da.writeLn("Done"); + e && ca.writeLn("Done"); if (1 < this.stopPoints.length) { - var f = new Q(null), k = new U(f, null), r = new U(f, null); + var g = new I(null), n = new ba(g, null), q = new ba(g, null); this.stopPoints.forEach(function(b) { - f.predecessors.push(b.region); - k.pushValue(b.value); - r.pushValue(b.store); + g.predecessors.push(b.region); + n.pushValue(b.value); + q.pushValue(b.store); }); - b = new ba(f, r, k); + b = new R(g, q, n); } else { - b = new ba(this.stopPoints[0].region, this.stopPoints[0].store, this.stopPoints[0].value); + b = new R(this.stopPoints[0].region, this.stopPoints[0].store, this.stopPoints[0].value); } return new a.IR.DFG(b); }; - b.prototype.buildBlock = function(b, a, d) { - H(b && a && d); - d.optimize(); - var g = a.verifierEntryState; - if (g) { - this.traceBuilder && da.writeLn("Type State: " + g); - for (var e = 0;e < g.local.length;e++) { - var f = g.local[e], k = d.local[e]; - k.ty || (k.ty = f); + b.prototype.buildBlock = function(b, a, e) { + e.optimize(); + var f = a.verifierEntryState; + if (f) { + this.traceBuilder && ca.writeLn("Type State: " + f); + for (var c = 0;c < f.local.length;c++) { + var g = f.local[c], n = e.local[c]; + n.ty || (n.ty = g); } } - a = new wa(this, b, a, d); + a = new ma(this, b, a, e); a.build(); - g = a.stops; - g || (g = [], a.bc.position + 1 <= this.bytecodes.length && g.push({control:b, target:this.bytecodes[a.bc.position + 1], state:d})); - return g; + f = a.stops; + f || (f = [], a.bc.position + 1 <= this.bytecodes.length && f.push({control:b, target:this.bytecodes[a.bc.position + 1], state:e})); + return f; }; - b.buildMethod = function(a, d, g, e) { - H(g); - H(d.analysis); - H(!d.hasExceptions()); - h.countTimeline("Compiler: Compiled Methods"); - h.enterTimeline("Compiler"); - h.enterTimeline("Mark Loops"); - d.analysis.markLoops(); - h.leaveTimeline(); - c.AVM2.Verifier.enabled.value && (h.enterTimeline("Verify"), a.verifyMethod(d, g), h.leaveTimeline()); - a = 0 < c.AVM2.Compiler.traceLevel.value; - var f = 1 < c.AVM2.Compiler.traceLevel.value, k = 2 < c.AVM2.Compiler.traceLevel.value; + b.buildMethod = function(a, e, f, c) { + k.countTimeline("Compiler: Compiled Methods"); + k.enterTimeline("Compiler"); + k.enterTimeline("Mark Loops"); + e.analysis.markLoops(); + k.leaveTimeline(); + d.AVM2.Verifier.enabled.value && (k.enterTimeline("Verify"), a.verifyMethod(e, f), k.leaveTimeline()); + a = 0 < d.AVM2.Compiler.traceLevel.value; + var g = 1 < d.AVM2.Compiler.traceLevel.value, n = 2 < d.AVM2.Compiler.traceLevel.value; if (a) { - var r = window.performance.now() + var q = window.performance.now() } - h.enterTimeline("Build IR"); + k.enterTimeline("Build IR"); G.startNumbering(); - g = (new b(d, g, e)).buildGraph(); - h.leaveTimeline(); - k && g.trace(da); - h.enterTimeline("Build CFG"); - g = g.buildCFG(); - h.leaveTimeline(); - h.enterTimeline("Optimize Phis"); - g.optimizePhis(); - h.leaveTimeline(); - h.enterTimeline("Schedule Nodes"); - g.scheduleEarly(); - h.leaveTimeline(); - k && g.trace(da); - h.enterTimeline("Verify IR"); - g.verify(); - h.leaveTimeline(); - h.enterTimeline("Allocate Variables"); - g.allocateVariables(); - h.leaveTimeline(); - h.enterTimeline("Generate Source"); - k = c.AVM2.Compiler.Backend.generate(g); - h.leaveTimeline(); - f && da.writeLn(k.body); + f = (new b(e, f, c)).buildGraph(); + k.leaveTimeline(); + n && f.trace(ca); + k.enterTimeline("Build CFG"); + f = f.buildCFG(); + k.leaveTimeline(); + k.enterTimeline("Optimize Phis"); + f.optimizePhis(); + k.leaveTimeline(); + k.enterTimeline("Schedule Nodes"); + f.scheduleEarly(); + k.leaveTimeline(); + n && f.trace(ca); + k.enterTimeline("Verify IR"); + f.verify(); + k.leaveTimeline(); + k.enterTimeline("Allocate Variables"); + f.allocateVariables(); + k.leaveTimeline(); + k.enterTimeline("Generate Source"); + n = d.AVM2.Compiler.Backend.generate(f); + k.leaveTimeline(); + g && ca.writeLn(n.body); G.stopNumbering(); - h.leaveTimeline(); - a && da.writeLn("Compiled " + (d.name ? "function " + d.name : "anonymous function") + " in " + (window.performance.now() - r).toPrecision(2) + "ms"); - return k; + k.leaveTimeline(); + a && ca.writeLn("Compiled " + (e.name ? "function " + e.name : "anonymous function") + " in " + (window.performance.now() - q).toPrecision(2) + "ms"); + return n; }; return b; - }(), ya = new c.AVM2.Verifier.Verifier; - a.compileMethod = function(b, a, d) { - return qa.buildMethod(ya, b, a, d); + }(), sa = new d.AVM2.Verifier.Verifier; + a.compileMethod = function(b, a, e) { + return na.buildMethod(sa, b, a, e); }; - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function h(a, b) { - var g = new m(null, a), f = a.abc.applicationDomain, k = []; - v(a.init, b, g, k, !1); - a.traits.forEach(function(a) { - if (a.isClass()) { - for (var d = [], c = a.classInfo;c;) { - if (d.unshift(c), c.instanceInfo.superName) { - c = f.findClassInfo(c.instanceInfo.superName); + function r(b, a) { + var f = new h(null, b), g = b.abc.applicationDomain, m = []; + k(b.init, a, f, m, !1); + b.traits.forEach(function(b) { + if (b.isClass()) { + for (var d = [], l = b.classInfo;l;) { + if (d.unshift(l), l.instanceInfo.superName) { + l = g.findClassInfo(l.instanceInfo.superName); } else { break; } } - var l = g; + var p = f; d.forEach(function(b) { - l = new m(l, b); + p = new h(p, b); }); - e(a.classInfo, b, l, k); + c(b.classInfo, a, p, m); } else { - (a.isMethod() || a.isGetter() || a.isSetter()) && u(a, b, g, k); + (b.isMethod() || b.isGetter() || b.isSetter()) && t(b, a, f, m); } }); - k.forEach(function(a) { - v(a.methodInfo, b, a.scope, null, !0); + m.forEach(function(b) { + k(b.methodInfo, a, b.scope, null, !0); }); } - function v(a, b, g, e, k) { - if (t(a)) { - q(a); + function k(b, a, c, g, h) { + if (p(b)) { + s(b); try { f = !1; - var c = n(a, g, k, !1, !1); - b.enter(a.index + ": "); - f ? b.writeLn("undefined") : b.writeLns(c.toSource()); - b.leave(","); - e && p(a, b, g, e); - } catch (m) { - b.writeLn("// " + m); + var d = m(b, c, h, !1, !1); + a.enter(b.index + ": "); + f ? a.writeLn("undefined") : a.writeLns(d.toSource()); + a.leave(","); + g && u(b, a, c, g); + } catch (l) { + a.writeLn("// " + l); } } else { - b.writeLn("// Can't compile method: " + a.index); + a.writeLn("// Can't compile method: " + b.index); } } - function p(a, b, g, e) { - for (var f = a.analysis.bytecodes, k = a.abc.methods, c = 0;c < f.length;c++) { - var l = f[c]; + function u(b, a, f, c) { + for (var g = b.analysis.bytecodes, m = b.abc.methods, d = 0;d < g.length;d++) { + var l = g[d]; if (64 === l.op) { - l = k[l.index]; - q(l); - var n = new m(g, a); - e.push({scope:n, methodInfo:l}); - p(l, b, n, e); + l = m[l.index]; + s(l); + var p = new h(f, b); + c.push({scope:p, methodInfo:l}); + u(l, a, p, c); } } } - function u(a, b, g, e) { - (a.isMethod() || a.isGetter() || a.isSetter()) && a.methodInfo.hasBody && (b.writeLn("// " + a), v(a.methodInfo, b, g, e, !1)); + function t(b, a, f, c) { + (b.isMethod() || b.isGetter() || b.isSetter()) && b.methodInfo.hasBody && (a.writeLn("// " + b), k(b.methodInfo, a, f, c, !1)); } - function l(a, b, g, e) { - a.forEach(function(a) { - u(a, b, g, e); + function l(b, a, f, c) { + b.forEach(function(b) { + t(b, a, f, c); }); } - function e(a, b, g, e) { - v(a.init, b, g, e, !1); - l(a.traits, b, g, e); - v(a.instanceInfo.init, b, g, e, !1); - l(a.instanceInfo.traits, b, g, e); + function c(b, a, f, c) { + k(b.init, a, f, c, !1); + l(b.traits, a, f, c); + k(b.instanceInfo.init, a, f, c, !1); + l(b.instanceInfo.traits, a, f, c); } - var m = c.AVM2.Runtime.Scope, t = c.AVM2.Runtime.canCompile, q = c.AVM2.Runtime.ensureFunctionIsInitialized, n = c.AVM2.Runtime.createCompiledFunction, k = c.AVM2.Runtime.LazyInitializer, f = !1; - jsGlobal.objectConstantName = function(a) { - if (a.hash) { - return "$(" + a.hash + ")"; + var h = d.AVM2.Runtime.Scope, p = d.AVM2.Runtime.canCompile, s = d.AVM2.Runtime.ensureFunctionIsInitialized, m = d.AVM2.Runtime.createCompiledFunction, g = d.AVM2.Runtime.LazyInitializer, f = !1; + jsGlobal.objectConstantName = function(b) { + if (b.hash) { + return "$(" + b.hash + ")"; } - if (a instanceof k) { - return a.getName(); + if (b instanceof g) { + return b.getName(); } f = !0; }; - a.compileAbc = function(a, b) { - b.enter("{"); - b.enter("methods: {"); - for (var g = 0;g < a.scripts.length;g++) { - h(a.scripts[g], b); + a.compileAbc = function(b, a) { + a.enter("{"); + a.enter("methods: {"); + for (var f = 0;f < b.scripts.length;f++) { + r(b.scripts[f], a); } - b.leave("}"); - b.leave("}"); + a.leave("}"); + a.leave("}"); }; - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - function h(b) { - var a = b.length, d = [], g; - for (g = 0;g < a;++g) { - d[g] = b.charAt(g); + function k(b) { + var a = b.length, e = [], f; + for (f = 0;f < a;++f) { + e[f] = b.charAt(f); } - return d; + return e; } - function p(b) { + function u(b) { if (null === b) { return "null"; } if ("string" === typeof b) { - var a, d, g, f, k = 0, c = 0, n = b; - a = m[n]; + var a, e, f, g, q = 0, m = 0, d = b; + a = h[d]; if (!a) { - 1024 === e && (m = Object.create(null), e = 0); + 1024 === c && (h = Object.create(null), c = 0); a = ""; - "undefined" === typeof b[0] && (b = h(b)); - d = 0; - for (g = b.length;d < g;++d) { - f = b[d]; - if ("'" === f) { - ++k; + "undefined" === typeof b[0] && (b = k(b)); + e = 0; + for (f = b.length;e < f;++e) { + g = b[e]; + if ("'" === g) { + ++q; } else { - if ('"' === f) { - ++c; + if ('"' === g) { + ++m; } else { - if (0 <= "\\\n\r\u2028\u2029".indexOf(f)) { - var s = "\\"; - switch(f) { + if (0 <= "\\\n\r\u2028\u2029".indexOf(g)) { + var r = "\\"; + switch(g) { case "\\": - s += "\\"; + r += "\\"; break; case "\n": - s += "n"; + r += "n"; break; case "\r": - s += "r"; + r += "r"; break; case "\u2028": - s += "u2028"; + r += "u2028"; break; case "\u2029": - s += "u2029"; + r += "u2029"; break; default: throw Error("Incorrectly classified character");; } - a += s; + a += r; continue; } else { - if (!(" " <= f && "~" >= f)) { - var s = b[d + 1], p = f.charCodeAt(0), u = p.toString(16), H = "\\"; - switch(f) { + if (!(" " <= g && "~" >= g)) { + var r = b[e + 1], u = g.charCodeAt(0), t = u.toString(16), E = "\\"; + switch(g) { case "\b": - H += "b"; + E += "b"; break; case "\f": - H += "f"; + E += "f"; break; case "\t": - H += "t"; + E += "t"; break; default: - H = 255 < p ? H + ("u" + "0000".slice(u.length) + u) : "\x00" === f && 0 > "0123456789".indexOf(s) ? H + "0" : "\x0B" === f ? H + "x0B" : H + ("x" + "00".slice(u.length) + u); + E = 255 < u ? E + ("u" + "0000".slice(t.length) + t) : "\x00" === g && 0 > "0123456789".indexOf(r) ? E + "0" : "\x0B" === g ? E + "x0B" : E + ("x" + "00".slice(t.length) + t); } - a += H; + a += E; continue; } } } } - a += f; + a += g; } b = a; a = '"'; - "undefined" === typeof b[0] && (b = h(b)); - d = 0; - for (g = b.length;d < g;++d) { - f = b[d], '"' === f && (a += "\\"), a += f; + "undefined" === typeof b[0] && (b = k(b)); + e = 0; + for (f = b.length;e < f;++e) { + g = b[e], '"' === g && (a += "\\"), a += g; } a += '"'; - m[n] = a; - e++; + h[d] = a; + c++; } return a; } @@ -19286,7 +19415,7 @@ Shumway.AVM2.XRegExp.install(); if (0 > b || 0 === b && 0 > 1 / b) { throw Error("Numeric literal whose value is negative"); } - b === 1 / 0 ? b = "1e+400" : (d = q[b], d || (1024 === t && (q = Object.create(null), t = 0), d = "" + b, q[b] = d, t++), b = d); + b === 1 / 0 ? b = "1e+400" : (e = s[b], e || (1024 === p && (s = Object.create(null), p = 0), e = "" + b, s[b] = e, p++), b = e); return b; } if ("boolean" === typeof b) { @@ -19294,13 +19423,13 @@ Shumway.AVM2.XRegExp.install(); } l(b); } - function u(b, a, d) { - for (var g = "", e = 0;e < b.length;e++) { - g += b[e].toSource(a), d && e < b.length - 1 && (g += d); + function t(b, a, e) { + for (var f = "", c = 0;c < b.length;c++) { + f += b[c].toSource(a), e && c < b.length - 1 && (f += e); } - return g; + return f; } - var l = c.Debug.assertUnreachable, e = 0, m = Object.create(null), t = 0, q = Object.create(null), n = {"||":3, "&&":4, "|":5, "^":6, "&":7, "==":8, "!=":8, "===":8, "!==":8, is:8, isnt:8, "<":9, ">":9, "<=":9, ">=":9, "in":9, "instanceof":9, "<<":10, ">>":10, ">>>":10, "+":11, "-":11, "*":12, "%":12, "/":12}, k = function() { + var l = d.Debug.assertUnreachable, c = 0, h = Object.create(null), p = 0, s = Object.create(null), m = {"||":3, "&&":4, "|":5, "^":6, "&":7, "==":8, "!=":8, "===":8, "!==":8, is:8, isnt:8, "<":9, ">":9, "<=":9, ">=":9, "in":9, "instanceof":9, "<<":10, ">>":10, ">>>":10, "+":11, "-":11, "*":12, "%":12, "/":12}, g = function() { function b() { this.type = "Node"; } @@ -19310,7 +19439,7 @@ Shumway.AVM2.XRegExp.install(); }; return b; }(); - a.Node = k; + a.Node = g; var f = function(b) { function a() { b.apply(this, arguments); @@ -19318,28 +19447,28 @@ Shumway.AVM2.XRegExp.install(); } __extends(a, b); return a; - }(k); + }(g); a.Statement = f; - var d = function(b) { + var b = function(b) { function a() { b.apply(this, arguments); this.type = "Expression"; } __extends(a, b); return a; - }(k); - a.Expression = d; - var b = function(b) { - function a(d) { + }(g); + a.Expression = b; + var e = function(b) { + function a(e) { b.call(this); - this.body = d; + this.body = e; this.type = "Program"; } __extends(a, b); return a; - }(k); - a.Program = b; - b = function(b) { + }(g); + a.Program = e; + e = function(b) { function a() { b.apply(this, arguments); this.type = "EmptyStatement"; @@ -19347,24 +19476,24 @@ Shumway.AVM2.XRegExp.install(); __extends(a, b); return a; }(f); - a.EmptyStatement = b; - b = function(b) { - function a(d) { + a.EmptyStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.body = d; + this.body = e; this.type = "BlockStatement"; } __extends(a, b); a.prototype.toSource = function(b) { - return "{\n" + u(this.body, b) + "}"; + return "{\n" + t(this.body, b) + "}"; }; return a; }(f); - a.BlockStatement = b; - b = function(b) { - function a(d) { + a.BlockStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.expression = d; + this.expression = e; this.type = "ExpressionStatement"; } __extends(a, b); @@ -19373,13 +19502,13 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.ExpressionStatement = b; - b = function(b) { - function a(d, g, e) { + a.ExpressionStatement = e; + e = function(b) { + function a(e, f, c) { b.call(this); - this.test = d; - this.consequent = g; - this.alternate = e; + this.test = e; + this.consequent = f; + this.alternate = c; this.type = "IfStatement"; } __extends(a, b); @@ -19390,22 +19519,22 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.IfStatement = b; - b = function(b) { - function a(d, g) { + a.IfStatement = e; + e = function(b) { + function a(e, f) { b.call(this); - this.label = d; - this.body = g; + this.label = e; + this.body = f; this.type = "LabeledStatement"; } __extends(a, b); return a; }(f); - a.LabeledStatement = b; - b = function(b) { - function a(d) { + a.LabeledStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.label = d; + this.label = e; this.type = "BreakStatement"; } __extends(a, b); @@ -19416,11 +19545,11 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.BreakStatement = b; - b = function(b) { - function a(d) { + a.BreakStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.label = d; + this.label = e; this.type = "ContinueStatement"; } __extends(a, b); @@ -19431,37 +19560,37 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.ContinueStatement = b; - b = function(b) { - function a(d, g) { + a.ContinueStatement = e; + e = function(b) { + function a(e, f) { b.call(this); - this.object = d; - this.body = g; + this.object = e; + this.body = f; this.type = "WithStatement"; } __extends(a, b); return a; }(f); - a.WithStatement = b; - b = function(b) { - function a(d, g, e) { + a.WithStatement = e; + e = function(b) { + function a(e, f, c) { b.call(this); - this.discriminant = d; - this.cases = g; - this.lexical = e; + this.discriminant = e; + this.cases = f; + this.lexical = c; this.type = "SwitchStatement"; } __extends(a, b); a.prototype.toSource = function(b) { - return "switch(" + this.discriminant.toSource(0) + "){" + u(this.cases, 0, ";") + "};"; + return "switch(" + this.discriminant.toSource(0) + "){" + t(this.cases, 0, ";") + "};"; }; return a; }(f); - a.SwitchStatement = b; - b = function(b) { - function a(d) { + a.SwitchStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.argument = d; + this.argument = e; this.type = "ReturnStatement"; } __extends(a, b); @@ -19472,11 +19601,11 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.ReturnStatement = b; - b = function(b) { - function a(d) { + a.ReturnStatement = e; + e = function(b) { + function a(e) { b.call(this); - this.argument = d; + this.argument = e; this.type = "ThrowStatement"; } __extends(a, b); @@ -19485,25 +19614,25 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.ThrowStatement = b; - b = function(b) { - function a(d, g, e, f) { + a.ThrowStatement = e; + e = function(b) { + function a(e, f, c, g) { b.call(this); - this.block = d; - this.handlers = g; - this.guardedHandlers = e; - this.finalizer = f; + this.block = e; + this.handlers = f; + this.guardedHandlers = c; + this.finalizer = g; this.type = "TryStatement"; } __extends(a, b); return a; }(f); - a.TryStatement = b; - b = function(b) { - function a(d, g) { + a.TryStatement = e; + e = function(b) { + function a(e, f) { b.call(this); - this.test = d; - this.body = g; + this.test = e; + this.body = f; this.type = "WhileStatement"; } __extends(a, b); @@ -19512,45 +19641,45 @@ Shumway.AVM2.XRegExp.install(); }; return a; }(f); - a.WhileStatement = b; - b = function(b) { - function a(d, g) { + a.WhileStatement = e; + e = function(b) { + function a(e, f) { b.call(this); - this.body = d; - this.test = g; + this.body = e; + this.test = f; this.type = "DoWhileStatement"; } __extends(a, b); return a; }(f); - a.DoWhileStatement = b; - b = function(b) { - function a(d, g, e, f) { + a.DoWhileStatement = e; + e = function(b) { + function a(e, f, c, g) { b.call(this); - this.init = d; - this.test = g; - this.update = e; - this.body = f; + this.init = e; + this.test = f; + this.update = c; + this.body = g; this.type = "ForStatement"; } __extends(a, b); return a; }(f); - a.ForStatement = b; - b = function(b) { - function a(d, g, e, f) { + a.ForStatement = e; + e = function(b) { + function a(e, f, c, g) { b.call(this); - this.left = d; - this.right = g; - this.body = e; - this.each = f; + this.left = e; + this.right = f; + this.body = c; + this.each = g; this.type = "ForInStatement"; } __extends(a, b); return a; }(f); - a.ForInStatement = b; - b = function(b) { + a.ForInStatement = e; + e = function(b) { function a() { b.apply(this, arguments); this.type = "DebuggerStatement"; @@ -19558,7 +19687,7 @@ Shumway.AVM2.XRegExp.install(); __extends(a, b); return a; }(f); - a.DebuggerStatement = b; + a.DebuggerStatement = e; f = function(b) { function a() { b.apply(this, arguments); @@ -19568,41 +19697,41 @@ Shumway.AVM2.XRegExp.install(); return a; }(f); a.Declaration = f; - b = function(b) { - function a(d, g, e, f, k, c, m) { + e = function(b) { + function a(e, f, c, g, q, h, m) { b.call(this); - this.id = d; - this.params = g; - this.defaults = e; - this.rest = f; - this.body = k; - this.generator = c; + this.id = e; + this.params = f; + this.defaults = c; + this.rest = g; + this.body = q; + this.generator = h; this.expression = m; this.type = "FunctionDeclaration"; } __extends(a, b); return a; }(f); - a.FunctionDeclaration = b; + a.FunctionDeclaration = e; f = function(b) { - function a(d, g) { + function a(e, f) { b.call(this); - this.declarations = d; - this.kind = g; + this.declarations = e; + this.kind = f; this.type = "VariableDeclaration"; } __extends(a, b); a.prototype.toSource = function(b) { - return this.kind + " " + u(this.declarations, b, ",") + ";\n"; + return this.kind + " " + t(this.declarations, b, ",") + ";\n"; }; return a; }(f); a.VariableDeclaration = f; f = function(b) { - function a(d, g) { + function a(e, f) { b.call(this); - this.id = d; - this.init = g; + this.id = e; + this.init = f; this.type = "VariableDeclarator"; } __extends(a, b); @@ -19612,12 +19741,12 @@ Shumway.AVM2.XRegExp.install(); return b; }; return a; - }(k); + }(g); a.VariableDeclarator = f; f = function(b) { - function a(d) { + function a(e) { b.call(this); - this.name = d; + this.name = e; this.type = "Identifier"; } __extends(a, b); @@ -19625,21 +19754,21 @@ Shumway.AVM2.XRegExp.install(); return this.name; }; return a; - }(d); + }(b); a.Identifier = f; - var g = function(b) { - function a(d) { + var q = function(b) { + function a(e) { b.call(this); - this.value = d; + this.value = e; this.type = "Literal"; } __extends(a, b); a.prototype.toSource = function(b) { - return p(this.value); + return u(this.value); }; return a; - }(d); - a.Literal = g; + }(b); + a.Literal = q; f = function(b) { function a() { b.apply(this, arguments); @@ -19650,66 +19779,66 @@ Shumway.AVM2.XRegExp.install(); return "this"; }; return a; - }(d); + }(b); a.ThisExpression = f; f = function(b) { - function a(d) { + function a(e) { b.call(this); - this.elements = d; + this.elements = e; this.type = "ArrayExpression"; } __extends(a, b); a.prototype.toSource = function(b) { - return "[" + u(this.elements, 1, ",") + "]"; + return "[" + t(this.elements, 1, ",") + "]"; }; return a; - }(d); + }(b); a.ArrayExpression = f; f = function(b) { - function a(d) { + function a(e) { b.call(this); - this.properties = d; + this.properties = e; this.type = "ObjectExpression"; } __extends(a, b); a.prototype.toSource = function(b) { - return "{" + u(this.properties, 0, ",") + "}"; + return "{" + t(this.properties, 0, ",") + "}"; }; return a; - }(d); + }(b); a.ObjectExpression = f; f = function(b) { - function a(d, g, e, f, k, c, m) { + function a(e, f, c, g, q, h, m) { b.call(this); - this.id = d; - this.params = g; - this.defaults = e; - this.rest = f; - this.body = k; - this.generator = c; + this.id = e; + this.params = f; + this.defaults = c; + this.rest = g; + this.body = q; + this.generator = h; this.expression = m; this.type = "FunctionExpression"; } __extends(a, b); return a; - }(d); + }(b); a.FunctionExpression = f; f = function(b) { - function a(d) { + function a(e) { b.call(this); - this.expressions = d; + this.expressions = e; this.type = "SequenceExpression"; } __extends(a, b); return a; - }(d); + }(b); a.SequenceExpression = f; f = function(b) { - function a(d, g, e) { + function a(e, f, c) { b.call(this); - this.operator = d; - this.prefix = g; - this.argument = e; + this.operator = e; + this.prefix = f; + this.argument = c; this.type = "UnaryExpression"; } __extends(a, b); @@ -19718,30 +19847,30 @@ Shumway.AVM2.XRegExp.install(); return 13 < b ? "(" + a + ")" : a; }; return a; - }(d); + }(b); a.UnaryExpression = f; f = function(b) { - function a(d, g, e) { + function a(e, f, c) { b.call(this); - this.operator = d; - this.left = g; - this.right = e; + this.operator = e; + this.left = f; + this.right = c; this.type = "BinaryExpression"; } __extends(a, b); a.prototype.toSource = function(b) { - var a = n[this.operator], d = this.left.toSource(a) + this.operator + this.right.toSource(a + 1); - return a < b ? "(" + d + ")" : d; + var a = m[this.operator], e = this.left.toSource(a) + this.operator + this.right.toSource(a + 1); + return a < b ? "(" + e + ")" : e; }; return a; - }(d); + }(b); a.BinaryExpression = f; - b = function(b) { - function a(d, g, e) { + e = function(b) { + function a(e, f, c) { b.call(this); - this.operator = d; - this.left = g; - this.right = e; + this.operator = e; + this.left = f; + this.right = c; this.type = "AssignmentExpression"; } __extends(a, b); @@ -19750,23 +19879,23 @@ Shumway.AVM2.XRegExp.install(); return 1 < b ? "(" + a + ")" : a; }; return a; - }(d); - a.AssignmentExpression = b; - b = function(b) { - function a(d, g, e) { + }(b); + a.AssignmentExpression = e; + e = function(b) { + function a(e, f, c) { b.call(this); - this.operator = d; - this.argument = g; - this.prefix = e; + this.operator = e; + this.argument = f; + this.prefix = c; this.type = "UpdateExpression"; } __extends(a, b); return a; - }(d); - a.UpdateExpression = b; + }(b); + a.UpdateExpression = e; f = function(b) { - function a(d, g, e) { - b.call(this, d, g, e); + function a(e, f, c) { + b.call(this, e, f, c); this.type = "LogicalExpression"; } __extends(a, b); @@ -19774,11 +19903,11 @@ Shumway.AVM2.XRegExp.install(); }(f); a.LogicalExpression = f; f = function(b) { - function a(d, g, e) { + function a(e, f, c) { b.call(this); - this.test = d; - this.consequent = g; - this.alternate = e; + this.test = e; + this.consequent = f; + this.alternate = c; this.type = "ConditionalExpression"; } __extends(a, b); @@ -19786,60 +19915,60 @@ Shumway.AVM2.XRegExp.install(); return this.test.toSource(3) + "?" + this.consequent.toSource(1) + ":" + this.alternate.toSource(1); }; return a; - }(d); + }(b); a.ConditionalExpression = f; f = function(b) { - function a(d, g) { + function a(e, f) { b.call(this); - this.callee = d; + this.callee = e; this.type = "NewExpression"; - this.arguments = g; + this.arguments = f; } __extends(a, b); a.prototype.toSource = function(b) { - return "new " + this.callee.toSource(b) + "(" + u(this.arguments, b, ",") + ")"; + return "new " + this.callee.toSource(b) + "(" + t(this.arguments, b, ",") + ")"; }; return a; - }(d); + }(b); a.NewExpression = f; f = function(b) { - function a(d, g) { + function a(e, f) { b.call(this); - this.callee = d; + this.callee = e; this.type = "CallExpression"; - this.arguments = g; + this.arguments = f; } __extends(a, b); a.prototype.toSource = function(b) { - return this.callee.toSource(b) + "(" + u(this.arguments, b, ",") + ")"; + return this.callee.toSource(b) + "(" + t(this.arguments, b, ",") + ")"; }; return a; - }(d); + }(b); a.CallExpression = f; - d = function(b) { - function a(d, g, e) { + b = function(b) { + function a(e, f, c) { b.call(this); - this.object = d; - this.property = g; - this.computed = e; + this.object = e; + this.property = f; + this.computed = c; this.type = "MemberExpression"; } __extends(a, b); a.prototype.toSource = function(b) { var a = this.object.toSource(15); - this.object instanceof g && (a = "(" + a + ")"); - var d = this.property.toSource(0), a = this.computed ? a + ("[" + d + "]") : a + ("." + d); + this.object instanceof q && (a = "(" + a + ")"); + var e = this.property.toSource(0), a = this.computed ? a + ("[" + e + "]") : a + ("." + e); return 17 < b ? "(" + a + ")" : a; }; return a; - }(d); - a.MemberExpression = d; - d = function(b) { - function a(d, g, e) { + }(b); + a.MemberExpression = b; + b = function(b) { + function a(e, f, c) { b.call(this); - this.key = d; - this.value = g; - this.kind = e; + this.key = e; + this.value = f; + this.kind = c; this.type = "Property"; } __extends(a, b); @@ -19847,263 +19976,263 @@ Shumway.AVM2.XRegExp.install(); return this.key.toSource(b) + ":" + this.value.toSource(b); }; return a; - }(k); - a.Property = d; - d = function(b) { - function a(d, g) { + }(g); + a.Property = b; + b = function(b) { + function a(e, f) { b.call(this); - this.test = d; - this.consequent = g; + this.test = e; + this.consequent = f; this.type = "SwitchCase"; } __extends(a, b); a.prototype.toSource = function(b) { - return(this.test ? "case " + this.test.toSource(b) : "default") + ": " + u(this.consequent, b, ";"); + return(this.test ? "case " + this.test.toSource(b) : "default") + ": " + t(this.consequent, b, ";"); }; return a; - }(k); - a.SwitchCase = d; - k = function(b) { - function a(d, g, e) { + }(g); + a.SwitchCase = b; + g = function(b) { + function a(e, f, c) { b.call(this); - this.param = d; - this.guard = g; - this.body = e; + this.param = e; + this.guard = f; + this.body = c; this.type = "CatchClause"; } __extends(a, b); return a; - }(k); - a.CatchClause = k; + }(g); + a.CatchClause = g; })(a.AST || (a.AST = {})); - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - var c = function(a) { - function c(e, m, l) { + var d = function(a) { + function d(c, h, l) { a.call(this); - this.parent = e; - this.object = m; + this.parent = c; + this.object = h; this.isWith = l; } - __extends(c, a); - c.prototype.visitInputs = function(a) { + __extends(d, a); + d.prototype.visitInputs = function(a) { a(this.parent); a(this.object); }; - return c; + return d; }(a.Value); - a.ASScope = c; - c.prototype.nodeName = "ASScope"; - c = function(a) { - function c(e, m, l) { + a.ASScope = d; + d.prototype.nodeName = "ASScope"; + d = function(a) { + function d(c, h, l) { a.call(this); - this.namespaces = e; - this.name = m; + this.namespaces = c; + this.name = h; this.flags = l; } - __extends(c, a); - c.prototype.visitInputs = function(a) { + __extends(d, a); + d.prototype.visitInputs = function(a) { a(this.namespaces); a(this.name); a(this.flags); }; - return c; + return d; }(a.Value); - a.ASMultiname = c; - c.prototype.mustFloat = !0; - c.prototype.nodeName = "ASMultiname"; - c = function(a) { - function c(e, m, l, q, n, k, f) { - a.call(this, e, m, l, q, n, k); + a.ASMultiname = d; + d.prototype.mustFloat = !0; + d.prototype.nodeName = "ASMultiname"; + d = function(a) { + function d(c, h, l, s, m, g, f) { + a.call(this, c, h, l, s, m, g); this.isLex = f; } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.CallProperty); - a.ASCallProperty = c; - c.prototype.nodeName = "ASCallProperty"; - c = function(a) { - function c(e, m, l, q, n, k, f) { - a.call(this, e, m, l, q, n, k); + a.ASCallProperty = d; + d.prototype.nodeName = "ASCallProperty"; + d = function(a) { + function d(c, h, l, s, m, g, f) { + a.call(this, c, h, l, s, m, g); this.scope = f; } - __extends(c, a); - c.prototype.visitInputs = function(e) { - a.prototype.visitInputs.call(this, e); - e(this.scope); + __extends(d, a); + d.prototype.visitInputs = function(c) { + a.prototype.visitInputs.call(this, c); + c(this.scope); }; - return c; + return d; }(a.CallProperty); - a.ASCallSuper = c; - c.prototype.nodeName = "ASCallSuper"; - c = function(a) { - function c(e, m, l, q) { - a.call(this, e, m, l, q); + a.ASCallSuper = d; + d.prototype.nodeName = "ASCallSuper"; + d = function(a) { + function d(c, h, l, s) { + a.call(this, c, h, l, s); } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.New); - a.ASNew = c; - c.prototype.nodeName = "ASNew"; - c = function(a) { - function c(e, m, l, q, n) { - a.call(this, e, m, l, q); - this.flags = n; + a.ASNew = d; + d.prototype.nodeName = "ASNew"; + d = function(a) { + function d(c, h, l, s, m) { + a.call(this, c, h, l, s); + this.flags = m; } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.GetProperty); - a.ASGetProperty = c; - c.prototype.nodeName = "ASGetProperty"; - c = function(a) { - function c(e, m, l, q) { - a.call(this, e, m, l, q); + a.ASGetProperty = d; + d.prototype.nodeName = "ASGetProperty"; + d = function(a) { + function d(c, h, l, s) { + a.call(this, c, h, l, s); } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.GetProperty); - a.ASGetDescendants = c; - c.prototype.nodeName = "ASGetDescendants"; - c = function(a) { - function c(e, m, l, q) { - a.call(this, e, m, l, q); + a.ASGetDescendants = d; + d.prototype.nodeName = "ASGetDescendants"; + d = function(a) { + function d(c, h, l, s) { + a.call(this, c, h, l, s); } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.GetProperty); - a.ASHasProperty = c; - c.prototype.nodeName = "ASHasProperty"; - c = function(a) { - function c(e, m, l, q) { - a.call(this, e, m, l, q); + a.ASHasProperty = d; + d.prototype.nodeName = "ASHasProperty"; + d = function(a) { + function d(c, h, l, s) { + a.call(this, c, h, l, s); } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.GetProperty); - a.ASGetSlot = c; - c.prototype.nodeName = "ASGetSlot"; - c = function(a) { - function c(e, m, l, q, n) { - a.call(this, e, m, l, q); - this.scope = n; - } - __extends(c, a); - c.prototype.visitInputs = function(e) { - a.prototype.visitInputs.call(this, e); - e(this.scope); - }; - return c; - }(a.GetProperty); - a.ASGetSuper = c; - c.prototype.nodeName = "ASGetSuper"; - c = function(a) { - function c(e, m, l, q, n, k) { - a.call(this, e, m, l, q, n); - this.flags = k; - } - __extends(c, a); - return c; - }(a.SetProperty); - a.ASSetProperty = c; - c.prototype.nodeName = "ASSetProperty"; - c = function(a) { - function c(e, m, l, q, n) { - a.call(this, e, m, l, q, n); - } - __extends(c, a); - return c; - }(a.SetProperty); - a.ASSetSlot = c; - c.prototype.nodeName = "ASSetSlot"; - c = function(a) { - function c(e, m, l, q, n, k) { - a.call(this, e, m, l, q, n); - this.scope = k; - } - __extends(c, a); - c.prototype.visitInputs = function(e) { - a.prototype.visitInputs.call(this, e); - e(this.scope); - }; - return c; - }(a.SetProperty); - a.ASSetSuper = c; - c.prototype.nodeName = "ASSetSuper"; - c = function(a) { - function c(e, m, l, q) { - a.call(this, e, m, l, q); - } - __extends(c, a); - return c; - }(a.DeleteProperty); - a.ASDeleteProperty = c; - c.prototype.nodeName = "ASDeleteProperty"; - c = function(a) { - function c(e, m, l, q, n, k) { - a.call(this, e, m); - this.scope = l; - this.name = q; - this.methodInfo = n; - this.strict = k; - } - __extends(c, a); - c.prototype.visitInputs = function(e) { - a.prototype.visitInputs.call(this, e); - e(this.scope); - e(this.name); - }; - return c; - }(a.StoreDependent); - a.ASFindProperty = c; - c.prototype.nodeName = "ASFindProperty"; - c = function(a) { - function c(e, m) { - a.call(this); - this.control = e; + a.ASGetSlot = d; + d.prototype.nodeName = "ASGetSlot"; + d = function(a) { + function d(c, h, l, s, m) { + a.call(this, c, h, l, s); this.scope = m; } - __extends(c, a); - c.prototype.visitInputs = function(a) { + __extends(d, a); + d.prototype.visitInputs = function(c) { + a.prototype.visitInputs.call(this, c); + c(this.scope); + }; + return d; + }(a.GetProperty); + a.ASGetSuper = d; + d.prototype.nodeName = "ASGetSuper"; + d = function(a) { + function d(c, h, l, s, m, g) { + a.call(this, c, h, l, s, m); + this.flags = g; + } + __extends(d, a); + return d; + }(a.SetProperty); + a.ASSetProperty = d; + d.prototype.nodeName = "ASSetProperty"; + d = function(a) { + function d(c, h, l, s, m) { + a.call(this, c, h, l, s, m); + } + __extends(d, a); + return d; + }(a.SetProperty); + a.ASSetSlot = d; + d.prototype.nodeName = "ASSetSlot"; + d = function(a) { + function d(c, h, l, s, m, g) { + a.call(this, c, h, l, s, m); + this.scope = g; + } + __extends(d, a); + d.prototype.visitInputs = function(c) { + a.prototype.visitInputs.call(this, c); + c(this.scope); + }; + return d; + }(a.SetProperty); + a.ASSetSuper = d; + d.prototype.nodeName = "ASSetSuper"; + d = function(a) { + function d(c, h, l, s) { + a.call(this, c, h, l, s); + } + __extends(d, a); + return d; + }(a.DeleteProperty); + a.ASDeleteProperty = d; + d.prototype.nodeName = "ASDeleteProperty"; + d = function(a) { + function d(c, h, l, s, m, g) { + a.call(this, c, h); + this.scope = l; + this.name = s; + this.methodInfo = m; + this.strict = g; + } + __extends(d, a); + d.prototype.visitInputs = function(c) { + a.prototype.visitInputs.call(this, c); + c(this.scope); + c(this.name); + }; + return d; + }(a.StoreDependent); + a.ASFindProperty = d; + d.prototype.nodeName = "ASFindProperty"; + d = function(a) { + function d(c, h) { + a.call(this); + this.control = c; + this.scope = h; + } + __extends(d, a); + d.prototype.visitInputs = function(a) { this.control && a(this.control); a(this.scope); }; - return c; + return d; }(a.Value); - a.ASGlobal = c; - c.prototype.nodeName = "ASGlobal"; - c = function(a) { - function c(e) { + a.ASGlobal = d; + d.prototype.nodeName = "ASGlobal"; + d = function(a) { + function d(c) { a.call(this); - this.methodInfo = e; + this.methodInfo = c; } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.Value); - a.ASNewActivation = c; - c.prototype.nodeName = "ASNewActivation"; - var h = function(a) { - function c() { + a.ASNewActivation = d; + d.prototype.nodeName = "ASNewActivation"; + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - return c; + __extends(d, a); + return d; }(a.Value); - a.ASNewHasNext2 = h; - c.prototype.nodeName = "ASNewHasNext2"; + a.ASNewHasNext2 = k; + d.prototype.nodeName = "ASNewHasNext2"; })(a.IR || (a.IR = {})); - })(c.Compiler || (c.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.Compiler || (d.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - var v = c.ArrayUtilities.top, p = c.ArrayUtilities.peek, u = c.Debug.assert, l; + var v = d.ArrayUtilities.top, u = d.ArrayUtilities.peek, t; (function(a) { (function(b) { b[b.SEQ = 1] = "SEQ"; @@ -20119,36 +20248,36 @@ Shumway.AVM2.XRegExp.install(); b[b.TRY = 11] = "TRY"; b[b.CATCH = 12] = "CATCH"; })(a.Kind || (a.Kind = {})); - var e = function() { + var c = function() { return function(b) { this.kind = b; }; }(); - a.ControlNode = e; - var d = function(b) { - function a(d) { + a.ControlNode = c; + var f = function(b) { + function a(e) { b.call(this, 1); - this.body = d; + this.body = e; } __extends(a, b); a.prototype.trace = function(b) { - for (var a = this.body, d = 0, g = a.length;d < g;d++) { - a[d].trace(b); + for (var a = this.body, e = 0, f = a.length;e < f;e++) { + a[e].trace(b); } }; a.prototype.first = function() { return this.body[0]; }; - a.prototype.slice = function(b, d) { - return new a(this.body.slice(b, d)); + a.prototype.slice = function(b, f) { + return new a(this.body.slice(b, f)); }; return a; - }(e); - a.Seq = d; - d = function(b) { - function a(d) { + }(c); + a.Seq = f; + f = function(b) { + function a(e) { b.call(this, 2); - this.body = d; + this.body = e; } __extends(a, b); a.prototype.trace = function(b) { @@ -20157,16 +20286,16 @@ Shumway.AVM2.XRegExp.install(); b.leave("}"); }; return a; - }(e); - a.Loop = d; - d = function(b) { - function a(d, g, e, f) { + }(c); + a.Loop = f; + f = function(b) { + function a(e, f, c, g) { b.call(this, 3); - this.cond = d; - this.then = g; - this.nothingThrownLabel = f; + this.cond = e; + this.then = f; + this.nothingThrownLabel = g; this.negated = !1; - this.else = e; + this.else = c; } __extends(a, b); a.prototype.trace = function(b) { @@ -20179,13 +20308,13 @@ Shumway.AVM2.XRegExp.install(); this.nothingThrownLabel && b.leave("}"); }; return a; - }(e); - a.If = d; - d = function(b) { - function a(d, g) { + }(c); + a.If = f; + f = function(b) { + function a(e, f) { b.call(this, 4); - this.index = d; - this.body = g; + this.index = e; + this.body = f; } __extends(a, b); a.prototype.trace = function(b) { @@ -20195,34 +20324,34 @@ Shumway.AVM2.XRegExp.install(); b.outdent(); }; return a; - }(e); - a.Case = d; - d = function(b) { - function a(d, g, e) { + }(c); + a.Case = f; + f = function(b) { + function a(e, f, c) { b.call(this, 5); - this.determinant = d; - this.cases = g; - this.nothingThrownLabel = e; + this.determinant = e; + this.cases = f; + this.nothingThrownLabel = c; } __extends(a, b); a.prototype.trace = function(b) { this.nothingThrownLabel && b.enter("if (label is " + this.nothingThrownLabel + ") {"); this.determinant.trace(b); b.writeLn("switch {"); - for (var a = 0, d = this.cases.length;a < d;a++) { + for (var a = 0, e = this.cases.length;a < e;a++) { this.cases[a].trace(b); } b.writeLn("}"); this.nothingThrownLabel && b.leave("}"); }; return a; - }(e); - a.Switch = d; - d = function(b) { - function a(d, g) { + }(c); + a.Switch = f; + f = function(b) { + function a(e, f) { b.call(this, 6); - this.labels = d; - this.body = g; + this.labels = e; + this.body = f; } __extends(a, b); a.prototype.trace = function(b) { @@ -20231,45 +20360,45 @@ Shumway.AVM2.XRegExp.install(); b.leave("}"); }; return a; - }(e); - a.LabelCase = d; - d = function(b) { - function a(d) { + }(c); + a.LabelCase = f; + f = function(b) { + function a(e) { b.call(this, 7); - this.cases = d; - for (var g = {}, e = 0, f = d.length;e < f;e++) { - for (var k = d[e], c = 0, m = k.labels.length;c < m;c++) { - g[k.labels[c]] = k; + this.cases = e; + for (var f = {}, c = 0, g = e.length;c < g;c++) { + for (var h = e[c], d = 0, m = h.labels.length;d < m;d++) { + f[h.labels[d]] = h; } } - this.labelMap = g; + this.labelMap = f; } __extends(a, b); a.prototype.trace = function(b) { - for (var a = 0, d = this.cases.length;a < d;a++) { + for (var a = 0, e = this.cases.length;a < e;a++) { this.cases[a].trace(b); } }; return a; - }(e); - a.LabelSwitch = d; - d = function(b) { - function a(d) { + }(c); + a.LabelSwitch = f; + f = function(b) { + function a(e) { b.call(this, 8); - this.label = d; + this.label = e; } __extends(a, b); a.prototype.trace = function(b) { b.writeLn("label = " + this.label); }; return a; - }(e); - a.Exit = d; - d = function(b) { - function a(d, g) { + }(c); + a.Exit = f; + f = function(b) { + function a(e, f) { b.call(this, 9); - this.label = d; - this.head = g; + this.label = e; + this.head = f; } __extends(a, b); a.prototype.trace = function(b) { @@ -20277,13 +20406,13 @@ Shumway.AVM2.XRegExp.install(); b.writeLn("break"); }; return a; - }(e); - a.Break = d; - d = function(b) { - function a(d, g) { + }(c); + a.Break = f; + f = function(b) { + function a(e, f) { b.call(this, 10); - this.label = d; - this.head = g; + this.label = e; + this.head = f; this.necessary = !0; } __extends(a, b); @@ -20292,33 +20421,33 @@ Shumway.AVM2.XRegExp.install(); this.necessary && b.writeLn("continue"); }; return a; - }(e); - a.Continue = d; - d = function(b) { - function a(d, g) { + }(c); + a.Continue = f; + f = function(b) { + function a(e, f) { b.call(this, 11); - this.body = d; - this.catches = g; + this.body = e; + this.catches = f; } __extends(a, b); a.prototype.trace = function(b) { b.enter("try {"); this.body.trace(b); b.writeLn("label = " + this.nothingThrownLabel); - for (var a = 0, d = this.catches.length;a < d;a++) { + for (var a = 0, e = this.catches.length;a < e;a++) { this.catches[a].trace(b); } b.leave("}"); }; return a; - }(e); - a.Try = d; - e = function(b) { - function a(d, g, e) { + }(c); + a.Try = f; + c = function(b) { + function a(e, f, c) { b.call(this, 12); - this.varName = d; - this.typeName = g; - this.body = e; + this.varName = e; + this.typeName = f; + this.body = c; } __extends(a, b); a.prototype.trace = function(b) { @@ -20327,143 +20456,139 @@ Shumway.AVM2.XRegExp.install(); this.body.trace(b); }; return a; - }(e); - a.Catch = e; - })(l = a.Control || (a.Control = {})); - var e = c.BitSets.BITS_PER_WORD, m = c.BitSets.ADDRESS_BITS_PER_WORD, t = c.BitSets.BIT_INDEX_MASK, q = function(a) { - function f(d, b) { - a.call(this, d); + }(c); + a.Catch = c; + })(t = a.Control || (a.Control = {})); + var l = d.BitSets.BITS_PER_WORD, c = d.BitSets.ADDRESS_BITS_PER_WORD, h = d.BitSets.BIT_INDEX_MASK, p = function(a) { + function g(f, b) { + a.call(this, f); this.blockById = b; } - __extends(f, a); - f.prototype.forEachBlock = function(a) { - u(a); - for (var b = this.blockById, g = this.bits, f = 0, k = g.length;f < k;f++) { - var c = g[f]; - if (c) { - for (var m = 0;m < e;m++) { - c & 1 << m && a(b[f * e + m]); + __extends(g, a); + g.prototype.forEachBlock = function(a) { + for (var b = this.blockById, e = this.bits, c = 0, g = e.length;c < g;c++) { + var h = e[c]; + if (h) { + for (var d = 0;d < l;d++) { + h & 1 << d && a(b[c * l + d]); } } } }; - f.prototype.choose = function() { - for (var a = this.blockById, b = this.bits, g = 0, f = b.length;g < f;g++) { - var k = b[g]; - if (k) { - for (var c = 0;c < e;c++) { - if (k & 1 << c) { - return a[g * e + c]; + g.prototype.choose = function() { + for (var a = this.blockById, b = this.bits, e = 0, c = b.length;e < c;e++) { + var g = b[e]; + if (g) { + for (var h = 0;h < l;h++) { + if (g & 1 << h) { + return a[e * l + h]; } } } } }; - f.prototype.members = function() { - for (var a = this.blockById, b = [], g = this.bits, f = 0, k = g.length;f < k;f++) { - var c = g[f]; - if (c) { - for (var m = 0;m < e;m++) { - c & 1 << m && b.push(a[f * e + m]); + g.prototype.members = function() { + for (var a = this.blockById, b = [], e = this.bits, c = 0, g = e.length;c < g;c++) { + var h = e[c]; + if (h) { + for (var d = 0;d < l;d++) { + h & 1 << d && b.push(a[c * l + d]); } } } return b; }; - f.prototype.setBlocks = function(a) { - for (var b = this.bits, g = 0, e = a.length;g < e;g++) { - var f = a[g].id; - b[f >> m] |= 1 << (f & t); + g.prototype.setBlocks = function(a) { + for (var b = this.bits, e = 0, g = a.length;e < g;e++) { + var n = a[e].id; + b[n >> c] |= 1 << (n & h); } }; - return f; - }(c.BitSets.Uint32ArrayBitSet); - a.BlockSet = q; - var n = function() { - function a(e) { - this.makeBlockSetFactory(e.blocks.length, e.blocks); + return g; + }(d.BitSets.Uint32ArrayBitSet); + a.BlockSet = p; + var s = function() { + function a(c) { + this.makeBlockSetFactory(c.blocks.length, c.blocks); this.hasExceptions = !1; - this.normalizeReachableBlocks(e.root); + this.normalizeReachableBlocks(c.root); } - a.prototype.makeBlockSetFactory = function(a, d) { - u(!this.boundBlockSet); + a.prototype.makeBlockSetFactory = function(a, f) { this.boundBlockSet = function() { - return new q(a, d); + return new p(a, f); }; }; a.prototype.normalizeReachableBlocks = function(a) { - u(0 === a.predecessors.length); - var d = this.boundBlockSet, b = [], g = {}, e = {}, k = [a]; - for (e[a.id] = !0;a = v(k);) { - if (g[a.id]) { - 1 === g[a.id] && (g[a.id] = 2, b.push(a)), e[a.id] = !1, k.pop(); + var f = this.boundBlockSet, b = [], e = {}, c = {}, n = [a]; + for (c[a.id] = !0;a = v(n);) { + if (e[a.id]) { + 1 === e[a.id] && (e[a.id] = 2, b.push(a)), c[a.id] = !1, n.pop(); } else { - g[a.id] = 1; - e[a.id] = !0; - for (var c = a.successors, m = 0, l = c.length;m < l;m++) { - var n = c[m]; - e[n.id] && (a.spbacks || (a.spbacks = new d), a.spbacks.set(n.id)); - !g[n.id] && k.push(n); + e[a.id] = 1; + c[a.id] = !0; + for (var h = a.successors, d = 0, m = h.length;d < m;d++) { + var l = h[d]; + c[l.id] && (a.spbacks || (a.spbacks = new f), a.spbacks.set(l.id)); + !e[l.id] && n.push(l); } } } this.blocks = b.reverse(); }; a.prototype.computeDominance = function() { - var a = this.blocks, d = a.length, b = Array(d); + var a = this.blocks, f = a.length, b = Array(f); b[0] = 0; - for (var g = [], e = 0;e < d;e++) { - g[a[e].id] = e, a[e].dominatees = []; + for (var e = [], c = 0;c < f;c++) { + e[a[c].id] = c, a[c].dominatees = []; } - for (var k = !0;k;) { - for (k = !1, e = 1;e < d;e++) { - var c = a[e].predecessors, m = c.length, l = g[c[0].id]; - if (!(l in b)) { - for (var n = 1;n < m && !(l = g[c[n].id], l in b);n++) { + for (var n = !0;n;) { + for (n = !1, c = 1;c < f;c++) { + var h = a[c].predecessors, d = h.length, m = e[h[0].id]; + if (!(m in b)) { + for (var l = 1;l < d && !(m = e[h[l].id], m in b);l++) { } } - u(l in b); - for (n = 0;n < m;n++) { - var q = g[c[n].id]; - if (q !== l && q in b) { - for (;q !== l;) { - for (;q > l;) { - q = b[q]; + for (l = 0;l < d;l++) { + var p = e[h[l].id]; + if (p !== m && p in b) { + for (;p !== m;) { + for (;p > m;) { + p = b[p]; } - for (;l > q;) { - l = b[l]; + for (;m > p;) { + m = b[m]; } } - l = q; + m = p; } } - b[e] !== l && (b[e] = l, k = !0); + b[c] !== m && (b[c] = m, n = !0); } } a[0].dominator = a[0]; - for (e = 1;e < d;e++) { - g = a[e], n = a[b[e]], g.dominator = n, n.dominatees.push(g), g.npredecessors = g.predecessors.length; + for (c = 1;c < f;c++) { + e = a[c], l = a[b[c]], e.dominator = l, l.dominatees.push(e), e.npredecessors = e.predecessors.length; } - d = [a[0]]; - for (a[0].level || (a[0].level = 0);g = d.shift();) { - a = g.dominatees; - for (n = 0;n < a.length;n++) { - a[n].level = g.level + 1; + f = [a[0]]; + for (a[0].level || (a[0].level = 0);e = f.shift();) { + a = e.dominatees; + for (l = 0;l < a.length;l++) { + a[l].level = e.level + 1; } - d.push.apply(d, a); + f.push.apply(f, a); } }; a.prototype.computeFrontiers = function() { - for (var a = this.boundBlockSet, d = this.blocks, b = 0, g = d.length;b < g;b++) { - d[b].frontier = new a; + for (var a = this.boundBlockSet, f = this.blocks, b = 0, e = f.length;b < e;b++) { + f[b].frontier = new a; } b = 1; - for (g = d.length;b < g;b++) { - var a = d[b], e = a.predecessors; - if (2 <= e.length) { - for (var k = a.dominator, c = 0, m = e.length;c < m;c++) { - for (var l = e[c];l !== k;) { - l.frontier.set(a.id), l = l.dominator; + for (e = f.length;b < e;b++) { + var a = f[b], c = a.predecessors; + if (2 <= c.length) { + for (var n = a.dominator, h = 0, d = c.length;h < d;h++) { + for (var m = c[h];m !== n;) { + m.frontier.set(a.id), m = m.dominator; } } } @@ -20475,33 +20600,33 @@ Shumway.AVM2.XRegExp.install(); }; a.prototype.markLoops = function() { function a(b) { - var d = 1, g = {}, e = {}, f = [], k = [], c = [], m = b.level + 1; + var e = 1, f = {}, c = {}, g = [], n = [], h = [], q = b.level + 1; b = [b]; - for (var r, l;r = v(b);) { - if (g[r.id]) { - if (p(k) === r) { - k.pop(); - var w = []; + for (var d, m;d = v(b);) { + if (f[d.id]) { + if (u(n) === d) { + n.pop(); + var l = []; do { - l = f.pop(), e[l.id] = !0, w.push(l); - } while (l !== r); - (1 < w.length || l.spbacks && l.spbacks.get(l.id)) && c.push(w); + m = g.pop(), c[m.id] = !0, l.push(m); + } while (m !== d); + (1 < l.length || m.spbacks && m.spbacks.get(m.id)) && h.push(l); } b.pop(); } else { - g[r.id] = d++; - f.push(r); - k.push(r); - l = r.successors; - for (var w = 0, n = l.length;w < n;w++) { - if (r = l[w], !(r.level < m)) { - var q = r.id; - if (!g[q]) { - b.push(r); + f[d.id] = e++; + g.push(d); + n.push(d); + m = d.successors; + for (var l = 0, p = m.length;l < p;l++) { + if (d = m[l], !(d.level < q)) { + var s = d.id; + if (!f[s]) { + b.push(d); } else { - if (!e[q]) { - for (;g[p(k).id] > g[q];) { - k.pop(); + if (!c[s]) { + for (;f[u(n).id] > f[s];) { + n.pop(); } } } @@ -20509,14 +20634,14 @@ Shumway.AVM2.XRegExp.install(); } } } - return c; + return h; } - function d(a, d) { - var g = new b; - g.setBlocks(a); - g.recount(); - this.id = d; - this.body = g; + function f(a, e) { + var f = new b; + f.setBlocks(a); + f.recount(); + this.id = e; + this.body = f; this.exit = new b; this.save = {}; this.head = new b; @@ -20525,731 +20650,705 @@ Shumway.AVM2.XRegExp.install(); if (!this.analyzedControlFlow && !this.analyzeControlFlow()) { return!1; } - var b = this.boundBlockSet, g = function(a) { - for (var d = new b, g = 0, e = a.length;g < e;g++) { - var f = a[g], k = f.spbacks; - if (k) { - for (var f = f.successors, c = 0, m = f.length;c < m;c++) { - var r = f[c]; - k.get(r.id) && d.set(r.dominator.id); + var b = this.boundBlockSet, e = function(a) { + for (var e = new b, f = 0, c = a.length;f < c;f++) { + var g = a[f], n = g.spbacks; + if (n) { + for (var g = g.successors, h = 0, q = g.length;h < q;h++) { + var d = g[h]; + n.get(d.id) && e.set(d.dominator.id); } } } - return d.members(); + return e.members(); }(this.blocks); - if (0 >= g.length) { + if (0 >= e.length) { return this.markedLoops = !0; } - for (var g = g.sort(function(b, a) { + for (var e = e.sort(function(b, a) { return b.level - a.level; - }), e = 0, k = g.length - 1;0 <= k;k--) { - var c = g[k], m = a(c); - if (0 !== m.length) { - for (var l = 0, n = m.length;l < n;l++) { - for (var q = m[l], t = new d(q, e++), h = 0, s = q.length;h < s;h++) { - var u = q[h]; - if (u.level === c.level + 1 && !u.loop) { - u.loop = t; - t.head.set(u.id); - for (var H = u.predecessors, J = 0, C = H.length;J < C;J++) { - t.body.get(H[J].id) && u.npredecessors--; + }), c = 0, n = e.length - 1;0 <= n;n--) { + var h = e[n], d = a(h); + if (0 !== d.length) { + for (var m = 0, l = d.length;m < l;m++) { + for (var p = d[m], s = new f(p, c++), k = 0, r = p.length;k < r;k++) { + var t = p[k]; + if (t.level === h.level + 1 && !t.loop) { + t.loop = s; + s.head.set(t.id); + for (var B = t.predecessors, E = 0, y = B.length;E < y;E++) { + s.body.get(B[E].id) && t.npredecessors--; } - t.npredecessors += u.npredecessors; + s.npredecessors += t.npredecessors; } } - h = 0; - for (s = q.length;h < s;h++) { - u = q[h], u.level === c.level + 1 && (u.npredecessors = t.npredecessors); + k = 0; + for (r = p.length;k < r;k++) { + t = p[k], t.level === h.level + 1 && (t.npredecessors = s.npredecessors); } - t.head.recount(); + s.head.recount(); } } } return this.markedLoops = !0; }; a.prototype.induceControlTree = function() { - function a(b, d) { + function a(b, e) { b.recount(); if (0 === b.count) { return null; } - b.save = d; + b.save = e; return b; } - function d(k, c, m, n, q, t, h) { - for (var s = [];k;) { - if (1 < k.count) { - for (var p = new g, u = {}, H = [], J = k.members(), C = 0, E = J.length;C < E;C++) { - var F = J[C], I = F.id, G; - if (F.loop && k.contains(F.loop.head)) { - var Z = F.loop; - if (!Z.induced) { - for (var Q = Z.head.members(), S = 0, O = 0, P = Q.length;O < P;O++) { - S += k.save[Q[O].id]; + function f(n, h, d, m, l, p, s) { + for (var k = [];n;) { + if (1 < n.count) { + for (var r = new e, u = {}, B = [], E = n.members(), y = 0, z = E.length;y < z;y++) { + var G = E[y], C = G.id, I; + if (G.loop && n.contains(G.loop.head)) { + var P = G.loop; + if (!P.induced) { + for (var T = P.head.members(), O = 0, Q = 0, S = T.length;Q < S;Q++) { + O += n.save[T[Q].id]; } - if (0 < F.npredecessors - S) { - F.npredecessors -= k.save[I], F.save = k.save[I], G = d(F, p, u, n), H.push(new l.LabelCase([I], G)); + if (0 < G.npredecessors - O) { + G.npredecessors -= n.save[C], G.save = n.save[C], I = f(G, r, u, m), B.push(new t.LabelCase([C], I)); } else { - O = 0; - for (P = Q.length;O < P;O++) { - G = Q[O], G.npredecessors -= S, G.save = S; + Q = 0; + for (S = T.length;Q < S;Q++) { + I = T[Q], I.npredecessors -= O, I.save = O; } - G = d(F, p, u, n); - H.push(new l.LabelCase(Z.head.toArray(), G)); - Z.induced = !0; + I = f(G, r, u, m); + B.push(new t.LabelCase(P.head.toArray(), I)); + P.induced = !0; } } } else { - F.npredecessors -= k.save[I], F.save = k.save[I], G = d(F, p, u, n), H.push(new l.LabelCase([I], G)); + G.npredecessors -= n.save[C], G.save = n.save[C], I = f(G, r, u, m), B.push(new t.LabelCase([C], I)); } } - for (var F = [], O = 0, C = 0;C < H.length;C++) { - G = H[C]; - E = G.labels; - Q = P = 0; - for (Z = E.length;Q < Z;Q++) { - I = E[Q], p.get(I) && 0 < J[C].npredecessors - k.save[I] ? F.push(I) : E[P++] = I; + for (var G = [], Q = 0, y = 0;y < B.length;y++) { + I = B[y]; + z = I.labels; + T = S = 0; + for (P = z.length;T < P;T++) { + C = z[T], r.get(C) && 0 < E[y].npredecessors - n.save[C] ? G.push(C) : z[S++] = C; } - E.length = P; - 0 < E.length && (H[O++] = G); + z.length = S; + 0 < z.length && (B[Q++] = I); } - H.length = O; - if (0 === H.length) { - for (C = 0;C < F.length;C++) { - I = F[C], m[I] = (m[I] || 0) + k.save[I], c.set(I); + B.length = Q; + if (0 === B.length) { + for (y = 0;y < G.length;y++) { + C = G[y], d[C] = (d[C] || 0) + n.save[C], h.set(C); } + p && k.push(new t.Break(void 0, p)); break; } - s.push(new l.LabelSwitch(H)); - k = a(p, u); + k.push(new t.LabelSwitch(B)); + n = a(r, u); } else { - 1 === k.count ? (F = k.choose(), I = F.id, F.npredecessors -= k.save[I], F.save = k.save[I]) : (F = k, I = F.id); - if (q) { - q = !1; + 1 === n.count ? (G = n.choose(), C = G.id, G.npredecessors -= n.save[C], G.save = n.save[C]) : (G = n, C = G.id); + if (l) { + l = !1; } else { - if (n && !n.body.get(I)) { - F.npredecessors += F.save; - n.exit.set(I); - n.save[I] = (n.save[I] || 0) + F.save; - s.push(new l.Break(I, n)); + if (m && !m.body.get(C)) { + G.npredecessors += G.save; + m.exit.set(C); + m.save[C] = (m.save[C] || 0) + G.save; + k.push(new t.Break(C, m)); break; } - if (n && F.loop === n) { - F.npredecessors += F.save; - s.push(new l.Continue(I, n)); + if (m && G.loop === m) { + G.npredecessors += G.save; + k.push(new t.Continue(C, m)); break; } - if (F === h) { + if (G === s) { break; } - if (0 < F.npredecessors) { - F.npredecessors += F.save; - m[I] = (m[I] || 0) + F.save; - c.set(I); - s.push(t ? new l.Break(I, t) : new l.Exit(I)); + if (0 < G.npredecessors) { + G.npredecessors += G.save; + d[C] = (d[C] || 0) + G.save; + h.set(C); + k.push(p ? new t.Break(C, p) : new t.Exit(C)); break; } - if (F.loop) { - var P = F.loop; - if (1 === P.head.count) { - p = d(P.head.choose(), null, null, P, !0); + if (G.loop) { + var S = G.loop; + if (1 === S.head.count) { + r = f(S.head.choose(), null, null, S, !0); } else { - p = []; - Q = P.head.members(); - C = 0; - for (E = Q.length;C < E;C++) { - G = Q[C], u = G.id, G = d(G, null, null, P, !0), p.push(new l.LabelCase([u], G)); + r = []; + T = S.head.members(); + y = 0; + for (z = T.length;y < z;y++) { + I = T[y], u = I.id, I = f(I, null, null, S, !0), r.push(new t.LabelCase([u], I)); } - p = new l.LabelSwitch(p); + r = new t.LabelSwitch(r); } - s.push(new l.Loop(p)); - k = a(P.exit, P.save); + k.push(new t.Loop(r)); + n = a(S.exit, S.save); continue; } } - p = new g; + r = new e; u = {}; - if (b && F.hasCatches) { - G = F.successors; - H = []; - k = []; - C = 0; - for (E = G.length;C < E;C++) { - J = G[C], (J.exception ? H : k).push(J); + if (b && G.hasCatches) { + I = G.successors; + B = []; + n = []; + y = 0; + for (z = I.length;y < z;y++) { + E = I[y], (E.exception ? B : n).push(E); } - E = []; - for (C = 0;C < H.length;C++) { - J = H[C], J.npredecessors -= 1, J.save = 1, G = d(J, p, u, n), J = J.exception, E.push(new l.Catch(J.varName, J.typeName, G)); + z = []; + for (y = 0;y < B.length;y++) { + E = B[y], E.npredecessors -= 1, E.save = 1, I = f(E, r, u, m), E = E.exception, z.push(new t.Catch(E.varName, E.typeName, I)); } - E = new l.Try(F, E); + z = new t.Try(G, z); } else { - k = F.successors, E = F; + n = G.successors, z = G; } - if (2 < k.length) { - H = []; - for (C = k.length - 1;0 <= C;C--) { - J = k[C], J.npredecessors -= 1, J.save = 1, G = d(J, p, u, n, null, F, k[C + 1]), H.unshift(new l.Case(C, G)); + if (2 < n.length) { + B = []; + for (y = n.length - 1;0 <= y;y--) { + E = n[y], E.npredecessors -= 1, E.save = 1, I = f(E, r, u, m, null, G, n[y + 1]), B.unshift(new t.Case(y, I)); } - v(H).index = void 0; - b && F.hasCatches ? (E.nothingThrownLabel = e, E = new l.Switch(E, H, e++)) : E = new l.Switch(E, H); - k = a(p, u); + v(B).index = void 0; + b && G.hasCatches ? (z.nothingThrownLabel = c, z = new t.Switch(z, B, c++)) : z = new t.Switch(z, B); + n = a(r, u); } else { - 2 === k.length ? (C = F.hasFlippedSuccessors ? k[1] : k[0], G = F.hasFlippedSuccessors ? k[0] : k[1], C.npredecessors -= 1, C.save = 1, C = d(C, p, u, n), G.npredecessors -= 1, G.save = 1, G = d(G, p, u, n), b && F.hasCatches ? (E.nothingThrownLabel = e, E = new l.If(E, C, G, e++)) : E = new l.If(E, C, G), k = a(p, u)) : (G = k[0]) ? b && F.hasCatches ? (E.nothingThrownLabel = G.id, u[G.id] = (u[G.id] || 0) + 1, p.set(G.id), k = a(p, u)) : (G.npredecessors -= 1, G.save = 1, k = - G) : b && F.hasCatches ? (E.nothingThrownLabel = -1, k = a(p, u)) : k = G; + 2 === n.length ? (y = G.hasFlippedSuccessors ? n[1] : n[0], I = G.hasFlippedSuccessors ? n[0] : n[1], y.npredecessors -= 1, y.save = 1, y = f(y, r, u, m), I.npredecessors -= 1, I.save = 1, I = f(I, r, u, m), b && G.hasCatches ? (z.nothingThrownLabel = c, z = new t.If(z, y, I, c++)) : z = new t.If(z, y, I), n = a(r, u)) : (I = n[0]) ? b && G.hasCatches ? (z.nothingThrownLabel = I.id, u[I.id] = (u[I.id] || 0) + 1, r.set(I.id), n = a(r, u)) : (I.npredecessors -= 1, I.save = 1, n = + I) : b && G.hasCatches ? (z.nothingThrownLabel = -1, n = a(r, u)) : n = I; } - s.push(E); + k.push(z); } } - return 1 < s.length ? new l.Seq(s) : s[0]; + return 1 < k.length ? new t.Seq(k) : k[0]; } - var b = this.hasExceptions, g = this.boundBlockSet, e = this.blocks.length; - this.controlTree = d(this.blocks[0], new g, {}); + var b = this.hasExceptions, e = this.boundBlockSet, c = this.blocks.length; + this.controlTree = f(this.blocks[0], new e, {}); }; a.prototype.restructureControlFlow = function() { - h.enterTimeline("Restructure Control Flow"); + k.enterTimeline("Restructure Control Flow"); if (!this.markedLoops && !this.markLoops()) { - return h.leaveTimeline(), !1; + return k.leaveTimeline(), !1; } this.induceControlTree(); this.restructuredControlFlow = !0; - h.leaveTimeline(); + k.leaveTimeline(); return!0; }; return a; }(); - a.Analysis = n; + a.Analysis = s; a.analyze = function(a) { - a = new n(a); + a = new s(a); a.restructureControlFlow(); return a.controlTree; }; })(a.Looper || (a.Looper = {})); - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { function v(b, a) { if ("string" === typeof b || null === b || !0 === b || !1 === b) { - return new B(b); + return new A(b); } if (void 0 === b) { - return new M("undefined"); + return new H("undefined"); } if ("object" === typeof b || "function" === typeof b) { - return b instanceof c.AVM2.Runtime.LazyInitializer ? m(l(ja, "C"), [new B(a.useConstant(b))]) : new y(aa, new B(a.useConstant(b)), !0); + return b instanceof d.AVM2.Runtime.LazyInitializer ? h(l(X, "C"), [new A(a.useConstant(b))]) : new J(ia, new A(a.useConstant(b)), !0); } if ("number" === typeof b && isNaN(b)) { - return new M("NaN"); + return new H("NaN"); } if (Infinity === b) { - return new M("Infinity"); + return new H("Infinity"); } if (-Infinity === b) { - return new G("-", !0, new M("Infinity")); + return new I("-", !0, new H("Infinity")); } if ("number" === typeof b && 0 > 1 / b) { - return new G("-", !0, new B(Math.abs(b))); + return new I("-", !0, new A(Math.abs(b))); } if ("number" === typeof b) { - return new B(b); + return new A(b); } - r("Cannot emit constant for value: " + b); - } - function p(b) { - g("string" === typeof b); - return new M(b); + q("Cannot emit constant for value: " + b); } function u(b) { + return new H(b); + } + function t(b) { var a = b[0]; if (!("$" === a || "_" === a || "\\" === a || "a" <= a && "z" >= a || "A" <= a && "Z" >= a)) { return!1; } for (a = 1;a < b.length;a++) { - var d = b[a]; - if (!("$" === d || "_" === d || "\\" === d || "a" <= d && "z" >= d || "A" <= d && "Z" >= d || "0" <= d && "9" >= d)) { + var e = b[a]; + if (!("$" === e || "_" === e || "\\" === e || "a" <= e && "z" >= e || "A" <= e && "Z" >= e || "0" <= e && "9" >= e)) { return!1; } } return!0; } function l(b, a) { - return u(a) ? new y(b, new M(a), !1) : new y(b, new B(a), !0); + return t(a) ? new J(b, new H(a), !1) : new J(b, new A(a), !0); } - function e(b, a) { - return u(a.value) ? new y(b, new M(a.value), !1) : new y(b, a, !0); + function c(b, a) { + return t(a.value) ? new J(b, new H(a.value), !1) : new J(b, a, !0); + } + function h(b, a) { + return new D(b, a); + } + function p(b, a, e) { + return h(l(b, "asCall"), [a].concat(e)); + } + function s(b, a, e) { + return h(l(b, "call"), [a].concat(e)); } function m(b, a) { - g(a instanceof Array); - a.forEach(function(b) { - g(!(b instanceof Array)); - g(void 0 !== b); - }); - return new L(b, a); + return new B("=", b, a); } - function t(b, a, d) { - return m(l(b, "asCall"), [a].concat(d)); + function g(b) { + return new K(b, "var"); } - function q(b, a, d) { - return m(l(b, "call"), [a].concat(d)); - } - function n(b, a) { - g(b && a); - return new H("=", b, a); - } - function k(b) { - return new N(b, "var"); - } - function f(b, a, d) { - g(b); - g(b.compile, "Implement |compile| for " + b + " (" + b.nodeName + ")"); - g(a instanceof ia); - g(!(b instanceof Array)); - if (d || !b.variable) { - return b.compile(a); - } - g(b.variable, "Value has no variable: " + b); - return p(b.variable.name); - } - function d(b, a) { - return[f(b.namespaces, a), f(b.name, a), f(b.flags, a)]; + function f(b, a, e) { + return e || !b.variable ? b.compile(a) : u(b.variable.name); } function b(b, a) { - g(b instanceof Array); + return[f(b.namespaces, a), f(b.name, a), f(b.flags, a)]; + } + function e(b, a) { return b.map(function(b) { return f(b, a); }); } - var g = c.Debug.assert, r = c.Debug.unexpected, w = c.Debug.notImplemented, z = c.ArrayUtilities.pushUnique, A = c.AVM2.Compiler.AST, B = A.Literal, M = A.Identifier, N = A.VariableDeclaration, K = A.VariableDeclarator, y = A.MemberExpression, D = A.BinaryExpression, L = A.CallExpression, H = A.AssignmentExpression, J = A.ExpressionStatement, C = A.ReturnStatement, E = A.ConditionalExpression, F = A.ObjectExpression, I = A.ArrayExpression, G = A.UnaryExpression, Z = A.NewExpression, Q = A.Property, - S = A.BlockStatement, O = A.ThisExpression, P = A.ThrowStatement, V = A.IfStatement, $ = A.WhileStatement, W = A.BreakStatement, x = A.ContinueStatement, ea = A.SwitchStatement, Y = A.SwitchCase, R = a.IR.Start, U = a.IR.Variable, ba = a.IR.Constant, X = a.IR.Operator, A = c.AVM2.Compiler.Looper.Control, ga = c.ArrayUtilities.last; - A.Break.prototype.compile = function(b) { + var q = d.Debug.unexpected, n = d.Debug.notImplemented, x = d.ArrayUtilities.pushUnique, L = d.AVM2.Compiler.AST, A = L.Literal, H = L.Identifier, K = L.VariableDeclaration, F = L.VariableDeclarator, J = L.MemberExpression, M = L.BinaryExpression, D = L.CallExpression, B = L.AssignmentExpression, E = L.ExpressionStatement, y = L.ReturnStatement, z = L.ConditionalExpression, G = L.ObjectExpression, C = L.ArrayExpression, I = L.UnaryExpression, P = L.NewExpression, T = L.Property, O = L.BlockStatement, + Q = L.ThisExpression, S = L.ThrowStatement, V = L.IfStatement, aa = L.WhileStatement, $ = L.BreakStatement, w = L.ContinueStatement, U = L.SwitchStatement, ba = L.SwitchCase, R = a.IR.Variable, N = a.IR.Constant, Z = a.IR.Operator, L = d.AVM2.Compiler.Looper.Control, fa = d.ArrayUtilities.last; + L.Break.prototype.compile = function(b) { return b.compileBreak(this); }; - A.Continue.prototype.compile = function(b) { + L.Continue.prototype.compile = function(b) { return b.compileContinue(this); }; - A.Exit.prototype.compile = function(b) { + L.Exit.prototype.compile = function(b) { return b.compileExit(this); }; - A.LabelSwitch.prototype.compile = function(b) { + L.LabelSwitch.prototype.compile = function(b) { return b.compileLabelSwitch(this); }; - A.Seq.prototype.compile = function(b) { + L.Seq.prototype.compile = function(b) { return b.compileSequence(this); }; - A.Loop.prototype.compile = function(b) { + L.Loop.prototype.compile = function(b) { return b.compileLoop(this); }; - A.Switch.prototype.compile = function(b) { + L.Switch.prototype.compile = function(b) { return b.compileSwitch(this); }; - A.If.prototype.compile = function(b) { + L.If.prototype.compile = function(b) { return b.compileIf(this); }; - A.Try.prototype.compile = function(b) { - w("try"); + L.Try.prototype.compile = function(b) { + n("try"); return null; }; - var ja = new M("$F"), aa = new M("$C"), ia = function() { + var X = new H("$F"), ia = new H("$C"), ga = function() { function b() { - this.label = new U("$L"); + this.label = new R("$L"); this.variables = []; this.constants = []; this.lazyConstants = []; this.parameters = []; } b.prototype.useConstant = function(b) { - b instanceof c.AVM2.Runtime.LazyInitializer ? (b = z(this.lazyConstants, b), this.constants[b] = null) : (b = z(this.constants, b), this.lazyConstants[b] = null); + b instanceof d.AVM2.Runtime.LazyInitializer ? (b = x(this.lazyConstants, b), this.constants[b] = null) : (b = x(this.constants, b), this.lazyConstants[b] = null); return b; }; b.prototype.useVariable = function(b) { - g(b); - return z(this.variables, b); + return x(this.variables, b); }; b.prototype.useParameter = function(b) { return this.parameters[b.index] = b; }; b.prototype.compileLabelBody = function(b) { var a = []; - void 0 !== b.label && (this.useVariable(this.label), a.push(new J(n(p(this.label.name), new B(b.label))))); + void 0 !== b.label && (this.useVariable(this.label), a.push(new E(m(u(this.label.name), new A(b.label))))); return a; }; b.prototype.compileBreak = function(b) { b = this.compileLabelBody(b); - b.push(new W(null)); - return new S(b); + b.push(new $(null)); + return new O(b); }; b.prototype.compileContinue = function(b) { b = this.compileLabelBody(b); - b.push(new x(null)); - return new S(b); + b.push(new w(null)); + return new O(b); }; b.prototype.compileExit = function(b) { - return new S(this.compileLabelBody(b)); + return new O(this.compileLabelBody(b)); }; b.prototype.compileIf = function(b) { - var a = b.cond.compile(this), d = null, e = null; - b.then && (d = b.then.compile(this)); - b.else && (e = b.else.compile(this)); - var k = f(a.end.predicate, this); + var a = b.cond.compile(this), e = null, c = null; + b.then && (e = b.then.compile(this)); + b.else && (c = b.else.compile(this)); + var g = f(a.end.predicate, this); if (b.negated) { a: { - b = k; - if (b instanceof ba) { + b = g; + if (b instanceof N) { if (!0 === b.value || !1 === b.value) { b = v(!b.value); break a; } } else { - if (b instanceof M) { - b = new G(X.FALSE.name, !0, b); + if (b instanceof H) { + b = new I(Z.FALSE.name, !0, b); break a; } } - g(b instanceof D || b instanceof G, b); - var k = b instanceof D ? b.left : b.argument, c = b.right, m = X.fromName(b.operator); - b = m === X.EQ && c instanceof B && !1 === c.value || m === X.FALSE ? k : m.not ? b instanceof D ? new D(m.not.name, k, c) : new G(m.not.name, !0, k) : new G(X.FALSE.name, !0, b); + var g = b instanceof M ? b.left : b.argument, n = b.right, h = Z.fromName(b.operator); + b = h === Z.EQ && n instanceof A && !1 === n.value || h === Z.FALSE ? g : h.not ? b instanceof M ? new M(h.not.name, g, n) : new I(h.not.name, !0, g) : new I(Z.FALSE.name, !0, b); } } else { - b = k; + b = g; } - a.body.push(new V(b, d || new S([]), e || null)); + a.body.push(new V(b, e || new O([]), c || null)); return a; }; b.prototype.compileSwitch = function(b) { - var a = b.determinant.compile(this), d = []; + var a = b.determinant.compile(this), e = []; b.cases.forEach(function(b) { var a; b.body && (a = b.body.compile(this)); - b = "number" === typeof b.index ? new B(b.index) : void 0; - d.push(new Y(b, a ? [a] : [])); + b = "number" === typeof b.index ? new A(b.index) : void 0; + e.push(new ba(b, a ? [a] : [])); }, this); b = f(a.end.determinant, this); - a.body.push(new ea(b, d, !1)); + a.body.push(new U(b, e, !1)); return a; }; b.prototype.compileLabelSwitch = function(b) { - function a(b) { - g("number" === typeof b); - return new D("===", e, new B(b)); - } - for (var d = null, e = p(this.label.name), f = b.cases.length - 1;0 <= f;f--) { - for (var k = b.cases[f], c = k.labels, m = a(c[0]), r = 1;r < c.length;r++) { - m = new D("||", m, a(c[r])); + for (var a = null, e = u(this.label.name), f = b.cases.length - 1;0 <= f;f--) { + for (var c = b.cases[f], g = c.labels, n = new M("===", e, new A(g[0])), h = 1;h < g.length;h++) { + n = new M("||", n, new M("===", e, new A(g[h]))); } - d = new V(m, k.body ? k.body.compile(this) : new S([]), d); + a = new V(n, c.body ? c.body.compile(this) : new O([]), a); } - return d; + return a; }; b.prototype.compileLoop = function(b) { b = b.body.compile(this); - return new $(v(!0), b); + return new aa(v(!0), b); }; b.prototype.compileSequence = function(b) { - var a = this, d = []; + var a = this, e = []; b.body.forEach(function(b) { b = b.compile(a); - b instanceof S ? d = d.concat(b.body) : d.push(b); + b instanceof O ? e = e.concat(b.body) : e.push(b); }); - return new S(d); + return new O(e); }; b.prototype.compileBlock = function(b) { - for (var d = [], e = 1;e < b.nodes.length - 1;e++) { - var k = b.nodes[e], c; - k instanceof a.IR.Throw ? c = f(k, this, !0) : (k instanceof a.IR.Move ? (c = p(k.to.name), this.useVariable(k.to), k = f(k.from, this)) : (k.variable ? (c = p(k.variable.name), this.useVariable(k.variable)) : c = null, k = f(k, this, !0)), c = c ? new J(n(c, k)) : new J(k)); - d.push(c); + for (var e = [], c = 1;c < b.nodes.length - 1;c++) { + var g = b.nodes[c], n; + g instanceof a.IR.Throw ? n = f(g, this, !0) : (g instanceof a.IR.Move ? (n = u(g.to.name), this.useVariable(g.to), g = f(g.from, this)) : (g.variable ? (n = u(g.variable.name), this.useVariable(g.variable)) : n = null, g = f(g, this, !0)), n = n ? new E(m(n, g)) : new E(g)); + e.push(n); } - e = ga(b.nodes); - e instanceof a.IR.Stop && d.push(new C(f(e.argument, this))); - d = new S(d); - d.end = ga(b.nodes); - g(d.end instanceof a.IR.End); - return d; + c = fa(b.nodes); + c instanceof a.IR.Stop && e.push(new y(f(c.argument, this))); + e = new O(e); + e.end = fa(b.nodes); + return e; }; return b; }(); - s.Context = ia; + r.Context = ga; a.IR.Parameter.prototype.compile = function(b) { b.useParameter(this); - return p(this.name); + return u(this.name); }; a.IR.Constant.prototype.compile = function(b) { return v(this.value, b); }; a.IR.Variable.prototype.compile = function(b) { - return p(this.name); + return u(this.name); }; a.IR.Phi.prototype.compile = function(b) { - g(this.variable); return f(this.variable, b); }; a.IR.ASScope.prototype.compile = function(b) { var a = f(this.parent, b); b = f(this.object, b); - var d = new B(this.isWith); - return new Z(p("Scope"), [a, b, d]); + var e = new A(this.isWith); + return new P(u("Scope"), [a, b, e]); }; - a.IR.ASFindProperty.prototype.compile = function(b) { - var a = f(this.scope, b), g = d(this.name, b); - b = f(this.methodInfo, b); - var e = new B(this.strict); - return m(l(a, "findScopeProperty"), g.concat([b, e])); + a.IR.ASFindProperty.prototype.compile = function(a) { + var e = f(this.scope, a), c = b(this.name, a); + a = f(this.methodInfo, a); + var g = new A(this.strict); + return h(l(e, "findScopeProperty"), c.concat([a, g])); }; - a.IR.ASGetProperty.prototype.compile = function(b) { - var a = f(this.object, b); + a.IR.ASGetProperty.prototype.compile = function(a) { + var e = f(this.object, a); if (this.flags & 1) { - return g(!(this.flags & 8)), m(l(a, "asGetNumericProperty"), [f(this.name.name, b)]); + return h(l(e, "asGetNumericProperty"), [f(this.name.name, a)]); } if (this.flags & 2) { - return m(l(a, "asGetResolvedStringProperty"), [f(this.name, b)]); + return h(l(e, "asGetResolvedStringProperty"), [f(this.name, a)]); } - b = d(this.name, b); - var e = new B(this.flags & 8); - return m(l(a, "asGetProperty"), b.concat(e)); + a = b(this.name, a); + var c = new A(this.flags & 8); + return h(l(e, "asGetProperty"), a.concat(c)); }; - a.IR.ASGetSuper.prototype.compile = function(b) { - var a = f(this.scope, b), g = f(this.object, b); - b = d(this.name, b); - return m(l(g, "asGetSuper"), [a].concat(b)); + a.IR.ASGetSuper.prototype.compile = function(a) { + var e = f(this.scope, a), c = f(this.object, a); + a = b(this.name, a); + return h(l(c, "asGetSuper"), [e].concat(a)); }; a.IR.Latch.prototype.compile = function(b) { - return new E(f(this.condition, b), f(this.left, b), f(this.right, b)); + return new z(f(this.condition, b), f(this.left, b), f(this.right, b)); }; a.IR.Unary.prototype.compile = function(b) { - return new G(this.operator.name, !0, f(this.argument, b)); + return new I(this.operator.name, !0, f(this.argument, b)); }; a.IR.Copy.prototype.compile = function(b) { return f(this.argument, b); }; a.IR.Binary.prototype.compile = function(b) { - var d = f(this.left, b); + var e = f(this.left, b); b = f(this.right, b); - return this.operator === a.IR.Operator.AS_ADD ? m(p("asAdd"), [d, b]) : new D(this.operator.name, d, b); + return this.operator === a.IR.Operator.AS_ADD ? h(u("asAdd"), [e, b]) : new M(this.operator.name, e, b); }; a.IR.CallProperty.prototype.compile = function(b) { - var a = f(this.object, b), d = f(this.name, b), d = e(a, d), g = this.args.map(function(a) { + var a = f(this.object, b), e = f(this.name, b), e = c(a, e), g = this.args.map(function(a) { return f(a, b); }); - return this.flags & 16 ? t(d, a, g) : this.flags & 4 ? m(d, g) : q(d, a, g); + return this.flags & 16 ? p(e, a, g) : this.flags & 4 ? h(e, g) : s(e, a, g); }; - a.IR.ASCallProperty.prototype.compile = function(b) { - var a = f(this.object, b), g = this.args.map(function(a) { - return f(a, b); + a.IR.ASCallProperty.prototype.compile = function(a) { + var e = f(this.object, a), c = this.args.map(function(b) { + return f(b, a); }); if (this.flags & 2) { - return m(l(a, "asCallResolvedStringProperty"), [f(this.name, b), new B(this.isLex), new I(g)]); + return h(l(e, "asCallResolvedStringProperty"), [f(this.name, a), new A(this.isLex), new C(c)]); } - var e = d(this.name, b); - return m(l(a, "asCallProperty"), e.concat([new B(this.isLex), new I(g)])); + var g = b(this.name, a); + return h(l(e, "asCallProperty"), g.concat([new A(this.isLex), new C(c)])); }; - a.IR.ASCallSuper.prototype.compile = function(b) { - var a = f(this.scope, b), g = f(this.object, b), e = this.args.map(function(a) { - return f(a, b); - }), k = d(this.name, b); - return m(l(g, "asCallSuper"), [a].concat(k).concat(new I(e))); + a.IR.ASCallSuper.prototype.compile = function(a) { + var e = f(this.scope, a), c = f(this.object, a), g = this.args.map(function(b) { + return f(b, a); + }), n = b(this.name, a); + return h(l(c, "asCallSuper"), [e].concat(n).concat(new C(g))); }; a.IR.Call.prototype.compile = function(b) { var a = this.args.map(function(a) { return f(a, b); - }), d = f(this.callee, b), g; - g = this.object ? f(this.object, b) : new B(null); - return this.flags & 16 ? t(d, g, a) : null === this.object ? m(d, a) : q(d, g, a); + }), e = f(this.callee, b), c; + c = this.object ? f(this.object, b) : new A(null); + return this.flags & 16 ? p(e, c, a) : null === this.object ? h(e, a) : s(e, c, a); }; a.IR.ASNew.prototype.compile = function(b) { var a = this.args.map(function(a) { return f(a, b); - }), d = f(this.callee, b), d = l(d, "instanceConstructor"); - return new Z(d, a); + }), e = f(this.callee, b), e = l(e, "instanceConstructor"); + return new P(e, a); }; a.IR.This.prototype.compile = function(b) { - return new O; + return new Q; }; a.IR.Throw.prototype.compile = function(b) { b = f(this.argument, b); - return new P(b); + return new S(b); }; a.IR.Arguments.prototype.compile = function(b) { - return p("arguments"); + return u("arguments"); }; a.IR.ASGlobal.prototype.compile = function(b) { b = f(this.scope, b); return l(l(b, "global"), "object"); }; - a.IR.ASSetProperty.prototype.compile = function(b) { - var a = f(this.object, b), g = f(this.value, b); + a.IR.ASSetProperty.prototype.compile = function(a) { + var e = f(this.object, a), c = f(this.value, a); if (this.flags & 1) { - return m(l(a, "asSetNumericProperty"), [f(this.name.name, b), g]); + return h(l(e, "asSetNumericProperty"), [f(this.name.name, a), c]); } - b = d(this.name, b); - return m(l(a, "asSetProperty"), b.concat(g)); + a = b(this.name, a); + return h(l(e, "asSetProperty"), a.concat(c)); }; - a.IR.ASSetSuper.prototype.compile = function(b) { - var a = f(this.scope, b), g = f(this.object, b), e = d(this.name, b); - b = f(this.value, b); - return m(l(g, "asSetSuper"), [a].concat(e).concat([b])); + a.IR.ASSetSuper.prototype.compile = function(a) { + var e = f(this.scope, a), c = f(this.object, a), g = b(this.name, a); + a = f(this.value, a); + return h(l(c, "asSetSuper"), [e].concat(g).concat([a])); }; - a.IR.ASDeleteProperty.prototype.compile = function(b) { - var a = f(this.object, b); - b = d(this.name, b); - return m(l(a, "asDeleteProperty"), b); + a.IR.ASDeleteProperty.prototype.compile = function(a) { + var e = f(this.object, a); + a = b(this.name, a); + return h(l(e, "asDeleteProperty"), a); }; - a.IR.ASHasProperty.prototype.compile = function(b) { - var a = f(this.object, b); - b = d(this.name, b); - return m(l(a, "asHasProperty"), b); + a.IR.ASHasProperty.prototype.compile = function(a) { + var e = f(this.object, a); + a = b(this.name, a); + return h(l(e, "asHasProperty"), a); }; a.IR.GlobalProperty.prototype.compile = function(b) { - return p(this.name); + return u(this.name); }; a.IR.GetProperty.prototype.compile = function(b) { var a = f(this.object, b); b = f(this.name, b); - return e(a, b); + return c(a, b); }; a.IR.SetProperty.prototype.compile = function(b) { - var a = f(this.object, b), d = f(this.name, b); + var a = f(this.object, b), e = f(this.name, b); b = f(this.value, b); - return n(e(a, d), b); + return m(c(a, e), b); }; a.IR.ASGetDescendants.prototype.compile = function(b) { var a = f(this.object, b); b = f(this.name, b); - return m(p("getDescendants"), [a, b]); + return h(u("getDescendants"), [a, b]); }; a.IR.ASSetSlot.prototype.compile = function(b) { - var a = f(this.object, b), d = f(this.name, b); + var a = f(this.object, b), e = f(this.name, b); b = f(this.value, b); - return m(p("asSetSlot"), [a, d, b]); + return h(u("asSetSlot"), [a, e, b]); }; a.IR.ASGetSlot.prototype.compile = function(b) { var a = f(this.object, b); b = f(this.name, b); - return m(p("asGetSlot"), [a, b]); + return h(u("asGetSlot"), [a, b]); }; a.IR.Projection.prototype.compile = function(b) { - g(4 === this.type); - g(this.argument instanceof R); return f(this.argument.scope, b); }; - a.IR.NewArray.prototype.compile = function(a) { - return new I(b(this.elements, a)); + a.IR.NewArray.prototype.compile = function(b) { + return new C(e(this.elements, b)); }; a.IR.NewObject.prototype.compile = function(b) { var a = this.properties.map(function(a) { - var d = f(a.key, b); + var e = f(a.key, b); a = f(a.value, b); - return new Q(d, a, "init"); + return new T(e, a, "init"); }); - return new F(a); + return new G(a); }; a.IR.ASNewActivation.prototype.compile = function(b) { b = f(this.methodInfo, b); - return m(p("asCreateActivation"), [b]); + return h(u("asCreateActivation"), [b]); }; a.IR.ASNewHasNext2.prototype.compile = function(b) { - return new Z(p("HasNext2Info"), []); + return new P(u("HasNext2Info"), []); }; a.IR.ASMultiname.prototype.compile = function(b) { - var a = f(this.namespaces, b), d = f(this.name, b); + var a = f(this.namespaces, b), e = f(this.name, b); b = f(this.flags, b); - return m(p("createName"), [a, d, b]); + return h(u("createName"), [a, e, b]); }; a.IR.Block.prototype.compile = function(b) { return b.compileBlock(this); }; - var T = function() { - function b(a, d, g, e) { + var ca = function() { + function b(a, e, f, c) { this.parameters = a; - this.body = d; - this.constants = g; - this.lazyConstants = e; + this.body = e; + this.constants = f; + this.lazyConstants = c; } b.prototype.C = function(b) { - null === this.constants[b] && (this.constants[b] = this.lazyConstants[b].resolve(), this.lazyConstants[b] = null); - return this.constants[b]; + var a = this.constants[b]; + null === a && (a = this.constants[b] = this.lazyConstants[b].resolve(), this.lazyConstants[b] = null); + return a; }; b.id = 0; return b; }(); - s.Compilation = T; - s.generate = function(b) { - h.enterTimeline("Looper"); - var d = a.Looper.analyze(b); - h.leaveTimeline(); - new c.IndentingWriter; - b = new ia; - h.enterTimeline("Construct AST"); - var g = d.compile(b); - h.leaveTimeline(); - for (var d = [], e = 0;e < b.parameters.length;e++) { - d.push(p(b.parameters[e] ? b.parameters[e].name : "_" + e)); + r.Compilation = ca; + r.generate = function(b) { + k.enterTimeline("Looper"); + var e = a.Looper.analyze(b); + k.leaveTimeline(); + new d.IndentingWriter; + b = new ga; + k.enterTimeline("Construct AST"); + var f = e.compile(b); + k.leaveTimeline(); + for (var e = [], c = 0;c < b.parameters.length;c++) { + e.push(u(b.parameters[c] ? b.parameters[c].name : "_" + c)); } - e = "$$F" + T.id++; + c = "$$F" + ca.id++; if (b.constants.length) { - var f = new M(e), m = new y(f, new M("constants"), !1); - g.body.unshift(k([new K(p("$F"), f), new K(p("$C"), m)])); + var n = new H(c), h = new J(n, new H("constants"), !1); + f.body.unshift(g([new F(u("$F"), n), new F(u("$C"), h)])); } - b.variables.length && (h.countTimeline("Backend: Locals", b.variables.length), f = k(b.variables.map(function(b) { - return new K(p(b.name)); - })), g.body.unshift(f)); - h.enterTimeline("Serialize AST"); - g = g.toSource(); - h.leaveTimeline(); - return jsGlobal[e] = new T(d.map(function(b) { + b.variables.length && (k.countTimeline("Backend: Locals", b.variables.length), n = g(b.variables.map(function(b) { + return new F(u(b.name)); + })), f.body.unshift(n)); + k.enterTimeline("Serialize AST"); + f = f.toSource(); + k.leaveTimeline(); + return jsGlobal[c] = new ca(e.map(function(b) { return b.name; - }), g, b.constants, b.lazyConstants); + }), f, b.constants, b.lazyConstants); }; })(a.Backend || (a.Backend = {})); - })(h.Compiler || (h.Compiler = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Compiler || (k.Compiler = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(d) { - h.enterTimeline("executeScript", {name:d.name}); - var b = d.abc; - t(!d.executing && !d.executed); - var g = new a.Global(d); - b.applicationDomain.allowNatives && (g[e.getPublicQualifiedName("unsafeJSNative")] = c.AVM2.AS.getNative); - d.executing = !0; - b = new a.Scope(null, d.global); - a.createFunction(d.init, b, !1, !1).call(d.global, !1); - d.executed = !0; - h.leaveTimeline(); + function r(f) { + k.enterTimeline("executeScript", {name:f.name}); + var b = f.abc, e = new a.Global(f); + b.applicationDomain.allowNatives && (e[c.getPublicQualifiedName("unsafeJSNative")] = d.AVM2.AS.getNative); + f.executing = !0; + b = new a.Scope(null, f.global); + a.createFunction(f.init, b, !1, !1).call(f.global, !1); + f.executed = !0; + k.leaveTimeline(); } function v(a, b) { void 0 === b && (b = ""); - a.executed || a.executing || (2 <= c.AVM2.Runtime.traceExecution.value && console.log("Executing Script For: " + b), s(a)); + a.executed || a.executing || (2 <= d.AVM2.Runtime.traceExecution.value && console.log("Executing Script For: " + b), r(a)); } - function p(d) { + function u(f) { if (!a.playerglobal) { return null; } - for (var b = 0;b < d.namespaces.length;b++) { - var g = a.playerglobal.map[d.namespaces[b].uri + ":" + d.name]; - if (g) { + for (var b = 0;b < f.namespaces.length;b++) { + var e = a.playerglobal.map[f.namespaces[b].uri + ":" + f.name]; + if (e) { break; } } - return g ? (d = g, d = (b = a.playerglobal.scripts[d]) ? new l(new Uint8Array(a.playerglobal.abcs, b.offset, b.length), d) : null, d) : null; + return e ? (f = e, f = (b = a.playerglobal.scripts[f]) ? new l(new Uint8Array(a.playerglobal.abcs, b.offset, b.length), f) : null, f) : null; } - function u(a, b) { - return new Promise(function(g, e) { - var f = new XMLHttpRequest; - f.open("GET", a); - f.responseType = b; - f.onload = function() { - var k = f.response; - k ? ("json" === b && "json" !== f.responseType && (k = JSON.parse(k)), g(k)) : e("Unable to load " + a + ": " + f.statusText); + function t(a, b) { + return new Promise(function(e, c) { + var g = new XMLHttpRequest; + g.open("GET", a); + g.responseType = b; + g.onload = function() { + var h = g.response; + h ? ("json" === b && "json" !== g.responseType && (h = JSON.parse(h)), e(h)) : c("Unable to load " + a + ": " + g.statusText); }; - f.send(); + g.send(); }); } - var l = c.AVM2.ABC.AbcFile, e = c.AVM2.ABC.Multiname, m = c.Callback, t = c.Debug.assert, q = c.IndentingWriter; - a.executeScript = s; + var l = d.AVM2.ABC.AbcFile, c = d.AVM2.ABC.Multiname, h = d.Callback, p = d.IndentingWriter; + a.executeScript = r; a.ensureScriptIsExecuted = v; (function(a) { a[a.PUBLIC_PROPERTIES = 1] = "PUBLIC_PROPERTIES"; @@ -21258,56 +21357,54 @@ Shumway.AVM2.XRegExp.install(); })(a.Glue || (a.Glue = {})); a.playerglobalLoadedPromise; a.playerglobal; - var n = function() { - function d(b, a) { - this.systemDomain = new k(this, null, b, !0); - this.applicationDomain = new k(this, this.systemDomain, a, !1); - this.findDefiningAbc = p; + var s; + (function(a) { + a[a.SpiderMonkey = 0] = "SpiderMonkey"; + a[a.V8 = 1] = "V8"; + })(s || (s = {})); + var m = function() { + function f(b, a) { + this.systemDomain = new g(this, null, b, !0); + this.applicationDomain = new g(this, this.systemDomain, a, !1); + this.findDefiningAbc = u; this.exception = {value:void 0}; this.exceptions = []; this.globals = Object.create(null); } - d.initialize = function(b, a) { - t(!d.instance); - d.instance = new d(b, a); + f.initialize = function(b, a) { + f.instance = new f(b, a); }; - d.currentAbc = function() { - for (var b = arguments.callee, a = null, d = 0;20 > d && b;d++) { - var e = b.methodInfo; - if (e) { - a = e.abc; - break; + f.currentAbc = function() { + for (var b = Error().stack.split("\n"), a = 0 === b[1].indexOf(" at ") ? 1 : 0, f = 0;f < b.length;f++) { + var c = b[f]; + if ((c = (c = 0 === a ? c.substr(0, c.indexOf("@")) : c.substr(7, c.indexOf(" ", 8))) && jsGlobal[c]) && c.methodInfo) { + return c.methodInfo.abc; } - b = b.caller; } - return a; + return null; }; - d.currentDomain = function() { - var b = d.currentAbc(); - if (null === b) { - return d.instance.systemDomain; - } - t(b && b.applicationDomain, "No domain environment was found on the stack, increase STACK_DEPTH or make sure that a compiled / interpreted function is on the call stack."); - return b.applicationDomain; + f.currentDomain = function() { + var b = f.currentAbc(); + return null === b ? f.instance.systemDomain : b.applicationDomain; }; - d.isPlayerglobalLoaded = function() { + f.isPlayerglobalLoaded = function() { return!!a.playerglobal; }; - d.loadPlayerglobal = function(b, d) { + f.loadPlayerglobal = function(b, e) { if (a.playerglobalLoadedPromise) { return Promise.reject("Playerglobal is already loaded"); } - a.playerglobalLoadedPromise = Promise.all([u(b, "arraybuffer"), u(d, "json")]).then(function(b) { + a.playerglobalLoadedPromise = Promise.all([t(b, "arraybuffer"), t(e, "json")]).then(function(b) { a.playerglobal = {abcs:b[0], map:Object.create(null), scripts:Object.create(null)}; b = b[1]; - for (var d = 0;d < b.length;d++) { - var g = b[d]; - a.playerglobal.scripts[g.name] = g; - if ("string" === typeof g.defs) { - a.playerglobal.map[g.defs] = g.name; + for (var e = 0;e < b.length;e++) { + var f = b[e]; + a.playerglobal.scripts[f.name] = f; + if ("string" === typeof f.defs) { + a.playerglobal.map[f.defs] = f.name; } else { - for (var e = 0;e < g.defs.length;e++) { - a.playerglobal.map[g.defs[e]] = g.name; + for (var c = 0;c < f.defs.length;c++) { + a.playerglobal.map[f.defs[c]] = f.name; } } } @@ -21316,13 +21413,11 @@ Shumway.AVM2.XRegExp.install(); }); return a.playerglobalLoadedPromise; }; - return d; + return f; }(); - a.AVM2 = n; - var k = function() { - function d(b, a, e, f) { - t(b instanceof n); - t(c.isNullOrUndefined(a) || a instanceof d); + a.AVM2 = m; + var g = function() { + function f(b, a, f, c) { this.vm = b; this.abcs = []; this.loadedAbcs = {}; @@ -21331,79 +21426,78 @@ Shumway.AVM2.XRegExp.install(); this.scriptCache = Object.create(null); this.classInfoCache = Object.create(null); this.base = a; - this.allowNatives = f; - this.mode = e; - this.onMessage = new m; + this.allowNatives = c; + this.mode = f; + this.onMessage = new h; this.system = a ? a.system : this; } - d.passthroughCallable = function(b) { + f.passthroughCallable = function(b) { return{call:function(a) { Array.prototype.shift.call(arguments); return b.asApply(a, arguments); - }, apply:function(a, d) { - return b.asApply(a, d); + }, apply:function(a, f) { + return b.asApply(a, f); }}; }; - d.coerceCallable = function(b) { - return{call:function(d, e) { - return a.asCoerce(b, e); - }, apply:function(d, e) { - return a.asCoerce(b, e[0]); + f.coerceCallable = function(b) { + return{call:function(e, f) { + return a.asCoerce(b, f); + }, apply:function(e, f) { + return a.asCoerce(b, f[0]); }}; }; - d.prototype.getType = function(b) { + f.prototype.getType = function(b) { return this.getProperty(b, !0, !0); }; - d.prototype.getProperty = function(b, a, d) { - if (d = this.findDefiningScript(b, d)) { - return d.script.executing ? d.script.global[e.getQualifiedName(d.trait.name)] : void 0; + f.prototype.getProperty = function(b, a, f) { + if (f = this.findDefiningScript(b, f)) { + return f.script.executing ? f.script.global[c.getQualifiedName(f.trait.name)] : void 0; } if (a) { - return c.Debug.unexpected("Cannot find property " + b); + return d.Debug.unexpected("Cannot find property " + b); } }; - d.prototype.getClass = function(b, a) { + f.prototype.getClass = function(b, a) { void 0 === a && (a = !0); - var d = this.classCache, f = d[b]; - f || (f = d[b] = this.getProperty(e.fromSimpleName(b), a, !0)); - f && t(f instanceof c.AVM2.AS.ASClass); - return f; + var f = this.classCache, g = f[b]; + g || (g = f[b] = this.getProperty(c.fromSimpleName(b), a, !0)); + return g; }; - d.prototype.findDomainProperty = function(b, a, d) { - c.AVM2.Runtime.traceDomain.value && console.log("ApplicationDomain.findDomainProperty: " + b); - if (d = this.findDefiningScript(b, d)) { - return d.script.global; + f.prototype.findDomainProperty = function(b, a, f) { + d.AVM2.Runtime.traceDomain.value && console.log("ApplicationDomain.findDomainProperty: " + b); + if (f = this.findDefiningScript(b, f)) { + return f.script.global; } if (a) { - return c.Debug.unexpected("Cannot find property " + b); + return d.Debug.unexpected("Cannot find property " + b); } }; - d.prototype.findClassInfo = function(b) { + f.prototype.findClassInfo = function(b) { var a; - if (e.isQName(b)) { - a = e.getQualifiedName(b); - var d = this.classInfoCache[a]; + if (c.isQName(b)) { + a = c.getQualifiedName(b); + var f = this.classInfoCache[a]; } else { - d = this.classInfoCache[b.runtimeId]; + f = this.classInfoCache[b.runtimeId]; } - return d || this.base && (d = this.base.findClassInfo(b)) ? d : this.findClassInfoSlow(b, a); + return f || this.base && (f = this.base.findClassInfo(b)) ? f : this.findClassInfoSlow(b, a); }; - d.prototype.findClassInfoSlow = function(b, a) { - for (var d = this.abcs, f = 0;f < d.length;f++) { - for (var k = d[f], k = k.scripts, c = 0;c < k.length;c++) { - for (var m = k[c].traits, l = 0;l < m.length;l++) { - var n = m[l]; - if (n.isClass()) { - var q = e.getQualifiedName(n.name); + f.prototype.findClassInfoSlow = function(b, a) { + for (var f = this.abcs, g = 0;g < f.length;g++) { + for (var h = f[g], h = h.scripts, d = 0;d < h.length;d++) { + for (var m = h[d].traits, l = 0;l < m.length;l++) { + var p = m[l]; + if (p.isClass()) { + var s = c.getQualifiedName(p.name); if (a) { - if (q === a) { - return this.classInfoCache[a] = n.classInfo; + if (s === a) { + return this.classInfoCache[a] = p.classInfo; } } else { - for (var t = 0, h = b.namespaces.length;t < h;t++) { - var s = b.getQName(t); - if (q === e.getQualifiedName(s)) { - return this.classInfoCache[s] = n.classInfo; + for (var k = 0, r = b.namespaces.length;k < r;k++) { + var u = b.getQName(k); + if (s === c.getQualifiedName(u)) { + return this.classInfoCache[u] = p.classInfo; } } } @@ -21411,151 +21505,148 @@ Shumway.AVM2.XRegExp.install(); } } } - if (!this.base && this.vm.findDefiningAbc && (k = this.vm.findDefiningAbc(b), null !== k && !this.loadedAbcs[k.name])) { - return this.loadedAbcs[k.name] = !0, this.loadAbc(k), this.findClassInfo(b); + if (!this.base && this.vm.findDefiningAbc && (h = this.vm.findDefiningAbc(b), null !== h && !this.loadedAbcs[h.name])) { + return this.loadedAbcs[h.name] = !0, this.loadAbc(h), this.findClassInfo(b); } }; - d.prototype.findDefiningScript = function(b, a) { - var d = this.scriptCache[b.runtimeId]; - return d && (d.script.executed || !a) || this.base && (d = this.base.findDefiningScript(b, a)) ? d : this.findDefiningScriptSlow(b, a); + f.prototype.findDefiningScript = function(b, a) { + var f = this.scriptCache[b.runtimeId]; + return f && (f.script.executed || !a) || this.base && (f = this.base.findDefiningScript(b, a)) ? f : this.findDefiningScriptSlow(b, a); }; - d.prototype.findDefiningScriptSlow = function(b, a) { - h.countTimeline("ApplicationDomain: findDefiningScriptSlow"); - for (var d = this.abcs, f = 0;f < d.length;f++) { - for (var k = d[f], k = k.scripts, m = 0;m < k.length;m++) { - var l = k[m], n = l.traits; - if (b instanceof e) { - for (var q = 0;q < n.length;q++) { - var t = n[q]; - if (b.hasQName(t.name)) { - return a && v(l, String(t.name)), this.scriptCache[b.runtimeId] = {script:l, trait:t}; + f.prototype.findDefiningScriptSlow = function(b, a) { + k.countTimeline("ApplicationDomain: findDefiningScriptSlow"); + for (var f = this.abcs, g = 0;g < f.length;g++) { + for (var h = f[g], h = h.scripts, d = 0;d < h.length;d++) { + var m = h[d], l = m.traits; + if (b instanceof c) { + for (var p = 0;p < l.length;p++) { + var s = l[p]; + if (b.hasQName(s.name)) { + return a && v(m, String(s.name)), this.scriptCache[b.runtimeId] = {script:m, trait:s}; } } - } else { - c.Debug.unexpected(); } } } - if (!this.base && this.vm.findDefiningAbc && (k = this.vm.findDefiningAbc(b), null !== k && !this.loadedAbcs[k.name])) { - return this.loadedAbcs[k.name] = !0, this.loadAbc(k), this.findDefiningScript(b, a); + if (!this.base && this.vm.findDefiningAbc && (h = this.vm.findDefiningAbc(b), null !== h && !this.loadedAbcs[h.name])) { + return this.loadedAbcs[h.name] = !0, this.loadAbc(h), this.findDefiningScript(b, a); } }; - d.prototype.compileAbc = function(b, a) { - c.AVM2.Compiler.compileAbc(b, a); + f.prototype.compileAbc = function(b, a) { + d.AVM2.Compiler.compileAbc(b, a); }; - d.prototype.executeAbc = function(b) { + f.prototype.executeAbc = function(b) { this.loadAbc(b); - s(b.lastScript); + r(b.lastScript); }; - d.prototype.loadAbc = function(b) { - c.AVM2.Runtime.traceExecution.value && console.log("Loading: " + b.name); + f.prototype.loadAbc = function(b) { + d.AVM2.Runtime.traceExecution.value && console.log("Loading: " + b.name); b.applicationDomain = this; a.GlobalMultinameResolver.loadAbc(b); this.abcs.push(b); - this.base || (h.AS.initialize(this), c.AVM2.Verifier.Type.initializeTypes(this)); + this.base || (k.AS.initialize(this), d.AVM2.Verifier.Type.initializeTypes(this)); }; - d.prototype.broadcastMessage = function(b, a, d) { + f.prototype.broadcastMessage = function(b, a, f) { try { - this.onMessage.notify1(b, {data:a, origin:d, source:this}); - } catch (e) { - throw n.instance.exceptions.push({source:b, message:e.message, stack:e.stack}), e; + this.onMessage.notify1(b, {data:a, origin:f, source:this}); + } catch (c) { + throw m.instance.exceptions.push({source:b, message:c.message, stack:c.stack}), c; } }; - d.prototype.traceLoadedClasses = function() { - var b = new q; - [c.ArrayUtilities.last(this.loadedClasses)].forEach(function(a) { - a !== c.AVM2.AS.ASClass && a.trace(b); + f.prototype.traceLoadedClasses = function() { + var b = new p; + [d.ArrayUtilities.last(this.loadedClasses)].forEach(function(a) { + a !== d.AVM2.AS.ASClass && a.trace(b); }); }; - return d; + return f; }(); - a.ApplicationDomain = k; - var f = function() { + a.ApplicationDomain = g; + s = function() { function a(b) { this.compartment = newGlobal("new-compartment"); this.compartment.homePath = homePath; - this.compartment.release = !1; + this.compartment.release = !0; this.compartment.eval(snarf(b)); } a.prototype.initializeShell = function(b, a) { - var d = this.compartment; - d.AVM2.initialize(b, a); - d.AVM2.instance.systemDomain.executeAbc(d.grabAbc(homePath + "src/avm2/generated/builtin/builtin.abc")); - d.AVM2.instance.systemDomain.executeAbc(d.grabAbc(homePath + "src/avm2/generated/shell/shell.abc")); - this.systemDomain = d.AVM2.instance.systemDomain; - this.applicationDomain = d.AVM2.instance.applicationDomain; + var f = this.compartment; + f.AVM2.initialize(b, a); + f.AVM2.instance.systemDomain.executeAbc(f.grabAbc(homePath + "src/avm2/generated/builtin/builtin.abc")); + f.AVM2.instance.systemDomain.executeAbc(f.grabAbc(homePath + "src/avm2/generated/shell/shell.abc")); + this.systemDomain = f.AVM2.instance.systemDomain; + this.applicationDomain = f.AVM2.instance.applicationDomain; }; return a; }(); - a.SecurityDomain = f; - })(h.Runtime || (h.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.SecurityDomain = s; + })(k.Runtime || (k.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.ApplicationDomain, AVM2 = Shumway.AVM2.Runtime.AVM2, EXECUTION_MODE = Shumway.AVM2.Runtime.ExecutionMode; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(a) { - return a.holder instanceof p ? "static " + a.holder.instanceInfo.name.getOriginalName() + "::" + a.name.getOriginalName() : a.holder instanceof u ? a.holder.name.getOriginalName() + "::" + a.name.getOriginalName() : a.name.getOriginalName(); + function r(a) { + return a.holder instanceof u ? "static " + a.holder.instanceInfo.name.getOriginalName() + "::" + a.name.getOriginalName() : a.holder instanceof t ? a.holder.name.getOriginalName() + "::" + a.name.getOriginalName() : a.name.getOriginalName(); } - var v = c.AVM2.ABC.Multiname, p = c.AVM2.ABC.ClassInfo, u = c.AVM2.ABC.InstanceInfo, l = c.Debug.assert, e = c.ObjectUtilities.defineReadOnlyProperty, m = c.FunctionUtilities.bindSafely; - a.getMethodOverrideKey = s; - a.checkMethodOverrides = function(e) { - if (e.name && (e = s(e), e in a.VM_METHOD_OVERRIDES)) { - return c.Debug.warning("Overriding Method: " + e), a.VM_METHOD_OVERRIDES[e]; + var v = d.AVM2.ABC.Multiname, u = d.AVM2.ABC.ClassInfo, t = d.AVM2.ABC.InstanceInfo, l = d.ObjectUtilities.defineReadOnlyProperty, c = d.FunctionUtilities.bindSafely; + a.getMethodOverrideKey = r; + a.checkMethodOverrides = function(c) { + if (c.name && (c = r(c), c in a.VM_METHOD_OVERRIDES)) { + return a.VM_METHOD_OVERRIDES[c]; } }; - var t = [[208, 48, 71], [208, 48, 208, 73, 0, 71]]; a.checkCommonMethodPatterns = function(a) { - return a.code && (c.ArrayUtilities.equals(a.code, t[0]) || c.ArrayUtilities.equals(a.code, t[1]) && a.holder instanceof u && v.getQualifiedName(a.holder.superName) === v.Object) ? function() { - } : null; + var c = a.code; + return c && 208 === c[0] && 48 === c[1] ? 71 === c[2] || a.holder instanceof t && 208 === c[2] && 73 === c[3] && 0 === c[4] && 71 === c[5] && v.getQualifiedName(a.holder.superName) === v.Object ? function() { + } : null : null; }; - a.makeTrampoline = function(m, n, k, f, d, b) { - function g() { - h.countTimeline("Executing Trampoline"); - 1 <= c.AVM2.Runtime.traceExecution.value && (a.callWriter.writeLn("Trampoline: " + b), 3 <= c.AVM2.Runtime.traceExecution.value && console.log("Trampolining")); - r || g.trigger(); - return r.asApply(this, arguments); + a.makeTrampoline = function(c, d, s, m, g, f) { + function b() { + e || b.trigger(); + return e.apply(this, arguments); } - var r = null; - g.trigger = function() { - h.countTimeline("Triggering Trampoline"); - r || (l(!m.methodInfo.isNative()), r = a.createFunction(m.methodInfo, n, !1, !1, !1), a.patch(f, r), m = n = f = null, l(r)); + var e = null; + b.trigger = function() { + e = a.createFunction(c.methodInfo, d, !1, !1, !1); + a.patch(m, e); + c = d = m = null; }; - g.isTrampoline = !0; - g.patchTargets = f; - e(g, a.VM_LENGTH, d); - return g; + b.isTrampoline = !0; + b.patchTargets = m; + l(b, a.VM_LENGTH, g); + return b; }; - a.makeMemoizer = function(q, n) { - function k() { - n.value.isTrampoline && (n.value.trigger(), l(!n.value.isTrampoline, "We should avoid binding trampolines.")); - var f = m(n.value, this); - c.ObjectUtilities.defineReadOnlyProperty(f, "asLength", n.value.length); + a.makeMemoizer = function(h, p) { + function s() { + p.value.isTrampoline && p.value.trigger(); + var m = c(p.value, this); + d.ObjectUtilities.defineReadOnlyProperty(m, "asLength", p.value.length); if (a.isNativePrototype(this)) { - return h.countTimeline("Runtime: Method Closures"), f; + return k.countTimeline("Runtime: Method Closures"), m; } - f.methodInfo = n.value.methodInfo; - e(f, v.getPublicQualifiedName("prototype"), null); - e(this, q, f); - return f; + m.methodInfo = p.value.methodInfo; + l(m, v.getPublicQualifiedName("prototype"), null); + l(this, h, m); + return m; } - h.countTimeline("Runtime: Memoizers"); - k.isMemoizer = !0; - return k; + k.countTimeline("Runtime: Memoizers"); + s.isMemoizer = !0; + return s; }; - })(h.Runtime || (h.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.Runtime || (k.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - function a(b, a, d) { - d.flags = a.flags; - d.name = a.isRuntimeName() ? b.pop() : a.name; - d.namespaces = a.isRuntimeNamespace() ? [b.pop()] : a.namespaces; +(function(d) { + (function(k) { + function a(b, a, e) { + e.flags = a.flags; + e.name = a.isRuntimeName() ? b.pop() : a.name; + e.namespaces = a.isRuntimeNamespace() ? [b.pop()] : a.namespaces; } - var s = c.AVM2.Runtime.Scope, v = c.AVM2.Runtime.asCoerceByMultiname, p = c.AVM2.Runtime.asGetSlot, u = c.AVM2.Runtime.asSetSlot, l = c.AVM2.Runtime.asCoerce, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.asAsType, t = c.AVM2.Runtime.asTypeOf, q = c.AVM2.Runtime.asIsInstanceOf, n = c.AVM2.Runtime.asIsType, k = c.AVM2.Runtime.applyType, f = c.AVM2.Runtime.createFunction, d = c.AVM2.Runtime.createClass, b = c.AVM2.Runtime.getDescendants, g = c.AVM2.Runtime.checkFilter, r = c.AVM2.Runtime.asAdd, - w = c.AVM2.Runtime.translateError, z = c.AVM2.Runtime.asCreateActivation, A = c.AVM2.Runtime.sliceArguments, B = c.ObjectUtilities.boxValue, M = c.ArrayUtilities.popManyInto, N = c.AVM2.Runtime.construct, K = c.AVM2.ABC.Multiname, y = c.Debug.assert, D = c.AVM2.Runtime.HasNext2Info, L = function() { + var r = d.AVM2.Runtime.Scope, v = d.AVM2.Runtime.asCoerceByMultiname, u = d.AVM2.Runtime.asGetSlot, t = d.AVM2.Runtime.asSetSlot, l = d.AVM2.Runtime.asCoerce, c = d.AVM2.Runtime.asCoerceString, h = d.AVM2.Runtime.asAsType, p = d.AVM2.Runtime.asTypeOf, s = d.AVM2.Runtime.asIsInstanceOf, m = d.AVM2.Runtime.asIsType, g = d.AVM2.Runtime.applyType, f = d.AVM2.Runtime.createFunction, b = d.AVM2.Runtime.createClass, e = d.AVM2.Runtime.getDescendants, q = d.AVM2.Runtime.checkFilter, n = d.AVM2.Runtime.asAdd, + x = d.AVM2.Runtime.translateError, L = d.AVM2.Runtime.asCreateActivation, A = d.AVM2.Runtime.sliceArguments, H = d.ObjectUtilities.boxValue, K = d.ArrayUtilities.popManyInto, F = d.AVM2.Runtime.construct, J = d.AVM2.ABC.Multiname, M = d.AVM2.Runtime.HasNext2Info, D = function() { function b(a) { this.parent = a; this.stack = []; @@ -21579,483 +21670,480 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A b.prototype.topScope = function() { this.scopes || (this.scopes = []); for (var b = this.parent, a = 0;a < this.stack.length;a++) { - var d = this.stack[a], g = this.isWith[a], e = this.scopes[a]; - e && e.parent === b && e.object === d && e.isWith === g || (e = this.scopes[a] = new s(b, d, g)); - b = e; + var e = this.stack[a], f = this.isWith[a], c = this.scopes[a]; + c && c.parent === b && c.object === e && c.isWith === f || (c = this.scopes[a] = new r(b, e, f)); + b = c; } return b; }; return b; - }(), H = function() { - function s() { + }(), B = function() { + function r() { } - s.interpretMethod = function(s, H, J, I) { - y(H.analysis); - h.countTimeline("Interpret Method"); - var G = H.abc, Z = G.constantPool.ints, Q = G.constantPool.uints, S = G.constantPool.doubles, O = G.constantPool.strings, P = G.methods, V = G.constantPool.multinames, $ = G.applicationDomain, W = H.exceptions; - s = [s]; - for (var x = [], ea = new L(J), Y = H.parameters.length, R = I.length, U, ba = 0;ba < Y;ba++) { - var X = H.parameters[ba]; - U = ba < R ? I[ba] : X.value; - X.type && !X.type.isAnyName() && (U = v(H, X.type, U)); - s.push(U); + r.interpretMethod = function(r, E, B, C) { + k.countTimeline("Interpret Method"); + var I = E.abc, P = I.constantPool.ints, T = I.constantPool.uints, O = I.constantPool.doubles, Q = I.constantPool.strings, S = I.methods, V = I.constantPool.multinames, aa = I.applicationDomain, $ = E.exceptions; + r = [r]; + for (var w = [], U = new D(B), ba = E.parameters.length, R = C.length, N, Z = 0;Z < ba;Z++) { + var fa = E.parameters[Z]; + N = Z < R ? C[Z] : fa.value; + fa.type && !fa.type.isAnyName() && (N = v(E, fa.type, N)); + r.push(N); } - H.needsRest() ? s.push(A(I, Y)) : H.needsArguments() && s.push(A(I, 0)); - I = H.analysis.bytecodes; - var ga, ja, aa, ia, T, da, Y = [], R = K.TEMPORARY, X = [], fa = 0, la = I.length; - a: for (;fa < la;) { + E.needsRest() ? r.push(A(C, ba)) : E.needsArguments() && r.push(A(C, 0)); + C = E.analysis.bytecodes; + var X, ia, ga, ca, da, ea, ba = [], R = J.TEMPORARY, fa = [], W = 0, ka = C.length; + a: for (;W < ka;) { try { - var ca = I[fa], na = ca.op; - switch(na | 0) { + var Y = C[W], la = Y.op; + switch(la | 0) { case 3: - throw x.pop();; + throw w.pop();; case 4: - a(x, V[ca.index], R); - x.push(x.pop().asGetSuper(J, R.namespaces, R.name, R.flags)); + a(w, V[Y.index], R); + w.push(w.pop().asGetSuper(B, R.namespaces, R.name, R.flags)); break; case 5: - U = x.pop(); - a(x, V[ca.index], R); - x.pop().asSetSuper(J, R.namespaces, R.name, R.flags, U); + N = w.pop(); + a(w, V[Y.index], R); + w.pop().asSetSuper(B, R.namespaces, R.name, R.flags, N); break; case 8: - s[ca.index] = void 0; + r[Y.index] = void 0; break; case 12: - da = x.pop(); - T = x.pop(); - fa = T < da ? fa + 1 : ca.offset; + ea = w.pop(); + da = w.pop(); + W = da < ea ? W + 1 : Y.offset; continue; case 24: - da = x.pop(); - T = x.pop(); - fa = T >= da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da >= ea ? Y.offset : W + 1; continue; case 13: - da = x.pop(); - T = x.pop(); - fa = T <= da ? fa + 1 : ca.offset; + ea = w.pop(); + da = w.pop(); + W = da <= ea ? W + 1 : Y.offset; continue; case 23: - da = x.pop(); - T = x.pop(); - fa = T > da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da > ea ? Y.offset : W + 1; continue; case 14: - da = x.pop(); - T = x.pop(); - fa = T > da ? fa + 1 : ca.offset; + ea = w.pop(); + da = w.pop(); + W = da > ea ? W + 1 : Y.offset; continue; case 22: - da = x.pop(); - T = x.pop(); - fa = T <= da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da <= ea ? Y.offset : W + 1; continue; case 15: - da = x.pop(); - T = x.pop(); - fa = T >= da ? fa + 1 : ca.offset; + ea = w.pop(); + da = w.pop(); + W = da >= ea ? W + 1 : Y.offset; continue; case 21: - da = x.pop(); - T = x.pop(); - fa = T < da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da < ea ? Y.offset : W + 1; continue; case 16: - fa = ca.offset; + W = Y.offset; continue; case 17: - fa = x.pop() ? ca.offset : fa + 1; + W = w.pop() ? Y.offset : W + 1; continue; case 18: - fa = x.pop() ? fa + 1 : ca.offset; + W = w.pop() ? W + 1 : Y.offset; continue; case 19: - da = x.pop(); - T = x.pop(); - fa = asEquals(T, da) ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = asEquals(da, ea) ? Y.offset : W + 1; continue; case 20: - da = x.pop(); - T = x.pop(); - fa = asEquals(T, da) ? fa + 1 : ca.offset; + ea = w.pop(); + da = w.pop(); + W = asEquals(da, ea) ? W + 1 : Y.offset; continue; case 25: - da = x.pop(); - T = x.pop(); - fa = T === da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da === ea ? Y.offset : W + 1; continue; case 26: - da = x.pop(); - T = x.pop(); - fa = T !== da ? ca.offset : fa + 1; + ea = w.pop(); + da = w.pop(); + W = da !== ea ? Y.offset : W + 1; continue; case 27: - ja = x.pop(); - if (0 > ja || ja >= ca.offsets.length) { - ja = ca.offsets.length - 1; + ia = w.pop(); + if (0 > ia || ia >= Y.offsets.length) { + ia = Y.offsets.length - 1; } - fa = ca.offsets[ja]; + W = Y.offsets[ia]; continue; case 28: - ea.push(B(x.pop()), !0); + U.push(H(w.pop()), !0); break; case 29: - ea.pop(); + U.pop(); break; case 30: - ja = x.pop(); - x[x.length - 1] = B(x[x.length - 1]).asNextName(ja); + ia = w.pop(); + w[w.length - 1] = H(w[w.length - 1]).asNextName(ia); break; case 35: - ja = x.pop(); - x[x.length - 1] = B(x[x.length - 1]).asNextValue(ja); + ia = w.pop(); + w[w.length - 1] = H(w[w.length - 1]).asNextValue(ia); break; case 50: - var ma = X[fa] || (X[fa] = new D(null, 0)); - ga = s[ca.object]; - ja = s[ca.index]; - ma.object = ga; - ma.index = ja; - Object(ga).asHasNext2(ma); - s[ca.object] = ma.object; - s[ca.index] = ma.index; - x.push(!!ma.index); + var ma = fa[W] || (fa[W] = new M(null, 0)); + X = r[Y.object]; + ia = r[Y.index]; + ma.object = X; + ma.index = ia; + Object(X).asHasNext2(ma); + r[Y.object] = ma.object; + r[Y.index] = ma.index; + w.push(!!ma.index); break; case 32: - x.push(null); + w.push(null); break; case 33: - x.push(void 0); + w.push(void 0); break; case 36: ; case 37: - x.push(ca.value); + w.push(Y.value); break; case 44: - x.push(O[ca.index]); + w.push(Q[Y.index]); break; case 45: - x.push(Z[ca.index]); + w.push(P[Y.index]); break; case 46: - x.push(Q[ca.index]); + w.push(T[Y.index]); break; case 47: - x.push(S[ca.index]); + w.push(O[Y.index]); break; case 38: - x.push(!0); + w.push(!0); break; case 39: - x.push(!1); + w.push(!1); break; case 40: - x.push(NaN); + w.push(NaN); break; case 41: - x.pop(); + w.pop(); break; case 42: - x.push(x[x.length - 1]); + w.push(w[w.length - 1]); break; case 43: - ga = x[x.length - 1]; - x[x.length - 1] = x[x.length - 2]; - x[x.length - 2] = ga; + X = w[w.length - 1]; + w[w.length - 1] = w[w.length - 2]; + w[w.length - 2] = X; break; case 48: - ea.push(B(x.pop()), !1); + U.push(H(w.pop()), !1); break; case 64: - x.push(f(P[ca.index], ea.topScope(), !0, !1)); + w.push(f(S[Y.index], U.topScope(), !0, !1)); break; case 65: - M(x, ca.argCount, Y); - ga = x.pop(); - x[x.length - 1] = x[x.length - 1].asApply(ga, Y); + K(w, Y.argCount, ba); + X = w.pop(); + w[w.length - 1] = w[w.length - 1].asApply(X, ba); break; case 66: - M(x, ca.argCount, Y); - x[x.length - 1] = N(x[x.length - 1], Y); + K(w, Y.argCount, ba); + w[w.length - 1] = F(w[w.length - 1], ba); break; case 71: return; case 72: - return H.returnType ? v(H, H.returnType, x.pop()) : x.pop(); + return E.returnType ? v(E, E.returnType, w.pop()) : w.pop(); case 73: - M(x, ca.argCount, Y); - ga = x.pop(); - J.object.baseClass.instanceConstructorNoInitialize.apply(ga, Y); + K(w, Y.argCount, ba); + X = w.pop(); + B.object.baseClass.instanceConstructorNoInitialize.apply(X, ba); break; case 74: - M(x, ca.argCount, Y); - a(x, V[ca.index], R); - ga = B(x[x.length - 1]); - ga = ga.asConstructProperty(R.namespaces, R.name, R.flags, Y); - x[x.length - 1] = ga; + K(w, Y.argCount, ba); + a(w, V[Y.index], R); + X = H(w[w.length - 1]); + X = X.asConstructProperty(R.namespaces, R.name, R.flags, ba); + w[w.length - 1] = X; break; case 75: - c.Debug.notImplemented("OP.callsuperid"); + d.Debug.notImplemented("OP.callsuperid"); break; case 76: ; case 70: ; case 79: - M(x, ca.argCount, Y); - a(x, V[ca.index], R); - ia = B(x.pop()).asCallProperty(R.namespaces, R.name, R.flags, 76 === na, Y); - 79 !== na && x.push(ia); + K(w, Y.argCount, ba); + a(w, V[Y.index], R); + ca = H(w.pop()).asCallProperty(R.namespaces, R.name, R.flags, 76 === la, ba); + 79 !== la && w.push(ca); break; case 69: ; case 78: - M(x, ca.argCount, Y); - a(x, V[ca.index], R); - ia = x.pop().asCallSuper(J, R.namespaces, R.name, R.flags, Y); - 78 !== na && x.push(ia); + K(w, Y.argCount, ba); + a(w, V[Y.index], R); + ca = w.pop().asCallSuper(B, R.namespaces, R.name, R.flags, ba); + 78 !== la && w.push(ca); break; case 83: - M(x, ca.argCount, Y); - x[x.length - 1] = k(H, x[x.length - 1], Y); + K(w, Y.argCount, ba); + w[w.length - 1] = g(E, w[w.length - 1], ba); break; case 85: - ga = {}; - for (ba = 0;ba < ca.argCount;ba++) { - U = x.pop(), ga[K.getPublicQualifiedName(x.pop())] = U; + X = {}; + for (Z = 0;Z < Y.argCount;Z++) { + N = w.pop(), X[J.getPublicQualifiedName(w.pop())] = N; } - x.push(ga); + w.push(X); break; case 86: - ga = []; - M(x, ca.argCount, Y); - ga.push.apply(ga, Y); - x.push(ga); + X = []; + K(w, Y.argCount, ba); + X.push.apply(X, ba); + w.push(X); break; case 87: - y(H.needsActivation()); - x.push(z(H)); + w.push(L(E)); break; case 88: - x[x.length - 1] = d(G.classes[ca.index], x[x.length - 1], ea.topScope()); + w[w.length - 1] = b(I.classes[Y.index], w[w.length - 1], U.topScope()); break; case 89: - a(x, V[ca.index], R); + a(w, V[Y.index], R); void 0 === R.name && (R.name = "*"); - x.push(b(x.pop(), R)); + w.push(e(w.pop(), R)); break; case 90: - y(W[ca.index].scopeObject); - x.push(W[ca.index].scopeObject); + w.push($[Y.index].scopeObject); break; case 94: ; case 93: - a(x, V[ca.index], R); - x.push(ea.topScope().findScopeProperty(R.namespaces, R.name, R.flags, H, 93 === na, !1)); + a(w, V[Y.index], R); + w.push(U.topScope().findScopeProperty(R.namespaces, R.name, R.flags, E, 93 === la, !1)); break; case 96: - aa = V[ca.index]; - ga = ea.topScope().findScopeProperty(aa.namespaces, aa.name, aa.flags, H, !0, !1); - x.push(ga.asGetProperty(aa.namespaces, aa.name, aa.flags)); + ga = V[Y.index]; + X = U.topScope().findScopeProperty(ga.namespaces, ga.name, ga.flags, E, !0, !1); + w.push(X.asGetProperty(ga.namespaces, ga.name, ga.flags)); break; case 104: ; case 97: - U = x.pop(); - a(x, V[ca.index], R); - B(x.pop()).asSetProperty(R.namespaces, R.name, R.flags, U); + N = w.pop(); + a(w, V[Y.index], R); + H(w.pop()).asSetProperty(R.namespaces, R.name, R.flags, N); break; case 98: - x.push(s[ca.index]); + w.push(r[Y.index]); break; case 99: - s[ca.index] = x.pop(); + r[Y.index] = w.pop(); break; case 100: - x.push(J.global.object); + w.push(B.global.object); break; case 101: - x.push(ea.get(ca.index)); + w.push(U.get(Y.index)); break; case 102: - a(x, V[ca.index], R); - x[x.length - 1] = B(x[x.length - 1]).asGetProperty(R.namespaces, R.name, R.flags); + a(w, V[Y.index], R); + w[w.length - 1] = H(w[w.length - 1]).asGetProperty(R.namespaces, R.name, R.flags); break; case 106: - a(x, V[ca.index], R); - x[x.length - 1] = B(x[x.length - 1]).asDeleteProperty(R.namespaces, R.name, R.flags); + a(w, V[Y.index], R); + w[w.length - 1] = H(w[w.length - 1]).asDeleteProperty(R.namespaces, R.name, R.flags); break; case 108: - x[x.length - 1] = p(x[x.length - 1], ca.index); + w[w.length - 1] = u(w[w.length - 1], Y.index); break; case 109: - U = x.pop(); - ga = x.pop(); - u(ga, ca.index, U); + N = w.pop(); + X = w.pop(); + t(X, Y.index, N); break; case 112: - x[x.length - 1] = e(x[x.length - 1]); + w[w.length - 1] = c(w[w.length - 1]); break; case 114: - x[x.length - 1] = h.Runtime.escapeXMLAttribute(x[x.length - 1]); + w[w.length - 1] = k.Runtime.escapeXMLAttribute(w[w.length - 1]); break; case 113: - x[x.length - 1] = h.Runtime.escapeXMLElement(x[x.length - 1]); + w[w.length - 1] = k.Runtime.escapeXMLElement(w[w.length - 1]); break; case 131: ; case 115: - x[x.length - 1] |= 0; + w[w.length - 1] |= 0; break; case 136: ; case 116: - x[x.length - 1] >>>= 0; + w[w.length - 1] >>>= 0; break; case 132: ; case 117: - x[x.length - 1] = +x[x.length - 1]; + w[w.length - 1] = +w[w.length - 1]; break; case 129: ; case 118: - x[x.length - 1] = !!x[x.length - 1]; + w[w.length - 1] = !!w[w.length - 1]; break; case 120: - x[x.length - 1] = g(x[x.length - 1]); + w[w.length - 1] = q(w[w.length - 1]); break; case 128: - x[x.length - 1] = l($.getType(V[ca.index]), x[x.length - 1]); + w[w.length - 1] = l(aa.getType(V[Y.index]), w[w.length - 1]); break; case 130: break; case 133: - x[x.length - 1] = e(x[x.length - 1]); + w[w.length - 1] = c(w[w.length - 1]); break; case 134: - x[x.length - 2] = m($.getType(V[ca.index]), x[x.length - 1]); + w[w.length - 2] = h(aa.getType(V[Y.index]), w[w.length - 1]); break; case 135: - x[x.length - 2] = m(x.pop(), x[x.length - 1]); + w[w.length - 2] = h(w.pop(), w[w.length - 1]); break; case 137: - ga = x[x.length - 1]; - x[x.length - 1] = void 0 == ga ? null : ga; + X = w[w.length - 1]; + w[w.length - 1] = void 0 == X ? null : X; break; case 144: - x[x.length - 1] = -x[x.length - 1]; + w[w.length - 1] = -w[w.length - 1]; break; case 145: - ++x[x.length - 1]; + ++w[w.length - 1]; break; case 146: - ++s[ca.index]; + ++r[Y.index]; break; case 147: - --x[x.length - 1]; + --w[w.length - 1]; break; case 148: - --s[ca.index]; + --r[Y.index]; break; case 149: - x[x.length - 1] = t(x[x.length - 1]); + w[w.length - 1] = p(w[w.length - 1]); break; case 150: - x[x.length - 1] = !x[x.length - 1]; + w[w.length - 1] = !w[w.length - 1]; break; case 151: - x[x.length - 1] = ~x[x.length - 1]; + w[w.length - 1] = ~w[w.length - 1]; break; case 160: - x[x.length - 2] = r(x[x.length - 2], x.pop()); + w[w.length - 2] = n(w[w.length - 2], w.pop()); break; case 161: - x[x.length - 2] -= x.pop(); + w[w.length - 2] -= w.pop(); break; case 162: - x[x.length - 2] *= x.pop(); + w[w.length - 2] *= w.pop(); break; case 163: - x[x.length - 2] /= x.pop(); + w[w.length - 2] /= w.pop(); break; case 164: - x[x.length - 2] %= x.pop(); + w[w.length - 2] %= w.pop(); break; case 165: - x[x.length - 2] <<= x.pop(); + w[w.length - 2] <<= w.pop(); break; case 166: - x[x.length - 2] >>= x.pop(); + w[w.length - 2] >>= w.pop(); break; case 167: - x[x.length - 2] >>>= x.pop(); + w[w.length - 2] >>>= w.pop(); break; case 168: - x[x.length - 2] &= x.pop(); + w[w.length - 2] &= w.pop(); break; case 169: - x[x.length - 2] |= x.pop(); + w[w.length - 2] |= w.pop(); break; case 170: - x[x.length - 2] ^= x.pop(); + w[w.length - 2] ^= w.pop(); break; case 171: - x[x.length - 2] = asEquals(x[x.length - 2], x.pop()); + w[w.length - 2] = asEquals(w[w.length - 2], w.pop()); break; case 172: - x[x.length - 2] = x[x.length - 2] === x.pop(); + w[w.length - 2] = w[w.length - 2] === w.pop(); break; case 173: - x[x.length - 2] = x[x.length - 2] < x.pop(); + w[w.length - 2] = w[w.length - 2] < w.pop(); break; case 174: - x[x.length - 2] = x[x.length - 2] <= x.pop(); + w[w.length - 2] = w[w.length - 2] <= w.pop(); break; case 175: - x[x.length - 2] = x[x.length - 2] > x.pop(); + w[w.length - 2] = w[w.length - 2] > w.pop(); break; case 176: - x[x.length - 2] = x[x.length - 2] >= x.pop(); + w[w.length - 2] = w[w.length - 2] >= w.pop(); break; case 177: - x[x.length - 2] = q(x.pop(), x[x.length - 1]); + w[w.length - 2] = s(w.pop(), w[w.length - 1]); break; case 178: - x[x.length - 1] = n($.getType(V[ca.index]), x[x.length - 1]); + w[w.length - 1] = m(aa.getType(V[Y.index]), w[w.length - 1]); break; case 179: - x[x.length - 2] = n(x.pop(), x[x.length - 1]); + w[w.length - 2] = m(w.pop(), w[w.length - 1]); break; case 180: - x[x.length - 2] = B(x.pop()).asHasProperty(null, x[x.length - 1]); + w[w.length - 2] = H(w.pop()).asHasProperty(null, w[w.length - 1]); break; case 192: - x[x.length - 1] = (x[x.length - 1] | 0) + 1; + w[w.length - 1] = (w[w.length - 1] | 0) + 1; break; case 193: - x[x.length - 1] = (x[x.length - 1] | 0) - 1; + w[w.length - 1] = (w[w.length - 1] | 0) - 1; break; case 194: - s[ca.index] = (s[ca.index] | 0) + 1; + r[Y.index] = (r[Y.index] | 0) + 1; break; case 195: - s[ca.index] = (s[ca.index] | 0) - 1; + r[Y.index] = (r[Y.index] | 0) - 1; break; case 196: - x[x.length - 1] = ~x[x.length - 1]; + w[w.length - 1] = ~w[w.length - 1]; break; case 197: - x[x.length - 2] = x[x.length - 2] + x.pop() | 0; + w[w.length - 2] = w[w.length - 2] + w.pop() | 0; break; case 198: - x[x.length - 2] = x[x.length - 2] - x.pop() | 0; + w[w.length - 2] = w[w.length - 2] - w.pop() | 0; break; case 199: - x[x.length - 2] = x[x.length - 2] * x.pop() | 0; + w[w.length - 2] = w[w.length - 2] * w.pop() | 0; break; case 208: ; @@ -22064,7 +22152,7 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A case 210: ; case 211: - x.push(s[na - 208]); + w.push(r[la - 208]); break; case 212: ; @@ -22073,13 +22161,13 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A case 214: ; case 215: - s[na - 212] = x.pop(); + r[la - 212] = w.pop(); break; case 6: - c.AVM2.AS.ASXML.defaultNamespace = O[ca.index]; + d.AVM2.AS.ASXML.defaultNamespace = Q[Y.index]; break; case 7: - c.AVM2.AS.ASXML.defaultNamespace = x.pop(); + d.AVM2.AS.ASXML.defaultNamespace = w.pop(); break; case 239: ; @@ -22088,34 +22176,34 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A case 241: break; default: - c.Debug.notImplemented(c.AVM2.opcodeName(na)); + d.Debug.notImplemented(d.AVM2.opcodeName(la)); } - fa++; - } catch (ra) { - if (1 > W.length) { - throw ra; + W++; + } catch (na) { + if (1 > $.length) { + throw na; } - for (var ra = w($, ra), ba = 0, wa = W.length;ba < wa;ba++) { - var qa = W[ba]; - if (fa >= qa.start && fa <= qa.end && (!qa.typeName || $.getType(qa.typeName).isType(ra))) { - x.length = 0; - x.push(ra); - ea.clear(); - fa = qa.offset; + for (var na = x(aa, na), Z = 0, sa = $.length;Z < sa;Z++) { + var pa = $[Z]; + if (W >= pa.start && W <= pa.end && (!pa.typeName || aa.getType(pa.typeName).isType(na))) { + w.length = 0; + w.push(na); + U.clear(); + W = pa.offset; continue a; } } - throw ra; + throw na; } } }; - return s; + return r; }(); - h.Interpreter = H; - })(c.AVM2 || (c.AVM2 = {})); + k.Interpreter = B; + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { a.VM_METHOD_OVERRIDES["static mochi.as3.MochiServices::connect"] = function() { }; @@ -22137,11 +22225,8 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A }; a.VM_METHOD_OVERRIDES["org.robotlegs.base.CommandMap::org.robotlegs.base:CommandMap.verifyCommandClass"] = function() { }; - a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.PropertyInjectionPoint::org.swiftsuspenders.injectionpoints:PropertyInjectionPoint.initializeInjection"] = function() { - }; - a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.NoParamsConstructorInjectionPoint::applyInjection"] = function() { - }; - a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.PropertyInjectionPoint::applyInjection"] = function() { + a.VM_METHOD_OVERRIDES["static utility.SWFUtils::getCompilationDate"] = function() { + return new Date("Wed Oct 8 16:08:55 2014 UTC"); }; a.VM_METHOD_OVERRIDES["com.spilgames.api.components.TextFields.AutoFitTextFieldEx::com.spilgames.api.components.TextFields:AutoFitTextFieldEx.updateProperties"] = a.VM_METHOD_OVERRIDES["com.spilgames.api.components.TextFields.AutoFitTextFieldEx::com.spilgames.api.components.TextFields:AutoFitTextFieldEx.updateTextSize"] = function() { }; @@ -22154,64 +22239,64 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A a.VM_METHOD_OVERRIDES["facebook.utils.FBURI::is_facebook_cdn_url"] = function() { return!!this.asGetPublicProperty("authority"); }; - })(c.Runtime || (c.Runtime = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.Runtime || (d.Runtime = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { function a(b, a) { if (65535 < a.length) { throw "AMF short string exceeded"; } if (a.length) { - var d = c.StringUtilities.utf8decode(a); - b.writeByte(d.length >> 8 & 255); - b.writeByte(d.length & 255); - for (var e = 0;e < d.length;e++) { - b.writeByte(d[e]); + var e = d.StringUtilities.utf8decode(a); + b.writeByte(e.length >> 8 & 255); + b.writeByte(e.length & 255); + for (var f = 0;f < e.length;f++) { + b.writeByte(e[f]); } } else { b.writeByte(0), b.writeByte(0); } } - function s(b) { + function r(b) { var a = b.readByte() << 8 | b.readByte(); if (!a) { return ""; } - for (var d = new Uint8Array(a), e = 0;e < a;e++) { - d[e] = b.readByte(); + for (var e = new Uint8Array(a), f = 0;f < a;f++) { + e[f] = b.readByte(); } - return c.StringUtilities.utf8encode(d); + return d.StringUtilities.utf8encode(e); } function v(b, a) { - var d = new ArrayBuffer(8), e = new DataView(d); - e.setFloat64(0, a, !1); - for (var f = 0;f < d.byteLength;f++) { - b.writeByte(e.getUint8(f)); + var e = new ArrayBuffer(8), f = new DataView(e); + f.setFloat64(0, a, !1); + for (var c = 0;c < e.byteLength;c++) { + b.writeByte(f.getUint8(c)); } } - function p(b) { - for (var a = new ArrayBuffer(8), d = new DataView(a), e = 0;e < a.byteLength;e++) { - d.setUint8(e, b.readByte()); - } - return d.getFloat64(0, !1); - } function u(b) { + for (var a = new ArrayBuffer(8), e = new DataView(a), f = 0;f < a.byteLength;f++) { + e.setUint8(f, b.readByte()); + } + return e.getFloat64(0, !1); + } + function t(b) { var a = b.readByte(); if (0 === (a & 128)) { return a; } - var d = b.readByte(); - if (0 === (d & 128)) { - return(a & 127) << 7 | d; - } var e = b.readByte(); if (0 === (e & 128)) { - return(a & 127) << 14 | (d & 127) << 7 | e; + return(a & 127) << 7 | e; + } + var f = b.readByte(); + if (0 === (f & 128)) { + return(a & 127) << 14 | (e & 127) << 7 | f; } b = b.readByte(); - return(a & 127) << 22 | (d & 127) << 15 | (e & 127) << 8 | b; + return(a & 127) << 22 | (e & 127) << 15 | (f & 127) << 8 | b; } function l(b, a) { if (0 === (a & 4294967168)) { @@ -22232,39 +22317,39 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A } } } - function e(b, a) { - var d = u(b); - if (1 === d) { + function c(b, a) { + var e = t(b); + if (1 === e) { return ""; } - var e = a.stringsCache || (a.stringsCache = []); - if (0 === (d & 1)) { - return e[d >> 1]; + var f = a.stringsCache || (a.stringsCache = []); + if (0 === (e & 1)) { + return f[e >> 1]; } - for (var d = d >> 1, f = new Uint8Array(d), k = 0;k < d;k++) { - f[k] = b.readByte(); + for (var e = e >> 1, c = new Uint8Array(e), g = 0;g < e;g++) { + c[g] = b.readByte(); } - d = c.StringUtilities.utf8encode(f); - e.push(d); - return d; + e = d.StringUtilities.utf8encode(c); + f.push(e); + return e; } - function m(b, a, d) { + function h(b, a, e) { if ("" === a) { b.writeByte(1); } else { - d = d.stringsCache || (d.stringsCache = []); - var e = d.indexOf(a); - if (0 <= e) { - l(b, e << 1); + e = e.stringsCache || (e.stringsCache = []); + var f = e.indexOf(a); + if (0 <= f) { + l(b, f << 1); } else { - for (d.push(a), a = c.StringUtilities.utf8decode(a), l(b, 1 | a.length << 1), d = 0;d < a.length;d++) { - b.writeByte(a[d]); + for (e.push(a), a = d.StringUtilities.utf8decode(a), l(b, 1 | a.length << 1), e = 0;e < a.length;e++) { + b.writeByte(a[e]); } } } } - function t(b, a) { - var f = b.readByte(); + function p(a, e) { + var f = a.readByte(); switch(f) { case 1: return null; @@ -22275,91 +22360,91 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A case 3: return!0; case 4: - return u(b); + return t(a); case 5: - return p(b); + return u(a); case 6: - return e(b, a); + return c(a, e); case 8: - return new Date(p(b)); + return new Date(u(a)); case 10: - var c = u(b); - if (0 === (c & 1)) { - return a.objectsCache[c >> 1]; + var h = t(a); + if (0 === (h & 1)) { + return e.objectsCache[h >> 1]; } - if (0 !== (c & 4)) { + if (0 !== (h & 4)) { throw "AMF3 Traits-Ext is not supported"; } - var m, l; - if (0 === (c & 2)) { - m = a.traitsCache[c >> 2], l = m.class; + var d, m; + if (0 === (h & 2)) { + d = e.traitsCache[h >> 2], m = d.class; } else { - m = {}; - f = e(b, a); - l = (m.className = f) && h.aliasesCache.names[f]; - m.class = l; - m.isDynamic = 0 !== (c & 8); - m.members = []; - for (var n = l && l.instanceBindings.slots, f = 0, c = c >> 4;f < c;f++) { - for (var q = e(b, a), s = null, c = 1;n && c < n.length;c++) { - if (n[c].name.name === q) { - s = n[c]; + d = {}; + f = c(a, e); + m = (d.className = f) && k.aliasesCache.names[f]; + d.class = m; + d.isDynamic = 0 !== (h & 8); + d.members = []; + for (var l = m && m.instanceBindings.slots, f = 0, h = h >> 4;f < h;f++) { + for (var s = c(a, e), r = null, h = 1;l && h < l.length;h++) { + if (l[h].name.name === s) { + r = l[h]; break; } } - m.members.push(s ? k.getQualifiedName(s.name) : k.getPublicQualifiedName(q)); + d.members.push(r ? g.getQualifiedName(r.name) : g.getPublicQualifiedName(s)); } - (a.traitsCache || (a.traitsCache = [])).push(m); + (e.traitsCache || (e.traitsCache = [])).push(d); } - n = l ? d(l, []) : {}; - (a.objectsCache || (a.objectsCache = [])).push(n); - for (f = 0;f < m.members.length;f++) { - l = t(b, a), n[m.members[f]] = l; + l = m ? b(m, []) : {}; + (e.objectsCache || (e.objectsCache = [])).push(l); + for (f = 0;f < d.members.length;f++) { + m = p(a, e), l[d.members[f]] = m; } - if (m.isDynamic) { + if (d.isDynamic) { for (;;) { - f = e(b, a); + f = c(a, e); if (!f.length) { break; } - l = t(b, a); - n.asSetPublicProperty(f, l); + m = p(a, e); + l.asSetPublicProperty(f, m); } } - return n; + return l; case 9: - c = u(b); - if (0 === (c & 1)) { - return a.objectsCache[c >> 1]; + h = t(a); + if (0 === (h & 1)) { + return e.objectsCache[h >> 1]; } - m = []; - (a.objectsCache || (a.objectsCache = [])).push(m); - for (n = c >> 1;;) { - f = e(b, a); + d = []; + (e.objectsCache || (e.objectsCache = [])).push(d); + for (l = h >> 1;;) { + f = c(a, e); if (!f.length) { break; } - l = t(b, a); - m.asSetPublicProperty(f, l); + m = p(a, e); + d.asSetPublicProperty(f, m); } - for (f = 0;f < n;f++) { - l = t(b, a), m.asSetPublicProperty(f, l); + for (f = 0;f < l;f++) { + m = p(a, e), d.asSetPublicProperty(f, m); } - return m; + return d; default: throw "AMF3 Unknown marker " + f;; } } - function q(b, a, d) { - d = d.objectsCache || (d.objectsCache = []); - var e = d.indexOf(a); - if (0 > e) { - return d.push(a), !1; + function s(b, a, e) { + e = e.objectsCache || (e.objectsCache = []); + var f = e.indexOf(a); + if (0 > f) { + return e.push(a), !1; } - l(b, e << 1); + l(b, f << 1); return!0; } - function n(b, a, d) { + function m(b, a, e) { switch(typeof a) { case "boolean": b.writeByte(a ? 3 : 2); @@ -22372,7 +22457,7 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A break; case "string": b.writeByte(6); - m(b, a, d); + h(b, a, e); break; case "object": if (null === a) { @@ -22380,71 +22465,71 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A } else { if (Array.isArray(a)) { b.writeByte(9); - if (q(b, a, d)) { + if (s(b, a, e)) { break; } - for (var e = 0;e in a;) { - ++e; + for (var c = 0;c in a;) { + ++c; } - l(b, e << 1 | 1); + l(b, c << 1 | 1); f(a, function(a, f) { - c.isNumeric(a) && 0 <= a && a < e || (m(b, a, d), n(b, f, d)); + d.isNumeric(a) && 0 <= a && a < c || (h(b, a, e), m(b, f, e)); }); - m(b, "", d); - for (var t = 0;t < e;t++) { - n(b, a[t], d); + h(b, "", e); + for (var p = 0;p < c;p++) { + m(b, a[p], e); } } else { if (a instanceof Date) { b.writeByte(8); - if (q(b, a, d)) { + if (s(b, a, e)) { break; } l(b, 1); v(b, a.valueOf()); } else { b.writeByte(10); - if (q(b, a, d)) { + if (s(b, a, e)) { break; } - var t = !0, s = a.class; - if (s) { - var t = !s.classInfo.instanceInfo.isSealed(), p = h.aliasesCache.classes.get(s) || "", u, K = d.traitsCache || (d.traitsCache = []), y = d.traitsInfos || (d.traitsInfos = []), D = K.indexOf(s); + var p = !0, r = a.class; + if (r) { + var p = !r.classInfo.instanceInfo.isSealed(), u = k.aliasesCache.classes.get(r) || "", t, J = e.traitsCache || (e.traitsCache = []), M = e.traitsInfos || (e.traitsInfos = []), D = J.indexOf(r); if (0 > D) { - var L = s.instanceBindings.slots; - u = []; - for (var D = [], H = 1;H < L.length;H++) { - var J = L[H]; - J.name.getNamespace().isPublic() && (u.push(k.getQualifiedName(J.name)), D.push(J.name.name)); + var B = r.instanceBindings.slots; + t = []; + for (var D = [], E = 1;E < B.length;E++) { + var y = B[E]; + y.name.getNamespace().isPublic() && (t.push(g.getQualifiedName(y.name)), D.push(y.name.name)); } - K.push(s); - y.push(u); - s = D.length; - l(b, (t ? 11 : 3) + (s << 4)); - m(b, p, d); - for (H = 0;H < s;H++) { - m(b, D[H], d); + J.push(r); + M.push(t); + r = D.length; + l(b, (p ? 11 : 3) + (r << 4)); + h(b, u, e); + for (E = 0;E < r;E++) { + h(b, D[E], e); } } else { - u = y[D], s = u.length, l(b, 1 + (D << 2)); + t = M[D], r = t.length, l(b, 1 + (D << 2)); } - for (H = 0;H < s;H++) { - n(b, a[u[H]], d); + for (E = 0;E < r;E++) { + m(b, a[t[E]], e); } } else { - l(b, 11), m(b, "", d); + l(b, 11), h(b, "", e); } - t && (f(a, function(a, e) { - m(b, a, d); - n(b, e, d); - }), m(b, "", d)); + p && (f(a, function(a, f) { + h(b, a, e); + m(b, f, e); + }), h(b, "", e)); } } } ; } } - var k = c.AVM2.ABC.Multiname, f = c.AVM2.Runtime.forEachPublicProperty, d = c.AVM2.Runtime.construct; + var g = d.AVM2.ABC.Multiname, f = d.AVM2.Runtime.forEachPublicProperty, b = d.AVM2.Runtime.construct; (function(b) { b[b.NUMBER = 0] = "NUMBER"; b[b.BOOLEAN = 1] = "BOOLEAN"; @@ -22461,34 +22546,34 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A b[b.XML = 15] = "XML"; b[b.TYPED_OBJECT = 16] = "TYPED_OBJECT"; b[b.AVMPLUS = 17] = "AVMPLUS"; - })(h.AMF0Marker || (h.AMF0Marker = {})); - var b = function() { + })(k.AMF0Marker || (k.AMF0Marker = {})); + var e = function() { function b() { } - b.write = function(b, d) { - switch(typeof d) { + b.write = function(b, e) { + switch(typeof e) { case "boolean": b.writeByte(1); - b.writeByte(d ? 1 : 0); + b.writeByte(e ? 1 : 0); break; case "number": b.writeByte(0); - v(b, d); + v(b, e); break; case "undefined": b.writeByte(6); break; case "string": b.writeByte(2); - a(b, d); + a(b, e); break; case "object": - null === d ? b.writeByte(5) : (Array.isArray(d) ? (b.writeByte(8), b.writeByte(d.length >>> 24 & 255), b.writeByte(d.length >> 16 & 255), b.writeByte(d.length >> 8 & 255), b.writeByte(d.length & 255), f(d, function(d, g) { - a(b, d); - this.write(b, g); - }, this)) : (b.writeByte(3), f(d, function(d, g) { - a(b, d); - this.write(b, g); + null === e ? b.writeByte(5) : (Array.isArray(e) ? (b.writeByte(8), b.writeByte(e.length >>> 24 & 255), b.writeByte(e.length >> 16 & 255), b.writeByte(e.length >> 8 & 255), b.writeByte(e.length & 255), f(e, function(e, f) { + a(b, e); + this.write(b, f); + }, this)) : (b.writeByte(3), f(e, function(e, f) { + a(b, e); + this.write(b, f); }, this)), b.writeByte(0), b.writeByte(0), b.writeByte(9)); } }; @@ -22496,58 +22581,58 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A var a = b.readByte(); switch(a) { case 0: - return p(b); + return u(b); case 1: return!!b.readByte(); case 2: - return s(b); + return r(b); case 3: - for (var d = {};;) { - a = s(b); + for (var e = {};;) { + a = r(b); if (!a.length) { break; } - var g = this.read(b); - d.asSetPublicProperty(a, g); + var f = this.read(b); + e.asSetPublicProperty(a, f); } if (9 !== b.readByte()) { throw "AMF0 End marker is not found"; } - return d; + return e; case 5: return null; case 6: break; case 8: - d = []; - for (d.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte();;) { - a = s(b); + e = []; + for (e.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte();;) { + a = r(b); if (!a.length) { break; } - g = this.read(b); - d.asSetPublicProperty(a, g); + f = this.read(b); + e.asSetPublicProperty(a, f); } if (9 !== b.readByte()) { throw "AMF0 End marker is not found"; } - return d; + return e; case 10: - d = []; - d.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte(); - for (a = 0;a < d.length;a++) { - d[a] = this.read(b); + e = []; + e.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte(); + for (a = 0;a < e.length;a++) { + e[a] = this.read(b); } - return d; + return e; case 17: - return t(b, {}); + return p(b, {}); default: throw "AMF0 Unknown marker " + a;; } }; return b; }(); - h.AMF0 = b; + k.AMF0 = e; (function(b) { b[b.UNDEFINED = 0] = "UNDEFINED"; b[b.NULL = 1] = "NULL"; @@ -22567,623 +22652,622 @@ var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.A b[b.VECTOR_DOUBLE = 15] = "VECTOR_DOUBLE"; b[b.VECTOR_OBJECT = 16] = "VECTOR_OBJECT"; b[b.DICTIONARY = 17] = "DICTIONARY"; - })(h.AMF3Marker || (h.AMF3Marker = {})); - h.aliasesCache = {classes:new WeakMap, names:Object.create(null)}; - b = function() { + })(k.AMF3Marker || (k.AMF3Marker = {})); + k.aliasesCache = {classes:new WeakMap, names:Object.create(null)}; + e = function() { function b() { } b.write = function(b, a) { - n(b, a, {}); + m(b, a, {}); }; b.read = function(b) { - return t(b, {}); + return p(b, {}); }; return b; }(); - h.AMF3 = b; - })(c.AVM2 || (c.AVM2 = {})); + k.AMF3 = e; + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load AVM2 Dependencies"); console.time("Load SWF Parser"); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function h(a, e, c) { - return v(a, e, c) << 32 - c >> 32 - c; + function r(a, c, d) { + return k(a, c, d) << 32 - d >> 32 - d; } - function v(a, e, c) { - for (var l = e.bitBuffer, k = e.bitLength;c > k;) { - l = l << 8 | a[e.pos++], k += 8; + function k(a, c, d) { + for (var m = c.bitBuffer, g = c.bitLength;d > g;) { + m = m << 8 | a[c.pos++], g += 8; } - k -= c; - a = l >>> k & u[c]; - e.bitBuffer = l; - e.bitLength = k; + g -= d; + a = m >>> g & t[d]; + c.bitBuffer = m; + c.bitLength = g; return a; } - var p = Math.pow; - a.readSi8 = function(a, e) { - return e.getInt8(e.pos++); + var u = Math.pow; + a.readSi8 = function(a, c) { + return c.getInt8(c.pos++); }; - a.readSi16 = function(a, e) { - return e.getInt16(e.pos, e.pos += 2); + a.readSi16 = function(a, c) { + return c.getInt16(c.pos, c.pos += 2); }; - a.readSi32 = function(a, e) { - return e.getInt32(e.pos, e.pos += 4); + a.readSi32 = function(a, c) { + return c.getInt32(c.pos, c.pos += 4); }; - a.readUi8 = function(a, e) { - return a[e.pos++]; + a.readUi8 = function(a, c) { + return a[c.pos++]; }; - a.readUi16 = function(a, e) { - return e.getUint16(e.pos, e.pos += 2); + a.readUi16 = function(a, c) { + return c.getUint16(c.pos, c.pos += 2); }; - a.readUi32 = function(a, e) { - return e.getUint32(e.pos, e.pos += 4); + a.readUi32 = function(a, c) { + return c.getUint32(c.pos, c.pos += 4); }; - a.readFixed = function(a, e) { - return e.getInt32(e.pos, e.pos += 4) / 65536; + a.readFixed = function(a, c) { + return c.getInt32(c.pos, c.pos += 4) / 65536; }; - a.readFixed8 = function(a, e) { - return e.getInt16(e.pos, e.pos += 2) / 256; + a.readFixed8 = function(a, c) { + return c.getInt16(c.pos, c.pos += 2) / 256; }; - a.readFloat16 = function(a, e) { - var c = e.getUint16(e.pos); - e.pos += 2; - var l = c >> 15 ? -1 : 1, k = (c & 31744) >> 10, c = c & 1023; - return k ? 31 === k ? c ? NaN : Infinity * l : l * p(2, k - 15) * (1 + c / 1024) : l * p(2, -14) * (c / 1024); + a.readFloat16 = function(a, c) { + var d = c.getUint16(c.pos); + c.pos += 2; + var m = d >> 15 ? -1 : 1, g = (d & 31744) >> 10, d = d & 1023; + return g ? 31 === g ? d ? NaN : Infinity * m : m * u(2, g - 15) * (1 + d / 1024) : m * u(2, -14) * (d / 1024); }; - a.readFloat = function(a, e) { - return e.getFloat32(e.pos, e.pos += 4); + a.readFloat = function(a, c) { + return c.getFloat32(c.pos, c.pos += 4); }; - a.readDouble = function(a, e) { - return e.getFloat64(e.pos, e.pos += 8); + a.readDouble = function(a, c) { + return c.getFloat64(c.pos, c.pos += 8); }; - a.readEncodedU32 = function(a, e) { - var c = a[e.pos++]; - if (!(c & 128)) { - return c; + a.readEncodedU32 = function(a, c) { + var d = a[c.pos++]; + if (!(d & 128)) { + return d; } - c = c & 127 | a[e.pos++] << 7; - if (!(c & 16384)) { - return c; + d = d & 127 | a[c.pos++] << 7; + if (!(d & 16384)) { + return d; } - c = c & 16383 | a[e.pos++] << 14; - if (!(c & 2097152)) { - return c; + d = d & 16383 | a[c.pos++] << 14; + if (!(d & 2097152)) { + return d; } - c = c & 2097151 | a[e.pos++] << 21; - return c & 268435456 ? c & 268435455 | a[e.pos++] << 28 : c; + d = d & 2097151 | a[c.pos++] << 21; + return d & 268435456 ? d & 268435455 | a[c.pos++] << 28 : d; }; - a.readBool = function(a, e) { - return!!a[e.pos++]; + a.readBool = function(a, c) { + return!!a[c.pos++]; }; - a.align = function(a, e) { - e.align(); + a.align = function(a, c) { + c.align(); }; - a.readSb = h; - for (var u = new Uint32Array(33), l = 1, e = 0;32 >= l;++l) { - u[l] = e = e << 1 | 1; + a.readSb = r; + for (var t = new Uint32Array(33), l = 1, c = 0;32 >= l;++l) { + t[l] = c = c << 1 | 1; } - a.readUb = v; - a.readFb = function(a, e, c) { - return h(a, e, c) / 65536; + a.readUb = k; + a.readFb = function(a, c, d) { + return r(a, c, d) / 65536; }; - a.readString = function(a, e, l) { - var n = e.pos; + a.readString = function(a, c, l) { + var m = c.pos; if (l) { - a = a.subarray(n, n += l); + a = a.subarray(m, m += l); } else { l = 0; - for (var k = n;a[k];k++) { + for (var g = m;a[g];g++) { l++; } - a = a.subarray(n, n += l); - n++; + a = a.subarray(m, m += l); + m++; } - e.pos = n; - e = c.StringUtilities.utf8encode(a); - 0 <= e.indexOf("\x00") && (e = e.split("\x00").join("")); - return e; + c.pos = m; + c = d.StringUtilities.utf8encode(a); + 0 <= c.indexOf("\x00") && (c = c.split("\x00").join("")); + return c; }; - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(k.Parser || (k.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - function v(d, g, e, f, k) { - e || (e = {}); - e.id = a.readUi16(d, g); - var c = e.lineBounds = {}; - b(d, g, c, f, k); - if (c = e.isMorph = 46 === k || 84 === k) { - var m = e.lineBoundsMorph = {}; - b(d, g, m, f, k); + (function(r) { + function k(b, f, c, g, h) { + c || (c = {}); + c.id = a.readUi16(b, f); + var n = c.lineBounds = {}; + e(b, f, n, g, h); + if (n = c.isMorph = 46 === h || 84 === h) { + var q = c.lineBoundsMorph = {}; + e(b, f, q, g, h); } - if (m = e.canHaveStrokes = 83 === k || 84 === k) { - var l = e.fillBounds = {}; - b(d, g, l, f, k); - c && (l = e.fillBoundsMorph = {}, b(d, g, l, f, k)); - e.flags = a.readUi8(d, g); + if (q = c.canHaveStrokes = 83 === h || 84 === h) { + var d = c.fillBounds = {}; + e(b, f, d, g, h); + n && (d = c.fillBoundsMorph = {}, e(b, f, d, g, h)); + c.flags = a.readUi8(b, f); } - if (c) { - e.offsetMorph = a.readUi32(d, g); - var r = e, n, w, l = B(d, g, r, f, k, c, m), q = l.lineBits, t = l.fillBits, h = r.records = []; + if (n) { + c.offsetMorph = a.readUi32(b, f); + var m = c, l, p, d = H(b, f, m, g, h, n, q), s = d.lineBits, r = d.fillBits, x = m.records = []; do { - var s = {}, l = A(d, g, s, f, k, c, t, q, m, w); - n = l.eos; - t = l.fillBits; - q = l.lineBits; - w = l.bits; - h.push(s); - } while (!n); - l = M(d, g); - t = l.fillBits; - q = l.lineBits; - r = r.recordsMorph = []; + var u = {}, d = A(b, f, u, g, h, n, r, s, q, p); + l = d.eos; + r = d.fillBits; + s = d.lineBits; + p = d.bits; + x.push(u); + } while (!l); + d = K(b, f); + r = d.fillBits; + s = d.lineBits; + m = m.recordsMorph = []; do { - h = {}, l = A(d, g, h, f, k, c, t, q, m, w), n = l.eos, t = l.fillBits, q = l.lineBits, w = l.bits, r.push(h); - } while (!n); + x = {}, d = A(b, f, x, g, h, n, r, s, q, p), l = d.eos, r = d.fillBits, s = d.lineBits, p = d.bits, m.push(x); + } while (!l); } else { - t = e; - w = B(d, g, t, f, k, c, m); - l = w.fillBits; - q = w.lineBits; - r = t.records = []; + r = c; + p = H(b, f, r, g, h, n, q); + d = p.fillBits; + s = p.lineBits; + m = r.records = []; do { - h = {}, w = A(d, g, h, f, k, c, l, q, m, n), t = w.eos, l = w.fillBits, q = w.lineBits, n = w.bits, r.push(h); - } while (!t); + x = {}, p = A(b, f, x, g, h, n, d, s, q, l), r = p.eos, d = p.fillBits, s = p.lineBits, l = p.bits, m.push(x); + } while (!r); } - return e; + return c; } - function p(b, d, g, e, f, k) { - var m; - g || (g = {}); - if (4 === f) { - return g.symbolId = a.readUi16(b, d), g.depth = a.readUi16(b, d), g.flags |= 4, g.matrix = w(b, d), d.pos < k && (g.flags |= 8, e = g.cxform = {}, z(b, d, e, f)), g; + function u(b, e, f, c, g, h) { + var n; + f || (f = {}); + if (4 === g) { + return f.symbolId = a.readUi16(b, e), f.depth = a.readUi16(b, e), f.flags |= 4, f.matrix = x(b, e), e.pos < h && (f.flags |= 8, c = f.cxform = {}, L(b, e, c, g)), f; } - m = g.flags = 26 < f ? a.readUi16(b, d) : a.readUi8(b, d); - g.depth = a.readUi16(b, d); - m & 2048 && (g.className = a.readString(b, d, 0)); - m & 2 && (g.symbolId = a.readUi16(b, d)); - m & 4 && (g.matrix = w(b, d)); - if (m & 8) { - var l = g.cxform = {}; - z(b, d, l, f); + n = f.flags = 26 < g ? a.readUi16(b, e) : a.readUi8(b, e); + f.depth = a.readUi16(b, e); + n & 2048 && (f.className = a.readString(b, e, 0)); + n & 2 && (f.symbolId = a.readUi16(b, e)); + n & 4 && (f.matrix = x(b, e)); + if (n & 8) { + var q = f.cxform = {}; + L(b, e, q, g); } - m & 16 && (g.ratio = a.readUi16(b, d)); - m & 32 && (g.name = a.readString(b, d, 0)); - m & 64 && (g.clipDepth = a.readUi16(b, d)); - if (m & 256) { - for (l = a.readUi8(b, d), f = g.filters = [];l--;) { - var r = {}; - K(b, d, r); - f.push(r); + n & 16 && (f.ratio = a.readUi16(b, e)); + n & 32 && (f.name = a.readString(b, e, 0)); + n & 64 && (f.clipDepth = a.readUi16(b, e)); + if (n & 256) { + for (q = a.readUi8(b, e), g = f.filters = [];q--;) { + var d = {}; + J(b, e, d); + g.push(d); } } - m & 512 && (g.blendMode = a.readUi8(b, d)); - m & 1024 && (g.bmpCache = a.readUi8(b, d)); - m & 8192 && (g.visibility = a.readUi8(b, d)); - m & 16384 && (f = g, l = a.readUi8(b, d) | a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8, f.backgroundColor = l); - if (m & 128) { - a.readUi16(b, d); - 6 <= e ? a.readUi32(b, d) : a.readUi16(b, d); - m = g.events = []; + n & 512 && (f.blendMode = a.readUi8(b, e)); + n & 1024 && (f.bmpCache = a.readUi8(b, e)); + n & 8192 && (f.visibility = a.readUi8(b, e)); + n & 16384 && (g = f, q = a.readUi8(b, e) | a.readUi8(b, e) << 24 | a.readUi8(b, e) << 16 | a.readUi8(b, e) << 8, g.backgroundColor = q); + if (n & 128) { + a.readUi16(b, e); + 6 <= c ? a.readUi32(b, e) : a.readUi16(b, e); + n = f.events = []; do { - f = {}; - var l = b, r = d, n = f, q = e, t = n.flags = 6 <= q ? a.readUi32(l, r) : a.readUi16(l, r); - t ? (6 === q && (t &= -262145), q = n.length = a.readUi32(l, r), t & 131072 && (n.keyCode = a.readUi8(l, r), q--), t = r.pos + q, n.actionsData = l.subarray(r.pos, t), r.pos = t, l = !1) : l = !0; - if (l) { + g = {}; + var q = b, d = e, m = g, l = c, p = m.flags = 6 <= l ? a.readUi32(q, d) : a.readUi16(q, d); + p ? (6 === l && (p &= -262145), l = m.length = a.readUi32(q, d), p & 131072 && (m.keyCode = a.readUi8(q, d), l--), p = d.pos + l, m.actionsData = q.subarray(d.pos, p), d.pos = p, q = !1) : q = !0; + if (q) { break; } - if (d.pos > k) { - c.Debug.warning("PlaceObject handler attempted to read clip events beyond tag end"); - d.pos = k; + if (e.pos > h) { + e.pos = h; break; } - m.push(f); + n.push(g); } while (1); } - return g; + return f; } - function u(b, d, g, e, f) { - g || (g = {}); - 5 === f && (g.symbolId = a.readUi16(b, d)); - g.depth = a.readUi16(b, d); - return g; + function t(b, e, f, c, g) { + f || (f = {}); + 5 === g && (f.symbolId = a.readUi16(b, e)); + f.depth = a.readUi16(b, e); + return f; } - function l(b, d, g, e, f, k, c) { - e = g || {}; - e.id = a.readUi16(b, d); - if (21 < f) { - var m = a.readUi32(b, d); - 90 === f && (e.deblock = a.readFixed8(b, d)); - m += d.pos; - g = e.imgData = b.subarray(d.pos, m); - e.alphaData = b.subarray(m, k); + function l(b, e, f, c, g, h, n) { + c = f || {}; + c.id = a.readUi16(b, e); + if (21 < g) { + var q = a.readUi32(b, e); + 90 === g && (c.deblock = a.readFixed8(b, e)); + q += e.pos; + f = c.imgData = b.subarray(e.pos, q); + c.alphaData = b.subarray(q, h); } else { - g = e.imgData = b.subarray(d.pos, k); + f = c.imgData = b.subarray(e.pos, h); } - d.pos = k; - switch(g[0] << 8 | g[1]) { + e.pos = h; + switch(f[0] << 8 | f[1]) { case 65496: ; case 65497: - e.mimeType = "image/jpeg"; + c.mimeType = "image/jpeg"; break; case 35152: - e.mimeType = "image/png"; + c.mimeType = "image/png"; break; case 18249: - e.mimeType = "image/gif"; + c.mimeType = "image/gif"; break; default: - e.mimeType = "application/octet-stream"; + c.mimeType = "application/octet-stream"; } - e.jpegTables = 6 === f ? c : null; - return e; + c.jpegTables = 6 === g ? n : null; + return c; } - function e(b, d, g, e, f, k) { - var c; - g || (g = {}); - g.id = a.readUi16(b, d); - if (7 == f) { - var m = g.characters = []; + function c(b, e, f, c, g, h) { + var n; + f || (f = {}); + f.id = a.readUi16(b, e); + if (7 == g) { + var q = f.characters = []; do { - var l = {}; - c = b; - var r = d, n = l, q = e, t = f, h = a.readUi8(c, r), s = n.eob = !h; - n.flags = 8 <= q ? (h >> 5 & 1 ? 512 : 0) | (h >> 4 & 1 ? 256 : 0) : 0; - n.stateHitTest = h >> 3 & 1; - n.stateDown = h >> 2 & 1; - n.stateOver = h >> 1 & 1; - n.stateUp = h & 1; - s || (n.symbolId = a.readUi16(c, r), n.depth = a.readUi16(c, r), n.matrix = w(c, r), 34 === t && (q = n.cxform = {}, z(c, r, q, t)), n.flags & 256 && (n.filterCount = a.readUi8(c, r), t = n.filters = {}, K(c, r, t)), n.flags & 512 && (n.blendMode = a.readUi8(c, r))); - c = s; - m.push(l); - } while (!c); - g.actionsData = b.subarray(d.pos, k); - d.pos = k; + var d = {}; + n = b; + var m = e, l = d, p = c, s = g, r = a.readUi8(n, m), k = l.eob = !r; + l.flags = 8 <= p ? (r >> 5 & 1 ? 512 : 0) | (r >> 4 & 1 ? 256 : 0) : 0; + l.stateHitTest = r >> 3 & 1; + l.stateDown = r >> 2 & 1; + l.stateOver = r >> 1 & 1; + l.stateUp = r & 1; + k || (l.symbolId = a.readUi16(n, m), l.depth = a.readUi16(n, m), l.matrix = x(n, m), 34 === s && (p = l.cxform = {}, L(n, m, p, s)), l.flags & 256 && (l.filterCount = a.readUi8(n, m), s = l.filters = {}, J(n, m, s)), l.flags & 512 && (l.blendMode = a.readUi8(n, m))); + n = k; + q.push(d); + } while (!n); + f.actionsData = b.subarray(e.pos, h); + e.pos = h; } else { - m = a.readUi8(b, d); - g.trackAsMenu = m >> 7 & 1; - l = a.readUi16(b, d); - m = g.characters = []; + q = a.readUi8(b, e); + f.trackAsMenu = q >> 7 & 1; + d = a.readUi16(b, e); + q = f.characters = []; do { - r = {}; - n = a.readUi8(b, d); - c = r.eob = !n; - r.flags = 8 <= e ? (n >> 5 & 1 ? 512 : 0) | (n >> 4 & 1 ? 256 : 0) : 0; - r.stateHitTest = n >> 3 & 1; - r.stateDown = n >> 2 & 1; - r.stateOver = n >> 1 & 1; - r.stateUp = n & 1; - if (!c) { - r.symbolId = a.readUi16(b, d); - r.depth = a.readUi16(b, d); - r.matrix = w(b, d); - 34 === f && (n = r.cxform = {}, z(b, d, n, f)); - if (r.flags & 256) { - for (s = a.readUi8(b, d), n = g.filters = [];s--;) { - t = {}, K(b, d, t), n.push(t); + m = {}; + l = a.readUi8(b, e); + n = m.eob = !l; + m.flags = 8 <= c ? (l >> 5 & 1 ? 512 : 0) | (l >> 4 & 1 ? 256 : 0) : 0; + m.stateHitTest = l >> 3 & 1; + m.stateDown = l >> 2 & 1; + m.stateOver = l >> 1 & 1; + m.stateUp = l & 1; + if (!n) { + m.symbolId = a.readUi16(b, e); + m.depth = a.readUi16(b, e); + m.matrix = x(b, e); + 34 === g && (l = m.cxform = {}, L(b, e, l, g)); + if (m.flags & 256) { + for (k = a.readUi8(b, e), l = f.filters = [];k--;) { + s = {}, J(b, e, s), l.push(s); } } - r.flags & 512 && (r.blendMode = a.readUi8(b, d)); + m.flags & 512 && (m.blendMode = a.readUi8(b, e)); } - m.push(r); - } while (!c); - if (l) { - for (e = g.buttonActions = [];d.pos < k;) { - f = b; - m = d; - c = k; - l = m.pos; - c = (r = a.readUi16(f, m)) ? l + r : c; - r = a.readUi16(f, m); - m.pos = c; - if (d.pos > k) { + q.push(m); + } while (!n); + if (d) { + for (c = f.buttonActions = [];e.pos < h;) { + g = b; + q = e; + n = h; + d = q.pos; + n = (m = a.readUi16(g, q)) ? d + m : n; + m = a.readUi16(g, q); + q.pos = n; + if (e.pos > h) { break; } - e.push({keyCode:(r & 65024) >> 9, stateTransitionFlags:r & 511, actionsData:f.subarray(l + 4, c)}); + c.push({keyCode:(m & 65024) >> 9, stateTransitionFlags:m & 511, actionsData:g.subarray(d + 4, n)}); } - d.pos = k; + e.pos = h; } } - return g; - } - function m(b, d, g, e, f) { - g || (g = {}); - g.id = a.readUi16(b, d); - for (var k = a.readUi16(b, d), c = g.glyphCount = k / 2, m = [], l = c - 1;l--;) { - m.push(a.readUi16(b, d)); - } - g.offsets = [k].concat(m); - for (k = g.glyphs = [];c--;) { - m = {}, y(b, d, m, e, f), k.push(m); - } - return g; - } - function t(d, e, f, k, c) { - var m; - f || (f = {}); - f.id = a.readUi16(d, e); - var l = f.bbox = {}; - b(d, e, l, k, c); - f.matrix = w(d, e); - k = f.glyphBits = a.readUi8(d, e); - var l = f.advanceBits = a.readUi8(d, e), n = f.records = []; - do { - var q = {}; - m = d; - var t = e, h = q, s = c, z = k, p = l, A = void 0; - a.align(m, t); - var v = a.readUb(m, t, 8), u = h.eot = !v, A = m, B = t, M = h, N = v, v = M.hasFont = N >> 3 & 1, y = M.hasColor = N >> 2 & 1, K = M.hasMoveY = N >> 1 & 1, N = M.hasMoveX = N & 1; - v && (M.fontId = a.readUi16(A, B)); - y && (M.color = 33 === s ? r(A, B) : g(A, B)); - N && (M.moveX = a.readSi16(A, B)); - K && (M.moveY = a.readSi16(A, B)); - v && (M.fontHeight = a.readUi16(A, B)); - if (!u) { - for (A = a.readUi8(m, t), A = h.glyphCount = A, h = h.entries = [];A--;) { - B = {}, M = m, s = t, v = B, y = p, v.glyphIndex = a.readUb(M, s, z), v.advance = a.readSb(M, s, y), h.push(B); - } - } - m = u; - n.push(q); - } while (!m); return f; } - function q(b, d, g, e, f) { - g || (g = {}); - 15 == f && (g.soundId = a.readUi16(b, d)); - 89 == f && (g.soundClassName = a.readString(b, d, 0)); - e = g; - f = {}; - a.readUb(b, d, 2); - f.stop = a.readUb(b, d, 1); - f.noMultiple = a.readUb(b, d, 1); - var k = f.hasEnvelope = a.readUb(b, d, 1), c = f.hasLoops = a.readUb(b, d, 1), m = f.hasOutPoint = a.readUb(b, d, 1); - if (f.hasInPoint = a.readUb(b, d, 1)) { - f.inPoint = a.readUi32(b, d); + function h(b, e, f, c, g) { + f || (f = {}); + f.id = a.readUi16(b, e); + for (var h = a.readUi16(b, e), n = f.glyphCount = h / 2, q = [], d = n - 1;d--;) { + q.push(a.readUi16(b, e)); } - m && (f.outPoint = a.readUi32(b, d)); - c && (f.loopCount = a.readUi16(b, d)); - if (k) { - for (c = f.envelopeCount = a.readUi8(b, d), k = f.envelopes = [];c--;) { - var m = {}, l = b, r = d, n = m; - n.pos44 = a.readUi32(l, r); - n.volumeLeft = a.readUi16(l, r); - n.volumeRight = a.readUi16(l, r); - k.push(m); - } + f.offsets = [h].concat(q); + for (h = f.glyphs = [];n--;) { + q = {}, M(b, e, q, c, g), h.push(q); } - e.soundInfo = f; - return g; + return f; } - function n(b, d, g, e, f, k) { - g = g || {}; - g.id = a.readUi16(b, d); - e = g.format = a.readUi8(b, d); - g.width = a.readUi16(b, d); - g.height = a.readUi16(b, d); - g.hasAlpha = 36 === f; - 3 === e && (g.colorTableSize = a.readUi8(b, d)); - g.bmpData = b.subarray(d.pos, k); - d.pos = k; - return g; + function p(b, f, c, g, h) { + var d; + c || (c = {}); + c.id = a.readUi16(b, f); + var m = c.bbox = {}; + e(b, f, m, g, h); + c.matrix = x(b, f); + g = c.glyphBits = a.readUi8(b, f); + var m = c.advanceBits = a.readUi8(b, f), l = c.records = []; + do { + var p = {}; + d = b; + var s = f, r = p, k = h, u = g, t = m, L = void 0; + a.align(d, s); + var v = a.readUb(d, s, 8), A = r.eot = !v, L = d, H = s, K = r, F = v, v = K.hasFont = F >> 3 & 1, J = K.hasColor = F >> 2 & 1, M = K.hasMoveY = F >> 1 & 1, F = K.hasMoveX = F & 1; + v && (K.fontId = a.readUi16(L, H)); + J && (K.color = 33 === k ? n(L, H) : q(L, H)); + F && (K.moveX = a.readSi16(L, H)); + M && (K.moveY = a.readSi16(L, H)); + v && (K.fontHeight = a.readUi16(L, H)); + if (!A) { + for (L = a.readUi8(d, s), L = r.glyphCount = L, r = r.entries = [];L--;) { + H = {}, K = d, k = s, v = H, J = t, v.glyphIndex = a.readUb(K, k, u), v.advance = a.readSb(K, k, J), r.push(H); + } + } + d = A; + l.push(p); + } while (!d); + return c; } - function k(d, g, e, f, k) { - e || (e = {}); - e.id = a.readUi16(d, g); - var c = a.readUi8(d, g), m = e.hasLayout = c & 128 ? 1 : 0; - e.shiftJis = 5 < f && c & 64 ? 1 : 0; - e.smallText = c & 32 ? 1 : 0; - e.ansi = c & 16 ? 1 : 0; - var l = e.wideOffset = c & 8 ? 1 : 0, r = e.wide = c & 4 ? 1 : 0; - e.italic = c & 2 ? 1 : 0; - e.bold = c & 1 ? 1 : 0; - 5 < f ? e.language = a.readUi8(d, g) : (a.readUi8(d, g), e.language = 0); - c = a.readUi8(d, g); - e.name = a.readString(d, g, c); - 75 === k && (e.resolution = 20); - c = e.glyphCount = a.readUi16(d, g); - if (0 === c) { - return e; + function s(b, e, f, c, g) { + f || (f = {}); + 15 == g && (f.soundId = a.readUi16(b, e)); + 89 == g && (f.soundClassName = a.readString(b, e, 0)); + c = f; + g = {}; + a.readUb(b, e, 2); + g.stop = a.readUb(b, e, 1); + g.noMultiple = a.readUb(b, e, 1); + var h = g.hasEnvelope = a.readUb(b, e, 1), n = g.hasLoops = a.readUb(b, e, 1), q = g.hasOutPoint = a.readUb(b, e, 1); + if (g.hasInPoint = a.readUb(b, e, 1)) { + g.inPoint = a.readUi32(b, e); } - var n = g.pos; - if (l) { - for (var l = e.offsets = [], w = c;w--;) { - l.push(a.readUi32(d, g)); + q && (g.outPoint = a.readUi32(b, e)); + n && (g.loopCount = a.readUi16(b, e)); + if (h) { + for (n = g.envelopeCount = a.readUi8(b, e), h = g.envelopes = [];n--;) { + var q = {}, d = b, m = e, l = q; + l.pos44 = a.readUi32(d, m); + l.volumeLeft = a.readUi16(d, m); + l.volumeRight = a.readUi16(d, m); + h.push(q); } - e.mapOffset = a.readUi32(d, g); + } + c.soundInfo = g; + return f; + } + function m(b, e, f, c, g, h) { + f = f || {}; + f.id = a.readUi16(b, e); + c = f.format = a.readUi8(b, e); + f.width = a.readUi16(b, e); + f.height = a.readUi16(b, e); + f.hasAlpha = 36 === g; + 3 === c && (f.colorTableSize = a.readUi8(b, e)); + f.bmpData = b.subarray(e.pos, h); + e.pos = h; + return f; + } + function g(b, f, c, g, h) { + c || (c = {}); + c.id = a.readUi16(b, f); + var n = a.readUi8(b, f), q = c.hasLayout = n & 128 ? 1 : 0; + c.shiftJis = 5 < g && n & 64 ? 1 : 0; + c.smallText = n & 32 ? 1 : 0; + c.ansi = n & 16 ? 1 : 0; + var d = c.wideOffset = n & 8 ? 1 : 0, m = c.wide = n & 4 ? 1 : 0; + c.italic = n & 2 ? 1 : 0; + c.bold = n & 1 ? 1 : 0; + 5 < g ? c.language = a.readUi8(b, f) : (a.readUi8(b, f), c.language = 0); + n = a.readUi8(b, f); + c.name = a.readString(b, f, n); + 75 === h && (c.resolution = 20); + n = c.glyphCount = a.readUi16(b, f); + if (0 === n) { + return c; + } + var l = f.pos; + if (d) { + for (var d = c.offsets = [], p = n;p--;) { + d.push(a.readUi32(b, f)); + } + c.mapOffset = a.readUi32(b, f); } else { - l = e.offsets = []; - for (w = c;w--;) { - l.push(a.readUi16(d, g)); + d = c.offsets = []; + for (p = n;p--;) { + d.push(a.readUi16(b, f)); } - e.mapOffset = a.readUi16(d, g); + c.mapOffset = a.readUi16(b, f); } - l = e.glyphs = []; - for (w = c;w--;) { - var q = {}; - 1 === e.offsets[c - w] + n - g.pos ? (a.readUi8(d, g), l.push({records:[{type:0, eos:!0, hasNewStyles:0, hasLineStyle:0, hasFillStyle1:0, hasFillStyle0:0, move:0}]})) : (y(d, g, q, f, k), l.push(q)); - } - if (r) { - for (n = e.codes = [], l = c;l--;) { - n.push(a.readUi16(d, g)); - } - } else { - for (n = e.codes = [], l = c;l--;) { - n.push(a.readUi8(d, g)); - } + d = c.glyphs = []; + for (p = n;p--;) { + var s = {}; + 1 === c.offsets[n - p] + l - f.pos ? (a.readUi8(b, f), d.push({records:[{type:0, eos:!0, hasNewStyles:0, hasLineStyle:0, hasFillStyle1:0, hasFillStyle0:0, move:0}]})) : (M(b, f, s, g, h), d.push(s)); } if (m) { - e.ascent = a.readUi16(d, g); - e.descent = a.readUi16(d, g); - e.leading = a.readSi16(d, g); - m = e.advance = []; - for (n = c;n--;) { - m.push(a.readSi16(d, g)); + for (l = c.codes = [], d = n;d--;) { + l.push(a.readUi16(b, f)); } - for (m = e.bbox = [];c--;) { - n = {}, b(d, g, n, f, k), m.push(n); - } - k = a.readUi16(d, g); - for (f = e.kerning = [];k--;) { - c = {}, m = d, n = g, l = c, r ? (l.code1 = a.readUi16(m, n), l.code2 = a.readUi16(m, n)) : (l.code1 = a.readUi8(m, n), l.code2 = a.readUi8(m, n)), l.adjustment = a.readUi16(m, n), f.push(c); - } - } - return e; - } - function f(b, d, g, e, f, k) { - g || (g = {}); - g.id = a.readUi16(b, d); - e = a.readUi8(b, d); - f = g.hasFontData = e & 4 ? 1 : 0; - g.italic = e & 2 ? 1 : 0; - g.bold = e & 1 ? 1 : 0; - g.name = a.readString(b, d, 0); - f && (g.data = b.subarray(d.pos, k), d.pos = k); - return g; - } - function d(b, d, g) { - g || (g = {}); - for (var e = a.readEncodedU32(b, d), f = g.scenes = [];e--;) { - var k = {}; - k.offset = a.readEncodedU32(b, d); - k.name = a.readString(b, d, 0); - f.push(k); - } - e = a.readEncodedU32(b, d); - for (f = g.labels = [];e--;) { - k = {}, k.frame = a.readEncodedU32(b, d), k.name = a.readString(b, d, 0), f.push(k); - } - return g; - } - function b(b, d, g, e, f) { - a.align(b, d); - var k = a.readUb(b, d, 5); - e = a.readSb(b, d, k); - f = a.readSb(b, d, k); - var c = a.readSb(b, d, k), k = a.readSb(b, d, k); - g.xMin = e; - g.xMax = f; - g.yMin = c; - g.yMax = k; - a.align(b, d); - } - function g(b, d) { - return(a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8 | 255) >>> 0; - } - function r(b, d) { - return a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8 | a.readUi8(b, d); - } - function w(b, d) { - var g = {}; - a.align(b, d); - if (a.readUb(b, d, 1)) { - var e = a.readUb(b, d, 5); - g.a = a.readFb(b, d, e); - g.d = a.readFb(b, d, e); } else { - g.a = 1, g.d = 1; - } - a.readUb(b, d, 1) ? (e = a.readUb(b, d, 5), g.b = a.readFb(b, d, e), g.c = a.readFb(b, d, e)) : (g.b = 0, g.c = 0); - var e = a.readUb(b, d, 5), f = a.readSb(b, d, e), e = a.readSb(b, d, e); - g.tx = f; - g.ty = e; - a.align(b, d); - return g; - } - function z(b, d, g, e) { - a.align(b, d); - var f = a.readUb(b, d, 1), k = a.readUb(b, d, 1), c = a.readUb(b, d, 4); - k ? (g.redMultiplier = a.readSb(b, d, c), g.greenMultiplier = a.readSb(b, d, c), g.blueMultiplier = a.readSb(b, d, c), g.alphaMultiplier = 4 < e ? a.readSb(b, d, c) : 256) : (g.redMultiplier = 256, g.greenMultiplier = 256, g.blueMultiplier = 256, g.alphaMultiplier = 256); - f ? (g.redOffset = a.readSb(b, d, c), g.greenOffset = a.readSb(b, d, c), g.blueOffset = a.readSb(b, d, c), g.alphaOffset = 4 < e ? a.readSb(b, d, c) : 0) : (g.redOffset = 0, g.greenOffset = 0, g.blueOffset = 0, g.alphaOffset = 0); - a.align(b, d); - } - function A(b, d, g, e, f, k, c, m, l, r) { - var n, w = g.type = a.readUb(b, d, 1), q = a.readUb(b, d, 5); - n = g.eos = !(w || q); - if (w) { - e = (q & 15) + 2, (g.isStraight = q >> 4) ? (g.isGeneral = a.readUb(b, d, 1)) ? (g.deltaX = a.readSb(b, d, e), g.deltaY = a.readSb(b, d, e)) : (g.isVertical = a.readUb(b, d, 1)) ? g.deltaY = a.readSb(b, d, e) : g.deltaX = a.readSb(b, d, e) : (g.controlDeltaX = a.readSb(b, d, e), g.controlDeltaY = a.readSb(b, d, e), g.anchorDeltaX = a.readSb(b, d, e), g.anchorDeltaY = a.readSb(b, d, e)), b = e; - } else { - var t = g.hasNewStyles = 2 < f ? q >> 4 : 0, h = g.hasLineStyle = q >> 3 & 1, s = g.hasFillStyle1 = q >> 2 & 1, z = g.hasFillStyle0 = q >> 1 & 1; - if (g.move = q & 1) { - r = a.readUb(b, d, 5), g.moveX = a.readSb(b, d, r), g.moveY = a.readSb(b, d, r); + for (l = c.codes = [], d = n;d--;) { + l.push(a.readUi8(b, f)); } - z && (g.fillStyle0 = a.readUb(b, d, c)); - s && (g.fillStyle1 = a.readUb(b, d, c)); - h && (g.lineStyle = a.readUb(b, d, m)); - t && (b = B(b, d, g, e, f, k, l), m = b.lineBits, c = b.fillBits); - b = r; } - return{type:w, flags:q, eos:n, fillBits:c, lineBits:m, bits:b}; + if (q) { + c.ascent = a.readUi16(b, f); + c.descent = a.readUi16(b, f); + c.leading = a.readSi16(b, f); + q = c.advance = []; + for (l = n;l--;) { + q.push(a.readSi16(b, f)); + } + for (q = c.bbox = [];n--;) { + l = {}, e(b, f, l, g, h), q.push(l); + } + h = a.readUi16(b, f); + for (g = c.kerning = [];h--;) { + n = {}, q = b, l = f, d = n, m ? (d.code1 = a.readUi16(q, l), d.code2 = a.readUi16(q, l)) : (d.code1 = a.readUi8(q, l), d.code2 = a.readUi8(q, l)), d.adjustment = a.readUi16(q, l), g.push(n); + } + } + return c; } - function B(b, d, e, f, k, c, m) { - var l, n = a.readUi8(b, d); - l = 2 < k && 255 === n ? a.readUi16(b, d) : n; - for (n = e.fillStyles = [];l--;) { - var w = {}; - N(b, d, w, f, k, c); - n.push(w); + function f(b, e, f, c, g, h) { + f || (f = {}); + f.id = a.readUi16(b, e); + c = a.readUi8(b, e); + g = f.hasFontData = c & 4 ? 1 : 0; + f.italic = c & 2 ? 1 : 0; + f.bold = c & 1 ? 1 : 0; + f.name = a.readString(b, e, 0); + g && (f.data = b.subarray(e.pos, h), e.pos = h); + return f; + } + function b(b, e, f) { + f || (f = {}); + for (var c = a.readEncodedU32(b, e), g = f.scenes = [];c--;) { + var h = {}; + h.offset = a.readEncodedU32(b, e); + h.name = a.readString(b, e, 0); + g.push(h); } - n = a.readUi8(b, d); - n = 2 < k && 255 === n ? a.readUi16(b, d) : n; - for (e = e.lineStyles = [];n--;) { - l = {}; - var w = b, q = d, t = l, h = f, s = k, z = c, p = m; - t.width = a.readUi16(w, q); - z && (t.widthMorph = a.readUi16(w, q)); - if (p) { - a.align(w, q); - t.startCapsStyle = a.readUb(w, q, 2); - var p = t.jointStyle = a.readUb(w, q, 2), A = t.hasFill = a.readUb(w, q, 1); - t.noHscale = a.readUb(w, q, 1); - t.noVscale = a.readUb(w, q, 1); - t.pixelHinting = a.readUb(w, q, 1); - a.readUb(w, q, 5); - t.noClose = a.readUb(w, q, 1); - t.endCapsStyle = a.readUb(w, q, 2); - 2 === p && (t.miterLimitFactor = a.readFixed8(w, q)); - A ? (t = t.fillStyle = {}, N(w, q, t, h, s, z)) : (t.color = r(w, q), z && (t.colorMorph = r(w, q))); + c = a.readEncodedU32(b, e); + for (g = f.labels = [];c--;) { + h = {}, h.frame = a.readEncodedU32(b, e), h.name = a.readString(b, e, 0), g.push(h); + } + return f; + } + function e(b, e, f, c, g) { + a.align(b, e); + var h = a.readUb(b, e, 5); + c = a.readSb(b, e, h); + g = a.readSb(b, e, h); + var n = a.readSb(b, e, h), h = a.readSb(b, e, h); + f.xMin = c; + f.xMax = g; + f.yMin = n; + f.yMax = h; + a.align(b, e); + } + function q(b, e) { + return(a.readUi8(b, e) << 24 | a.readUi8(b, e) << 16 | a.readUi8(b, e) << 8 | 255) >>> 0; + } + function n(b, e) { + return a.readUi8(b, e) << 24 | a.readUi8(b, e) << 16 | a.readUi8(b, e) << 8 | a.readUi8(b, e); + } + function x(b, e) { + var f = {}; + a.align(b, e); + if (a.readUb(b, e, 1)) { + var c = a.readUb(b, e, 5); + f.a = a.readFb(b, e, c); + f.d = a.readFb(b, e, c); + } else { + f.a = 1, f.d = 1; + } + a.readUb(b, e, 1) ? (c = a.readUb(b, e, 5), f.b = a.readFb(b, e, c), f.c = a.readFb(b, e, c)) : (f.b = 0, f.c = 0); + var c = a.readUb(b, e, 5), g = a.readSb(b, e, c), c = a.readSb(b, e, c); + f.tx = g; + f.ty = c; + a.align(b, e); + return f; + } + function L(b, e, f, c) { + a.align(b, e); + var g = a.readUb(b, e, 1), h = a.readUb(b, e, 1), n = a.readUb(b, e, 4); + h ? (f.redMultiplier = a.readSb(b, e, n), f.greenMultiplier = a.readSb(b, e, n), f.blueMultiplier = a.readSb(b, e, n), f.alphaMultiplier = 4 < c ? a.readSb(b, e, n) : 256) : (f.redMultiplier = 256, f.greenMultiplier = 256, f.blueMultiplier = 256, f.alphaMultiplier = 256); + g ? (f.redOffset = a.readSb(b, e, n), f.greenOffset = a.readSb(b, e, n), f.blueOffset = a.readSb(b, e, n), f.alphaOffset = 4 < c ? a.readSb(b, e, n) : 0) : (f.redOffset = 0, f.greenOffset = 0, f.blueOffset = 0, f.alphaOffset = 0); + a.align(b, e); + } + function A(b, e, f, c, g, h, n, q, d, m) { + var l, p = f.type = a.readUb(b, e, 1), s = a.readUb(b, e, 5); + l = f.eos = !(p || s); + if (p) { + c = (s & 15) + 2, (f.isStraight = s >> 4) ? (f.isGeneral = a.readUb(b, e, 1)) ? (f.deltaX = a.readSb(b, e, c), f.deltaY = a.readSb(b, e, c)) : (f.isVertical = a.readUb(b, e, 1)) ? f.deltaY = a.readSb(b, e, c) : f.deltaX = a.readSb(b, e, c) : (f.controlDeltaX = a.readSb(b, e, c), f.controlDeltaY = a.readSb(b, e, c), f.anchorDeltaX = a.readSb(b, e, c), f.anchorDeltaY = a.readSb(b, e, c)), b = c; + } else { + var r = f.hasNewStyles = 2 < g ? s >> 4 : 0, k = f.hasLineStyle = s >> 3 & 1, x = f.hasFillStyle1 = s >> 2 & 1, u = f.hasFillStyle0 = s >> 1 & 1; + if (f.move = s & 1) { + m = a.readUb(b, e, 5), f.moveX = a.readSb(b, e, m), f.moveY = a.readSb(b, e, m); + } + u && (f.fillStyle0 = a.readUb(b, e, n)); + x && (f.fillStyle1 = a.readUb(b, e, n)); + k && (f.lineStyle = a.readUb(b, e, q)); + r && (b = H(b, e, f, c, g, h, d), q = b.lineBits, n = b.fillBits); + b = m; + } + return{type:p, flags:s, eos:l, fillBits:n, lineBits:q, bits:b}; + } + function H(b, e, f, c, g, h, d) { + var m, l = a.readUi8(b, e); + m = 2 < g && 255 === l ? a.readUi16(b, e) : l; + for (l = f.fillStyles = [];m--;) { + var p = {}; + F(b, e, p, c, g, h); + l.push(p); + } + l = a.readUi8(b, e); + l = 2 < g && 255 === l ? a.readUi16(b, e) : l; + for (f = f.lineStyles = [];l--;) { + m = {}; + var p = b, s = e, r = m, k = c, x = g, u = h, t = d; + r.width = a.readUi16(p, s); + u && (r.widthMorph = a.readUi16(p, s)); + if (t) { + a.align(p, s); + r.startCapsStyle = a.readUb(p, s, 2); + var t = r.jointStyle = a.readUb(p, s, 2), L = r.hasFill = a.readUb(p, s, 1); + r.noHscale = a.readUb(p, s, 1); + r.noVscale = a.readUb(p, s, 1); + r.pixelHinting = a.readUb(p, s, 1); + a.readUb(p, s, 5); + r.noClose = a.readUb(p, s, 1); + r.endCapsStyle = a.readUb(p, s, 2); + 2 === t && (r.miterLimitFactor = a.readFixed8(p, s)); + L ? (r = r.fillStyle = {}, F(p, s, r, k, x, u)) : (r.color = n(p, s), u && (r.colorMorph = n(p, s))); } else { - t.color = 22 < s ? r(w, q) : g(w, q), z && (t.colorMorph = r(w, q)); + r.color = 22 < x ? n(p, s) : q(p, s), u && (r.colorMorph = n(p, s)); } - e.push(l); + f.push(m); } - b = M(b, d); + b = K(b, e); return{fillBits:b.fillBits, lineBits:b.lineBits}; } - function M(b, d) { - a.align(b, d); - var g = a.readUb(b, d, 4), e = a.readUb(b, d, 4); - return{fillBits:g, lineBits:e}; + function K(b, e) { + a.align(b, e); + var f = a.readUb(b, e, 4), c = a.readUb(b, e, 4); + return{fillBits:f, lineBits:c}; } - function N(b, d, e, f, k, c) { - f = e.type = a.readUi8(b, d); - switch(f) { + function F(b, e, f, c, g, h) { + c = f.type = a.readUi8(b, e); + switch(c) { case 0: - e.color = 22 < k || c ? r(b, d) : g(b, d); - c && (e.colorMorph = r(b, d)); + f.color = 22 < g || h ? n(b, e) : q(b, e); + h && (f.colorMorph = n(b, e)); break; case 16: ; case 18: ; case 19: - e.matrix = w(b, d); - c && (e.matrixMorph = w(b, d)); - 83 === k ? (e.spreadMode = a.readUb(b, d, 2), e.interpolationMode = a.readUb(b, d, 2)) : a.readUb(b, d, 4); - for (var m = e.count = a.readUb(b, d, 4), l = e.records = [];m--;) { - var n = {}, q = b, t = d, h = n, s = k, z = c; - h.ratio = a.readUi8(q, t); - h.color = 22 < s ? r(q, t) : g(q, t); - z && (h.ratioMorph = a.readUi8(q, t), h.colorMorph = r(q, t)); - l.push(n); + f.matrix = x(b, e); + h && (f.matrixMorph = x(b, e)); + 83 === g ? (f.spreadMode = a.readUb(b, e, 2), f.interpolationMode = a.readUb(b, e, 2)) : a.readUb(b, e, 4); + for (var d = f.count = a.readUb(b, e, 4), m = f.records = [];d--;) { + var l = {}, p = b, s = e, r = l, k = g, u = h; + r.ratio = a.readUi8(p, s); + r.color = 22 < k ? n(p, s) : q(p, s); + u && (r.ratioMorph = a.readUi8(p, s), r.colorMorph = n(p, s)); + m.push(l); } - 19 === f && (e.focalPoint = a.readSi16(b, d), c && (e.focalPointMorph = a.readSi16(b, d))); + 19 === c && (f.focalPoint = a.readSi16(b, e), h && (f.focalPointMorph = a.readSi16(b, e))); break; case 64: ; @@ -23192,12 +23276,12 @@ console.time("Load SWF Parser"); case 66: ; case 67: - e.bitmapId = a.readUi16(b, d), e.condition = 64 === f || 67 === f, e.matrix = w(b, d), c && (e.matrixMorph = w(b, d)); + f.bitmapId = a.readUi16(b, e), f.condition = 64 === c || 67 === c, f.matrix = x(b, e), h && (f.matrixMorph = x(b, e)); } } - function K(b, d, g) { - var e = g.type = a.readUi8(b, d); - switch(e) { + function J(b, e, f) { + var c = f.type = a.readUi8(b, e); + switch(c) { case 0: ; case 2: @@ -23207,603 +23291,587 @@ console.time("Load SWF Parser"); case 4: ; case 7: - var f; - f = 4 === e || 7 === e ? a.readUi8(b, d) : 1; - for (var k = g.colors = [], c = f;c--;) { - k.push(r(b, d)); + var g; + g = 4 === c || 7 === c ? a.readUi8(b, e) : 1; + for (var h = f.colors = [], q = g;q--;) { + h.push(n(b, e)); } - 3 === e && (g.hightlightColor = r(b, d)); - if (4 === e || 7 === e) { - for (k = g.ratios = [];f--;) { - k.push(a.readUi8(b, d)); + 3 === c && (f.hightlightColor = n(b, e)); + if (4 === c || 7 === c) { + for (h = f.ratios = [];g--;) { + h.push(a.readUi8(b, e)); } } - g.blurX = a.readFixed(b, d); - g.blurY = a.readFixed(b, d); - 2 !== e && (g.angle = a.readFixed(b, d), g.distance = a.readFixed(b, d)); - g.strength = a.readFixed8(b, d); - g.inner = a.readUb(b, d, 1); - g.knockout = a.readUb(b, d, 1); - g.compositeSource = a.readUb(b, d, 1); - 3 === e || 4 === e || 7 === e ? (g.onTop = a.readUb(b, d, 1), g.quality = a.readUb(b, d, 4)) : g.quality = a.readUb(b, d, 5); + f.blurX = a.readFixed(b, e); + f.blurY = a.readFixed(b, e); + 2 !== c && (f.angle = a.readFixed(b, e), f.distance = a.readFixed(b, e)); + f.strength = a.readFixed8(b, e); + f.inner = a.readUb(b, e, 1); + f.knockout = a.readUb(b, e, 1); + f.compositeSource = a.readUb(b, e, 1); + 3 === c || 4 === c || 7 === c ? (f.onTop = a.readUb(b, e, 1), f.quality = a.readUb(b, e, 4)) : f.quality = a.readUb(b, e, 5); break; case 1: - g.blurX = a.readFixed(b, d); - g.blurY = a.readFixed(b, d); - g.quality = a.readUb(b, d, 5); - a.readUb(b, d, 3); + f.blurX = a.readFixed(b, e); + f.blurY = a.readFixed(b, e); + f.quality = a.readUb(b, e, 5); + a.readUb(b, e, 3); break; case 5: - f = g.matrixX = a.readUi8(b, d); - k = g.matrixY = a.readUi8(b, d); - g.divisor = a.readFloat(b, d); - g.bias = a.readFloat(b, d); - e = g.matrix = []; - for (f *= k;f--;) { - e.push(a.readFloat(b, d)); + g = f.matrixX = a.readUi8(b, e); + h = f.matrixY = a.readUi8(b, e); + f.divisor = a.readFloat(b, e); + f.bias = a.readFloat(b, e); + c = f.matrix = []; + for (g *= h;g--;) { + c.push(a.readFloat(b, e)); } - g.color = r(b, d); - a.readUb(b, d, 6); - g.clamp = a.readUb(b, d, 1); - g.preserveAlpha = a.readUb(b, d, 1); + f.color = n(b, e); + a.readUb(b, e, 6); + f.clamp = a.readUb(b, e, 1); + f.preserveAlpha = a.readUb(b, e, 1); break; case 6: - for (g = g.matrix = [], e = 20;e--;) { - g.push(a.readFloat(b, d)); + for (f = f.matrix = [], c = 20;c--;) { + f.push(a.readFloat(b, e)); } ; } } - function y(b, a, d, g, e) { - var f, k; - k = M(b, a); - var c = k.fillBits, m = k.lineBits, l = d.records = []; + function M(b, a, e, f, c) { + var g, h; + h = K(b, a); + var n = h.fillBits, q = h.lineBits, d = e.records = []; do { - var r = {}; - k = A(b, a, r, g, e, !1, c, m, !1, f); - d = k.eos; - c = k.fillBits; - m = k.lineBits; - f = k.bits; - l.push(r); - } while (!d); + var m = {}; + h = A(b, a, m, f, c, !1, n, q, !1, g); + e = h.eos; + n = h.fillBits; + q = h.lineBits; + g = h.bits; + d.push(m); + } while (!e); } - h.defineImage = l; - h.defineFont = m; - h.soundStreamHead = function(b, d) { - var g = {}, e = a.readUi8(b, d); - g.playbackRate = e >> 2 & 3; - g.playbackSize = e >> 1 & 1; - g.playbackType = e & 1; - var e = a.readUi8(b, d), f = g.streamCompression = e >> 4 & 15; - g.streamRate = e >> 2 & 3; - g.streamSize = e >> 1 & 1; - g.streamType = e & 1; - g.samplesCount = a.readUi16(b, d); - 2 == f && (g.latencySeek = a.readSi16(b, d)); - return g; + r.defineImage = l; + r.defineFont = h; + r.soundStreamHead = function(b, e) { + var f = {}, c = a.readUi8(b, e); + f.playbackRate = c >> 2 & 3; + f.playbackSize = c >> 1 & 1; + f.playbackType = c & 1; + var c = a.readUi8(b, e), g = f.streamCompression = c >> 4 & 15; + f.streamRate = c >> 2 & 3; + f.streamSize = c >> 1 & 1; + f.streamType = c & 1; + f.samplesCount = a.readUi16(b, e); + 2 == g && (f.latencySeek = a.readSi16(b, e)); + return f; }; - h.defineBitmap = n; - h.defineFont2 = k; - h.defineFont4 = f; - h.defineScene = d; - h.rgb = g; - h.tagHandlers = {0:void 0, 1:void 0, 2:v, 4:p, 5:u, 6:l, 7:e, 8:void 0, 9:void 0, 10:m, 11:t, 12:void 0, 13:void 0, 14:function(b, d, g, e, f, k) { - g || (g = {}); - g.id = a.readUi16(b, d); - e = a.readUi8(b, d); - g.soundFormat = e >> 4 & 15; - g.soundRate = e >> 2 & 3; - g.soundSize = e >> 1 & 1; - g.soundType = e & 1; - g.samplesCount = a.readUi32(b, d); - g.soundData = b.subarray(d.pos, k); - d.pos = k; - return g; - }, 15:q, 17:void 0, 18:void 0, 19:void 0, 20:n, 21:l, 22:v, 23:void 0, 24:void 0, 26:p, 28:u, 32:v, 33:t, 34:e, 35:l, 36:n, 37:function(d, g, e, f, k) { - e || (e = {}); - e.id = a.readUi16(d, g); - var c = e.bbox = {}; - b(d, g, c, f, k); - f = a.readUi16(d, g); - k = e.hasText = f >> 7 & 1; - e.wordWrap = f >> 6 & 1; - e.multiline = f >> 5 & 1; - e.password = f >> 4 & 1; - e.readonly = f >> 3 & 1; - var c = e.hasColor = f >> 2 & 1, m = e.hasMaxLength = f >> 1 & 1, l = e.hasFont = f & 1, n = e.hasFontClass = f >> 15 & 1; - e.autoSize = f >> 14 & 1; - var w = e.hasLayout = f >> 13 & 1; - e.noSelect = f >> 12 & 1; - e.border = f >> 11 & 1; - e.wasStatic = f >> 10 & 1; - e.html = f >> 9 & 1; - e.useOutlines = f >> 8 & 1; - l && (e.fontId = a.readUi16(d, g)); - n && (e.fontClass = a.readString(d, g, 0)); - l && (e.fontHeight = a.readUi16(d, g)); - c && (e.color = r(d, g)); - m && (e.maxLength = a.readUi16(d, g)); - w && (e.align = a.readUi8(d, g), e.leftMargin = a.readUi16(d, g), e.rightMargin = a.readUi16(d, g), e.indent = a.readSi16(d, g), e.leading = a.readSi16(d, g)); - e.variableName = a.readString(d, g, 0); - k && (e.initialText = a.readString(d, g, 0)); - return e; - }, 39:void 0, 43:void 0, 45:void 0, 46:v, 48:k, 56:void 0, 57:void 0, 58:void 0, 59:void 0, 60:void 0, 61:void 0, 62:void 0, 64:void 0, 65:void 0, 66:void 0, 69:void 0, 70:p, 71:void 0, 72:void 0, 73:void 0, 74:void 0, 75:k, 76:void 0, 77:void 0, 78:function(d, g, e, f, k) { - e || (e = {}); - e.symbolId = a.readUi16(d, g); - var c = e.splitter = {}; - b(d, g, c, f, k); - return e; - }, 82:void 0, 83:v, 84:v, 86:d, 87:function(b, d, g, e, f, k) { - g || (g = {}); - g.id = a.readUi16(b, d); - a.readUi32(b, d); - g.data = b.subarray(d.pos, k); - d.pos = k; - return g; - }, 88:void 0, 89:q, 90:l, 91:f}; - h.readHeader = function(b, d) { - var g = a.readUb(b, d, 5), e = a.readSb(b, d, g), f = a.readSb(b, d, g), k = a.readSb(b, d, g), g = a.readSb(b, d, g); - a.align(b, d); - var m = a.readUi8(b, d), m = a.readUi8(b, d) + m / 256, l = a.readUi16(b, d); - return{frameRate:m, frameCount:l, bounds:new c.Bounds(e, k, f, g)}; + r.defineBitmap = m; + r.defineFont2 = g; + r.defineFont4 = f; + r.defineScene = b; + r.rgb = q; + r.tagHandlers = {0:void 0, 1:void 0, 2:k, 4:u, 5:t, 6:l, 7:c, 8:void 0, 9:void 0, 10:h, 11:p, 12:void 0, 13:void 0, 14:function(b, e, f, c, g, h) { + f || (f = {}); + f.id = a.readUi16(b, e); + c = a.readUi8(b, e); + f.soundFormat = c >> 4 & 15; + f.soundRate = c >> 2 & 3; + f.soundSize = c >> 1 & 1; + f.soundType = c & 1; + f.samplesCount = a.readUi32(b, e); + f.soundData = b.subarray(e.pos, h); + e.pos = h; + return f; + }, 15:s, 17:void 0, 18:void 0, 19:void 0, 20:m, 21:l, 22:k, 23:void 0, 24:void 0, 26:u, 28:t, 32:k, 33:p, 34:c, 35:l, 36:m, 37:function(b, f, c, g, h) { + c || (c = {}); + c.id = a.readUi16(b, f); + var q = c.bbox = {}; + e(b, f, q, g, h); + g = a.readUi16(b, f); + h = c.hasText = g >> 7 & 1; + c.wordWrap = g >> 6 & 1; + c.multiline = g >> 5 & 1; + c.password = g >> 4 & 1; + c.readonly = g >> 3 & 1; + var q = c.hasColor = g >> 2 & 1, d = c.hasMaxLength = g >> 1 & 1, m = c.hasFont = g & 1, l = c.hasFontClass = g >> 15 & 1; + c.autoSize = g >> 14 & 1; + var p = c.hasLayout = g >> 13 & 1; + c.noSelect = g >> 12 & 1; + c.border = g >> 11 & 1; + c.wasStatic = g >> 10 & 1; + c.html = g >> 9 & 1; + c.useOutlines = g >> 8 & 1; + m && (c.fontId = a.readUi16(b, f)); + l && (c.fontClass = a.readString(b, f, 0)); + m && (c.fontHeight = a.readUi16(b, f)); + q && (c.color = n(b, f)); + d && (c.maxLength = a.readUi16(b, f)); + p && (c.align = a.readUi8(b, f), c.leftMargin = a.readUi16(b, f), c.rightMargin = a.readUi16(b, f), c.indent = a.readSi16(b, f), c.leading = a.readSi16(b, f)); + c.variableName = a.readString(b, f, 0); + h && (c.initialText = a.readString(b, f, 0)); + return c; + }, 39:void 0, 43:void 0, 45:void 0, 46:k, 48:g, 56:void 0, 57:void 0, 58:void 0, 59:void 0, 60:void 0, 61:void 0, 62:void 0, 64:void 0, 65:void 0, 66:void 0, 69:void 0, 70:u, 71:void 0, 72:void 0, 73:void 0, 74:void 0, 75:g, 76:void 0, 77:void 0, 78:function(b, f, c, g, h) { + c || (c = {}); + c.symbolId = a.readUi16(b, f); + var n = c.splitter = {}; + e(b, f, n, g, h); + return c; + }, 82:void 0, 83:k, 84:k, 86:b, 87:function(b, e, f, c, g, h) { + f || (f = {}); + f.id = a.readUi16(b, e); + a.readUi32(b, e); + f.data = b.subarray(e.pos, h); + e.pos = h; + return f; + }, 88:void 0, 89:s, 90:l, 91:f}; + r.readHeader = function(b, e) { + var f = a.readUb(b, e, 5), c = a.readSb(b, e, f), g = a.readSb(b, e, f), h = a.readSb(b, e, f), f = a.readSb(b, e, f); + a.align(b, e); + var n = a.readUi8(b, e), n = a.readUi8(b, e) + n / 256, q = a.readUi16(b, e); + return{frameRate:n, frameCount:q, bounds:new d.Bounds(c, h, g, f)}; }; })(a.LowLevel || (a.LowLevel = {})); - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(k.Parser || (k.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.assert, v = c.Debug.assertUnreachable, p = c.IntegerUtilities.roundToMultipleOfFour, u = c.ArrayUtilities.Inflate; + var r = d.IntegerUtilities.roundToMultipleOfFour, v = d.ArrayUtilities.Inflate; (function(a) { a[a.FORMAT_COLORMAPPED = 3] = "FORMAT_COLORMAPPED"; a[a.FORMAT_15BPP = 4] = "FORMAT_15BPP"; a[a.FORMAT_24BPP = 5] = "FORMAT_24BPP"; })(a.BitmapFormat || (a.BitmapFormat = {})); a.defineBitmap = function(a) { - h.enterTimeline("defineBitmap"); - var e, m = 0; + k.enterTimeline("defineBitmap"); + var t, l = 0; switch(a.format) { case 3: - e = a.width; - var m = a.height, t = a.hasAlpha, q = p(e) - e, n = t ? 4 : 3, k = p((a.colorTableSize + 1) * n), f = k + (e + q) * m, d = u.inflate(a.bmpData, f, !0), b = new Uint32Array(e * m), g = 0, r = 0; - if (t) { - for (t = 0;t < m;t++) { - for (var w = 0;w < e;w++) { - var r = d[k++] << 2, z = d[r + 3], A = d[r + 0], B = d[r + 1], r = d[r + 2]; - b[g++] = r << 24 | B << 16 | A << 8 | z; + t = a.width; + var l = a.height, c = a.hasAlpha, h = r(t) - t, p = c ? 4 : 3, s = r((a.colorTableSize + 1) * p), m = v.inflate(a.bmpData, s + (t + h) * l, !0), g = new Uint32Array(t * l), f = 0, b = 0; + if (c) { + for (c = 0;c < l;c++) { + for (var e = 0;e < t;e++) { + var b = m[s++] << 2, q = m[b + 3], n = m[b + 0], x = m[b + 1], b = m[b + 2]; + g[f++] = b << 24 | x << 16 | n << 8 | q; } - k += q; + s += h; } } else { - for (t = 0;t < m;t++) { - for (w = 0;w < e;w++) { - r = d[k++] * n, z = 255, A = d[r + 0], B = d[r + 1], r = d[r + 2], b[g++] = r << 24 | B << 16 | A << 8 | z; + for (c = 0;c < l;c++) { + for (e = 0;e < t;e++) { + b = m[s++] * p, q = 255, n = m[b + 0], x = m[b + 1], b = m[b + 2], g[f++] = b << 24 | x << 16 | n << 8 | q; } - k += q; + s += h; } } - s(k === f, "We should be at the end of the data buffer now."); - s(g === e * m, "Should have filled the entire image."); - e = new Uint8Array(b.buffer); - m = 1; + t = new Uint8Array(g.buffer); + l = 1; break; case 5: - n = a.width; - f = a.height; - q = a.hasAlpha; - e = f * n * 4; - m = u.inflate(a.bmpData, e, !0); - if (q) { - e = m; - } else { - q = new Uint32Array(n * f); - n *= f; - for (d = f = 0;d < n;d++) { - f++, b = m[f++], k = m[f++], g = m[f++], q[d] = g << 24 | k << 16 | b << 8 | 255; + h = a.width; + p = a.height; + l = a.hasAlpha; + t = v.inflate(a.bmpData, p * h * 4, !0); + if (!l) { + l = new Uint32Array(h * p); + h *= p; + for (m = p = 0;m < h;m++) { + p++, g = t[p++], s = t[p++], f = t[p++], l[m] = f << 24 | s << 16 | g << 8 | 255; } - s(f === e, "We should be at the end of the data buffer now."); - e = new Uint8Array(q.buffer); + t = new Uint8Array(l.buffer); } - m = 1; + l = 1; break; case 4: - c.Debug.notImplemented("parse15BPP"); - e = null; - m = 1; - break; - default: - v("invalid bitmap format"); + d.Debug.notImplemented("parse15BPP"), t = null, l = 1; } - h.leaveTimeline(); - return{definition:{type:"image", id:a.id, width:a.width, height:a.height, mimeType:"application/octet-stream", data:e, dataType:m, image:null}, type:"image"}; + k.leaveTimeline(); + return{definition:{type:"image", id:a.id, width:a.width, height:a.height, mimeType:"application/octet-stream", data:t, dataType:l, image:null}, type:"image"}; }; - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(k.Parser || (k.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { - a.defineButton = function(a, h) { - for (var p = a.characters, u = {up:[], over:[], down:[], hitTest:[]}, l = 0, e;(e = p[l++]) && !e.eob;) { - var m = h[e.symbolId]; - m || c.Debug.warning("undefined character in button " + a.id); - m = {symbolId:m.id, code:4, depth:e.depth, flags:e.matrix ? 4 : 0, matrix:e.matrix}; - e.stateUp && u.up.push(m); - e.stateOver && u.over.push(m); - e.stateDown && u.down.push(m); - e.stateHitTest && u.hitTest.push(m); + a.defineButton = function(a, d) { + for (var k = a.characters, t = {up:[], over:[], down:[], hitTest:[]}, l = 0, c;(c = k[l++]) && !c.eob;) { + var h = {symbolId:d[c.symbolId].id, code:4, depth:c.depth, flags:c.matrix ? 4 : 0, matrix:c.matrix}; + c.stateUp && t.up.push(h); + c.stateOver && t.over.push(h); + c.stateDown && t.down.push(h); + c.stateHitTest && t.hitTest.push(h); } - return{type:"button", id:a.id, buttonActions:a.buttonActions, states:u}; + return{type:"button", id:a.id, buttonActions:a.buttonActions, states:t}; }; - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - function c(a) { - for (var e = 0;2 <= a;) { - a /= 2, ++e; + function d(a) { + for (var c = 0;2 <= a;) { + a /= 2, ++c; } - return l(2, e); + return l(2, c); } - function h(a) { - return q(a >> 8 & 255, a & 255); - } - function p(a) { - return h(a >> 16) + h(a); + function k(a) { + return s(a >> 8 & 255, a & 255); } function u(a) { - for (var e = 0, f = 0, d = 0, b = 0, g = 0;g < a.length;g++) { - var c = a[g]; - if (c) { - for (var c = c.records, m, l = 0, q = 0, t = 0;t < c.length;t++) { - m = c[t]; - if (m.type) { - m.isStraight ? (l += m.deltaX || 0, q += -(m.deltaY || 0)) : (l += m.controlDeltaX, q += -m.controlDeltaY, l += m.anchorDeltaX, q += -m.anchorDeltaY); + return k(a >> 16) + k(a); + } + function t(a) { + for (var c = 0, f = 0, b = 0, e = 0, h = 0;h < a.length;h++) { + var n = a[h]; + if (n) { + for (var n = n.records, d, l = 0, p = 0, s = 0;s < n.length;s++) { + d = n[s]; + if (d.type) { + d.isStraight ? (l += d.deltaX || 0, p += -(d.deltaY || 0)) : (l += d.controlDeltaX, p += -d.controlDeltaY, l += d.anchorDeltaX, p += -d.anchorDeltaY); } else { - if (m.eos) { + if (d.eos) { break; } - m.move && (l = m.moveX, q = -m.moveY); + d.move && (l = d.moveX, p = -d.moveY); } - e > l && (e = l); - f > q && (f = q); - d < l && (d = l); - b < q && (b = q); + c > l && (c = l); + f > p && (f = p); + b < l && (b = l); + e < p && (e = p); } } } - return 5E3 < Math.max(d - e, b - f); + return 5E3 < Math.max(b - c, e - f); } - var l = Math.pow, e = Math.min, m = Math.max, t = Math.log, q = String.fromCharCode; + var l = Math.pow, c = Math.min, h = Math.max, p = Math.log, s = String.fromCharCode; a.defineFont = function(a) { - var k = "swf-font-" + a.id, f = a.name || k, d = {type:"font", id:a.id, name:f, bold:1 === a.bold, italic:1 === a.italic, codes:null, metrics:null, data:a.data, originalSize:!1}, b = a.glyphs, g = b ? a.glyphCount = b.length : 0; - if (!g) { - return d; + var g = "swf-font-" + a.id, f = a.name || g, b = {type:"font", id:a.id, name:f, bold:1 === a.bold, italic:1 === a.italic, codes:null, metrics:null, data:a.data, originalSize:!1}, e = a.glyphs, q = e ? a.glyphCount = e.length : 0; + if (!q) { + return b; } - var l = {}, w = [], q = {}, A = [], B, M = !("advance" in a), N = 48 === a.code, K = 75 === a.code; - M && (a.advance = []); - B = Math.max.apply(null, a.codes) || 35; + var n = {}, l = [], s = {}, A = [], H, K = !("advance" in a), F = 48 === a.code, J = 75 === a.code; + K && (a.advance = []); + H = Math.max.apply(null, a.codes) || 35; if (a.codes) { - for (var y = 0;y < a.codes.length;y++) { - var D = a.codes[y]; - if (32 > D || -1 < w.indexOf(D)) { - B++, 8232 == B && (B = 8240), D = B; + for (var M = 0;M < a.codes.length;M++) { + var D = a.codes[M]; + if (32 > D || -1 < l.indexOf(D)) { + H++, 8232 == H && (H = 8240), D = H; } - w.push(D); - q[D] = y; + l.push(D); + s[D] = M; } - B = w.concat(); - w.sort(function(b, a) { + H = l.concat(); + l.sort(function(b, a) { return b - a; }); - for (var y = 0, L;void 0 !== (D = w[y++]);) { - var H = D, J = H; - for (L = [y - 1];void 0 !== (D = w[y]) && J + 1 === D;) { - ++J, L.push(y), ++y; + for (var M = 0, B;void 0 !== (D = l[M++]);) { + var E = D, y = E; + for (B = [M - 1];void 0 !== (D = l[M]) && y + 1 === D;) { + ++y, B.push(M), ++M; } - A.push([H, J, L]); + A.push([E, y, B]); } } else { - L = []; - for (y = 0;y < g;y++) { - D = 57344 + y, w.push(D), q[D] = y, L.push(y); + B = []; + for (M = 0;M < q;M++) { + D = 57344 + M, l.push(D), s[D] = M, B.push(M); } - A.push([57344, 57344 + g - 1, L]); - B = w.concat(); + A.push([57344, 57344 + q - 1, B]); + H = l.concat(); } - var C = a.resolution || 1; - N && u(b) && (C = 20, d.originalSize = !0); - N = Math.ceil(a.ascent / C) || 1024; - L = -Math.ceil(a.descent / C) || 0; - for (var E = a.leading / C || 0, F = l["OS/2"] = "", I = "", G = "", Z = "", y = 0, Q;Q = A[y++];) { - H = Q[0], J = Q[1], D = Q[2][0], F += h(H), I += h(J), G += h(D - H + 1 & 65535), Z += h(0); + var z = a.resolution || 1; + F && t(e) && (z = 20, b.originalSize = !0); + F = Math.ceil(a.ascent / z) || 1024; + B = -Math.ceil(a.descent / z) || 0; + for (var G = a.leading / z || 0, C = n["OS/2"] = "", I = "", P = "", T = "", M = 0, O;O = A[M++];) { + E = O[0], y = O[1], D = O[2][0], C += k(E), I += k(y), P += k(D - E + 1 & 65535), T += k(0); } I += "\u00ff\u00ff"; - F += "\u00ff\u00ff"; - G += "\x00\u0001"; - Z += "\x00\x00"; + C += "\u00ff\u00ff"; + P += "\x00\u0001"; + T += "\x00\x00"; A = A.length + 1; - y = 2 * c(A); - H = 2 * A - y; - y = "\x00\x00" + h(2 * A) + h(y) + h(t(A) / t(2)) + h(H) + I + "\x00\x00" + F + G + Z; - l.cmap = "\x00\x00\x00\u0001\x00\u0003\x00\u0001\x00\x00\x00\f\x00\u0004" + h(y.length + 4) + y; - var S = "\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001\x00", F = "\x00\x00", A = 16, I = 0, Z = [], H = [], J = []; - Q = []; - for (var y = G = 0, O = {};void 0 !== (D = w[y++]);) { - for (var P = b[q[D]], V = P.records, $ = 0, W = 0, x = "", ea = "", Y = 0, R = [], Y = -1, P = 0;P < V.length;P++) { - x = V[P]; - if (x.type) { - 0 > Y && (Y = 0, R[Y] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0}); - if (x.isStraight) { - R[Y].commands.push(2); - var U = (x.deltaX || 0) / C, ba = -(x.deltaY || 0) / C; + M = 2 * d(A); + E = 2 * A - M; + M = "\x00\x00" + k(2 * A) + k(M) + k(p(A) / p(2)) + k(E) + I + "\x00\x00" + C + P + T; + n.cmap = "\x00\x00\x00\u0001\x00\u0003\x00\u0001\x00\x00\x00\f\x00\u0004" + k(M.length + 4) + M; + var Q = "\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001\x00", C = "\x00\x00", A = 16, I = 0, T = [], E = [], y = []; + O = []; + for (var M = P = 0, S = {};void 0 !== (D = l[M++]);) { + for (var V = e[s[D]], aa = V.records, $ = 0, w = 0, U = "", ba = "", R = 0, N = [], R = -1, V = 0;V < aa.length;V++) { + U = aa[V]; + if (U.type) { + 0 > R && (R = 0, N[R] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0}); + if (U.isStraight) { + N[R].commands.push(2); + var Z = (U.deltaX || 0) / z, fa = -(U.deltaY || 0) / z; } else { - R[Y].commands.push(3), U = x.controlDeltaX / C, ba = -x.controlDeltaY / C, $ += U, W += ba, R[Y].data.push($, W), U = x.anchorDeltaX / C, ba = -x.anchorDeltaY / C; + N[R].commands.push(3), Z = U.controlDeltaX / z, fa = -U.controlDeltaY / z, $ += Z, w += fa, N[R].data.push($, w), Z = U.anchorDeltaX / z, fa = -U.anchorDeltaY / z; } - $ += U; - W += ba; - R[Y].data.push($, W); + $ += Z; + w += fa; + N[R].data.push($, w); } else { - if (x.eos) { + if (U.eos) { break; } - if (x.move) { - Y++; - R[Y] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0}; - R[Y].commands.push(1); - var X = x.moveX / C, x = -x.moveY / C, U = X - $, ba = x - W, $ = X, W = x; - R[Y].data.push($, W); + if (U.move) { + R++; + N[R] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0}; + N[R].commands.push(1); + var X = U.moveX / z, U = -U.moveY / z, Z = X - $, fa = U - w, $ = X, w = U; + N[R].data.push($, w); } } - -1 < Y && (R[Y].xMin > $ && (R[Y].xMin = $), R[Y].yMin > W && (R[Y].yMin = W), R[Y].xMax < $ && (R[Y].xMax = $), R[Y].yMax < W && (R[Y].yMax = W)); + -1 < R && (N[R].xMin > $ && (N[R].xMin = $), N[R].yMin > w && (N[R].yMin = w), N[R].xMax < $ && (N[R].xMax = $), N[R].yMax < w && (N[R].yMax = w)); } - K || R.sort(function(b, a) { + J || N.sort(function(b, a) { return(a.xMax - a.xMin) * (a.yMax - a.yMin) - (b.xMax - b.xMin) * (b.yMax - b.yMin); }); - O[D] = R; + S[D] = N; } - for (y = 0;void 0 !== (D = w[y++]);) { - for (var P = b[q[D]], V = P.records, R = O[D], ga = 1, Y = 0, U = W = x = $ = "", D = W = $ = 0, V = -1024, X = 0, ja = -1024, ea = x = "", Y = 0, Y = -1, aa = [], ia = [], P = 0;P < R.length;P++) { - aa = aa.concat(R[P].data), ia = ia.concat(R[P].commands); + for (M = 0;void 0 !== (D = l[M++]);) { + for (var V = e[s[D]], aa = V.records, N = S[D], ia = 1, R = 0, Z = w = U = $ = "", D = w = $ = 0, aa = -1024, X = 0, ga = -1024, ba = U = "", R = 0, R = -1, ca = [], da = [], V = 0;V < N.length;V++) { + ca = ca.concat(N[V].data), da = da.concat(N[V].commands); } - for (var T = W = $ = 0, da = 0, fa = "", R = "", la = 0, Y = 0, ga = 1, ea = "", P = 0;P < ia.length;P++) { - U = ia[P], 1 === U ? (Y && (++ga, ea += h(Y - 1)), T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba), $ = T, W = da) : 2 === U ? (T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba), $ = T, W = da) : 3 === U && (T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\x00", fa += h(U), R += h(ba), $ = T, W = da, Y++, T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba), - $ = T, W = da), Y++, Y > I && (I = Y), D > $ && (D = $), X > W && (X = W), V < $ && (V = $), ja < W && (ja = W); + for (var ea = w = $ = 0, W = 0, ka = "", N = "", Y = 0, R = 0, ia = 1, ba = "", V = 0;V < da.length;V++) { + Z = da[V], 1 === Z ? (R && (++ia, ba += k(R - 1)), ea = ca[Y++], W = ca[Y++], Z = ea - $, fa = W - w, U += "\u0001", ka += k(Z), N += k(fa), $ = ea, w = W) : 2 === Z ? (ea = ca[Y++], W = ca[Y++], Z = ea - $, fa = W - w, U += "\u0001", ka += k(Z), N += k(fa), $ = ea, w = W) : 3 === Z && (ea = ca[Y++], W = ca[Y++], Z = ea - $, fa = W - w, U += "\x00", ka += k(Z), N += k(fa), $ = ea, w = W, R++, ea = ca[Y++], W = ca[Y++], Z = ea - $, fa = W - w, U += "\u0001", ka += k(Z), N += k(fa), $ = + ea, w = W), R++, R > I && (I = R), D > $ && (D = $), X > w && (X = w), aa < $ && (aa = $), ga < w && (ga = w); } - $ = ea += h((Y || 1) - 1); - W = fa; - U = R; - P || (D = V = X = ja = 0, x += "1"); - P = h(ga) + h(D) + h(X) + h(V) + h(ja) + $ + "\x00\x00" + x + W + U; - P.length & 1 && (P += "\x00"); - S += P; - F += h(A / 2); - A += P.length; - Z.push(D); - H.push(V); - J.push(X); - Q.push(ja); - ga > G && (G = ga); - Y > I && (I = Y); - M && a.advance.push((V - D) * C * 1.3); + $ = ba += k((R || 1) - 1); + w = ka; + Z = N; + V || (D = aa = X = ga = 0, U += "1"); + V = k(ia) + k(D) + k(X) + k(aa) + k(ga) + $ + "\x00\x00" + U + w + Z; + V.length & 1 && (V += "\x00"); + Q += V; + C += k(A / 2); + A += V.length; + T.push(D); + E.push(aa); + y.push(X); + O.push(ga); + ia > P && (P = ia); + R > I && (I = R); + K && a.advance.push((aa - D) * z * 1.3); } - F += h(A / 2); - l.glyf = S; - K || (y = Math.min.apply(null, J), 0 > y && (L = L || y)); - l["OS/2"] = "\x00\u0001\x00\x00" + h(a.bold ? 700 : 400) + "\x00\u0005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ALF " + h((a.italic ? 1 : 0) | (a.bold ? 32 : 0)) + h(w[0]) + h(w[w.length - 1]) + h(N) + h(L) + h(E) + h(N) + h(-L) + "\x00\x00\x00\x00\x00\x00\x00\x00"; - l.head = "\x00\u0001\x00\x00\x00\u0001\x00\x00\x00\x00\x00\x00_\u000f<\u00f5\x00\x0B\u0004\x00\x00\x00\x00\x00" + p(Date.now()) + "\x00\x00\x00\x00" + p(Date.now()) + h(e.apply(null, Z)) + h(e.apply(null, J)) + h(m.apply(null, H)) + h(m.apply(null, Q)) + h((a.italic ? 2 : 0) | (a.bold ? 1 : 0)) + "\x00\b\x00\u0002\x00\x00\x00\x00"; - w = a.advance; - l.hhea = "\x00\u0001\x00\x00" + h(N) + h(L) + h(E) + h(w ? m.apply(null, w) : 1024) + "\x00\x00\x00\x00\u0003\u00b8\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + h(g + 1); - b = "\x00\x00\x00\x00"; - for (y = 0;y < g;++y) { - b += h(w ? w[y] / C : 1024) + "\x00\x00"; + C += k(A / 2); + n.glyf = Q; + J || (M = Math.min.apply(null, y), 0 > M && (B = B || M)); + n["OS/2"] = "\x00\u0001\x00\x00" + k(a.bold ? 700 : 400) + "\x00\u0005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ALF " + k((a.italic ? 1 : 0) | (a.bold ? 32 : 0)) + k(l[0]) + k(l[l.length - 1]) + k(F) + k(B) + k(G) + k(F) + k(-B) + "\x00\x00\x00\x00\x00\x00\x00\x00"; + n.head = "\x00\u0001\x00\x00\x00\u0001\x00\x00\x00\x00\x00\x00_\u000f<\u00f5\x00\x0B\u0004\x00\x00\x00\x00\x00" + u(Date.now()) + "\x00\x00\x00\x00" + u(Date.now()) + k(c.apply(null, T)) + k(c.apply(null, y)) + k(h.apply(null, E)) + k(h.apply(null, O)) + k((a.italic ? 2 : 0) | (a.bold ? 1 : 0)) + "\x00\b\x00\u0002\x00\x00\x00\x00"; + l = a.advance; + n.hhea = "\x00\u0001\x00\x00" + k(F) + k(B) + k(G) + k(l ? h.apply(null, l) : 1024) + "\x00\x00\x00\x00\u0003\u00b8\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + k(q + 1); + e = "\x00\x00\x00\x00"; + for (M = 0;M < q;++M) { + e += k(l ? l[M] / z : 1024) + "\x00\x00"; } - l.hmtx = b; + n.hmtx = e; if (a.kerning) { - w = a.kerning; - C = w.length; - y = 2 * c(C); - C = "\x00\x00\x00\u0001\x00\x00" + h(14 + 6 * C) + "\x00\u0001" + h(C) + h(y) + h(t(C) / t(2)) + h(2 * C - y); - for (y = 0;x = w[y++];) { - C += h(q[x.code1]) + h(q[x.code2]) + h(x.adjustment); + l = a.kerning; + z = l.length; + M = 2 * d(z); + z = "\x00\x00\x00\u0001\x00\x00" + k(14 + 6 * z) + "\x00\u0001" + k(z) + k(M) + k(p(z) / p(2)) + k(2 * z - M); + for (M = 0;U = l[M++];) { + z += k(s[U.code1]) + k(s[U.code2]) + k(U.adjustment); } - l.kern = C; + n.kern = z; } - l.loca = F; - l.maxp = "\x00\u0001\x00\x00" + h(g + 1) + h(I) + h(G) + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - y = f.replace(/ /g, ""); - k = [a.copyright || "Original licence", f, "Unknown", k, f, "1.0", y, "Unknown", "Unknown", "Unknown"]; - y = k.length; - a = "\x00\x00" + h(y) + h(12 * y + 6); - for (y = A = 0;f = k[y++];) { - a += "\x00\u0001\x00\x00\x00\x00" + h(y - 1) + h(f.length) + h(A), A += f.length; + n.loca = C; + n.maxp = "\x00\u0001\x00\x00" + k(q + 1) + k(I) + k(P) + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + M = f.replace(/ /g, ""); + g = [a.copyright || "Original licence", f, "Unknown", g, f, "1.0", M, "Unknown", "Unknown", "Unknown"]; + M = g.length; + a = "\x00\x00" + k(M) + k(12 * M + 6); + for (M = A = 0;f = g[M++];) { + a += "\x00\u0001\x00\x00\x00\x00" + k(M - 1) + k(f.length) + k(A), A += f.length; } - l.name = a + k.join(""); - l.post = "\x00\u0003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - k = Object.keys(l); - y = k.length; - f = "\x00\u0001\x00\x00" + h(y) + "\x00\u0080\x00\u0003\x00 "; - g = ""; - A = 16 * y + f.length; - for (y = 0;a = k[y++];) { - q = l[a]; - w = q.length; - for (f += a + "\x00\x00\x00\x00" + p(A) + p(w);w & 3;) { - q += "\x00", ++w; + n.name = a + g.join(""); + n.post = "\x00\u0003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + g = Object.keys(n); + M = g.length; + f = "\x00\u0001\x00\x00" + k(M) + "\x00\u0080\x00\u0003\x00 "; + q = ""; + A = 16 * M + f.length; + for (M = 0;a = g[M++];) { + s = n[a]; + l = s.length; + for (f += a + "\x00\x00\x00\x00" + u(A) + u(l);l & 3;) { + s += "\x00", ++l; } - for (g += q;A & 3;) { + for (q += s;A & 3;) { ++A; } - A += w; + A += l; } - l = f + g; - N = {ascent:N / 1024, descent:-L / 1024, leading:E / 1024}; - L = new Uint8Array(l.length); - for (y = 0;y < l.length;y++) { - L[y] = l.charCodeAt(y) & 255; + n = f + q; + F = {ascent:F / 1024, descent:-B / 1024, leading:G / 1024}; + B = new Uint8Array(n.length); + for (M = 0;M < n.length;M++) { + B[M] = n.charCodeAt(M) & 255; } - d.codes = B; - d.metrics = N; - d.data = L; - return d; + b.codes = H; + b.metrics = F; + b.data = B; + return b; }; - })(c.Parser || (c.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(a, e) { - return a[e] << 8 | a[e + 1]; + function r(a, h) { + return a[h] << 8 | a[h + 1]; } - function v(a, e, l) { - var n = 0, k = e.length, f; + function v(a, h, d) { + var l = 0, m = h.length, g; do { - for (var d = n;n < k && 255 !== e[n];) { - ++n; + for (var f = l;l < m && 255 !== h[l];) { + ++l; } - for (;n < k && 255 === e[n];) { - ++n; + for (;l < m && 255 === h[l];) { + ++l; } - f = e[n++]; - if (218 === f) { - n = k; + g = h[l++]; + if (218 === g) { + l = m; } else { - if (217 === f) { - n += 2; + if (217 === g) { + l += 2; continue; } else { - if (208 > f || 216 < f) { - var b = s(e, n); - 192 <= f && 195 >= f && (a.height = s(e, n + 3), a.width = s(e, n + 5)); - n += b; + if (208 > g || 216 < g) { + var b = r(h, l); + 192 <= g && 195 >= g && (a.height = r(h, l + 3), a.width = r(h, l + 5)); + l += b; } } } - l.push(e.subarray(d, n)); - } while (n < k); - a.width && a.height || c.Debug.warning("bad jpeg image"); - return l; + d.push(h.subarray(f, l)); + } while (l < m); + return d; } - function p(a, e) { - if (73 === e[12] && 72 === e[13] && 68 === e[14] && 82 === e[15]) { - a.width = e[16] << 24 | e[17] << 16 | e[18] << 8 | e[19]; - a.height = e[20] << 24 | e[21] << 16 | e[22] << 8 | e[23]; - var c = e[26]; - a.hasAlpha = 4 === c || 6 === c; + function u(a, h) { + if (73 === h[12] && 72 === h[13] && 68 === h[14] && 82 === h[15]) { + a.width = h[16] << 24 | h[17] << 16 | h[18] << 8 | h[19]; + a.height = h[20] << 24 | h[21] << 16 | h[22] << 8 | h[23]; + var d = h[26]; + a.hasAlpha = 4 === d || 6 === d; } } - function u(a) { - for (var e = 0, c = 0;c < a.length;c++) { - e += a[c].length; + function t(a) { + for (var h = 0, d = 0;d < a.length;d++) { + h += a[d].length; } - for (var e = new Uint8Array(e), l = 0, c = 0;c < a.length;c++) { - var k = a[c]; - e.set(k, l); - l += k.length; + for (var h = new Uint8Array(h), l = 0, d = 0;d < a.length;d++) { + var m = a[d]; + h.set(m, l); + l += m.length; } - return e; + return h; } - var l = c.Debug.assert, e = c.ArrayUtilities.Inflate; + var l = d.ArrayUtilities.Inflate; a.parseJpegChunks = v; - a.parsePngHeaders = p; + a.parsePngHeaders = u; a.defineImage = function(a) { - h.enterTimeline("defineImage"); - var t = {type:"image", id:a.id, mimeType:a.mimeType}, q = a.imgData; + k.enterTimeline("defineImage"); + var h = {type:"image", id:a.id, mimeType:a.mimeType}, p = a.imgData; if ("image/jpeg" === a.mimeType) { - var n = a.alphaData; - if (n) { - a = new c.JPEG.JpegImage; - a.parse(u(v(t, q, []))); - l(t.width === a.width); - l(t.height === a.height); - var q = t.width * t.height, n = e.inflate(n, q, !0), k = t.data = new Uint8ClampedArray(4 * q); - a.copyToImageData(t); + var s = a.alphaData; + if (s) { + a = new d.JPEG.JpegImage; + a.parse(t(v(h, p, []))); + var p = h.width * h.height, s = l.inflate(s, p, !0), m = h.data = new Uint8ClampedArray(4 * p); + a.copyToImageData(h); a = 0; - for (var f = 3;a < q;a++, f += 4) { - k[f] = n[a]; + for (var g = 3;a < p;a++, g += 4) { + m[g] = s[a]; } - t.mimeType = "application/octet-stream"; - t.dataType = 3; + h.mimeType = "application/octet-stream"; + h.dataType = 3; } else { - n = [], a.jpegTables && n.push(a.jpegTables), v(t, q, n), a.jpegTables && 0 < a.jpegTables.byteLength && (n[1] = n[1].subarray(2)), t.data = u(n), t.dataType = 4; + s = [], a.jpegTables && s.push(a.jpegTables), v(h, p, s), a.jpegTables && 0 < a.jpegTables.byteLength && (s[1] = s[1].subarray(2)), h.data = t(s), h.dataType = 4; } } else { - p(t, q), t.data = q, t.dataType = 5; + u(h, p), h.data = p, h.dataType = 5; } - h.leaveTimeline(); - return t; + k.leaveTimeline(); + return h; }; - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(k.Parser || (k.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { a.defineLabel = function(a) { return{type:"label", id:a.id, fillBounds:a.bbox, matrix:a.matrix, tag:{hasText:!0, initialText:"", html:!0, readonly:!0}, records:a.records, coords:null, static:!0, require:null}; }; - })(c.Parser || (c.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function h(b, a, d, g) { + function k(b, a, e, f) { if (b) { if (a.fill0) { - if (g = g[a.fill0 - 1], a.fill1 || a.line) { - g.addSegment(b.toReversed()); + if (f = f[a.fill0 - 1], a.fill1 || a.line) { + f.addSegment(b.toReversed()); } else { b.isReversed = !0; return; } } - a.line && a.fill1 && (g = d[a.line - 1], g.addSegment(b.clone())); + a.line && a.fill1 && (f = e[a.line - 1], f.addSegment(b.clone())); } } - function v(b, a, d, e) { - d && (b.morph = p(b, a, e)); - if (a) { - b.miterLimit = 2 * (b.miterLimitFactor || 1.5); - if (!b.color && b.hasFill) { - var f = v(b.fillStyle, !1, !1, e); - b.type = f.type; - b.transform = f.transform; - b.colors = f.colors; - b.ratios = f.ratios; - b.focalPoint = f.focalPoint; - b.bitmapId = f.bitmapId; - b.bitmapIndex = f.bitmapIndex; - b.repeat = f.repeat; - b.fillStyle = null; + function v(a, e, f, c) { + f && (a.morph = u(a, e, c)); + if (e) { + a.miterLimit = 2 * (a.miterLimitFactor || 1.5); + if (!a.color && a.hasFill) { + var g = v(a.fillStyle, !1, !1, c); + a.type = g.type; + a.transform = g.transform; + a.colors = g.colors; + a.ratios = g.ratios; + a.focalPoint = g.focalPoint; + a.bitmapId = g.bitmapId; + a.bitmapIndex = g.bitmapIndex; + a.repeat = g.repeat; + a.fillStyle = null; } else { - b.type = 0; + a.type = 0; } - return b; + return a; } - if (void 0 === b.type || 0 === b.type) { - return b; + if (void 0 === a.type || 0 === a.type) { + return a; } - switch(b.type) { + switch(a.type) { case 16: ; case 18: ; case 19: - f = b.records; - a = b.colors = []; - d = b.ratios = []; - for (e = 0;e < f.length;e++) { - var k = f[e]; - a.push(k.color); - d.push(k.ratio); + g = a.records; + e = a.colors = []; + f = a.ratios = []; + for (c = 0;c < g.length;c++) { + var h = g[c]; + e.push(h.color); + f.push(h.ratio); } - f = 819.2; + g = 819.2; break; case 64: ; @@ -23812,50 +23880,43 @@ console.time("Load SWF Parser"); case 66: ; case 67: - b.smooth = 66 !== b.type && 67 !== b.type; - b.repeat = 65 !== b.type && 67 !== b.type; - b.bitmapIndex = e.length; - e.push(b.bitmapId); - f = .05; - break; - default: - c.Debug.warning("shape parser encountered invalid fill style " + b.type); + a.smooth = 66 !== a.type && 67 !== a.type, a.repeat = 65 !== a.type && 67 !== a.type, a.bitmapIndex = c.length, c.push(a.bitmapId), g = .05; } - if (!b.matrix) { - return b.transform = g, b; + if (!a.matrix) { + return a.transform = b, a; } - a = b.matrix; - b.transform = {a:a.a * f, b:a.b * f, c:a.c * f, d:a.d * f, tx:a.tx / 20, ty:a.ty / 20}; - b.matrix = null; - return b; + e = a.matrix; + a.transform = {a:e.a * g, b:e.b * g, c:e.c * g, d:e.d * g, tx:e.tx / 20, ty:e.ty / 20}; + a.matrix = null; + return a; } - function p(b, a, d) { - var e = Object.create(b); - if (a) { - return e.width = b.widthMorph, !b.color && b.hasFill ? (b = p(b.fillStyle, !1, d), e.transform = b.transform, e.colors = b.colors, e.ratios = b.ratios) : e.color = b.colorMorph, e; + function u(a, e, f) { + var c = Object.create(a); + if (e) { + return c.width = a.widthMorph, !a.color && a.hasFill ? (a = u(a.fillStyle, !1, f), c.transform = a.transform, c.colors = a.colors, c.ratios = a.ratios) : c.color = a.colorMorph, c; } - if (void 0 === b.type) { - return e; + if (void 0 === a.type) { + return c; } - if (0 === b.type) { - return e.color = b.colorMorph, e; + if (0 === a.type) { + return c.color = a.colorMorph, c; } - var k; - switch(b.type) { + var g; + switch(a.type) { case 16: ; case 18: ; case 19: - k = b.records; - a = e.colors = []; - d = e.ratios = []; - for (var c = 0;c < k.length;c++) { - var m = k[c]; - a.push(m.colorMorph); - d.push(m.ratioMorph); + g = a.records; + e = c.colors = []; + f = c.ratios = []; + for (var h = 0;h < g.length;h++) { + var q = g[h]; + e.push(q.colorMorph); + f.push(q.ratioMorph); } - k = 819.2; + g = 819.2; break; case 64: ; @@ -23864,37 +23925,34 @@ console.time("Load SWF Parser"); case 66: ; case 67: - k = .05; - break; - default: - f("shape parser encountered invalid fill style"); + g = .05; } - if (!b.matrix) { - return e.transform = g, e; + if (!a.matrix) { + return c.transform = b, c; } - b = b.matrixMorph; - e.transform = {a:b.a * k, b:b.b * k, c:b.c * k, d:b.d * k, tx:b.tx / 20, ty:b.ty / 20}; - return e; + a = a.matrixMorph; + c.transform = {a:a.a * g, b:a.b * g, c:a.c * g, d:a.d * g, tx:a.tx / 20, ty:a.ty / 20}; + return c; } - function u(b, a, d, g) { - for (var e = [], f = 0;f < b.length;f++) { - var k = v(b[f], a, d, g); - e[f] = a ? new w(null, k) : new w(k, null); + function t(b, a, e, f) { + for (var c = [], g = 0;g < b.length;g++) { + var h = v(b[g], a, e, f); + c[g] = a ? new q(null, h) : new q(h, null); } - return e; + return c; } function l(b, a) { - var d = b.noHscale ? b.noVscale ? 0 : 2 : b.noVscale ? 3 : 1, g = n(b.width, 0, 5100) | 0; - a.lineStyle(g, b.color, b.pixelHinting, d, b.endCapsStyle, b.jointStyle, b.miterLimit); + var e = b.noHscale ? b.noVscale ? 0 : 2 : b.noVscale ? 3 : 1, f = m(b.width, 0, 5100) | 0; + a.lineStyle(f, b.color, b.pixelHinting, e, b.endCapsStyle, b.jointStyle, b.miterLimit); } - function e(b, a) { - var d = n(b.width, 0, 5100) | 0; - a.writeMorphLineStyle(d, b.color); + function c(b, a) { + var e = m(b.width, 0, 5100) | 0; + a.writeMorphLineStyle(e, b.color); } - function m(b, a, d) { - d.beginGradient(b, a.colors, a.ratios, 16 === a.type ? 16 : 18, a.transform, a.spreadMethod, a.interpolationMode, a.focalPoint / 2 | 0); + function h(b, a, e) { + e.beginGradient(b, a.colors, a.ratios, 16 === a.type ? 16 : 18, a.transform, a.spreadMethod, a.interpolationMode, a.focalPoint / 2 | 0); } - var t = c.ArrayUtilities.DataBuffer, q = c.ShapeData, n = c.NumberUtilities.clamp, k = c.Debug.assert, f = c.Debug.assertUnreachable, d = Array.prototype.push, b; + var p = d.ArrayUtilities.DataBuffer, s = d.ShapeData, m = d.NumberUtilities.clamp, g = Array.prototype.push, f; (function(b) { b[b.Solid = 0] = "Solid"; b[b.LinearGradient = 16] = "LinearGradient"; @@ -23904,113 +23962,107 @@ console.time("Load SWF Parser"); b[b.ClippedBitmap = 65] = "ClippedBitmap"; b[b.NonsmoothedRepeatingBitmap = 66] = "NonsmoothedRepeatingBitmap"; b[b.NonsmoothedClippedBitmap = 67] = "NonsmoothedClippedBitmap"; - })(b || (b = {})); - var g = {a:1, b:0, c:0, d:1, tx:0, ty:0}; + })(f || (f = {})); + var b = {a:1, b:0, c:0, d:1, tx:0, ty:0}; a.defineShape = function(b) { - for (var a = [], g = u(b.fillStyles, !1, !!b.recordsMorph, a), e = u(b.lineStyles, !0, !!b.recordsMorph, a), f = b.records, c = e, m = b.recordsMorph || null, e = null !== m, l = {fill0:0, fill1:0, line:0}, n = null, p, J, C = f.length - 1, E = 0, F = 0, I = 0, G = 0, Z, Q = 0, S = 0;Q < C;Q++) { - var O = f[Q], P; - e && (P = m[S++]); + for (var a = [], f = t(b.fillStyles, !1, !!b.recordsMorph, a), c = t(b.lineStyles, !0, !!b.recordsMorph, a), h = b.records, d = c, m = b.recordsMorph || null, c = null !== m, l = {fill0:0, fill1:0, line:0}, u = null, D, B, E = h.length - 1, y = 0, z = 0, G = 0, C = 0, I, P = 0, T = 0;P < E;P++) { + var O = h[P], Q; + c && (Q = m[T++]); if (0 === O.type) { - n && h(n, l, c, g), O.hasNewStyles && (p || (p = []), d.apply(p, g), g = u(O.fillStyles, !1, e, a), d.apply(p, c), c = u(O.lineStyles, !0, e, a), J && (p.push(J), J = null), l = {fill0:0, fill1:0, line:0}), O.hasFillStyle0 && (l.fill0 = O.fillStyle0), O.hasFillStyle1 && (l.fill1 = O.fillStyle1), O.hasLineStyle && (l.line = O.lineStyle), l.fill1 ? Z = g[l.fill1 - 1] : l.line ? Z = c[l.line - 1] : l.fill0 && (Z = g[l.fill0 - 1]), O.move && (E = O.moveX | 0, F = O.moveY | 0), Z && (n = r.FromDefaults(e), - Z.addSegment(n), e ? (0 === P.type ? (I = P.moveX | 0, G = P.moveY | 0) : (I = E, G = F, S--), n.morphMoveTo(E, F, I, G)) : n.moveTo(E, F)); + u && k(u, l, d, f), O.hasNewStyles && (D || (D = []), g.apply(D, f), f = t(O.fillStyles, !1, c, a), g.apply(D, d), d = t(O.lineStyles, !0, c, a), B && (D.push(B), B = null), l = {fill0:0, fill1:0, line:0}), O.hasFillStyle0 && (l.fill0 = O.fillStyle0), O.hasFillStyle1 && (l.fill1 = O.fillStyle1), O.hasLineStyle && (l.line = O.lineStyle), l.fill1 ? I = f[l.fill1 - 1] : l.line ? I = d[l.line - 1] : l.fill0 && (I = f[l.fill0 - 1]), O.move && (y = O.moveX | 0, z = O.moveY | 0), I && (u = e.FromDefaults(c), + I.addSegment(u), c ? (0 === Q.type ? (G = Q.moveX | 0, C = Q.moveY | 0) : (G = y, C = z, T--), u.morphMoveTo(y, z, G, C)) : u.moveTo(y, z)); } else { - k(1 === O.type); - n || (J || (J = new w(null, v({color:{red:0, green:0, blue:0, alpha:0}, width:20}, !0, e, a))), n = r.FromDefaults(e), J.addSegment(n), e ? n.morphMoveTo(E, F, I, G) : n.moveTo(E, F)); - if (e) { - for (;P && 0 === P.type;) { - P = m[S++]; + u || (B || (B = new q(null, v({color:{red:0, green:0, blue:0, alpha:0}, width:20}, !0, c, a))), u = e.FromDefaults(c), B.addSegment(u), c ? u.morphMoveTo(y, z, G, C) : u.moveTo(y, z)); + if (c) { + for (;Q && 0 === Q.type;) { + Q = m[T++]; } - P || (P = O); + Q || (Q = O); } - if (!O.isStraight || e && !P.isStraight) { - var V, $, W; - O.isStraight ? (W = O.deltaX | 0, O = O.deltaY | 0, V = E + (W >> 1), $ = F + (O >> 1), E += W, F += O) : (V = E + O.controlDeltaX | 0, $ = F + O.controlDeltaY | 0, E = V + O.anchorDeltaX | 0, F = $ + O.anchorDeltaY | 0); - if (e) { - if (P.isStraight) { - W = P.deltaX | 0, O = P.deltaY | 0, x = I + (W >> 1), ea = G + (O >> 1), I += W, G += O; + if (!O.isStraight || c && !Q.isStraight) { + var S, V, aa; + O.isStraight ? (aa = O.deltaX | 0, O = O.deltaY | 0, S = y + (aa >> 1), V = z + (O >> 1), y += aa, z += O) : (S = y + O.controlDeltaX | 0, V = z + O.controlDeltaY | 0, y = S + O.anchorDeltaX | 0, z = V + O.anchorDeltaY | 0); + if (c) { + if (Q.isStraight) { + aa = Q.deltaX | 0, O = Q.deltaY | 0, $ = G + (aa >> 1), w = C + (O >> 1), G += aa, C += O; } else { - var x = I + P.controlDeltaX | 0, ea = G + P.controlDeltaY | 0, I = x + P.anchorDeltaX | 0, G = ea + P.anchorDeltaY | 0 + var $ = G + Q.controlDeltaX | 0, w = C + Q.controlDeltaY | 0, G = $ + Q.anchorDeltaX | 0, C = w + Q.anchorDeltaY | 0 } - n.morphCurveTo(V, $, E, F, x, ea, I, G); + u.morphCurveTo(S, V, y, z, $, w, G, C); } else { - n.curveTo(V, $, E, F); + u.curveTo(S, V, y, z); } } else { - E += O.deltaX | 0, F += O.deltaY | 0, e ? (I += P.deltaX | 0, G += P.deltaY | 0, n.morphLineTo(E, F, I, G)) : n.lineTo(E, F); + y += O.deltaX | 0, z += O.deltaY | 0, c ? (G += Q.deltaX | 0, C += Q.deltaY | 0, u.morphLineTo(y, z, G, C)) : u.lineTo(y, z); } } } - h(n, l, c, g); - p ? d.apply(p, g) : p = g; - d.apply(p, c); - J && p.push(J); - f = new q; - e && (f.morphCoordinates = new Int32Array(f.coordinates.length), f.morphStyles = new t(16)); - for (Q = 0;Q < p.length;Q++) { - p[Q].serialize(f); + k(u, l, d, f); + D ? g.apply(D, f) : D = f; + g.apply(D, d); + B && D.push(B); + h = new s; + c && (h.morphCoordinates = new Int32Array(h.coordinates.length), h.morphStyles = new p(16)); + for (P = 0;P < D.length;P++) { + D[P].serialize(h); } - return{type:b.isMorph ? "morphshape" : "shape", id:b.id, fillBounds:b.fillBounds, lineBounds:b.lineBounds, morphFillBounds:b.fillBoundsMorph || null, morphLineBounds:b.lineBoundsMorph || null, shape:f.toPlainObject(), transferables:f.buffers, require:a.length ? a : null}; + return{type:b.isMorph ? "morphshape" : "shape", id:b.id, fillBounds:b.fillBounds, lineBounds:b.lineBounds, morphFillBounds:b.fillBoundsMorph || null, morphLineBounds:b.lineBoundsMorph || null, shape:h.toPlainObject(), transferables:h.buffers, require:a.length ? a : null}; }; - var r = function() { - function b(a, d, g, e, f, k) { + var e = function() { + function b(a, e, f, c, g, h) { this.commands = a; - this.data = d; - this.morphData = g; - this.prev = e; - this.next = f; - this.isReversed = k; + this.data = e; + this.morphData = f; + this.prev = c; + this.next = g; + this.isReversed = h; this.id = b._counter++; } b.FromDefaults = function(a) { - var d = new t, g = new t; - d.endian = g.endian = "auto"; - var e = null; - a && (e = new t, e.endian = "auto"); - return new b(d, g, e, null, null, !1); + var e = new p, f = new p; + e.endian = f.endian = "auto"; + var c = null; + a && (c = new p, c.endian = "auto"); + return new b(e, f, c, null, null, !1); }; b.prototype.moveTo = function(b, a) { this.commands.writeUnsignedByte(9); this.data.write2Ints(b, a); }; - b.prototype.morphMoveTo = function(b, a, d, g) { + b.prototype.morphMoveTo = function(b, a, e, f) { this.moveTo(b, a); - this.morphData.write2Ints(d, g); + this.morphData.write2Ints(e, f); }; b.prototype.lineTo = function(b, a) { this.commands.writeUnsignedByte(10); this.data.write2Ints(b, a); }; - b.prototype.morphLineTo = function(b, a, d, g) { + b.prototype.morphLineTo = function(b, a, e, f) { this.lineTo(b, a); - this.morphData.write2Ints(d, g); + this.morphData.write2Ints(e, f); }; - b.prototype.curveTo = function(b, a, d, g) { + b.prototype.curveTo = function(b, a, e, f) { this.commands.writeUnsignedByte(11); - this.data.write4Ints(b, a, d, g); + this.data.write4Ints(b, a, e, f); }; - b.prototype.morphCurveTo = function(b, a, d, g, e, f, k, c) { - this.curveTo(b, a, d, g); - this.morphData.write4Ints(e, f, k, c); + b.prototype.morphCurveTo = function(b, a, e, f, c, g, h, n) { + this.curveTo(b, a, e, f); + this.morphData.write4Ints(c, g, h, n); }; b.prototype.toReversed = function() { - k(!this.isReversed); return new b(this.commands, this.data, this.morphData, null, null, !0); }; b.prototype.clone = function() { return new b(this.commands, this.data, this.morphData, null, null, this.isReversed); }; b.prototype.storeStartAndEnd = function() { - var b = this.data.ints, a = b[0] + "," + b[1], d = (this.data.length >> 2) - 2, b = b[d] + "," + b[d + 1]; + var b = this.data.ints, a = b[0] + "," + b[1], e = (this.data.length >> 2) - 2, b = b[e] + "," + b[e + 1]; this.isReversed ? (this.startPoint = b, this.endPoint = a) : (this.startPoint = a, this.endPoint = b); }; b.prototype.connectsTo = function(b) { - k(b !== this); - k(this.endPoint); - k(b.startPoint); return this.endPoint === b.startPoint; }; b.prototype.startConnectsTo = function(b) { - k(b !== this); return this.startPoint === b.startPoint; }; b.prototype.flipDirection = function() { @@ -24023,55 +24075,46 @@ console.time("Load SWF Parser"); if (this.isReversed) { this._serializeReversed(b, a); } else { - var d = this.commands.bytes, g = this.data.length >> 2, e = this.morphData ? this.morphData.ints : null, f = this.data.ints; - k(9 === d[0]); - var c = 0; - f[0] === a.x && f[1] === a.y && c++; - for (var m = this.commands.length, l = 2 * c;c < m;c++) { - l = this._writeCommand(d[c], l, f, e, b); + var e = this.commands.bytes, f = this.data.length >> 2, c = this.morphData ? this.morphData.ints : null, g = this.data.ints, h = 0; + g[0] === a.x && g[1] === a.y && h++; + for (var n = this.commands.length, q = 2 * h;h < n;h++) { + q = this._writeCommand(e[h], q, g, c, b); } - k(l === g); - a.x = f[g - 2]; - a.y = f[g - 1]; + a.x = g[f - 2]; + a.y = g[f - 1]; } }; b.prototype._serializeReversed = function(b, a) { - var d = this.commands.length, g = (this.data.length >> 2) - 2, e = this.commands.bytes; - k(9 === e[0]); - var f = this.data.ints, c = this.morphData ? this.morphData.ints : null; - f[g] === a.x && f[g + 1] === a.y || this._writeCommand(9, g, f, c, b); - if (1 !== d) { - for (;1 < d--;) { - var g = g - 2, m = e[d]; - b.writeCommandAndCoordinates(m, f[g], f[g + 1]); - c && b.writeMorphCoordinates(c[g], c[g + 1]); - 11 === m && (g -= 2, b.writeCoordinates(f[g], f[g + 1]), c && b.writeMorphCoordinates(c[g], c[g + 1])); + var e = this.commands.length, f = (this.data.length >> 2) - 2, c = this.commands.bytes, g = this.data.ints, h = this.morphData ? this.morphData.ints : null; + g[f] === a.x && g[f + 1] === a.y || this._writeCommand(9, f, g, h, b); + if (1 !== e) { + for (;1 < e--;) { + var f = f - 2, n = c[e]; + b.writeCommandAndCoordinates(n, g[f], g[f + 1]); + h && b.writeMorphCoordinates(h[f], h[f + 1]); + 11 === n && (f -= 2, b.writeCoordinates(g[f], g[f + 1]), h && b.writeMorphCoordinates(h[f], h[f + 1])); } - k(0 === g); } - a.x = f[0]; - a.y = f[1]; + a.x = g[0]; + a.y = g[1]; }; - b.prototype._writeCommand = function(b, a, d, g, e) { - e.writeCommandAndCoordinates(b, d[a++], d[a++]); - g && e.writeMorphCoordinates(g[a - 2], g[a - 1]); - 11 === b && (e.writeCoordinates(d[a++], d[a++]), g && e.writeMorphCoordinates(g[a - 2], g[a - 1])); + b.prototype._writeCommand = function(b, a, e, f, c) { + c.writeCommandAndCoordinates(b, e[a++], e[a++]); + f && c.writeMorphCoordinates(f[a - 2], f[a - 1]); + 11 === b && (c.writeCoordinates(e[a++], e[a++]), f && c.writeMorphCoordinates(f[a - 2], f[a - 1])); return a; }; b._counter = 0; return b; - }(), w = function() { - function b(a, d) { + }(), q = function() { + function b(a, e) { this.fillStyle = a; - this.lineStyle = d; + this.lineStyle = e; this._head = null; } b.prototype.addSegment = function(b) { - k(b); - k(null === b.next); - k(null === b.prev); var a = this._head; - a && (k(b !== a), a.next = b, b.prev = a); + a && (a.next = b, b.prev = a); this._head = b; }; b.prototype.removeSegment = function(b) { @@ -24079,10 +24122,10 @@ console.time("Load SWF Parser"); b.next && (b.next.prev = b.prev); }; b.prototype.insertSegment = function(b, a) { - var d = a.prev; - b.prev = d; + var e = a.prev; + b.prev = e; b.next = a; - d && (d.next = b); + e && (e.next = b); a.prev = b; }; b.prototype.head = function() { @@ -24094,31 +24137,31 @@ console.time("Load SWF Parser"); for (;a;) { a.storeStartAndEnd(), a = a.prev; } - for (var d = this.head(), g = d, c = a = null, r = d.prev;d;) { - for (;r;) { - r.startConnectsTo(d) && r.flipDirection(), r.connectsTo(d) ? (r.next !== d && (this.removeSegment(r), this.insertSegment(r, d)), d = r, r = d.prev) : (r.startConnectsTo(g) && r.flipDirection(), g.connectsTo(r) ? (this.removeSegment(r), g.next = r, r = r.prev, g.next.prev = g, g.next.next = null, g = g.next) : r = r.prev); + for (var e = this.head(), f = e, g = a = null, n = e.prev;e;) { + for (;n;) { + n.startConnectsTo(e) && n.flipDirection(), n.connectsTo(e) ? (n.next !== e && (this.removeSegment(n), this.insertSegment(n, e)), e = n, n = e.prev) : (n.startConnectsTo(f) && n.flipDirection(), f.connectsTo(n) ? (this.removeSegment(n), f.next = n, n = n.prev, f.next.prev = f, f.next.next = null, f = f.next) : n = n.prev); } - r = d.prev; - a ? (c.next = d, d.prev = c, c = g, c.next = null) : (a = d, c = g); - if (!r) { + n = e.prev; + a ? (g.next = e, e.prev = g, g = f, g.next = null) : (a = e, g = f); + if (!n) { break; } - d = g = r; - r = d.prev; + e = f = n; + n = e.prev; } if (this.fillStyle) { - switch(r = this.fillStyle, d = r.morph, r.type) { + switch(n = this.fillStyle, e = n.morph, n.type) { case 0: - b.beginFill(r.color); - d && b.writeMorphFill(d.color); + b.beginFill(n.color); + e && b.writeMorphFill(e.color); break; case 16: ; case 18: ; case 19: - m(2, r, b); - d && b.writeMorphGradient(d.colors, d.ratios, d.transform); + h(2, n, b); + e && b.writeMorphGradient(e.colors, e.ratios, e.transform); break; case 65: ; @@ -24127,26 +24170,22 @@ console.time("Load SWF Parser"); case 67: ; case 66: - b.beginBitmap(3, r.bitmapIndex, r.transform, r.repeat, r.smooth); - d && b.writeMorphBitmap(d.transform); - break; - default: - f("Invalid fill style type: " + r.type); + b.beginBitmap(3, n.bitmapIndex, n.transform, n.repeat, n.smooth), e && b.writeMorphBitmap(e.transform); } } else { - switch(r = this.lineStyle, d = r.morph, k(r), r.type) { + switch(n = this.lineStyle, e = n.morph, n.type) { case 0: - l(r, b); - d && e(d, b); + l(n, b); + e && c(e, b); break; case 16: ; case 18: ; case 19: - l(r, b); - m(6, r, b); - d && (e(d, b), b.writeMorphGradient(d.colors, d.ratios, d.transform)); + l(n, b); + h(6, n, b); + e && (c(e, b), b.writeMorphGradient(e.colors, e.ratios, e.transform)); break; case 65: ; @@ -24155,12 +24194,12 @@ console.time("Load SWF Parser"); case 67: ; case 66: - l(r, b), b.beginBitmap(7, r.bitmapIndex, r.transform, r.repeat, r.smooth), d && (e(d, b), b.writeMorphBitmap(d.transform)); + l(n, b), b.beginBitmap(7, n.bitmapIndex, n.transform, n.repeat, n.smooth), e && (c(e, b), b.writeMorphBitmap(e.transform)); } } - d = {x:0, y:0}; - for (r = a;r;) { - r.serialize(b, d), r = r.next; + e = {x:0, y:0}; + for (n = a;n;) { + n.serialize(b, e), n = n.next; } this.fillStyle ? b.endFill() : b.endLine(); return b; @@ -24168,240 +24207,240 @@ console.time("Load SWF Parser"); }; return b; }(); - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(k.Parser || (k.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { - function h(a, b, g, e, f) { - var k = e >> 3, c = g * b * k, k = g * k, m = a.length + (a.length & 1), l = new ArrayBuffer(t.length + m), n = new Uint8Array(l); - n.set(t); - if (f) { - f = 0; - for (var q = t.length;f < a.length;f += 2, q += 2) { - n[q] = a[f + 1], n[q + 1] = a[f]; + function d(b, a, f, c, g) { + var h = c >> 3, m = f * a * h, h = f * h, l = b.length + (b.length & 1), s = new ArrayBuffer(p.length + l), k = new Uint8Array(s); + k.set(p); + if (g) { + g = 0; + for (var r = p.length;g < b.length;g += 2, r += 2) { + k[r] = b[g + 1], k[r + 1] = b[g]; } } else { - n.set(a, t.length); + k.set(b, p.length); } - a = new DataView(l); - a.setUint32(4, m + 36, !0); - a.setUint16(22, g, !0); - a.setUint32(24, b, !0); - a.setUint32(28, c, !0); - a.setUint16(32, k, !0); - a.setUint16(34, e, !0); - a.setUint32(40, m, !0); - return{data:n, mimeType:"audio/wav"}; + b = new DataView(s); + b.setUint32(4, l + 36, !0); + b.setUint16(22, f, !0); + b.setUint32(24, a, !0); + b.setUint32(28, m, !0); + b.setUint16(32, h, !0); + b.setUint16(34, c, !0); + b.setUint32(40, l, !0); + return{data:k, mimeType:"audio/wav"}; } - function v(a, b, g) { - function e(b) { - for (;c < b;) { - k = k << 8 | a[f++], c += 8; + function k(b, a, f) { + function c(a) { + for (;d < a;) { + h = h << 8 | b[g++], d += 8; } - c -= b; - return k >>> c & (1 << b) - 1; + d -= a; + return h >>> d & (1 << a) - 1; } - for (var f = 0, k = 0, c = 0, m = 0, l = e(2), t = q[l];m < b.length;) { - var h = b[m++] = e(16) << 16 >> 16, s, p = e(6), v; - 1 < g && (s = b[m++] = e(16) << 16 >> 16, v = e(6)); - for (var u = 1 << l + 1, J = 0;4095 > J;J++) { - for (var C = e(l + 2), E = n[p], F = 0, I = u >> 1;I;I >>= 1, E >>= 1) { - C & I && (F += E); + for (var g = 0, h = 0, d = 0, l = 0, p = c(2), r = s[p];l < a.length;) { + var u = a[l++] = c(16) << 16 >> 16, t, v = c(6), B; + 1 < f && (t = a[l++] = c(16) << 16 >> 16, B = c(6)); + for (var E = 1 << p + 1, y = 0;4095 > y;y++) { + for (var z = c(p + 2), G = m[v], C = 0, I = E >> 1;I;I >>= 1, G >>= 1) { + z & I && (C += G); } - h += (C & u ? -1 : 1) * (F + E); - b[m++] = h = -32768 > h ? -32768 : 32767 < h ? 32767 : h; - p += t[C & ~u]; - p = 0 > p ? 0 : 88 < p ? 88 : p; - if (1 < g) { - C = e(l + 2); - E = n[v]; - F = 0; - for (I = u >> 1;I;I >>= 1, E >>= 1) { - C & I && (F += E); + u += (z & E ? -1 : 1) * (C + G); + a[l++] = u = -32768 > u ? -32768 : 32767 < u ? 32767 : u; + v += r[z & ~E]; + v = 0 > v ? 0 : 88 < v ? 88 : v; + if (1 < f) { + z = c(p + 2); + G = m[B]; + C = 0; + for (I = E >> 1;I;I >>= 1, G >>= 1) { + z & I && (C += G); } - s += (C & u ? -1 : 1) * (F + E); - b[m++] = s = -32768 > s ? -32768 : 32767 < s ? 32767 : s; - v += t[C & ~u]; - v = 0 > v ? 0 : 88 < v ? 88 : v; + t += (z & E ? -1 : 1) * (C + G); + a[l++] = t = -32768 > t ? -32768 : 32767 < t ? 32767 : t; + B += r[z & ~E]; + B = 0 > B ? 0 : 88 < B ? 88 : B; } } } } - function p(a) { - for (var b = new Float32Array(a.length), g = 0;g < b.length;g++) { - b[g] = (a[g] - 128) / 128; + function u(b) { + for (var a = new Float32Array(b.length), f = 0;f < a.length;f++) { + a[f] = (b[f] - 128) / 128; } - this.currentSample += b.length / this.channels; - return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b}; + this.currentSample += a.length / this.channels; + return{streamId:this.streamId, samplesCount:a.length / this.channels, pcm:a}; } - function u(a) { - for (var b = new Float32Array(a.length / 2), g = 0, e = 0;g < b.length;g++, e += 2) { - b[g] = (a[e] << 24 | a[e + 1] << 16) / 2147483648; + function t(b) { + for (var a = new Float32Array(b.length / 2), f = 0, c = 0;f < a.length;f++, c += 2) { + a[f] = (b[c] << 24 | b[c + 1] << 16) / 2147483648; } - this.currentSample += b.length / this.channels; - return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b}; + this.currentSample += a.length / this.channels; + return{streamId:this.streamId, samplesCount:a.length / this.channels, pcm:a}; } - function l(a) { - for (var b = new Float32Array(a.length / 2), g = 0, e = 0;g < b.length;g++, e += 2) { - b[g] = (a[e + 1] << 24 | a[e] << 16) / 2147483648; + function l(b) { + for (var a = new Float32Array(b.length / 2), f = 0, c = 0;f < a.length;f++, c += 2) { + a[f] = (b[c + 1] << 24 | b[c] << 16) / 2147483648; } - this.currentSample += b.length / this.channels; - return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b}; + this.currentSample += a.length / this.channels; + return{streamId:this.streamId, samplesCount:a.length / this.channels, pcm:a}; } - function e(a) { - var b = a[1] << 8 | a[0], g = a[3] << 8 | a[2]; - this.currentSample += b; - return{streamId:this.streamId, samplesCount:b, data:new Uint8Array(a.subarray(4)), seek:g}; + function c(b) { + var a = b[1] << 8 | b[0], f = b[3] << 8 | b[2]; + this.currentSample += a; + return{streamId:this.streamId, samplesCount:a, data:new Uint8Array(b.subarray(4)), seek:f}; } - var m = [5512, 11250, 22500, 44100], t = new Uint8Array([82, 73, 70, 70, 0, 0, 0, 0, 87, 65, 86, 69, 102, 109, 116, 32, 16, 0, 0, 0, 1, 0, 2, 0, 68, 172, 0, 0, 16, 177, 2, 0, 4, 0, 16, 0, 100, 97, 116, 97, 0, 0, 0, 0]); - a.defineSound = function(a) { - var b = 1 == a.soundType ? 2 : 1, g = a.samplesCount, e = m[a.soundRate], f = a.soundData, k; - switch(a.soundFormat) { + var h = [5512, 11250, 22500, 44100], p = new Uint8Array([82, 73, 70, 70, 0, 0, 0, 0, 87, 65, 86, 69, 102, 109, 116, 32, 16, 0, 0, 0, 1, 0, 2, 0, 68, 172, 0, 0, 16, 177, 2, 0, 4, 0, 16, 0, 100, 97, 116, 97, 0, 0, 0, 0]); + a.defineSound = function(b) { + var a = 1 == b.soundType ? 2 : 1, f = b.samplesCount, c = h[b.soundRate], g = b.soundData, l; + switch(b.soundFormat) { case 0: - k = new Float32Array(g * b); - if (1 == a.soundSize) { - for (var c = g = 0;g < k.length;g++, c += 2) { - k[g] = (f[c] << 24 | f[c + 1] << 16) / 2147483648; + l = new Float32Array(f * a); + if (1 == b.soundSize) { + for (var m = f = 0;f < l.length;f++, m += 2) { + l[f] = (g[m] << 24 | g[m + 1] << 16) / 2147483648; } - f = h(f, e, b, 16, !0); + g = d(g, c, a, 16, !0); } else { - for (g = 0;g < k.length;g++) { - k[g] = (f[g] - 128) / 128; + for (f = 0;f < l.length;f++) { + l[f] = (g[f] - 128) / 128; } - f = h(f, e, b, 8, !1); + g = d(g, c, a, 8, !1); } break; case 3: - k = new Float32Array(g * b); - if (1 == a.soundSize) { - for (c = g = 0;g < k.length;g++, c += 2) { - k[g] = (f[c + 1] << 24 | f[c] << 16) / 2147483648; + l = new Float32Array(f * a); + if (1 == b.soundSize) { + for (m = f = 0;f < l.length;f++, m += 2) { + l[f] = (g[m + 1] << 24 | g[m] << 16) / 2147483648; } - f = h(f, e, b, 16, !1); + g = d(g, c, a, 16, !1); } else { - for (g = 0;g < k.length;g++) { - k[g] = (f[g] - 128) / 128; + for (f = 0;f < l.length;f++) { + l[f] = (g[f] - 128) / 128; } - f = h(f, e, b, 8, !1); + g = d(g, c, a, 8, !1); } break; case 2: - f = {data:new Uint8Array(f.subarray(2)), mimeType:"audio/mpeg"}; + g = {data:new Uint8Array(g.subarray(2)), mimeType:"audio/mpeg"}; break; case 1: - c = new Int16Array(g * b); - v(f, c, b); - k = new Float32Array(g * b); - for (g = 0;g < k.length;g++) { - k[g] = c[g] / 32768; + m = new Int16Array(f * a); + k(g, m, a); + l = new Float32Array(f * a); + for (f = 0;f < l.length;f++) { + l[f] = m[f] / 32768; } - f = h(new Uint8Array(c.buffer), e, b, 16, !(new Uint8Array((new Uint16Array([1])).buffer))[0]); + g = d(new Uint8Array(m.buffer), c, a, 16, !(new Uint8Array((new Uint16Array([1])).buffer))[0]); break; default: - throw Error("Unsupported audio format: " + a.soundFormat);; + throw Error("Unsupported audio format: " + b.soundFormat);; } - a = {type:"sound", id:a.id, sampleRate:e, channels:b, pcm:k, packaged:null}; - f && (a.packaged = f); - return a; + b = {type:"sound", id:b.id, sampleRate:c, channels:a, pcm:l, packaged:null}; + g && (b.packaged = g); + return b; }; - var q = [[-1, 2], [-1, -1, 2, 4], [-1, -1, -1, -1, 2, 4, 6, 8], [-1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16]], n = [7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, - 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767], k = 0, f = function() { - function a(b, d, e) { - this.streamId = k++; + var s = [[-1, 2], [-1, -1, 2, 4], [-1, -1, -1, -1, 2, 4, 6, 8], [-1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16]], m = [7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, + 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767], g = 0, f = function() { + function b(b, a, f) { + this.streamId = g++; this.samplesCount = b; - this.sampleRate = d; - this.channels = e; + this.sampleRate = a; + this.channels = f; this.format = null; this.currentSample = 0; } - a.FromTag = function(b) { - var g = new a(b.samplesCount, m[b.streamRate], 1 == b.streamType ? 2 : 1); - switch(b.streamCompression) { + b.FromTag = function(a) { + var f = new b(a.samplesCount, h[a.streamRate], 1 == a.streamType ? 2 : 1); + switch(a.streamCompression) { case 0: ; case 3: - g.format = "wave"; - g.decode = 1 == b.soundSize ? 0 === b.streamCompression ? u : l : p; + f.format = "wave"; + f.decode = 1 == a.soundSize ? 0 === a.streamCompression ? t : l : u; break; case 2: - g.format = "mp3"; - g.decode = e; + f.format = "mp3"; + f.decode = c; break; default: - return c.Debug.warning("Unsupported audio format: " + b.soundFormat), null; + return null; } - return g; + return f; }; - return a; + return b; }(); a.SoundStream = f; - })(h.Parser || (h.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { a.defineText = function(a) { return{type:"text", id:a.id, fillBounds:a.bbox, variableName:a.variableName, tag:a, bold:!1, italic:!1}; }; - })(c.Parser || (c.Parser = {})); - })(c.SWF || (c.SWF = {})); + })(d.Parser || (d.Parser = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("Parser"); - h.enterTimeline = function(a, c) { +(function(d) { + (function(k) { + k.timelineBuffer = new d.Tools.Profiler.TimelineBuffer("Parser"); + k.enterTimeline = function(a, d) { }; - h.leaveTimeline = function(a) { + k.leaveTimeline = function(a) { }; - })(c.SWF || (c.SWF = {})); + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -var Shumway$$inline_710 = Shumway || (Shumway = {}), SWF$$inline_711 = Shumway$$inline_710.SWF || (Shumway$$inline_710.SWF = {}), Option$$inline_712 = Shumway$$inline_710.Options.Option; -SWF$$inline_711.parserOptions = Shumway$$inline_710.Settings.shumwayOptions.register(new Shumway$$inline_710.Options.OptionSet("Parser Options")); -SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$inline_712("parsertracelevel", "Parser Trace Level", "number", 0, "Parser Trace Level")); -(function(c) { - (function(c) { - function a(a, c) { - for (var l = 0, q = [], n, k, f = 16;0 < f && !a[f - 1];) { +var Shumway$$inline_715 = Shumway || (Shumway = {}), SWF$$inline_716 = Shumway$$inline_715.SWF || (Shumway$$inline_715.SWF = {}), Option$$inline_717 = Shumway$$inline_715.Options.Option; +SWF$$inline_716.parserOptions = Shumway$$inline_715.Settings.shumwayOptions.register(new Shumway$$inline_715.Options.OptionSet("Parser Options")); +SWF$$inline_716.traceLevel = SWF$$inline_716.parserOptions.register(new Option$$inline_717("parsertracelevel", "Parser Trace Level", "number", 0, "Parser Trace Level")); +(function(d) { + (function(d) { + function a(a, h) { + for (var d = 0, l = [], m, g, f = 16;0 < f && !a[f - 1];) { f--; } - q.push({children:[], index:0}); - var d = q[0], b; - for (n = 0;n < f;n++) { - for (k = 0;k < a[n];k++) { - d = q.pop(); - for (d.children[d.index] = c[l];0 < d.index;) { - d = q.pop(); + l.push({children:[], index:0}); + var b = l[0], e; + for (m = 0;m < f;m++) { + for (g = 0;g < a[m];g++) { + b = l.pop(); + for (b.children[b.index] = h[d];0 < b.index;) { + b = l.pop(); } - d.index++; - for (q.push(d);q.length <= n;) { - q.push(b = {children:[], index:0}), d.children[d.index] = b.children, d = b; + b.index++; + for (l.push(b);l.length <= m;) { + l.push(e = {children:[], index:0}), b.children[b.index] = e.children, b = e; } - l++; + d++; } - n + 1 < f && (q.push(b = {children:[], index:0}), d.children[d.index] = b.children, d = b); + m + 1 < f && (l.push(e = {children:[], index:0}), b.children[b.index] = e.children, b = e); } - return q[0].children; + return l[0].children; } - function s(a, c, l, q, n, k, f, d, b) { - function g() { - if (0 < H) { - return H--, L >> H & 1; + function r(a, h, d, l, m, g, f, b, e) { + function q() { + if (0 < E) { + return E--, B >> E & 1; } - L = a[c++]; - if (255 == L) { - var b = a[c++]; + B = a[h++]; + if (255 == B) { + var b = a[h++]; if (b) { - throw "unexpected marker: " + (L << 8 | b).toString(16); + throw "unexpected marker: " + (B << 8 | b).toString(16); } } - H = 7; - return L >>> 7; + E = 7; + return B >>> 7; } - function r(b) { - for (var a;null !== (a = g());) { + function n(b) { + for (var a;null !== (a = q());) { b = b[a]; if ("number" === typeof b) { return b; @@ -24412,194 +24451,194 @@ SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$ } return null; } - function w(b) { + function k(b) { for (var a = 0;0 < b;) { - var d = g(); - if (null === d) { + var e = q(); + if (null === e) { return; } - a = a << 1 | d; + a = a << 1 | e; b--; } return a; } - function h(b) { + function r(b) { if (1 === b) { - return 1 === g() ? 1 : -1; + return 1 === q() ? 1 : -1; } - var a = w(b); + var a = k(b); return a >= 1 << b - 1 ? a : a + (-1 << b) + 1; } - function s(b, a) { - var d = r(b.huffmanTableDC), d = 0 === d ? 0 : h(d); - b.blockData[a] = b.pred += d; - for (d = 1;64 > d;) { - var g = r(b.huffmanTableAC), e = g & 15, g = g >> 4; - if (0 === e) { - if (15 > g) { + function u(b, a) { + var e = n(b.huffmanTableDC), e = 0 === e ? 0 : r(e); + b.blockData[a] = b.pred += e; + for (e = 1;64 > e;) { + var f = n(b.huffmanTableAC), c = f & 15, f = f >> 4; + if (0 === c) { + if (15 > f) { break; } - d += 16; + e += 16; } else { - d += g, b.blockData[a + u[d]] = h(e), d++; + e += f, b.blockData[a + t[e]] = r(c), e++; } } } - function p(a, d) { - var g = r(a.huffmanTableDC), g = 0 === g ? 0 : h(g) << b; - a.blockData[d] = a.pred += g; + function v(b, a) { + var f = n(b.huffmanTableDC), f = 0 === f ? 0 : r(f) << e; + b.blockData[a] = b.pred += f; } - function v(a, d) { - a.blockData[d] |= g() << b; + function K(b, a) { + b.blockData[a] |= q() << e; } - function N(a, d) { - if (0 < J) { - J--; + function F(b, a) { + if (0 < y) { + y--; } else { - for (var g = k;g <= f;) { - var e = r(a.huffmanTableAC), c = e & 15, e = e >> 4; - if (0 === c) { - if (15 > e) { - J = w(e) + (1 << e) - 1; + for (var c = g;c <= f;) { + var h = n(b.huffmanTableAC), d = h & 15, h = h >> 4; + if (0 === d) { + if (15 > h) { + y = k(h) + (1 << h) - 1; break; } - g += 16; + c += 16; } else { - g += e, a.blockData[d + u[g]] = h(c) * (1 << b), g++; + c += h, b.blockData[a + t[c]] = r(d) * (1 << e), c++; } } } } - function K(a, d) { - for (var e = k, c = 0, m;e <= f;) { - m = u[e]; - switch(C) { + function J(b, a) { + for (var c = g, h = 0, d;c <= f;) { + d = t[c]; + switch(z) { case 0: - c = r(a.huffmanTableAC); - m = c & 15; - c >>= 4; - if (0 === m) { - 15 > c ? (J = w(c) + (1 << c), C = 4) : (c = 16, C = 1); + h = n(b.huffmanTableAC); + d = h & 15; + h >>= 4; + if (0 === d) { + 15 > h ? (y = k(h) + (1 << h), z = 4) : (h = 16, z = 1); } else { - if (1 !== m) { + if (1 !== d) { throw "invalid ACn encoding"; } - E = h(m); - C = c ? 2 : 3; + G = r(d); + z = h ? 2 : 3; } continue; case 1: ; case 2: - a.blockData[d + m] ? a.blockData[d + m] += g() << b : (c--, 0 === c && (C = 2 == C ? 3 : 0)); + b.blockData[a + d] ? b.blockData[a + d] += q() << e : (h--, 0 === h && (z = 2 == z ? 3 : 0)); break; case 3: - a.blockData[d + m] ? a.blockData[d + m] += g() << b : (a.blockData[d + m] = E << b, C = 0); + b.blockData[a + d] ? b.blockData[a + d] += q() << e : (b.blockData[a + d] = G << e, z = 0); break; case 4: - a.blockData[d + m] && (a.blockData[d + m] += g() << b); + b.blockData[a + d] && (b.blockData[a + d] += q() << e); } - e++; + c++; } - 4 === C && (J--, 0 === J && (C = 0)); + 4 === z && (y--, 0 === y && (z = 0)); } - var y = l.mcusPerLine, D = c, L = 0, H = 0, J = 0, C = 0, E, F = q.length, I, G, Z, Q, S; - d = l.progressive ? 0 === k ? 0 === d ? p : v : 0 === d ? N : K : s; - var O = 0; - l = 1 == F ? q[0].blocksPerLine * q[0].blocksPerColumn : y * l.mcusPerColumn; - n || (n = l); - for (var P, V;O < l;) { - for (G = 0;G < F;G++) { - q[G].pred = 0; + var M = d.mcusPerLine, D = h, B = 0, E = 0, y = 0, z = 0, G, C = l.length, I, P, T, O, Q; + b = d.progressive ? 0 === g ? 0 === b ? v : K : 0 === b ? F : J : u; + var S = 0; + d = 1 == C ? l[0].blocksPerLine * l[0].blocksPerColumn : M * d.mcusPerColumn; + m || (m = d); + for (var V, aa;S < d;) { + for (P = 0;P < C;P++) { + l[P].pred = 0; } - J = 0; - if (1 == F) { - for (I = q[0], S = 0;S < n;S++) { - d(I, 64 * ((I.blocksPerLine + 1) * (O / I.blocksPerLine | 0) + O % I.blocksPerLine)), O++; + y = 0; + if (1 == C) { + for (I = l[0], Q = 0;Q < m;Q++) { + b(I, 64 * ((I.blocksPerLine + 1) * (S / I.blocksPerLine | 0) + S % I.blocksPerLine)), S++; } } else { - for (S = 0;S < n;S++) { - for (G = 0;G < F;G++) { - for (I = q[G], P = I.h, V = I.v, Z = 0;Z < V;Z++) { - for (Q = 0;Q < P;Q++) { - d(I, 64 * ((I.blocksPerLine + 1) * ((O / y | 0) * I.v + Z) + (O % y * I.h + Q))); + for (Q = 0;Q < m;Q++) { + for (P = 0;P < C;P++) { + for (I = l[P], V = I.h, aa = I.v, T = 0;T < aa;T++) { + for (O = 0;O < V;O++) { + b(I, 64 * ((I.blocksPerLine + 1) * ((S / M | 0) * I.v + T) + (S % M * I.h + O))); } } } - O++; + S++; } } - H = 0; - I = a[c] << 8 | a[c + 1]; + E = 0; + I = a[h] << 8 | a[h + 1]; if (65280 >= I) { throw "marker was not found"; } if (65488 <= I && 65495 >= I) { - c += 2; + h += 2; } else { break; } } - return c - D; + return h - D; } - function v(a, c) { - for (var l = c.blocksPerLine, q = c.blocksPerColumn, n = new Int32Array(64), k = 0;k < q;k++) { - for (var f = 0;f < l;f++) { - for (var d = c, b = 64 * ((c.blocksPerLine + 1) * k + f), g = n, r = d.quantizationTable, w = void 0, h = void 0, s = void 0, p = void 0, v = void 0, u = void 0, K = void 0, y = void 0, D = void 0, L = void 0, L = 0;64 > L;L++) { - g[L] = d.blockData[b + L] * r[L]; + function v(a, h) { + for (var d = h.blocksPerLine, l = h.blocksPerColumn, m = new Int32Array(64), g = 0;g < l;g++) { + for (var f = 0;f < d;f++) { + for (var b = h, e = 64 * ((h.blocksPerLine + 1) * g + f), q = m, n = b.quantizationTable, k = void 0, r = void 0, u = void 0, t = void 0, v = void 0, F = void 0, J = void 0, M = void 0, D = void 0, B = void 0, B = 0;64 > B;B++) { + q[B] = b.blockData[e + B] * n[B]; } - for (L = 0;8 > L;++L) { - r = 8 * L, 0 === g[1 + r] && 0 === g[2 + r] && 0 === g[3 + r] && 0 === g[4 + r] && 0 === g[5 + r] && 0 === g[6 + r] && 0 === g[7 + r] ? (D = 5793 * g[0 + r] + 512 >> 10, g[0 + r] = D, g[1 + r] = D, g[2 + r] = D, g[3 + r] = D, g[4 + r] = D, g[5 + r] = D, g[6 + r] = D, g[7 + r] = D) : (w = 5793 * g[0 + r] + 128 >> 8, h = 5793 * g[4 + r] + 128 >> 8, s = g[2 + r], p = g[6 + r], v = 2896 * (g[1 + r] - g[7 + r]) + 128 >> 8, y = 2896 * (g[1 + r] + g[7 + r]) + 128 >> 8, u = g[3 + r] << 4, K = - g[5 + r] << 4, D = w - h + 1 >> 1, w = w + h + 1 >> 1, h = D, D = 3784 * s + 1567 * p + 128 >> 8, s = 1567 * s - 3784 * p + 128 >> 8, p = D, D = v - K + 1 >> 1, v = v + K + 1 >> 1, K = D, D = y + u + 1 >> 1, u = y - u + 1 >> 1, y = D, D = w - p + 1 >> 1, w = w + p + 1 >> 1, p = D, D = h - s + 1 >> 1, h = h + s + 1 >> 1, s = D, D = 2276 * v + 3406 * y + 2048 >> 12, v = 3406 * v - 2276 * y + 2048 >> 12, y = D, D = 799 * u + 4017 * K + 2048 >> 12, u = 4017 * u - 799 * K + 2048 >> 12, K = - D, g[0 + r] = w + y, g[7 + r] = w - y, g[1 + r] = h + K, g[6 + r] = h - K, g[2 + r] = s + u, g[5 + r] = s - u, g[3 + r] = p + v, g[4 + r] = p - v); + for (B = 0;8 > B;++B) { + n = 8 * B, 0 === q[1 + n] && 0 === q[2 + n] && 0 === q[3 + n] && 0 === q[4 + n] && 0 === q[5 + n] && 0 === q[6 + n] && 0 === q[7 + n] ? (D = 5793 * q[0 + n] + 512 >> 10, q[0 + n] = D, q[1 + n] = D, q[2 + n] = D, q[3 + n] = D, q[4 + n] = D, q[5 + n] = D, q[6 + n] = D, q[7 + n] = D) : (k = 5793 * q[0 + n] + 128 >> 8, r = 5793 * q[4 + n] + 128 >> 8, u = q[2 + n], t = q[6 + n], v = 2896 * (q[1 + n] - q[7 + n]) + 128 >> 8, M = 2896 * (q[1 + n] + q[7 + n]) + 128 >> 8, F = q[3 + n] << 4, J = + q[5 + n] << 4, D = k - r + 1 >> 1, k = k + r + 1 >> 1, r = D, D = 3784 * u + 1567 * t + 128 >> 8, u = 1567 * u - 3784 * t + 128 >> 8, t = D, D = v - J + 1 >> 1, v = v + J + 1 >> 1, J = D, D = M + F + 1 >> 1, F = M - F + 1 >> 1, M = D, D = k - t + 1 >> 1, k = k + t + 1 >> 1, t = D, D = r - u + 1 >> 1, r = r + u + 1 >> 1, u = D, D = 2276 * v + 3406 * M + 2048 >> 12, v = 3406 * v - 2276 * M + 2048 >> 12, M = D, D = 799 * F + 4017 * J + 2048 >> 12, F = 4017 * F - 799 * J + 2048 >> 12, J = + D, q[0 + n] = k + M, q[7 + n] = k - M, q[1 + n] = r + J, q[6 + n] = r - J, q[2 + n] = u + F, q[5 + n] = u - F, q[3 + n] = t + v, q[4 + n] = t - v); } - for (L = 0;8 > L;++L) { - r = L, 0 === g[8 + r] && 0 === g[16 + r] && 0 === g[24 + r] && 0 === g[32 + r] && 0 === g[40 + r] && 0 === g[48 + r] && 0 === g[56 + r] ? (D = 5793 * g[L + 0] + 8192 >> 14, g[0 + r] = D, g[8 + r] = D, g[16 + r] = D, g[24 + r] = D, g[32 + r] = D, g[40 + r] = D, g[48 + r] = D, g[56 + r] = D) : (w = 5793 * g[0 + r] + 2048 >> 12, h = 5793 * g[32 + r] + 2048 >> 12, s = g[16 + r], p = g[48 + r], v = 2896 * (g[8 + r] - g[56 + r]) + 2048 >> 12, y = 2896 * (g[8 + r] + g[56 + r]) + 2048 >> 12, - u = g[24 + r], K = g[40 + r], D = w - h + 1 >> 1, w = w + h + 1 >> 1, h = D, D = 3784 * s + 1567 * p + 2048 >> 12, s = 1567 * s - 3784 * p + 2048 >> 12, p = D, D = v - K + 1 >> 1, v = v + K + 1 >> 1, K = D, D = y + u + 1 >> 1, u = y - u + 1 >> 1, y = D, D = w - p + 1 >> 1, w = w + p + 1 >> 1, p = D, D = h - s + 1 >> 1, h = h + s + 1 >> 1, s = D, D = 2276 * v + 3406 * y + 2048 >> 12, v = 3406 * v - 2276 * y + 2048 >> 12, y = D, D = 799 * u + 4017 * K + 2048 >> 12, u = 4017 * u - 799 * - K + 2048 >> 12, K = D, g[0 + r] = w + y, g[56 + r] = w - y, g[8 + r] = h + K, g[48 + r] = h - K, g[16 + r] = s + u, g[40 + r] = s - u, g[24 + r] = p + v, g[32 + r] = p - v); + for (B = 0;8 > B;++B) { + n = B, 0 === q[8 + n] && 0 === q[16 + n] && 0 === q[24 + n] && 0 === q[32 + n] && 0 === q[40 + n] && 0 === q[48 + n] && 0 === q[56 + n] ? (D = 5793 * q[B + 0] + 8192 >> 14, q[0 + n] = D, q[8 + n] = D, q[16 + n] = D, q[24 + n] = D, q[32 + n] = D, q[40 + n] = D, q[48 + n] = D, q[56 + n] = D) : (k = 5793 * q[0 + n] + 2048 >> 12, r = 5793 * q[32 + n] + 2048 >> 12, u = q[16 + n], t = q[48 + n], v = 2896 * (q[8 + n] - q[56 + n]) + 2048 >> 12, M = 2896 * (q[8 + n] + q[56 + n]) + 2048 >> 12, + F = q[24 + n], J = q[40 + n], D = k - r + 1 >> 1, k = k + r + 1 >> 1, r = D, D = 3784 * u + 1567 * t + 2048 >> 12, u = 1567 * u - 3784 * t + 2048 >> 12, t = D, D = v - J + 1 >> 1, v = v + J + 1 >> 1, J = D, D = M + F + 1 >> 1, F = M - F + 1 >> 1, M = D, D = k - t + 1 >> 1, k = k + t + 1 >> 1, t = D, D = r - u + 1 >> 1, r = r + u + 1 >> 1, u = D, D = 2276 * v + 3406 * M + 2048 >> 12, v = 3406 * v - 2276 * M + 2048 >> 12, M = D, D = 799 * F + 4017 * J + 2048 >> 12, F = 4017 * F - 799 * + J + 2048 >> 12, J = D, q[0 + n] = k + M, q[56 + n] = k - M, q[8 + n] = r + J, q[48 + n] = r - J, q[16 + n] = u + F, q[40 + n] = u - F, q[24 + n] = t + v, q[32 + n] = t - v); } - for (L = 0;64 > L;++L) { - w = b + L, h = g[L], h = -2056 >= h ? 0 : 2024 <= h ? 255 : h + 2056 >> 4, d.blockData[w] = h; + for (B = 0;64 > B;++B) { + k = e + B, r = q[B], r = -2056 >= r ? 0 : 2024 <= r ? 255 : r + 2056 >> 4, b.blockData[k] = r; } } } - return c.blockData; + return h.blockData; } - function p(a) { + function u(a) { return 0 >= a ? 0 : 255 <= a ? 255 : a; } - var u = new Int32Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]), l = function() { - function e() { + var t = new Int32Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]), l = function() { + function c() { } - e.prototype.parse = function(e) { - function c() { - var b = e[k] << 8 | e[k + 1]; - k += 2; + c.prototype.parse = function(c) { + function d() { + var b = c[g] << 8 | c[g + 1]; + g += 2; return b; } function l() { - var b = c(), b = e.subarray(k, k + b - 2); - k += b.length; + var b = d(), b = c.subarray(g, g + b - 2); + g += b.length; return b; } - function n(b) { - for (var a = Math.ceil(b.samplesPerLine / 8 / b.maxH), d = Math.ceil(b.scanLines / 8 / b.maxV), g = 0;g < b.components.length;g++) { - L = b.components[g]; - var e = Math.ceil(Math.ceil(b.samplesPerLine / 8) * L.h / b.maxH), f = Math.ceil(Math.ceil(b.scanLines / 8) * L.v / b.maxV); - L.blockData = new Int16Array(64 * d * L.v * (a * L.h + 1)); - L.blocksPerLine = e; - L.blocksPerColumn = f; + function m(b) { + for (var a = Math.ceil(b.samplesPerLine / 8 / b.maxH), e = Math.ceil(b.scanLines / 8 / b.maxV), f = 0;f < b.components.length;f++) { + B = b.components[f]; + var c = Math.ceil(Math.ceil(b.samplesPerLine / 8) * B.h / b.maxH), g = Math.ceil(Math.ceil(b.scanLines / 8) * B.v / b.maxV); + B.blockData = new Int16Array(64 * e * B.v * (a * B.h + 1)); + B.blocksPerLine = c; + B.blocksPerColumn = g; } b.mcusPerLine = a; - b.mcusPerColumn = d; + b.mcusPerColumn = e; } - var k = 0, f = null, d = null, b, g, r = [], w = [], h = [], p = c(); - if (65496 != p) { + var g = 0, f = null, b = null, e, q, n = [], k = [], u = [], A = d(); + if (65496 != A) { throw "SOI not found"; } - for (p = c();65497 != p;) { - var B, M; - switch(p) { + for (A = d();65497 != A;) { + var H, K; + switch(A) { case 65504: ; case 65505: @@ -24633,27 +24672,27 @@ SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$ case 65519: ; case 65534: - B = l(); - 65504 === p && 74 === B[0] && 70 === B[1] && 73 === B[2] && 70 === B[3] && 0 === B[4] && (f = {version:{major:B[5], minor:B[6]}, densityUnits:B[7], xDensity:B[8] << 8 | B[9], yDensity:B[10] << 8 | B[11], thumbWidth:B[12], thumbHeight:B[13], thumbData:B.subarray(14, 14 + 3 * B[12] * B[13])}); - 65518 === p && 65 === B[0] && 100 === B[1] && 111 === B[2] && 98 === B[3] && 101 === B[4] && 0 === B[5] && (d = {version:B[6], flags0:B[7] << 8 | B[8], flags1:B[9] << 8 | B[10], transformCode:B[11]}); + H = l(); + 65504 === A && 74 === H[0] && 70 === H[1] && 73 === H[2] && 70 === H[3] && 0 === H[4] && (f = {version:{major:H[5], minor:H[6]}, densityUnits:H[7], xDensity:H[8] << 8 | H[9], yDensity:H[10] << 8 | H[11], thumbWidth:H[12], thumbHeight:H[13], thumbData:H.subarray(14, 14 + 3 * H[12] * H[13])}); + 65518 === A && 65 === H[0] && 100 === H[1] && 111 === H[2] && 98 === H[3] && 101 === H[4] && 0 === H[5] && (b = {version:H[6], flags0:H[7] << 8 | H[8], flags1:H[9] << 8 | H[10], transformCode:H[11]}); break; case 65499: - for (var p = c() + k - 2, N;k < p;) { - var K = e[k++], y = new Int32Array(64); - if (0 === K >> 4) { - for (B = 0;64 > B;B++) { - N = u[B], y[N] = e[k++]; + for (var A = d() + g - 2, F;g < A;) { + var J = c[g++], M = new Int32Array(64); + if (0 === J >> 4) { + for (H = 0;64 > H;H++) { + F = t[H], M[F] = c[g++]; } } else { - if (1 === K >> 4) { - for (B = 0;64 > B;B++) { - N = u[B], y[N] = c(); + if (1 === J >> 4) { + for (H = 0;64 > H;H++) { + F = t[H], M[F] = d(); } } else { throw "DQT: invalid table spec"; } } - r[K & 15] = y; + n[J & 15] = M; } break; case 65472: @@ -24661,273 +24700,273 @@ SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$ case 65473: ; case 65474: - if (b) { + if (e) { throw "Only single frame JPEGs supported"; } - c(); - b = {}; - b.extended = 65473 === p; - b.progressive = 65474 === p; - b.precision = e[k++]; - b.scanLines = c(); - b.samplesPerLine = c(); - b.components = []; - b.componentIds = {}; - B = e[k++]; - for (p = y = K = 0;p < B;p++) { - N = e[k]; - M = e[k + 1] >> 4; - var D = e[k + 1] & 15; - K < M && (K = M); - y < D && (y = D); - M = b.components.push({h:M, v:D, quantizationTable:r[e[k + 2]]}); - b.componentIds[N] = M - 1; - k += 3; + d(); + e = {}; + e.extended = 65473 === A; + e.progressive = 65474 === A; + e.precision = c[g++]; + e.scanLines = d(); + e.samplesPerLine = d(); + e.components = []; + e.componentIds = {}; + H = c[g++]; + for (A = M = J = 0;A < H;A++) { + F = c[g]; + K = c[g + 1] >> 4; + var D = c[g + 1] & 15; + J < K && (J = K); + M < D && (M = D); + K = e.components.push({h:K, v:D, quantizationTable:n[c[g + 2]]}); + e.componentIds[F] = K - 1; + g += 3; } - b.maxH = K; - b.maxV = y; - n(b); + e.maxH = J; + e.maxV = M; + m(e); break; case 65476: - N = c(); - for (p = 2;p < N;) { - K = e[k++]; - y = new Uint8Array(16); - for (B = M = 0;16 > B;B++, k++) { - M += y[B] = e[k]; + F = d(); + for (A = 2;A < F;) { + J = c[g++]; + M = new Uint8Array(16); + for (H = K = 0;16 > H;H++, g++) { + K += M[H] = c[g]; } - D = new Uint8Array(M); - for (B = 0;B < M;B++, k++) { - D[B] = e[k]; + D = new Uint8Array(K); + for (H = 0;H < K;H++, g++) { + D[H] = c[g]; } - p += 17 + M; - (0 === K >> 4 ? h : w)[K & 15] = a(y, D); + A += 17 + K; + (0 === J >> 4 ? u : k)[J & 15] = a(M, D); } break; case 65501: - c(); - g = c(); + d(); + q = d(); break; case 65498: - c(); - N = e[k++]; - B = []; - for (var L, p = 0;p < N;p++) { - K = b.componentIds[e[k++]], L = b.components[K], K = e[k++], L.huffmanTableDC = h[K >> 4], L.huffmanTableAC = w[K & 15], B.push(L); + d(); + F = c[g++]; + H = []; + for (var B, A = 0;A < F;A++) { + J = e.componentIds[c[g++]], B = e.components[J], J = c[g++], B.huffmanTableDC = u[J >> 4], B.huffmanTableAC = k[J & 15], H.push(B); } - p = e[k++]; - N = e[k++]; - K = e[k++]; - p = s(e, k, b, B, g, p, N, K >> 4, K & 15); - k += p; + A = c[g++]; + F = c[g++]; + J = c[g++]; + A = r(c, g, e, H, q, A, F, J >> 4, J & 15); + g += A; break; default: - if (255 == e[k - 3] && 192 <= e[k - 2] && 254 >= e[k - 2]) { - k -= 3; + if (255 == c[g - 3] && 192 <= c[g - 2] && 254 >= c[g - 2]) { + g -= 3; break; } - throw "unknown JPEG marker " + p.toString(16);; + throw "unknown JPEG marker " + A.toString(16);; } - p = c(); + A = d(); } - this.width = b.samplesPerLine; - this.height = b.scanLines; + this.width = e.samplesPerLine; + this.height = e.scanLines; this.jfif = f; - this.adobe = d; + this.adobe = b; this.components = []; - for (p = 0;p < b.components.length;p++) { - L = b.components[p], this.components.push({output:v(b, L), scaleX:L.h / b.maxH, scaleY:L.v / b.maxV, blocksPerLine:L.blocksPerLine, blocksPerColumn:L.blocksPerColumn}); + for (A = 0;A < e.components.length;A++) { + B = e.components[A], this.components.push({output:v(e, B), scaleX:B.h / e.maxH, scaleY:B.v / e.maxV, blocksPerLine:B.blocksPerLine, blocksPerColumn:B.blocksPerColumn}); } this.numComponents = this.components.length; }; - e.prototype._getLinearizedBlockData = function(a, e) { - var c = this.width / a, l = this.height / e, k, f, d, b, g, r, w = 0, h, s = this.components.length, p = a * e * s, v = new Uint8Array(p), u = new Uint32Array(a); - for (r = 0;r < s;r++) { - k = this.components[r]; - f = k.scaleX * c; - d = k.scaleY * l; - w = r; - h = k.output; - b = k.blocksPerLine + 1 << 3; - for (g = 0;g < a;g++) { - k = 0 | g * f, u[g] = (k & 4294967288) << 3 | k & 7; + c.prototype._getLinearizedBlockData = function(a, c) { + var d = this.width / a, l = this.height / c, g, f, b, e, q, n, k = 0, r, u = this.components.length, t = a * c * u, v = new Uint8Array(t), F = new Uint32Array(a); + for (n = 0;n < u;n++) { + g = this.components[n]; + f = g.scaleX * d; + b = g.scaleY * l; + k = n; + r = g.output; + e = g.blocksPerLine + 1 << 3; + for (q = 0;q < a;q++) { + g = 0 | q * f, F[q] = (g & 4294967288) << 3 | g & 7; } - for (f = 0;f < e;f++) { - for (k = 0 | f * d, k = b * (k & 4294967288) | (k & 7) << 3, g = 0;g < a;g++) { - v[w] = h[k + u[g]], w += s; + for (f = 0;f < c;f++) { + for (g = 0 | f * b, g = e * (g & 4294967288) | (g & 7) << 3, q = 0;q < a;q++) { + v[k] = r[g + F[q]], k += u; } } } if (l = this.decodeTransform) { - for (r = 0;r < p;) { - for (c = k = 0;k < s;k++, r++, c += 2) { - v[r] = (v[r] * l[c] >> 8) + l[c + 1]; + for (n = 0;n < t;) { + for (d = g = 0;g < u;g++, n++, d += 2) { + v[n] = (v[n] * l[d] >> 8) + l[d + 1]; } } } return v; }; - e.prototype._isColorConversionNeeded = function() { + c.prototype._isColorConversionNeeded = function() { return this.adobe && this.adobe.transformCode ? !0 : 3 == this.numComponents ? !0 : !1; }; - e.prototype._convertYccToRgb = function(a) { - for (var e, c, l, k = 0, f = a.length;k < f;k += 3) { - e = a[k], c = a[k + 1], l = a[k + 2], a[k] = p(e - 179.456 + 1.402 * l), a[k + 1] = p(e + 135.459 - .344 * c - .714 * l), a[k + 2] = p(e - 226.816 + 1.772 * c); + c.prototype._convertYccToRgb = function(a) { + for (var c, d, l, g = 0, f = a.length;g < f;g += 3) { + c = a[g], d = a[g + 1], l = a[g + 2], a[g] = u(c - 179.456 + 1.402 * l), a[g + 1] = u(c + 135.459 - .344 * d - .714 * l), a[g + 2] = u(c - 226.816 + 1.772 * d); } return a; }; - e.prototype._convertYcckToRgb = function(a) { - for (var e, c, l, k, f, d, b, g, r, w, h, s, v, u, N = 0, K = 0, y = a.length;K < y;K += 4) { - e = a[K]; - c = a[K + 1]; - l = a[K + 2]; - k = a[K + 3]; - f = c * c; - d = c * l; - b = c * e; - g = c * k; - r = l * l; - w = l * k; - h = l * e; - s = e * e; - v = e * k; - u = k * k; - var D = -122.67195406894 - 6.60635669420364E-5 * f + 4.37130475926232E-4 * d - 5.4080610064599E-5 * b + 4.8449797120281E-4 * g - .154362151871126 * c - 9.57964378445773E-4 * r + 8.17076911346625E-4 * h - .00477271405408747 * w + 1.53380253221734 * l + 9.61250184130688E-4 * s - .00266257332283933 * v + .48357088451265 * e - 3.36197177618394E-4 * u + .484791561490776 * k, L = 107.268039397724 + 2.19927104525741E-5 * f - 6.40992018297945E-4 * d + 6.59397001245577E-4 * b + 4.26105652938837E-4 * - g - .176491792462875 * c - 7.78269941513683E-4 * r + .00130872261408275 * h + 7.70482631801132E-4 * w - .151051492775562 * l + .00126935368114843 * s - .00265090189010898 * v + .25802910206845 * e - 3.18913117588328E-4 * u - .213742400323665 * k; - e = -20.810012546947 - 5.70115196973677E-4 * f - 2.63409051004589E-5 * d + .0020741088115012 * b - .00288260236853442 * g + .814272968359295 * c - 1.53496057440975E-5 * r - 1.32689043961446E-4 * h + 5.60833691242812E-4 * w - .195152027534049 * l + .00174418132927582 * s - .00255243321439347 * v + .116935020465145 * e - 3.43531996510555E-4 * u + .24165260232407 * k; - a[N++] = p(D); - a[N++] = p(L); - a[N++] = p(e); + c.prototype._convertYcckToRgb = function(a) { + for (var c, d, l, g, f, b, e, q, n, k, r, t, v, K, F = 0, J = 0, M = a.length;J < M;J += 4) { + c = a[J]; + d = a[J + 1]; + l = a[J + 2]; + g = a[J + 3]; + f = d * d; + b = d * l; + e = d * c; + q = d * g; + n = l * l; + k = l * g; + r = l * c; + t = c * c; + v = c * g; + K = g * g; + var D = -122.67195406894 - 6.60635669420364E-5 * f + 4.37130475926232E-4 * b - 5.4080610064599E-5 * e + 4.8449797120281E-4 * q - .154362151871126 * d - 9.57964378445773E-4 * n + 8.17076911346625E-4 * r - .00477271405408747 * k + 1.53380253221734 * l + 9.61250184130688E-4 * t - .00266257332283933 * v + .48357088451265 * c - 3.36197177618394E-4 * K + .484791561490776 * g, B = 107.268039397724 + 2.19927104525741E-5 * f - 6.40992018297945E-4 * b + 6.59397001245577E-4 * e + 4.26105652938837E-4 * + q - .176491792462875 * d - 7.78269941513683E-4 * n + .00130872261408275 * r + 7.70482631801132E-4 * k - .151051492775562 * l + .00126935368114843 * t - .00265090189010898 * v + .25802910206845 * c - 3.18913117588328E-4 * K - .213742400323665 * g; + c = -20.810012546947 - 5.70115196973677E-4 * f - 2.63409051004589E-5 * b + .0020741088115012 * e - .00288260236853442 * q + .814272968359295 * d - 1.53496057440975E-5 * n - 1.32689043961446E-4 * r + 5.60833691242812E-4 * k - .195152027534049 * l + .00174418132927582 * t - .00255243321439347 * v + .116935020465145 * c - 3.43531996510555E-4 * K + .24165260232407 * g; + a[F++] = u(D); + a[F++] = u(B); + a[F++] = u(c); } return a; }; - e.prototype._convertYcckToCmyk = function(a) { - for (var e, c, l, k = 0, f = a.length;k < f;k += 4) { - e = a[k], c = a[k + 1], l = a[k + 2], a[k] = p(434.456 - e - 1.402 * l), a[k + 1] = p(119.541 - e + .344 * c + .714 * l), a[k + 2] = p(481.816 - e - 1.772 * c); + c.prototype._convertYcckToCmyk = function(a) { + for (var c, d, l, g = 0, f = a.length;g < f;g += 4) { + c = a[g], d = a[g + 1], l = a[g + 2], a[g] = u(434.456 - c - 1.402 * l), a[g + 1] = u(119.541 - c + .344 * d + .714 * l), a[g + 2] = u(481.816 - c - 1.772 * d); } return a; }; - e.prototype._convertCmykToRgb = function(a) { - for (var e, c, l, k, f = 0, d = 1 / 255 / 255, b = 0, g = a.length;b < g;b += 4) { - e = a[b]; - c = a[b + 1]; - l = a[b + 2]; - k = a[b + 3]; - var r = e * (-4.387332384609988 * e + 54.48615194189176 * c + 18.82290502165302 * l + 212.25662451639585 * k - 72734.4411664936) + c * (1.7149763477362134 * c - 5.6096736904047315 * l - 17.873870861415444 * k - 1401.7366389350734) + l * (-2.5217340131683033 * l - 21.248923337353073 * k + 4465.541406466231) - k * (21.86122147463605 * k + 48317.86113160301), w = e * (8.841041422036149 * e + 60.118027045597366 * c + 6.871425592049007 * l + 31.159100130055922 * k - 20220.756542821975) + c * - (-15.310361306967817 * c + 17.575251261109482 * l + 131.35250912493976 * k - 48691.05921601825) + l * (4.444339102852739 * l + 9.8632861493405 * k - 6341.191035517494) - k * (20.737325471181034 * k + 47890.15695978492); - e = e * (.8842522430003296 * e + 8.078677503112928 * c + 30.89978309703729 * l - .23883238689178934 * k - 3616.812083916688) + c * (10.49593273432072 * c + 63.02378494754052 * l + 50.606957656360734 * k - 28620.90484698408) + l * (.03296041114873217 * l + 115.60384449646641 * k - 49363.43385999684) - k * (22.33816807309886 * k + 45932.16563550634); - a[f++] = 0 <= r ? 255 : -16581375 >= r ? 0 : 255 + r * d | 0; - a[f++] = 0 <= w ? 255 : -16581375 >= w ? 0 : 255 + w * d | 0; - a[f++] = 0 <= e ? 255 : -16581375 >= e ? 0 : 255 + e * d | 0; + c.prototype._convertCmykToRgb = function(a) { + for (var c, d, l, g, f = 0, b = 1 / 255 / 255, e = 0, q = a.length;e < q;e += 4) { + c = a[e]; + d = a[e + 1]; + l = a[e + 2]; + g = a[e + 3]; + var n = c * (-4.387332384609988 * c + 54.48615194189176 * d + 18.82290502165302 * l + 212.25662451639585 * g - 72734.4411664936) + d * (1.7149763477362134 * d - 5.6096736904047315 * l - 17.873870861415444 * g - 1401.7366389350734) + l * (-2.5217340131683033 * l - 21.248923337353073 * g + 4465.541406466231) - g * (21.86122147463605 * g + 48317.86113160301), k = c * (8.841041422036149 * c + 60.118027045597366 * d + 6.871425592049007 * l + 31.159100130055922 * g - 20220.756542821975) + d * + (-15.310361306967817 * d + 17.575251261109482 * l + 131.35250912493976 * g - 48691.05921601825) + l * (4.444339102852739 * l + 9.8632861493405 * g - 6341.191035517494) - g * (20.737325471181034 * g + 47890.15695978492); + c = c * (.8842522430003296 * c + 8.078677503112928 * d + 30.89978309703729 * l - .23883238689178934 * g - 3616.812083916688) + d * (10.49593273432072 * d + 63.02378494754052 * l + 50.606957656360734 * g - 28620.90484698408) + l * (.03296041114873217 * l + 115.60384449646641 * g - 49363.43385999684) - g * (22.33816807309886 * g + 45932.16563550634); + a[f++] = 0 <= n ? 255 : -16581375 >= n ? 0 : 255 + n * b | 0; + a[f++] = 0 <= k ? 255 : -16581375 >= k ? 0 : 255 + k * b | 0; + a[f++] = 0 <= c ? 255 : -16581375 >= c ? 0 : 255 + c * b | 0; } return a; }; - e.prototype.getData = function(a, e, c) { + c.prototype.getData = function(a, c, d) { if (4 < this.numComponents) { throw "Unsupported color mode"; } - a = this._getLinearizedBlockData(a, e); - return 3 === this.numComponents ? this._convertYccToRgb(a) : 4 === this.numComponents ? this._isColorConversionNeeded() ? c ? this._convertYcckToRgb(a) : this._convertYcckToCmyk(a) : this._convertCmykToRgb(a) : a; + a = this._getLinearizedBlockData(a, c); + return 3 === this.numComponents ? this._convertYccToRgb(a) : 4 === this.numComponents ? this._isColorConversionNeeded() ? d ? this._convertYcckToRgb(a) : this._convertYcckToCmyk(a) : this._convertCmykToRgb(a) : a; }; - e.prototype.copyToImageData = function(a) { - var e = a.width, c = a.height, l = e * c * 4; + c.prototype.copyToImageData = function(a) { + var c = a.width, d = a.height, l = c * d * 4; a = a.data; - var e = this.getData(e, c, !0), k = c = 0, f, d, b, g; + var c = this.getData(c, d, !0), g = d = 0, f, b, e, q; switch(this.components.length) { case 1: - for (;k < l;) { - f = e[c++], a[k++] = f, a[k++] = f, a[k++] = f, a[k++] = 255; + for (;g < l;) { + f = c[d++], a[g++] = f, a[g++] = f, a[g++] = f, a[g++] = 255; } break; case 3: - for (;k < l;) { - b = e[c++], g = e[c++], f = e[c++], a[k++] = b, a[k++] = g, a[k++] = f, a[k++] = 255; + for (;g < l;) { + e = c[d++], q = c[d++], f = c[d++], a[g++] = e, a[g++] = q, a[g++] = f, a[g++] = 255; } break; case 4: - for (;k < l;) { - b = e[c++], g = e[c++], f = e[c++], d = e[c++], b = 255 - p(b * (1 - d / 255) + d), g = 255 - p(g * (1 - d / 255) + d), f = 255 - p(f * (1 - d / 255) + d), a[k++] = b, a[k++] = g, a[k++] = f, a[k++] = 255; + for (;g < l;) { + e = c[d++], q = c[d++], f = c[d++], b = c[d++], e = 255 - u(e * (1 - b / 255) + b), q = 255 - u(q * (1 - b / 255) + b), f = 255 - u(f * (1 - b / 255) + b), a[g++] = e, a[g++] = q, a[g++] = f, a[g++] = 255; } break; default: throw "Unsupported color mode";; } }; - return e; + return c; }(); - c.JpegImage = l; - })(c.JPEG || (c.JPEG = {})); + d.JpegImage = l; + })(d.JPEG || (d.JPEG = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { function a() { this.bitBuffer = this.bitLength = 0; } - function s(a) { + function r(a) { if (this.pos + a > this.end) { - throw c.StreamNoDataError; + throw d.StreamNoDataError; } } function v() { return this.end - this.pos; } - function p(a, c) { - var h = new l(this.bytes); - h.pos = a; - h.end = c; - return h; + function u(a, h) { + var d = new l(this.bytes); + d.pos = a; + d.end = h; + return d; } - function u(a) { - var c = this.bytes, l = this.end + a.length; - if (l > c.length) { + function t(a) { + var h = this.bytes, d = this.end + a.length; + if (d > h.length) { throw "stream buffer overfow"; } - c.set(a, this.end); - this.end = l; + h.set(a, this.end); + this.end = d; } - c.StreamNoDataError = {}; + d.StreamNoDataError = {}; var l = function() { - return function(e, c, l, q) { - void 0 === c && (c = 0); - e.buffer instanceof ArrayBuffer && (c += e.byteOffset, e = e.buffer); - void 0 === l && (l = e.byteLength - c); - void 0 === q && (q = l); - var n = new Uint8Array(e, c, q); - e = new DataView(e, c, q); - e.bytes = n; - e.pos = 0; - e.end = l; - e.bitBuffer = 0; - e.bitLength = 0; - e.align = a; - e.ensure = s; - e.remaining = v; - e.substream = p; - e.push = u; - return e; + return function(c, h, d, l) { + void 0 === h && (h = 0); + c.buffer instanceof ArrayBuffer && (h += c.byteOffset, c = c.buffer); + void 0 === d && (d = c.byteLength - h); + void 0 === l && (l = d); + var m = new Uint8Array(c, h, l); + c = new DataView(c, h, l); + c.bytes = m; + c.pos = 0; + c.end = d; + c.bitBuffer = 0; + c.bitLength = 0; + c.align = a; + c.ensure = r; + c.remaining = v; + c.substream = u; + c.push = t; + return c; }; }(); - c.Stream = l; - })(c.SWF || (c.SWF = {})); + d.Stream = l; + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { function a() { - s || (s = new Worker(h.MP3WORKER_PATH), s.addEventListener("message", function(a) { + r || (r = new Worker(k.MP3WORKER_PATH), r.addEventListener("message", function(a) { "console" === a.data.action && console[a.data.method].call(console, a.data.message); })); - return s; + return r; } - h.MP3WORKER_PATH = "../../lib/mp3/mp3worker.js"; - var s = null, v = 0, p = function() { - function h() { + k.MP3WORKER_PATH = "../../lib/mp3/mp3worker.js"; + var r = null, v = 0, u = function() { + function k() { this._sessionId = v++; this._onworkermessageBound = this.onworkermessage.bind(this); this._worker = a(); this._worker.addEventListener("message", this._onworkermessageBound, !1); this._worker.postMessage({sessionId:this._sessionId, action:"create"}); } - h.prototype.onworkermessage = function(a) { + k.prototype.onworkermessage = function(a) { if (a.data.sessionId === this._sessionId) { switch(a.data.action) { case "closed": @@ -24953,61 +24992,61 @@ SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$ } } }; - h.prototype.pushAsync = function(a) { + k.prototype.pushAsync = function(a) { this._worker.postMessage({sessionId:this._sessionId, action:"decode", data:a}); }; - h.prototype.close = function() { + k.prototype.close = function() { this._worker.postMessage({sessionId:this._sessionId, action:"close"}); }; - h.processAll = function(a) { - var e = 8E3, m = new Float32Array(e), t = 0, q = [], n = !1, k = new c.PromiseWrapper, f = new h; - f.onframedata = function(a, b, g, f) { - b = a.length + t; - if (b > e) { + k.processAll = function(a) { + var c = 8E3, h = new Float32Array(c), p = 0, s = [], m = !1, g = new d.PromiseWrapper, f = new k; + f.onframedata = function(b, a, f, g) { + a = b.length + p; + if (a > c) { do { - e *= 2; - } while (b > e); - b = new Float32Array(e); - b.set(m); - m = b; + c *= 2; + } while (a > c); + a = new Float32Array(c); + a.set(h); + h = a; } - m.set(a, t); - t += a.length; + h.set(b, p); + p += b.length; }; - f.onid3tag = function(a) { - q.push(a); + f.onid3tag = function(b) { + s.push(b); }; f.onclosed = function() { - n || k.resolve({data:m.subarray(0, t), id3Tags:q}); + m || g.resolve({data:h.subarray(0, p), id3Tags:s}); }; - f.onerror = function(a) { - n || (n = !0, k.reject(a)); + f.onerror = function(b) { + m || (m = !0, g.reject(b)); }; f.pushAsync(a); f.close(); - return k.promise; + return g.promise; }; - return h; + return k; }(); - h.MP3DecoderSession = p; - })(c.SWF || (c.SWF = {})); + k.MP3DecoderSession = u; + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { +(function(d) { + (function(k) { function a(b, a) { return b && a ? "boldItalic" : b ? "bold" : a ? "italic" : "regular"; } - function s(b, a) { + function r(b, a) { switch(b.code) { case 6: ; @@ -25016,17 +25055,17 @@ __extends = this.__extends || function(c, h) { case 35: ; case 90: - return c.SWF.Parser.defineImage(b); + return d.SWF.Parser.defineImage(b); case 20: ; case 36: - return c.SWF.Parser.defineBitmap(b); + return d.SWF.Parser.defineBitmap(b); case 7: ; case 34: - return c.SWF.Parser.defineButton(b, a); + return d.SWF.Parser.defineButton(b, a); case 37: - return c.SWF.Parser.defineText(b); + return d.SWF.Parser.defineText(b); case 10: ; case 48: @@ -25034,7 +25073,7 @@ __extends = this.__extends || function(c, h) { case 75: ; case 91: - return c.SWF.Parser.defineFont(b); + return d.SWF.Parser.defineFont(b); case 46: ; case 84: @@ -25046,9 +25085,9 @@ __extends = this.__extends || function(c, h) { case 32: ; case 83: - return c.SWF.Parser.defineShape(b); + return d.SWF.Parser.defineShape(b); case 14: - return c.SWF.Parser.defineSound(b); + return d.SWF.Parser.defineSound(b); case 39: return b; case 87: @@ -25056,18 +25095,13 @@ __extends = this.__extends || function(c, h) { case 11: ; case 33: - return c.SWF.Parser.defineLabel(b); + return d.SWF.Parser.defineLabel(b); default: return b; } } - var v = c.Debug.assert, p = c.SWF.Parser, u = h.Stream, l = c.ArrayUtilities.Inflate, e = p.SwfTag, m = p.DefinitionTags, t = p.ImageDefinitionTags, q = p.FontDefinitionTags, n = p.ControlTags, k = function() { - function k(b, a) { - v(67 === b[0] || 70 === b[0], "Unsupported compression format: " + (90 === b[0] ? "LZMA" : b[0] + "")); - v(87 === b[1]); - v(83 === b[2]); - v(30 <= b.length, "At least the header must be complete here."); - 0 < h.traceLevel.value && console.log("Create SWFFile"); + var v = d.SWF.Parser, u = k.Stream, t = d.ArrayUtilities.Inflate, l = d.ArrayUtilities.LzmaDecoder, c = v.SwfTag, h = v.DefinitionTags, p = v.ImageDefinitionTags, s = v.FontDefinitionTags, m = v.ControlTags, g = function() { + function g(b, a) { this.isCompressed = !1; this.swfVersion = 0; this.useAVM1 = !0; @@ -25090,12 +25124,14 @@ __extends = this.__extends || function(c, h) { this._endTagEncountered = !1; this.readHeaderAndInitialize(b); } - k.prototype.appendLoadedData = function(b) { + g.prototype.appendLoadedData = function(b) { this.bytesLoaded += b.length; - v(this.bytesLoaded <= this.bytesTotal); this._endTagEncountered || (this.isCompressed ? this._decompressor.push(b) : this.processDecompressedData(b), this.scanLoadedData()); }; - k.prototype.getSymbol = function(b) { + g.prototype.finishLoading = function() { + this.isCompressed && (this._decompressor.close(), this._decompressor = null, this.scanLoadedData()); + }; + g.prototype.getSymbol = function(b) { if (this.eagerlyParsedSymbolsMap[b]) { return this.eagerlyParsedSymbolsMap[b]; } @@ -25107,24 +25143,21 @@ __extends = this.__extends || function(c, h) { a.className = this.symbolClassesMap[b] || null; return a; }; - k.prototype.getParsedTag = function(b) { - h.enterTimeline("Parse tag " + e[b.tagCode]); + g.prototype.getParsedTag = function(b) { + k.enterTimeline("Parse tag " + c[b.tagCode]); this._dataStream.align(); this._dataStream.pos = b.byteOffset; - var a = {code:b.tagCode}, d = p.LowLevel.tagHandlers[b.tagCode]; - c.Debug.assert(d, "handler shall exists here"); - var g = b.byteOffset + b.byteLength; - d(this.data, this._dataStream, a, this.swfVersion, b.tagCode, g); - d = this._dataStream.pos; - v(d <= g); - d < g && (c.Debug.warning("Scanning " + e[b.tagCode] + " at offset " + b.byteOffset + " consumed " + (d - b.byteOffset) + " of " + b.byteLength + " bytes. (" + (g - d) + " left)"), this._dataStream.pos = g); - b = s(a, this.dictionary); - h.leaveTimeline(); + var a = {code:b.tagCode}, e = b.byteOffset + b.byteLength; + (0,v.LowLevel.tagHandlers[b.tagCode])(this.data, this._dataStream, a, this.swfVersion, b.tagCode, e); + this._dataStream.pos < e && (this._dataStream.pos = e); + b = r(a, this.dictionary); + k.leaveTimeline(); return b; }; - k.prototype.readHeaderAndInitialize = function(b) { - h.enterTimeline("Initialize SWFFile"); - this.isCompressed = 67 === b[0]; + g.prototype.readHeaderAndInitialize = function(b) { + k.enterTimeline("Initialize SWFFile"); + var a = 67 === b[0], e = 90 === b[0]; + this.isCompressed = a || e; this.swfVersion = b[3]; this._loadStarted = Date.now(); this._uncompressedLength = b[4] | b[5] << 8 | b[6] << 16 | b[7] << 24; @@ -25133,151 +25166,139 @@ __extends = this.__extends || function(c, h) { this._dataStream = new u(this.data.buffer); this._dataStream.pos = 8; this._dataView = this._dataStream; - if (this.isCompressed) { - this.data.set(b.subarray(0, 8)); - this._uncompressedLoadedLength = 8; - this._decompressor = l.create(!0); - var a = this; - this._decompressor.onData = function(b) { - a.data.set(b, a._uncompressedLoadedLength); - a._uncompressedLoadedLength += b.length; - a._decompressor.onData = a.processDecompressedData.bind(a); - a.parseHeaderContents(); - }; - this._decompressor.push(b.subarray(8)); - } else { - this.data.set(b), this._uncompressedLoadedLength = b.length, this._decompressor = null, this.parseHeaderContents(); - } - h.leaveTimeline(); + a ? (this.data.set(b.subarray(0, 8)), this._uncompressedLoadedLength = 8, this._decompressor = t.create(!0), this._decompressor.onData = this.processFirstBatchOfDecompressedData.bind(this), this._decompressor.push(b.subarray(8))) : e ? (this.data.set(b.subarray(0, 8)), this._uncompressedLoadedLength = 8, this._decompressor = new l(!0), this._decompressor.onData = this.processFirstBatchOfDecompressedData.bind(this), this._decompressor.push(b)) : (this.data.set(b), this._uncompressedLoadedLength = + b.length, this._decompressor = null, this.parseHeaderContents()); + k.leaveTimeline(); this._lastScanPosition = this._dataStream.pos; this.scanLoadedData(); }; - k.prototype.parseHeaderContents = function() { - var b = p.LowLevel.readHeader(this.data, this._dataStream); + g.prototype.parseHeaderContents = function() { + var b = v.LowLevel.readHeader(this.data, this._dataStream); this.bounds = b.bounds; this.frameRate = b.frameRate; this.frameCount = b.frameCount; }; - k.prototype.processDecompressedData = function(b) { + g.prototype.processFirstBatchOfDecompressedData = function(b) { this.data.set(b, this._uncompressedLoadedLength); this._uncompressedLoadedLength += b.length; - this._uncompressedLoadedLength === this._uncompressedLength && (this._decompressor.close(), this._decompressor = null); + this.parseHeaderContents(); + this._decompressor.onData = this.processDecompressedData.bind(this); }; - k.prototype.scanLoadedData = function() { - h.enterTimeline("Scan loaded SWF file tags"); + g.prototype.processDecompressedData = function(b) { + this.data.set(b, this._uncompressedLoadedLength); + this._uncompressedLoadedLength += b.length; + }; + g.prototype.scanLoadedData = function() { + k.enterTimeline("Scan loaded SWF file tags"); this._dataStream.pos = this._lastScanPosition; this.scanTagsToOffset(this._uncompressedLoadedLength, !0); this._lastScanPosition = this._dataStream.pos; - h.leaveTimeline(); + k.leaveTimeline(); }; - k.prototype.scanTagsToOffset = function(b, a) { - for (var d = new g(0, 0, 0), e;(e = this._dataStream.pos) < b - 1;) { - this.parseNextTagHeader(d); - if (0 === d.tagCode) { + g.prototype.scanTagsToOffset = function(b, a) { + for (var e = new q(0, 0, 0), f;(f = this._dataStream.pos) < b - 1 && this.parseNextTagHeader(e);) { + if (0 === e.tagCode) { a && (this._endTagEncountered = !0, console.log("SWF load time: " + (.001 * (Date.now() - this._loadStarted)).toFixed(4) + "sec")); break; } - var f = d.byteOffset + d.byteLength; - if (f > b) { - this._dataStream.pos = e; + var c = e.byteOffset + e.byteLength; + if (c > b) { + this._dataStream.pos = f; break; } - this.scanTag(d, a); - v(this._dataStream.pos <= f); - this._dataStream.pos < f && this.emitTagSlopWarning(d, f); + this.scanTag(e, a); + this._dataStream.pos < c && this.emitTagSlopWarning(e, c); } }; - k.prototype.parseNextTagHeader = function(b) { - var a = this._dataStream.pos, d = this._dataView.getUint16(a, !0), a = a + 2; - b.tagCode = d >> 6; - d &= 63; - if (63 === d) { + g.prototype.parseNextTagHeader = function(b) { + var a = this._dataStream.pos, e = this._dataView.getUint16(a, !0), a = a + 2; + b.tagCode = e >> 6; + e &= 63; + if (63 === e) { if (a + 4 > this._uncompressedLoadedLength) { - return; + return!1; } - d = this._dataView.getUint32(a, !0); + e = this._dataView.getUint32(a, !0); a += 4; } this._dataStream.pos = a; b.byteOffset = a; - b.byteLength = d; + b.byteLength = e; + return!0; }; - k.prototype.scanTag = function(a, g) { - var f = this._dataStream, k = f.pos; - v(k === a.byteOffset); - var l = a.tagCode, r = a.byteLength; - 1 < h.traceLevel.value && console.info("Scanning tag " + e[l] + " (start: " + k + ", end: " + (k + r) + ")"); - if (39 === l) { - this.addLazySymbol(l, k, r), k += r, f.pos += 4, this.scanTagsToOffset(k, !1), this._dataStream.pos < w && (this.emitTagSlopWarning(a, w), f.pos = k); + g.prototype.scanTag = function(a, f) { + var g = this._dataStream, n = g.pos, d = a.tagCode, q = a.byteLength; + if (39 === d) { + this.addLazySymbol(d, n, q), n += q, g.pos += 4, this.scanTagsToOffset(n, !1), this._dataStream.pos < l && (this.emitTagSlopWarning(a, l), g.pos = n); } else { - if (t[l]) { - f = this.addLazySymbol(l, k, r), this.decodeEmbeddedImage(f); + if (p[d]) { + g = this.addLazySymbol(d, n, q), this.decodeEmbeddedImage(g); } else { - if (q[l]) { - f = this.addLazySymbol(l, k, r), this.registerEmbeddedFont(f); + if (s[d]) { + g = this.addLazySymbol(d, n, q), this.registerEmbeddedFont(g); } else { - if (m[l]) { - this.addLazySymbol(l, k, r), this.jumpToNextTag(r); + if (h[d]) { + this.addLazySymbol(d, n, q), this.jumpToNextTag(q); } else { - if (g || 76 === l || 56 === l) { - if (n[l]) { - this.addControlTag(l, k, r); + if (f || 76 === d || 56 === d) { + if (m[d]) { + this.addControlTag(d, n, q); } else { - switch(l) { + switch(d) { case 69: - this.setFileAttributes(r); + this.setFileAttributes(q); break; case 86: - this.setSceneAndFrameLabelData(r); + this.setSceneAndFrameLabelData(q); break; case 9: - this.backgroundColor = p.LowLevel.rgb(this.data, this._dataStream); + this.backgroundColor = v.LowLevel.rgb(this.data, this._dataStream); break; case 8: - this._jpegTables || (this._jpegTables = 0 === r ? new Uint8Array(0) : this.data.subarray(f.pos, f.pos + r - 2)); - this.jumpToNextTag(r); + this._jpegTables || (this._jpegTables = 0 === q ? new Uint8Array(0) : this.data.subarray(g.pos, g.pos + q - 2)); + this.jumpToNextTag(q); break; case 82: ; case 72: if (this.useAVM1) { - this.jumpToNextTag(r); + this.jumpToNextTag(q); } else { - var w = k + r, k = new d; - 82 === l ? (k.flags = p.readUi32(this.data, f), k.name = p.readString(this.data, f, 0)) : (k.flags = 0, k.name = ""); - k.data = this.data.subarray(f.pos, w); - this.abcBlocks.push(k); - f.pos = w; + var l = n + q, n = new b; + 82 === d ? (n.flags = v.readUi32(this.data, g), n.name = v.readString(this.data, g, 0)) : (n.flags = 0, n.name = ""); + n.data = this.data.subarray(g.pos, l); + this.abcBlocks.push(n); + g.pos = l; } break; case 76: - w = k + r; - for (r = p.readUi16(this.data, f);r--;) { - k = p.readUi16(this.data, f), l = p.readString(this.data, f, 0), 0 < h.traceLevel.value && console.log("Registering symbol class " + l + " to symbol " + k), this.symbolClassesMap[k] = l, this.symbolClassesList.push({id:k, className:l}); + l = n + q; + for (q = v.readUi16(this.data, g);q--;) { + n = v.readUi16(this.data, g), d = v.readString(this.data, g, 0), this.symbolClassesMap[n] = d, this.symbolClassesList.push({id:n, className:d}); } - f.pos = w; + g.pos = l; break; case 59: - this.useAVM1 && (w = this._currentInitActionBlocks || (this._currentInitActionBlocks = []), f = this._dataView.getUint16(f.pos, !0), w.push({spriteId:f, actionsData:this.data.subarray(k + 2, k + r)})); - this.jumpToNextTag(r); + this.useAVM1 && (l = this._currentInitActionBlocks || (this._currentInitActionBlocks = []), g = this._dataView.getUint16(g.pos, !0), l.push({spriteId:g, actionsData:this.data.subarray(n + 2, n + q)})); + this.jumpToNextTag(q); break; case 12: - this.useAVM1 && (this._currentActionBlocks || (this._currentActionBlocks = [])).push(this.data.subarray(f.pos, f.pos + r)); - this.jumpToNextTag(r); + this.useAVM1 && (this._currentActionBlocks || (this._currentActionBlocks = [])).push(this.data.subarray(g.pos, g.pos + q)); + this.jumpToNextTag(q); break; case 18: ; case 45: - f = p.LowLevel.soundStreamHead(this.data, this._dataStream); - this._currentSoundStreamHead = p.SoundStream.FromTag(f); + g = v.LowLevel.soundStreamHead(this.data, this._dataStream); + this._currentSoundStreamHead = v.SoundStream.FromTag(g); break; case 19: - this._currentSoundStreamBlock = this.data.subarray(f.pos, f.pos += r); + this._currentSoundStreamBlock = this.data.subarray(g.pos, g.pos += q); break; case 43: - w = f.pos + r; - this._currentFrameLabel = p.readString(this.data, f, 0); - f.pos = w; + l = g.pos + q; + this._currentFrameLabel = v.readString(this.data, g, 0); + g.pos = l; break; case 1: this.finishFrame(); @@ -25285,17 +25306,17 @@ __extends = this.__extends || function(c, h) { case 0: break; case 56: - w = f.pos + r; - r = p.readUi16(this.data, f); - for (l = this._currentExports || (this._currentExports = []);r--;) { - var k = p.readUi16(this.data, f), s = p.readString(this.data, f, 0); - if (f.pos > w) { - f.pos = w; + l = g.pos + q; + q = v.readUi16(this.data, g); + for (d = this._currentExports || (this._currentExports = []);q--;) { + var n = v.readUi16(this.data, g), k = v.readString(this.data, g, 0); + if (g.pos > l) { + g.pos = l; break; } - l.push(new b(k, s)); + d.push(new e(n, k)); } - f.pos = w; + g.pos = l; break; case 23: ; @@ -25310,8 +25331,7 @@ __extends = this.__extends || function(c, h) { case 57: ; case 71: - c.Debug.warning("Unsupported tag encountered " + l + ": " + e[l]); - this.jumpToNextTag(r); + this.jumpToNextTag(q); break; case 74: ; @@ -25320,7 +25340,7 @@ __extends = this.__extends || function(c, h) { case 65: ; case 66: - this.jumpToNextTag(r); + this.jumpToNextTag(q); break; case 58: ; @@ -25335,7 +25355,7 @@ __extends = this.__extends || function(c, h) { case 77: ; case 24: - this.jumpToNextTag(r); + this.jumpToNextTag(q); break; case 51: ; @@ -25360,406 +25380,397 @@ __extends = this.__extends || function(c, h) { case 16: ; case 29: - console.info("Ignored tag (these shouldn't occur) " + l + ": " + e[l]); - this.jumpToNextTag(r); + console.info("Ignored tag (these shouldn't occur) " + d + ": " + c[d]); + this.jumpToNextTag(q); break; default: - c.Debug.warning("Tag not handled by the parser: " + l + ": " + e[l]), this.jumpToNextTag(r); + this.jumpToNextTag(q); } } } else { - this.jumpToNextTag(r); + this.jumpToNextTag(q); } } } } } }; - k.prototype.parseSpriteTimeline = function(b) { - h.enterTimeline("parseSpriteTimeline"); - var a = this.data, d = this._dataStream, e = this._dataView, k = {id:b.id, type:"sprite", frames:[]}, m = b.byteOffset + b.byteLength, l = k.frames, r = null, n = [], w = null, q = null, t = null, s = null; - d.pos = b.byteOffset + 2; - k.frameCount = e.getUint16(d.pos, !0); - d.pos += 2; - for (b = new g(0, 0, 0);d.pos < m;) { + g.prototype.parseSpriteTimeline = function(b) { + k.enterTimeline("parseSpriteTimeline"); + var a = this.data, e = this._dataStream, c = this._dataView, g = {id:b.id, type:"sprite", frames:[]}, h = b.byteOffset + b.byteLength, n = g.frames, d = null, l = [], m = null, p = null, s = null, r = null; + e.pos = b.byteOffset + 2; + g.frameCount = c.getUint16(e.pos, !0); + e.pos += 2; + for (b = new q(0, 0, 0);e.pos < h;) { this.parseNextTagHeader(b); - var z = b.byteLength, u = b.tagCode; - if (d.pos + z > m) { - c.Debug.warning("DefineSprite child tags exceed DefineSprite tag length and are dropped"); + var u = b.byteLength, x = b.tagCode; + if (e.pos + u > h) { break; } - if (p.ControlTags[u]) { - n.push(new g(u, d.pos, z)), d.pos += z; + if (v.ControlTags[x]) { + l.push(new q(x, e.pos, u)); } else { - switch(u) { + switch(x) { case 12: - this.useAVM1 && (t || (t = []), t.push(a.subarray(d.pos, d.pos + z))); + this.useAVM1 && (s || (s = []), s.push(a.subarray(e.pos, e.pos + u))); break; case 59: - this.useAVM1 && (s || (s = []), u = e.getUint16(d.pos, !0), d.pos += 2, s.push({spriteId:u, actionsData:a.subarray(d.pos, d.pos + z)})); + this.useAVM1 && (r || (r = []), x = c.getUint16(e.pos, !0), e.pos += 2, r.push({spriteId:x, actionsData:a.subarray(e.pos, e.pos + u)})); break; case 43: - z = d.pos + z; - r = p.readString(a, d, 0); - d.pos = z; - z = 0; + u = e.pos + u; + d = v.readString(a, e, 0); + e.pos = u; + u = 0; break; case 1: - l.push(new f(n, r, w, q, t, s, null)); - r = null; - n = []; - s = t = q = w = null; + n.push(new f(l, d, m, p, s, r, null)); + d = null; + l = []; + r = s = p = m = null; break; case 0: - d.pos = m, z = 0; + e.pos = h, u = 0; } - d.pos += z; - v(d.pos <= m); } + e.pos += u; } - h.leaveTimeline(); - return k; + k.leaveTimeline(); + return g; }; - k.prototype.jumpToNextTag = function(b) { + g.prototype.jumpToNextTag = function(b) { this._dataStream.pos += b; }; - k.prototype.emitTagSlopWarning = function(b, a) { - var d = this._dataStream.pos - b.byteOffset; - c.Debug.warning("Scanning " + e[b.tagCode] + " at offset " + b.byteOffset + " consumed " + d + " of " + b.byteLength + " bytes. (" + (b.byteLength - d) + " left)"); + g.prototype.emitTagSlopWarning = function(b, a) { this._dataStream.pos = a; }; - k.prototype.finishFrame = function() { + g.prototype.finishFrame = function() { 0 === this.pendingUpdateDelays && this.framesLoaded++; this.frames.push(new f(this._currentControlTags, this._currentFrameLabel, this._currentSoundStreamHead, this._currentSoundStreamBlock, this._currentActionBlocks, this._currentInitActionBlocks, this._currentExports)); this._currentExports = this._currentInitActionBlocks = this._currentActionBlocks = this._currentSoundStreamBlock = this._currentSoundStreamHead = this._currentControlTags = this._currentFrameLabel = null; }; - k.prototype.setFileAttributes = function(b) { + g.prototype.setFileAttributes = function(b) { this.attributes && this.jumpToNextTag(b); b = this.data[this._dataStream.pos]; this._dataStream.pos += 4; this.attributes = {network:b & 1, relativeUrls:b & 2, noCrossDomainCaching:b & 4, doAbc:b & 8, hasMetadata:b & 16, useGpu:b & 32, useDirectBlit:b & 64}; this.useAVM1 = !this.attributes.doAbc; }; - k.prototype.setSceneAndFrameLabelData = function(b) { + g.prototype.setSceneAndFrameLabelData = function(b) { this.sceneAndFrameLabelData && this.jumpToNextTag(b); - this.sceneAndFrameLabelData = p.LowLevel.defineScene(this.data, this._dataStream, null); + this.sceneAndFrameLabelData = v.LowLevel.defineScene(this.data, this._dataStream, null); }; - k.prototype.addControlTag = function(b, a, d) { - (this._currentControlTags || (this._currentControlTags = [])).push(new g(b, a, d)); - this.jumpToNextTag(d); + g.prototype.addControlTag = function(b, a, e) { + (this._currentControlTags || (this._currentControlTags = [])).push(new q(b, a, e)); + this.jumpToNextTag(e); }; - k.prototype.addLazySymbol = function(b, a, d) { - var g = this._dataStream.getUint16(this._dataStream.pos, !0); - a = new r(g, b, a, d); - this.dictionary[g] = a; - 0 < h.traceLevel.value && console.info("Registering symbol " + g + " of type " + e[b]); - return a; + g.prototype.addLazySymbol = function(b, a, e) { + var f = this._dataStream.getUint16(this._dataStream.pos, !0); + b = new n(f, b, a, e); + return this.dictionary[f] = b; }; - k.prototype.decodeEmbeddedFont = function(b) { - var d = this.getParsedTag(b); - b = new w(d.id, b, "font", d); - 0 < h.traceLevel.value && console.info("Decoding embedded font " + d.id + " with name '" + d.name + "'", d); + g.prototype.decodeEmbeddedFont = function(b) { + var e = this.getParsedTag(b); + b = new x(e.id, b, "font", e); this.eagerlyParsedSymbolsMap[b.id] = b; this.eagerlyParsedSymbolsList.push(b); - this.fonts.push({name:d.name, id:d.id, style:a(d.bold, d.italic)}); + this.fonts.push({name:e.name, id:e.id, style:a(e.bold, e.italic)}); }; - k.prototype.registerEmbeddedFont = function(b) { + g.prototype.registerEmbeddedFont = function(b) { if (inFirefox) { - var d = this._dataStream, g = d.getUint16(d.pos, !0), e, f; - 10 === b.tagCode ? (f = "__autofont__" + b.byteOffset, e = "regular") : (e = this.data[d.pos + 2], e = a(!!(e & 2), !!(e & 1)), f = this.data[d.pos + 4], d.pos += 5, f = p.readString(this.data, d, f)); - this.fonts.push({name:f, id:g, style:e}); - 0 < h.traceLevel.value && console.info("Registering embedded font " + g + " with name '" + f + "'"); - d.pos = b.byteOffset + b.byteLength; + var e = this._dataStream, f = e.getUint16(e.pos, !0), c, g; + 10 === b.tagCode ? (g = "__autofont__" + b.byteOffset, c = "regular") : (c = this.data[e.pos + 2], c = a(!!(c & 2), !!(c & 1)), g = this.data[e.pos + 4], e.pos += 5, g = v.readString(this.data, e, g)); + this.fonts.push({name:g, id:f, style:c}); + e.pos = b.byteOffset + b.byteLength; } else { this.decodeEmbeddedFont(b); } }; - k.prototype.decodeEmbeddedImage = function(b) { - var a = this.getParsedTag(b), d = new w(a.id, b, "image", a); - 0 < h.traceLevel.value && console.info("Decoding embedded image " + a.id + " of type " + e[b.tagCode] + " (start: " + b.byteOffset + ", end: " + (b.byteOffset + b.byteLength) + ")"); - this.eagerlyParsedSymbolsMap[d.id] = d; - this.eagerlyParsedSymbolsList.push(d); + g.prototype.decodeEmbeddedImage = function(b) { + var a = this.getParsedTag(b); + b = new x(a.id, b, "image", a); + this.eagerlyParsedSymbolsMap[b.id] = b; + this.eagerlyParsedSymbolsList.push(b); }; - return k; + return g; }(); - h.SWFFile = k; + k.SWFFile = g; var f = function() { - return function(b, a, d, g, e, f, k) { - b && Object.freeze(b); + return function(b, a, e, f, c, g, h) { this.controlTags = b; this.labelName = a; - e && Object.freeze(e); - this.soundStreamHead = d; - this.soundStreamBlock = g; - this.actionBlocks = e; - f && Object.freeze(f); - this.initActionBlocks = f; - k && Object.freeze(k); - this.exports = k; - }; - }(); - h.SWFFrame = f; - var d = function() { - return function() { - }; - }(); - h.ABCBlock = d; - h.InitActionBlock = function() { - return function() { + this.soundStreamHead = e; + this.soundStreamBlock = f; + this.actionBlocks = c; + this.initActionBlocks = g; + this.exports = h; }; }(); + k.SWFFrame = f; var b = function() { + return function() { + }; + }(); + k.ABCBlock = b; + k.InitActionBlock = function() { + return function() { + }; + }(); + var e = function() { return function(b, a) { this.symbolId = b; this.className = a; }; }(); - h.SymbolExport = b; - var g = function() { - return function(b, a, d) { + k.SymbolExport = e; + var q = function() { + return function(b, a, e) { this.tagCode = b; this.byteOffset = a; - this.byteLength = d; + this.byteLength = e; }; }(); - h.UnparsedTag = g; - var r = function(b) { - function a(d, g, e, f) { - b.call(this, g, e, f); - this.id = d; + k.UnparsedTag = q; + var n = function(b) { + function a(e, f, c, g) { + b.call(this, f, c, g); + this.id = e; } __extends(a, b); return a; - }(g); - h.DictionaryEntry = r; - var w = function(b) { - function a(d, g, e, f) { - b.call(this, d, g.tagCode, g.byteOffset, g.byteLength); - this.type = e; - this.definition = f; + }(q); + k.DictionaryEntry = n; + var x = function(b) { + function a(e, f, c, g) { + b.call(this, e, f.tagCode, f.byteOffset, f.byteLength); + this.type = c; + this.definition = g; this.ready = !1; } __extends(a, b); return a; - }(r); - h.EagerlyParsedDictionaryEntry = w; - })(c.SWF || (c.SWF = {})); + }(n); + k.EagerlyParsedDictionaryEntry = x; + })(d.SWF || (d.SWF = {})); })(Shumway || (Shumway = {})); -(function(c) { - var h; +(function(d) { + var k; (function(a) { a[a.JPG = 16767231] = "JPG"; a[a.PNG = 8998990] = "PNG"; a[a.GIF = 4671814] = "GIF"; - })(h || (h = {})); + })(k || (k = {})); var a = {16767231:"image/jpeg", 8998990:"image/png", 4671814:"image/gif"}; - h = function() { - function c(a, h) { + k = function() { + function d(a, k) { this.type = 4; this.bytesLoaded = a.length; - a.length === h ? this.data = a : (this.data = new Uint8Array(h), this.data.set(a)); + a.length === k ? this.data = a : (this.data = new Uint8Array(k), this.data.set(a)); this.setMimetype(); } - Object.defineProperty(c.prototype, "bytesTotal", {get:function() { + Object.defineProperty(d.prototype, "bytesTotal", {get:function() { return this.data.length; }, enumerable:!0, configurable:!0}); - c.prototype.appendLoadedData = function(a) { + d.prototype.appendLoadedData = function(a) { this.data.set(a, this.bytesLoaded); this.bytesLoaded += a.length; }; - c.prototype.setMimetype = function() { + d.prototype.setMimetype = function() { this.mimeType = a[this.data[0] << 16 | this.data[1] << 8 | this.data[2]]; }; - return c; + return d; }(); - c.ImageFile = h; + d.ImageFile = k; })(Shumway || (Shumway = {})); -(function(c) { - var h = c.Debug.assert, a = c.SWF.SWFFile, s = function() { - return function(a, c) { +(function(d) { + var k = d.SWF.SWFFile, a = function() { + return function(a, d) { this.bytesLoaded = a; - this.framesLoaded = c; + this.framesLoaded = d; }; }(); - c.LoadProgressUpdate = s; - var v = function() { - function p(a) { - h(a); + d.LoadProgressUpdate = a; + var r = function() { + function r(a) { this._file = null; this._listener = a; this._delayedUpdatesPromise = this._loadingServiceSession = null; this._bytesLoaded = 0; } - p.prototype.loadFile = function(a) { + r.prototype.loadFile = function(a) { this._bytesLoaded = 0; - var e = this._loadingServiceSession = c.FileLoadingService.instance.createSession(); - e.onopen = this.processLoadOpen.bind(this); - e.onprogress = this.processNewData.bind(this); - e.onerror = this.processError.bind(this); - e.onclose = this.processLoadClose.bind(this); - e.open(a); + var l = this._loadingServiceSession = d.FileLoadingService.instance.createSession(); + l.onopen = this.processLoadOpen.bind(this); + l.onprogress = this.processNewData.bind(this); + l.onerror = this.processError.bind(this); + l.onclose = this.processLoadClose.bind(this); + l.open(a); }; - p.prototype.abortLoad = function() { + r.prototype.abortLoad = function() { }; - p.prototype.loadBytes = function(a) { - this.processLoadOpen(); + r.prototype.loadBytes = function(a) { this.processNewData(a, {bytesLoaded:a.length, bytesTotal:a.length}); this.processLoadClose(); }; - p.prototype.processLoadOpen = function() { - h(!this._file); + r.prototype.processLoadOpen = function() { }; - p.prototype.processNewData = function(l, e) { - this._bytesLoaded += l.length; - if (8192 > this._bytesLoaded && this._bytesLoaded < e.bytesTotal) { - this._queuedInitialData || (this._queuedInitialData = new Uint8Array(Math.min(8192, e.bytesTotal))), this._queuedInitialData.set(l, this._bytesLoaded - l.length); + r.prototype.processNewData = function(r, l) { + this._bytesLoaded += r.length; + if (8192 > this._bytesLoaded && this._bytesLoaded < l.bytesTotal) { + this._queuedInitialData || (this._queuedInitialData = new Uint8Array(Math.min(8192, l.bytesTotal))), this._queuedInitialData.set(r, this._bytesLoaded - r.length); } else { if (this._queuedInitialData) { - var m = new Uint8Array(this._bytesLoaded); - m.set(this._queuedInitialData); - m.set(l, this._bytesLoaded - l.length); - l = m; + var c = new Uint8Array(this._bytesLoaded); + c.set(this._queuedInitialData); + c.set(r, this._bytesLoaded - r.length); + r = c; this._queuedInitialData = null; } - var t = this._file, q = m = 0; - if (t) { - t instanceof a && (m = t.eagerlyParsedSymbolsList.length, q = t.framesLoaded), t.appendLoadedData(l); + var h = this._file, p = c = 0; + if (h) { + h instanceof k && (c = h.eagerlyParsedSymbolsList.length, p = h.framesLoaded), h.appendLoadedData(r); } else { - var t = l, n = e.bytesTotal, k = t[0] << 16 | t[1] << 8 | t[2], t = 22355 === (k & 65535) ? new a(t, n) : 16767231 === k || 8998990 === k || 4671814 === k ? new c.ImageFile(t, n) : null; - t = this._file = t; - this._listener.onLoadOpen(t); + var h = r, s = l.bytesTotal, m = h[0] << 16 | h[1] << 8 | h[2], h = 22355 === (m & 65535) ? new k(h, s) : 16767231 === m || 8998990 === m || 4671814 === m ? new d.ImageFile(h, s) : null; + h = this._file = h; + this._listener.onLoadOpen(h); } - if (t instanceof a) { - this.processSWFFileUpdate(t, m, q); + if (h instanceof k) { + this.processSWFFileUpdate(h, c, p); } else { - if (h(t instanceof c.ImageFile), this._listener.onLoadProgress(new s(e.bytesLoaded, -1)), e.bytesLoaded === e.bytesTotal) { + if (this._listener.onLoadProgress(new a(l.bytesLoaded, -1)), l.bytesLoaded === l.bytesTotal) { this._listener.onImageBytesLoaded(); } } } }; - p.prototype.processError = function(a) { - c.Debug.warning("Loading error encountered:", a); + r.prototype.processError = function(a) { }; - p.prototype.processLoadClose = function() { - this._file.bytesLoaded !== this._file.bytesTotal && c.Debug.warning("Not Implemented: processing loadClose when loading was aborted"); - }; - p.prototype.processSWFFileUpdate = function(a, e, m) { - var t; - if (e = a.eagerlyParsedSymbolsList.length - e) { - t = this._listener.onNewEagerlyParsedSymbols(a.eagerlyParsedSymbolsList, e); - this._delayedUpdatesPromise && (t = Promise.all([this._delayedUpdatesPromise, t])); - this._delayedUpdatesPromise = t; - this._lastDelayedUpdate = n = new s(a.bytesLoaded, a.frames.length); - a.pendingUpdateDelays++; - var q = this; - a.framesLoaded = m; - t.then(function() { - 0 < c.SWF.traceLevel.value && console.log("Reducing pending update delays from " + a.pendingUpdateDelays + " to " + (a.pendingUpdateDelays - 1)); - a.pendingUpdateDelays--; - h(0 <= a.pendingUpdateDelays); - a.framesLoaded = n.framesLoaded; - q._listener.onLoadProgress(n); - q._delayedUpdatesPromise === t && (q._delayedUpdatesPromise = null, q._lastDelayedUpdate = null); - }); - } else { - var n = this._lastDelayedUpdate; - n ? (h(n.framesLoaded <= a.frames.length), n.bytesLoaded = a.bytesLoaded, n.framesLoaded = a.frames.length) : (h(a.framesLoaded === a.frames.length), this._listener.onLoadProgress(new s(a.bytesLoaded, a.framesLoaded))); + r.prototype.processLoadClose = function() { + var a = this._file; + if (a instanceof k) { + var d = a.eagerlyParsedSymbolsList.length, c = a.framesLoaded; + a.finishLoading(); + this.processSWFFileUpdate(a, d, c); } }; - return p; + r.prototype.processSWFFileUpdate = function(d, l, c) { + var h; + if (l = d.eagerlyParsedSymbolsList.length - l) { + h = this._listener.onNewEagerlyParsedSymbols(d.eagerlyParsedSymbolsList, l); + this._delayedUpdatesPromise && (h = Promise.all([this._delayedUpdatesPromise, h])); + this._delayedUpdatesPromise = h; + this._lastDelayedUpdate = s = new a(d.bytesLoaded, d.frames.length); + d.pendingUpdateDelays++; + var p = this; + d.framesLoaded = c; + h.then(function() { + d.pendingUpdateDelays--; + d.framesLoaded = s.framesLoaded; + p._listener.onLoadProgress(s); + p._delayedUpdatesPromise === h && (p._delayedUpdatesPromise = null, p._lastDelayedUpdate = null); + }); + } else { + var s = this._lastDelayedUpdate; + if (s) { + s.bytesLoaded = d.bytesLoaded, s.framesLoaded = d.frames.length; + } else { + this._listener.onLoadProgress(new a(d.bytesLoaded, d.framesLoaded)); + } + } + }; + return r; }(); - c.FileLoader = v; - var p; + d.FileLoader = r; + var v; (function(a) { a[a.SWF = 22355] = "SWF"; a[a.JPG = 16767231] = "JPG"; a[a.PNG = 8998990] = "PNG"; a[a.GIF = 4671814] = "GIF"; - })(p || (p = {})); + })(v || (v = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load SWF Parser"); console.time("Load Flash TS Dependencies"); -(function(c) { - function h(a) { - var e = {}; +(function(d) { + function k(a) { + var c = {}; a = a.split(","); - for (var k = 0;k < a.length;k++) { - e[a[k]] = !0; + for (var g = 0;g < a.length;g++) { + c[a[g]] = !0; } - return e; + return c; } - var a = /^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, s = /^<\/([-A-Za-z0-9_]+)[^>]*>/, v = /([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, p = h("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"), u = h("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"), - l = h("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), e = h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), m = h("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), t = h("script,style"); - c.HTMLParser = function(c, n) { - function k() { + var a = /^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, r = /^<\/([-A-Za-z0-9_]+)[^>]*>/, v = /([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, u = k("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"), t = k("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"), + l = k("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), c = k("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), h = k("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), p = k("script,style"); + d.HTMLParser = function(d, m) { + function g() { return this[this.length - 1]; } - function f(b, a, g, f) { - a = a.toLowerCase(); - if (u[a]) { - for (;k() && l[k()];) { - d("", k()); + function f(a, e, f, d) { + e = e.toLowerCase(); + if (t[e]) { + for (;g() && l[g()];) { + b("", g()); } } - e[a] && k() == a && d("", a); - (f = p[a] || !!f) || r.push(a); - if (n.start) { - var c = Object.create(null); - g.replace(v, function(b, a, d, g, e) { + c[e] && g() == e && b("", e); + (d = u[e] || !!d) || n.push(e); + if (m.start) { + var q = Object.create(null); + f.replace(v, function(b, a, e, f, c) { a = a.toLowerCase(); - c[a] = d ? d : g ? g : e ? e : m[a] ? a : ""; + q[a] = e ? e : f ? f : c ? c : h[a] ? a : ""; return b; }); - n.start && n.start(a, c, !!f); + m.start && m.start(e, q, !!d); } } - function d(b, a) { + function b(b, a) { if (a) { - for (d = r.length - 1;0 <= d && r[d] != a;d--) { + for (e = n.length - 1;0 <= e && n[e] != a;e--) { } } else { - var d = 0 + var e = 0 } - if (0 <= d) { - for (var g = r.length - 1;g >= d;g--) { - n.end && n.end(r[g]); + if (0 <= e) { + for (var f = n.length - 1;f >= e;f--) { + m.end && m.end(n[f]); } - r.length = d; + n.length = e; } } - for (var b, g, r = [], w = c;c;) { - g = !0; - if (k() && t[k()]) { - c = c.replace(new RegExp("(.*)]*>"), function(b, a) { + for (var e, q, n = [], k = d;d;) { + q = !0; + if (g() && p[g()]) { + d = d.replace(new RegExp("(.*)]*>"), function(b, a) { a = a.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/ b ? c : c.substring(0, b), c = 0 > b ? "" : c.substring(b), n.chars && n.chars(g)); + q && (e = d.indexOf("<"), q = 0 > e ? d : d.substring(0, e), d = 0 > e ? "" : d.substring(e), m.chars && m.chars(q)); } - if (c == w) { - throw "Parse Error: " + c; + if (d == k) { + throw "Parse Error: " + d; } - w = c; + k = d; } - d(); + b(); }; })(Shumway || (Shumway = {})); -(function(c) { - var h = c.Debug.notImplemented, a = c.Debug.somewhatImplemented, s = c.Bounds, v = c.ArrayUtilities.DataBuffer, p = c.ColorUtilities, u = c.AVM2.AS.flash; +(function(d) { + var k = d.Debug.notImplemented, a = d.Debug.somewhatImplemented, r = d.Bounds, v = d.ArrayUtilities.DataBuffer, u = d.ColorUtilities, t = d.AVM2.AS.flash; (function(a) { a[a.None = 0] = "None"; a[a.DirtyBounds = 1] = "DirtyBounds"; @@ -25767,118 +25778,118 @@ console.time("Load Flash TS Dependencies"); a[a.DirtyStyle = 4] = "DirtyStyle"; a[a.DirtyFlow = 8] = "DirtyFlow"; a[a.Dirty = a.DirtyBounds | a.DirtyContent | a.DirtyStyle | a.DirtyFlow] = "Dirty"; - })(c.TextContentFlags || (c.TextContentFlags = {})); - var l = {lt:"<", gt:">", amp:"&", quot:'"', apos:"'", nbsp:"\u00a0"}, e = function() { - function e(a) { - this._id = u.display.DisplayObject.getNextSyncID(); - this._bounds = new s(0, 0, 0, 0); + })(d.TextContentFlags || (d.TextContentFlags = {})); + var l = {lt:"<", gt:">", amp:"&", quot:'"', apos:"'", nbsp:"\u00a0"}, c = function() { + function c(a) { + this._id = t.display.DisplayObject.getNextSyncID(); + this._bounds = new r(0, 0, 0, 0); this._plainText = ""; this._autoSize = this._borderColor = this._backgroundColor = 0; this._wordWrap = !1; this._scrollV = 1; this.flags = this._scrollH = 0; - this.defaultTextFormat = a || new u.text.TextFormat; + this.defaultTextFormat = a || new t.text.TextFormat; this.textRuns = []; this.textRunData = new v; this.coords = this.matrix = null; } - e.prototype.parseHtml = function(e, m, n) { - var k = "", f = this.textRuns, d = f.length = 0, b = 0, g = this.defaultTextFormat.clone(), r = null, w = [], s; - c.HTMLParser(e, s = {chars:function(a) { - for (var e = "", m = 0;m < a.length;m++) { - var n = a.charAt(m); - if ("&" !== n) { - e += n; + c.prototype.parseHtml = function(c, h, m) { + var g = "", f = this.textRuns, b = f.length = 0, e = 0, q = this.defaultTextFormat.clone(), n = null, r = [], v; + d.HTMLParser(c, v = {chars:function(a) { + for (var c = "", h = 0;h < a.length;h++) { + var m = a.charAt(h); + if ("&" !== m) { + c += m; } else { - if (n = c.StringUtilities.indexOfAny(a, ["&", ";"], m + 1), 0 < n) { - m = a.substring(m + 1, n); - if (1 < m.length && "#" === m.charAt(0)) { - var w = 0, w = 2 < m.length && "x" === m.charAt(1) ? parseInt(m.substring(1)) : parseInt(m.substring(2), 16), e = e + String.fromCharCode(w) + if (m = d.StringUtilities.indexOfAny(a, ["&", ";"], h + 1), 0 < m) { + h = a.substring(h + 1, m); + if (1 < h.length && "#" === h.charAt(0)) { + var p = 0, p = 2 < h.length && "x" === h.charAt(1) ? parseInt(h.substring(1)) : parseInt(h.substring(2), 16), c = c + String.fromCharCode(p) } else { - void 0 !== l[m] ? e += l[m] : c.Debug.unexpected(m); + void 0 !== l[h] ? c += l[h] : d.Debug.unexpected(h); } - m = n; + h = m; } else { - for (var q in l) { - if (a.indexOf(q, m + 1) === m + 1) { - e += l[q]; - m += q.length; + for (var s in l) { + if (a.indexOf(s, h + 1) === h + 1) { + c += l[s]; + h += s.length; break; } } } } } - a = e; - k += a; - b += a.length; - b - d && (r && r.textFormat.equals(g) ? r.endIndex = b : (r = new u.text.TextRun(d, b, g), f.push(r)), d = b); - }, start:function(b, d) { - var e = !1; - m && (e = m.hasStyle(b)) && (w.push(g), g = g.clone(), m.applyStyle(g, b)); + a = c; + g += a; + e += a.length; + e - b && (n && n.textFormat.equals(q) ? n.endIndex = e : (n = new t.text.TextRun(b, e, q), f.push(n)), b = e); + }, start:function(b, e) { + var f = !1; + h && (f = h.hasStyle(b)) && (r.push(q), q = q.clone(), h.applyStyle(q, b)); switch(b) { case "a": - w.push(g); + r.push(q); a(""); - var f = d.target || g.target, c = d.url || g.url; - if (f !== g.target || c !== g.url) { - e || (g = g.clone()), g.target = f, g.url = c; + var c = e.target || q.target, n = e.url || q.url; + if (c !== q.target || n !== q.url) { + f || (q = q.clone()), q.target = c, q.url = n; } break; case "b": - w.push(g); - g.bold || (e || (g = g.clone()), g.bold = !0); + r.push(q); + q.bold || (f || (q = q.clone()), q.bold = !0); break; case "font": - w.push(g); - var f = p.isValidHexColor(d.color) ? p.hexToRGB(d.color) : g.color, c = d.face || g.font, l = isNaN(d.size) ? g.size : +d.size; - if (f !== g.color || c !== g.font || l !== g.size) { - e || (g = g.clone()), g.color = f, g.font = c, g.size = l; + r.push(q); + var c = u.isValidHexColor(e.color) ? u.hexToRGB(e.color) : q.color, n = e.face || q.font, d = isNaN(e.size) ? q.size : +e.size; + if (c !== q.color || n !== q.font || d !== q.size) { + f || (q = q.clone()), q.color = c, q.font = n, q.size = d; } break; case "img": - h(""); + k(""); break; case "i": - w.push(g); - g.italic || (e || (g = g.clone()), g.italic = !0); + r.push(q); + q.italic || (f || (q = q.clone()), q.italic = !0); break; case "li": - if (w.push(g), g.bullet || (e || (g = g.clone()), g.bullet = !0), "\r" === k[k.length - 1]) { + if (r.push(q), q.bullet || (f || (q = q.clone()), q.bullet = !0), "\r" === g[g.length - 1]) { break; } ; case "br": - n && s.chars("\r"); + m && v.chars("\r"); break; case "span": ; case "p": - f = !1; - w.push(g); - m && d.class && (c = "." + d.class, f = m.hasStyle(c)) && (e || (g = g.clone()), m.applyStyle(g, c)); + c = !1; + r.push(q); + h && e.class && (n = "." + e.class, c = h.hasStyle(n)) && (f || (q = q.clone()), h.applyStyle(q, n)); if ("span" === b) { break; } - c = d.align; - -1 < u.text.TextFormatAlign.toNumber(c) && c !== g.align && (e || f || (g = g.clone()), g.align = c); + n = e.align; + -1 < t.text.TextFormatAlign.toNumber(n) && n !== q.align && (f || c || (q = q.clone()), q.align = n); break; case "textformat": - w.push(g); - var f = isNaN(d.blockindent) ? g.blockIndent : +d.blockindent, c = isNaN(d.indent) ? g.indent : +d.indent, l = isNaN(d.leading) ? g.leading : +d.leading, r = isNaN(d.leftmargin) ? g.leftMargin : +d.leftmargin, t = isNaN(d.rightmargin) ? g.rightMargin : +d.rightmargin; - if (f !== g.blockIndent || c !== g.indent || l !== g.leading || r !== g.leftMargin || t !== g.rightMargin) { - e || (g = g.clone()), g.blockIndent = f, g.indent = c, g.leading = l, g.leftMargin = r, g.rightMargin = t; + r.push(q); + var c = isNaN(e.blockindent) ? q.blockIndent : +e.blockindent, n = isNaN(e.indent) ? q.indent : +e.indent, d = isNaN(e.leading) ? q.leading : +e.leading, l = isNaN(e.leftmargin) ? q.leftMargin : +e.leftmargin, p = isNaN(e.rightmargin) ? q.rightMargin : +e.rightmargin; + if (c !== q.blockIndent || n !== q.indent || d !== q.leading || l !== q.leftMargin || p !== q.rightMargin) { + f || (q = q.clone()), q.blockIndent = c, q.indent = n, q.leading = d, q.leftMargin = l, q.rightMargin = p; } break; case "u": - w.push(g), g.underline || (e || (g = g.clone()), g.underline = !0); + r.push(q), q.underline || (f || (q = q.clone()), q.underline = !0); } }, end:function(b) { switch(b) { case "li": ; case "p": - n && s.chars("\r"); + m && v.chars("\r"); case "a": ; case "b": @@ -25890,241 +25901,240 @@ console.time("Load Flash TS Dependencies"); case "textformat": ; case "u": - g = w.pop(), m && m.hasStyle(b) && (g = w.pop()); + q = r.pop(), h && h.hasStyle(b) && (q = r.pop()); } }}); - this._plainText = k; + this._plainText = g; this._serializeTextRuns(); }; - Object.defineProperty(e.prototype, "plainText", {get:function() { + Object.defineProperty(c.prototype, "plainText", {get:function() { return this._plainText; }, set:function(a) { this._plainText = a; this.textRuns.length = 0; - a && (a = new u.text.TextRun(0, a.length, this.defaultTextFormat), this.textRuns[0] = a); + a && (a = new t.text.TextRun(0, a.length, this.defaultTextFormat), this.textRuns[0] = a); this._serializeTextRuns(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "bounds", {get:function() { + Object.defineProperty(c.prototype, "bounds", {get:function() { return this._bounds; }, set:function(a) { this._bounds.copyFrom(a); this.flags |= 1; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "autoSize", {get:function() { + Object.defineProperty(c.prototype, "autoSize", {get:function() { return this._autoSize; }, set:function(a) { a !== this._autoSize && (this._autoSize = a, this._plainText && (this.flags |= 8)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "wordWrap", {get:function() { + Object.defineProperty(c.prototype, "wordWrap", {get:function() { return this._wordWrap; }, set:function(a) { a !== this._wordWrap && (this._wordWrap = a, this._plainText && (this.flags |= 8)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "scrollV", {get:function() { + Object.defineProperty(c.prototype, "scrollV", {get:function() { return this._scrollV; }, set:function(a) { a !== this._scrollV && (this._scrollV = a, this._plainText && (this.flags |= 8)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "scrollH", {get:function() { + Object.defineProperty(c.prototype, "scrollH", {get:function() { return this._scrollH; }, set:function(a) { a !== this._scrollH && (this._scrollH = a, this._plainText && (this.flags |= 8)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "backgroundColor", {get:function() { + Object.defineProperty(c.prototype, "backgroundColor", {get:function() { return this._backgroundColor; }, set:function(a) { a !== this._backgroundColor && (this._backgroundColor = a, this.flags |= 4); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "borderColor", {get:function() { + Object.defineProperty(c.prototype, "borderColor", {get:function() { return this._borderColor; }, set:function(a) { a !== this._borderColor && (this._borderColor = a, this.flags |= 4); }, enumerable:!0, configurable:!0}); - e.prototype._serializeTextRuns = function() { + c.prototype._serializeTextRuns = function() { var a = this.textRuns; this.textRunData.clear(); - for (var e = 0;e < a.length;e++) { - this._writeTextRun(a[e]); + for (var c = 0;c < a.length;c++) { + this._writeTextRun(a[c]); } this.flags |= 2; }; - e.prototype._writeTextRun = function(a) { - var e = this.textRunData; - e.writeInt(a.beginIndex); - e.writeInt(a.endIndex); + c.prototype._writeTextRun = function(a) { + var c = this.textRunData; + c.writeInt(a.beginIndex); + c.writeInt(a.endIndex); a = a.textFormat; - var c = +a.size; - e.writeInt(c); - var k = u.text.Font.getByNameAndStyle(a.font, a.style) || u.text.Font.getDefaultFont(); - k.fontType === u.text.FontType.EMBEDDED ? e.writeUTF("swffont" + k._id) : e.writeUTF(k._fontFamily); - e.writeInt(k.ascent * c); - e.writeInt(k.descent * c); - e.writeInt(null === a.leading ? k.leading * c : +a.leading); - var f = c = !1; - k.fontType === u.text.FontType.DEVICE && (c = null === a.bold ? k.fontStyle === u.text.FontStyle.BOLD || k.fontType === u.text.FontStyle.BOLD_ITALIC : !!a.bold, f = null === a.italic ? k.fontStyle === u.text.FontStyle.ITALIC || k.fontType === u.text.FontStyle.BOLD_ITALIC : !!a.italic); - e.writeBoolean(c); - e.writeBoolean(f); - e.writeInt(+a.color); - e.writeInt(u.text.TextFormatAlign.toNumber(a.align)); - e.writeBoolean(!!a.bullet); - e.writeInt(+a.indent); - e.writeInt(+a.kerning); - e.writeInt(+a.leftMargin); - e.writeInt(+a.letterSpacing); - e.writeInt(+a.rightMargin); - e.writeBoolean(!!a.underline); + var h = +a.size; + c.writeInt(h); + var g = t.text.Font.getByNameAndStyle(a.font, a.style) || t.text.Font.getDefaultFont(); + g.fontType === t.text.FontType.EMBEDDED ? c.writeUTF("swffont" + g._id) : c.writeUTF(g._fontFamily); + c.writeInt(g.ascent * h); + c.writeInt(g.descent * h); + c.writeInt(null === a.leading ? g.leading * h : +a.leading); + var f = h = !1; + g.fontType === t.text.FontType.DEVICE && (h = null === a.bold ? g.fontStyle === t.text.FontStyle.BOLD || g.fontType === t.text.FontStyle.BOLD_ITALIC : !!a.bold, f = null === a.italic ? g.fontStyle === t.text.FontStyle.ITALIC || g.fontType === t.text.FontStyle.BOLD_ITALIC : !!a.italic); + c.writeBoolean(h); + c.writeBoolean(f); + c.writeInt(+a.color); + c.writeInt(t.text.TextFormatAlign.toNumber(a.align)); + c.writeBoolean(!!a.bullet); + c.writeInt(+a.indent); + c.writeInt(+a.kerning); + c.writeInt(+a.leftMargin); + c.writeInt(+a.letterSpacing); + c.writeInt(+a.rightMargin); + c.writeBoolean(!!a.underline); }; - e.prototype.appendText = function(a, e) { - e || (e = this.defaultTextFormat); - var c = this._plainText, k = new u.text.TextRun(c.length, c.length + a.length, e); - this._plainText = c + a; - this.textRuns.push(k); - this._writeTextRun(k); + c.prototype.appendText = function(a, c) { + c || (c = this.defaultTextFormat); + var h = this._plainText, g = new t.text.TextRun(h.length, h.length + a.length, c); + this._plainText = h + a; + this.textRuns.push(g); + this._writeTextRun(g); }; - e.prototype.prependText = function(a, e) { - e || (e = this.defaultTextFormat); + c.prototype.prependText = function(a, c) { + c || (c = this.defaultTextFormat); this._plainText = a + this._plainText; - for (var c = this.textRuns, k = a.length, f = 0;f < c.length;f++) { - var d = c[f]; - d.beginIndex += k; - d.endIndex += k; + for (var h = this.textRuns, g = a.length, f = 0;f < h.length;f++) { + var b = h[f]; + b.beginIndex += g; + b.endIndex += g; } - c.unshift(new u.text.TextRun(0, k, e)); + h.unshift(new t.text.TextRun(0, g, c)); this._serializeTextRuns(); }; - e.prototype.replaceText = function(a, e, c, k) { - if (!(e < a) && c) { - if (0 === e) { - this.prependText(c, k); + c.prototype.replaceText = function(a, c, h, g) { + if (!(c < a) && h) { + if (0 === c) { + this.prependText(h, g); } else { var f = this._plainText; if (a >= f.length) { - this.appendText(c, k); + this.appendText(h, g); } else { - var d = this.defaultTextFormat, b = d; - k && (b = b.clone(), b.merge(k)); - if (0 >= a && e >= f.length) { - k ? (this.defaultTextFormat = b, this.plainText = c, this.defaultTextFormat = d) : this.plainText = c; + var b = this.defaultTextFormat, e = b; + g && (e = e.clone(), e.merge(g)); + if (0 >= a && c >= f.length) { + g ? (this.defaultTextFormat = e, this.plainText = h, this.defaultTextFormat = b) : this.plainText = h; } else { - for (var d = this.textRuns, g = [], m = a + c.length, l = m - e, h = 0;h < d.length;h++) { - var s = d[h]; - if (a < s.endIndex) { - if (a <= s.beginIndex && m >= s.endIndex) { + for (var b = this.textRuns, d = [], n = a + h.length, l = n - c, k = 0;k < b.length;k++) { + var r = b[k]; + if (a < r.endIndex) { + if (a <= r.beginIndex && n >= r.endIndex) { continue; } - var p = s.containsIndex(a), v = s.containsIndex(e); - if (p && v) { - if (k) { - p = s.clone(); - p.endIndex = a; - g.push(p); - h--; - s.beginIndex = a + 1; + var u = r.containsIndex(a), v = r.containsIndex(c); + if (u && v) { + if (g) { + u = r.clone(); + u.endIndex = a; + d.push(u); + k--; + r.beginIndex = a + 1; continue; } } else { - p ? s.endIndex = a : v ? k ? (g.push(new u.text.TextRun(a, m, b)), s.beginIndex = m) : (s.beginIndex = a, s.endIndex += l) : (s.beginIndex += l, s.endIndex += l); + u ? r.endIndex = a : v ? g ? (d.push(new t.text.TextRun(a, n, e)), r.beginIndex = n) : (r.beginIndex = a, r.endIndex += l) : (r.beginIndex += l, r.endIndex += l); } } - g.push(s); + d.push(r); } - this._plainText = f.substring(0, a) + c + f.substring(e); - this.textRuns = g; + this._plainText = f.substring(0, a) + h + f.substring(c); + this.textRuns = d; this._serializeTextRuns(); } } } } }; - return e; + return c; }(); - c.TextContent = e; + d.TextContent = c; })(Shumway || (Shumway = {})); -var Shumway$$inline_755 = Shumway || (Shumway = {}), AVM2$$inline_756 = Shumway$$inline_755.AVM2 || (Shumway$$inline_755.AVM2 = {}), AS$$inline_757 = AVM2$$inline_756.AS || (AVM2$$inline_756.AS = {}); -AS$$inline_757.flashOptions = Shumway$$inline_755.Settings.shumwayOptions.register(new Shumway$$inline_755.Options.OptionSet("Flash Options")); -AS$$inline_757.traceEventsOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("te", "Trace Events", "boolean", !1, "Trace dispatching of events.")); -AS$$inline_757.traceLoaderOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("tp", "Trace Loader", "boolean", !1, "Trace loader execution.")); -AS$$inline_757.disableAudioOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("da", "Disable Audio", "boolean", !1, "Disables audio.")); -AS$$inline_757.webAudioOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use WebAudio for Sound", "boolean", !1, "Enables WebAudio API for MovieClip sound stream. (MP3 format is an exception)")); -AS$$inline_757.webAudioMP3Option = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use MP3 decoding to WebAudio", "boolean", !1, "Enables WebAudio API and software MP3 decoding and disables any AUDIO tag usage for MP3 format")); -AS$$inline_757.mediaSourceOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use Media Source for Video", "boolean", !1, "Enables Media Source Extension API for NetStream.")); -AS$$inline_757.mediaSourceMP3Option = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use Media Source for MP3", "boolean", !0, "Enables Media Source Extension API for MP3 streams.")); -__extends = this.__extends || function(c, h) { +var Shumway$$inline_763 = Shumway || (Shumway = {}), AVM2$$inline_764 = Shumway$$inline_763.AVM2 || (Shumway$$inline_763.AVM2 = {}), AS$$inline_765 = AVM2$$inline_764.AS || (AVM2$$inline_764.AS = {}); +AS$$inline_765.flashOptions = Shumway$$inline_763.Settings.shumwayOptions.register(new Shumway$$inline_763.Options.OptionSet("Flash Options")); +AS$$inline_765.traceEventsOption = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option("te", "Trace Events", "boolean", !1, "Trace dispatching of events.")); +AS$$inline_765.traceLoaderOption = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option("tp", "Trace Loader", "boolean", !1, "Trace loader execution.")); +AS$$inline_765.disableAudioOption = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option("da", "Disable Audio", "boolean", !1, "Disables audio.")); +AS$$inline_765.webAudioOption = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option(null, "Use WebAudio for Sound", "boolean", !1, "Enables WebAudio API for MovieClip sound stream. (MP3 format is an exception)")); +AS$$inline_765.webAudioMP3Option = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option(null, "Use MP3 decoding to WebAudio", "boolean", !1, "Enables WebAudio API and software MP3 decoding and disables any AUDIO tag usage for MP3 format")); +AS$$inline_765.mediaSourceOption = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option(null, "Use Media Source for Video", "boolean", !1, "Enables Media Source Extension API for NetStream.")); +AS$$inline_765.mediaSourceMP3Option = AS$$inline_765.flashOptions.register(new Shumway$$inline_763.Options.Option(null, "Use Media Source for MP3", "boolean", !0, "Enables Media Source Extension API for MP3 streams.")); +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { - var a = c.isInteger, s = c.Debug.assert, v = c.Debug.warning, p = c.Bounds, u = c.AVM2.AS.flash, l = function() { - function e(m, l) { - s(a(m.id)); - this.data = m; - if (m.className) { - var n = c.AVM2.Runtime.AVM2.instance.applicationDomain; +(function(d) { + (function(k) { + var a = d.Debug.warning, r = d.Bounds, v = d.AVM2.AS.flash, u = function() { + function l(c, h) { + this.data = c; + if (c.className) { + var l = d.AVM2.Runtime.AVM2.instance.applicationDomain; try { - this.symbolClass = n.getClass(m.className); - } catch (k) { - v("Symbol " + m.id + " bound to non-existing class " + m.className), this.symbolClass = l; + this.symbolClass = l.getClass(c.className); + } catch (s) { + a("Symbol " + c.id + " bound to non-existing class " + c.className), this.symbolClass = h; } } else { - this.symbolClass = l; + this.symbolClass = h; } this.isAVM1Object = !1; } - Object.defineProperty(e.prototype, "id", {get:function() { + Object.defineProperty(l.prototype, "id", {get:function() { return this.data.id; }, enumerable:!0, configurable:!0}); - return e; + return l; }(); - h.Symbol = l; - var e = function(a) { - function e(c, l, k) { - a.call(this, c, l); - this.dynamic = k; + k.Symbol = u; + var t = function(a) { + function c(c, d, s) { + a.call(this, c, d); + this.dynamic = s; } - __extends(e, a); - e.prototype._setBoundsFromData = function(a) { - this.fillBounds = a.fillBounds ? p.FromUntyped(a.fillBounds) : null; - this.lineBounds = a.lineBounds ? p.FromUntyped(a.lineBounds) : null; + __extends(c, a); + c.prototype._setBoundsFromData = function(a) { + this.fillBounds = a.fillBounds ? r.FromUntyped(a.fillBounds) : null; + this.lineBounds = a.lineBounds ? r.FromUntyped(a.lineBounds) : null; !this.lineBounds && this.fillBounds && (this.lineBounds = this.fillBounds.clone()); }; - return e; - }(l); - h.DisplaySymbol = e; - l = function(a) { - function e(c) { - a.call(this, c, u.utils.ByteArray); + return c; + }(u); + k.DisplaySymbol = t; + u = function(a) { + function c(c) { + a.call(this, c, v.utils.ByteArray); } - __extends(e, a); - e.FromData = function(a) { - var c = new e(a); - c.buffer = a.data; - c.byteLength = a.data.byteLength; - return c; + __extends(c, a); + c.FromData = function(a) { + var d = new c(a); + d.buffer = a.data; + d.byteLength = a.data.byteLength; + return d; }; - return e; - }(l); - h.BinarySymbol = l; - h.SoundStart = function() { - return function(a, e) { + return c; + }(u); + k.BinarySymbol = u; + k.SoundStart = function() { + return function(a, c) { this.soundId = a; - this.soundInfo = e; + this.soundInfo = c; }; }(); - })(c.Timeline || (c.Timeline = {})); + })(d.Timeline || (d.Timeline = {})); })(Shumway || (Shumway = {})); var RtmpJs; -(function(c) { - var h = function() { - function a(c) { +(function(d) { + var k = function() { + function a(d) { this.onmessage = null; - this.id = c; + this.id = d; this.buffer = null; this.bufferLength = 0; this.lastStreamId = -1; @@ -26140,12 +26150,12 @@ var RtmpJs; a.prototype.abort = function() { this.buffer ? this.bufferLength = 0 : this.lastMessageComplete || (this.lastMessageComplete = !0, this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:null, firstChunk:!1, lastChunk:!0})); }; - a.prototype._push = function(a, c, h) { + a.prototype._push = function(a, d, k) { if (this.onmessage) { - if (c && h || !this.buffer) { - this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:a, firstChunk:c, lastChunk:h}); + if (d && k || !this.buffer) { + this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:a, firstChunk:d, lastChunk:k}); } else { - if (c && (this.bufferLength = 0, this.lastLength > this.buffer.length && (this.buffer = new Uint8Array(this.lastLength))), this.buffer.set(a, this.bufferLength), this.bufferLength += a.length, h) { + if (d && (this.bufferLength = 0, this.lastLength > this.buffer.length && (this.buffer = new Uint8Array(this.lastLength))), this.buffer.set(a, this.bufferLength), this.bufferLength += a.length, k) { this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:this.buffer.subarray(0, this.bufferLength), firstChunk:!0, lastChunk:!0}); } } @@ -26153,7 +26163,7 @@ var RtmpJs; }; return a; }(); - c.ChunkedStream = h; + d.ChunkedStream = k; var a = function() { function a() { this.onack = this.onusercontrolmessage = null; @@ -26171,20 +26181,20 @@ var RtmpJs; this.lastAckSent = this.bytesReceived = this.windowAckSize = this.bandwidthLimitType = this.peerAckWindowSize = 0; } a.prototype.push = function(a) { - var c = a.length + this.bufferLength; - if (c > this.buffer.length) { - for (var h = 2 * this.buffer.length;c > h;) { - h *= 2; + var d = a.length + this.bufferLength; + if (d > this.buffer.length) { + for (var k = 2 * this.buffer.length;d > k;) { + k *= 2; } - 524288 < h && this._fail("Buffer overflow"); - h = new Uint8Array(h); - h.set(this.buffer); - this.buffer = h; + 524288 < k && this._fail("Buffer overflow"); + k = new Uint8Array(k); + k.set(this.buffer); + this.buffer = k; } - for (var h = 0, l = this.bufferLength;h < a.length;h++, l++) { - this.buffer[l] = a[h]; + for (var k = 0, l = this.bufferLength;k < a.length;k++, l++) { + this.buffer[l] = a[k]; } - this.bufferLength = c; + this.bufferLength = d; this.bytesReceived += a.length; for (this.peerAckWindowSize && this.bytesReceived - this.lastAckSent >= this.peerAckWindowSize && this._sendAck();0 < this.bufferLength;) { a = 0; @@ -26203,11 +26213,11 @@ var RtmpJs; return; } a = 1536; - c = Date.now() - this.epochStart | 0; - this.buffer[4] = c >>> 24 & 255; - this.buffer[5] = c >>> 16 & 255; - this.buffer[6] = c >>> 8 & 255; - this.buffer[7] = c & 255; + d = Date.now() - this.epochStart | 0; + this.buffer[4] = d >>> 24 & 255; + this.buffer[5] = d >>> 16 & 255; + this.buffer[6] = d >>> 8 & 255; + this.buffer[7] = d & 255; this.ondata(this.buffer.subarray(0, 1536)); this.state = "ack_sent"; break; @@ -26216,8 +26226,8 @@ var RtmpJs; return; } a = 1536; - for (h = 8;1536 > h;h++) { - this.buffer[h] !== this.randomData[h] && this._fail("Random data do not match @" + h); + for (k = 8;1536 > k;k++) { + this.buffer[k] !== this.randomData[k] && this._fail("Random data do not match @" + k); } this.state = "handshake_done"; this.lastAckSent = this.bytesReceived; @@ -26241,14 +26251,14 @@ var RtmpJs; a.setBuffer(); a.onmessage = function(a) { if (0 === a.streamId) { - switch(console.log("Control message: " + a.typeId), a.typeId) { + switch(a.typeId) { case 1: - var c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; - 1 <= c && 2147483647 >= c && (this.peerChunkSize = c); + var d = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; + 1 <= d && 2147483647 >= d && (this.peerChunkSize = d); break; case 2: - c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; - 3 <= c && 65599 >= c && this._getChunkStream(c).abort(); + d = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; + 3 <= d && 65599 >= d && this._getChunkStream(d).abort(); break; case 3: if (this.onack) { @@ -26261,22 +26271,22 @@ var RtmpJs; } break; case 5: - c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; - if (0 > c) { + d = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; + if (0 > d) { break; } - this.peerAckWindowSize = c; + this.peerAckWindowSize = d; break; case 6: - c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; + d = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3]; a = a.data[4]; - if (0 > c || 2 < a) { + if (0 > d || 2 < a) { break; } if (1 === a || 2 === a && 1 === this.bandwidthLimitType) { - c = Math.min(this.windowAckSize, c); + d = Math.min(this.windowAckSize, d); } - c !== this.ackWindowSize && (this.ackWindowSize = c, c = new Uint8Array([c >>> 24 & 255, c >>> 16 & 255, c >>> 8 & 255, c & 255]), this._sendMessage(2, {typeId:5, streamId:0, data:c}), 2 !== a && (this.bandwidthLimitType = a)); + d !== this.ackWindowSize && (this.ackWindowSize = d, d = new Uint8Array([d >>> 24 & 255, d >>> 16 & 255, d >>> 8 & 255, d & 255]), this._sendMessage(2, {typeId:5, streamId:0, data:d}), 2 !== a && (this.bandwidthLimitType = a)); } } }.bind(this); @@ -26291,85 +26301,85 @@ var RtmpJs; this._sendMessage(2, {streamId:0, typeId:1, data:new Uint8Array([a >>> 24 & 255, a >>> 16 & 255, a >>> 8 & 255, a & 255])}); this.chunkSize = a; }; - a.prototype.send = function(a, c) { + a.prototype.send = function(a, d) { if (3 > a || 65599 < a) { throw Error("Invalid chunkStreamId"); } - return this._sendMessage(a, c); + return this._sendMessage(a, d); }; - a.prototype.sendUserControlMessage = function(a, c) { - var h = new Uint8Array(2 + c.length); - h[0] = a >> 8 & 255; - h[1] = a & 255; - h.set(c, 2); - this._sendMessage(2, {typeId:4, streamId:0, data:h}); + a.prototype.sendUserControlMessage = function(a, d) { + var k = new Uint8Array(2 + d.length); + k[0] = a >> 8 & 255; + k[1] = a & 255; + k.set(d, 2); + this._sendMessage(2, {typeId:4, streamId:0, data:k}); }; a.prototype._sendAck = function() { var a = new Uint8Array([this.bytesReceived >>> 24 & 255, this.bytesReceived >>> 16 & 255, this.bytesReceived >>> 8 & 255, this.bytesReceived & 255]); this._sendMessage(2, {typeId:3, streamId:0, data:a}); }; - a.prototype._sendMessage = function(a, c) { - var h = c.data, l = h.length, e = this._getChunkStream(a), m = ("timestamp" in c ? c.timestamp : Date.now() - this.epochStart) | 0, t = m - e.sentTimestamp | 0, q = new Uint8Array(this.chunkSize + 18), n; - 64 > a ? (n = 1, q[0] = a) : 320 > a ? (n = 2, q[0] = 0, q[1] = a - 64) : (n = 3, q[0] = 1, q[1] = a - 64 >> 8 & 255, q[2] = a - 64 & 255); - var k = n, f = 0; - c.streamId !== e.sentStreamId || 0 > t ? (0 !== (m & 4278190080) ? (f = m, q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = m >> 16 & 255, q[k + 1] = m >> 8 & 255, q[k + 2] = m & 255), k += 3, q[k++] = l >> 16 & 255, q[k++] = l >> 8 & 255, q[k++] = l & 255, q[k++] = c.typeId, q[k++] = c.streamId & 255, q[k++] = c.streamId >> 8 & 255, q[k++] = c.streamId >> 16 & 255, q[k++] = c.streamId >> 24 & 255) : l !== e.sentLength || c.typeId !== e.sentTypeId ? (q[0] |= 64, 0 !== (t & 4278190080) ? (f = t, - q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = t >> 16 & 255, q[k + 1] = t >> 8 & 255, q[k + 2] = t & 255), k += 3, q[k++] = l >> 16 & 255, q[k++] = l >> 8 & 255, q[k++] = l & 255, q[k++] = c.typeId) : 0 !== t ? (q[0] |= 128, 0 !== (t & 4278190080) ? (f = t, q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = t >> 16 & 255, q[k + 1] = t >> 8 & 255, q[k + 2] = t & 255), k += 3) : q[0] |= 192; - f && (q[k++] = f >>> 24 & 255, q[k++] = f >>> 16 & 255, q[k++] = f >>> 8 & 255, q[k++] = f & 255); - e.sentTimestamp = m; - e.sentStreamId = c.streamId; - e.sentTypeId = c.typeId; - e.sentLength = l; - for (e = 0;e < l;) { - t = Math.min(l - e, this.chunkSize), q.set(h.subarray(e, e + t), k), e += t, this.ondata(q.subarray(0, k + t)), q[0] |= 192, k = n; + a.prototype._sendMessage = function(a, d) { + var k = d.data, l = k.length, c = this._getChunkStream(a), h = ("timestamp" in d ? d.timestamp : Date.now() - this.epochStart) | 0, p = h - c.sentTimestamp | 0, s = new Uint8Array(this.chunkSize + 18), m; + 64 > a ? (m = 1, s[0] = a) : 320 > a ? (m = 2, s[0] = 0, s[1] = a - 64) : (m = 3, s[0] = 1, s[1] = a - 64 >> 8 & 255, s[2] = a - 64 & 255); + var g = m, f = 0; + d.streamId !== c.sentStreamId || 0 > p ? (0 !== (h & 4278190080) ? (f = h, s[g] = s[g + 1] = s[g + 2] = 255) : (s[g] = h >> 16 & 255, s[g + 1] = h >> 8 & 255, s[g + 2] = h & 255), g += 3, s[g++] = l >> 16 & 255, s[g++] = l >> 8 & 255, s[g++] = l & 255, s[g++] = d.typeId, s[g++] = d.streamId & 255, s[g++] = d.streamId >> 8 & 255, s[g++] = d.streamId >> 16 & 255, s[g++] = d.streamId >> 24 & 255) : l !== c.sentLength || d.typeId !== c.sentTypeId ? (s[0] |= 64, 0 !== (p & 4278190080) ? (f = p, + s[g] = s[g + 1] = s[g + 2] = 255) : (s[g] = p >> 16 & 255, s[g + 1] = p >> 8 & 255, s[g + 2] = p & 255), g += 3, s[g++] = l >> 16 & 255, s[g++] = l >> 8 & 255, s[g++] = l & 255, s[g++] = d.typeId) : 0 !== p ? (s[0] |= 128, 0 !== (p & 4278190080) ? (f = p, s[g] = s[g + 1] = s[g + 2] = 255) : (s[g] = p >> 16 & 255, s[g + 1] = p >> 8 & 255, s[g + 2] = p & 255), g += 3) : s[0] |= 192; + f && (s[g++] = f >>> 24 & 255, s[g++] = f >>> 16 & 255, s[g++] = f >>> 8 & 255, s[g++] = f & 255); + c.sentTimestamp = h; + c.sentStreamId = d.streamId; + c.sentTypeId = d.typeId; + c.sentLength = l; + for (c = 0;c < l;) { + p = Math.min(l - c, this.chunkSize), s.set(k.subarray(c, c + p), g), c += p, this.ondata(s.subarray(0, g + p)), s[0] |= 192, g = m; } - return m; + return h; }; a.prototype._getChunkStream = function(a) { - var c = this.chunkStreams[a]; - c || (this.chunkStreams[a] = c = new h(a), c.setBuffer(), c.onmessage = function(a) { + var d = this.chunkStreams[a]; + d || (this.chunkStreams[a] = d = new k(a), d.setBuffer(), d.onmessage = function(a) { if (this.onmessage) { this.onmessage(a); } }.bind(this)); - return c; + return d; }; a.prototype._parseChunkedData = function() { if (!(1 > this.bufferLength)) { - var a = this.buffer[0] >> 6 & 3, c = 1, h = this.buffer[0] & 63; - if (0 === h) { + var a = this.buffer[0] >> 6 & 3, d = 1, k = this.buffer[0] & 63; + if (0 === k) { if (2 > this.bufferLength) { return; } - h = this.buffer[1] + 64; - c = 2; + k = this.buffer[1] + 64; + d = 2; } else { - if (1 === h) { + if (1 === k) { if (2 > this.bufferLength) { return; } - h = (this.buffer[1] << 8) + this.buffer[2] + 64; - c = 3; + k = (this.buffer[1] << 8) + this.buffer[2] + 64; + d = 3; } } var l = 0 === a ? 11 : 1 === a ? 7 : 2 === a ? 3 : 0; - if (!(this.bufferLength < c + l)) { - var e = 3 !== a && 255 === this.buffer[c] && 255 === this.buffer[c + 1] && 255 === this.buffer[c + 2] ? 4 : 0, m = c + l + e; - if (!(this.bufferLength < m)) { - var t = this._getChunkStream(h), q; - q = 3 === a ? t.lastTimestamp : this.buffer[c] << 16 | this.buffer[c + 1] << 8 | this.buffer[c + 2]; - e && (q = c + l, q = this.buffer[q] << 24 | this.buffer[q + 1] << 16 | this.buffer[q + 2] << 8 | this.buffer[q + 3]); + if (!(this.bufferLength < d + l)) { + var c = 3 !== a && 255 === this.buffer[d] && 255 === this.buffer[d + 1] && 255 === this.buffer[d + 2] ? 4 : 0, h = d + l + c; + if (!(this.bufferLength < h)) { + var k = this._getChunkStream(k), p; + p = 3 === a ? k.lastTimestamp : this.buffer[d] << 16 | this.buffer[d + 1] << 8 | this.buffer[d + 2]; + c && (p = d + l, p = this.buffer[p] << 24 | this.buffer[p + 1] << 16 | this.buffer[p + 2] << 8 | this.buffer[p + 3]); if (1 === a || 2 === a) { - q = t.lastTimestamp + q | 0; + p = k.lastTimestamp + p | 0; } - var l = t.lastLength, e = t.lastTypeId, n = t.lastStreamId; + var l = k.lastLength, c = k.lastTypeId, s = k.lastStreamId; if (0 === a || 1 === a) { - l = this.buffer[c + 3] << 16 | this.buffer[c + 4] << 8 | this.buffer[c + 5], e = this.buffer[c + 6]; + l = this.buffer[d + 3] << 16 | this.buffer[d + 4] << 8 | this.buffer[d + 5], c = this.buffer[d + 6]; } - 0 === a && (n = this.buffer[c + 10] << 24 | this.buffer[c + 9] << 16 | this.buffer[c + 8] << 8 | this.buffer[c + 7]); - var k; - 3 === a && t.waitingForBytes ? (k = !1, a = Math.min(t.waitingForBytes, this.peerChunkSize), c = t.waitingForBytes - a) : (k = !0, a = Math.min(l, this.peerChunkSize), c = l - a); - if (!(this.bufferLength < m + a)) { - return!k && c || console.log("Chunk received: cs:" + h + "; f/l:" + k + "/" + !c + "; len:" + l), t.lastTimestamp = q, t.lastLength = l, t.lastTypeId = e, t.lastStreamId = n, t.lastMessageComplete = !c, t.waitingForBytes = c, t._push(this.buffer.subarray(m, m + a), k, !c), m + a; + 0 === a && (s = this.buffer[d + 10] << 24 | this.buffer[d + 9] << 16 | this.buffer[d + 8] << 8 | this.buffer[d + 7]); + var m; + 3 === a && k.waitingForBytes ? (m = !1, a = Math.min(k.waitingForBytes, this.peerChunkSize), d = k.waitingForBytes - a) : (m = !0, a = Math.min(l, this.peerChunkSize), d = l - a); + if (!(this.bufferLength < h + a)) { + return k.lastTimestamp = p, k.lastLength = l, k.lastTypeId = c, k.lastStreamId = s, k.lastMessageComplete = !d, k.waitingForBytes = d, k._push(this.buffer.subarray(h, h + a), m, !d), h + a; } } } @@ -26401,113 +26411,110 @@ var RtmpJs; }; return a; }(); - c.ChunkedChannel = a; + d.ChunkedChannel = a; })(RtmpJs || (RtmpJs = {})); -(function(c) { - var h = Shumway.AVM2.AS.flash, a = function() { +(function(d) { + var k = Shumway.AVM2.AS.flash, a = function() { function a() { this._streams = []; } - a.prototype.connect = function(a, c) { + a.prototype.connect = function(a, d) { throw Error("Abstract BaseTransport.connect method"); }; - a.prototype._initChannel = function(a, v) { - var l = new c.ChunkedChannel, e = this; + a.prototype._initChannel = function(a, t) { + var l = new d.ChunkedChannel, c = this; l.oncreated = function() { - var e = new h.utils.ByteArray; - e.objectEncoding = 0; - e.writeObject("connect"); - e.writeObject(1); - e.writeObject(a); - e.writeObject(v || null); - console.log(".. Connect sent"); - l.send(3, {streamId:0, typeId:20, data:new Uint8Array(e._buffer, 0, e.length)}); + var c = new k.utils.ByteArray; + c.objectEncoding = 0; + c.writeObject("connect"); + c.writeObject(1); + c.writeObject(a); + c.writeObject(t || null); + l.send(3, {streamId:0, typeId:20, data:new Uint8Array(c._buffer, 0, c.length)}); }; l.onmessage = function(a) { - console.log(".. Data received: typeId:" + a.typeId + ", streamId:" + a.streamId + ", cs: " + a.chunkedStreamId); if (0 !== a.streamId) { - e._streams[a.streamId]._push(a); + c._streams[a.streamId]._push(a); } else { if (20 === a.typeId || 17 === a.typeId) { - var c = new h.utils.ByteArray; - c.writeRawBytes(a.data); - c.position = 0; - c.objectEncoding = 20 === a.typeId ? 0 : 3; - a = c.readObject(); - void 0 === a && (c.objectEncoding = 0, a = c.readObject()); - var l = c.readObject(); + var d = new k.utils.ByteArray; + d.writeRawBytes(a.data); + d.position = 0; + d.objectEncoding = 20 === a.typeId ? 0 : 3; + a = d.readObject(); + void 0 === a && (d.objectEncoding = 0, a = d.readObject()); + var l = d.readObject(); if ("_result" === a || "_error" === a) { if (a = "_error" === a, 1 === l) { - if (l = c.readObject(), c = c.readObject(), e.onconnected) { - e.onconnected({properties:l, information:c, isError:a}); + if (l = d.readObject(), d = d.readObject(), c.onconnected) { + c.onconnected({properties:l, information:d, isError:a}); } } else { - var n = c.readObject(), c = c.readObject(); - if (e.onstreamcreated) { - var k = new s(e, c); - e._streams[c] = k; - e.onstreamcreated({transactionId:l, commandObject:n, streamId:c, stream:k, isError:a}); + var m = d.readObject(), d = d.readObject(); + if (c.onstreamcreated) { + var g = new r(c, d); + c._streams[d] = g; + c.onstreamcreated({transactionId:l, commandObject:m, streamId:d, stream:g, isError:a}); } } } else { - "onBWCheck" === a || "onBWDone" === a ? e.sendCommandOrResponse("_error", l, null, {code:"NetConnection.Call.Failed", level:"error"}) : (c.readObject(), c.position < c.length && c.readObject()); + "onBWCheck" === a || "onBWDone" === a ? c.sendCommandOrResponse("_error", l, null, {code:"NetConnection.Call.Failed", level:"error"}) : (d.readObject(), d.position < d.length && d.readObject()); } } } }; l.onusercontrolmessage = function(a) { - console.log(".. Event " + a.type + " +" + a.data.length + " bytes"); 6 === a.type && l.sendUserControlMessage(7, a.data); }; return this.channel = l; }; - a.prototype.call = function(a, c, l, e) { - var m = this.channel, t = new h.utils.ByteArray; - t.objectEncoding = 0; - t.writeObject(a); - t.writeObject(c); - t.writeObject(l); - t.writeObject(e); - m.send(3, {streamId:0, typeId:20, data:new Uint8Array(t._buffer, 0, t.length)}); + a.prototype.call = function(a, d, l, c) { + var h = this.channel, p = new k.utils.ByteArray; + p.objectEncoding = 0; + p.writeObject(a); + p.writeObject(d); + p.writeObject(l); + p.writeObject(c); + h.send(3, {streamId:0, typeId:20, data:new Uint8Array(p._buffer, 0, p.length)}); }; a.prototype.createStream = function(a) { this.sendCommandOrResponse("createStream", a, null); }; - a.prototype.sendCommandOrResponse = function(a, c, l, e) { - var m = this.channel, t = new h.utils.ByteArray; - t.writeByte(0); - t.objectEncoding = 0; - t.writeObject(a); - t.writeObject(c); - t.writeObject(l || null); - 3 < arguments.length && t.writeObject(e); - m.send(3, {streamId:0, typeId:17, data:new Uint8Array(t._buffer, 0, t.length)}); + a.prototype.sendCommandOrResponse = function(a, d, l, c) { + var h = this.channel, p = new k.utils.ByteArray; + p.writeByte(0); + p.objectEncoding = 0; + p.writeObject(a); + p.writeObject(d); + p.writeObject(l || null); + 3 < arguments.length && p.writeObject(c); + h.send(3, {streamId:0, typeId:17, data:new Uint8Array(p._buffer, 0, p.length)}); }; a.prototype._setBuffer = function(a) { this.channel.sendUserControlMessage(3, new Uint8Array([a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255, 0, 0, 0, 100])); }; - a.prototype._sendCommand = function(a, c) { - this.channel.send(8, {streamId:a, typeId:20, data:c}); + a.prototype._sendCommand = function(a, d) { + this.channel.send(8, {streamId:a, typeId:20, data:d}); }; return a; }(); - c.BaseTransport = a; - var s = function() { - function a(c, h) { - this.transport = c; - this.streamId = h; + d.BaseTransport = a; + var r = function() { + function a(d, k) { + this.transport = d; + this.streamId = k; } - a.prototype.play = function(a, c, l, e) { - var m = new h.utils.ByteArray; - m.objectEncoding = 0; - m.writeObject("play"); - m.writeObject(0); - m.writeObject(null); - m.writeObject(a); - 1 < arguments.length && m.writeObject(c); - 2 < arguments.length && m.writeObject(l); - 3 < arguments.length && m.writeObject(e); - this.transport._sendCommand(this.streamId, new Uint8Array(m._buffer, 0, m.length)); + a.prototype.play = function(a, d, l, c) { + var h = new k.utils.ByteArray; + h.objectEncoding = 0; + h.writeObject("play"); + h.writeObject(0); + h.writeObject(null); + h.writeObject(a); + 1 < arguments.length && h.writeObject(d); + 2 < arguments.length && h.writeObject(l); + 3 < arguments.length && h.writeObject(c); + this.transport._sendCommand(this.streamId, new Uint8Array(h._buffer, 0, h.length)); this.transport._setBuffer(this.streamId); }; a.prototype._push = function(a) { @@ -26522,135 +26529,128 @@ var RtmpJs; case 18: ; case 20: - var c = [], l = new h.utils.ByteArray; + var d = [], l = new k.utils.ByteArray; l.writeRawBytes(a.data); l.position = 0; for (l.objectEncoding = 0;l.position < l.length;) { - c.push(l.readObject()); + d.push(l.readObject()); } - 18 === a.typeId && this.onscriptdata && this.onscriptdata.apply(this, c); - 20 === a.typeId && this.oncallback && this.oncallback.apply(this, c); + 18 === a.typeId && this.onscriptdata && this.onscriptdata.apply(this, d); + 20 === a.typeId && this.oncallback && this.oncallback.apply(this, d); } }; return a; }(); - c.parseConnectionString = function(a) { - var c = a.indexOf(":"); - if (0 > c || "/" !== a[c + 1]) { + d.parseConnectionString = function(a) { + var d = a.indexOf(":"); + if (0 > d || "/" !== a[d + 1]) { return null; } - var h = a.substring(0, c).toLocaleLowerCase(); - if ("rtmp" !== h && "rtmpt" !== h && "rtmps" !== h && "rtmpe" !== h && "rtmpte" !== h && "rtmfp" !== h) { + var k = a.substring(0, d).toLocaleLowerCase(); + if ("rtmp" !== k && "rtmpt" !== k && "rtmps" !== k && "rtmpe" !== k && "rtmpte" !== k && "rtmfp" !== k) { return null; } - var l, e, m = c + 1; - if ("/" === a[c + 2]) { - m = a.indexOf("/", c + 3); - if (0 > m) { + var l, c, h = d + 1; + if ("/" === a[d + 2]) { + h = a.indexOf("/", d + 3); + if (0 > h) { return; } - var t = a.indexOf(":", c + 1); - 0 <= t && t < m ? (l = a.substring(c + 3, t), e = +a.substring(t + 1, m)) : l = a.substring(c + 3, m); + var p = a.indexOf(":", d + 1); + 0 <= p && p < h ? (l = a.substring(d + 3, p), c = +a.substring(p + 1, h)) : l = a.substring(d + 3, h); } - return{protocol:h, host:l, port:e, app:a.substring(m)}; + return{protocol:k, host:l, port:c, app:a.substring(h + 1)}; }; })(RtmpJs || (RtmpJs = {})); -(function(c) { - (function(h) { - function a(a, c, e) { - c || (c = p); - var m = window.createRtmpXHR, h = m ? m() : new XMLHttpRequest({mozSystem:!0}); - h.open("POST", a, !0); - h.responseType = "arraybuffer"; - h.setRequestHeader("Content-Type", "application/x-fcs"); - h.onload = function(a) { - e(new Uint8Array(h.response), h.status); +(function(d) { + (function(k) { + function a(a, d, c) { + d || (d = u); + var h = window.createRtmpXHR, p = h ? h() : new XMLHttpRequest({mozSystem:!0}); + p.open("POST", a, !0); + p.responseType = "arraybuffer"; + p.setRequestHeader("Content-Type", "application/x-fcs"); + p.onload = function(a) { + c(new Uint8Array(p.response), p.status); }; - h.onerror = function(a) { + p.onerror = function(a) { console.log("error"); throw Error("HTTP error"); }; - h.send(c); + p.send(d); } - var s = navigator.mozTCPSocket, v = function(a) { - function c(e) { + var r = navigator.mozTCPSocket, v = function(a) { + function d(c) { a.call(this); - "string" === typeof e && (e = {host:e}); - this.host = e.host || "localhost"; - this.port = e.port || 1935; - this.ssl = !!e.ssl || !1; + "string" === typeof c && (c = {host:c}); + this.host = c.host || "localhost"; + this.port = c.port || 1935; + this.ssl = !!c.ssl || !1; } - __extends(c, a); - c.prototype.connect = function(a, c) { - function l(b) { - return d.send(b.buffer, b.byteOffset, b.byteLength); + __extends(d, a); + d.prototype.connect = function(a, d) { + function l(a) { + return b.send(a.buffer, a.byteOffset, a.byteLength); } - if (!s) { + if (!r) { throw Error("Your browser does not support socket communication.\nCurrenly only Firefox with enabled mozTCPSocket is allowed (see README.md)."); } - var q = this._initChannel(a, c), n = [], k = !1, f = window.createRtmpSocket, d = f ? f({host:this.host, port:this.port, ssl:this.ssl}) : s.open(this.host, this.port, {useSecureTransport:this.ssl, binaryType:"arraybuffer"}); - d.onopen = function(b) { - q.ondata = function(b) { + var s = this._initChannel(a, d), m = [], g = !1, f = window.createRtmpSocket, b = f ? f({host:this.host, port:this.port, ssl:this.ssl}) : r.open(this.host, this.port, {useSecureTransport:this.ssl, binaryType:"arraybuffer"}); + b.onopen = function(a) { + s.ondata = function(b) { b = new Uint8Array(b); - n.push(b); - 1 < n.length || (console.log("Bytes written: " + b.length), l(b) && n.shift()); + m.push(b); + 1 < m.length || l(b) && m.shift(); }; - q.onclose = function() { - d.close(); + s.onclose = function() { + b.close(); }; - q.start(); + s.start(); }; - d.ondrain = function(b) { - n.shift(); - for (console.log("Write completed");0 < n.length;) { - console.log("Bytes written: " + n[0].length); - if (!l(n[0])) { - break; - } - n.shift(); + b.ondrain = function(b) { + for (m.shift();0 < m.length && l(m[0]);) { + m.shift(); } }; - d.onclose = function(b) { - q.stop(k); + b.onclose = function(b) { + s.stop(g); }; - d.onerror = function(b) { - k = !0; + b.onerror = function(b) { + g = !0; console.error("socket error: " + b.data); }; - d.ondata = function(b) { - console.log("Bytes read: " + b.data.byteLength); - q.push(new Uint8Array(b.data)); + b.ondata = function(b) { + s.push(new Uint8Array(b.data)); }; }; - return c; - }(c.BaseTransport); - h.RtmpTransport = v; - v = function(c) { + return d; + }(d.BaseTransport); + k.RtmpTransport = v; + v = function(d) { function l(a) { - c.call(this); - var m = (a.ssl ? "https" : "http") + "://" + (a.host || "localhost"); - a.port && (m += ":" + a.port); - this.baseUrl = m; + d.call(this); + var h = (a.ssl ? "https" : "http") + "://" + (a.host || "localhost"); + a.port && (h += ":" + a.port); + this.baseUrl = h; this.stopped = !1; this.sessionId = null; this.requestId = 0; this.data = []; } - __extends(l, c); - l.prototype.connect = function(e, c) { - var l = this._initChannel(e, c); + __extends(l, d); + l.prototype.connect = function(c, d) { + var l = this._initChannel(c, d); l.ondata = function(a) { - console.log("Bytes written: " + a.length); this.data.push(new Uint8Array(a)); }.bind(this); l.onclose = function() { this.stopped = !0; }.bind(this); - a(this.baseUrl + "/fcs/ident2", null, function(e, c) { - if (404 !== c) { - throw Error("Unexpected response: " + c); + a(this.baseUrl + "/fcs/ident2", null, function(c, d) { + if (404 !== d) { + throw Error("Unexpected response: " + d); } - a(this.baseUrl + "/open/1", null, function(a, e) { + a(this.baseUrl + "/open/1", null, function(a, f) { this.sessionId = String.fromCharCode.apply(null, a).slice(0, -1); console.log("session id: " + this.sessionId); this.tick(); @@ -26659,8 +26659,8 @@ var RtmpJs; }.bind(this)); }; l.prototype.tick = function() { - var e = function(a, e) { - if (200 !== e) { + var c = function(a, c) { + if (200 !== c) { throw Error("Invalid HTTP status"); } var f = a[0]; @@ -26672,51 +26672,51 @@ var RtmpJs; }); } else { if (0 < this.data.length) { - var c, l = 0; + var d, l = 0; this.data.forEach(function(a) { l += a.length; }); - var h = 0; - c = new Uint8Array(l); + var s = 0; + d = new Uint8Array(l); this.data.forEach(function(a) { - c.set(a, h); - h += a.length; + d.set(a, s); + s += a.length; }); this.data.length = 0; - a(this.baseUrl + "/send/" + this.sessionId + "/" + this.requestId++, c, e); + a(this.baseUrl + "/send/" + this.sessionId + "/" + this.requestId++, d, c); } else { - a(this.baseUrl + "/idle/" + this.sessionId + "/" + this.requestId++, null, e); + a(this.baseUrl + "/idle/" + this.sessionId + "/" + this.requestId++, null, c); } } }; return l; - }(c.BaseTransport); - h.RtmptTransport = v; - var p = new Uint8Array([0]); - })(c.Browser || (c.Browser = {})); + }(d.BaseTransport); + k.RtmptTransport = v; + var u = new Uint8Array([0]); + })(d.Browser || (d.Browser = {})); })(RtmpJs || (RtmpJs = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - function c(a) { - for (var e = [], d = 1;d < arguments.length;d++) { - e[d - 1] = arguments[d]; + function d(a) { + for (var f = [], b = 1;b < arguments.length;b++) { + f[b - 1] = arguments[b]; } - return Array.prototype.concat.apply(a, e); + return Array.prototype.concat.apply(a, f); } - function h(a, e, d) { - a[e] = d >> 24 & 255; - a[e + 1] = d >> 16 & 255; - a[e + 2] = d >> 8 & 255; - a[e + 3] = d & 255; + function k(a, f, b) { + a[f] = b >> 24 & 255; + a[f + 1] = b >> 16 & 255; + a[f + 2] = b >> 8 & 255; + a[f + 3] = b & 255; } - function p(a) { + function u(a) { return a.charCodeAt(0) << 24 | a.charCodeAt(1) << 16 | a.charCodeAt(2) << 8 | a.charCodeAt(3); } - var u = Shumway.StringUtilities.utf8decode, l = [1, 0, 0, 0, 1, 0, 0, 0, 1], e = [0, 0, 0], m = function() { - function a(e, d) { - this.boxtype = e; - "uuid" === e && (this.userType = d); + var t = Shumway.StringUtilities.utf8decode, l = [1, 0, 0, 0, 1, 0, 0, 0, 1], c = [0, 0, 0], h = function() { + function a(f, b) { + this.boxtype = f; + "uuid" === f && (this.userType = b); } a.prototype.layout = function(a) { this.offset = a; @@ -26725,8 +26725,8 @@ var RtmpJs; return this.size = a; }; a.prototype.write = function(a) { - h(a, this.offset, this.size); - h(a, this.offset + 4, p(this.boxtype)); + k(a, this.offset, this.size); + k(a, this.offset + 4, u(this.boxtype)); if (!this.userType) { return 8; } @@ -26740,497 +26740,497 @@ var RtmpJs; }; return a; }(); - a.Box = m; - var t = function(a) { - function e(d, b, g) { - void 0 === b && (b = 0); - void 0 === g && (g = 0); - a.call(this, d); - this.version = b; - this.flags = g; + a.Box = h; + var p = function(a) { + function f(b, e, f) { + void 0 === e && (e = 0); + void 0 === f && (f = 0); + a.call(this, b); + this.version = e; + this.flags = f; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 4; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 4; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.version << 24 | this.flags); - return b + 4; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.version << 24 | this.flags); + return e + 4; }; - return e; - }(m); - a.FullBox = t; - var q = function(a) { - function e(d, b, g) { + return f; + }(h); + a.FullBox = p; + var s = function(a) { + function f(b, e, f) { a.call(this, "ftype"); - this.majorBrand = d; - this.minorVersion = b; - this.compatibleBrands = g; + this.majorBrand = b; + this.minorVersion = e; + this.compatibleBrands = f; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 4 * (2 + this.compatibleBrands.length); + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 4 * (2 + this.compatibleBrands.length); }; - e.prototype.write = function(d) { - var b = this, e = a.prototype.write.call(this, d); - h(d, this.offset + e, p(this.majorBrand)); - h(d, this.offset + e + 4, this.minorVersion); - e += 8; + f.prototype.write = function(b) { + var e = this, f = a.prototype.write.call(this, b); + k(b, this.offset + f, u(this.majorBrand)); + k(b, this.offset + f + 4, this.minorVersion); + f += 8; this.compatibleBrands.forEach(function(a) { - h(d, b.offset + e, p(a)); - e += 4; + k(b, e.offset + f, u(a)); + f += 4; }, this); + return f; + }; + return f; + }(h); + a.FileTypeBox = s; + s = function(a) { + function f(b, e) { + a.call(this, b); + this.children = e; + } + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b); + this.children.forEach(function(a) { + a && (e += a.layout(b + e)); + }); + return this.size = e; + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + this.children.forEach(function(a) { + a && (e += a.write(b)); + }); return e; }; - return e; - }(m); - a.FileTypeBox = q; - q = function(a) { - function e(d, b) { - a.call(this, d); - this.children = b; + return f; + }(h); + a.BoxContainerBox = s; + var m = function(a) { + function f(b, e, f, c) { + a.call(this, "moov", d([b], e, [f, c])); + this.header = b; + this.tracks = e; + this.extendsBox = f; + this.userData = c; } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d); - this.children.forEach(function(a) { - a && (b += a.layout(d + b)); - }); - return this.size = b; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - this.children.forEach(function(a) { - a && (b += a.write(d)); - }); - return b; - }; - return e; - }(m); - a.BoxContainerBox = q; - var n = function(a) { - function e(d, b, g, f) { - a.call(this, "moov", c([d], b, [g, f])); - this.header = d; - this.tracks = b; - this.extendsBox = g; - this.userData = f; - } - __extends(e, a); - return e; - }(q); - a.MovieBox = n; - n = function(a) { - function e(d, b, g, f, c, m, n, h) { - void 0 === f && (f = 1); + __extends(f, a); + return f; + }(s); + a.MovieBox = m; + m = function(a) { + function f(b, e, f, c, d, h, m, p) { void 0 === c && (c = 1); - void 0 === m && (m = l); - void 0 === n && (n = -20828448E5); - void 0 === h && (h = -20828448E5); + void 0 === d && (d = 1); + void 0 === h && (h = l); + void 0 === m && (m = -20828448E5); + void 0 === p && (p = -20828448E5); a.call(this, "mvhd", 0, 0); - this.timescale = d; - this.duration = b; - this.nextTrackId = g; - this.rate = f; - this.volume = c; - this.matrix = m; - this.creationTime = n; - this.modificationTime = h; + this.timescale = b; + this.duration = e; + this.nextTrackId = f; + this.rate = c; + this.volume = d; + this.matrix = h; + this.creationTime = m; + this.modificationTime = p; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 16 + 4 + 2 + 2 + 8 + 36 + 24 + 4; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 16 + 4 + 2 + 2 + 8 + 36 + 24 + 4; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 8, this.timescale); - h(d, this.offset + b + 12, this.duration); - b += 16; - h(d, this.offset + b, 65536 * this.rate | 0); - h(d, this.offset + b + 4, (256 * this.volume | 0) << 16); - h(d, this.offset + b + 8, 0); - h(d, this.offset + b + 12, 0); - b += 16; - h(d, this.offset + b, 65536 * this.matrix[0] | 0); - h(d, this.offset + b + 4, 65536 * this.matrix[1] | 0); - h(d, this.offset + b + 8, 65536 * this.matrix[2] | 0); - h(d, this.offset + b + 12, 65536 * this.matrix[3] | 0); - h(d, this.offset + b + 16, 65536 * this.matrix[4] | 0); - h(d, this.offset + b + 20, 65536 * this.matrix[5] | 0); - h(d, this.offset + b + 24, 1073741824 * this.matrix[6] | 0); - h(d, this.offset + b + 28, 1073741824 * this.matrix[7] | 0); - h(d, this.offset + b + 32, 1073741824 * this.matrix[8] | 0); - b += 36; - h(d, this.offset + b, 0); - h(d, this.offset + b + 4, 0); - h(d, this.offset + b + 8, 0); - h(d, this.offset + b + 12, 0); - h(d, this.offset + b + 16, 0); - h(d, this.offset + b + 20, 0); - b += 24; - h(d, this.offset + b, this.nextTrackId); - return b + 4; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, (this.creationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 8, this.timescale); + k(b, this.offset + e + 12, this.duration); + e += 16; + k(b, this.offset + e, 65536 * this.rate | 0); + k(b, this.offset + e + 4, (256 * this.volume | 0) << 16); + k(b, this.offset + e + 8, 0); + k(b, this.offset + e + 12, 0); + e += 16; + k(b, this.offset + e, 65536 * this.matrix[0] | 0); + k(b, this.offset + e + 4, 65536 * this.matrix[1] | 0); + k(b, this.offset + e + 8, 65536 * this.matrix[2] | 0); + k(b, this.offset + e + 12, 65536 * this.matrix[3] | 0); + k(b, this.offset + e + 16, 65536 * this.matrix[4] | 0); + k(b, this.offset + e + 20, 65536 * this.matrix[5] | 0); + k(b, this.offset + e + 24, 1073741824 * this.matrix[6] | 0); + k(b, this.offset + e + 28, 1073741824 * this.matrix[7] | 0); + k(b, this.offset + e + 32, 1073741824 * this.matrix[8] | 0); + e += 36; + k(b, this.offset + e, 0); + k(b, this.offset + e + 4, 0); + k(b, this.offset + e + 8, 0); + k(b, this.offset + e + 12, 0); + k(b, this.offset + e + 16, 0); + k(b, this.offset + e + 20, 0); + e += 24; + k(b, this.offset + e, this.nextTrackId); + return e + 4; }; - return e; - }(t); - a.MovieHeaderBox = n; + return f; + }(p); + a.MovieHeaderBox = m; (function(a) { a[a.TRACK_ENABLED = 1] = "TRACK_ENABLED"; a[a.TRACK_IN_MOVIE = 2] = "TRACK_IN_MOVIE"; a[a.TRACK_IN_PREVIEW = 4] = "TRACK_IN_PREVIEW"; })(a.TrackHeaderFlags || (a.TrackHeaderFlags = {})); - n = function(a) { - function e(d, b, g, f, c, m, n, h, q, t, s) { - void 0 === n && (n = 0); - void 0 === h && (h = 0); - void 0 === q && (q = l); - void 0 === t && (t = -20828448E5); - void 0 === s && (s = -20828448E5); - a.call(this, "tkhd", 0, d); - this.trackId = b; - this.duration = g; - this.width = f; - this.height = c; - this.volume = m; - this.alternateGroup = n; - this.layer = h; - this.matrix = q; - this.creationTime = t; - this.modificationTime = s; - } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 20 + 8 + 6 + 2 + 36 + 8; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 8, this.trackId); - h(d, this.offset + b + 12, 0); - h(d, this.offset + b + 16, this.duration); - b += 20; - h(d, this.offset + b, 0); - h(d, this.offset + b + 4, 0); - h(d, this.offset + b + 8, this.layer << 16 | this.alternateGroup); - h(d, this.offset + b + 12, (256 * this.volume | 0) << 16); - b += 16; - h(d, this.offset + b, 65536 * this.matrix[0] | 0); - h(d, this.offset + b + 4, 65536 * this.matrix[1] | 0); - h(d, this.offset + b + 8, 65536 * this.matrix[2] | 0); - h(d, this.offset + b + 12, 65536 * this.matrix[3] | 0); - h(d, this.offset + b + 16, 65536 * this.matrix[4] | 0); - h(d, this.offset + b + 20, 65536 * this.matrix[5] | 0); - h(d, this.offset + b + 24, 1073741824 * this.matrix[6] | 0); - h(d, this.offset + b + 28, 1073741824 * this.matrix[7] | 0); - h(d, this.offset + b + 32, 1073741824 * this.matrix[8] | 0); - b += 36; - h(d, this.offset + b, 65536 * this.width | 0); - h(d, this.offset + b + 4, 65536 * this.height | 0); - return b + 8; - }; - return e; - }(t); - a.TrackHeaderBox = n; - n = function(a) { - function e(d, b, g, f, c) { - void 0 === g && (g = "unk"); - void 0 === f && (f = -20828448E5); - void 0 === c && (c = -20828448E5); - a.call(this, "mdhd", 0, 0); - this.timescale = d; - this.duration = b; - this.language = g; - this.creationTime = f; - this.modificationTime = c; - } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 16 + 4; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); - h(d, this.offset + b + 8, this.timescale); - h(d, this.offset + b + 12, this.duration); - var e = this.language; - h(d, this.offset + b + 16, ((e.charCodeAt(0) & 31) << 10 | (e.charCodeAt(1) & 31) << 5 | e.charCodeAt(2) & 31) << 16); - return b + 20; - }; - return e; - }(t); - a.MediaHeaderBox = n; - n = function(a) { - function e(d, b) { - a.call(this, "hdlr", 0, 0); - this.handlerType = d; - this.name = b; - this._encodedName = u(this.name); - } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 8 + 12 + (this._encodedName.length + 1); - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, 0); - h(d, this.offset + b + 4, p(this.handlerType)); - h(d, this.offset + b + 8, 0); - h(d, this.offset + b + 12, 0); - h(d, this.offset + b + 16, 0); - b += 20; - d.set(this._encodedName, this.offset + b); - d[this.offset + b + this._encodedName.length] = 0; - return b += this._encodedName.length + 1; - }; - return e; - }(t); - a.HandlerBox = n; - n = function(a) { - function e(d) { - void 0 === d && (d = 0); - a.call(this, "smhd", 0, 0); - this.balance = d; - } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 4; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, (256 * this.balance | 0) << 16); - return b + 4; - }; - return e; - }(t); - a.SoundMediaHeaderBox = n; - n = function(a) { - function f(d, b) { - void 0 === d && (d = 0); - void 0 === b && (b = e); - a.call(this, "vmhd", 0, 0); - this.graphicsMode = d; - this.opColor = b; + m = function(a) { + function f(b, e, f, c, d, h, m, p, s, k, r) { + void 0 === m && (m = 0); + void 0 === p && (p = 0); + void 0 === s && (s = l); + void 0 === k && (k = -20828448E5); + void 0 === r && (r = -20828448E5); + a.call(this, "tkhd", 0, b); + this.trackId = e; + this.duration = f; + this.width = c; + this.height = d; + this.volume = h; + this.alternateGroup = m; + this.layer = p; + this.matrix = s; + this.creationTime = k; + this.modificationTime = r; } __extends(f, a); - f.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 8; + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 20 + 8 + 6 + 2 + 36 + 8; }; - f.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.graphicsMode << 16 | this.opColor[0]); - h(d, this.offset + b + 4, this.opColor[1] << 16 | this.opColor[2]); - return b + 8; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, (this.creationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 8, this.trackId); + k(b, this.offset + e + 12, 0); + k(b, this.offset + e + 16, this.duration); + e += 20; + k(b, this.offset + e, 0); + k(b, this.offset + e + 4, 0); + k(b, this.offset + e + 8, this.layer << 16 | this.alternateGroup); + k(b, this.offset + e + 12, (256 * this.volume | 0) << 16); + e += 16; + k(b, this.offset + e, 65536 * this.matrix[0] | 0); + k(b, this.offset + e + 4, 65536 * this.matrix[1] | 0); + k(b, this.offset + e + 8, 65536 * this.matrix[2] | 0); + k(b, this.offset + e + 12, 65536 * this.matrix[3] | 0); + k(b, this.offset + e + 16, 65536 * this.matrix[4] | 0); + k(b, this.offset + e + 20, 65536 * this.matrix[5] | 0); + k(b, this.offset + e + 24, 1073741824 * this.matrix[6] | 0); + k(b, this.offset + e + 28, 1073741824 * this.matrix[7] | 0); + k(b, this.offset + e + 32, 1073741824 * this.matrix[8] | 0); + e += 36; + k(b, this.offset + e, 65536 * this.width | 0); + k(b, this.offset + e + 4, 65536 * this.height | 0); + return e + 8; }; return f; - }(t); - a.VideoMediaHeaderBox = n; + }(p); + a.TrackHeaderBox = m; + m = function(a) { + function f(b, e, f, c, d) { + void 0 === f && (f = "unk"); + void 0 === c && (c = -20828448E5); + void 0 === d && (d = -20828448E5); + a.call(this, "mdhd", 0, 0); + this.timescale = b; + this.duration = e; + this.language = f; + this.creationTime = c; + this.modificationTime = d; + } + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 16 + 4; + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, (this.creationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 4, (this.modificationTime - -20828448E5) / 1E3 | 0); + k(b, this.offset + e + 8, this.timescale); + k(b, this.offset + e + 12, this.duration); + var f = this.language; + k(b, this.offset + e + 16, ((f.charCodeAt(0) & 31) << 10 | (f.charCodeAt(1) & 31) << 5 | f.charCodeAt(2) & 31) << 16); + return e + 20; + }; + return f; + }(p); + a.MediaHeaderBox = m; + m = function(a) { + function f(b, e) { + a.call(this, "hdlr", 0, 0); + this.handlerType = b; + this.name = e; + this._encodedName = t(this.name); + } + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 8 + 12 + (this._encodedName.length + 1); + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, 0); + k(b, this.offset + e + 4, u(this.handlerType)); + k(b, this.offset + e + 8, 0); + k(b, this.offset + e + 12, 0); + k(b, this.offset + e + 16, 0); + e += 20; + b.set(this._encodedName, this.offset + e); + b[this.offset + e + this._encodedName.length] = 0; + return e += this._encodedName.length + 1; + }; + return f; + }(p); + a.HandlerBox = m; + m = function(a) { + function f(b) { + void 0 === b && (b = 0); + a.call(this, "smhd", 0, 0); + this.balance = b; + } + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 4; + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, (256 * this.balance | 0) << 16); + return e + 4; + }; + return f; + }(p); + a.SoundMediaHeaderBox = m; + m = function(a) { + function f(b, e) { + void 0 === b && (b = 0); + void 0 === e && (e = c); + a.call(this, "vmhd", 0, 0); + this.graphicsMode = b; + this.opColor = e; + } + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 8; + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.graphicsMode << 16 | this.opColor[0]); + k(b, this.offset + e + 4, this.opColor[1] << 16 | this.opColor[2]); + return e + 8; + }; + return f; + }(p); + a.VideoMediaHeaderBox = m; a.SELF_CONTAINED_DATA_REFERENCE_FLAG = 1; - n = function(e) { - function f(d, b) { - void 0 === b && (b = null); - e.call(this, "url ", 0, d); - this.location = b; - d & a.SELF_CONTAINED_DATA_REFERENCE_FLAG || (this._encodedLocation = u(b)); + m = function(c) { + function f(b, e) { + void 0 === e && (e = null); + c.call(this, "url ", 0, b); + this.location = e; + b & a.SELF_CONTAINED_DATA_REFERENCE_FLAG || (this._encodedLocation = t(e)); } - __extends(f, e); - f.prototype.layout = function(a) { - a = e.prototype.layout.call(this, a); - this._encodedLocation && (a += this._encodedLocation.length + 1); - return this.size = a; + __extends(f, c); + f.prototype.layout = function(b) { + b = c.prototype.layout.call(this, b); + this._encodedLocation && (b += this._encodedLocation.length + 1); + return this.size = b; }; - f.prototype.write = function(a) { - var b = e.prototype.write.call(this, a); - this._encodedLocation && (a.set(this._encodedLocation, this.offset + b), a[this.offset + b + this._encodedLocation.length] = 0, b += this._encodedLocation.length); - return b; + f.prototype.write = function(b) { + var a = c.prototype.write.call(this, b); + this._encodedLocation && (b.set(this._encodedLocation, this.offset + a), b[this.offset + a + this._encodedLocation.length] = 0, a += this._encodedLocation.length); + return a; }; return f; - }(t); - a.DataEntryUrlBox = n; - n = function(a) { - function e(d) { + }(p); + a.DataEntryUrlBox = m; + m = function(a) { + function f(b) { a.call(this, "dref", 0, 0); - this.entries = d; + this.entries = b; } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d) + 4; + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b) + 4; this.entries.forEach(function(a) { - b += a.layout(d + b); + e += a.layout(b + e); }); - return this.size = b; + return this.size = e; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.entries.length); + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.entries.length); this.entries.forEach(function(a) { - b += a.write(d); + e += a.write(b); }); - return b; + return e; }; - return e; - }(t); - a.DataReferenceBox = n; - n = function(a) { - function e(d) { - a.call(this, "dinf", [d]); - this.dataReference = d; + return f; + }(p); + a.DataReferenceBox = m; + m = function(a) { + function f(b) { + a.call(this, "dinf", [b]); + this.dataReference = b; } - __extends(e, a); - return e; - }(q); - a.DataInformationBox = n; - n = function(a) { - function e(d) { + __extends(f, a); + return f; + }(s); + a.DataInformationBox = m; + m = function(a) { + function f(b) { a.call(this, "stsd", 0, 0); - this.entries = d; + this.entries = b; } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d), b = b + 4; + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b), e = e + 4; this.entries.forEach(function(a) { - b += a.layout(d + b); + e += a.layout(b + e); }); - return this.size = b; + return this.size = e; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.entries.length); - b += 4; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.entries.length); + e += 4; this.entries.forEach(function(a) { - b += a.write(d); + e += a.write(b); }); - return b; + return e; }; - return e; - }(t); - a.SampleDescriptionBox = n; - n = function(a) { - function e(d, b, g, f, c) { - a.call(this, "stbl", [d, b, g, f, c]); - this.sampleDescriptions = d; - this.timeToSample = b; - this.sampleToChunk = g; - this.sampleSizes = f; - this.chunkOffset = c; + return f; + }(p); + a.SampleDescriptionBox = m; + m = function(a) { + function f(b, e, f, c, d) { + a.call(this, "stbl", [b, e, f, c, d]); + this.sampleDescriptions = b; + this.timeToSample = e; + this.sampleToChunk = f; + this.sampleSizes = c; + this.chunkOffset = d; } - __extends(e, a); - return e; - }(q); - a.SampleTableBox = n; - n = function(a) { - function e(d, b, g) { - a.call(this, "minf", [d, b, g]); - this.header = d; - this.info = b; - this.sampleTable = g; + __extends(f, a); + return f; + }(s); + a.SampleTableBox = m; + m = function(a) { + function f(b, e, f) { + a.call(this, "minf", [b, e, f]); + this.header = b; + this.info = e; + this.sampleTable = f; } - __extends(e, a); - return e; - }(q); - a.MediaInformationBox = n; - n = function(a) { - function e(d, b, g) { - a.call(this, "mdia", [d, b, g]); - this.header = d; - this.handler = b; - this.info = g; + __extends(f, a); + return f; + }(s); + a.MediaInformationBox = m; + m = function(a) { + function f(b, e, f) { + a.call(this, "mdia", [b, e, f]); + this.header = b; + this.handler = e; + this.info = f; } - __extends(e, a); - return e; - }(q); - a.MediaBox = n; - n = function(a) { - function e(d, b) { - a.call(this, "trak", [d, b]); - this.header = d; - this.media = b; + __extends(f, a); + return f; + }(s); + a.MediaBox = m; + m = function(a) { + function f(b, e) { + a.call(this, "trak", [b, e]); + this.header = b; + this.media = e; } - __extends(e, a); - return e; - }(q); - a.TrackBox = n; - n = function(a) { - function e(d, b, g, f, c) { + __extends(f, a); + return f; + }(s); + a.TrackBox = m; + m = function(a) { + function f(b, e, f, c, d) { a.call(this, "trex", 0, 0); - this.trackId = d; - this.defaultSampleDescriptionIndex = b; - this.defaultSampleDuration = g; - this.defaultSampleSize = f; - this.defaultSampleFlags = c; + this.trackId = b; + this.defaultSampleDescriptionIndex = e; + this.defaultSampleDuration = f; + this.defaultSampleSize = c; + this.defaultSampleFlags = d; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 20; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 20; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.trackId); - h(d, this.offset + b + 4, this.defaultSampleDescriptionIndex); - h(d, this.offset + b + 8, this.defaultSampleDuration); - h(d, this.offset + b + 12, this.defaultSampleSize); - h(d, this.offset + b + 16, this.defaultSampleFlags); - return b + 20; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.trackId); + k(b, this.offset + e + 4, this.defaultSampleDescriptionIndex); + k(b, this.offset + e + 8, this.defaultSampleDuration); + k(b, this.offset + e + 12, this.defaultSampleSize); + k(b, this.offset + e + 16, this.defaultSampleFlags); + return e + 20; }; - return e; - }(t); - a.TrackExtendsBox = n; - n = function(a) { - function e(d, b, g) { - a.call(this, "mvex", c([d], b, [g])); - this.header = d; - this.tracDefaults = b; - this.levels = g; + return f; + }(p); + a.TrackExtendsBox = m; + m = function(a) { + function f(b, e, f) { + a.call(this, "mvex", d([b], e, [f])); + this.header = b; + this.tracDefaults = e; + this.levels = f; } - __extends(e, a); - return e; - }(q); - a.MovieExtendsBox = n; - n = function(a) { - function e(d, b) { + __extends(f, a); + return f; + }(s); + a.MovieExtendsBox = m; + m = function(a) { + function f(b, e) { a.call(this, "meta", 0, 0); - this.handler = d; - this.otherBoxes = b; + this.handler = b; + this.otherBoxes = e; } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d), b = b + this.handler.layout(d + b); + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b), e = e + this.handler.layout(b + e); this.otherBoxes.forEach(function(a) { - b += a.layout(d + b); + e += a.layout(b + e); }); - return this.size = b; + return this.size = e; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d), b = b + this.handler.write(d); + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b), e = e + this.handler.write(b); this.otherBoxes.forEach(function(a) { - b += a.write(d); + e += a.write(b); }); - return b; + return e; }; - return e; - }(t); - a.MetaBox = n; - n = function(a) { - function e(d) { + return f; + }(p); + a.MetaBox = m; + m = function(a) { + function f(b) { a.call(this, "mfhd", 0, 0); - this.sequenceNumber = d; + this.sequenceNumber = b; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 4; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 4; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.sequenceNumber); - return b + 4; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.sequenceNumber); + return e + 4; }; - return e; - }(t); - a.MovieFragmentHeaderBox = n; + return f; + }(p); + a.MovieFragmentHeaderBox = m; (function(a) { a[a.BASE_DATA_OFFSET_PRESENT = 1] = "BASE_DATA_OFFSET_PRESENT"; a[a.SAMPLE_DESCRIPTION_INDEX_PRESENT = 2] = "SAMPLE_DESCRIPTION_INDEX_PRESENT"; @@ -27238,69 +27238,69 @@ var RtmpJs; a[a.DEFAULT_SAMPLE_SIZE_PRESENT = 16] = "DEFAULT_SAMPLE_SIZE_PRESENT"; a[a.DEFAULT_SAMPLE_FLAGS_PRESENT = 32] = "DEFAULT_SAMPLE_FLAGS_PRESENT"; })(a.TrackFragmentFlags || (a.TrackFragmentFlags = {})); - n = function(a) { - function e(d, b, g, f, c, m, l) { - a.call(this, "tfhd", 0, d); - this.trackId = b; - this.baseDataOffset = g; - this.sampleDescriptionIndex = f; - this.defaultSampleDuration = c; - this.defaultSampleSize = m; + m = function(a) { + function f(b, e, f, c, d, h, l) { + a.call(this, "tfhd", 0, b); + this.trackId = e; + this.baseDataOffset = f; + this.sampleDescriptionIndex = c; + this.defaultSampleDuration = d; + this.defaultSampleSize = h; this.defaultSampleFlags = l; } - __extends(e, a); - e.prototype.layout = function(d) { - d = a.prototype.layout.call(this, d) + 4; - var b = this.flags; - b & 1 && (d += 8); - b & 2 && (d += 4); - b & 8 && (d += 4); - b & 16 && (d += 4); - b & 32 && (d += 4); - return this.size = d; + __extends(f, a); + f.prototype.layout = function(b) { + b = a.prototype.layout.call(this, b) + 4; + var e = this.flags; + e & 1 && (b += 8); + e & 2 && (b += 4); + e & 8 && (b += 4); + e & 16 && (b += 4); + e & 32 && (b += 4); + return this.size = b; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d), e = this.flags; - h(d, this.offset + b, this.trackId); - b += 4; - e & 1 && (h(d, this.offset + b, 0), h(d, this.offset + b + 4, this.baseDataOffset), b += 8); - e & 2 && (h(d, this.offset + b, this.sampleDescriptionIndex), b += 4); - e & 8 && (h(d, this.offset + b, this.defaultSampleDuration), b += 4); - e & 16 && (h(d, this.offset + b, this.defaultSampleSize), b += 4); - e & 32 && (h(d, this.offset + b, this.defaultSampleFlags), b += 4); - return b; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b), f = this.flags; + k(b, this.offset + e, this.trackId); + e += 4; + f & 1 && (k(b, this.offset + e, 0), k(b, this.offset + e + 4, this.baseDataOffset), e += 8); + f & 2 && (k(b, this.offset + e, this.sampleDescriptionIndex), e += 4); + f & 8 && (k(b, this.offset + e, this.defaultSampleDuration), e += 4); + f & 16 && (k(b, this.offset + e, this.defaultSampleSize), e += 4); + f & 32 && (k(b, this.offset + e, this.defaultSampleFlags), e += 4); + return e; }; - return e; - }(t); - a.TrackFragmentHeaderBox = n; - n = function(a) { - function e(d) { + return f; + }(p); + a.TrackFragmentHeaderBox = m; + m = function(a) { + function f(b) { a.call(this, "tfdt", 0, 0); - this.baseMediaDecodeTime = d; + this.baseMediaDecodeTime = b; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 4; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 4; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, this.baseMediaDecodeTime); - return b + 4; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, this.baseMediaDecodeTime); + return e + 4; }; - return e; - }(t); - a.TrackFragmentBaseMediaDecodeTimeBox = n; - n = function(a) { - function e(d, b, g) { - a.call(this, "traf", [d, b, g]); - this.header = d; - this.decodeTime = b; - this.run = g; + return f; + }(p); + a.TrackFragmentBaseMediaDecodeTimeBox = m; + m = function(a) { + function f(b, e, f) { + a.call(this, "traf", [b, e, f]); + this.header = b; + this.decodeTime = e; + this.run = f; } - __extends(e, a); - return e; - }(q); - a.TrackFragmentBox = n; + __extends(f, a); + return f; + }(s); + a.TrackFragmentBox = m; (function(a) { a[a.IS_LEADING_MASK = 201326592] = "IS_LEADING_MASK"; a[a.SAMPLE_DEPENDS_ON_MASK = 50331648] = "SAMPLE_DEPENDS_ON_MASK"; @@ -27320,224 +27320,224 @@ var RtmpJs; a[a.SAMPLE_FLAGS_PRESENT = 1024] = "SAMPLE_FLAGS_PRESENT"; a[a.SAMPLE_COMPOSITION_TIME_OFFSET = 2048] = "SAMPLE_COMPOSITION_TIME_OFFSET"; })(a.TrackRunFlags || (a.TrackRunFlags = {})); - t = function(a) { - function e(d, b, g, f) { - a.call(this, "trun", 1, d); - this.samples = b; - this.dataOffset = g; - this.firstSampleFlags = f; + p = function(a) { + function f(b, e, f, c) { + a.call(this, "trun", 1, b); + this.samples = e; + this.dataOffset = f; + this.firstSampleFlags = c; } - __extends(e, a); - e.prototype.layout = function(d) { - d = a.prototype.layout.call(this, d) + 4; - var b = this.samples.length, e = this.flags; - e & 1 && (d += 4); - e & 4 && (d += 4); - e & 256 && (d += 4 * b); - e & 512 && (d += 4 * b); - e & 1024 && (d += 4 * b); - e & 2048 && (d += 4 * b); - return this.size = d; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d), e = this.samples.length, f = this.flags; - h(d, this.offset + b, e); - b += 4; - f & 1 && (h(d, this.offset + b, this.dataOffset), b += 4); - f & 4 && (h(d, this.offset + b, this.firstSampleFlags), b += 4); - for (var c = 0;c < e;c++) { - var m = this.samples[c]; - f & 256 && (h(d, this.offset + b, m.duration), b += 4); - f & 512 && (h(d, this.offset + b, m.size), b += 4); - f & 1024 && (h(d, this.offset + b, m.flags), b += 4); - f & 2048 && (h(d, this.offset + b, m.compositionTimeOffset), b += 4); - } - return b; - }; - return e; - }(t); - a.TrackRunBox = t; - t = function(a) { - function e(d, b) { - a.call(this, "moof", c([d], b)); - this.header = d; - this.trafs = b; - } - __extends(e, a); - return e; - }(q); - a.MovieFragmentBox = t; - t = function(a) { - function e(d) { - a.call(this, "mdat"); - this.chunks = d; - } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d); - this.chunks.forEach(function(a) { - b += a.length; - }); + __extends(f, a); + f.prototype.layout = function(b) { + b = a.prototype.layout.call(this, b) + 4; + var e = this.samples.length, f = this.flags; + f & 1 && (b += 4); + f & 4 && (b += 4); + f & 256 && (b += 4 * e); + f & 512 && (b += 4 * e); + f & 1024 && (b += 4 * e); + f & 2048 && (b += 4 * e); return this.size = b; }; - e.prototype.write = function(d) { - var b = this, e = a.prototype.write.call(this, d); - this.chunks.forEach(function(a) { - d.set(a, b.offset + e); - e += a.length; - }, this); + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b), f = this.samples.length, c = this.flags; + k(b, this.offset + e, f); + e += 4; + c & 1 && (k(b, this.offset + e, this.dataOffset), e += 4); + c & 4 && (k(b, this.offset + e, this.firstSampleFlags), e += 4); + for (var d = 0;d < f;d++) { + var h = this.samples[d]; + c & 256 && (k(b, this.offset + e, h.duration), e += 4); + c & 512 && (k(b, this.offset + e, h.size), e += 4); + c & 1024 && (k(b, this.offset + e, h.flags), e += 4); + c & 2048 && (k(b, this.offset + e, h.compositionTimeOffset), e += 4); + } return e; }; - return e; - }(m); - a.MediaDataBox = t; - t = function(a) { - function e(d, b) { - a.call(this, d); - this.dataReferenceIndex = b; + return f; + }(p); + a.TrackRunBox = p; + p = function(a) { + function f(b, e) { + a.call(this, "moof", d([b], e)); + this.header = b; + this.trafs = e; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + 8; - }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, 0); - h(d, this.offset + b + 4, this.dataReferenceIndex); - return b + 8; - }; - return e; - }(m); - a.SampleEntry = t; - q = function(a) { - function e(d, b, g, f, c, m) { - void 0 === g && (g = 2); - void 0 === f && (f = 16); - void 0 === c && (c = 44100); - void 0 === m && (m = null); - a.call(this, d, b); - this.channelCount = g; - this.sampleSize = f; - this.sampleRate = c; - this.otherBoxes = m; + __extends(f, a); + return f; + }(s); + a.MovieFragmentBox = p; + p = function(a) { + function f(b) { + a.call(this, "mdat"); + this.chunks = b; } - __extends(e, a); - e.prototype.layout = function(d) { - var b = a.prototype.layout.call(this, d) + 20; - this.otherBoxes && this.otherBoxes.forEach(function(a) { - b += a.layout(d + b); + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b); + this.chunks.forEach(function(b) { + e += b.length; }); - return this.size = b; + return this.size = e; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - h(d, this.offset + b, 0); - h(d, this.offset + b + 4, 0); - h(d, this.offset + b + 8, this.channelCount << 16 | this.sampleSize); - h(d, this.offset + b + 12, 0); - h(d, this.offset + b + 16, this.sampleRate << 16); - b += 20; + f.prototype.write = function(b) { + var e = this, f = a.prototype.write.call(this, b); + this.chunks.forEach(function(a) { + b.set(a, e.offset + f); + f += a.length; + }, this); + return f; + }; + return f; + }(h); + a.MediaDataBox = p; + p = function(a) { + function f(b, e) { + a.call(this, b); + this.dataReferenceIndex = e; + } + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + 8; + }; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, 0); + k(b, this.offset + e + 4, this.dataReferenceIndex); + return e + 8; + }; + return f; + }(h); + a.SampleEntry = p; + s = function(a) { + function f(b, e, f, c, d, h) { + void 0 === f && (f = 2); + void 0 === c && (c = 16); + void 0 === d && (d = 44100); + void 0 === h && (h = null); + a.call(this, b, e); + this.channelCount = f; + this.sampleSize = c; + this.sampleRate = d; + this.otherBoxes = h; + } + __extends(f, a); + f.prototype.layout = function(b) { + var e = a.prototype.layout.call(this, b) + 20; this.otherBoxes && this.otherBoxes.forEach(function(a) { - b += a.write(d); + e += a.layout(b + e); }); - return b; + return this.size = e; }; - return e; - }(t); - a.AudioSampleEntry = q; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + k(b, this.offset + e, 0); + k(b, this.offset + e + 4, 0); + k(b, this.offset + e + 8, this.channelCount << 16 | this.sampleSize); + k(b, this.offset + e + 12, 0); + k(b, this.offset + e + 16, this.sampleRate << 16); + e += 20; + this.otherBoxes && this.otherBoxes.forEach(function(a) { + e += a.write(b); + }); + return e; + }; + return f; + }(p); + a.AudioSampleEntry = s; a.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH = 24; - t = function(e) { - function f(d, b, g, f, c, m, l, n, h, q) { - void 0 === c && (c = ""); - void 0 === m && (m = 72); + p = function(c) { + function f(b, e, f, d, h, l, m, p, s, k) { + void 0 === h && (h = ""); void 0 === l && (l = 72); - void 0 === n && (n = 1); - void 0 === h && (h = a.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH); - void 0 === q && (q = null); - e.call(this, d, b); - this.width = g; - this.height = f; - this.compressorName = c; - this.horizResolution = m; - this.vertResolution = l; - this.frameCount = n; - this.depth = h; - this.otherBoxes = q; - if (31 < c.length) { + void 0 === m && (m = 72); + void 0 === p && (p = 1); + void 0 === s && (s = a.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH); + void 0 === k && (k = null); + c.call(this, b, e); + this.width = f; + this.height = d; + this.compressorName = h; + this.horizResolution = l; + this.vertResolution = m; + this.frameCount = p; + this.depth = s; + this.otherBoxes = k; + if (31 < h.length) { throw Error("invalid compressor name"); } } - __extends(f, e); - f.prototype.layout = function(a) { - var b = e.prototype.layout.call(this, a) + 16 + 12 + 4 + 2 + 32 + 2 + 2; - this.otherBoxes && this.otherBoxes.forEach(function(e) { - b += e.layout(a + b); + __extends(f, c); + f.prototype.layout = function(b) { + var a = c.prototype.layout.call(this, b) + 16 + 12 + 4 + 2 + 32 + 2 + 2; + this.otherBoxes && this.otherBoxes.forEach(function(f) { + a += f.layout(b + a); }); - return this.size = b; + return this.size = a; }; - f.prototype.write = function(a) { - var b = e.prototype.write.call(this, a); - h(a, this.offset + b, 0); - h(a, this.offset + b + 4, 0); - h(a, this.offset + b + 8, 0); - h(a, this.offset + b + 12, 0); - b += 16; - h(a, this.offset + b, this.width << 16 | this.height); - h(a, this.offset + b + 4, 65536 * this.horizResolution | 0); - h(a, this.offset + b + 8, 65536 * this.vertResolution | 0); - b += 12; - h(a, this.offset + b, 0); - h(a, this.offset + b + 4, this.frameCount << 16); - b += 6; - a[this.offset + b] = this.compressorName.length; - for (var g = 0;31 > g;g++) { - a[this.offset + b + g + 1] = g < this.compressorName.length ? this.compressorName.charCodeAt(g) & 127 : 0; + f.prototype.write = function(b) { + var a = c.prototype.write.call(this, b); + k(b, this.offset + a, 0); + k(b, this.offset + a + 4, 0); + k(b, this.offset + a + 8, 0); + k(b, this.offset + a + 12, 0); + a += 16; + k(b, this.offset + a, this.width << 16 | this.height); + k(b, this.offset + a + 4, 65536 * this.horizResolution | 0); + k(b, this.offset + a + 8, 65536 * this.vertResolution | 0); + a += 12; + k(b, this.offset + a, 0); + k(b, this.offset + a + 4, this.frameCount << 16); + a += 6; + b[this.offset + a] = this.compressorName.length; + for (var f = 0;31 > f;f++) { + b[this.offset + a + f + 1] = f < this.compressorName.length ? this.compressorName.charCodeAt(f) & 127 : 0; } - b += 32; - h(a, this.offset + b, this.depth << 16 | 65535); - b += 4; - this.otherBoxes && this.otherBoxes.forEach(function(e) { - b += e.write(a); + a += 32; + k(b, this.offset + a, this.depth << 16 | 65535); + a += 4; + this.otherBoxes && this.otherBoxes.forEach(function(f) { + a += f.write(b); }); - return b; + return a; }; return f; - }(t); - a.VideoSampleEntry = t; - m = function(a) { - function e(d, b) { - a.call(this, d); - this.data = b; + }(p); + a.VideoSampleEntry = p; + h = function(a) { + function f(b, e) { + a.call(this, b); + this.data = e; } - __extends(e, a); - e.prototype.layout = function(d) { - return this.size = a.prototype.layout.call(this, d) + this.data.length; + __extends(f, a); + f.prototype.layout = function(b) { + return this.size = a.prototype.layout.call(this, b) + this.data.length; }; - e.prototype.write = function(d) { - var b = a.prototype.write.call(this, d); - d.set(this.data, this.offset + b); - return b + this.data.length; + f.prototype.write = function(b) { + var e = a.prototype.write.call(this, b); + b.set(this.data, this.offset + e); + return e + this.data.length; }; - return e; - }(m); - a.RawTag = m; - })(c.Iso || (c.Iso = {})); - })(c.MP4 || (c.MP4 = {})); + return f; + }(h); + a.RawTag = h; + })(d.Iso || (d.Iso = {})); + })(d.MP4 || (d.MP4 = {})); })(RtmpJs || (RtmpJs = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { function a(a) { - for (var e = a.length >> 1, c = new Uint8Array(e), k = 0;k < e;k++) { - c[k] = parseInt(a.substr(2 * k, 2), 16); + for (var c = a.length >> 1, d = new Uint8Array(c), g = 0;g < c;g++) { + d[g] = parseInt(a.substr(2 * g, 2), 16); } - return c; + return d; } - var s = [5500, 11025, 22050, 44100], v = ["PCM", "ADPCM", "MP3", "PCM le", "Nellymouser16", "Nellymouser8", "Nellymouser", "G.711 A-law", "G.711 mu-law", null, "AAC", "Speex", "MP3 8khz"], p; + var r = [5500, 11025, 22050, 44100], v = ["PCM", "ADPCM", "MP3", "PCM le", "Nellymouser16", "Nellymouser8", "Nellymouser", "G.711 A-law", "G.711 mu-law", null, "AAC", "Speex", "MP3 8khz"], u; (function(a) { a[a.HEADER = 0] = "HEADER"; a[a.RAW = 1] = "RAW"; - })(p || (p = {})); - var u = [null, "JPEG", "Sorenson", "Screen", "VP6", "VP6 alpha", "Screen2", "AVC"], l; + })(u || (u = {})); + var t = [null, "JPEG", "Sorenson", "Screen", "VP6", "VP6 alpha", "Screen2", "AVC"], l; (function(a) { a[a.KEY = 1] = "KEY"; a[a.INNER = 2] = "INNER"; @@ -27545,107 +27545,107 @@ var RtmpJs; a[a.GENERATED = 4] = "GENERATED"; a[a.INFO = 5] = "INFO"; })(l || (l = {})); - var e; + var c; (function(a) { a[a.HEADER = 0] = "HEADER"; a[a.NALU = 1] = "NALU"; a[a.END = 2] = "END"; - })(e || (e = {})); - var m; + })(c || (c = {})); + var h; (function(a) { a[a.CAN_GENERATE_HEADER = 0] = "CAN_GENERATE_HEADER"; a[a.NEED_HEADER_DATA = 1] = "NEED_HEADER_DATA"; a[a.MAIN_PACKETS = 2] = "MAIN_PACKETS"; - })(m || (m = {})); - p = function() { - function e(a) { - var c = this; + })(h || (h = {})); + u = function() { + function c(a) { + var d = this; this.oncodecinfo = function(a) { }; this.ondata = function(a) { throw Error("MP4Mux.ondata is not set"); }; this.metadata = a; - this.trackStates = this.metadata.tracks.map(function(a, e) { - var d = {trackId:e + 1, trackInfo:a, cachedDuration:0, samplesProcessed:0, initializationData:[]}; - c.metadata.audioTrackId === e && (c.audioTrackState = d); - c.metadata.videoTrackId === e && (c.videoTrackState = d); - return d; + this.trackStates = this.metadata.tracks.map(function(a, f) { + var b = {trackId:f + 1, trackInfo:a, cachedDuration:0, samplesProcessed:0, initializationData:[]}; + d.metadata.audioTrackId === f && (d.audioTrackState = b); + d.metadata.videoTrackId === f && (d.videoTrackState = b); + return b; }, this); this._checkIfNeedHeaderData(); this.filePos = 0; this.cachedPackets = []; this.chunkIndex = 0; } - e.prototype.pushPacket = function(a, e, c) { + c.prototype.pushPacket = function(a, c, g) { 0 === this.state && this._tryGenerateHeader(); switch(a) { case 8: a = this.audioTrackState; - var f = 0, d = 1, b = e[f], g = b >> 4, m; + var f = 0, b = 1, e = c[f], d = e >> 4, h; f++; - switch(g) { + switch(d) { case 10: - d = e[f++]; - m = 1024; + b = c[f++]; + h = 1024; break; case 2: - m = e[f + 1] >> 3 & 3; - var l = e[f + 1] >> 1 & 3; - m = 1 === l ? 3 === m ? 1152 : 576 : 3 === l ? 384 : 1152; + h = c[f + 1] >> 3 & 3; + var l = c[f + 1] >> 1 & 3; + h = 1 === l ? 3 === h ? 1152 : 576 : 3 === l ? 384 : 1152; } - e = {codecDescription:v[g], codecId:g, data:e.subarray(f), rate:s[b >> 2 & 3], size:b & 2 ? 16 : 8, channels:b & 1 ? 2 : 1, samples:m, packetType:d}; + c = {codecDescription:v[d], codecId:d, data:c.subarray(f), rate:r[e >> 2 & 3], size:e & 2 ? 16 : 8, channels:e & 1 ? 2 : 1, samples:h, packetType:b}; + if (!a || a.trackInfo.codecId !== c.codecId) { + throw Error("Unexpected audio packet codec: " + c.codecDescription); + } + switch(c.codecId) { + default: + throw Error("Unsupported audio codec: " + c.codecDescription);; + case 2: + break; + case 10: + if (0 === c.packetType) { + a.initializationData.push(c.data); + return; + } + ; + } + this.cachedPackets.push({packet:c, timestamp:g, trackId:a.trackId}); + break; + case 9: + a = this.videoTrackState; + f = 0; + e = c[f] >> 4; + b = c[f] & 15; + f++; + e = {frameType:e, codecId:b, codecDescription:t[b]}; + switch(b) { + case 7: + b = c[f++]; + e.packetType = b; + e.compositionTime = (c[f] << 24 | c[f + 1] << 16 | c[f + 2] << 8) >> 8; + f += 3; + break; + case 4: + e.packetType = 1, e.horizontalOffset = c[f] >> 4 & 15, e.verticalOffset = c[f] & 15, e.compositionTime = 0, f++; + } + e.data = c.subarray(f); if (!a || a.trackInfo.codecId !== e.codecId) { - throw Error("Unexpected audio packet codec: " + e.codecDescription); + throw Error("Unexpected video packet codec: " + e.codecDescription); } switch(e.codecId) { default: - throw Error("Unsupported audio codec: " + e.codecDescription);; - case 2: + throw Error("unsupported video codec: " + e.codecDescription);; + case 4: break; - case 10: + case 7: if (0 === e.packetType) { a.initializationData.push(e.data); return; } ; } - this.cachedPackets.push({packet:e, timestamp:c, trackId:a.trackId}); - break; - case 9: - a = this.videoTrackState; - f = 0; - b = e[f] >> 4; - d = e[f] & 15; - f++; - b = {frameType:b, codecId:d, codecDescription:u[d]}; - switch(d) { - case 7: - d = e[f++]; - b.packetType = d; - b.compositionTime = (e[f] << 24 | e[f + 1] << 16 | e[f + 2] << 8) >> 8; - f += 3; - break; - case 4: - b.packetType = 1, b.horizontalOffset = e[f] >> 4 & 15, b.verticalOffset = e[f] & 15, b.compositionTime = 0, f++; - } - b.data = e.subarray(f); - if (!a || a.trackInfo.codecId !== b.codecId) { - throw Error("Unexpected video packet codec: " + b.codecDescription); - } - switch(b.codecId) { - default: - throw Error("unsupported video codec: " + b.codecDescription);; - case 4: - break; - case 7: - if (0 === b.packetType) { - a.initializationData.push(b.data); - return; - } - ; - } - this.cachedPackets.push({packet:b, timestamp:c, trackId:a.trackId}); + this.cachedPackets.push({packet:e, timestamp:g, trackId:a.trackId}); break; default: throw Error("unknown packet type: " + a);; @@ -27653,15 +27653,15 @@ var RtmpJs; 1 === this.state && this._tryGenerateHeader(); 200 <= this.cachedPackets.length && 2 === this.state && this._chunk(); }; - e.prototype.flush = function() { + c.prototype.flush = function() { 0 < this.cachedPackets.length && this._chunk(); }; - e.prototype._checkIfNeedHeaderData = function() { + c.prototype._checkIfNeedHeaderData = function() { this.trackStates.some(function(a) { return 10 === a.trackInfo.codecId || 7 === a.trackInfo.codecId; }) ? this.state = 1 : this.state = 0; }; - e.prototype._tryGenerateHeader = function() { + c.prototype._tryGenerateHeader = function() { if (this.trackStates.every(function(b) { switch(b.trackInfo.codecId) { case 10: @@ -27672,428 +27672,528 @@ var RtmpJs; return!0; } })) { - for (var e = ["isom"], m = [], k = 0;k < this.trackStates.length;k++) { - var f = this.trackStates[k], d = f.trackInfo, b; - switch(d.codecId) { + for (var c = ["isom"], h = [], g = 0;g < this.trackStates.length;g++) { + var f = this.trackStates[g], b = f.trackInfo, e; + switch(b.codecId) { case 10: - var g = f.initializationData[0]; - b = new c.Iso.AudioSampleEntry("mp4a", 1, d.channels, d.samplesize, d.samplerate); - var l = new Uint8Array(41 + g.length); - l.set(a("0000000003808080"), 0); - l[8] = 32 + g.length; - l.set(a("00020004808080"), 9); - l[16] = 18 + g.length; - l.set(a("40150000000000FA000000000005808080"), 17); - l[34] = g.length; - l.set(g, 35); - l.set(a("068080800102"), 35 + g.length); - b.otherBoxes = [new c.Iso.RawTag("esds", l)]; - f.mimeTypeCodec = "mp4a.40." + (g[0] >> 3); + var l = f.initializationData[0]; + e = new d.Iso.AudioSampleEntry("mp4a", 1, b.channels, b.samplesize, b.samplerate); + var n = new Uint8Array(41 + l.length); + n.set(a("0000000003808080"), 0); + n[8] = 32 + l.length; + n.set(a("00020004808080"), 9); + n[16] = 18 + l.length; + n.set(a("40150000000000FA000000000005808080"), 17); + n[34] = l.length; + n.set(l, 35); + n.set(a("068080800102"), 35 + l.length); + e.otherBoxes = [new d.Iso.RawTag("esds", n)]; + f.mimeTypeCodec = "mp4a.40." + (l[0] >> 3); break; case 2: - b = new c.Iso.AudioSampleEntry(".mp3", 1, d.channels, d.samplesize, d.samplerate); + e = new d.Iso.AudioSampleEntry(".mp3", 1, b.channels, b.samplesize, b.samplerate); f.mimeTypeCodec = "mp3"; break; case 7: - g = f.initializationData[0]; - b = new c.Iso.VideoSampleEntry("avc1", 1, d.width, d.height); - b.otherBoxes = [new c.Iso.RawTag("avcC", g)]; - f.mimeTypeCodec = "avc1." + (16777216 | g[1] << 16 | g[2] << 8 | g[3]).toString(16).substr(1); - e.push("iso2", "avc1", "mp41"); + l = f.initializationData[0]; + e = new d.Iso.VideoSampleEntry("avc1", 1, b.width, b.height); + e.otherBoxes = [new d.Iso.RawTag("avcC", l)]; + f.mimeTypeCodec = "avc1." + (16777216 | l[1] << 16 | l[2] << 8 | l[3]).toString(16).substr(1); + c.push("iso2", "avc1", "mp41"); break; case 4: - b = new c.Iso.VideoSampleEntry("VP6F", 1, d.width, d.height); - b.otherBoxes = [new c.Iso.RawTag("glbl", a("00"))]; + e = new d.Iso.VideoSampleEntry("VP6F", 1, b.width, b.height); + e.otherBoxes = [new d.Iso.RawTag("glbl", a("00"))]; f.mimeTypeCodec = "avc1.42001E"; break; default: throw Error("not supported track type");; } - var w; - f === this.audioTrackState ? w = new c.Iso.TrackBox(new c.Iso.TrackHeaderBox(3, f.trackId, -1, 0, 0, 1, k), new c.Iso.MediaBox(new c.Iso.MediaHeaderBox(d.timescale, -1, d.language), new c.Iso.HandlerBox("soun", "SoundHandler"), new c.Iso.MediaInformationBox(new c.Iso.SoundMediaHeaderBox, new c.Iso.DataInformationBox(new c.Iso.DataReferenceBox([new c.Iso.DataEntryUrlBox(c.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), new c.Iso.SampleTableBox(new c.Iso.SampleDescriptionBox([b]), new c.Iso.RawTag("stts", - a("0000000000000000")), new c.Iso.RawTag("stsc", a("0000000000000000")), new c.Iso.RawTag("stsz", a("000000000000000000000000")), new c.Iso.RawTag("stco", a("0000000000000000")))))) : f === this.videoTrackState && (w = new c.Iso.TrackBox(new c.Iso.TrackHeaderBox(3, f.trackId, -1, d.width, d.height, 0, k), new c.Iso.MediaBox(new c.Iso.MediaHeaderBox(d.timescale, -1, d.language), new c.Iso.HandlerBox("vide", "VideoHandler"), new c.Iso.MediaInformationBox(new c.Iso.VideoMediaHeaderBox, new c.Iso.DataInformationBox(new c.Iso.DataReferenceBox([new c.Iso.DataEntryUrlBox(c.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), - new c.Iso.SampleTableBox(new c.Iso.SampleDescriptionBox([b]), new c.Iso.RawTag("stts", a("0000000000000000")), new c.Iso.RawTag("stsc", a("0000000000000000")), new c.Iso.RawTag("stsz", a("000000000000000000000000")), new c.Iso.RawTag("stco", a("0000000000000000"))))))); - m.push(w); + var p; + f === this.audioTrackState ? p = new d.Iso.TrackBox(new d.Iso.TrackHeaderBox(3, f.trackId, -1, 0, 0, 1, g), new d.Iso.MediaBox(new d.Iso.MediaHeaderBox(b.timescale, -1, b.language), new d.Iso.HandlerBox("soun", "SoundHandler"), new d.Iso.MediaInformationBox(new d.Iso.SoundMediaHeaderBox, new d.Iso.DataInformationBox(new d.Iso.DataReferenceBox([new d.Iso.DataEntryUrlBox(d.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), new d.Iso.SampleTableBox(new d.Iso.SampleDescriptionBox([e]), new d.Iso.RawTag("stts", + a("0000000000000000")), new d.Iso.RawTag("stsc", a("0000000000000000")), new d.Iso.RawTag("stsz", a("000000000000000000000000")), new d.Iso.RawTag("stco", a("0000000000000000")))))) : f === this.videoTrackState && (p = new d.Iso.TrackBox(new d.Iso.TrackHeaderBox(3, f.trackId, -1, b.width, b.height, 0, g), new d.Iso.MediaBox(new d.Iso.MediaHeaderBox(b.timescale, -1, b.language), new d.Iso.HandlerBox("vide", "VideoHandler"), new d.Iso.MediaInformationBox(new d.Iso.VideoMediaHeaderBox, new d.Iso.DataInformationBox(new d.Iso.DataReferenceBox([new d.Iso.DataEntryUrlBox(d.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), + new d.Iso.SampleTableBox(new d.Iso.SampleDescriptionBox([e]), new d.Iso.RawTag("stts", a("0000000000000000")), new d.Iso.RawTag("stsc", a("0000000000000000")), new d.Iso.RawTag("stsz", a("000000000000000000000000")), new d.Iso.RawTag("stco", a("0000000000000000"))))))); + h.push(p); } - k = new c.Iso.MovieExtendsBox(null, [new c.Iso.TrackExtendsBox(1, 1, 0, 0, 0), new c.Iso.TrackExtendsBox(2, 1, 0, 0, 0)], null); - f = new c.Iso.BoxContainerBox("udat", [new c.Iso.MetaBox(new c.Iso.RawTag("hdlr", a("00000000000000006D6469726170706C000000000000000000")), [new c.Iso.RawTag("ilst", a("00000025A9746F6F0000001D6461746100000001000000004C61766635342E36332E313034"))])]); - d = new c.Iso.MovieHeaderBox(1E3, 0, this.trackStates.length + 1); - m = new c.Iso.MovieBox(d, m, k, f); - e = new c.Iso.FileTypeBox("isom", 512, e); - k = e.layout(0); - f = m.layout(k); - k = new Uint8Array(k + f); - e.write(k); - m.write(k); - this.trackStates.map(function(b) { + g = new d.Iso.MovieExtendsBox(null, [new d.Iso.TrackExtendsBox(1, 1, 0, 0, 0), new d.Iso.TrackExtendsBox(2, 1, 0, 0, 0)], null); + f = new d.Iso.BoxContainerBox("udat", [new d.Iso.MetaBox(new d.Iso.RawTag("hdlr", a("00000000000000006D6469726170706C000000000000000000")), [new d.Iso.RawTag("ilst", a("00000025A9746F6F0000001D6461746100000001000000004C61766635342E36332E313034"))])]); + b = new d.Iso.MovieHeaderBox(1E3, 0, this.trackStates.length + 1); + h = new d.Iso.MovieBox(b, h, g, f); + c = new d.Iso.FileTypeBox("isom", 512, c); + g = c.layout(0); + f = h.layout(g); + g = new Uint8Array(g + f); + c.write(g); + h.write(g); + this.oncodecinfo(this.trackStates.map(function(b) { return b.mimeTypeCodec; - }); - this.ondata(k); - this.filePos += k.length; + })); + this.ondata(g); + this.filePos += g.length; this.state = 2; } }; - e.prototype._chunk = function() { - var a, e = this.cachedPackets; - if (0 !== e.length) { - for (var k = [], f = 0, d = [], b = [], g = 0;g < this.trackStates.length;g++) { - var m = this.trackStates[g], l = m.trackInfo, t = m.trackId, s = e.filter(function(b) { - return b.trackId === t; + c.prototype._chunk = function() { + var a, c = this.cachedPackets; + if (0 !== c.length) { + for (var g = [], f = 0, b = [], e = [], h = 0;h < this.trackStates.length;h++) { + var n = this.trackStates[h], l = n.trackInfo, p = n.trackId, r = c.filter(function(b) { + return b.trackId === p; }); - if (0 !== s.length) { - var p = new c.Iso.TrackFragmentBaseMediaDecodeTimeBox(m.cachedDuration), u; - b.push(f); + if (0 !== r.length) { + var u = new d.Iso.TrackFragmentBaseMediaDecodeTimeBox(n.cachedDuration), t; + e.push(f); switch(l.codecId) { case 10: ; case 2: - u = []; - for (a = 0;a < s.length;a++) { - var v = s[a].packet, K = Math.round(v.samples * l.timescale / l.samplerate); - k.push(v.data); + t = []; + for (a = 0;a < r.length;a++) { + var v = r[a].packet, J = Math.round(v.samples * l.timescale / l.samplerate); + g.push(v.data); f += v.data.length; - u.push({duration:K, size:v.data.length}); - m.samplesProcessed += v.samples; + t.push({duration:J, size:v.data.length}); + n.samplesProcessed += v.samples; } a = 32; - a = new c.Iso.TrackFragmentHeaderBox(a, t, 0, 0, 0, 0, 33554432); - s = 769; - u = new c.Iso.TrackRunBox(s, u, 0, 0); - m.cachedDuration = Math.round(m.samplesProcessed * l.timescale / l.samplerate); + a = new d.Iso.TrackFragmentHeaderBox(a, p, 0, 0, 0, 0, 33554432); + r = 769; + t = new d.Iso.TrackRunBox(r, t, 0, 0); + n.cachedDuration = Math.round(n.samplesProcessed * l.timescale / l.samplerate); break; case 7: ; case 4: - u = []; - v = m.samplesProcessed; - K = Math.round(v * l.timescale / l.framerate); - for (a = 0;a < s.length;a++) { - var y = s[a].packet; + t = []; + v = n.samplesProcessed; + J = Math.round(v * l.timescale / l.framerate); + for (a = 0;a < r.length;a++) { + var M = r[a].packet; v++; - var D = Math.round(v * l.timescale / l.framerate), L = D - K, K = D, H = Math.round(v * l.timescale / l.framerate + y.compositionTime * l.timescale / 1E3); - k.push(y.data); - f += y.data.length; - u.push({duration:L, size:y.data.length, flags:1 === y.frameType ? 33554432 : 16842752, compositionTimeOffset:H - D}); + var D = Math.round(v * l.timescale / l.framerate), B = D - J, J = D, E = Math.round(v * l.timescale / l.framerate + M.compositionTime * l.timescale / 1E3); + g.push(M.data); + f += M.data.length; + t.push({duration:B, size:M.data.length, flags:1 === M.frameType ? 33554432 : 16842752, compositionTimeOffset:E - D}); } a = 32; - a = new c.Iso.TrackFragmentHeaderBox(a, t, 0, 0, 0, 0, 33554432); - s = 3841; - u = new c.Iso.TrackRunBox(s, u, 0, 0); - m.cachedDuration = K; - m.samplesProcessed = v; + a = new d.Iso.TrackFragmentHeaderBox(a, p, 0, 0, 0, 0, 33554432); + r = 3841; + t = new d.Iso.TrackRunBox(r, t, 0, 0); + n.cachedDuration = J; + n.samplesProcessed = v; break; default: throw Error("Un codec");; } - m = new c.Iso.TrackFragmentBox(a, p, u); - d.push(m); + n = new d.Iso.TrackFragmentBox(a, u, t); + b.push(n); } } - this.cachedPackets.splice(0, e.length); - g = new c.Iso.MovieFragmentHeaderBox(++this.chunkIndex); - e = new c.Iso.MovieFragmentBox(g, d); - f = e.layout(0); - k = new c.Iso.MediaDataBox(k); - m = k.layout(f); + this.cachedPackets.splice(0, c.length); + h = new d.Iso.MovieFragmentHeaderBox(++this.chunkIndex); + c = new d.Iso.MovieFragmentBox(h, b); + f = c.layout(0); + g = new d.Iso.MediaDataBox(g); + n = g.layout(f); l = f + 8; - for (g = 0;g < d.length;g++) { - d[g].run.dataOffset = l + b[g]; + for (h = 0;h < b.length;h++) { + b[h].run.dataOffset = l + e[h]; } - d = new Uint8Array(f + m); - e.write(d); - k.write(d); - this.ondata(d); - this.filePos += d.length; + b = new Uint8Array(f + n); + c.write(b); + g.write(b); + this.ondata(b); + this.filePos += b.length; } }; - return e; + return c; }(); - c.MP4Mux = p; - c.parseFLVMetadata = function(a) { - var e = [], c = -1, k = -1, f = +a.asGetPublicProperty("duration"), d, b, g = a.asGetPublicProperty("audiocodecid"); - switch(g) { + d.MP4Mux = u; + d.parseFLVMetadata = function(a) { + var c = [], d = -1, g = -1, f = +a.asGetPublicProperty("duration"), b, e, h = a.asGetPublicProperty("audiocodecid"); + switch(h) { case 2: ; case "mp3": - d = "mp3"; - b = 2; + b = "mp3"; + e = 2; break; case 10: ; case "mp4a": - d = "mp4a"; - b = 10; + b = "mp4a"; + e = 10; break; default: - if (!isNaN(g)) { - throw Error("Unsupported audio codec: " + g); + if (!isNaN(h)) { + throw Error("Unsupported audio codec: " + h); } - d = null; - b = -1; + b = null; + e = -1; } - var m, l, h = a.asGetPublicProperty("videocodecid"); - switch(h) { + var n, l, k = a.asGetPublicProperty("videocodecid"); + switch(k) { case 4: ; case "vp6f": - m = "vp6f"; + n = "vp6f"; l = 4; break; case 7: ; case "avc1": - m = "avc1"; + n = "avc1"; l = 7; break; default: - if (!isNaN(h)) { - throw Error("Unsupported video codec: " + h); + if (!isNaN(k)) { + throw Error("Unsupported video codec: " + k); } - m = null; + n = null; l = -1; } - d = null === d ? null : {codecDescription:d, codecId:b, language:"und", timescale:+a.asGetPublicProperty("audiosamplerate") || 44100, samplerate:+a.asGetPublicProperty("audiosamplerate") || 44100, channels:+a.asGetPublicProperty("audiochannels") || 2, samplesize:16}; - m = null === m ? null : {codecDescription:m, codecId:l, language:"und", timescale:6E4, framerate:+a.asGetPublicProperty("videoframerate") || +a.asGetPublicProperty("framerate"), width:+a.asGetPublicProperty("width"), height:+a.asGetPublicProperty("height")}; + b = null === b ? null : {codecDescription:b, codecId:e, language:"und", timescale:+a.asGetPublicProperty("audiosamplerate") || 44100, samplerate:+a.asGetPublicProperty("audiosamplerate") || 44100, channels:+a.asGetPublicProperty("audiochannels") || 2, samplesize:16}; + n = null === n ? null : {codecDescription:n, codecId:l, language:"und", timescale:6E4, framerate:+a.asGetPublicProperty("videoframerate") || +a.asGetPublicProperty("framerate"), width:+a.asGetPublicProperty("width"), height:+a.asGetPublicProperty("height")}; if (a = a.asGetPublicProperty("trackinfo")) { for (l = 0;l < a.length;l++) { - b = a[l]; - var s = b.asGetPublicProperty("sampledescription")[0]; - s.asGetPublicProperty("sampletype") === g ? (d.language = b.asGetPublicProperty("language"), d.timescale = +b.asGetPublicProperty("timescale")) : s.asGetPublicProperty("sampletype") === h && (m.language = b.asGetPublicProperty("language"), m.timescale = +b.asGetPublicProperty("timescale")); + e = a[l]; + var r = e.asGetPublicProperty("sampledescription")[0]; + r.asGetPublicProperty("sampletype") === h ? (b.language = e.asGetPublicProperty("language"), b.timescale = +e.asGetPublicProperty("timescale")) : r.asGetPublicProperty("sampletype") === k && (n.language = e.asGetPublicProperty("language"), n.timescale = +e.asGetPublicProperty("timescale")); } } - m && (k = e.length, e.push(m)); - d && (c = e.length, e.push(d)); - return{tracks:e, duration:f, audioTrackId:c, videoTrackId:k}; + n && (g = c.length, c.push(n)); + b && (d = c.length, c.push(b)); + return{tracks:c, duration:f, audioTrackId:d, videoTrackId:g}; }; - })(c.MP4 || (c.MP4 = {})); + })(d.MP4 || (d.MP4 = {})); })(RtmpJs || (RtmpJs = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { + var a = function() { + function a() { + this.state = this.state = 0; + this.buffer = new ArrayBuffer(1024); + this.previousTagSize = this.bufferSize = 0; + this.onClose = this.onTag = this.onHeader = this.onError = null; + } + a.prototype.push = function(a) { + var d; + if (0 < this.bufferSize) { + d = this.bufferSize + a.length; + if (this.buffer.byteLength < d) { + var k = new Uint8Array(this.buffer, 0, this.bufferSize); + this.buffer = new ArrayBuffer(d); + d = new Uint8Array(this.buffer); + d.set(k); + } else { + d = new Uint8Array(this.buffer, 0, d); + } + d.set(a, this.bufferSize); + } else { + d = a; + } + a = 0; + for (k = d.length;a < k;) { + var l = 0; + switch(this.state) { + case 0: + if (a + 9 > k) { + break; + } + var c = d[a + 5] << 24 | d[a + 6] << 16 | d[a + 7] << 8 | d[a + 8]; + if (9 > c) { + this._error("Invalid header length"); + break; + } + if (a + c > k) { + break; + } + if (70 !== d[a] || 76 !== d[a + 1] || 86 !== d[a + 2] || 1 !== d[a + 3] || 0 !== (d[a + 4] & 250)) { + this._error("Invalid FLV header"); + break; + } + var h = d[a + 4], l = 9 < c ? d.subarray(a + 9, a + c) : null; + this.onHeader && this.onHeader({hasAudio:!!(h & 4), hasVideo:!!(h & 1), extra:l}); + this.state = 2; + l = c; + break; + case 2: + if (a + 4 + 11 > k) { + break; + } + if ((d[a + 0] << 24 | d[a + 1] << 16 | d[a + 2] << 8 | d[a + 3]) !== this.previousTagSize) { + this._error("Invalid PreviousTagSize"); + break; + } + var c = d[a + 5] << 16 | d[a + 6] << 8 | d[a + 7], p = a + 4 + 11; + if (p + c > k) { + break; + } + h = d[a + 4]; + if (0 !== (d[a + 12] << 16 | d[a + 13] << 8 | d[a + 14]) || 0 !== (h & 192)) { + this._error("Invalid FLV tag"); + break; + } + var s = h & 31; + if (8 !== s && 9 !== s && 18 !== s) { + this._error("Invalid FLV tag type"); + break; + } + var h = !!(h & 32), m = d[a + 8] << 16 | d[a + 9] << 8 | d[a + 10] | d[d + 11] << 24; + this.onTag && this.onTag({type:s, needPreprocessing:h, timestamp:m, data:d.subarray(p, p + c)}); + l += 15 + c; + this.previousTagSize = c + 11; + this.state = 2; + break; + default: + throw Error("invalid state");; + } + if (0 === l) { + break; + } + a += l; + } + a < d.length ? (this.bufferSize = d.length - a, this.buffer.byteLength < this.bufferSize && (this.buffer = new ArrayBuffer(this.bufferSize)), (new Uint8Array(this.buffer)).set(d.subarray(a))) : this.bufferSize = 0; + }; + a.prototype._error = function(a) { + this.state = -1; + this.onError && this.onError(a); + }; + a.prototype.close = function() { + this.onClose && this.onClose(); + }; + return a; + }(); + d.FLVParser = a; + })(d.FLV || (d.FLV = {})); +})(RtmpJs || (RtmpJs = {})); +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(h) { - function p(a) { + (function(d) { + (function(k) { + function u(a) { switch(a) { - case e: + case c: ; - case -m: + case -h: return 0; case l: ; case -l: return-1; - case m: + case h: ; - case -e: + case -c: return 0; default: return Math.cos(a); } } - function u(a) { + function t(a) { switch(a) { - case e: + case c: ; - case -m: + case -h: return 1; case l: ; case -l: return 0; - case m: + case h: ; - case -e: + case -c: return-1; default: return Math.sin(a); } } - var l = Math.PI, e = l / 2, m = l + e, t = 2 * l, q = function(a) { - function e(a, d, b, g, c, k) { + var l = Math.PI, c = l / 2, h = l + c, p = 2 * l, s = function(a) { + function c(a, b, e, g, d, h) { void 0 === a && (a = 1); - void 0 === d && (d = 0); void 0 === b && (b = 0); + void 0 === e && (e = 0); void 0 === g && (g = 1); - void 0 === c && (c = 0); - void 0 === k && (k = 0); - var m = this._data = new Float64Array(6); - m[0] = a; - m[1] = d; - m[2] = b; - m[3] = g; - m[4] = c; - m[5] = k; + void 0 === d && (d = 0); + void 0 === h && (h = 0); + var l = this._data = new Float64Array(6); + l[0] = a; + l[1] = b; + l[2] = e; + l[3] = g; + l[4] = d; + l[5] = h; } - __extends(e, a); - e.FromUntyped = function(a) { - return new c.geom.Matrix(a.a, a.b, a.c, a.d, a.tx, a.ty); + __extends(c, a); + c.FromUntyped = function(a) { + return new d.geom.Matrix(a.a, a.b, a.c, a.d, a.tx, a.ty); }; - e.FromDataBuffer = function(a) { - return new c.geom.Matrix(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat()); + c.FromDataBuffer = function(a) { + return new d.geom.Matrix(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat()); }; - Object.defineProperty(e.prototype, "a", {get:function() { + Object.defineProperty(c.prototype, "a", {get:function() { return this._data[0]; }, set:function(a) { this._data[0] = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "b", {get:function() { + Object.defineProperty(c.prototype, "b", {get:function() { return this._data[1]; }, set:function(a) { this._data[1] = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "c", {get:function() { + Object.defineProperty(c.prototype, "c", {get:function() { return this._data[2]; }, set:function(a) { this._data[2] = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "d", {get:function() { + Object.defineProperty(c.prototype, "d", {get:function() { return this._data[3]; }, set:function(a) { this._data[3] = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "tx", {get:function() { + Object.defineProperty(c.prototype, "tx", {get:function() { return this._data[4]; }, set:function(a) { this._data[4] = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "ty", {get:function() { + Object.defineProperty(c.prototype, "ty", {get:function() { return this._data[5]; }, set:function(a) { this._data[5] = a; }, enumerable:!0, configurable:!0}); - e.prototype.concat = function(a) { - var d = this._data; + c.prototype.concat = function(a) { + var b = this._data; a = a._data; - var b = d[0] * a[0], e = 0, c = 0, k = d[3] * a[3], m = d[4] * a[0] + a[4], l = d[5] * a[3] + a[5]; - if (0 !== d[1] || 0 !== d[2] || 0 !== a[1] || 0 !== a[2]) { - b += d[1] * a[2], k += d[2] * a[1], e += d[0] * a[1] + d[1] * a[3], c += d[2] * a[0] + d[3] * a[2], m += d[5] * a[2], l += d[4] * a[1]; + var e = b[0] * a[0], c = 0, g = 0, d = b[3] * a[3], h = b[4] * a[0] + a[4], l = b[5] * a[3] + a[5]; + if (0 !== b[1] || 0 !== b[2] || 0 !== a[1] || 0 !== a[2]) { + e += b[1] * a[2], d += b[2] * a[1], c += b[0] * a[1] + b[1] * a[3], g += b[2] * a[0] + b[3] * a[2], h += b[5] * a[2], l += b[4] * a[1]; } - d[0] = b; - d[1] = e; - d[2] = c; - d[3] = k; - d[4] = m; - d[5] = l; + b[0] = e; + b[1] = c; + b[2] = g; + b[3] = d; + b[4] = h; + b[5] = l; }; - e.prototype.preMultiply = function(a) { + c.prototype.preMultiply = function(a) { this.preMultiplyInto(a, this); }; - e.prototype.preMultiplyInto = function(a, d) { - var b = this._data, e = a._data, c = d._data, k = e[0] * b[0], m = 0, l = 0, n = e[3] * b[3], h = e[4] * b[0] + b[4], q = e[5] * b[3] + b[5]; - if (0 !== e[1] || 0 !== e[2] || 0 !== b[1] || 0 !== b[2]) { - k += e[1] * b[2], n += e[2] * b[1], m += e[0] * b[1] + e[1] * b[3], l += e[2] * b[0] + e[3] * b[2], h += e[5] * b[2], q += e[4] * b[1]; + c.prototype.preMultiplyInto = function(a, b) { + var e = this._data, c = a._data, g = b._data, d = c[0] * e[0], h = 0, l = 0, m = c[3] * e[3], p = c[4] * e[0] + e[4], s = c[5] * e[3] + e[5]; + if (0 !== c[1] || 0 !== c[2] || 0 !== e[1] || 0 !== e[2]) { + d += c[1] * e[2], m += c[2] * e[1], h += c[0] * e[1] + c[1] * e[3], l += c[2] * e[0] + c[3] * e[2], p += c[5] * e[2], s += c[4] * e[1]; } - c[0] = k; - c[1] = m; - c[2] = l; - c[3] = n; - c[4] = h; - c[5] = q; + g[0] = d; + g[1] = h; + g[2] = l; + g[3] = m; + g[4] = p; + g[5] = s; }; - e.prototype.invert = function() { + c.prototype.invert = function() { this.invertInto(this); }; - e.prototype.invertInto = function(a) { - var d = this._data, b = a._data, e = d[1], c = d[2], k = d[4], m = d[5]; - if (0 === e && 0 === c) { - var l = b[0] = 1 / d[0], d = b[3] = 1 / d[3]; - b[1] = b[2] = 0; - b[4] = -l * k; - b[5] = -d * m; + c.prototype.invertInto = function(a) { + var b = this._data, e = a._data, c = b[1], g = b[2], d = b[4], h = b[5]; + if (0 === c && 0 === g) { + var l = e[0] = 1 / b[0], b = e[3] = 1 / b[3]; + e[1] = e[2] = 0; + e[4] = -l * d; + e[5] = -b * h; } else { - var l = d[0], d = d[3], n = l * d - e * c; - 0 === n ? a.identity() : (n = 1 / n, a = 0, a = b[0] = d * n, e = b[1] = -e * n, c = b[2] = -c * n, d = b[3] = l * n, b[4] = -(a * k + c * m), b[5] = -(e * k + d * m)); + var l = b[0], b = b[3], m = l * b - c * g; + 0 === m ? a.identity() : (m = 1 / m, a = 0, a = e[0] = b * m, c = e[1] = -c * m, g = e[2] = -g * m, b = e[3] = l * m, e[4] = -(a * d + g * h), e[5] = -(c * d + b * h)); } }; - e.prototype.identity = function() { + c.prototype.identity = function() { var a = this._data; a[0] = a[3] = 1; a[1] = a[2] = a[4] = a[5] = 0; }; - e.prototype.createBox = function(a, d, b, e, c) { - void 0 === b && (b = 0); + c.prototype.createBox = function(a, b, e, c, g) { void 0 === e && (e = 0); void 0 === c && (c = 0); - var k = this._data; - if (0 !== b) { - var m = p(b); - b = u(b); - k[0] = m * a; - k[1] = b * d; - k[2] = -b * a; - k[3] = m * d; + void 0 === g && (g = 0); + var d = this._data; + if (0 !== e) { + var h = u(e); + e = t(e); + d[0] = h * a; + d[1] = e * b; + d[2] = -e * a; + d[3] = h * b; } else { - k[0] = a, k[1] = 0, k[2] = 0, k[3] = d; + d[0] = a, d[1] = 0, d[2] = 0, d[3] = b; } - k[4] = e; - k[5] = c; + d[4] = c; + d[5] = g; }; - e.prototype.createGradientBox = function(a, d, b, e, c) { - void 0 === b && (b = 0); + c.prototype.createGradientBox = function(a, b, e, c, g) { void 0 === e && (e = 0); void 0 === c && (c = 0); - this.createBox(a / 1638.4, d / 1638.4, b, e + a / 2, c + d / 2); + void 0 === g && (g = 0); + this.createBox(a / 1638.4, b / 1638.4, e, c + a / 2, g + b / 2); }; - e.prototype.rotate = function(a) { + c.prototype.rotate = function(a) { a = +a; if (0 !== a) { - var d = this._data, b = p(a); - a = u(a); - var e = d[0], c = d[1], k = d[2], m = d[3], l = d[4], n = d[5]; - d[0] = e * b - c * a; - d[1] = e * a + c * b; - d[2] = k * b - m * a; - d[3] = k * a + m * b; - d[4] = l * b - n * a; - d[5] = l * a + n * b; + var b = this._data, e = u(a); + a = t(a); + var c = b[0], g = b[1], d = b[2], h = b[3], l = b[4], m = b[5]; + b[0] = c * e - g * a; + b[1] = c * a + g * e; + b[2] = d * e - h * a; + b[3] = d * a + h * e; + b[4] = l * e - m * a; + b[5] = l * a + m * e; } }; - e.prototype.translate = function(a, d) { + c.prototype.translate = function(a, b) { + var e = this._data; + e[4] += a; + e[5] += b; + }; + c.prototype.scale = function(a, b) { + var e = this._data; + 1 !== a && (e[0] *= a, e[2] *= a, e[4] *= a); + 1 !== b && (e[1] *= b, e[3] *= b, e[5] *= b); + }; + c.prototype.deltaTransformPoint = function(a) { + return new k.Point(this._data[0] * a.x + this._data[2] * a.y, this._data[1] * a.x + this._data[3] * a.y); + }; + c.prototype.transformX = function(a, b) { + var e = this._data; + return e[0] * a + e[2] * b + e[4]; + }; + c.prototype.transformY = function(a, b) { + var e = this._data; + return e[1] * a + e[3] * b + e[5]; + }; + c.prototype.transformPoint = function(a) { var b = this._data; - b[4] += a; - b[5] += d; + return new k.Point(b[0] * a.x + b[2] * a.y + b[4], b[1] * a.x + b[3] * a.y + b[5]); }; - e.prototype.scale = function(a, d) { + c.prototype.transformPointInPlace = function(a) { var b = this._data; - 1 !== a && (b[0] *= a, b[2] *= a, b[4] *= a); - 1 !== d && (b[1] *= d, b[3] *= d, b[5] *= d); - }; - e.prototype.deltaTransformPoint = function(a) { - return new h.Point(this._data[0] * a.x + this._data[2] * a.y, this._data[1] * a.x + this._data[3] * a.y); - }; - e.prototype.transformX = function(a, d) { - var b = this._data; - return b[0] * a + b[2] * d + b[4]; - }; - e.prototype.transformY = function(a, d) { - var b = this._data; - return b[1] * a + b[3] * d + b[5]; - }; - e.prototype.transformPoint = function(a) { - var d = this._data; - return new h.Point(d[0] * a.x + d[2] * a.y + d[4], d[1] * a.x + d[3] * a.y + d[5]); - }; - e.prototype.transformPointInPlace = function(a) { - var d = this._data; - a.setTo(d[0] * a.x + d[2] * a.y + d[4], d[1] * a.x + d[3] * a.y + d[5]); + a.setTo(b[0] * a.x + b[2] * a.y + b[4], b[1] * a.x + b[3] * a.y + b[5]); return a; }; - e.prototype.transformBounds = function(a) { - var d = this._data, b = d[0], e = d[1], c = d[2], k = d[3], m = d[4], l = d[5], n = a.xMin, h = a.yMin, q = a.width, t = a.height, d = Math.round(b * n + c * h + m), s = Math.round(e * n + k * h + l), p = Math.round(b * (n + q) + c * h + m), u = Math.round(e * (n + q) + k * h + l), v = Math.round(b * (n + q) + c * (h + t) + m), q = Math.round(e * (n + q) + k * (h + t) + l), b = Math.round(b * n + c * (h + t) + m), e = Math.round(e * n + k * (h + t) + l), k = 0; - d > p && (k = d, d = p, p = k); - v > b && (k = v, v = b, b = k); - a.xMin = d < v ? d : v; - a.xMax = p > b ? p : b; - s > u && (k = s, s = u, u = k); - q > e && (k = q, q = e, e = k); - a.yMin = s < q ? s : q; - a.yMax = u > e ? u : e; + c.prototype.transformBounds = function(a) { + var b = this._data, e = b[0], c = b[1], g = b[2], d = b[3], h = b[4], l = b[5], m = a.xMin, p = a.yMin, s = a.width, k = a.height, b = Math.round(e * m + g * p + h), r = Math.round(c * m + d * p + l), u = Math.round(e * (m + s) + g * p + h), t = Math.round(c * (m + s) + d * p + l), v = Math.round(e * (m + s) + g * (p + k) + h), s = Math.round(c * (m + s) + d * (p + k) + l), e = Math.round(e * m + g * (p + k) + h), c = Math.round(c * m + d * (p + k) + l), d = 0; + b > u && (d = b, b = u, u = d); + v > e && (d = v, v = e, e = d); + a.xMin = b < v ? b : v; + a.xMax = u > e ? u : e; + r > t && (d = r, r = t, t = d); + s > c && (d = s, s = c, c = d); + a.yMin = r < s ? r : s; + a.yMax = t > c ? t : c; }; - e.prototype.getDeterminant = function() { + c.prototype.getDeterminant = function() { var a = this._data; return a[0] * a[3] - a[1] * a[2]; }; - e.prototype.getScaleX = function() { + c.prototype.getScaleX = function() { var a = this._data; if (1 === a[0] && 0 === a[1]) { return 1; @@ -28101,7 +28201,7 @@ var RtmpJs; a = Math.sqrt(a[0] * a[0] + a[1] * a[1]); return 0 > this.getDeterminant() ? -a : a; }; - e.prototype.getScaleY = function() { + c.prototype.getScaleY = function() { var a = this._data; if (0 === a[2] && 1 === a[3]) { return 1; @@ -28109,638 +28209,638 @@ var RtmpJs; a = Math.sqrt(a[2] * a[2] + a[3] * a[3]); return 0 > this.getDeterminant() ? -a : a; }; - e.prototype.getAbsoluteScaleX = function() { + c.prototype.getAbsoluteScaleX = function() { return Math.abs(this.getScaleX()); }; - e.prototype.getAbsoluteScaleY = function() { + c.prototype.getAbsoluteScaleY = function() { return Math.abs(this.getScaleY()); }; - e.prototype.getSkewX = function() { + c.prototype.getSkewX = function() { return Math.atan2(this._data[3], this._data[2]) - Math.PI / 2; }; - e.prototype.getSkewY = function() { + c.prototype.getSkewY = function() { return Math.atan2(this._data[1], this._data[0]); }; - e.prototype.copyFrom = function(a) { - var d = this._data; + c.prototype.copyFrom = function(a) { + var b = this._data; a = a._data; - d[0] = a[0]; - d[1] = a[1]; - d[2] = a[2]; - d[3] = a[3]; - d[4] = a[4]; - d[5] = a[5]; + b[0] = a[0]; + b[1] = a[1]; + b[2] = a[2]; + b[3] = a[3]; + b[4] = a[4]; + b[5] = a[5]; }; - e.prototype.copyFromUntyped = function(a) { - var d = this._data; - d[0] = a.a; - d[1] = a.b; - d[2] = a.c; - d[3] = a.d; - d[4] = a.tx; - d[5] = a.ty; + c.prototype.copyFromUntyped = function(a) { + var b = this._data; + b[0] = a.a; + b[1] = a.b; + b[2] = a.c; + b[3] = a.d; + b[4] = a.tx; + b[5] = a.ty; }; - e.prototype.setTo = function(a, d, b, e, c, k) { - var m = this._data; - m[0] = a; - m[1] = d; - m[2] = b; - m[3] = e; - m[4] = c; - m[5] = k; + c.prototype.setTo = function(a, b, e, c, g, d) { + var h = this._data; + h[0] = a; + h[1] = b; + h[2] = e; + h[3] = c; + h[4] = g; + h[5] = d; }; - e.prototype.toTwipsInPlace = function() { + c.prototype.toTwipsInPlace = function() { var a = this._data; a[4] = 20 * a[4] | 0; a[5] = 20 * a[5] | 0; return this; }; - e.prototype.toPixelsInPlace = function() { + c.prototype.toPixelsInPlace = function() { var a = this._data; a[4] /= 20; a[5] /= 20; return this; }; - e.prototype.copyRowTo = function(a, d) { - var b = this._data; + c.prototype.copyRowTo = function(a, b) { + var e = this._data; a >>>= 0; - 0 === a ? (d.x = b[0], d.y = b[2], d.z = b[4]) : 1 === a ? (d.x = b[1], d.y = b[3], d.z = b[5]) : 2 === a && (d.x = 0, d.y = 0, d.z = 1); + 0 === a ? (b.x = e[0], b.y = e[2], b.z = e[4]) : 1 === a ? (b.x = e[1], b.y = e[3], b.z = e[5]) : 2 === a && (b.x = 0, b.y = 0, b.z = 1); }; - e.prototype.copyColumnTo = function(a, d) { - var b = this._data; + c.prototype.copyColumnTo = function(a, b) { + var e = this._data; a >>>= 0; - 0 === a ? (d.x = b[0], d.y = b[1], d.z = 0) : 1 === a ? (d.x = b[2], d.y = b[3], d.z = 0) : 2 === a && (d.x = b[4], d.y = b[5], d.z = 1); + 0 === a ? (b.x = e[0], b.y = e[1], b.z = 0) : 1 === a ? (b.x = e[2], b.y = e[3], b.z = 0) : 2 === a && (b.x = e[4], b.y = e[5], b.z = 1); }; - e.prototype.copyRowFrom = function(a, d) { - var b = this._data; + c.prototype.copyRowFrom = function(a, b) { + var e = this._data; a >>>= 0; - 0 === a ? (b[0] = d.x, b[2] = d.y, b[4] = d.z) : 1 === a && (b[1] = d.x, b[3] = d.y, b[5] = d.z); + 0 === a ? (e[0] = b.x, e[2] = b.y, e[4] = b.z) : 1 === a && (e[1] = b.x, e[3] = b.y, e[5] = b.z); }; - e.prototype.copyColumnFrom = function(a, d) { - var b = this._data; + c.prototype.copyColumnFrom = function(a, b) { + var e = this._data; a >>>= 0; - 0 === a ? (b[0] = d.x, b[2] = d.y, b[4] = d.z) : 1 === a && (b[1] = d.x, b[3] = d.y, b[5] = d.z); + 0 === a ? (e[0] = b.x, e[2] = b.y, e[4] = b.z) : 1 === a && (e[1] = b.x, e[3] = b.y, e[5] = b.z); }; - e.prototype.updateScaleAndRotation = function(a, d, b, e) { - var c = this._data; - if (0 !== b && b !== t || 0 !== e && e !== t) { - var k = p(b), m = u(b); - b === e ? (c[0] = k * a, c[1] = m * a) : (c[0] = p(e) * a, c[1] = u(e) * a); - c[2] = -m * d; - c[3] = k * d; + c.prototype.updateScaleAndRotation = function(a, b, e, c) { + var g = this._data; + if (0 !== e && e !== p || 0 !== c && c !== p) { + var d = u(e), h = t(e); + e === c ? (g[0] = d * a, g[1] = h * a) : (g[0] = u(c) * a, g[1] = t(c) * a); + g[2] = -h * b; + g[3] = d * b; } else { - c[0] = a, c[1] = c[2] = 0, c[3] = d; + g[0] = a, g[1] = g[2] = 0, g[3] = b; } }; - e.prototype.clone = function() { + c.prototype.clone = function() { var a = this._data; - return new c.geom.Matrix(a[0], a[1], a[2], a[3], a[4], a[5]); + return new d.geom.Matrix(a[0], a[1], a[2], a[3], a[4], a[5]); }; - e.prototype.equals = function(a) { - var d = this._data; + c.prototype.equals = function(a) { + var b = this._data; a = a._data; - return d[0] === a[0] && d[1] === a[1] && d[2] === a[2] && d[3] === a[3] && d[4] === a[4] && d[5] === a[5]; + return b[0] === a[0] && b[1] === a[1] && b[2] === a[2] && b[3] === a[3] && b[4] === a[4] && b[5] === a[5]; }; - e.prototype.toString = function() { + c.prototype.toString = function() { var a = this._data; return "(a=" + a[0] + ", b=" + a[1] + ", c=" + a[2] + ", d=" + a[3] + ", tx=" + a[4] + ", ty=" + a[5] + ")"; }; - e.prototype.writeExternal = function(a) { - var d = this._data; - a.writeFloat(d[0]); - a.writeFloat(d[1]); - a.writeFloat(d[2]); - a.writeFloat(d[3]); - a.writeFloat(d[4]); - a.writeFloat(d[5]); + c.prototype.writeExternal = function(a) { + var b = this._data; + a.writeFloat(b[0]); + a.writeFloat(b[1]); + a.writeFloat(b[2]); + a.writeFloat(b[3]); + a.writeFloat(b[4]); + a.writeFloat(b[5]); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.FROZEN_IDENTITY_MATRIX = Object.freeze(new e); - e.TEMP_MATRIX = new e; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.FROZEN_IDENTITY_MATRIX = Object.freeze(new c); + c.TEMP_MATRIX = new c; + return c; }(a.ASNative); - h.Matrix = q; - })(c.geom || (c.geom = {})); + k.Matrix = s; + })(d.geom || (d.geom = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - function p(a, e, c, k, f, d, b) { - var g = e * e, m = c * c, l = k * k, p = g + m + l, u = Math.sqrt(p); - e /= u; - c /= u; - k /= u; - g /= p; - m /= p; - l /= p; - p = Math.cos(a); + function u(a, c, d, g, f, b, e) { + var h = c * c, n = d * d, l = g * g, u = h + n + l, t = Math.sqrt(u); + c /= t; + d /= t; + g /= t; + h /= u; + n /= u; + l /= u; + u = Math.cos(a); a = Math.sin(a); - return new h.geom.Matrix3D([g + (m + l) * p, e * c * (1 - p) + k * a, e * k * (1 - p) - c * a, 0, e * c * (1 - p) - k * a, m + (g + l) * p, c * k * (1 - p) + e * a, 0, e * k * (1 - p) + c * a, c * k * (1 - p) - e * a, l + (g + m) * p, 0, (f * (m + l) - e * (d * c + b * k)) * (1 - p) + (d * k - b * c) * a, (d * (g + l) - c * (f * e + b * k)) * (1 - p) + (b * e - f * k) * a, (b * (g + m) - k * (f * e + d * c)) * (1 - p) + (f * c - d * e) * a, 1]); + return new k.geom.Matrix3D([h + (n + l) * u, c * d * (1 - u) + g * a, c * g * (1 - u) - d * a, 0, c * d * (1 - u) - g * a, n + (h + l) * u, d * g * (1 - u) + c * a, 0, c * g * (1 - u) + d * a, d * g * (1 - u) - c * a, l + (h + n) * u, 0, (f * (n + l) - c * (b * d + e * g)) * (1 - u) + (b * g - e * d) * a, (b * (h + l) - d * (f * c + e * g)) * (1 - u) + (e * c - f * g) * a, (e * (h + n) - g * (f * c + b * d)) * (1 - u) + (f * d - b * c) * a, 1]); } - var u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = new Uint32Array([0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15]), m = function(c) { - function m(a) { + var t = d.Debug.notImplemented, l = d.AVM2.Runtime.asCoerceString, c = new Uint32Array([0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15]), h = function(d) { + function h(a) { void 0 === a && (a = null); this._matrix = new Float32Array(16); a && 16 <= a.length ? this.copyRawDataFrom(a) : this.identity(); } - __extends(m, c); - m.interpolate = function(a, e, f) { - u("public flash.geom.Matrix3D::static interpolate"); + __extends(h, d); + h.interpolate = function(a, c, f) { + t("public flash.geom.Matrix3D::static interpolate"); }; - Object.defineProperty(m.prototype, "rawData", {get:function() { - var e = new a.Float64Vector; - this.copyRawDataTo(e); - return e; + Object.defineProperty(h.prototype, "rawData", {get:function() { + var c = new a.Float64Vector; + this.copyRawDataTo(c); + return c; }, set:function(a) { this.copyRawDataFrom(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "position", {get:function() { + Object.defineProperty(h.prototype, "position", {get:function() { var a = this._matrix; - return new h.geom.Vector3D(a[12], a[13], a[14]); + return new k.geom.Vector3D(a[12], a[13], a[14]); }, set:function(a) { - var e = this._matrix; - e[12] = a.x; - e[13] = a.y; - e[14] = a.z; + var c = this._matrix; + c[12] = a.x; + c[13] = a.y; + c[14] = a.z; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "determinant", {get:function() { - var a = this._matrix, e = a[4], f = a[8], d = a[12], b = a[5], g = a[9], c = a[13], m = a[6], l = a[10], h = a[14], q = a[7], t = a[11], s = a[15]; - return a[0] * (b * (l * s - t * h) - m * (g * s - t * c) + q * (g * h - l * c)) - a[1] * (e * (l * s - t * h) - m * (f * s - t * d) + q * (f * h - l * d)) + a[2] * (e * (g * s - t * c) - b * (f * s - t * d) + q * (f * c - g * d)) - a[3] * (e * (g * h - l * c) - b * (f * h - l * d) + m * (f * c - g * d)); + Object.defineProperty(h.prototype, "determinant", {get:function() { + var a = this._matrix, c = a[4], f = a[8], b = a[12], e = a[5], d = a[9], h = a[13], l = a[6], p = a[10], s = a[14], k = a[7], r = a[11], u = a[15]; + return a[0] * (e * (p * u - r * s) - l * (d * u - r * h) + k * (d * s - p * h)) - a[1] * (c * (p * u - r * s) - l * (f * u - r * b) + k * (f * s - p * b)) + a[2] * (c * (d * u - r * h) - e * (f * u - r * b) + k * (f * h - d * b)) - a[3] * (c * (d * s - p * h) - e * (f * s - p * b) + l * (f * h - d * b)); }, enumerable:!0, configurable:!0}); - m.prototype.clone = function() { - return new h.geom.Matrix3D(this._matrix); + h.prototype.clone = function() { + return new k.geom.Matrix3D(this._matrix); }; - m.prototype.copyToMatrix3D = function(a) { + h.prototype.copyToMatrix3D = function(a) { a._matrix.set(this._matrix); }; - m.prototype.append = function(a) { - var e = a._matrix, f = this._matrix; + h.prototype.append = function(a) { + var c = a._matrix, f = this._matrix; a = this._matrix; - var d = e[0], b = e[4], g = e[8], c = e[12], m = e[1], l = e[5], h = e[9], q = e[13], t = e[2], s = e[6], p = e[10], u = e[14], v = e[3], L = e[7], H = e[11], e = e[15], J = f[0], C = f[4], E = f[8], F = f[12], I = f[1], G = f[5], Z = f[9], Q = f[13], S = f[2], O = f[6], P = f[10], V = f[14], $ = f[3], W = f[7], x = f[11], f = f[15]; - a[0] = d * J + b * I + g * S + c * $; - a[1] = m * J + l * I + h * S + q * $; - a[2] = t * J + s * I + p * S + u * $; - a[3] = v * J + L * I + H * S + e * $; - a[4] = d * C + b * G + g * O + c * W; - a[5] = m * C + l * G + h * O + q * W; - a[6] = t * C + s * G + p * O + u * W; - a[7] = v * C + L * G + H * O + e * W; - a[8] = d * E + b * Z + g * P + c * x; - a[9] = m * E + l * Z + h * P + q * x; - a[10] = t * E + s * Z + p * P + u * x; - a[11] = v * E + L * Z + H * P + e * x; - a[12] = d * F + b * Q + g * V + c * f; - a[13] = m * F + l * Q + h * V + q * f; - a[14] = t * F + s * Q + p * V + u * f; - a[15] = v * F + L * Q + H * V + e * f; + var b = c[0], e = c[4], d = c[8], h = c[12], l = c[1], p = c[5], s = c[9], k = c[13], r = c[2], u = c[6], t = c[10], v = c[14], D = c[3], B = c[7], E = c[11], c = c[15], y = f[0], z = f[4], G = f[8], C = f[12], I = f[1], P = f[5], T = f[9], O = f[13], Q = f[2], S = f[6], V = f[10], aa = f[14], $ = f[3], w = f[7], U = f[11], f = f[15]; + a[0] = b * y + e * I + d * Q + h * $; + a[1] = l * y + p * I + s * Q + k * $; + a[2] = r * y + u * I + t * Q + v * $; + a[3] = D * y + B * I + E * Q + c * $; + a[4] = b * z + e * P + d * S + h * w; + a[5] = l * z + p * P + s * S + k * w; + a[6] = r * z + u * P + t * S + v * w; + a[7] = D * z + B * P + E * S + c * w; + a[8] = b * G + e * T + d * V + h * U; + a[9] = l * G + p * T + s * V + k * U; + a[10] = r * G + u * T + t * V + v * U; + a[11] = D * G + B * T + E * V + c * U; + a[12] = b * C + e * O + d * aa + h * f; + a[13] = l * C + p * O + s * aa + k * f; + a[14] = r * C + u * O + t * aa + v * f; + a[15] = D * C + B * O + E * aa + c * f; }; - m.prototype.prepend = function(a) { - var e = this._matrix, c = a._matrix; + h.prototype.prepend = function(a) { + var c = this._matrix, f = a._matrix; a = this._matrix; - var d = e[0], b = e[4], g = e[8], m = e[12], l = e[1], h = e[5], q = e[9], t = e[13], s = e[2], p = e[6], u = e[10], v = e[14], D = e[3], L = e[7], H = e[11], e = e[15], J = c[0], C = c[4], E = c[8], F = c[12], I = c[1], G = c[5], Z = c[9], Q = c[13], S = c[2], O = c[6], P = c[10], V = c[14], $ = c[3], W = c[7], x = c[11], c = c[15]; - a[0] = d * J + b * I + g * S + m * $; - a[1] = l * J + h * I + q * S + t * $; - a[2] = s * J + p * I + u * S + v * $; - a[3] = D * J + L * I + H * S + e * $; - a[4] = d * C + b * G + g * O + m * W; - a[5] = l * C + h * G + q * O + t * W; - a[6] = s * C + p * G + u * O + v * W; - a[7] = D * C + L * G + H * O + e * W; - a[8] = d * E + b * Z + g * P + m * x; - a[9] = l * E + h * Z + q * P + t * x; - a[10] = s * E + p * Z + u * P + v * x; - a[11] = D * E + L * Z + H * P + e * x; - a[12] = d * F + b * Q + g * V + m * c; - a[13] = l * F + h * Q + q * V + t * c; - a[14] = s * F + p * Q + u * V + v * c; - a[15] = D * F + L * Q + H * V + e * c; + var b = c[0], e = c[4], d = c[8], h = c[12], l = c[1], p = c[5], s = c[9], k = c[13], r = c[2], u = c[6], t = c[10], v = c[14], D = c[3], B = c[7], E = c[11], c = c[15], y = f[0], z = f[4], G = f[8], C = f[12], I = f[1], P = f[5], T = f[9], O = f[13], Q = f[2], S = f[6], V = f[10], aa = f[14], $ = f[3], w = f[7], U = f[11], f = f[15]; + a[0] = b * y + e * I + d * Q + h * $; + a[1] = l * y + p * I + s * Q + k * $; + a[2] = r * y + u * I + t * Q + v * $; + a[3] = D * y + B * I + E * Q + c * $; + a[4] = b * z + e * P + d * S + h * w; + a[5] = l * z + p * P + s * S + k * w; + a[6] = r * z + u * P + t * S + v * w; + a[7] = D * z + B * P + E * S + c * w; + a[8] = b * G + e * T + d * V + h * U; + a[9] = l * G + p * T + s * V + k * U; + a[10] = r * G + u * T + t * V + v * U; + a[11] = D * G + B * T + E * V + c * U; + a[12] = b * C + e * O + d * aa + h * f; + a[13] = l * C + p * O + s * aa + k * f; + a[14] = r * C + u * O + t * aa + v * f; + a[15] = D * C + B * O + E * aa + c * f; }; - m.prototype.invert = function() { + h.prototype.invert = function() { var a = this.determinant; if (1E-7 > Math.abs(a)) { return!1; } - var a = 1 / a, e = this._matrix, c = e[0], d = e[1], b = e[2], g = e[3], m = e[4], l = e[5], h = e[6], q = e[7], t = e[8], s = e[9], p = e[10], u = e[11], v = e[12], D = e[13], L = e[14], H = e[15]; - e[0] = a * (l * (p * H - L * u) - s * (h * H - L * q) + D * (h * u - p * q)); - e[1] = -a * (d * (p * H - L * u) - s * (b * H - L * g) + D * (b * u - p * g)); - e[2] = a * (d * (h * H - L * q) - l * (b * H - L * g) + D * (b * q - h * g)); - e[3] = -a * (d * (h * u - p * q) - l * (b * u - p * g) + s * (b * q - h * g)); - e[4] = -a * (m * (p * H - L * u) - t * (h * H - L * q) + v * (h * u - p * q)); - e[5] = a * (c * (p * H - L * u) - t * (b * H - L * g) + v * (b * u - p * g)); - e[6] = -a * (c * (h * H - L * q) - m * (b * H - L * g) + v * (b * q - h * g)); - e[7] = a * (c * (h * u - p * q) - m * (b * u - p * g) + t * (b * q - h * g)); - e[8] = a * (m * (s * H - D * u) - t * (l * H - D * q) + v * (l * u - s * q)); - e[9] = -a * (c * (s * H - D * u) - t * (d * H - D * g) + v * (d * u - s * g)); - e[10] = a * (c * (l * H - D * q) - m * (d * H - D * g) + v * (d * q - l * g)); - e[11] = -a * (c * (l * u - s * q) - m * (d * u - s * g) + t * (d * q - l * g)); - e[12] = -a * (m * (s * L - D * p) - t * (l * L - D * h) + v * (l * p - s * h)); - e[13] = a * (c * (s * L - D * p) - t * (d * L - D * b) + v * (d * p - s * b)); - e[14] = -a * (c * (l * L - D * h) - m * (d * L - D * b) + v * (d * h - l * b)); - e[15] = a * (c * (l * p - s * h) - m * (d * p - s * b) + t * (d * h - l * b)); + var a = 1 / a, c = this._matrix, f = c[0], b = c[1], e = c[2], d = c[3], h = c[4], l = c[5], p = c[6], s = c[7], k = c[8], r = c[9], u = c[10], t = c[11], v = c[12], D = c[13], B = c[14], E = c[15]; + c[0] = a * (l * (u * E - B * t) - r * (p * E - B * s) + D * (p * t - u * s)); + c[1] = -a * (b * (u * E - B * t) - r * (e * E - B * d) + D * (e * t - u * d)); + c[2] = a * (b * (p * E - B * s) - l * (e * E - B * d) + D * (e * s - p * d)); + c[3] = -a * (b * (p * t - u * s) - l * (e * t - u * d) + r * (e * s - p * d)); + c[4] = -a * (h * (u * E - B * t) - k * (p * E - B * s) + v * (p * t - u * s)); + c[5] = a * (f * (u * E - B * t) - k * (e * E - B * d) + v * (e * t - u * d)); + c[6] = -a * (f * (p * E - B * s) - h * (e * E - B * d) + v * (e * s - p * d)); + c[7] = a * (f * (p * t - u * s) - h * (e * t - u * d) + k * (e * s - p * d)); + c[8] = a * (h * (r * E - D * t) - k * (l * E - D * s) + v * (l * t - r * s)); + c[9] = -a * (f * (r * E - D * t) - k * (b * E - D * d) + v * (b * t - r * d)); + c[10] = a * (f * (l * E - D * s) - h * (b * E - D * d) + v * (b * s - l * d)); + c[11] = -a * (f * (l * t - r * s) - h * (b * t - r * d) + k * (b * s - l * d)); + c[12] = -a * (h * (r * B - D * u) - k * (l * B - D * p) + v * (l * u - r * p)); + c[13] = a * (f * (r * B - D * u) - k * (b * B - D * e) + v * (b * u - r * e)); + c[14] = -a * (f * (l * B - D * p) - h * (b * B - D * e) + v * (b * p - l * e)); + c[15] = a * (f * (l * u - r * p) - h * (b * u - r * e) + k * (b * p - l * e)); return!0; }; - m.prototype.identity = function() { + h.prototype.identity = function() { var a = this._matrix; a[0] = a[5] = a[10] = a[15] = 1; a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0; }; - m.prototype.decompose = function(a) { + h.prototype.decompose = function(a) { void 0 === a && (a = "eulerAngles"); l(a); - u("public flash.geom.Matrix3D::decompose"); + t("public flash.geom.Matrix3D::decompose"); }; - m.prototype.recompose = function(a, e) { - void 0 === e && (e = "eulerAngles"); - l(e); - u("public flash.geom.Matrix3D::recompose"); + h.prototype.recompose = function(a, c) { + void 0 === c && (c = "eulerAngles"); + l(c); + t("public flash.geom.Matrix3D::recompose"); }; - m.prototype.appendTranslation = function(a, e, c) { + h.prototype.appendTranslation = function(a, c, f) { a = +a; - e = +e; c = +c; - var d = this._matrix, b = d[3], g = d[7], m = d[11], l = d[15]; - d[0] += a * b; - d[1] += e * b; - d[2] += c * b; - d[4] += a * g; - d[5] += e * g; - d[6] += c * g; - d[8] += a * m; - d[9] += e * m; - d[10] += c * m; - d[12] += a * l; - d[13] += e * l; - d[14] += c * l; + f = +f; + var b = this._matrix, e = b[3], d = b[7], h = b[11], l = b[15]; + b[0] += a * e; + b[1] += c * e; + b[2] += f * e; + b[4] += a * d; + b[5] += c * d; + b[6] += f * d; + b[8] += a * h; + b[9] += c * h; + b[10] += f * h; + b[12] += a * l; + b[13] += c * l; + b[14] += f * l; }; - m.prototype.appendRotation = function(a, e, c) { - void 0 === c && (c = null); - this.append(p(+a / 180 * Math.PI, e.x, e.y, e.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0)); + h.prototype.appendRotation = function(a, c, f) { + void 0 === f && (f = null); + this.append(u(+a / 180 * Math.PI, c.x, c.y, c.z, f ? f.x : 0, f ? f.y : 0, f ? f.z : 0)); }; - m.prototype.appendScale = function(a, e, c) { + h.prototype.appendScale = function(a, c, f) { a = +a; - e = +e; c = +c; - var d = this._matrix; - d[0] *= a; - d[1] *= e; - d[2] *= c; - d[4] *= a; - d[5] *= e; - d[6] *= c; - d[8] *= a; - d[9] *= e; - d[10] *= c; - d[12] *= a; - d[13] *= e; - d[14] *= c; + f = +f; + var b = this._matrix; + b[0] *= a; + b[1] *= c; + b[2] *= f; + b[4] *= a; + b[5] *= c; + b[6] *= f; + b[8] *= a; + b[9] *= c; + b[10] *= f; + b[12] *= a; + b[13] *= c; + b[14] *= f; }; - m.prototype.prependTranslation = function(a, e, c) { + h.prototype.prependTranslation = function(a, c, f) { a = +a; - e = +e; c = +c; - var d = this._matrix, b = d[1], g = d[5], m = d[9], l = d[2], h = d[6], q = d[10], t = d[3], s = d[7], p = d[11]; - d[12] += d[0] * a + d[4] * e + d[8] * c; - d[13] += b * a + g * e + m * c; - d[14] += l * a + h * e + q * c; - d[15] += t * a + s * e + p * c; + f = +f; + var b = this._matrix, e = b[1], d = b[5], h = b[9], l = b[2], p = b[6], s = b[10], k = b[3], r = b[7], u = b[11]; + b[12] += b[0] * a + b[4] * c + b[8] * f; + b[13] += e * a + d * c + h * f; + b[14] += l * a + p * c + s * f; + b[15] += k * a + r * c + u * f; }; - m.prototype.prependRotation = function(a, e, c) { - void 0 === c && (c = null); - this.prepend(p(+a / 180 * Math.PI, e.x, e.y, e.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0)); + h.prototype.prependRotation = function(a, c, f) { + void 0 === f && (f = null); + this.prepend(u(+a / 180 * Math.PI, c.x, c.y, c.z, f ? f.x : 0, f ? f.y : 0, f ? f.z : 0)); }; - m.prototype.prependScale = function(a, e, c) { + h.prototype.prependScale = function(a, c, f) { a = +a; - e = +e; c = +c; - var d = this._matrix; - d[0] *= a; - d[1] *= a; - d[2] *= a; - d[3] *= a; - d[4] *= e; - d[5] *= e; - d[6] *= e; - d[7] *= e; - d[8] *= c; - d[9] *= c; - d[10] *= c; - d[11] *= c; + f = +f; + var b = this._matrix; + b[0] *= a; + b[1] *= a; + b[2] *= a; + b[3] *= a; + b[4] *= c; + b[5] *= c; + b[6] *= c; + b[7] *= c; + b[8] *= f; + b[9] *= f; + b[10] *= f; + b[11] *= f; }; - m.prototype.transformVector = function(a) { - var e = this._matrix, c = a.x, d = a.y; + h.prototype.transformVector = function(a) { + var c = this._matrix, f = a.x, b = a.y; a = a.z; - return new h.geom.Vector3D(e[0] * c + e[4] * d + e[8] * a + e[12], e[1] * c + e[5] * d + e[9] * a + e[13], e[2] * c + e[6] * d + e[10] * a + e[14]); + return new k.geom.Vector3D(c[0] * f + c[4] * b + c[8] * a + c[12], c[1] * f + c[5] * b + c[9] * a + c[13], c[2] * f + c[6] * b + c[10] * a + c[14]); }; - m.prototype.deltaTransformVector = function(a) { - var e = this._matrix, c = a.x, d = a.y; + h.prototype.deltaTransformVector = function(a) { + var c = this._matrix, f = a.x, b = a.y; a = a.z; - return new h.geom.Vector3D(e[0] * c + e[4] * d + e[8] * a, e[1] * c + e[5] * d + e[9] * a, e[2] * c + e[6] * d + e[10] * a); + return new k.geom.Vector3D(c[0] * f + c[4] * b + c[8] * a, c[1] * f + c[5] * b + c[9] * a, c[2] * f + c[6] * b + c[10] * a); }; - m.prototype.transformVectors = function(a, e) { - for (var c = this._matrix, d = c[0], b = c[4], g = c[8], m = c[12], l = c[1], h = c[5], q = c[9], t = c[13], s = c[2], p = c[6], u = c[10], c = c[14], v = 0;v < a.length - 2;v += 3) { - var D = a.asGetNumericProperty(v), L = a.asGetNumericProperty(v + 1), H = a.asGetNumericProperty(v + 2); - e.push(d * D + b * L + g * H + m); - e.push(l * D + h * L + q * H + t); - e.push(s * D + p * L + u * H + c); + h.prototype.transformVectors = function(a, c) { + for (var f = this._matrix, b = f[0], e = f[4], d = f[8], h = f[12], l = f[1], p = f[5], s = f[9], k = f[13], r = f[2], u = f[6], t = f[10], f = f[14], v = 0;v < a.length - 2;v += 3) { + var D = a.asGetNumericProperty(v), B = a.asGetNumericProperty(v + 1), E = a.asGetNumericProperty(v + 2); + c.push(b * D + e * B + d * E + h); + c.push(l * D + p * B + s * E + k); + c.push(r * D + u * B + t * E + f); } }; - m.prototype.transpose = function() { - var a = this._matrix, e; - e = a[1]; + h.prototype.transpose = function() { + var a = this._matrix, c; + c = a[1]; a[1] = a[4]; - a[4] = e; - e = a[2]; + a[4] = c; + c = a[2]; a[2] = a[8]; - a[5] = e; - e = a[3]; + a[5] = c; + c = a[3]; a[3] = a[12]; - a[12] = e; - e = a[6]; + a[12] = c; + c = a[6]; a[6] = a[9]; - a[9] = e; - e = a[7]; + a[9] = c; + c = a[7]; a[7] = a[13]; - a[13] = e; - e = a[11]; + a[13] = c; + c = a[11]; a[11] = a[14]; - a[14] = e; + a[14] = c; }; - m.prototype.pointAt = function(a, e, c) { - u("public flash.geom.Matrix3D::pointAt"); + h.prototype.pointAt = function(a, c, f) { + t("public flash.geom.Matrix3D::pointAt"); }; - m.prototype.interpolateTo = function(a, e) { - u("public flash.geom.Matrix3D::interpolateTo"); + h.prototype.interpolateTo = function(a, c) { + t("public flash.geom.Matrix3D::interpolateTo"); }; - m.prototype.copyFrom = function(a) { + h.prototype.copyFrom = function(a) { this._matrix.set(a._matrix); }; - m.prototype.copyRawDataTo = function(a) { - var c = 0, f = !1; - void 0 === c && (c = 0); + h.prototype.copyRawDataTo = function(a) { + var g = 0, f = !1; + void 0 === g && (g = 0); void 0 === f && (f = !1); - var c = c >>> 0, d = this._matrix; + var g = g >>> 0, b = this._matrix; if (f) { - for (f = 0, c |= 0;16 > f;f++, c++) { - a.asSetNumericProperty(c, d[e[f]]); + for (f = 0, g |= 0;16 > f;f++, g++) { + a.asSetNumericProperty(g, b[c[f]]); } } else { - for (f = 0, c |= 0;16 > f;f++, c++) { - a.asSetNumericProperty(c, d[f]); + for (f = 0, g |= 0;16 > f;f++, g++) { + a.asSetNumericProperty(g, b[f]); } } }; - m.prototype.copyRawDataFrom = function(a) { - var c = 0, f = !1; - void 0 === c && (c = 0); + h.prototype.copyRawDataFrom = function(a) { + var g = 0, f = !1; + void 0 === g && (g = 0); void 0 === f && (f = !1); - var c = c >>> 0, d = this._matrix; + var g = g >>> 0, b = this._matrix; if (f) { - for (f = 0, c |= 0;16 > f;f++, c++) { - d[e[f]] = a.asGetNumericProperty(c) || 0; + for (f = 0, g |= 0;16 > f;f++, g++) { + b[c[f]] = a.asGetNumericProperty(g) || 0; } } else { - for (f = 0, c |= 0;16 > f;f++, c++) { - d[f] = a.asGetNumericProperty(c) || 0; + for (f = 0, g |= 0;16 > f;f++, g++) { + b[f] = a.asGetNumericProperty(g) || 0; } } }; - m.prototype.copyRowTo = function(a, e) { - var c = a >>> 0 | 0, d = this._matrix; - e.x = d[c]; - e.y = d[c + 4]; - e.z = d[c + 8]; - e.w = d[c + 12]; + h.prototype.copyRowTo = function(a, c) { + var f = a >>> 0 | 0, b = this._matrix; + c.x = b[f]; + c.y = b[f + 4]; + c.z = b[f + 8]; + c.w = b[f + 12]; }; - m.prototype.copyColumnTo = function(a, e) { - var c = a >>> 0 << 2, d = this._matrix; - e.x = d[c]; - e.y = d[c + 1]; - e.z = d[c + 2]; - e.w = d[c + 3]; + h.prototype.copyColumnTo = function(a, c) { + var f = a >>> 0 << 2, b = this._matrix; + c.x = b[f]; + c.y = b[f + 1]; + c.z = b[f + 2]; + c.w = b[f + 3]; }; - m.prototype.copyRowFrom = function(a, e) { - var c = a >>> 0 | 0, d = this._matrix; - d[c] = e.x; - d[c + 4] = e.y; - d[c + 8] = e.z; - d[c + 12] = e.w; + h.prototype.copyRowFrom = function(a, c) { + var f = a >>> 0 | 0, b = this._matrix; + b[f] = c.x; + b[f + 4] = c.y; + b[f + 8] = c.z; + b[f + 12] = c.w; }; - m.prototype.copyColumnFrom = function(a, e) { - var c = a >>> 0 << 2, d = this._matrix; - d[c] = e.x; - d[c + 1] = e.y; - d[c + 2] = e.z; - d[c + 3] = e.w; + h.prototype.copyColumnFrom = function(a, c) { + var f = a >>> 0 << 2, b = this._matrix; + b[f] = c.x; + b[f + 1] = c.y; + b[f + 2] = c.z; + b[f + 3] = c.w; }; - m.classInitializer = null; - m.initializer = null; - m.classSymbols = null; - m.instanceSymbols = null; - return m; + h.classInitializer = null; + h.initializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + return h; }(a.ASNative); - v.Matrix3D = m; - })(h.geom || (h.geom = {})); + v.Matrix3D = h; + })(k.geom || (k.geom = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.geom.Orientation3D"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.EULER_ANGLES = "eulerAngles"; - e.AXIS_ANGLE = "axisAngle"; - e.QUATERNION = "quaternion"; - return e; - }(a.ASNative); - h.Orientation3D = u; - })(h.geom || (h.geom = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - u("public flash.geom.PerspectiveProjection"); + r("public flash.geom.Orientation3D"); } __extends(c, a); - Object.defineProperty(c.prototype, "fieldOfView", {get:function() { - s("public flash.geom.PerspectiveProjection::get fieldOfView"); - }, set:function(a) { - s("public flash.geom.PerspectiveProjection::set fieldOfView"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "projectionCenter", {get:function() { - s("public flash.geom.PerspectiveProjection::get projectionCenter"); - }, set:function(a) { - s("public flash.geom.PerspectiveProjection::set projectionCenter"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "focalLength", {get:function() { - s("public flash.geom.PerspectiveProjection::get focalLength"); - }, set:function(a) { - s("public flash.geom.PerspectiveProjection::set focalLength"); - }, enumerable:!0, configurable:!0}); - c.prototype.toMatrix3D = function() { - s("public flash.geom.PerspectiveProjection::toMatrix3D"); - }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; + c.EULER_ANGLES = "eulerAngles"; + c.AXIS_ANGLE = "axisAngle"; + c.QUATERNION = "quaternion"; return c; }(a.ASNative); - h.PerspectiveProjection = l; - })(h.geom || (h.geom = {})); + k.Orientation3D = t; + })(k.geom || (k.geom = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(k) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c(a, m) { - void 0 === a && (a = 0); - void 0 === m && (m = 0); - this.x = +a; - this.y = +m; + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.geom.PerspectiveProjection"); } - __extends(c, a); - Object.defineProperty(c.prototype, "native_x", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "fieldOfView", {get:function() { + r("public flash.geom.PerspectiveProjection::get fieldOfView"); + }, set:function(a) { + r("public flash.geom.PerspectiveProjection::set fieldOfView"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "projectionCenter", {get:function() { + r("public flash.geom.PerspectiveProjection::get projectionCenter"); + }, set:function(a) { + r("public flash.geom.PerspectiveProjection::set projectionCenter"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "focalLength", {get:function() { + r("public flash.geom.PerspectiveProjection::get focalLength"); + }, set:function(a) { + r("public flash.geom.PerspectiveProjection::set focalLength"); + }, enumerable:!0, configurable:!0}); + d.prototype.toMatrix3D = function() { + r("public flash.geom.PerspectiveProjection::toMatrix3D"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + k.PerspectiveProjection = l; + })(k.geom || (k.geom = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(d) { + (function(a) { + (function(d) { + (function(d) { + var k = function(a) { + function d(a, h) { + void 0 === a && (a = 0); + void 0 === h && (h = 0); + this.x = +a; + this.y = +h; + } + __extends(d, a); + Object.defineProperty(d.prototype, "native_x", {get:function() { return this.x; }, set:function(a) { this.x = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_y", {get:function() { + Object.defineProperty(d.prototype, "native_y", {get:function() { return this.y; }, set:function(a) { this.y = a; }, enumerable:!0, configurable:!0}); - c.prototype.Point = function(a, c) { + d.prototype.Point = function(a, d) { void 0 === a && (a = 0); - void 0 === c && (c = 0); + void 0 === d && (d = 0); this.x = a; - this.y = c; + this.y = d; }; - Object.defineProperty(c.prototype, "length", {get:function() { + Object.defineProperty(d.prototype, "length", {get:function() { return Math.sqrt(this.x * this.x + this.y * this.y); }, enumerable:!0, configurable:!0}); - c.interpolate = function(a, m, h) { - var q = 1 - h; - return new c(a.x * h + m.x * q, a.y * h + m.y * q); + d.interpolate = function(a, h, p) { + var s = 1 - p; + return new d(a.x * p + h.x * s, a.y * p + h.y * s); }; - c.distance = function(a, c) { - var l = c.x - a.x, h = c.y - a.y; - return 0 === l ? Math.abs(h) : 0 === h ? Math.abs(l) : Math.sqrt(l * l + h * h); + d.distance = function(a, d) { + var l = d.x - a.x, s = d.y - a.y; + return 0 === l ? Math.abs(s) : 0 === s ? Math.abs(l) : Math.sqrt(l * l + s * s); }; - c.polar = function(a, m) { + d.polar = function(a, h) { a = +a; - m = +m; - return new c(a * Math.cos(m), a * Math.sin(m)); + h = +h; + return new d(a * Math.cos(h), a * Math.sin(h)); }; - c.prototype.clone = function() { - return new c(this.x, this.y); + d.prototype.clone = function() { + return new d(this.x, this.y); }; - c.prototype.offset = function(a, c) { + d.prototype.offset = function(a, d) { this.x += +a; - this.y += +c; + this.y += +d; }; - c.prototype.equals = function(a) { + d.prototype.equals = function(a) { return this.x === a.x && this.y === a.y; }; - c.prototype.subtract = function(a) { - return new c(this.x - a.x, this.y - a.y); + d.prototype.subtract = function(a) { + return new d(this.x - a.x, this.y - a.y); }; - c.prototype.add = function(a) { - return new c(this.x + a.x, this.y + a.y); + d.prototype.add = function(a) { + return new d(this.x + a.x, this.y + a.y); }; - c.prototype.normalize = function(a) { + d.prototype.normalize = function(a) { if (0 !== this.x || 0 !== this.y) { a = +a / this.length, this.x *= a, this.y *= a; } }; - c.prototype.copyFrom = function(a) { + d.prototype.copyFrom = function(a) { this.x = a.x; this.y = a.y; }; - c.prototype.setTo = function(a, c) { + d.prototype.setTo = function(a, d) { this.x = +a; - this.y = +c; + this.y = +d; }; - c.prototype.toTwips = function() { + d.prototype.toTwips = function() { this.x = 20 * this.x | 0; this.y = 20 * this.y | 0; return this; }; - c.prototype.toPixels = function() { + d.prototype.toPixels = function() { this.x /= 20; this.y /= 20; return this; }; - c.prototype.round = function() { + d.prototype.round = function() { this.x = Math.round(this.x); this.y = Math.round(this.y); return this; }; - c.prototype.toString = function() { + d.prototype.toString = function() { return "(x=" + this.x + ", y=" + this.y + ")"; }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - c.Point = h; - })(c.geom || (c.geom = {})); + d.Point = k; + })(d.geom || (d.geom = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function l(a, c, l, h) { + (function(d) { + (function(d) { + var k = function(a) { + function l(a, d, l, s) { void 0 === a && (a = 0); - void 0 === c && (c = 0); + void 0 === d && (d = 0); void 0 === l && (l = 0); - void 0 === h && (h = 0); + void 0 === s && (s = 0); this.x = +a; - this.y = +c; + this.y = +d; this.width = +l; - this.height = +h; + this.height = +s; } __extends(l, a); l.FromBounds = function(a) { - var c = a.xMin, h = a.yMin; - return new l(c / 20, h / 20, (a.xMax - c) / 20, (a.yMax - h) / 20); + var d = a.xMin, p = a.yMin; + return new l(d / 20, p / 20, (a.xMax - d) / 20, (a.yMax - p) / 20); }; Object.defineProperty(l.prototype, "native_x", {get:function() { return this.x; @@ -28787,19 +28887,19 @@ var RtmpJs; this.height = +a - this.y; }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "topLeft", {get:function() { - return new c.Point(this.left, this.top); + return new d.Point(this.left, this.top); }, set:function(a) { this.top = a.y; this.left = a.x; }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "bottomRight", {get:function() { - return new c.Point(this.right, this.bottom); + return new d.Point(this.right, this.bottom); }, set:function(a) { this.bottom = a.y; this.right = a.x; }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "size", {get:function() { - return new c.Point(this.width, this.height); + return new d.Point(this.width, this.height); }, set:function(a) { this.width = a.x; this.height = a.y; @@ -28816,35 +28916,35 @@ var RtmpJs; l.prototype.setEmpty = function() { this.height = this.width = this.y = this.x = 0; }; - l.prototype.inflate = function(a, c) { + l.prototype.inflate = function(a, d) { a = +a; - c = +c; + d = +d; this.x -= a; - this.y -= c; + this.y -= d; this.width += 2 * a; - this.height += 2 * c; + this.height += 2 * d; }; l.prototype.inflatePoint = function(a) { this.inflate(a.x, a.y); }; - l.prototype.offset = function(a, c) { + l.prototype.offset = function(a, d) { this.x += +a; - this.y += +c; + this.y += +d; }; l.prototype.offsetPoint = function(a) { this.offset(a.x, a.y); }; - l.prototype.contains = function(a, c) { + l.prototype.contains = function(a, d) { a = +a; - c = +c; - return a >= this.x && a < this.right && c >= this.y && c < this.bottom; + d = +d; + return a >= this.x && a < this.right && d >= this.y && d < this.bottom; }; l.prototype.containsPoint = function(a) { return this.contains(a.x, a.y); }; l.prototype.containsRect = function(a) { - var c = a.x + a.width, l = a.y + a.height, h = this.x + this.width, n = this.y + this.height; - return a.x >= this.x && a.x < h && a.y >= this.y && a.y < n && c > this.x && c <= h && l > this.y && l <= n; + var d = a.x + a.width, l = a.y + a.height, s = this.x + this.width, m = this.y + this.height; + return a.x >= this.x && a.x < s && a.y >= this.y && a.y < m && d > this.x && d <= s && l > this.y && l <= m; }; l.prototype.intersection = function(a) { return this.clone().intersectInPlace(a); @@ -28853,17 +28953,17 @@ var RtmpJs; return Math.max(this.x, a.x) <= Math.min(this.right, a.right) && Math.max(this.y, a.y) <= Math.min(this.bottom, a.bottom); }; l.prototype.intersectInPlace = function(a) { - var c = this.x, l = this.y, h = a.x, n = a.y, k = Math.max(c, h), c = Math.min(c + this.width, h + a.width); - if (k <= c && (h = Math.max(l, n), a = Math.min(l + this.height, n + a.height), h <= a)) { - return this.setTo(k, h, c - k, a - h), this; + var d = this.x, l = this.y, s = a.x, m = a.y, g = Math.max(d, s), d = Math.min(d + this.width, s + a.width); + if (g <= d && (s = Math.max(l, m), a = Math.min(l + this.height, m + a.height), s <= a)) { + return this.setTo(g, s, d - g, a - s), this; } this.setEmpty(); return this; }; l.prototype.intersectInPlaceInt32 = function(a) { - var c = this.x | 0, l = this.y | 0, h = this.width | 0, n = this.height | 0, k = a.x | 0, f = a.width | 0, d = Math.max(c, k) | 0, c = Math.min(c + h | 0, k + f | 0) | 0; - if (d <= c && (h = a.y | 0, k = a.height | 0, a = Math.max(l, h) | 0, l = Math.min(l + n | 0, h + k | 0), a <= l)) { - return this.setTo(d, a, c - d, l - a), this; + var d = this.x | 0, l = this.y | 0, s = this.width | 0, m = this.height | 0, g = a.x | 0, f = a.width | 0, b = Math.max(d, g) | 0, d = Math.min(d + s | 0, g + f | 0) | 0; + if (b <= d && (s = a.y | 0, g = a.height | 0, a = Math.max(l, s) | 0, l = Math.min(l + m | 0, s + g | 0), a <= l)) { + return this.setTo(b, a, d - b, l - a), this; } this.setEmpty(); return this; @@ -28878,8 +28978,8 @@ var RtmpJs; if (this.isEmpty()) { return this.copyFrom(a), this; } - var c = Math.min(this.x, a.x), l = Math.min(this.y, a.y); - this.setTo(c, l, Math.max(this.right, a.right) - c, Math.max(this.bottom, a.bottom) - l); + var d = Math.min(this.x, a.x), l = Math.min(this.y, a.y); + this.setTo(d, l, Math.max(this.right, a.right) - d, Math.max(this.bottom, a.bottom) - l); return this; }; l.prototype.equals = function(a) { @@ -28891,11 +28991,11 @@ var RtmpJs; this.width = a.width; this.height = a.height; }; - l.prototype.setTo = function(a, c, l, h) { + l.prototype.setTo = function(a, d, l, s) { this.x = +a; - this.y = +c; + this.y = +d; this.width = +l; - this.height = +h; + this.height = +s; }; l.prototype.toTwips = function() { this.x = 20 * this.x | 0; @@ -28918,19 +29018,19 @@ var RtmpJs; return this; }; l.prototype.snapInPlace = function() { - var a = Math.ceil(this.x + this.width), c = Math.ceil(this.y + this.height); + var a = Math.ceil(this.x + this.width), d = Math.ceil(this.y + this.height); this.x = Math.floor(this.x); this.y = Math.floor(this.y); this.width = a - this.x; - this.height = c - this.y; + this.height = d - this.y; return this; }; l.prototype.roundInPlace = function() { - var a = Math.round(this.x + this.width), c = Math.round(this.y + this.height); + var a = Math.round(this.x + this.width), d = Math.round(this.y + this.height); this.x = Math.round(this.x); this.y = Math.round(this.y); this.width = a - this.x; - this.height = c - this.y; + this.height = d - this.y; return this; }; l.prototype.toString = function() { @@ -28954,252 +29054,252 @@ var RtmpJs; l.instanceSymbols = null; return l; }(a.ASNative); - c.Rectangle = h; - })(c.geom || (c.geom = {})); + d.Rectangle = k; + })(d.geom || (d.geom = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.AVM2.Runtime.throwError, e = c.AVM2.Errors, m = function(a) { - function c(a) { - a || l("ArgumentError", e.NullPointerError, "displayObject"); + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.AVM2.Runtime.throwError, c = d.AVM2.Errors, h = function(a) { + function d(a) { + a || l("ArgumentError", c.NullPointerError, "displayObject"); this._displayObject = a; } - __extends(c, a); - Object.defineProperty(c.prototype, "matrix", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "matrix", {get:function() { return this._displayObject._getMatrix().clone().toPixelsInPlace(); }, set:function(a) { this._displayObject._setMatrix(a, !0); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "colorTransform", {get:function() { + Object.defineProperty(d.prototype, "colorTransform", {get:function() { return this._displayObject._colorTransform.clone(); }, set:function(a) { this._displayObject._setColorTransform(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "concatenatedMatrix", {get:function() { + Object.defineProperty(d.prototype, "concatenatedMatrix", {get:function() { var a = this._displayObject._getConcatenatedMatrix().clone().toPixelsInPlace(); this._displayObject._stage || a.scale(5, 5); return a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "concatenatedColorTransform", {get:function() { + Object.defineProperty(d.prototype, "concatenatedColorTransform", {get:function() { return this._displayObject._getConcatenatedColorTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "pixelBounds", {get:function() { - p("public flash.geom.Transform::get pixelBounds"); + Object.defineProperty(d.prototype, "pixelBounds", {get:function() { + u("public flash.geom.Transform::get pixelBounds"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "matrix3D", {get:function() { + Object.defineProperty(d.prototype, "matrix3D", {get:function() { var a = this._displayObject._matrix3D; return a && a.clone(); }, set:function(a) { - v.Matrix3D.isType(a) || l("TypeError", e.CheckTypeFailedError, a, "flash.geom.Matrix3D"); + v.Matrix3D.isType(a) || l("TypeError", c.CheckTypeFailedError, a, "flash.geom.Matrix3D"); a = a.rawData; - this.matrix = new h.geom.Matrix(a.asGetPublicProperty(0), a.asGetPublicProperty(1), a.asGetPublicProperty(4), a.asGetPublicProperty(5), a.asGetPublicProperty(12), a.asGetPublicProperty(13)); - u("public flash.geom.Transform::set matrix3D"); + this.matrix = new k.geom.Matrix(a.asGetPublicProperty(0), a.asGetPublicProperty(1), a.asGetPublicProperty(4), a.asGetPublicProperty(5), a.asGetPublicProperty(12), a.asGetPublicProperty(13)); + t("public flash.geom.Transform::set matrix3D"); }, enumerable:!0, configurable:!0}); - c.prototype.getRelativeMatrix3D = function(a) { - p("public flash.geom.Transform::getRelativeMatrix3D"); + d.prototype.getRelativeMatrix3D = function(a) { + u("public flash.geom.Transform::getRelativeMatrix3D"); }; - Object.defineProperty(c.prototype, "perspectiveProjection", {get:function() { - p("public flash.geom.Transform::get perspectiveProjection"); + Object.defineProperty(d.prototype, "perspectiveProjection", {get:function() { + u("public flash.geom.Transform::get perspectiveProjection"); }, set:function(a) { - p("public flash.geom.Transform::set perspectiveProjection"); + u("public flash.geom.Transform::set perspectiveProjection"); }, enumerable:!0, configurable:!0}); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - v.Transform = m; - })(h.geom || (h.geom = {})); + v.Transform = h; + })(k.geom || (k.geom = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.geom.Utils3D"); + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.geom.Utils3D"); } - __extends(c, a); - c.projectVector = function(a, e) { - s("public flash.geom.Utils3D::static projectVector"); + __extends(d, a); + d.projectVector = function(a, c) { + r("public flash.geom.Utils3D::static projectVector"); }; - c.projectVectors = function(a, e, c, k) { - s("public flash.geom.Utils3D::static projectVectors"); + d.projectVectors = function(a, c, d, g) { + r("public flash.geom.Utils3D::static projectVectors"); }; - c.pointTowards = function(a, e, c, k, f) { - s("public flash.geom.Utils3D::static pointTowards"); + d.pointTowards = function(a, c, d, g, f) { + r("public flash.geom.Utils3D::static pointTowards"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - h.Utils3D = l; - })(h.geom || (h.geom = {})); + k.Utils3D = l; + })(k.geom || (k.geom = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c(a, m, l, h) { + (function(d) { + (function(d) { + var k = function(a) { + function d(a, h, l, s) { void 0 === a && (a = 0); - void 0 === m && (m = 0); - void 0 === l && (l = 0); void 0 === h && (h = 0); + void 0 === l && (l = 0); + void 0 === s && (s = 0); this.x = +a; - this.y = +m; + this.y = +h; this.z = +l; - this.w = +h; + this.w = +s; } - __extends(c, a); - Object.defineProperty(c.prototype, "native_x", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "native_x", {get:function() { return this.x; }, set:function(a) { this.x = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_y", {get:function() { + Object.defineProperty(d.prototype, "native_y", {get:function() { return this.y; }, set:function(a) { this.y = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_z", {get:function() { + Object.defineProperty(d.prototype, "native_z", {get:function() { return this.z; }, set:function(a) { this.z = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_w", {get:function() { + Object.defineProperty(d.prototype, "native_w", {get:function() { return this.w; }, set:function(a) { this.w = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "length", {get:function() { + Object.defineProperty(d.prototype, "length", {get:function() { return Math.sqrt(this.lengthSquared); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "lengthSquared", {get:function() { + Object.defineProperty(d.prototype, "lengthSquared", {get:function() { return this.x * this.x + this.y * this.y + this.z * this.z; }, enumerable:!0, configurable:!0}); - c.angleBetween = function(a, c) { - return Math.acos(a.dotProduct(c) / (a.length * c.length)); + d.angleBetween = function(a, d) { + return Math.acos(a.dotProduct(d) / (a.length * d.length)); }; - c.distance = function(a, c) { - return a.subtract(c).length; + d.distance = function(a, d) { + return a.subtract(d).length; }; - c.prototype.dotProduct = function(a) { + d.prototype.dotProduct = function(a) { return this.x * a.x + this.y * a.y + this.z * a.z; }; - c.prototype.crossProduct = function(a) { - return new c(this.y * a.z - this.z * a.y, this.z * a.x - this.x * a.z, this.x * a.y - this.y * a.x, 1); + d.prototype.crossProduct = function(a) { + return new d(this.y * a.z - this.z * a.y, this.z * a.x - this.x * a.z, this.x * a.y - this.y * a.x, 1); }; - c.prototype.normalize = function() { + d.prototype.normalize = function() { var a = this.length; 0 !== a ? (this.x /= a, this.y /= a, this.z /= a) : this.x = this.y = this.z = 0; return a; }; - c.prototype.scaleBy = function(a) { + d.prototype.scaleBy = function(a) { a = +a; this.x *= a; this.y *= a; this.z *= a; }; - c.prototype.incrementBy = function(a) { + d.prototype.incrementBy = function(a) { this.x += a.x; this.y += a.y; this.z += a.z; }; - c.prototype.decrementBy = function(a) { + d.prototype.decrementBy = function(a) { this.x -= a.x; this.y -= a.y; this.z -= a.z; }; - c.prototype.add = function(a) { - return new c(this.x + a.x, this.y + a.y, this.z + a.z); + d.prototype.add = function(a) { + return new d(this.x + a.x, this.y + a.y, this.z + a.z); }; - c.prototype.subtract = function(a) { - return new c(this.x - a.x, this.y - a.y, this.z - a.z); + d.prototype.subtract = function(a) { + return new d(this.x - a.x, this.y - a.y, this.z - a.z); }; - c.prototype.negate = function() { + d.prototype.negate = function() { this.x = -this.x; this.y = -this.y; this.z = -this.z; }; - c.prototype.equals = function(a, c) { - return this.x === a.x && this.y === a.y && this.z === a.z && (!c || this.w === a.w); + d.prototype.equals = function(a, d) { + return this.x === a.x && this.y === a.y && this.z === a.z && (!d || this.w === a.w); }; - c.prototype.nearEquals = function(a, c, l) { - return Math.abs(this.x - a.x) < c && Math.abs(this.y - a.y) < c && Math.abs(this.z - a.z) < c && (!l || Math.abs(this.w - a.w) < c); + d.prototype.nearEquals = function(a, d, l) { + return Math.abs(this.x - a.x) < d && Math.abs(this.y - a.y) < d && Math.abs(this.z - a.z) < d && (!l || Math.abs(this.w - a.w) < d); }; - c.prototype.project = function() { + d.prototype.project = function() { this.x /= this.w; this.y /= this.w; this.z /= this.w; }; - c.prototype.copyFrom = function(a) { + d.prototype.copyFrom = function(a) { this.x = a.x; this.y = a.y; this.z = a.z; }; - c.prototype.setTo = function(a, c, l) { + d.prototype.setTo = function(a, d, l) { this.x = +a; - this.y = +c; + this.y = +d; this.z = +l; }; - c.prototype.clone = function() { - return new c(this.x, this.y, this.z, this.w); + d.prototype.clone = function() { + return new d(this.x, this.y, this.z, this.w); }; - c.prototype.toString = function() { + d.prototype.toString = function() { return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")"; }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.X_AXIS = Object.freeze(new c(1, 0, 0)); - c.Y_AXIS = Object.freeze(new c(0, 1, 0)); - c.Z_AXIS = Object.freeze(new c(0, 0, 1)); - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.X_AXIS = Object.freeze(new d(1, 0, 0)); + d.Y_AXIS = Object.freeze(new d(0, 1, 0)); + d.Z_AXIS = Object.freeze(new d(0, 0, 1)); + return d; }(a.ASNative); - c.Vector3D = h; - })(c.geom || (c.geom = {})); + d.Vector3D = k; + })(d.geom || (d.geom = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.Debug.somewhatImplemented, c = function(a) { function c() { - u("public flash.accessibility.Accessibility"); + t("public flash.accessibility.Accessibility"); } __extends(c, a); Object.defineProperty(c, "active", {get:function() { - s("public flash.accessibility.Accessibility::get active"); + l("public flash.accessibility.Accessibility::get active"); return c._active; }, enumerable:!0, configurable:!0}); - c.sendEvent = function(a, e, c, k) { - s("public flash.accessibility.Accessibility::static sendEvent"); + c.sendEvent = function(a, c, g, f) { + r("public flash.accessibility.Accessibility::static sendEvent"); }; c.updateProperties = function() { - s("public flash.accessibility.Accessibility::static updateProperties"); + r("public flash.accessibility.Accessibility::static updateProperties"); }; c.classInitializer = null; c.initializer = null; @@ -29208,41 +29308,20 @@ var RtmpJs; c._active = !1; return c; }(a.ASNative); - h.Accessibility = l; - })(h.accessibility || (h.accessibility = {})); + k.Accessibility = c; + })(k.accessibility || (k.accessibility = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.accessibility.AccessibilityImplementation"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.AccessibilityImplementation = u; - })(h.accessibility || (h.accessibility = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(c) { - (function(c) { - var h = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { + r("public flash.accessibility.AccessibilityImplementation"); } __extends(c, a); c.classInitializer = null; @@ -29251,183 +29330,204 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.ASNative); - c.AccessibilityProperties = h; - })(c.accessibility || (c.accessibility = {})); + k.AccessibilityImplementation = t; + })(k.accessibility || (k.accessibility = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.assert, u = c.AVM2.Runtime.asCoerceString, l = function(a) { - function m(a, e, c) { - this._type = u(a); - this._bubbles = !!e; - this._cancelable = !!c; + (function(d) { + (function(d) { + var k = function(a) { + function d() { + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + d.AccessibilityProperties = k; + })(d.accessibility || (d.accessibility = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d) { + this._type = r(a); + this._bubbles = !!c; + this._cancelable = !!d; this._currentTarget = this._target = null; - this._eventPhase = h.EventPhase.AT_TARGET; + this._eventPhase = k.EventPhase.AT_TARGET; this._isDefaultPrevented = this._stopImmediatePropagation = this._stopPropagation = !1; } - __extends(m, a); - m.getInstance = function(a, e) { - var c; - void 0 === e && (e = !1); - void 0 === c && (c = !1); - var k = m._instances[a]; - k || (k = new m(a, e, c), m._instances[a] = k); - k._bubbles = e; - k._cancelable = c; - return k; + __extends(c, a); + c.getInstance = function(a, d) { + var l; + void 0 === d && (d = !1); + void 0 === l && (l = !1); + var m = c._instances[a]; + m || (m = new c(a, d, l), c._instances[a] = m); + m._bubbles = d; + m._cancelable = l; + return m; }; - m.getBroadcastInstance = function(a) { - var e, c; - void 0 === e && (e = !1); - void 0 === c && (c = !1); - var k = m._instances[a]; - k || (k = new m(a, e, c), m._instances[a] = k, s(m.isBroadcastEventType(a))); - k._isBroadcastEvent = !0; - k._bubbles = e; - k._cancelable = c; - return k; + c.getBroadcastInstance = function(a) { + var d, l; + void 0 === d && (d = !1); + void 0 === l && (l = !1); + var m = c._instances[a]; + m || (m = new c(a, d, l), c._instances[a] = m); + m._isBroadcastEvent = !0; + m._bubbles = d; + m._cancelable = l; + return m; }; - m.isBroadcastEventType = function(a) { + c.isBroadcastEventType = function(a) { switch(a) { - case m.ENTER_FRAME: + case c.ENTER_FRAME: ; - case m.EXIT_FRAME: + case c.EXIT_FRAME: ; - case m.FRAME_CONSTRUCTED: + case c.FRAME_CONSTRUCTED: ; - case m.RENDER: + case c.RENDER: ; - case m.ACTIVATE: + case c.ACTIVATE: ; - case m.DEACTIVATE: + case c.DEACTIVATE: return!0; } return!1; }; - Object.defineProperty(m.prototype, "type", {get:function() { + Object.defineProperty(c.prototype, "type", {get:function() { return this._type; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "bubbles", {get:function() { + Object.defineProperty(c.prototype, "bubbles", {get:function() { return this._bubbles; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "cancelable", {get:function() { + Object.defineProperty(c.prototype, "cancelable", {get:function() { return this._cancelable; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "target", {get:function() { + Object.defineProperty(c.prototype, "target", {get:function() { return this._target; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "currentTarget", {get:function() { + Object.defineProperty(c.prototype, "currentTarget", {get:function() { return this._currentTarget; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "eventPhase", {get:function() { + Object.defineProperty(c.prototype, "eventPhase", {get:function() { return this._eventPhase; }, enumerable:!0, configurable:!0}); - m.prototype.stopPropagation = function() { + c.prototype.stopPropagation = function() { this._stopPropagation = !0; }; - m.prototype.stopImmediatePropagation = function() { + c.prototype.stopImmediatePropagation = function() { this._stopImmediatePropagation = this._stopPropagation = !0; }; - m.prototype.preventDefault = function() { + c.prototype.preventDefault = function() { this._cancelable && (this._isDefaultPrevented = !0); }; - m.prototype.isDefaultPrevented = function() { + c.prototype.isDefaultPrevented = function() { return this._isDefaultPrevented; }; - m.prototype.isBroadcastEvent = function() { + c.prototype.isBroadcastEvent = function() { return!!this._isBroadcastEvent; }; - m.prototype.clone = function() { - return new m(this._type, this._bubbles, this._cancelable); + c.prototype.clone = function() { + return new c(this._type, this._bubbles, this._cancelable); }; - m.prototype.toString = function() { + c.prototype.toString = function() { return this.formatToString("Event", "type", "bubbles", "cancelable", "eventPhase"); }; - m.prototype.formatToString = function(a) { - for (var e = [], c = 1;c < arguments.length;c++) { - e[c - 1] = arguments[c]; + c.prototype.formatToString = function(a) { + for (var c = [], d = 1;d < arguments.length;d++) { + c[d - 1] = arguments[d]; } - for (var c = "[" + a, k = 0;k < e.length;k++) { - var f = e[k], d = this.asGetPublicProperty(f); - "string" === typeof d && (d = '"' + d + '"'); - c += " " + f + "=" + d; + for (var d = "[" + a, l = 0;l < c.length;l++) { + var g = c[l], f = this.asGetPublicProperty(g); + "string" === typeof f && (f = '"' + f + '"'); + d += " " + g + "=" + f; } - return c + "]"; + return d + "]"; }; - m.classInitializer = function() { - m._instances = c.ObjectUtilities.createMap(); + c.classInitializer = function() { + c._instances = d.ObjectUtilities.createMap(); }; - m.initializer = null; - m.classSymbols = null; - m.instanceSymbols = null; - m.ACTIVATE = "activate"; - m.ADDED = "added"; - m.ADDED_TO_STAGE = "addedToStage"; - m.CANCEL = "cancel"; - m.CHANGE = "change"; - m.CLEAR = "clear"; - m.CLOSE = "close"; - m.COMPLETE = "complete"; - m.CONNECT = "connect"; - m.COPY = "copy"; - m.CUT = "cut"; - m.DEACTIVATE = "deactivate"; - m.ENTER_FRAME = "enterFrame"; - m.FRAME_CONSTRUCTED = "frameConstructed"; - m.EXIT_FRAME = "exitFrame"; - m.FRAME_LABEL = "frameLabel"; - m.ID3 = "id3"; - m.INIT = "init"; - m.MOUSE_LEAVE = "mouseLeave"; - m.OPEN = "open"; - m.PASTE = "paste"; - m.REMOVED = "removed"; - m.REMOVED_FROM_STAGE = "removedFromStage"; - m.RENDER = "render"; - m.RESIZE = "resize"; - m.SCROLL = "scroll"; - m.TEXT_INTERACTION_MODE_CHANGE = "textInteractionModeChange"; - m.SELECT = "select"; - m.SELECT_ALL = "selectAll"; - m.SOUND_COMPLETE = "soundComplete"; - m.TAB_CHILDREN_CHANGE = "tabChildrenChange"; - m.TAB_ENABLED_CHANGE = "tabEnabledChange"; - m.TAB_INDEX_CHANGE = "tabIndexChange"; - m.UNLOAD = "unload"; - m.FULLSCREEN = "fullScreen"; - m.CONTEXT3D_CREATE = "context3DCreate"; - m.TEXTURE_READY = "textureReady"; - m.VIDEO_FRAME = "videoFrame"; - m.SUSPEND = "suspend"; - m.AVM1_INIT = "initialize"; - m.AVM1_CONSTRUCT = "construct"; - m.AVM1_LOAD = "load"; - return m; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.ACTIVATE = "activate"; + c.ADDED = "added"; + c.ADDED_TO_STAGE = "addedToStage"; + c.CANCEL = "cancel"; + c.CHANGE = "change"; + c.CLEAR = "clear"; + c.CLOSE = "close"; + c.COMPLETE = "complete"; + c.CONNECT = "connect"; + c.COPY = "copy"; + c.CUT = "cut"; + c.DEACTIVATE = "deactivate"; + c.ENTER_FRAME = "enterFrame"; + c.FRAME_CONSTRUCTED = "frameConstructed"; + c.EXIT_FRAME = "exitFrame"; + c.FRAME_LABEL = "frameLabel"; + c.ID3 = "id3"; + c.INIT = "init"; + c.MOUSE_LEAVE = "mouseLeave"; + c.OPEN = "open"; + c.PASTE = "paste"; + c.REMOVED = "removed"; + c.REMOVED_FROM_STAGE = "removedFromStage"; + c.RENDER = "render"; + c.RESIZE = "resize"; + c.SCROLL = "scroll"; + c.TEXT_INTERACTION_MODE_CHANGE = "textInteractionModeChange"; + c.SELECT = "select"; + c.SELECT_ALL = "selectAll"; + c.SOUND_COMPLETE = "soundComplete"; + c.TAB_CHILDREN_CHANGE = "tabChildrenChange"; + c.TAB_ENABLED_CHANGE = "tabEnabledChange"; + c.TAB_INDEX_CHANGE = "tabIndexChange"; + c.UNLOAD = "unload"; + c.FULLSCREEN = "fullScreen"; + c.CONTEXT3D_CREATE = "context3DCreate"; + c.TEXTURE_READY = "textureReady"; + c.VIDEO_FRAME = "videoFrame"; + c.SUSPEND = "suspend"; + c.AVM1_INIT = "initialize"; + c.AVM1_CONSTRUCT = "construct"; + c.AVM1_LOAD = "load"; + return c; }(a.ASNative); - h.Event = l; - })(h.events || (h.events = {})); + k.Event = t; + })(k.events || (k.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = c.isFunction, l = c.isNullOrUndefined, e = c.AVM2.Runtime.throwError, m = c.Debug.assert, t = c.AVM2.AS.traceEventsOption, q = function() { - return function(a, b, e) { + var u = d.AVM2.Runtime.asCoerceString, t = d.isFunction, l = d.isNullOrUndefined, c = d.AVM2.Runtime.throwError, h = function() { + return function(a, c, b) { this.listener = a; - this.useCapture = b; - this.priority = e; + this.useCapture = c; + this.priority = b; }; - }(), n = function() { + }(), p = function() { function a() { this._aliasCount = 0; this._entries = []; @@ -29435,20 +29535,20 @@ var RtmpJs; a.prototype.isEmpty = function() { return 0 === this._entries.length; }; - a.prototype.insert = function(a, d, e) { - for (var c = this._entries, f = c.length, k = f - 1;0 <= k;k--) { - var m = c[k]; - if (m.listener === a) { + a.prototype.insert = function(a, b, e) { + for (var c = this._entries, d = c.length, g = d - 1;0 <= g;g--) { + var l = c[g]; + if (l.listener === a) { return; } - if (e > m.priority) { - f = k; + if (e > l.priority) { + d = g; } else { break; } } c = this.ensureNonAliasedEntries(); - c.splice(f, 0, new q(a, d, e)); + c.splice(d, 0, new h(a, b, e)); }; a.prototype.ensureNonAliasedEntries = function() { var a = this._entries; @@ -29456,8 +29556,8 @@ var RtmpJs; return a; }; a.prototype.remove = function(a) { - for (var d = this._entries, e = 0;e < d.length;e++) { - if (d[e].listener === a) { + for (var b = this._entries, e = 0;e < b.length;e++) { + if (b[e].listener === a) { this.ensureNonAliasedEntries().splice(e, 1); break; } @@ -29471,40 +29571,40 @@ var RtmpJs; this._entries === a && 0 < this._aliasCount && this._aliasCount--; }; return a; - }(), k = function() { + }(), s = function() { function a() { this.reset(); } a.prototype.reset = function() { this._queues = Object.create(null); }; - a.prototype.add = function(a, d) { - m(v.Event.isBroadcastEventType(a), "Can only register broadcast events."); + a.prototype.add = function(a, b) { var e = this._queues[a] || (this._queues[a] = []); - 0 <= e.indexOf(d) || e.push(d); + 0 <= e.indexOf(b) || e.push(b); }; - a.prototype.remove = function(a, d) { - m(v.Event.isBroadcastEventType(a), "Can only unregister broadcast events."); - var e = this._queues[a]; - m(e, "There should already be a queue for this."); - var c = e.indexOf(d); - m(0 <= c, "Target should be somewhere in this queue."); + a.prototype.remove = function(a, b) { + var e = this._queues[a], c = e.indexOf(b); e[c] = null; - m(0 > e.indexOf(d), "Target shouldn't be in this queue anymore."); }; a.prototype.dispatchEvent = function(a) { - m(a.isBroadcastEvent(), "Cannot dispatch non-broadcast events."); - var d = this._queues[a.type]; - if (d) { - t.value && console.log("Broadcast event of type " + a._type + " to " + d.length + " listeners"); - for (var e = 0, c = 0;c < d.length;c++) { - var f = d[c]; - null === f ? e++ : f.dispatchEvent(a); + var b = this._queues[a.type]; + if (b) { + for (var e = 0, c = 0;c < b.length;c++) { + var d = b[c]; + if (null === d) { + e++; + } else { + try { + d.dispatchEvent(a); + } catch (g) { + console.warn("caught error under broadcast event " + a.type + ": ", g); + } + } } - if (16 < e && e > d.length >> 1) { + if (16 < e && e > b.length >> 1) { e = []; - for (c = 0;c < d.length;c++) { - d[c] && e.push(d[c]); + for (c = 0;c < b.length;c++) { + b[c] && e.push(b[c]); } this._queues[a.type] = e; } @@ -29515,667 +29615,661 @@ var RtmpJs; }; return a; }(); - v.BroadcastEventDispatchQueue = k; - var f = function(d) { - function b(a) { + v.BroadcastEventDispatchQueue = s; + var m = function(d) { + function f(a) { void 0 === a && (a = null); this._target = a || this; } - __extends(b, d); - b.prototype.toString = function() { + __extends(f, d); + f.prototype.toString = function() { return a.ASObject.dynamicPrototype.$BgtoString.call(this); }; - b.prototype._getListenersForType = function(a, b) { - var d = a ? this._captureListeners : this._targetOrBubblingListeners; - return d ? d[b] : null; + f.prototype._getListenersForType = function(a, e) { + var c = a ? this._captureListeners : this._targetOrBubblingListeners; + return c ? c[e] : null; }; - b.prototype._getListeners = function(a) { + f.prototype._getListeners = function(a) { return a ? this._captureListeners || (this._captureListeners = Object.create(null)) : this._targetOrBubblingListeners || (this._targetOrBubblingListeners = Object.create(null)); }; - b.prototype.addEventListener = function(a, d, c, f, k) { - void 0 === c && (c = !1); - void 0 === f && (f = 0); - void 0 === k && (k = !1); - (2 > arguments.length || 5 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/addEventListener()", 2, arguments.length); - u(d) || e("TypeError", h.Errors.CheckTypeFailedError, d, "Function"); - l(a) && e("TypeError", h.Errors.NullPointerError, "type"); - a = p(a); - c = !!c; - f |= 0; - k = !!k; - var m = this._getListeners(c); - (m[a] || (m[a] = new n)).insert(d, c, f); - !c && v.Event.isBroadcastEventType(a) && b.broadcastEventDispatchQueue.add(a, this); + f.prototype.addEventListener = function(a, e, d, g, h) { + void 0 === d && (d = !1); + void 0 === g && (g = 0); + void 0 === h && (h = !1); + (2 > arguments.length || 5 < arguments.length) && c("ArgumentError", k.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/addEventListener()", 2, arguments.length); + t(e) || c("TypeError", k.Errors.CheckTypeFailedError, e, "Function"); + l(a) && c("TypeError", k.Errors.NullPointerError, "type"); + a = u(a); + d = !!d; + g |= 0; + h = !!h; + var m = this._getListeners(d); + (m[a] || (m[a] = new p)).insert(e, d, g); + !d && v.Event.isBroadcastEventType(a) && f.broadcastEventDispatchQueue.add(a, this); }; - b.prototype.removeEventListener = function(a, d, c) { - void 0 === c && (c = !1); - (2 > arguments.length || 3 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/removeEventListener()", 2, arguments.length); - u(d) || e("TypeError", h.Errors.CheckTypeFailedError, d, "Function"); - l(a) && e("TypeError", h.Errors.NullPointerError, "type"); - a = p(a); - var f = this._getListeners(!!c), k = f[a]; - k && (k.remove(d), k.isEmpty() && (!c && v.Event.isBroadcastEventType(a) && b.broadcastEventDispatchQueue.remove(a, this), f[a] = null)); + f.prototype.removeEventListener = function(a, e, d) { + void 0 === d && (d = !1); + (2 > arguments.length || 3 < arguments.length) && c("ArgumentError", k.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/removeEventListener()", 2, arguments.length); + t(e) || c("TypeError", k.Errors.CheckTypeFailedError, e, "Function"); + l(a) && c("TypeError", k.Errors.NullPointerError, "type"); + a = u(a); + var g = this._getListeners(!!d), h = g[a]; + h && (h.remove(e), h.isEmpty() && (!d && v.Event.isBroadcastEventType(a) && f.broadcastEventDispatchQueue.remove(a, this), g[a] = null)); }; - b.prototype._hasTargetOrBubblingEventListener = function(a) { + f.prototype._hasTargetOrBubblingEventListener = function(a) { return!(!this._targetOrBubblingListeners || !this._targetOrBubblingListeners[a]); }; - b.prototype._hasCaptureEventListener = function(a) { + f.prototype._hasCaptureEventListener = function(a) { return!(!this._captureListeners || !this._captureListeners[a]); }; - b.prototype._hasEventListener = function(a) { + f.prototype._hasEventListener = function(a) { return this._hasTargetOrBubblingEventListener(a) || this._hasCaptureEventListener(a); }; - b.prototype.hasEventListener = function(a) { - 1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length); - l(a) && e("TypeError", h.Errors.NullPointerError, "type"); - a = p(a); + f.prototype.hasEventListener = function(a) { + 1 !== arguments.length && c("ArgumentError", k.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length); + l(a) && c("TypeError", k.Errors.NullPointerError, "type"); + a = u(a); return this._hasEventListener(a); }; - b.prototype.willTrigger = function(a) { - 1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length); - l(a) && e("TypeError", h.Errors.NullPointerError, "type"); - a = p(a); + f.prototype.willTrigger = function(a) { + 1 !== arguments.length && c("ArgumentError", k.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length); + l(a) && c("TypeError", k.Errors.NullPointerError, "type"); + a = u(a); if (this._hasEventListener(a)) { return!0; } - if (s.display.DisplayObject.isType(this)) { - var b = this._parent; + if (r.display.DisplayObject.isType(this)) { + var e = this._parent; do { - if (b._hasEventListener(a)) { + if (e._hasEventListener(a)) { return!0; } - } while (b = b._parent); + } while (e = e._parent); } return!1; }; - b.prototype._skipDispatchEvent = function(a) { + f.prototype._skipDispatchEvent = function(a) { if (this._hasEventListener(a.type)) { return!1; } - if (!a.isBroadcastEvent() && a._bubbles && s.display.DisplayObject.isType(this)) { - for (var b = this._parent;b;b = b._parent) { - if (b._hasEventListener(a.type)) { + if (!a.isBroadcastEvent() && a._bubbles && r.display.DisplayObject.isType(this)) { + for (var e = this._parent;e;e = e._parent) { + if (e._hasEventListener(a.type)) { return!1; } } } return!0; }; - b.prototype.dispatchEvent = function(a) { - 1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/dispatchEvent()", 1, arguments.length); + f.prototype.dispatchEvent = function(a) { + 1 !== arguments.length && c("ArgumentError", k.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/dispatchEvent()", 1, arguments.length); if (this._skipDispatchEvent(a)) { return!0; } - t.value && console.log("Dispatch event of type " + a._type); - h.counter.count("EventDispatcher::dispatchEvent"); - var d = a._type, c = this._target; - h.counter.count("EventDispatcher::dispatchEvent(" + d + ")"); - var f = !0, k = []; - if (!a.isBroadcastEvent() && s.display.DisplayObject.isType(this)) { + var e = a._type, d = this._target, g = !0, h = []; + if (!a.isBroadcastEvent() && r.display.DisplayObject.isType(this)) { for (var l = this._parent;l;) { - l._hasEventListener(d) && k.push(l), l = l._parent; + l._hasEventListener(e) && h.push(l), l = l._parent; } - for (l = k.length - 1;0 <= l && f;l--) { - var n = k[l]; - if (n._hasCaptureEventListener(d)) { - var q = n._getListenersForType(!0, d); - m(q); - f = b.callListeners(q, a, c, n, v.EventPhase.CAPTURING_PHASE); + for (l = h.length - 1;0 <= l && g;l--) { + var m = h[l]; + if (m._hasCaptureEventListener(e)) { + var p = m._getListenersForType(!0, e), g = f.callListeners(p, a, d, m, v.EventPhase.CAPTURING_PHASE) } } } - f && (q = this._getListenersForType(!1, d)) && (f = b.callListeners(q, a, c, c, v.EventPhase.AT_TARGET)); - if (!a.isBroadcastEvent() && f && a.bubbles) { - for (l = 0;l < k.length && f;l++) { - n = k[l], n._hasTargetOrBubblingEventListener(d) && (q = n._getListenersForType(!1, d), f = b.callListeners(q, a, c, n, v.EventPhase.BUBBLING_PHASE)); + g && (p = this._getListenersForType(!1, e)) && (g = f.callListeners(p, a, d, d, v.EventPhase.AT_TARGET)); + if (!a.isBroadcastEvent() && g && a.bubbles) { + for (l = 0;l < h.length && g;l++) { + m = h[l], m._hasTargetOrBubblingEventListener(e) && (p = m._getListenersForType(!1, e), g = f.callListeners(p, a, d, m, v.EventPhase.BUBBLING_PHASE)); } } return!a._isDefaultPrevented; }; - b.callListeners = function(a, b, d, e, c) { + f.callListeners = function(a, e, c, f, d) { if (a.isEmpty()) { return!0; } - b._target && (b = b.asCallPublicProperty("clone", null)); - for (var f = a.snapshot(), k = 0;k < f.length;k++) { - var m = f[k]; - b._target = d; - b._currentTarget = e; - b._eventPhase = c; - m.listener(b); - if (b._stopImmediatePropagation) { + e._target && (e = e.asCallPublicProperty("clone", null)); + for (var g = a.snapshot(), h = 0;h < g.length;h++) { + var l = g[h]; + e._target = c; + e._currentTarget = f; + e._eventPhase = d; + l.listener(e); + if (e._stopImmediatePropagation) { break; } } - a.releaseSnapshot(f); - return!b._stopPropagation; + a.releaseSnapshot(g); + return!e._stopPropagation; }; - b.classInitializer = function() { - b.broadcastEventDispatchQueue = new k; + f.classInitializer = function() { + f.broadcastEventDispatchQueue = new s; }; - b.initializer = function() { + f.initializer = function() { this._target = this; this._targetOrBubblingListeners = this._captureListeners = null; }; - b.classSymbols = null; - b.instanceSymbols = null; - return b; + f.classSymbols = null; + f.instanceSymbols = null; + return f; }(a.ASNative); - v.EventDispatcher = f; - })(s.events || (s.events = {})); + v.EventDispatcher = m; + })(r.events || (r.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { a.call(this); - s("public flash.events.EventPhase"); + r("public flash.events.EventPhase"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.CAPTURING_PHASE = 1; - e.AT_TARGET = 2; - e.BUBBLING_PHASE = 3; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.CAPTURING_PHASE = 1; + c.AT_TARGET = 2; + c.BUBBLING_PHASE = 3; + return c; }(a.ASNative); - h.EventPhase = u; - })(h.events || (h.events = {})); + k.EventPhase = t; + })(k.events || (k.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = function(a) { - function e(e, c, h, n) { - a.call(this, e, c, h); - this._text = n; + (function(k) { + var u = d.Debug.notImplemented, t = function(a) { + function c(c, d, k, m) { + a.call(this, c, d, k); + this._text = m; } - __extends(e, a); - Object.defineProperty(e.prototype, "text", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "text", {get:function() { return this._text; }, set:function(a) { this._text = a; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - var a = new e(this.type, this.bubbles, this.cancelable, this.text); + c.prototype.clone = function() { + var a = new c(this.type, this.bubbles, this.cancelable, this.text); this.copyNativeData(a); return a; }; - e.prototype.toString = function() { + c.prototype.toString = function() { return this.formatToString("TextEvent", "type", "bubbles", "cancelable", "text"); }; - e.prototype.copyNativeData = function(a) { - p("public flash.events.TextEvent::copyNativeData"); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.LINK = "link"; - e.TEXT_INPUT = "textInput"; - return e; - }(a.events.Event); - h.TextEvent = u; - })(a.events || (a.events = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(a) { - (function(c) { - var h = function(a) { - function c(e, m, l, h, n) { - void 0 === m && (m = !1); - void 0 === l && (l = !1); - void 0 === h && (h = ""); - void 0 === n && (n = 0); - a.call(this, e, m, l, h); - this.setID(n); - } - __extends(c, a); - c.prototype.setID = function(a) { - this._id = a; - }; - Object.defineProperty(c.prototype, "errorID", {get:function() { - return this._id; - }, enumerable:!0, configurable:!0}); - c.prototype.clone = function() { - return new c(this.type, this.bubbles, this.cancelable, this.text, this.errorID); - }; - c.prototype.toString = function() { - return this.formatToString("ErrorEvent", "type", "bubbles", "cancelable", "text", "errorID"); + c.prototype.copyNativeData = function(a) { + u("public flash.events.TextEvent::copyNativeData"); }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; - c.ERROR = "error"; + c.LINK = "link"; + c.TEXT_INPUT = "textInput"; return c; - }(a.events.TextEvent); - c.ErrorEvent = h; - })(a.events || (a.events = {})); - })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h, n) { - a.call(this, void 0, void 0, void 0); - p("public flash.events.GameInputEvent"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.DEVICE_ADDED = "deviceAdded"; - e.DEVICE_REMOVED = "deviceRemoved"; - return e; }(a.events.Event); - h.GameInputEvent = u; + k.TextEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(h) { - var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.dummyConstructor, l = c.Debug.somewhatImplemented, e = function(e) { - function c(a, l, k, f, d, b, g, r, h) { - e.call(this, void 0, void 0, void 0); - u("public flash.events.GestureEvent"); + (function(d) { + var k = function(a) { + function d(c, h, l, k, m) { + void 0 === h && (h = !1); + void 0 === l && (l = !1); + void 0 === k && (k = ""); + void 0 === m && (m = 0); + a.call(this, c, h, l, k); + this.setID(m); } - __extends(c, e); - Object.defineProperty(c.prototype, "localX", {get:function() { + __extends(d, a); + d.prototype.setID = function(a) { + this._id = a; + }; + Object.defineProperty(d.prototype, "errorID", {get:function() { + return this._id; + }, enumerable:!0, configurable:!0}); + d.prototype.clone = function() { + return new d(this.type, this.bubbles, this.cancelable, this.text, this.errorID); + }; + d.prototype.toString = function() { + return this.formatToString("ErrorEvent", "type", "bubbles", "cancelable", "text", "errorID"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.ERROR = "error"; + return d; + }(a.events.TextEvent); + d.ErrorEvent = k; + })(a.events || (a.events = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k, m) { + a.call(this, void 0, void 0, void 0); + u("public flash.events.GameInputEvent"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.DEVICE_ADDED = "deviceAdded"; + c.DEVICE_REMOVED = "deviceRemoved"; + return c; + }(a.events.Event); + k.GameInputEvent = t; + })(a.events || (a.events = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.AVM2.Runtime.asCoerceString, t = d.Debug.dummyConstructor, l = d.Debug.somewhatImplemented, c = function(c) { + function d(a, l, g, f, b, e, q, n, p) { + c.call(this, void 0, void 0, void 0); + t("public flash.events.GestureEvent"); + } + __extends(d, c); + Object.defineProperty(d.prototype, "localX", {get:function() { return this._localX; }, set:function(a) { this._localX = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "localY", {get:function() { + Object.defineProperty(d.prototype, "localY", {get:function() { return this._localY; }, set:function(a) { this._localY = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "stageX", {get:function() { + Object.defineProperty(d.prototype, "stageX", {get:function() { l("public flash.events.GestureEvent::stageX"); return 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "stageY", {get:function() { + Object.defineProperty(d.prototype, "stageY", {get:function() { l("public flash.events.GestureEvent::stageY"); return 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "ctrlKey", {get:function() { + Object.defineProperty(d.prototype, "ctrlKey", {get:function() { return this._ctrlKey; }, set:function(a) { this._ctrlKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "altKey", {get:function() { + Object.defineProperty(d.prototype, "altKey", {get:function() { return this._altKey; }, set:function(a) { this._altKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "shiftKey", {get:function() { + Object.defineProperty(d.prototype, "shiftKey", {get:function() { return this._shiftKey; }, set:function(a) { this._shiftKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "phase", {get:function() { + Object.defineProperty(d.prototype, "phase", {get:function() { return this._phase; }, set:function(a) { - this._phase = p(a); + this._phase = u(a); }, enumerable:!0, configurable:!0}); - c.prototype.updateAfterEvent = function() { + d.prototype.updateAfterEvent = function() { l("public flash.events.GestureEvent::updateAfterEvent"); }; - c.prototype.NativeCtor = function(a, e, c, f, d, b) { - this._phase = p(a); - this._localX = +e; - this._localY = +c; + d.prototype.NativeCtor = function(a, c, d, f, b, e) { + this._phase = u(a); + this._localX = +c; + this._localY = +d; this._ctrlKey = !!f; - this._altKey = !!d; - this._shiftKey = !!b; + this._altKey = !!b; + this._shiftKey = !!e; }; - c.prototype.clone = function() { + d.prototype.clone = function() { return new a.events.GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey); }; - c.prototype.toString = function() { + d.prototype.toString = function() { return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "ctrlKey", "altKey", "shiftKey"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.GESTURE_TWO_FINGER_TAP = "gestureTwoFingerTap"; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.GESTURE_TWO_FINGER_TAP = "gestureTwoFingerTap"; + return d; }(a.events.Event); - h.GestureEvent = e; + k.GestureEvent = c; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h, n) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k, m) { a.call(this, void 0, void 0, void 0); - p("public flash.events.HTTPStatusEvent"); + u("public flash.events.HTTPStatusEvent"); } - __extends(e, a); - e.prototype._setStatus = function(a) { + __extends(c, a); + c.prototype._setStatus = function(a) { this._status = a; }; - Object.defineProperty(e.prototype, "status", {get:function() { + Object.defineProperty(c.prototype, "status", {get:function() { return this._status; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "responseURL", {get:function() { + Object.defineProperty(c.prototype, "responseURL", {get:function() { return this._responseURL; }, set:function(a) { this._responseURL = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "responseHeaders", {get:function() { + Object.defineProperty(c.prototype, "responseHeaders", {get:function() { return this._responseHeaders; }, set:function(a) { this._responseHeaders = a; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - var a = new h.HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status); + c.prototype.clone = function() { + var a = new k.HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status); a.responseURL = this.responseURL; a.responseHeaders = this.responseHeaders; return a; }; - e.prototype.toString = function() { - return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status", "responseURL", "responseHeaders"); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.HTTP_STATUS = "httpStatus"; - e.HTTP_RESPONSE_STATUS = "httpResponseStatus"; - return e; - }(a.events.Event); - h.HTTPStatusEvent = u; - })(a.events || (a.events = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(a) { - (function(c) { - var h = function(a) { - function c(e, m, l, h, n) { - void 0 === m && (m = !1); - void 0 === l && (l = !1); - void 0 === h && (h = ""); - void 0 === n && (n = 0); - a.call(this, e, m, l, h, n); - } - __extends(c, a); - c.prototype.clone = function() { - var a = new c(this.type, this.bubbles, this.cancelable, this.text, this.errorID); - this.copyNativeData(a); - return a; - }; c.prototype.toString = function() { - return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "text", "errorID"); + return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status", "responseURL", "responseHeaders"); }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; - c.IO_ERROR = "ioError"; - c.NETWORK_ERROR = "networkError"; - c.DISK_ERROR = "diskError"; - c.VERIFY_ERROR = "verifyError"; + c.HTTP_STATUS = "httpStatus"; + c.HTTP_RESPONSE_STATUS = "httpResponseStatus"; return c; - }(a.events.ErrorEvent); - c.IOErrorEvent = h; + }(a.events.Event); + k.HTTPStatusEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h, n, k, f, d, b, g) { - a.call(this, void 0, void 0, void 0); - p("public flash.events.KeyboardEvent"); + (function(d) { + var k = function(a) { + function d(c, h, l, k, m) { + void 0 === h && (h = !1); + void 0 === l && (l = !1); + void 0 === k && (k = ""); + void 0 === m && (m = 0); + a.call(this, c, h, l, k, m); } - __extends(e, a); - Object.defineProperty(e.prototype, "charCode", {get:function() { + __extends(d, a); + d.prototype.clone = function() { + var a = new d(this.type, this.bubbles, this.cancelable, this.text, this.errorID); + this.copyNativeData(a); + return a; + }; + d.prototype.toString = function() { + return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "text", "errorID"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.IO_ERROR = "ioError"; + d.NETWORK_ERROR = "networkError"; + d.DISK_ERROR = "diskError"; + d.VERIFY_ERROR = "verifyError"; + return d; + }(a.events.ErrorEvent); + d.IOErrorEvent = k; + })(a.events || (a.events = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k, m, g, f, b, e, q) { + a.call(this, void 0, void 0, void 0); + u("public flash.events.KeyboardEvent"); + } + __extends(c, a); + Object.defineProperty(c.prototype, "charCode", {get:function() { return this._charCode; }, set:function(a) { this._charCode = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "keyCode", {get:function() { + Object.defineProperty(c.prototype, "keyCode", {get:function() { return this._keyCode; }, set:function(a) { this._keyCode = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "keyLocation", {get:function() { + Object.defineProperty(c.prototype, "keyLocation", {get:function() { return this._keyLocation; }, set:function(a) { this._keyLocation = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "ctrlKey", {get:function() { + Object.defineProperty(c.prototype, "ctrlKey", {get:function() { return this._ctrlKey; }, set:function(a) { this._ctrlKey = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "altKey", {get:function() { + Object.defineProperty(c.prototype, "altKey", {get:function() { return this._altKey; }, set:function(a) { this._altKey = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "shiftKey", {get:function() { + Object.defineProperty(c.prototype, "shiftKey", {get:function() { return this._shiftKey; }, set:function(a) { this._shiftKey = a; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new h.KeyboardEvent(this.type, this.bubbles, this.cancelable, this.charCode, this.keyCode, this.keyLocation, this.ctrlKey, this.altKey, this.shiftKey); + c.prototype.clone = function() { + return new k.KeyboardEvent(this.type, this.bubbles, this.cancelable, this.charCode, this.keyCode, this.keyLocation, this.ctrlKey, this.altKey, this.shiftKey); }; - e.prototype.toString = function() { + c.prototype.toString = function() { return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey"); }; - e.prototype.updateAfterEvent = function() { - c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); + c.prototype.updateAfterEvent = function() { + d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.KEY_DOWN = "keyDown"; - e.KEY_UP = "keyUp"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.KEY_DOWN = "keyDown"; + c.KEY_UP = "keyUp"; + return c; }(a.events.Event); - h.KeyboardEvent = u; + k.KeyboardEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(e) { - function m(a, c, m, k, f, d, b, g, l, h, s) { - e.call(this, void 0, void 0, void 0); - u("public flash.events.MouseEvent"); + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(c) { + function h(a, d, h, g, f, b, e, l, n, k, r) { + c.call(this, void 0, void 0, void 0); + t("public flash.events.MouseEvent"); } - __extends(m, e); - m.typeFromDOMType = function(a) { + __extends(h, c); + h.typeFromDOMType = function(a) { switch(a) { case "click": - return m.CLICK; + return h.CLICK; case "dblclick": - return m.DOUBLE_CLICK; + return h.DOUBLE_CLICK; case "mousedown": - return m.MOUSE_DOWN; + return h.MOUSE_DOWN; case "mouseout": ; case "mouseover": ; case "mousemove": - return m.MOUSE_MOVE; + return h.MOUSE_MOVE; case "mouseup": - return m.MOUSE_UP; + return h.MOUSE_UP; default: - p(a); + u(a); } }; - Object.defineProperty(m.prototype, "localX", {get:function() { + Object.defineProperty(h.prototype, "localX", {get:function() { return this._localX / 20 | 0; }, set:function(a) { this._localX = 20 * a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "localY", {get:function() { + Object.defineProperty(h.prototype, "localY", {get:function() { return this._localY / 20 | 0; }, set:function(a) { this._localY = 20 * a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "stageX", {get:function() { + Object.defineProperty(h.prototype, "stageX", {get:function() { return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().x / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "stageY", {get:function() { + Object.defineProperty(h.prototype, "stageY", {get:function() { return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().y / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "movementX", {get:function() { + Object.defineProperty(h.prototype, "movementX", {get:function() { return this._movementX || 0; }, set:function(a) { this._movementX = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "movementY", {get:function() { + Object.defineProperty(h.prototype, "movementY", {get:function() { return this._movementY || 0; }, set:function(a) { this._movementY = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "delta", {get:function() { + Object.defineProperty(h.prototype, "delta", {get:function() { return this._delta; }, set:function(a) { this._delta = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "ctrlKey", {get:function() { + Object.defineProperty(h.prototype, "ctrlKey", {get:function() { return this._ctrlKey; }, set:function(a) { this._ctrlKey = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "altKey", {get:function() { + Object.defineProperty(h.prototype, "altKey", {get:function() { return this._altKey; }, set:function(a) { this._altKey = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "shiftKey", {get:function() { + Object.defineProperty(h.prototype, "shiftKey", {get:function() { return this._shiftKey; }, set:function(a) { this._shiftKey = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "buttonDown", {get:function() { + Object.defineProperty(h.prototype, "buttonDown", {get:function() { return this._buttonDown; }, set:function(a) { this._buttonDown = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "relatedObject", {get:function() { + Object.defineProperty(h.prototype, "relatedObject", {get:function() { return this._relatedObject; }, set:function(a) { this._relatedObject = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "isRelatedObjectInaccessible", {get:function() { + Object.defineProperty(h.prototype, "isRelatedObjectInaccessible", {get:function() { return this._isRelatedObjectInaccessible; }, set:function(a) { this._isRelatedObjectInaccessible = a; }, enumerable:!0, configurable:!0}); - m.prototype.updateAfterEvent = function() { - c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); + h.prototype.updateAfterEvent = function() { + d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); }; - m.prototype._getGlobalPoint = function() { - var e = this._position; - e || (e = this._position = new a.geom.Point); - this.target ? (e.setTo(this._localX, this._localY), this._target._getConcatenatedMatrix().transformPointInPlace(e)) : e.setTo(0, 0); - return e; + h.prototype._getGlobalPoint = function() { + var c = this._position; + c || (c = this._position = new a.geom.Point); + this.target ? (c.setTo(this._localX, this._localY), this._target._getConcatenatedMatrix().transformPointInPlace(c)) : c.setTo(0, 0); + return c; }; - m.prototype.clone = function() { + h.prototype.clone = function() { return new a.events.MouseEvent(this.type, this.bubbles, this.cancelable, this.localX, this.localY, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey, this.buttonDown, this.delta); }; - m.prototype.toString = function() { + h.prototype.toString = function() { return this.formatToString("MouseEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta"); }; - m.classInitializer = null; - m.initializer = null; - m.classSymbols = null; - m.instanceSymbols = null; - m.CLICK = "click"; - m.DOUBLE_CLICK = "doubleClick"; - m.MOUSE_DOWN = "mouseDown"; - m.MOUSE_MOVE = "mouseMove"; - m.MOUSE_OUT = "mouseOut"; - m.MOUSE_OVER = "mouseOver"; - m.MOUSE_UP = "mouseUp"; - m.RELEASE_OUTSIDE = "releaseOutside"; - m.MOUSE_WHEEL = "mouseWheel"; - m.ROLL_OUT = "rollOut"; - m.ROLL_OVER = "rollOver"; - m.MIDDLE_CLICK = "middleClick"; - m.MIDDLE_MOUSE_DOWN = "middleMouseDown"; - m.MIDDLE_MOUSE_UP = "middleMouseUp"; - m.RIGHT_CLICK = "rightClick"; - m.RIGHT_MOUSE_DOWN = "rightMouseDown"; - m.RIGHT_MOUSE_UP = "rightMouseUp"; - m.CONTEXT_MENU = "contextMenu"; - return m; + h.classInitializer = null; + h.initializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + h.CLICK = "click"; + h.DOUBLE_CLICK = "doubleClick"; + h.MOUSE_DOWN = "mouseDown"; + h.MOUSE_MOVE = "mouseMove"; + h.MOUSE_OUT = "mouseOut"; + h.MOUSE_OVER = "mouseOver"; + h.MOUSE_UP = "mouseUp"; + h.RELEASE_OUTSIDE = "releaseOutside"; + h.MOUSE_WHEEL = "mouseWheel"; + h.ROLL_OUT = "rollOut"; + h.ROLL_OVER = "rollOver"; + h.MIDDLE_CLICK = "middleClick"; + h.MIDDLE_MOUSE_DOWN = "middleMouseDown"; + h.MIDDLE_MOUSE_UP = "middleMouseUp"; + h.RIGHT_CLICK = "rightClick"; + h.RIGHT_MOUSE_DOWN = "rightMouseDown"; + h.RIGHT_MOUSE_UP = "rightMouseUp"; + h.CONTEXT_MENU = "contextMenu"; + return h; }(a.events.Event); - h.MouseEvent = l; + k.MouseEvent = l; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(c) { - var h = function(c) { - function l(a, c, l, h) { + (function(d) { + var k = function(d) { + function l(a, d, l, k) { } - __extends(l, c); + __extends(l, d); Object.defineProperty(l.prototype, "info", {get:function() { return this._info; }, set:function(a) { @@ -30194,258 +30288,258 @@ var RtmpJs; l.NET_STATUS = "netStatus"; return l; }(a.events.Event); - c.NetStatusEvent = h; + d.NetStatusEvent = k; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(c) { - function e(a, e, h, n, k) { - c.call(this, void 0, void 0, void 0); - p("public flash.events.ProgressEvent"); + (function(k) { + var u = d.Debug.dummyConstructor, t = function(d) { + function c(a, c, k, m, g) { + d.call(this, void 0, void 0, void 0); + u("public flash.events.ProgressEvent"); } - __extends(e, c); - Object.defineProperty(e.prototype, "bytesLoaded", {get:function() { + __extends(c, d); + Object.defineProperty(c.prototype, "bytesLoaded", {get:function() { return this._bytesLoaded; }, set:function(a) { this._bytesLoaded = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "bytesTotal", {get:function() { + Object.defineProperty(c.prototype, "bytesTotal", {get:function() { return this._bytesTotal; }, set:function(a) { this._bytesTotal = a; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { + c.prototype.clone = function() { return new a.events.ProgressEvent(this._type, this._bubbles, this._cancelable, this._bytesLoaded, this._bytesTotal); }; - e.prototype.toString = function() { + c.prototype.toString = function() { return this.formatToString("ProgressEvent", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal"); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.PROGRESS = "progress"; - e.SOCKET_DATA = "socketData"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.PROGRESS = "progress"; + c.SOCKET_DATA = "socketData"; + return c; }(a.events.Event); - h.ProgressEvent = u; + k.ProgressEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h, n, k) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k, m, g) { a.call(this, void 0, void 0, void 0, void 0, void 0); - p("public flash.events.SecurityErrorEvent"); + u("public flash.events.SecurityErrorEvent"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.SECURITY_ERROR = "securityError"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.SECURITY_ERROR = "securityError"; + return c; }(a.events.ErrorEvent); - h.SecurityErrorEvent = u; + k.SecurityErrorEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k) { a.call(this, void 0, void 0, void 0); - p("public flash.events.TimerEvent"); + u("public flash.events.TimerEvent"); } - __extends(e, a); - e.prototype.clone = function() { - return new h.TimerEvent(this.type, this.bubbles, this.cancelable); + __extends(c, a); + c.prototype.clone = function() { + return new k.TimerEvent(this.type, this.bubbles, this.cancelable); }; - e.prototype.toString = function() { + c.prototype.toString = function() { return this.formatToString("TimerEvent", "type", "bubbles", "cancelable", "eventPhase"); }; - e.prototype.updateAfterEvent = function() { - c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); + c.prototype.updateAfterEvent = function() { + d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.TIMER = "timer"; - e.TIMER_COMPLETE = "timerComplete"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.TIMER = "timer"; + c.TIMER_COMPLETE = "timerComplete"; + return c; }(a.events.Event); - h.TimerEvent = u; + k.TimerEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.somewhatImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function m(c, m, l, k, f, d, b, g, r, h, s, p, v, M) { + (function(k) { + var u = d.Debug.somewhatImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function h(d, h, l, g, f, b, e, q, n, k, r, u, v, K) { a.call(this, void 0, void 0, void 0); - u("public flash.events.TouchEvent"); + t("public flash.events.TouchEvent"); } - __extends(m, a); - Object.defineProperty(m.prototype, "touchPointID", {get:function() { + __extends(h, a); + Object.defineProperty(h.prototype, "touchPointID", {get:function() { return this._touchPointID; }, set:function(a) { this._touchPointID = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "isPrimaryTouchPoint", {get:function() { + Object.defineProperty(h.prototype, "isPrimaryTouchPoint", {get:function() { return this._isPrimaryTouchPoint; }, set:function(a) { this._isPrimaryTouchPoint = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "localX", {get:function() { + Object.defineProperty(h.prototype, "localX", {get:function() { return this._localX; }, set:function(a) { this._localX = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "localY", {get:function() { + Object.defineProperty(h.prototype, "localY", {get:function() { return this._localY; }, set:function(a) { this._localY = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "sizeX", {get:function() { + Object.defineProperty(h.prototype, "sizeX", {get:function() { return this._sizeX; }, set:function(a) { this._sizeX = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "sizeY", {get:function() { + Object.defineProperty(h.prototype, "sizeY", {get:function() { return this._sizeY; }, set:function(a) { this._sizeY = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "pressure", {get:function() { + Object.defineProperty(h.prototype, "pressure", {get:function() { return this._pressure; }, set:function(a) { this._pressure = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "relatedObject", {get:function() { + Object.defineProperty(h.prototype, "relatedObject", {get:function() { return this._relatedObject; }, set:function(a) { this._relatedObject = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "ctrlKey", {get:function() { + Object.defineProperty(h.prototype, "ctrlKey", {get:function() { return this._ctrlKey; }, set:function(a) { this._ctrlKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "altKey", {get:function() { + Object.defineProperty(h.prototype, "altKey", {get:function() { return this._altKey; }, set:function(a) { this._altKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "shiftKey", {get:function() { + Object.defineProperty(h.prototype, "shiftKey", {get:function() { return this._shiftKey; }, set:function(a) { this._shiftKey = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "stageX", {get:function() { - p("TouchEvent::get stageX"); + Object.defineProperty(h.prototype, "stageX", {get:function() { + u("TouchEvent::get stageX"); return this._localX; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "stageY", {get:function() { - p("TouchEvent::get stageY"); + Object.defineProperty(h.prototype, "stageY", {get:function() { + u("TouchEvent::get stageY"); return this._localY; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "isRelatedObjectInaccessible", {get:function() { + Object.defineProperty(h.prototype, "isRelatedObjectInaccessible", {get:function() { return this._isRelatedObjectInaccessible; }, set:function(a) { this._isRelatedObjectInaccessible = a; }, enumerable:!0, configurable:!0}); - m.prototype.clone = function() { - return new h.TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey); + h.prototype.clone = function() { + return new k.TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey); }; - m.prototype.toString = function() { + h.prototype.toString = function() { return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", "altKey", "shiftKey"); }; - m.prototype.updateAfterEvent = function() { - c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); + h.prototype.updateAfterEvent = function() { + d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering(); }; - m.classInitializer = null; - m.initializer = null; - m.classSymbols = null; - m.instanceSymbols = null; - m.TOUCH_BEGIN = "touchBegin"; - m.TOUCH_END = "touchEnd"; - m.TOUCH_MOVE = "touchMove"; - m.TOUCH_OVER = "touchOver"; - m.TOUCH_OUT = "touchOut"; - m.TOUCH_ROLL_OVER = "touchRollOver"; - m.TOUCH_ROLL_OUT = "touchRollOut"; - m.TOUCH_TAP = "touchTap"; - m.PROXIMITY_BEGIN = "proximityBegin"; - m.PROXIMITY_END = "proximityEnd"; - m.PROXIMITY_MOVE = "proximityMove"; - m.PROXIMITY_OUT = "proximityOut"; - m.PROXIMITY_OVER = "proximityOver"; - m.PROXIMITY_ROLL_OUT = "proximityRollOut"; - m.PROXIMITY_ROLL_OVER = "proximityRollOver"; - return m; + h.classInitializer = null; + h.initializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + h.TOUCH_BEGIN = "touchBegin"; + h.TOUCH_END = "touchEnd"; + h.TOUCH_MOVE = "touchMove"; + h.TOUCH_OVER = "touchOver"; + h.TOUCH_OUT = "touchOut"; + h.TOUCH_ROLL_OVER = "touchRollOver"; + h.TOUCH_ROLL_OUT = "touchRollOut"; + h.TOUCH_TAP = "touchTap"; + h.PROXIMITY_BEGIN = "proximityBegin"; + h.PROXIMITY_END = "proximityEnd"; + h.PROXIMITY_MOVE = "proximityMove"; + h.PROXIMITY_OUT = "proximityOut"; + h.PROXIMITY_OVER = "proximityOver"; + h.PROXIMITY_ROLL_OUT = "proximityRollOut"; + h.PROXIMITY_ROLL_OVER = "proximityRollOver"; + return h; }(a.events.Event); - h.TouchEvent = l; + k.TouchEvent = l; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(e, c, h, n) { + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(c, d, k, m) { a.call(this, void 0, void 0, void 0, void 0, void 0); - p("public flash.events.UncaughtErrorEvent"); + u("public flash.events.UncaughtErrorEvent"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.UNCAUGHT_ERROR = "uncaughtError"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.UNCAUGHT_ERROR = "uncaughtError"; + return c; }(a.events.ErrorEvent); - h.UncaughtErrorEvent = u; + k.UncaughtErrorEvent = t; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(c) { - var h = function(a) { + (function(d) { + var k = function(a) { function l() { - c.EventDispatcher.instanceConstructorNoInitialize.call(this); + d.EventDispatcher.instanceConstructorNoInitialize.call(this); } __extends(l, a); l.classInitializer = null; @@ -30454,18 +30548,18 @@ var RtmpJs; l.instanceSymbols = null; return l; }(a.events.EventDispatcher); - c.UncaughtErrorEvents = h; + d.UncaughtErrorEvents = k; })(a.events || (a.events = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.isNullOrUndefined, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.throwError, t = c.AVM2.Runtime.checkNullParameter, q = c.Debug.assert, n = c.Bounds, k = a.geom, f = a.events; + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.isNullOrUndefined, c = d.AVM2.Runtime.asCoerceString, h = d.AVM2.Runtime.throwError, p = d.AVM2.Runtime.checkNullParameter, s = d.Bounds, m = a.geom, g = a.events; (function(a) { a[a.None = 0] = "None"; a[a.Visible = 1] = "Visible"; @@ -30499,7 +30593,7 @@ var RtmpJs; a[a.Dirty = a.DirtyMatrix | a.DirtyChildren | a.DirtyGraphics | a.DirtyTextContent | a.DirtyBitmapData | a.DirtyNetStream | a.DirtyColorTransform | a.DirtyMask | a.DirtyClipDepth | a.DirtyMiscellaneousProperties] = "Dirty"; a[a.Bubbling = a.ContainsFrameScriptPendingChildren | a.ContainsMorph] = "Bubbling"; })(v.DisplayObjectFlags || (v.DisplayObjectFlags = {})); - var d = v.DisplayObjectFlags; + var f = v.DisplayObjectFlags; (function(a) { a[a.None = 0] = "None"; a[a.Continue = 0] = "Continue"; @@ -30522,79 +30616,76 @@ var RtmpJs; a[a.Shape = 2] = "Shape"; })(v.HitTestingResult || (v.HitTestingResult = {})); var b = function(b) { - function r() { - f.EventDispatcher.instanceConstructorNoInitialize.call(this); + function q() { + g.EventDispatcher.instanceConstructorNoInitialize.call(this); this._addReference(); this._setFlags(256); } - __extends(r, b); - r.getNextSyncID = function() { + __extends(q, b); + q.getNextSyncID = function() { return this._syncID++; }; - r.reset = function() { - this._advancableInstances = new c.WeakList; + q.reset = function() { + this._advancableInstances = new d.WeakList; }; - r.prototype.createAnimatedDisplayObject = function(b, d, e) { - var g = b.symbolClass; - b = g.isSubtypeOf(a.display.BitmapData) ? a.display.Bitmap.initializeFrom(b) : g.initializeFrom(b); - d.flags & 32 && (b._name = d.name); + q.prototype.createAnimatedDisplayObject = function(b, e, c) { + var f = b.symbolClass; + b = f.isSubtypeOf(a.display.BitmapData) ? a.display.Bitmap.initializeFrom(b) : f.initializeFrom(b); + e.flags & 32 && (b._name = e.name); b._setFlags(4096); - b._animate(d); - e && g.instanceConstructorNoInitialize.call(b); + b._animate(e); + c && f.instanceConstructorNoInitialize.call(b); return b; }; - r.performFrameNavigation = function(b, d) { - b ? (r._runScripts = d, h.enterTimeline("DisplayObject.performFrameNavigation", {instances:0})) : d = r._runScripts; - q(16384 > v.DisplayObject._advancableInstances.length, "Too many advancable instances."); + q.performFrameNavigation = function(b, e) { + b ? (q._runScripts = e, k.enterTimeline("DisplayObject.performFrameNavigation", {instances:0})) : e = q._runScripts; v.DisplayObject._advancableInstances.forEach(function(a) { a._initFrame(b); }); - b && d && r._broadcastFrameEvent(f.Event.ENTER_FRAME); + b && e && q._broadcastFrameEvent(g.Event.ENTER_FRAME); v.DisplayObject._advancableInstances.forEach(function(a) { a._constructFrame(); }); - d ? (r._broadcastFrameEvent(f.Event.FRAME_CONSTRUCTED), v.DisplayObject._advancableInstances.forEach(function(a) { - v.MovieClip.isInstanceOf(a) && !a.parent && a._enqueueFrameScripts(); - }), a.display.DisplayObject._stage._enqueueFrameScripts(), v.MovieClip.runFrameScripts(), r._broadcastFrameEvent(f.Event.EXIT_FRAME)) : v.MovieClip.reset(); - b && (h.leaveTimeline(), r._runScripts = !0); + e ? (q._broadcastFrameEvent(g.Event.FRAME_CONSTRUCTED), v.DisplayObject._advancableInstances.forEach(function(a) { + v.DisplayObjectContainer.isInstanceOf(a) && !a.parent && a._enqueueFrameScripts(); + }), a.display.DisplayObject._stage._enqueueFrameScripts(), v.MovieClip.runFrameScripts(), q._broadcastFrameEvent(g.Event.EXIT_FRAME)) : v.MovieClip.reset(); + b && (k.leaveTimeline(), q._runScripts = !0); }; - r._broadcastFrameEvent = function(a) { + q._broadcastFrameEvent = function(a) { var b; switch(a) { - case f.Event.ENTER_FRAME: + case g.Event.ENTER_FRAME: ; - case f.Event.FRAME_CONSTRUCTED: + case g.Event.FRAME_CONSTRUCTED: ; - case f.Event.EXIT_FRAME: + case g.Event.EXIT_FRAME: ; - case f.Event.RENDER: - b = f.Event.getBroadcastInstance(a); + case g.Event.RENDER: + b = g.Event.getBroadcastInstance(a); } - q(b, "Invalid frame event."); - f.EventDispatcher.broadcastEventDispatchQueue.dispatchEvent(b); + g.EventDispatcher.broadcastEventDispatchQueue.dispatchEvent(b); }; - r.prototype._setInitialName = function() { + q.prototype._setInitialName = function() { this._name = "instance" + a.display.DisplayObject._instanceID++; }; - r.prototype._setParent = function(a, b) { + q.prototype._setParent = function(a, b) { var e = this._parent; - q(a !== this); this._parent = a; this._setDepth(b); if (a) { this._addReference(); - var g = 0; - this._hasFlags(8192) && (g |= 16384); - this._hasAnyFlags(d.Bubbling) && (g |= this._displayObjectFlags & d.Bubbling); - g && a._propagateFlagsUp(g); + var c = 0; + this._hasFlags(8192) && (c |= 16384); + this._hasAnyFlags(f.Bubbling) && (c |= this._displayObjectFlags & f.Bubbling); + c && a._propagateFlagsUp(c); } e && this._removeReference(); }; - r.prototype._setDepth = function(a) { + q.prototype._setDepth = function(a) { -1 < a ? this._setFlags(2048) : this._removeFlags(2048); this._depth = a; }; - r.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, b) { + q.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, b) { this._fillBounds.width = a; this._fillBounds.height = b; this._lineBounds.width = a; @@ -30602,42 +30693,41 @@ var RtmpJs; this._removeFlags(6); this._invalidateParentFillAndLineBounds(!0, !0); }; - r.prototype._setFillAndLineBoundsFromSymbol = function(a) { - q(a.fillBounds || a.lineBounds, "Fill or Line bounds are not defined in the symbol."); + q.prototype._setFillAndLineBoundsFromSymbol = function(a) { a.fillBounds && (this._fillBounds.copyFrom(a.fillBounds), this._removeFlags(4)); a.lineBounds && (this._lineBounds.copyFrom(a.lineBounds), this._removeFlags(2)); this._invalidateParentFillAndLineBounds(!!a.fillBounds, !!a.lineBounds); }; - r.prototype._setFlags = function(a) { + q.prototype._setFlags = function(a) { this._displayObjectFlags |= a; }; - r.prototype._setDirtyFlags = function(a) { + q.prototype._setDirtyFlags = function(a) { this._displayObjectFlags |= a; this._parent && this._parent._propagateFlagsUp(536870912); }; - r.prototype._toggleFlags = function(a, b) { + q.prototype._toggleFlags = function(a, b) { this._displayObjectFlags = b ? this._displayObjectFlags | a : this._displayObjectFlags & ~a; }; - r.prototype._removeFlags = function(a) { + q.prototype._removeFlags = function(a) { this._displayObjectFlags &= ~a; }; - r.prototype._hasFlags = function(a) { + q.prototype._hasFlags = function(a) { return(this._displayObjectFlags & a) === a; }; - r.prototype._hasAnyFlags = function(a) { + q.prototype._hasAnyFlags = function(a) { return!!(this._displayObjectFlags & a); }; - r.prototype._propagateFlagsUp = function(a) { + q.prototype._propagateFlagsUp = function(a) { if (!this._hasFlags(a)) { this._setFlags(a); var b = this._parent; b && b._propagateFlagsUp(a); } }; - r.prototype._propagateFlagsDown = function(a) { + q.prototype._propagateFlagsDown = function(a) { this._setFlags(a); }; - r.prototype._findNearestAncestor = function() { + q.prototype._findNearestAncestor = function() { for (var a = this;a;) { if (!1 === a._hasFlags(128)) { return a; @@ -30646,7 +30736,7 @@ var RtmpJs; } return null; }; - r.prototype._findFurthestAncestorOrSelf = function() { + q.prototype._findFurthestAncestorOrSelf = function() { for (var a = this;a;) { if (!a._parent) { return a; @@ -30654,7 +30744,7 @@ var RtmpJs; a = a._parent; } }; - r.prototype._isAncestor = function(a) { + q.prototype._isAncestor = function(a) { for (;a;) { if (a === this) { return!0; @@ -30663,179 +30753,174 @@ var RtmpJs; } return!1; }; - r._clampRotation = function(a) { + q._clampRotation = function(a) { a %= 360; 180 < a ? a -= 360 : -180 > a && (a += 360); return a; }; - r._getAncestors = function(a, b) { - var d = r._path; - for (d.length = 0;a && a !== b;) { - d.push(a), a = a._parent; + q._getAncestors = function(a, b) { + var e = q._path; + for (e.length = 0;a && a !== b;) { + e.push(a), a = a._parent; } - q(a === b, "Last ancestor is not an ancestor."); - return d; + return e; }; - r.prototype._getConcatenatedMatrix = function() { + q.prototype._getConcatenatedMatrix = function() { this._hasFlags(32) && (this._parent ? this._parent._getConcatenatedMatrix().preMultiplyInto(this._getMatrix(), this._concatenatedMatrix) : this._concatenatedMatrix.copyFrom(this._getMatrix()), this._removeFlags(32)); return this._concatenatedMatrix; }; - r.prototype._getInvertedConcatenatedMatrix = function() { + q.prototype._getInvertedConcatenatedMatrix = function() { this._hasFlags(64) && (this._getConcatenatedMatrix().invertInto(this._invertedConcatenatedMatrix), this._removeFlags(64)); return this._invertedConcatenatedMatrix; }; - r.prototype._setMatrix = function(a, b) { + q.prototype._setMatrix = function(a, b) { if (b || !this._matrix.equals(a)) { - var d = this._matrix; - d.copyFrom(a); - b && d.toTwipsInPlace(); - this._scaleX = d.getScaleX(); - this._scaleY = d.getScaleY(); + var e = this._matrix; + e.copyFrom(a); + b && e.toTwipsInPlace(); + this._scaleX = e.getScaleX(); + this._scaleY = e.getScaleY(); this._skewX = a.getSkewX(); this._skewY = a.getSkewY(); - this._rotation = r._clampRotation(180 * this._skewY / Math.PI); + this._rotation = q._clampRotation(180 * this._skewY / Math.PI); this._removeFlags(8); this._setFlags(16); this._setDirtyFlags(1048576); this._invalidatePosition(); } }; - r.prototype._getMatrix = function() { + q.prototype._getMatrix = function() { this._hasFlags(8) && (this._matrix.updateScaleAndRotation(this._scaleX, this._scaleY, this._skewX, this._skewY), this._removeFlags(8)); return this._matrix; }; - r.prototype._getInvertedMatrix = function() { + q.prototype._getInvertedMatrix = function() { this._hasFlags(16) && (this._getMatrix().invertInto(this._invertedMatrix), this._removeFlags(16)); return this._invertedMatrix; }; - r.prototype._getConcatenatedColorTransform = function() { + q.prototype._getConcatenatedColorTransform = function() { if (!this.stage) { return this._colorTransform.clone(); } if (this._hasFlags(128)) { - var b = this._findNearestAncestor(), d = r._getAncestors(this, b), e = d.length - 1; - a.display.Stage.isType(d[e]) && e--; - for (var g = b && !a.display.Stage.isType(b) ? b._concatenatedColorTransform.clone() : new k.ColorTransform;0 <= e;) { - b = d[e--], q(b._hasFlags(128)), g.preMultiply(b._colorTransform), g.convertToFixedPoint(), b._concatenatedColorTransform.copyFrom(g), b._removeFlags(128); + var b = this._findNearestAncestor(), e = q._getAncestors(this, b), c = e.length - 1; + a.display.Stage.isType(e[c]) && c--; + for (var f = b && !a.display.Stage.isType(b) ? b._concatenatedColorTransform.clone() : new m.ColorTransform;0 <= c;) { + b = e[c--], f.preMultiply(b._colorTransform), f.convertToFixedPoint(), b._concatenatedColorTransform.copyFrom(f), b._removeFlags(128); } } return this._concatenatedColorTransform; }; - r.prototype._setColorTransform = function(a) { + q.prototype._setColorTransform = function(a) { this._colorTransform.copyFrom(a); this._colorTransform.convertToFixedPoint(); this._propagateFlagsDown(128); this._setDirtyFlags(67108864); }; - r.prototype._invalidateFillAndLineBounds = function(a, b) { + q.prototype._invalidateFillAndLineBounds = function(a, b) { this._propagateFlagsUp((b ? 2 : 0) | (a ? 4 : 0)); }; - r.prototype._invalidateParentFillAndLineBounds = function(a, b) { + q.prototype._invalidateParentFillAndLineBounds = function(a, b) { this._parent && this._parent._invalidateFillAndLineBounds(a, b); }; - r.prototype._getContentBounds = function(a) { + q.prototype._getContentBounds = function(a) { void 0 === a && (a = !0); - var b, d; - a ? (b = 2, d = this._lineBounds) : (b = 4, d = this._fillBounds); + var b, e; + a ? (b = 2, e = this._lineBounds) : (b = 4, e = this._fillBounds); if (this._hasFlags(b)) { - var e = this._getGraphics(); - e ? d.copyFrom(e._getContentBounds(a)) : d.setToSentinels(); - this._getChildBounds(d, a); + var c = this._getGraphics(); + c ? e.copyFrom(c._getContentBounds(a)) : e.setToSentinels(); + this._getChildBounds(e, a); this._removeFlags(b); } - return d; + return e; }; - r.prototype._getChildBounds = function(a, b) { + q.prototype._getChildBounds = function(a, b) { }; - r.prototype._getTransformedBounds = function(a, b) { - var d = this._getContentBounds(b).clone(); - if (a === this || d.isEmpty()) { - return d; + q.prototype._getTransformedBounds = function(a, b) { + var e = this._getContentBounds(b).clone(); + if (a === this || e.isEmpty()) { + return e; } - var e; - a ? (e = k.Matrix.TEMP_MATRIX, a._getInvertedConcatenatedMatrix().preMultiplyInto(this._getConcatenatedMatrix(), e)) : e = this._getConcatenatedMatrix(); - e.transformBounds(d); - return d; + var c; + a ? (c = m.Matrix.TEMP_MATRIX, a._getInvertedConcatenatedMatrix().preMultiplyInto(this._getConcatenatedMatrix(), c)) : c = this._getConcatenatedMatrix(); + c.transformBounds(e); + return e; }; - r.prototype._stopTimelineAnimation = function() { + q.prototype._stopTimelineAnimation = function() { this._removeFlags(4096); }; - r.prototype._invalidateMatrix = function() { + q.prototype._invalidateMatrix = function() { this._setDirtyFlags(1048576); this._setFlags(24); this._invalidatePosition(); }; - r.prototype._invalidatePosition = function() { + q.prototype._invalidatePosition = function() { this._propagateFlagsDown(96); this._invalidateParentFillAndLineBounds(!0, !0); }; - r.prototype._animate = function(b) { - q(this._hasFlags(4096)); - var d = !(b.flags & 1) && b.flags & 2; - b.flags & 4 ? (k.Matrix.TEMP_MATRIX.copyFromUntyped(b.matrix), this._setMatrix(k.Matrix.TEMP_MATRIX, !1)) : d && this._setMatrix(k.Matrix.FROZEN_IDENTITY_MATRIX, !1); - b.flags & 8 ? (k.ColorTransform.TEMP_COLOR_TRANSFORM.copyFromUntyped(b.cxform), this._setColorTransform(k.ColorTransform.TEMP_COLOR_TRANSFORM)) : d && this._setColorTransform(k.ColorTransform.FROZEN_IDENTITY_COLOR_TRANSFORM); - if (b.flags & 16 || d) { - var e = b.ratio | 0; - e !== this._ratio && (q(0 <= e && 65535 >= e), this._ratio = e, this._setDirtyFlags(1073741824)); + q.prototype._animate = function(b) { + var e = !(b.flags & 1) && b.flags & 2; + b.flags & 4 ? (m.Matrix.TEMP_MATRIX.copyFromUntyped(b.matrix), this._setMatrix(m.Matrix.TEMP_MATRIX, !1)) : e && this._setMatrix(m.Matrix.FROZEN_IDENTITY_MATRIX, !1); + b.flags & 8 ? (m.ColorTransform.TEMP_COLOR_TRANSFORM.copyFromUntyped(b.cxform), this._setColorTransform(m.ColorTransform.TEMP_COLOR_TRANSFORM)) : e && this._setColorTransform(m.ColorTransform.FROZEN_IDENTITY_COLOR_TRANSFORM); + if (b.flags & 16 || e) { + var c = b.ratio | 0; + c !== this._ratio && (this._ratio = c, this._setDirtyFlags(1073741824)); } - if (b.flags & 64 || d) { - e = void 0 === b.clipDepth ? -1 : b.clipDepth, e !== this._clipDepth && (this._clipDepth = e, this._setDirtyFlags(268435456)); + if (b.flags & 64 || e) { + c = void 0 === b.clipDepth ? -1 : b.clipDepth, c !== this._clipDepth && (this._clipDepth = c, this._setDirtyFlags(268435456)); } if (b.flags & 256) { - for (var e = [], g = b.filters, c = 0;c < g.length;c++) { - var f = g[c], m; - switch(f.type) { + for (var c = [], f = b.filters, d = 0;d < f.length;d++) { + var g = f[d], h; + switch(g.type) { case 0: - m = a.filters.DropShadowFilter.FromUntyped(f); + h = a.filters.DropShadowFilter.FromUntyped(g); break; case 1: - m = a.filters.BlurFilter.FromUntyped(f); + h = a.filters.BlurFilter.FromUntyped(g); break; case 2: - m = a.filters.GlowFilter.FromUntyped(f); + h = a.filters.GlowFilter.FromUntyped(g); break; case 3: - m = a.filters.BevelFilter.FromUntyped(f); + h = a.filters.BevelFilter.FromUntyped(g); break; case 4: - m = a.filters.GradientGlowFilter.FromUntyped(f); + h = a.filters.GradientGlowFilter.FromUntyped(g); break; case 5: - m = a.filters.ConvolutionFilter.FromUntyped(f); + h = a.filters.ConvolutionFilter.FromUntyped(g); break; case 6: - m = a.filters.ColorMatrixFilter.FromUntyped(f); + h = a.filters.ColorMatrixFilter.FromUntyped(g); break; case 7: - m = a.filters.GradientBevelFilter.FromUntyped(f); - break; - default: - q(m, "Unknown filter type."); + h = a.filters.GradientBevelFilter.FromUntyped(g); } - e.push(m); + c.push(h); } - this._filters = e; + this._filters = c; this._setDirtyFlags(1073741824); } else { - d && (this._filters = null, this._setDirtyFlags(1073741824)); + e && (this._filters = null, this._setDirtyFlags(1073741824)); } - if (b.flags & 512 || d) { - m = a.display.BlendMode.fromNumber(void 0 === b.blendMode ? 1 : b.blendMode), m !== this._blendMode && (this._blendMode = m, this._setDirtyFlags(1073741824)); + if (b.flags & 512 || e) { + h = a.display.BlendMode.fromNumber(void 0 === b.blendMode ? 1 : b.blendMode), h !== this._blendMode && (this._blendMode = h, this._setDirtyFlags(1073741824)); } - if (b.flags & 1024 || d) { - m = 0 < b.bmpCache, m !== this._hasFlags(65536) && (this._toggleFlags(65536, m), this._setDirtyFlags(1073741824)); + if (b.flags & 1024 || e) { + h = 0 < b.bmpCache, h !== this._hasFlags(65536) && (this._toggleFlags(65536, h), this._setDirtyFlags(1073741824)); } - if (b.flags & 8192 || d) { + if (b.flags & 8192 || e) { b = 0 !== b.visibility, b !== this._hasFlags(1) && (this._toggleFlags(1, b), this._setDirtyFlags(1073741824)); } }; - r.prototype._propagateEvent = function(a) { + q.prototype._propagateEvent = function(a) { this.visit(function(b) { b.dispatchEvent(a); return 0; }, 0); }; - Object.defineProperty(r.prototype, "x", {get:function() { + Object.defineProperty(q.prototype, "x", {get:function() { return this._getX(); }, set:function(a) { a = 20 * a | 0; @@ -30846,14 +30931,14 @@ var RtmpJs; } a !== this._matrix.tx && (this._matrix.tx = a, this._invertedMatrix.tx = -a, this._invalidatePosition(), this._setDirtyFlags(1048576)); }, enumerable:!0, configurable:!0}); - r.prototype._getX = function() { + q.prototype._getX = function() { var a = this._matrix.tx; if (this._canHaveTextContent()) { var b = this._getContentBounds(), a = a + b.xMin } return a / 20; }; - Object.defineProperty(r.prototype, "y", {get:function() { + Object.defineProperty(q.prototype, "y", {get:function() { return this._getY(); }, set:function(a) { a = 20 * a | 0; @@ -30864,38 +30949,38 @@ var RtmpJs; } a !== this._matrix.ty && (this._matrix.ty = a, this._invertedMatrix.ty = -a, this._invalidatePosition(), this._setDirtyFlags(1048576)); }, enumerable:!0, configurable:!0}); - r.prototype._getY = function() { + q.prototype._getY = function() { var a = this._matrix.ty; if (this._canHaveTextContent()) { var b = this._getContentBounds(), a = a + b.yMin } return a / 20; }; - Object.defineProperty(r.prototype, "scaleX", {get:function() { + Object.defineProperty(q.prototype, "scaleX", {get:function() { return Math.abs(this._scaleX); }, set:function(a) { a = +a; this._stopTimelineAnimation(); a !== this._scaleX && (this._scaleX = a, this._invalidateMatrix()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "scaleY", {get:function() { + Object.defineProperty(q.prototype, "scaleY", {get:function() { return this._scaleY; }, set:function(a) { a = +a; this._stopTimelineAnimation(); a !== this._scaleY && (this._scaleY = a, this._invalidateMatrix()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "scaleZ", {get:function() { + Object.defineProperty(q.prototype, "scaleZ", {get:function() { return this._scaleZ; }, set:function(a) { - p("public DisplayObject::set scaleZ"); + u("public DisplayObject::set scaleZ"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "rotation", {get:function() { + Object.defineProperty(q.prototype, "rotation", {get:function() { return this._rotation; }, set:function(a) { a = +a; this._stopTimelineAnimation(); - a = r._clampRotation(a); + a = q._clampRotation(a); if (a !== this._rotation) { var b = (a - this._rotation) / 180 * Math.PI; this._skewX += b; @@ -30904,66 +30989,66 @@ var RtmpJs; this._invalidateMatrix(); } }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "rotationX", {get:function() { + Object.defineProperty(q.prototype, "rotationX", {get:function() { return this._rotationX; }, set:function(a) { - p("public DisplayObject::set rotationX"); + u("public DisplayObject::set rotationX"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "rotationY", {get:function() { + Object.defineProperty(q.prototype, "rotationY", {get:function() { return this._rotationY; }, set:function(a) { - p("public DisplayObject::set rotationY"); + u("public DisplayObject::set rotationY"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "rotationZ", {get:function() { + Object.defineProperty(q.prototype, "rotationZ", {get:function() { return this._rotationZ; }, set:function(a) { - p("public DisplayObject::set rotationZ"); + u("public DisplayObject::set rotationZ"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "width", {get:function() { + Object.defineProperty(q.prototype, "width", {get:function() { return this._getWidth(); }, set:function(a) { this._setWidth(a); }, enumerable:!0, configurable:!0}); - r.prototype._getWidth = function() { + q.prototype._getWidth = function() { return this._getTransformedBounds(this._parent, !0).width / 20; }; - r.prototype._setWidth = function(a) { + q.prototype._setWidth = function(a) { a = 20 * a | 0; this._stopTimelineAnimation(); if (!(0 > a)) { var b = this._getContentBounds(!0); if (this._canHaveTextContent()) { - var d = this._getContentBounds(); + var e = this._getContentBounds(); this._setFillAndLineBoundsFromWidthAndHeight(a, b.height); } else { - var d = this._getTransformedBounds(this._parent, !0), e = this._rotation / 180 * Math.PI, g = b.getBaseWidth(e); - g && (this._scaleY = d.height / b.getBaseHeight(e), this._scaleX = a / g, this._invalidateMatrix()); + var e = this._getTransformedBounds(this._parent, !0), c = this._rotation / 180 * Math.PI, f = b.getBaseWidth(c); + f && (this._scaleY = e.height / b.getBaseHeight(c), this._scaleX = a / f, this._invalidateMatrix()); } } }; - Object.defineProperty(r.prototype, "height", {get:function() { + Object.defineProperty(q.prototype, "height", {get:function() { return this._getHeight(); }, set:function(a) { this._setHeight(a); }, enumerable:!0, configurable:!0}); - r.prototype._getHeight = function() { + q.prototype._getHeight = function() { return this._getTransformedBounds(this._parent, !0).height / 20; }; - r.prototype._setHeight = function(a) { + q.prototype._setHeight = function(a) { a = 20 * a | 0; this._stopTimelineAnimation(); if (!(0 > a)) { var b = this._getContentBounds(!0); if (this._canHaveTextContent()) { - var d = this._getContentBounds(); + var e = this._getContentBounds(); this._setFillAndLineBoundsFromWidthAndHeight(b.width, a); } else { - var d = this._getTransformedBounds(this._parent, !0), e = this._rotation / 180 * Math.PI, g = b.getBaseHeight(e); - g && (b = b.getBaseWidth(e), this._scaleY = a / g, this._scaleX = d.width / b, this._invalidateMatrix()); + var e = this._getTransformedBounds(this._parent, !0), c = this._rotation / 180 * Math.PI, f = b.getBaseHeight(c); + f && (b = b.getBaseWidth(c), this._scaleY = a / f, this._scaleX = e.width / b, this._invalidateMatrix()); } } }; - Object.defineProperty(r.prototype, "mask", {get:function() { + Object.defineProperty(q.prototype, "mask", {get:function() { return this._mask; }, set:function(a) { if (this._mask !== a && a !== this) { @@ -30974,20 +31059,20 @@ var RtmpJs; this._setDirtyFlags(134217728); } }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "transform", {get:function() { + Object.defineProperty(q.prototype, "transform", {get:function() { return this._getTransform(); }, set:function(a) { this._stopTimelineAnimation(); a.matrix3D ? this._matrix3D = a.matrix3D : this._setMatrix(a.matrix, !0); this._setColorTransform(a.colorTransform); }, enumerable:!0, configurable:!0}); - r.prototype._getTransform = function() { + q.prototype._getTransform = function() { return new a.geom.Transform(this); }; - r.prototype.destroy = function() { + q.prototype.destroy = function() { this._setFlags(512); }; - Object.defineProperty(r.prototype, "root", {get:function() { + Object.defineProperty(q.prototype, "root", {get:function() { var a = this; do { if (a._root === a) { @@ -30997,146 +31082,144 @@ var RtmpJs; } while (a); return null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "stage", {get:function() { - var b = this; + Object.defineProperty(q.prototype, "stage", {get:function() { + var a = this; do { - if (b._stage === b) { - return q(a.display.Stage.isType(b)), b; + if (a._stage === a) { + return a; } - b = b._parent; - } while (b); + a = a._parent; + } while (a); return null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "name", {get:function() { + Object.defineProperty(q.prototype, "name", {get:function() { return this._name; }, set:function(a) { - t(a, "name"); - this._name = e(a); + p(a, "name"); + this._name = c(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "parent", {get:function() { + Object.defineProperty(q.prototype, "parent", {get:function() { return this._parent; }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "alpha", {get:function() { + Object.defineProperty(q.prototype, "alpha", {get:function() { return this._colorTransform.alphaMultiplier; }, set:function(a) { this._stopTimelineAnimation(); a = +a; a !== this._colorTransform.alphaMultiplier && (this._colorTransform.alphaMultiplier = a, this._colorTransform.convertToFixedPoint(), this._propagateFlagsDown(128), this._setDirtyFlags(67108864)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "blendMode", {get:function() { + Object.defineProperty(q.prototype, "blendMode", {get:function() { return this._blendMode; }, set:function(a) { this._stopTimelineAnimation(); - a = e(a); - a !== this._blendMode && (0 > v.BlendMode.toNumber(a) && m("ArgumentError", h.Errors.InvalidEnumError, "blendMode"), this._blendMode = a, this._setDirtyFlags(1073741824)); + a = c(a); + a !== this._blendMode && (0 > v.BlendMode.toNumber(a) && h("ArgumentError", k.Errors.InvalidEnumError, "blendMode"), this._blendMode = a, this._setDirtyFlags(1073741824)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "scale9Grid", {get:function() { + Object.defineProperty(q.prototype, "scale9Grid", {get:function() { return this._getScale9Grid(); }, set:function(a) { this._stopTimelineAnimation(); - this._scale9Grid = n.FromRectangle(a); + this._scale9Grid = s.FromRectangle(a); this._setDirtyFlags(1073741824); }, enumerable:!0, configurable:!0}); - r.prototype._getScale9Grid = function() { + q.prototype._getScale9Grid = function() { return this._scale9Grid ? a.geom.Rectangle.FromBounds(this._scale9Grid) : null; }; - Object.defineProperty(r.prototype, "cacheAsBitmap", {get:function() { + Object.defineProperty(q.prototype, "cacheAsBitmap", {get:function() { return this._getCacheAsBitmap(); }, set:function(a) { this._hasFlags(65536) || (this._toggleFlags(65536, !!a), this._setDirtyFlags(1073741824)); }, enumerable:!0, configurable:!0}); - r.prototype._getCacheAsBitmap = function() { + q.prototype._getCacheAsBitmap = function() { return this._filters && 0 < this._filters.length || this._hasFlags(65536); }; - Object.defineProperty(r.prototype, "filters", {get:function() { + Object.defineProperty(q.prototype, "filters", {get:function() { return this._getFilters(); - }, set:function(b) { + }, set:function(a) { this._filters || (this._filters = []); - var d = !1; - l(b) ? (d = 0 < this.filters.length, this._filters.length = 0) : (this._filters = b.map(function(b) { - q(a.filters.BitmapFilter.isType(b)); - return b.clone(); - }), d = !0); - d && this._setDirtyFlags(1073741824); + var b = !1; + l(a) ? (b = 0 < this.filters.length, this._filters.length = 0) : (this._filters = a.map(function(a) { + return a.clone(); + }), b = !0); + b && this._setDirtyFlags(1073741824); }, enumerable:!0, configurable:!0}); - r.prototype._getFilters = function() { + q.prototype._getFilters = function() { return this._filters ? this._filters.map(function(a) { return a.clone(); }) : []; }; - Object.defineProperty(r.prototype, "visible", {get:function() { + Object.defineProperty(q.prototype, "visible", {get:function() { return this._hasFlags(1); }, set:function(a) { a = !!a; a !== this._hasFlags(1) && (this._toggleFlags(1, a), this._setDirtyFlags(1073741824)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "z", {get:function() { + Object.defineProperty(q.prototype, "z", {get:function() { return this._z; }, set:function(a) { this._z = +a; - p("public DisplayObject::set z"); + u("public DisplayObject::set z"); }, enumerable:!0, configurable:!0}); - r.prototype.getBounds = function(a) { - return k.Rectangle.FromBounds(this._getTransformedBounds(a || this, !0)); + q.prototype.getBounds = function(a) { + return m.Rectangle.FromBounds(this._getTransformedBounds(a || this, !0)); }; - r.prototype.getRect = function(a) { - return k.Rectangle.FromBounds(this._getTransformedBounds(a || this, !1)); + q.prototype.getRect = function(a) { + return m.Rectangle.FromBounds(this._getTransformedBounds(a || this, !1)); }; - r.prototype.globalToLocal = function(a) { + q.prototype.globalToLocal = function(a) { return this._getInvertedConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels(); }; - r.prototype.localToGlobal = function(a) { + q.prototype.localToGlobal = function(a) { return this._getConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels(); }; - r.prototype.globalToLocal3D = function(a) { - p("public DisplayObject::globalToLocal3D"); + q.prototype.globalToLocal3D = function(a) { + u("public DisplayObject::globalToLocal3D"); return null; }; - r.prototype.localToGlobal3D = function(a) { - p("public DisplayObject::localToGlobal3D"); + q.prototype.localToGlobal3D = function(a) { + u("public DisplayObject::localToGlobal3D"); return null; }; - r.prototype.local3DToGlobal = function(a) { - p("public DisplayObject::local3DToGlobal"); + q.prototype.local3DToGlobal = function(a) { + u("public DisplayObject::local3DToGlobal"); return null; }; - r.prototype.visit = function(a, b, d) { - void 0 === d && (d = 0); - var e, g, c = b & 8; - for (e = [this];0 < e.length;) { - g = e.pop(); - var f = 0, f = b & 16 && !g._hasAnyFlags(d) ? 2 : a(g); - if (0 === f) { - if (g = g._children) { - for (var f = g.length, k = 0;k < f;k++) { - e.push(g[c ? k : f - 1 - k]); + q.prototype.visit = function(a, b, e) { + void 0 === e && (e = 0); + var c, f, d = b & 8; + for (c = [this];0 < c.length;) { + f = c.pop(); + var g = 0, g = b & 16 && !f._hasAnyFlags(e) ? 2 : a(f); + if (0 === g) { + if (f = f._children) { + for (var g = f.length, h = 0;h < g;h++) { + c.push(f[d ? h : g - 1 - h]); } } } else { - if (1 === f) { + if (1 === g) { break; } } } }; - Object.defineProperty(r.prototype, "loaderInfo", {get:function() { + Object.defineProperty(q.prototype, "loaderInfo", {get:function() { var a = this.root; - return a ? (q(a._loaderInfo, "No LoaderInfo object found on root."), a._loaderInfo) : null; + return a ? a._loaderInfo : null; }, enumerable:!0, configurable:!0}); - r.prototype._canHaveGraphics = function() { + q.prototype._canHaveGraphics = function() { return!1; }; - r.prototype._getGraphics = function() { + q.prototype._getGraphics = function() { return null; }; - r.prototype._canHaveTextContent = function() { + q.prototype._canHaveTextContent = function() { return!1; }; - r.prototype._getTextContent = function() { + q.prototype._getTextContent = function() { return null; }; - r.prototype._ensureGraphics = function() { - q(this._canHaveGraphics()); + q.prototype._ensureGraphics = function() { if (this._graphics) { return this._graphics; } @@ -31146,117 +31229,115 @@ var RtmpJs; this._setDirtyFlags(4194304); return this._graphics; }; - r.prototype._setStaticContentFromSymbol = function(b) { - q(!b.dynamic); - this._canHaveGraphics() ? (q(b instanceof a.display.ShapeSymbol), this._graphics = b.graphics, this._setDirtyFlags(4194304)) : a.text.StaticText.isType(this) && (q(b instanceof a.text.TextSymbol), this._textContent = b.textContent, this._setDirtyFlags(8388608)); + q.prototype._setStaticContentFromSymbol = function(b) { + this._canHaveGraphics() ? (this._graphics = b.graphics, this._setDirtyFlags(4194304)) : a.text.StaticText.isType(this) && (this._textContent = b.textContent, this._setDirtyFlags(8388608)); this._symbol = b; this._setFillAndLineBoundsFromSymbol(b); }; - r.prototype.hitTestObject = function(a) { - q(a && r.isType(a)); - var b = this._getContentBounds(!1).clone(), d = a._getContentBounds(!1).clone(); + q.prototype.hitTestObject = function(a) { + var b = this._getContentBounds(!1).clone(), e = a._getContentBounds(!1).clone(); this._getConcatenatedMatrix().transformBounds(b); - a._getConcatenatedMatrix().transformBounds(d); - return b.intersects(d); + a._getConcatenatedMatrix().transformBounds(e); + return b.intersects(e); }; - r.prototype.hitTestPoint = function(a, b, d) { - return!!this._containsGlobalPoint(20 * +a | 0, 20 * +b | 0, d ? 2 : 0, null); + q.prototype.hitTestPoint = function(a, b, e) { + return!!this._containsGlobalPoint(20 * +a | 0, 20 * +b | 0, e ? 2 : 0, null); }; - r.prototype._containsPoint = function(a, b, d, e, g, c) { - var f = this._boundsAndMaskContainPoint(a, b, d, e, g); - if (0 === f || 2 > g) { - return f; + q.prototype._containsPoint = function(a, b, e, c, f, d) { + var g = this._boundsAndMaskContainPoint(a, b, e, c, f); + if (0 === g || 2 > f) { + return g; } - (a = this._containsPointDirectly(d, e, a, b)) && c && (5 === g ? c[0] = this : (4 === g || v.InteractiveObject.isType(this) && this._mouseEnabled) && c.push(this)); - return a ? 2 : f; + (a = this._containsPointDirectly(e, c, a, b)) && d && (5 === f ? d[0] = this : (4 === f || v.InteractiveObject.isType(this) && this._mouseEnabled) && d.push(this)); + return a ? 2 : g; }; - r.prototype._containsGlobalPoint = function(a, b, d, e) { - var g = this._getInvertedConcatenatedMatrix(); - return this._containsPoint(a, b, g.transformX(a, b), g.transformY(a, b), d, e); + q.prototype._containsGlobalPoint = function(a, b, e, c) { + var f = this._getInvertedConcatenatedMatrix(); + return this._containsPoint(a, b, f.transformX(a, b), f.transformY(a, b), e, c); }; - r.prototype._boundsAndMaskContainPoint = function(a, b, d, e, g) { - return 1 <= g && this._hasFlags(32768) ? 1 : 3 <= g && !this._hasFlags(1) || !this._getContentBounds().contains(d, e) ? 0 : 0 !== g && this._mask ? this._mask._containsGlobalPoint(a, b, 1, null) : 1; + q.prototype._boundsAndMaskContainPoint = function(a, b, e, c, f) { + return 1 <= f && this._hasFlags(32768) ? 1 : 3 <= f && !this._hasFlags(1) || !this._getContentBounds().contains(e, c) ? 0 : 0 !== f && this._mask ? this._mask._containsGlobalPoint(a, b, 1, null) : 1; }; - r.prototype._containsPointDirectly = function(a, b, d, e) { + q.prototype._containsPointDirectly = function(a, b, e, c) { return!1; }; - Object.defineProperty(r.prototype, "scrollRect", {get:function() { + Object.defineProperty(q.prototype, "scrollRect", {get:function() { return this._getScrollRect(); }, set:function(a) { this._scrollRect = a ? a.clone() : null; - u("public DisplayObject::set scrollRect"); + t("public DisplayObject::set scrollRect"); }, enumerable:!0, configurable:!0}); - r.prototype._getScrollRect = function() { + q.prototype._getScrollRect = function() { return this._scrollRect ? this._scrollRect.clone() : null; }; - Object.defineProperty(r.prototype, "opaqueBackground", {get:function() { + Object.defineProperty(q.prototype, "opaqueBackground", {get:function() { return this._opaqueBackground; }, set:function(a) { - q(null === a || c.isInteger(a)); this._opaqueBackground = a; }, enumerable:!0, configurable:!0}); - r.prototype._getDistance = function(a) { - for (var b = 0, d = this;d !== a;) { - b++, d = d._parent; + q.prototype._getDistance = function(a) { + for (var b = 0, e = this;e !== a;) { + b++, e = e._parent; } return b; }; - r.prototype.findNearestCommonAncestor = function(a) { + q.prototype.findNearestCommonAncestor = function(a) { if (!a) { return null; } - for (var b = this, d = b._getDistance(null), e = a._getDistance(null);d > e;) { - b = b._parent, d--; + for (var b = this, e = b._getDistance(null), c = a._getDistance(null);e > c;) { + b = b._parent, e--; } - for (;e > d;) { - a = a._parent, e--; + for (;c > e;) { + a = a._parent, c--; } for (;b !== a;) { b = b._parent, a = a._parent; } return b; }; - r.prototype._getLocalMousePosition = function() { + q.prototype._getLocalMousePosition = function() { var b = a.ui.Mouse._currentPosition; this._parent && (b = this._parent.globalToLocal(a.ui.Mouse._currentPosition)); return b; }; - Object.defineProperty(r.prototype, "mouseX", {get:function() { + Object.defineProperty(q.prototype, "mouseX", {get:function() { return this._getLocalMousePosition().x; }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "mouseY", {get:function() { + Object.defineProperty(q.prototype, "mouseY", {get:function() { return this._getLocalMousePosition().y; }, enumerable:!0, configurable:!0}); - r.prototype.debugName = function(a) { + q.prototype.debugName = function(a) { void 0 === a && (a = !1); var b = this._id + " [" + this._depth + "]: (" + this._referenceCount + ") " + this; if (a) { a = []; for (var e = 0;32 > e;e++) { - this._hasFlags(1 << e) && a.push(d[1 << e]); + this._hasFlags(1 << e) && a.push(f[1 << e]); } b += " " + a.join("|"); } return b; }; - r.prototype.debugTrace = function(a, b) { + q.prototype.debugTrace = function() { + var a, b; void 0 === a && (a = 1024); void 0 === b && (b = ""); - var d = this, e = new c.IndentingWriter; - this.visit(function(g) { - var f = g._getDistance(d); - if (f > a) { + var e = this, c = new d.IndentingWriter; + this.visit(function(f) { + var g = f._getDistance(e); + if (g > a) { return 2; } - f = b + c.StringUtilities.multiple(" ", f); - e.writeObject(f + g.debugName() + ", bounds: " + g.getBounds(null).toString(), {"...":{value:g}}); + g = b + d.StringUtilities.multiple(" ", g); + c.writeObject(g + f.debugName() + ", bounds: " + f.getBounds(null).toString(), {"...":{value:f}}); return 0; }, 0); }; - r.prototype._addReference = function() { + q.prototype._addReference = function() { this._referenceCount++; }; - r.prototype._removeReference = function() { + q.prototype._removeReference = function() { this._referenceCount--; if (0 === this._referenceCount && this._children) { for (var a = this._children, b = 0;b < a.length;b++) { @@ -31264,21 +31345,20 @@ var RtmpJs; } } }; - Object.defineProperty(r.prototype, "accessibilityProperties", {get:function() { + Object.defineProperty(q.prototype, "accessibilityProperties", {get:function() { return this._accessibilityProperties; }, set:function(a) { this._accessibilityProperties = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(r.prototype, "blendShader", {set:function(a) { - p("public DisplayObject::set blendShader"); + Object.defineProperty(q.prototype, "blendShader", {set:function(a) { + u("public DisplayObject::set blendShader"); }, enumerable:!0, configurable:!0}); - r._syncID = 0; - r._instanceID = 1; - r.classInitializer = function() { + q._syncID = 0; + q._instanceID = 1; + q.classInitializer = function() { this.reset(); }; - r.initializer = function(b) { - h.counter.count("DisplayObject::initializer"); + q.initializer = function(b) { this._id = a.display.DisplayObject.getNextSyncID(); this._displayObjectFlags = 2085617767; this._stage = this._root = null; @@ -31291,18 +31371,17 @@ var RtmpJs; this._height = this._width = this._rotationZ = this._rotationY = this._rotationX = this._rotation = 0; this._filters = this._scrollRect = this._opaqueBackground = null; this._blendMode = v.BlendMode.NORMAL; - q(this._blendMode); this._accessibilityProperties = this._loaderInfo = this._scale9Grid = null; - this._fillBounds = new n(0, 0, 0, 0); - this._lineBounds = new n(0, 0, 0, 0); + this._fillBounds = new s(0, 0, 0, 0); + this._lineBounds = new s(0, 0, 0, 0); this._clipDepth = -1; - this._concatenatedMatrix = new k.Matrix; - this._invertedConcatenatedMatrix = new k.Matrix; - this._matrix = new k.Matrix; - this._invertedMatrix = new k.Matrix; + this._concatenatedMatrix = new m.Matrix; + this._invertedConcatenatedMatrix = new m.Matrix; + this._matrix = new m.Matrix; + this._invertedMatrix = new m.Matrix; this._matrix3D = null; - this._colorTransform = new k.ColorTransform; - this._concatenatedColorTransform = new k.ColorTransform; + this._colorTransform = new m.ColorTransform; + this._concatenatedColorTransform = new m.ColorTransform; this._depth = -1; this._ratio = 0; this._index = -1; @@ -31312,46 +31391,46 @@ var RtmpJs; this._referenceCount = 0; b && (b.scale9Grid && (this._scale9Grid = b.scale9Grid), this._symbol = b); }; - r.classSymbols = null; - r.instanceSymbols = null; - r._runScripts = !0; - r._path = []; - return r; + q.classSymbols = null; + q.instanceSymbols = null; + q._runScripts = !0; + q._path = []; + return q; }(a.events.EventDispatcher); v.DisplayObject = b; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.assert, l = c.AVM2.Runtime.throwError, e = function(e) { - function t(a, e, c) { + var u = d.AVM2.Runtime.asCoerceString, t = d.AVM2.Runtime.throwError, l = function(c) { + function h(a, c, d) { void 0 === a && (a = null); - void 0 === e && (e = "auto"); - void 0 === c && (c = !1); + void 0 === c && (c = "auto"); + void 0 === d && (d = !1); v.DisplayObject.instanceConstructorNoInitialize.call(this); this._symbol ? this._bitmapData.class.instanceConstructorNoInitialize.call(this._bitmapData) : this.bitmapData = a; - this._pixelSnapping = p(e); - this._smoothing = !!c; + this._pixelSnapping = u(c); + this._smoothing = !!d; } - __extends(t, e); - Object.defineProperty(t.prototype, "pixelSnapping", {get:function() { + __extends(h, c); + Object.defineProperty(h.prototype, "pixelSnapping", {get:function() { return this._pixelSnapping; }, set:function(a) { - 0 > v.PixelSnapping.toNumber(a) && l("ArgumentError", h.Errors.InvalidEnumError, "pixelSnapping"); - this._pixelSnapping = p(a); + 0 > v.PixelSnapping.toNumber(a) && t("ArgumentError", k.Errors.InvalidEnumError, "pixelSnapping"); + this._pixelSnapping = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "smoothing", {get:function() { + Object.defineProperty(h.prototype, "smoothing", {get:function() { return this._smoothing; }, set:function(a) { this._smoothing = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "bitmapData", {get:function() { + Object.defineProperty(h.prototype, "bitmapData", {get:function() { return this._bitmapData; }, set:function(a) { this._bitmapData !== a && (this._bitmapData && this._bitmapData._removeBitmapReferrer(this), a && a._addBitmapReferrer(this)); @@ -31359,163 +31438,162 @@ var RtmpJs; this._invalidateParentFillAndLineBounds(!0, !0); this._setDirtyFlags(16777216); }, enumerable:!0, configurable:!0}); - t.prototype._getContentBounds = function(a) { - return this._bitmapData ? this._bitmapData._getContentBounds() : new c.Bounds(0, 0, 0, 0); + h.prototype._getContentBounds = function(a) { + return this._bitmapData ? this._bitmapData._getContentBounds() : new d.Bounds(0, 0, 0, 0); }; - t.prototype._containsPointDirectly = function(a, e, c, f) { - u(this._getContentBounds().contains(a, e)); + h.prototype._containsPointDirectly = function(a, c, d, g) { return!0; }; - t.classInitializer = null; - t.initializer = function(e) { + h.classInitializer = null; + h.initializer = function(c) { this._smoothing = this._pixelSnapping = this._bitmapData = null; - if (e) { - var c = e.symbolClass; - c.isSubtypeOf(a.display.Bitmap) && (c = a.display.BitmapData); - this._bitmapData = c.initializeFrom(e); - this._setFillAndLineBoundsFromWidthAndHeight(20 * e.width | 0, 20 * e.height | 0); + if (c) { + var d = c.symbolClass; + d.isSubtypeOf(a.display.Bitmap) && (d = a.display.BitmapData); + this._bitmapData = d.initializeFrom(c); + this._setFillAndLineBoundsFromWidthAndHeight(20 * c.width | 0, 20 * c.height | 0); } }; - t.classSymbols = null; - t.instanceSymbols = null; - return t; + h.classSymbols = null; + h.instanceSymbols = null; + return h; }(a.display.DisplayObject); - v.Bitmap = e; + v.Bitmap = l; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.warning, u = function(a) { - function e() { - h.DisplayObject.instanceConstructorNoInitialize.call(this); + (function(k) { + var u = d.Debug.warning, t = function(a) { + function c() { + k.DisplayObject.instanceConstructorNoInitialize.call(this); } - __extends(e, a); - e.prototype._canHaveGraphics = function() { + __extends(c, a); + c.prototype._canHaveGraphics = function() { return!0; }; - e.prototype._getGraphics = function() { + c.prototype._getGraphics = function() { return this._graphics; }; - Object.defineProperty(e.prototype, "graphics", {get:function() { + Object.defineProperty(c.prototype, "graphics", {get:function() { return this._ensureGraphics(); }, enumerable:!0, configurable:!0}); - e.prototype._containsPointDirectly = function(a, e, c, l) { - c = this._getGraphics(); - return!!c && c._containsPoint(a, e, !0, 0); + c.prototype._containsPointDirectly = function(a, c, d, l) { + d = this._getGraphics(); + return!!d && d._containsPoint(a, c, !0, 0); }; - e.classSymbols = null; - e.instanceSymbols = null; - e.classInitializer = null; - e.initializer = function(a) { + c.classSymbols = null; + c.instanceSymbols = null; + c.classInitializer = null; + c.initializer = function(a) { this._graphics = null; a && this._setStaticContentFromSymbol(a); }; - return e; + return c; }(a.display.DisplayObject); - h.Shape = u; - u = function(c) { - function e(a, e) { - c.call(this, a, e, !1); + k.Shape = t; + t = function(d) { + function c(a, c) { + d.call(this, a, c, !1); this.graphics = null; } - __extends(e, c); - e.FromData = function(c, l) { - var h = new e(c, a.display.Shape); - h._setBoundsFromData(c); - h.graphics = a.display.Graphics.FromData(c); - h.processRequires(c.require, l); - return h; + __extends(c, d); + c.FromData = function(d, l) { + var k = new c(d, a.display.Shape); + k._setBoundsFromData(d); + k.graphics = a.display.Graphics.FromData(d); + k.processRequires(d.require, l); + return k; }; - e.prototype.processRequires = function(a, e) { + c.prototype.processRequires = function(a, c) { if (a) { - for (var c = this.graphics._textures, l = 0;l < a.length;l++) { - var k = e.getSymbolById(a[l]); - k ? c.push(k.getSharedInstance()) : (65535 !== a[l] && p("Bitmap symbol " + a[l] + " required by shape, but not defined."), c.push(null)); + for (var d = this.graphics._textures, l = 0;l < a.length;l++) { + var g = c.getSymbolById(a[l]); + g ? d.push(g.getSharedInstance()) : (65535 !== a[l] && u("Bitmap symbol " + a[l] + " required by shape, but not defined."), d.push(null)); } } }; - return e; - }(c.Timeline.DisplaySymbol); - h.ShapeSymbol = u; + return c; + }(d.Timeline.DisplaySymbol); + k.ShapeSymbol = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = a.display.DisplayObject, e = a.events, m = function(a) { - function c() { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = a.display.DisplayObject, c = a.events, h = function(a) { + function d() { l.instanceConstructorNoInitialize.call(this); } - __extends(c, a); - Object.defineProperty(c.prototype, "tabEnabled", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "tabEnabled", {get:function() { return this._tabEnabled; }, set:function(a) { a = !!a; - var c = this._tabEnabled; + var d = this._tabEnabled; this._tabEnabled = a; - c !== a && this.dispatchEvent(e.Event.getInstance(e.Event.TAB_ENABLED_CHANGE, !0)); + d !== a && this.dispatchEvent(c.Event.getInstance(c.Event.TAB_ENABLED_CHANGE, !0)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "tabIndex", {get:function() { + Object.defineProperty(d.prototype, "tabIndex", {get:function() { return this._tabIndex; }, set:function(a) { a |= 0; - var c = this._tabIndex; + var d = this._tabIndex; this._tabIndex = a; - c !== a && this.dispatchEvent(e.Event.getInstance(e.Event.TAB_INDEX_CHANGE, !0)); + d !== a && this.dispatchEvent(c.Event.getInstance(c.Event.TAB_INDEX_CHANGE, !0)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "focusRect", {get:function() { + Object.defineProperty(d.prototype, "focusRect", {get:function() { return this._focusRect; }, set:function(a) { - u("public flash.display.InteractiveObject::set focusRect"); + t("public flash.display.InteractiveObject::set focusRect"); this._focusRect = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "mouseEnabled", {get:function() { + Object.defineProperty(d.prototype, "mouseEnabled", {get:function() { return this._mouseEnabled; }, set:function(a) { this._mouseEnabled = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "doubleClickEnabled", {get:function() { + Object.defineProperty(d.prototype, "doubleClickEnabled", {get:function() { return this._doubleClickEnabled; }, set:function(a) { this._doubleClickEnabled = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "accessibilityImplementation", {get:function() { + Object.defineProperty(d.prototype, "accessibilityImplementation", {get:function() { return this._accessibilityImplementation; }, set:function(a) { - p("public flash.display.InteractiveObject::set accessibilityImplementation"); + u("public flash.display.InteractiveObject::set accessibilityImplementation"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "softKeyboardInputAreaOfInterest", {get:function() { + Object.defineProperty(d.prototype, "softKeyboardInputAreaOfInterest", {get:function() { return this._softKeyboardInputAreaOfInterest; }, set:function(a) { - p("public flash.display.InteractiveObject::set softKeyboardInputAreaOfInterest"); + u("public flash.display.InteractiveObject::set softKeyboardInputAreaOfInterest"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "needsSoftKeyboard", {get:function() { + Object.defineProperty(d.prototype, "needsSoftKeyboard", {get:function() { return this._needsSoftKeyboard; }, set:function(a) { - p("public flash.display.InteractiveObject::set needsSoftKeyboard"); + u("public flash.display.InteractiveObject::set needsSoftKeyboard"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "contextMenu", {get:function() { + Object.defineProperty(d.prototype, "contextMenu", {get:function() { return this._contextMenu; }, set:function(a) { - u("public flash.display.InteractiveObject::set contextMenu"); + t("public flash.display.InteractiveObject::set contextMenu"); this._contextMenu = a; }, enumerable:!0, configurable:!0}); - c.prototype.requestSoftKeyboard = function() { - p("public flash.display.InteractiveObject::requestSoftKeyboard"); + d.prototype.requestSoftKeyboard = function() { + u("public flash.display.InteractiveObject::requestSoftKeyboard"); }; - c.classInitializer = null; - c.initializer = function() { + d.classInitializer = null; + d.initializer = function() { this._tabEnabled = !1; this._tabIndex = -1; this._focusRect = null; @@ -31525,114 +31603,114 @@ var RtmpJs; this._needsSoftKeyboard = !1; this._contextMenu = null; }; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.display.DisplayObject); - h.InteractiveObject = m; + k.InteractiveObject = h; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.assert, l = function(a) { - function e(a, c, k, f) { + (function(k) { + var u = d.Debug.notImplemented, t = function(a) { + function d(a, c, h, g) { void 0 === a && (a = null); void 0 === c && (c = null); - void 0 === k && (k = null); - void 0 === f && (f = null); - h.InteractiveObject.instanceConstructorNoInitialize.call(this); + void 0 === h && (h = null); + void 0 === g && (g = null); + k.InteractiveObject.instanceConstructorNoInitialize.call(this); a && (this.upState = a); c && (this.overState = c); - k && (this.downState = k); - f && (this.hitTestState = f); + h && (this.downState = h); + g && (this.hitTestState = g); this._updateButton(); } - __extends(e, a); - e.prototype._initFrame = function(a) { + __extends(d, a); + d.prototype._initFrame = function(a) { a && this._updateButton(); }; - e.prototype._constructFrame = function() { + d.prototype._constructFrame = function() { }; - Object.defineProperty(e.prototype, "useHandCursor", {get:function() { + Object.defineProperty(d.prototype, "useHandCursor", {get:function() { return this._useHandCursor; }, set:function(a) { this._useHandCursor = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "enabled", {get:function() { + Object.defineProperty(d.prototype, "enabled", {get:function() { return this._enabled; }, set:function(a) { this._enabled = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "trackAsMenu", {get:function() { + Object.defineProperty(d.prototype, "trackAsMenu", {get:function() { return this._trackAsMenu; }, set:function(a) { - p("public flash.display.SimpleButton::set trackAsMenu"); + u("public flash.display.SimpleButton::set trackAsMenu"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "upState", {get:function() { + Object.defineProperty(d.prototype, "upState", {get:function() { return this._upState; }, set:function(a) { - var e = this._upState; + var c = this._upState; a._parent && a._parent.removeChild(a); this._upState = a; - this._currentState === e && this._updateButton(); + this._currentState === c && this._updateButton(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "overState", {get:function() { + Object.defineProperty(d.prototype, "overState", {get:function() { return this._overState; }, set:function(a) { - var e = this._overState; + var c = this._overState; a._parent && a._parent.removeChild(a); this._overState = a; - this._currentState === e && this._updateButton(); + this._currentState === c && this._updateButton(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "downState", {get:function() { + Object.defineProperty(d.prototype, "downState", {get:function() { return this._downState; }, set:function(a) { - var e = this._downState; + var c = this._downState; a._parent && a._parent.removeChild(a); this._downState = a; - this._currentState === e && this._updateButton(); + this._currentState === c && this._updateButton(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "hitTestState", {get:function() { + Object.defineProperty(d.prototype, "hitTestState", {get:function() { return this._hitTestState; }, set:function(a) { this._hitTestState = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "soundTransform", {get:function() { - p("public flash.display.SimpleButton::get soundTransform"); + Object.defineProperty(d.prototype, "soundTransform", {get:function() { + u("public flash.display.SimpleButton::get soundTransform"); }, set:function(a) { - p("public flash.display.SimpleButton::set soundTransform"); + u("public flash.display.SimpleButton::set soundTransform"); }, enumerable:!0, configurable:!0}); - e.prototype._containsPoint = function(a, e, c, f, d, b) { - c = 3 === d ? this._hitTestState : this._currentState; - if (!c) { + d.prototype._containsPoint = function(a, c, d, g, f, b) { + d = 3 === f ? this._hitTestState : this._currentState; + if (!d) { return 0; } - c._parent = this; - a = c._containsGlobalPoint(a, e, d, b); - c._parent = null; - 0 !== a && 3 === d && b && this._mouseEnabled && (b[0] = this, u(1 === b.length)); + d._parent = this; + a = d._containsGlobalPoint(a, c, f, b); + d._parent = null; + 0 !== a && 3 === f && b && this._mouseEnabled && (b[0] = this); return a; }; - e.prototype._getChildBounds = function(a, e) { - this._currentState && (this._currentState._parent = this, a.unionInPlace(this._currentState._getTransformedBounds(this, e)), this._currentState._parent = null); + d.prototype._getChildBounds = function(a, c) { + this._currentState && (this._currentState._parent = this, a.unionInPlace(this._currentState._getTransformedBounds(this, c)), this._currentState._parent = null); }; - e.prototype._propagateFlagsDown = function(a) { + d.prototype._propagateFlagsDown = function(a) { this._hasFlags(a) || (this._setFlags(a), this._upState && this._upState._propagateFlagsDown(a), this._overState && this._overState._propagateFlagsDown(a), this._downState && this._downState._propagateFlagsDown(a), this._hitTestState && this._hitTestState._propagateFlagsDown(a)); }; - e.prototype._updateButton = function() { + d.prototype._updateButton = function() { var a; a = this._mouseOver ? this._mouseDown ? this._downState : this._overState : this._upState; a !== this._currentState && ((this._currentState = a) ? this._children[0] = a : this._children.length = 0, this._setDirtyFlags(2097152), this._invalidateFillAndLineBounds(!0, !0)); }; - e.classInitializer = null; - e.initializer = function(a) { - h.DisplayObject._advancableInstances.push(this); + d.classInitializer = null; + d.initializer = function(a) { + k.DisplayObject._advancableInstances.push(this); this._enabled = this._useHandCursor = !0; this._trackAsMenu = !1; this._currentState = this._hitTestState = this._downState = this._overState = this._upState = null; @@ -31642,191 +31720,217 @@ var RtmpJs; ; } }; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.display.InteractiveObject); - h.SimpleButton = l; - var e = function() { - return function(a, e) { + k.SimpleButton = t; + var l = function() { + return function(a, d) { this.symbol = a; - this.placeObjectTag = e; + this.placeObjectTag = d; }; }(); - h.ButtonState = e; - l = function(m) { - function l(e, c) { - m.call(this, e, a.display.SimpleButton, !0); + k.ButtonState = l; + t = function(c) { + function h(d, h) { + c.call(this, d, a.display.SimpleButton, !0); this.hitTestState = this.downState = this.overState = this.upState = null; - this.loaderInfo = c; + this.loaderInfo = h; } - __extends(l, m); - l.FromData = function(m, n) { - var k = new l(m, n); - n.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (k.isAVM1Object = !0); - var f = m.states, d = null, b, g; - for (g in f) { - var r = f[g]; - if (1 === r.length) { - if (b = r[0], d = n.getSymbolById(b.symbolId), !d) { + __extends(h, c); + h.FromData = function(c, s) { + var m = new h(c, s); + s.actionScriptVersion === k.ActionScriptVersion.ACTIONSCRIPT2 && (m.isAVM1Object = !0); + var g = c.states, f = null, b, e; + for (e in g) { + var q = g[e]; + if (1 === q.length) { + if (b = q[0], f = s.getSymbolById(b.symbolId), !f) { continue; } } else { - b = {flags:1, depth:1}, d = new a.display.SpriteSymbol({id:-1, className:null}, n), d.frames.push(new c.SWF.SWFFrame(r)); + b = {flags:1, depth:1}, f = new a.display.SpriteSymbol({id:-1, className:null}, s), f.frames.push(new d.SWF.SWFFrame(q)); } - k[g + "State"] = new e(d, b); + m[e + "State"] = new l(f, b); } - return k; + return m; }; - return l; - }(c.Timeline.DisplaySymbol); - h.ButtonSymbol = l; + return h; + }(d.Timeline.DisplaySymbol); + k.ButtonSymbol = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.assert, u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = c.AVM2.Runtime.throwError, m = c.AVM2.Runtime.checkParameterType, t = c.NumberUtilities.clamp, q = c.AVM2.ABC.Multiname, n = a.events, k = function(c) { - function d() { + var u = d.Debug.notImplemented, t = d.AVM2.Runtime.asCoerceString, l = d.AVM2.Runtime.throwError, c = d.AVM2.Runtime.checkParameterType, h = d.NumberUtilities.clamp, p = d.AVM2.ABC.Multiname, s = a.events, m = function(d) { + function f() { v.InteractiveObject.instanceConstructorNoInitialize.call(this); this._setDirtyFlags(2097152); } - __extends(d, c); - d.prototype._invalidateChildren = function() { + __extends(f, d); + f.prototype._invalidateChildren = function() { this._setDirtyFlags(2097152); this._invalidateFillAndLineBounds(!0, !0); }; - d.prototype._propagateFlagsDown = function(a) { + f.prototype._propagateFlagsDown = function(a) { if (!this._hasFlags(a)) { this._setFlags(a); - for (var d = this._children, e = 0;e < d.length;e++) { - d[e]._propagateFlagsDown(a); + for (var e = this._children, c = 0;c < e.length;c++) { + e[c]._propagateFlagsDown(a); } } }; - d.prototype._constructChildren = function() { - h.counter.count("DisplayObjectContainer::_constructChildren"); - for (var a = this._children, d = 0;d < a.length;d++) { - var e = a[d]; - e._hasFlags(256) || (e.class.instanceConstructorNoInitialize.call(e), e._removeReference(), e._name && (this[q.getPublicQualifiedName(e._name)] = e), e._setFlags(256), e._symbol && e._symbol.isAVM1Object && (e.dispatchEvent(n.Event.getInstance(n.Event.AVM1_INIT)), e.dispatchEvent(n.Event.getInstance(n.Event.AVM1_CONSTRUCT)), e._setFlags(1024), e._hasAnyFlags(24576) && this._setFlags(16384)), e.dispatchEvent(n.Event.getInstance(n.Event.ADDED, !0)), e.stage && e.dispatchEvent(n.Event.getInstance(n.Event.ADDED_TO_STAGE))); + f.prototype._constructChildren = function() { + for (var a = this._children, e = 0;e < a.length;e++) { + var c = a[e]; + if (!c._hasFlags(256)) { + c.class.instanceConstructorNoInitialize.call(c); + c._removeReference(); + c._name && (this[p.getPublicQualifiedName(c._name)] = c); + c._setFlags(256); + if (c._symbol && c._symbol.isAVM1Object) { + try { + c.dispatchEvent(s.Event.getInstance(s.Event.AVM1_INIT)); + } catch (f) { + console.warn("caught error under DisplayObjectContainer AVM1_INIT event: ", f); + } + try { + c.dispatchEvent(s.Event.getInstance(s.Event.AVM1_CONSTRUCT)); + } catch (d) { + console.warn("caught error under DisplayObjectContainer AVM1_CONSTRUCT event: ", d); + } + c._setFlags(1024); + c._hasAnyFlags(24576) && this._setFlags(16384); + } + try { + c.dispatchEvent(s.Event.getInstance(s.Event.ADDED, !0)); + } catch (g) { + console.warn("caught error under DisplayObject ADDED event: ", g); + } + if (c.stage) { + try { + c.dispatchEvent(s.Event.getInstance(s.Event.ADDED_TO_STAGE)); + } catch (h) { + console.warn("caught error under DisplayObject ADDED_TO_STAGE event: ", h); + } + } + } } }; - d.prototype._enqueueFrameScripts = function() { + f.prototype._enqueueFrameScripts = function() { if (this._hasFlags(16384)) { this._removeFlags(16384); for (var a = this._children, e = 0;e < a.length;e++) { var c = a[e]; - (d.isType(c) || v.AVM1Movie.isType(c)) && c._enqueueFrameScripts(); + (f.isType(c) || v.AVM1Movie.isType(c)) && c._enqueueFrameScripts(); } } }; - Object.defineProperty(d.prototype, "numChildren", {get:function() { + Object.defineProperty(f.prototype, "numChildren", {get:function() { return this._children.length; }, enumerable:!0, configurable:!0}); - d.prototype._getNumChildren = function() { + f.prototype._getNumChildren = function() { return this._children.length; }; - Object.defineProperty(d.prototype, "textSnapshot", {get:function() { + Object.defineProperty(f.prototype, "textSnapshot", {get:function() { u("public DisplayObjectContainer::get textSnapshot"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "tabChildren", {get:function() { + Object.defineProperty(f.prototype, "tabChildren", {get:function() { return this._tabChildren; }, set:function(a) { this._setTabChildren(a); }, enumerable:!0, configurable:!0}); - d.prototype._getTabChildren = function() { + f.prototype._getTabChildren = function() { return this._tabChildren; }; - d.prototype._setTabChildren = function(a) { + f.prototype._setTabChildren = function(a) { a = !!a; - var d = this._tabChildren; + var e = this._tabChildren; this._tabChildren = a; - d !== a && this.dispatchEvent(n.Event.getInstance(n.Event.TAB_CHILDREN_CHANGE, !0)); + e !== a && this.dispatchEvent(s.Event.getInstance(s.Event.TAB_CHILDREN_CHANGE, !0)); }; - Object.defineProperty(d.prototype, "mouseChildren", {get:function() { + Object.defineProperty(f.prototype, "mouseChildren", {get:function() { return this._mouseChildren; }, set:function(a) { this._setMouseChildren(a); }, enumerable:!0, configurable:!0}); - d.prototype._getMouseChildren = function() { + f.prototype._getMouseChildren = function() { return this._mouseChildren; }; - d.prototype._setMouseChildren = function(a) { + f.prototype._setMouseChildren = function(a) { this._mouseChildren = !!a; }; - d.prototype.addChild = function(b) { - m(b, "child", a.display.DisplayObject); + f.prototype.addChild = function(b) { + c(b, "child", a.display.DisplayObject); return this.addChildAt(b, this._children.length); }; - d.prototype.addChildAt = function(b, g) { - m(b, "child", a.display.DisplayObject); - h.counter.count("DisplayObjectContainer::addChildAt"); - g |= 0; - p(b._hasFlags(256), "Child is not fully constructed."); - b === this && e("ArgumentError", h.Errors.CantAddSelfError); - d.isType(b) && b.contains(this) && e("ArgumentError", h.Errors.CantAddParentError); - var c = this._children; - (0 > g || g > c.length) && e("RangeError", h.Errors.ParamRangeError); + f.prototype.addChildAt = function(b, e) { + c(b, "child", a.display.DisplayObject); + e |= 0; + b === this && l("ArgumentError", k.Errors.CantAddSelfError); + f.isType(b) && b.contains(this) && l("ArgumentError", k.Errors.CantAddParentError); + var d = this._children; + (0 > e || e > d.length) && l("RangeError", k.Errors.ParamRangeError); if (b._parent === this) { - return this.setChildIndex(b, t(g, 0, c.length - 1)), b; + return this.setChildIndex(b, h(e, 0, d.length - 1)), b; } - b._parent && (d.prototype.removeChildAt.call(b._parent, b._parent.getChildIndex(b)), g = t(g, 0, c.length)); - for (var f = c.length - 1;f >= g;f--) { - c[f]._index++; + b._parent && (f.prototype.removeChildAt.call(b._parent, b._parent.getChildIndex(b)), e = h(e, 0, d.length)); + for (var g = d.length - 1;g >= e;g--) { + d[g]._index++; } - c.splice(g, 0, b); + d.splice(e, 0, b); b._setParent(this, -1); - b._index = g; + b._index = e; b._invalidatePosition(); - b.dispatchEvent(n.Event.getInstance(n.Event.ADDED, !0)); - b.stage && b._propagateEvent(n.Event.getInstance(n.Event.ADDED_TO_STAGE)); this._invalidateChildren(); b._addReference(); + b.dispatchEvent(s.Event.getInstance(s.Event.ADDED, !0)); + b.stage && b._propagateEvent(s.Event.getInstance(s.Event.ADDED_TO_STAGE)); return b; }; - d.prototype.addTimelineObjectAtDepth = function(a, d) { - h.counter.count("DisplayObjectContainer::addTimelineObjectAtDepth"); - d |= 0; - for (var e = this._children, c = e.length - 1, f = c + 1, k = c;0 <= k;k--) { - var m = e[k]; - if (-1 < m._depth) { - if (m._depth < d) { - f = k + 1; + f.prototype.addTimelineObjectAtDepth = function(a, e) { + e |= 0; + for (var c = this._children, f = c.length - 1, d = f + 1, g = f;0 <= g;g--) { + var h = c[g]; + if (-1 < h._depth) { + if (h._depth < e) { + d = g + 1; break; } - f = k; + d = g; } } - if (f > c) { - e.push(a), a._index = f; + if (d > f) { + c.push(a), a._index = d; } else { - for (e.splice(f, 0, a), k = f;k < e.length;k++) { - e[k]._index = k; + for (c.splice(d, 0, a), g = d;g < c.length;g++) { + c[g]._index = g; } } - a._setParent(this, d); + a._setParent(this, e); a._invalidatePosition(); this._invalidateChildren(); }; - d.prototype.removeChild = function(b) { - m(b, "child", a.display.DisplayObject); + f.prototype.removeChild = function(b) { + c(b, "child", a.display.DisplayObject); return this.removeChildAt(this.getChildIndex(b)); }; - d.prototype.removeChildAt = function(a) { - h.counter.count("DisplayObjectContainer::removeChildAt"); + f.prototype.removeChildAt = function(a) { a |= 0; - var d = this._children; - (0 > a || a >= d.length) && e("RangeError", h.Errors.ParamRangeError); - var c = d[a]; - c._hasFlags(256) && (c.dispatchEvent(n.Event.getInstance(n.Event.REMOVED, !0)), this.stage && c._propagateEvent(n.Event.getInstance(n.Event.REMOVED_FROM_STAGE)), a = this.getChildIndex(c)); - d.splice(a, 1); - for (var f = d.length - 1;f >= a;f--) { - d[f]._index--; + var e = this._children; + (0 > a || a >= e.length) && l("RangeError", k.Errors.ParamRangeError); + var c = e[a]; + c._hasFlags(256) && (c.dispatchEvent(s.Event.getInstance(s.Event.REMOVED, !0)), this.stage && c._propagateEvent(s.Event.getInstance(s.Event.REMOVED_FROM_STAGE)), a = this.getChildIndex(c)); + e.splice(a, 1); + for (var f = e.length - 1;f >= a;f--) { + e[f]._index--; } c._setParent(null, -1); c._index = -1; @@ -31834,34 +31938,34 @@ var RtmpJs; this._invalidateChildren(); return c; }; - d.prototype.getChildIndex = function(b) { - m(b, "child", a.display.DisplayObject); - b._parent !== this && e("ArgumentError", h.Errors.NotAChildError); + f.prototype.getChildIndex = function(b) { + c(b, "child", a.display.DisplayObject); + b._parent !== this && l("ArgumentError", k.Errors.NotAChildError); return b._index; }; - d.prototype.setChildIndex = function(b, d) { - d |= 0; - m(b, "child", a.display.DisplayObject); - var c = this._children; - (0 > d || d >= c.length) && e("RangeError", h.Errors.ParamRangeError); - b._parent !== this && e("ArgumentError", h.Errors.NotAChildError); + f.prototype.setChildIndex = function(b, e) { + e |= 0; + c(b, "child", a.display.DisplayObject); + var f = this._children; + (0 > e || e >= f.length) && l("RangeError", k.Errors.ParamRangeError); + b._parent !== this && l("ArgumentError", k.Errors.NotAChildError); b._setDepth(-1); - var f = this.getChildIndex(b); - if (1 !== c.length && f !== d) { - if (d === f + 1 || d === f - 1) { - this._swapChildrenAt(f, d); + var d = this.getChildIndex(b); + if (1 !== f.length && d !== e) { + if (e === d + 1 || e === d - 1) { + this._swapChildrenAt(d, e); } else { - for (c.splice(f, 1), c.splice(d, 0, b), f = f < d ? f : d;f < c.length;) { - c[f]._index = f++; + for (f.splice(d, 1), f.splice(e, 0, b), d = d < e ? d : e;d < f.length;) { + f[d]._index = d++; } } this._invalidateChildren(); } }; - d.prototype.getChildAt = function(a) { + f.prototype.getChildAt = function(a) { a |= 0; - var d = this._children; - (0 > a || a >= d.length) && e("RangeError", h.Errors.ParamRangeError); + var e = this._children; + (0 > a || a >= e.length) && l("RangeError", k.Errors.ParamRangeError); a = this._lookupChildByIndex(a); if (!a) { return null; @@ -31869,465 +31973,484 @@ var RtmpJs; a._addReference(); return a; }; - d.prototype.getTimelineObjectAtDepth = function(a) { + f.prototype.getTimelineObjectAtDepth = function(a) { a |= 0; - for (var d = this._children, e = 0;e < d.length;e++) { - var c = d[e]; - if (c._depth > a) { + for (var e = this._children, c = 0;c < e.length;c++) { + var f = e[c]; + if (f._depth > a) { break; } - if (c._depth === a) { - return c; + if (f._depth === a) { + return f; } } return null; }; - d.prototype.getClipDepthIndex = function(a) { + f.prototype.getClipDepthIndex = function(a) { a |= 0; - for (var d = this._children, e = this._children.length - 1, c = !0, f = e;0 <= f;f--) { - var k = d[f]; - if (!(0 > k._depth)) { - if (k._depth <= a) { - return c ? e : f; + for (var e = this._children, c = this._children.length - 1, f = !0, d = c;0 <= d;d--) { + var g = e[d]; + if (!(0 > g._depth)) { + if (g._depth <= a) { + return f ? c : d; } - c = !1; + f = !1; } } return 0; }; - d.prototype.getChildByName = function(a) { - a = l(a); + f.prototype.getChildByName = function(a) { + a = t(a); return(a = this._lookupChildByName(a)) ? (a._addReference(), a) : null; }; - d.prototype._lookupChildByIndex = function(a) { + f.prototype._lookupChildByIndex = function(a) { return(a = this._children[a]) && a._hasFlags(256) ? a : null; }; - d.prototype._lookupChildByName = function(a) { - for (var d = this._children, e = 0;e < d.length;e++) { - var c = d[e]; - if (c._hasFlags(256) && c.name === a) { - return c; + f.prototype._lookupChildByName = function(a) { + for (var e = this._children, c = 0;c < e.length;c++) { + var f = e[c]; + if (f._hasFlags(256) && f.name === a) { + return f; } } return null; }; - d.prototype._containsPoint = function(a, d, e, c, f, k) { - return this._containsPointImpl(a, d, e, c, f, k, !1); + f.prototype._containsPoint = function(a, e, c, f, d, g) { + return this._containsPointImpl(a, e, c, f, d, g, !1); }; - d.prototype._containsPointImpl = function(a, d, e, c, f, k, m) { + f.prototype._containsPointImpl = function(a, e, c, f, d, g, h) { var l; - if (!m && (l = this._boundsAndMaskContainPoint(a, d, e, c, f), 0 === l || 2 > f)) { + if (!h && (l = this._boundsAndMaskContainPoint(a, e, c, f, d), 0 === l || 2 > d)) { return l; } - m = !1; - for (var h = this._getUnclippedChildren(f, a, d), n = h ? h.length : 0;n--;) { - if (l = h[n], !l._maskedObject && (l = l._containsGlobalPoint(a, d, f, k), 2 === l)) { - if (3 > f) { + h = !1; + for (var m = this._getUnclippedChildren(d, a, e), k = m ? m.length : 0;k--;) { + if (l = m[k], !l._maskedObject && (l = l._containsGlobalPoint(a, e, d, g), 2 === l)) { + if (3 > d) { return l; } - m = !0; - if (!(4 <= f)) { - p(3 === f); - p(1 >= k.length); + h = !0; + if (!(4 <= d)) { if (!this._mouseEnabled) { - return k.length = 0, l; + return g.length = 0, l; } - this._mouseChildren || (k[0] = this); - if (0 !== k.length) { - return p(v.InteractiveObject.isType(k[0])), 2; + this._mouseChildren || (g[0] = this); + if (0 !== g.length) { + return 2; } } } } - if (m && 4 > f) { - return 3 === f && 0 === k.length && (k[0] = this), 2; + if (h && 4 > d) { + return 3 === d && 0 === g.length && (g[0] = this), 2; } - (a = this._containsPointDirectly(e, c, a, d)) && (5 === f ? k[0] = this : (4 === f || k && this._mouseEnabled) && k.push(this)); - return m || a ? 2 : 0; + (a = this._containsPointDirectly(c, f, a, e)) && (5 === d ? g[0] = this : (4 === d || g && this._mouseEnabled) && g.push(this)); + return h || a ? 2 : 0; }; - d.prototype._getUnclippedChildren = function(a, d, e) { - var c = this._children; - if (!c) { + f.prototype._getUnclippedChildren = function(a, e, c) { + var f = this._children; + if (!f) { return null; } - for (var f, k = 0;c && k < c.length;k++) { - var m = c[k]; - -1 !== m._clipDepth ? (f || (f = c.slice(0, k)), 2 !== a && (p(3 <= a), m._containsGlobalPoint(d, e, 2, null) || (k = this.getClipDepthIndex(m._clipDepth)))) : f && f.push(m); + for (var d, g = 0;f && g < f.length;g++) { + var h = f[g]; + -1 !== h._clipDepth ? (d || (d = f.slice(0, g)), 2 !== a && (h._containsGlobalPoint(e, c, 2, null) || (g = this.getClipDepthIndex(h._clipDepth)))) : d && d.push(h); } - return f || c; + return d || f; }; - d.prototype._getChildBounds = function(a, d) { - for (var e = this._children, c = 0;c < e.length;c++) { - a.unionInPlace(e[c]._getTransformedBounds(this, d)); + f.prototype._getChildBounds = function(a, e) { + for (var c = this._children, f = 0;f < c.length;f++) { + a.unionInPlace(c[f]._getTransformedBounds(this, e)); } }; - d.prototype.getObjectsUnderPoint = function(a) { - h.counter.count("DisplayObjectContainer::getObjectsUnderPoint"); - var d = []; - this._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, 4, d); - return d.reverse(); + f.prototype.getObjectsUnderPoint = function(a) { + var e = []; + this._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, 4, e); + return e.reverse(); }; - d.prototype.areInaccessibleObjectsUnderPoint = function(a) { + f.prototype.areInaccessibleObjectsUnderPoint = function(a) { u("public DisplayObjectContainer::areInaccessibleObjectsUnderPoint"); }; - d.prototype.contains = function(b) { - m(b, "child", a.display.DisplayObject); + f.prototype.contains = function(b) { + c(b, "child", a.display.DisplayObject); return this._isAncestor(b); }; - d.prototype.swapChildrenAt = function(a, d) { + f.prototype.swapChildrenAt = function(a, e) { a |= 0; - d |= 0; + e |= 0; var c = this._children; - (0 > a || a >= c.length || 0 > d || d >= c.length) && e("RangeError", h.Errors.ParamRangeError); - this._swapChildrenAt(a, d); - a !== d && this._invalidateChildren(); + (0 > a || a >= c.length || 0 > e || e >= c.length) && l("RangeError", k.Errors.ParamRangeError); + this._swapChildrenAt(a, e); + a !== e && this._invalidateChildren(); }; - d.prototype._swapChildrenAt = function(a, d) { - var e = this._children, c = e[a], f = e[d]; - e[d] = c; - c._setDepth(-1); - c._index = d; - e[a] = f; + f.prototype._swapChildrenAt = function(a, e) { + var c = this._children, f = c[a], d = c[e]; + c[e] = f; f._setDepth(-1); - f._index = a; + f._index = e; + c[a] = d; + d._setDepth(-1); + d._index = a; }; - d.prototype.swapChildren = function(b, d) { - m(b, "child", a.display.DisplayObject); - m(d, "child", a.display.DisplayObject); - this.swapChildrenAt(this.getChildIndex(b), this.getChildIndex(d)); + f.prototype.swapChildren = function(b, e) { + c(b, "child", a.display.DisplayObject); + c(e, "child", a.display.DisplayObject); + this.swapChildrenAt(this.getChildIndex(b), this.getChildIndex(e)); }; - d.prototype.removeChildren = function(a, d) { + f.prototype.removeChildren = function(a, e) { void 0 === a && (a = 0); - void 0 === d && (d = 2147483647); + void 0 === e && (e = 2147483647); a |= 0; - d |= 0; - (0 > a || 0 > d || d < a || d >= this._children.length) && e("RangeError", h.Errors.ParamRangeError); - var c = d - a + 1; + e |= 0; + (0 > a || 0 > e || e < a || e >= this._children.length) && l("RangeError", k.Errors.ParamRangeError); + var c = e - a + 1; if (0 < c) { for (;c--;) { this.removeChildAt(a); } } }; - d.bindings = null; - d.classSymbols = null; - d.classInitializer = null; - d.initializer = function() { + f.bindings = null; + f.classSymbols = null; + f.classInitializer = null; + f.initializer = function() { this._mouseChildren = this._tabChildren = !0; this._children = []; }; - return d; + return f; }(a.display.InteractiveObject); - v.DisplayObjectContainer = k; + v.DisplayObjectContainer = m; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.JointStyle"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.JointStyle"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.ROUND; + return c.ROUND; case 1: - return e.BEVEL; + return c.BEVEL; case 2: - return e.MITER; + return c.MITER; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.ROUND: + case c.ROUND: return 0; - case e.BEVEL: + case c.BEVEL: return 1; - case e.MITER: + case c.MITER: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.ROUND = "round"; - e.BEVEL = "bevel"; - e.MITER = "miter"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.ROUND = "round"; + c.BEVEL = "bevel"; + c.MITER = "miter"; + return c; }(a.ASNative); - h.JointStyle = u; - })(h.display || (h.display = {})); + k.JointStyle = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.CapsStyle"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.CapsStyle"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.ROUND; + return c.ROUND; case 1: - return e.NONE; + return c.NONE; case 2: - return e.SQUARE; + return c.SQUARE; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.ROUND: + case c.ROUND: return 0; - case e.NONE: + case c.NONE: return 1; - case e.SQUARE: + case c.SQUARE: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.ROUND = "round"; - e.NONE = "none"; - e.SQUARE = "square"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.ROUND = "round"; + c.NONE = "none"; + c.SQUARE = "square"; + return c; }(a.ASNative); - h.CapsStyle = u; - })(h.display || (h.display = {})); + k.CapsStyle = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.LineScaleMode"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.LineScaleMode"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.NONE; + return c.NONE; case 1: - return e.NORMAL; + return c.NORMAL; case 2: - return e.VERTICAL; + return c.VERTICAL; case 3: - return e.HORIZONTAL; + return c.HORIZONTAL; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.NONE: + case c.NONE: return 0; - case e.NORMAL: + case c.NORMAL: return 1; - case e.VERTICAL: + case c.VERTICAL: return 2; - case e.HORIZONTAL: + case c.HORIZONTAL: return 3; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.NORMAL = "normal"; - e.VERTICAL = "vertical"; - e.HORIZONTAL = "horizontal"; - e.NONE = "none"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.NORMAL = "normal"; + c.VERTICAL = "vertical"; + c.HORIZONTAL = "horizontal"; + c.NONE = "none"; + return c; }(a.ASNative); - h.LineScaleMode = u; - })(h.display || (h.display = {})); + k.LineScaleMode = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.GradientType"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.GradientType"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 16: - return e.LINEAR; + return c.LINEAR; case 18: - return e.RADIAL; + return c.RADIAL; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.LINEAR: + case c.LINEAR: return 16; - case e.RADIAL: + case c.RADIAL: return 18; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.LINEAR = "linear"; - e.RADIAL = "radial"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.LINEAR = "linear"; + c.RADIAL = "radial"; + return c; }(a.ASNative); - h.GradientType = u; - })(h.display || (h.display = {})); + k.GradientType = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.SpreadMethod"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.SpreadMethod"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.PAD; + return c.PAD; case 1: - return e.REFLECT; + return c.REFLECT; case 2: - return e.REPEAT; + return c.REPEAT; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.PAD: + case c.PAD: return 0; - case e.REFLECT: + case c.REFLECT: return 1; - case e.REPEAT: + case c.REPEAT: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.PAD = "pad"; - e.REFLECT = "reflect"; - e.REPEAT = "repeat"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.PAD = "pad"; + c.REFLECT = "reflect"; + c.REPEAT = "repeat"; + return c; }(a.ASNative); - h.SpreadMethod = u; - })(h.display || (h.display = {})); + k.SpreadMethod = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.InterpolationMethod"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.InterpolationMethod"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.RGB; + return c.RGB; case 1: - return e.LINEAR_RGB; + return c.LINEAR_RGB; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.RGB: + case c.RGB: return 0; - case e.LINEAR_RGB: + case c.LINEAR_RGB: return 1; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.RGB = "rgb"; - e.LINEAR_RGB = "linearRGB"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.RGB = "rgb"; + c.LINEAR_RGB = "linearRGB"; + return c; }(a.ASNative); - h.InterpolationMethod = u; - })(h.display || (h.display = {})); + k.InterpolationMethod = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c(a, m, l, h) { + (function(d) { + (function(d) { + var k = function(a) { + function d(a, h, l, k) { void 0 === a && (a = null); - void 0 === m && (m = null); + void 0 === h && (h = null); void 0 === l && (l = !0); - void 0 === h && (h = !1); + void 0 === k && (k = !1); this.bitmapData = a; - this.matrix = m; + this.matrix = h; this.repeat = !!l; - this.smooth = !!h; + this.smooth = !!k; + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + d.GraphicsBitmapFill = k; + })(d.display || (d.display = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.GraphicsEndFill"); } __extends(c, a); c.classInitializer = null; @@ -32336,221 +32459,35 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.ASNative); - c.GraphicsBitmapFill = h; - })(c.display || (c.display = {})); + k.GraphicsEndFill = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.GraphicsEndFill"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.GraphicsEndFill = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e, c, l, k, f, d, b) { + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d, l, g, f, b, e) { void 0 === a && (a = "linear"); - void 0 === e && (e = null); void 0 === c && (c = null); - void 0 === l && (l = null); - void 0 === k && (k = null); - void 0 === f && (f = "pad"); - void 0 === d && (d = "rgb"); - void 0 === b && (b = 0); - this.type = s(a); - this.colors = e; - this.alphas = c; - this.ratios = l; - this.matrix = k; - this.spreadMethod = f; - this.interpolationMethod = s(d); - this.focalPointRatio = +b; - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.GraphicsGradientFill = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e, c) { - void 0 === a && (a = null); - void 0 === e && (e = null); - void 0 === c && (c = "evenOdd"); - this.commands = a; - this.data = e; - this.winding = s(c); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.GraphicsPath = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.GraphicsPathCommand"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.NO_OP = void 0; - e.MOVE_TO = 1; - e.LINE_TO = 2; - e.CURVE_TO = 3; - e.WIDE_MOVE_TO = 4; - e.WIDE_LINE_TO = 5; - e.CUBIC_CURVE_TO = 6; - return e; - }(a.ASNative); - h.GraphicsPathCommand = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.GraphicsPathWinding"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.EVEN_ODD = "evenOdd"; - e.NON_ZERO = "nonZero"; - return e; - }(a.ASNative); - h.GraphicsPathWinding = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c(a, m) { - void 0 === a && (a = 0); - void 0 === m && (m = 1); - this.color = a >>> 0; - this.alpha = +m; - } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; - }(a.ASNative); - c.GraphicsSolidFill = h; - })(c.display || (c.display = {})); - })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e, c, l, k, f, d) { - void 0 === a && (a = NaN); - void 0 === e && (e = !1); - void 0 === c && (c = "normal"); - void 0 === l && (l = "none"); - void 0 === k && (k = "round"); - void 0 === f && (f = 3); void 0 === d && (d = null); - this.thickness = +a; - this.pixelHinting = !!e; - this.scaleMode = s(c); - this.caps = s(l); - this.joints = s(k); - this.miterLimit = +f; - this.fill = d; - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.GraphicsStroke = u; - })(h.display || (h.display = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a, e, m, k) { - void 0 === k && (k = "none"); - u(k); - s("public flash.display.GraphicsTrianglePath"); + void 0 === l && (l = null); + void 0 === g && (g = null); + void 0 === f && (f = "pad"); + void 0 === b && (b = "rgb"); + void 0 === e && (e = 0); + this.type = r(a); + this.colors = c; + this.alphas = d; + this.ratios = l; + this.matrix = g; + this.spreadMethod = f; + this.interpolationMethod = r(b); + this.focalPointRatio = +e; } __extends(c, a); c.classInitializer = null; @@ -32559,157 +32496,321 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.ASNative); - h.GraphicsTrianglePath = l; - })(h.display || (h.display = {})); + k.GraphicsGradientFill = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d) { + void 0 === a && (a = null); + void 0 === c && (c = null); + void 0 === d && (d = "evenOdd"); + this.commands = a; + this.data = c; + this.winding = r(d); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; + }(a.ASNative); + k.GraphicsPath = t; + })(k.display || (k.display = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.GraphicsPathCommand"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.NO_OP = void 0; + c.MOVE_TO = 1; + c.LINE_TO = 2; + c.CURVE_TO = 3; + c.WIDE_MOVE_TO = 4; + c.WIDE_LINE_TO = 5; + c.CUBIC_CURVE_TO = 6; + return c; + }(a.ASNative); + k.GraphicsPathCommand = t; + })(k.display || (k.display = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.GraphicsPathWinding"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.EVEN_ODD = "evenOdd"; + c.NON_ZERO = "nonZero"; + return c; + }(a.ASNative); + k.GraphicsPathWinding = t; + })(k.display || (k.display = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(d) { + (function(a) { + (function(d) { + (function(d) { + var k = function(a) { + function d(a, h) { + void 0 === a && (a = 0); + void 0 === h && (h = 1); + this.color = a >>> 0; + this.alpha = +h; + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + d.GraphicsSolidFill = k; + })(d.display || (d.display = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d, l, g, f, b) { + void 0 === a && (a = NaN); + void 0 === c && (c = !1); + void 0 === d && (d = "normal"); + void 0 === l && (l = "none"); + void 0 === g && (g = "round"); + void 0 === f && (f = 3); + void 0 === b && (b = null); + this.thickness = +a; + this.pixelHinting = !!c; + this.scaleMode = r(d); + this.caps = r(l); + this.joints = r(g); + this.miterLimit = +f; + this.fill = b; + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; + }(a.ASNative); + k.GraphicsStroke = t; + })(k.display || (k.display = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a, c, h, g) { + void 0 === g && (g = "none"); + t(g); + r("public flash.display.GraphicsTrianglePath"); + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + k.GraphicsTrianglePath = l; + })(k.display || (k.display = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(r) { (function(v) { - function p(a, b, d, e) { - a = d - a; - b = e - b; + function u(a, b, e, c) { + a = e - a; + b = c - b; return a * a + b * b; } - function u(a, b, d, e) { - var c = 1 - e; - return a * c * c + 2 * b * c * e + d * e * e; + function t(a, b, e, c) { + var f = 1 - c; + return a * f * f + 2 * b * f * c + e * c * c; } - function l(a, b, d) { - var e = (a - b) / (a - 2 * b + d); - return 0 > e ? a : 1 < e ? d : u(a, b, d, e); + function l(a, b, e) { + var c = (a - b) / (a - 2 * b + e); + return 0 > c ? a : 1 < c ? e : t(a, b, e, c); } - function e(a, b, d, e, c) { - var g = c * c, f = 1 - c, k = f * f; - return a * f * k + 3 * b * c * k + 3 * d * f * g + e * c * g; + function c(a, b, e, c, f) { + var d = f * f, g = 1 - f, h = g * g; + return a * g * h + 3 * b * f * h + 3 * e * g * d + c * f * d; } - function m(a, b, d, c) { - var g = b - a, f; - f = 2 * (d - b); - var k = c - d; - g + k === f && (k *= 1.0001); - var m = 2 * g - f, l = f - 2 * g, l = Math.sqrt(l * l - 4 * g * (g - f + k)); - f = 2 * (g - f + k); - g = (m + l) / f; - m = (m - l) / f; - l = []; - 0 <= g && 1 >= g && l.push(Math.round(e(a, b, d, c, g))); - 0 <= m && 1 >= m && l.push(Math.round(e(a, b, d, c, m))); - return l; + function h(a, b, e, f) { + var d = b - a, g; + g = 2 * (e - b); + var h = f - e; + d + h === g && (h *= 1.0001); + var l = 2 * d - g, n = g - 2 * d, n = Math.sqrt(n * n - 4 * d * (d - g + h)); + g = 2 * (d - g + h); + d = (l + n) / g; + l = (l - n) / g; + n = []; + 0 <= d && 1 >= d && n.push(Math.round(c(a, b, e, f, d))); + 0 <= l && 1 >= l && n.push(Math.round(c(a, b, e, f, l))); + return n; } - function t(a, b, d, e, c, g, f, k, m) { - function l(a) { - return a * (w + a * (t + a * u)) + b - m; + function p(a, b, e, c, f, d, g, h, l) { + function n(a) { + return a * (p + a * (u + a * x)) + b - l; } - function r(b) { + function q(b) { 0 > b ? b = 0 : 1 < b && (b = 1); - return a + b * (n + b * (s + b * p)); + return a + b * (k + b * (r + b * t)); } - function h(a, b, d, e) { - if (!(Math.abs(d - b) <= e)) { - var c = .5 * (b + d); - 0 >= a(b) * a(d) ? (v = b, z = d) : (h(a, b, c, e), h(a, c, d, e)); + function m(a, b, e, c) { + if (!(Math.abs(e - b) <= c)) { + var f = .5 * (b + e); + 0 >= a(b) * a(e) ? (v = b, L = e) : (m(a, b, f, c), m(a, f, e, c)); } } - var n = 3 * (d - a), w = 3 * (e - b), s = 3 * (c - d) - n, t = 3 * (g - e) - w, p = f - a - n - s, u = k - b - w - t, v = 0, z = 1; - h(l, 0, 1, .05); - g = q(v, z, l); - if (1E-5 < Math.abs(l(g))) { + var k = 3 * (e - a), p = 3 * (c - b), r = 3 * (f - e) - k, u = 3 * (d - c) - p, t = g - a - k - r, x = h - b - p - u, v = 0, L = 1; + m(n, 0, 1, .05); + d = s(v, L, n); + if (1E-5 < Math.abs(n(d))) { return[]; } - d = []; - 1 >= g && d.push(r(g)); - e = u; - c = g * e + t; - f = c * c - 4 * e * (g * c + w); - if (0 > f) { - return d; - } - f = Math.sqrt(f); - e = 1 / (e + e); - g = (f - c) * e; - e *= -c - f; - 0 <= g && 1 >= g && d.push(r(g)); - 0 <= e && 1 >= e && d.push(r(e)); - return d; - } - function q(a, b, d) { - var e, c, g, f, k, m, l = a; - c = d(a); - if (0 === c) { - return a; - } - f = d(b); - if (0 === f) { - return b; - } - if (0 < f * c) { - return a; - } - for (var r = 0, h = 0;50 > h;++h) { - r++; - e = .5 * (b + a); - g = d(e); - if (0 === g) { - break; - } - if (1E-6 > Math.abs(e - a)) { - break; - } - 0 < g * c && (a = b, b = c, c = f, f = b); - b = g - c; - m = f - g; - k = f - c; - if (f * k < 2 * g * b) { - b = e, f = g; - } else { - f = (e - a) / b; - b = (b - m) / (m * k); - b = a - f * c * (1 - b * g); - f = d(b); - if (0 === f || 1E-6 > Math.abs(b - l)) { - return b; - } - l = b; - 0 > f * c || (a = b, c = f, b = e, f = g); - } + e = []; + 1 >= d && e.push(q(d)); + c = x; + f = d * c + u; + g = f * f - 4 * c * (d * f + p); + if (0 > g) { + return e; } + g = Math.sqrt(g); + c = 1 / (c + c); + d = (g - f) * c; + c *= -f - g; + 0 <= d && 1 >= d && e.push(q(d)); + 0 <= c && 1 >= c && e.push(q(c)); return e; } - function n(a, b, d, e, c, g) { - return g > b !== e > b && a < (d - c) * (b - g) / (e - g) + c; + function s(a, b, e) { + var c, f, d, g, h, l, n = a; + f = e(a); + if (0 === f) { + return a; + } + g = e(b); + if (0 === g) { + return b; + } + if (0 < g * f) { + return a; + } + for (var q = 0, m = 0;50 > m;++m) { + q++; + c = .5 * (b + a); + d = e(c); + if (0 === d) { + break; + } + if (1E-6 > Math.abs(c - a)) { + break; + } + 0 < d * f && (a = b, b = f, f = g, g = b); + b = d - f; + l = g - d; + h = g - f; + if (g * h < 2 * d * b) { + b = c, g = d; + } else { + g = (c - a) / b; + b = (b - l) / (l * h); + b = a - g * f * (1 - b * d); + g = e(b); + if (0 === g || 1E-6 > Math.abs(b - n)) { + return b; + } + n = b; + 0 > g * f || (a = b, f = g, b = c, g = d); + } + } + return c; } - var k = c.Debug.notImplemented, f = c.AVM2.Runtime.asCoerceString, d = c.AVM2.Runtime.throwError, b = c.NumberUtilities.clamp, g = c.Bounds, r = c.Debug.assert, w = c.Debug.assertUnreachable, z = s.display.GradientType, A = s.display.SpreadMethod, B = s.display.InterpolationMethod, M = s.display.LineScaleMode, N = s.display.CapsStyle, K = s.display.JointStyle, y = c.ShapeData, D = function(a) { - function q() { - this._id = s.display.DisplayObject.getNextSyncID(); - this._graphicsData = new y; + function m(a, b, e, c, f, d) { + return d > b !== c > b && a < (e - f) * (b - d) / (c - d) + f; + } + var g = d.Debug.notImplemented, f = d.AVM2.Runtime.asCoerceString, b = d.AVM2.Runtime.throwError, e = d.NumberUtilities.clamp, q = d.Bounds, n = r.display.GradientType, x = r.display.SpreadMethod, L = r.display.InterpolationMethod, A = r.display.LineScaleMode, H = r.display.CapsStyle, K = r.display.JointStyle, F = d.ShapeData, J = function(a) { + function s() { + this._id = r.display.DisplayObject.getNextSyncID(); + this._graphicsData = new F; this._textures = []; - this._fillBounds = new g(134217728, 134217728, 134217728, 134217728); - this._lineBounds = new g(134217728, 134217728, 134217728, 134217728); + this._fillBounds = new q(134217728, 134217728, 134217728, 134217728); + this._lineBounds = new q(134217728, 134217728, 134217728, 134217728); this._lastX = this._lastY = 0; this._boundsIncludeLastCoordinates = !0; this._parent = null; this._topLeftStrokeWidth = this._bottomRightStrokeWidth = 0; this._isDirty = !0; } - __extends(q, a); - q.FromData = function(a) { - var b = new s.display.Graphics; - b._graphicsData = y.FromPlainObject(a.shape); + __extends(s, a); + s.FromData = function(a) { + var b = new r.display.Graphics; + b._graphicsData = F.FromPlainObject(a.shape); a.lineBounds && (b._lineBounds.copyFrom(a.lineBounds), b._fillBounds.copyFrom(a.fillBounds || a.lineBounds)); return b; }; - q.prototype.getGraphicsData = function() { + s.prototype.getGraphicsData = function() { return this._graphicsData; }; - q.prototype.getUsedTextures = function() { + s.prototype.getUsedTextures = function() { return this._textures; }; - q.prototype._setStrokeWidth = function(a) { + s.prototype._setStrokeWidth = function(a) { switch(a) { case 1: this._topLeftStrokeWidth = 0; @@ -32723,151 +32824,149 @@ var RtmpJs; this._bottomRightStrokeWidth = this._topLeftStrokeWidth = a = Math.ceil(.5 * a) | 0; } }; - q.prototype._setParent = function(a) { - r(!this._parent); + s.prototype._setParent = function(a) { this._parent = a; }; - q.prototype._invalidate = function() { - r(this._parent, "Graphics instances must have a parent."); + s.prototype._invalidate = function() { this._parent._invalidateFillAndLineBounds(!0, !0); this._parent._propagateFlagsUp(536870912); this._isDirty = !0; }; - q.prototype._getContentBounds = function(a) { + s.prototype._getContentBounds = function(a) { void 0 === a && (a = !0); return a ? this._lineBounds : this._fillBounds; }; - q.prototype.clear = function() { + s.prototype.clear = function() { this._graphicsData.isEmpty() || (this._graphicsData.clear(), this._textures.length = 0, this._fillBounds.setToSentinels(), this._lineBounds.setToSentinels(), this._lastX = this._lastY = 0, this._boundsIncludeLastCoordinates = !1, this._invalidate()); }; - q.prototype.beginFill = function(a, d) { - void 0 === d && (d = 1); + s.prototype.beginFill = function(a, b) { + void 0 === b && (b = 1); a = a >>> 0 & 16777215; - d = Math.round(255 * b(+d, -1, 1)) | 0; - this._graphicsData.beginFill(a << 8 | d); + b = Math.round(255 * e(+b, -1, 1)) | 0; + this._graphicsData.beginFill(a << 8 | b); }; - q.prototype.beginGradientFill = function(a, b, d, e, c, g, f, k) { - void 0 === c && (c = null); - void 0 === g && (g = "pad"); - void 0 === f && (f = "rgb"); - void 0 === k && (k = 0); - this._writeGradientStyle(2, a, b, d, e, c, g, f, k, !1); + s.prototype.beginGradientFill = function(a, b, e, c, f, d, g, h) { + void 0 === f && (f = null); + void 0 === d && (d = "pad"); + void 0 === g && (g = "rgb"); + void 0 === h && (h = 0); + this._writeGradientStyle(2, a, b, e, c, f, d, g, h, !1); }; - q.prototype.beginBitmapFill = function(a, b, d, e) { + s.prototype.beginBitmapFill = function(a, b, e, c) { void 0 === b && (b = null); - void 0 === d && (d = !0); - void 0 === e && (e = !1); - this._writeBitmapStyle(3, a, b, d, e, !1); + void 0 === e && (e = !0); + void 0 === c && (c = !1); + this._writeBitmapStyle(3, a, b, e, c, !1); }; - q.prototype.endFill = function() { + s.prototype.endFill = function() { this._graphicsData.endFill(); }; - q.prototype.lineStyle = function(a, d, e, c, g, k, m, l) { - void 0 === d && (d = 0); - void 0 === e && (e = 1); - void 0 === c && (c = !1); + s.prototype.lineStyle = function(a, b, c, d, g, h, l, n) { + void 0 === b && (b = 0); + void 0 === c && (c = 1); + void 0 === d && (d = !1); void 0 === g && (g = "normal"); - void 0 === k && (k = null); - void 0 === m && (m = null); - void 0 === l && (l = 3); + void 0 === h && (h = null); + void 0 === l && (l = null); + void 0 === n && (n = 3); a = +a; - d = d >>> 0 & 16777215; - e = Math.round(255 * b(+e, -1, 1)); - c = !!c; + b = b >>> 0 & 16777215; + c = Math.round(255 * e(+c, -1, 1)); + d = !!d; g = f(g); - k = f(k); - m = f(m); - l = b(+l | 0, 0, 255); - isNaN(a) ? (this._setStrokeWidth(0), this._graphicsData.endLine()) : (a = 20 * b(+a, 0, 255) | 0, this._setStrokeWidth(a), g = M.toNumber(f(g)), 0 > g && (g = M.toNumber(M.NORMAL)), k = N.toNumber(f(k)), 0 > k && (k = N.toNumber(N.ROUND)), m = K.toNumber(f(m)), 0 > m && (m = K.toNumber(K.ROUND)), this._graphicsData.lineStyle(a, d << 8 | e, c, g, k, m, l)); + h = f(h); + l = f(l); + n = e(+n | 0, 0, 255); + isNaN(a) ? (this._setStrokeWidth(0), this._graphicsData.endLine()) : (a = 20 * e(+a, 0, 255) | 0, this._setStrokeWidth(a), g = A.toNumber(f(g)), 0 > g && (g = A.toNumber(A.NORMAL)), h = H.toNumber(f(h)), 0 > h && (h = H.toNumber(H.ROUND)), l = K.toNumber(f(l)), 0 > l && (l = K.toNumber(K.ROUND)), this._graphicsData.lineStyle(a, b << 8 | c, d, g, h, l, n)); }; - q.prototype.lineGradientStyle = function(a, b, d, e, c, g, f, k) { - void 0 === c && (c = null); - void 0 === g && (g = "pad"); - void 0 === f && (f = "rgb"); - void 0 === k && (k = 0); - this._writeGradientStyle(6, a, b, d, e, c, g, f, k, !this._graphicsData.hasLines); + s.prototype.lineGradientStyle = function(a, b, e, c, f, d, g, h) { + void 0 === f && (f = null); + void 0 === d && (d = "pad"); + void 0 === g && (g = "rgb"); + void 0 === h && (h = 0); + this._writeGradientStyle(6, a, b, e, c, f, d, g, h, !this._graphicsData.hasLines); }; - q.prototype.lineBitmapStyle = function(a, b, d, e) { + s.prototype.lineBitmapStyle = function(a, b, e, c) { void 0 === b && (b = null); - void 0 === d && (d = !0); - void 0 === e && (e = !1); - this._writeBitmapStyle(7, a, b, d, e, !this._graphicsData.hasLines); + void 0 === e && (e = !0); + void 0 === c && (c = !1); + this._writeBitmapStyle(7, a, b, e, c, !this._graphicsData.hasLines); }; - q.prototype.drawRect = function(a, b, d, e) { + s.prototype.drawRect = function(a, b, e, c) { a = 20 * a | 0; b = 20 * b | 0; - d = a + (20 * d | 0); - e = b + (20 * e | 0); + e = a + (20 * e | 0); + c = b + (20 * c | 0); a === this._lastX && b === this._lastY || this._graphicsData.moveTo(a, b); - this._graphicsData.lineTo(d, b); - this._graphicsData.lineTo(d, e); - this._graphicsData.lineTo(a, e); + this._graphicsData.lineTo(e, b); + this._graphicsData.lineTo(e, c); + this._graphicsData.lineTo(a, c); this._graphicsData.lineTo(a, b); - this._extendBoundsByPoint(d, e); + this._extendBoundsByPoint(e, c); this._applyLastCoordinates(a, b); this._invalidate(); }; - q.prototype.drawRoundRect = function(a, b, d, e, c, g) { + s.prototype.drawRoundRect = function(a, b, e, c, f, d) { a = +a; b = +b; - d = +d; e = +e; c = +c; - if ((g = +g) && c) { - c = c / 2 | 0; - g = g / 2 | 0; - var f = d / 2, k = e / 2; - c > f && (c = f); - g > k && (g = k); - f === c && k === g ? c === g ? this.drawCircle(a + c, b + g, c) : this.drawEllipse(a, b, 2 * c, 2 * g) : (d = a + d, e = b + e, f = a + c, c = d - c, k = b + g, g = e - g, this.moveTo(d, g), this.curveTo(d, e, c, e), this.lineTo(f, e), this.curveTo(a, e, a, g), this.lineTo(a, k), this.curveTo(a, b, f, b), this.lineTo(c, b), this.curveTo(d, b, d, k), this.lineTo(d, g)); - } else { - this.drawRect(a, b, d, e); - } - }; - q.prototype.drawRoundRectComplex = function(a, b, d, e, c, g, f, k) { - a = +a; - b = +b; - d = +d; - e = +e; - c = +c; - g = +g; f = +f; - k = +k; - if (c | g | f | k) { - d = a + d; - e = b + e; - var m = a + c; - this.moveTo(d, e - k); - this.curveTo(d, e, d - k, e); - this.lineTo(a + f, e); - this.curveTo(a, e, a, e - f); - this.lineTo(a, b + c); - this.curveTo(a, b, m, b); - this.lineTo(d - g, b); - this.curveTo(d, b, d, b + g); - this.lineTo(d, e - k); + if ((d = +d) && f) { + f = f / 2 | 0; + d = d / 2 | 0; + var g = e / 2, h = c / 2; + f > g && (f = g); + d > h && (d = h); + g === f && h === d ? f === d ? this.drawCircle(a + f, b + d, f) : this.drawEllipse(a, b, 2 * f, 2 * d) : (e = a + e, c = b + c, g = a + f, f = e - f, h = b + d, d = c - d, this.moveTo(e, d), this.curveTo(e, c, f, c), this.lineTo(g, c), this.curveTo(a, c, a, d), this.lineTo(a, h), this.curveTo(a, b, g, b), this.lineTo(f, b), this.curveTo(e, b, e, h), this.lineTo(e, d)); } else { - this.drawRect(a, b, d, e); + this.drawRect(a, b, e, c); } }; - q.prototype.drawCircle = function(a, b, d) { + s.prototype.drawRoundRectComplex = function(a, b, e, c, f, d, g, h) { + a = +a; + b = +b; + e = +e; + c = +c; + f = +f; d = +d; - this.drawEllipse(+a - d, +b - d, 2 * d, 2 * d); - }; - q.prototype.drawEllipse = function(a, b, d, e) { - d = +d / 2; - e = +e / 2; - a = +a + d; - b = +b + e; - var c = a + d, g = b; - this.moveTo(c, g); - for (var f = 0, k = 1, m = 0, l = 0;4 > l;l++) { - var r = f + Math.PI / 2, f = 4 / 3 * Math.tan((r - f) / 4), h = c - m * f * d, n = g + k * f * e, k = Math.cos(r), m = Math.sin(r), c = a + k * d, g = b + m * e; - this.cubicCurveTo(h, n, c + m * f * d, g - k * f * e, c, g); - f = r; + g = +g; + h = +h; + if (f | d | g | h) { + e = a + e; + c = b + c; + var l = a + f; + this.moveTo(e, c - h); + this.curveTo(e, c, e - h, c); + this.lineTo(a + g, c); + this.curveTo(a, c, a, c - g); + this.lineTo(a, b + f); + this.curveTo(a, b, l, b); + this.lineTo(e - d, b); + this.curveTo(e, b, e, b + d); + this.lineTo(e, c - h); + } else { + this.drawRect(a, b, e, c); } }; - q.prototype.moveTo = function(a, b) { + s.prototype.drawCircle = function(a, b, e) { + e = +e; + this.drawEllipse(+a - e, +b - e, 2 * e, 2 * e); + }; + s.prototype.drawEllipse = function(a, b, e, c) { + e = +e / 2; + c = +c / 2; + a = +a + e; + b = +b + c; + var f = a + e, d = b; + this.moveTo(f, d); + for (var g = 0, h = 1, l = 0, n = 0;4 > n;n++) { + var q = g + Math.PI / 2, g = 4 / 3 * Math.tan((q - g) / 4), m = f - l * g * e, k = d + h * g * c, h = Math.cos(q), l = Math.sin(q), f = a + h * e, d = b + l * c; + this.cubicCurveTo(m, k, f + l * g * e, d - h * g * c, f, d); + g = q; + } + }; + s.prototype.moveTo = function(a, b) { a = 20 * a | 0; b = 20 * b | 0; this._graphicsData.moveTo(a, b); @@ -32875,47 +32974,47 @@ var RtmpJs; this._lastY = b; this._boundsIncludeLastCoordinates = !1; }; - q.prototype.lineTo = function(a, b) { + s.prototype.lineTo = function(a, b) { a = 20 * a | 0; b = 20 * b | 0; this._graphicsData.lineTo(a, b); this._applyLastCoordinates(a, b); this._invalidate(); }; - q.prototype.curveTo = function(a, b, d, e) { + s.prototype.curveTo = function(a, b, e, c) { a = 20 * a | 0; b = 20 * b | 0; - d = 20 * d | 0; - e = 20 * e | 0; - this._graphicsData.curveTo(a, b, d, e); - (a < this._lastX || a > d) && this._extendBoundsByX(l(this._lastX, a, d) | 0); - (b < this._lastY || b > e) && this._extendBoundsByY(l(this._lastY, b, e) | 0); - this._applyLastCoordinates(d, e); - this._invalidate(); - }; - q.prototype.cubicCurveTo = function(a, b, d, e, c, g) { - a = 20 * a | 0; - b = 20 * b | 0; - d = 20 * d | 0; e = 20 * e | 0; c = 20 * c | 0; - g = 20 * g | 0; - this._graphicsData.cubicCurveTo(a, b, d, e, c, g); - var f = this._lastX, k = this._lastY; - if (a < f || d < f || a > c || d > c) { - for (a = m(f, a, d, c), d = a.length;d--;) { - this._extendBoundsByX(a[d] | 0); - } - } - if (b < k || e < k || b > g || e > g) { - for (a = m(k, b, e, g), d = a.length;d--;) { - this._extendBoundsByY(a[d] | 0); - } - } - this._applyLastCoordinates(c, g); + this._graphicsData.curveTo(a, b, e, c); + (a < this._lastX || a > e) && this._extendBoundsByX(l(this._lastX, a, e) | 0); + (b < this._lastY || b > c) && this._extendBoundsByY(l(this._lastY, b, c) | 0); + this._applyLastCoordinates(e, c); this._invalidate(); }; - q.prototype.copyFrom = function(a) { + s.prototype.cubicCurveTo = function(a, b, e, c, f, d) { + a = 20 * a | 0; + b = 20 * b | 0; + e = 20 * e | 0; + c = 20 * c | 0; + f = 20 * f | 0; + d = 20 * d | 0; + this._graphicsData.cubicCurveTo(a, b, e, c, f, d); + var g = this._lastX, l = this._lastY; + if (a < g || e < g || a > f || e > f) { + for (a = h(g, a, e, f), e = a.length;e--;) { + this._extendBoundsByX(a[e] | 0); + } + } + if (b < l || c < l || b > d || c > d) { + for (a = h(l, b, c, d), e = a.length;e--;) { + this._extendBoundsByY(a[e] | 0); + } + } + this._applyLastCoordinates(f, d); + this._invalidate(); + }; + s.prototype.copyFrom = function(a) { this._graphicsData = a._graphicsData.clone(); this._fillBounds = a._fillBounds.clone(); this._lineBounds = a._lineBounds.clone(); @@ -32925,97 +33024,93 @@ var RtmpJs; this._boundsIncludeLastCoordinates = a._boundsIncludeLastCoordinates; this._invalidate(); }; - q.prototype.drawPath = function(a, b, d) { - void 0 === d && (d = "evenOdd"); - f(d); - k("public flash.display.Graphics::drawPath"); - }; - q.prototype.drawTriangles = function(a, b, d, e) { - void 0 === e && (e = "none"); + s.prototype.drawPath = function(a, b, e) { + void 0 === e && (e = "evenOdd"); f(e); - k("public flash.display.Graphics::drawTriangles"); + g("public flash.display.Graphics::drawPath"); }; - q.prototype.drawGraphicsData = function(a) { - k("public flash.display.Graphics::drawGraphicsData"); + s.prototype.drawTriangles = function(a, b, e, c) { + void 0 === c && (c = "none"); + f(c); + g("public flash.display.Graphics::drawTriangles"); }; - q.prototype._containsPoint = function(a, b, d, e) { - var c = this._graphicsData.hasLines; - if (!e && !(d && c ? this._lineBounds : this._fillBounds).contains(a, b)) { + s.prototype.drawGraphicsData = function(a) { + g("public flash.display.Graphics::drawGraphicsData"); + }; + s.prototype._containsPoint = function(a, b, e, c) { + var f = this._graphicsData.hasLines; + if (!c && !(e && f ? this._lineBounds : this._fillBounds).contains(a, b)) { return!1; } - var g = !1; - this._graphicsData.hasFills ? g = this._fillContainsPoint(a, b, e) : r(c, "Can't have non-empty bounds without line or fill set."); - !g && d && (g = this._linesContainsPoint(a, b, e)); - return g; + f = !1; + this._graphicsData.hasFills && (f = this._fillContainsPoint(a, b, c)); + !f && e && (f = this._linesContainsPoint(a, b, c)); + return f; }; - q.prototype._fillContainsPoint = function(a, b, d) { - for (var e = this._graphicsData, c = e.commands, g = e.commandsPosition, f = e.coordinates, k = e.morphCoordinates, m = 0, l = 0, h = 0, q = 0, s = 0, p, v, z = !1, A = !1, B = 0, M = 0, N = !1, y = 0;y < g;y++) { - p = c[y]; - switch(p) { + s.prototype._fillContainsPoint = function(a, b, e) { + for (var c = this._graphicsData, f = c.commands, d = c.commandsPosition, g = c.coordinates, c = c.morphCoordinates, h = 0, l = 0, n = 0, q = 0, k = 0, s, r, u = !1, x = !1, v = 0, L = 0, A = !1, H = 0;H < d;H++) { + s = f[H]; + switch(s) { case 9: - r(m <= e.coordinatesPosition - 2); - z && A && n(a, b, l, h, B, M) && (N = !N); - z = !0; - l = B = f[m++]; - h = M = f[m++]; - d && (l = B += (k[m - 2] - B) * d, h = M += (k[m - 2] - M) * d); + u && x && m(a, b, l, n, v, L) && (A = !A); + u = !0; + l = v = g[h++]; + n = L = g[h++]; + e && (l = v += (c[h - 2] - v) * e, n = L += (c[h - 2] - L) * e); continue; case 10: - r(m <= e.coordinatesPosition - 2); - q = f[m++]; - s = f[m++]; - d && (q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d); - A && n(a, b, l, h, q, s) && (N = !N); + q = g[h++]; + k = g[h++]; + e && (q += (c[h - 2] - q) * e, k += (c[h - 1] - k) * e); + x && m(a, b, l, n, q, k) && (A = !A); break; case 11: - r(m <= e.coordinatesPosition - 4); - p = f[m++]; - v = f[m++]; - q = f[m++]; - s = f[m++]; - d && (p += (k[m - 4] - p) * d, v += (k[m - 3] - v) * d, q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d); + s = g[h++]; + r = g[h++]; + q = g[h++]; + k = g[h++]; + e && (s += (c[h - 4] - s) * e, r += (c[h - 3] - r) * e, q += (c[h - 2] - q) * e, k += (c[h - 1] - k) * e); var K; - if (K = A) { - if (v > b === h > b && s > b === h > b) { + if (K = x) { + if (r > b === n > b && k > b === n > b) { K = !1; } else { - if (l >= a && p >= a && q >= a) { + if (l >= a && s >= a && q >= a) { K = !0; } else { - K = h - 2 * v + s; - v = 2 * (v - h); - var D = v * v - 4 * K * (h - b); - 0 > D ? K = !1 : (D = Math.sqrt(D), K = 1 / (K + K), h = (D - v) * K, v = (-v - D) * K, K = !1, 0 <= h && 1 >= h && u(l, p, q, h) > a && (K = !K), 0 <= v && 1 >= v && u(l, p, q, v) > a && (K = !K)); + K = n - 2 * r + k; + r = 2 * (r - n); + var F = r * r - 4 * K * (n - b); + 0 > F ? K = !1 : (F = Math.sqrt(F), K = 1 / (K + K), n = (F - r) * K, r = (-r - F) * K, K = !1, 0 <= n && 1 >= n && t(l, s, q, n) > a && (K = !K), 0 <= r && 1 >= r && t(l, s, q, r) > a && (K = !K)); } } } - K && (N = !N); + K && (A = !A); break; case 12: - r(m <= e.coordinatesPosition - 6); - p = f[m++]; - v = f[m++]; - var D = f[m++], L = f[m++], q = f[m++], s = f[m++]; - d && (p += (k[m - 6] - p) * d, v += (k[m - 5] - v) * d, D += (k[m - 4] - D) * d, L += (k[m - 3] - L) * d, q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d); - if (K = A) { + s = g[h++]; + r = g[h++]; + var F = g[h++], J = g[h++], q = g[h++], k = g[h++]; + e && (s += (c[h - 6] - s) * e, r += (c[h - 5] - r) * e, F += (c[h - 4] - F) * e, J += (c[h - 3] - J) * e, q += (c[h - 2] - q) * e, k += (c[h - 1] - k) * e); + if (K = x) { K = a; - var H = h > b; - if (v > b === H && L > b === H && s > b === H) { + var M = n > b; + if (r > b === M && J > b === M && k > b === M) { K = !1; } else { - if (l < K && p < K && D < K && q < K) { + if (l < K && s < K && F < K && q < K) { K = !1; } else { - H = !1; - l = t(l, h, p, v, D, L, q, s, b); - for (p = l.length;p;p--) { - l[p] >= K && (H = !H); + M = !1; + l = p(l, n, s, r, F, J, q, k, b); + for (s = l.length;s;s--) { + l[s] >= K && (M = !M); } - K = H; + K = M; } } } - K && (N = !N); + K && (A = !A); break; case 1: ; @@ -33024,398 +33119,355 @@ var RtmpJs; case 3: ; case 4: - z && A && n(a, b, l, h, B, M) && (N = !N); - if (N) { + u && x && m(a, b, l, n, v, L) && (A = !A); + if (A) { return!0; } - z = !1; - A = 4 !== p; + u = !1; + x = 4 !== s; break; case 5: - m++; - break; - case 6: - ; - case 7: - ; - case 8: - break; - default: - w("Invalid command " + p + " encountered at index" + (y - 1) + " of " + g); + h++; } l = q; - h = s; + n = k; } - r(y === g); - r(m === e.coordinatesPosition); - z && A && n(a, b, l, h, B, M) && (N = !N); - return N; + u && x && m(a, b, l, n, v, L) && (A = !A); + return A; }; - q.prototype._linesContainsPoint = function(a, b, d) { - for (var c = this._graphicsData, g = c.commands, f = c.commandsPosition, k = c.coordinates, h = c.morphCoordinates, n = 0, q = 0, s = 0, t = 0, v = 0, z, A, B, M, N, y = 0, K = 0, D = 0, L = 0, H = 0, aa = 0, ia = K = 0;ia < f;ia++) { - z = g[ia]; - switch(z) { + s.prototype._linesContainsPoint = function(a, b, e) { + for (var f = this._graphicsData, d = f.commands, g = f.commandsPosition, n = f.coordinates, f = f.morphCoordinates, q = 0, m = 0, k = 0, p = 0, s = 0, r, x, v, L, A, H = 0, K = r = 0, F = 0, J = 0, M = 0, D = 0, ia = 0;ia < g;ia++) { + switch(d[ia]) { case 9: - r(n <= c.coordinatesPosition - 2); - q = k[n++]; - s = k[n++]; - d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d); + m = n[q++]; + k = n[q++]; + e && (m += (f[q - 2] - m) * e, k += (f[q - 1] - k) * e); continue; case 10: - r(n <= c.coordinatesPosition - 2); - if (0 === y) { - q = k[n++]; - s = k[n++]; - d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d); + if (0 === H) { + m = n[q++]; + k = n[q++]; + e && (m += (f[q - 2] - m) * e, k += (f[q - 1] - k) * e); continue; } - t = k[n++]; - v = k[n++]; - d && (t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d); - if (q === t && s === v) { + p = n[q++]; + s = n[q++]; + e && (p += (f[q - 2] - p) * e, s += (f[q - 1] - s) * e); + if (m === p && k === s) { break; } - if (H < q && H < t || L > q && L > t || K < s && K < v || aa > s && aa > v) { + if (J < m && J < p || F > m && F > p || D < k && D < s || M > k && M > s) { break; } - if (t === q || v === s) { + if (p === m || s === k) { return!0; } - N = ((a - q) * (t - q) + (b - s) * (v - s)) / p(q, s, t, v); - if (0 > N) { - if (p(a, b, q, s) <= D) { + A = ((a - m) * (p - m) + (b - k) * (s - k)) / u(m, k, p, s); + if (0 > A) { + if (u(a, b, m, k) <= K) { return!0; } break; } - if (1 < N) { - if (p(a, b, t, v) <= D) { + if (1 < A) { + if (u(a, b, p, s) <= K) { return!0; } break; } - if (p(a, b, q + N * (t - q), s + N * (v - s)) <= D) { + if (u(a, b, m + A * (p - m), k + A * (s - k)) <= K) { return!0; } break; case 11: - r(n <= c.coordinatesPosition - 4); - if (0 === y) { - n += 2; - q = k[n++]; - s = k[n++]; - d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d); + if (0 === H) { + q += 2; + m = n[q++]; + k = n[q++]; + e && (m += (f[q - 2] - m) * e, k += (f[q - 1] - k) * e); continue; } - z = k[n++]; - A = k[n++]; - t = k[n++]; - v = k[n++]; - d && (z += (h[n - 4] - z) * d, A += (h[n - 3] - A) * d, t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d); - var T = l(q, z, t); - if (H < q && H < T && H < t || L > q && L > T && L > t) { + r = n[q++]; + x = n[q++]; + p = n[q++]; + s = n[q++]; + e && (r += (f[q - 4] - r) * e, x += (f[q - 3] - x) * e, p += (f[q - 2] - p) * e, s += (f[q - 1] - s) * e); + var ga = l(m, r, p); + if (J < m && J < ga && J < p || F > m && F > ga && F > p) { break; } - T = l(s, A, v); - if (K < s && K < T && K < v || aa > s && aa > T && aa > v) { + ga = l(k, x, s); + if (D < k && D < ga && D < s || M > k && M > ga && M > s) { break; } - for (N = 0;1 > N;N += .02) { - if (B = u(q, z, t, N), !(B < L || B > H) && (M = u(s, A, v, N), !(M < aa || M > K) && (a - B) * (a - B) + (b - M) * (b - M) < D)) { + for (A = 0;1 > A;A += .02) { + if (v = t(m, r, p, A), !(v < F || v > J) && (L = t(k, x, s, A), !(L < M || L > D) && (a - v) * (a - v) + (b - L) * (b - L) < K)) { return!0; } } break; case 12: - r(n <= c.coordinatesPosition - 6); - if (0 === y) { - n += 4; - n++; - q = k[n++]; - d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d); + if (0 === H) { + q += 4; + q++; + m = n[q++]; + e && (m += (f[q - 2] - m) * e, k += (f[q - 1] - k) * e); continue; } - z = k[n++]; - A = k[n++]; - var T = k[n++], da = k[n++], t = k[n++], v = k[n++]; - d && (z += (h[n - 6] - z) * d, A += (h[n - 5] - A) * d, T += (h[n - 4] - T) * d, da += (h[n - 3] - da) * d, t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d); - for (B = m(q, z, T, t);2 > B.length;) { - B.push(t); + r = n[q++]; + x = n[q++]; + var ga = n[q++], ca = n[q++], p = n[q++], s = n[q++]; + e && (r += (f[q - 6] - r) * e, x += (f[q - 5] - x) * e, ga += (f[q - 4] - ga) * e, ca += (f[q - 3] - ca) * e, p += (f[q - 2] - p) * e, s += (f[q - 1] - s) * e); + for (v = h(m, r, ga, p);2 > v.length;) { + v.push(p); } - if (H < q && H < t && H < B[0] && H < B[1] || L > q && L > t && L > B[0] && L > B[1]) { + if (J < m && J < p && J < v[0] && J < v[1] || F > m && F > p && F > v[0] && F > v[1]) { break; } - for (B = m(s, A, da, v);2 > B.length;) { - B.push(v); + for (v = h(k, x, ca, s);2 > v.length;) { + v.push(s); } - if (K < s && K < v && K < B[0] && K < B[1] || aa > s && aa > v && aa > B[0] && aa > B[1]) { + if (D < k && D < s && D < v[0] && D < v[1] || M > k && M > s && M > v[0] && M > v[1]) { break; } - for (N = 0;1 > N;N += .02) { - if (B = e(q, z, T, t, N), !(B < L || B > H) && (M = e(s, A, da, v, N), !(M < aa || M > K) && (a - B) * (a - B) + (b - M) * (b - M) < D)) { + for (A = 0;1 > A;A += .02) { + if (v = c(m, r, ga, p, A), !(v < F || v > J) && (L = c(k, x, ca, s, A), !(L < M || L > D) && (a - v) * (a - v) + (b - L) * (b - L) < K)) { return!0; } } break; case 5: - y = k[n++]; - d && (y += (h[n - 1] - y) * d); - K = y >> 2; - D = K * K; - L = a - K; - H = a + K; - aa = b - K; - K = b + K; - break; - case 1: - ; - case 2: - ; - case 3: - ; - case 4: - ; - case 6: - ; - case 7: - ; - case 8: - break; - default: - w("Invalid command " + z + " encountered at index" + (ia - 1) + " of " + f); + H = n[q++], e && (H += (f[q - 1] - H) * e), r = H >> 2, K = r * r, F = a - r, J = a + r, M = b - r, D = b + r; } - q = t; - s = v; + m = p; + k = s; } - r(ia === f); - r(n === c.coordinatesPosition); return!1; }; - q.prototype._writeBitmapStyle = function(a, b, e, g, f, k) { - c.isNullOrUndefined(b) ? d("TypeError", h.Errors.NullPointerError, "bitmap") : s.display.BitmapData.isType(b) || d("TypeError", h.Errors.CheckTypeFailedError, "bitmap", "flash.display.BitmapData"); - c.isNullOrUndefined(e) ? e = s.geom.Matrix.FROZEN_IDENTITY_MATRIX : s.geom.Matrix.isType(e) || d("TypeError", h.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"); - g = !!g; + s.prototype._writeBitmapStyle = function(a, e, c, f, g, h) { + d.isNullOrUndefined(e) ? b("TypeError", k.Errors.NullPointerError, "bitmap") : r.display.BitmapData.isType(e) || b("TypeError", k.Errors.CheckTypeFailedError, "bitmap", "flash.display.BitmapData"); + d.isNullOrUndefined(c) ? c = r.geom.Matrix.FROZEN_IDENTITY_MATRIX : r.geom.Matrix.isType(c) || b("TypeError", k.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"); f = !!f; - k || (k = this._textures.length, this._textures.push(b), this._graphicsData.beginBitmap(a, k, e, g, f)); + g = !!g; + h || (h = this._textures.length, this._textures.push(e), this._graphicsData.beginBitmap(a, h, c, f, g)); }; - q.prototype._writeGradientStyle = function(a, e, g, k, m, l, r, n, q, w) { - c.isNullOrUndefined(e) && d("TypeError", h.Errors.NullPointerError, "type"); - e = z.toNumber(f(e)); - 0 > e && d("ArgumentError", h.Errors.InvalidEnumError, "type"); - c.isNullOrUndefined(g) && d("TypeError", h.Errors.NullPointerError, "colors"); - g instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "colors", "Array"); - k instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "alphas", "Array"); - c.isNullOrUndefined(k) && d("TypeError", h.Errors.NullPointerError, "alphas"); - m instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "ratios", "Array"); - c.isNullOrUndefined(m) && d("TypeError", h.Errors.NullPointerError, "ratios"); - var t = [], p = [], u = g.length, v = u === k.length && u === m.length; - if (v) { - for (var M = 0;M < u;M++) { - var N = +m[M]; - if (255 < N || 0 > N) { - v = !1; + s.prototype._writeGradientStyle = function(a, c, g, h, l, q, m, p, s, u) { + d.isNullOrUndefined(c) && b("TypeError", k.Errors.NullPointerError, "type"); + c = n.toNumber(f(c)); + 0 > c && b("ArgumentError", k.Errors.InvalidEnumError, "type"); + d.isNullOrUndefined(g) && b("TypeError", k.Errors.NullPointerError, "colors"); + g instanceof Array || b("TypeError", k.Errors.CheckTypeFailedError, "colors", "Array"); + h instanceof Array || b("TypeError", k.Errors.CheckTypeFailedError, "alphas", "Array"); + d.isNullOrUndefined(h) && b("TypeError", k.Errors.NullPointerError, "alphas"); + l instanceof Array || b("TypeError", k.Errors.CheckTypeFailedError, "ratios", "Array"); + d.isNullOrUndefined(l) && b("TypeError", k.Errors.NullPointerError, "ratios"); + var t = [], v = [], A = g.length, H = A === h.length && A === l.length; + if (H) { + for (var K = 0;K < A;K++) { + var F = +l[K]; + if (255 < F || 0 > F) { + H = !1; break; } - t[M] = g[M] << 8 & 4294967040 | 255 * b(+k[M], 0, 1); - p[M] = N; + t[K] = g[K] << 8 & 4294967040 | 255 * e(+h[K], 0, 1); + v[K] = F; } } - v && (c.isNullOrUndefined(l) ? l = s.geom.Matrix.FROZEN_IDENTITY_MATRIX : s.geom.Matrix.isType(l) || d("TypeError", h.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"), w || (g = A.toNumber(f(r)), 0 > g && (g = A.toNumber(A.PAD)), n = B.toNumber(f(n)), 0 > n && (n = B.toNumber(B.RGB)), q = b(+q, -1, 1) / 2 * 255 | 0, this._graphicsData.beginGradient(a, t, p, e, l, g, n, q))); + H && (d.isNullOrUndefined(q) ? q = r.geom.Matrix.FROZEN_IDENTITY_MATRIX : r.geom.Matrix.isType(q) || b("TypeError", k.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"), u || (g = x.toNumber(f(m)), 0 > g && (g = x.toNumber(x.PAD)), p = L.toNumber(f(p)), 0 > p && (p = L.toNumber(L.RGB)), s = e(+s, -1, 1) / 2 * 255 | 0, this._graphicsData.beginGradient(a, t, v, c, q, g, p, s))); }; - q.prototype._extendBoundsByPoint = function(a, b) { + s.prototype._extendBoundsByPoint = function(a, b) { this._extendBoundsByX(a); this._extendBoundsByY(b); }; - q.prototype._extendBoundsByX = function(a) { + s.prototype._extendBoundsByX = function(a) { this._fillBounds.extendByX(a); var b = this._lineBounds; 134217728 === b.xMin ? (b.xMin = a - this._topLeftStrokeWidth, b.xMax = a + this._bottomRightStrokeWidth) : (b.xMin = Math.min(a - this._topLeftStrokeWidth, b.xMin), b.xMax = Math.max(a + this._bottomRightStrokeWidth, b.xMax)); }; - q.prototype._extendBoundsByY = function(a) { + s.prototype._extendBoundsByY = function(a) { this._fillBounds.extendByY(a); var b = this._lineBounds; 134217728 === b.yMin ? (b.yMin = a - this._topLeftStrokeWidth, b.yMax = a + this._bottomRightStrokeWidth) : (b.yMin = Math.min(a - this._topLeftStrokeWidth, b.yMin), b.yMax = Math.max(a + this._bottomRightStrokeWidth, b.yMax)); }; - q.prototype._applyLastCoordinates = function(a, b) { + s.prototype._applyLastCoordinates = function(a, b) { this._boundsIncludeLastCoordinates || this._extendBoundsByPoint(this._lastX, this._lastY); this._boundsIncludeLastCoordinates = !0; this._lastX = a; this._lastY = b; this._extendBoundsByPoint(a, b); }; - q.classInitializer = null; - q.initializer = null; - q.classSymbols = null; - q.instanceSymbols = null; - return q; + s.classInitializer = null; + s.initializer = null; + s.classSymbols = null; + s.instanceSymbols = null; + return s; }(a.ASNative); - v.Graphics = D; - })(s.display || (s.display = {})); + v.Graphics = J; + })(r.display || (r.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Timeline, l = c.NumberUtilities.clamp, e; + (function(k) { + var u = d.Debug.notImplemented, t = d.Timeline, l = d.NumberUtilities.clamp, c; (function(a) { a[a.Inactive = 0] = "Inactive"; a[a.LockToPointer = 1] = "LockToPointer"; a[a.PreserveDistance = 2] = "PreserveDistance"; - })(e || (e = {})); - e = function(e) { - function t() { - h.DisplayObjectContainer.instanceConstructorNoInitialize.call(this); + })(c || (c = {})); + c = function(c) { + function p() { + k.DisplayObjectContainer.instanceConstructorNoInitialize.call(this); this._constructChildren(); } - __extends(t, e); - t.prototype._addFrame = function(a) { - var e = this._symbol.frames; - e.push(a); - 1 === e.length && this._initializeChildren(a); + __extends(p, c); + p.prototype._addFrame = function(a) { + var c = this._symbol.frames; + c.push(a); + 1 === c.length && this._initializeChildren(a); }; - t.prototype._initializeChildren = function(a) { + p.prototype._initializeChildren = function(a) { a.controlTags && this._processControlTags(a.controlTags, !1); }; - t.prototype._processControlTags = function(a, e) { - if (e) { - for (var k = this._children.slice(), f = 0;f < k.length;f++) { - var d = k[f]; - if (!(0 > d._depth)) { - for (var b = null, g = 0;g < a.length;g++) { - if (a[g].depth === d._depth) { - b = a[g]; + p.prototype._processControlTags = function(a, c) { + if (c) { + for (var g = this._children.slice(), f = 0;f < g.length;f++) { + var b = g[f]; + if (!(0 > b._depth)) { + for (var e = null, h = 0;h < a.length;h++) { + if (a[h].depth === b._depth) { + e = a[h]; break; } } - b && d._symbol.id === b.symbolId && d._ratio === (b.ratio | 0) || this._removeAnimatedChild(d); + e && b._symbol.id === e.symbolId && b._ratio === (e.ratio | 0) || this._removeAnimatedChild(b); } } } - k = this._symbol.loaderInfo; + g = this._symbol.loaderInfo; for (f = 0;f < a.length;f++) { - switch(d = a[f], b = void 0 === d.tagCode ? d : k._file.getParsedTag(d), b.code) { + switch(b = a[f], e = void 0 === b.tagCode ? b : g._file.getParsedTag(b), e.code) { case 5: ; case 28: - (d = this.getTimelineObjectAtDepth(b.depth | 0)) && this._removeAnimatedChild(d); + (b = this.getTimelineObjectAtDepth(e.depth | 0)) && this._removeAnimatedChild(b); break; case 4: ; case 26: ; case 70: - var g = b, m = g.depth, d = this.getTimelineObjectAtDepth(m), l = -1 < g.symbolId; - if (g.flags & 1) { - if (!d) { + var h = e, l = h.depth, b = this.getTimelineObjectAtDepth(l), k = -1 < h.symbolId; + if (h.flags & 1) { + if (!b) { break; } } else { - if (!l || d && (!e || !l)) { - c.Debug.warning("Warning: Failed to place object at depth " + m + "."); + if (!k || b && (!c || !k)) { break; } } - var h = null; - if (l && (h = k.getSymbolById(g.symbolId), !h)) { + var p = null; + if (k && (p = g.getSymbolById(h.symbolId), !p)) { break; } - d ? (h && !h.dynamic && d._setStaticContentFromSymbol(h), d._hasFlags(4096) && d._animate(b)) : (d = this.createAnimatedDisplayObject(h, g, !1), this.addTimelineObjectAtDepth(d, m), h.isAVM1Object && c.AVM1.Lib.initializeAVM1Object(d, h.avm1Context, g)); + b ? (p && !p.dynamic && b._setStaticContentFromSymbol(p), b._hasFlags(4096) && b._animate(e)) : (b = this.createAnimatedDisplayObject(p, h, !1), this.addTimelineObjectAtDepth(b, l), p.isAVM1Object && d.AVM1.Lib.initializeAVM1Object(b, p.avm1Context, h)); } } }; - t.prototype._removeAnimatedChild = function(a) { + p.prototype._removeAnimatedChild = function(a) { this.removeChild(a); if (a._name) { - var e = c.AVM2.ABC.Multiname.getPublicQualifiedName(a._name); - this[e] === a && (this[e] = null); + var c = d.AVM2.ABC.Multiname.getPublicQualifiedName(a._name); + this[c] === a && (this[c] = null); } }; - t.prototype._canHaveGraphics = function() { + p.prototype._canHaveGraphics = function() { return!0; }; - t.prototype._getGraphics = function() { + p.prototype._getGraphics = function() { return this._graphics; }; - Object.defineProperty(t.prototype, "graphics", {get:function() { + Object.defineProperty(p.prototype, "graphics", {get:function() { return this._ensureGraphics(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "buttonMode", {get:function() { + Object.defineProperty(p.prototype, "buttonMode", {get:function() { return this._buttonMode; }, set:function(a) { this._buttonMode = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "dropTarget", {get:function() { + Object.defineProperty(p.prototype, "dropTarget", {get:function() { return this._dropTarget; }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "hitArea", {get:function() { + Object.defineProperty(p.prototype, "hitArea", {get:function() { return this._hitArea; }, set:function(a) { this._hitArea !== a && (a && a._hitTarget && (a._hitTarget._hitArea = null), this._hitArea = a) && (a._hitTarget = this); }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "useHandCursor", {get:function() { + Object.defineProperty(p.prototype, "useHandCursor", {get:function() { return this._useHandCursor; }, set:function(a) { this._useHandCursor = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(t.prototype, "soundTransform", {get:function() { - p("public flash.display.Sprite::get soundTransform"); + Object.defineProperty(p.prototype, "soundTransform", {get:function() { + u("public flash.display.Sprite::get soundTransform"); }, set:function(a) { - p("public flash.display.Sprite::set soundTransform"); + u("public flash.display.Sprite::set soundTransform"); }, enumerable:!0, configurable:!0}); - t.prototype.startDrag = function(e, c) { - void 0 === e && (e = !1); - void 0 === c && (c = null); - if (e) { + p.prototype.startDrag = function(c, d) { + void 0 === c && (c = !1); + void 0 === d && (d = null); + if (c) { this._dragMode = 1; } else { this._dragMode = 2; - var k = this._getLocalMousePosition(); - this._dragDeltaX = this.x - k.x; - this._dragDeltaY = this.y - k.y; + var g = this._getLocalMousePosition(); + this._dragDeltaX = this.x - g.x; + this._dragDeltaY = this.y - g.y; } - this._dragBounds = c; + this._dragBounds = d; a.ui.Mouse.draggableObject = this; }; - t.prototype.stopDrag = function() { + p.prototype.stopDrag = function() { a.ui.Mouse.draggableObject === this && (a.ui.Mouse.draggableObject = null, this._dragDeltaY = this._dragDeltaX = this._dragMode = 0, this._dragBounds = null); }; - t.prototype._updateDragState = function(a) { + p.prototype._updateDragState = function(a) { void 0 === a && (a = null); - var e = this._getLocalMousePosition(), c = e.x, e = e.y; - 2 === this._dragMode && (c += this._dragDeltaX, e += this._dragDeltaY); + var c = this._getLocalMousePosition(), d = c.x, c = c.y; + 2 === this._dragMode && (d += this._dragDeltaX, c += this._dragDeltaY); if (this._dragBounds) { - var f = this._dragBounds, c = l(c, f.left, f.right), e = l(e, f.top, f.bottom) + var f = this._dragBounds, d = l(d, f.left, f.right), c = l(c, f.top, f.bottom) } - this.x = c; - this.y = e; + this.x = d; + this.y = c; this._dropTarget = a; }; - t.prototype.startTouchDrag = function(a, e, c) { - p("public flash.display.Sprite::startTouchDrag"); + p.prototype.startTouchDrag = function(a, c, d) { + u("public flash.display.Sprite::startTouchDrag"); }; - t.prototype.stopTouchDrag = function(a) { - p("public flash.display.Sprite::stopTouchDrag"); + p.prototype.stopTouchDrag = function(a) { + u("public flash.display.Sprite::stopTouchDrag"); }; - t.prototype._containsPoint = function(a, e, c, f, d, b) { - if (!(5 === d && 0 < this._dragMode)) { - var g = this._boundsAndMaskContainPoint(a, e, c, f, d); - !g && 3 === d && this._hitArea && this._mouseEnabled && (g = this._hitArea._getInvertedConcatenatedMatrix(), g = this._hitArea._boundsAndMaskContainPoint(a, e, g.transformX(a, e), g.transformY(a, e), d)); - return 0 === g || 2 > d ? g : this._containsPointImpl(a, e, c, f, d, b, !0); + p.prototype._containsPoint = function(a, c, d, f, b, e) { + if (!(5 === b && 0 < this._dragMode)) { + var h = this._boundsAndMaskContainPoint(a, c, d, f, b); + !h && 3 === b && this._hitArea && this._mouseEnabled && (h = this._hitArea._getInvertedConcatenatedMatrix(), h = this._hitArea._boundsAndMaskContainPoint(a, c, h.transformX(a, c), h.transformY(a, c), b)); + return 0 === h || 2 > b ? h : this._containsPointImpl(a, c, d, f, b, e, !0); } }; - t.prototype._containsPointDirectly = function(a, e, c, f) { + p.prototype._containsPointDirectly = function(a, c, d, f) { if (this._hitArea) { - return!!this._hitArea._containsGlobalPoint(c, f, 2, null); + return!!this._hitArea._containsGlobalPoint(d, f, 2, null); } - c = this._getGraphics(); - return!!c && c._containsPoint(a, e, !0, 0); + d = this._getGraphics(); + return!!d && d._containsPoint(a, c, !0, 0); }; - t.classInitializer = null; - t.initializer = function(a) { + p.classInitializer = null; + p.initializer = function(a) { this._graphics = null; this._buttonMode = !1; this._hitArea = this._dropTarget = null; @@ -33424,88 +33476,88 @@ var RtmpJs; this._hitTarget = this._dragBounds = null; a && (a.isRoot && (this._root = this), a.numFrames && 0 < a.frames.length && this._initializeChildren(a.frames[0])); }; - t.classSymbols = null; - t.instanceSymbols = null; - return t; + p.classSymbols = null; + p.instanceSymbols = null; + return p; }(a.display.DisplayObjectContainer); - h.Sprite = e; - u = function(e) { - function c(l, h) { - e.call(this, l, a.display.MovieClip, !0); + k.Sprite = c; + t = function(c) { + function d(l, m) { + c.call(this, l, a.display.MovieClip, !0); this.numFrames = 1; this.frames = []; this.labels = []; this.frameScripts = []; - this.loaderInfo = h; + this.loaderInfo = m; } - __extends(c, e); - c.FromData = function(e, m) { - var k = new c(e, m); - k.numFrames = e.frameCount; - m.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (k.isAVM1Object = !0, k.avm1Context = m._avm1Context); - k.frameScripts = []; - for (var f = e.frames, d = 0;d < f.length;d++) { - var b = m.getFrame(e, d), g = b.actionBlocks; - if (g) { - for (var l = 0;l < g.length;l++) { - k.frameScripts.push(d), k.frameScripts.push(g[l]); + __extends(d, c); + d.FromData = function(c, h) { + var g = new d(c, h); + g.numFrames = c.frameCount; + h.actionScriptVersion === k.ActionScriptVersion.ACTIONSCRIPT2 && (g.isAVM1Object = !0, g.avm1Context = h._avm1Context); + g.frameScripts = []; + for (var f = c.frames, b = 0;b < f.length;b++) { + var e = h.getFrame(c, b), l = e.actionBlocks; + if (l) { + for (var n = 0;n < l.length;n++) { + g.frameScripts.push(b), g.frameScripts.push(l[n]); } } - b.labelName && k.labels.push(new a.display.FrameLabel(b.labelName, d + 1)); - k.frames.push(b); + e.labelName && g.labels.push(new a.display.FrameLabel(e.labelName, b + 1)); + g.frames.push(e); } - return k; + return g; }; - return c; - }(u.DisplaySymbol); - h.SpriteSymbol = u; + return d; + }(t.DisplaySymbol); + k.SpriteSymbol = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.assert, u = c.Debug.assertUnreachable, l = c.AVM2.Runtime.asCoerceString, e = c.AVM2.Runtime.throwError, m = c.Telemetry, t = a.events; + var u = d.AVM2.Runtime.asCoerceString, t = d.AVM2.Runtime.throwError, l = d.Telemetry, c = a.events; (function(a) { a[a.SWF1 = 1] = "SWF1"; a[a.SWF9 = 9] = "SWF9"; a[a.SWF10 = 10] = "SWF10"; })(v.FrameNavigationModel || (v.FrameNavigationModel = {})); - var q = function() { - function a(e) { - this._mc = e; + var h = function() { + function a(c) { + this._mc = c; this._soundStream = this._startSoundRegistrations = null; } - a.prototype.registerStartSounds = function(a, d) { + a.prototype.registerStartSounds = function(a, c) { null === this._startSoundRegistrations && (this._startSoundRegistrations = {}); - this._startSoundRegistrations[a] = d; + this._startSoundRegistrations[a] = c; }; a.prototype.initSoundStream = function(a) { this._soundStream = new v.MovieClipSoundStream(a, this._mc); }; - a.prototype.addSoundStreamBlock = function(a, d) { - this._soundStream && this._soundStream.appendBlock(a, d); + a.prototype.addSoundStreamBlock = function(a, c) { + this._soundStream && this._soundStream.appendBlock(a, c); }; a.prototype._startSounds = function(a) { if (a = this._startSoundRegistrations[a]) { - for (var d = this._soundClips || (this._soundClips = {}), b = this._mc.loaderInfo, e = 0;e < a.length;e++) { - var c = a[e], k = c.soundId, c = c.soundInfo, m = d[k]; - if (!m) { - var l = b.getSymbolById(k); + for (var c = this._soundClips || (this._soundClips = {}), f = this._mc.loaderInfo, b = 0;b < a.length;b++) { + var e = a[b], d = e.soundId, e = e.soundInfo, h = c[d]; + if (!h) { + var l = f.getSymbolById(d); if (!l) { continue; } - m = l.symbolClass; - l = m.initializeFrom(l); - m.instanceConstructorNoInitialize.call(l); - d[k] = m = {object:l}; + h = l.symbolClass; + l = h.initializeFrom(l); + h.instanceConstructorNoInitialize.call(l); + c[d] = h = {object:l}; } - m.channel && (m.channel.stop(), m.channel = null); - c.stop || (m.channel = m.object.play(0, c.hasLoops ? c.loopCount : 0)); + h.channel && (h.channel.stop(), h.channel = null); + e.stop || (h.channel = h.object.play(0, e.hasLoops ? e.loopCount : 0)); } } }; @@ -33514,41 +33566,41 @@ var RtmpJs; this._soundStream && this._soundStream.playFrame(a); }; return a; - }(), n = function(k) { - function f() { + }(), p = function(p) { + function m() { v.Sprite.instanceConstructorNoInitialize.call(this); } - __extends(f, k); - f.reset = function() { - f.frameNavigationModel = 10; - f._callQueue = []; + __extends(m, p); + m.reset = function() { + m.frameNavigationModel = 10; + m._callQueue = []; }; - f.runFrameScripts = function() { - h.enterTimeline("MovieClip.executeFrame"); - var a = f._callQueue; - f._callQueue = []; - for (var b = 0;b < a.length;b++) { - var e = a[b]; - e._hasFlags(1024) ? (e._removeFlags(1024), e.dispatchEvent(t.Event.getInstance(t.Event.AVM1_LOAD))) : (e._allowFrameNavigation = 1 === v.MovieClip.frameNavigationModel, e.callFrame(e._currentFrame), e._allowFrameNavigation = !0, e._nextFrame !== e._currentFrame && (9 === v.MovieClip.frameNavigationModel ? (e._advanceFrame(), e._constructFrame(), e._removeFlags(8192), e.callFrame(e._currentFrame)) : v.DisplayObject.performFrameNavigation(!1, !0))); + m.runFrameScripts = function() { + k.enterTimeline("MovieClip.executeFrame"); + var a = m._callQueue; + m._callQueue = []; + for (var f = 0;f < a.length;f++) { + var b = a[f]; + b._hasFlags(1024) ? (b._removeFlags(1024), b.dispatchEvent(c.Event.getInstance(c.Event.AVM1_LOAD))) : (b._allowFrameNavigation = 1 === v.MovieClip.frameNavigationModel, b.callFrame(b._currentFrame), b._allowFrameNavigation = !0, b._nextFrame !== b._currentFrame && (9 === v.MovieClip.frameNavigationModel ? (b._advanceFrame(), b._constructFrame(), b._removeFlags(8192), b.callFrame(b._currentFrame)) : v.DisplayObject.performFrameNavigation(!1, !0))); } - h.leaveTimeline(); + k.leaveTimeline(); }; - f.prototype._addFrame = function(a) { - var b = this._symbol, e = b.frames; - e.push(a); - a.labelName && this.addFrameLabel(a.labelName, e.length); + m.prototype._addFrame = function(a) { + var c = this._symbol, b = c.frames; + b.push(a); + a.labelName && this.addFrameLabel(a.labelName, b.length); a.soundStreamHead && this._initSoundStream(a.soundStreamHead); - a.soundStreamBlock && this._addSoundStreamBlock(e.length, a.soundStreamBlock); - if (b.isAVM1Object && (c.AVM1.Lib.getAVM1Object(this, b.avm1Context).addFrameActionBlocks(e.length - 1, a), a.exports)) { + a.soundStreamBlock && this._addSoundStreamBlock(b.length, a.soundStreamBlock); + if (c.isAVM1Object && (d.AVM1.Lib.getAVM1Object(this, c.avm1Context).addFrameActionBlocks(b.length - 1, a), a.exports)) { a = a.exports; - for (var f = 0;f < a.length;f++) { - var k = a[f]; - b.avm1Context.addAsset(k.className, k.symbolId, null); + for (var e = 0;e < a.length;e++) { + var h = a[e]; + c.avm1Context.addAsset(h.className, h.symbolId, null); } } - 1 === e.length && this._initializeChildren(e[0]); + 1 === b.length && this._initializeChildren(b[0]); }; - f.prototype._initFrame = function(a) { + m.prototype._initFrame = function(a) { if (a) { if (this.buttonMode && (a = null, this._mouseOver ? a = this._mouseDown ? "_down" : "_over" : null !== this._currentButtonState && (a = "_up"), a !== this._currentButtonState && this._buttonFrames[a])) { this.stop(); @@ -33561,274 +33613,271 @@ var RtmpJs; } this._advanceFrame(); }; - f.prototype._constructFrame = function() { + m.prototype._constructFrame = function() { this._constructChildren(); }; - f.prototype._enqueueFrameScripts = function() { - this._hasFlags(1024) && f._callQueue.push(this); - this._hasFlags(8192) && (this._removeFlags(8192), f._callQueue.push(this)); - k.prototype._enqueueFrameScripts.call(this); + m.prototype._enqueueFrameScripts = function() { + this._hasFlags(1024) && m._callQueue.push(this); + this._hasFlags(8192) && (this._removeFlags(8192), m._callQueue.push(this)); + p.prototype._enqueueFrameScripts.call(this); }; - Object.defineProperty(f.prototype, "currentFrame", {get:function() { + Object.defineProperty(m.prototype, "currentFrame", {get:function() { return this._currentFrame - this._sceneForFrameIndex(this._currentFrame).offset; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "framesLoaded", {get:function() { + Object.defineProperty(m.prototype, "framesLoaded", {get:function() { return this._frames.length; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "totalFrames", {get:function() { + Object.defineProperty(m.prototype, "totalFrames", {get:function() { return this._totalFrames; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "trackAsMenu", {get:function() { + Object.defineProperty(m.prototype, "trackAsMenu", {get:function() { return this._trackAsMenu; }, set:function(a) { this._trackAsMenu = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "scenes", {get:function() { + Object.defineProperty(m.prototype, "scenes", {get:function() { return this._scenes.map(function(a) { return a.clone(); }); }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "currentScene", {get:function() { + Object.defineProperty(m.prototype, "currentScene", {get:function() { return this._sceneForFrameIndex(this._currentFrame).clone(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "currentLabel", {get:function() { + Object.defineProperty(m.prototype, "currentLabel", {get:function() { var a = this._labelForFrame(this._currentFrame); return a ? a.name : null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "currentLabels", {get:function() { + Object.defineProperty(m.prototype, "currentLabels", {get:function() { return this._sceneForFrameIndex(this._currentFrame).labels; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "currentFrameLabel", {get:function() { + Object.defineProperty(m.prototype, "currentFrameLabel", {get:function() { var a = this._sceneForFrameIndex(this._currentFrame); return(a = a.getLabelByFrame(this._currentFrame - a.offset)) && a.name; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "enabled", {get:function() { + Object.defineProperty(m.prototype, "enabled", {get:function() { return this._enabled; }, set:function(a) { this._enabled = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "isPlaying", {get:function() { + Object.defineProperty(m.prototype, "isPlaying", {get:function() { return this._isPlaying; }, enumerable:!0, configurable:!0}); - f.prototype.play = function() { + m.prototype.play = function() { 1 < this._totalFrames && (this._isPlaying = !0); this._stopped = !1; }; - f.prototype.stop = function() { + m.prototype.stop = function() { this._isPlaying = !1; this._stopped = !0; }; - f.prototype._getAbsFrameNumber = function(a, b) { - var c = 10 !== v.MovieClip.frameNavigationModel, f; - if (null !== b) { - b = l(b); - var k = this._scenes; - p(k.length, "There should be at least one scene defined."); - for (var m = 0;m < k.length && (f = k[m], f.name !== b);m++) { + m.prototype._getAbsFrameNumber = function(a, c) { + var b = 10 !== v.MovieClip.frameNavigationModel, e; + if (null !== c) { + c = u(c); + for (var d = this._scenes, h = 0;h < d.length && (e = d[h], e.name !== c);h++) { } - if (m === k.length) { - if (c) { + if (h === d.length) { + if (b) { return; } - e("ArgumentError", h.Errors.SceneNotFoundError, b); + t("ArgumentError", k.Errors.SceneNotFoundError, c); } } else { - f = this._sceneForFrameIndex(this._currentFrame); + e = this._sceneForFrameIndex(this._currentFrame); } - k = parseInt(a, 10); - if (k != a) { - k = f.getLabelByName(a, c); - if (!k) { - if (c) { + d = parseInt(a, 10); + if (d != a) { + d = e.getLabelByName(a, b); + if (!d) { + if (b) { return; } - e("ArgumentError", h.Errors.FrameLabelNotFoundError, a, b); + t("ArgumentError", k.Errors.FrameLabelNotFoundError, a, c); } - k = k.frame; + d = d.frame; } - return f.offset + k; + return e.offset + d; }; - f.prototype._gotoFrame = function(a, b) { - var e = this._getAbsFrameNumber(a, b); - void 0 !== e && this._gotoFrameAbs(e); + m.prototype._gotoFrame = function(a, c) { + var b = this._getAbsFrameNumber(a, c); + void 0 !== b && this._gotoFrameAbs(b); }; - f.prototype._gotoFrameAbs = function(a) { + m.prototype._gotoFrameAbs = function(a) { 1 > a ? a = 1 : a > this._totalFrames && (a = this._totalFrames); a !== this._nextFrame && (this._nextFrame = a, this._allowFrameNavigation && (9 === v.MovieClip.frameNavigationModel ? (this._advanceFrame(), this._constructFrame()) : v.DisplayObject.performFrameNavigation(!1, !0))); }; - f.prototype._advanceFrame = function() { - var a = this._currentFrame, b = this._nextFrame; - b > this._totalFrames && (b = 1); - if (a === b) { - this._nextFrame = b; + m.prototype._advanceFrame = function() { + var a = this._currentFrame, c = this._nextFrame; + c > this._totalFrames && (c = 1); + if (a === c) { + this._nextFrame = c; } else { - if (b > this.framesLoaded) { - this._nextFrame = b; + if (c > this.framesLoaded) { + this._nextFrame = c; } else { - var e = this._frames[b - 1]; - if (e !== this._frames[a - 1] && (this._seekToFrame(b), e.controlTags)) { - for (var a = e.controlTags, f, e = 0;e < a.length;e++) { - var k = a[e]; - 15 === k.tagCode && (k = this._symbol.loaderInfo._file.getParsedTag(k)); - 15 === k.code && (f || (f = []), f.push(new c.Timeline.SoundStart(k.soundId, k.soundInfo))); + var b = this._frames[c - 1]; + if (b !== this._frames[a - 1] && (this._seekToFrame(c), b.controlTags)) { + for (var a = b.controlTags, e, b = 0;b < a.length;b++) { + var h = a[b]; + 15 === h.tagCode && (h = this._symbol.loaderInfo._file.getParsedTag(h)); + 15 === h.code && (e || (e = []), e.push(new d.Timeline.SoundStart(h.soundId, h.soundInfo))); } - f && this._registerStartSounds(b, f); + e && this._registerStartSounds(c, e); } - this._frameScripts[b] && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384)); - this._currentFrame = this._nextFrame = b; - this._syncSounds(b); + this._frameScripts[c] && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384)); + this._currentFrame = this._nextFrame = c; + this._syncSounds(c); } } }; - f.prototype._seekToFrame = function(a) { - var b = this._currentFrame, e = this._frames; - if (a === b + 1) { - e = e[a - 1], e.controlTags && this._processControlTags(e.controlTags, !1); + m.prototype._seekToFrame = function(a) { + var c = this._currentFrame, b = this._frames; + if (a === c + 1) { + b = b[a - 1], b.controlTags && this._processControlTags(b.controlTags, !1); } else { - for (var c = e[b - 1], f = this._symbol.loaderInfo, k = a < b, m = [], l, b = k ? 0 : b;a-- > b;) { - var h = e[a]; - if (h !== c && (c = h, h = h.controlTags)) { - for (var n = h.length;n--;) { - var q = h[n], q = void 0 === q.tagCode ? q : f._file.getParsedTag(q); - switch(q.code) { + for (var e = b[c - 1], d = this._symbol.loaderInfo, h = a < c, l = [], m, c = h ? 0 : c;a-- > c;) { + var k = b[a]; + if (k !== e && (e = k, k = k.controlTags)) { + for (var p = k.length;p--;) { + var s = k[p], s = void 0 === s.tagCode ? s : d._file.getParsedTag(s); + switch(s.code) { case 5: ; case 28: - l || (l = Object.create(null)); - l[q.depth] = !0; - k || m.push(q); + m || (m = Object.create(null)); + m[s.depth] = !0; + h || l.push(s); break; case 4: ; case 26: ; case 70: - l && l[q.depth] || m.push(q); + m && m[s.depth] || l.push(s); break; default: - m.push(q); + l.push(s); } } } } - m.reverse(); - this._processControlTags(m, k); + l.reverse(); + this._processControlTags(l, h); } }; - f.prototype._sceneForFrameIndex = function(a) { - var b = this._scenes; + m.prototype._sceneForFrameIndex = function(a) { + var c = this._scenes; if (0 === a) { - return b[0]; + return c[0]; } - for (var e = 0;e < b.length;e++) { - var c = b[e]; - if (c.offset < a && c.offset + c.numFrames >= a) { - return c; + for (var b = 0;b < c.length;b++) { + var e = c[b]; + if (e.offset < a && e.offset + e.numFrames >= a) { + return e; } } - u("Must have at least one scene covering all frames."); }; - f.prototype._labelForFrame = function(a) { - for (var b = this._scenes, e = null, c = 0;c < b.length;c++) { - var f = b[c]; - if (f.offset > a) { + m.prototype._labelForFrame = function(a) { + for (var c = this._scenes, b = null, e = 0;e < c.length;e++) { + var d = c[e]; + if (d.offset > a) { break; } - for (var k = f.labels, m = 0;m < k.length;m++) { - var l = k[m]; - if (l.frame > a - f.offset) { - return e; + for (var h = d.labels, l = 0;l < h.length;l++) { + var m = h[l]; + if (m.frame > a - d.offset) { + return b; } - e = l; + b = m; } } - return e; + return b; }; - f.prototype.callFrame = function(a) { + m.prototype.callFrame = function(a) { if (a = this._frameScripts[a | 0]) { try { a.call(this); - } catch (b) { - throw m.instance.reportTelemetry({topic:"error", error:2}), this.stop(), b; + } catch (c) { + throw l.instance.reportTelemetry({topic:"error", error:2}), this.stop(), c; } } }; - f.prototype.nextFrame = function() { + m.prototype.nextFrame = function() { this.gotoAndStop(this._currentFrame + 1); }; - f.prototype.prevFrame = function() { + m.prototype.prevFrame = function() { this.gotoAndStop(this._currentFrame - 1); }; - f.prototype.gotoAndPlay = function(a, b) { - void 0 === b && (b = null); - (0 === arguments.length || 2 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length); - b = l(b); - a = l(a) + ""; + m.prototype.gotoAndPlay = function(a, c) { + void 0 === c && (c = null); + (0 === arguments.length || 2 < arguments.length) && t("ArgumentError", k.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length); + c = u(c); + a = u(a) + ""; this.play(); - this._gotoFrame(a, b); + this._gotoFrame(a, c); }; - f.prototype.gotoAndStop = function(a, b) { - void 0 === b && (b = null); - (0 === arguments.length || 2 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length); - b = l(b); - a = l(a) + ""; + m.prototype.gotoAndStop = function(a, c) { + void 0 === c && (c = null); + (0 === arguments.length || 2 < arguments.length) && t("ArgumentError", k.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length); + c = u(c); + a = u(a) + ""; this.stop(); - this._gotoFrame(a, b); + this._gotoFrame(a, c); }; - f.prototype.addFrameScript = function(a, b) { + m.prototype.addFrameScript = function(a, c) { if (this._currentFrame) { - var c = arguments.length; - c & 1 && e("ArgumentError", h.Errors.TooFewArgumentsError, c, c + 1); - for (var f = this._frameScripts, k = this._totalFrames, m = 0;m < c;m += 2) { - var l = (arguments[m] | 0) + 1; - 1 > l || l > k || (f[l] = arguments[m + 1], l === this._currentFrame && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384))); + var b = arguments.length; + b & 1 && t("ArgumentError", k.Errors.TooFewArgumentsError, b, b + 1); + for (var e = this._frameScripts, d = this._totalFrames, h = 0;h < b;h += 2) { + var l = (arguments[h] | 0) + 1; + 1 > l || l > d || (e[l] = arguments[h + 1], l === this._currentFrame && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384))); } } }; - Object.defineProperty(f.prototype, "_avm1SymbolClass", {get:function() { + Object.defineProperty(m.prototype, "_avm1SymbolClass", {get:function() { return this._symbol && this._symbol.avm1SymbolClass || null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "_isFullyLoaded", {get:function() { + Object.defineProperty(m.prototype, "_isFullyLoaded", {get:function() { return this.framesLoaded >= this.totalFrames; }, enumerable:!0, configurable:!0}); - f.prototype._registerStartSounds = function(a, b) { - null === this._sounds && (this._sounds = new q(this)); - this._sounds.registerStartSounds(a, b); + m.prototype._registerStartSounds = function(a, c) { + null === this._sounds && (this._sounds = new h(this)); + this._sounds.registerStartSounds(a, c); }; - f.prototype._initSoundStream = function(a) { - null === this._sounds && (this._sounds = new q(this)); + m.prototype._initSoundStream = function(a) { + null === this._sounds && (this._sounds = new h(this)); this._sounds.initSoundStream(a); }; - f.prototype._addSoundStreamBlock = function(a, b) { - this._sounds.addSoundStreamBlock(a, b); + m.prototype._addSoundStreamBlock = function(a, c) { + this._sounds.addSoundStreamBlock(a, c); }; - f.prototype._syncSounds = function(a) { + m.prototype._syncSounds = function(a) { null !== this._sounds && this._sounds.syncSounds(a); }; - f.prototype.addScene = function(a, b, e, c) { - this._scenes.push(new v.Scene(a, b, e, c)); + m.prototype.addScene = function(a, c, b, e) { + this._scenes.push(new v.Scene(a, c, b, e)); }; - f.prototype.addFrameLabel = function(d, b) { - var e = this._sceneForFrameIndex(b); - e.getLabelByName(d, !1) || e.labels.push(new a.display.FrameLabel(d, b - e.offset)); + m.prototype.addFrameLabel = function(c, f) { + var b = this._sceneForFrameIndex(f); + b.getLabelByName(c, !1) || b.labels.push(new a.display.FrameLabel(c, f - b.offset)); }; - f.prototype.prevScene = function() { + m.prototype.prevScene = function() { var a = this._sceneForFrameIndex(this._currentFrame); 0 !== a.offset && this._gotoFrameAbs(this._sceneForFrameIndex(a.offset).offset + 1); }; - f.prototype.nextScene = function() { + m.prototype.nextScene = function() { var a = this._sceneForFrameIndex(this._currentFrame); a.offset + a.numFrames !== this._totalFrames && this._gotoFrameAbs(a.offset + a.numFrames + 1); }; - f.prototype._containsPointImpl = function(a, b, e, c, f, m, l) { - a = k.prototype._containsPointImpl.call(this, a, b, e, c, f, m, !0); - 2 === a && 3 === f && "_as2Object" in this && !this.buttonMode && m[0] === this && (m.length = 0); + m.prototype._containsPointImpl = function(a, c, b, e, d, h, l) { + a = p.prototype._containsPointImpl.call(this, a, c, b, e, d, h, !0); + 2 === a && 3 === d && "_as2Object" in this && !this.buttonMode && h[0] === this && (h.length = 0); return a; }; - f.classInitializer = function() { - f.reset(); + m.classInitializer = function() { + m.reset(); }; - f.initializer = function(a) { + m.initializer = function(a) { v.DisplayObject._advancableInstances.push(this); this._currentFrame = 0; this._totalFrames = 1; @@ -33847,10 +33896,10 @@ var RtmpJs; if (a) { if (this._totalFrames = a.numFrames, this._currentFrame = 1, a.isRoot || this.addScene("", a.labels, 0, a.numFrames), this._frames = a.frames, a.isAVM1Object) { if (a.frameScripts) { - var b = c.AVM1.Lib.getAVM1Object(this, a.avm1Context); - b.context = a.avm1Context; - for (var e = a.frameScripts, f = 0;f < e.length;f += 2) { - b.addFrameScript(e[f], e[f + 1]); + var c = d.AVM1.Lib.getAVM1Object(this, a.avm1Context); + c.context = a.avm1Context; + for (var b = a.frameScripts, e = 0;e < b.length;e += 2) { + c.addFrameScript(b[e], b[e + 1]); } } a.avm1Name && (this.name = a.avm1Name); @@ -33859,36 +33908,36 @@ var RtmpJs; this.addScene("", [], 0, this._totalFrames); } }; - f.classSymbols = null; - f.instanceSymbols = null; - return f; + m.classSymbols = null; + m.instanceSymbols = null; + return m; }(a.display.Sprite); - v.MovieClip = n; + v.MovieClip = p; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - function p(a, e) { - var c = !1, d; + function u(a, c) { + var f = !1, b; a.addEventListener("timeupdate", function(a) { - c ? performance.now() : (d = performance.now(), c = !0); + f ? performance.now() : (b = performance.now(), f = !0); }); a.addEventListener("pause", function(a) { - c = !1; + f = !1; }); a.addEventListener("seeking", function(a) { - c = !1; + f = !1; }); } - var u = c.SWF.MP3DecoderSession, l = function() { - function a(e) { - this._element = e; + var t = d.SWF.MP3DecoderSession, l = function() { + function a(c) { + this._element = c; } Object.defineProperty(a.prototype, "isReady", {get:function() { return!!this._channel; @@ -33900,31 +33949,29 @@ var RtmpJs; return this._element.currentTime; }, enumerable:!0, configurable:!0}); a.prototype.playFrom = function(a) { - var e = this._element; - e.paused ? (e.play(), e.addEventListener("playing", function b(c) { - e.removeEventListener("playing", b); - e.currentTime = a; - })) : e.currentTime = a; + var c = this._element; + c.paused ? (c.play(), c.addEventListener("playing", function e(d) { + c.removeEventListener("playing", e); + c.currentTime = a; + })) : c.currentTime = a; }; Object.defineProperty(a.prototype, "paused", {get:function() { return this._element.paused; }, set:function(a) { - var e = this._element; - a ? e.paused || e.pause() : e.paused && e.play(); + var c = this._element; + a ? c.paused || c.pause() : c.paused && c.play(); }, enumerable:!0, configurable:!0}); a.prototype.createChannel = function() { - this._channel = h.media.SoundChannel.initializeFrom({element:this._element}); + this._channel = k.media.SoundChannel.initializeFrom({element:this._element}); }; a.prototype.queueData = function(a) { - c.Debug.abstractMethod("HTMLAudioElementAdapter::queueData"); }; a.prototype.finish = function() { - c.Debug.abstractMethod("HTMLAudioElementAdapter::finish"); }; return a; - }(), e = function(a) { - function e(c) { - a.call(this, c); + }(), c = function(a) { + function c(f) { + a.call(this, f); this._mediaSource = new MediaSource; this._sourceBuffer = null; this._updating = !1; @@ -33934,11 +33981,11 @@ var RtmpJs; this._mediaSource.addEventListener("sourceopen", this._openMediaSource.bind(this)); this.element.src = URL.createObjectURL(this._mediaSource); } - __extends(e, a); - e.prototype._appendSoundData = function() { + __extends(c, a); + c.prototype._appendSoundData = function() { 0 !== this._rawFrames.length && !this._updating && this._sourceBuffer && (this._loading ? (this._updating = !0, this._sourceBuffer.appendBuffer(this._rawFrames.shift()), this._isReady || (this._isReady = !0, this.createChannel())) : this._mediaSource.endOfStream()); }; - e.prototype._openMediaSource = function() { + c.prototype._openMediaSource = function() { var a = this._mediaSource.addSourceBuffer("audio/mpeg"); a.addEventListener("update", function() { this._updating = !1; @@ -33947,33 +33994,33 @@ var RtmpJs; this._sourceBuffer = a; this._appendSoundData(); }; - e.prototype.queueData = function(a) { + c.prototype.queueData = function(a) { this._rawFrames.push(a.data); this._appendSoundData(); }; - e.prototype.finish = function() { + c.prototype.finish = function() { this._loading = !1; this._appendSoundData(); }; - return e; - }(l), m = function(a) { - function e(c) { - a.call(this, c); + return c; + }(l), h = function(a) { + function c(f) { + a.call(this, f); this._rawFrames = []; } - __extends(e, a); - e.prototype.queueData = function(a) { + __extends(c, a); + c.prototype.queueData = function(a) { this._rawFrames.push(a.data); }; - e.prototype.finish = function() { + c.prototype.finish = function() { this.element.src = URL.createObjectURL(new Blob(this._rawFrames)); this.createChannel(); }; - return e; - }(l), t = function() { - function a(e) { + return c; + }(l), p = function() { + function a(c) { this._sound = this._channel = null; - this._data = e; + this._data = c; this._position = 0; } Object.defineProperty(a.prototype, "currentTime", {get:function() { @@ -33993,88 +34040,88 @@ var RtmpJs; this._position += a.pcm.length; }; a.prototype.finish = function() { - var a = h.media.Sound.initializeFrom(this._data), e = a.play(); + var a = k.media.Sound.initializeFrom(this._data), c = a.play(); this._sound = a; - this._channel = e; + this._channel = c; }; return a; - }(), q = function(a) { - function e(c) { - a.call(this, c); + }(), s = function(a) { + function c(f) { + a.call(this, f); this._decoderPosition = 0; - this._decoderSession = new u; + this._decoderSession = new t; this._decoderSession.onframedata = function(a) { - var b = this._decoderPosition; - c.pcm.set(a, b); - this._decoderPosition = b + a.length; + var e = this._decoderPosition; + f.pcm.set(a, e); + this._decoderPosition = e + a.length; }.bind(this); this._decoderSession.onclosed = function() { - t.prototype.finish.call(this); + p.prototype.finish.call(this); }.bind(this); this._decoderSession.onerror = function(a) { console.warn("MP3DecoderSession error: " + a); }; } - __extends(e, a); - e.prototype.queueData = function(a) { + __extends(c, a); + c.prototype.queueData = function(a) { this._decoderSession.pushAsync(a.data); }; - e.prototype.finish = function() { + c.prototype.finish = function() { this._decoderSession.close(); }; - return e; - }(t), l = function() { - function c(k, f) { + return c; + }(p), l = function() { + function d(g, f) { this.movieClip = f; - this.decode = k.decode; - this.data = {sampleRate:k.sampleRate, channels:k.channels}; + this.decode = g.decode; + this.data = {sampleRate:g.sampleRate, channels:g.channels}; this.seekIndex = []; this.position = 0; this.wasFullyLoaded = !1; this.waitFor = this.expectedFrame = 0; - var d = "mp3" === k.format; - if (d && !a.webAudioMP3Option.value) { - var b = document.createElement("audio"); - b.preload = "metadata"; - b.loop = !1; - p(b, f); - if (b.canPlayType("audio/mpeg")) { - this.element = b; - a.mediaSourceMP3Option.value ? "undefined" !== typeof MediaSource && MediaSource.isTypeSupported("audio/mpeg") ? this.soundStreamAdapter = new e(b) : (console.warn("MediaSource is not supported"), this.soundStreamAdapter = new m(b)) : this.soundStreamAdapter = new m(b); + var b = "mp3" === g.format; + if (b && !a.webAudioMP3Option.value) { + var e = document.createElement("audio"); + e.preload = "metadata"; + e.loop = !1; + u(e, f); + if (e.canPlayType("audio/mpeg")) { + this.element = e; + a.mediaSourceMP3Option.value ? "undefined" !== typeof MediaSource && MediaSource.isTypeSupported("audio/mpeg") ? this.soundStreamAdapter = new c(e) : (console.warn("MediaSource is not supported"), this.soundStreamAdapter = new h(e)) : this.soundStreamAdapter = new h(e); return; } } - this.data.pcm = new Float32Array((k.samplesCount + 1) * this.movieClip.totalFrames * k.channels); - this.soundStreamAdapter = d ? new q(this.data) : new t(this.data); + this.data.pcm = new Float32Array((g.samplesCount + 1) * this.movieClip.totalFrames * g.channels); + this.soundStreamAdapter = b ? new s(this.data) : new p(this.data); } - c.prototype.appendBlock = function(a, e) { - var d = this.decode(e), b = this.position; - this.seekIndex[a] = b + d.seek * this.data.channels; - this.position = b + d.samplesCount * this.data.channels; - this.soundStreamAdapter.queueData(d); + d.prototype.appendBlock = function(a, c) { + var b = this.decode(c), e = this.position; + this.seekIndex[a] = e + b.seek * this.data.channels; + this.position = e + b.samplesCount * this.data.channels; + this.soundStreamAdapter.queueData(b); }; - c.prototype.playFrame = function(a) { + d.prototype.playFrame = function(a) { if (!isNaN(this.seekIndex[a]) && (!this.wasFullyLoaded && this.movieClip._isFullyLoaded && (this.wasFullyLoaded = !0, this.soundStreamAdapter.finish()), this.soundStreamAdapter.isReady && !isNaN(this.soundStreamAdapter.currentTime))) { - var e = this.data, e = this.seekIndex[a] / e.sampleRate / e.channels, d = this.soundStreamAdapter.currentTime; - this.expectedFrame !== a ? this.soundStreamAdapter.playFrom(e) : 0 < this.waitFor ? this.waitFor <= e && (this.soundStreamAdapter.paused = !1, this.waitFor = 0) : 1 < d - e ? (console.warn("Sound is faster than frames by " + (d - e)), this.waitFor = d - .25, this.soundStreamAdapter.paused = !0) : 1 < e - d && (console.warn("Sound is slower than frames by " + (e - d)), this.soundStreamAdapter.playFrom(e + .25)); + var c = this.data, c = this.seekIndex[a] / c.sampleRate / c.channels, b = this.soundStreamAdapter.currentTime; + this.expectedFrame !== a ? this.soundStreamAdapter.playFrom(c) : 0 < this.waitFor ? this.waitFor <= c && (this.soundStreamAdapter.paused = !1, this.waitFor = 0) : 1 < b - c ? (console.warn("Sound is faster than frames by " + (b - c)), this.waitFor = b - .25, this.soundStreamAdapter.paused = !0) : 1 < c - b && (console.warn("Sound is slower than frames by " + (c - b)), this.soundStreamAdapter.playFrom(c + .25)); this.expectedFrame = a + 1; } }; - return c; + return d; }(); v.MovieClipSoundStream = l; - })(h.display || (h.display = {})); + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.somewhatImplemented, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.throwError, t = function(c) { - function n() { + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.AVM2.Runtime.asCoerceString, c = d.AVM2.Runtime.throwError, h = function(d) { + function h() { v.DisplayObjectContainer.instanceConstructorNoInitialize.call(this); this._root = this; this._stage = this; @@ -34095,705 +34142,689 @@ var RtmpJs; this._colorARGB = 4294967295; this._fullScreenHeight = this._fullScreenWidth = 0; this._wmodeGPU = !1; - this._softKeyboardRect = new s.geom.Rectangle; + this._softKeyboardRect = new r.geom.Rectangle; this._allowsFullScreenInteractive = this._allowsFullScreen = !1; this._contentsScaleFactor = 1; this._displayContextInfo = null; this._stageContainerHeight = this._stageContainerWidth = this._timeout = -1; this._invalidated = !1; } - __extends(n, c); - n.prototype.setRoot = function(a) { + __extends(h, d); + h.prototype.setRoot = function(a) { this.addTimelineObjectAtDepth(a, 0); }; - Object.defineProperty(n.prototype, "frameRate", {get:function() { + Object.defineProperty(h.prototype, "frameRate", {get:function() { return this._frameRate; }, set:function(a) { this._frameRate = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scaleMode", {get:function() { + Object.defineProperty(h.prototype, "scaleMode", {get:function() { return this._scaleMode; }, set:function(a) { - a = e(a); - 0 > s.display.StageScaleMode.toNumber(a) && m("ArgumentError", h.Errors.InvalidEnumError, "scaleMode"); + a = l(a); + 0 > r.display.StageScaleMode.toNumber(a) && c("ArgumentError", k.Errors.InvalidEnumError, "scaleMode"); this._scaleMode = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "align", {get:function() { + Object.defineProperty(h.prototype, "align", {get:function() { return this._align; }, set:function(a) { - a = e(a); - a = s.display.StageAlign.toNumber(a); - u(0 <= a); - this._align = s.display.StageAlign.fromNumber(a); + a = l(a); + a = r.display.StageAlign.toNumber(a); + this._align = r.display.StageAlign.fromNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "stageWidth", {get:function() { - if (this.scaleMode !== v.StageScaleMode.NO_SCALE) { - return this._stageWidth / 20 | 0; - } - u(0 <= this._stageContainerWidth); - return this._stageContainerWidth; + Object.defineProperty(h.prototype, "stageWidth", {get:function() { + return this.scaleMode !== v.StageScaleMode.NO_SCALE ? this._stageWidth / 20 | 0 : this._stageContainerWidth; }, set:function(a) { }, enumerable:!0, configurable:!0}); - n.prototype._setInitialName = function() { + h.prototype._setInitialName = function() { this._name = null; }; - n.prototype.setStageWidth = function(a) { - u((a | 0) === a); + h.prototype.setStageWidth = function(a) { this._stageWidth = 20 * a | 0; }; - Object.defineProperty(n.prototype, "stageHeight", {get:function() { - if (this.scaleMode !== v.StageScaleMode.NO_SCALE) { - return this._stageHeight / 20 | 0; - } - u(0 <= this._stageContainerHeight); - return this._stageContainerHeight; + Object.defineProperty(h.prototype, "stageHeight", {get:function() { + return this.scaleMode !== v.StageScaleMode.NO_SCALE ? this._stageHeight / 20 | 0 : this._stageContainerHeight; }, set:function(a) { }, enumerable:!0, configurable:!0}); - n.prototype.setStageHeight = function(a) { - u((a | 0) === a); + h.prototype.setStageHeight = function(a) { this._stageHeight = 20 * a | 0; }; - n.prototype.setStageColor = function(a) { + h.prototype.setStageColor = function(a) { this._colorARGB = a; }; - n.prototype.setStageContainerSize = function(a, e, d) { - this._contentsScaleFactor = d; - if (this._stageContainerWidth !== a || this._stageContainerHeight !== e) { - this._stageContainerWidth = a, this._stageContainerHeight = e, this.scaleMode === v.StageScaleMode.NO_SCALE && this.dispatchEvent(s.events.Event.getInstance(s.events.Event.RESIZE)); + h.prototype.setStageContainerSize = function(a, c, f) { + this._contentsScaleFactor = f; + if (this._stageContainerWidth !== a || this._stageContainerHeight !== c) { + this._stageContainerWidth = a, this._stageContainerHeight = c, this.scaleMode === v.StageScaleMode.NO_SCALE && this.dispatchEvent(r.events.Event.getInstance(r.events.Event.RESIZE)); } }; - Object.defineProperty(n.prototype, "showDefaultContextMenu", {get:function() { + Object.defineProperty(h.prototype, "showDefaultContextMenu", {get:function() { return this._showDefaultContextMenu; }, set:function(a) { this._showDefaultContextMenu = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "focus", {get:function() { + Object.defineProperty(h.prototype, "focus", {get:function() { return this._focus; }, set:function(a) { this._focus = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "colorCorrection", {get:function() { + Object.defineProperty(h.prototype, "colorCorrection", {get:function() { return this._colorCorrection; }, set:function(a) { - p("public flash.display.Stage::set colorCorrection"); + u("public flash.display.Stage::set colorCorrection"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "colorCorrectionSupport", {get:function() { + Object.defineProperty(h.prototype, "colorCorrectionSupport", {get:function() { return this._colorCorrectionSupport; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "stageFocusRect", {get:function() { + Object.defineProperty(h.prototype, "stageFocusRect", {get:function() { return this._stageFocusRect; }, set:function(a) { this._stageFocusRect = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "quality", {get:function() { + Object.defineProperty(h.prototype, "quality", {get:function() { return this._quality.toUpperCase(); }, set:function(a) { - a = (e(a) || "").toLowerCase(); - 0 > s.display.StageQuality.toNumber(a) && (a = s.display.StageQuality.HIGH); + a = (l(a) || "").toLowerCase(); + 0 > r.display.StageQuality.toNumber(a) && (a = r.display.StageQuality.HIGH); this._quality = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "displayState", {get:function() { + Object.defineProperty(h.prototype, "displayState", {get:function() { return this._displayState; }, set:function(a) { - a = e(a); - 0 > s.display.StageDisplayState.toNumber(a) && (a = s.display.StageDisplayState.NORMAL); + a = l(a); + 0 > r.display.StageDisplayState.toNumber(a) && (a = r.display.StageDisplayState.NORMAL); this._displayState = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "fullScreenSourceRect", {get:function() { + Object.defineProperty(h.prototype, "fullScreenSourceRect", {get:function() { return this._fullScreenSourceRect; }, set:function(a) { - p("public flash.display.Stage::set fullScreenSourceRect"); + u("public flash.display.Stage::set fullScreenSourceRect"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "mouseLock", {get:function() { + Object.defineProperty(h.prototype, "mouseLock", {get:function() { return this._mouseLock; }, set:function(a) { - l("public flash.display.Stage::set mouseLock"); + t("public flash.display.Stage::set mouseLock"); this._mouseLock = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "stageVideos", {get:function() { - l("public flash.display.Stage::get stageVideos"); + Object.defineProperty(h.prototype, "stageVideos", {get:function() { + t("public flash.display.Stage::get stageVideos"); return this._stageVideos; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "stage3Ds", {get:function() { - p("public flash.display.Stage::get stage3Ds"); + Object.defineProperty(h.prototype, "stage3Ds", {get:function() { + u("public flash.display.Stage::get stage3Ds"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "color", {get:function() { + Object.defineProperty(h.prototype, "color", {get:function() { return this._colorARGB; }, set:function(a) { this._colorARGB = a | 4278190080; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "alpha", {get:function() { + Object.defineProperty(h.prototype, "alpha", {get:function() { return this._colorTransform.alphaMultiplier; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "fullScreenWidth", {get:function() { + Object.defineProperty(h.prototype, "fullScreenWidth", {get:function() { return this._fullScreenWidth; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "fullScreenHeight", {get:function() { + Object.defineProperty(h.prototype, "fullScreenHeight", {get:function() { return this._fullScreenHeight; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "wmodeGPU", {get:function() { + Object.defineProperty(h.prototype, "wmodeGPU", {get:function() { return this._wmodeGPU; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "softKeyboardRect", {get:function() { + Object.defineProperty(h.prototype, "softKeyboardRect", {get:function() { return this._softKeyboardRect; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "allowsFullScreen", {get:function() { + Object.defineProperty(h.prototype, "allowsFullScreen", {get:function() { return this._allowsFullScreen; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "allowsFullScreenInteractive", {get:function() { + Object.defineProperty(h.prototype, "allowsFullScreenInteractive", {get:function() { return this._allowsFullScreenInteractive; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "contentsScaleFactor", {get:function() { + Object.defineProperty(h.prototype, "contentsScaleFactor", {get:function() { return this._contentsScaleFactor; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "displayContextInfo", {get:function() { + Object.defineProperty(h.prototype, "displayContextInfo", {get:function() { return this._displayContextInfo; }, enumerable:!0, configurable:!0}); - n.prototype.removeChildAt = function(a) { - return c.prototype.removeChildAt.call(this, a); + h.prototype.removeChildAt = function(a) { + return d.prototype.removeChildAt.call(this, a); }; - n.prototype.swapChildrenAt = function(a, e) { - c.prototype.swapChildrenAt.call(this, a, e); + h.prototype.swapChildrenAt = function(a, c) { + d.prototype.swapChildrenAt.call(this, a, c); }; - Object.defineProperty(n.prototype, "width", {get:function() { + Object.defineProperty(h.prototype, "width", {get:function() { return this._getWidth(); }, set:function(a) { this._setWidth(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "height", {get:function() { + Object.defineProperty(h.prototype, "height", {get:function() { return this._getHeight(); }, set:function(a) { this._setHeight(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "mouseChildren", {get:function() { + Object.defineProperty(h.prototype, "mouseChildren", {get:function() { return this._mouseChildren; }, set:function(a) { this._setMouseChildren(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "numChildren", {get:function() { + Object.defineProperty(h.prototype, "numChildren", {get:function() { return this._children.length; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "tabChildren", {get:function() { + Object.defineProperty(h.prototype, "tabChildren", {get:function() { return this._tabChildren; }, set:function(a) { this._setTabChildren(a); }, enumerable:!0, configurable:!0}); - n.prototype.addChild = function(a) { - return c.prototype.addChild.call(this, a); + h.prototype.addChild = function(a) { + return d.prototype.addChild.call(this, a); }; - n.prototype.addChildAt = function(a, e) { - return c.prototype.addChildAt.call(this, a, e); + h.prototype.addChildAt = function(a, c) { + return d.prototype.addChildAt.call(this, a, c); }; - n.prototype.setChildIndex = function(a, e) { - c.prototype.setChildIndex.call(this, a, e); + h.prototype.setChildIndex = function(a, c) { + d.prototype.setChildIndex.call(this, a, c); }; - n.prototype.addEventListener = function(a, e, d, b, g) { - c.prototype.addEventListener.call(this, a, e, d, b, g); + h.prototype.addEventListener = function(a, c, f, b, e) { + d.prototype.addEventListener.call(this, a, c, f, b, e); }; - n.prototype.hasEventListener = function(a) { - return c.prototype.hasEventListener.call(this, a); + h.prototype.hasEventListener = function(a) { + return d.prototype.hasEventListener.call(this, a); }; - n.prototype.willTrigger = function(a) { - return c.prototype.willTrigger.call(this, a); + h.prototype.willTrigger = function(a) { + return d.prototype.willTrigger.call(this, a); }; - n.prototype.dispatchEvent = function(a) { - return c.prototype.dispatchEvent.call(this, a); + h.prototype.dispatchEvent = function(a) { + return d.prototype.dispatchEvent.call(this, a); }; - n.prototype.invalidate = function() { + h.prototype.invalidate = function() { this._invalidated = !0; }; - n.prototype.isFocusInaccessible = function() { - p("public flash.display.Stage::isFocusInaccessible"); + h.prototype.isFocusInaccessible = function() { + u("public flash.display.Stage::isFocusInaccessible"); }; - n.prototype.requireOwnerPermissions = function() { + h.prototype.requireOwnerPermissions = function() { }; - n.prototype.render = function() { - this._invalidated && (v.DisplayObject._broadcastFrameEvent(s.events.Event.RENDER), this._invalidated = !1); + h.prototype.render = function() { + this._invalidated && (v.DisplayObject._broadcastFrameEvent(r.events.Event.RENDER), this._invalidated = !1); }; - Object.defineProperty(n.prototype, "name", {get:function() { + Object.defineProperty(h.prototype, "name", {get:function() { return this._name; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "mask", {get:function() { + Object.defineProperty(h.prototype, "mask", {get:function() { return this._mask; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "visible", {get:function() { + Object.defineProperty(h.prototype, "visible", {get:function() { return this._hasFlags(1); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "x", {get:function() { + Object.defineProperty(h.prototype, "x", {get:function() { return this._getX(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "y", {get:function() { + Object.defineProperty(h.prototype, "y", {get:function() { return this._getY(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "z", {get:function() { + Object.defineProperty(h.prototype, "z", {get:function() { return this._z; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scaleX", {get:function() { + Object.defineProperty(h.prototype, "scaleX", {get:function() { return Math.abs(this._scaleX); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scaleY", {get:function() { + Object.defineProperty(h.prototype, "scaleY", {get:function() { return this._scaleY; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scaleZ", {get:function() { + Object.defineProperty(h.prototype, "scaleZ", {get:function() { return this._scaleZ; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "rotation", {get:function() { + Object.defineProperty(h.prototype, "rotation", {get:function() { return this._rotation; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "rotationX", {get:function() { + Object.defineProperty(h.prototype, "rotationX", {get:function() { return this._rotationX; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "rotationY", {get:function() { + Object.defineProperty(h.prototype, "rotationY", {get:function() { return this._rotationX; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "rotationZ", {get:function() { + Object.defineProperty(h.prototype, "rotationZ", {get:function() { return this._rotationX; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "cacheAsBitmap", {get:function() { + Object.defineProperty(h.prototype, "cacheAsBitmap", {get:function() { return this._getCacheAsBitmap(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "opaqueBackground", {get:function() { + Object.defineProperty(h.prototype, "opaqueBackground", {get:function() { return this._opaqueBackground; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scrollRect", {get:function() { + Object.defineProperty(h.prototype, "scrollRect", {get:function() { return this._getScrollRect(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "filters", {get:function() { + Object.defineProperty(h.prototype, "filters", {get:function() { return this._getFilters(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "blendMode", {get:function() { + Object.defineProperty(h.prototype, "blendMode", {get:function() { return this._blendMode; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "transform", {get:function() { + Object.defineProperty(h.prototype, "transform", {get:function() { return this._getTransform(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "accessibilityProperties", {get:function() { + Object.defineProperty(h.prototype, "accessibilityProperties", {get:function() { return this._accessibilityProperties; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "scale9Grid", {get:function() { + Object.defineProperty(h.prototype, "scale9Grid", {get:function() { return this._getScale9Grid(); }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "tabEnabled", {get:function() { + Object.defineProperty(h.prototype, "tabEnabled", {get:function() { return this._tabEnabled; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "tabIndex", {get:function() { + Object.defineProperty(h.prototype, "tabIndex", {get:function() { return this._tabIndex; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "focusRect", {get:function() { + Object.defineProperty(h.prototype, "focusRect", {get:function() { return this._focusRect; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "mouseEnabled", {get:function() { + Object.defineProperty(h.prototype, "mouseEnabled", {get:function() { return this._mouseEnabled; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "accessibilityImplementation", {get:function() { + Object.defineProperty(h.prototype, "accessibilityImplementation", {get:function() { return this._accessibilityImplementation; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "textSnapshot", {get:function() { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + Object.defineProperty(h.prototype, "textSnapshot", {get:function() { + c("IllegalOperationError", k.Errors.InvalidStageMethodError); return null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "contextMenu", {get:function() { + Object.defineProperty(h.prototype, "contextMenu", {get:function() { return this._contextMenu; }, set:function(a) { - m("IllegalOperationError", h.Errors.InvalidStageMethodError); + c("IllegalOperationError", k.Errors.InvalidStageMethodError); }, enumerable:!0, configurable:!0}); - n.classInitializer = null; - n.classSymbols = null; - n.instanceSymbols = null; - n.initializer = null; - return n; - }(s.display.DisplayObjectContainer); - v.Stage = t; - })(s.display || (s.display = {})); + h.classInitializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + h.initializer = null; + return h; + }(r.display.DisplayObjectContainer); + v.Stage = h; + })(r.display || (r.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.ActionScriptVersion"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.ActionScriptVersion"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.ACTIONSCRIPT2 = 2; - e.ACTIONSCRIPT3 = 3; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.ACTIONSCRIPT2 = 2; + c.ACTIONSCRIPT3 = 3; + return c; }(a.ASNative); - h.ActionScriptVersion = u; - })(h.display || (h.display = {})); + k.ActionScriptVersion = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.BlendMode"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.BlendMode"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: ; case 1: - return e.NORMAL; + return c.NORMAL; case 2: - return e.LAYER; + return c.LAYER; case 3: - return e.MULTIPLY; + return c.MULTIPLY; case 4: - return e.SCREEN; + return c.SCREEN; case 5: - return e.LIGHTEN; + return c.LIGHTEN; case 6: - return e.DARKEN; + return c.DARKEN; case 7: - return e.DIFFERENCE; + return c.DIFFERENCE; case 8: - return e.ADD; + return c.ADD; case 9: - return e.SUBTRACT; + return c.SUBTRACT; case 10: - return e.INVERT; + return c.INVERT; case 11: - return e.ALPHA; + return c.ALPHA; case 12: - return e.ERASE; + return c.ERASE; case 13: - return e.OVERLAY; + return c.OVERLAY; case 14: - return e.HARDLIGHT; + return c.HARDLIGHT; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.NORMAL: + case c.NORMAL: return 1; - case e.LAYER: + case c.LAYER: return 2; - case e.MULTIPLY: + case c.MULTIPLY: return 3; - case e.SCREEN: + case c.SCREEN: return 4; - case e.LIGHTEN: + case c.LIGHTEN: return 5; - case e.DARKEN: + case c.DARKEN: return 6; - case e.DIFFERENCE: + case c.DIFFERENCE: return 7; - case e.ADD: + case c.ADD: return 8; - case e.SUBTRACT: + case c.SUBTRACT: return 9; - case e.INVERT: + case c.INVERT: return 10; - case e.ALPHA: + case c.ALPHA: return 11; - case e.ERASE: + case c.ERASE: return 12; - case e.OVERLAY: + case c.OVERLAY: return 13; - case e.HARDLIGHT: + case c.HARDLIGHT: return 14; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.NORMAL = "normal"; - e.LAYER = "layer"; - e.MULTIPLY = "multiply"; - e.SCREEN = "screen"; - e.LIGHTEN = "lighten"; - e.DARKEN = "darken"; - e.ADD = "add"; - e.SUBTRACT = "subtract"; - e.DIFFERENCE = "difference"; - e.INVERT = "invert"; - e.OVERLAY = "overlay"; - e.HARDLIGHT = "hardlight"; - e.ALPHA = "alpha"; - e.ERASE = "erase"; - e.SHADER = "shader"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.NORMAL = "normal"; + c.LAYER = "layer"; + c.MULTIPLY = "multiply"; + c.SCREEN = "screen"; + c.LIGHTEN = "lighten"; + c.DARKEN = "darken"; + c.ADD = "add"; + c.SUBTRACT = "subtract"; + c.DIFFERENCE = "difference"; + c.INVERT = "invert"; + c.OVERLAY = "overlay"; + c.HARDLIGHT = "hardlight"; + c.ALPHA = "alpha"; + c.ERASE = "erase"; + c.SHADER = "shader"; + return c; }(a.ASNative); - h.BlendMode = u; - })(h.display || (h.display = {})); + k.BlendMode = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.ColorCorrection"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.ColorCorrection"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.DEFAULT; + return c.DEFAULT; case 1: - return e.ON; + return c.ON; case 2: - return e.OFF; + return c.OFF; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.DEFAULT: + case c.DEFAULT: return 0; - case e.ON: + case c.ON: return 1; - case e.OFF: + case c.OFF: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.DEFAULT = "default"; - e.ON = "on"; - e.OFF = "off"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.DEFAULT = "default"; + c.ON = "on"; + c.OFF = "off"; + return c; }(a.ASNative); - h.ColorCorrection = u; - })(h.display || (h.display = {})); + k.ColorCorrection = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.ColorCorrectionSupport"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.ColorCorrectionSupport"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.UNSUPPORTED; + return c.UNSUPPORTED; case 1: - return e.DEFAULT_ON; + return c.DEFAULT_ON; case 2: - return e.DEFAULT_OFF; + return c.DEFAULT_OFF; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.UNSUPPORTED: + case c.UNSUPPORTED: return 0; - case e.DEFAULT_ON: + case c.DEFAULT_ON: return 1; - case e.DEFAULT_OFF: + case c.DEFAULT_OFF: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.UNSUPPORTED = "unsupported"; - e.DEFAULT_ON = "defaultOn"; - e.DEFAULT_OFF = "defaultOff"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.UNSUPPORTED = "unsupported"; + c.DEFAULT_ON = "defaultOn"; + c.DEFAULT_OFF = "defaultOff"; + return c; }(a.ASNative); - h.ColorCorrectionSupport = u; - })(h.display || (h.display = {})); + k.ColorCorrectionSupport = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.FocusDirection"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.FocusDirection"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.TOP = "top"; - e.BOTTOM = "bottom"; - e.NONE = "none"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.TOP = "top"; + c.BOTTOM = "bottom"; + c.NONE = "none"; + return c; }(a.ASNative); - h.FocusDirection = u; - })(h.display || (h.display = {})); + k.FocusDirection = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e) { - this._name = p(a); - this._frame = e | 0; + (function(k) { + var u = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c) { + this._name = u(a); + this._frame = c | 0; } - __extends(e, a); - Object.defineProperty(e.prototype, "name", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "name", {get:function() { return this._name; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "frame", {get:function() { + Object.defineProperty(c.prototype, "frame", {get:function() { return this._frame; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new e(this._name, this._frame); + c.prototype.clone = function() { + return new c(this._name, this._frame); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.events.EventDispatcher); - h.FrameLabel = u; + k.FrameLabel = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.somewhatImplemented, e = c.ArrayUtilities.DataBuffer, m = c.AVM2.Runtime.asCoerceString, t = c.AVM2.Runtime.throwError, q = c.AVM2.Runtime.AVM2, n = c.IntegerUtilities.swap32, k = c.ColorUtilities.premultiplyARGB, f = c.ColorUtilities.unpremultiplyARGB, d = c.ColorUtilities.RGBAToARGB, b = c.ArrayUtilities.indexOf, g = h.geom.Rectangle, r = function(r) { - function v(a, b, d, e) { - void 0 === d && (d = !0); - void 0 === e && (e = 4294967295); + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.ArrayUtilities.DataBuffer, c = d.AVM2.Runtime.asCoerceString, h = d.AVM2.Runtime.throwError, p = d.AVM2.Runtime.AVM2, s = d.IntegerUtilities.swap32, m = d.ColorUtilities.premultiplyARGB, g = d.ColorUtilities.unpremultiplyARGB, f = d.ColorUtilities.RGBAToARGB, b = d.ArrayUtilities.indexOf, e = k.geom.Rectangle, q = function(n) { + function q(a, b, c, f) { + void 0 === c && (c = !0); + void 0 === f && (f = 4294967295); a |= 0; b |= 0; - d = !!d; - e |= 0; - var c = this._symbol; - c && (a = c.width | 0, b = c.height | 0); - (a > v.MAXIMUM_WIDTH || 0 >= a || b > v.MAXIMUM_HEIGHT || 0 >= b || a * b > v.MAXIMUM_DIMENSION) && t("ArgumentError", q.Errors.InvalidBitmapData); - this._rect = new g(0, 0, a, b); - this._transparent = d; - c ? (u(c.syncId), this._id = c.syncId, 1 === c.type || 2 === c.type || 3 === c.type ? (u(c.data), this._setData(c.data, c.type)) : (this._isDirty = !1, this._isRemoteDirty = !0), this._solidFillColorPBGRA = null) : (this._id = h.display.DisplayObject.getNextSyncID(), this._setData(new Uint8Array(a * b * 4), 1), 0 === e >> 24 && d ? this._solidFillColorPBGRA = 0 : this.fillRect(this._rect, e)); + c = !!c; + f |= 0; + var d = this._symbol; + d && (a = d.width | 0, b = d.height | 0); + (a > q.MAXIMUM_WIDTH || 0 >= a || b > q.MAXIMUM_HEIGHT || 0 >= b || a * b > q.MAXIMUM_DIMENSION) && h("ArgumentError", p.Errors.InvalidBitmapData); + this._rect = new e(0, 0, a, b); + this._transparent = c; + d ? (this._id = d.syncId, 1 === d.type || 2 === d.type || 3 === d.type ? this._setData(d.data, d.type) : (this._isDirty = !1, this._isRemoteDirty = !0), this._solidFillColorPBGRA = null) : (this._id = k.display.DisplayObject.getNextSyncID(), this._setData(new Uint8Array(a * b * 4), 1), 0 === f >> 24 && c ? this._solidFillColorPBGRA = 0 : this.fillRect(this._rect, f)); this._bitmapReferrers = []; - u(this._isDirty === !!this._data); - u(this._isRemoteDirty === !this._data); } - __extends(v, r); - v.prototype._setData = function(a, b) { + __extends(q, n); + q.prototype._setData = function(a, b) { a instanceof Uint8ClampedArray && (a = new Uint8Array(a.buffer)); - u(a instanceof Uint8Array); this._data = a; this._type = b; this._view = new Int32Array(a.buffer); - this._dataBuffer = e.FromArrayBuffer(a.buffer); + this._dataBuffer = l.FromArrayBuffer(a.buffer); this._isDirty = !0; this._isRemoteDirty = !1; }; - v.prototype._addBitmapReferrer = function(a) { - var d = b(this._bitmapReferrers, a); - u(0 > d); + q.prototype._addBitmapReferrer = function(a) { + b(this._bitmapReferrers, a); this._bitmapReferrers.push(a); }; - v.prototype._removeBitmapReferrer = function(a) { + q.prototype._removeBitmapReferrer = function(a) { a = b(this._bitmapReferrers, a); - u(0 <= a); this._bitmapReferrers[a] = null; }; - v.prototype._invalidate = function() { + q.prototype._invalidate = function() { if (!this._isDirty) { this._isDirty = !0; this._isRemoteDirty = !1; @@ -34803,67 +34834,66 @@ var RtmpJs; } } }; - v.prototype._getTemporaryRectangleFrom = function(a, b) { + q.prototype._getTemporaryRectangleFrom = function(a, b) { void 0 === b && (b = 0); - u(0 <= b && b < v._temporaryRectangles.length); - var d = v._temporaryRectangles[b]; - a && d.copyFrom(a); - return d; + var e = q._temporaryRectangles[b]; + a && e.copyFrom(a); + return e; }; - v.prototype.getDataBuffer = function() { + q.prototype.getDataBuffer = function() { return this._dataBuffer; }; - v.prototype._getContentBounds = function() { - return c.Bounds.FromRectangle(this._rect); + q.prototype._getContentBounds = function() { + return d.Bounds.FromRectangle(this._rect); }; - v.prototype._getPixelData = function(a) { + q.prototype._getPixelData = function(a) { var b = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a); if (!b.isEmpty()) { a = b.x; - for (var d = b.x + b.width, e = b.y, c = b.y + b.height, g = this._view, f = this._rect.width, b = new Int32Array(b.area), k = 0;e < c;e++) { - for (var m = e * f, l = a;l < d;l++) { - var h = g[m + l], r = h & 255, h = 255 * (h >>> 8) / r << 8 | r; - b[k++] = h; + for (var e = b.x + b.width, c = b.y, f = b.y + b.height, d = this._view, g = this._rect.width, b = new Int32Array(b.area), h = 0;c < f;c++) { + for (var l = c * g, n = a;n < e;n++) { + var q = d[l + n], k = q & 255, q = 255 * (q >>> 8) / k << 8 | k; + b[h++] = q; } } return b; } }; - v.prototype._putPixelData = function(a, b) { - var d = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a); - if (!d.isEmpty()) { - for (var e = d.x, c = d.x + d.width, g = d.y + d.height, f = this._view, k = this._rect.width, m = a.width * a.height - d.height + (e - a.x), l = a.width - d.width, h = this._transparent ? 0 : 255, d = d.y;d < g;d++) { - for (var r = d * k, n = e;n < c;n++) { - var q = b[m++], w = q & h; - f[r + n] = (((q >>> 8) * w + 254) / 255 & 16777215) << 8 | w; + q.prototype._putPixelData = function(a, b) { + var e = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a); + if (!e.isEmpty()) { + for (var c = e.x, f = e.x + e.width, d = e.y + e.height, g = this._view, h = this._rect.width, l = a.width * a.height - e.height + (c - a.x), n = a.width - e.width, q = this._transparent ? 0 : 255, e = e.y;e < d;e++) { + for (var k = e * h, m = c;m < f;m++) { + var p = b[l++], s = p & q; + g[k + m] = (((p >>> 8) * s + 254) / 255 & 16777215) << 8 | s; } - m += l; + l += n; } this._invalidate(); } }; - Object.defineProperty(v.prototype, "width", {get:function() { + Object.defineProperty(q.prototype, "width", {get:function() { return this._rect.width; }, enumerable:!0, configurable:!0}); - Object.defineProperty(v.prototype, "height", {get:function() { + Object.defineProperty(q.prototype, "height", {get:function() { return this._rect.height; }, enumerable:!0, configurable:!0}); - Object.defineProperty(v.prototype, "rect", {get:function() { + Object.defineProperty(q.prototype, "rect", {get:function() { return this._rect.clone(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(v.prototype, "transparent", {get:function() { + Object.defineProperty(q.prototype, "transparent", {get:function() { return this._transparent; }, enumerable:!0, configurable:!0}); - v.prototype.clone = function() { - l("public flash.display.BitmapData::clone"); - var a = new v(this._rect.width, this._rect.height, this._transparent, this._solidFillColorPBGRA); + q.prototype.clone = function() { + t("public flash.display.BitmapData::clone"); + var a = new q(this._rect.width, this._rect.height, this._transparent, this._solidFillColorPBGRA); a._view.set(this._view); return a; }; - v.prototype.getPixel = function(a, b) { + q.prototype.getPixel = function(a, b) { return this.getPixel32(a | 0, b | 0) & 16777215; }; - v.prototype.getPixel32 = function(a, b) { + q.prototype.getPixel32 = function(a, b) { a |= 0; b |= 0; if (!this._rect.contains(a, b)) { @@ -34873,96 +34903,96 @@ var RtmpJs; var e = this._view[b * this._rect.width + a]; switch(this._type) { case 1: - return e = n(e), f(e) >>> 0; + return e = s(e), g(e) >>> 0; case 3: - return d(n(e)); + return f(s(e)); default: - return c.Debug.notImplemented(c.ImageType[this._type]), 0; + return d.Debug.notImplemented(d.ImageType[this._type]), 0; } }; - v.prototype.setPixel = function(a, b, d) { + q.prototype.setPixel = function(a, b, e) { a |= 0; b |= 0; - d |= 0; - this._rect.contains(a, b) && (this._ensureBitmapData(), a = b * this._rect.width + a, d = d & 16777215 | (this._view[a] & 255) << 24, d = k(d), this._view[a] = n(d), this._invalidate(), this._solidFillColorPBGRA = null); + e |= 0; + this._rect.contains(a, b) && (this._ensureBitmapData(), a = b * this._rect.width + a, e = e & 16777215 | (this._view[a] & 255) << 24, e = m(e), this._view[a] = s(e), this._invalidate(), this._solidFillColorPBGRA = null); }; - v.prototype.setPixel32 = function(a, b, d) { + q.prototype.setPixel32 = function(a, b, e) { a |= 0; b |= 0; if (this._rect.contains(a, b)) { this._ensureBitmapData(); - var e = d >>> 24; - d &= 16777215; - e = this._transparent ? k(d | e << 24) : d | 4278190080; - this._view[b * this._rect.width + a] = n(e); + var c = e >>> 24; + e &= 16777215; + c = this._transparent ? m(e | c << 24) : e | 4278190080; + this._view[b * this._rect.width + a] = s(c); this._invalidate(); this._solidFillColorPBGRA = null; } }; - v.prototype.applyFilter = function(a, b, d, e) { - l("public flash.display.BitmapData::applyFilter " + e); + q.prototype.applyFilter = function(a, b, e, c) { + t("public flash.display.BitmapData::applyFilter " + c); }; - v.prototype.colorTransform = function(a, b) { - l("public flash.display.BitmapData::colorTransform"); + q.prototype.colorTransform = function(a, b) { + t("public flash.display.BitmapData::colorTransform"); }; - v.prototype.compare = function(a) { - p("public flash.display.BitmapData::compare"); + q.prototype.compare = function(a) { + u("public flash.display.BitmapData::compare"); }; - v.prototype.copyChannel = function(a, b, d, e, c) { - p("public flash.display.BitmapData::copyChannel"); + q.prototype.copyChannel = function(a, b, e, c, f) { + u("public flash.display.BitmapData::copyChannel"); }; - v.prototype.copyPixels = function(a, b, d, e, c, g) { - void 0 === e && (e = null); + q.prototype.copyPixels = function(a, b, e, c, f, d) { void 0 === c && (c = null); - void 0 === g && (g = !1); - g = !!g; - if (e || c) { - p("public flash.display.BitmapData::copyPixels - Alpha"); + void 0 === f && (f = null); + void 0 === d && (d = !1); + d = !!d; + if (c || f) { + u("public flash.display.BitmapData::copyPixels - Alpha"); } else { - var f = this._getTemporaryRectangleFrom(b, 0).roundInPlace(); + var g = this._getTemporaryRectangleFrom(b, 0).roundInPlace(); b = this._rect; - c = a._rect; - var k = Math.max(f.x, 0); - e = Math.max(f.y, 0); - var m = Math.min(f.x + f.width, c.width), h = Math.min(f.y + f.height, c.height); - c = d.x | 0 + (k - f.x); - f = d.y | 0 + (e - f.y); - 0 > c && (k -= c, c = 0); - 0 > f && (e -= f, f = 0); - d = Math.min(m - k, b.width - c); - b = Math.min(h - e, b.height - f); - if (!(0 >= d || 0 >= b)) { - var m = k, h = e, r = c, n = f; - e = a._rect.width; - c = this._rect.width; + f = a._rect; + var h = Math.max(g.x, 0); + c = Math.max(g.y, 0); + var l = Math.min(g.x + g.width, f.width), n = Math.min(g.y + g.height, f.height); + f = e.x | 0 + (h - g.x); + g = e.y | 0 + (c - g.y); + 0 > f && (h -= f, f = 0); + 0 > g && (c -= g, g = 0); + e = Math.min(l - h, b.width - f); + b = Math.min(n - c, b.height - g); + if (!(0 >= e || 0 >= b)) { + var l = h, n = c, q = f, k = g; + c = a._rect.width; + f = this._rect.width; this._ensureBitmapData(); a._ensureBitmapData(); - k = a._view; - f = this._view; - a._type !== this._type && l("public flash.display.BitmapData::copyPixels - Color Format Conversion"); - if (g && 1 !== this._type) { - p("public flash.display.BitmapData::copyPixels - Merge Alpha"); + h = a._view; + g = this._view; + a._type !== this._type && t("public flash.display.BitmapData::copyPixels - Color Format Conversion"); + if (d && 1 !== this._type) { + u("public flash.display.BitmapData::copyPixels - Merge Alpha"); } else { if (null === this._solidFillColorPBGRA || this._solidFillColorPBGRA !== a._solidFillColorPBGRA) { - null !== a._solidFillColorPBGRA && 255 === (a._solidFillColorPBGRA & 255) && (g = !1); - if (g) { - this._copyPixelsAndMergeAlpha(k, m, h, e, f, r, n, c, d, b); + null !== a._solidFillColorPBGRA && 255 === (a._solidFillColorPBGRA & 255) && (d = !1); + if (d) { + this._copyPixelsAndMergeAlpha(h, l, n, c, g, q, k, f, e, b); } else { - if (a = h * e + m | 0, g = n * c + r | 0, 0 === (d & 3)) { - for (m = 0;m < b;m = m + 1 | 0) { - for (h = 0;h < d;h = h + 4 | 0) { - f[g + h + 0 | 0] = k[a + h + 0 | 0], f[g + h + 1 | 0] = k[a + h + 1 | 0], f[g + h + 2 | 0] = k[a + h + 2 | 0], f[g + h + 3 | 0] = k[a + h + 3 | 0]; + if (a = n * c + l | 0, d = k * f + q | 0, 0 === (e & 3)) { + for (l = 0;l < b;l = l + 1 | 0) { + for (n = 0;n < e;n = n + 4 | 0) { + g[d + n + 0 | 0] = h[a + n + 0 | 0], g[d + n + 1 | 0] = h[a + n + 1 | 0], g[d + n + 2 | 0] = h[a + n + 2 | 0], g[d + n + 3 | 0] = h[a + n + 3 | 0]; } - a = a + e | 0; - g = g + c | 0; + a = a + c | 0; + d = d + f | 0; } } else { - for (m = 0;m < b;m = m + 1 | 0) { - for (h = 0;h < d;h = h + 1 | 0) { - f[g + h | 0] = k[a + h | 0]; + for (l = 0;l < b;l = l + 1 | 0) { + for (n = 0;n < e;n = n + 1 | 0) { + g[d + n | 0] = h[a + n | 0]; } - a = a + e | 0; - g = g + c | 0; + a = a + c | 0; + d = d + f | 0; } } } @@ -34973,71 +35003,70 @@ var RtmpJs; } } }; - v.prototype._copyPixelsAndMergeAlpha = function(a, b, d, e, c, g, f, k, m, l) { - b = d * e + b | 0; - g = f * k + g | 0; - for (f = 0;f < l;f = f + 1 | 0) { - for (d = 0;d < m;d = d + 1 | 0) { - var h = a[b + d | 0], r = h & 255; - if (255 === r) { - c[g + d | 0] = h; + q.prototype._copyPixelsAndMergeAlpha = function(a, b, e, c, f, d, g, h, l, n) { + b = e * c + b | 0; + d = g * h + d | 0; + for (g = 0;g < n;g = g + 1 | 0) { + for (e = 0;e < l;e = e + 1 | 0) { + var q = a[b + e | 0], k = q & 255; + if (255 === k) { + f[d + e | 0] = q; } else { - if (0 !== r) { - var n = h & 16711935, h = h >> 8 & 16711935, q = c[g + d | 0], w = q & 16711935, q = q >> 8 & 16711935, r = 256 - r, w = Math.imul(w, r) >> 8, q = Math.imul(q, r) >> 8; - c[g + d | 0] = (h + q & 16711935) << 8 | n + w & 16711935; + if (0 !== k) { + var m = q & 16711935, q = q >> 8 & 16711935, p = f[d + e | 0], s = p & 16711935, p = p >> 8 & 16711935, k = 256 - k, s = Math.imul(s, k) >> 8, p = Math.imul(p, k) >> 8; + f[d + e | 0] = (q + p & 16711935) << 8 | m + s & 16711935; } } } - b = b + e | 0; - g = g + k | 0; + b = b + c | 0; + d = d + h | 0; } }; - v.prototype.dispose = function() { + q.prototype.dispose = function() { this._rect.setEmpty(); this._view = null; this._invalidate(); }; - v.prototype.draw = function(a, b, d, e, c, g) { + q.prototype.draw = function(a, b, e, c, f, d) { void 0 === b && (b = null); - void 0 === d && (d = null); void 0 === e && (e = null); void 0 === c && (c = null); - void 0 === g && (g = !1); - l("public flash.display.BitmapData::draw"); - var f = q.instance.globals["Shumway.Player.Utils"]; + void 0 === f && (f = null); + void 0 === d && (d = !1); + t("public flash.display.BitmapData::draw"); + var g = p.instance.globals["Shumway.Player.Utils"]; b && (b = b.clone().toTwipsInPlace()); - f.drawToBitmap(this, a, b, d, e, c, g); + g.drawToBitmap(this, a, b, e, c, f, d); this._isRemoteDirty = !0; }; - v.prototype.drawWithQuality = function(a, b, d, e, c, g, f) { - void 0 === e && (e = null); + q.prototype.drawWithQuality = function(a, b, e, f, d, g, h) { void 0 === f && (f = null); - m(e); - m(f); - p("public flash.display.BitmapData::drawWithQuality"); + void 0 === h && (h = null); + c(f); + c(h); + u("public flash.display.BitmapData::drawWithQuality"); }; - v.prototype.fillRect = function(a, b) { + q.prototype.fillRect = function(a, b) { this._ensureBitmapData(); - u(1 === this._type); - var d = this._transparent ? k(b) : b | 4278190080, d = n(d), e = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a); - if (!e.isEmpty() && this._solidFillColorPBGRA !== d) { - var c = this._view; - if (e.equals(this._rect)) { - var g = c.length | 0; - if (0 === (g & 3)) { - for (var f = 0;f < g;f += 4) { - c[f] = d, c[f + 1] = d, c[f + 2] = d, c[f + 3] = d; + var e = this._transparent ? m(b) : b | 4278190080, e = s(e), c = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a); + if (!c.isEmpty() && this._solidFillColorPBGRA !== e) { + var f = this._view; + if (c.equals(this._rect)) { + var d = f.length | 0; + if (0 === (d & 3)) { + for (var g = 0;g < d;g += 4) { + f[g] = e, f[g + 1] = e, f[g + 2] = e, f[g + 3] = e; } } else { - for (f = 0;f < g;f++) { - c[f] = d; + for (g = 0;g < d;g++) { + f[g] = e; } } - this._solidFillColorPBGRA = d; + this._solidFillColorPBGRA = e; } else { - for (var g = e.x | 0, f = e.x + e.width | 0, m = e.y + e.height | 0, l = this._rect.width | 0, e = e.y | 0;e < m;e++) { - for (var h = e * l | 0, r = g;r < f;r++) { - c[h + r] = d; + for (var d = c.x | 0, g = c.x + c.width | 0, h = c.y + c.height | 0, l = this._rect.width | 0, c = c.y | 0;c < h;c++) { + for (var n = c * l | 0, q = d;q < g;q++) { + f[n + q] = e; } } this._solidFillColorPBGRA = null; @@ -35045,139 +35074,134 @@ var RtmpJs; this._invalidate(); } }; - v.prototype.floodFill = function(a, b, d) { - p("public flash.display.BitmapData::floodFill"); + q.prototype.floodFill = function(a, b, e) { + u("public flash.display.BitmapData::floodFill"); }; - v.prototype.generateFilterRect = function(a, b) { - p("public flash.display.BitmapData::generateFilterRect"); + q.prototype.generateFilterRect = function(a, b) { + u("public flash.display.BitmapData::generateFilterRect"); }; - v.prototype.getColorBoundsRect = function(a, b, d) { - p("public flash.display.BitmapData::getColorBoundsRect"); + q.prototype.getColorBoundsRect = function(a, b, e) { + u("public flash.display.BitmapData::getColorBoundsRect"); }; - v.prototype.getPixels = function(a) { - var b = new h.utils.ByteArray; + q.prototype.getPixels = function(a) { + var b = new k.utils.ByteArray; this.copyPixelsToByteArray(a, b); return b; }; - v.prototype.copyPixelsToByteArray = function(a, b) { - var d = this._getPixelData(a); - d && b.writeRawBytes(new Uint8Array(d)); + q.prototype.copyPixelsToByteArray = function(a, b) { + var e = this._getPixelData(a); + e && b.writeRawBytes(new Uint8Array(e)); }; - v.prototype.getVector = function(b) { - var d = new a.Uint32Vector(e.length), e = this._getPixelData(b); - if (!e) { - return d; + q.prototype.getVector = function(b) { + var e = new a.Uint32Vector(c.length), c = this._getPixelData(b); + if (!c) { + return e; } - d.length = e.length; - d._view().set(e); - return d; + e.length = c.length; + e._view().set(c); + return e; }; - v.prototype.hitTest = function(a, b, d, e, c) { - p("public flash.display.BitmapData::hitTest"); + q.prototype.hitTest = function(a, b, e, c, f) { + u("public flash.display.BitmapData::hitTest"); }; - v.prototype.merge = function(a, b, d, e, c, g, f) { - l("public flash.display.BitmapData::merge"); + q.prototype.merge = function(a, b, e, c, f, d, g) { + t("public flash.display.BitmapData::merge"); }; - v.prototype.noise = function(a, b, d, e, c) { - l("public flash.display.BitmapData::noise"); + q.prototype.noise = function(a, b, e, c, f) { + t("public flash.display.BitmapData::noise"); }; - v.prototype.paletteMap = function(a, b, d, e, c, g, f) { - l("public flash.display.BitmapData::paletteMap"); + q.prototype.paletteMap = function(a, b, e, c, f, d, g) { + t("public flash.display.BitmapData::paletteMap"); }; - v.prototype.perlinNoise = function(a, b, d, e, c, g, f, k, m) { - l("public flash.display.BitmapData::perlinNoise"); + q.prototype.perlinNoise = function(a, b, e, c, f, d, g, h, l) { + t("public flash.display.BitmapData::perlinNoise"); }; - v.prototype.pixelDissolve = function(a, b, d, e, c, g) { - p("public flash.display.BitmapData::pixelDissolve"); + q.prototype.pixelDissolve = function(a, b, e, c, f, d) { + u("public flash.display.BitmapData::pixelDissolve"); }; - v.prototype.scroll = function(a, b) { - p("public flash.display.BitmapData::scroll"); + q.prototype.scroll = function(a, b) { + u("public flash.display.BitmapData::scroll"); }; - v.prototype.setPixels = function(a, b) { + q.prototype.setPixels = function(a, b) { this._putPixelData(a, new Int32Array(b.readRawBytes())); }; - v.prototype.setVector = function(a, b) { + q.prototype.setVector = function(a, b) { this._putPixelData(a, b._view()); }; - v.prototype.threshold = function(a, b, d, e, c, g, f, k) { - m(e); - p("public flash.display.BitmapData::threshold"); + q.prototype.threshold = function(a, b, e, f, d, g, h, l) { + c(f); + u("public flash.display.BitmapData::threshold"); }; - v.prototype.lock = function() { + q.prototype.lock = function() { this._locked = !0; }; - v.prototype.unlock = function(a) { + q.prototype.unlock = function(a) { this._locked = !1; }; - v.prototype.histogram = function(a) { - p("public flash.display.BitmapData::histogram"); + q.prototype.histogram = function(a) { + u("public flash.display.BitmapData::histogram"); }; - v.prototype.encode = function(a, b, d) { - p("public flash.display.BitmapData::encode"); + q.prototype.encode = function(a, b, e) { + u("public flash.display.BitmapData::encode"); }; - v.prototype._ensureBitmapData = function() { + q.prototype._ensureBitmapData = function() { if (this._isRemoteDirty) { - var a = c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestBitmapData(this); + var a = d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestBitmapData(this); this._setData(a.getBytes(), 3); this._isDirty = this._isRemoteDirty = !1; this._solidFillColorPBGRA = null; } - u(!(4 === this._type || 5 === this._type || 6 === this._type)); - 1 !== this._type && (c.ColorUtilities.convertImage(this._type, 1, this._view, this._view), this._type = 1, this._solidFillColorPBGRA = null); - u(this._data); - u(this._dataBuffer); - u(this._view); + 1 !== this._type && (d.ColorUtilities.convertImage(this._type, 1, this._view, this._view), this._type = 1, this._solidFillColorPBGRA = null); }; - v.classInitializer = function() { + q.classInitializer = function() { }; - v.initializer = function(a) { + q.initializer = function(a) { this._symbol = a; }; - v.classSymbols = null; - v.instanceSymbols = null; - v.MAXIMUM_WIDTH = 8191; - v.MAXIMUM_HEIGHT = 8191; - v.MAXIMUM_DIMENSION = 16777215; - v._temporaryRectangles = [new h.geom.Rectangle, new h.geom.Rectangle, new h.geom.Rectangle]; - return v; + q.classSymbols = null; + q.instanceSymbols = null; + q.MAXIMUM_WIDTH = 8191; + q.MAXIMUM_HEIGHT = 8191; + q.MAXIMUM_DIMENSION = 16777215; + q._temporaryRectangles = [new k.geom.Rectangle, new k.geom.Rectangle, new k.geom.Rectangle]; + return q; }(a.ASNative); - v.BitmapData = r; - r = function(a) { - function b(d) { - a.call(this, d, h.display.BitmapData, !1); + v.BitmapData = q; + q = function(a) { + function b(e) { + a.call(this, e, k.display.BitmapData, !1); this.ready = !1; } __extends(b, a); b.FromData = function(a) { - var d = new b(a); - d.width = a.width || -1; - d.height = a.height || -1; - d.syncId = h.display.DisplayObject.getNextSyncID(); - d.data = a.data; + var e = new b(a); + e.width = a.width || -1; + e.height = a.height || -1; + e.syncId = k.display.DisplayObject.getNextSyncID(); + e.data = a.data; switch(a.mimeType) { case "application/octet-stream": - d.type = a.dataType; - d.ready = !0; + e.type = a.dataType; + e.ready = !0; break; case "image/jpeg": - d.type = 4; + e.type = 4; break; case "image/png": - d.type = 5; + e.type = 5; break; case "image/gif": - d.type = 6; + e.type = 6; break; default: - p(a.mimeType); + u(a.mimeType); } - return d; + return e; }; b.prototype.getSharedInstance = function() { return this.sharedInstance || this.createSharedInstance(); }; b.prototype.createSharedInstance = function() { - u(this.ready); this.sharedInstance = this.symbolClass.initializeFrom(this); this.symbolClass.instanceConstructorNoInitialize.call(this.sharedInstance); return this.sharedInstance; @@ -35186,128 +35210,129 @@ var RtmpJs; return this._unboundResolveAssetCallback.bind(this); }, enumerable:!0, configurable:!0}); b.prototype._unboundResolveAssetCallback = function(a) { - u(!this.ready); this.ready = !0; - a ? (u(a.width), u(a.height), this.width = a.width, this.height = a.height) : c.Debug.error("Error while decoding image"); + a && (this.width = a.width, this.height = a.height); }; return b; - }(c.Timeline.DisplaySymbol); - v.BitmapSymbol = r; - })(h.display || (h.display = {})); + }(d.Timeline.DisplaySymbol); + v.BitmapSymbol = q; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.BitmapDataChannel"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.BitmapDataChannel"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.RED = 1; - e.GREEN = 2; - e.BLUE = 4; - e.ALPHA = 8; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.RED = 1; + c.GREEN = 2; + c.BLUE = 4; + c.ALPHA = 8; + return c; }(a.ASNative); - h.BitmapDataChannel = u; - })(h.display || (h.display = {})); + k.BitmapDataChannel = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.BitmapEncodingColorSpace"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.BitmapEncodingColorSpace"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.COLORSPACE_AUTO = "auto"; - e.COLORSPACE_4_4_4 = "4:4:4"; - e.COLORSPACE_4_2_2 = "4:2:2"; - e.COLORSPACE_4_2_0 = "4:2:0"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.COLORSPACE_AUTO = "auto"; + c.COLORSPACE_4_4_4 = "4:4:4"; + c.COLORSPACE_4_2_2 = "4:2:2"; + c.COLORSPACE_4_2_0 = "4:2:0"; + return c; }(a.ASNative); - h.BitmapEncodingColorSpace = u; - })(h.display || (h.display = {})); + k.BitmapEncodingColorSpace = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e(a) { - s("public flash.display.JPEGEncoderOptions"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a) { + r("public flash.display.JPEGEncoderOptions"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - h.JPEGEncoderOptions = u; - })(h.display || (h.display = {})); + k.JPEGEncoderOptions = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(v) { - var p = c.Debug.assert, u = c.AVM2.Runtime.throwError, l = h.display.ActionScriptVersion, e = c.AVM2.Runtime.AVM2, m = h.events, t = c.FileLoader, q = c.AVM2.ABC.AbcFile, n = c.SWF.SWFFile, k; + (function(a) { + (function(k) { + var u = d.AVM2.Runtime.throwError, t = a.display.ActionScriptVersion, l = d.AVM2.Runtime.AVM2, c = a.events, h = d.FileLoader, p = d.AVM2.ABC.AbcFile, s = d.SWF.SWFFile, m; (function(a) { a[a.Unloaded = 0] = "Unloaded"; a[a.Opened = 1] = "Opened"; a[a.Initialized = 2] = "Initialized"; a[a.Complete = 3] = "Complete"; - })(k || (k = {})); - var f; + })(m || (m = {})); + var g; (function(a) { a[a.External = 0] = "External"; a[a.Bytes = 1] = "Bytes"; - })(f || (f = {})); - k = function(d) { + })(g || (g = {})); + m = function(f) { function b() { - v.DisplayObjectContainer.instanceConstructorNoInitialize.call(this); + k.DisplayObjectContainer.instanceConstructorNoInitialize.call(this); this._content = null; - b._rootLoader && (this._contentID = v.DisplayObject._instanceID++); - this._contentLoaderInfo = new v.LoaderInfo(v.LoaderInfo.CtorToken); + b._rootLoader && (this._contentID = k.DisplayObject._instanceID++); + this._contentLoaderInfo = new k.LoaderInfo(k.LoaderInfo.CtorToken); this._contentLoaderInfo._loader = this; + var a = l.currentAbc(); + a && (this._contentLoaderInfo._loaderUrl = a.env.loaderInfo.url); this._fileLoader = null; this._loadStatus = 0; } - __extends(b, d); + __extends(b, f); b.getRootLoader = function() { if (b._rootLoader) { return b._rootLoader; } - var a = new h.display.Loader; - h.display.DisplayObject._instanceID--; - a._contentLoaderInfo._loader = null; - return b._rootLoader = a; + var e = new a.display.Loader; + a.display.DisplayObject._instanceID--; + e._contentLoaderInfo._loader = null; + return b._rootLoader = e; }; b.reset = function() { b._loadQueue.forEach(function(a) { @@ -35320,64 +35345,98 @@ var RtmpJs; b.processLateEvents(); }; b.processEarlyEvents = function() { - for (var a = b._loadQueue, d = 0;d < a.length;d++) { - var e = a[d]; - p(3 !== e._loadStatus); - var f = e._contentLoaderInfo, k = e._imageSymbol; - if (f._file instanceof c.ImageFile) { - if (!k || !k.ready || e._queuedLoadUpdate) { + for (var a = b._loadQueue, f = 0;f < a.length;f++) { + var g = a[f], h = g._contentLoaderInfo, l = g._imageSymbol; + if (h._file instanceof d.ImageFile) { + if (!l || !l.ready || g._queuedLoadUpdate) { continue; } - p(f.bytesLoaded === f.bytesTotal); - e._applyDecodedImage(k); - p(e._content); + g._applyDecodedImage(l); + } + if (1 === g._loadStatus && g._content) { + try { + h.dispatchEvent(c.Event.getInstance(c.Event.INIT)); + } catch (k) { + console.warn("caught error under loaderInfo INIT event:", k); + } + g._loadStatus = 2; + if (g === b._rootLoader) { + try { + h.dispatchEvent(new c.ProgressEvent(c.ProgressEvent.PROGRESS, !1, !1, h.bytesLoaded, h.bytesTotal)); + } catch (m) { + console.warn("caught error under loaderInfo PROGRESS event:", m); + } + } + } + if (2 === g._loadStatus && h.bytesLoaded === h.bytesTotal) { + a.splice(f--, 1); + g._loadStatus = 3; + try { + h.dispatchEvent(c.Event.getInstance(c.Event.COMPLETE)); + } catch (p) { + console.warn("caught error under loaderInfo COMPLETE event: ", p); + } } - 1 === e._loadStatus && e._content && (f.dispatchEvent(m.Event.getInstance(m.Event.INIT)), e._loadStatus = 2, e === b._rootLoader && f.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, f.bytesLoaded, f.bytesTotal))); - 2 === e._loadStatus && f.bytesLoaded === f.bytesTotal && (a.splice(d--, 1), p(-1 === a.indexOf(e)), e._loadStatus = 3, f.dispatchEvent(m.Event.getInstance(m.Event.COMPLETE))); } }; b.processLateEvents = function() { - for (var a = b._loadQueue, d = 0;d < a.length;d++) { - var e = a[d]; - p(3 !== e._loadStatus); - var c = e._contentLoaderInfo, f = e._queuedLoadUpdate, k = c._bytesTotal; - if (f && k || 1 === e._loadStatus) { - e._queuedLoadUpdate = null, 0 === e._loadStatus && (0 === e._loadingType && c.dispatchEvent(m.Event.getInstance(m.Event.OPEN)), c.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, 0, k)), e._loadStatus = 1), f && (e._applyLoadUpdate(f), c.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, f.bytesLoaded, k))); + for (var a = b._loadQueue, f = 0;f < a.length;f++) { + var d = a[f], g = d._contentLoaderInfo, h = d._queuedLoadUpdate, l = g._bytesTotal; + if (h && l || 1 === d._loadStatus) { + d._queuedLoadUpdate = null; + if (0 === d._loadStatus) { + if (0 === d._loadingType) { + try { + g.dispatchEvent(c.Event.getInstance(c.Event.OPEN)); + } catch (k) { + console.warn("caught error under loaderInfo OPEN event: ", k); + } + } + g.dispatchEvent(new c.ProgressEvent(c.ProgressEvent.PROGRESS, !1, !1, 0, l)); + d._loadStatus = 1; + } + if (h) { + d._applyLoadUpdate(h); + try { + g.dispatchEvent(new c.ProgressEvent(c.ProgressEvent.PROGRESS, !1, !1, h.bytesLoaded, l)); + } catch (m) { + console.warn("caught error under loaderInfo PROGRESS event: ", m); + } + } } } }; b.prototype._setStage = function(a) { - p(this === b.getRootLoader()); this._stage = a; }; b.prototype._initFrame = function(a) { }; b.prototype._constructFrame = function() { - this === b.getRootLoader() && this._content ? (v.DisplayObject._advancableInstances.remove(this), this._children[0] = this._content, this._constructChildren(), this._children.length = 0) : this._constructChildren(); + this === b.getRootLoader() && this._content ? (k.DisplayObject._advancableInstances.remove(this), this._children[0] = this._content, this._constructChildren(), this._children.length = 0) : this._constructChildren(); }; b.prototype.addChild = function(a) { - u("IllegalOperationError", e.Errors.InvalidLoaderMethodError); + u("IllegalOperationError", l.Errors.InvalidLoaderMethodError); return null; }; b.prototype.addChildAt = function(a, b) { - u("IllegalOperationError", e.Errors.InvalidLoaderMethodError); + u("IllegalOperationError", l.Errors.InvalidLoaderMethodError); return null; }; b.prototype.removeChild = function(a) { - u("IllegalOperationError", e.Errors.InvalidLoaderMethodError); + u("IllegalOperationError", l.Errors.InvalidLoaderMethodError); return null; }; b.prototype.removeChildAt = function(a) { - u("IllegalOperationError", e.Errors.InvalidLoaderMethodError); + u("IllegalOperationError", l.Errors.InvalidLoaderMethodError); return null; }; b.prototype.setChildIndex = function(a, b) { - u("IllegalOperationError", e.Errors.InvalidLoaderMethodError); + u("IllegalOperationError", l.Errors.InvalidLoaderMethodError); }; b.prototype._describeData = function(a) { - var b = [], d; - for (d in a) { - b.push(d + ":" + c.StringUtilities.toSafeString(a[d])); + var b = [], c; + for (c in a) { + b.push(c + ":" + d.StringUtilities.toSafeString(a[c])); } return "{" + b.join(", ") + "}"; }; @@ -35387,34 +35446,30 @@ var RtmpJs; Object.defineProperty(b.prototype, "contentLoaderInfo", {get:function() { return this._contentLoaderInfo; }, enumerable:!0, configurable:!0}); - b.prototype._getJPEGLoaderContextdeblockingfilter = function(a) { - return h.system.JPEGLoaderContext.isType(a) ? a.deblockingFilter : 0; + b.prototype._getJPEGLoaderContextdeblockingfilter = function(b) { + return a.system.JPEGLoaderContext.isType(b) ? b.deblockingFilter : 0; }; Object.defineProperty(b.prototype, "uncaughtErrorEvents", {get:function() { return this._uncaughtErrorEvents; }, enumerable:!0, configurable:!0}); - b.prototype.load = function(d, e) { + b.prototype.load = function(a, c) { this.close(); - this._contentLoaderInfo._url = d.url; - this._applyLoaderContext(e); + this._contentLoaderInfo._url = a.url; + this._applyLoaderContext(c); this._loadingType = 0; - this._fileLoader = new t(this); - a.traceLoaderOption.value && console.log("Loading url " + d.url); - this._fileLoader.loadFile(d._toFileRequest()); + this._fileLoader = new h(this); + this._fileLoader.loadFile(a._toFileRequest()); this._queuedLoadUpdate = null; - p(-1 === b._loadQueue.indexOf(this)); b._loadQueue.push(this); }; - b.prototype.loadBytes = function(d, e) { + b.prototype.loadBytes = function(a, c) { this.close(); this._contentLoaderInfo._url = (this.loaderInfo ? this.loaderInfo._url : "") + "/[[DYNAMIC]]/" + ++b._embeddedContentLoadCount; - this._applyLoaderContext(e); + this._applyLoaderContext(c); this._loadingType = 1; - this._fileLoader = new t(this); + this._fileLoader = new h(this); this._queuedLoadUpdate = null; - a.traceLoaderOption.value && console.log("Loading embedded symbol " + this._contentLoaderInfo._url); - this._fileLoader.loadBytes(new Uint8Array(d.bytes, 0, d.length)); - p(-1 === b._loadQueue.indexOf(this)); + this._fileLoader.loadBytes(new Uint8Array(a.bytes, 0, a.length)); b._loadQueue.push(this); }; b.prototype.close = function() { @@ -35424,7 +35479,7 @@ var RtmpJs; this._fileLoader && (this._fileLoader = null); }; b.prototype._unload = function(a, b) { - 2 > this._loadStatus ? this._loadStatus = 0 : (this.close(), this._content = null, this._contentLoaderInfo._loader = null, this._loadStatus = 0, this.dispatchEvent(m.Event.getInstance(m.Event.UNLOAD))); + 2 > this._loadStatus ? this._loadStatus = 0 : (this.close(), this._content = null, this._contentLoaderInfo._loader = null, this._loadStatus = 0, this.dispatchEvent(c.Event.getInstance(c.Event.UNLOAD))); }; b.prototype.unload = function() { this._unload(!1, !1); @@ -35432,82 +35487,78 @@ var RtmpJs; b.prototype.unloadAndStop = function(a) { this._unload(!0, !!a); }; - b.prototype._applyLoaderContext = function(a) { - var b = {}; - if (a && a.parameters) { - var d = a.parameters, f; - for (f in d) { - var k = d[f]; - c.isString(k) || u("IllegalOperationError", e.Errors.ObjectWithStringsParamError, "LoaderContext.parameters"); - b[f] = k; + b.prototype._applyLoaderContext = function(b) { + var c = {}; + if (b && b.parameters) { + var f = b.parameters, g; + for (g in f) { + var h = f[g]; + d.isString(h) || u("IllegalOperationError", l.Errors.ObjectWithStringsParamError, "LoaderContext.parameters"); + c[g] = h; } } - a && a.applicationDomain && (a = new h.system.ApplicationDomain(h.system.ApplicationDomain.currentDomain), this._contentLoaderInfo._applicationDomain = a); - this._contentLoaderInfo._parameters = b; + b && b.applicationDomain && (b = new a.system.ApplicationDomain(a.system.ApplicationDomain.currentDomain), this._contentLoaderInfo._applicationDomain = b); + this._contentLoaderInfo._parameters = c; }; b.prototype.onLoadOpen = function(a) { this._contentLoaderInfo.setFile(a); }; b.prototype.onLoadProgress = function(a) { - p(a); this._queuedLoadUpdate = a; }; b.prototype.onNewEagerlyParsedSymbols = function(a, b) { - for (var d = [], e = a.length - b;e < a.length;e++) { - var c = this._contentLoaderInfo.getSymbolById(a[e].id); - c.ready || (p(c.resolveAssetPromise), p(!1 === c.ready), d.push(c.resolveAssetPromise.promise)); + for (var c = [], f = a.length - b;f < a.length;f++) { + var d = this._contentLoaderInfo.getSymbolById(a[f].id); + d.ready || c.push(d.resolveAssetPromise.promise); } - return Promise.all(d); + return Promise.all(c); }; b.prototype.onImageBytesLoaded = function() { - var a = this._contentLoaderInfo._file; - p(a instanceof c.ImageFile); - var a = {id:-1, data:a.data, mimeType:a.mimeType, dataType:a.type, type:"image"}, b = v.BitmapSymbol.FromData(a); + var a = this._contentLoaderInfo._file, a = {id:-1, data:a.data, mimeType:a.mimeType, dataType:a.type, type:"image"}, b = k.BitmapSymbol.FromData(a); this._imageSymbol = b; - e.instance.globals["Shumway.Player.Utils"].registerFontOrImage(b, a); - p(b.resolveAssetPromise); - p(!1 === b.ready); + l.instance.globals["Shumway.Player.Utils"].registerFontOrImage(b, a); }; - b.prototype._applyDecodedImage = function(a) { - a = a.createSharedInstance(); - this._content = new h.display.Bitmap(a); + b.prototype._applyDecodedImage = function(b) { + b = b.createSharedInstance(); + this._content = new a.display.Bitmap(b); this._contentLoaderInfo._width = 20 * this._content.width; this._contentLoaderInfo._height = 20 * this._content.height; this.addTimelineObjectAtDepth(this._content, 0); }; - b.prototype._applyLoadUpdate = function(a) { - var b = this._contentLoaderInfo; - b._bytesLoaded = a.bytesLoaded; - var d = b._file; - if (d instanceof n && 0 !== d.framesLoaded) { - if (b._allowCodeExecution) { - var c = e.instance.applicationDomain, f = d.abcBlocks.length; - if (0 < f - b._abcBlocksLoaded) { - for (a = b._abcBlocksLoaded;a < f;a++) { - var k = d.abcBlocks[a], m = new q(k.data, k.name); - k.flags ? c.loadAbc(m) : c.executeAbc(m); + b.prototype._applyLoadUpdate = function(b) { + var c = this._contentLoaderInfo; + c._bytesLoaded = b.bytesLoaded; + var f = c._file; + if (f instanceof s && 0 !== f.framesLoaded) { + if (c._allowCodeExecution) { + var d = l.instance.applicationDomain, g = f.abcBlocks.length; + if (0 < g - c._abcBlocksLoaded) { + for (b = c._abcBlocksLoaded;b < g;b++) { + var h = f.abcBlocks[b], k = new p(h.data, h.name); + k.env.loaderInfo = c; + h.flags ? d.loadAbc(k) : d.executeAbc(k); } - b._abcBlocksLoaded = f; + c._abcBlocksLoaded = g; } - f = d.symbolClassesList.length; - if (0 < f - b._mappedSymbolsLoaded) { - for (a = b._mappedSymbolsLoaded;a < f;a++) { - k = d.symbolClassesList[a], m = c.getClass(k.className), Object.defineProperty(m, "defaultInitializerArgument", {get:b.getSymbolResolver(m, k.id), configurable:!0}); + g = f.symbolClassesList.length; + if (0 < g - c._mappedSymbolsLoaded) { + for (b = c._mappedSymbolsLoaded;b < g;b++) { + h = f.symbolClassesList[b], k = d.getClass(h.className), Object.defineProperty(k, "defaultInitializerArgument", {get:c.getSymbolResolver(k, h.id), configurable:!0}); } - b._mappedSymbolsLoaded = f; + c._mappedSymbolsLoaded = g; } } - if (inFirefox && (c = d.fonts.length, 0 < c - b._fontsLoaded)) { - for (a = b._fontsLoaded;a < c;a++) { - h.text.Font.registerEmbeddedFont(d.fonts[a], b); + if (inFirefox && (d = f.fonts.length, 0 < d - c._fontsLoaded)) { + for (b = c._fontsLoaded;b < d;b++) { + a.text.Font.registerEmbeddedFont(f.fonts[b], c); } - b._fontsLoaded = c; + c._fontsLoaded = d; } - c = b.getRootSymbol(); - f = d.framesLoaded - c.frames.length; - if (0 !== f) { - for ((a = this._content) || (a = this.createContentRoot(c, d.sceneAndFrameLabelData)), d = a, a = 0;a < f;a++) { - k = b.getFrame(null, c.frames.length), d._addFrame(k); + d = c.getRootSymbol(); + g = f.framesLoaded - d.frames.length; + if (0 !== g) { + for ((b = this._content) || (b = this.createContentRoot(d, f.sceneAndFrameLabelData)), f = b, b = 0;b < g;b++) { + h = c.getFrame(null, d.frames.length), f._addFrame(h); } } } @@ -35515,54 +35566,53 @@ var RtmpJs; b.prototype.onLoadComplete = function() { }; b.prototype.onLoadError = function() { - c.Debug.warning("Not implemented: flash.display.Loader loading-error handling"); }; - b.prototype.createContentRoot = function(a, d) { - a.isAVM1Object && this._initAvm1(a); - var e = a.symbolClass.initializeFrom(a); - h.display.DisplayObject._instanceID--; - e._name = this === b._rootLoader ? "root1" : "instance" + this._contentID; - if (v.MovieClip.isType(e)) { - var c = e; - if (d) { - for (var f = d.scenes, k = 0, m = f.length;k < m;k++) { - var n = f[k], q = n.offset; - c.addScene(n.name, [], q, (k < m - 1 ? f[k + 1].offset : a.numFrames) - q); + b.prototype.createContentRoot = function(e, c) { + e.isAVM1Object && this._initAvm1(e); + var f = e.symbolClass.initializeFrom(e); + a.display.DisplayObject._instanceID--; + f._name = this === b._rootLoader ? "root1" : "instance" + this._contentID; + if (k.MovieClip.isType(f)) { + var d = f; + if (c) { + for (var g = c.scenes, h = 0, l = g.length;h < l;h++) { + var m = g[h], p = m.offset; + d.addScene(m.name, [], p, (h < l - 1 ? g[h + 1].offset : e.numFrames) - p); } - f = d.labels; - for (k = 0;k < f.length;k++) { - m = f[k], c.addFrameLabel(m.name, m.frame + 1); + g = c.labels; + for (h = 0;h < g.length;h++) { + l = g[h], d.addFrameLabel(l.name, l.frame + 1); } } else { - c.addScene("Scene 1", [], 0, a.numFrames); + d.addScene("Scene 1", [], 0, e.numFrames); } } - c = this._contentLoaderInfo; - e._loaderInfo = c; - k = e; - c.actionScriptVersion === l.ACTIONSCRIPT2 ? e = this._initAvm1Root(e) : this === b.getRootLoader() && (v.MovieClip.frameNavigationModel = 10 > c.swfVersion ? 9 : 10); - this._content = e; - this === b.getRootLoader() ? (b.runtimeStartTime = Date.now(), this._stage.setRoot(e)) : this.addTimelineObjectAtDepth(e, 0); - return k; + d = this._contentLoaderInfo; + f._loaderInfo = d; + h = f; + d.actionScriptVersion === t.ACTIONSCRIPT2 ? f = this._initAvm1Root(f) : this === b.getRootLoader() && (k.MovieClip.frameNavigationModel = 10 > d.swfVersion ? 9 : 10); + this._content = f; + this === b.getRootLoader() ? (b.runtimeStartTime = Date.now(), this._stage.setRoot(f)) : this.addTimelineObjectAtDepth(f, 0); + return h; }; b.prototype._initAvm1 = function(a) { - var d = this._contentLoaderInfo, e; - this.loaderInfo && this.loaderInfo._avm1Context ? e = d._avm1Context = this.loaderInfo._avm1Context : (c.AVM1.Lib.installObjectMethods(), e = c.AVM1.AVM1Context.create(d), d._avm1Context = e, this === b.getRootLoader() && (e.globals.Key._bind(this._stage, e), e.globals.Mouse._bind(this._stage, e), v.MovieClip.frameNavigationModel = 1)); - a.avm1Context = e; + var c = this._contentLoaderInfo, f; + this.loaderInfo && this.loaderInfo._avm1Context ? f = c._avm1Context = this.loaderInfo._avm1Context : (d.AVM1.Lib.installObjectMethods(), f = d.AVM1.AVM1Context.create(c), c._avm1Context = f, this === b.getRootLoader() && (f.globals.Key._bind(this._stage, f), f.globals.Mouse._bind(this._stage, f), k.MovieClip.frameNavigationModel = 1)); + a.avm1Context = f; }; - b.prototype._initAvm1Root = function(a) { - var b = this._contentLoaderInfo._avm1Context, d = c.AVM1.Lib.getAVM1Object(a, b); + b.prototype._initAvm1Root = function(b) { + var c = this._contentLoaderInfo._avm1Context, f = d.AVM1.Lib.getAVM1Object(b, c); if (this.loaderInfo && this.loaderInfo._avm1Context) { - return d.context = this.loaderInfo._avm1Context, a; + return f.context = this.loaderInfo._avm1Context, b; } - b.root = d; - a.addEventListener("frameConstructed", b.flushPendingScripts.bind(b), !1, Number.MAX_VALUE); - a = new h.display.AVM1Movie(a); - var b = this._contentLoaderInfo._parameters, e; - for (e in b) { - e in d || (d[e] = b[e]); + c.root = f; + b.addEventListener("frameConstructed", c.flushPendingScripts.bind(c), !1, Number.MAX_VALUE); + b = new a.display.AVM1Movie(b); + var c = this._contentLoaderInfo._parameters, g; + for (g in c) { + g in f || (f[g] = c[g]); } - return a; + return b; }; b.classInitializer = function() { b._rootLoader = null; @@ -35571,32 +35621,33 @@ var RtmpJs; b._embeddedContentLoadCount = 0; }; b.initializer = function() { - v.DisplayObject._advancableInstances.push(this); + k.DisplayObject._advancableInstances.push(this); }; b.classSymbols = null; b.instanceSymbols = null; return b; - }(h.display.DisplayObjectContainer); - v.Loader = k; - })(h.display || (h.display = {})); + }(a.display.DisplayObjectContainer); + k.Loader = m; + })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.assert, u = c.Debug.notImplemented, l = c.Debug.somewhatImplemented, e = c.SWF.SWFFile, m = function(m) { - function q(e) { - e !== q.CtorToken && throwError("ArgumentError", h.Errors.CantInstantiateError, "LoaderInfo$"); + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.SWF.SWFFile, c = function(c) { + function p(c) { + c !== p.CtorToken && throwError("ArgumentError", k.Errors.CantInstantiateError, "LoaderInfo$"); a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this._loader = null; + this._loaderUrl = ""; this.reset(); } - __extends(q, m); - q.prototype.reset = function() { + __extends(p, c); + p.prototype.reset = function() { this._url = ""; this._file = null; this._bytesTotal = this._bytesLoaded = 0; @@ -35608,215 +35659,212 @@ var RtmpJs; this._fontsLoaded = this._mappedSymbolsLoaded = this._abcBlocksLoaded = 0; this._avm1Context = null; }; - q.prototype.setFile = function(a) { - p(!this._file); + p.prototype.setFile = function(a) { this._file = a; this._bytesTotal = a.bytesTotal; - a instanceof e ? (a = a.bounds, this._width = a.xMax - a.xMin, this._height = a.yMax - a.yMin) : p(a instanceof c.ImageFile); + a instanceof l && (a = a.bounds, this._width = a.xMax - a.xMin, this._height = a.yMax - a.yMin); }; - q.getLoaderInfoByDefinition = function(a) { + p.getLoaderInfoByDefinition = function(a) { u("public flash.display.LoaderInfo::static getLoaderInfoByDefinition"); }; - Object.defineProperty(q.prototype, "loaderURL", {get:function() { - return this._loader.loaderInfo.url; + Object.defineProperty(p.prototype, "loaderURL", {get:function() { + if (!this._loader) { + var a = d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"]; + return this._url === a.swfUrl && a.loaderUrl || this._url; + } + return this._loaderUrl; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "url", {get:function() { + Object.defineProperty(p.prototype, "url", {get:function() { return this._file ? this._url : null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "isURLInaccessible", {get:function() { - l("public flash.display.LoaderInfo::get isURLInaccessible"); + Object.defineProperty(p.prototype, "isURLInaccessible", {get:function() { + t("public flash.display.LoaderInfo::get isURLInaccessible"); return this._file ? !1 : !0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "bytesLoaded", {get:function() { + Object.defineProperty(p.prototype, "bytesLoaded", {get:function() { return this._bytesLoaded; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "bytesTotal", {get:function() { + Object.defineProperty(p.prototype, "bytesTotal", {get:function() { return this._bytesTotal; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "applicationDomain", {get:function() { - l("public flash.display.LoaderInfo::get applicationDomain"); + Object.defineProperty(p.prototype, "applicationDomain", {get:function() { + t("public flash.display.LoaderInfo::get applicationDomain"); return this._file ? a.system.ApplicationDomain.currentDomain : null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "swfVersion", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError); + Object.defineProperty(p.prototype, "swfVersion", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + this._file instanceof l || throwError("Error", k.Errors.LoadingObjectNotSWFError); return this._file.swfVersion; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "actionScriptVersion", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError); + Object.defineProperty(p.prototype, "actionScriptVersion", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + this._file instanceof l || throwError("Error", k.Errors.LoadingObjectNotSWFError); return this._file.useAVM1 ? v.ActionScriptVersion.ACTIONSCRIPT2 : v.ActionScriptVersion.ACTIONSCRIPT3; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "frameRate", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError); + Object.defineProperty(p.prototype, "frameRate", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + this._file instanceof l || throwError("Error", k.Errors.LoadingObjectNotSWFError); return this._file.frameRate; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "width", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); + Object.defineProperty(p.prototype, "width", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); return this._width / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "height", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); + Object.defineProperty(p.prototype, "height", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); return this._height / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "contentType", {get:function() { - return this._file ? this._file instanceof c.ImageFile ? this._file.mimeType : "application/x-shockwave-flash" : null; + Object.defineProperty(p.prototype, "contentType", {get:function() { + return this._file ? this._file instanceof d.ImageFile ? this._file.mimeType : "application/x-shockwave-flash" : null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "sharedEvents", {get:function() { - l("public flash.display.LoaderInfo::get sharedEvents"); + Object.defineProperty(p.prototype, "sharedEvents", {get:function() { + t("public flash.display.LoaderInfo::get sharedEvents"); this._sharedEvents || (this._sharedEvents = new a.events.EventDispatcher); return this._sharedEvents; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "parentSandboxBridge", {get:function() { - l("public flash.display.LoaderInfo::get parentSandboxBridge"); + Object.defineProperty(p.prototype, "parentSandboxBridge", {get:function() { + t("public flash.display.LoaderInfo::get parentSandboxBridge"); return this._parentSandboxBridge; }, set:function(a) { - l("public flash.display.LoaderInfo::set parentSandboxBridge"); + t("public flash.display.LoaderInfo::set parentSandboxBridge"); this._parentSandboxBridge = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "childSandboxBridge", {get:function() { - l("public flash.display.LoaderInfo::get childSandboxBridge"); + Object.defineProperty(p.prototype, "childSandboxBridge", {get:function() { + t("public flash.display.LoaderInfo::get childSandboxBridge"); return this._childSandboxBridge; }, set:function(a) { - l("public flash.display.LoaderInfo::set childSandboxBridge"); + t("public flash.display.LoaderInfo::set childSandboxBridge"); this._childSandboxBridge = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "sameDomain", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - l("public flash.display.LoaderInfo::get sameDomain"); + Object.defineProperty(p.prototype, "sameDomain", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + t("public flash.display.LoaderInfo::get sameDomain"); return!0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "childAllowsParent", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - l("public flash.display.LoaderInfo::get childAllowsParent"); + Object.defineProperty(p.prototype, "childAllowsParent", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + t("public flash.display.LoaderInfo::get childAllowsParent"); return!0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "parentAllowsChild", {get:function() { - this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError); - l("public flash.display.LoaderInfo::get parentAllowsChild"); + Object.defineProperty(p.prototype, "parentAllowsChild", {get:function() { + this._file || throwError("Error", k.Errors.LoadingObjectNotInitializedError); + t("public flash.display.LoaderInfo::get parentAllowsChild"); return!0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "loader", {get:function() { + Object.defineProperty(p.prototype, "loader", {get:function() { return this._loader; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "content", {get:function() { + Object.defineProperty(p.prototype, "content", {get:function() { return this._loader && this._loader.content; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "bytes", {get:function() { + Object.defineProperty(p.prototype, "bytes", {get:function() { if (!this._file) { return new a.utils.ByteArray; } u("public flash.display.LoaderInfo::get bytes"); return null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "parameters", {get:function() { - l("public flash.display.LoaderInfo::get parameters"); - return this._parameters ? c.ObjectUtilities.cloneObject(this._parameters) : {}; + Object.defineProperty(p.prototype, "parameters", {get:function() { + t("public flash.display.LoaderInfo::get parameters"); + return this._parameters ? d.ObjectUtilities.cloneObject(this._parameters) : {}; }, enumerable:!0, configurable:!0}); - Object.defineProperty(q.prototype, "uncaughtErrorEvents", {get:function() { - l("public flash.display.LoaderInfo::_getUncaughtErrorEvents"); + Object.defineProperty(p.prototype, "uncaughtErrorEvents", {get:function() { + t("public flash.display.LoaderInfo::_getUncaughtErrorEvents"); this._uncaughtErrorEvents || (this._uncaughtErrorEvents = new a.events.UncaughtErrorEvents); return this._uncaughtErrorEvents; }, enumerable:!0, configurable:!0}); - q.prototype.getSymbolResolver = function(a, e) { - return this.resolveClassSymbol.bind(this, a, e); + p.prototype.getSymbolResolver = function(a, c) { + return this.resolveClassSymbol.bind(this, a, c); }; - q.prototype.getSymbolById = function(m) { - var k = this._dictionary[m]; - if (k) { - return!1 === k.ready ? (c.Debug.warning("Accessing symbol that's not yet ready."), null) : k; + p.prototype.getSymbolById = function(c) { + var h = this._dictionary[c]; + if (h) { + return!1 === h.ready ? null : h; } - p(this._file instanceof e); - var f = this._file.getSymbol(m); - if (!f) { - return 65535 !== m && c.Debug.warning("Unknown symbol requested: " + m), null; + var g = this._file.getSymbol(c); + if (!g) { + return null; } - switch(f.type) { + switch(g.type) { case "shape": - k = a.display.ShapeSymbol.FromData(f, this); + h = a.display.ShapeSymbol.FromData(g, this); break; case "morphshape": - k = a.display.MorphShapeSymbol.FromData(f, this); + h = a.display.MorphShapeSymbol.FromData(g, this); break; case "image": - f.definition && (f = f.definition); - k = a.display.BitmapSymbol.FromData(f); + g.definition && (g = g.definition); + h = a.display.BitmapSymbol.FromData(g); break; case "label": - k = a.text.TextSymbol.FromLabelData(f, this); + h = a.text.TextSymbol.FromLabelData(g, this); break; case "text": - k = a.text.TextSymbol.FromTextData(f, this); - this._syncAVM1Attributes(k); + h = a.text.TextSymbol.FromTextData(g, this); + this._syncAVM1Attributes(h); break; case "button": - k = a.display.ButtonSymbol.FromData(f, this); - this._syncAVM1Attributes(k); + h = a.display.ButtonSymbol.FromData(g, this); + this._syncAVM1Attributes(h); break; case "sprite": - k = a.display.SpriteSymbol.FromData(f, this); + h = a.display.SpriteSymbol.FromData(g, this); break; case "font": - f.definition && (f = f.definition); - var k = a.text.FontSymbol.FromData(f), d = a.text.Font.initializeFrom(k); - a.text.Font.instanceConstructorNoInitialize.call(d); + g.definition && (g = g.definition); + var h = a.text.FontSymbol.FromData(g), f = a.text.Font.initializeFrom(h); + a.text.Font.instanceConstructorNoInitialize.call(f); break; case "sound": - k = a.media.SoundSymbol.FromData(f); + h = a.media.SoundSymbol.FromData(g); break; case "binary": - k = c.Timeline.BinarySymbol.FromData(f); + h = d.Timeline.BinarySymbol.FromData(g); } - p(k, "Unknown symbol type " + f.type); - this._dictionary[m] = k; - !1 === k.ready && h.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].registerFontOrImage(k, f); - return k; + this._dictionary[c] = h; + !1 === h.ready && k.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].registerFontOrImage(h, g); + return h; }; - q.prototype.getRootSymbol = function() { - p(this._file instanceof e); - p(0 < this._file.framesLoaded); + p.prototype.getRootSymbol = function() { var c = this._dictionary[0]; c || (c = new a.display.SpriteSymbol({id:0, className:this._file.symbolClassesMap[0]}, this), c.isRoot = !0, c.numFrames = this._file.frameCount, this._syncAVM1Attributes(c), this._dictionary[0] = c); return c; }; - q.prototype._syncAVM1Attributes = function(a) { + p.prototype._syncAVM1Attributes = function(a) { this.actionScriptVersion === v.ActionScriptVersion.ACTIONSCRIPT2 && (a.isAVM1Object = !0, a.avm1Context = this._avm1Context); }; - q.prototype.getFrame = function(a, c) { - var f = this._file; - p(f instanceof e); - a || (a = f); + p.prototype.getFrame = function(a, c) { + var d = this._file; + a || (a = d); return a.frames[c]; }; - q.prototype.resolveClassSymbol = function(a, e) { - var f = this.getSymbolById(e); - if (f) { - return Object.defineProperty(a, "defaultInitializerArgument", {value:f}), f; + p.prototype.resolveClassSymbol = function(a, c) { + var d = this.getSymbolById(c); + if (d) { + return Object.defineProperty(a, "defaultInitializerArgument", {value:d}), d; } - c.Debug.warning("Attempt to resolve symbol for AVM2 class failed: Symbol " + e + " not found."); }; - q.classInitializer = null; - q.initializer = null; - q.classSymbols = null; - q.instanceSymbols = null; - q.CtorToken = {}; - return q; + p.classInitializer = null; + p.initializer = null; + p.classSymbols = null; + p.instanceSymbols = null; + p.CtorToken = {}; + return p; }(a.events.EventDispatcher); - v.LoaderInfo = m; + v.LoaderInfo = c; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(c) { - var h = function(a) { + (function(d) { + var k = function(a) { function l() { - c.DisplayObject.instanceConstructorNoInitialize.call(this); + d.DisplayObject.instanceConstructorNoInitialize.call(this); } __extends(l, a); l.prototype._canHaveGraphics = function() { @@ -35828,8 +35876,8 @@ var RtmpJs; Object.defineProperty(l.prototype, "graphics", {get:function() { return this._ensureGraphics(); }, enumerable:!0, configurable:!0}); - l.prototype._containsPointDirectly = function(a, c, l, h) { - return(l = this._getGraphics()) && l._containsPoint(a, c, !0, this._ratio / 65535); + l.prototype._containsPointDirectly = function(a, d, l, k) { + return(l = this._getGraphics()) && l._containsPoint(a, d, !0, this._ratio / 65535); }; l.classSymbols = null; l.instanceSymbols = null; @@ -35841,924 +35889,922 @@ var RtmpJs; }; return l; }(a.display.DisplayObject); - c.MorphShape = h; - h = function(c) { - function l(e) { - c.call(this, e, a.display.MorphShape); + d.MorphShape = k; + k = function(d) { + function l(c) { + d.call(this, c, a.display.MorphShape); } - __extends(l, c); - l.FromData = function(e, c) { - var h = new l(e); - h._setBoundsFromData(e); - h.graphics = a.display.Graphics.FromData(e); - h.processRequires(e.require, c); - h.morphFillBounds = e.morphFillBounds; - h.morphLineBounds = e.morphLineBounds; - return h; + __extends(l, d); + l.FromData = function(c, d) { + var k = new l(c); + k._setBoundsFromData(c); + k.graphics = a.display.Graphics.FromData(c); + k.processRequires(c.require, d); + k.morphFillBounds = c.morphFillBounds; + k.morphLineBounds = c.morphLineBounds; + return k; }; return l; }(a.display.ShapeSymbol); - c.MorphShapeSymbol = h; + d.MorphShapeSymbol = k; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(c) { - var h = function(c) { + (function(d) { + var k = function(d) { function l() { a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); } - __extends(l, c); + __extends(l, d); l.classInitializer = null; l.initializer = null; l.classSymbols = null; l.instanceSymbols = null; return l; }(a.events.EventDispatcher); - c.NativeMenu = h; + d.NativeMenu = k; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.somewhatImplemented, u = function(c) { - function e() { + (function(k) { + var u = d.Debug.somewhatImplemented, t = function(d) { + function c() { a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this._enabled = !0; } - __extends(e, c); - Object.defineProperty(e.prototype, "enabled", {get:function() { - p("public flash.display.NativeMenuItem::get enabled"); + __extends(c, d); + Object.defineProperty(c.prototype, "enabled", {get:function() { + u("public flash.display.NativeMenuItem::get enabled"); return this._enabled; }, set:function(a) { a = !!a; - p("public flash.display.NativeMenuItem::set enabled"); + u("public flash.display.NativeMenuItem::set enabled"); this._enabled = a; }, enumerable:!0, configurable:!0}); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.events.EventDispatcher); - h.NativeMenuItem = u; + k.NativeMenuItem = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e(a) { - s("public flash.display.PNGEncoderOptions"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a) { + r("public flash.display.PNGEncoderOptions"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - h.PNGEncoderOptions = u; - })(h.display || (h.display = {})); + k.PNGEncoderOptions = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.PixelSnapping"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.PixelSnapping"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.NEVER; + return c.NEVER; case 1: - return e.ALWAYS; + return c.ALWAYS; case 2: - return e.AUTO; + return c.AUTO; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.NEVER: + case c.NEVER: return 0; - case e.ALWAYS: + case c.ALWAYS: return 1; - case e.AUTO: + case c.AUTO: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.NEVER = "never"; - e.ALWAYS = "always"; - e.AUTO = "auto"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.NEVER = "never"; + c.ALWAYS = "always"; + c.AUTO = "auto"; + return c; }(a.ASNative); - h.PixelSnapping = u; - })(h.display || (h.display = {})); + k.PixelSnapping = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.SWFVersion"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.SWFVersion"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.FLASH1 = 1; - e.FLASH2 = 2; - e.FLASH3 = 3; - e.FLASH4 = 4; - e.FLASH5 = 5; - e.FLASH6 = 6; - e.FLASH7 = 7; - e.FLASH8 = 8; - e.FLASH9 = 9; - e.FLASH10 = 10; - e.FLASH11 = 11; - e.FLASH12 = 12; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.FLASH1 = 1; + c.FLASH2 = 2; + c.FLASH3 = 3; + c.FLASH4 = 4; + c.FLASH5 = 5; + c.FLASH6 = 6; + c.FLASH7 = 7; + c.FLASH8 = 8; + c.FLASH9 = 9; + c.FLASH10 = 10; + c.FLASH11 = 11; + c.FLASH12 = 12; + return c; }(a.ASNative); - h.SWFVersion = u; - })(h.display || (h.display = {})); + k.SWFVersion = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e, c, l) { - this._name = s(a); - this._labels = e; - this.offset = c; + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d, l) { + this._name = r(a); + this._labels = c; + this.offset = d; this._numFrames = l | 0; } - __extends(e, a); - Object.defineProperty(e.prototype, "name", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "name", {get:function() { return this._name; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "labels", {get:function() { + Object.defineProperty(c.prototype, "labels", {get:function() { return this._labels; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "numFrames", {get:function() { + Object.defineProperty(c.prototype, "numFrames", {get:function() { return this._numFrames; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { + c.prototype.clone = function() { var a = this._labels.map(function(a) { return a.clone(); }); - return new e(this._name, a, this.offset, this._numFrames); + return new c(this._name, a, this.offset, this._numFrames); }; - e.prototype.getLabelByName = function(a, e) { - e && (a = a.toLowerCase()); - for (var c = this._labels, l = 0;l < c.length;l++) { - var k = c[l]; - if (e ? k.name.toLowerCase() === a : k.name === a) { - return k; + c.prototype.getLabelByName = function(a, c) { + c && (a = a.toLowerCase()); + for (var d = this._labels, l = 0;l < d.length;l++) { + var g = d[l]; + if (c ? g.name.toLowerCase() === a : g.name === a) { + return g; } } return null; }; - e.prototype.getLabelByFrame = function(a) { - for (var e = this._labels, c = 0;c < e.length;c++) { - var l = e[c]; + c.prototype.getLabelByFrame = function(a) { + for (var c = this._labels, d = 0;d < c.length;d++) { + var l = c[d]; if (l.frame === a) { return l; } } return null; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - h.Scene = u; - })(h.display || (h.display = {})); + k.Scene = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.StageAlign"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.StageAlign"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { if (0 === a) { return ""; } - var e = ""; - a & 1 && (e += "T"); - a & 2 && (e += "B"); - a & 4 && (e += "L"); - a & 8 && (e += "R"); - return e; + var c = ""; + a & 1 && (c += "T"); + a & 2 && (c += "B"); + a & 4 && (c += "L"); + a & 8 && (c += "R"); + return c; }; - e.toNumber = function(a) { - var e = 0; + c.toNumber = function(a) { + var c = 0; a = a.toUpperCase(); - 0 <= a.indexOf("T") && (e |= 1); - 0 <= a.indexOf("B") && (e |= 2); - 0 <= a.indexOf("L") && (e |= 4); - 0 <= a.indexOf("R") && (e |= 8); - return e; + 0 <= a.indexOf("T") && (c |= 1); + 0 <= a.indexOf("B") && (c |= 2); + 0 <= a.indexOf("L") && (c |= 4); + 0 <= a.indexOf("R") && (c |= 8); + return c; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.TOP = "T"; - e.LEFT = "L"; - e.BOTTOM = "B"; - e.RIGHT = "R"; - e.TOP_LEFT = "TL"; - e.TOP_RIGHT = "TR"; - e.BOTTOM_LEFT = "BL"; - e.BOTTOM_RIGHT = "BR"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.TOP = "T"; + c.LEFT = "L"; + c.BOTTOM = "B"; + c.RIGHT = "R"; + c.TOP_LEFT = "TL"; + c.TOP_RIGHT = "TR"; + c.BOTTOM_LEFT = "BL"; + c.BOTTOM_RIGHT = "BR"; + return c; }(a.ASNative); - h.StageAlign = u; - })(h.display || (h.display = {})); + k.StageAlign = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.StageDisplayState"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.StageDisplayState"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.FULL_SCREEN; + return c.FULL_SCREEN; case 1: - return e.FULL_SCREEN_INTERACTIVE; + return c.FULL_SCREEN_INTERACTIVE; case 2: - return e.NORMAL; + return c.NORMAL; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.FULL_SCREEN: + case c.FULL_SCREEN: return 0; - case e.FULL_SCREEN_INTERACTIVE: + case c.FULL_SCREEN_INTERACTIVE: return 1; - case e.NORMAL: + case c.NORMAL: return 2; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.FULL_SCREEN = "fullScreen"; - e.FULL_SCREEN_INTERACTIVE = "fullScreenInteractive"; - e.NORMAL = "normal"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.FULL_SCREEN = "fullScreen"; + c.FULL_SCREEN_INTERACTIVE = "fullScreenInteractive"; + c.NORMAL = "normal"; + return c; }(a.ASNative); - h.StageDisplayState = u; - })(h.display || (h.display = {})); + k.StageDisplayState = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.StageQuality"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.StageQuality"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.LOW; + return c.LOW; case 1: - return e.MEDIUM; + return c.MEDIUM; case 2: - return e.HIGH; + return c.HIGH; case 3: - return e.BEST; + return c.BEST; case 4: - return e.HIGH_8X8; + return c.HIGH_8X8; case 5: - return e.HIGH_8X8_LINEAR; + return c.HIGH_8X8_LINEAR; case 6: - return e.HIGH_16X16; + return c.HIGH_16X16; case 7: - return e.HIGH_16X16_LINEAR; + return c.HIGH_16X16_LINEAR; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a) { - case e.LOW: + case c.LOW: return 0; - case e.MEDIUM: + case c.MEDIUM: return 1; - case e.HIGH: + case c.HIGH: return 2; - case e.BEST: + case c.BEST: return 3; - case e.HIGH_8X8: + case c.HIGH_8X8: return 4; - case e.HIGH_8X8_LINEAR: + case c.HIGH_8X8_LINEAR: return 5; - case e.HIGH_16X16: + case c.HIGH_16X16: return 6; - case e.HIGH_16X16_LINEAR: + case c.HIGH_16X16_LINEAR: return 7; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.LOW = "low"; - e.MEDIUM = "medium"; - e.HIGH = "high"; - e.BEST = "best"; - e.HIGH_8X8 = "8x8"; - e.HIGH_8X8_LINEAR = "8x8linear"; - e.HIGH_16X16 = "16x16"; - e.HIGH_16X16_LINEAR = "16x16linear"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.LOW = "low"; + c.MEDIUM = "medium"; + c.HIGH = "high"; + c.BEST = "best"; + c.HIGH_8X8 = "8x8"; + c.HIGH_8X8_LINEAR = "8x8linear"; + c.HIGH_16X16 = "16x16"; + c.HIGH_16X16_LINEAR = "16x16linear"; + return c; }(a.ASNative); - h.StageQuality = u; - })(h.display || (h.display = {})); + k.StageQuality = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.StageScaleMode"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.StageScaleMode"); } - __extends(e, a); - e.fromNumber = function(a) { + __extends(c, a); + c.fromNumber = function(a) { switch(a) { case 0: - return e.SHOW_ALL; + return c.SHOW_ALL; case 1: - return e.EXACT_FIT; + return c.EXACT_FIT; case 2: - return e.NO_BORDER; + return c.NO_BORDER; case 4: - return e.NO_SCALE; + return c.NO_SCALE; default: return null; } }; - e.toNumber = function(a) { + c.toNumber = function(a) { switch(a.toLowerCase()) { - case e.SHOW_ALL_LOWERCASE: + case c.SHOW_ALL_LOWERCASE: return 0; - case e.EXACT_FIT_LOWERCASE: + case c.EXACT_FIT_LOWERCASE: return 1; - case e.NO_BORDER_LOWERCASE: + case c.NO_BORDER_LOWERCASE: return 2; - case e.NO_SCALE_LOWERCASE: + case c.NO_SCALE_LOWERCASE: return 4; default: return-1; } }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.SHOW_ALL = "showAll"; - e.EXACT_FIT = "exactFit"; - e.NO_BORDER = "noBorder"; - e.NO_SCALE = "noScale"; - e.SHOW_ALL_LOWERCASE = "showall"; - e.EXACT_FIT_LOWERCASE = "exactfit"; - e.NO_BORDER_LOWERCASE = "noborder"; - e.NO_SCALE_LOWERCASE = "noscale"; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.SHOW_ALL = "showAll"; + c.EXACT_FIT = "exactFit"; + c.NO_BORDER = "noBorder"; + c.NO_SCALE = "noScale"; + c.SHOW_ALL_LOWERCASE = "showall"; + c.EXACT_FIT_LOWERCASE = "exactfit"; + c.NO_BORDER_LOWERCASE = "noborder"; + c.NO_SCALE_LOWERCASE = "noscale"; + return c; }(a.ASNative); - h.StageScaleMode = u; - })(h.display || (h.display = {})); + k.StageScaleMode = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.display.TriangleCulling"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.display.TriangleCulling"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.NONE = "none"; - e.POSITIVE = "positive"; - e.NEGATIVE = "negative"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.NONE = "none"; + c.POSITIVE = "positive"; + c.NEGATIVE = "negative"; + return c; }(a.ASNative); - h.TriangleCulling = u; - })(h.display || (h.display = {})); + k.TriangleCulling = t; + })(k.display || (k.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = function(c) { - function e(e) { + (function(k) { + var u = d.Debug.notImplemented, t = function(d) { + function c(c) { a.display.DisplayObject.instanceConstructorNoInitialize.call(this); this._children = []; - this._children[0] = this._content = e; - e._setParent(this, 0); + this._children[0] = this._content = c; + c._setParent(this, 0); this._setDirtyFlags(2097152); this._invalidateFillAndLineBounds(!0, !0); - h.DisplayObject._advancableInstances.push(this); + k.DisplayObject._advancableInstances.push(this); this._constructed = !1; } - __extends(e, c); - e.prototype.call = function(a) { - p("AVM1Movie#call"); + __extends(c, d); + c.prototype.call = function(a) { + u("AVM1Movie#call"); }; - e.prototype.addCallback = function(a, e) { - p("AVM1Movie#call"); + c.prototype.addCallback = function(a, c) { + u("AVM1Movie#call"); }; - e.prototype._initFrame = function(a) { + c.prototype._initFrame = function(a) { }; - e.prototype._constructFrame = function() { - this._constructed || (this._constructed = !0, h.DisplayObjectContainer.prototype._constructChildren.call(this)); + c.prototype._constructFrame = function() { + this._constructed || (this._constructed = !0, k.DisplayObjectContainer.prototype._constructChildren.call(this)); this._content._constructFrame(); }; - e.prototype._enqueueFrameScripts = function() { + c.prototype._enqueueFrameScripts = function() { this._removeFlags(16384); this._content._enqueueFrameScripts(); }; - e.prototype._propagateFlagsDown = function(a) { + c.prototype._propagateFlagsDown = function(a) { this._hasFlags(a) || (this._setFlags(a), this._content._propagateFlagsDown(a)); }; - e.prototype._containsPoint = function(a, e, c, l, k, f) { - return 3 === k ? this._content._containsPoint(a, e, c, l, k, f) : 0 === k && this._getContentBounds().contains(c, l) ? 1 : 0; + c.prototype._containsPoint = function(a, c, d, l, g, f) { + return 3 === g ? this._content._containsPoint(a, c, d, l, g, f) : 0 === g && this._getContentBounds().contains(d, l) ? 1 : 0; }; - e.prototype._getChildBounds = function(a, e) { - var c = this._content._getContentBounds(e).clone(); - this._getConcatenatedMatrix().transformBounds(c); - a.unionInPlace(c); + c.prototype._getChildBounds = function(a, c) { + var d = this._content._getContentBounds(c).clone(); + this._getConcatenatedMatrix().transformBounds(d); + a.unionInPlace(d); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.display.DisplayObject); - h.AVM1Movie = u; + k.AVM1Movie = t; })(a.display || (a.display = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a, e) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a, c) { void 0 === a && (a = ""); - u(a); - s("public flash.errors.IllegalOperationError"); + t(a); + r("public flash.errors.IllegalOperationError"); } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASError); - h.IllegalOperationError = l; - })(h.errors || (h.errors = {})); + k.IllegalOperationError = l; + })(k.errors || (k.errors = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = c.Telemetry, e = c.AVM2.Runtime.forEachPublicProperty, m = c.ExternalInterfaceService, t = function(c) { - function h() { - s("public flash.external.ExternalInterface"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = d.Telemetry, c = d.AVM2.Runtime.forEachPublicProperty, h = d.ExternalInterfaceService, p = function(d) { + function k() { + r("public flash.external.ExternalInterface"); } - __extends(h, c); - h._getAvailable = function() { - return m.instance.enabled; + __extends(k, d); + k._getAvailable = function() { + return h.instance.enabled; }; - h._initJS = function() { - h.initialized || (l.instance.reportTelemetry({topic:"feature", feature:1}), h.initialized = !0, m.instance.initJS(h._callIn)); + k._initJS = function() { + k.initialized || (l.instance.reportTelemetry({topic:"feature", feature:1}), k.initialized = !0, h.instance.initJS(k._callIn)); }; - h._callIn = function(e, c) { - var d = h.registeredCallbacks[e]; - if (d) { - return d(e, a.ASJSON.transformJSValueToAS(c, !0)); + k._callIn = function(c, f) { + var b = k.registeredCallbacks[c]; + if (b) { + return b(c, a.ASJSON.transformJSValueToAS(f, !0)); } }; - h._getPropNames = function(a) { - var c = []; - e(a, function(a) { - c.push(a); + k._getPropNames = function(a) { + var f = []; + c(a, function(a) { + f.push(a); }, null); - return c; + return f; }; - h._addCallback = function(a, e, d) { - d ? (m.instance.unregisterCallback(a), delete h.registeredCallbacks[a]) : (m.instance.registerCallback(a), h.registeredCallbacks[a] = e); + k._addCallback = function(a, c, b) { + b ? (h.instance.unregisterCallback(a), delete k.registeredCallbacks[a]) : (h.instance.registerCallback(a), k.registeredCallbacks[a] = c); }; - h._evalJS = function(a) { - a = u(a); - return m.instance.eval(a); + k._evalJS = function(a) { + a = t(a); + return h.instance.eval(a); }; - h._callOut = function(a) { - a = u(a); - return m.instance.call(a); + k._callOut = function(a) { + a = t(a); + return h.instance.call(a); }; - Object.defineProperty(h, "available", {get:function() { - return h._getAvailable(); + Object.defineProperty(k, "available", {get:function() { + return k._getAvailable(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h, "objectID", {get:function() { - return m.instance.getId(); + Object.defineProperty(k, "objectID", {get:function() { + return h.instance.getId(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h, "activeX", {get:function() { + Object.defineProperty(k, "activeX", {get:function() { return!1; }, enumerable:!0, configurable:!0}); - h.classInitializer = null; - h.initializer = null; - h.classSymbols = null; - h.instanceSymbols = null; - h.initialized = !1; - h.registeredCallbacks = Object.create(null); - return h; + k.classInitializer = null; + k.initializer = null; + k.classSymbols = null; + k.instanceSymbols = null; + k.initialized = !1; + k.registeredCallbacks = Object.create(null); + return k; }(a.ASNative); - h.ExternalInterface = t; - })(h.external || (h.external = {})); + k.ExternalInterface = p; + })(k.external || (k.external = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.LOW = 1; - c.MEDIUM = 2; - c.HIGH = 3; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.LOW = 1; + d.MEDIUM = 2; + d.HIGH = 3; + return d; }(a.ASNative); - c.BitmapFilterQuality = h; - })(c.filters || (c.filters = {})); + d.BitmapFilterQuality = k; + })(d.filters || (d.filters = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.INNER = "inner"; - c.OUTER = "outer"; - c.FULL = "full"; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.INNER = "inner"; + d.OUTER = "outer"; + d.FULL = "full"; + return d; }(a.ASNative); - c.BitmapFilterType = h; - })(c.filters || (c.filters = {})); + d.BitmapFilterType = k; + })(d.filters || (d.filters = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = function(a) { - function c() { + (function(k) { + (function(k) { + var r = function(a) { + function d() { } - __extends(c, a); - c._updateBlurBounds = function(a, m, h, q, n) { - void 0 === n && (n = !1); - q = c.blurFilterStepWidths[q - 1]; - n && (n = q / 4, m -= n, h -= n); - a.inflate(Math.ceil((1 > m ? 1 : m) * q), Math.ceil((1 > h ? 1 : h) * q)); + __extends(d, a); + d._updateBlurBounds = function(a, h, k, s, m) { + void 0 === m && (m = !1); + s = d.blurFilterStepWidths[s - 1]; + m && (m = s / 4, h -= m, k -= m); + a.inflate(Math.ceil((1 > h ? 1 : h) * s), Math.ceil((1 > k ? 1 : k) * s)); }; - c.prototype._updateFilterBounds = function(a) { + d.prototype._updateFilterBounds = function(a) { }; - c.prototype._serialize = function(a) { + d.prototype._serialize = function(a) { a.writeInt(-1); }; - c.prototype.clone = function() { + d.prototype.clone = function() { return null; }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.EPS = 1E-9; - c.blurFilterStepWidths = [.5, 1.05, 1.35, 1.55, 1.75, 1.9, 2, 2.1, 2.2, 2.3, 2.5, 3, 3, 3.5, 3.5]; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.EPS = 1E-9; + d.blurFilterStepWidths = [.5, 1.05, 1.35, 1.55, 1.75, 1.9, 2, 2.1, 2.2, 2.3, 2.5, 3, 3, 3.5, 3.5]; + return d; }(a.ASNative); - h.BitmapFilter = s; - s = function() { + k.BitmapFilter = r; + r = function() { function a() { } - a.sanitize = function(a, e, m) { - if (c.isNullOrUndefined(a) || 0 === a.length) { + a.sanitize = function(a, c, h) { + if (d.isNullOrUndefined(a) || 0 === a.length) { this.colors = [], this.alphas = [], this.ratios = []; } else { - var h; - c.isNullOrUndefined(m) ? (this.colors = this.sanitizeColors(a), h = this.colors.length, this.ratios = this.initArray(h), c.isNullOrUndefined(e) ? this.alphas = this.initArray(h) : this.alphas = this.sanitizeAlphas(e, h, h, 1)) : 0 === m.length ? (this.colors = [], this.alphas = [], this.ratios = []) : (h = Math.min(a.length, m.length, 16), this.colors = this.sanitizeColors(a, h), this.ratios = this.sanitizeRatios(m, h), c.isNullOrUndefined(e) ? this.alphas = this.initArray(h) : this.alphas = - this.sanitizeAlphas(e, h, h, 1)); + var k; + d.isNullOrUndefined(h) ? (this.colors = this.sanitizeColors(a), k = this.colors.length, this.ratios = this.initArray(k), d.isNullOrUndefined(c) ? this.alphas = this.initArray(k) : this.alphas = this.sanitizeAlphas(c, k, k, 1)) : 0 === h.length ? (this.colors = [], this.alphas = [], this.ratios = []) : (k = Math.min(a.length, h.length, 16), this.colors = this.sanitizeColors(a, k), this.ratios = this.sanitizeRatios(h, k), d.isNullOrUndefined(c) ? this.alphas = this.initArray(k) : this.alphas = + this.sanitizeAlphas(c, k, k, 1)); } }; - a.sanitizeColors = function(a, e) { - void 0 === e && (e = 16); - for (var c = [], h = 0, q = Math.min(a.length, e);h < q;h++) { - c[h] = a[h] >>> 0 & 16777215; + a.sanitizeColors = function(a, c) { + void 0 === c && (c = 16); + for (var d = [], k = 0, s = Math.min(a.length, c);k < s;k++) { + d[k] = a[k] >>> 0 & 16777215; } - return c; + return d; }; - a.sanitizeAlphas = function(a, e, m, h) { - void 0 === e && (e = 16); - void 0 === m && (m = 0); + a.sanitizeAlphas = function(a, c, h, k) { + void 0 === c && (c = 16); void 0 === h && (h = 0); - var q = [], n = 0; - for (e = Math.min(a.length, e);n < e;n++) { - q[n] = c.NumberUtilities.clamp(+a[n], 0, 1); + void 0 === k && (k = 0); + var s = [], m = 0; + for (c = Math.min(a.length, c);m < c;m++) { + s[m] = d.NumberUtilities.clamp(+a[m], 0, 1); } - for (;n < m;) { - q[n++] = h; + for (;m < h;) { + s[m++] = k; } - return q; + return s; }; - a.sanitizeRatios = function(a, e, m) { - var h; - void 0 === e && (e = 16); - void 0 === m && (m = 0); + a.sanitizeRatios = function(a, c, h) { + var k; + void 0 === c && (c = 16); void 0 === h && (h = 0); - var q = [], n = 0; - for (e = Math.min(a.length, e);n < e;n++) { - q[n] = c.NumberUtilities.clamp(+a[n], 0, 255); + void 0 === k && (k = 0); + var s = [], m = 0; + for (c = Math.min(a.length, c);m < c;m++) { + s[m] = d.NumberUtilities.clamp(+a[m], 0, 255); } - for (;n < m;) { - q[n++] = h; + for (;m < h;) { + s[m++] = k; } - return q; + return s; }; a.initArray = function(a) { - var e; - void 0 === e && (e = 0); - for (var c = Array(a), h = 0;h < a;h++) { - c[h] = e; + var c; + void 0 === c && (c = 0); + for (var d = Array(a), k = 0;k < a;k++) { + d[k] = c; } - return c; + return d; }; return a; }(); - h.GradientArrays = s; - })(h.filters || (h.filters = {})); + k.GradientArrays = r; + })(k.filters || (k.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.assert, l = function(e) { - function m(a, e, c, k, f, d, b, g, m, l, h, s) { + var u = d.AVM2.Runtime.asCoerceString, t = function(l) { + function c(a, c, d, l, g, f, b, e, q, n, k, r) { void 0 === a && (a = 4); - void 0 === e && (e = 45); - void 0 === c && (c = 16777215); - void 0 === k && (k = 1); - void 0 === f && (f = 0); - void 0 === d && (d = 1); - void 0 === b && (b = 4); - void 0 === g && (g = 4); - void 0 === m && (m = 1); + void 0 === c && (c = 45); + void 0 === d && (d = 16777215); void 0 === l && (l = 1); - void 0 === h && (h = "inner"); - void 0 === s && (s = !1); + void 0 === g && (g = 0); + void 0 === f && (f = 1); + void 0 === b && (b = 4); + void 0 === e && (e = 4); + void 0 === q && (q = 1); + void 0 === n && (n = 1); + void 0 === k && (k = "inner"); + void 0 === r && (r = !1); this.distance = a; - this.angle = e; - this.highlightColor = c; - this.highlightAlpha = k; - this.shadowColor = f; - this.shadowAlpha = d; + this.angle = c; + this.highlightColor = d; + this.highlightAlpha = l; + this.shadowColor = g; + this.shadowAlpha = f; this.blurX = b; - this.blurY = g; - this.strength = m; - this.quality = l; - this.type = h; - this.knockout = s; + this.blurY = e; + this.strength = q; + this.quality = n; + this.type = k; + this.knockout = r; } - __extends(m, e); - m.FromUntyped = function(e) { - var c = e.highlightColor >>> 8, l = (e.highlightColor & 255) / 255; - u(e.colors && 1 === e.colors.length, "colors must be Array of length 1"); - var k = e.colors[0] >>> 8, f = (e.colors[0] & 255) / 255, d = a.filters.BitmapFilterType.OUTER; - e.onTop ? d = a.filters.BitmapFilterType.FULL : e.inner && (d = a.filters.BitmapFilterType.INNER); - return new m(e.distance, 180 * e.angle / Math.PI, c, l, k, f, e.blurX, e.blurY, e.strength, e.quality, d, e.knockout); + __extends(c, l); + c.FromUntyped = function(d) { + var l = d.highlightColor >>> 8, k = (d.highlightColor & 255) / 255, m = d.colors[0] >>> 8, g = (d.colors[0] & 255) / 255, f = a.filters.BitmapFilterType.OUTER; + d.onTop ? f = a.filters.BitmapFilterType.FULL : d.inner && (f = a.filters.BitmapFilterType.INNER); + return new c(d.distance, 180 * d.angle / Math.PI, l, k, m, g, d.blurX, d.blurY, d.strength, d.quality, f, d.knockout); }; - m.prototype._updateFilterBounds = function(a) { + c.prototype._updateFilterBounds = function(a) { if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { - var e = this._angle * Math.PI / 180; - a.x += Math.floor(Math.cos(e) * this._distance); - a.y += Math.floor(Math.sin(e) * this._distance); + var c = this._angle * Math.PI / 180; + a.x += Math.floor(Math.cos(c) * this._distance); + a.y += Math.floor(Math.sin(c) * this._distance); 0 < a.left && (a.left = 0); 0 < a.top && (a.top = 0); } }; - Object.defineProperty(m.prototype, "distance", {get:function() { + Object.defineProperty(c.prototype, "distance", {get:function() { return this._distance; }, set:function(a) { this._distance = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "angle", {get:function() { + Object.defineProperty(c.prototype, "angle", {get:function() { return this._angle; }, set:function(a) { this._angle = +a % 360; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "highlightColor", {get:function() { + Object.defineProperty(c.prototype, "highlightColor", {get:function() { return this._highlightColor; }, set:function(a) { this._highlightColor = a >>> 0 & 16777215; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "highlightAlpha", {get:function() { + Object.defineProperty(c.prototype, "highlightAlpha", {get:function() { return this._highlightAlpha; }, set:function(a) { - this._highlightAlpha = c.NumberUtilities.clamp(+a, 0, 1); + this._highlightAlpha = d.NumberUtilities.clamp(+a, 0, 1); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "shadowColor", {get:function() { + Object.defineProperty(c.prototype, "shadowColor", {get:function() { return this._shadowColor; }, set:function(a) { this._shadowColor = a >>> 0 & 16777215; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "shadowAlpha", {get:function() { + Object.defineProperty(c.prototype, "shadowAlpha", {get:function() { return this._shadowAlpha; }, set:function(a) { - this._shadowAlpha = c.NumberUtilities.clamp(+a, 0, 1); + this._shadowAlpha = d.NumberUtilities.clamp(+a, 0, 1); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "blurX", {get:function() { + Object.defineProperty(c.prototype, "blurX", {get:function() { return this._blurX; }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "blurY", {get:function() { + Object.defineProperty(c.prototype, "blurY", {get:function() { return this._blurY; }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "knockout", {get:function() { + Object.defineProperty(c.prototype, "knockout", {get:function() { return this._knockout; }, set:function(a) { this._knockout = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "quality", {get:function() { + Object.defineProperty(c.prototype, "quality", {get:function() { return this._quality; }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "strength", {get:function() { + Object.defineProperty(c.prototype, "strength", {get:function() { return this._strength; }, set:function(a) { - this._strength = c.NumberUtilities.clamp(+a, 0, 255); + this._strength = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "type", {get:function() { + Object.defineProperty(c.prototype, "type", {get:function() { return this._type; }, set:function(a) { - a = p(a); - null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; + a = u(a); + null === a ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; }, enumerable:!0, configurable:!0}); - m.prototype.clone = function() { - return new m(this._distance, this._angle, this._highlightColor, this._highlightAlpha, this._shadowColor, this._shadowAlpha, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); + c.prototype.clone = function() { + return new c(this._distance, this._angle, this._highlightColor, this._highlightAlpha, this._shadowColor, this._shadowAlpha, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); }; - m.classInitializer = null; - m.initializer = null; - m.classSymbols = null; - m.instanceSymbols = null; - return m; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.filters.BitmapFilter); - v.BevelFilter = l; + v.BevelFilter = t; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = function(a) { - function l(a, c, l) { + (function(k) { + var u = function(a) { + function l(a, d, l) { void 0 === a && (a = 4); - void 0 === c && (c = 4); + void 0 === d && (d = 4); void 0 === l && (l = 1); this.blurX = a; - this.blurY = c; + this.blurY = d; this.quality = l; } __extends(l, a); @@ -36766,7 +36812,7 @@ var RtmpJs; return new l(a.blurX, a.blurY, a.quality); }; l.prototype._updateFilterBounds = function(a) { - h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality, !0); + k.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality, !0); }; l.prototype._serialize = function(a) { a.ensureAdditionalCapacity(16); @@ -36778,17 +36824,17 @@ var RtmpJs; Object.defineProperty(l.prototype, "blurX", {get:function() { return this._blurX; }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "blurY", {get:function() { return this._blurY; }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "quality", {get:function() { return this._quality; }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); }, enumerable:!0, configurable:!0}); l.prototype.clone = function() { return new l(this._blurX, this._blurY, this._quality); @@ -36799,18 +36845,18 @@ var RtmpJs; l.instanceSymbols = null; return l; }(a.filters.BitmapFilter); - h.BlurFilter = p; + k.BlurFilter = u; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = function(a) { + var u = function(a) { function l(a) { void 0 === a && (a = null); a ? this.matrix = a : this._matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; @@ -36820,23 +36866,23 @@ var RtmpJs; return new l(a.matrix); }; l.prototype._serialize = function(a) { - var c = this._matrix; - a.ensureAdditionalCapacity(4 * (c.length + 1)); + var d = this._matrix; + a.ensureAdditionalCapacity(4 * (d.length + 1)); a.writeIntUnsafe(6); - for (var l = 0;l < c.length;l++) { - a.writeFloatUnsafe(c[l]); + for (var l = 0;l < d.length;l++) { + a.writeFloatUnsafe(d[l]); } }; Object.defineProperty(l.prototype, "matrix", {get:function() { return this._matrix.concat(); }, set:function(a) { - if (c.isNullOrUndefined(a)) { - h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "matrix"); + if (d.isNullOrUndefined(a)) { + k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "matrix"); } else { - for (var m = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], l = 0, q = Math.min(a.length, 20);l < q;l++) { - m[l] = c.toNumber(a[l]); + for (var h = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], l = 0, s = Math.min(a.length, 20);l < s;l++) { + h[l] = d.toNumber(a[l]); } - this._matrix = m; + this._matrix = h; } }, enumerable:!0, configurable:!0}); l.prototype.clone = function() { @@ -36848,45 +36894,45 @@ var RtmpJs; l.instanceSymbols = null; return l; }(a.filters.BitmapFilter); - v.ColorMatrixFilter = p; + v.ColorMatrixFilter = u; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = function(a) { - function l(a, c, l, h, n, k, f, d, b) { + var u = function(a) { + function l(a, d, l, k, m, g, f, b, e) { void 0 === a && (a = 0); - void 0 === c && (c = 0); - void 0 === l && (l = null); - void 0 === h && (h = 1); - void 0 === n && (n = 0); - void 0 === k && (k = !0); - void 0 === f && (f = !0); void 0 === d && (d = 0); + void 0 === l && (l = null); + void 0 === k && (k = 1); + void 0 === m && (m = 0); + void 0 === g && (g = !0); + void 0 === f && (f = !0); void 0 === b && (b = 0); + void 0 === e && (e = 0); this.matrixX = a; - this.matrixY = c; + this.matrixY = d; l ? this.matrix = l : this._matrix = this._expandArray([], this._matrixX * this._matrixY); - this.divisor = h; - this.bias = n; - this.preserveAlpha = k; + this.divisor = k; + this.bias = m; + this.preserveAlpha = g; this.clamp = f; - this.color = d; - this.alpha = b; + this.color = b; + this.alpha = e; } __extends(l, a); l.FromUntyped = function(a) { return new l(a.matrixX, a.matrixY, a.matrix, a.divisor, a.bias, a.preserveAlpha, a.clamp, a.color >>> 8, (a.color & 255) / 255); }; - l.prototype._expandArray = function(a, c) { + l.prototype._expandArray = function(a, d) { if (a) { - for (var l = a.length;l < c;) { + for (var l = a.length;l < d;) { a[l++] = 0; } } @@ -36895,26 +36941,26 @@ var RtmpJs; Object.defineProperty(l.prototype, "matrix", {get:function() { return this._matrix.slice(0, this._matrixX * this._matrixY); }, set:function(a) { - if (c.isNullOrUndefined(a)) { - h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "matrix"); + if (d.isNullOrUndefined(a)) { + k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "matrix"); } else { - for (var m = this._matrixX * this._matrixY, l = Math.min(a.length, m), q = Array(l), n = 0;n < l;n++) { - q[n] = c.toNumber(a[n]); + for (var h = this._matrixX * this._matrixY, l = Math.min(a.length, h), s = Array(l), m = 0;m < l;m++) { + s[m] = d.toNumber(a[m]); } - this._expandArray(q, m); - this._matrix = q; + this._expandArray(s, h); + this._matrix = s; } }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "matrixX", {get:function() { return this._matrixX; }, set:function(a) { - a = c.NumberUtilities.clamp(+a, 0, 15) | 0; + a = d.NumberUtilities.clamp(+a, 0, 15) | 0; this._matrixX !== a && (this._matrixX = a, this._expandArray(this._matrix, a * this._matrixY)); }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "matrixY", {get:function() { return this._matrixY; }, set:function(a) { - a = c.NumberUtilities.clamp(+a, 0, 15) | 0; + a = d.NumberUtilities.clamp(+a, 0, 15) | 0; this._matrixY !== a && (this._matrixY = a, this._expandArray(this._matrix, a * this._matrixX)); }, enumerable:!0, configurable:!0}); Object.defineProperty(l.prototype, "divisor", {get:function() { @@ -36945,7 +36991,7 @@ var RtmpJs; Object.defineProperty(l.prototype, "alpha", {get:function() { return this._alpha; }, set:function(a) { - this._alpha = c.NumberUtilities.clamp(+a, 0, 1); + this._alpha = d.NumberUtilities.clamp(+a, 0, 1); }, enumerable:!0, configurable:!0}); l.prototype.clone = function() { return new l(this._matrixX, this._matrixY, this.matrix, this._divisor, this._bias, this._preserveAlpha, this._clamp, this._color, this._alpha); @@ -36956,126 +37002,447 @@ var RtmpJs; l.instanceSymbols = null; return l; }(a.filters.BitmapFilter); - v.ConvolutionFilter = p; + v.ConvolutionFilter = u; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.filters.DisplacementMapFilterMode"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.WRAP = "wrap"; - e.CLAMP = "clamp"; - e.IGNORE = "ignore"; - e.COLOR = "color"; - return e; - }(a.ASNative); - h.DisplacementMapFilterMode = u; - })(h.filters || (h.filters = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.somewhatImplemented, u = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a, e, m, k, f, d, b, g, l) { - void 0 === a && (a = null); - void 0 === e && (e = null); - void 0 === m && (m = 0); - void 0 === k && (k = 0); - void 0 === f && (f = 0); - void 0 === d && (d = 0); - void 0 === b && (b = "wrap"); - void 0 === g && (g = 0); - void 0 === l && (l = 0); - this.mapBitmap = a; - this.mapPoint = e; - this.componentX = m; - this.componentY = k; - this.scaleX = f; - this.scaleY = d; - this.mode = b; - this.color = g; - this.alpha = l; + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.filters.DisplacementMapFilterMode"); } __extends(c, a); - c.FromUntyped = function(a) { - return new c(a.mapBitmap, a.mapPoint, a.componentX, a.componentY, a.scaleX, a.scaleY, a.mode, a.color, a.alpha); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.WRAP = "wrap"; + c.CLAMP = "clamp"; + c.IGNORE = "ignore"; + c.COLOR = "color"; + return c; + }(a.ASNative); + k.DisplacementMapFilterMode = t; + })(k.filters || (k.filters = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.somewhatImplemented, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a, c, h, g, f, b, e, l, n) { + void 0 === a && (a = null); + void 0 === c && (c = null); + void 0 === h && (h = 0); + void 0 === g && (g = 0); + void 0 === f && (f = 0); + void 0 === b && (b = 0); + void 0 === e && (e = "wrap"); + void 0 === l && (l = 0); + void 0 === n && (n = 0); + this.mapBitmap = a; + this.mapPoint = c; + this.componentX = h; + this.componentY = g; + this.scaleX = f; + this.scaleY = b; + this.mode = e; + this.color = l; + this.alpha = n; + } + __extends(d, a); + d.FromUntyped = function(a) { + return new d(a.mapBitmap, a.mapPoint, a.componentX, a.componentY, a.scaleX, a.scaleY, a.mode, a.color, a.alpha); }; - Object.defineProperty(c.prototype, "mapBitmap", {get:function() { - p("public flash.filters.DisplacementMapFilter::get mapBitmap"); + Object.defineProperty(d.prototype, "mapBitmap", {get:function() { + u("public flash.filters.DisplacementMapFilter::get mapBitmap"); return this._mapBitmap; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set mapBitmap"); + u("public flash.filters.DisplacementMapFilter::set mapBitmap"); this._mapBitmap = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "mapPoint", {get:function() { - p("public flash.filters.DisplacementMapFilter::get mapPoint"); + Object.defineProperty(d.prototype, "mapPoint", {get:function() { + u("public flash.filters.DisplacementMapFilter::get mapPoint"); return this._mapPoint; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set mapPoint"); + u("public flash.filters.DisplacementMapFilter::set mapPoint"); this._mapPoint = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "componentX", {get:function() { + Object.defineProperty(d.prototype, "componentX", {get:function() { return this._componentX; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set componentX"); + u("public flash.filters.DisplacementMapFilter::set componentX"); this._componentX = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "componentY", {get:function() { + Object.defineProperty(d.prototype, "componentY", {get:function() { return this._componentY; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set componentY"); + u("public flash.filters.DisplacementMapFilter::set componentY"); this._componentY = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "scaleX", {get:function() { + Object.defineProperty(d.prototype, "scaleX", {get:function() { return this._scaleX; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set scaleX"); + u("public flash.filters.DisplacementMapFilter::set scaleX"); this._scaleX = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "scaleY", {get:function() { + Object.defineProperty(d.prototype, "scaleY", {get:function() { return this._scaleY; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set scaleY"); + u("public flash.filters.DisplacementMapFilter::set scaleY"); this._scaleY = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "mode", {get:function() { + Object.defineProperty(d.prototype, "mode", {get:function() { return this._mode; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set mode"); - this._mode = u(a); + u("public flash.filters.DisplacementMapFilter::set mode"); + this._mode = t(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "color", {get:function() { + Object.defineProperty(d.prototype, "color", {get:function() { return this._color; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set color"); + u("public flash.filters.DisplacementMapFilter::set color"); this._color = a >>> 0 & 16777215; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "alpha", {get:function() { + Object.defineProperty(d.prototype, "alpha", {get:function() { return this._alpha; }, set:function(a) { - p("public flash.filters.DisplacementMapFilter::set alpha"); + u("public flash.filters.DisplacementMapFilter::set alpha"); this._alpha = +a; }, enumerable:!0, configurable:!0}); + d.prototype.clone = function() { + return new d(this._mapBitmap, this._mapPoint, this._componentX, this._componentY, this._scaleX, this._scaleY, this._mode, this._color, this._alpha); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.filters.BitmapFilter); + k.DisplacementMapFilter = l; + })(a.filters || (a.filters = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = function(a) { + function l(a, d, l, k, m, g, f, b, e, q, n) { + void 0 === a && (a = 4); + void 0 === d && (d = 45); + void 0 === l && (l = 0); + void 0 === k && (k = 1); + void 0 === m && (m = 4); + void 0 === g && (g = 4); + void 0 === f && (f = 1); + void 0 === b && (b = 1); + void 0 === e && (e = !1); + void 0 === q && (q = !1); + void 0 === n && (n = !1); + this.distance = a; + this.angle = d; + this.color = l; + this.alpha = k; + this.blurX = m; + this.blurY = g; + this.strength = f; + this.quality = b; + this.inner = e; + this.knockout = q; + this.hideObject = n; + } + __extends(l, a); + l.FromUntyped = function(a) { + return new l(a.distance, 180 * a.angle / Math.PI, a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout, !a.compositeSource); + }; + l.prototype._updateFilterBounds = function(a) { + if (!this.inner && (k.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { + var d = this._angle * Math.PI / 180; + a.x += Math.floor(Math.cos(d) * this._distance); + a.y += Math.floor(Math.sin(d) * this._distance); + 0 < a.left && (a.left = 0); + 0 < a.top && (a.top = 0); + } + }; + Object.defineProperty(l.prototype, "distance", {get:function() { + return this._distance; + }, set:function(a) { + this._distance = +a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "angle", {get:function() { + return this._angle; + }, set:function(a) { + this._angle = +a % 360; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "color", {get:function() { + return this._color; + }, set:function(a) { + this._color = a >>> 0 & 16777215; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "alpha", {get:function() { + return this._alpha; + }, set:function(a) { + this._alpha = d.NumberUtilities.clamp(+a, 0, 1); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "blurX", {get:function() { + return this._blurX; + }, set:function(a) { + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "blurY", {get:function() { + return this._blurY; + }, set:function(a) { + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "hideObject", {get:function() { + return this._hideObject; + }, set:function(a) { + this._hideObject = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "inner", {get:function() { + return this._inner; + }, set:function(a) { + this._inner = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "knockout", {get:function() { + return this._knockout; + }, set:function(a) { + this._knockout = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "quality", {get:function() { + return this._quality; + }, set:function(a) { + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "strength", {get:function() { + return this._strength; + }, set:function(a) { + this._strength = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + l.prototype.clone = function() { + return new l(this._distance, this._angle, this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout, this._hideObject); + }; + l.classInitializer = null; + l.initializer = null; + l.classSymbols = null; + l.instanceSymbols = null; + return l; + }(a.filters.BitmapFilter); + k.DropShadowFilter = u; + })(a.filters || (a.filters = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = function(a) { + function l(a, d, l, k, m, g, f, b) { + void 0 === a && (a = 16711680); + void 0 === d && (d = 1); + void 0 === l && (l = 6); + void 0 === k && (k = 6); + void 0 === m && (m = 2); + void 0 === g && (g = 1); + void 0 === f && (f = !1); + void 0 === b && (b = !1); + this.color = a; + this.alpha = d; + this.blurX = l; + this.blurY = k; + this.strength = m; + this.quality = g; + this.inner = f; + this.knockout = b; + } + __extends(l, a); + l.FromUntyped = function(a) { + return new l(a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout); + }; + l.prototype._updateFilterBounds = function(a) { + k.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality); + }; + Object.defineProperty(l.prototype, "color", {get:function() { + return this._color; + }, set:function(a) { + this._color = a >>> 0 & 16777215; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "alpha", {get:function() { + return this._alpha; + }, set:function(a) { + this._alpha = d.NumberUtilities.clamp(+a, 0, 1); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "blurX", {get:function() { + return this._blurX; + }, set:function(a) { + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "blurY", {get:function() { + return this._blurY; + }, set:function(a) { + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "inner", {get:function() { + return this._inner; + }, set:function(a) { + this._inner = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "knockout", {get:function() { + return this._knockout; + }, set:function(a) { + this._knockout = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "quality", {get:function() { + return this._quality; + }, set:function(a) { + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(l.prototype, "strength", {get:function() { + return this._strength; + }, set:function(a) { + this._strength = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + l.prototype.clone = function() { + return new l(this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout); + }; + l.classInitializer = null; + l.initializer = null; + l.classSymbols = null; + l.instanceSymbols = null; + return l; + }(a.filters.BitmapFilter); + k.GlowFilter = u; + })(a.filters || (a.filters = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(v) { + var u = d.AVM2.Runtime.asCoerceString, t = function(l) { + function c(a, c, d, l, g, f, b, e, q, n, k) { + void 0 === a && (a = 4); + void 0 === c && (c = 45); + void 0 === d && (d = null); + void 0 === l && (l = null); + void 0 === g && (g = null); + void 0 === f && (f = 4); + void 0 === b && (b = 4); + void 0 === e && (e = 1); + void 0 === q && (q = 1); + void 0 === n && (n = "inner"); + void 0 === k && (k = !1); + this.distance = a; + this.angle = c; + v.GradientArrays.sanitize(d, l, g); + this._colors = v.GradientArrays.colors; + this._alphas = v.GradientArrays.alphas; + this._ratios = v.GradientArrays.ratios; + this.blurX = f; + this.blurY = b; + this.strength = e; + this.quality = q; + this.type = n; + this.knockout = k; + } + __extends(c, l); + c.FromUntyped = function(d) { + for (var l = [], k = [], m = 0;m < d.colors.length;m++) { + var g = d.colors[m]; + l.push(g >>> 8); + k.push(g & 255) / 255; + } + m = a.filters.BitmapFilterType.OUTER; + d.onTop ? m = a.filters.BitmapFilterType.FULL : d.inner && (m = a.filters.BitmapFilterType.INNER); + return new c(d.distance, 180 * d.angle / Math.PI, l, k, d.ratios, d.blurX, d.blurY, d.strength, d.quality, m, d.knockout); + }; + c.prototype._updateFilterBounds = function(a) { + if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { + var c = this._angle * Math.PI / 180; + a.x += Math.floor(Math.cos(c) * this._distance); + a.y += Math.floor(Math.sin(c) * this._distance); + 0 < a.left && (a.left = 0); + 0 < a.top && (a.top = 0); + } + }; + Object.defineProperty(c.prototype, "distance", {get:function() { + return this._distance; + }, set:function(a) { + this._distance = +a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "angle", {get:function() { + return this._angle; + }, set:function(a) { + this._angle = +a % 360; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "colors", {get:function() { + return this._colors.concat(); + }, set:function(a) { + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a)); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "alphas", {get:function() { + return this._alphas.concat(); + }, set:function(a) { + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "ratios", {get:function() { + return this._ratios.concat(); + }, set:function(a) { + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "blurX", {get:function() { + return this._blurX; + }, set:function(a) { + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "blurY", {get:function() { + return this._blurY; + }, set:function(a) { + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "knockout", {get:function() { + return this._knockout; + }, set:function(a) { + this._knockout = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "quality", {get:function() { + return this._quality; + }, set:function(a) { + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "strength", {get:function() { + return this._strength; + }, set:function(a) { + this._strength = d.NumberUtilities.clamp(+a, 0, 255); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "type", {get:function() { + return this._type; + }, set:function(a) { + a = u(a); + null === a ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; + }, enumerable:!0, configurable:!0}); c.prototype.clone = function() { - return new c(this._mapBitmap, this._mapPoint, this._componentX, this._componentY, this._scaleX, this._scaleY, this._mode, this._color, this._alpha); + return new c(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); }; c.classInitializer = null; c.initializer = null; @@ -37083,541 +37450,218 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.filters.BitmapFilter); - h.DisplacementMapFilter = l; + v.GradientBevelFilter = t; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.assert, u = function(a) { - function e(a, e, c, l, k, f, d, b, g, h, w) { + (function(v) { + var u = d.AVM2.Runtime.asCoerceString, t = function(l) { + function c(a, c, d, l, g, f, b, e, q, n, k) { void 0 === a && (a = 4); - void 0 === e && (e = 45); - void 0 === c && (c = 0); - void 0 === l && (l = 1); - void 0 === k && (k = 4); + void 0 === c && (c = 45); + void 0 === d && (d = null); + void 0 === l && (l = null); + void 0 === g && (g = null); void 0 === f && (f = 4); - void 0 === d && (d = 1); - void 0 === b && (b = 1); - void 0 === g && (g = !1); - void 0 === h && (h = !1); - void 0 === w && (w = !1); - this.distance = a; - this.angle = e; - this.color = c; - this.alpha = l; - this.blurX = k; - this.blurY = f; - this.strength = d; - this.quality = b; - this.inner = g; - this.knockout = h; - this.hideObject = w; - } - __extends(e, a); - e.FromUntyped = function(a) { - p(a.colors && 1 === a.colors.length, "colors must be Array of length 1"); - return new e(a.distance, 180 * a.angle / Math.PI, a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout, !a.compositeSource); - }; - e.prototype._updateFilterBounds = function(a) { - if (!this.inner && (h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { - var e = this._angle * Math.PI / 180; - a.x += Math.floor(Math.cos(e) * this._distance); - a.y += Math.floor(Math.sin(e) * this._distance); - 0 < a.left && (a.left = 0); - 0 < a.top && (a.top = 0); - } - }; - Object.defineProperty(e.prototype, "distance", {get:function() { - return this._distance; - }, set:function(a) { - this._distance = +a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "angle", {get:function() { - return this._angle; - }, set:function(a) { - this._angle = +a % 360; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "color", {get:function() { - return this._color; - }, set:function(a) { - this._color = a >>> 0 & 16777215; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "alpha", {get:function() { - return this._alpha; - }, set:function(a) { - this._alpha = c.NumberUtilities.clamp(+a, 0, 1); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurX", {get:function() { - return this._blurX; - }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurY", {get:function() { - return this._blurY; - }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "hideObject", {get:function() { - return this._hideObject; - }, set:function(a) { - this._hideObject = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "inner", {get:function() { - return this._inner; - }, set:function(a) { - this._inner = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "knockout", {get:function() { - return this._knockout; - }, set:function(a) { - this._knockout = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "quality", {get:function() { - return this._quality; - }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "strength", {get:function() { - return this._strength; - }, set:function(a) { - this._strength = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new e(this._distance, this._angle, this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout, this._hideObject); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.filters.BitmapFilter); - h.DropShadowFilter = u; - })(a.filters || (a.filters = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.assert, u = function(a) { - function e(a, e, c, l, k, f, d, b) { - void 0 === a && (a = 16711680); + void 0 === b && (b = 4); void 0 === e && (e = 1); - void 0 === c && (c = 6); - void 0 === l && (l = 6); - void 0 === k && (k = 2); - void 0 === f && (f = 1); - void 0 === d && (d = !1); - void 0 === b && (b = !1); - this.color = a; - this.alpha = e; - this.blurX = c; - this.blurY = l; - this.strength = k; - this.quality = f; - this.inner = d; - this.knockout = b; - } - __extends(e, a); - e.FromUntyped = function(a) { - p(a.colors && 1 === a.colors.length, "colors must be Array of length 1"); - return new e(a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout); - }; - e.prototype._updateFilterBounds = function(a) { - h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality); - }; - Object.defineProperty(e.prototype, "color", {get:function() { - return this._color; - }, set:function(a) { - this._color = a >>> 0 & 16777215; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "alpha", {get:function() { - return this._alpha; - }, set:function(a) { - this._alpha = c.NumberUtilities.clamp(+a, 0, 1); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurX", {get:function() { - return this._blurX; - }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurY", {get:function() { - return this._blurY; - }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "inner", {get:function() { - return this._inner; - }, set:function(a) { - this._inner = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "knockout", {get:function() { - return this._knockout; - }, set:function(a) { - this._knockout = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "quality", {get:function() { - return this._quality; - }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "strength", {get:function() { - return this._strength; - }, set:function(a) { - this._strength = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new e(this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.filters.BitmapFilter); - h.GlowFilter = u; - })(a.filters || (a.filters = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = function(l) { - function e(a, e, c, l, k, f, d, b, g, h, w) { - void 0 === a && (a = 4); - void 0 === e && (e = 45); - void 0 === c && (c = null); - void 0 === l && (l = null); - void 0 === k && (k = null); - void 0 === f && (f = 4); - void 0 === d && (d = 4); - void 0 === b && (b = 1); - void 0 === g && (g = 1); - void 0 === h && (h = "inner"); - void 0 === w && (w = !1); + void 0 === q && (q = 1); + void 0 === n && (n = "inner"); + void 0 === k && (k = !1); this.distance = a; - this.angle = e; - v.GradientArrays.sanitize(c, l, k); + this.angle = c; + v.GradientArrays.sanitize(d, l, g); this._colors = v.GradientArrays.colors; this._alphas = v.GradientArrays.alphas; this._ratios = v.GradientArrays.ratios; this.blurX = f; - this.blurY = d; - this.strength = b; - this.quality = g; - this.type = h; - this.knockout = w; + this.blurY = b; + this.strength = e; + this.quality = q; + this.type = n; + this.knockout = k; } - __extends(e, l); - e.FromUntyped = function(c) { - for (var l = [], h = [], n = 0;n < c.colors.length;n++) { - var k = c.colors[n]; - l.push(k >>> 8); - h.push(k & 255) / 255; + __extends(c, l); + c.FromUntyped = function(d) { + for (var l = [], k = [], m = 0;m < d.colors.length;m++) { + var g = d.colors[m]; + l.push(g >>> 8); + k.push(g & 255) / 255; } - n = a.filters.BitmapFilterType.OUTER; - c.onTop ? n = a.filters.BitmapFilterType.FULL : c.inner && (n = a.filters.BitmapFilterType.INNER); - return new e(c.distance, 180 * c.angle / Math.PI, l, h, c.ratios, c.blurX, c.blurY, c.strength, c.quality, n, c.knockout); + m = a.filters.BitmapFilterType.OUTER; + d.onTop ? m = a.filters.BitmapFilterType.FULL : d.inner && (m = a.filters.BitmapFilterType.INNER); + return new c(d.distance, 180 * d.angle / Math.PI, l, k, d.ratios, d.blurX, d.blurY, d.strength, d.quality, m, d.knockout); }; - e.prototype._updateFilterBounds = function(a) { + c.prototype._updateFilterBounds = function(a) { if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { - var e = this._angle * Math.PI / 180; - a.x += Math.floor(Math.cos(e) * this._distance); - a.y += Math.floor(Math.sin(e) * this._distance); + var c = this._angle * Math.PI / 180; + a.x += Math.floor(Math.cos(c) * this._distance); + a.y += Math.floor(Math.sin(c) * this._distance); 0 < a.left && (a.left = 0); 0 < a.top && (a.top = 0); } }; - Object.defineProperty(e.prototype, "distance", {get:function() { + Object.defineProperty(c.prototype, "distance", {get:function() { return this._distance; }, set:function(a) { this._distance = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "angle", {get:function() { + Object.defineProperty(c.prototype, "angle", {get:function() { return this._angle; }, set:function(a) { this._angle = +a % 360; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "colors", {get:function() { + Object.defineProperty(c.prototype, "colors", {get:function() { return this._colors.concat(); }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a)); + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "alphas", {get:function() { + Object.defineProperty(c.prototype, "alphas", {get:function() { return this._alphas.concat(); }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "ratios", {get:function() { + Object.defineProperty(c.prototype, "ratios", {get:function() { return this._ratios.concat(); }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); + d.isNullOrUndefined(a) ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurX", {get:function() { + Object.defineProperty(c.prototype, "blurX", {get:function() { return this._blurX; }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); + this._blurX = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurY", {get:function() { + Object.defineProperty(c.prototype, "blurY", {get:function() { return this._blurY; }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); + this._blurY = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "knockout", {get:function() { + Object.defineProperty(c.prototype, "knockout", {get:function() { return this._knockout; }, set:function(a) { this._knockout = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "quality", {get:function() { + Object.defineProperty(c.prototype, "quality", {get:function() { return this._quality; }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); + this._quality = d.NumberUtilities.clamp(a | 0, 0, 15); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "strength", {get:function() { + Object.defineProperty(c.prototype, "strength", {get:function() { return this._strength; }, set:function(a) { - this._strength = c.NumberUtilities.clamp(+a, 0, 255); + this._strength = d.NumberUtilities.clamp(+a, 0, 255); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "type", {get:function() { + Object.defineProperty(c.prototype, "type", {get:function() { return this._type; }, set:function(a) { - a = p(a); - null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; + a = u(a); + null === a ? k.Runtime.throwError("TypeError", k.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new e(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); + c.prototype.clone = function() { + return new c(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.filters.BitmapFilter); - v.GradientBevelFilter = u; + v.GradientGlowFilter = t; })(a.filters || (a.filters = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(a) { - (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = function(l) { - function e(a, e, c, l, k, f, d, b, g, h, w) { - void 0 === a && (a = 4); - void 0 === e && (e = 45); - void 0 === c && (c = null); - void 0 === l && (l = null); - void 0 === k && (k = null); - void 0 === f && (f = 4); - void 0 === d && (d = 4); - void 0 === b && (b = 1); - void 0 === g && (g = 1); - void 0 === h && (h = "inner"); - void 0 === w && (w = !1); - this.distance = a; - this.angle = e; - v.GradientArrays.sanitize(c, l, k); - this._colors = v.GradientArrays.colors; - this._alphas = v.GradientArrays.alphas; - this._ratios = v.GradientArrays.ratios; - this.blurX = f; - this.blurY = d; - this.strength = b; - this.quality = g; - this.type = h; - this.knockout = w; - } - __extends(e, l); - e.FromUntyped = function(c) { - for (var l = [], h = [], n = 0;n < c.colors.length;n++) { - var k = c.colors[n]; - l.push(k >>> 8); - h.push(k & 255) / 255; - } - n = a.filters.BitmapFilterType.OUTER; - c.onTop ? n = a.filters.BitmapFilterType.FULL : c.inner && (n = a.filters.BitmapFilterType.INNER); - return new e(c.distance, 180 * c.angle / Math.PI, l, h, c.ratios, c.blurX, c.blurY, c.strength, c.quality, n, c.knockout); - }; - e.prototype._updateFilterBounds = function(a) { - if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) { - var e = this._angle * Math.PI / 180; - a.x += Math.floor(Math.cos(e) * this._distance); - a.y += Math.floor(Math.sin(e) * this._distance); - 0 < a.left && (a.left = 0); - 0 < a.top && (a.top = 0); - } - }; - Object.defineProperty(e.prototype, "distance", {get:function() { - return this._distance; - }, set:function(a) { - this._distance = +a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "angle", {get:function() { - return this._angle; - }, set:function(a) { - this._angle = +a % 360; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "colors", {get:function() { - return this._colors.concat(); - }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a)); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "alphas", {get:function() { - return this._alphas.concat(); - }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "ratios", {get:function() { - return this._ratios.concat(); - }, set:function(a) { - c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurX", {get:function() { - return this._blurX; - }, set:function(a) { - this._blurX = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blurY", {get:function() { - return this._blurY; - }, set:function(a) { - this._blurY = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "knockout", {get:function() { - return this._knockout; - }, set:function(a) { - this._knockout = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "quality", {get:function() { - return this._quality; - }, set:function(a) { - this._quality = c.NumberUtilities.clamp(a | 0, 0, 15); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "strength", {get:function() { - return this._strength; - }, set:function(a) { - this._strength = c.NumberUtilities.clamp(+a, 0, 255); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "type", {get:function() { - return this._type; - }, set:function(a) { - a = p(a); - null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL; - }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - return new e(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.filters.BitmapFilter); - v.GradientGlowFilter = u; - })(a.filters || (a.filters = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.IntegerUtilities.toS16, u = c.IntegerUtilities.clampS8U8, l = function(a) { - function c(a, e, l, k, f, d, b, g) { + (function(k) { + (function(k) { + var r = d.IntegerUtilities.toS16, t = d.IntegerUtilities.clampS8U8, l = function(a) { + function d(a, c, h, g, f, b, e, l) { void 0 === a && (a = 1); - void 0 === e && (e = 1); - void 0 === l && (l = 1); - void 0 === k && (k = 1); + void 0 === c && (c = 1); + void 0 === h && (h = 1); + void 0 === g && (g = 1); void 0 === f && (f = 0); - void 0 === d && (d = 0); void 0 === b && (b = 0); - void 0 === g && (g = 0); + void 0 === e && (e = 0); + void 0 === l && (l = 0); this.redMultiplier = +a; - this.greenMultiplier = +e; - this.blueMultiplier = +l; - this.alphaMultiplier = +k; + this.greenMultiplier = +c; + this.blueMultiplier = +h; + this.alphaMultiplier = +g; this.redOffset = +f; - this.greenOffset = +d; - this.blueOffset = +b; - this.alphaOffset = +g; + this.greenOffset = +b; + this.blueOffset = +e; + this.alphaOffset = +l; } - __extends(c, a); - Object.defineProperty(c.prototype, "native_redMultiplier", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "native_redMultiplier", {get:function() { return this.redMultiplier; }, set:function(a) { this.redMultiplier = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_greenMultiplier", {get:function() { + Object.defineProperty(d.prototype, "native_greenMultiplier", {get:function() { return this.greenMultiplier; }, set:function(a) { this.greenMultiplier = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_blueMultiplier", {get:function() { + Object.defineProperty(d.prototype, "native_blueMultiplier", {get:function() { return this.blueMultiplier; }, set:function(a) { this.blueMultiplier = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_alphaMultiplier", {get:function() { + Object.defineProperty(d.prototype, "native_alphaMultiplier", {get:function() { return this.alphaMultiplier; }, set:function(a) { this.alphaMultiplier = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_redOffset", {get:function() { + Object.defineProperty(d.prototype, "native_redOffset", {get:function() { return this.redOffset; }, set:function(a) { this.redOffset = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_greenOffset", {get:function() { + Object.defineProperty(d.prototype, "native_greenOffset", {get:function() { return this.greenOffset; }, set:function(a) { this.greenOffset = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_blueOffset", {get:function() { + Object.defineProperty(d.prototype, "native_blueOffset", {get:function() { return this.blueOffset; }, set:function(a) { this.blueOffset = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "native_alphaOffset", {get:function() { + Object.defineProperty(d.prototype, "native_alphaOffset", {get:function() { return this.alphaOffset; }, set:function(a) { this.alphaOffset = +a; }, enumerable:!0, configurable:!0}); - c.prototype.ColorTransform = function(a, e, c, k, f, d, b, g) { + d.prototype.ColorTransform = function(a, c, d, g, f, b, e, h) { void 0 === a && (a = 1); - void 0 === e && (e = 1); void 0 === c && (c = 1); - void 0 === k && (k = 1); + void 0 === d && (d = 1); + void 0 === g && (g = 1); void 0 === f && (f = 0); - void 0 === d && (d = 0); void 0 === b && (b = 0); - void 0 === g && (g = 0); + void 0 === e && (e = 0); + void 0 === h && (h = 0); this.redMultiplier = a; - this.greenMultiplier = e; - this.blueMultiplier = c; - this.alphaMultiplier = k; + this.greenMultiplier = c; + this.blueMultiplier = d; + this.alphaMultiplier = g; this.redOffset = f; - this.greenOffset = d; - this.blueOffset = b; - this.alphaOffset = g; + this.greenOffset = b; + this.blueOffset = e; + this.alphaOffset = h; }; - Object.defineProperty(c.prototype, "color", {get:function() { + Object.defineProperty(d.prototype, "color", {get:function() { return this.redOffset << 16 | this.greenOffset << 8 | this.blueOffset; }, set:function(a) { this.redOffset = a >> 16 & 255; @@ -37625,7 +37669,7 @@ var RtmpJs; this.blueOffset = a & 255; this.redMultiplier = this.greenMultiplier = this.blueMultiplier = 1; }, enumerable:!0, configurable:!0}); - c.prototype.concat = function(a) { + d.prototype.concat = function(a) { this.redMultiplier *= a.redMultiplier; this.greenMultiplier *= a.greenMultiplier; this.blueMultiplier *= a.blueMultiplier; @@ -37635,7 +37679,7 @@ var RtmpJs; this.blueOffset += a.blueOffset; this.alphaOffset += a.alphaOffset; }; - c.prototype.preMultiply = function(a) { + d.prototype.preMultiply = function(a) { this.redOffset += a.redOffset * this.redMultiplier; this.greenOffset += a.greenOffset * this.greenMultiplier; this.blueOffset += a.blueOffset * this.blueMultiplier; @@ -37645,7 +37689,7 @@ var RtmpJs; this.blueMultiplier *= a.blueMultiplier; this.alphaMultiplier *= a.alphaMultiplier; }; - c.prototype.copyFrom = function(a) { + d.prototype.copyFrom = function(a) { this.redMultiplier = a.redMultiplier; this.greenMultiplier = a.greenMultiplier; this.blueMultiplier = a.blueMultiplier; @@ -37655,7 +37699,7 @@ var RtmpJs; this.blueOffset = a.blueOffset; this.alphaOffset = a.alphaOffset; }; - c.prototype.copyFromUntyped = function(a) { + d.prototype.copyFromUntyped = function(a) { this.redMultiplier = a.redMultiplier / 256; this.greenMultiplier = a.greenMultiplier / 256; this.blueMultiplier = a.blueMultiplier / 256; @@ -37665,276 +37709,142 @@ var RtmpJs; this.blueOffset = a.blueOffset; this.alphaOffset = a.alphaOffset; }; - c.prototype.setTo = function(a, e, c, k, f, d, b, g) { + d.prototype.setTo = function(a, c, d, g, f, b, e, h) { this.redMultiplier = a; - this.greenMultiplier = e; - this.blueMultiplier = c; - this.alphaMultiplier = k; + this.greenMultiplier = c; + this.blueMultiplier = d; + this.alphaMultiplier = g; this.redOffset = f; - this.greenOffset = d; - this.blueOffset = b; - this.alphaOffset = g; + this.greenOffset = b; + this.blueOffset = e; + this.alphaOffset = h; }; - c.prototype.clone = function() { - return new c(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset); + d.prototype.clone = function() { + return new d(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset); }; - c.prototype.convertToFixedPoint = function() { - this.redMultiplier = u(this.redMultiplier); - this.greenMultiplier = u(this.greenMultiplier); - this.blueMultiplier = u(this.blueMultiplier); - this.alphaMultiplier = u(this.alphaMultiplier); - this.redOffset = s(this.redOffset); - this.greenOffset = s(this.greenOffset); - this.blueOffset = s(this.blueOffset); - this.alphaOffset = s(this.alphaOffset); + d.prototype.convertToFixedPoint = function() { + this.redMultiplier = t(this.redMultiplier); + this.greenMultiplier = t(this.greenMultiplier); + this.blueMultiplier = t(this.blueMultiplier); + this.alphaMultiplier = t(this.alphaMultiplier); + this.redOffset = r(this.redOffset); + this.greenOffset = r(this.greenOffset); + this.blueOffset = r(this.blueOffset); + this.alphaOffset = r(this.alphaOffset); return this; }; - c.prototype.toString = function() { + d.prototype.toString = function() { return "(redMultiplier=" + this.redMultiplier + ", greenMultiplier=" + this.greenMultiplier + ", blueMultiplier=" + this.blueMultiplier + ", alphaMultiplier=" + this.alphaMultiplier + ", redOffset=" + this.redOffset + ", greenOffset=" + this.greenOffset + ", blueOffset=" + this.blueOffset + ", alphaOffset=" + this.alphaOffset + ")"; }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.FROZEN_IDENTITY_COLOR_TRANSFORM = Object.freeze(new c); - c.TEMP_COLOR_TRANSFORM = new c; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.FROZEN_IDENTITY_COLOR_TRANSFORM = Object.freeze(new d); + d.TEMP_COLOR_TRANSFORM = new d; + return d; }(a.ASNative); - h.ColorTransform = l; - })(h.geom || (h.geom = {})); + k.ColorTransform = l; + })(k.geom || (k.geom = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) { - function e() { - u("public flash.media.Camera"); - } - __extends(e, a); - Object.defineProperty(e.prototype, "names", {get:function() { - p("public flash.media.Camera::get names"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "isSupported", {get:function() { - p("public flash.media.Camera::get isSupported"); - }, enumerable:!0, configurable:!0}); - e.getCamera = function(a) { - void 0 === a && (a = null); - l(a); - p("public flash.media.Camera::static getCamera"); - }; - e._scanHardware = function() { - p("public flash.media.Camera::static _scanHardware"); - }; - Object.defineProperty(e.prototype, "activityLevel", {get:function() { - p("public flash.media.Camera::get activityLevel"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "bandwidth", {get:function() { - p("public flash.media.Camera::get bandwidth"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "currentFPS", {get:function() { - p("public flash.media.Camera::get currentFPS"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "fps", {get:function() { - p("public flash.media.Camera::get fps"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "height", {get:function() { - p("public flash.media.Camera::get height"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "index", {get:function() { - p("public flash.media.Camera::get index"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "keyFrameInterval", {get:function() { - p("public flash.media.Camera::get keyFrameInterval"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "loopback", {get:function() { - p("public flash.media.Camera::get loopback"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "motionLevel", {get:function() { - p("public flash.media.Camera::get motionLevel"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "motionTimeout", {get:function() { - p("public flash.media.Camera::get motionTimeout"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "muted", {get:function() { - p("public flash.media.Camera::get muted"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "name", {get:function() { - p("public flash.media.Camera::get name"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "position", {get:function() { - p("public flash.media.Camera::get position"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "quality", {get:function() { - p("public flash.media.Camera::get quality"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "width", {get:function() { - p("public flash.media.Camera::get width"); - }, enumerable:!0, configurable:!0}); - e.prototype.setCursor = function(a) { - p("public flash.media.Camera::setCursor"); - }; - e.prototype.setKeyFrameInterval = function(a) { - p("public flash.media.Camera::setKeyFrameInterval"); - }; - e.prototype.setLoopback = function(a) { - p("public flash.media.Camera::setLoopback"); - }; - e.prototype.setMode = function(a, e, c, f) { - p("public flash.media.Camera::setMode"); - }; - e.prototype.setMotionLevel = function(a, e) { - p("public flash.media.Camera::setMotionLevel"); - }; - e.prototype.setQuality = function(a, e) { - p("public flash.media.Camera::setQuality"); - }; - e.prototype.drawToBitmapData = function(a) { - p("public flash.media.Camera::drawToBitmapData"); - }; - e.prototype.copyToByteArray = function(a, e) { - p("public flash.media.Camera::copyToByteArray"); - }; - e.prototype.copyToVector = function(a, e) { - p("public flash.media.Camera::copyToVector"); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.events.EventDispatcher); - h.Camera = e; - })(a.media || (a.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var s = c.Debug.dummyConstructor, u = function(a) { - function e() { - s("public flash.media.ID3Info"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = "songName artist album year comment genre track".split(" "); - return e; - }(a.ASNative); - h.ID3Info = u; - })(h.media || (h.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.dummyConstructor, e = c.AVM2.Runtime.asCoerceString, m = function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = function(a) { function c() { - l("public flash.media.Microphone"); + t("public flash.media.Camera"); } __extends(c, a); - Object.defineProperty(c, "names", {get:function() { - u("public flash.media.Microphone::get names"); - return[]; + Object.defineProperty(c.prototype, "names", {get:function() { + u("public flash.media.Camera::get names"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "isSupported", {get:function() { - u("public flash.media.Microphone::get isSupported"); - return!1; + Object.defineProperty(c.prototype, "isSupported", {get:function() { + u("public flash.media.Camera::get isSupported"); }, enumerable:!0, configurable:!0}); - c.getMicrophone = function(a) { - p("public flash.media.Microphone::static getMicrophone"); + c.getCamera = function(a) { + void 0 === a && (a = null); + l(a); + u("public flash.media.Camera::static getCamera"); }; - c.getEnhancedMicrophone = function(a) { - p("public flash.media.Microphone::static getEnhancedMicrophone"); + c._scanHardware = function() { + u("public flash.media.Camera::static _scanHardware"); }; - Object.defineProperty(c.prototype, "rate", {get:function() { - p("public flash.media.Microphone::get rate"); - }, set:function(a) { - p("public flash.media.Microphone::set rate"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "codec", {get:function() { - p("public flash.media.Microphone::get codec"); - }, set:function(a) { - e(a); - p("public flash.media.Microphone::set codec"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "framesPerPacket", {get:function() { - p("public flash.media.Microphone::get framesPerPacket"); - }, set:function(a) { - p("public flash.media.Microphone::set framesPerPacket"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "encodeQuality", {get:function() { - p("public flash.media.Microphone::get encodeQuality"); - }, set:function(a) { - p("public flash.media.Microphone::set encodeQuality"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "noiseSuppressionLevel", {get:function() { - p("public flash.media.Microphone::get noiseSuppressionLevel"); - }, set:function(a) { - p("public flash.media.Microphone::set noiseSuppressionLevel"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "enableVAD", {get:function() { - p("public flash.media.Microphone::get enableVAD"); - }, set:function(a) { - p("public flash.media.Microphone::set enableVAD"); - }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "activityLevel", {get:function() { - p("public flash.media.Microphone::get activityLevel"); + u("public flash.media.Camera::get activityLevel"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "gain", {get:function() { - p("public flash.media.Microphone::get gain"); - }, set:function(a) { - p("public flash.media.Microphone::set gain"); + Object.defineProperty(c.prototype, "bandwidth", {get:function() { + u("public flash.media.Camera::get bandwidth"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "currentFPS", {get:function() { + u("public flash.media.Camera::get currentFPS"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "fps", {get:function() { + u("public flash.media.Camera::get fps"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "height", {get:function() { + u("public flash.media.Camera::get height"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "index", {get:function() { - p("public flash.media.Microphone::get index"); + u("public flash.media.Camera::get index"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "keyFrameInterval", {get:function() { + u("public flash.media.Camera::get keyFrameInterval"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "loopback", {get:function() { + u("public flash.media.Camera::get loopback"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "motionLevel", {get:function() { + u("public flash.media.Camera::get motionLevel"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(c.prototype, "motionTimeout", {get:function() { + u("public flash.media.Camera::get motionTimeout"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "muted", {get:function() { - p("public flash.media.Microphone::get muted"); + u("public flash.media.Camera::get muted"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "name", {get:function() { - p("public flash.media.Microphone::get name"); + u("public flash.media.Camera::get name"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "silenceLevel", {get:function() { - p("public flash.media.Microphone::get silenceLevel"); + Object.defineProperty(c.prototype, "position", {get:function() { + u("public flash.media.Camera::get position"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "silenceTimeout", {get:function() { - p("public flash.media.Microphone::get silenceTimeout"); + Object.defineProperty(c.prototype, "quality", {get:function() { + u("public flash.media.Camera::get quality"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "useEchoSuppression", {get:function() { - p("public flash.media.Microphone::get useEchoSuppression"); + Object.defineProperty(c.prototype, "width", {get:function() { + u("public flash.media.Camera::get width"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "soundTransform", {get:function() { - p("public flash.media.Microphone::get soundTransform"); - }, set:function(a) { - p("public flash.media.Microphone::set soundTransform"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "enhancedOptions", {get:function() { - p("public flash.media.Microphone::get enhancedOptions"); - }, set:function(a) { - p("public flash.media.Microphone::set enhancedOptions"); - }, enumerable:!0, configurable:!0}); - c.prototype.setSilenceLevel = function(a, e) { - p("public flash.media.Microphone::setSilenceLevel"); + c.prototype.setCursor = function(a) { + u("public flash.media.Camera::setCursor"); }; - c.prototype.setUseEchoSuppression = function(a) { - p("public flash.media.Microphone::setUseEchoSuppression"); + c.prototype.setKeyFrameInterval = function(a) { + u("public flash.media.Camera::setKeyFrameInterval"); }; - c.prototype.setLoopBack = function(a) { - p("public flash.media.Microphone::setLoopBack"); + c.prototype.setLoopback = function(a) { + u("public flash.media.Camera::setLoopback"); + }; + c.prototype.setMode = function(a, c, d, f) { + u("public flash.media.Camera::setMode"); + }; + c.prototype.setMotionLevel = function(a, c) { + u("public flash.media.Camera::setMotionLevel"); + }; + c.prototype.setQuality = function(a, c) { + u("public flash.media.Camera::setQuality"); + }; + c.prototype.drawToBitmapData = function(a) { + u("public flash.media.Camera::drawToBitmapData"); + }; + c.prototype.copyToByteArray = function(a, c) { + u("public flash.media.Camera::copyToByteArray"); + }; + c.prototype.copyToVector = function(a, c) { + u("public flash.media.Camera::copyToVector"); }; c.classInitializer = null; c.initializer = null; @@ -37942,45 +37852,179 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.events.EventDispatcher); - h.Microphone = m; + k.Camera = c; })(a.media || (a.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.media.ID3Info"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = "songName artist album year comment genre track".split(" "); + return c; + }(a.ASNative); + k.ID3Info = t; + })(k.media || (k.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.Debug.dummyConstructor, c = d.AVM2.Runtime.asCoerceString, h = function(a) { + function d() { + l("public flash.media.Microphone"); + } + __extends(d, a); + Object.defineProperty(d, "names", {get:function() { + t("public flash.media.Microphone::get names"); + return[]; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d, "isSupported", {get:function() { + t("public flash.media.Microphone::get isSupported"); + return!1; + }, enumerable:!0, configurable:!0}); + d.getMicrophone = function(a) { + u("public flash.media.Microphone::static getMicrophone"); + }; + d.getEnhancedMicrophone = function(a) { + u("public flash.media.Microphone::static getEnhancedMicrophone"); + }; + Object.defineProperty(d.prototype, "rate", {get:function() { + u("public flash.media.Microphone::get rate"); + }, set:function(a) { + u("public flash.media.Microphone::set rate"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "codec", {get:function() { + u("public flash.media.Microphone::get codec"); + }, set:function(a) { + c(a); + u("public flash.media.Microphone::set codec"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "framesPerPacket", {get:function() { + u("public flash.media.Microphone::get framesPerPacket"); + }, set:function(a) { + u("public flash.media.Microphone::set framesPerPacket"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "encodeQuality", {get:function() { + u("public flash.media.Microphone::get encodeQuality"); + }, set:function(a) { + u("public flash.media.Microphone::set encodeQuality"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "noiseSuppressionLevel", {get:function() { + u("public flash.media.Microphone::get noiseSuppressionLevel"); + }, set:function(a) { + u("public flash.media.Microphone::set noiseSuppressionLevel"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "enableVAD", {get:function() { + u("public flash.media.Microphone::get enableVAD"); + }, set:function(a) { + u("public flash.media.Microphone::set enableVAD"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "activityLevel", {get:function() { + u("public flash.media.Microphone::get activityLevel"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "gain", {get:function() { + u("public flash.media.Microphone::get gain"); + }, set:function(a) { + u("public flash.media.Microphone::set gain"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "index", {get:function() { + u("public flash.media.Microphone::get index"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "muted", {get:function() { + u("public flash.media.Microphone::get muted"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "name", {get:function() { + u("public flash.media.Microphone::get name"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "silenceLevel", {get:function() { + u("public flash.media.Microphone::get silenceLevel"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "silenceTimeout", {get:function() { + u("public flash.media.Microphone::get silenceTimeout"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "useEchoSuppression", {get:function() { + u("public flash.media.Microphone::get useEchoSuppression"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "soundTransform", {get:function() { + u("public flash.media.Microphone::get soundTransform"); + }, set:function(a) { + u("public flash.media.Microphone::set soundTransform"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "enhancedOptions", {get:function() { + u("public flash.media.Microphone::get enhancedOptions"); + }, set:function(a) { + u("public flash.media.Microphone::set enhancedOptions"); + }, enumerable:!0, configurable:!0}); + d.prototype.setSilenceLevel = function(a, c) { + u("public flash.media.Microphone::setSilenceLevel"); + }; + d.prototype.setUseEchoSuppression = function(a) { + u("public flash.media.Microphone::setUseEchoSuppression"); + }; + d.prototype.setLoopBack = function(a) { + u("public flash.media.Microphone::setLoopBack"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.events.EventDispatcher); + k.Microphone = h; + })(a.media || (a.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { (function(v) { - function p(a, e) { - var d = document.createElement("audio"); - d.canPlayType(a.mimeType) ? (d.preload = "metadata", d.src = URL.createObjectURL(new Blob([a.data], {type:a.mimeType})), d.load(), d.addEventListener("loadedmetadata", function() { - e({duration:1E3 * this.duration}); - })) : e({duration:0}); + function u(a, c) { + var b = document.createElement("audio"); + b.canPlayType(a.mimeType) ? (b.preload = "metadata", b.src = URL.createObjectURL(new Blob([a.data], {type:a.mimeType})), b.load(), b.addEventListener("loadedmetadata", function() { + c({duration:1E3 * this.duration}); + })) : c({duration:0}); } - var u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.Telemetry, t = c.AVM2.ABC.Multiname, q = function() { + var t = d.Debug.notImplemented, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.Telemetry, p = d.AVM2.ABC.Multiname, s = function() { return function() { }; - }(), n = function(k) { - function f(a, b) { - h.events.EventDispatcher.instanceConstructorNoInitialize.call(this); + }(), m = function(g) { + function f(a, e) { + k.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this._isBuffering = this._isURLInaccessible = !1; - this.load(a, b); + this.load(a, e); } - __extends(f, k); + __extends(f, g); Object.defineProperty(f.prototype, "url", {get:function() { return this._url; }, enumerable:!0, configurable:!0}); Object.defineProperty(f.prototype, "isURLInaccessible", {get:function() { - e("public flash.media.Sound::get isURLInaccessible"); + c("public flash.media.Sound::get isURLInaccessible"); return this._isURLInaccessible; }, enumerable:!0, configurable:!0}); Object.defineProperty(f.prototype, "length", {get:function() { return this._length; }, enumerable:!0, configurable:!0}); Object.defineProperty(f.prototype, "isBuffering", {get:function() { - e("public flash.media.Sound::get isBuffering"); + c("public flash.media.Sound::get isBuffering"); return this._isBuffering; }, enumerable:!0, configurable:!0}); Object.defineProperty(f.prototype, "bytesLoaded", {get:function() { @@ -37992,74 +38036,74 @@ var RtmpJs; Object.defineProperty(f.prototype, "id3", {get:function() { return this._id3; }, enumerable:!0, configurable:!0}); - f.prototype.loadCompressedDataFromByteArray = function(a, b) { - u("public flash.media.Sound::loadCompressedDataFromByteArray"); + f.prototype.loadCompressedDataFromByteArray = function(a, e) { + t("public flash.media.Sound::loadCompressedDataFromByteArray"); }; - f.prototype.loadPCMFromByteArray = function(a, b, e, c, f) { - void 0 === e && (e = "float"); - l(e); - u("public flash.media.Sound::loadPCMFromByteArray"); + f.prototype.loadPCMFromByteArray = function(a, e, c, f, d) { + void 0 === c && (c = "float"); + l(c); + t("public flash.media.Sound::loadPCMFromByteArray"); }; - f.prototype.play = function(d, b, e) { - void 0 === d && (d = 0); + f.prototype.play = function(b, e, c) { void 0 === b && (b = 0); - void 0 === e && (e = null); - d = +d; - b |= 0; - var f = new h.media.SoundChannel; + void 0 === e && (e = 0); + void 0 === c && (c = null); + b = +b; + e |= 0; + var f = new k.media.SoundChannel; f._sound = this; - f._soundTransform = c.isNullOrUndefined(e) ? new h.media.SoundTransform : e; - this._playQueue.push({channel:f, startTime:d}); + f._soundTransform = d.isNullOrUndefined(c) ? new k.media.SoundTransform : c; + this._playQueue.push({channel:f, startTime:b}); if (a.disableAudioOption.value) { return f; } - this._soundData && (a.webAudioOption.value || a.webAudioMP3Option.value ? this._soundData.pcm ? f._playSoundDataViaChannel(this._soundData, d, b) : "audio/mpeg" === this._soundData.mimeType && a.webAudioMP3Option.value ? c.SWF.MP3DecoderSession.processAll(new Uint8Array(this._soundData.data)).then(function(a) { + this._soundData && (a.webAudioOption.value || a.webAudioMP3Option.value ? this._soundData.pcm ? f._playSoundDataViaChannel(this._soundData, b, e) : "audio/mpeg" === this._soundData.mimeType && a.webAudioMP3Option.value ? d.SWF.MP3DecoderSession.processAll(new Uint8Array(this._soundData.data)).then(function(a) { this._soundData.pcm = a.data; this._soundData.end = a.data.length; - f._playSoundDataViaChannel(this._soundData, d, b); + f._playSoundDataViaChannel(this._soundData, b, e); }.bind(this), function(a) { console.warn("Unable to decode MP3 data: " + a); - }) : console.warn("Unable to decode packaged sound data of type: " + this._soundData.mimeType) : f._playSoundDataViaAudio(this._soundData, d, b)); + }) : console.warn("Unable to decode packaged sound data of type: " + this._soundData.mimeType) : f._playSoundDataViaAudio(this._soundData, b, e)); return f; }; f.prototype.close = function() { - e("public flash.media.Sound::close"); + c("public flash.media.Sound::close"); }; - f.prototype.extract = function(a, b, e) { - u("public flash.media.Sound::extract"); + f.prototype.extract = function(a, e, c) { + t("public flash.media.Sound::extract"); }; - f.prototype.load = function(d, b) { - if (d) { - var e = this, c = this._stream = new h.net.URLStream, f = new h.utils.ByteArray, k = 0, l = a.webAudioOption.value, m = null, n = new q; - n.completed = !1; - c.addEventListener("progress", function(a) { - e._bytesLoaded = a[t.getPublicQualifiedName("bytesLoaded")]; - e._bytesTotal = a[t.getPublicQualifiedName("bytesTotal")]; - l && !m && (m = decodeMP3(n, function(a, b) { - 0 === e._length && (e._soundData = n, e._playQueue.forEach(function(a) { - a.channel._playSoundDataViaChannel(n, a.startTime); + f.prototype.load = function(b, e) { + if (b) { + var c = this, f = this._stream = new k.net.URLStream, d = new k.utils.ByteArray, g = 0, h = a.webAudioOption.value, l = null, m = new s; + m.completed = !1; + f.addEventListener("progress", function(a) { + c._bytesLoaded = a[p.getPublicQualifiedName("bytesLoaded")]; + c._bytesTotal = a[p.getPublicQualifiedName("bytesTotal")]; + h && !l && (l = decodeMP3(m, function(a, b) { + 0 === c._length && (c._soundData = m, c._playQueue.forEach(function(a) { + a.channel._playSoundDataViaChannel(m, a.startTime); })); - e._length = b ? 1E3 * a : 1E3 * Math.max(a, m.estimateDuration(e._bytesTotal)); + c._length = b ? 1E3 * a : 1E3 * Math.max(a, l.estimateDuration(c._bytesTotal)); })); - var b = c.bytesAvailable; - c.readBytes(f, k, b); - m && m.pushData(new Uint8Array(f._buffer, k, b)); - k += b; - e.dispatchEvent(a); + var b = f.bytesAvailable; + f.readBytes(d, g, b); + l && l.pushData(new Uint8Array(d._buffer, g, b)); + g += b; + c.dispatchEvent(a); }); - c.addEventListener("complete", function(a) { - e.dispatchEvent(a); - n.data = f._buffer; - n.mimeType = "audio/mpeg"; - n.completed = !0; - l || (e._soundData = n, p(n, function(a) { - e._length = a.duration; - }), e._playQueue.forEach(function(a) { - a.channel._playSoundDataViaAudio(n, a.startTime); + f.addEventListener("complete", function(a) { + c.dispatchEvent(a); + m.data = d._buffer; + m.mimeType = "audio/mpeg"; + m.completed = !0; + h || (c._soundData = m, u(m, function(a) { + c._length = a.duration; + }), c._playQueue.forEach(function(a) { + a.channel._playSoundDataViaAudio(m, a.startTime); })); - m && m.close(); + l && l.close(); }); - c.load(d); + f.load(b); } }; f.classInitializer = null; @@ -38067,97 +38111,97 @@ var RtmpJs; this._playQueue = []; this._url = null; this._bytesLoaded = this._bytesTotal = this._length = 0; - this._id3 = new h.media.ID3Info; - m.instance.reportTelemetry({topic:"feature", feature:5}); + this._id3 = new k.media.ID3Info; + h.instance.reportTelemetry({topic:"feature", feature:5}); if (a) { - var b = new q; - b.sampleRate = a.sampleRate; - b.channels = a.channels; - b.completed = !0; - a.pcm && (b.pcm = a.pcm, b.end = a.pcm.length); - a.packaged && (b.data = a.packaged.data.buffer, b.mimeType = a.packaged.mimeType); - var e = this; - p(b, function(a) { - e._length = a.duration; + var e = new s; + e.sampleRate = a.sampleRate; + e.channels = a.channels; + e.completed = !0; + a.pcm && (e.pcm = a.pcm, e.end = a.pcm.length); + a.packaged && (e.data = a.packaged.data.buffer, e.mimeType = a.packaged.mimeType); + var c = this; + u(e, function(a) { + c._length = a.duration; }); - this._soundData = b; + this._soundData = e; } }; f.classSymbols = null; f.instanceSymbols = null; return f; - }(h.events.EventDispatcher); - v.Sound = n; - n = function(a) { - function e(d) { - a.call(this, d, h.media.Sound); + }(k.events.EventDispatcher); + v.Sound = m; + m = function(a) { + function c(b) { + a.call(this, b, k.media.Sound); } - __extends(e, a); - e.FromData = function(a) { - var b = new e(a); - b.channels = a.channels; - b.sampleRate = a.sampleRate; - b.pcm = a.pcm; - b.packaged = a.packaged; - return b; + __extends(c, a); + c.FromData = function(a) { + var e = new c(a); + e.channels = a.channels; + e.sampleRate = a.sampleRate; + e.pcm = a.pcm; + e.packaged = a.packaged; + return e; }; - return e; - }(c.Timeline.Symbol); - v.SoundSymbol = n; - })(h.media || (h.media = {})); + return c; + }(d.Timeline.Symbol); + v.SoundSymbol = m; + })(k.media || (k.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.assert, u = c.Debug.dummyConstructor, l = c.Debug.somewhatImplemented, e = c.Debug.error, m = function() { - function a(e, c) { - this._sourceRate = e; - this._targetRate = c; + (function(k) { + var u = d.Debug.dummyConstructor, t = d.Debug.somewhatImplemented, l = d.Debug.error, c = function() { + function a(c, d) { + this._sourceRate = c; + this._targetRate = d; this._tail = []; this._sourceOffset = 0; } - a.prototype.getData = function(a, e) { - for (var d = this._sourceRate / this._targetRate, b = this._sourceOffset, c = Math.ceil((e - 1) * d + b) + 1, l = [], m = 0;m < a.length;m++) { - l.push(new Float32Array(c)); + a.prototype.getData = function(a, c) { + for (var f = this._sourceRate / this._targetRate, b = this._sourceOffset, e = Math.ceil((c - 1) * f + b) + 1, d = [], h = 0;h < a.length;h++) { + d.push(new Float32Array(e)); } - this.ondatarequested({data:l, count:c}); - for (m = 0;m < a.length;m++) { - for (var h = a[m], n = l[m], q = 0;q < e;q++) { - var p = q * d + b, s = p | 0, t = Math.ceil(p) | 0, u = 0 > s ? this._tail[m] : n[s]; - s === t ? h[q] = u : (p -= s, h[q] = u * (1 - p) + n[t] * p); + this.ondatarequested({data:d, count:e}); + for (h = 0;h < a.length;h++) { + for (var l = a[h], k = d[h], p = 0;p < c;p++) { + var s = p * f + b, r = s | 0, u = Math.ceil(s) | 0, t = 0 > r ? this._tail[h] : k[r]; + r === u ? l[p] = t : (s -= r, l[p] = t * (1 - s) + k[u] * s); } - this._tail[m] = n[c - 1]; + this._tail[h] = k[e - 1]; } - this._sourceOffset = (e - 1) * d + b - (c - 1); + this._sourceOffset = (c - 1) * f + b - (e - 1); }; return a; - }(), t = function() { - function a(e, c) { - var d = a._cachedContext; - d || (d = new AudioContext, a._cachedContext = d); - this._context = d; - this._contextSampleRate = d.sampleRate || 44100; - this._channels = c; - this._sampleRate = e; - this._contextSampleRate !== e && (this._resampler = new m(e, this._contextSampleRate), this._resampler.ondatarequested = function(a) { + }(), h = function() { + function a(d, g) { + var f = a._cachedContext; + f || (f = new AudioContext, a._cachedContext = f); + this._context = f; + this._contextSampleRate = f.sampleRate || 44100; + this._channels = g; + this._sampleRate = d; + this._contextSampleRate !== d && (this._resampler = new c(d, this._contextSampleRate), this._resampler.ondatarequested = function(a) { this.requestData(a.data, a.count); }.bind(this)); } a.prototype.setVolume = function(a) { }; a.prototype.start = function() { - var a = this._context.createScriptProcessor(2048, 0, this._channels), e = this; + var a = this._context.createScriptProcessor(2048, 0, this._channels), c = this; a.onaudioprocess = function(a) { - for (var b = [], c = 0;c < e._channels;c++) { - b.push(a.outputBuffer.getChannelData(c)); + for (var b = [], e = 0;e < c._channels;e++) { + b.push(a.outputBuffer.getChannelData(e)); } a = b[0].length; - e._resampler ? e._resampler.getData(b, a) : e.requestData(b, a); + c._resampler ? c._resampler.getData(b, a) : c.requestData(b, a); }; a.connect(this._context.destination); this._source = a; @@ -38165,12 +38209,12 @@ var RtmpJs; a.prototype.stop = function() { this._source.disconnect(this._context.destination); }; - a.prototype.requestData = function(a, e) { - var d = this._channels, b = new Float32Array(e * d); + a.prototype.requestData = function(a, c) { + var f = this._channels, b = new Float32Array(c * f); this.ondatarequested({data:b, count:b.length}); - for (var c = 0, l = 0;c < e;c++) { - for (var m = 0;m < d;m++) { - a[m][c] = b[l++]; + for (var e = 0, d = 0;e < c;e++) { + for (var h = 0;h < f;h++) { + a[h][e] = b[d++]; } } }; @@ -38178,263 +38222,262 @@ var RtmpJs; return "undefined" !== typeof AudioContext; }; return a; - }(), q = function(m) { - function k() { + }(), p = function(c) { + function m() { u("public flash.media.SoundChannel"); } - __extends(k, m); - Object.defineProperty(k.prototype, "position", {get:function() { + __extends(m, c); + Object.defineProperty(m.prototype, "position", {get:function() { return this._position; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "soundTransform", {get:function() { + Object.defineProperty(m.prototype, "soundTransform", {get:function() { return this._soundTransform; - }, set:function(e) { - l("public flash.media.SoundChannel::set soundTransform"); - this._soundTransform = c.isNullOrUndefined(e) ? new a.media.SoundTransform : e; - h.SoundMixer._updateSoundSource(this); + }, set:function(c) { + t("public flash.media.SoundChannel::set soundTransform"); + this._soundTransform = d.isNullOrUndefined(c) ? new a.media.SoundTransform : c; + k.SoundMixer._updateSoundSource(this); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "leftPeak", {get:function() { + Object.defineProperty(m.prototype, "leftPeak", {get:function() { return this._leftPeak; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "rightPeak", {get:function() { + Object.defineProperty(m.prototype, "rightPeak", {get:function() { return this._rightPeak; }, enumerable:!0, configurable:!0}); - k.prototype.stop = function() { - this._element && (h.SoundMixer._unregisterSoundSource(this), this._element.loop = !1, this._element.pause(), this._element.removeAttribute("src")); - this._audioChannel && (h.SoundMixer._unregisterSoundSource(this), this._audioChannel.stop()); + m.prototype.stop = function() { + this._element && (k.SoundMixer._unregisterSoundSource(this), this._element.loop = !1, this._element.pause(), this._element.removeAttribute("src")); + this._audioChannel && (k.SoundMixer._unregisterSoundSource(this), this._audioChannel.stop()); }; - k.prototype._playSoundDataViaAudio = function(e, d, b) { - if (e.mimeType) { - h.SoundMixer._registerSoundSource(this); - this._position = d; - var c = this, k = 0, l = document.createElement("audio"); - l.canPlayType(e.mimeType) ? (l.preload = "metadata", l.loop = 0 < b, l.src = URL.createObjectURL(new Blob([e.data], {type:e.mimeType})), l.addEventListener("loadeddata", function() { - l.currentTime = d / 1E3; - l.play(); - }), l.addEventListener("timeupdate", function() { - var a = l.currentTime; - b && k > a && (--b, b || (l.loop = !1), a < d / 1E3 && (l.currentTime = d / 1E3)); - c._position = 1E3 * (k = a); - }), l.addEventListener("ended", function() { - h.SoundMixer._unregisterSoundSource(c); - c.dispatchEvent(new a.events.Event("soundComplete", !1, !1)); - c._element = null; - }), this._element = l, h.SoundMixer._updateSoundSource(this)) : console.error('ERROR: "' + e.mimeType + '" type playback is not supported by the browser'); + m.prototype._playSoundDataViaAudio = function(c, f, b) { + if (c.mimeType) { + k.SoundMixer._registerSoundSource(this); + this._position = f; + var e = this, d = 0, h = document.createElement("audio"); + h.canPlayType(c.mimeType) ? (h.preload = "metadata", h.loop = 0 < b, h.src = URL.createObjectURL(new Blob([c.data], {type:c.mimeType})), h.addEventListener("loadeddata", function() { + h.currentTime = f / 1E3; + h.play(); + }), h.addEventListener("timeupdate", function() { + var a = h.currentTime; + b && d > a && (--b, b || (h.loop = !1), a < f / 1E3 && (h.currentTime = f / 1E3)); + e._position = 1E3 * (d = a); + }), h.addEventListener("ended", function() { + k.SoundMixer._unregisterSoundSource(e); + e.dispatchEvent(new a.events.Event("soundComplete", !1, !1)); + e._element = null; + }), this._element = h, k.SoundMixer._updateSoundSource(this)) : console.error('ERROR: "' + c.mimeType + '" type playback is not supported by the browser'); } }; - k.prototype._playSoundDataViaChannel = function(c, d, b) { - p(c.pcm, "no pcm data found"); - h.SoundMixer._registerSoundSource(this); - var g = this, k = Math.round(d / 1E3 * c.sampleRate) * c.channels, l = k; - this._position = d; - t.isSupported ? d = new t(c.sampleRate, c.channels) : (e("PCM data playback is not supported by the browser"), d = void 0); - this._audioChannel = d; - this._audioChannel.ondatarequested = function(d) { - var e = c.end; - if (l >= e && c.completed) { - h.SoundMixer._unregisterSoundSource(this), g._audioChannel.stop(), g.dispatchEvent(new a.events.Event("soundComplete", !1, !1)); + m.prototype._playSoundDataViaChannel = function(c, f, b) { + k.SoundMixer._registerSoundSource(this); + var e = this, d = Math.round(f / 1E3 * c.sampleRate) * c.channels, n = d; + this._position = f; + h.isSupported ? f = new h(c.sampleRate, c.channels) : (l("PCM data playback is not supported by the browser"), f = void 0); + this._audioChannel = f; + this._audioChannel.ondatarequested = function(f) { + var h = c.end; + if (n >= h && c.completed) { + k.SoundMixer._unregisterSoundSource(this), e._audioChannel.stop(), e.dispatchEvent(new a.events.Event("soundComplete", !1, !1)); } else { - var m = d.count; - d = d.data; - var n = c.pcm; + var l = f.count; + f = f.data; + var m = c.pcm; do { - for (var q = Math.min(e - l, m), p = 0;p < q;p++) { - d[p] = n[l++]; + for (var p = Math.min(h - n, l), s = 0;s < p;s++) { + f[s] = m[n++]; } - m -= q; - if (l >= e) { + l -= p; + if (n >= h) { if (!b) { break; } b--; - l = k; + n = d; } - } while (0 < m); - g._position = l / c.sampleRate / c.channels * 1E3; + } while (0 < l); + e._position = n / c.sampleRate / c.channels * 1E3; } }; this._audioChannel.start(); - h.SoundMixer._updateSoundSource(this); + k.SoundMixer._updateSoundSource(this); }; - k.prototype.stopSound = function() { + m.prototype.stopSound = function() { this.stop(); }; - k.prototype.updateSoundLevels = function(a) { + m.prototype.updateSoundLevels = function(a) { this._element && (this._element.volume = 0 >= a ? 0 : 1 <= a ? 1 : a); this._audioChannel && this._audioChannel.setVolume(a); }; - k.classInitializer = null; - k.initializer = function(e) { + m.classInitializer = null; + m.initializer = function(c) { this._element = null; this._rightPeak = this._leftPeak = this._position = 0; this._pcmData = null; this._soundTransform = new a.media.SoundTransform; }; - k.classSymbols = null; - k.instanceSymbols = null; - return k; - }(a.events.EventDispatcher); - h.SoundChannel = q; - })(a.media || (a.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e(a, e) { - p("public flash.media.SoundLoaderContext"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.SoundLoaderContext = s; - })(h.media || (h.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = function(a) { - function m() { - u("public flash.media.SoundMixer"); - } - __extends(m, a); - Object.defineProperty(m, "bufferTime", {get:function() { - p("public flash.media.SoundMixer::get bufferTime"); - return m._bufferTime; - }, set:function(a) { - e("public flash.media.SoundMixer::set bufferTime"); - m._bufferTime = a | 0; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(m, "soundTransform", {get:function() { - e("public flash.media.SoundMixer::get soundTransform"); - return c.isNullOrUndefined(m._soundTransform) ? new h.media.SoundTransform : new h.media.SoundTransform(m._soundTransform.volume, m._soundTransform.pan); - }, set:function(a) { - e("public flash.media.SoundMixer::set soundTransform"); - m._soundTransform = c.isNullOrUndefined(a) ? new h.media.SoundTransform : a; - m._updateAllSoundSources(); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(m, "audioPlaybackMode", {get:function() { - p("public flash.media.SoundMixer::get audioPlaybackMode"); - }, set:function(a) { - l(a); - p("public flash.media.SoundMixer::set audioPlaybackMode"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(m, "useSpeakerphoneForVoice", {get:function() { - p("public flash.media.SoundMixer::get useSpeakerphoneForVoice"); - }, set:function(a) { - p("public flash.media.SoundMixer::set useSpeakerphoneForVoice"); - }, enumerable:!0, configurable:!0}); - m.stopAll = function() { - m._registeredSoundSources.forEach(function(a) { - a.stopSound(); - }); - m._registeredSoundSources = []; - }; - m.computeSpectrum = function(a, c, f) { - e("public flash.media.SoundMixer::static computeSpectrum"); - c = new Float32Array(1024); - for (f = 0;1024 > f;f++) { - c[f] = Math.random(); - } - a.writeRawBytes(c); - a.position = 0; - }; - m.areSoundsInaccessible = function() { - p("public flash.media.SoundMixer::static areSoundsInaccessible"); - }; - m._getMasterVolume = function() { - return m._masterVolume; - }; - m._setMasterVolume = function(a) { - m._masterVolume = +a; - m._updateAllSoundSources(); - }; - m._registerSoundSource = function(a) { - m._registeredSoundSources.push(a); - }; - m._unregisterSoundSource = function(a) { - a = m._registeredSoundSources.indexOf(a); - 0 <= a && m._registeredSoundSources.splice(a, 1); - }; - m._updateSoundSource = function(a) { - var e = a.soundTransform.volume; - m._soundTransform && (e *= m._soundTransform.volume); - e *= m._getMasterVolume(); - a.updateSoundLevels(e); - }; - m._updateAllSoundSources = function() { - m._registeredSoundSources.forEach(m._updateSoundSource); - }; - m.classInitializer = null; - m.initializer = null; m.classSymbols = null; m.instanceSymbols = null; - m._masterVolume = 1; - m._registeredSoundSources = []; - m._bufferTime = 0; return m; - }(a.ASNative); - v.SoundMixer = m; - })(h.media || (h.media = {})); + }(a.events.EventDispatcher); + k.SoundChannel = p; + })(a.media || (a.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = c.Debug.somewhatImplemented, l = function(a) { - function c(a, e) { - p("public flash.media.SoundTransform"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a, c) { + r("public flash.media.SoundLoaderContext"); } __extends(c, a); - Object.defineProperty(c.prototype, "volume", {get:function() { + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; + }(a.ASNative); + k.SoundLoaderContext = t; + })(k.media || (k.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(v) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = function(a) { + function h() { + t("public flash.media.SoundMixer"); + } + __extends(h, a); + Object.defineProperty(h, "bufferTime", {get:function() { + u("public flash.media.SoundMixer::get bufferTime"); + return h._bufferTime; + }, set:function(a) { + c("public flash.media.SoundMixer::set bufferTime"); + h._bufferTime = a | 0; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(h, "soundTransform", {get:function() { + c("public flash.media.SoundMixer::get soundTransform"); + return d.isNullOrUndefined(h._soundTransform) ? new k.media.SoundTransform : new k.media.SoundTransform(h._soundTransform.volume, h._soundTransform.pan); + }, set:function(a) { + c("public flash.media.SoundMixer::set soundTransform"); + h._soundTransform = d.isNullOrUndefined(a) ? new k.media.SoundTransform : a; + h._updateAllSoundSources(); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(h, "audioPlaybackMode", {get:function() { + u("public flash.media.SoundMixer::get audioPlaybackMode"); + }, set:function(a) { + l(a); + u("public flash.media.SoundMixer::set audioPlaybackMode"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(h, "useSpeakerphoneForVoice", {get:function() { + u("public flash.media.SoundMixer::get useSpeakerphoneForVoice"); + }, set:function(a) { + u("public flash.media.SoundMixer::set useSpeakerphoneForVoice"); + }, enumerable:!0, configurable:!0}); + h.stopAll = function() { + h._registeredSoundSources.forEach(function(a) { + a.stopSound(); + }); + h._registeredSoundSources = []; + }; + h.computeSpectrum = function(a, d, f) { + c("public flash.media.SoundMixer::static computeSpectrum"); + d = new Float32Array(1024); + for (f = 0;1024 > f;f++) { + d[f] = Math.random(); + } + a.writeRawBytes(d); + a.position = 0; + }; + h.areSoundsInaccessible = function() { + u("public flash.media.SoundMixer::static areSoundsInaccessible"); + }; + h._getMasterVolume = function() { + return h._masterVolume; + }; + h._setMasterVolume = function(a) { + h._masterVolume = +a; + h._updateAllSoundSources(); + }; + h._registerSoundSource = function(a) { + h._registeredSoundSources.push(a); + }; + h._unregisterSoundSource = function(a) { + a = h._registeredSoundSources.indexOf(a); + 0 <= a && h._registeredSoundSources.splice(a, 1); + }; + h._updateSoundSource = function(a) { + var c = a.soundTransform.volume; + h._soundTransform && (c *= h._soundTransform.volume); + c *= h._getMasterVolume(); + a.updateSoundLevels(c); + }; + h._updateAllSoundSources = function() { + h._registeredSoundSources.forEach(h._updateSoundSource); + }; + h.classInitializer = null; + h.initializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + h._masterVolume = 1; + h._registeredSoundSources = []; + h._bufferTime = 0; + return h; + }(a.ASNative); + v.SoundMixer = h; + })(k.media || (k.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.Debug.somewhatImplemented, l = function(a) { + function d(a, c) { + r("public flash.media.SoundTransform"); + } + __extends(d, a); + Object.defineProperty(d.prototype, "volume", {get:function() { return this._volume; }, set:function(a) { this._volume = +a; this._updateTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "leftToLeft", {get:function() { + Object.defineProperty(d.prototype, "leftToLeft", {get:function() { return this._leftToLeft; }, set:function(a) { this._leftToLeft = +a; this._updateTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "leftToRight", {get:function() { + Object.defineProperty(d.prototype, "leftToRight", {get:function() { return this._leftToRight; }, set:function(a) { this._leftToRight = +a; this._updateTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "rightToRight", {get:function() { + Object.defineProperty(d.prototype, "rightToRight", {get:function() { return this._rightToRight; }, set:function(a) { this._rightToRight = +a; this._updateTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "rightToLeft", {get:function() { + Object.defineProperty(d.prototype, "rightToLeft", {get:function() { return this._rightToLeft; }, set:function(a) { this._rightToLeft = +a; this._updateTransform(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "pan", {get:function() { + Object.defineProperty(d.prototype, "pan", {get:function() { return 0 === this._leftToRight && 0 === this._rightToLeft ? 1 - this._leftToLeft * this._leftToLeft : 0; }, set:function(a) { this.leftToLeft = Math.sqrt(1 - a); @@ -38442,141 +38485,140 @@ var RtmpJs; this.rightToRight = Math.sqrt(1 + a); this.rightToLeft = 0; }, enumerable:!0, configurable:!0}); - c.prototype._updateTransform = function() { - s("public flash.media.SoundTransform::_updateTransform"); + d.prototype._updateTransform = function() { + t("public flash.media.SoundTransform::_updateTransform"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - h.SoundTransform = l; - })(h.media || (h.media = {})); + k.SoundTransform = l; + })(k.media || (k.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.media.StageVideo"); + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.media.StageVideo"); } - __extends(c, a); - Object.defineProperty(c.prototype, "viewPort", {get:function() { - p("public flash.media.StageVideo::get viewPort"); + __extends(d, a); + Object.defineProperty(d.prototype, "viewPort", {get:function() { + u("public flash.media.StageVideo::get viewPort"); }, set:function(a) { - p("public flash.media.StageVideo::set viewPort"); + u("public flash.media.StageVideo::set viewPort"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "pan", {get:function() { - p("public flash.media.StageVideo::get pan"); + Object.defineProperty(d.prototype, "pan", {get:function() { + u("public flash.media.StageVideo::get pan"); }, set:function(a) { - p("public flash.media.StageVideo::set pan"); + u("public flash.media.StageVideo::set pan"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "zoom", {get:function() { - p("public flash.media.StageVideo::get zoom"); + Object.defineProperty(d.prototype, "zoom", {get:function() { + u("public flash.media.StageVideo::get zoom"); }, set:function(a) { - p("public flash.media.StageVideo::set zoom"); + u("public flash.media.StageVideo::set zoom"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "depth", {get:function() { - p("public flash.media.StageVideo::get depth"); + Object.defineProperty(d.prototype, "depth", {get:function() { + u("public flash.media.StageVideo::get depth"); }, set:function(a) { - p("public flash.media.StageVideo::set depth"); + u("public flash.media.StageVideo::set depth"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "videoWidth", {get:function() { - p("public flash.media.StageVideo::get videoWidth"); + Object.defineProperty(d.prototype, "videoWidth", {get:function() { + u("public flash.media.StageVideo::get videoWidth"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "videoHeight", {get:function() { - p("public flash.media.StageVideo::get videoHeight"); + Object.defineProperty(d.prototype, "videoHeight", {get:function() { + u("public flash.media.StageVideo::get videoHeight"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "colorSpaces", {get:function() { - p("public flash.media.StageVideo::get colorSpaces"); + Object.defineProperty(d.prototype, "colorSpaces", {get:function() { + u("public flash.media.StageVideo::get colorSpaces"); }, enumerable:!0, configurable:!0}); - c.prototype.attachNetStream = function(a) { - p("public flash.media.StageVideo::attachNetStream"); + d.prototype.attachNetStream = function(a) { + u("public flash.media.StageVideo::attachNetStream"); }; - c.prototype.attachCamera = function(a) { - p("public flash.media.StageVideo::attachCamera"); + d.prototype.attachCamera = function(a) { + u("public flash.media.StageVideo::attachCamera"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.events.EventDispatcher); - h.StageVideo = l; + k.StageVideo = l; })(a.media || (a.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.media.StageVideoAvailability"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.media.StageVideoAvailability"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.AVAILABLE = "available"; - e.UNAVAILABLE = "unavailable"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.AVAILABLE = "available"; + c.UNAVAILABLE = "unavailable"; + return c; }(a.ASNative); - h.StageVideoAvailability = s; - })(h.media || (h.media = {})); + k.StageVideoAvailability = t; + })(k.media || (k.media = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.assert, e = function(e) { - function c(e, l) { - void 0 === e && (e = 320); - void 0 === l && (l = 240); + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = function(c) { + function d(c, h) { + void 0 === c && (c = 320); + void 0 === h && (h = 240); a.display.DisplayObject.instanceConstructorNoInitialize.call(this); - e = e | 0 || 320; - l = l | 0 || 240; - this._setFillAndLineBoundsFromWidthAndHeight(20 * e, 20 * l); + c = c | 0 || 320; + h = h | 0 || 240; + this._setFillAndLineBoundsFromWidthAndHeight(20 * c, 20 * h); } - __extends(c, e); - Object.defineProperty(c.prototype, "deblocking", {get:function() { + __extends(d, c); + Object.defineProperty(d.prototype, "deblocking", {get:function() { return this._deblocking; }, set:function(a) { this._deblocking = a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "smoothing", {get:function() { + Object.defineProperty(d.prototype, "smoothing", {get:function() { return this._smoothing; }, set:function(a) { this._smoothing = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "videoWidth", {get:function() { + Object.defineProperty(d.prototype, "videoWidth", {get:function() { return this._videoWidth; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "videoHeight", {get:function() { + Object.defineProperty(d.prototype, "videoHeight", {get:function() { return this._videoHeight; }, enumerable:!0, configurable:!0}); - c.prototype._containsPointDirectly = function(a, e, c, f) { - l(this._getContentBounds().contains(a, e)); + d.prototype._containsPointDirectly = function(a, c, d, g) { return!0; }; - c.prototype.clear = function() { - u("public flash.media.Video::clear"); + d.prototype.clear = function() { + t("public flash.media.Video::clear"); }; - c.prototype.attachNetStream = function(a) { + d.prototype.attachNetStream = function(a) { if (this._netStream !== a) { this._netStream && (this._netStream._videoReferrer = null); if (this._netStream = a) { @@ -38585,556 +38627,575 @@ var RtmpJs; this._setDirtyFlags(33554432); } }; - c.prototype.attachCamera = function(a) { - p("public flash.media.Video::attachCamera"); - }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; - }(a.display.DisplayObject); - h.Video = e; - })(a.media || (a.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.media.VideoStreamSettings"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.VideoStreamSettings = s; - })(h.media || (h.media = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a, e, l) { - p("public flash.net.FileFilter"); - } - __extends(c, a); - Object.defineProperty(c.prototype, "description", {get:function() { - return this._description; - }, set:function(a) { - this._description = s(a); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "extension", {get:function() { - return this._extension; - }, set:function(a) { - this._extension = s(a); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "macType", {get:function() { - return this._macType; - }, set:function(a) { - this._macType = s(a); - }, enumerable:!0, configurable:!0}); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; - }(a.ASNative); - h.FileFilter = l; - })(h.net || (h.net = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.FileLoadingService, t = function(a) { - function c() { - u("public flash.net.LocalConnection"); - } - __extends(c, a); - c.prototype.close = function() { - p("public flash.net.LocalConnection::close"); - }; - c.prototype.connect = function(a) { - l(a); - p("public flash.net.LocalConnection::connect"); - }; - Object.defineProperty(c.prototype, "domain", {get:function() { - e("public flash.net.LocalConnection::get domain"); - var a = m.instance.resolveUrl("/"); - return(a = /:\/\/(.+?)[:?#\/]/.exec(a)) && a[1]; - }, enumerable:!0, configurable:!0}); - c.prototype.send = function(a, e) { - l(a); - l(e); - p("public flash.net.LocalConnection::send"); - }; - Object.defineProperty(c.prototype, "client", {get:function() { - p("public flash.net.LocalConnection::get client"); - }, set:function(a) { - p("public flash.net.LocalConnection::set client"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "isPerUser", {get:function() { - p("public flash.net.LocalConnection::get isPerUser"); - }, set:function(a) { - p("public flash.net.LocalConnection::set isPerUser"); - }, enumerable:!0, configurable:!0}); - c.prototype.allowDomain = function() { - p("public flash.net.LocalConnection::allowDomain"); - }; - c.prototype.allowInsecureDomain = function() { - p("public flash.net.LocalConnection::allowInsecureDomain"); - }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; - }(a.events.EventDispatcher); - h.LocalConnection = t; - })(a.net || (a.net = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.wrapJSObject, t = c.Telemetry, q = c.AVM2.AS.flash.events, n = function(a) { - function c() { - u("public flash.net.NetConnection"); - } - __extends(c, a); - Object.defineProperty(c, "defaultObjectEncoding", {get:function() { - return c._defaultObjectEncoding; - }, set:function(a) { - c._defaultObjectEncoding = a >>> 0; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "connected", {get:function() { - return this._connected; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "uri", {get:function() { - return this._uri; - }, enumerable:!0, configurable:!0}); - c.prototype.connect = function(a) { - a = l(a); - e("public flash.net.NetConnection::connect"); - if (this._uri = a) { - var b = RtmpJs.parseConnectionString(a); - if (!b || !b.host || "rtmp" !== b.protocol && "rtmpt" !== b.protocol && "rtmps" !== b.protocol) { - this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Failed"}))); - } else { - a = m({app:b.app, flashver:"MAC 11,6,602,180", swfUrl:"http://localhost:5080/demos/Something.swf", tcUrl:a, fpad:!1, audioCodecs:4095, videoCodecs:255, videoFunction:1, pageUrl:"http://localhost:5080/demos/Something.html", objectEncoding:0}); - this._protocol = b.protocol; - var c = "rtmps" === b.protocol || "rtmpt" === b.protocol && (443 === b.port || 8443 === b.port); - this._usingTLS = c; - this._rtmpConnection = b = "rtmp" === b.protocol || "rtmps" === b.protocol ? new RtmpJs.Browser.RtmpTransport({host:b.host, port:b.port || 1935, ssl:c}) : new RtmpJs.Browser.RtmptTransport({host:b.host, port:b.port || 80, ssl:c}); - this._rtmpCreateStreamCallbacks = [null, null]; - b.onresponse = function(a) { - }; - b.onevent = function(a) { - }; - b.onconnected = function(a) { - this._connected = !0; - this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Success"}))); - }.bind(this); - b.onstreamcreated = function(a) { - console.log("#streamcreated: " + a.streamId); - var b = this._rtmpCreateStreamCallbacks[a.transactionId]; - delete this._rtmpCreateStreamCallbacks[a.transactionId]; - b(a.stream, a.streamId); - }.bind(this); - b.connect(a); - } - } else { - this._connected = !0, this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Success"}))); - } - }; - c.prototype._createRtmpStream = function(a) { - var b = this._rtmpCreateStreamCallbacks.length; - this._rtmpCreateStreamCallbacks[b] = a; - this._rtmpConnection.createStream(b); - }; - Object.defineProperty(c.prototype, "client", {get:function() { - return this._client; - }, set:function(a) { - this._client = a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "objectEncoding", {get:function() { - return this._objectEncoding; - }, set:function(a) { - a >>>= 0; - e("public flash.net.NetConnection::set objectEncoding"); - this._objectEncoding = a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "proxyType", {get:function() { - return this._proxyType; - }, set:function(a) { - a = l(a); - e("public flash.net.NetConnection::set proxyType"); - this._proxyType = a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "connectedProxyType", {get:function() { - p("public flash.net.NetConnection::get connectedProxyType"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "usingTLS", {get:function() { - return this._usingTLS; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "protocol", {get:function() { - return this._protocol; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "maxPeerConnections", {get:function() { - p("public flash.net.NetConnection::get maxPeerConnections"); - }, set:function(a) { - p("public flash.net.NetConnection::set maxPeerConnections"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "nearID", {get:function() { - p("public flash.net.NetConnection::get nearID"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "farID", {get:function() { - p("public flash.net.NetConnection::get farID"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "nearNonce", {get:function() { - p("public flash.net.NetConnection::get nearNonce"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "farNonce", {get:function() { - p("public flash.net.NetConnection::get farNonce"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "unconnectedPeerStreams", {get:function() { - p("public flash.net.NetConnection::get unconnectedPeerStreams"); - }, enumerable:!0, configurable:!0}); - c.prototype.ctor = function() { - this._uri = null; - this._connected = !1; - this._client = null; - this._proxyType = "none"; - this._objectEncoding = c.defaultObjectEncoding; - this._usingTLS = !1; - this._protocol = null; - t.instance.reportTelemetry({topic:"feature", feature:6}); - }; - c.prototype.invoke = function(a) { - return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1)); - }; - c.prototype.invokeWithArgsArray = function(a, b) { - return this._invoke.call(this, a >>> 0, b); - }; - c.prototype._invoke = function(a, b) { - var c = !1; - switch(a) { - case 2: - c = !0; - } - (c ? e : p)("private flash.net.NetConnection::_invoke (" + a + ")"); - }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = ["close", "addHeader", "call"]; - c._defaultObjectEncoding = 3; - return c; - }(a.events.EventDispatcher); - h.NetConnection = n; - })(a.net || (a.net = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.wrapJSObject, t = c.AVM2.AS.flash.events; - v = c.AVM2.AS.flash.net; - var q = c.AVM2.AS.flash.utils, n = c.FileLoadingService, k = c.AVM2.Runtime.AVM2, f = function(a) { - function d(a, e) { - void 0 === e && (e = "connectToFMS"); - t.EventDispatcher.instanceConstructorNoInitialize.call(this); - this._connection = a; - this._peerID = l(e); - this._id = h.display.DisplayObject.getNextSyncID(); - this._isDirty = !0; - this._soundTransform = new h.media.SoundTransform; - this._contentTypeHint = null; - this._checkPolicyFile = !0; - this._videoStream = new b; - this._videoStream._onEnsurePlay = function() { - this._notifyVideoControl(2, {paused:!1, time:NaN}); - }.bind(this); - } - __extends(d, a); - d.prototype.dispose = function() { - p("public flash.net.NetStream::dispose"); - }; - d.prototype._getVideoStreamURL = function() { - return this._videoStream.url; - }; - d.prototype.play = function(a) { - h.media.SoundMixer._registerSoundSource(this); - a = l(a); - k.instance.globals["Shumway.Player.Utils"].registerEventListener(this._id, this.processVideoEvent.bind(this)); - this._connection && this._connection.uri ? this._videoStream.playInConnection(this._connection, a) : null !== a || this._connection ? this._videoStream.play(a, this.checkPolicyFile) : this._videoStream.openInDataGenerationMode(); - this._notifyVideoControl(1, {url:this._videoStream.url}); - }; - d.prototype.play2 = function(a) { - p("public flash.net.NetStream::play2"); - }; - Object.defineProperty(d.prototype, "info", {get:function() { - p("public flash.net.NetStream::get info"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastInfo", {get:function() { - p("public flash.net.NetStream::get multicastInfo"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "soundTransform", {get:function() { - return this._soundTransform; - }, set:function(a) { - this._soundTransform = a; - h.media.SoundMixer._updateSoundSource(this); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "checkPolicyFile", {get:function() { - return this._checkPolicyFile; - }, set:function(a) { - this._checkPolicyFile = !!a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "client", {get:function() { - return this._client; - }, set:function(a) { - e("public flash.net.NetStream::set client"); - this._client = a; - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "objectEncoding", {get:function() { - p("public flash.net.NetStream::get objectEncoding"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastPushNeighborLimit", {get:function() { - p("public flash.net.NetStream::get multicastPushNeighborLimit"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastPushNeighborLimit"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastWindowDuration", {get:function() { - p("public flash.net.NetStream::get multicastWindowDuration"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastWindowDuration"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastRelayMarginDuration", {get:function() { - p("public flash.net.NetStream::get multicastRelayMarginDuration"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastRelayMarginDuration"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastAvailabilityUpdatePeriod", {get:function() { - p("public flash.net.NetStream::get multicastAvailabilityUpdatePeriod"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastAvailabilityUpdatePeriod"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastFetchPeriod", {get:function() { - p("public flash.net.NetStream::get multicastFetchPeriod"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastFetchPeriod"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multicastAvailabilitySendToAll", {get:function() { - p("public flash.net.NetStream::get multicastAvailabilitySendToAll"); - }, set:function(a) { - p("public flash.net.NetStream::set multicastAvailabilitySendToAll"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "farID", {get:function() { - p("public flash.net.NetStream::get farID"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "nearNonce", {get:function() { - p("public flash.net.NetStream::get nearNonce"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "farNonce", {get:function() { - p("public flash.net.NetStream::get farNonce"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "peerStreams", {get:function() { - p("public flash.net.NetStream::get peerStreams"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "audioReliable", {get:function() { - p("public flash.net.NetStream::get audioReliable"); - }, set:function(a) { - p("public flash.net.NetStream::set audioReliable"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "videoReliable", {get:function() { - p("public flash.net.NetStream::get videoReliable"); - }, set:function(a) { - p("public flash.net.NetStream::set videoReliable"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "dataReliable", {get:function() { - p("public flash.net.NetStream::get dataReliable"); - }, set:function(a) { - p("public flash.net.NetStream::set dataReliable"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "audioSampleAccess", {get:function() { - p("public flash.net.NetStream::get audioSampleAccess"); - }, set:function(a) { - p("public flash.net.NetStream::set audioSampleAccess"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "videoSampleAccess", {get:function() { - p("public flash.net.NetStream::get videoSampleAccess"); - }, set:function(a) { - p("public flash.net.NetStream::set videoSampleAccess"); - }, enumerable:!0, configurable:!0}); - d.prototype.appendBytes = function(a) { - a = new Uint8Array(a._buffer, 0, a.length); - this._videoStream.appendBytes(a); - }; - d.prototype.appendBytesAction = function(a) { - this._videoStream.appendBytesAction(a); - }; - Object.defineProperty(d.prototype, "useHardwareDecoder", {get:function() { - p("public flash.net.NetStream::get useHardwareDecoder"); - }, set:function(a) { - p("public flash.net.NetStream::set useHardwareDecoder"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "useJitterBuffer", {get:function() { - p("public flash.net.NetStream::get useJitterBuffer"); - }, set:function(a) { - p("public flash.net.NetStream::set useJitterBuffer"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "videoStreamSettings", {get:function() { - p("public flash.net.NetStream::get videoStreamSettings"); - }, set:function(a) { - p("public flash.net.NetStream::set videoStreamSettings"); - }, enumerable:!0, configurable:!0}); - d.prototype.invoke = function(a) { - return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1)); - }; - d.prototype.invokeWithArgsArray = function(a, b) { - return this._invoke.call(this, a >>> 0, b); - }; - Object.defineProperty(d.prototype, "inBufferSeek", {get:function() { - return this._inBufferSeek; - }, set:function(a) { - this._inBufferSeek = !!a; - }, enumerable:!0, configurable:!0}); - d.prototype._invoke = function(a, b) { - var d = !1, c; - switch(a) { - case 4: - this._videoStream.bufferTime = b[0]; - d = !0; - break; - case 202: - switch(b[1]) { - case "pause": - d = !0; - this._notifyVideoControl(2, {paused:!!b[3], time:b[4] / 1E3}); - break; - case "seek": - d = !0, this._notifyVideoControl(3, {time:b[3] / 1E3}); - } - break; - case 300: - c = this._notifyVideoControl(4, null); - d = !0; - break; - case 302: - c = this._videoStream.bufferTime; - d = !0; - break; - case 303: - c = this._notifyVideoControl(5, null); - d = !0; - break; - case 305: - c = this._notifyVideoControl(7, null); - d = !0; - break; - case 306: - c = this._notifyVideoControl(8, null), d = !0; - } - (d ? e : p)("NetStream._invoke (" + a + ")"); - return c; - }; - d.prototype._notifyVideoControl = function(a, b) { - return k.instance.globals["Shumway.Player.Utils"].notifyVideoControl(this._id, a, b); - }; - d.prototype.processVideoEvent = function(a, b) { - this._videoStream.processVideoPlaybackEvent(a, b); - switch(a) { - case 0: - h.media.SoundMixer._updateSoundSource(this); - break; - case 1: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Play.Start", level:"status"}))); - break; - case 2: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Play.Stop", level:"status"}))); - h.media.SoundMixer._unregisterSoundSource(this); - break; - case 3: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Buffer.Full", level:"status"}))); - break; - case 5: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Buffer.Empty", level:"status"}))); - break; - case 6: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:4 === b.code ? "NetStream.Play.NoSupportedTrackFound" : 3 === b.code ? "NetStream.Play.FileStructureInvalid" : "NetStream.Play.StreamNotFound", level:"error"}))); - break; - case 8: - this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Seek.Notify", level:"status"}))); - break; - case 7: - if (this._client) { - var d = {}; - d.asSetPublicProperty("width", b.videoWidth); - d.asSetPublicProperty("height", b.videoHeight); - d.asSetPublicProperty("duration", b.duration); - this._client.asCallPublicProperty("onMetaData", [d]); - } - ; - } - }; - d.prototype.stopSound = function() { - this.pause(); - }; - d.prototype.updateSoundLevels = function(a) { - this._notifyVideoControl(6, {volume:a}); + d.prototype.attachCamera = function(a) { + u("public flash.media.Video::attachCamera"); }; d.classInitializer = null; d.initializer = null; d.classSymbols = null; d.instanceSymbols = null; - d.DIRECT_CONNECTIONS = "directConnections"; - d.CONNECT_TO_FMS = "connectToFMS"; return d; - }(h.events.EventDispatcher); + }(a.display.DisplayObject); + k.Video = l; + })(a.media || (a.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.media.VideoStreamSettings"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; + }(a.ASNative); + k.VideoStreamSettings = t; + })(k.media || (k.media = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a, c, h) { + r("public flash.net.FileFilter"); + } + __extends(d, a); + Object.defineProperty(d.prototype, "description", {get:function() { + return this._description; + }, set:function(a) { + this._description = t(a); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "extension", {get:function() { + return this._extension; + }, set:function(a) { + this._extension = t(a); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "macType", {get:function() { + return this._macType; + }, set:function(a) { + this._macType = t(a); + }, enumerable:!0, configurable:!0}); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + k.FileFilter = l; + })(k.net || (k.net = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.FileLoadingService, p = function(a) { + function d() { + t("public flash.net.LocalConnection"); + } + __extends(d, a); + d.prototype.close = function() { + u("public flash.net.LocalConnection::close"); + }; + d.prototype.connect = function(a) { + l(a); + u("public flash.net.LocalConnection::connect"); + }; + Object.defineProperty(d.prototype, "domain", {get:function() { + c("public flash.net.LocalConnection::get domain"); + var a = h.instance.resolveUrl("/"); + return(a = /:\/\/(.+?)[:?#\/]/.exec(a)) && a[1]; + }, enumerable:!0, configurable:!0}); + d.prototype.send = function(a, c) { + l(a); + l(c); + u("public flash.net.LocalConnection::send"); + }; + Object.defineProperty(d.prototype, "client", {get:function() { + u("public flash.net.LocalConnection::get client"); + }, set:function(a) { + u("public flash.net.LocalConnection::set client"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "isPerUser", {get:function() { + u("public flash.net.LocalConnection::get isPerUser"); + }, set:function(a) { + u("public flash.net.LocalConnection::set isPerUser"); + }, enumerable:!0, configurable:!0}); + d.prototype.allowDomain = function() { + u("public flash.net.LocalConnection::allowDomain"); + }; + d.prototype.allowInsecureDomain = function() { + u("public flash.net.LocalConnection::allowInsecureDomain"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.events.EventDispatcher); + k.LocalConnection = p; + })(a.net || (a.net = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.AVM2.Runtime.wrapJSObject, p = d.Telemetry, s = d.AVM2.AS.flash.events, m = function(g) { + function f() { + t("public flash.net.NetConnection"); + } + __extends(f, g); + Object.defineProperty(f, "defaultObjectEncoding", {get:function() { + return f._defaultObjectEncoding; + }, set:function(a) { + f._defaultObjectEncoding = a >>> 0; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "connected", {get:function() { + return this._connected; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "uri", {get:function() { + return this._uri; + }, enumerable:!0, configurable:!0}); + f.prototype.connect = function(b) { + b = l(b); + c("public flash.net.NetConnection::connect"); + if (this._uri = b) { + var e = RtmpJs.parseConnectionString(b); + if (!e || !e.host || "rtmp" !== e.protocol && "rtmpt" !== e.protocol && "rtmps" !== e.protocol) { + this.dispatchEvent(new s.NetStatusEvent(s.NetStatusEvent.NET_STATUS, !1, !1, h({level:"status", code:"NetConnection.Connect.Failed"}))); + } else { + var f = d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"]; + b = h({app:e.app, flashver:a.system.Capabilities.version, swfUrl:f.swfUrl, tcUrl:b, fpad:!1, audioCodecs:4095, videoCodecs:255, videoFunction:1, pageUrl:f.pageUrl || f.swfUrl, objectEncoding:0}); + this._protocol = e.protocol; + this._usingTLS = f = "rtmps" === e.protocol || "rtmpt" === e.protocol && (443 === e.port || 8443 === e.port); + this._rtmpConnection = e = "rtmp" === e.protocol || "rtmps" === e.protocol ? new RtmpJs.Browser.RtmpTransport({host:e.host, port:e.port || 1935, ssl:f}) : new RtmpJs.Browser.RtmptTransport({host:e.host, port:e.port || 80, ssl:f}); + this._rtmpCreateStreamCallbacks = [null, null]; + e.onresponse = function(a) { + }; + e.onevent = function(a) { + }; + e.onconnected = function(a) { + this._connected = !0; + this.dispatchEvent(new s.NetStatusEvent(s.NetStatusEvent.NET_STATUS, !1, !1, h({level:"status", code:"NetConnection.Connect.Success"}))); + }.bind(this); + e.onstreamcreated = function(a) { + console.log("#streamcreated: " + a.streamId); + var b = this._rtmpCreateStreamCallbacks[a.transactionId]; + delete this._rtmpCreateStreamCallbacks[a.transactionId]; + b(a.stream, a.streamId); + }.bind(this); + e.connect(b); + } + } else { + this._connected = !0, this.dispatchEvent(new s.NetStatusEvent(s.NetStatusEvent.NET_STATUS, !1, !1, h({level:"status", code:"NetConnection.Connect.Success"}))); + } + }; + f.prototype._createRtmpStream = function(a) { + var e = this._rtmpCreateStreamCallbacks.length; + this._rtmpCreateStreamCallbacks[e] = a; + this._rtmpConnection.createStream(e); + }; + Object.defineProperty(f.prototype, "client", {get:function() { + return this._client; + }, set:function(a) { + this._client = a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "objectEncoding", {get:function() { + return this._objectEncoding; + }, set:function(a) { + a >>>= 0; + c("public flash.net.NetConnection::set objectEncoding"); + this._objectEncoding = a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "proxyType", {get:function() { + return this._proxyType; + }, set:function(a) { + a = l(a); + c("public flash.net.NetConnection::set proxyType"); + this._proxyType = a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "connectedProxyType", {get:function() { + u("public flash.net.NetConnection::get connectedProxyType"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "usingTLS", {get:function() { + return this._usingTLS; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "protocol", {get:function() { + return this._protocol; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "maxPeerConnections", {get:function() { + u("public flash.net.NetConnection::get maxPeerConnections"); + }, set:function(a) { + u("public flash.net.NetConnection::set maxPeerConnections"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "nearID", {get:function() { + u("public flash.net.NetConnection::get nearID"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "farID", {get:function() { + u("public flash.net.NetConnection::get farID"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "nearNonce", {get:function() { + u("public flash.net.NetConnection::get nearNonce"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "farNonce", {get:function() { + u("public flash.net.NetConnection::get farNonce"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(f.prototype, "unconnectedPeerStreams", {get:function() { + u("public flash.net.NetConnection::get unconnectedPeerStreams"); + }, enumerable:!0, configurable:!0}); + f.prototype.ctor = function() { + this._uri = null; + this._connected = !1; + this._client = null; + this._proxyType = "none"; + this._objectEncoding = f.defaultObjectEncoding; + this._usingTLS = !1; + this._protocol = null; + p.instance.reportTelemetry({topic:"feature", feature:6}); + }; + f.prototype.invoke = function(a) { + return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1)); + }; + f.prototype.invokeWithArgsArray = function(a, e) { + return this._invoke.call(this, a >>> 0, e); + }; + f.prototype._invoke = function(a, e) { + var f = !1; + switch(a) { + case 2: + f = !0; + } + (f ? c : u)("private flash.net.NetConnection::_invoke (" + a + ")"); + }; + f.classInitializer = null; + f.initializer = null; + f.classSymbols = null; + f.instanceSymbols = ["close", "addHeader", "call"]; + f._defaultObjectEncoding = 3; + return f; + }(a.events.EventDispatcher); + k.NetConnection = m; + })(a.net || (a.net = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(v) { + function u(a) { + var b = "video/mp4"; + a && (b += ';codecs="' + a.join(",") + '"'); + return b; + } + var t = d.Debug.notImplemented, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.AVM2.Runtime.wrapJSObject, p = d.AVM2.AS.flash.events; + v = d.AVM2.AS.flash.net; + var s = d.AVM2.AS.flash.utils, m = d.FileLoadingService, g = d.AVM2.Runtime.AVM2, f = function(a) { + function b(a, c) { + void 0 === c && (c = "connectToFMS"); + p.EventDispatcher.instanceConstructorNoInitialize.call(this); + this._connection = a; + this._peerID = l(c); + this._id = k.display.DisplayObject.getNextSyncID(); + this._isDirty = !0; + this._soundTransform = new k.media.SoundTransform; + this._contentTypeHint = null; + this._checkPolicyFile = !0; + this._videoStream = new e; + this._videoStream._onEnsurePlay = function() { + this._notifyVideoControl(9, null); + }.bind(this); + this._metaData = this._resourceName = null; + } + __extends(b, a); + b.prototype.dispose = function() { + t("public flash.net.NetStream::dispose"); + }; + b.prototype._getVideoStreamURL = function() { + return this._videoStream.url; + }; + b.prototype.play = function(a) { + k.media.SoundMixer._registerSoundSource(this); + a = l(a); + g.instance.globals["Shumway.Player.Utils"].registerEventListener(this._id, this.processVideoEvent.bind(this)); + this._connection && this._connection.uri ? this._videoStream.playInConnection(this._connection, a) : null === a ? this._videoStream.openInDataGenerationMode() : this._videoStream.play(a, this.checkPolicyFile); + this._notifyVideoControl(1, {url:this._videoStream.url}); + }; + b.prototype.play2 = function(a) { + t("public flash.net.NetStream::play2"); + }; + Object.defineProperty(b.prototype, "info", {get:function() { + c("public flash.net.NetStream::get info"); + var a = Math.ceil(this._invoke(304, null)); + return new v.NetStreamInfo(232, 233 * (1 + a), 232, 32, 32 * (1 + a), 200, 200 * (1 + a), 1, 1 * (1 + a), 233 * a, 0, 32, 200, 1, 1, 1, 1, 0, 0, 0, this._metaData, null, this._connection.uri, this._resourceName, !1); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastInfo", {get:function() { + t("public flash.net.NetStream::get multicastInfo"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "soundTransform", {get:function() { + return this._soundTransform; + }, set:function(a) { + this._soundTransform = a; + k.media.SoundMixer._updateSoundSource(this); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "checkPolicyFile", {get:function() { + return this._checkPolicyFile; + }, set:function(a) { + this._checkPolicyFile = !!a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "client", {get:function() { + return this._client; + }, set:function(a) { + c("public flash.net.NetStream::set client"); + this._client = a; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "objectEncoding", {get:function() { + t("public flash.net.NetStream::get objectEncoding"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastPushNeighborLimit", {get:function() { + t("public flash.net.NetStream::get multicastPushNeighborLimit"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastPushNeighborLimit"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastWindowDuration", {get:function() { + t("public flash.net.NetStream::get multicastWindowDuration"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastWindowDuration"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastRelayMarginDuration", {get:function() { + t("public flash.net.NetStream::get multicastRelayMarginDuration"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastRelayMarginDuration"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastAvailabilityUpdatePeriod", {get:function() { + t("public flash.net.NetStream::get multicastAvailabilityUpdatePeriod"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastAvailabilityUpdatePeriod"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastFetchPeriod", {get:function() { + t("public flash.net.NetStream::get multicastFetchPeriod"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastFetchPeriod"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "multicastAvailabilitySendToAll", {get:function() { + t("public flash.net.NetStream::get multicastAvailabilitySendToAll"); + }, set:function(a) { + t("public flash.net.NetStream::set multicastAvailabilitySendToAll"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "farID", {get:function() { + t("public flash.net.NetStream::get farID"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "nearNonce", {get:function() { + t("public flash.net.NetStream::get nearNonce"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "farNonce", {get:function() { + t("public flash.net.NetStream::get farNonce"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "peerStreams", {get:function() { + t("public flash.net.NetStream::get peerStreams"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "audioReliable", {get:function() { + t("public flash.net.NetStream::get audioReliable"); + }, set:function(a) { + t("public flash.net.NetStream::set audioReliable"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "videoReliable", {get:function() { + t("public flash.net.NetStream::get videoReliable"); + }, set:function(a) { + t("public flash.net.NetStream::set videoReliable"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "dataReliable", {get:function() { + t("public flash.net.NetStream::get dataReliable"); + }, set:function(a) { + t("public flash.net.NetStream::set dataReliable"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "audioSampleAccess", {get:function() { + t("public flash.net.NetStream::get audioSampleAccess"); + }, set:function(a) { + t("public flash.net.NetStream::set audioSampleAccess"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "videoSampleAccess", {get:function() { + t("public flash.net.NetStream::get videoSampleAccess"); + }, set:function(a) { + t("public flash.net.NetStream::set videoSampleAccess"); + }, enumerable:!0, configurable:!0}); + b.prototype.appendBytes = function(a) { + a = new Uint8Array(a._buffer, 0, a.length); + this._videoStream.appendBytes(a); + }; + b.prototype.appendBytesAction = function(a) { + this._videoStream.appendBytesAction(a); + }; + Object.defineProperty(b.prototype, "useHardwareDecoder", {get:function() { + t("public flash.net.NetStream::get useHardwareDecoder"); + }, set:function(a) { + t("public flash.net.NetStream::set useHardwareDecoder"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "useJitterBuffer", {get:function() { + t("public flash.net.NetStream::get useJitterBuffer"); + }, set:function(a) { + t("public flash.net.NetStream::set useJitterBuffer"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(b.prototype, "videoStreamSettings", {get:function() { + t("public flash.net.NetStream::get videoStreamSettings"); + }, set:function(a) { + t("public flash.net.NetStream::set videoStreamSettings"); + }, enumerable:!0, configurable:!0}); + b.prototype.invoke = function(a) { + return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1)); + }; + b.prototype.invokeWithArgsArray = function(a, b) { + return this._invoke.call(this, a >>> 0, b); + }; + Object.defineProperty(b.prototype, "inBufferSeek", {get:function() { + return this._inBufferSeek; + }, set:function(a) { + this._inBufferSeek = !!a; + }, enumerable:!0, configurable:!0}); + b.prototype._invoke = function(a, b) { + var e = !1, f; + switch(a) { + case 4: + this._videoStream.bufferTime = b[0]; + e = !0; + break; + case 202: + switch(b[1]) { + case "pause": + e = !0; + this._notifyVideoControl(2, {paused:!!b[3], time:b[4] / 1E3}); + break; + case "seek": + e = !0, this._notifyVideoControl(3, {time:b[3] / 1E3}); + } + break; + case 300: + f = this._notifyVideoControl(4, null); + e = !0; + break; + case 302: + f = this._videoStream.bufferTime; + e = !0; + break; + case 303: + f = this._notifyVideoControl(5, null); + e = !0; + break; + case 305: + f = this._notifyVideoControl(7, null); + e = !0; + break; + case 306: + f = this._notifyVideoControl(8, null), e = !0; + } + (e ? c : t)("NetStream._invoke (" + a + ")"); + return f; + }; + b.prototype._notifyVideoControl = function(a, b) { + return g.instance.globals["Shumway.Player.Utils"].notifyVideoControl(this._id, a, b); + }; + b.prototype.processVideoEvent = function(a, b) { + this._videoStream.processVideoPlaybackEvent(a, b); + switch(a) { + case 0: + k.media.SoundMixer._updateSoundSource(this); + break; + case 2: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Play.Start", level:"status"}))); + break; + case 3: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Buffer.Flush", level:"status"}))); + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Play.Stop", level:"status"}))); + k.media.SoundMixer._unregisterSoundSource(this); + break; + case 5: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Buffer.Full", level:"status"}))); + break; + case 4: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Buffer.Empty", level:"status"}))); + break; + case 11: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:4 === b.code ? "NetStream.Play.NoSupportedTrackFound" : 3 === b.code ? "NetStream.Play.FileStructureInvalid" : "NetStream.Play.StreamNotFound", level:"error"}))); + break; + case 6: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Pause.Notify", level:"status"}))); + break; + case 7: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Unpause.Notify", level:"status"}))); + break; + case 8: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Seek.Notify", level:"status"}))); + break; + case 9: + this.dispatchEvent(new p.NetStatusEvent(p.NetStatusEvent.NET_STATUS, !1, !1, h({code:"NetStream.Seek.Complete", level:"status"}))); + break; + case 1: + if (this._client) { + var e = {}; + e.asSetPublicProperty("width", b.videoWidth); + e.asSetPublicProperty("height", b.videoHeight); + e.asSetPublicProperty("duration", b.duration); + this._client.asCallPublicProperty("onMetaData", [e]); + } + ; + } + }; + b.prototype.stopSound = function() { + this.pause(); + }; + b.prototype.updateSoundLevels = function(a) { + this._notifyVideoControl(6, {volume:a}); + }; + b.classInitializer = null; + b.initializer = null; + b.classSymbols = null; + b.instanceSymbols = null; + b.DIRECT_CONNECTIONS = "directConnections"; + b.CONNECT_TO_FMS = "connectToFMS"; + return b; + }(k.events.EventDispatcher); v.NetStream = f; - var d; + var b; (function(a) { a[a.CLOSED = 0] = "CLOSED"; a[a.OPENED = 1] = "OPENED"; a[a.ENDED = 2] = "ENDED"; a[a.OPENED_DATA_GENERATION = 3] = "OPENED_DATA_GENERATION"; a[a.ERROR = 4] = "ERROR"; - })(d || (d = {})); - var b = function() { + })(b || (b = {})); + var e = function() { function b() { - this._domReady = new c.PromiseWrapper; - this._metadataReady = new c.PromiseWrapper; + this._domReady = new d.PromiseWrapper; + this._metadataReady = new d.PromiseWrapper; this._started = !1; this._buffer = "empty"; this._bufferTime = .1; - this._contentTypeHint = this._mediaSourceBuffer = this._mediaSource = this._url = null; + this._contentTypeHint = this._mediaSourceBufferLock = this._mediaSourceBuffer = this._mediaSource = this._url = null; this._state = 0; + this._head = null; } Object.defineProperty(b.prototype, "state", {get:function() { return this._state; @@ -39145,119 +39206,121 @@ var RtmpJs; Object.defineProperty(b.prototype, "url", {get:function() { return this._url; }, enumerable:!0, configurable:!0}); - b.prototype.play = function(b, d) { - u(0 === this._state); - this._state = 1; - var c = a.mediaSourceOption.value; - c && "undefined" === typeof MediaSource && (console.warn("MediaSource API is not enabled, falling back to regular playback"), c = !1); - if (c) { - var g = new MediaSource; - g.addEventListener("sourceopen", function(a) { - this._mediaSource = g; + b.prototype.play = function(b, e) { + var f = a.mediaSourceOption.value; + f && "undefined" === typeof MediaSource && (console.warn("MediaSource API is not enabled, falling back to regular playback"), f = !1); + if (/\.flv($|\?)/i.test(b) || f) { + this.openInDataGenerationMode(); + f = new v.URLRequest(b); + f._checkPolicyFile = e; + var d = new v.URLStream; + d.addEventListener("httpStatus", function(a) { + (a = a.asGetPublicProperty("responseHeaders").filter(function(a) { + return "Content-Type" === a.asGetPublicProperty("name"); + })[0]) && a.asGetPublicProperty("value"); }.bind(this)); - g.addEventListener("sourceend", function(a) { - this._mediaSource = null; + d.addEventListener("progress", function(a) { + a = d.bytesAvailable; + var b = new s.ByteArray; + d.readBytes(b, 0, a); + a = new Uint8Array(b._buffer, 0, b.length); + this.appendBytes(a); }.bind(this)); - if (b) { - this._url = URL.createObjectURL(g); - c = new v.URLRequest(b); - c._checkPolicyFile = d; - var f = new v.URLStream; - f.addEventListener("httpStatus", function(a) { - if (a = a.asGetPublicProperty("responseHeaders").filter(function(a) { - return "Content-Type" === a.asGetPublicProperty("name"); - })[0]) { - a = a.asGetPublicProperty("value"), "application/octet-stream" !== a && (this._contentTypeHint = a); - } - }.bind(this)); - f.addEventListener("progress", function(a) { - a = f.bytesAvailable; - var b = new q.ByteArray; - f.readBytes(b, 0, a); - a = new Uint8Array(b._buffer, 0, b.length); - this.appendBytes(a); - }.bind(this)); - f.addEventListener("complete", function(a) { - this.appendBytesAction("endSequence"); - }.bind(this)); - f.load(c); - } else { - this._url = null; - } + d.addEventListener("complete", function(a) { + this.appendBytesAction("endSequence"); + }.bind(this)); + d.load(f); } else { - e("public flash.net.NetStream::play"), this._url = n.instance.resolveUrl(b); + c("public flash.net.NetStream::play"), this._state = 1, this._url = m.instance.resolveUrl(b); } }; b.prototype.playInConnection = function(a, b) { this.openInDataGenerationMode(); - var d = this, e, c = {packets:0, init:function(a) { + var e = this, c, f = {packets:0, init:function(a) { if (a.asGetPublicProperty("audiocodecid") || a.asGetPublicProperty("videocodecid")) { - a = RtmpJs.MP4.parseFLVMetadata(a), e = new RtmpJs.MP4.MP4Mux(a), e.ondata = function(a) { - d.appendBytes(new Uint8Array(a)); + a = RtmpJs.MP4.parseFLVMetadata(a), c = new RtmpJs.MP4.MP4Mux(a), c.oncodecinfo = function(a) { + this._contentTypeHint = u(a); + }, c.ondata = function(a) { + e.appendBytes(new Uint8Array(a)); }.bind(this); } - }, packet:function(a, b, d) { - e.pushPacket(a, new Uint8Array(b), d); + }, packet:function(a, b, e) { + c.pushPacket(a, new Uint8Array(b), e); }, generate:function() { - e.flush(); + c.flush(); }}; - a._createRtmpStream(function(a, d) { + a._createRtmpStream(function(a, e) { a.ondata = function(a) { console.log("#packet (" + a.typeId + "): @" + a.timestamp); - 0 < a.data.length && c.packet(a.typeId, a.data, a.timestamp); + 0 < a.data.length && f.packet(a.typeId, a.data, a.timestamp); }; a.oncallback = function() { console.log("#callback"); }; a.onscriptdata = function(a, b) { console.log("#object: " + a); - "onMetaData" === a && c.init(b); + "onMetaData" === a && f.init(b); }; a.play(b); }); }; b.prototype.openInDataGenerationMode = function() { - u(0 === this._state); this._state = 3; var a = new MediaSource; - a.addEventListener("sourceopen", function(b) { - this._mediaSource = a; + a.addEventListener("sourceopen", function(a) { this._ensurePlaying(); }.bind(this)); a.addEventListener("sourceend", function(a) { this._mediaSource = null; }.bind(this)); + this._mediaSource = a; this._url = URL.createObjectURL(a); }; b.prototype.appendBytes = function(a) { - u(3 === this._state || 1 === this._state); - if (this._mediaSource) { - if (!this._mediaSourceBuffer) { - var b = this._contentTypeHint || 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'; - this._mediaSourceBufferLock = Promise.resolve(void 0); - this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(b); + if (this._decoder) { + this._decoder.push(a); + } else { + var b, e; + null !== this._head ? (b = this._head.length, e = new Uint8Array(b + a.length), e.set(a, b)) : (b = 0, e = a); + if (!this._decoder) { + var c = this._detectContentType(e); + "video/x-flv" === c ? (c = new q, c.onHeader = function(a) { + this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(a); + this._mediaSourceBufferLock = Promise.resolve(void 0); + }.bind(this), c.onData = this._queueData.bind(this), this._decoder = c) : c && (this._decoder = {onData:this._queueData.bind(this), onError:function(a) { + }, push:function(a) { + this.onData(a); + }, close:function() { + }}, this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(c), this._mediaSourceBufferLock = Promise.resolve(void 0)); } - var d = this._mediaSourceBuffer; - this._mediaSourceBufferLock = this._mediaSourceBufferLock.then(function() { - d.appendBuffer(a); - return new Promise(function(a) { - d.addEventListener("update", function M() { - d.removeEventListener("update", M); - a(); - }); + this._decoder ? (this._decoder.push(e), 0 < b && (this._head = null)) : this._head = 0 === b ? new Uint8Array(a) : e; + } + }; + b.prototype._queueData = function(a) { + var b = this._mediaSourceBuffer; + this._mediaSourceBufferLock = this._mediaSourceBufferLock.then(function() { + b.appendBuffer(a); + return new Promise(function(a) { + b.addEventListener("update", function K() { + b.removeEventListener("update", K); + a(); }); }); - } - e("public flash.net.NetStream::appendBytes"); + }); }; b.prototype.appendBytesAction = function(a) { - u(3 === this._state || 1 === this._state); a = l(a); - "endSequence" === a && this._mediaSourceBufferLock.then(function() { - this._mediaSource && this._mediaSource.endOfStream(); - this.close(); - }.bind(this)); - e("public flash.net.NetStream::appendBytesAction"); + if ("endSequence" === a) { + if (!this._decoder) { + throw Error("Internal appendBytes error"); + } + this._decoder.close(); + this._mediaSourceBufferLock.then(function() { + this._mediaSource && this._mediaSource.endOfStream(); + this.close(); + }.bind(this)); + } + c("public flash.net.NetStream::appendBytesAction"); }; b.prototype.close = function() { this._state = 0; @@ -39266,54 +39329,130 @@ var RtmpJs; this._onEnsurePlay && this._onEnsurePlay(); }; b.prototype._detectContentType = function(a) { - return'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'; + return 16 > a.length ? null : 70 === a[0] && 76 === a[1] && 86 === a[2] && 1 === a[3] ? "video/x-flv" : 102 === a[4] && 116 === a[5] && 121 === a[6] && 112 === a[7] ? this._contentTypeHint && /^video\/mp4;\s*codecs=/.test(this._contentTypeHint) ? this._contentTypeHint : 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"' : 73 === a[0] && 68 === a[1] && 51 === a[2] || 255 === a[0] && 224 === (a[1] & 224) && 8 !== (a[1] & 30) ? "audio/mpeg" : this._contentTypeHint || "video/mp4"; }; b.prototype.processVideoPlaybackEvent = function(a, b) { switch(a) { case 0: this._domReady.resolve(void 0); break; - case 1: + case 2: if (this._started) { break; } this._started = !0; break; - case 2: + case 3: this._started = !1; break; - case 3: + case 5: this._buffer = "full"; break; - case 4: + case 10: this._buffer = "progress"; break; - case 5: + case 4: this._buffer = "empty"; break; - case 7: + case 1: this._metadataReady.resolve({videoWidth:b.videoWidth, videoHeight:b.videoHeight}); } }; return b; + }(), q = function() { + function a() { + this._flvParser = new RtmpJs.FLV.FLVParser; + this._flvParser.onHeader = this._onFlvHeader.bind(this); + this._flvParser.onTag = this._onFlvTag.bind(this); + this._flvParser.onClose = this._onFlvClose.bind(this); + this._flvParser.onError = this._onFlvError.bind(this); + this._mp4Mux = null; + } + a.prototype._onFlvHeader = function(a) { + }; + a.prototype._onFlvTag = function(a) { + if (18 === a.type) { + var b = new k.utils.ByteArray; + b.writeRawBytes(a.data); + b.position = 0; + a = d.AVM2.AMF0.read(b); + b = d.AVM2.AMF0.read(b); + "onMetaData" === a && (b = RtmpJs.MP4.parseFLVMetadata(b), b = new RtmpJs.MP4.MP4Mux(b), b.oncodecinfo = function(a) { + this.onHeader(u(a)); + }.bind(this), b.ondata = function(a) { + this.onData.call(null, a); + }.bind(this), this._mp4Mux = b); + } else { + this._mp4Mux.pushPacket(a.type, new Uint8Array(a.data), a.timestamp); + } + }; + a.prototype._onFlvClose = function() { + this._mp4Mux.flush(); + }; + a.prototype._onFlvError = function(a) { + if (this.onError) { + this.onError(a); + } + }; + a.prototype.push = function(a) { + try { + this._flvParser.push(a); + } catch (b) { + if (this.onError) { + this.onError(b); + } + } + }; + a.prototype.close = function() { + try { + this._flvParser.close(); + } catch (a) { + if (this.onError) { + this.onError(a); + } + } + }; + return a; }(); - })(h.net || (h.net = {})); + })(k.net || (k.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a, e, l, k, f, d, b, g, m, h, v, A, B, M, N, K, y, D, L, H, J, C, E, F, I) { - void 0 === E && (E = null); - void 0 === F && (F = null); - s(E); - s(F); - p("public flash.net.NetStreamInfo"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a, c, h, g, f, b, e, l, k, x, v, A, H, K, F, J, M, D, B, E, y, z, G, C, I) { + void 0 === G && (G = null); + void 0 === C && (C = null); + t(G); + t(C); + r("public flash.net.NetStreamInfo"); + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.ASNative); + k.NetStreamInfo = l; + })(k.net || (k.net = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a, c, d, l, g, f, b, e, k, n, t, v, A, H, K, F, J, M, D) { + r("public flash.net.NetStreamMulticastInfo"); } __extends(c, a); c.classInitializer = null; @@ -39322,494 +39461,471 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.ASNative); - h.NetStreamInfo = l; - })(h.net || (h.net = {})); + k.NetStreamMulticastInfo = t; + })(k.net || (k.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e(a, e, c, l, k, f, d, b, g, h, w, s, u, v, M, N, K, y, D) { - p("public flash.net.NetStreamMulticastInfo"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.NetStreamMulticastInfo = s; - })(h.net || (h.net = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e() { - p("public flash.net.NetStreamPlayOptions"); + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c() { + u("public flash.net.NetStreamPlayOptions"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.events.EventDispatcher); - h.NetStreamPlayOptions = u; + k.NetStreamPlayOptions = t; })(a.net || (a.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e(a, e) { - p("public flash.net.Responder"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a, c) { + r("public flash.net.Responder"); } - __extends(e, a); - e.prototype.ctor = function(a, e) { + __extends(c, a); + c.prototype.ctor = function(a, c) { this._result = a; - this._status = e; + this._status = c; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - h.Responder = s; - })(h.net || (h.net = {})); + k.Responder = t; + })(k.net || (k.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.AVM2.Runtime.asCoerceString, l = c.Debug.somewhatImplemented, e = function(e) { - function h() { + (function(k) { + var u = d.Debug.notImplemented, t = d.AVM2.Runtime.asCoerceString, l = d.Debug.somewhatImplemented, c = function(c) { + function k() { a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this._data = Object.create(null); } - __extends(h, e); - h.deleteAll = function(a) { - u(a); - p("public flash.net.SharedObject::static deleteAll"); + __extends(k, c); + k.deleteAll = function(a) { + t(a); + u("public flash.net.SharedObject::static deleteAll"); }; - h.getDiskUsage = function(a) { - u(a); - p("public flash.net.SharedObject::static getDiskUsage"); + k.getDiskUsage = function(a) { + t(a); + u("public flash.net.SharedObject::static getDiskUsage"); }; - h._create = function(a, e) { - var k = new h; - k._path = a; - k._data = e; - k._objectEncoding = h._defaultObjectEncoding; - c.Telemetry.instance.reportTelemetry({topic:"feature", feature:3}); - return k; + k._create = function(a, c) { + var g = new k; + g._path = a; + g._data = c; + g._objectEncoding = k._defaultObjectEncoding; + d.Telemetry.instance.reportTelemetry({topic:"feature", feature:3}); + return g; }; - h.getLocal = function(a, e, c) { - void 0 === e && (e = null); - a = u(a); - e = u(e); - a = (e || "") + "/" + a; - if (h._sharedObjects[a]) { - return h._sharedObjects[a]; + k.getLocal = function(a, c, d) { + void 0 === c && (c = null); + a = t(a); + c = t(c); + a = (c || "") + "/" + a; + if (k._sharedObjects[a]) { + return k._sharedObjects[a]; } - e = sessionStorage.getItem(a); - e = h._create(a, e ? JSON.parse(e) : {}); - return h._sharedObjects[a] = e; + c = sessionStorage.getItem(a); + c = k._create(a, c ? JSON.parse(c) : {}); + return k._sharedObjects[a] = c; }; - h.getRemote = function(a, e, c, f) { - void 0 === e && (e = null); - u(a); - u(e); - p("public flash.net.SharedObject::static getRemote"); + k.getRemote = function(a, c, d, f) { + void 0 === c && (c = null); + t(a); + t(c); + u("public flash.net.SharedObject::static getRemote"); }; - Object.defineProperty(h, "defaultObjectEncoding", {get:function() { - return h._defaultObjectEncoding; + Object.defineProperty(k, "defaultObjectEncoding", {get:function() { + return k._defaultObjectEncoding; }, set:function(a) { - h._defaultObjectEncoding = a >>> 0; + k._defaultObjectEncoding = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "data", {get:function() { + Object.defineProperty(k.prototype, "data", {get:function() { return this._data; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "objectEncoding", {get:function() { + Object.defineProperty(k.prototype, "objectEncoding", {get:function() { return this._objectEncoding; }, set:function(a) { this._objectEncoding = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "client", {get:function() { - p("public flash.net.SharedObject::get client"); + Object.defineProperty(k.prototype, "client", {get:function() { + u("public flash.net.SharedObject::get client"); }, set:function(a) { - p("public flash.net.SharedObject::set client"); + u("public flash.net.SharedObject::set client"); }, enumerable:!0, configurable:!0}); - h.prototype.setDirty = function(a) { - u(a); + k.prototype.setDirty = function(a) { + t(a); l("public flash.net.SharedObject::setDirty"); }; - h.prototype.invoke = function(a) { + k.prototype.invoke = function(a) { return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1)); }; - h.prototype.invokeWithArgsArray = function(a, e) { - return this._invoke(a >>> 0, e); + k.prototype.invokeWithArgsArray = function(a, c) { + return this._invoke(a >>> 0, c); }; - h.prototype._invoke = function(a, e) { - var c = !1, f; + k.prototype._invoke = function(a, c) { + var d = !1, f; switch(a) { case 4: f = JSON.stringify(this._data).length - 2; - c = !0; + d = !0; break; case 6: this._data = {}; sessionStorage.removeItem(this._path); - c = !0; + d = !0; break; case 2: sessionStorage.setItem(this._path, JSON.stringify(this._data)); - f = c = !0; + f = d = !0; break; case 3: - c = !0; + d = !0; } - (c ? l : p)("private flash.net.SharedObject::_invoke (" + a + ")"); + (d ? l : u)("private flash.net.SharedObject::_invoke (" + a + ")"); return f; }; - h.classInitializer = null; - h.initializer = null; - h.classSymbols = null; - h.instanceSymbols = null; - h._sharedObjects = Object.create(null); - h._defaultObjectEncoding = 3; - return h; + k.classInitializer = null; + k.initializer = null; + k.classSymbols = null; + k.instanceSymbols = null; + k._sharedObjects = Object.create(null); + k._defaultObjectEncoding = 3; + return k; }(a.events.EventDispatcher); - h.SharedObject = e; + k.SharedObject = c; })(a.net || (a.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Errors, t = c.AVM2.Runtime.throwError, q = function(a) { - function c(a, d) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.AVM2.Errors, p = d.AVM2.Runtime.throwError, s = function(a) { + function d(a, b) { void 0 === a && (a = null); l(a); - u("public flash.net.Socket"); + t("public flash.net.Socket"); } - __extends(c, a); - Object.defineProperty(c.prototype, "bytesAvailable", {get:function() { - p("public flash.net.Socket::get bytesAvailable"); + __extends(d, a); + Object.defineProperty(d.prototype, "bytesAvailable", {get:function() { + u("public flash.net.Socket::get bytesAvailable"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "connected", {get:function() { - p("public flash.net.Socket::get connected"); + Object.defineProperty(d.prototype, "connected", {get:function() { + u("public flash.net.Socket::get connected"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "objectEncoding", {get:function() { - p("public flash.net.Socket::get objectEncoding"); + Object.defineProperty(d.prototype, "objectEncoding", {get:function() { + u("public flash.net.Socket::get objectEncoding"); }, set:function(a) { - p("public flash.net.Socket::set objectEncoding"); + u("public flash.net.Socket::set objectEncoding"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "endian", {get:function() { - p("public flash.net.Socket::get endian"); + Object.defineProperty(d.prototype, "endian", {get:function() { + u("public flash.net.Socket::get endian"); }, set:function(a) { l(a); - p("public flash.net.Socket::set endian"); + u("public flash.net.Socket::set endian"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "bytesPending", {get:function() { - p("public flash.net.Socket::get bytesPending"); + Object.defineProperty(d.prototype, "bytesPending", {get:function() { + u("public flash.net.Socket::get bytesPending"); }, enumerable:!0, configurable:!0}); - c.prototype.readBytes = function(a, d, b) { - p("public flash.net.Socket::readBytes"); + d.prototype.readBytes = function(a, b, e) { + u("public flash.net.Socket::readBytes"); }; - c.prototype.writeBytes = function(a, d, b) { - p("public flash.net.Socket::writeBytes"); + d.prototype.writeBytes = function(a, b, e) { + u("public flash.net.Socket::writeBytes"); }; - c.prototype.writeBoolean = function(a) { - p("public flash.net.Socket::writeBoolean"); + d.prototype.writeBoolean = function(a) { + u("public flash.net.Socket::writeBoolean"); }; - c.prototype.writeByte = function(a) { - p("public flash.net.Socket::writeByte"); + d.prototype.writeByte = function(a) { + u("public flash.net.Socket::writeByte"); }; - c.prototype.writeShort = function(a) { - p("public flash.net.Socket::writeShort"); + d.prototype.writeShort = function(a) { + u("public flash.net.Socket::writeShort"); }; - c.prototype.writeInt = function(a) { - p("public flash.net.Socket::writeInt"); + d.prototype.writeInt = function(a) { + u("public flash.net.Socket::writeInt"); }; - c.prototype.writeUnsignedInt = function(a) { - p("public flash.net.Socket::writeUnsignedInt"); + d.prototype.writeUnsignedInt = function(a) { + u("public flash.net.Socket::writeUnsignedInt"); }; - c.prototype.writeFloat = function(a) { - p("public flash.net.Socket::writeFloat"); + d.prototype.writeFloat = function(a) { + u("public flash.net.Socket::writeFloat"); }; - c.prototype.writeDouble = function(a) { - p("public flash.net.Socket::writeDouble"); + d.prototype.writeDouble = function(a) { + u("public flash.net.Socket::writeDouble"); }; - c.prototype.writeMultiByte = function(a, d) { + d.prototype.writeMultiByte = function(a, b) { l(a); - l(d); - p("public flash.net.Socket::writeMultiByte"); + l(b); + u("public flash.net.Socket::writeMultiByte"); }; - c.prototype.writeUTF = function(a) { + d.prototype.writeUTF = function(a) { l(a); - p("public flash.net.Socket::writeUTF"); + u("public flash.net.Socket::writeUTF"); }; - c.prototype.writeUTFBytes = function(a) { + d.prototype.writeUTFBytes = function(a) { l(a); - p("public flash.net.Socket::writeUTFBytes"); + u("public flash.net.Socket::writeUTFBytes"); }; - c.prototype.readBoolean = function() { - p("public flash.net.Socket::readBoolean"); + d.prototype.readBoolean = function() { + u("public flash.net.Socket::readBoolean"); }; - c.prototype.readByte = function() { - p("public flash.net.Socket::readByte"); + d.prototype.readByte = function() { + u("public flash.net.Socket::readByte"); }; - c.prototype.readUnsignedByte = function() { - p("public flash.net.Socket::readUnsignedByte"); + d.prototype.readUnsignedByte = function() { + u("public flash.net.Socket::readUnsignedByte"); }; - c.prototype.readShort = function() { - p("public flash.net.Socket::readShort"); + d.prototype.readShort = function() { + u("public flash.net.Socket::readShort"); }; - c.prototype.readUnsignedShort = function() { - p("public flash.net.Socket::readUnsignedShort"); + d.prototype.readUnsignedShort = function() { + u("public flash.net.Socket::readUnsignedShort"); }; - c.prototype.readInt = function() { - p("public flash.net.Socket::readInt"); + d.prototype.readInt = function() { + u("public flash.net.Socket::readInt"); }; - c.prototype.readUnsignedInt = function() { - p("public flash.net.Socket::readUnsignedInt"); + d.prototype.readUnsignedInt = function() { + u("public flash.net.Socket::readUnsignedInt"); }; - c.prototype.readFloat = function() { - p("public flash.net.Socket::readFloat"); + d.prototype.readFloat = function() { + u("public flash.net.Socket::readFloat"); }; - c.prototype.readDouble = function() { - p("public flash.net.Socket::readDouble"); + d.prototype.readDouble = function() { + u("public flash.net.Socket::readDouble"); }; - c.prototype.readMultiByte = function(a, d) { - l(d); - p("public flash.net.Socket::readMultiByte"); + d.prototype.readMultiByte = function(a, b) { + l(b); + u("public flash.net.Socket::readMultiByte"); }; - c.prototype.readUTF = function() { - p("public flash.net.Socket::readUTF"); + d.prototype.readUTF = function() { + u("public flash.net.Socket::readUTF"); }; - c.prototype.readUTFBytes = function(a) { - p("public flash.net.Socket::readUTFBytes"); + d.prototype.readUTFBytes = function(a) { + u("public flash.net.Socket::readUTFBytes"); }; - c.prototype.flush = function() { - p("public flash.net.Socket::flush"); + d.prototype.flush = function() { + u("public flash.net.Socket::flush"); }; - c.prototype.writeObject = function(a) { - p("public flash.net.Socket::writeObject"); + d.prototype.writeObject = function(a) { + u("public flash.net.Socket::writeObject"); }; - c.prototype.readObject = function() { - p("public flash.net.Socket::readObject"); + d.prototype.readObject = function() { + u("public flash.net.Socket::readObject"); }; - c.prototype.internalGetSecurityErrorMessage = function(a, d) { + d.prototype.internalGetSecurityErrorMessage = function(a, b) { l(a); - e("flash.net.Socket::internalGetSecurityErrorMessage"); + c("flash.net.Socket::internalGetSecurityErrorMessage"); return "SecurityErrorEvent"; }; - c.prototype.internalConnect = function(a, d) { + d.prototype.internalConnect = function(a, b) { a = l(a); - d |= 0; - e("flash.net.Socket::internalConnect"); - t("SecurityError", m.SocketConnectError, a, d); + b |= 0; + c("flash.net.Socket::internalConnect"); + p("SecurityError", h.SocketConnectError, a, b); }; - c.prototype.didFailureOccur = function() { - e("flash.net.Socket::didFailureOccur"); + d.prototype.didFailureOccur = function() { + c("flash.net.Socket::didFailureOccur"); return!0; }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.events.EventDispatcher); - h.Socket = q; + k.Socket = s; })(a.net || (a.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(h) { - var p = a.events.Event, u = a.events.IOErrorEvent, l = a.events.ProgressEvent, e = a.events.HTTPStatusEvent, m = a.events.SecurityErrorEvent, t = function(q) { - function n(c) { + (function(d) { + var k = a.events.Event, t = a.events.IOErrorEvent, l = a.events.ProgressEvent, c = a.events.HTTPStatusEvent, h = a.events.SecurityErrorEvent, p = function(p) { + function m(g) { a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); - var f = this._stream = new h.URLStream; - f.addEventListener(p.OPEN, this.onStreamOpen.bind(this)); - f.addEventListener(p.COMPLETE, this.onStreamComplete.bind(this)); + var f = this._stream = new d.URLStream; + f.addEventListener(k.OPEN, this.onStreamOpen.bind(this)); + f.addEventListener(k.COMPLETE, this.onStreamComplete.bind(this)); f.addEventListener(l.PROGRESS, this.onStreamProgress.bind(this)); - f.addEventListener(u.IO_ERROR, this.onStreamIOError.bind(this)); - f.addEventListener(e.HTTP_STATUS, this.onStreamHTTPStatus.bind(this)); - f.addEventListener(e.HTTP_RESPONSE_STATUS, this.onStreamHTTPResponseStatus.bind(this)); - f.addEventListener(m.SECURITY_ERROR, this.onStreamSecurityError.bind(this)); + f.addEventListener(t.IO_ERROR, this.onStreamIOError.bind(this)); + f.addEventListener(c.HTTP_STATUS, this.onStreamHTTPStatus.bind(this)); + f.addEventListener(c.HTTP_RESPONSE_STATUS, this.onStreamHTTPResponseStatus.bind(this)); + f.addEventListener(h.SECURITY_ERROR, this.onStreamSecurityError.bind(this)); this.$BgdataFormat = "text"; - c && this.load(c); + g && this.load(g); } - __extends(n, q); - Object.defineProperty(n.prototype, "data", {get:function() { + __extends(m, p); + Object.defineProperty(m.prototype, "data", {get:function() { return this.$Bgdata; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "dataFormat", {get:function() { + Object.defineProperty(m.prototype, "dataFormat", {get:function() { return this.$BgdataFormat; }, set:function(a) { - c.Debug.assert("string" === typeof a); this.$BgdataFormat = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "bytesLoaded", {get:function() { + Object.defineProperty(m.prototype, "bytesLoaded", {get:function() { return this.$BgbytesLoaded; }, enumerable:!0, configurable:!0}); - Object.defineProperty(n.prototype, "bytesTotal", {get:function() { + Object.defineProperty(m.prototype, "bytesTotal", {get:function() { return this.$BgbytesTotal; }, enumerable:!0, configurable:!0}); - n.prototype.load = function(a) { + m.prototype.load = function(a) { this._stream.load(a); }; - n.prototype.close = function() { + m.prototype.close = function() { this._stream.close(); }; - n.prototype.complete = function() { - var e = new a.utils.ByteArray; - this._stream.readBytes(e); + m.prototype.complete = function() { + var c = new a.utils.ByteArray; + this._stream.readBytes(c); if ("binary" === this.$BgdataFormat) { - this.$Bgdata = e; + this.$Bgdata = c; } else { - var c = e.toString(); - 0 < e.length && "variables" === this.$BgdataFormat ? (e = new h.URLVariables, this._ignoreDecodeErrors && (e._ignoreDecodingErrors = !0), e.decode(String(c)), this.$Bgdata = e) : this.$Bgdata = c; + var f = c.toString(); + 0 < c.length && "variables" === this.$BgdataFormat ? (c = new d.URLVariables, this._ignoreDecodeErrors && (c._ignoreDecodingErrors = !0), c.decode(String(f)), this.$Bgdata = c) : this.$Bgdata = f; } }; - n.prototype.addEventListener = function(a, c, d, b, g) { - q.prototype.addEventListener.call(this, a, c, d, b, g); - a === e.HTTP_RESPONSE_STATUS && (this._httpResponseEventBound = !0); + m.prototype.addEventListener = function(a, f, b, e, d) { + p.prototype.addEventListener.call(this, a, f, b, e, d); + a === c.HTTP_RESPONSE_STATUS && (this._httpResponseEventBound = !0); }; - n.prototype.onStreamOpen = function(a) { + m.prototype.onStreamOpen = function(a) { this.dispatchEvent(a); }; - n.prototype.onStreamComplete = function(a) { + m.prototype.onStreamComplete = function(a) { this.complete(); this.dispatchEvent(a); }; - n.prototype.onStreamProgress = function(a) { + m.prototype.onStreamProgress = function(a) { this.$BgbytesLoaded = a.bytesLoaded; this.$BgbytesTotal = a.bytesTotal; this.dispatchEvent(a); }; - n.prototype.onStreamIOError = function(a) { + m.prototype.onStreamIOError = function(a) { this.complete(); this.dispatchEvent(a); }; - n.prototype.onStreamHTTPStatus = function(a) { + m.prototype.onStreamHTTPStatus = function(a) { this.dispatchEvent(a); }; - n.prototype.onStreamHTTPResponseStatus = function(a) { + m.prototype.onStreamHTTPResponseStatus = function(a) { this._httpResponseEventBound && this.dispatchEvent(a); }; - n.prototype.onStreamSecurityError = function(a) { + m.prototype.onStreamSecurityError = function(a) { this.dispatchEvent(a); }; - n.classInitializer = null; - n.initializer = null; - n.classSymbols = null; - n.instanceSymbols = null; - return n; + m.classInitializer = null; + m.initializer = null; + m.classSymbols = null; + m.instanceSymbols = null; + return m; }(a.events.EventDispatcher); - h.URLLoader = t; + d.URLLoader = p; })(a.net || (a.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = c.AVM2.Runtime.throwError, l = function(a) { - function c(a) { + var u = d.AVM2.Runtime.asCoerceString, t = d.AVM2.Runtime.throwError, l = function(a) { + function d(a) { void 0 === a && (a = null); - this._url = p(a); + this._url = u(a); } - __extends(c, a); - Object.defineProperty(c.prototype, "url", {get:function() { + __extends(d, a); + Object.defineProperty(d.prototype, "url", {get:function() { return this._url; }, set:function(a) { - this._url = a = p(a); + this._url = a = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "data", {get:function() { + Object.defineProperty(d.prototype, "data", {get:function() { return this._data; }, set:function(a) { this._data = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "method", {get:function() { + Object.defineProperty(d.prototype, "method", {get:function() { return this._method; }, set:function(a) { - a = p(a); - "get" !== a && "GET" !== a && "post" !== a && "POST" !== a && u("ArgumentError", h.Errors.InvalidArgumentError); + a = u(a); + "get" !== a && "GET" !== a && "post" !== a && "POST" !== a && t("ArgumentError", k.Errors.InvalidArgumentError); this._method = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "contentType", {get:function() { + Object.defineProperty(d.prototype, "contentType", {get:function() { return this._contentType; }, set:function(a) { - this._contentType = a = p(a); + this._contentType = a = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "requestHeaders", {get:function() { + Object.defineProperty(d.prototype, "requestHeaders", {get:function() { return this._requestHeaders; }, set:function(a) { - Array.isArray(a) || u("ArgumentError", h.Errors.InvalidArgumentError, "value"); + Array.isArray(a) || t("ArgumentError", k.Errors.InvalidArgumentError, "value"); this._requestHeaders = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "digest", {get:function() { + Object.defineProperty(d.prototype, "digest", {get:function() { return this._digest; }, set:function(a) { - this._digest = a = p(a); + this._digest = a = u(a); }, enumerable:!0, configurable:!0}); - c.prototype._toFileRequest = function() { + d.prototype._toFileRequest = function() { var a = {}; a.url = this._url; a.method = this._method; a.checkPolicyFile = this._checkPolicyFile; if (this._data) { - if (a.mimeType = this._contentType, s.utils.ByteArray.isType(this._data)) { + if (a.mimeType = this._contentType, r.utils.ByteArray.isType(this._data)) { a.data = new Uint8Array(this._data._buffer, 0, this._data.length); } else { - var e = this._data.asGetPublicProperty("toString").call(this._data); + var c = this._data.asGetPublicProperty("toString").call(this._data); if ("GET" === this._method) { - var c = a.url.lastIndexOf("?"); - a.url = (0 > c ? a.url : a.url.substring(0, c)) + "?" + e; + var d = a.url.lastIndexOf("?"); + a.url = (0 > d ? a.url : a.url.substring(0, d)) + "?" + c; } else { - a.data = e; + a.data = c; } } } return a; }; - c.classInitializer = null; - c.initializer = function() { + d.classInitializer = null; + d.initializer = function() { this._url = null; this._method = "GET"; this._digest = this._data = null; @@ -39817,565 +39933,565 @@ var RtmpJs; this._requestHeaders = []; this._checkPolicyFile = !0; }; - c.classSymbols = null; - c.bindings = null; - return c; + d.classSymbols = null; + d.bindings = null; + return d; }(a.ASNative); v.URLRequest = l; - })(s.net || (s.net = {})); + })(r.net || (r.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.AVM2.Runtime.asCoerceString, s = function(a) { - function e(a, e) { + (function(k) { + (function(k) { + var r = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c) { void 0 === a && (a = ""); - void 0 === e && (e = ""); - p(a); - p(e); + void 0 === c && (c = ""); + r(a); + r(c); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = ["name!", "value!"]; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = ["name!", "value!"]; + return c; }(a.ASNative); - h.URLRequestHeader = s; - })(h.net || (h.net = {})); + k.URLRequestHeader = t; + })(k.net || (k.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.FileLoadingService, m = c.AVM2.Runtime.throwError, t = c.AVM2.AS.flash.utils, q = function(c) { - function k() { - u("public flash.net.URLStream"); + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.FileLoadingService, h = d.AVM2.Runtime.throwError, p = d.AVM2.AS.flash.utils, s = function(d) { + function g() { + t("public flash.net.URLStream"); } - __extends(k, c); - Object.defineProperty(k.prototype, "connected", {get:function() { + __extends(g, d); + Object.defineProperty(g.prototype, "connected", {get:function() { return this._connected; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "bytesAvailable", {get:function() { + Object.defineProperty(g.prototype, "bytesAvailable", {get:function() { return this._buffer.length - this._buffer.position; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "objectEncoding", {get:function() { + Object.defineProperty(g.prototype, "objectEncoding", {get:function() { return this._buffer.objectEncoding; }, set:function(a) { this._buffer.objectEncoding = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "endian", {get:function() { + Object.defineProperty(g.prototype, "endian", {get:function() { return this._buffer.endian; }, set:function(a) { a = l(a); this._buffer.endian = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "diskCacheEnabled", {get:function() { - p("public flash.net.URLStream::get diskCacheEnabled"); + Object.defineProperty(g.prototype, "diskCacheEnabled", {get:function() { + u("public flash.net.URLStream::get diskCacheEnabled"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "position", {get:function() { + Object.defineProperty(g.prototype, "position", {get:function() { return this._buffer.position; }, set:function(a) { this._buffer.position = +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "length", {get:function() { + Object.defineProperty(g.prototype, "length", {get:function() { return this._buffer.length; }, enumerable:!0, configurable:!0}); - k.prototype.load = function(c) { - var d = a.events.Event, b = a.events.IOErrorEvent, g = a.events.ProgressEvent, k = a.events.HTTPStatusEvent, l = e.instance.createSession(), h = this; - l.onprogress = function(a, b) { - var d = h._buffer.position; - h._buffer.position = h._writePosition; - h._buffer.writeRawBytes(a); - h._writePosition = h._buffer.position; - h._buffer.position = d; - h.dispatchEvent(new g(g.PROGRESS, !1, !1, b.bytesLoaded, b.bytesTotal)); + g.prototype.load = function(f) { + var b = a.events.Event, e = a.events.IOErrorEvent, d = a.events.ProgressEvent, g = a.events.HTTPStatusEvent, h = c.instance.createSession(), l = this; + h.onprogress = function(a, b) { + var e = l._buffer.position; + l._buffer.position = l._writePosition; + l._buffer.writeRawBytes(a); + l._writePosition = l._buffer.position; + l._buffer.position = e; + l.dispatchEvent(new d(d.PROGRESS, !1, !1, b.bytesLoaded, b.bytesTotal)); }; - l.onerror = function(a) { - h._connected = !1; - h.dispatchEvent(new b(b.IO_ERROR, !1, !1, a)); + h.onerror = function(a) { + l._connected = !1; + l.dispatchEvent(new e(e.IO_ERROR, !1, !1, a)); }; - l.onopen = function() { - h._connected = !0; - h.dispatchEvent(new d(d.OPEN, !1, !1)); + h.onopen = function() { + l._connected = !0; + l.dispatchEvent(new b(b.OPEN, !1, !1)); }; - l.onhttpstatus = function(b, d, e) { - d = new k(k.HTTP_STATUS, !1, !1, d); - var c = []; - e.split(/(?:\n|\r?\n)/g).forEach(function(d) { - if (d = /^([^:]+): (.*)$/.exec(d)) { - c.push(new a.net.URLRequestHeader(d[1], d[2])), "Location" === d[1] && (b = d[2]); + h.onhttpstatus = function(b, e, c) { + e = new g(g.HTTP_STATUS, !1, !1, e); + var f = []; + c.split(/(?:\n|\r?\n)/g).forEach(function(e) { + if (e = /^([^:]+): (.*)$/.exec(e)) { + f.push(new a.net.URLRequestHeader(e[1], e[2])), "Location" === e[1] && (b = e[2]); } }); - d.asSetPublicProperty("responseHeaders", c); - d.asSetPublicProperty("responseURL", b); - h.dispatchEvent(d); + e.asSetPublicProperty("responseHeaders", f); + e.asSetPublicProperty("responseURL", b); + l.dispatchEvent(e); }; - l.onclose = function() { - h._connected = !1; - h.dispatchEvent(new d(d.COMPLETE, !1, !1)); + h.onclose = function() { + l._connected = !1; + l.dispatchEvent(new b(b.COMPLETE, !1, !1)); }; - l.open(c._toFileRequest()); - this._session = l; + h.open(f._toFileRequest()); + this._session = h; }; - k.prototype.readBytes = function(a, d, b) { - void 0 === d && (d = 0); + g.prototype.readBytes = function(a, b, e) { void 0 === b && (b = 0); - d >>>= 0; + void 0 === e && (e = 0); b >>>= 0; - 0 > b && m("ArgumentError", h.Errors.InvalidArgumentError, "length"); - this._buffer.readBytes(a, d, b); + e >>>= 0; + 0 > e && h("ArgumentError", k.Errors.InvalidArgumentError, "length"); + this._buffer.readBytes(a, b, e); }; - k.prototype.readBoolean = function() { - p("public flash.net.URLStream::readBoolean"); + g.prototype.readBoolean = function() { + u("public flash.net.URLStream::readBoolean"); }; - k.prototype.readByte = function() { + g.prototype.readByte = function() { return this._buffer.readByte(); }; - k.prototype.readUnsignedByte = function() { - p("public flash.net.URLStream::readUnsignedByte"); + g.prototype.readUnsignedByte = function() { + u("public flash.net.URLStream::readUnsignedByte"); }; - k.prototype.readShort = function() { - p("public flash.net.URLStream::readShort"); + g.prototype.readShort = function() { + u("public flash.net.URLStream::readShort"); }; - k.prototype.readUnsignedShort = function() { + g.prototype.readUnsignedShort = function() { return this._buffer.readUnsignedShort(); }; - k.prototype.readUnsignedInt = function() { - p("public flash.net.URLStream::readUnsignedInt"); + g.prototype.readUnsignedInt = function() { + u("public flash.net.URLStream::readUnsignedInt"); }; - k.prototype.readInt = function() { - p("public flash.net.URLStream::readInt"); + g.prototype.readInt = function() { + u("public flash.net.URLStream::readInt"); }; - k.prototype.readFloat = function() { - p("public flash.net.URLStream::readFloat"); + g.prototype.readFloat = function() { + u("public flash.net.URLStream::readFloat"); }; - k.prototype.readDouble = function() { - p("public flash.net.URLStream::readDouble"); + g.prototype.readDouble = function() { + u("public flash.net.URLStream::readDouble"); }; - k.prototype.readMultiByte = function(a, d) { - l(d); - p("public flash.net.URLStream::readMultiByte"); + g.prototype.readMultiByte = function(a, b) { + l(b); + u("public flash.net.URLStream::readMultiByte"); }; - k.prototype.readUTF = function() { + g.prototype.readUTF = function() { return this._buffer.readUTF(); }; - k.prototype.readUTFBytes = function(a) { + g.prototype.readUTFBytes = function(a) { return this._buffer.readUTFBytes(a); }; - k.prototype.close = function() { + g.prototype.close = function() { this._session.close(); }; - k.prototype.readObject = function() { - p("public flash.net.URLStream::readObject"); + g.prototype.readObject = function() { + u("public flash.net.URLStream::readObject"); }; - k.prototype.stop = function() { - p("public flash.net.URLStream::stop"); + g.prototype.stop = function() { + u("public flash.net.URLStream::stop"); }; - k.classInitializer = null; - k.initializer = function() { - this._buffer = new t.ByteArray; + g.classInitializer = null; + g.initializer = function() { + this._buffer = new p.ByteArray; this._writePosition = 0; this._connected = !1; }; - k.classSymbols = null; - k.instanceSymbols = null; - return k; + g.classSymbols = null; + g.instanceSymbols = null; + return g; }(a.events.EventDispatcher); - v.URLStream = q; + v.URLStream = s; })(a.net || (a.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { - (function(s) { - var p = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a) { + (function(r) { + (function(r) { + var u = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a) { void 0 === a && (a = null); this._ignoreDecodingErrors = !1; a && this.decode(a); } - __extends(e, a); - e.prototype.decode = function(a) { - a = p(a); + __extends(c, a); + c.prototype.decode = function(a) { + a = u(a); a = a.split("&"); - for (var e = 0;e < a.length;e++) { - var c = a[e], l = c.indexOf("="); - 0 > l && (this._ignoreDecodingErrors ? l = c.length : throwError("Error", h.Errors.DecodeParamError)); - var k = unescape(c.substring(0, l).split("+").join(" ")), c = unescape(c.substring(l + 1).split("+").join(" ")), l = this.asGetPublicProperty(k); - "undefined" === typeof l ? this.asSetPublicProperty(k, c) : Array.isArray(l) ? l.push(c) : this.asSetPublicProperty(k, [l, c]); + for (var c = 0;c < a.length;c++) { + var d = a[c], l = d.indexOf("="); + 0 > l && (this._ignoreDecodingErrors ? l = d.length : throwError("Error", k.Errors.DecodeParamError)); + var g = unescape(d.substring(0, l).split("+").join(" ")), d = unescape(d.substring(l + 1).split("+").join(" ")), l = this.asGetPublicProperty(g); + "undefined" === typeof l ? this.asSetPublicProperty(g, d) : Array.isArray(l) ? l.push(d) : this.asSetPublicProperty(g, [l, d]); } }; - e.prototype.toString = function() { - for (var a = [], e = this.asGetEnumerableKeys(), c = 0;c < e.length;c++) { - var l = e[c].split(" ").join("+"), k = this.asGetPublicProperty(l), l = escape(l).split(" ").join("+"); - if (Array.isArray(k)) { - for (var f = 0;f < k.length;f++) { - a.push(l + "=" + escape(k[f])); + c.prototype.toString = function() { + for (var a = [], c = this.asGetEnumerableKeys(), d = 0;d < c.length;d++) { + var l = c[d].split(" ").join("+"), g = this.asGetPublicProperty(l), l = escape(l).split(" ").join("+"); + if (Array.isArray(g)) { + for (var f = 0;f < g.length;f++) { + a.push(l + "=" + escape(g[f])); } } else { - a.push(l + "=" + escape(k)); + a.push(l + "=" + escape(g)); } } return a.join("&"); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - s.URLVariables = u; - })(s.net || (s.net = {})); + r.URLVariables = t; + })(r.net || (r.net = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.sensors.Accelerometer"); + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.sensors.Accelerometer"); } - __extends(c, a); - Object.defineProperty(c.prototype, "isSupported", {get:function() { - p("public flash.sensors.Accelerometer::get isSupported"); + __extends(d, a); + Object.defineProperty(d.prototype, "isSupported", {get:function() { + u("public flash.sensors.Accelerometer::get isSupported"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "muted", {get:function() { - p("public flash.sensors.Accelerometer::get muted"); + Object.defineProperty(d.prototype, "muted", {get:function() { + u("public flash.sensors.Accelerometer::get muted"); }, enumerable:!0, configurable:!0}); - c.prototype.setRequestedUpdateInterval = function(a) { - p("public flash.sensors.Accelerometer::setRequestedUpdateInterval"); + d.prototype.setRequestedUpdateInterval = function(a) { + u("public flash.sensors.Accelerometer::setRequestedUpdateInterval"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.events.EventDispatcher); - h.Accelerometer = l; + k.Accelerometer = l; })(a.sensors || (a.sensors = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.sensors.Geolocation"); + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.sensors.Geolocation"); } - __extends(c, a); - Object.defineProperty(c.prototype, "isSupported", {get:function() { - p("public flash.sensors.Geolocation::get isSupported"); + __extends(d, a); + Object.defineProperty(d.prototype, "isSupported", {get:function() { + u("public flash.sensors.Geolocation::get isSupported"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "muted", {get:function() { - p("public flash.sensors.Geolocation::get muted"); + Object.defineProperty(d.prototype, "muted", {get:function() { + u("public flash.sensors.Geolocation::get muted"); }, enumerable:!0, configurable:!0}); - c.prototype.setRequestedUpdateInterval = function(a) { - p("public flash.sensors.Geolocation::setRequestedUpdateInterval"); + d.prototype.setRequestedUpdateInterval = function(a) { + u("public flash.sensors.Geolocation::setRequestedUpdateInterval"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.events.EventDispatcher); - h.Geolocation = l; + k.Geolocation = l; })(a.sensors || (a.sensors = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.AVM2.Runtime.asCoerceString, l = c.AVM2.Runtime.AVM2, e = c.AVM2.Runtime.ApplicationDomain, m = c.AVM2.ABC.Multiname, t = function(a) { - function c(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.AVM2.Runtime.asCoerceString, l = d.AVM2.Runtime.AVM2, c = d.AVM2.Runtime.ApplicationDomain, h = d.AVM2.ABC.Multiname, p = function(a) { + function d(a) { void 0 === a && (a = null); - a instanceof e ? this._runtimeDomain = a : (a = a ? a._runtimeDomain : l.currentDomain().system, this._runtimeDomain = new e(a.vm, a, 2, !1)); + a instanceof c ? this._runtimeDomain = a : (a = a ? a._runtimeDomain : l.currentDomain().system, this._runtimeDomain = new c(a.vm, a, 2, !1)); } - __extends(c, a); - Object.defineProperty(c, "currentDomain", {get:function() { - return new c(l.currentDomain()); + __extends(d, a); + Object.defineProperty(d, "currentDomain", {get:function() { + return new d(l.currentDomain()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "MIN_DOMAIN_MEMORY_LENGTH", {get:function() { - p("public flash.system.ApplicationDomain::get MIN_DOMAIN_MEMORY_LENGTH"); + Object.defineProperty(d, "MIN_DOMAIN_MEMORY_LENGTH", {get:function() { + r("public flash.system.ApplicationDomain::get MIN_DOMAIN_MEMORY_LENGTH"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "parentDomain", {get:function() { - return this._runtimeDomain.base ? new c(this._runtimeDomain.base) : null; + Object.defineProperty(d.prototype, "parentDomain", {get:function() { + return this._runtimeDomain.base ? new d(this._runtimeDomain.base) : null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "domainMemory", {get:function() { - p("public flash.system.ApplicationDomain::get domainMemory"); + Object.defineProperty(d.prototype, "domainMemory", {get:function() { + r("public flash.system.ApplicationDomain::get domainMemory"); }, set:function(a) { - p("public flash.system.ApplicationDomain::set domainMemory"); + r("public flash.system.ApplicationDomain::set domainMemory"); }, enumerable:!0, configurable:!0}); - c.prototype.getDefinition = function(a) { - return(a = s(a)) ? (a = a.replace("::", "."), this._runtimeDomain.getProperty(m.fromSimpleName(a), !0, !0)) : null; + d.prototype.getDefinition = function(a) { + return(a = t(a)) ? (a = a.replace("::", "."), this._runtimeDomain.getProperty(h.fromSimpleName(a), !0, !0)) : null; }; - c.prototype.hasDefinition = function(a) { - return(a = s(a)) ? (a = a.replace("::", "."), !!this._runtimeDomain.findDomainProperty(m.fromSimpleName(a), !1, !1)) : !1; + d.prototype.hasDefinition = function(a) { + return(a = t(a)) ? (a = a.replace("::", "."), !!this._runtimeDomain.findDomainProperty(h.fromSimpleName(a), !1, !1)) : !1; }; - c.prototype.getQualifiedDefinitionNames = function() { - p("public flash.system.ApplicationDomain::getQualifiedDefinitionNames"); + d.prototype.getQualifiedDefinitionNames = function() { + r("public flash.system.ApplicationDomain::getQualifiedDefinitionNames"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - h.ApplicationDomain = t; - })(h.system || (h.system = {})); + k.ApplicationDomain = p; + })(k.system || (k.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.ObjectUtilities.toKeyValueArray, t = function(a) { - function c() { - s("public flash.system.Capabilities"); + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = d.ObjectUtilities.toKeyValueArray, p = function(a) { + function d() { + t("public flash.system.Capabilities"); } - __extends(c, a); - Object.defineProperty(c, "isEmbeddedInAcrobat", {get:function() { - p("public flash.system.Capabilities::get isEmbeddedInAcrobat"); + __extends(d, a); + Object.defineProperty(d, "isEmbeddedInAcrobat", {get:function() { + r("public flash.system.Capabilities::get isEmbeddedInAcrobat"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasEmbeddedVideo", {get:function() { - p("public flash.system.Capabilities::get hasEmbeddedVideo"); + Object.defineProperty(d, "hasEmbeddedVideo", {get:function() { + r("public flash.system.Capabilities::get hasEmbeddedVideo"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasAudio", {get:function() { - p("public flash.system.Capabilities::get hasAudio"); + Object.defineProperty(d, "hasAudio", {get:function() { + r("public flash.system.Capabilities::get hasAudio"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "avHardwareDisable", {get:function() { - p("public flash.system.Capabilities::get avHardwareDisable"); + Object.defineProperty(d, "avHardwareDisable", {get:function() { + r("public flash.system.Capabilities::get avHardwareDisable"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasAccessibility", {get:function() { - e("public flash.system.Capabilities::get hasAccessibility"); - return c._hasAccessibility; + Object.defineProperty(d, "hasAccessibility", {get:function() { + c("public flash.system.Capabilities::get hasAccessibility"); + return d._hasAccessibility; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasAudioEncoder", {get:function() { - p("public flash.system.Capabilities::get hasAudioEncoder"); + Object.defineProperty(d, "hasAudioEncoder", {get:function() { + r("public flash.system.Capabilities::get hasAudioEncoder"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasMP3", {get:function() { - p("public flash.system.Capabilities::get hasMP3"); + Object.defineProperty(d, "hasMP3", {get:function() { + r("public flash.system.Capabilities::get hasMP3"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasPrinting", {get:function() { - p("public flash.system.Capabilities::get hasPrinting"); + Object.defineProperty(d, "hasPrinting", {get:function() { + r("public flash.system.Capabilities::get hasPrinting"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasScreenBroadcast", {get:function() { - p("public flash.system.Capabilities::get hasScreenBroadcast"); + Object.defineProperty(d, "hasScreenBroadcast", {get:function() { + r("public flash.system.Capabilities::get hasScreenBroadcast"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasScreenPlayback", {get:function() { - p("public flash.system.Capabilities::get hasScreenPlayback"); + Object.defineProperty(d, "hasScreenPlayback", {get:function() { + r("public flash.system.Capabilities::get hasScreenPlayback"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasStreamingAudio", {get:function() { - p("public flash.system.Capabilities::get hasStreamingAudio"); + Object.defineProperty(d, "hasStreamingAudio", {get:function() { + r("public flash.system.Capabilities::get hasStreamingAudio"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasStreamingVideo", {get:function() { - p("public flash.system.Capabilities::get hasStreamingVideo"); + Object.defineProperty(d, "hasStreamingVideo", {get:function() { + r("public flash.system.Capabilities::get hasStreamingVideo"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasVideoEncoder", {get:function() { - p("public flash.system.Capabilities::get hasVideoEncoder"); + Object.defineProperty(d, "hasVideoEncoder", {get:function() { + r("public flash.system.Capabilities::get hasVideoEncoder"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "isDebugger", {get:function() { - e("public flash.system.Capabilities::get isDebugger"); - return c._isDebugger; + Object.defineProperty(d, "isDebugger", {get:function() { + c("public flash.system.Capabilities::get isDebugger"); + return d._isDebugger; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "localFileReadDisable", {get:function() { - p("public flash.system.Capabilities::get localFileReadDisable"); + Object.defineProperty(d, "localFileReadDisable", {get:function() { + r("public flash.system.Capabilities::get localFileReadDisable"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "language", {get:function() { - e("public flash.system.Capabilities::get language"); - return c._language; + Object.defineProperty(d, "language", {get:function() { + c("public flash.system.Capabilities::get language"); + return d._language; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "manufacturer", {get:function() { - e("public flash.system.Capabilities::get manufacturer"); - return c._manufacturer; + Object.defineProperty(d, "manufacturer", {get:function() { + c("public flash.system.Capabilities::get manufacturer"); + return d._manufacturer; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "os", {get:function() { - if (null === c._os) { - var a, e = window.navigator.userAgent; - 0 < e.indexOf("Macintosh") ? a = "Mac OS 10.5.2" : 0 < e.indexOf("Windows") ? a = "Windows XP" : 0 < e.indexOf("Linux") ? a = "Linux" : /(iPad|iPhone|iPod|Android)/.test(e) ? a = "iPhone3,1" : p("public flash.system.Capabilities::get os"); - c._os = a; + Object.defineProperty(d, "os", {get:function() { + if (null === d._os) { + var a, c = window.navigator.userAgent; + 0 < c.indexOf("Macintosh") ? a = "Mac OS 10.5.2" : 0 < c.indexOf("Windows") ? a = "Windows XP" : 0 < c.indexOf("Linux") ? a = "Linux" : /(iPad|iPhone|iPod|Android)/.test(c) ? a = "iPhone3,1" : r("public flash.system.Capabilities::get os"); + d._os = a; } - return c._os; + return d._os; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "cpuArchitecture", {get:function() { - p("public flash.system.Capabilities::get cpuArchitecture"); + Object.defineProperty(d, "cpuArchitecture", {get:function() { + r("public flash.system.Capabilities::get cpuArchitecture"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "playerType", {get:function() { - e("public flash.system.Capabilities::get playerType"); - return c._playerType; + Object.defineProperty(d, "playerType", {get:function() { + c("public flash.system.Capabilities::get playerType"); + return d._playerType; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "serverString", {get:function() { - var a = m({OS:c.os}).map(function(a) { + Object.defineProperty(d, "serverString", {get:function() { + var a = h({OS:d.os}).map(function(a) { return a[0] + "=" + encodeURIComponent(a[1]); }).join("&"); - e("Capabilities.serverString: " + a); + c("Capabilities.serverString: " + a); return a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "version", {get:function() { - return c._version; + Object.defineProperty(d, "version", {get:function() { + return d._version; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "screenColor", {get:function() { + Object.defineProperty(d, "screenColor", {get:function() { return "color"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "pixelAspectRatio", {get:function() { - p("public flash.system.Capabilities::get pixelAspectRatio"); + Object.defineProperty(d, "pixelAspectRatio", {get:function() { + r("public flash.system.Capabilities::get pixelAspectRatio"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "screenDPI", {get:function() { - e("public flash.system.Capabilities::get screenDPI"); - return c._screenDPI; + Object.defineProperty(d, "screenDPI", {get:function() { + c("public flash.system.Capabilities::get screenDPI"); + return d._screenDPI; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "screenResolutionX", {get:function() { - e("public flash.system.Capabilities::get screenResolutionX"); + Object.defineProperty(d, "screenResolutionX", {get:function() { + c("public flash.system.Capabilities::get screenResolutionX"); return window.screen.width; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "screenResolutionY", {get:function() { - e("public flash.system.Capabilities::get screenResolutionY"); + Object.defineProperty(d, "screenResolutionY", {get:function() { + c("public flash.system.Capabilities::get screenResolutionY"); return window.screen.height; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "touchscreenType", {get:function() { - p("public flash.system.Capabilities::get touchscreenType"); + Object.defineProperty(d, "touchscreenType", {get:function() { + r("public flash.system.Capabilities::get touchscreenType"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasIME", {get:function() { - p("public flash.system.Capabilities::get hasIME"); + Object.defineProperty(d, "hasIME", {get:function() { + r("public flash.system.Capabilities::get hasIME"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasTLS", {get:function() { - p("public flash.system.Capabilities::get hasTLS"); + Object.defineProperty(d, "hasTLS", {get:function() { + r("public flash.system.Capabilities::get hasTLS"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "maxLevelIDC", {get:function() { - p("public flash.system.Capabilities::get maxLevelIDC"); + Object.defineProperty(d, "maxLevelIDC", {get:function() { + r("public flash.system.Capabilities::get maxLevelIDC"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "supports32BitProcesses", {get:function() { - p("public flash.system.Capabilities::get supports32BitProcesses"); + Object.defineProperty(d, "supports32BitProcesses", {get:function() { + r("public flash.system.Capabilities::get supports32BitProcesses"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "supports64BitProcesses", {get:function() { - p("public flash.system.Capabilities::get supports64BitProcesses"); + Object.defineProperty(d, "supports64BitProcesses", {get:function() { + r("public flash.system.Capabilities::get supports64BitProcesses"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "_internal", {get:function() { - p("public flash.system.Capabilities::get _internal"); + Object.defineProperty(d, "_internal", {get:function() { + r("public flash.system.Capabilities::get _internal"); }, enumerable:!0, configurable:!0}); - c.hasMultiChannelAudio = function(a) { + d.hasMultiChannelAudio = function(a) { l(a); - p("public flash.system.Capabilities::static hasMultiChannelAudio"); + r("public flash.system.Capabilities::static hasMultiChannelAudio"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c._hasAccessibility = !1; - c._isDebugger = !1; - c._language = "en"; - c._manufacturer = "Mozilla Research"; - c._os = null; - c._playerType = "PlugIn"; - c._version = "SHUMWAY 10,0,0,0"; - c._screenDPI = 96; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d._hasAccessibility = !1; + d._isDebugger = !1; + d._language = "en"; + d._manufacturer = "Mozilla Research"; + d._os = null; + d._playerType = "PlugIn"; + d._version = "SHUMWAY 10,0,0,0"; + d._screenDPI = 96; + return d; }(a.ASNative); - h.Capabilities = t; - })(h.system || (h.system = {})); + k.Capabilities = p; + })(k.system || (k.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) { - function l() { - p("packageInternal flash.system.FSCommand"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function h() { + r("packageInternal flash.system.FSCommand"); } - __extends(l, a); - l._fscommand = function(a, e) { - a = s(a); - e = s(e); - console.log("FSCommand: " + a + "; " + e); + __extends(h, a); + h._fscommand = function(a, c) { + a = t(a); + c = t(c); + console.log("FSCommand: " + a + "; " + c); a = a.toLowerCase(); if ("debugger" === a) { debugger; } else { - c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].executeFSCommand(a, e); + d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].executeFSCommand(a, c); } }; - l.classInitializer = null; - l.initializer = null; - l.classSymbols = null; - l.instanceSymbols = null; - return l; + h.classInitializer = null; + h.initializer = null; + h.classSymbols = null; + h.instanceSymbols = null; + return h; }(a.ASNative); - h.FSCommand = l; - })(h.system || (h.system = {})); + k.FSCommand = l; + })(k.system || (k.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.system.ImageDecodingPolicy"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.system.ImageDecodingPolicy"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.ON_DEMAND = "onDemand"; - e.ON_LOAD = "onLoad"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.ON_DEMAND = "onDemand"; + c.ON_LOAD = "onLoad"; + return c; }(a.ASNative); - h.ImageDecodingPolicy = s; - })(h.system || (h.system = {})); + k.ImageDecodingPolicy = t; + })(k.system || (k.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(h) { - var p = function(a) { - function l(a, l, h) { + (function(d) { + (function(k) { + var u = function(a) { + function l(a, h, l) { void 0 === a && (a = !1); - void 0 === l && (l = null); void 0 === h && (h = null); + void 0 === l && (l = null); this.checkPolicyFile = a; - this.applicationDomain = l; - this.securityDomain = h; - this.imageDecodingPolicy = c.system.ImageDecodingPolicy.ON_DEMAND; + this.applicationDomain = h; + this.securityDomain = l; + this.imageDecodingPolicy = d.system.ImageDecodingPolicy.ON_DEMAND; } __extends(l, a); l.classInitializer = null; @@ -40384,104 +40500,104 @@ var RtmpJs; l.instanceSymbols = "checkPolicyFile! applicationDomain! securityDomain! allowCodeImport! requestedContentParent! parameters! imageDecodingPolicy!".split(" "); return l; }(a.ASNative); - h.LoaderContext = p; - })(c.system || (c.system = {})); + k.LoaderContext = u; + })(d.system || (d.system = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function e(a, e, c, l) { - p("public flash.system.JPEGLoaderContext"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.system.LoaderContext); - h.JPEGLoaderContext = u; - })(a.system || (a.system = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.system.MessageChannel"); + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(a, c, d, l) { + u("public flash.system.JPEGLoaderContext"); } __extends(c, a); - Object.defineProperty(c.prototype, "messageAvailable", {get:function() { - p("public flash.system.MessageChannel::get messageAvailable"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "state", {get:function() { - p("public flash.system.MessageChannel::get state"); - }, enumerable:!0, configurable:!0}); - c.prototype.send = function(a, e) { - p("public flash.system.MessageChannel::send"); - }; - c.prototype.receive = function(a) { - p("public flash.system.MessageChannel::receive"); - }; - c.prototype.close = function() { - p("public flash.system.MessageChannel::close"); - }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; return c; - }(a.events.EventDispatcher); - h.MessageChannel = l; + }(a.system.LoaderContext); + k.JPEGLoaderContext = t; })(a.system || (a.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.system.MessageChannelState"); + (function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.system.MessageChannel"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.OPEN = "open"; - e.CLOSING = "closing"; - e.CLOSED = "closed"; - return e; - }(a.ASNative); - h.MessageChannelState = s; - })(h.system || (h.system = {})); + __extends(d, a); + Object.defineProperty(d.prototype, "messageAvailable", {get:function() { + u("public flash.system.MessageChannel::get messageAvailable"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "state", {get:function() { + u("public flash.system.MessageChannel::get state"); + }, enumerable:!0, configurable:!0}); + d.prototype.send = function(a, c) { + u("public flash.system.MessageChannel::send"); + }; + d.prototype.receive = function(a) { + u("public flash.system.MessageChannel::receive"); + }; + d.prototype.close = function() { + u("public flash.system.MessageChannel::close"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.events.EventDispatcher); + k.MessageChannel = l; + })(a.system || (a.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.system.MessageChannelState"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.OPEN = "open"; + c.CLOSING = "closing"; + c.CLOSED = "closed"; + return c; + }(a.ASNative); + k.MessageChannelState = t; + })(k.system || (k.system = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = d.Debug.somewhatImplemented, h = function(a) { function h() { - s("public flash.system.Security"); + t("public flash.system.Security"); } __extends(h, a); Object.defineProperty(h, "exactSettings", {get:function() { @@ -40490,40 +40606,40 @@ var RtmpJs; h._exactSettings = !!a; }, enumerable:!0, configurable:!0}); Object.defineProperty(h, "disableAVM1Loading", {get:function() { - p("public flash.system.Security::get disableAVM1Loading"); + r("public flash.system.Security::get disableAVM1Loading"); }, set:function(a) { - p("public flash.system.Security::set disableAVM1Loading"); + r("public flash.system.Security::set disableAVM1Loading"); }, enumerable:!0, configurable:!0}); Object.defineProperty(h, "sandboxType", {get:function() { - e("public flash.system.Security::get sandboxType"); + c("public flash.system.Security::get sandboxType"); return h._sandboxType; }, enumerable:!0, configurable:!0}); Object.defineProperty(h, "pageDomain", {get:function() { - e("public flash.system.Security::get pageDomain"); - var a = c.FileLoadingService.instance.resolveUrl("/").split("/"); + c("public flash.system.Security::get pageDomain"); + var a = d.FileLoadingService.instance.resolveUrl("/").split("/"); a.pop(); return a.pop(); }, enumerable:!0, configurable:!0}); h.allowDomain = function() { - e('public flash.system.Security::static allowDomain ["' + Array.prototype.join.call(arguments, '", "') + '"]'); + c('public flash.system.Security::static allowDomain ["' + Array.prototype.join.call(arguments, '", "') + '"]'); }; h.allowInsecureDomain = function() { - e("public flash.system.Security::static allowInsecureDomain"); + c("public flash.system.Security::static allowInsecureDomain"); }; h.loadPolicyFile = function(a) { l(a); - e("public flash.system.Security::static loadPolicyFile"); + c("public flash.system.Security::static loadPolicyFile"); }; h.showSettings = function(a) { void 0 === a && (a = "default"); l(a); - p("public flash.system.Security::static showSettings"); + r("public flash.system.Security::static showSettings"); }; - h.duplicateSandboxBridgeInputArguments = function(a, e) { - p("public flash.system.Security::static duplicateSandboxBridgeInputArguments"); + h.duplicateSandboxBridgeInputArguments = function(a, c) { + r("public flash.system.Security::static duplicateSandboxBridgeInputArguments"); }; - h.duplicateSandboxBridgeOutputArgument = function(a, e) { - p("public flash.system.Security::static duplicateSandboxBridgeOutputArgument"); + h.duplicateSandboxBridgeOutputArgument = function(a, c) { + r("public flash.system.Security::static duplicateSandboxBridgeOutputArgument"); }; h.classInitializer = null; h.initializer = null; @@ -40538,258 +40654,258 @@ var RtmpJs; h._sandboxType = "remote"; return h; }(a.ASNative); - h.Security = m; - })(h.system || (h.system = {})); + k.Security = h; + })(k.system || (k.system = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.somewhatImplemented, s = function(a) { - function e() { - } - __extends(e, a); - Object.defineProperty(e, "currentDomain", {get:function() { - this._currentDomain || (this._currentDomain = new h.SecurityDomain); - p("public flash.system.SecurityDomain::get currentDomain"); - return this._currentDomain; - }, enumerable:!0, configurable:!0}); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.SecurityDomain = s; - })(h.system || (h.system = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.system.SecurityPanel"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.DEFAULT = "default"; - e.PRIVACY = "privacy"; - e.LOCAL_STORAGE = "localStorage"; - e.MICROPHONE = "microphone"; - e.CAMERA = "camera"; - e.DISPLAY = "display"; - e.SETTINGS_MANAGER = "settingsManager"; - return e; - }(a.ASNative); - h.SecurityPanel = s; - })(h.system || (h.system = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.system.TouchscreenType"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.FINGER = "finger"; - e.STYLUS = "stylus"; - e.NONE = "none"; - return e; - }(a.ASNative); - h.TouchscreenType = s; - })(h.system || (h.system = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(c) { - (function(c) { - var h = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.somewhatImplemented, t = function(a) { function c() { - a.call(this); } __extends(c, a); - c.fromNumber = function(a) { + Object.defineProperty(c, "currentDomain", {get:function() { + this._currentDomain || (this._currentDomain = new k.SecurityDomain); + r("public flash.system.SecurityDomain::get currentDomain"); + return this._currentDomain; + }, enumerable:!0, configurable:!0}); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; + }(a.ASNative); + k.SecurityDomain = t; + })(k.system || (k.system = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.system.SecurityPanel"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.DEFAULT = "default"; + c.PRIVACY = "privacy"; + c.LOCAL_STORAGE = "localStorage"; + c.MICROPHONE = "microphone"; + c.CAMERA = "camera"; + c.DISPLAY = "display"; + c.SETTINGS_MANAGER = "settingsManager"; + return c; + }(a.ASNative); + k.SecurityPanel = t; + })(k.system || (k.system = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.system.TouchscreenType"); + } + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.FINGER = "finger"; + c.STYLUS = "stylus"; + c.NONE = "none"; + return c; + }(a.ASNative); + k.TouchscreenType = t; + })(k.system || (k.system = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(d) { + (function(a) { + (function(d) { + (function(d) { + var k = function(a) { + function d() { + a.call(this); + } + __extends(d, a); + d.fromNumber = function(a) { switch(a) { case 1: - return c.NORMAL; + return d.NORMAL; case 2: - return c.ADVANCED; + return d.ADVANCED; default: return null; } }; - c.toNumber = function(a) { + d.toNumber = function(a) { switch(a) { - case c.NORMAL: + case d.NORMAL: return 1; - case c.ADVANCED: + case d.ADVANCED: return 2; default: return-1; } }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.NORMAL = "normal"; - c.ADVANCED = "advanced"; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.NORMAL = "normal"; + d.ADVANCED = "advanced"; + return d; }(a.ASNative); - c.AntiAliasType = h; - })(c.text || (c.text = {})); + d.AntiAliasType = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.REGULAR = "regular"; - c.BOLD = "bold"; - c.ITALIC = "italic"; - c.BOLD_ITALIC = "boldItalic"; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.REGULAR = "regular"; + d.BOLD = "bold"; + d.ITALIC = "italic"; + d.BOLD_ITALIC = "boldItalic"; + return d; }(a.ASNative); - c.FontStyle = h; - })(c.text || (c.text = {})); + d.FontStyle = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.EMBEDDED = "embedded"; - c.EMBEDDED_CFF = "embeddedCFF"; - c.DEVICE = "device"; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.EMBEDDED = "embedded"; + d.EMBEDDED_CFF = "embeddedCFF"; + d.DEVICE = "device"; + return d; }(a.ASNative); - c.FontType = h; - })(c.text || (c.text = {})); + d.FontType = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - var p = c.Debug.somewhatImplemented, u = c.AVM2.Runtime.asCoerceString, l = h.text.FontStyle, e = h.text.FontType, m = function(a) { - function m() { + var u = d.Debug.somewhatImplemented, t = d.AVM2.Runtime.asCoerceString, l = k.text.FontStyle, c = k.text.FontType, h = function(a) { + function h() { } - __extends(m, a); - m._getFontMetrics = function(a, e) { - return this._deviceFontMetrics[a + e] || this._deviceFontMetrics[a]; + __extends(h, a); + h._getFontMetrics = function(a, c) { + return this._deviceFontMetrics[a + c] || this._deviceFontMetrics[a]; }; - m.resolveFontName = function(a) { - return "_sans" === a ? m.DEFAULT_FONT_SANS : "_serif" === a ? m.DEFAULT_FONT_SERIF : "_typewriter" === a ? m.DEFAULT_FONT_TYPEWRITER : a; + h.resolveFontName = function(a) { + return "_sans" === a ? h.DEFAULT_FONT_SANS : "_serif" === a ? h.DEFAULT_FONT_SERIF : "_typewriter" === a ? h.DEFAULT_FONT_TYPEWRITER : a; }; - m.getBySymbolId = function(a) { + h.getBySymbolId = function(a) { return this._fontsBySymbolId[a]; }; - m.getByNameAndStyle = function(a, f) { - for (var d, b, g = a.split(","), l = 0;l < g.length && !b;l++) { - d = g[l].toLowerCase() + f, b = this._fontsByName[d]; + h.getByNameAndStyle = function(a, f) { + for (var b, e, d = a.split(","), l = 0;l < d.length && !e;l++) { + b = d[l].toLowerCase() + f, e = this._fontsByName[b]; } - b || (b = new m, b._fontName = g[0], b._fontFamily = m.resolveFontName(g[0].toLowerCase()), b._fontStyle = f, b._fontType = e.DEVICE, this._fontsByName[d] = b); - b._fontType === e.DEVICE && (d = m._getFontMetrics(b._fontName, b._fontStyle), d || (c.Debug.warning('Font metrics for "' + b._fontName + '" unknown. Fallback to default.'), d = m._getFontMetrics(m.DEFAULT_FONT_SANS, b._fontStyle), b._fontFamily = m.DEFAULT_FONT_SANS), b.ascent = d[0], b.descent = d[1], b.leading = d[2]); - return b; + e || (e = new h, e._fontName = d[0], e._fontFamily = h.resolveFontName(d[0].toLowerCase()), e._fontStyle = f, e._fontType = c.DEVICE, this._fontsByName[b] = e); + e._fontType === c.DEVICE && (b = h._getFontMetrics(e._fontName, e._fontStyle), b || (b = h._getFontMetrics(h.DEFAULT_FONT_SANS, e._fontStyle), e._fontFamily = h.DEFAULT_FONT_SANS), e.ascent = b[0], e.descent = b[1], e.leading = b[2]); + return e; }; - m.getDefaultFont = function() { - return m.getByNameAndStyle(m.DEFAULT_FONT_SANS, l.REGULAR); + h.getDefaultFont = function() { + return h.getByNameAndStyle(h.DEFAULT_FONT_SANS, l.REGULAR); }; - m.enumerateFonts = function(a) { - p("public flash.text.Font::static enumerateFonts"); - return m._fonts.slice(); + h.enumerateFonts = function(a) { + u("public flash.text.Font::static enumerateFonts"); + return h._fonts.slice(); }; - m.registerFont = function(a) { - p("Font.registerFont"); + h.registerFont = function(a) { + u("Font.registerFont"); }; - m.registerEmbeddedFont = function(a, e) { - var d = h.display.DisplayObject.getNextSyncID(), b = {get:m.resolveEmbeddedFont.bind(m, e, a.id, d), configurable:!0}; - Object.defineProperty(m._fontsByName, a.name.toLowerCase() + a.style, b); - Object.defineProperty(m._fontsByName, "swffont" + d + a.style, b); - Object.defineProperty(m._fontsBySymbolId, d + "", b); + h.registerEmbeddedFont = function(a, c) { + var b = k.display.DisplayObject.getNextSyncID(), e = {get:h.resolveEmbeddedFont.bind(h, c, a.id, b), configurable:!0}; + Object.defineProperty(h._fontsByName, a.name.toLowerCase() + a.style, e); + Object.defineProperty(h._fontsByName, "swffont" + b + a.style, e); + Object.defineProperty(h._fontsBySymbolId, b + "", e); }; - m.resolveEmbeddedFont = function(a, e, d) { - a.getSymbolById(e).syncId = d; - return m._fontsBySymbolId[e]; + h.resolveEmbeddedFont = function(a, c, b) { + a.getSymbolById(c).syncId = b; + return h._fontsBySymbolId[c]; }; - Object.defineProperty(m.prototype, "fontName", {get:function() { + Object.defineProperty(h.prototype, "fontName", {get:function() { return this._fontName; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "fontStyle", {get:function() { + Object.defineProperty(h.prototype, "fontStyle", {get:function() { return this._fontStyle; }, enumerable:!0, configurable:!0}); - Object.defineProperty(m.prototype, "fontType", {get:function() { + Object.defineProperty(h.prototype, "fontType", {get:function() { return this._fontType; }, enumerable:!0, configurable:!0}); - m.prototype.hasGlyphs = function(a) { - u(a); - p("Font#hasGlyphs"); + h.prototype.hasGlyphs = function(a) { + t(a); + u("Font#hasGlyphs"); return!0; }; - m.DEFAULT_FONT_SANS = "Arial"; - m.DEFAULT_FONT_SERIF = "Times New Roman"; - m.DEFAULT_FONT_TYPEWRITER = "Courier New"; - m.classInitializer = function() { - m._fonts = []; - m._fontsBySymbolId = c.ObjectUtilities.createMap(); - m._fontsByName = c.ObjectUtilities.createMap(); - m.DEVICE_FONT_METRICS_WIN = {Arial:[1, .25, 0], "Arial Baltic":[1, .25, 0], "Arial Black":[1.0833, .3333, 0], "Arial CE":[1, .25, 0], "Arial CYR":[1, .25, 0], "Arial Greek":[1, .25, 0], "Arial TUR":[1, .25, 0], "Comic Sans MS":[1.0833, .3333, 0], "Courier New":[1, .25, 0], "Courier New Baltic":[1, .25, 0], "Courier New CE":[1, .25, 0], "Courier New CYR":[1, .25, 0], "Courier New Greek":[1, .25, 0], "Courier New TUR":[1, .25, 0], "Estrangelo Edessa":[.75, .3333, 0], "Franklin Gothic Medium":[1, + h.DEFAULT_FONT_SANS = "Arial"; + h.DEFAULT_FONT_SERIF = "Times New Roman"; + h.DEFAULT_FONT_TYPEWRITER = "Courier New"; + h.classInitializer = function() { + h._fonts = []; + h._fontsBySymbolId = d.ObjectUtilities.createMap(); + h._fontsByName = d.ObjectUtilities.createMap(); + h.DEVICE_FONT_METRICS_WIN = {Arial:[1, .25, 0], "Arial Baltic":[1, .25, 0], "Arial Black":[1.0833, .3333, 0], "Arial CE":[1, .25, 0], "Arial CYR":[1, .25, 0], "Arial Greek":[1, .25, 0], "Arial TUR":[1, .25, 0], "Comic Sans MS":[1.0833, .3333, 0], "Courier New":[1, .25, 0], "Courier New Baltic":[1, .25, 0], "Courier New CE":[1, .25, 0], "Courier New CYR":[1, .25, 0], "Courier New Greek":[1, .25, 0], "Courier New TUR":[1, .25, 0], "Estrangelo Edessa":[.75, .3333, 0], "Franklin Gothic Medium":[1, .3333, 0], Gautami:[.9167, .8333, 0], Georgia:[1, .25, 0], Impact:[1.0833, .25, 0], Latha:[1.0833, .25, 0], "Lucida Console":[.75, .25, 0], "Lucida Sans Unicode":[1.0833, .25, 0], Mangal:[1.0833, .25, 0], Marlett:[1, 0, 0], "Microsoft Sans Serif":[1.0833, .1667, 0], "MV Boli":[.9167, .25, 0], "Palatino Linotype":[1.0833, .3333, 0], Raavi:[1.0833, .6667, 0], Shruti:[1, .5, 0], Sylfaen:[1, .3333, 0], Symbol:[1, .25, 0], Tahoma:[1, .1667, 0], "Times New Roman":[1, .25, 0], "Times New Roman Baltic":[1, .25, 0], "Times New Roman CE":[1, .25, 0], "Times New Roman CYR":[1, .25, 0], "Times New Roman Greek":[1, .25, 0], "Times New Roman TUR":[1, .25, 0], "Trebuchet MS":[1.0833, .4167, 0], Tunga:[1, .75, 0], Verdana:[1, .1667, 0], Webdings:[1.0833, .5, 0], Wingdings:[.9167, .25, 0]}; - m.DEVICE_FONT_METRICS_MAC = {"Al Bayan Bold":[1, .5833, 0], "Al Bayan Plain":[1, .5, 0], "Al Nile":[.8333, .5, 0], "Al Nile Bold":[.8333, .5, 0], "Al Tarikh Regular":[.5833, .4167, 0], "American Typewriter":[.9167, .25, 0], "American Typewriter Bold":[.9167, .25, 0], "American Typewriter Condensed":[.9167, .25, 0], "American Typewriter Condensed Bold":[.9167, .25, 0], "American Typewriter Condensed Light":[.8333, .25, 0], "American Typewriter Light":[.9167, .25, 0], "Andale Mono":[.9167, + h.DEVICE_FONT_METRICS_MAC = {"Al Bayan Bold":[1, .5833, 0], "Al Bayan Plain":[1, .5, 0], "Al Nile":[.8333, .5, 0], "Al Nile Bold":[.8333, .5, 0], "Al Tarikh Regular":[.5833, .4167, 0], "American Typewriter":[.9167, .25, 0], "American Typewriter Bold":[.9167, .25, 0], "American Typewriter Condensed":[.9167, .25, 0], "American Typewriter Condensed Bold":[.9167, .25, 0], "American Typewriter Condensed Light":[.8333, .25, 0], "American Typewriter Light":[.9167, .25, 0], "Andale Mono":[.9167, .25, 0], "Apple Braille":[.75, .25, 0], "Apple Braille Outline 6 Dot":[.75, .25, 0], "Apple Braille Outline 8 Dot":[.75, .25, 0], "Apple Braille Pinpoint 6 Dot":[.75, .25, 0], "Apple Braille Pinpoint 8 Dot":[.75, .25, 0], "Apple Chancery":[1.0833, .5, 0], "Apple Color Emoji":[1.25, .4167, 0], "Apple SD Gothic Neo Bold":[.9167, .3333, 0], "Apple SD Gothic Neo Heavy":[.9167, .3333, 0], "Apple SD Gothic Neo Light":[.9167, .3333, 0], "Apple SD Gothic Neo Medium":[.9167, .3333, 0], "Apple SD Gothic Neo Regular":[.9167, .3333, 0], "Apple SD Gothic Neo SemiBold":[.9167, .3333, 0], "Apple SD Gothic Neo Thin":[.9167, .3333, 0], "Apple SD Gothic Neo UltraLight":[.9167, .3333, 0], "Apple SD GothicNeo ExtraBold":[.9167, .3333, 0], "Apple Symbols":[.6667, .25, 0], "AppleGothic Regular":[.9167, .3333, 0], "AppleMyungjo Regular":[.8333, .3333, 0], Arial:[.9167, .25, 0], "Arial Black":[1.0833, .3333, 0], "Arial Bold":[.9167, .25, 0], "Arial Bold Italic":[.9167, .25, 0], "Arial Hebrew":[.75, .3333, 0], "Arial Hebrew Bold":[.75, .3333, 0], "Arial Hebrew Light":[.75, .3333, 0], "Arial Hebrew Scholar":[.75, .3333, 0], "Arial Hebrew Scholar Bold":[.75, .3333, 0], "Arial Hebrew Scholar Light":[.75, .3333, 0], "Arial Italic":[.9167, .25, 0], "Arial Narrow":[.9167, .25, 0], "Arial Narrow Bold":[.9167, .25, 0], "Arial Narrow Bold Italic":[.9167, .25, 0], "Arial Narrow Italic":[.9167, .25, 0], "Arial Rounded MT Bold":[.9167, .25, 0], "Arial Unicode MS":[1.0833, .25, 0], "Athelas Bold":[.9167, .25, 0], "Athelas Bold Italic":[.9167, @@ -40830,140 +40946,138 @@ var RtmpJs; "Times New Roman":[.9167, .25, 0], "Times New Roman Bold":[.9167, .25, 0], "Times New Roman Bold Italic":[.9167, .25, 0], "Times New Roman Italic":[.9167, .25, 0], "Times Roman":[.75, .25, 0], Trattatello:[1.1667, .6667, 0], "Trebuchet MS":[.9167, .25, 0], "Trebuchet MS Bold":[.9167, .25, 0], "Trebuchet MS Bold Italic":[.9167, .25, 0], "Trebuchet MS Italic":[.9167, .25, 0], Verdana:[1, .25, 0], "Verdana Bold":[1, .25, 0], "Verdana Bold Italic":[1, .25, 0], "Verdana Italic":[1, .25, 0], "Waseem Light":[.9167, .5833, 0], "Waseem Regular":[.9167, .5833, 0], "Wawati SC Regular":[1.0833, .3333, 0], "Wawati TC Regular":[1.0833, .3333, 0], Webdings:[.8333, .1667, 0], "Weibei SC Bold":[1.0833, .3333, 0], "Weibei TC Bold":[1.0833, .3333, 0], Wingdings:[.9167, .25, 0], "Wingdings 2":[.8333, .25, 0], "Wingdings 3":[.9167, .25, 0], "Xingkai SC Bold":[1.0833, .3333, 0], "Xingkai SC Light":[1.0833, .3333, 0], "Yuanti SC Bold":[1.0833, .3333, 0], "Yuanti SC Light":[1.0833, .3333, 0], "Yuanti SC Regular":[1.0833, .3333, 0], "YuGothic Bold":[.9167, .0833, 0], "YuGothic Medium":[.9167, .0833, 0], "YuMincho Demibold":[.9167, .0833, 0], "YuMincho Medium":[.9167, .0833, 0], "Yuppy SC Regular":[1.0833, .3333, 0], "Yuppy TC Regular":[1.0833, .3333, 0], "Zapf Dingbats":[.8333, .1667, 0], Zapfino:[1.9167, 1.5, 0]}; - m.DEVICE_FONT_METRICS_LINUX = {KacstFarsi:[1.0417, .5208, 0], Meera:[.651, .4557, 0], FreeMono:[.7812, .1953, 0], Loma:[1.1719, .4557, 0], "Century Schoolbook L":[.9766, .3255, 0], KacstTitleL:[1.0417, .5208, 0], Garuda:[1.3021, .5859, 0], Rekha:[1.1068, .2604, 0], Purisa:[1.1068, .5208, 0], "DejaVu Sans Mono":[.9115, .2604, 0], Vemana2000:[.9115, .8464, 0], KacstOffice:[1.0417, .5208, 0], Umpush:[1.237, .651, 0], OpenSymbol:[.7812, .1953, 0], Sawasdee:[1.1068, .4557, 0], "URW Palladio L":[.9766, + h.DEVICE_FONT_METRICS_LINUX = {KacstFarsi:[1.0417, .5208, 0], Meera:[.651, .4557, 0], FreeMono:[.7812, .1953, 0], Loma:[1.1719, .4557, 0], "Century Schoolbook L":[.9766, .3255, 0], KacstTitleL:[1.0417, .5208, 0], Garuda:[1.3021, .5859, 0], Rekha:[1.1068, .2604, 0], Purisa:[1.1068, .5208, 0], "DejaVu Sans Mono":[.9115, .2604, 0], Vemana2000:[.9115, .8464, 0], KacstOffice:[1.0417, .5208, 0], Umpush:[1.237, .651, 0], OpenSymbol:[.7812, .1953, 0], Sawasdee:[1.1068, .4557, 0], "URW Palladio L":[.9766, .3255, 0], FreeSerif:[.9115, .3255, 0], KacstDigital:[1.0417, .5208, 0], "Ubuntu Condensed":[.9115, .1953, 0], mry_KacstQurn:[1.4323, .7161, 0], "URW Gothic L":[.9766, .2604, 0], Dingbats:[.8464, .1953, 0], "URW Chancery L":[.9766, .3255, 0], "Phetsarath OT":[1.1068, .5208, 0], "Tlwg Typist":[.9115, .3906, 0], KacstLetter:[1.0417, .5208, 0], utkal:[1.1719, .651, 0], Norasi:[1.237, .5208, 0], KacstOne:[1.237, .651, 0], "Liberation Sans Narrow":[.9115, .2604, 0], Symbol:[1.0417, .3255, 0], NanumMyeongjo:[.9115, .2604, 0], Untitled1:[.651, .5859, 0], "Lohit Gujarati":[.9115, .3906, 0], "Liberation Mono":[.8464, .3255, 0], KacstArt:[1.0417, .5208, 0], Mallige:[.9766, .651, 0], "Bitstream Charter":[.9766, .2604, 0], NanumGothic:[.9115, .2604, 0], "Liberation Serif":[.9115, .2604, 0], Ubuntu:[.9115, .1953, 0], "Courier 10 Pitch":[.8464, .3255, 0], "Nimbus Sans L":[.9766, .3255, 0], TakaoPGothic:[.9115, .1953, 0], "WenQuanYi Micro Hei Mono":[.9766, .2604, 0], "DejaVu Sans":[.9115, .2604, 0], Kedage:[.9766, .651, 0], Kinnari:[1.3021, .5208, 0], TlwgMono:[.8464, .3906, 0], "Standard Symbols L":[1.0417, .3255, 0], "Lohit Punjabi":[1.1719, .651, 0], "Nimbus Mono L":[.8464, .3255, 0], Rachana:[.651, .5859, 0], Waree:[1.237, .4557, 0], KacstPoster:[1.0417, .5208, 0], "Khmer OS":[1.3021, .7161, 0], FreeSans:[.9766, .3255, 0], gargi:[.9115, .3255, 0], "Nimbus Roman No9 L":[.9115, .3255, 0], "DejaVu Serif":[.9115, .2604, 0], "WenQuanYi Micro Hei":[.9766, .2604, 0], "Ubuntu Light":[.9115, .1953, 0], TlwgTypewriter:[.9115, .3906, 0], KacstPen:[1.0417, .5208, 0], "Tlwg Typo":[.9115, .3906, 0], "Mukti Narrow":[1.237, .4557, 0], "Ubuntu Mono":[.8464, .1953, 0], "Lohit Bengali":[.9766, .4557, 0], "Liberation Sans":[.9115, .2604, 0], KacstDecorative:[1.1068, .5208, 0], "Khmer OS System":[1.237, .5859, 0], Saab:[.9766, .651, 0], KacstTitle:[1.0417, .5208, 0], "Mukti Narrow Bold":[1.237, .4557, 0], "Lohit Hindi":[.9766, .5208, 0], KacstQurn:[1.0417, .5208, 0], "URW Bookman L":[.9766, .3255, 0], KacstNaskh:[1.0417, .5208, 0], KacstScreen:[1.0417, .5208, 0], Pothana2000:[.9115, .8464, 0], "Lohit Tamil":[.8464, .3906, 0], KacstBook:[1.0417, .5208, 0], Sans:[.9115, .2604, 0], Times:[.9115, .3255, 0], Monospace:[.9115, .2604, 0]}; - m.DEVICE_FONT_METRICS_BUILTIN = {_sans:[.9, .22, .08], _serif:[.88, .26, .08], _typewriter:[.86, .24, .08]}; - m.DEVICE_FONT_METRICS_WIN.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN; - m.DEVICE_FONT_METRICS_MAC.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN; - m.DEVICE_FONT_METRICS_LINUX.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN; + h.DEVICE_FONT_METRICS_BUILTIN = {_sans:[.9, .22, .08], _serif:[.88, .26, .08], _typewriter:[.86, .24, .08]}; + h.DEVICE_FONT_METRICS_WIN.__proto__ = h.DEVICE_FONT_METRICS_BUILTIN; + h.DEVICE_FONT_METRICS_MAC.__proto__ = h.DEVICE_FONT_METRICS_BUILTIN; + h.DEVICE_FONT_METRICS_LINUX.__proto__ = h.DEVICE_FONT_METRICS_BUILTIN; var a = self.navigator.userAgent; - -1 < a.indexOf("Windows") ? m._deviceFontMetrics = m.DEVICE_FONT_METRICS_WIN : /(Macintosh|iPad|iPhone|iPod|Android)/.test(a) ? (m._deviceFontMetrics = this.DEVICE_FONT_METRICS_MAC, m.DEFAULT_FONT_SANS = "Helvetica", m.DEFAULT_FONT_SERIF = "Times Roman", m.DEFAULT_FONT_TYPEWRITER = "Courier") : (m._deviceFontMetrics = this.DEVICE_FONT_METRICS_LINUX, m.DEFAULT_FONT_SANS = "Sans", m.DEFAULT_FONT_SERIF = "Times", m.DEFAULT_FONT_TYPEWRITER = "Monospace"); - var a = m._deviceFontMetrics, e; - for (e in a) { - a[e.toLowerCase()] = a[e]; + -1 < a.indexOf("Windows") ? h._deviceFontMetrics = h.DEVICE_FONT_METRICS_WIN : /(Macintosh|iPad|iPhone|iPod|Android)/.test(a) ? (h._deviceFontMetrics = this.DEVICE_FONT_METRICS_MAC, h.DEFAULT_FONT_SANS = "Helvetica", h.DEFAULT_FONT_SERIF = "Times Roman", h.DEFAULT_FONT_TYPEWRITER = "Courier") : (h._deviceFontMetrics = this.DEVICE_FONT_METRICS_LINUX, h.DEFAULT_FONT_SANS = "Sans", h.DEFAULT_FONT_SERIF = "Times", h.DEFAULT_FONT_TYPEWRITER = "Monospace"); + var a = h._deviceFontMetrics, c; + for (c in a) { + a[c.toLowerCase()] = a[c]; } }; - m.classSymbols = null; - m.instanceSymbols = null; - m.initializer = function(a) { + h.classSymbols = null; + h.instanceSymbols = null; + h.initializer = function(a) { this._fontType = this._fontStyle = this._fontFamily = this._fontName = null; this.leading = this.descent = this.ascent = 0; this.advances = null; if (a) { this._symbol = a; - c.Debug.assert(a.syncId); this._id = a.syncId; this._fontName = a.name; - this._fontFamily = m.resolveFontName(a.name); + this._fontFamily = h.resolveFontName(a.name); this._fontStyle = a.bold ? a.italic ? l.BOLD_ITALIC : l.BOLD : a.italic ? l.ITALIC : l.REGULAR; var f = a.metrics; f && (this.ascent = f.ascent, this.descent = f.descent, this.leading = f.leading, this.advances = f.advances); - this._fontType = f ? e.EMBEDDED : e.DEVICE; - f = Object.getOwnPropertyDescriptor(m._fontsBySymbolId, a.syncId + ""); - f && f.value || (f = {value:this, configurable:!0}, Object.defineProperty(m._fontsBySymbolId, a.syncId + "", f), Object.defineProperty(m._fontsByName, a.name.toLowerCase() + this._fontStyle, f), this._fontType === e.EMBEDDED && Object.defineProperty(m._fontsByName, "swffont" + a.syncId + this._fontStyle, f)); + this._fontType = f ? c.EMBEDDED : c.DEVICE; + f = Object.getOwnPropertyDescriptor(h._fontsBySymbolId, a.syncId + ""); + f && f.value || (f = {value:this, configurable:!0}, Object.defineProperty(h._fontsBySymbolId, a.syncId + "", f), Object.defineProperty(h._fontsByName, a.name.toLowerCase() + this._fontStyle, f), this._fontType === c.EMBEDDED && Object.defineProperty(h._fontsByName, "swffont" + a.syncId + this._fontStyle, f)); } else { - this._id = h.display.DisplayObject.getNextSyncID(); + this._id = k.display.DisplayObject.getNextSyncID(); } }; - return m; + return h; }(a.ASNative); - v.Font = m; - var t = function(a) { - function e(c) { - a.call(this, c, m); - } - __extends(e, a); - e.FromData = function(a) { - var c = new e(a); - c.ready = !a.metrics; - c.name = a.name; - c.data = {id:a.id}; - c.bold = a.bold; - c.italic = a.italic; - c.originalSize = a.originalSize; - c.codes = a.codes; - c.metrics = a.metrics; - c.syncId = h.display.DisplayObject.getNextSyncID(); - return c; - }; - Object.defineProperty(e.prototype, "resolveAssetCallback", {get:function() { - return this._unboundResolveAssetCallback.bind(this); - }, enumerable:!0, configurable:!0}); - e.prototype._unboundResolveAssetCallback = function(a) { - c.Debug.assert(!this.ready); - this.ready = !0; - }; - return e; - }(c.Timeline.Symbol); - v.FontSymbol = t; - })(h.text || (h.text = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { - a.call(this); + v.Font = h; + var p = function(a) { + function c(d) { + a.call(this, d, h); } __extends(c, a); - c.fromNumber = function(a) { + c.FromData = function(a) { + var f = new c(a); + f.ready = !a.metrics; + f.name = a.name; + f.data = {id:a.id}; + f.bold = a.bold; + f.italic = a.italic; + f.originalSize = a.originalSize; + f.codes = a.codes; + f.metrics = a.metrics; + f.syncId = k.display.DisplayObject.getNextSyncID(); + return f; + }; + Object.defineProperty(c.prototype, "resolveAssetCallback", {get:function() { + return this._unboundResolveAssetCallback.bind(this); + }, enumerable:!0, configurable:!0}); + c.prototype._unboundResolveAssetCallback = function(a) { + this.ready = !0; + }; + return c; + }(d.Timeline.Symbol); + v.FontSymbol = p; + })(k.text || (k.text = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(d) { + (function(a) { + (function(d) { + (function(d) { + var k = function(a) { + function d() { + a.call(this); + } + __extends(d, a); + d.fromNumber = function(a) { switch(a) { case 0: - return c.NONE; + return d.NONE; case 1: - return c.PIXEL; + return d.PIXEL; case 2: - return c.SUBPIXEL; + return d.SUBPIXEL; default: return null; } }; - c.toNumber = function(a) { + d.toNumber = function(a) { switch(a) { - case c.NONE: + case d.NONE: return 0; - case c.PIXEL: + case d.PIXEL: return 1; - case c.SUBPIXEL: + case d.SUBPIXEL: return 2; default: return-1; } }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.NONE = "none"; - c.PIXEL = "pixel"; - c.SUBPIXEL = "subpixel"; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.NONE = "none"; + d.PIXEL = "pixel"; + d.SUBPIXEL = "subpixel"; + return d; }(a.ASNative); - c.GridFitType = h; - })(c.text || (c.text = {})); + d.GridFitType = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { - (function(c) { - var h = function(c) { + (function(d) { + var k = function(d) { function l() { a.display.DisplayObject.instanceConstructorNoInitialize.call(this); } - __extends(l, c); + __extends(l, d); l.prototype._canHaveTextContent = function() { return!0; }; @@ -40982,20 +41096,20 @@ var RtmpJs; }; return l; }(a.display.DisplayObject); - c.StaticText = h; + d.StaticText = k; })(a.text || (a.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - function p(a, e, c) { - for (;e < c;) { - switch(a[e]) { + function u(a, d, l) { + for (;d < l;) { + switch(a[d]) { case " ": ; case "\n": @@ -41003,98 +41117,94 @@ var RtmpJs; case "\r": ; case "\t": - e++; + d++; break; default: - return e; + return d; } } - l(e === c); - return c; + return l; } - var u = c.AVM2.Runtime.asCoerceString, l = c.Debug.assert, e = function(e) { - function c() { - h.events.EventDispatcher.instanceConstructorNoInitialize.call(this); + var t = d.AVM2.Runtime.asCoerceString, l = function(c) { + function d() { + k.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this.clear(); } - __extends(c, e); - Object.defineProperty(c.prototype, "styleNames", {get:function() { - var a = this._rules, e = [], c; - for (c in a) { - a[c] && e.push(c); + __extends(d, c); + Object.defineProperty(d.prototype, "styleNames", {get:function() { + var a = this._rules, c = [], d; + for (d in a) { + a[d] && c.push(d); } - return e; + return c; }, enumerable:!0, configurable:!0}); - c.prototype.getStyle = function(e) { - e = u(e); - return(e = this._rules[e.toLowerCase()]) ? a.ASJSON.transformJSValueToAS(e, !1) : null; + d.prototype.getStyle = function(c) { + c = t(c); + return(c = this._rules[c.toLowerCase()]) ? a.ASJSON.transformJSValueToAS(c, !1) : {}; }; - c.prototype.applyStyle = function(a, e) { - e = u(e); - var c = this._rules[e.toLowerCase()]; - return c ? a.transform(c) : a; + d.prototype.applyStyle = function(a, c) { + c = t(c); + var d = this._rules[c.toLowerCase()]; + return d ? a.transform(d) : a; }; - c.prototype.setStyle = function(e, c) { - "object" === typeof c && (e = u(e), this._rules[e.toLowerCase()] = a.ASJSON.transformASValueToJS(c, !1)); + d.prototype.setStyle = function(c, d) { + "object" === typeof d && (c = t(c), this._rules[c.toLowerCase()] = a.ASJSON.transformASValueToJS(d, !1)); }; - c.prototype.hasStyle = function(a) { + d.prototype.hasStyle = function(a) { return!!this._rules[a.toLowerCase()]; }; - c.prototype.clear = function() { + d.prototype.clear = function() { this._rules = Object.create(null); }; - c.prototype.transform = function(e) { - if ("object" !== typeof e) { + d.prototype.transform = function(c) { + if ("object" !== typeof c) { return null; } - e = a.ASJSON.transformASValueToJS(e, !1); - var c = new v.TextFormat; - c.transform(e); - return c; + c = a.ASJSON.transformASValueToJS(c, !1); + var d = new v.TextFormat; + d.transform(c); + return d; }; - c.prototype.parseCSS = function(a) { - a = u(a) + ""; - for (var e = a.length, c = p(a, 0, e), f = {}, d = [], b = !1, g = "";c < e;) { - var h = a[c++]; + d.prototype.parseCSS = function(a) { + a = t(a) + ""; + for (var c = a.length, d = u(a, 0, c), g = {}, f = [], b = !1, e = "";d < c;) { + var h = a[d++]; switch(h) { case "{": b = !1; - d.push(g); + f.push(e); a: { - var g = a, h = e, m = f; - l(0 < c); - l("{" === g[c - 1]); - var s = {}, t = "", v = !1, M = !1, c = p(g, c, h); - b: for (;c < h;) { - var N = g[c++]; - switch(N) { + var e = a, h = c, l = g, k = {}, r = "", v = !1, H = !1, d = u(e, d, h); + b: for (;d < h;) { + var K = e[d++]; + switch(K) { case "}": - if (0 < t.length) { - c = -1; + if (0 < r.length) { + d = -1; break a; } break b; case ":": - var K = "", y = t, t = "", M = v = !1; - for (;c < h;) { - switch(N = g[c], N) { + var F = "", J = r, r = "", H = v = !1; + for (;d < h;) { + switch(K = e[d], K) { case ";": ; case "\r": ; case "\n": - c++, c = p(g, c, h); + d++, d = u(e, d, h); case "}": - s[y] = K; + k[J] = F; continue b; default: - c++, K += N; + d++, F += K; } } - c = -1; + d = -1; break a; case "-": - ":" === g[c] ? t += N : M = !0; + ":" === e[d] ? r += K : H = !0; break; case " ": ; @@ -41104,39 +41214,38 @@ var RtmpJs; ; case "\t": v = !0; - t += N; - M = !1; + r += K; + H = !1; break; default: if (v) { - c = -1; + d = -1; break a; } - M && (N = N.toUpperCase(), M = !1); - t += N; + H && (K = K.toUpperCase(), H = !1); + r += K; } } - if ("}" !== g[c - 1]) { - c = -1; + if ("}" !== e[d - 1]) { + d = -1; } else { - for (g = 0;g < d.length;g++) { - m[d[g]] = s; + for (e = 0;e < f.length;e++) { + l[f[e]] = k; } } } - if (-1 === c) { + if (-1 === d) { return; } - l("}" === a[c - 1]); - d = []; - g = ""; - c = p(a, c, e); + f = []; + e = ""; + d = u(a, d, c); break; case ",": b = !1; - d.push(g); - g = ""; - c = p(a, c, e); + f.push(e); + e = ""; + d = u(a, d, c); break; case " ": ; @@ -41146,443 +41255,440 @@ var RtmpJs; ; case "\t": b = !0; - c = p(a, c, e); + d = u(a, d, c); break; default: if (b) { return; } - g += h; + e += h; } } a = this._rules; - for (g in f) { - a[g.toLowerCase()] = f[g]; + for (e in g) { + a[e.toLowerCase()] = g[e]; } }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; - }(h.events.EventDispatcher); - v.StyleSheet = e; - })(h.text || (h.text = {})); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(k.events.EventDispatcher); + v.StyleSheet = l; + })(k.text || (k.text = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.LCD = "lcd"; - c.CRT = "crt"; - c.DEFAULT = "default"; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.LCD = "lcd"; + d.CRT = "crt"; + d.DEFAULT = "default"; + return d; }(a.ASNative); - c.TextDisplayMode = h; - })(c.text || (c.text = {})); + d.TextDisplayMode = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.warning, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.throwError, t = c.AVM2.Runtime.asCoerceString, q = c.NumberUtilities.clamp, n = function(f) { - function d() { + var u = d.Debug.notImplemented, t = d.Debug.warning, l = d.Debug.somewhatImplemented, c = d.AVM2.Runtime.throwError, h = d.AVM2.Runtime.asCoerceString, p = d.NumberUtilities.clamp, s = function(g) { + function f() { a.display.InteractiveObject.instanceConstructorNoInitialize.call(this); } - __extends(d, f); - d.prototype._setFillAndLineBoundsFromSymbol = function(a) { - f.prototype._setFillAndLineBoundsFromSymbol.call(this, a); + __extends(f, g); + f.prototype._setFillAndLineBoundsFromSymbol = function(a) { + g.prototype._setFillAndLineBoundsFromSymbol.call(this, a); this._textContent.bounds = this._lineBounds; this._invalidateContent(); }; - d.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, d) { - f.prototype._setFillAndLineBoundsFromWidthAndHeight.call(this, a, d); + f.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, e) { + g.prototype._setFillAndLineBoundsFromWidthAndHeight.call(this, a, e); this._textContent.bounds = this._lineBounds; this._invalidateContent(); }; - d.prototype._canHaveTextContent = function() { + f.prototype._canHaveTextContent = function() { return!0; }; - d.prototype._getTextContent = function() { + f.prototype._getTextContent = function() { return this._textContent; }; - d.prototype._getContentBounds = function(a) { + f.prototype._getContentBounds = function(a) { void 0 === a && (a = !0); this._ensureLineMetrics(); - return f.prototype._getContentBounds.call(this, a); + return g.prototype._getContentBounds.call(this, a); }; - d.prototype._containsPointDirectly = function(a, d, e, c) { - u(this._getContentBounds().contains(a, d)); + f.prototype._containsPointDirectly = function(a, e, c, f) { return!0; }; - d.prototype._invalidateContent = function() { - this._textContent.flags & c.TextContentFlags.Dirty && this._setFlags(8388608); + f.prototype._invalidateContent = function() { + this._textContent.flags & d.TextContentFlags.Dirty && this._setFlags(8388608); }; - d.isFontCompatible = function(a, d) { - a = t(a); - d = t(d); - var e = v.Font.getByNameAndStyle(a, d); - return e ? e.fontStyle === d : !1; + f.isFontCompatible = function(a, e) { + a = h(a); + e = h(e); + var c = v.Font.getByNameAndStyle(a, e); + return c ? c.fontStyle === e : !1; }; - Object.defineProperty(d.prototype, "alwaysShowSelection", {get:function() { + Object.defineProperty(f.prototype, "alwaysShowSelection", {get:function() { return this._alwaysShowSelection; }, set:function(a) { this._alwaysShowSelection = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "antiAliasType", {get:function() { + Object.defineProperty(f.prototype, "antiAliasType", {get:function() { return this._antiAliasType; }, set:function(a) { - a = t(a); - 0 > v.AntiAliasType.toNumber(a) && m("ArgumentError", h.Errors.InvalidParamError, "antiAliasType"); + a = h(a); + 0 > v.AntiAliasType.toNumber(a) && c("ArgumentError", k.Errors.InvalidParamError, "antiAliasType"); this._antiAliasType = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "autoSize", {get:function() { + Object.defineProperty(f.prototype, "autoSize", {get:function() { return this._autoSize; }, set:function(a) { - a = t(a); - a !== this._autoSize && (0 > v.TextFieldAutoSize.toNumber(a) && m("ArgumentError", h.Errors.InvalidParamError, "autoSize"), this._autoSize = a, this._textContent.autoSize = v.TextFieldAutoSize.toNumber(a), this._invalidateContent(), this._ensureLineMetrics()); + a = h(a); + a !== this._autoSize && (0 > v.TextFieldAutoSize.toNumber(a) && c("ArgumentError", k.Errors.InvalidParamError, "autoSize"), this._autoSize = a, this._textContent.autoSize = v.TextFieldAutoSize.toNumber(a), this._invalidateContent(), this._ensureLineMetrics()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "background", {get:function() { + Object.defineProperty(f.prototype, "background", {get:function() { return this._background; }, set:function(a) { a = !!a; a !== this._background && (this._background = a, this._textContent.backgroundColor = a ? this._backgroundColor : 0, this._setDirtyFlags(8388608)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "backgroundColor", {get:function() { + Object.defineProperty(f.prototype, "backgroundColor", {get:function() { return this._backgroundColor >> 8; }, set:function(a) { a = (a << 8 | 255) >>> 0; a !== this._backgroundColor && (this._backgroundColor = a, this._background && (this._textContent.backgroundColor = a, this._setDirtyFlags(8388608))); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "border", {get:function() { + Object.defineProperty(f.prototype, "border", {get:function() { return this._border; }, set:function(a) { a = !!a; a !== this._border && (this._border = a, this._textContent.borderColor = a ? this._borderColor : 0, this._setDirtyFlags(8388608)); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "borderColor", {get:function() { + Object.defineProperty(f.prototype, "borderColor", {get:function() { return this._borderColor >> 8; }, set:function(a) { a = (a << 8 | 255) >>> 0; a !== this._borderColor && (this._borderColor = a, this._border && (this._textContent.borderColor = a, this._setDirtyFlags(8388608))); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "bottomScrollV", {get:function() { + Object.defineProperty(f.prototype, "bottomScrollV", {get:function() { return this._bottomScrollV; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "caretIndex", {get:function() { - p("public flash.text.TextField::get caretIndex"); + Object.defineProperty(f.prototype, "caretIndex", {get:function() { + u("public flash.text.TextField::get caretIndex"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "condenseWhite", {get:function() { + Object.defineProperty(f.prototype, "condenseWhite", {get:function() { return this._condenseWhite; }, set:function(a) { this._condenseWhite = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "defaultTextFormat", {get:function() { + Object.defineProperty(f.prototype, "defaultTextFormat", {get:function() { return this._textContent.defaultTextFormat.clone(); }, set:function(a) { this._textContent.defaultTextFormat.merge(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "embedFonts", {get:function() { + Object.defineProperty(f.prototype, "embedFonts", {get:function() { return this._embedFonts; }, set:function(a) { this._embedFonts = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "gridFitType", {get:function() { + Object.defineProperty(f.prototype, "gridFitType", {get:function() { return this._gridFitType; - }, set:function(b) { - b = t(b); - u(0 <= a.text.GridFitType.toNumber(b)); - this._gridFitType = b; + }, set:function(a) { + this._gridFitType = a = h(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "htmlText", {get:function() { + Object.defineProperty(f.prototype, "htmlText", {get:function() { return this._htmlText; }, set:function(a) { - a = t(a); + a = h(a); this._symbol && (this._textContent.defaultTextFormat.bold = !1, this._textContent.defaultTextFormat.italic = !1); this._textContent.parseHtml(a, this._styleSheet, this._multiline); this._htmlText = a; this._invalidateContent(); this._ensureLineMetrics(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "length", {get:function() { + Object.defineProperty(f.prototype, "length", {get:function() { return this._length; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "textInteractionMode", {get:function() { - p("public flash.text.TextField::get textInteractionMode"); + Object.defineProperty(f.prototype, "textInteractionMode", {get:function() { + u("public flash.text.TextField::get textInteractionMode"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "maxChars", {get:function() { + Object.defineProperty(f.prototype, "maxChars", {get:function() { return this._maxChars; }, set:function(a) { this._maxChars = a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "maxScrollH", {get:function() { + Object.defineProperty(f.prototype, "maxScrollH", {get:function() { this._ensureLineMetrics(); return this._maxScrollH; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "maxScrollV", {get:function() { + Object.defineProperty(f.prototype, "maxScrollV", {get:function() { this._ensureLineMetrics(); return this._maxScrollV; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "mouseWheelEnabled", {get:function() { + Object.defineProperty(f.prototype, "mouseWheelEnabled", {get:function() { return this._mouseWheelEnabled; }, set:function(a) { - e("public flash.text.TextField::set mouseWheelEnabled"); + l("public flash.text.TextField::set mouseWheelEnabled"); this._mouseWheelEnabled = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "multiline", {get:function() { + Object.defineProperty(f.prototype, "multiline", {get:function() { return this._multiline; }, set:function(a) { this._multiline = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "numLines", {get:function() { + Object.defineProperty(f.prototype, "numLines", {get:function() { return this._numLines; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "displayAsPassword", {get:function() { + Object.defineProperty(f.prototype, "displayAsPassword", {get:function() { return this._displayAsPassword; }, set:function(a) { - e("public flash.text.TextField::set displayAsPassword"); + l("public flash.text.TextField::set displayAsPassword"); this._displayAsPassword = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "restrict", {get:function() { + Object.defineProperty(f.prototype, "restrict", {get:function() { return this._restrict; }, set:function(a) { - e("public flash.text.TextField::set restrict"); - this._restrict = t(a); + l("public flash.text.TextField::set restrict"); + this._restrict = h(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "scrollH", {get:function() { + Object.defineProperty(f.prototype, "scrollH", {get:function() { return this._textContent.scrollH; }, set:function(a) { a |= 0; this._ensureLineMetrics(); - this._textContent.scrollH = q(Math.abs(a), 0, this._maxScrollH); + this._textContent.scrollH = p(Math.abs(a), 0, this._maxScrollH); this._invalidateContent(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "scrollV", {get:function() { + Object.defineProperty(f.prototype, "scrollV", {get:function() { return this._textContent.scrollV; }, set:function(a) { a |= 0; this._ensureLineMetrics(); - this._textContent.scrollV = q(a, 1, this._maxScrollV); + this._textContent.scrollV = p(a, 1, this._maxScrollV); this._invalidateContent(); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "selectable", {get:function() { + Object.defineProperty(f.prototype, "selectable", {get:function() { return this._selectable; }, set:function(a) { this._selectable = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "selectedText", {get:function() { + Object.defineProperty(f.prototype, "selectedText", {get:function() { return this._textContent.plainText.substring(this._selectionBeginIndex, this._selectionEndIndex); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "selectionBeginIndex", {get:function() { + Object.defineProperty(f.prototype, "selectionBeginIndex", {get:function() { return this._selectionBeginIndex; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "selectionEndIndex", {get:function() { + Object.defineProperty(f.prototype, "selectionEndIndex", {get:function() { return this._selectionEndIndex; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "sharpness", {get:function() { + Object.defineProperty(f.prototype, "sharpness", {get:function() { return this._sharpness; }, set:function(a) { - this._sharpness = q(+a, -400, 400); + this._sharpness = p(+a, -400, 400); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "styleSheet", {get:function() { + Object.defineProperty(f.prototype, "styleSheet", {get:function() { return this._styleSheet; }, set:function(a) { this._styleSheet = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "text", {get:function() { + Object.defineProperty(f.prototype, "text", {get:function() { return this._textContent.plainText; }, set:function(a) { - a = t(a); + a = h(a); a !== this._textContent.plainText && (this._textContent.plainText = a, this._invalidateContent(), this._ensureLineMetrics()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "textColor", {get:function() { + Object.defineProperty(f.prototype, "textColor", {get:function() { return 0 > this._textColor ? +this._textContent.defaultTextFormat.color : this._textColor; }, set:function(a) { this._textColor = a >>> 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "textHeight", {get:function() { + Object.defineProperty(f.prototype, "textHeight", {get:function() { this._ensureLineMetrics(); return this._textHeight / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "textWidth", {get:function() { + Object.defineProperty(f.prototype, "textWidth", {get:function() { this._ensureLineMetrics(); return this._textWidth / 20 | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "thickness", {get:function() { + Object.defineProperty(f.prototype, "thickness", {get:function() { return this._thickness; }, set:function(a) { - this._thickness = q(+a, -200, 200); + this._thickness = p(+a, -200, 200); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "type", {get:function() { + Object.defineProperty(f.prototype, "type", {get:function() { return this._type; }, set:function(a) { - this._type = t(a); + this._type = h(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "wordWrap", {get:function() { + Object.defineProperty(f.prototype, "wordWrap", {get:function() { return this._textContent.wordWrap; }, set:function(a) { a = !!a; a !== this._textContent.wordWrap && (this._textContent.wordWrap = !!a, this._invalidateContent()); }, enumerable:!0, configurable:!0}); - Object.defineProperty(d.prototype, "useRichTextClipboard", {get:function() { - p("public flash.text.TextField::get useRichTextClipboard"); + Object.defineProperty(f.prototype, "useRichTextClipboard", {get:function() { + u("public flash.text.TextField::get useRichTextClipboard"); }, set:function(a) { - p("public flash.text.TextField::set useRichTextClipboard"); + u("public flash.text.TextField::set useRichTextClipboard"); }, enumerable:!0, configurable:!0}); - d.prototype.copyRichText = function() { - p("public flash.text.TextField::copyRichText"); + f.prototype.copyRichText = function() { + u("public flash.text.TextField::copyRichText"); }; - d.prototype.pasteRichText = function(a) { - t(a); - p("public flash.text.TextField::pasteRichText"); + f.prototype.pasteRichText = function(a) { + h(a); + u("public flash.text.TextField::pasteRichText"); }; - d.prototype.getXMLText = function(a, d) { - p("public flash.text.TextField::getXMLText"); + f.prototype.getXMLText = function(a, e) { + u("public flash.text.TextField::getXMLText"); return ""; }; - d.prototype.insertXMLText = function(a, d, e, c) { - t(e); - p("public flash.text.TextField::insertXMLText"); + f.prototype.insertXMLText = function(a, e, c, f) { + h(c); + u("public flash.text.TextField::insertXMLText"); }; - d.prototype._ensureLineMetrics = function() { + f.prototype._ensureLineMetrics = function() { if (this._hasFlags(8388608)) { - var a = c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].syncDisplayObject(this, !1), d = a.readInt(), e = a.readInt(), f = a.readInt(), k = this._lineBounds; - this._autoSize !== v.TextFieldAutoSize.NONE && (k.xMin = k.xMin = f, k.xMax = k.xMax = f + d + 80, k.yMax = k.yMax = k.yMin + e + 80); - this._textWidth = d; - this._textHeight = e; + var a = d.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].syncDisplayObject(this, !1), e = a.readInt(), c = a.readInt(), f = a.readInt(), g = this._lineBounds; + this._autoSize !== v.TextFieldAutoSize.NONE && (g.xMin = g.xMin = f, g.xMax = g.xMax = f + e + 80, g.yMax = g.yMax = g.yMin + c + 80); + this._textWidth = e; + this._textHeight = c; this._numLines = a.readInt(); this._lineMetricsData = a; - if (this._textHeight > k.height) { - e = d = 1; + if (this._textHeight > g.height) { + c = e = 1; a.position = 16; - for (var l = f = 0;l < this._numLines;l++) { + for (var h = f = 0;h < this._numLines;h++) { a.position += 8; - var h = a.readInt(), m = a.readInt(), n = a.readInt(), h = h + m + n; - f > k.height / 20 ? d++ : e++; - f += h; + var l = a.readInt(), k = a.readInt(), m = a.readInt(), l = l + k + m; + f > g.height / 20 ? e++ : c++; + f += l; } - this._maxScrollV = d; - this._bottomScrollV = e; + this._maxScrollV = e; + this._bottomScrollV = c; } - this._maxScrollH = this._textWidth > k.width ? (this._textWidth + 80 - k.width) / 20 | 0 : 0; + this._maxScrollH = this._textWidth > g.width ? (this._textWidth + 80 - g.width) / 20 | 0 : 0; } }; - d.prototype.appendText = function(a) { - this._textContent.appendText(t(a)); + f.prototype.appendText = function(a) { + this._textContent.appendText(h(a)); }; - d.prototype.getCharBoundaries = function(b) { + f.prototype.getCharBoundaries = function(b) { b |= 0; - e("public flash.text.TextField::getCharBoundaries"); - var d = this.textHeight, c = .75 * d; - return new a.geom.Rectangle(b * c, 0, c, d); + l("public flash.text.TextField::getCharBoundaries"); + var e = this.textHeight, c = .75 * e; + return new a.geom.Rectangle(b * c, 0, c, e); }; - d.prototype.getCharIndexAtPoint = function(a, d) { - p("public flash.text.TextField::getCharIndexAtPoint"); + f.prototype.getCharIndexAtPoint = function(a, e) { + u("public flash.text.TextField::getCharIndexAtPoint"); }; - d.prototype.getFirstCharInParagraph = function(a) { - p("public flash.text.TextField::getFirstCharInParagraph"); + f.prototype.getFirstCharInParagraph = function(a) { + u("public flash.text.TextField::getFirstCharInParagraph"); }; - d.prototype.getLineIndexAtPoint = function(a, d) { - p("public flash.text.TextField::getLineIndexAtPoint"); + f.prototype.getLineIndexAtPoint = function(a, e) { + u("public flash.text.TextField::getLineIndexAtPoint"); }; - d.prototype.getLineIndexOfChar = function(a) { - p("public flash.text.TextField::getLineIndexOfChar"); + f.prototype.getLineIndexOfChar = function(a) { + u("public flash.text.TextField::getLineIndexOfChar"); }; - d.prototype.getLineLength = function(a) { - p("public flash.text.TextField::getLineLength"); + f.prototype.getLineLength = function(a) { + u("public flash.text.TextField::getLineLength"); }; - d.prototype.getLineMetrics = function() { + f.prototype.getLineMetrics = function() { var a; a = 0; - (0 > a || a > this._numLines - 1) && m("RangeError", h.Errors.ParamRangeError); + (0 > a || a > this._numLines - 1) && c("RangeError", k.Errors.ParamRangeError); this._ensureLineMetrics(); - var d = this._lineMetricsData; - d.position = 16 + 20 * a; - a = d.readInt() + this._lineBounds.xMin + 2; - var e = d.readInt(), c = d.readInt(), f = d.readInt(), d = d.readInt(); - return new v.TextLineMetrics(a, e, c + f + d, c, f, d); + var e = this._lineMetricsData; + e.position = 16 + 20 * a; + a = e.readInt() + this._lineBounds.xMin + 2; + var f = e.readInt(), d = e.readInt(), g = e.readInt(), e = e.readInt(); + return new v.TextLineMetrics(a, f, d + g + e, d, g, e); }; - d.prototype.getLineOffset = function(a) { - p("public flash.text.TextField::getLineOffset"); + f.prototype.getLineOffset = function(a) { + u("public flash.text.TextField::getLineOffset"); }; - d.prototype.getLineText = function(a) { - p("public flash.text.TextField::getLineText"); + f.prototype.getLineText = function(a) { + u("public flash.text.TextField::getLineText"); }; - d.prototype.getParagraphLength = function(a) { - p("public flash.text.TextField::getParagraphLength"); + f.prototype.getParagraphLength = function(a) { + u("public flash.text.TextField::getParagraphLength"); }; - d.prototype.getTextFormat = function(a, d) { + f.prototype.getTextFormat = function(a, e) { void 0 === a && (a = -1); - void 0 === d && (d = -1); + void 0 === e && (e = -1); a |= 0; - d |= 0; - var e = this._textContent.plainText.length; - 0 > a ? (a = 0, 0 > d && (d = e)) : 0 > d && (d = a + 1); - (d <= a || d > e) && m("RangeError", h.Errors.ParamRangeError); - for (var c, e = this._textContent.textRuns, f = 0;f < e.length;f++) { - var k = e[f]; - k.intersects(a, d) && (c ? c.intersect(k.textFormat) : c = k.textFormat.clone()); + e |= 0; + var f = this._textContent.plainText.length; + 0 > a ? (a = 0, 0 > e && (e = f)) : 0 > e && (e = a + 1); + (e <= a || e > f) && c("RangeError", k.Errors.ParamRangeError); + for (var d, f = this._textContent.textRuns, g = 0;g < f.length;g++) { + var h = f[g]; + h.intersects(a, e) && (d ? d.intersect(h.textFormat) : d = h.textFormat.clone()); } - return c; + return d; }; - d.prototype.getTextRuns = function(a, d) { + f.prototype.getTextRuns = function(a, e) { void 0 === a && (a = 0); - void 0 === d && (d = 2147483647); - for (var e = this._textContent.textRuns, c = [], f = 0;f < e.length;f++) { - var k = e[f]; - k.beginIndex >= a && k.endIndex <= d && c.push(k.clone()); + void 0 === e && (e = 2147483647); + for (var c = this._textContent.textRuns, f = [], d = 0;d < c.length;d++) { + var g = c[d]; + g.beginIndex >= a && g.endIndex <= e && f.push(g.clone()); } - return c; + return f; }; - d.prototype.getRawText = function() { - p("public flash.text.TextField::getRawText"); + f.prototype.getRawText = function() { + u("public flash.text.TextField::getRawText"); }; - d.prototype.replaceSelectedText = function(a) { + f.prototype.replaceSelectedText = function(a) { this.replaceText(this._selectionBeginIndex, this._selectionEndIndex, "" + a); }; - d.prototype.replaceText = function(a, d, e) { + f.prototype.replaceText = function(a, e, c) { a |= 0; - d |= 0; - 0 > a || 0 > d || (this._textContent.replaceText(a, d, "" + e), this._invalidateContent(), this._ensureLineMetrics()); - }; - d.prototype.setSelection = function(a, d) { - this._selectionBeginIndex = a | 0; - this._selectionEndIndex = d | 0; - }; - d.prototype.setTextFormat = function(a, d, e) { - void 0 === d && (d = -1); - void 0 === e && (e = -1); - d |= 0; e |= 0; - var c = this._textContent.plainText, f = c.length; - 0 > d ? (d = 0, 0 > e && (e = f)) : 0 > e && (e = d + 1); - (d > f || e > f) && m("RangeError", h.Errors.ParamRangeError); - e <= d || (this._textContent.replaceText(d, e, c.substring(d, e), a), this._invalidateContent(), this._ensureLineMetrics()); + 0 > a || 0 > e || (this._textContent.replaceText(a, e, "" + c), this._invalidateContent(), this._ensureLineMetrics()); }; - d.prototype.getImageReference = function(a) { - p("public flash.text.TextField::getImageReference"); + f.prototype.setSelection = function(a, e) { + this._selectionBeginIndex = a | 0; + this._selectionEndIndex = e | 0; }; - d.classSymbols = null; - d.instanceSymbols = null; - d.classInitializer = null; - d.initializer = function(b) { + f.prototype.setTextFormat = function(a, e, f) { + void 0 === e && (e = -1); + void 0 === f && (f = -1); + e |= 0; + f |= 0; + var d = this._textContent.plainText, g = d.length; + 0 > e ? (e = 0, 0 > f && (f = g)) : 0 > f && (f = e + 1); + (e > g || f > g) && c("RangeError", k.Errors.ParamRangeError); + f <= e || (this._textContent.replaceText(e, f, d.substring(e, f), a), this._invalidateContent(), this._ensureLineMetrics()); + }; + f.prototype.getImageReference = function(a) { + u("public flash.text.TextField::getImageReference"); + }; + f.classSymbols = null; + f.instanceSymbols = null; + f.classInitializer = null; + f.initializer = function(b) { this._alwaysShowSelection = !1; this._antiAliasType = v.AntiAliasType.NORMAL; this._autoSize = v.TextFieldAutoSize.NONE; @@ -41611,18 +41717,18 @@ var RtmpJs; this._thickness = this._textWidth = this._textHeight = 0; this._type = v.TextFieldType.DYNAMIC; this._useRichTextClipboard = !1; - var d = new a.text.TextFormat(v.Font.DEFAULT_FONT_SERIF, 12, 0, !1, !1, !1, "", "", v.TextFormatAlign.LEFT); - this._textContent = new c.TextContent(d); + var e = new a.text.TextFormat(v.Font.DEFAULT_FONT_SERIF, 12, 0, !1, !1, !1, "", "", v.TextFormatAlign.LEFT); + this._textContent = new d.TextContent(e); this._lineMetricsData = null; - b ? (this._setFillAndLineBoundsFromSymbol(b), d.color = b.color, d.size = b.size / 20 | 0, d.font = b.face, d.bold = b.bold, d.italic = b.italic, d.align = b.align, d.leftMargin = b.leftMargin / 20 | 0, d.rightMargin = b.rightMargin / 20 | 0, d.indent = b.indent / 20 | 0, d.leading = b.leading / 20 | 0, this._multiline = b.multiline, this._embedFonts = b.embedFonts, this._selectable = b.selectable, this._displayAsPassword = b.displayAsPassword, this._type = b.type, this._maxChars = + b ? (this._setFillAndLineBoundsFromSymbol(b), e.color = b.color, e.size = b.size / 20 | 0, e.font = b.face, e.bold = b.bold, e.italic = b.italic, e.align = b.align, e.leftMargin = b.leftMargin / 20 | 0, e.rightMargin = b.rightMargin / 20 | 0, e.indent = b.indent / 20 | 0, e.leading = b.leading / 20 | 0, this._multiline = b.multiline, this._embedFonts = b.embedFonts, this._selectable = b.selectable, this._displayAsPassword = b.displayAsPassword, this._type = b.type, this._maxChars = b.maxChars, b.border && (this.border = this.background = !0), b.html ? this.htmlText = b.initialText : this.text = b.initialText, this.wordWrap = b.wordWrap, this.autoSize = b.autoSize) : this._setFillAndLineBoundsFromWidthAndHeight(2E3, 2E3); }; - return d; + return f; }(a.display.InteractiveObject); - v.TextField = n; - n = function(e) { - function d(b) { - e.call(this, b, a.text.TextField, !0); + v.TextField = s; + s = function(c) { + function f(b) { + c.call(this, b, a.text.TextField, !0); this.size = this.color = 0; this.face = ""; this.italic = this.bold = !1; @@ -41638,301 +41744,298 @@ var RtmpJs; this.autoSize = a.text.TextFieldAutoSize.NONE; this.textContent = this.variableName = null; } - __extends(d, e); - d.FromTextData = function(b, e) { - var f = new d(b); - f._setBoundsFromData(b); - var k = b.tag; - if (b.static && (f.dynamic = !1, f.symbolClass = a.text.StaticText, k.initialText)) { - var h = new c.TextContent; - h.bounds = f.lineBounds; - h.parseHtml(k.initialText, null, !1); + __extends(f, c); + f.FromTextData = function(b, e) { + var c = new f(b); + c._setBoundsFromData(b); + var g = b.tag; + if (b.static && (c.dynamic = !1, c.symbolClass = a.text.StaticText, g.initialText)) { + var h = new d.TextContent; + h.bounds = c.lineBounds; + h.parseHtml(g.initialText, null, !1); new a.geom.Matrix; h.matrix = new a.geom.Matrix; h.matrix.copyFromUntyped(b.matrix); h.coords = b.coords; - f.textContent = h; + c.textContent = h; } - k.hasColor && (f.color = k.color >>> 8); - k.hasFont && (f.size = k.fontHeight, (h = e.getSymbolById(k.fontId)) ? (f.face = k.useOutlines ? h.name : "swffont" + h.syncId, f.bold = h.bold, f.italic = h.italic) : l("Font " + k.fontId + " is not defined.")); - k.hasLayout && (f.align = a.text.TextFormatAlign.fromNumber(k.align), f.leftMargin = k.leftMargin, f.rightMargin = k.rightMargin, f.indent = k.indent, f.leading = k.leading); - f.multiline = !!k.multiline; - f.wordWrap = !!k.wordWrap; - f.embedFonts = !!k.useOutlines; - f.selectable = !k.noSelect; - f.border = !!k.border; - k.hasText && (f.initialText = k.initialText); - f.html = !!k.html; - f.displayAsPassword = !!k.password; - f.type = k.readonly ? a.text.TextFieldType.DYNAMIC : a.text.TextFieldType.INPUT; - k.hasMaxLength && (f.maxChars = k.maxLength); - f.autoSize = k.autoSize ? a.text.TextFieldAutoSize.LEFT : a.text.TextFieldAutoSize.NONE; - f.variableName = k.variableName; - return f; + g.hasColor && (c.color = g.color >>> 8); + g.hasFont && (c.size = g.fontHeight, (h = e.getSymbolById(g.fontId)) ? (c.face = g.useOutlines ? h.name : "swffont" + h.syncId, c.bold = h.bold, c.italic = h.italic) : t("Font " + g.fontId + " is not defined.")); + g.hasLayout && (c.align = a.text.TextFormatAlign.fromNumber(g.align), c.leftMargin = g.leftMargin, c.rightMargin = g.rightMargin, c.indent = g.indent, c.leading = g.leading); + c.multiline = !!g.multiline; + c.wordWrap = !!g.wordWrap; + c.embedFonts = !!g.useOutlines; + c.selectable = !g.noSelect; + c.border = !!g.border; + g.hasText && (c.initialText = g.initialText); + c.html = !!g.html; + c.displayAsPassword = !!g.password; + c.type = g.readonly ? a.text.TextFieldType.DYNAMIC : a.text.TextFieldType.INPUT; + g.hasMaxLength && (c.maxChars = g.maxLength); + c.autoSize = g.autoSize ? a.text.TextFieldAutoSize.LEFT : a.text.TextFieldAutoSize.NONE; + c.variableName = g.variableName; + return c; }; - d.FromLabelData = function(a, e) { - for (var f = a.fillBounds, l = a.records, h = a.coords = [], m = "", n = 12, q = "Times Roman", p = !1, s = !1, t = 0, v = 0, L = 0, H, J = 0;J < l.length;J++) { - var C = l[J]; - if (C.eot) { + f.FromLabelData = function(a, e) { + for (var c = a.fillBounds, d = a.records, g = a.coords = [], h = "", l = 12, k = "Times Roman", p = !1, s = !1, r = 0, u = 0, t = 0, v, E = 0;E < d.length;E++) { + var y = d[E]; + if (y.eot) { break; } - if (C.hasFont) { - var E = e.getSymbolById(C.fontId); - E ? (H = E.codes, n = C.fontHeight, E.originalSize || (n /= 20), q = E.metrics ? "swffont" + E.syncId : E.name, p = E.bold, s = E.italic) : c.Debug.warning("Label " + a.id + "refers to undefined font symbol " + C.fontId); + if (y.hasFont) { + var z = e.getSymbolById(y.fontId); + z && (v = z.codes, l = y.fontHeight, z.originalSize || (l /= 20), k = z.metrics ? "swffont" + z.syncId : z.name, p = z.bold, s = z.italic); } - C.hasColor && (t = C.color >>> 8); - C.hasMoveX && (v = C.moveX, v < f.xMin && (f.xMin = v)); - C.hasMoveY && (L = C.moveY, L < f.yMin && (f.yMin = L)); - for (var E = "", C = C.entries, F = 0, I;I = C[F++];) { - var G = H[I.glyphIndex]; - u(G, "undefined label glyph"); - G = String.fromCharCode(G); - E += k[G] || G; - h.push(v, L); - v += I.advance; + y.hasColor && (r = y.color >>> 8); + y.hasMoveX && (u = y.moveX, u < c.xMin && (c.xMin = u)); + y.hasMoveY && (t = y.moveY, t < c.yMin && (c.yMin = t)); + for (var z = "", y = y.entries, G = 0, C;C = y[G++];) { + var I = String.fromCharCode(v[C.glyphIndex]), z = z + (m[I] || I); + g.push(u, t); + u += C.advance; } - s && (E = "" + E + ""); - p && (E = "" + E + ""); - m += '' + E + ""; + s && (z = "" + z + ""); + p && (z = "" + z + ""); + h += '' + z + ""; } - a.tag.initialText = m; - return d.FromTextData(a, e); + a.tag.initialText = h; + return f.FromTextData(a, e); }; - return d; - }(c.Timeline.DisplaySymbol); - v.TextSymbol = n; - var k = {"<":"<", ">":">", "&":"&"}; + return f; + }(d.Timeline.DisplaySymbol); + v.TextSymbol = s; + var m = {"<":"<", ">":">", "&":"&"}; })(a.text || (a.text = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.fromNumber = function(a) { + __extends(d, a); + d.fromNumber = function(a) { switch(a) { case 0: - return c.NONE; + return d.NONE; case 1: - return c.CENTER; + return d.CENTER; case 2: - return c.LEFT; + return d.LEFT; case 3: - return c.RIGHT; + return d.RIGHT; default: return null; } }; - c.toNumber = function(a) { + d.toNumber = function(a) { switch(a) { - case c.NONE: + case d.NONE: return 0; - case c.CENTER: + case d.CENTER: return 1; - case c.LEFT: + case d.LEFT: return 2; - case c.RIGHT: + case d.RIGHT: return 3; default: return-1; } }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.NONE = "none"; - c.LEFT = "left"; - c.CENTER = "center"; - c.RIGHT = "right"; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.NONE = "none"; + d.LEFT = "left"; + d.CENTER = "center"; + d.RIGHT = "right"; + return d; }(a.ASNative); - c.TextFieldAutoSize = h; - })(c.text || (c.text = {})); + d.TextFieldAutoSize = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.INPUT = "input"; - c.DYNAMIC = "dynamic"; - return c; + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.INPUT = "input"; + d.DYNAMIC = "dynamic"; + return d; }(a.ASNative); - c.TextFieldType = h; - })(c.text || (c.text = {})); + d.TextFieldType = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { (function(v) { - var p = c.AVM2.Runtime.asCoerceString, u = c.NumberUtilities.roundHalfEven, l = c.AVM2.Runtime.throwError, e = function(a) { - function e(a, c, k, f, d, b, g, l, h, m, p, s, u) { + var u = d.AVM2.Runtime.asCoerceString, t = d.NumberUtilities.roundHalfEven, l = d.AVM2.Runtime.throwError, c = function(a) { + function c(a, d, g, f, b, e, h, l, k, p, r, u, t) { void 0 === a && (a = null); - void 0 === c && (c = null); - void 0 === k && (k = null); - void 0 === f && (f = null); void 0 === d && (d = null); - void 0 === b && (b = null); void 0 === g && (g = null); - void 0 === l && (l = null); + void 0 === f && (f = null); + void 0 === b && (b = null); + void 0 === e && (e = null); void 0 === h && (h = null); - void 0 === m && (m = null); + void 0 === l && (l = null); + void 0 === k && (k = null); void 0 === p && (p = null); - void 0 === s && (s = null); + void 0 === r && (r = null); void 0 === u && (u = null); + void 0 === t && (t = null); this.font = a; - this.size = c; - this.color = k; + this.size = d; + this.color = g; this.bold = f; - this.italic = d; - this.underline = b; - this.url = g; + this.italic = b; + this.underline = e; + this.url = h; this.target = l; - this.align = h; - this.leftMargin = m; - this.rightMargin = p; - this.indent = s; - this.leading = u; + this.align = k; + this.leftMargin = p; + this.rightMargin = r; + this.indent = u; + this.leading = t; } - __extends(e, a); - Object.defineProperty(e.prototype, "align", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "align", {get:function() { return this._align; }, set:function(a) { - this._align = a = p(a); + this._align = a = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "blockIndent", {get:function() { + Object.defineProperty(c.prototype, "blockIndent", {get:function() { return this._blockIndent; }, set:function(a) { - this._blockIndent = e.coerceNumber(a); + this._blockIndent = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "bold", {get:function() { + Object.defineProperty(c.prototype, "bold", {get:function() { return this._bold; }, set:function(a) { - this._bold = e.coerceBoolean(a); + this._bold = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "bullet", {get:function() { + Object.defineProperty(c.prototype, "bullet", {get:function() { return this._bullet; }, set:function(a) { - this._bullet = e.coerceBoolean(a); + this._bullet = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "color", {get:function() { + Object.defineProperty(c.prototype, "color", {get:function() { return this._color; }, set:function(a) { this._color = +a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "display", {get:function() { + Object.defineProperty(c.prototype, "display", {get:function() { return this._display; }, set:function(a) { - this._display = p(a); + this._display = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "font", {get:function() { + Object.defineProperty(c.prototype, "font", {get:function() { return this._font; }, set:function(a) { - this._font = p(a); + this._font = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "style", {get:function() { + Object.defineProperty(c.prototype, "style", {get:function() { return this._bold && this._italic ? v.FontStyle.BOLD_ITALIC : this._bold ? v.FontStyle.BOLD : this._italic ? v.FontStyle.ITALIC : v.FontStyle.REGULAR; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "indent", {get:function() { + Object.defineProperty(c.prototype, "indent", {get:function() { return this._indent; }, set:function(a) { - this._indent = e.coerceNumber(a); + this._indent = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "italic", {get:function() { + Object.defineProperty(c.prototype, "italic", {get:function() { return this._italic; }, set:function(a) { - this._italic = e.coerceBoolean(a); + this._italic = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "kerning", {get:function() { + Object.defineProperty(c.prototype, "kerning", {get:function() { return this._kerning; }, set:function(a) { - this._kerning = e.coerceBoolean(a); + this._kerning = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "leading", {get:function() { + Object.defineProperty(c.prototype, "leading", {get:function() { return this._leading; }, set:function(a) { - this._leading = e.coerceNumber(a); + this._leading = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "leftMargin", {get:function() { + Object.defineProperty(c.prototype, "leftMargin", {get:function() { return this._leftMargin; }, set:function(a) { - this._leftMargin = e.coerceNumber(a); + this._leftMargin = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "letterSpacing", {get:function() { + Object.defineProperty(c.prototype, "letterSpacing", {get:function() { return this._letterSpacing; }, set:function(a) { - this._letterSpacing = e.coerceBoolean(a); + this._letterSpacing = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "rightMargin", {get:function() { + Object.defineProperty(c.prototype, "rightMargin", {get:function() { return this._rightMargin; }, set:function(a) { - this._rightMargin = e.coerceNumber(a); + this._rightMargin = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "size", {get:function() { + Object.defineProperty(c.prototype, "size", {get:function() { return this._size; }, set:function(a) { - this._size = e.coerceNumber(a); + this._size = c.coerceNumber(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "tabStops", {get:function() { + Object.defineProperty(c.prototype, "tabStops", {get:function() { return this._tabStops; }, set:function(a) { - a instanceof Array || l("ArgumentError", h.Errors.CheckTypeFailedError, a, "Array"); + a instanceof Array || l("ArgumentError", k.Errors.CheckTypeFailedError, a, "Array"); this._tabStops = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "target", {get:function() { + Object.defineProperty(c.prototype, "target", {get:function() { return this._target; }, set:function(a) { - this._target = p(a); + this._target = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "underline", {get:function() { + Object.defineProperty(c.prototype, "underline", {get:function() { return this._underline; }, set:function(a) { - this._underline = e.coerceBoolean(a); + this._underline = c.coerceBoolean(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "url", {get:function() { + Object.defineProperty(c.prototype, "url", {get:function() { return this._url; }, set:function(a) { - this._url = p(a); + this._url = u(a); }, enumerable:!0, configurable:!0}); - e.coerceNumber = function(a) { - return void 0 == a ? null : isNaN(a) || 268435455 < a ? -2147483648 : u(a); + c.coerceNumber = function(a) { + return void 0 == a ? null : isNaN(a) || 268435455 < a ? -2147483648 : t(a); }; - e.coerceBoolean = function(a) { + c.coerceBoolean = function(a) { return void 0 == a ? null : !!a; }; - e.prototype.clone = function() { - return new s.text.TextFormat(this.font, this.size, this.color, this.bold, this.italic, this.underline, this.url, this.target, this.align, this.leftMargin, this.rightMargin, this.indent, this.leading); + c.prototype.clone = function() { + return new r.text.TextFormat(this.font, this.size, this.color, this.bold, this.italic, this.underline, this.url, this.target, this.align, this.leftMargin, this.rightMargin, this.indent, this.leading); }; - e.prototype.equals = function(a) { + c.prototype.equals = function(a) { return this._align === a._align && this._blockIndent === a._blockIndent && this._bold === a._bold && this._bullet === a._bullet && this._color === a._color && this._display === a._display && this._font === a._font && this._indent === a._indent && this._italic === a._italic && this._kerning === a._kerning && this._leading === a._leading && this._leftMargin === a._leftMargin && this._letterSpacing === a._letterSpacing && this._rightMargin === a._rightMargin && this._size === a._size && this._tabStops === a._tabStops && this._target === a._target && this._underline === a._underline && this._url === a._url; }; - e.prototype.merge = function(a) { + c.prototype.merge = function(a) { null !== a._align && (this._align = a._align); null !== a._blockIndent && (this._blockIndent = a._blockIndent); null !== a._bold && (this._bold = a._bold); @@ -41953,7 +42056,7 @@ var RtmpJs; null !== a._underline && (this._underline = a._underline); a._url && (this._url = a._url); }; - e.prototype.intersect = function(a) { + c.prototype.intersect = function(a) { a._align !== this._align && (this._align = null); a._blockIndent !== this._blockIndent && (this._blockIndent = null); a._bold !== this._bold && (this._bold = null); @@ -41974,469 +42077,469 @@ var RtmpJs; a._underline !== this._underline && (this._underline = null); a._url !== this._url && (this._url = null); }; - e.prototype.transform = function(a) { - var e = a.textAlign; - e && (this.align = e); - e = a.fontWeight; - "bold" === e ? this.bold = !0 : "normal" === e && (this.bold = !1); - if (e = a.color) { - if (e = p(e).trim().toLowerCase(), "#" === e[0]) { - for (e = e.substr(1);"0" === e[0];) { - e = e.substr(1); + c.prototype.transform = function(a) { + var c = a.textAlign; + c && (this.align = c); + c = a.fontWeight; + "bold" === c ? this.bold = !0 : "normal" === c && (this.bold = !1); + if (c = a.color) { + if (c = u(c).trim().toLowerCase(), "#" === c[0]) { + for (c = c.substr(1);"0" === c[0];) { + c = c.substr(1); } - var c = parseInt(e, 16); - c.original_toString(16) === e && (this.color = c); + var d = parseInt(c, 16); + d.original_toString(16) === c && (this.color = d); } } - if (e = a.display) { - this.display = e; + if (c = a.display) { + this.display = c; } - if (e = a.fontFamily) { - this.font = e.replace("sans-serif", "_sans").replace("serif", "_serif"); + if (c = a.fontFamily) { + this.font = c.replace("sans-serif", "_sans").replace("serif", "_serif"); } - if (e = a.textIndent) { - this.indent = parseInt(e); + if (c = a.textIndent) { + this.indent = parseInt(c); } - e = a.fontStyle; - "italic" === e ? this.italic = !0 : "normal" === e && (this.italic = !1); - e = a.kerning; - this.kerning = "true" === e ? 1 : "false" === e ? 0 : parseInt(e); - if (e = a.leading) { - this.leading = parseInt(e); + c = a.fontStyle; + "italic" === c ? this.italic = !0 : "normal" === c && (this.italic = !1); + c = a.kerning; + this.kerning = "true" === c ? 1 : "false" === c ? 0 : parseInt(c); + if (c = a.leading) { + this.leading = parseInt(c); } - if (e = a.marginLeft) { - this.leftMargin = parseInt(e); + if (c = a.marginLeft) { + this.leftMargin = parseInt(c); } - if (e = a.letterSpacing) { - this.letterSpacing = parseFloat(e); + if (c = a.letterSpacing) { + this.letterSpacing = parseFloat(c); } - if (e = a.marginRight) { - this.rightMargin = parseInt(e); + if (c = a.marginRight) { + this.rightMargin = parseInt(c); } - if (e = a.fontSize) { - e = parseInt(e), 0 < e && (this.size = e); + if (c = a.fontSize) { + c = parseInt(c), 0 < c && (this.size = c); } - e = a.textDecoration; - "none" === e ? this.underline = !1 : "underline" === e && (this.underline = !0); + c = a.textDecoration; + "none" === c ? this.underline = !1 : "underline" === c && (this.underline = !0); return this; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - v.TextFormat = e; - })(s.text || (s.text = {})); + v.TextFormat = c; + })(r.text || (r.text = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } - __extends(c, a); - c.fromNumber = function(a) { + __extends(d, a); + d.fromNumber = function(a) { switch(a) { case 0: - return c.LEFT; + return d.LEFT; case 1: - return c.RIGHT; + return d.RIGHT; case 2: - return c.CENTER; + return d.CENTER; case 3: - return c.JUSTIFY; + return d.JUSTIFY; case 4: - return c.START; + return d.START; case 5: - return c.END; + return d.END; default: return null; } }; - c.toNumber = function(a) { + d.toNumber = function(a) { switch(a) { - case c.LEFT: + case d.LEFT: return 0; - case c.RIGHT: + case d.RIGHT: return 1; - case c.CENTER: + case d.CENTER: return 2; - case c.JUSTIFY: + case d.JUSTIFY: return 3; - case c.START: + case d.START: return 4; - case c.END: + case d.END: return 5; default: return-1; } }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.LEFT = "left"; - c.CENTER = "center"; - c.RIGHT = "right"; - c.JUSTIFY = "justify"; - c.START = "start"; - c.END = "end"; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.LEFT = "left"; + d.CENTER = "center"; + d.RIGHT = "right"; + d.JUSTIFY = "justify"; + d.START = "start"; + d.END = "end"; + return d; }(a.ASNative); - c.TextFormatAlign = h; - })(c.text || (c.text = {})); + d.TextFormatAlign = k; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { + (function(d) { + (function(d) { + var k = function(a) { + function d() { a.call(this); } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.INLINE = "inline"; + d.BLOCK = "block"; + return d; + }(a.ASNative); + d.TextFormatDisplay = k; + })(d.text || (d.text = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(d) { + (function(a) { + (function(d) { + (function(d) { + var k = function(a) { + function d() { + a.call(this); + } + __extends(d, a); + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.NORMAL = "normal"; + d.SELECTION = "selection"; + return d; + }(a.ASNative); + d.TextInteractionMode = k; + })(d.text || (d.text = {})); + })(a.flash || (a.flash = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c(a, c, d, l, g, f) { + r("public flash.text.TextLineMetrics"); + } __extends(c, a); c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; - c.INLINE = "inline"; - c.BLOCK = "block"; return c; }(a.ASNative); - c.TextFormatDisplay = h; - })(c.text || (c.text = {})); + k.TextLineMetrics = t; + })(k.text || (k.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function c() { - a.call(this); - } - __extends(c, a); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.NORMAL = "normal"; - c.SELECTION = "selection"; - return c; - }(a.ASNative); - c.TextInteractionMode = h; - })(c.text || (c.text = {})); - })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e(a, e, c, h, k, f) { - p("public flash.text.TextLineMetrics"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.TextLineMetrics = s; - })(h.text || (h.text = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - (function(a) { - (function(c) { - (function(h) { - var p = function(a) { - function h(a, c, l) { + (function(d) { + (function(k) { + var u = function(a) { + function l(a, d, l) { this._beginIndex = a | 0; - this._endIndex = c | 0; + this._endIndex = d | 0; this._textFormat = l; } - __extends(h, a); - Object.defineProperty(h.prototype, "beginIndex", {get:function() { + __extends(l, a); + Object.defineProperty(l.prototype, "beginIndex", {get:function() { return this._beginIndex; }, set:function(a) { this._beginIndex = a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "endIndex", {get:function() { + Object.defineProperty(l.prototype, "endIndex", {get:function() { return this._endIndex; }, set:function(a) { this._endIndex = a | 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "textFormat", {get:function() { + Object.defineProperty(l.prototype, "textFormat", {get:function() { return this._textFormat; }, set:function(a) { this._textFormat = a; }, enumerable:!0, configurable:!0}); - h.prototype.clone = function() { - return new c.text.TextRun(this.beginIndex, this.endIndex, this.textFormat.clone()); + l.prototype.clone = function() { + return new d.text.TextRun(this.beginIndex, this.endIndex, this.textFormat.clone()); }; - h.prototype.containsIndex = function(a) { + l.prototype.containsIndex = function(a) { return a >= this._beginIndex && a < this._endIndex; }; - h.prototype.intersects = function(a, c) { - return Math.max(this._beginIndex, a) < Math.min(this._endIndex, c); + l.prototype.intersects = function(a, d) { + return Math.max(this._beginIndex, a) < Math.min(this._endIndex, d); }; - h.classInitializer = null; - h.initializer = null; - h.classSymbols = null; - h.instanceSymbols = null; - return h; + l.classInitializer = null; + l.initializer = null; + l.classSymbols = null; + l.instanceSymbols = null; + return l; }(a.ASNative); - h.TextRun = p; - })(c.text || (c.text = {})); + k.TextRun = u; + })(d.text || (d.text = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) { - function e() { - s("public flash.text.TextSnapshot"); - } - __extends(e, a); - Object.defineProperty(e.prototype, "charCount", {get:function() { - p("public flash.text.TextSnapshot::get charCount"); - }, enumerable:!0, configurable:!0}); - e.prototype.findText = function(a, e, c) { - l(e); - p("public flash.text.TextSnapshot::findText"); - }; - e.prototype.getSelected = function(a, e) { - p("public flash.text.TextSnapshot::getSelected"); - }; - e.prototype.getSelectedText = function(a) { - p("public flash.text.TextSnapshot::getSelectedText"); - }; - e.prototype.getText = function(a, e, c) { - p("public flash.text.TextSnapshot::getText"); - }; - e.prototype.getTextRunInfo = function(a, e) { - p("public flash.text.TextSnapshot::getTextRunInfo"); - }; - e.prototype.hitTestTextNearPos = function(a, e, c) { - p("public flash.text.TextSnapshot::hitTestTextNearPos"); - }; - e.prototype.setSelectColor = function(a) { - p("public flash.text.TextSnapshot::setSelectColor"); - }; - e.prototype.setSelected = function(a, e, c) { - p("public flash.text.TextSnapshot::setSelected"); - }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.ASNative); - h.TextSnapshot = e; - })(h.text || (h.text = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = function(a) { function c() { - s("public flash.trace.Trace"); + t("public flash.text.TextSnapshot"); } __extends(c, a); - c.setLevel = function(a, e) { - p("public flash.trace.Trace::static setLevel"); + Object.defineProperty(c.prototype, "charCount", {get:function() { + r("public flash.text.TextSnapshot::get charCount"); + }, enumerable:!0, configurable:!0}); + c.prototype.findText = function(a, c, d) { + l(c); + r("public flash.text.TextSnapshot::findText"); }; - c.getLevel = function(a) { - p("public flash.trace.Trace::static getLevel"); + c.prototype.getSelected = function(a, c) { + r("public flash.text.TextSnapshot::getSelected"); }; - c.setListener = function(a) { - p("public flash.trace.Trace::static setListener"); + c.prototype.getSelectedText = function(a) { + r("public flash.text.TextSnapshot::getSelectedText"); }; - c.getListener = function() { - p("public flash.trace.Trace::static getListener"); + c.prototype.getText = function(a, c, d) { + r("public flash.text.TextSnapshot::getText"); + }; + c.prototype.getTextRunInfo = function(a, c) { + r("public flash.text.TextSnapshot::getTextRunInfo"); + }; + c.prototype.hitTestTextNearPos = function(a, c, d) { + r("public flash.text.TextSnapshot::hitTestTextNearPos"); + }; + c.prototype.setSelectColor = function(a) { + r("public flash.text.TextSnapshot::setSelectColor"); + }; + c.prototype.setSelected = function(a, c, d) { + r("public flash.text.TextSnapshot::setSelected"); }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; - c.OFF = void 0; - c.METHODS = 1; - c.METHODS_WITH_ARGS = 2; - c.METHODS_AND_LINES = 3; - c.METHODS_AND_LINES_WITH_ARGS = 4; - c.FILE = 1; - c.LISTENER = 2; return c; }(a.ASNative); - h.Trace = l; - })(h.trace || (h.trace = {})); + k.TextSnapshot = c; + })(k.text || (k.text = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.trace.Trace"); + } + __extends(d, a); + d.setLevel = function(a, c) { + r("public flash.trace.Trace::static setLevel"); + }; + d.getLevel = function(a) { + r("public flash.trace.Trace::static getLevel"); + }; + d.setListener = function(a) { + r("public flash.trace.Trace::static setListener"); + }; + d.getListener = function() { + r("public flash.trace.Trace::static getListener"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.OFF = void 0; + d.METHODS = 1; + d.METHODS_WITH_ARGS = 2; + d.METHODS_AND_LINES = 3; + d.METHODS_AND_LINES_WITH_ARGS = 4; + d.FILE = 1; + d.LISTENER = 2; + return d; + }(a.ASNative); + k.Trace = l; + })(k.trace || (k.trace = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.somewhatImplemented, u = function(c) { - function e() { + (function(k) { + var u = d.Debug.somewhatImplemented, t = function(d) { + function c() { a.display.NativeMenu.instanceConstructorNoInitialize.call(this); - this.builtInItems = new h.ContextMenuBuiltInItems; + this.builtInItems = new k.ContextMenuBuiltInItems; this.customItems = []; } - __extends(e, c); - Object.defineProperty(e, "isSupported", {get:function() { - p("ContextMenu::isSupported"); + __extends(c, d); + Object.defineProperty(c, "isSupported", {get:function() { + u("ContextMenu::isSupported"); return!1; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "builtInItems", {get:function() { - p("public flash.ui.ContextMenu::get builtInItems"); + Object.defineProperty(c.prototype, "builtInItems", {get:function() { + u("public flash.ui.ContextMenu::get builtInItems"); return this._builtInItems; }, set:function(a) { - p("public flash.ui.ContextMenu::set builtInItems"); + u("public flash.ui.ContextMenu::set builtInItems"); this._builtInItems = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "customItems", {get:function() { - p("public flash.ui.ContextMenu::get customItems"); + Object.defineProperty(c.prototype, "customItems", {get:function() { + u("public flash.ui.ContextMenu::get customItems"); return this._customItems; }, set:function(a) { - p("public flash.ui.ContextMenu::set customItems"); + u("public flash.ui.ContextMenu::set customItems"); this._customItems = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "link", {get:function() { - p("public flash.ui.ContextMenu::get link"); + Object.defineProperty(c.prototype, "link", {get:function() { + u("public flash.ui.ContextMenu::get link"); return this._link; }, set:function(a) { - p("public flash.ui.ContextMenu::set link"); + u("public flash.ui.ContextMenu::set link"); this._link = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "clipboardMenu", {get:function() { - p("public flash.ui.ContextMenu::get clipboardMenu"); + Object.defineProperty(c.prototype, "clipboardMenu", {get:function() { + u("public flash.ui.ContextMenu::get clipboardMenu"); return this._clipboardMenu; }, set:function(a) { a = !!a; - p("public flash.ui.ContextMenu::set clipboardMenu"); + u("public flash.ui.ContextMenu::set clipboardMenu"); this._clipboardMenu = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "clipboardItems", {get:function() { - p("public flash.ui.ContextMenu::get clipboardItems"); + Object.defineProperty(c.prototype, "clipboardItems", {get:function() { + u("public flash.ui.ContextMenu::get clipboardItems"); return this._clipboardItems; }, set:function(a) { - p("public flash.ui.ContextMenu::set clipboardItems"); + u("public flash.ui.ContextMenu::set clipboardItems"); this._clipboardItems = a; }, enumerable:!0, configurable:!0}); - e.prototype.hideBuiltInItems = function() { + c.prototype.hideBuiltInItems = function() { var a = this.builtInItems; a && (a.save = !1, a.zoom = !1, a.quality = !1, a.play = !1, a.loop = !1, a.rewind = !1, a.forwardAndBack = !1, a.print = !1); }; - e.prototype.clone = function() { - var a = new h.ContextMenu; + c.prototype.clone = function() { + var a = new k.ContextMenu; a.builtInItems = this.builtInItems.clone(); this.cloneLinkAndClipboardProperties(a); - for (var e = this.customItems, c = 0;c < e.length;c++) { - a.customItems.push(e[c].clone()); + for (var c = this.customItems, d = 0;d < c.length;d++) { + a.customItems.push(c[d].clone()); } return a; }; - e.prototype.cloneLinkAndClipboardProperties = function(a) { - p("public flash.ui.ContextMenu::cloneLinkAndClipboardProperties"); + c.prototype.cloneLinkAndClipboardProperties = function(a) { + u("public flash.ui.ContextMenu::cloneLinkAndClipboardProperties"); }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.display.NativeMenu); - h.ContextMenu = u; + k.ContextMenu = t; })(a.ui || (a.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - (function(c) { - (function(c) { - var h = function(a) { - function h() { + (function(d) { + (function(d) { + var k = function(a) { + function l() { this._print = this._forwardAndBack = this._rewind = this._loop = this._play = this._quality = this._zoom = this._save = !0; } - __extends(h, a); - Object.defineProperty(h.prototype, "save", {get:function() { + __extends(l, a); + Object.defineProperty(l.prototype, "save", {get:function() { return this._save; }, set:function(a) { this._save = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "zoom", {get:function() { + Object.defineProperty(l.prototype, "zoom", {get:function() { return this._zoom; }, set:function(a) { this._zoom = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "quality", {get:function() { + Object.defineProperty(l.prototype, "quality", {get:function() { return this._quality; }, set:function(a) { this._quality = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "play", {get:function() { + Object.defineProperty(l.prototype, "play", {get:function() { return this._play; }, set:function(a) { this._play = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "loop", {get:function() { + Object.defineProperty(l.prototype, "loop", {get:function() { return this._loop; }, set:function(a) { this._loop = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "rewind", {get:function() { + Object.defineProperty(l.prototype, "rewind", {get:function() { return this._rewind; }, set:function(a) { this._rewind = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "forwardAndBack", {get:function() { + Object.defineProperty(l.prototype, "forwardAndBack", {get:function() { return this._forwardAndBack; }, set:function(a) { this._forwardAndBack = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "print", {get:function() { + Object.defineProperty(l.prototype, "print", {get:function() { return this._print; }, set:function(a) { this._print = !!a; }, enumerable:!0, configurable:!0}); - h.prototype.clone = function() { - var a = new c.ContextMenuBuiltInItems; + l.prototype.clone = function() { + var a = new d.ContextMenuBuiltInItems; a._save = this._save; a._zoom = this._zoom; a._quality = this._quality; @@ -42447,65 +42550,65 @@ var RtmpJs; a._print = this._print; return a; }; - h.classInitializer = null; - h.initializer = null; - h.classSymbols = null; - h.instanceSymbols = null; - return h; + l.classInitializer = null; + l.initializer = null; + l.classSymbols = null; + l.instanceSymbols = null; + return l; }(a.ASNative); - c.ContextMenuBuiltInItems = h; - })(c.ui || (c.ui = {})); + d.ContextMenuBuiltInItems = k; + })(d.ui || (d.ui = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.somewhatImplemented, s = function(a) { - function e() { + (function(k) { + (function(k) { + var r = d.Debug.somewhatImplemented, t = function(a) { + function c() { this._selectAll = this._clear = this._paste = this._copy = this._cut = !0; } - __extends(e, a); - Object.defineProperty(e.prototype, "cut", {get:function() { - p("cut"); + __extends(c, a); + Object.defineProperty(c.prototype, "cut", {get:function() { + r("cut"); return this._cut; }, set:function(a) { - p("cut"); + r("cut"); this._cut = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "copy", {get:function() { - p("copy"); + Object.defineProperty(c.prototype, "copy", {get:function() { + r("copy"); return this._copy; }, set:function(a) { - p("copy"); + r("copy"); this._copy = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "paste", {get:function() { - p("paste"); + Object.defineProperty(c.prototype, "paste", {get:function() { + r("paste"); return this._paste; }, set:function(a) { - p("paste"); + r("paste"); this._paste = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "clear", {get:function() { - p("clear"); + Object.defineProperty(c.prototype, "clear", {get:function() { + r("clear"); return this._clear; }, set:function(a) { - p("clear"); + r("clear"); this._clear = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "selectAll", {get:function() { - p("selectAll"); + Object.defineProperty(c.prototype, "selectAll", {get:function() { + r("selectAll"); return this._selectAll; }, set:function(a) { - p("selectAll"); + r("selectAll"); this._selectAll = !!a; }, enumerable:!0, configurable:!0}); - e.prototype.clone = function() { - var a = new h.ContextMenuClipboardItems; + c.prototype.clone = function() { + var a = new k.ContextMenuClipboardItems; a._cut = this._cut; a._copy = this._copy; a._paste = this._paste; @@ -42513,719 +42616,718 @@ var RtmpJs; a._selectAll = this._selectAll; return a; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.ASNative); - h.ContextMenuClipboardItems = s; - })(h.ui || (h.ui = {})); + k.ContextMenuClipboardItems = t; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.AVM2.Runtime.asCoerceString, u = function(a) { - function e(a, e, c, h) { - void 0 === e && (e = !1); - void 0 === c && (c = !0); - void 0 === h && (h = !0); - this._caption = (a = p(a)) ? a : ""; - this._separatorBefore = !!e; - this._enabled = !!c; - this._visible = !!h; + (function(k) { + var u = d.AVM2.Runtime.asCoerceString, t = function(a) { + function c(a, c, d, l) { + void 0 === c && (c = !1); + void 0 === d && (d = !0); + void 0 === l && (l = !0); + this._caption = (a = u(a)) ? a : ""; + this._separatorBefore = !!c; + this._enabled = !!d; + this._visible = !!l; } - __extends(e, a); - Object.defineProperty(e.prototype, "caption", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "caption", {get:function() { return this._caption; }, set:function(a) { - this._caption = a = p(a); + this._caption = a = u(a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "separatorBefore", {get:function() { + Object.defineProperty(c.prototype, "separatorBefore", {get:function() { return this._separatorBefore; }, set:function(a) { this._separatorBefore = !!a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "visible", {get:function() { + Object.defineProperty(c.prototype, "visible", {get:function() { return this._visible; }, set:function(a) { this._visible = !!a; }, enumerable:!0, configurable:!0}); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + return c; }(a.display.NativeMenuItem); - h.ContextMenuItem = u; + k.ContextMenuItem = t; })(a.ui || (a.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { (function(v) { - var p = c.Debug.somewhatImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.throwError, e = function(a) { - function e() { - u("public flash.ui.GameInput"); + var u = d.Debug.somewhatImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.throwError, c = function(a) { + function c() { + t("public flash.ui.GameInput"); } - __extends(e, a); - Object.defineProperty(e.prototype, "numDevices", {get:function() { - p("public flash.ui.GameInput::get numDevices"); + __extends(c, a); + Object.defineProperty(c.prototype, "numDevices", {get:function() { + u("public flash.ui.GameInput::get numDevices"); return 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(e.prototype, "isSupported", {get:function() { - p("public flash.ui.GameInput::get isSupported"); + Object.defineProperty(c.prototype, "isSupported", {get:function() { + u("public flash.ui.GameInput::get isSupported"); return!1; }, enumerable:!0, configurable:!0}); - e.getDeviceAt = function(a) { - p("public flash.ui.GameInput::static getDeviceAt"); - l("RangeError", h.Errors.ParamRangeError, "index"); + c.getDeviceAt = function(a) { + u("public flash.ui.GameInput::static getDeviceAt"); + l("RangeError", k.Errors.ParamRangeError, "index"); return null; }; - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - return e; - }(a.events.EventDispatcher); - v.GameInput = e; - })(a.ui || (a.ui = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { - function c() { - u("public flash.ui.GameInputControl"); - } - __extends(c, a); - Object.defineProperty(c.prototype, "numValues", {get:function() { - p("public flash.ui.GameInputControl::get numValues"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "index", {get:function() { - p("public flash.ui.GameInputControl::get index"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "relative", {get:function() { - p("public flash.ui.GameInputControl::get relative"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "type", {get:function() { - p("public flash.ui.GameInputControl::get type"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "hand", {get:function() { - p("public flash.ui.GameInputControl::get hand"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "finger", {get:function() { - p("public flash.ui.GameInputControl::get finger"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "device", {get:function() { - p("public flash.ui.GameInputControl::get device"); - }, enumerable:!0, configurable:!0}); - c.prototype.getValueAt = function(a) { - p("public flash.ui.GameInputControl::getValueAt"); - }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; return c; }(a.events.EventDispatcher); - h.GameInputControl = l; + v.GameInput = c; })(a.ui || (a.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.ui.GameInputControlType"); - } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.MOVEMENT = "movement"; - e.ROTATION = "rotation"; - e.DIRECTION = "direction"; - e.ACCELERATION = "acceleration"; - e.BUTTON = "button"; - e.TRIGGER = "trigger"; - return e; - }(a.ASNative); - h.GameInputControlType = s; - })(h.ui || (h.ui = {})); - })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); -})(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.ui.GameInputControl"); + } + __extends(d, a); + Object.defineProperty(d.prototype, "numValues", {get:function() { + u("public flash.ui.GameInputControl::get numValues"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "index", {get:function() { + u("public flash.ui.GameInputControl::get index"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "relative", {get:function() { + u("public flash.ui.GameInputControl::get relative"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "type", {get:function() { + u("public flash.ui.GameInputControl::get type"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "hand", {get:function() { + u("public flash.ui.GameInputControl::get hand"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "finger", {get:function() { + u("public flash.ui.GameInputControl::get finger"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "device", {get:function() { + u("public flash.ui.GameInputControl::get device"); + }, enumerable:!0, configurable:!0}); + d.prototype.getValueAt = function(a) { + u("public flash.ui.GameInputControl::getValueAt"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; + }(a.events.EventDispatcher); + k.GameInputControl = l; + })(a.ui || (a.ui = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - u("public flash.ui.GameInputDevice"); + r("public flash.ui.GameInputControlType"); } __extends(c, a); - Object.defineProperty(c.prototype, "numControls", {get:function() { - p("public flash.ui.GameInputDevice::get numControls"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "sampleInterval", {get:function() { - p("public flash.ui.GameInputDevice::get sampleInterval"); - }, set:function(a) { - p("public flash.ui.GameInputDevice::set sampleInterval"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "enabled", {get:function() { - p("public flash.ui.GameInputDevice::get enabled"); - }, set:function(a) { - p("public flash.ui.GameInputDevice::set enabled"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "id", {get:function() { - p("public flash.ui.GameInputDevice::get id"); - }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "name", {get:function() { - p("public flash.ui.GameInputDevice::get name"); - }, enumerable:!0, configurable:!0}); - c.prototype.getControlAt = function(a) { - p("public flash.ui.GameInputDevice::getControlAt"); - }; - c.prototype.startCachingSamples = function(a, e) { - p("public flash.ui.GameInputDevice::startCachingSamples"); - }; - c.prototype.stopCachingSamples = function() { - p("public flash.ui.GameInputDevice::stopCachingSamples"); - }; - c.prototype.getCachedSamples = function(a, e) { - p("public flash.ui.GameInputDevice::getCachedSamples"); - }; c.classInitializer = null; c.initializer = null; c.classSymbols = null; c.instanceSymbols = null; - c.MAX_BUFFER_SIZE = 4800; + c.MOVEMENT = "movement"; + c.ROTATION = "rotation"; + c.DIRECTION = "direction"; + c.ACCELERATION = "acceleration"; + c.BUTTON = "button"; + c.TRIGGER = "trigger"; return c; + }(a.ASNative); + k.GameInputControlType = t; + })(k.ui || (k.ui = {})); + })(a.flash || (a.flash = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); +})(Shumway || (Shumway = {})); +(function(d) { + (function(k) { + (function(a) { + (function(a) { + (function(k) { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.ui.GameInputDevice"); + } + __extends(d, a); + Object.defineProperty(d.prototype, "numControls", {get:function() { + u("public flash.ui.GameInputDevice::get numControls"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "sampleInterval", {get:function() { + u("public flash.ui.GameInputDevice::get sampleInterval"); + }, set:function(a) { + u("public flash.ui.GameInputDevice::set sampleInterval"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "enabled", {get:function() { + u("public flash.ui.GameInputDevice::get enabled"); + }, set:function(a) { + u("public flash.ui.GameInputDevice::set enabled"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "id", {get:function() { + u("public flash.ui.GameInputDevice::get id"); + }, enumerable:!0, configurable:!0}); + Object.defineProperty(d.prototype, "name", {get:function() { + u("public flash.ui.GameInputDevice::get name"); + }, enumerable:!0, configurable:!0}); + d.prototype.getControlAt = function(a) { + u("public flash.ui.GameInputDevice::getControlAt"); + }; + d.prototype.startCachingSamples = function(a, c) { + u("public flash.ui.GameInputDevice::startCachingSamples"); + }; + d.prototype.stopCachingSamples = function() { + u("public flash.ui.GameInputDevice::stopCachingSamples"); + }; + d.prototype.getCachedSamples = function(a, c) { + u("public flash.ui.GameInputDevice::getCachedSamples"); + }; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.MAX_BUFFER_SIZE = 4800; + return d; }(a.events.EventDispatcher); - h.GameInputDevice = l; + k.GameInputDevice = l; })(a.ui || (a.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.ui.GameInputFinger"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.ui.GameInputFinger"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.THUMB = "thumb"; - e.INDEX = "index"; - e.MIDDLE = "middle"; - e.UNKNOWN = "unknown"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.THUMB = "thumb"; + c.INDEX = "index"; + c.MIDDLE = "middle"; + c.UNKNOWN = "unknown"; + return c; }(a.ASNative); - h.GameInputFinger = s; - })(h.ui || (h.ui = {})); + k.GameInputFinger = t; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { - function e() { - p("public flash.ui.GameInputHand"); + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { + function c() { + r("public flash.ui.GameInputHand"); } - __extends(e, a); - e.classInitializer = null; - e.initializer = null; - e.classSymbols = null; - e.instanceSymbols = null; - e.RIGHT = "right"; - e.LEFT = "left"; - e.UNKNOWN = "unknown"; - return e; + __extends(c, a); + c.classInitializer = null; + c.initializer = null; + c.classSymbols = null; + c.instanceSymbols = null; + c.RIGHT = "right"; + c.LEFT = "left"; + c.UNKNOWN = "unknown"; + return c; }(a.ASNative); - h.GameInputHand = s; - })(h.ui || (h.ui = {})); + k.GameInputHand = t; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { + (function(k) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function() { + var u = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function() { function a() { this._lastKeyCode = 0; this._captureKeyPress = !1; this._charCodeMap = []; } a.prototype.dispatchKeyboardEvent = function(a) { - var e = a.keyCode; + var c = a.keyCode; if ("keydown" === a.type) { - this._lastKeyCode = e; - if (this._captureKeyPress = 8 === e || 9 === e || 13 === e || 32 === e || 48 <= e && 90 >= e || 145 < e) { + this._lastKeyCode = c; + if (this._captureKeyPress = 8 === c || 9 === c || 13 === c || 32 === c || 48 <= c && 90 >= c || 145 < c) { return; } - this._charCodeMap[e] = 0; + this._charCodeMap[c] = 0; } else { if ("keypress" === a.type) { if (this._captureKeyPress) { - e = this._lastKeyCode, this._charCodeMap[e] = a.charCode; + c = this._lastKeyCode, this._charCodeMap[c] = a.charCode; } else { return; } } } if (this.target) { - var c = "keyup" === a.type; - this.target.dispatchEvent(new h.events.KeyboardEvent(c ? "keyUp" : "keyDown", !0, !1, c ? this._charCodeMap[e] : a.charCode, c ? a.keyCode : this._lastKeyCode, a.location, a.ctrlKey, a.altKey, a.shiftKey)); + var d = "keyup" === a.type; + this.target.dispatchEvent(new k.events.KeyboardEvent(d ? "keyUp" : "keyDown", !0, !1, d ? this._charCodeMap[c] : a.charCode, d ? a.keyCode : this._lastKeyCode, a.location, a.ctrlKey, a.altKey, a.shiftKey)); } }; return a; }(); v.KeyboardEventDispatcher = l; l = function(a) { - function c() { - u("public flash.ui.Keyboard"); + function d() { + t("public flash.ui.Keyboard"); } - __extends(c, a); - Object.defineProperty(c, "capsLock", {get:function() { - p("public flash.ui.Keyboard::get capsLock"); + __extends(d, a); + Object.defineProperty(d, "capsLock", {get:function() { + u("public flash.ui.Keyboard::get capsLock"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "numLock", {get:function() { - p("public flash.ui.Keyboard::get numLock"); + Object.defineProperty(d, "numLock", {get:function() { + u("public flash.ui.Keyboard::get numLock"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "hasVirtualKeyboard", {get:function() { - p("public flash.ui.Keyboard::get hasVirtualKeyboard"); + Object.defineProperty(d, "hasVirtualKeyboard", {get:function() { + u("public flash.ui.Keyboard::get hasVirtualKeyboard"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "physicalKeyboardType", {get:function() { - p("public flash.ui.Keyboard::get physicalKeyboardType"); + Object.defineProperty(d, "physicalKeyboardType", {get:function() { + u("public flash.ui.Keyboard::get physicalKeyboardType"); }, enumerable:!0, configurable:!0}); - c.isAccessible = function() { - p("public flash.ui.Keyboard::static isAccessible"); + d.isAccessible = function() { + u("public flash.ui.Keyboard::static isAccessible"); }; - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - c.KEYNAME_UPARROW = "Up"; - c.KEYNAME_DOWNARROW = "Down"; - c.KEYNAME_LEFTARROW = "Left"; - c.KEYNAME_RIGHTARROW = "Right"; - c.KEYNAME_F1 = "F1"; - c.KEYNAME_F2 = "F2"; - c.KEYNAME_F3 = "F3"; - c.KEYNAME_F4 = "F4"; - c.KEYNAME_F5 = "F5"; - c.KEYNAME_F6 = "F6"; - c.KEYNAME_F7 = "F7"; - c.KEYNAME_F8 = "F8"; - c.KEYNAME_F9 = "F9"; - c.KEYNAME_F10 = "F10"; - c.KEYNAME_F11 = "F11"; - c.KEYNAME_F12 = "F12"; - c.KEYNAME_F13 = "F13"; - c.KEYNAME_F14 = "F14"; - c.KEYNAME_F15 = "F15"; - c.KEYNAME_F16 = "F16"; - c.KEYNAME_F17 = "F17"; - c.KEYNAME_F18 = "F18"; - c.KEYNAME_F19 = "F19"; - c.KEYNAME_F20 = "F20"; - c.KEYNAME_F21 = "F21"; - c.KEYNAME_F22 = "F22"; - c.KEYNAME_F23 = "F23"; - c.KEYNAME_F24 = "F24"; - c.KEYNAME_F25 = "F25"; - c.KEYNAME_F26 = "F26"; - c.KEYNAME_F27 = "F27"; - c.KEYNAME_F28 = "F28"; - c.KEYNAME_F29 = "F29"; - c.KEYNAME_F30 = "F30"; - c.KEYNAME_F31 = "F31"; - c.KEYNAME_F32 = "F32"; - c.KEYNAME_F33 = "F33"; - c.KEYNAME_F34 = "F34"; - c.KEYNAME_F35 = "F35"; - c.KEYNAME_INSERT = "Insert"; - c.KEYNAME_DELETE = "Delete"; - c.KEYNAME_HOME = "Home"; - c.KEYNAME_BEGIN = "Begin"; - c.KEYNAME_END = "End"; - c.KEYNAME_PAGEUP = "PgUp"; - c.KEYNAME_PAGEDOWN = "PgDn"; - c.KEYNAME_PRINTSCREEN = "PrntScrn"; - c.KEYNAME_SCROLLLOCK = "ScrlLck"; - c.KEYNAME_PAUSE = "Pause"; - c.KEYNAME_SYSREQ = "SysReq"; - c.KEYNAME_BREAK = "Break"; - c.KEYNAME_RESET = "Reset"; - c.KEYNAME_STOP = "Stop"; - c.KEYNAME_MENU = "Menu"; - c.KEYNAME_USER = "User"; - c.KEYNAME_SYSTEM = "Sys"; - c.KEYNAME_PRINT = "Print"; - c.KEYNAME_CLEARLINE = "ClrLn"; - c.KEYNAME_CLEARDISPLAY = "ClrDsp"; - c.KEYNAME_INSERTLINE = "InsLn"; - c.KEYNAME_DELETELINE = "DelLn"; - c.KEYNAME_INSERTCHAR = "InsChr"; - c.KEYNAME_DELETECHAR = "DelChr"; - c.KEYNAME_PREV = "Prev"; - c.KEYNAME_NEXT = "Next"; - c.KEYNAME_SELECT = "Select"; - c.KEYNAME_EXECUTE = "Exec"; - c.KEYNAME_UNDO = "Undo"; - c.KEYNAME_REDO = "Redo"; - c.KEYNAME_FIND = "Find"; - c.KEYNAME_HELP = "Help"; - c.KEYNAME_MODESWITCH = "ModeSw"; - c.STRING_UPARROW = "\uf700"; - c.STRING_DOWNARROW = "\uf701"; - c.STRING_LEFTARROW = "\uf702"; - c.STRING_RIGHTARROW = "\uf703"; - c.STRING_F1 = "\uf704"; - c.STRING_F2 = "\uf705"; - c.STRING_F3 = "\uf706"; - c.STRING_F4 = "\uf707"; - c.STRING_F5 = "\uf708"; - c.STRING_F6 = "\uf709"; - c.STRING_F7 = "\uf70a"; - c.STRING_F8 = "\uf70b"; - c.STRING_F9 = "\uf70c"; - c.STRING_F10 = "\uf70d"; - c.STRING_F11 = "\uf70e"; - c.STRING_F12 = "\uf70f"; - c.STRING_F13 = "\uf710"; - c.STRING_F14 = "\uf711"; - c.STRING_F15 = "\uf712"; - c.STRING_F16 = "\uf713"; - c.STRING_F17 = "\uf714"; - c.STRING_F18 = "\uf715"; - c.STRING_F19 = "\uf716"; - c.STRING_F20 = "\uf717"; - c.STRING_F21 = "\uf718"; - c.STRING_F22 = "\uf719"; - c.STRING_F23 = "\uf71a"; - c.STRING_F24 = "\uf71b"; - c.STRING_F25 = "\uf71c"; - c.STRING_F26 = "\uf71d"; - c.STRING_F27 = "\uf71e"; - c.STRING_F28 = "\uf71f"; - c.STRING_F29 = "\uf720"; - c.STRING_F30 = "\uf721"; - c.STRING_F31 = "\uf722"; - c.STRING_F32 = "\uf723"; - c.STRING_F33 = "\uf724"; - c.STRING_F34 = "\uf725"; - c.STRING_F35 = "\uf726"; - c.STRING_INSERT = "\uf727"; - c.STRING_DELETE = "\uf728"; - c.STRING_HOME = "\uf729"; - c.STRING_BEGIN = "\uf72a"; - c.STRING_END = "\uf72b"; - c.STRING_PAGEUP = "\uf72c"; - c.STRING_PAGEDOWN = "\uf72d"; - c.STRING_PRINTSCREEN = "\uf72e"; - c.STRING_SCROLLLOCK = "\uf72f"; - c.STRING_PAUSE = "\uf730"; - c.STRING_SYSREQ = "\uf731"; - c.STRING_BREAK = "\uf732"; - c.STRING_RESET = "\uf733"; - c.STRING_STOP = "\uf734"; - c.STRING_MENU = "\uf735"; - c.STRING_USER = "\uf736"; - c.STRING_SYSTEM = "\uf737"; - c.STRING_PRINT = "\uf738"; - c.STRING_CLEARLINE = "\uf739"; - c.STRING_CLEARDISPLAY = "\uf73a"; - c.STRING_INSERTLINE = "\uf73b"; - c.STRING_DELETELINE = "\uf73c"; - c.STRING_INSERTCHAR = "\uf73d"; - c.STRING_DELETECHAR = "\uf73e"; - c.STRING_PREV = "\uf73f"; - c.STRING_NEXT = "\uf740"; - c.STRING_SELECT = "\uf741"; - c.STRING_EXECUTE = "\uf742"; - c.STRING_UNDO = "\uf743"; - c.STRING_REDO = "\uf744"; - c.STRING_FIND = "\uf745"; - c.STRING_HELP = "\uf746"; - c.STRING_MODESWITCH = "\uf747"; - c.CharCodeStrings = void 0; - c.NUMBER_0 = 48; - c.NUMBER_1 = 49; - c.NUMBER_2 = 50; - c.NUMBER_3 = 51; - c.NUMBER_4 = 52; - c.NUMBER_5 = 53; - c.NUMBER_6 = 54; - c.NUMBER_7 = 55; - c.NUMBER_8 = 56; - c.NUMBER_9 = 57; - c.A = 65; - c.B = 66; - c.C = 67; - c.D = 68; - c.E = 69; - c.F = 70; - c.G = 71; - c.H = 72; - c.I = 73; - c.J = 74; - c.K = 75; - c.L = 76; - c.M = 77; - c.N = 78; - c.O = 79; - c.P = 80; - c.Q = 81; - c.R = 82; - c.S = 83; - c.T = 84; - c.U = 85; - c.V = 86; - c.W = 87; - c.X = 88; - c.Y = 89; - c.Z = 90; - c.SEMICOLON = 186; - c.EQUAL = 187; - c.COMMA = 188; - c.MINUS = 189; - c.PERIOD = 190; - c.SLASH = 191; - c.BACKQUOTE = 192; - c.LEFTBRACKET = 219; - c.BACKSLASH = 220; - c.RIGHTBRACKET = 221; - c.QUOTE = 222; - c.ALTERNATE = 18; - c.BACKSPACE = 8; - c.CAPS_LOCK = 20; - c.COMMAND = 15; - c.CONTROL = 17; - c.DELETE = 46; - c.DOWN = 40; - c.END = 35; - c.ENTER = 13; - c.ESCAPE = 27; - c.F1 = 112; - c.F2 = 113; - c.F3 = 114; - c.F4 = 115; - c.F5 = 116; - c.F6 = 117; - c.F7 = 118; - c.F8 = 119; - c.F9 = 120; - c.F10 = 121; - c.F11 = 122; - c.F12 = 123; - c.F13 = 124; - c.F14 = 125; - c.F15 = 126; - c.HOME = 36; - c.INSERT = 45; - c.LEFT = 37; - c.NUMPAD = 21; - c.NUMPAD_0 = 96; - c.NUMPAD_1 = 97; - c.NUMPAD_2 = 98; - c.NUMPAD_3 = 99; - c.NUMPAD_4 = 100; - c.NUMPAD_5 = 101; - c.NUMPAD_6 = 102; - c.NUMPAD_7 = 103; - c.NUMPAD_8 = 104; - c.NUMPAD_9 = 105; - c.NUMPAD_ADD = 107; - c.NUMPAD_DECIMAL = 110; - c.NUMPAD_DIVIDE = 111; - c.NUMPAD_ENTER = 108; - c.NUMPAD_MULTIPLY = 106; - c.NUMPAD_SUBTRACT = 109; - c.PAGE_DOWN = 34; - c.PAGE_UP = 33; - c.RIGHT = 39; - c.SHIFT = 16; - c.SPACE = 32; - c.TAB = 9; - c.UP = 38; - c.RED = 16777216; - c.GREEN = 16777217; - c.YELLOW = 16777218; - c.BLUE = 16777219; - c.CHANNEL_UP = 16777220; - c.CHANNEL_DOWN = 16777221; - c.RECORD = 16777222; - c.PLAY = 16777223; - c.PAUSE = 16777224; - c.STOP = 16777225; - c.FAST_FORWARD = 16777226; - c.REWIND = 16777227; - c.SKIP_FORWARD = 16777228; - c.SKIP_BACKWARD = 16777229; - c.NEXT = 16777230; - c.PREVIOUS = 16777231; - c.LIVE = 16777232; - c.LAST = 16777233; - c.MENU = 16777234; - c.INFO = 16777235; - c.GUIDE = 16777236; - c.EXIT = 16777237; - c.BACK = 16777238; - c.AUDIO = 16777239; - c.SUBTITLE = 16777240; - c.DVR = 16777241; - c.VOD = 16777242; - c.INPUT = 16777243; - c.SETUP = 16777244; - c.HELP = 16777245; - c.MASTER_SHELL = 16777246; - c.SEARCH = 16777247; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + d.KEYNAME_UPARROW = "Up"; + d.KEYNAME_DOWNARROW = "Down"; + d.KEYNAME_LEFTARROW = "Left"; + d.KEYNAME_RIGHTARROW = "Right"; + d.KEYNAME_F1 = "F1"; + d.KEYNAME_F2 = "F2"; + d.KEYNAME_F3 = "F3"; + d.KEYNAME_F4 = "F4"; + d.KEYNAME_F5 = "F5"; + d.KEYNAME_F6 = "F6"; + d.KEYNAME_F7 = "F7"; + d.KEYNAME_F8 = "F8"; + d.KEYNAME_F9 = "F9"; + d.KEYNAME_F10 = "F10"; + d.KEYNAME_F11 = "F11"; + d.KEYNAME_F12 = "F12"; + d.KEYNAME_F13 = "F13"; + d.KEYNAME_F14 = "F14"; + d.KEYNAME_F15 = "F15"; + d.KEYNAME_F16 = "F16"; + d.KEYNAME_F17 = "F17"; + d.KEYNAME_F18 = "F18"; + d.KEYNAME_F19 = "F19"; + d.KEYNAME_F20 = "F20"; + d.KEYNAME_F21 = "F21"; + d.KEYNAME_F22 = "F22"; + d.KEYNAME_F23 = "F23"; + d.KEYNAME_F24 = "F24"; + d.KEYNAME_F25 = "F25"; + d.KEYNAME_F26 = "F26"; + d.KEYNAME_F27 = "F27"; + d.KEYNAME_F28 = "F28"; + d.KEYNAME_F29 = "F29"; + d.KEYNAME_F30 = "F30"; + d.KEYNAME_F31 = "F31"; + d.KEYNAME_F32 = "F32"; + d.KEYNAME_F33 = "F33"; + d.KEYNAME_F34 = "F34"; + d.KEYNAME_F35 = "F35"; + d.KEYNAME_INSERT = "Insert"; + d.KEYNAME_DELETE = "Delete"; + d.KEYNAME_HOME = "Home"; + d.KEYNAME_BEGIN = "Begin"; + d.KEYNAME_END = "End"; + d.KEYNAME_PAGEUP = "PgUp"; + d.KEYNAME_PAGEDOWN = "PgDn"; + d.KEYNAME_PRINTSCREEN = "PrntScrn"; + d.KEYNAME_SCROLLLOCK = "ScrlLck"; + d.KEYNAME_PAUSE = "Pause"; + d.KEYNAME_SYSREQ = "SysReq"; + d.KEYNAME_BREAK = "Break"; + d.KEYNAME_RESET = "Reset"; + d.KEYNAME_STOP = "Stop"; + d.KEYNAME_MENU = "Menu"; + d.KEYNAME_USER = "User"; + d.KEYNAME_SYSTEM = "Sys"; + d.KEYNAME_PRINT = "Print"; + d.KEYNAME_CLEARLINE = "ClrLn"; + d.KEYNAME_CLEARDISPLAY = "ClrDsp"; + d.KEYNAME_INSERTLINE = "InsLn"; + d.KEYNAME_DELETELINE = "DelLn"; + d.KEYNAME_INSERTCHAR = "InsChr"; + d.KEYNAME_DELETECHAR = "DelChr"; + d.KEYNAME_PREV = "Prev"; + d.KEYNAME_NEXT = "Next"; + d.KEYNAME_SELECT = "Select"; + d.KEYNAME_EXECUTE = "Exec"; + d.KEYNAME_UNDO = "Undo"; + d.KEYNAME_REDO = "Redo"; + d.KEYNAME_FIND = "Find"; + d.KEYNAME_HELP = "Help"; + d.KEYNAME_MODESWITCH = "ModeSw"; + d.STRING_UPARROW = "\uf700"; + d.STRING_DOWNARROW = "\uf701"; + d.STRING_LEFTARROW = "\uf702"; + d.STRING_RIGHTARROW = "\uf703"; + d.STRING_F1 = "\uf704"; + d.STRING_F2 = "\uf705"; + d.STRING_F3 = "\uf706"; + d.STRING_F4 = "\uf707"; + d.STRING_F5 = "\uf708"; + d.STRING_F6 = "\uf709"; + d.STRING_F7 = "\uf70a"; + d.STRING_F8 = "\uf70b"; + d.STRING_F9 = "\uf70c"; + d.STRING_F10 = "\uf70d"; + d.STRING_F11 = "\uf70e"; + d.STRING_F12 = "\uf70f"; + d.STRING_F13 = "\uf710"; + d.STRING_F14 = "\uf711"; + d.STRING_F15 = "\uf712"; + d.STRING_F16 = "\uf713"; + d.STRING_F17 = "\uf714"; + d.STRING_F18 = "\uf715"; + d.STRING_F19 = "\uf716"; + d.STRING_F20 = "\uf717"; + d.STRING_F21 = "\uf718"; + d.STRING_F22 = "\uf719"; + d.STRING_F23 = "\uf71a"; + d.STRING_F24 = "\uf71b"; + d.STRING_F25 = "\uf71c"; + d.STRING_F26 = "\uf71d"; + d.STRING_F27 = "\uf71e"; + d.STRING_F28 = "\uf71f"; + d.STRING_F29 = "\uf720"; + d.STRING_F30 = "\uf721"; + d.STRING_F31 = "\uf722"; + d.STRING_F32 = "\uf723"; + d.STRING_F33 = "\uf724"; + d.STRING_F34 = "\uf725"; + d.STRING_F35 = "\uf726"; + d.STRING_INSERT = "\uf727"; + d.STRING_DELETE = "\uf728"; + d.STRING_HOME = "\uf729"; + d.STRING_BEGIN = "\uf72a"; + d.STRING_END = "\uf72b"; + d.STRING_PAGEUP = "\uf72c"; + d.STRING_PAGEDOWN = "\uf72d"; + d.STRING_PRINTSCREEN = "\uf72e"; + d.STRING_SCROLLLOCK = "\uf72f"; + d.STRING_PAUSE = "\uf730"; + d.STRING_SYSREQ = "\uf731"; + d.STRING_BREAK = "\uf732"; + d.STRING_RESET = "\uf733"; + d.STRING_STOP = "\uf734"; + d.STRING_MENU = "\uf735"; + d.STRING_USER = "\uf736"; + d.STRING_SYSTEM = "\uf737"; + d.STRING_PRINT = "\uf738"; + d.STRING_CLEARLINE = "\uf739"; + d.STRING_CLEARDISPLAY = "\uf73a"; + d.STRING_INSERTLINE = "\uf73b"; + d.STRING_DELETELINE = "\uf73c"; + d.STRING_INSERTCHAR = "\uf73d"; + d.STRING_DELETECHAR = "\uf73e"; + d.STRING_PREV = "\uf73f"; + d.STRING_NEXT = "\uf740"; + d.STRING_SELECT = "\uf741"; + d.STRING_EXECUTE = "\uf742"; + d.STRING_UNDO = "\uf743"; + d.STRING_REDO = "\uf744"; + d.STRING_FIND = "\uf745"; + d.STRING_HELP = "\uf746"; + d.STRING_MODESWITCH = "\uf747"; + d.CharCodeStrings = void 0; + d.NUMBER_0 = 48; + d.NUMBER_1 = 49; + d.NUMBER_2 = 50; + d.NUMBER_3 = 51; + d.NUMBER_4 = 52; + d.NUMBER_5 = 53; + d.NUMBER_6 = 54; + d.NUMBER_7 = 55; + d.NUMBER_8 = 56; + d.NUMBER_9 = 57; + d.A = 65; + d.B = 66; + d.C = 67; + d.D = 68; + d.E = 69; + d.F = 70; + d.G = 71; + d.H = 72; + d.I = 73; + d.J = 74; + d.K = 75; + d.L = 76; + d.M = 77; + d.N = 78; + d.O = 79; + d.P = 80; + d.Q = 81; + d.R = 82; + d.S = 83; + d.T = 84; + d.U = 85; + d.V = 86; + d.W = 87; + d.X = 88; + d.Y = 89; + d.Z = 90; + d.SEMICOLON = 186; + d.EQUAL = 187; + d.COMMA = 188; + d.MINUS = 189; + d.PERIOD = 190; + d.SLASH = 191; + d.BACKQUOTE = 192; + d.LEFTBRACKET = 219; + d.BACKSLASH = 220; + d.RIGHTBRACKET = 221; + d.QUOTE = 222; + d.ALTERNATE = 18; + d.BACKSPACE = 8; + d.CAPS_LOCK = 20; + d.COMMAND = 15; + d.CONTROL = 17; + d.DELETE = 46; + d.DOWN = 40; + d.END = 35; + d.ENTER = 13; + d.ESCAPE = 27; + d.F1 = 112; + d.F2 = 113; + d.F3 = 114; + d.F4 = 115; + d.F5 = 116; + d.F6 = 117; + d.F7 = 118; + d.F8 = 119; + d.F9 = 120; + d.F10 = 121; + d.F11 = 122; + d.F12 = 123; + d.F13 = 124; + d.F14 = 125; + d.F15 = 126; + d.HOME = 36; + d.INSERT = 45; + d.LEFT = 37; + d.NUMPAD = 21; + d.NUMPAD_0 = 96; + d.NUMPAD_1 = 97; + d.NUMPAD_2 = 98; + d.NUMPAD_3 = 99; + d.NUMPAD_4 = 100; + d.NUMPAD_5 = 101; + d.NUMPAD_6 = 102; + d.NUMPAD_7 = 103; + d.NUMPAD_8 = 104; + d.NUMPAD_9 = 105; + d.NUMPAD_ADD = 107; + d.NUMPAD_DECIMAL = 110; + d.NUMPAD_DIVIDE = 111; + d.NUMPAD_ENTER = 108; + d.NUMPAD_MULTIPLY = 106; + d.NUMPAD_SUBTRACT = 109; + d.PAGE_DOWN = 34; + d.PAGE_UP = 33; + d.RIGHT = 39; + d.SHIFT = 16; + d.SPACE = 32; + d.TAB = 9; + d.UP = 38; + d.RED = 16777216; + d.GREEN = 16777217; + d.YELLOW = 16777218; + d.BLUE = 16777219; + d.CHANNEL_UP = 16777220; + d.CHANNEL_DOWN = 16777221; + d.RECORD = 16777222; + d.PLAY = 16777223; + d.PAUSE = 16777224; + d.STOP = 16777225; + d.FAST_FORWARD = 16777226; + d.REWIND = 16777227; + d.SKIP_FORWARD = 16777228; + d.SKIP_BACKWARD = 16777229; + d.NEXT = 16777230; + d.PREVIOUS = 16777231; + d.LIVE = 16777232; + d.LAST = 16777233; + d.MENU = 16777234; + d.INFO = 16777235; + d.GUIDE = 16777236; + d.EXIT = 16777237; + d.BACK = 16777238; + d.AUDIO = 16777239; + d.SUBTITLE = 16777240; + d.DVR = 16777241; + d.VOD = 16777242; + d.INPUT = 16777243; + d.SETUP = 16777244; + d.HELP = 16777245; + d.MASTER_SHELL = 16777246; + d.SEARCH = 16777247; + return d; }(a.ASNative); v.Keyboard = l; - })(h.ui || (h.ui = {})); + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(s) { + (function(r) { (function(v) { - var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.assert, e = c.AVM2.Runtime.asCoerceString, m = s.events, t = function() { + var u = d.Debug.notImplemented, t = d.Debug.somewhatImplemented, l = d.AVM2.Runtime.asCoerceString, c = r.events, h = function() { function a() { this.currentTarget = this.stage = null; } a.prototype._findTarget = function(a, c) { - var e = []; - this.stage._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, c, e); - l(2 > e.length); - return e.length ? e[0] : e.length ? e[0] : null; + var d = []; + this.stage._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, c, d); + return d.length ? d[0] : d.length ? d[0] : null; }; - a.prototype._dispatchMouseEvent = function(a, c, e, d) { - void 0 === d && (d = null); - var b = a.globalToLocal(e.point); - c = new m.MouseEvent(c, c !== m.MouseEvent.ROLL_OVER && c !== m.MouseEvent.ROLL_OUT && c !== m.MouseEvent.MOUSE_LEAVE, !1, b.x, b.y, d, e.ctrlKey, e.altKey, e.shiftKey, !!e.buttons); - a.dispatchEvent(c); + a.prototype._dispatchMouseEvent = function(a, d, g, f) { + void 0 === f && (f = null); + var b = a.globalToLocal(g.point); + d = new c.MouseEvent(d, d !== c.MouseEvent.ROLL_OVER && d !== c.MouseEvent.ROLL_OUT && d !== c.MouseEvent.MOUSE_LEAVE, !1, b.x, b.y, f, g.ctrlKey, g.altKey, g.shiftKey, !!g.buttons); + a.dispatchEvent(d); }; a.prototype.handleMouseEvent = function(a) { - var c = this.stage; - if (!c) { - return c; + var d = this.stage; + if (!d) { + return d; } - var e = a.point; - s.ui.Mouse.updateCurrentPosition(e); - var d = this.currentTarget, b = null, g = s.events.MouseEvent.typeFromDOMType(a.type); - if (0 <= e.x && e.x < c.stageWidth && 0 <= e.y && e.y < c.stageHeight) { - b = this._findTarget(e, 3) || this.stage; + var g = a.point; + r.ui.Mouse.updateCurrentPosition(g); + var f = this.currentTarget, b = null, e = r.events.MouseEvent.typeFromDOMType(a.type); + if (0 <= g.x && g.x < d.stageWidth && 0 <= g.y && g.y < d.stageHeight) { + b = this._findTarget(g, 3) || this.stage; } else { - if (!d) { - return c; + if (!f) { + return d; } - this._dispatchMouseEvent(c, m.MouseEvent.MOUSE_LEAVE, a); - if (g !== m.MouseEvent.MOUSE_MOVE) { - return c; + this._dispatchMouseEvent(d, c.MouseEvent.MOUSE_LEAVE, a); + if (e !== c.MouseEvent.MOUSE_MOVE) { + return d; } } - s.ui.Mouse.draggableObject && (e = this._findTarget(e, 5), s.ui.Mouse.draggableObject._updateDragState(e)); - switch(g) { - case m.MouseEvent.MOUSE_DOWN: - a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (g = m.MouseEvent.MIDDLE_MOUSE_DOWN, a.buttons = 2) : a.buttons & 4 && (g = m.MouseEvent.RIGHT_MOUSE_DOWN, a.buttons = 4); + r.ui.Mouse.draggableObject && (g = this._findTarget(g, 5), r.ui.Mouse.draggableObject._updateDragState(g)); + switch(e) { + case c.MouseEvent.MOUSE_DOWN: + a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (e = c.MouseEvent.MIDDLE_MOUSE_DOWN, a.buttons = 2) : a.buttons & 4 && (e = c.MouseEvent.RIGHT_MOUSE_DOWN, a.buttons = 4); b._mouseDown = !0; break; - case m.MouseEvent.MOUSE_UP: - a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (g = m.MouseEvent.MIDDLE_MOUSE_UP, a.buttons = 2) : a.buttons & 4 && (g = m.MouseEvent.RIGHT_MOUSE_UP, a.buttons = 4); + case c.MouseEvent.MOUSE_UP: + a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (e = c.MouseEvent.MIDDLE_MOUSE_UP, a.buttons = 2) : a.buttons & 4 && (e = c.MouseEvent.RIGHT_MOUSE_UP, a.buttons = 4); b._mouseDown = !1; break; - case m.MouseEvent.CLICK: - a.buttons & 1 || (a.buttons & 2 ? g = m.MouseEvent.MIDDLE_CLICK : a.buttons & 4 && (g = m.MouseEvent.RIGHT_CLICK)); + case c.MouseEvent.CLICK: + a.buttons & 1 || (a.buttons & 2 ? e = c.MouseEvent.MIDDLE_CLICK : a.buttons & 4 && (e = c.MouseEvent.RIGHT_CLICK)); a.buttons = 0; break; - case m.MouseEvent.DOUBLE_CLICK: + case c.MouseEvent.DOUBLE_CLICK: if (!b.doubleClickEnabled) { return; } a.buttons = 0; break; - case m.MouseEvent.MOUSE_MOVE: + case c.MouseEvent.MOUSE_MOVE: this.currentTarget = b; a.buttons &= 1; - if (b === d) { + if (b === f) { break; } - e = b ? b.findNearestCommonAncestor(d) : c; - if (d && d !== c) { - d._mouseOver = !1; - d._mouseDown = !1; - this._dispatchMouseEvent(d, m.MouseEvent.MOUSE_OUT, a, b); - for (var h = d;h !== e;) { - this._dispatchMouseEvent(h, m.MouseEvent.ROLL_OUT, a, b), h = h.parent; + g = b ? b.findNearestCommonAncestor(f) : d; + if (f && f !== d) { + f._mouseOver = !1; + f._mouseDown = !1; + this._dispatchMouseEvent(f, c.MouseEvent.MOUSE_OUT, a, b); + for (var h = f;h !== g;) { + this._dispatchMouseEvent(h, c.MouseEvent.ROLL_OUT, a, b), h = h.parent; } } if (!b) { - return c; + return d; } - if (b === c) { + if (b === d) { break; } - for (c = b;c !== e;) { - this._dispatchMouseEvent(c, m.MouseEvent.ROLL_OVER, a, d), c = c.parent; + for (d = b;d !== g;) { + this._dispatchMouseEvent(d, c.MouseEvent.ROLL_OVER, a, f), d = d.parent; } b._mouseOver = !0; - this._dispatchMouseEvent(b, m.MouseEvent.MOUSE_OVER, a, d); + this._dispatchMouseEvent(b, c.MouseEvent.MOUSE_OVER, a, f); return b; } - this._dispatchMouseEvent(b, g, a); + this._dispatchMouseEvent(b, e, a); return b; }; return a; }(); - v.MouseEventDispatcher = t; + v.MouseEventDispatcher = h; (function(a) { a[a.Left = 1] = "Left"; a[a.Middle = 2] = "Middle"; a[a.Right = 4] = "Right"; })(v.MouseButtonFlags || (v.MouseButtonFlags = {})); - t = function(a) { + h = function(a) { function c() { } __extends(c, a); @@ -43235,32 +43337,32 @@ var RtmpJs; Object.defineProperty(c, "cursor", {get:function() { return this._cursor; }, set:function(a) { - a = e(a); - 0 > v.MouseCursor.toNumber(a) && throwError("ArgumentError", h.Errors.InvalidParamError, "cursor"); + a = l(a); + 0 > v.MouseCursor.toNumber(a) && throwError("ArgumentError", k.Errors.InvalidParamError, "cursor"); this._cursor = a; }, enumerable:!0, configurable:!0}); Object.defineProperty(c, "supportsNativeCursor", {get:function() { return!0; }, enumerable:!0, configurable:!0}); c.hide = function() { - u("public flash.ui.Mouse::static hide"); + t("public flash.ui.Mouse::static hide"); }; c.show = function() { - u("public flash.ui.Mouse::static show"); + t("public flash.ui.Mouse::static show"); }; c.registerCursor = function(a, c) { - e(a); - p("public flash.ui.Mouse::static registerCursor"); + l(a); + u("public flash.ui.Mouse::static registerCursor"); }; c.unregisterCursor = function(a) { - e(a); - p("public flash.ui.Mouse::static unregisterCursor"); + l(a); + u("public flash.ui.Mouse::static unregisterCursor"); }; c.updateCurrentPosition = function(a) { this._currentPosition.copyFrom(a); }; c.classInitializer = function() { - this._currentPosition = new s.geom.Point; + this._currentPosition = new r.geom.Point; this._cursor = v.MouseCursor.AUTO; this.draggableObject = null; }; @@ -43269,20 +43371,20 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.ASNative); - v.Mouse = t; - })(s.ui || (s.ui = {})); + v.Mouse = h; + })(r.ui || (r.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - p("public flash.ui.MouseCursor"); + r("public flash.ui.MouseCursor"); } __extends(c, a); c.fromNumber = function(a) { @@ -43328,107 +43430,107 @@ var RtmpJs; c.IBEAM = "ibeam"; return c; }(a.ASNative); - h.MouseCursor = s; - })(h.ui || (h.ui = {})); + k.MouseCursor = t; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = function(a) { - function c() { - s("public flash.ui.MouseCursorData"); + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = function(a) { + function d() { + t("public flash.ui.MouseCursorData"); } - __extends(c, a); - Object.defineProperty(c.prototype, "data", {get:function() { - p("public flash.ui.MouseCursorData::get data"); + __extends(d, a); + Object.defineProperty(d.prototype, "data", {get:function() { + r("public flash.ui.MouseCursorData::get data"); }, set:function(a) { - p("public flash.ui.MouseCursorData::set data"); + r("public flash.ui.MouseCursorData::set data"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "hotSpot", {get:function() { - p("public flash.ui.MouseCursorData::get hotSpot"); + Object.defineProperty(d.prototype, "hotSpot", {get:function() { + r("public flash.ui.MouseCursorData::get hotSpot"); }, set:function(a) { - p("public flash.ui.MouseCursorData::set hotSpot"); + r("public flash.ui.MouseCursorData::set hotSpot"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "frameRate", {get:function() { - p("public flash.ui.MouseCursorData::get frameRate"); + Object.defineProperty(d.prototype, "frameRate", {get:function() { + r("public flash.ui.MouseCursorData::get frameRate"); }, set:function(a) { - p("public flash.ui.MouseCursorData::set frameRate"); + r("public flash.ui.MouseCursorData::set frameRate"); }, enumerable:!0, configurable:!0}); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - h.MouseCursorData = l; - })(h.ui || (h.ui = {})); + k.MouseCursorData = l; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.somewhatImplemented, s = c.Debug.notImplemented, l = c.Debug.dummyConstructor, e = c.AVM2.Runtime.asCoerceString, m = function(a) { - function c() { + (function(k) { + (function(k) { + var r = d.Debug.somewhatImplemented, t = d.Debug.notImplemented, l = d.Debug.dummyConstructor, c = d.AVM2.Runtime.asCoerceString, h = function(a) { + function d() { l("public flash.ui.Multitouch"); } - __extends(c, a); - Object.defineProperty(c, "inputMode", {get:function() { - s("public flash.ui.Multitouch::get inputMode"); + __extends(d, a); + Object.defineProperty(d, "inputMode", {get:function() { + t("public flash.ui.Multitouch::get inputMode"); }, set:function(a) { - e(a); - s("public flash.ui.Multitouch::set inputMode"); + c(a); + t("public flash.ui.Multitouch::set inputMode"); }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "supportsTouchEvents", {get:function() { - p("public flash.ui.Multitouch::get supportsTouchEvents"); + Object.defineProperty(d, "supportsTouchEvents", {get:function() { + r("public flash.ui.Multitouch::get supportsTouchEvents"); return!1; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "supportsGestureEvents", {get:function() { - p("public flash.ui.Multitouch::get supportsGestureEvents"); + Object.defineProperty(d, "supportsGestureEvents", {get:function() { + r("public flash.ui.Multitouch::get supportsGestureEvents"); return!1; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "supportedGestures", {get:function() { - p("public flash.ui.Multitouch::get supportedGestures"); + Object.defineProperty(d, "supportedGestures", {get:function() { + r("public flash.ui.Multitouch::get supportedGestures"); return null; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "maxTouchPoints", {get:function() { - p("public flash.ui.Multitouch::get maxTouchPoints"); + Object.defineProperty(d, "maxTouchPoints", {get:function() { + r("public flash.ui.Multitouch::get maxTouchPoints"); return 0; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "mapTouchToMouse", {get:function() { - p("public flash.ui.Multitouch::get mapTouchToMouse"); + Object.defineProperty(d, "mapTouchToMouse", {get:function() { + r("public flash.ui.Multitouch::get mapTouchToMouse"); return!0; }, set:function(a) { - s("public flash.ui.Multitouch::set mapTouchToMouse"); + t("public flash.ui.Multitouch::set mapTouchToMouse"); }, enumerable:!0, configurable:!0}); - c.classInitializer = null; - c.initializer = null; - c.classSymbols = null; - c.instanceSymbols = null; - return c; + d.classInitializer = null; + d.initializer = null; + d.classSymbols = null; + d.instanceSymbols = null; + return d; }(a.ASNative); - h.Multitouch = m; - })(h.ui || (h.ui = {})); + k.Multitouch = h; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - p("public flash.ui.MultitouchInputMode"); + r("public flash.ui.MultitouchInputMode"); } __extends(c, a); c.classInitializer = null; @@ -43440,20 +43542,20 @@ var RtmpJs; c.TOUCH_POINT = "touchPoint"; return c; }(a.ASNative); - h.MultitouchInputMode = s; - })(h.ui || (h.ui = {})); + k.MultitouchInputMode = t; + })(k.ui || (k.ui = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - p("public flash.utils.Endian"); + r("public flash.utils.Endian"); } __extends(c, a); c.classInitializer = null; @@ -43464,25 +43566,25 @@ var RtmpJs; c.LITTLE_ENDIAN = "littleEndian"; return c; }(a.ASNative); - h.Endian = s; - })(h.utils || (h.utils = {})); + k.Endian = t; + })(k.utils || (k.utils = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { (function(a) { (function(v) { - var p = function(p) { - function l(c, h) { + var u = function(t) { + function l(c, d) { a.events.EventDispatcher.instanceConstructorNoInitialize.call(this); this._delay = +c; - this._repeatCount = h | 0; + this._repeatCount = d | 0; this._iteration = 0; } - __extends(l, p); + __extends(l, t); Object.defineProperty(l.prototype, "running", {get:function() { return this._running; }, enumerable:!0, configurable:!0}); @@ -43490,7 +43592,7 @@ var RtmpJs; return this._delay; }, set:function(a) { a = +a; - (0 > a || !isFinite(a)) && throwError("RangeError", c.Errors.DelayRangeError); + (0 > a || !isFinite(a)) && throwError("RangeError", d.Errors.DelayRangeError); this._delay = a; this._running && (this.stop(), this.start()); }, enumerable:!0, configurable:!0}); @@ -43515,7 +43617,23 @@ var RtmpJs; }; l.prototype._tick = function() { this._iteration++; - this._running && (a.utils.Timer.dispatchingEnabled && this.dispatchEvent(new a.events.TimerEvent("timer", !0, !1)), 0 !== this._repeatCount && this._iteration >= this._repeatCount && (this.stop(), this.dispatchEvent(new a.events.TimerEvent(a.events.TimerEvent.TIMER_COMPLETE, !1, !1)))); + if (this._running) { + if (a.utils.Timer.dispatchingEnabled) { + try { + this.dispatchEvent(new a.events.TimerEvent("timer", !0, !1)); + } catch (c) { + console.warn("caught error under Timer TIMER event: ", c); + } + } + if (0 !== this._repeatCount && this._iteration >= this._repeatCount) { + this.stop(); + try { + this.dispatchEvent(new a.events.TimerEvent(a.events.TimerEvent.TIMER_COMPLETE, !1, !1)); + } catch (d) { + console.warn("caught error under Timer COMPLETE event: ", d); + } + } + } }; l.classInitializer = null; l.initializer = null; @@ -43524,20 +43642,20 @@ var RtmpJs; l.dispatchingEnabled = !0; return l; }(a.events.EventDispatcher); - v.Timer = p; + v.Timer = u; })(a.utils || (a.utils = {})); })(a.flash || (a.flash = {})); - })(c.AS || (c.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(d.AS || (d.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = function(a) { - function c(a, e, h, l) { - p("packageInternal flash.utils.SetIntervalTimer"); + (function(k) { + var u = d.Debug.dummyConstructor, t = function(a) { + function c(a, c, d, l) { + u("packageInternal flash.utils.SetIntervalTimer"); } __extends(c, a); c.classInitializer = null; @@ -43546,238 +43664,236 @@ var RtmpJs; c.instanceSymbols = null; return c; }(a.utils.Timer); - h.SetIntervalTimer = u; + k.SetIntervalTimer = t; })(a.utils || (a.utils = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) { - function c(a, e) { - l(e); - s("public flash.xml.XMLNode"); + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = function(a) { + function c(a, d) { + l(d); + t("public flash.xml.XMLNode"); } __extends(c, a); c.escapeXML = function(a) { l(a); - p("public flash.xml.XMLNode::static escapeXML"); + r("public flash.xml.XMLNode::static escapeXML"); }; c.initializer = null; return c; }(a.ASNative); - h.XMLNode = e; - })(h.xml || (h.xml = {})); + k.XMLNode = c; + })(k.xml || (k.xml = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { (function(a) { - (function(h) { - var p = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) { - function c(a) { + (function(k) { + var u = d.Debug.dummyConstructor, t = d.AVM2.Runtime.asCoerceString, l = function(a) { + function d(a) { void 0 === a && (a = null); - u(a); - p("public flash.xml.XMLDocument"); + t(a); + u("public flash.xml.XMLDocument"); } - __extends(c, a); - c.initializer = null; - return c; + __extends(d, a); + d.initializer = null; + return d; }(a.xml.XMLNode); - h.XMLDocument = l; + k.XMLDocument = l; })(a.xml || (a.xml = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.dummyConstructor, s = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.dummyConstructor, t = function(a) { function c() { - p("public flash.xml.XMLNodeType"); + r("public flash.xml.XMLNodeType"); } __extends(c, a); c.initializer = null; return c; }(a.ASNative); - h.XMLNodeType = s; - })(h.xml || (h.xml = {})); + k.XMLNodeType = t; + })(k.xml || (k.xml = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = function(a) { function c() { - s("packageInternal flash.xml.XMLParser"); + t("packageInternal flash.xml.XMLParser"); } __extends(c, a); c.prototype.startParse = function(a, c) { l(a); - p("packageInternal flash.xml.XMLParser::startParse"); + r("packageInternal flash.xml.XMLParser::startParse"); }; c.prototype.getNext = function(a) { - p("packageInternal flash.xml.XMLParser::getNext"); + r("packageInternal flash.xml.XMLParser::getNext"); }; c.initializer = null; return c; }(a.ASNative); - h.XMLParser = e; - })(h.xml || (h.xml = {})); + k.XMLParser = c; + })(k.xml || (k.xml = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - (function(h) { - (function(h) { - var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) { + (function(k) { + (function(k) { + var r = d.Debug.notImplemented, t = d.Debug.dummyConstructor, l = d.AVM2.Runtime.asCoerceString, c = function(a) { function c() { - s("packageInternal flash.xml.XMLTag"); + t("packageInternal flash.xml.XMLTag"); } __extends(c, a); Object.defineProperty(c.prototype, "type", {get:function() { - p("packageInternal flash.xml.XMLTag::get type"); + r("packageInternal flash.xml.XMLTag::get type"); }, set:function(a) { - p("packageInternal flash.xml.XMLTag::set type"); + r("packageInternal flash.xml.XMLTag::set type"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "empty", {get:function() { - p("packageInternal flash.xml.XMLTag::get empty"); + r("packageInternal flash.xml.XMLTag::get empty"); }, set:function(a) { - p("packageInternal flash.xml.XMLTag::set empty"); + r("packageInternal flash.xml.XMLTag::set empty"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "value", {get:function() { - p("packageInternal flash.xml.XMLTag::get value"); + r("packageInternal flash.xml.XMLTag::get value"); }, set:function(a) { l(a); - p("packageInternal flash.xml.XMLTag::set value"); + r("packageInternal flash.xml.XMLTag::set value"); }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "attrs", {get:function() { - p("packageInternal flash.xml.XMLTag::get attrs"); + r("packageInternal flash.xml.XMLTag::get attrs"); }, set:function(a) { - p("packageInternal flash.xml.XMLTag::set attrs"); + r("packageInternal flash.xml.XMLTag::set attrs"); }, enumerable:!0, configurable:!0}); c.initializer = null; return c; }(a.ASNative); - h.XMLTag = e; - })(h.xml || (h.xml = {})); + k.XMLTag = c; + })(k.xml || (k.xml = {})); })(a.flash || (a.flash = {})); - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(a, d, b) { - return{classSimpleName:a, nativeName:d, cls:b}; + function r(a, c, b) { + return{classSimpleName:a, nativeName:c, cls:b}; } - function v(a, d, b) { + function v(a, c, b) { Object.defineProperty(a, b, {get:function() { - k(c.AVM2.Runtime.AVM2.instance, "AVM2 needs to be initialized."); - var e = c.AVM2.Runtime.AVM2.instance.systemDomain.getClass(d); - k(e.instanceConstructor); + var e = d.AVM2.Runtime.AVM2.instance.systemDomain.getClass(c); Object.defineProperty(a, b, {value:e.instanceConstructor, writable:!1}); return a[b]; }, configurable:!0}); } - function p() { - return Date.now() - q.display.Loader.runtimeStartTime; + function u() { + return Date.now() - s.display.Loader.runtimeStartTime; } - function u(a, d) { - null !== a && void 0 !== a || t("TypeError", h.Errors.NullPointerError, "request"); - c.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || t("TypeError", h.Errors.CheckTypeFailedError, a, "flash.net.URLRequest"); + function t(a, c) { + null !== a && void 0 !== a || p("TypeError", k.Errors.NullPointerError, "request"); + d.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || p("TypeError", k.Errors.CheckTypeFailedError, a, "flash.net.URLRequest"); var b = a.url; - c.isNullOrUndefined(b) && t("TypeError", h.Errors.NullPointerError, "url"); - /^fscommand:/i.test(b) ? c.AVM2.Runtime.AVM2.instance.applicationDomain.getProperty(n.fromSimpleName("flash.system.fscommand"), !0, !0).call(null, b.substring(10), d) : c.FileLoadingService.instance.navigateTo(b, d); + d.isNullOrUndefined(b) && p("TypeError", k.Errors.NullPointerError, "url"); + /^fscommand:/i.test(b) ? d.AVM2.Runtime.AVM2.instance.applicationDomain.getProperty(m.fromSimpleName("flash.system.fscommand"), !0, !0).call(null, b.substring(10), c) : d.FileLoadingService.instance.navigateTo(b, c); } function l(a) { - null !== a && void 0 !== a || t("TypeError", h.Errors.NullPointerError, "request"); - c.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || t("TypeError", h.Errors.CheckTypeFailedError, a, "flash.net.URLRequest"); - var d = c.FileLoadingService.instance.createSession(); - d.onprogress = function() { + null !== a && void 0 !== a || p("TypeError", k.Errors.NullPointerError, "request"); + d.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || p("TypeError", k.Errors.CheckTypeFailedError, a, "flash.net.URLRequest"); + var c = d.FileLoadingService.instance.createSession(); + c.onprogress = function() { }; - d.open(a); + c.open(a); } - function e(a, d) { - a || t("TypeError", h.Errors.NullPointerError, "aliasName"); - d || t("TypeError", h.Errors.NullPointerError, "classObject"); - h.aliasesCache.classes.set(d, a); - h.aliasesCache.names[a] = d; + function c(a, c) { + a || p("TypeError", k.Errors.NullPointerError, "aliasName"); + c || p("TypeError", k.Errors.NullPointerError, "classObject"); + k.aliasesCache.classes.set(c, a); + k.aliasesCache.names[a] = c; } - function m(a) { - a || t("TypeError", h.Errors.NullPointerError, "aliasName"); - var d = h.aliasesCache.names[a]; - d || t("ReferenceError", h.Errors.ClassNotFoundError, a); - return d; + function h(a) { + a || p("TypeError", k.Errors.NullPointerError, "aliasName"); + var c = k.aliasesCache.names[a]; + c || p("ReferenceError", k.Errors.ClassNotFoundError, a); + return c; } - var t = c.AVM2.Runtime.throwError, q = c.AVM2.AS.flash, n = c.AVM2.ABC.Multiname, k = c.Debug.assert; - jsGlobal.flash = c.AVM2.AS.flash; - a.linkNatives = function(f) { - [s("flash.display.DisplayObject", "DisplayObjectClass", q.display.DisplayObject), s("flash.display.InteractiveObject", "InteractiveObjectClass", q.display.InteractiveObject), s("flash.display.DisplayObjectContainer", "ContainerClass", q.display.DisplayObjectContainer), s("flash.display.Sprite", "SpriteClass", q.display.Sprite), s("flash.display.MovieClip", "MovieClipClass", q.display.MovieClip), s("flash.display.Shape", "ShapeClass", q.display.Shape), s("flash.display.Bitmap", "BitmapClass", - q.display.Bitmap), s("flash.display.BitmapData", "BitmapDataClass", q.display.BitmapData), s("flash.display.Stage", "StageClass", q.display.Stage), s("flash.display.Loader", "LoaderClass", q.display.Loader), s("flash.display.LoaderInfo", "LoaderInfoClass", q.display.LoaderInfo), s("flash.display.Graphics", "GraphicsClass", q.display.Graphics), s("flash.display.SimpleButton", "SimpleButtonClass", q.display.SimpleButton), s("flash.display.MorphShape", "MorphShapeClass", q.display.MorphShape), - s("flash.display.NativeMenu", "NativeMenuClass", q.display.NativeMenu), s("flash.display.NativeMenuItem", "NativeMenuItemClass", q.display.NativeMenuItem), s("flash.display.FrameLabel", "FrameLabelClass", q.display.FrameLabel), s("flash.display.Scene", "SceneClass", q.display.Scene), s("flash.display.AVM1Movie", "AVM1MovieClass", q.display.AVM1Movie), s("flash.filters.BevelFilter", "BevelFilterClass", q.filters.BevelFilter), s("flash.filters.BitmapFilter", "BitmapFilterClass", q.filters.BitmapFilter), - s("flash.filters.BlurFilter", "BlurFilterClass", q.filters.BlurFilter), s("flash.filters.ColorMatrixFilter", "ColorMatrixFilterClass", q.filters.ColorMatrixFilter), s("flash.filters.ConvolutionFilter", "ConvolutionFilterClass", q.filters.ConvolutionFilter), s("flash.filters.DisplacementMapFilter", "DisplacementMapFilterClass", q.filters.DisplacementMapFilter), s("flash.filters.DropShadowFilter", "DropShadowFilterClass", q.filters.DropShadowFilter), s("flash.filters.GlowFilter", "GlowFilterClass", - q.filters.GlowFilter), s("flash.filters.GradientBevelFilter", "GradientBevelFilterClass", q.filters.GradientBevelFilter), s("flash.filters.GradientGlowFilter", "GradientGlowFilterClass", q.filters.GradientGlowFilter), s("flash.geom.Point", "PointClass", q.geom.Point), s("flash.geom.Rectangle", "RectangleClass", q.geom.Rectangle), s("flash.geom.Matrix", "MatrixClass", q.geom.Matrix), s("flash.geom.Matrix3D", "Matrix3DClass", q.geom.Matrix3D), s("flash.geom.Vector3D", "Vector3DClass", q.geom.Vector3D), - s("flash.geom.Transform", "TransformClass", q.geom.Transform), s("flash.geom.ColorTransform", "ColorTransformClass", q.geom.ColorTransform), s("flash.events.EventDispatcher", "EventDispatcherClass", q.events.EventDispatcher), s("flash.events.Event", "EventClass", q.events.Event), s("flash.events.ErrorEvent", "ErrorEventClass", q.events.ErrorEvent), s("flash.events.IOErrorEvent", "IOErrorEventClass", q.events.IOErrorEvent), s("flash.events.KeyboardEvent", "KeyboardEventClass", q.events.KeyboardEvent), - s("flash.events.MouseEvent", "MouseEventClass", q.events.MouseEvent), s("flash.events.GestureEvent", "GestureEventClass", q.events.GestureEvent), s("flash.events.TextEvent", "TextEventClass", q.events.TextEvent), s("flash.events.TimerEvent", "TimerEventClass", q.events.TimerEvent), s("flash.events.ProgressEvent", "ProgressEventClass", q.events.ProgressEvent), s("flash.events.NetStatusEvent", "NetStatusEventClass", q.events.NetStatusEvent), s("flash.events.HTTPStatusEvent", "HTTPStatusEventClass", - q.events.HTTPStatusEvent), s("flash.external.ExternalInterface", "ExternalInterfaceClass", q.external.ExternalInterface), s("flash.ui.ContextMenu", "ContextMenuClass", q.ui.ContextMenu), s("flash.ui.ContextMenuItem", "ContextMenuItemClass", q.ui.ContextMenuItem), s("flash.ui.ContextMenuBuiltInItems", "ContextMenuBuiltInItemsClass", q.ui.ContextMenuBuiltInItems), s("flash.ui.ContextMenuClipboardItems", "ContextMenuClipboardItemsClass", q.ui.ContextMenuClipboardItems), s("flash.ui.Keyboard", - "KeyboardClass", q.ui.Keyboard), s("flash.ui.Mouse", "MouseClass", q.ui.Mouse), s("flash.ui.MouseCursorData", "MouseCursorDataClass", q.ui.MouseCursorData), s("flash.ui.GameInput", "GameInputClass", q.ui.GameInput), s("flash.events.GameInputEvent", "GameInputEventClass", q.events.GameInputEvent), s("flash.ui.GameInputControl", "GameInputControlClass", q.ui.GameInputControl), s("flash.ui.GameInputControlType", "GameInputControlTypeClass", q.ui.GameInputControlType), s("flash.ui.GameInputDevice", - "GameInputDeviceClass", q.ui.GameInputDevice), s("flash.ui.GameInputFinger", "GameInputFingerClass", q.ui.GameInputFinger), s("flash.ui.GameInputHand", "GameInputHandClass", q.ui.GameInputHand), s("flash.ui.Multitouch", "MultitouchClass", q.ui.Multitouch), s("flash.ui.MultitouchInputMode", "MultitouchInputModeClass", q.ui.MultitouchInputMode), s("flash.events.TouchEvent", "TouchEventClass", q.events.TouchEvent), s("flash.text.Font", "FontClass", q.text.Font), s("flash.text.TextField", "TextFieldClass", - q.text.TextField), s("flash.text.StaticText", "StaticTextClass", q.text.StaticText), s("flash.text.StyleSheet", "StyleSheetClass", q.text.StyleSheet), s("flash.text.TextFormat", "TextFormatClass", q.text.TextFormat), s("flash.text.TextRun", "TextRunClass", q.text.TextRun), s("flash.text.TextLineMetrics"), s("flash.media.Sound", "SoundClass", q.media.Sound), s("flash.media.SoundChannel", "SoundChannelClass", q.media.SoundChannel), s("flash.media.SoundMixer", "SoundMixerClass", q.media.SoundMixer), - s("flash.media.SoundTransform", "SoundTransformClass", q.media.SoundTransform), s("flash.media.Video", "VideoClass", q.media.Video), s("flash.media.StageVideo", "StageVideoClass", q.media.StageVideo), s("flash.media.ID3Info", "ID3InfoClass", q.media.ID3Info), s("flash.media.Microphone", "MicrophoneClass", q.media.Microphone), s("flash.net.FileFilter", "FileFilterClass", q.net.FileFilter), s("flash.net.NetConnection", "NetConnectionClass", q.net.NetConnection), s("flash.net.NetStream", "NetStreamClass", - q.net.NetStream), s("flash.net.Responder", "ResponderClass", q.net.Responder), s("flash.net.URLRequest", "URLRequestClass", q.net.URLRequest), s("flash.net.URLRequestHeader"), s("flash.net.URLStream", "URLStreamClass", q.net.URLStream), s("flash.net.URLLoader", "URLLoaderClass", q.net.URLLoader), s("flash.net.SharedObject", "SharedObjectClass", q.net.SharedObject), s("flash.net.ObjectEncoding", "ObjectEncodingClass", q.net.ObjectEncoding), s("flash.net.LocalConnection", "LocalConnectionClass", - q.net.LocalConnection), s("flash.net.Socket", "SocketClass", q.net.Socket), s("flash.net.URLVariables", "URLVariablesClass", q.net.URLVariables), s("packageInternal flash.system.FSCommand", "FSCommandClass", q.system.FSCommand), s("flash.system.Capabilities", "CapabilitiesClass", q.system.Capabilities), s("flash.system.Security", "SecurityClass", q.system.Security), s("flash.system.SecurityDomain", "SecurityDomainClass", q.system.SecurityDomain), s("flash.system.ApplicationDomain", "ApplicationDomainClass", - q.system.ApplicationDomain), s("flash.system.JPEGLoaderContext", "JPEGLoaderContextClass", q.system.JPEGLoaderContext), s("flash.system.LoaderContext", "LoaderContextClass", q.system.LoaderContext), s("flash.accessibility.Accessibility", "AccessibilityClass", q.accessibility.Accessibility), s("flash.utils.Timer", "TimerClass", q.utils.Timer), s("flash.utils.ByteArray", "ByteArrayClass", q.utils.ByteArray)].forEach(function(d) { - for (var b = n.fromSimpleName(d.classSimpleName).getOriginalName().split("."), e = c.AVM2.AS, f = 0, k = b.length - 1;f < k;f++) { - e[b[f]] || (e[b[f]] = {}), e = e[b[f]]; + var p = d.AVM2.Runtime.throwError, s = d.AVM2.AS.flash, m = d.AVM2.ABC.Multiname; + jsGlobal.flash = d.AVM2.AS.flash; + a.linkNatives = function(g) { + [r("flash.display.DisplayObject", "DisplayObjectClass", s.display.DisplayObject), r("flash.display.InteractiveObject", "InteractiveObjectClass", s.display.InteractiveObject), r("flash.display.DisplayObjectContainer", "ContainerClass", s.display.DisplayObjectContainer), r("flash.display.Sprite", "SpriteClass", s.display.Sprite), r("flash.display.MovieClip", "MovieClipClass", s.display.MovieClip), r("flash.display.Shape", "ShapeClass", s.display.Shape), r("flash.display.Bitmap", "BitmapClass", + s.display.Bitmap), r("flash.display.BitmapData", "BitmapDataClass", s.display.BitmapData), r("flash.display.Stage", "StageClass", s.display.Stage), r("flash.display.Loader", "LoaderClass", s.display.Loader), r("flash.display.LoaderInfo", "LoaderInfoClass", s.display.LoaderInfo), r("flash.display.Graphics", "GraphicsClass", s.display.Graphics), r("flash.display.SimpleButton", "SimpleButtonClass", s.display.SimpleButton), r("flash.display.MorphShape", "MorphShapeClass", s.display.MorphShape), + r("flash.display.NativeMenu", "NativeMenuClass", s.display.NativeMenu), r("flash.display.NativeMenuItem", "NativeMenuItemClass", s.display.NativeMenuItem), r("flash.display.FrameLabel", "FrameLabelClass", s.display.FrameLabel), r("flash.display.Scene", "SceneClass", s.display.Scene), r("flash.display.AVM1Movie", "AVM1MovieClass", s.display.AVM1Movie), r("flash.filters.BevelFilter", "BevelFilterClass", s.filters.BevelFilter), r("flash.filters.BitmapFilter", "BitmapFilterClass", s.filters.BitmapFilter), + r("flash.filters.BlurFilter", "BlurFilterClass", s.filters.BlurFilter), r("flash.filters.ColorMatrixFilter", "ColorMatrixFilterClass", s.filters.ColorMatrixFilter), r("flash.filters.ConvolutionFilter", "ConvolutionFilterClass", s.filters.ConvolutionFilter), r("flash.filters.DisplacementMapFilter", "DisplacementMapFilterClass", s.filters.DisplacementMapFilter), r("flash.filters.DropShadowFilter", "DropShadowFilterClass", s.filters.DropShadowFilter), r("flash.filters.GlowFilter", "GlowFilterClass", + s.filters.GlowFilter), r("flash.filters.GradientBevelFilter", "GradientBevelFilterClass", s.filters.GradientBevelFilter), r("flash.filters.GradientGlowFilter", "GradientGlowFilterClass", s.filters.GradientGlowFilter), r("flash.geom.Point", "PointClass", s.geom.Point), r("flash.geom.Rectangle", "RectangleClass", s.geom.Rectangle), r("flash.geom.Matrix", "MatrixClass", s.geom.Matrix), r("flash.geom.Matrix3D", "Matrix3DClass", s.geom.Matrix3D), r("flash.geom.Vector3D", "Vector3DClass", s.geom.Vector3D), + r("flash.geom.Transform", "TransformClass", s.geom.Transform), r("flash.geom.ColorTransform", "ColorTransformClass", s.geom.ColorTransform), r("flash.events.EventDispatcher", "EventDispatcherClass", s.events.EventDispatcher), r("flash.events.Event", "EventClass", s.events.Event), r("flash.events.ErrorEvent", "ErrorEventClass", s.events.ErrorEvent), r("flash.events.IOErrorEvent", "IOErrorEventClass", s.events.IOErrorEvent), r("flash.events.KeyboardEvent", "KeyboardEventClass", s.events.KeyboardEvent), + r("flash.events.MouseEvent", "MouseEventClass", s.events.MouseEvent), r("flash.events.GestureEvent", "GestureEventClass", s.events.GestureEvent), r("flash.events.TextEvent", "TextEventClass", s.events.TextEvent), r("flash.events.TimerEvent", "TimerEventClass", s.events.TimerEvent), r("flash.events.ProgressEvent", "ProgressEventClass", s.events.ProgressEvent), r("flash.events.NetStatusEvent", "NetStatusEventClass", s.events.NetStatusEvent), r("flash.events.HTTPStatusEvent", "HTTPStatusEventClass", + s.events.HTTPStatusEvent), r("flash.events.UncaughtErrorEvents", "UncaughtErrorEventsClass", s.events.UncaughtErrorEvents), r("flash.external.ExternalInterface", "ExternalInterfaceClass", s.external.ExternalInterface), r("flash.ui.ContextMenu", "ContextMenuClass", s.ui.ContextMenu), r("flash.ui.ContextMenuItem", "ContextMenuItemClass", s.ui.ContextMenuItem), r("flash.ui.ContextMenuBuiltInItems", "ContextMenuBuiltInItemsClass", s.ui.ContextMenuBuiltInItems), r("flash.ui.ContextMenuClipboardItems", + "ContextMenuClipboardItemsClass", s.ui.ContextMenuClipboardItems), r("flash.ui.Keyboard", "KeyboardClass", s.ui.Keyboard), r("flash.ui.Mouse", "MouseClass", s.ui.Mouse), r("flash.ui.MouseCursorData", "MouseCursorDataClass", s.ui.MouseCursorData), r("flash.ui.GameInput", "GameInputClass", s.ui.GameInput), r("flash.events.GameInputEvent", "GameInputEventClass", s.events.GameInputEvent), r("flash.ui.GameInputControl", "GameInputControlClass", s.ui.GameInputControl), r("flash.ui.GameInputControlType", + "GameInputControlTypeClass", s.ui.GameInputControlType), r("flash.ui.GameInputDevice", "GameInputDeviceClass", s.ui.GameInputDevice), r("flash.ui.GameInputFinger", "GameInputFingerClass", s.ui.GameInputFinger), r("flash.ui.GameInputHand", "GameInputHandClass", s.ui.GameInputHand), r("flash.ui.Multitouch", "MultitouchClass", s.ui.Multitouch), r("flash.ui.MultitouchInputMode", "MultitouchInputModeClass", s.ui.MultitouchInputMode), r("flash.events.TouchEvent", "TouchEventClass", s.events.TouchEvent), + r("flash.text.Font", "FontClass", s.text.Font), r("flash.text.TextField", "TextFieldClass", s.text.TextField), r("flash.text.StaticText", "StaticTextClass", s.text.StaticText), r("flash.text.StyleSheet", "StyleSheetClass", s.text.StyleSheet), r("flash.text.TextFormat", "TextFormatClass", s.text.TextFormat), r("flash.text.TextRun", "TextRunClass", s.text.TextRun), r("flash.text.TextLineMetrics"), r("flash.media.Sound", "SoundClass", s.media.Sound), r("flash.media.SoundChannel", "SoundChannelClass", + s.media.SoundChannel), r("flash.media.SoundMixer", "SoundMixerClass", s.media.SoundMixer), r("flash.media.SoundTransform", "SoundTransformClass", s.media.SoundTransform), r("flash.media.Video", "VideoClass", s.media.Video), r("flash.media.StageVideo", "StageVideoClass", s.media.StageVideo), r("flash.media.ID3Info", "ID3InfoClass", s.media.ID3Info), r("flash.media.Microphone", "MicrophoneClass", s.media.Microphone), r("flash.net.FileFilter", "FileFilterClass", s.net.FileFilter), r("flash.net.NetConnection", + "NetConnectionClass", s.net.NetConnection), r("flash.net.NetStream", "NetStreamClass", s.net.NetStream), r("flash.net.Responder", "ResponderClass", s.net.Responder), r("flash.net.URLRequest", "URLRequestClass", s.net.URLRequest), r("flash.net.URLRequestHeader"), r("flash.net.URLStream", "URLStreamClass", s.net.URLStream), r("flash.net.URLLoader", "URLLoaderClass", s.net.URLLoader), r("flash.net.SharedObject", "SharedObjectClass", s.net.SharedObject), r("flash.net.ObjectEncoding", "ObjectEncodingClass", + s.net.ObjectEncoding), r("flash.net.LocalConnection", "LocalConnectionClass", s.net.LocalConnection), r("flash.net.Socket", "SocketClass", s.net.Socket), r("flash.net.URLVariables", "URLVariablesClass", s.net.URLVariables), r("packageInternal flash.system.FSCommand", "FSCommandClass", s.system.FSCommand), r("flash.system.Capabilities", "CapabilitiesClass", s.system.Capabilities), r("flash.system.Security", "SecurityClass", s.system.Security), r("flash.system.SecurityDomain", "SecurityDomainClass", + s.system.SecurityDomain), r("flash.system.ApplicationDomain", "ApplicationDomainClass", s.system.ApplicationDomain), r("flash.system.JPEGLoaderContext", "JPEGLoaderContextClass", s.system.JPEGLoaderContext), r("flash.system.LoaderContext", "LoaderContextClass", s.system.LoaderContext), r("flash.accessibility.Accessibility", "AccessibilityClass", s.accessibility.Accessibility), r("flash.utils.Timer", "TimerClass", s.utils.Timer), r("flash.utils.ByteArray", "ByteArrayClass", s.utils.ByteArray)].forEach(function(c) { + for (var b = m.fromSimpleName(c.classSimpleName).getOriginalName().split("."), e = d.AVM2.AS, g = 0, l = b.length - 1;g < l;g++) { + e[b[g]] || (e[b[g]] = {}), e = e[b[g]]; } - v(e, d.classSimpleName, b[b.length - 1]); - a.registerNativeClass(d.nativeName, d.cls); + v(e, c.classSimpleName, b[b.length - 1]); + a.registerNativeClass(c.nativeName, c.cls); }); - a.registerNativeFunction("FlashUtilScript::getDefinitionByName", c.AVM2.AS.Natives.getDefinitionByName); - a.registerNativeFunction("FlashUtilScript::getTimer", p); + a.registerNativeFunction("FlashUtilScript::getDefinitionByName", d.AVM2.AS.Natives.getDefinitionByName); + a.registerNativeFunction("FlashUtilScript::getTimer", u); a.registerNativeFunction("FlashUtilScript::escapeMultiByte", escape); a.registerNativeFunction("FlashUtilScript::unescapeMultiByte", unescape); - a.registerNativeFunction("FlashNetScript::navigateToURL", u); + a.registerNativeFunction("FlashNetScript::navigateToURL", t); a.registerNativeFunction("FlashNetScript::sendToURL", l); - a.registerNativeFunction("Toplevel::registerClassAlias", e); - a.registerNativeFunction("Toplevel::getClassByAlias", m); + a.registerNativeFunction("Toplevel::registerClassAlias", c); + a.registerNativeFunction("Toplevel::getClassByAlias", h); }; - a.FlashUtilScript_getTimer = p; - a.FlashNetScript_navigateToURL = u; - })(h.AS || (h.AS = {})); - })(c.AVM2 || (c.AVM2 = {})); + a.FlashUtilScript_getTimer = u; + a.FlashNetScript_navigateToURL = t; + })(k.AS || (k.AS = {})); + })(d.AVM2 || (d.AVM2 = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load Flash TS Dependencies"); console.time("Load AVM1 Dependencies"); -(function(c) { - (function(c) { +(function(d) { + (function(d) { var a = function() { - function a(c, h) { - this.array = c; + function a(d, k) { + this.array = d; this.position = 0; - this.end = c.length; - this.readANSI = 6 > h; - var s = new ArrayBuffer(4); - (new Int32Array(s))[0] = 1; - if (!(new Uint8Array(s))[0]) { + this.end = d.length; + this.readANSI = 6 > k; + var r = new ArrayBuffer(4); + (new Int32Array(r))[0] = 1; + if (!(new Uint8Array(r))[0]) { throw Error("big-endian platform"); } } @@ -43785,76 +43901,76 @@ console.time("Load AVM1 Dependencies"); return this.array[this.position++]; }; a.prototype.readUI16 = function() { - var a = this.position, c = this.array, c = c[a + 1] << 8 | c[a]; + var a = this.position, d = this.array, d = d[a + 1] << 8 | d[a]; this.position = a + 2; - return c; + return d; }; a.prototype.readSI16 = function() { - var a = this.position, c = this.array, c = c[a + 1] << 8 | c[a]; + var a = this.position, d = this.array, d = d[a + 1] << 8 | d[a]; this.position = a + 2; - return 32768 > c ? c : c - 65536; + return 32768 > d ? d : d - 65536; }; a.prototype.readInteger = function() { - var a = this.position, c = this.array, c = c[a] | c[a + 1] << 8 | c[a + 2] << 16 | c[a + 3] << 24; + var a = this.position, d = this.array, d = d[a] | d[a + 1] << 8 | d[a + 2] << 16 | d[a + 3] << 24; this.position = a + 4; - return c; + return d; }; a.prototype.readFloat = function() { - var a = this.position, c = this.array, h = new ArrayBuffer(4), l = new Uint8Array(h); - l[0] = c[a]; - l[1] = c[a + 1]; - l[2] = c[a + 2]; - l[3] = c[a + 3]; + var a = this.position, d = this.array, k = new ArrayBuffer(4), l = new Uint8Array(k); + l[0] = d[a]; + l[1] = d[a + 1]; + l[2] = d[a + 2]; + l[3] = d[a + 3]; this.position = a + 4; - return(new Float32Array(h))[0]; + return(new Float32Array(k))[0]; }; a.prototype.readDouble = function() { - var a = this.position, c = this.array, h = new ArrayBuffer(8), l = new Uint8Array(h); - l[4] = c[a]; - l[5] = c[a + 1]; - l[6] = c[a + 2]; - l[7] = c[a + 3]; - l[0] = c[a + 4]; - l[1] = c[a + 5]; - l[2] = c[a + 6]; - l[3] = c[a + 7]; + var a = this.position, d = this.array, k = new ArrayBuffer(8), l = new Uint8Array(k); + l[4] = d[a]; + l[5] = d[a + 1]; + l[6] = d[a + 2]; + l[7] = d[a + 3]; + l[0] = d[a + 4]; + l[1] = d[a + 5]; + l[2] = d[a + 6]; + l[3] = d[a + 7]; this.position = a + 8; - return(new Float64Array(h))[0]; + return(new Float64Array(k))[0]; }; a.prototype.readBoolean = function() { return!!this.readUI8(); }; a.prototype.readANSIString = function() { - for (var a = "", c;c = this.readUI8();) { - a += String.fromCharCode(c); + for (var a = "", d;d = this.readUI8();) { + a += String.fromCharCode(d); } return a; }; a.prototype.readUTF8String = function() { - for (var a = "", c;c = this.readUI8();) { - if (128 > c) { - a += String.fromCharCode(c); + for (var a = "", d;d = this.readUI8();) { + if (128 > d) { + a += String.fromCharCode(d); } else { - if (128 === (c & 192)) { - a += String.fromCharCode(c); + if (128 === (d & 192)) { + a += String.fromCharCode(d); } else { - var h = this.position - 1, l = 192, e = 5; + var k = this.position - 1, l = 192, c = 5; do { - var m = l >> 1 | 128; - if ((c & m) === l) { + var h = l >> 1 | 128; + if ((d & h) === l) { break; } - l = m; - --e; - } while (0 <= e); - l = c & (1 << e) - 1; - for (m = 5;m >= e;--m) { - if (c = this.readUI8(), 128 !== (c & 192)) { - for (c = this.position - 1, this.position = h;this.position < c;) { + l = h; + --c; + } while (0 <= c); + l = d & (1 << c) - 1; + for (h = 5;h >= c;--h) { + if (d = this.readUI8(), 128 !== (d & 192)) { + for (d = this.position - 1, this.position = k;this.position < d;) { a += String.fromCharCode(this.readUI8()); } } else { - l = l << 6 | c & 63; + l = l << 6 | d & 63; } } a = 65536 <= l ? a + String.fromCharCode(l - 65536 >> 10 & 1023 | 55296, l & 1023 | 56320) : a + String.fromCharCode(l); @@ -43867,20 +43983,20 @@ console.time("Load AVM1 Dependencies"); return this.readANSI ? this.readANSIString() : this.readUTF8String(); }; a.prototype.readBytes = function(a) { - var c = this.position, h = Math.max(this.end - c, 0); - h < a && (a = h); - h = this.array.subarray(c, c + a); - this.position = c + a; - return h; + var d = this.position, k = Math.max(this.end - d, 0); + k < a && (a = k); + k = this.array.subarray(d, d + a); + this.position = d + a; + return k; }; return a; }(); - c.ActionsDataStream = a; - })(c.AVM1 || (c.AVM1 = {})); + d.ActionsDataStream = a; + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = c.AVM1.ActionsDataStream; +(function(d) { + (function(k) { + var a = d.AVM1.ActionsDataStream; (function(a) { a[a.None = 0] = "None"; a[a.ActionGotoFrame = 129] = "ActionGotoFrame"; @@ -43984,19 +44100,19 @@ console.time("Load AVM1 Dependencies"); a[a.ActionThrow = 42] = "ActionThrow"; a[a.ActionFSCommand2 = 45] = "ActionFSCommand2"; a[a.ActionStrictMode = 137] = "ActionStrictMode"; - })(h.ActionCode || (h.ActionCode = {})); - var s = function() { + })(k.ActionCode || (k.ActionCode = {})); + var r = function() { return function(a) { this.registerNumber = a; }; }(); - h.ParsedPushRegisterAction = s; + k.ParsedPushRegisterAction = r; var v = function() { return function(a) { this.constantIndex = a; }; }(); - h.ParsedPushConstantAction = v; + k.ParsedPushConstantAction = v; (function(a) { a[a.None = 0] = "None"; a[a.Argument = 1] = "Argument"; @@ -44006,304 +44122,302 @@ console.time("Load AVM1 Dependencies"); a[a.Global = 16] = "Global"; a[a.Parent = 32] = "Parent"; a[a.Root = 64] = "Root"; - })(h.ArgumentAssignmentType || (h.ArgumentAssignmentType = {})); - var p = function() { - function c(e, h) { - this._actionsData = e; - this.dataId = e.id; - this._stream = new a(e.bytes, h); + })(k.ArgumentAssignmentType || (k.ArgumentAssignmentType = {})); + var u = function() { + function d(c, h) { + this._actionsData = c; + this.dataId = c.id; + this._stream = new a(c.bytes, h); } - Object.defineProperty(c.prototype, "position", {get:function() { + Object.defineProperty(d.prototype, "position", {get:function() { return this._stream.position; }, set:function(a) { this._stream.position = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "eof", {get:function() { + Object.defineProperty(d.prototype, "eof", {get:function() { return this._stream.position >= this._stream.end; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "length", {get:function() { + Object.defineProperty(d.prototype, "length", {get:function() { return this._stream.end; }, enumerable:!0, configurable:!0}); - c.prototype.readNext = function() { - var a = this._stream, c = a.position, l = a.readUI8(), p = 128 <= l ? a.readUI16() : 0, p = a.position + p, n = null; + d.prototype.readNext = function() { + var a = this._stream, d = a.position, l = a.readUI8(), s = 128 <= l ? a.readUI16() : 0, s = a.position + s, m = null; switch(l | 0) { case 129: - var k = a.readUI16(), n = a.readUI8(), f = !1; - 6 !== n && 7 !== n ? a.position-- : (p++, f = 6 === n); - n = [k, f]; + var g = a.readUI16(), m = a.readUI8(), f = !1; + 6 !== m && 7 !== m ? a.position-- : (s++, f = 6 === m); + m = [g, f]; break; case 131: - k = a.readString(); - n = a.readString(); - n = [k, n]; + g = a.readString(); + m = a.readString(); + m = [g, m]; break; case 138: - var k = a.readUI16(), d = a.readUI8(), n = [k, d]; + var g = a.readUI16(), b = a.readUI8(), m = [g, b]; break; case 139: - n = [a.readString()]; + m = [a.readString()]; break; case 140: - k = a.readString(); - n = a.readUI8(); + g = a.readString(); + m = a.readUI8(); f = !1; - 6 !== n && 7 !== n ? a.position-- : (p++, f = 6 === n); - n = [k, f]; + 6 !== m && 7 !== m ? a.position-- : (s++, f = 6 === m); + m = [g, f]; break; case 150: - for (n = [];a.position < p;) { - k = a.readUI8(); - switch(k | 0) { + for (m = [];a.position < s;) { + g = a.readUI8(); + switch(g | 0) { case 0: - k = a.readString(); + g = a.readString(); break; case 1: - k = a.readFloat(); + g = a.readFloat(); break; case 2: - k = null; + g = null; break; case 3: - k = void 0; + g = void 0; break; case 4: - k = new s(a.readUI8()); + g = new r(a.readUI8()); break; case 5: - k = a.readBoolean(); + g = a.readBoolean(); break; case 6: - k = a.readDouble(); + g = a.readDouble(); break; case 7: - k = a.readInteger(); + g = a.readInteger(); break; case 8: - k = new v(a.readUI8()); + g = new v(a.readUI8()); break; case 9: - k = new v(a.readUI16()); + g = new v(a.readUI16()); break; default: - console.error("Unknown value type: " + k); - a.position = p; + console.error("Unknown value type: " + g); + a.position = s; continue; } - n.push(k); + m.push(g); } break; case 153: - k = a.readSI16(); - n = [k]; + g = a.readSI16(); + m = [g]; break; case 157: - k = a.readSI16(); - n = [k]; + g = a.readSI16(); + m = [g]; break; case 154: - k = a.readUI8(); - n = [k]; + g = a.readUI8(); + m = [g]; break; case 159: - k = a.readUI8(); - n = [k]; - k & 2 && n.push(a.readUI16()); + g = a.readUI8(); + m = [g]; + g & 2 && m.push(a.readUI16()); break; case 141: - d = a.readUI8(); - n = [d]; + b = a.readUI8(); + m = [b]; break; case 136: - for (var d = a.readUI16(), k = [], b = 0;b < d;b++) { - k.push(a.readString()); + for (var b = a.readUI16(), g = [], e = 0;e < b;e++) { + g.push(a.readString()); } - n = [k]; + m = [g]; break; case 155: - n = a.readString(); - d = a.readUI16(); + m = a.readString(); + b = a.readUI16(); f = []; - for (b = 0;b < d;b++) { + for (e = 0;e < b;e++) { f.push(a.readString()); } - k = a.readUI16(); - p += k; - k = new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_f" + a.position, this._actionsData); - n = [k, n, f]; + g = a.readUI16(); + s += g; + g = new k.AVM1ActionsData(a.readBytes(g), this.dataId + "_f" + a.position, this._actionsData); + m = [g, m, f]; break; case 148: - k = a.readUI16(); - p += k; - n = [new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_w" + a.position, this._actionsData)]; + g = a.readUI16(); + s += g; + m = [new k.AVM1ActionsData(a.readBytes(g), this.dataId + "_w" + a.position, this._actionsData)]; break; case 135: - var g = a.readUI8(), n = [g]; + var q = a.readUI8(), m = [q]; break; case 142: - for (var n = a.readString(), d = a.readUI16(), r = a.readUI8(), k = a.readUI16(), w = [], f = [], b = 0;b < d;b++) { - var g = a.readUI8(), z = a.readString(); - f.push(z); - g && (w[g] = {type:1, name:z, index:b}); + for (var m = a.readString(), b = a.readUI16(), n = a.readUI8(), g = a.readUI16(), u = [], f = [], e = 0;e < b;e++) { + var q = a.readUI8(), L = a.readString(); + f.push(L); + q && (u[q] = {type:1, name:L, index:e}); } - d = 1; - k & 1 && (w[d++] = {type:2}); - k & 4 && (w[d++] = {type:4}); - k & 16 && (w[d++] = {type:8}); - k & 64 && (w[d++] = {type:64}); - k & 128 && (w[d++] = {type:32}); - k & 256 && (w[d++] = {type:16}); - d = 0; - k & 2 && (d |= 2); - k & 8 && (d |= 4); - k & 32 && (d |= 8); - k = a.readUI16(); - p += k; - k = new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_f" + a.position, this._actionsData); - n = [k, n, f, r, w, d]; + b = 1; + g & 1 && (u[b++] = {type:2}); + g & 4 && (u[b++] = {type:4}); + g & 16 && (u[b++] = {type:8}); + g & 64 && (u[b++] = {type:64}); + g & 128 && (u[b++] = {type:32}); + g & 256 && (u[b++] = {type:16}); + b = 0; + g & 2 && (b |= 2); + g & 8 && (b |= 4); + g & 32 && (b |= 8); + g = a.readUI16(); + s += g; + g = new k.AVM1ActionsData(a.readBytes(g), this.dataId + "_f" + a.position, this._actionsData); + m = [g, m, f, n, u, b]; break; case 143: - k = a.readUI8(); - n = !!(k & 4); - f = !!(k & 2); - k = !!(k & 1); - d = a.readUI16(); + g = a.readUI8(); + m = !!(g & 4); + f = !!(g & 2); + g = !!(g & 1); b = a.readUI16(); - w = a.readUI16(); - r = n ? a.readUI8() : a.readString(); - p += d + b + w; - d = new h.AVM1ActionsData(a.readBytes(d), this.dataId + "_t" + a.position, this._actionsData); - b = new h.AVM1ActionsData(a.readBytes(b), this.dataId + "_c" + a.position, this._actionsData); - w = new h.AVM1ActionsData(a.readBytes(w), this.dataId + "_z" + a.position, this._actionsData); - n = [n, r, d, k, b, f, w]; + e = a.readUI16(); + u = a.readUI16(); + n = m ? a.readUI8() : a.readString(); + s += b + e + u; + b = new k.AVM1ActionsData(a.readBytes(b), this.dataId + "_t" + a.position, this._actionsData); + e = new k.AVM1ActionsData(a.readBytes(e), this.dataId + "_c" + a.position, this._actionsData); + u = new k.AVM1ActionsData(a.readBytes(u), this.dataId + "_z" + a.position, this._actionsData); + m = [m, n, b, g, e, f, u]; break; case 137: - n = [a.readUI8()]; + m = [a.readUI8()]; } - a.position = p; - return{position:c, actionCode:l, actionName:u[l], args:n}; + a.position = s; + return{position:d, actionCode:l, actionName:t[l], args:m}; }; - c.prototype.skip = function(a) { - for (var c = this._stream;0 < a && c.position < c.end;) { - var h = 128 <= c.readUI8() ? c.readUI16() : 0; - c.position += h; + d.prototype.skip = function(a) { + for (var d = this._stream;0 < a && d.position < d.end;) { + var k = 128 <= d.readUI8() ? d.readUI16() : 0; + d.position += k; a--; } }; - return c; + return d; }(); - h.ActionsDataParser = p; - var u = {0:"EOA", 4:"ActionNextFrame", 5:"ActionPreviousFrame", 6:"ActionPlay", 7:"ActionStop", 8:"ActionToggleQuality", 9:"ActionStopSounds", 10:"ActionAdd", 11:"ActionSubtract", 12:"ActionMultiply", 13:"ActionDivide", 14:"ActionEquals", 15:"ActionLess", 16:"ActionAnd", 17:"ActionOr", 18:"ActionNot", 19:"ActionStringEquals", 20:"ActionStringLength", 21:"ActionStringExtract", 23:"ActionPop", 24:"ActionToInteger", 28:"ActionGetVariable", 29:"ActionSetVariable", 32:"ActionSetTarget2", 33:"ActionStringAdd", + k.ActionsDataParser = u; + var t = {0:"EOA", 4:"ActionNextFrame", 5:"ActionPreviousFrame", 6:"ActionPlay", 7:"ActionStop", 8:"ActionToggleQuality", 9:"ActionStopSounds", 10:"ActionAdd", 11:"ActionSubtract", 12:"ActionMultiply", 13:"ActionDivide", 14:"ActionEquals", 15:"ActionLess", 16:"ActionAnd", 17:"ActionOr", 18:"ActionNot", 19:"ActionStringEquals", 20:"ActionStringLength", 21:"ActionStringExtract", 23:"ActionPop", 24:"ActionToInteger", 28:"ActionGetVariable", 29:"ActionSetVariable", 32:"ActionSetTarget2", 33:"ActionStringAdd", 34:"ActionGetProperty", 35:"ActionSetProperty", 36:"ActionCloneSprite", 37:"ActionRemoveSprite", 38:"ActionTrace", 39:"ActionStartDrag", 40:"ActionEndDrag", 41:"ActionStringLess", 42:"ActionThrow", 43:"ActionCastOp", 44:"ActionImplementsOp", 45:"ActionFSCommand2", 48:"ActionRandomNumber", 49:"ActionMBStringLength", 50:"ActionCharToAscii", 51:"ActionAsciiToChar", 52:"ActionGetTime", 53:"ActionMBStringExtract", 54:"ActionMBCharToAscii", 55:"ActionMBAsciiToChar", 58:"ActionDelete", 59:"ActionDelete2", 60:"ActionDefineLocal", 61:"ActionCallFunction", 62:"ActionReturn", 63:"ActionModulo", 64:"ActionNewObject", 65:"ActionDefineLocal2", 66:"ActionInitArray", 67:"ActionInitObject", 68:"ActionTypeOf", 69:"ActionTargetPath", 70:"ActionEnumerate", 71:"ActionAdd2", 72:"ActionLess2", 73:"ActionEquals2", 74:"ActionToNumber", 75:"ActionToString", 76:"ActionPushDuplicate", 77:"ActionStackSwap", 78:"ActionGetMember", 79:"ActionSetMember", 80:"ActionIncrement", 81:"ActionDecrement", 82:"ActionCallMethod", 83:"ActionNewMethod", 84:"ActionInstanceOf", 85:"ActionEnumerate2", 96:"ActionBitAnd", 97:"ActionBitOr", 98:"ActionBitXor", 99:"ActionBitLShift", 100:"ActionBitRShift", 101:"ActionBitURShift", 102:"ActionStrictEquals", 103:"ActionGreater", 104:"ActionStringGreater", 105:"ActionExtends", 129:"ActionGotoFrame", 131:"ActionGetURL", 135:"ActionStoreRegister", 136:"ActionConstantPool", 137:"ActionStrictMode", 138:"ActionWaitForFrame", 139:"ActionSetTarget", 140:"ActionGoToLabel", 141:"ActionWaitForFrame2", 142:"ActionDefineFunction2", 143:"ActionTry", 148:"ActionWith", 150:"ActionPush", 153:"ActionJump", 154:"ActionGetURL2", 155:"ActionDefineFunction", 157:"ActionIf", 158:"ActionCall", 159:"ActionGotoFrame2"}; - })(c.AVM1 || (c.AVM1 = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { var a = function() { function a() { this.parentResults = null; this.registersLimit = 0; } a.prototype.analyze = function(a) { - for (var c = [], h = [0], l = [!0], e = !1, m = null, s = [0];0 < s.length;) { - var q = s.shift(); - if (!c[q]) { - for (a.position = q;!a.eof && !c[q];) { - var n = a.readNext(); - if (0 === n.actionCode) { + for (var d = [], k = [0], l = [!0], c = !1, h = null, p = [0];0 < p.length;) { + var r = p.shift(); + if (!d[r]) { + for (a.position = r;!a.eof && !d[r];) { + var m = a.readNext(); + if (0 === m.actionCode) { break; } - var k = a.position, f = {action:n, next:k, conditionalJumpTo:-1}, d = 0, b = !1, g = !1; - switch(n.actionCode) { + var g = a.position, f = {action:m, next:g, conditionalJumpTo:-1}, b = 0, e = !1, q = !1; + switch(m.actionCode) { case 138: ; case 141: - b = !0; - a.skip(138 === n.actionCode ? n.args[1] : n.args[0]); - d = a.position; - a.position = k; + e = !0; + a.skip(138 === m.actionCode ? m.args[1] : m.args[0]); + b = a.position; + a.position = g; break; case 153: - b = g = !0; - d = k + n.args[0]; + e = q = !0; + b = g + m.args[0]; break; case 157: - b = !0; - d = k + n.args[0]; + e = !0; + b = g + m.args[0]; break; case 42: ; case 62: ; case 0: - b = g = !0; - d = a.length; + e = q = !0; + b = a.length; break; case 136: - if (e) { - m = null; + if (c) { + h = null; break; } - e = !0; - 0 === q && (m = n.args[0]); + c = !0; + 0 === r && (h = m.args[0]); } - if (b) { - if (0 > d || d > a.length) { - console.error("jump outside the action block;"), d = a.length; + if (e) { + if (0 > b || b > a.length) { + console.error("jump outside the action block;"), b = a.length; } - g ? f.next = d : f.conditionalJumpTo = d; - l[d] || (h.push(d), s.push(d), l[d] = !0); + q ? f.next = b : f.conditionalJumpTo = b; + l[b] || (k.push(b), p.push(b), l[b] = !0); } - c[q] = f; - if (g) { + d[r] = f; + if (q) { break; } - q = k; + r = g; } } } - var r = []; - h.forEach(function(a) { - if (c[a]) { - var b = [], d = a; + var n = []; + k.forEach(function(a) { + if (d[a]) { + var b = [], e = a; do { - d = c[d], b.push(d), d = d.next; - } while (!l[d] && c[d]); - r.push({label:a, items:b, jump:d}); + e = d[e], b.push(e), e = e.next; + } while (!l[e] && d[e]); + n.push({label:a, items:b, jump:e}); } }); - h = null; - e ? h = m : this.parentResults && (h = this.parentResults.singleConstantPool); - return{actions:c, blocks:r, dataId:a.dataId, singleConstantPool:h, registersLimit:this.registersLimit}; + k = null; + c ? k = h : this.parentResults && (k = this.parentResults.singleConstantPool); + return{actions:d, blocks:n, dataId:a.dataId, singleConstantPool:k, registersLimit:this.registersLimit}; }; return a; }(); - c.ActionsDataAnalyzer = a; - })(c.AVM1 || (c.AVM1 = {})); + d.ActionsDataAnalyzer = a; + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = c.Debug.assert; - h.AVM1ActionsData = function() { - return function(c, h, s) { - void 0 === s && (s = null); - this.bytes = c; - this.id = h; - this.parent = s; - a(c instanceof Uint8Array); +(function(d) { + (function(d) { + d.AVM1ActionsData = function() { + return function(a, d, k) { + void 0 === k && (k = null); + this.bytes = a; + this.id = d; + this.parent = k; }; }(); - var s = function() { + var a = function() { function a() { this.globals = this.root = null; } a.prototype.flushPendingScripts = function() { }; - a.prototype.addAsset = function(a, c, h) { + a.prototype.addAsset = function(a, d, k) { }; - a.prototype.registerClass = function(a, c) { + a.prototype.registerClass = function(a, d) { }; a.prototype.getAsset = function(a) { }; @@ -44313,59 +44427,59 @@ console.time("Load AVM1 Dependencies"); }; a.prototype.addToPendingScripts = function(a) { }; - a.prototype.registerEventPropertyObserver = function(a, c) { + a.prototype.registerEventPropertyObserver = function(a, d) { }; - a.prototype.unregisterEventPropertyObserver = function(a, c) { + a.prototype.unregisterEventPropertyObserver = function(a, d) { }; - a.prototype.enterContext = function(a, c) { + a.prototype.enterContext = function(a, d) { }; - a.prototype.executeActions = function(a, c) { + a.prototype.executeActions = function(a, d) { }; a.instance = null; return a; }(); - h.AVM1Context = s; - })(c.AVM1 || (c.AVM1 = {})); + d.AVM1Context = a; + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { - function a(a, b, d, c, e) { - if (h.avm1ErrorsEnabled.value) { +(function(d) { + (function(k) { + function a(a, b, e, c, d) { + if (k.avm1ErrorsEnabled.value) { try { throw Error(a); - } catch (g) { + } catch (f) { } } console.warn.apply(console, arguments); } - function s(a) { + function r(a) { if (null === a) { return "null"; } var b = typeof a; - return "function" === b ? "object" : "object" === b && "object" === typeof a && a && a instanceof h.Lib.AVM1MovieClip ? "movieclip" : b; + return "function" === b ? "object" : "object" === b && "object" === typeof a && a && a instanceof k.Lib.AVM1MovieClip ? "movieclip" : b; } function v(a) { - return "object" !== s(a) ? a : a.valueOf(); + return "object" !== r(a) ? a : a.valueOf(); } - function p() { - return h.AVM1Context.instance.loaderInfo.swfVersion; + function u() { + return k.AVM1Context.instance.loaderInfo.swfVersion; } - function u(a) { - return "object" !== s(a) ? a : a instanceof Date && 6 <= p() ? a.toString() : a.valueOf(); + function t(a) { + return "object" !== r(a) ? a : a instanceof Date && 6 <= u() ? a.toString() : a.valueOf(); } function l(a) { - switch(s(a)) { + switch(r(a)) { default: ; case "undefined": @@ -44384,31 +44498,31 @@ __extends = this.__extends || function(c, h) { return!0; } } - function e(a) { + function c(a) { a = v(a); - switch(s(a)) { + switch(r(a)) { case "undefined": ; case "null": - return 7 <= p() ? NaN : 0; + return 7 <= u() ? NaN : 0; case "boolean": return a ? 1 : 0; case "number": return a; case "string": - return "" === a && 5 > p() ? 0 : +a; + return "" === a && 5 > u() ? 0 : +a; default: - return 5 <= p() ? NaN : 0; + return 5 <= u() ? NaN : 0; } } - function m(a) { - a = e(a); + function h(a) { + a = c(a); return isNaN(a) || !isFinite(a) || 0 === a ? 0 : a | 0; } - function t(a) { - switch(s(a)) { + function p(a) { + switch(r(a)) { case "undefined": - return 7 <= p() ? "undefined" : ""; + return 7 <= u() ? "undefined" : ""; case "null": return "null"; case "boolean": @@ -44420,205 +44534,205 @@ __extends = this.__extends || function(c, h) { case "movieclip": return a.__targetPath; case "object": - if ("function" === typeof a && a.asGetPublicProperty("toString") === c.AVM2.AS.ASFunction.traitsPrototype.asGetPublicProperty("toString")) { + if ("function" === typeof a && a.asGetPublicProperty("toString") === d.AVM2.AS.ASFunction.traitsPrototype.asGetPublicProperty("toString")) { return "[type Function]"; } var b = a.asCallPublicProperty("toString", null); return "string" === typeof b ? b : "function" === typeof a ? "[type Function]" : "[type Object]"; } } - function q(a, b) { - var d = v(a), c = v(b); - if ("string" !== typeof d || "string" !== typeof c) { - return d = e(d), c = e(c), isNaN(d) || isNaN(c) ? void 0 : d < c; + function s(a, b) { + var e = v(a), d = v(b); + if ("string" !== typeof e || "string" !== typeof d) { + return e = c(e), d = c(d), isNaN(e) || isNaN(d) ? void 0 : e < d; } } - function n(a, b) { - if (c.isNullOrUndefined(a) || c.isNullOrUndefined(b)) { + function m(a, b) { + if (d.isNullOrUndefined(a) || d.isNullOrUndefined(b)) { return!1; } - if (b === c.AVM2.AS.ASString) { + if (b === d.AVM2.AS.ASString) { return "string" === typeof a; } - if (b === c.AVM2.AS.ASNumber) { + if (b === d.AVM2.AS.ASNumber) { return "number" === typeof a; } - if (b === c.AVM2.AS.ASBoolean) { + if (b === d.AVM2.AS.ASBoolean) { return "boolean" === typeof a; } - if (b === c.AVM2.AS.ASArray) { + if (b === d.AVM2.AS.ASArray) { return Array.isArray(a); } - if (b === c.AVM2.AS.ASFunction) { + if (b === d.AVM2.AS.ASFunction) { return "function" === typeof a; } - if (b === c.AVM2.AS.ASObject) { + if (b === d.AVM2.AS.ASObject) { return "object" === typeof a; } - var d = b.asGetPublicProperty("prototype"); - if (!d) { + var e = b.asGetPublicProperty("prototype"); + if (!e) { return!1; } - for (var e = a;e;) { - if (e === d) { + for (var c = a;c;) { + if (c === e) { return!0; } - e = e.asGetPublicProperty("__proto__"); + c = c.asGetPublicProperty("__proto__"); } return!1; } - function k(a, b, d) { + function g(a, b, e) { var c = Object.create(null); do { - Yb(a, function(e) { - c[e] || (b.call(d, a, e), c[e] = !0); + Xb(a, function(d) { + c[d] || (b.call(e, a, d), c[d] = !0); }), a = a.asGetPublicProperty("__proto__"); } while (a); } function f(a, b) { do { if (a.asHasProperty(void 0, b, 0)) { - return sa.link = a, sa.name = b, sa; + return oa.link = a, oa.name = b, oa; } a = a.asGetPublicProperty("__proto__"); } while (a); return null; } - function d(b, d, e) { - if (c.isNullOrUndefined(b)) { - return a("AVM1 warning: cannot look up member '" + d + "' on undefined object"), null; + function b(b, e, c) { + if (d.isNullOrUndefined(b)) { + return a("AVM1 warning: cannot look up member '" + e + "' on undefined object"), null; } - var g; + var k; b = Object(b); - if (null !== (g = f(b, d))) { - return g; + if (null !== (k = f(b, e))) { + return k; } - if (Zb(d) || 6 < p()) { - return e ? (sa.link = b, sa.name = d, sa) : null; + if (Yb(e) || 6 < u()) { + return c ? (oa.link = b, oa.name = e, oa) : null; } - var h = d.toLowerCase(); - if (null !== (g = f(b, h))) { - return g; + var h = e.toLowerCase(); + if (null !== (k = f(b, h))) { + return k; } - null === Ka && (Ka = Object.create(null), $b.forEach(function(a) { - Ka[a.toLowerCase()] = a; + null === Ga && (Ga = Object.create(null), Zb.forEach(function(a) { + Ga[a.toLowerCase()] = a; })); - var l = Ka[h] || null; - if (l && null !== (g = f(b, l))) { - return g; + var l = Ga[h] || null; + if (l && null !== (k = f(b, l))) { + return k; } - var m = null, r = null; - k(b, function(a, b) { - null === m && b.toLowerCase() === h && (r = a, m = b); + var n = null, q = null; + g(b, function(a, b) { + null === n && b.toLowerCase() === h && (q = a, n = b); }, null); - return m ? (sa.link = r, sa.name = m, sa) : e ? (sa.link = b, sa.name = l || d, sa) : null; + return n ? (oa.link = q, oa.name = n, oa) : c ? (oa.link = b, oa.name = l || e, oa) : null; } - function b(a, b) { - var c = d(a, b, !1); + function e(a, e) { + var c = b(a, e, !1); return c ? c.link.asGetPublicProperty(c.name) : void 0; } - function g(a, b, c) { - if (b = d(a, b, !0)) { - var e = b.link.asGetPropertyDescriptor(void 0, b.name, 0); - !e || "value" in e ? a.asSetPublicProperty(b.name, c) : b.link.asSetPublicProperty(b.name, c); - r(b.name); + function q(a, e, c) { + if (e = b(a, e, !0)) { + var d = e.link.asGetPropertyDescriptor(void 0, e.name, 0); + !d || "value" in d ? a.asSetPublicProperty(e.name, c) : e.link.asSetPublicProperty(e.name, c); + n(e.name); } } - function r(a) { - "o" === a[0] && "n" === a[1] && h.AVM1Context.instance.broadcastEventPropertyChange(a); + function n(a) { + "o" === a[0] && "n" === a[1] && k.AVM1Context.instance.broadcastEventPropertyChange(a); } - function w(a) { - return "undefined" !== typeof InternalError && a instanceof InternalError && "too much recursion" === a.message ? new ua("long running script -- AVM1 recursion limit is reached") : a; + function x(a) { + return "undefined" !== typeof InternalError && a instanceof InternalError && "too much recursion" === a.message ? new ra("long running script -- AVM1 recursion limit is reached") : a; } - function z(a, b, d) { + function L(a, b, e) { a.asSetPublicProperty("__proto__", b); - a.asDefinePublicProperty("__constructor__", {value:d, writable:!0, enumerable:!1, configurable:!1}); + a.asDefinePublicProperty("__constructor__", {value:e, writable:!0, enumerable:!1, configurable:!1}); } function A(a, b) { - var d; - if (a instanceof c.AVM2.AS.ASClass) { - d = ac(a, b), z(d, a.asGetPublicProperty("prototype"), a); + var e; + if (a instanceof d.AVM2.AS.ASClass) { + e = $b(a, b), L(e, a.asGetPublicProperty("prototype"), a); } else { - if (Na(a)) { - for (var e = a.asGetPublicProperty("prototype");e && !e.initAVM1ObjectInstance;) { - e = e.asGetPublicProperty("__proto__"); + if (Ja(a)) { + for (var c = a.asGetPublicProperty("prototype");c && !c.initAVM1ObjectInstance;) { + c = c.asGetPublicProperty("__proto__"); } - d = e ? Object.create(e) : {}; - z(d, a.asGetPublicProperty("prototype"), a); - e && e.initAVM1ObjectInstance.call(d, h.AVM1Context.instance); - a.apply(d, b); + e = c ? Object.create(c) : {}; + L(e, a.asGetPublicProperty("prototype"), a); + c && c.initAVM1ObjectInstance.call(e, k.AVM1Context.instance); + a.apply(e, b); } else { return; } } - return d; + return e; } - function B(a, b) { - k(a, function(a, d) { - return b.call(null, d); + function H(a, b) { + g(a, function(a, e) { + return b.call(null, e); }); } - function M(a, b) { - if (6 > p()) { + function K(a, e) { + if (6 > u()) { return null; } var c; c = a.inSequence && a.previousFrame.calleeSuper; if (!c) { - c = d(a.currentThis, b, !1); + c = b(a.currentThis, e, !1); if (!c) { return null; } c = c.link; } c = c.asGetPublicProperty("__proto__"); - return c ? (c = d(c, b, !1)) ? {target:c.link, name:c.name, obj:c.link.asGetPublicProperty(c.name)} : null : null; + return c ? (c = b(c, e, !1)) ? {target:c.link, name:c.name, obj:c.link.asGetPublicProperty(c.name)} : null : null; } - function N(a, b, d) { + function F(a, b, e) { if (!b.executionProhibited) { - var c = Ya.get(), e = []; - e.length = 4; - var g = b.initialScope.create(d), f; - b.pushCallFrame(d, null, null); + var c = Va.get(), d = []; + d.length = 4; + var f = b.initialScope.create(e), g; + b.pushCallFrame(e, null, null); c.message("ActionScript Execution Starts"); c.indent(); b.enterContext(function() { try { - Aa(a, g, [], e); + va(a, f, [], d); } catch (b) { - f = w(b); + g = x(b); } - }, d); - f instanceof ua && (b.executionProhibited = !0, console.error("Disabling AVM1 execution")); + }, e); + g instanceof ra && (b.executionProhibited = !0, console.error("Disabling AVM1 execution")); b.popCallFrame(); c.unindent(); c.message("ActionScript Execution Stops"); - if (f) { - throw f; + if (g) { + throw g; } } } - function K(b, d, c) { - var e = b.split(/[\/.]/g); - "" === e[e.length - 1] && e.pop(); - if ("" === e[0] || "_level0" === e[0] || "_root" === e[0]) { - d = c, e.shift(); + function J(b, e, c) { + var d = b.split(/[\/.]/g); + "" === d[d.length - 1] && d.pop(); + if ("" === d[0] || "_level0" === d[0] || "_root" === d[0]) { + e = c, d.shift(); } - for (;0 < e.length;) { - c = d; - d = d.__lookupChild(e[0]); - if (!d) { - return a(e[0] + " (expr " + b + ") is not found in " + c._target), {}; + for (;0 < d.length;) { + c = e; + e = e.__lookupChild(d[0]); + if (!e) { + return a(d[0] + " (expr " + b + ") is not found in " + c._target), {}; } - e.shift(); + d.shift(); } - return d; + return e; } - function y(a, b) { + function M(a, b) { if (a === Array) { - var d = b; - 1 == b.length && "number" === typeof b[0] && (d = [], d.length = b[0]); - return d; + var e = b; + 1 == b.length && "number" === typeof b[0] && (e = [], e.length = b[0]); + return e; } if (a === Boolean || a === Number || a === String || a === Function) { return a.apply(null, b); @@ -44634,1190 +44748,1185 @@ __extends = this.__extends || function(c, h) { } } if (a === Object) { - return new Za; + return new Wa; } } - function D(b, d) { + function D(b, e) { if (isNaN(b) || 0 > b) { return a("Invalid amount of arguments: " + b), 0; } b |= 0; - return b > d ? (a("Truncating amount of arguments: from " + b + " to " + d), d) : b; + return b > e ? (a("Truncating amount of arguments: from " + b + " to " + e), e) : b; } - function L(a) { - for (var b = +a.pop(), b = D(b, a.length), d = [], c = 0;c < b;c++) { - d.push(a.pop()); + function B(a) { + for (var b = +a.pop(), b = D(b, a.length), e = [], c = 0;c < b;c++) { + e.push(a.pop()); } - return d; + return e; } - function H(a, b) { - var d = a.context; + function E(a, b) { + var e = a.context; if (b) { try { - var c = K(b, d.currentTarget || d.defaultTarget, d.resolveLevel(0)); - d.currentTarget = c; - } catch (e) { - throw d.currentTarget = null, e; + var c = J(b, e.currentTarget || e.defaultTarget, e.resolveLevel(0)); + e.currentTarget = c; + } catch (d) { + throw e.currentTarget = null, d; } } else { - d.currentTarget = null; + e.currentTarget = null; } } - function J(a) { + function y(a) { return a === this; } - function C(a, b, d, c, e, g, f) { + function z(a, b, e, c, d, f, g) { function k() { if (!l.executionProhibited) { - var a, d = new bc, e = J(this) ? n : this, t, v, A = l.pushCallFrame(e, k, arguments); - f & 4 || (t = $a(arguments, 0), d.asSetPublicProperty("arguments", t)); - f & 2 || d.asSetPublicProperty("this", e); - f & 8 || (v = new Ba(A), d.asSetPublicProperty("super", v)); - a = r.create(d); - var oa, B = h(); - for (oa = 0;oa < u;oa++) { - var x = g[oa]; - if (x) { - switch(x.type) { + var a, e = new ac, d = y(this) ? m : this, x, v, Ua = l.pushCallFrame(d, k, arguments); + g & 4 || (x = Xa(arguments, 0), e.asSetPublicProperty("arguments", x)); + g & 2 || e.asSetPublicProperty("this", d); + g & 8 || (v = new wa(Ua), e.asSetPublicProperty("super", v)); + a = q.create(e); + var A, w = h(); + for (A = 0;A < u;A++) { + var K = f[A]; + if (K) { + switch(K.type) { case 1: - B[oa] = arguments[x.index]; + w[A] = arguments[K.index]; break; case 2: - B[oa] = e; + w[A] = d; break; case 4: - t = t || $a(arguments, 0); - B[oa] = t; + x = x || Xa(arguments, 0); + w[A] = x; break; case 8: - v = v || new Ba(A); - B[oa] = v; + v = v || new wa(Ua); + w[A] = v; break; case 16: - B[oa] = m; + w[A] = n; break; case 32: - B[oa] = n.asGetPublicProperty("_parent"); + w[A] = m.asGetPublicProperty("_parent"); break; case 64: - B[oa] = l.resolveLevel(0); + w[A] = l.resolveLevel(0); } } } - for (oa = 0;oa < arguments.length || oa < c.length;oa++) { - s && s[oa] || d.asSetPublicProperty(c[oa], arguments[oa]); + for (A = 0;A < arguments.length || A < c.length;A++) { + t && t[A] || e.asSetPublicProperty(c[A], arguments[A]); } - var N, y; - w.indent(); + var H, F; + p.indent(); if (256 <= ++l.stackDepth) { - throw new ua("long running script -- AVM1 recursion limit is reached"); + throw new ra("long running script -- AVM1 recursion limit is reached"); } l.enterContext(function() { try { - N = Aa(b, a, q, B); - } catch (d) { - y = d; + H = va(b, a, s, w); + } catch (e) { + F = e; } - }, p); + }, r); l.stackDepth--; l.popCallFrame(); - w.unindent(); - 10 < z.length || z.push(B); - if (y) { - throw y; + p.unindent(); + 10 < L.length || L.push(w); + if (F) { + throw F; } - return N; + return H; } } function h() { - if (0 < z.length) { - return z.pop(); + if (0 < L.length) { + return L.pop(); } var a = []; a.length = v; return a; } - var l = a.context, m = a.global, r = a.scopeContainer, n = a.scope, w = a.actionTracer, p = l.defaultTarget, q = a.constantPool, s = null, u = g ? g.length : 0; + var l = a.context, n = a.global, q = a.scopeContainer, m = a.scope, p = a.actionTracer, r = l.defaultTarget, s = a.constantPool, t = null, u = f ? f.length : 0; for (a = 0;a < u;a++) { - var t = g[a]; - t && 1 === t.type && (s || (s = []), s[g[a].index] = !0); + var x = f[a]; + x && 1 === x.type && (t || (t = []), t[f[a].index] = !0); } - var v = Math.min(e, 255), v = Math.max(v, u + 1), z = []; - e = k; - e.instanceConstructor = k; - e.debugName = "avm1 " + (d || ""); - d && (e.name = d); + var v = Math.min(d, 255), v = Math.max(v, u + 1), L = []; + d = k; + d.instanceConstructor = k; + d.debugName = "avm1 " + (e || ""); + e && (d.name = e); return k; } - function E(a) { + function G(a) { return a && (0 <= a.indexOf(".") || 0 <= a.indexOf(":")); } - function F(b, e, g) { - var f = b.global; - b = b.context; - var k, h; - if (0 <= e.indexOf(":")) { - k = b.currentTarget || b.defaultTarget; - h = e.split(":"); - k = K(h[0], k, b.resolveLevel(0)); - if (!k) { - return a(h[0] + " is undefined"), null; + function C(e, c, d) { + var f = e.global; + e = e.context; + var g, k; + if (0 <= c.indexOf(":")) { + g = e.currentTarget || e.defaultTarget; + k = c.split(":"); + g = J(k[0], g, e.resolveLevel(0)); + if (!g) { + return a(k[0] + " is undefined"), null; } - h = h[1]; + k = k[1]; } else { - if (0 <= e.indexOf(".")) { - for (e = e.split("."), h = e.pop(), k = f, f = 0;f < e.length;f++) { - if (k = (b = d(k, e[f], !1)) && b.link.asGetPublicProperty(b.name), !k) { - return a(e.slice(0, f + 1) + " is undefined"), null; + if (0 <= c.indexOf(".")) { + for (c = c.split("."), k = c.pop(), g = f, f = 0;f < c.length;f++) { + if (g = (e = b(g, c[f], !1)) && e.link.asGetPublicProperty(e.name), !g) { + return a(c.slice(0, f + 1) + " is undefined"), null; } } - } else { - c.Debug.assert(!1, "AVM1 variable has no path"); } } - return(b = d(k, h, g)) ? (ka.obj = k, ka.link = b.link, ka.name = b.name, ka) : null; + return(e = b(g, k, d)) ? (ja.obj = g, ja.link = e.link, ja.name = e.name, ja) : null; } - function I(a, b) { - if (E(b)) { - return F(a, b, !1); + function I(a, e) { + if (G(e)) { + return C(a, e, !1); } - var c = a.scopeContainer, e = a.context, e = e.currentTarget || e.defaultTarget, g = a.scope, f; - if (f = d(g, b, !1)) { - return ka.obj = g, ka.link = f.link, ka.name = f.name, ka; + var c = a.scopeContainer, d = a.context, d = d.currentTarget || d.defaultTarget, f = a.scope, g; + if (g = b(f, e, !1)) { + return ja.obj = f, ja.link = g.link, ja.name = g.name, ja; } for (;c;c = c.next) { - if (f = d(c.scope, b, !1)) { - return ka.obj = c.scope, ka.link = f.link, ka.name = f.name, ka; + if (g = b(c.scope, e, !1)) { + return ja.obj = c.scope, ja.link = g.link, ja.name = g.name, ja; } } - return(f = d(e, b, !1)) ? (ka.obj = e, ka.link = f.link, ka.name = f.name, ka) : "this" === b ? (g.asDefinePublicProperty("this", {value:e, configurable:!0}), ka.obj = g, ka.link = g, ka.name = "this", ka) : null; + return(g = b(d, e, !1)) ? (ja.obj = d, ja.link = g.link, ja.name = g.name, ja) : "this" === e ? (f.asDefinePublicProperty("this", {value:d, configurable:!0}), ja.obj = f, ja.link = f, ja.name = "this", ja) : null; } - function G(a, b) { - if (E(b)) { - return F(a, b, !0); + function P(a, e) { + if (G(e)) { + return C(a, e, !0); } - var c = a.scopeContainer, e = a.context, g = e.currentTarget || e.defaultTarget, f = a.scope; - if (e.currentTarget) { - return ka.obj = g, ka.link = g, ka.name = b, ka; + var c = a.scopeContainer, d = a.context, f = d.currentTarget || d.defaultTarget, g = a.scope; + if (d.currentTarget) { + return ja.obj = f, ja.link = f, ja.name = e, ja; } - if (e = d(f, b, !1)) { - return ka.obj = f, ka.link = e.link, ka.name = e.name, ka; + if (d = b(g, e, !1)) { + return ja.obj = g, ja.link = d.link, ja.name = d.name, ja; } for (;c.next;c = c.next) { - if (e = d(c.scope, b, !1)) { - return ka.obj = c.scope, ka.link = e.link, ka.name = e.name, ka; + if (d = b(c.scope, e, !1)) { + return ja.obj = c.scope, ja.link = d.link, ja.name = d.name, ja; } } - ka.obj = g; - ka.link = g; - ka.name = b; - return ka; + ja.obj = f; + ja.link = f; + ja.name = e; + return ja; } - function Z(a, b) { - var d = a.global, c = b[0]; - b[1] ? d.gotoAndPlay(c + 1) : d.gotoAndStop(c + 1); + function T(a, b) { + var e = a.global, c = b[0]; + b[1] ? e.gotoAndPlay(c + 1) : e.gotoAndStop(c + 1); } - function Q(a, b) { + function O(a, b) { a.global.getURL(b[0], b[1]); } - function S(a) { + function Q(a) { a.global.nextFrame(); } - function O(a) { + function S(a) { a.global.prevFrame(); } - function P(a) { + function V(a) { a.global.play(); } - function V(a) { + function aa(a) { a.global.stop(); } function $(a) { a.global.toggleHighQuality(); } - function W(a) { + function w(a) { a.global.stopAllSounds(); } - function x(a, b) { + function U(a, b) { return!a.global.ifFrameLoaded(b[0]); } - function ea(a, b) { - H(a, b[0]); - } - function Y(a, b) { - var d = a.global, c = b[0]; - b[1] ? d.gotoAndPlay(c) : d.gotoAndStop(c); + function ba(a, b) { + E(a, b[0]); } function R(a, b) { - var d = a.registers, c = a.constantPool, e = a.stack; + var e = a.global, c = b[0]; + b[1] ? e.gotoAndPlay(c) : e.gotoAndStop(c); + } + function N(a, b) { + var e = a.registers, c = a.constantPool, d = a.stack; b.forEach(function(a) { - a instanceof h.ParsedPushConstantAction ? e.push(c[a.constantIndex]) : a instanceof h.ParsedPushRegisterAction ? (a = a.registerNumber, 0 > a || a >= d.length ? e.push(void 0) : e.push(d[a])) : e.push(a); + a instanceof k.ParsedPushConstantAction ? d.push(c[a.constantIndex]) : a instanceof k.ParsedPushRegisterAction ? (a = a.registerNumber, 0 > a || a >= e.length ? d.push(void 0) : d.push(e[a])) : d.push(a); }); } - function U(a) { + function Z(a) { a.stack.pop(); } - function ba(a) { + function fa(a) { a = a.stack; - var b = e(a.pop()), d = e(a.pop()); - a.push(b + d); + var b = c(a.pop()), e = c(a.pop()); + a.push(b + e); } function X(a) { a = a.stack; - var b = e(a.pop()), d = e(a.pop()); - a.push(d - b); - } - function ga(a) { - a = a.stack; - var b = e(a.pop()), d = e(a.pop()); - a.push(b * d); - } - function ja(a) { - var b = a.stack; - a = a.isSwfVersion5; - var d = e(b.pop()), d = e(b.pop()) / d; - b.push(a ? d : isFinite(d) ? d : "#ERROR#"); - } - function aa(a) { - var b = a.stack; - a = a.isSwfVersion5; - var d = e(b.pop()), c = e(b.pop()), d = d == c; - b.push(a ? d : d ? 1 : 0); + var b = c(a.pop()), e = c(a.pop()); + a.push(e - b); } function ia(a) { - var b = a.stack; - a = a.isSwfVersion5; - var d = e(b.pop()), d = e(b.pop()) < d; - b.push(a ? d : d ? 1 : 0); + a = a.stack; + var b = c(a.pop()), e = c(a.pop()); + a.push(b * e); } - function T(a) { + function ga(a) { var b = a.stack; a = a.isSwfVersion5; - var d = l(b.pop()), c = l(b.pop()), d = d && c; - b.push(a ? d : d ? 1 : 0); + var e = c(b.pop()), e = c(b.pop()) / e; + b.push(a ? e : isFinite(e) ? e : "#ERROR#"); + } + function ca(a) { + var b = a.stack; + a = a.isSwfVersion5; + var e = c(b.pop()), d = c(b.pop()), e = e == d; + b.push(a ? e : e ? 1 : 0); } function da(a) { var b = a.stack; a = a.isSwfVersion5; - var d = l(b.pop()), c = l(b.pop()), d = d || c; - b.push(a ? d : d ? 1 : 0); + var e = c(b.pop()), e = c(b.pop()) < e; + b.push(a ? e : e ? 1 : 0); } - function fa(a) { + function ea(a) { var b = a.stack; a = a.isSwfVersion5; - var d = !l(b.pop()); - b.push(a ? d : d ? 1 : 0); + var e = l(b.pop()), c = l(b.pop()), e = e && c; + b.push(a ? e : e ? 1 : 0); + } + function W(a) { + var b = a.stack; + a = a.isSwfVersion5; + var e = l(b.pop()), c = l(b.pop()), e = e || c; + b.push(a ? e : e ? 1 : 0); + } + function ka(a) { + var b = a.stack; + a = a.isSwfVersion5; + var e = !l(b.pop()); + b.push(a ? e : e ? 1 : 0); + } + function Y(a) { + var b = a.stack; + a = a.isSwfVersion5; + var e = p(b.pop()), c = p(b.pop()), e = e == c; + b.push(a ? e : e ? 1 : 0); } function la(a) { - var b = a.stack; - a = a.isSwfVersion5; - var d = t(b.pop()), c = t(b.pop()), d = d == c; - b.push(a ? d : d ? 1 : 0); - } - function ca(a) { var b = a.stack; a = a.global; - var d = t(b.pop()); - b.push(a.length_(d)); - } - function na(a) { - var b = a.stack; - a = a.global; - var d = t(b.pop()); - b.push(a.length_(d)); + var e = p(b.pop()); + b.push(a.length_(e)); } function ma(a) { + var b = a.stack; + a = a.global; + var e = p(b.pop()); + b.push(a.length_(e)); + } + function na(a) { a = a.stack; - var b = t(a.pop()), d = t(a.pop()); - a.push(d + b); + var b = p(a.pop()), e = p(a.pop()); + a.push(e + b); } - function ra(a) { + function sa(a) { var b = a.stack; a = a.global; - var d = b.pop(), c = b.pop(), e = t(b.pop()); - b.push(a.substring(e, c, d)); - } - function wa(a) { - var b = a.stack; - a = a.global; - var d = b.pop(), c = b.pop(), e = t(b.pop()); - b.push(a.mbsubstring(e, c, d)); - } - function qa(a) { - var b = a.stack; - a = a.isSwfVersion5; - var d = t(b.pop()), d = t(b.pop()) < d; - b.push(a ? d : d ? 1 : 0); - } - function ya(a) { - var b = a.stack; - b.push(a.global.int(b.pop())); + var e = b.pop(), c = b.pop(), d = p(b.pop()); + b.push(a.substring(d, c, e)); } function pa(a) { var b = a.stack; a = a.global; - var d = b.pop(); - b.push(a.ord(d)); + var e = b.pop(), c = b.pop(), d = p(b.pop()); + b.push(a.mbsubstring(d, c, e)); } - function za(a) { + function Da(a) { + var b = a.stack; + a = a.isSwfVersion5; + var e = p(b.pop()), e = p(b.pop()) < e; + b.push(a ? e : e ? 1 : 0); + } + function ta(a) { + var b = a.stack; + b.push(a.global.int(b.pop())); + } + function Ea(a) { var b = a.stack; a = a.global; - var d = b.pop(); - b.push(a.mbord(d)); + var e = b.pop(); + b.push(a.ord(e)); + } + function ua(a) { + var b = a.stack; + a = a.global; + var e = b.pop(); + b.push(a.mbord(e)); } function ha(a) { var b = a.stack; a = a.global; - var d = +b.pop(); - b.push(a.chr(d)); + var e = +b.pop(); + b.push(a.chr(e)); } - function Ha(a) { + function Fa(a) { var b = a.stack; a = a.global; - var d = +b.pop(); - b.push(a.mbchr(d)); + var e = +b.pop(); + b.push(a.mbchr(e)); } - function Ma(a, b) { + function Ia(a, b) { } - function va(a, b) { + function Ca(a, b) { return!!a.stack.pop(); } - function xa(a) { + function Ba(a) { var b = a.global; a = a.stack.pop(); b.call(a); } - function Ia(a) { - var b = a.stack, d = "" + b.pop(), c = b.length; + function xa(a) { + var b = a.stack, e = "" + b.pop(), c = b.length; b.push(void 0); - a = I(a, d); + a = I(a, e); b[c] = a ? a.link.asGetPublicProperty(a.name) : void 0; } - function Ja(a) { - var b = a.stack, d = b.pop(), b = "" + b.pop(); - if (a = G(a, b)) { - a.link.asSetPublicProperty(a.name, d), r(a.name); + function qa(a) { + var b = a.stack, e = b.pop(), b = "" + b.pop(); + if (a = P(a, b)) { + a.link.asSetPublicProperty(a.name, e), n(a.name); } } - function Ca(a, b) { - var d = a.global, c = a.stack, e = b[0], g = c.pop(), c = c.pop(), f; - e & 1 ? f = "GET" : e & 2 && (f = "POST"); - var k = e & 64; - e & 128 ? d.loadVariables(c, g, f) : k ? d.loadMovie(c, g, f) : d.getURL(c, g, f); + function ya(a, b) { + var e = a.global, c = a.stack, d = b[0], f = c.pop(), c = c.pop(), g; + d & 1 ? g = "GET" : d & 2 && (g = "POST"); + var k = d & 64; + d & 128 ? e.loadVariables(c, f, g) : k ? e.loadMovie(c, f, g) : e.getURL(c, f, g); } - function ta(a, b) { - var d = a.global, c = b[0], e = [a.stack.pop()]; - c & 2 && e.push(b[1]); - (c & 1 ? d.gotoAndPlay : d.gotoAndStop).apply(d, e); + function Ka(a, b) { + var e = a.global, c = b[0], d = [a.stack.pop()]; + c & 2 && d.push(b[1]); + (c & 1 ? e.gotoAndPlay : e.gotoAndStop).apply(e, d); } - function Da(a) { + function La(a) { var b = a.stack.pop(); - H(a, b); + E(a, b); } - function Oa(a) { + function Ma(a) { var b = a.global; a = a.stack; - var d = a.pop(), c = a.pop(), e = a.length; + var e = a.pop(), c = a.pop(), d = a.length; a.push(void 0); - a[e] = b.getAVM1Property(c, d); + a[d] = b.getAVM1Property(c, e); + } + function Na(a) { + var b = a.global, e = a.stack; + a = e.pop(); + var c = e.pop(), e = e.pop(); + b.setAVM1Property(e, c, a); + } + function Oa(a) { + var b = a.global, e = a.stack; + a = e.pop(); + var c = e.pop(), e = e.pop(); + b.duplicateMovieClip(e, c, a); } function Pa(a) { - var b = a.global, d = a.stack; - a = d.pop(); - var c = d.pop(), d = d.pop(); - b.setAVM1Property(d, c, a); - } - function Qa(a) { - var b = a.global, d = a.stack; - a = d.pop(); - var c = d.pop(), d = d.pop(); - b.duplicateMovieClip(d, c, a); - } - function Ra(a) { var b = a.global; a = a.stack.pop(); b.removeMovieClip(a); } - function Sa(a) { - var b = a.global, d = a.stack; - a = d.pop(); - var c = d.pop(), d = d.pop() ? {y2:d.pop(), x2:d.pop(), y1:d.pop(), x1:d.pop()} : null; + function Qa(a) { + var b = a.global, e = a.stack; + a = e.pop(); + var c = e.pop(), e = e.pop() ? {y2:e.pop(), x2:e.pop(), y1:e.pop(), x1:e.pop()} : null; a = [a, c]; - d && (a = a.concat(d.x1, d.y1, d.x2, d.y2)); + e && (a = a.concat(e.x1, e.y1, e.x2, e.y2)); b.startDrag.apply(b, a); } - function Ta(a) { + function Ra(a) { a.global.stopDrag(); } - function Ua(a, b) { - var d = a.global, c = a.stack.pop(); - return!d.ifFrameLoaded(c); + function Sa(a, b) { + var e = a.global, c = a.stack.pop(); + return!e.ifFrameLoaded(c); } - function Va(a) { + function Ta(a) { var b = a.global; a = a.stack.pop(); - b.trace(void 0 === a ? "undefined" : t(a)); + b.trace(void 0 === a ? "undefined" : p(a)); } - function Wa(a) { + function Ya(a) { a.stack.push(a.global.getTimer()); } - function Xa(a) { + function Za(a) { var b = a.stack; b.push(a.global.random(b.pop())); } - function ab(b) { - var d = b.stack, c = d.pop(), e = L(d), g = d.length; - d.push(void 0); - var f = (b = I(b, c)) ? b.link.asGetPublicProperty(b.name) : void 0; - f instanceof Function ? (Ea(d.length === g + 1), d[g] = f.apply(b.obj || null, e)) : a("AVM1 warning: function '" + c + (f ? "' is not callable" : "' is undefined")); - } - function bb(d) { - var e = d.stack, g = e.pop(), f = e.pop(), k = L(e), h, l = e.length; + function $a(b) { + var e = b.stack, c = e.pop(), d = B(e), f = e.length; e.push(void 0); - if (c.isNullOrUndefined(f)) { - a("AVM1 warning: method '" + g + "' can't be called on undefined object"); + var g = (b = I(b, c)) ? b.link.asGetPublicProperty(b.name) : void 0; + g instanceof Function ? e[f] = g.apply(b.obj || null, d) : a("AVM1 warning: function '" + c + (g ? "' is not callable" : "' is undefined")); + } + function ab(b) { + var c = b.stack, f = c.pop(), g = c.pop(), k = B(c), h, l = c.length; + c.push(void 0); + if (d.isNullOrUndefined(g)) { + a("AVM1 warning: method '" + f + "' can't be called on undefined object"); } else { - d = d.context.frame; - var m, r; - if (c.isNullOrUndefined(g) || "" === g) { - if (f instanceof Ba) { - var n = f.callFrame, w = M(n, "__constructor__"); - w && (m = w.target, r = w.obj, h = n.currentThis); + b = b.context.frame; + var n, q; + if (d.isNullOrUndefined(f) || "" === f) { + if (g instanceof wa) { + var m = g.callFrame, p = K(m, "__constructor__"); + p && (n = p.target, q = p.obj, h = m.currentThis); } else { - h = r = f; + h = q = g; } - Na(r) ? (d.setCallee(h, m, r, k), e[l] = r.apply(h, k), d.resetCallee()) : a("AVM1 warning: obj '" + f + (f ? "' is not callable" : "' is undefined")); - Ea(e.length === l + 1); + Ja(q) ? (b.setCallee(h, n, q, k), c[l] = q.apply(h, k), b.resetCallee()) : a("AVM1 warning: obj '" + g + (g ? "' is not callable" : "' is undefined")); } else { - if (f instanceof Ba) { - if (n = f.callFrame, w = M(n, g)) { - m = w.target, r = w.obj, h = n.currentThis; + if (g instanceof wa) { + if (m = g.callFrame, p = K(m, f)) { + n = p.target, q = p.obj, h = m.currentThis; } } else { - r = b(f, g), h = f; + q = e(g, f), h = g; } - Na(r) ? (Ea(e.length === l + 1), d.setCallee(h, m, r, k), e[l] = r.apply(h, k), d.resetCallee()) : a("AVM1 warning: method '" + g + "' on object", f, c.isNullOrUndefined(r) ? "is undefined" : "is not callable"); + Ja(q) ? (b.setCallee(h, n, q, k), c[l] = q.apply(h, k), b.resetCallee()) : a("AVM1 warning: method '" + f + "' on object", g, d.isNullOrUndefined(q) ? "is undefined" : "is not callable"); } } } - function cb(a, b) { + function bb(a, b) { a.constantPool = b[0]; } - function db(a, b) { - var d = a.stack, c = a.scope, e = b[1], g = C(a, b[0], e, b[2], 4, null, 0); - e ? c.asSetPublicProperty(e, g) : d.push(g); + function cb(a, b) { + var e = a.stack, c = a.scope, d = b[1], f = z(a, b[0], d, b[2], 4, null, 0); + d ? c.asSetPublicProperty(d, f) : e.push(f); } - function eb(a) { + function db(a) { var b = a.stack; a = a.scope; - var d = b.pop(), b = b.pop(); - a.asSetPublicProperty(b, d); + var e = b.pop(), b = b.pop(); + a.asSetPublicProperty(b, e); } - function fb(a) { + function eb(a) { var b = a.scope; a = a.stack.pop(); b.asSetPublicProperty(a, void 0); } - function gb(a) { + function fb(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(d.asDeleteProperty(void 0, b, 0)); - r(b); + var b = a.pop(), e = a.pop(); + a.push(e.asDeleteProperty(void 0, b, 0)); + n(b); } - function hb(a) { - var b = a.stack, c = b.pop(); + function gb(a) { + var e = a.stack, c = e.pop(); a: { for (a = a.scopeContainer;a;a = a.next) { - var e = d(a.scope, c, !1); - if (e) { - e.link.asSetPublicProperty(e.name, void 0); - a = e.link.asDeleteProperty(void 0, e.name, 0); + var d = b(a.scope, c, !1); + if (d) { + d.link.asSetPublicProperty(d.name, void 0); + a = d.link.asDeleteProperty(void 0, d.name, 0); break a; } } a = !1; } - b.push(a); - r(c); + e.push(a); + n(c); } - function ib(a) { - var b = a.stack, d = b.pop(); + function hb(a) { + var b = a.stack, e = b.pop(); b.push(null); - a = (a = I(a, d)) ? a.link.asGetPublicProperty(a.name) : void 0; - c.isNullOrUndefined(a) || B(a, function(a) { + a = (a = I(a, e)) ? a.link.asGetPublicProperty(a.name) : void 0; + d.isNullOrUndefined(a) || H(a, function(a) { b.push(a); }); } - function jb(a) { + function ib(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(b == d); + var b = a.pop(), e = a.pop(); + a.push(b == e); } - function kb(d) { - d = d.stack; - var e = d.pop(), g = d.pop(); - d.push(void 0); - if (c.isNullOrUndefined(g)) { - a("AVM1 warning: cannot get member '" + e + "' on undefined object"); + function jb(b) { + b = b.stack; + var c = b.pop(), f = b.pop(); + b.push(void 0); + if (d.isNullOrUndefined(f)) { + a("AVM1 warning: cannot get member '" + c + "' on undefined object"); } else { - if (g instanceof Ba) { - if (e = M(g.callFrame, e)) { - d[d.length - 1] = e.obj; + if (f instanceof wa) { + if (c = K(f.callFrame, c)) { + b[b.length - 1] = c.obj; } } else { - d[d.length - 1] = b(g, e); + b[b.length - 1] = e(f, c); } } } - function lb(a) { + function kb(a) { a = a.stack; - var b = L(a); + var b = B(a); a.push(b); } - function mb(a) { + function lb(a) { a = a.stack; - var b = +a.pop(), b = D(b, a.length >> 1), d = {}; - z(d, null, Za); + var b = +a.pop(), b = D(b, a.length >> 1), e = {}; + L(e, null, Wa); for (var c = 0;c < b;c++) { - var e = a.pop(), g = a.pop(); - d.asSetPublicProperty(g, e); + var d = a.pop(), f = a.pop(); + e.asSetPublicProperty(f, d); } - a.push(d); + a.push(e); } - function nb(b) { - b = b.stack; - var e = b.pop(), g = b.pop(), f = L(b), k = b.length; - b.push(void 0); - if (c.isNullOrUndefined(g)) { - a("AVM1 warning: method '" + e + "' can't be constructed on undefined object"); + function mb(e) { + e = e.stack; + var c = e.pop(), f = e.pop(), g = B(e), k = e.length; + e.push(void 0); + if (d.isNullOrUndefined(f)) { + a("AVM1 warning: method '" + c + "' can't be constructed on undefined object"); } else { var h; - c.isNullOrUndefined(e) || "" === e ? h = g : (h = d(g, e, !1), h = g.asGetPublicProperty(h ? h.name : null)); - f = A(h, f); - void 0 === f && a("AVM1 warning: method '" + e + "' on object", g, "is not constructible"); - b[k] = f; - Ea(b.length === k + 1); + d.isNullOrUndefined(c) || "" === c ? h = f : (h = b(f, c, !1), h = f.asGetPublicProperty(h ? h.name : null)); + g = A(h, g); + void 0 === g && a("AVM1 warning: method '" + c + "' on object", f, "is not constructible"); + e[k] = g; } } - function ob(b) { - var d = b.stack, c = d.pop(), e = L(d), g = d.length; - d.push(void 0); + function nb(b) { + var e = b.stack, c = e.pop(), d = B(e), f = e.length; + e.push(void 0); b = (b = I(b, c)) ? b.link.asGetPublicProperty(b.name) : void 0; - var f = y(b, e); - void 0 === f && (f = A(b, e), void 0 === f && a("AVM1 warning: object '" + c + (b ? "' is not constructible" : "' is undefined"))); - Ea(d.length === g + 1); - d[g] = f; + var g = M(b, d); + void 0 === g && (g = A(b, d), void 0 === g && a("AVM1 warning: object '" + c + (b ? "' is not constructible" : "' is undefined"))); + e[f] = g; } - function pb(b) { - var d = b.stack; - b = d.pop(); - var e = d.pop(), d = d.pop(); - c.isNullOrUndefined(d) ? a("AVM1 warning: cannot set member '" + e + "' on undefined object") : d instanceof Ba ? a("AVM1 warning: cannot set member '" + e + "' on super") : g(d, e, b); + function ob(b) { + var e = b.stack; + b = e.pop(); + var c = e.pop(), e = e.pop(); + d.isNullOrUndefined(e) ? a("AVM1 warning: cannot set member '" + c + "' on undefined object") : e instanceof wa ? a("AVM1 warning: cannot set member '" + c + "' on super") : q(e, c, b); } - function qb(a) { + function pb(a) { a = a.stack; var b = a.pop(); - a.push("movieclip" === s(b) ? b._target : void 0); + a.push("movieclip" === r(b) ? b._target : void 0); } - function rb(a, b) { - var d = b[0], c = a.stack.pop(), e = a.constantPool, g = a.registers, c = a.scopeContainer.create(Object(c)); - Aa(d, c, e, g); + function qb(a, b) { + var e = b[0], c = a.stack.pop(), d = a.constantPool, f = a.registers, c = a.scopeContainer.create(Object(c)); + va(e, c, d, f); + } + function rb(a) { + a = a.stack; + a.push(c(a.pop())); } function sb(a) { a = a.stack; - a.push(e(a.pop())); + a.push(p(a.pop())); } function tb(a) { a = a.stack; - a.push(t(a.pop())); + var b = a.pop(); + a.push(r(b)); } function ub(a) { a = a.stack; - var b = a.pop(); - a.push(s(b)); + var b = t(a.pop()), e = t(a.pop()); + "string" === typeof b || "string" === typeof e ? a.push(p(e) + p(b)) : a.push(c(e) + c(b)); } function vb(a) { a = a.stack; - var b = u(a.pop()), d = u(a.pop()); - "string" === typeof b || "string" === typeof d ? a.push(t(d) + t(b)) : a.push(e(d) + e(b)); + var b = a.pop(), e = a.pop(); + a.push(s(e, b)); } function wb(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(q(d, b)); + var b = c(a.pop()), e = c(a.pop()); + a.push(e % b); } function xb(a) { a = a.stack; - var b = e(a.pop()), d = e(a.pop()); - a.push(d % b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e & b); } function yb(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d & b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e << b); } function zb(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d << b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e | b); } function Ab(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d | b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e >> b); } function Bb(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d >> b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e >>> b); } function Cb(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d >>> b); + var b = h(a.pop()), e = h(a.pop()); + a.push(e ^ b); } function Db(a) { a = a.stack; - var b = m(a.pop()), d = m(a.pop()); - a.push(d ^ b); + var b = c(a.pop()); + b--; + a.push(b); } function Eb(a) { a = a.stack; - var b = e(a.pop()); - b--; + var b = c(a.pop()); + b++; a.push(b); } function Fb(a) { - a = a.stack; - var b = e(a.pop()); - b++; - a.push(b); - } - function Gb(a) { a = a.stack; a.push(a[a.length - 1]); } - function Hb(a) { + function Gb(a) { a.isEndOfActions = !0; } - function Ib(a) { + function Hb(a) { a = a.stack; a.push(a.pop(), a.pop()); } - function Jb(a, b) { - var d = a.stack, c = a.registers, e = b[0]; - 0 > e || e >= c.length || (c[e] = d[d.length - 1]); + function Ib(a, b) { + var e = a.stack, c = a.registers, d = b[0]; + 0 > d || d >= c.length || (c[d] = e[e.length - 1]); } - function Kb(a) { + function Jb(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(n(d, b)); + var b = a.pop(), e = a.pop(); + a.push(m(e, b)); } - function Lb(b) { - var d = b.stack; - b = d.pop(); - d.push(null); - c.isNullOrUndefined(b) ? a("AVM1 warning: cannot iterate over undefined object") : B(b, function(a) { - d.push(a); + function Kb(b) { + var e = b.stack; + b = e.pop(); + e.push(null); + d.isNullOrUndefined(b) ? a("AVM1 warning: cannot iterate over undefined object") : H(b, function(a) { + e.push(a); }); } + function Lb(a) { + a = a.stack; + var b = a.pop(), e = a.pop(); + a.push(e === b); + } function Mb(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(d === b); + var b = a.pop(), e = a.pop(); + a.push(s(b, e)); } function Nb(a) { - a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(q(b, d)); - } - function Ob(a) { var b = a.stack; a = a.isSwfVersion5; - var d = t(b.pop()), d = t(b.pop()) > d; - b.push(a ? d : d ? 1 : 0); + var e = p(b.pop()), e = p(b.pop()) > e; + b.push(a ? e : e ? 1 : 0); } - function Pb(a, b) { - var d = a.stack, c = a.scope, e = b[1], g = C(a, b[0], e, b[2], b[3], b[4], b[5]); - e ? c.asSetPublicProperty(e, g) : d.push(g); + function Ob(a, b) { + var e = a.stack, c = a.scope, d = b[1], f = z(a, b[0], d, b[2], b[3], b[4], b[5]); + d ? c.asSetPublicProperty(d, f) : e.push(f); } - function Qb(a) { + function Pb(a) { var b = a.stack; a = b.pop(); - var b = b.pop().asGetPublicProperty("prototype"), d = a.asGetPublicProperty("prototype"); - b.asSetPublicProperty("__proto__", d); + var b = b.pop().asGetPublicProperty("prototype"), e = a.asGetPublicProperty("prototype"); + b.asSetPublicProperty("__proto__", e); b.asSetPublicProperty("__constructor__", a); } + function Qb(a) { + a = a.stack; + var b = a.pop(), e = a.pop(); + a.push(m(b, e) ? b : null); + } function Rb(a) { a = a.stack; - var b = a.pop(), d = a.pop(); - a.push(n(b, d) ? b : null); - } - function Sb(a) { - a = a.stack; - var b = a.pop(), d = +a.pop(); - D(d, a.length); - for (var c = [], e = 0;e < d;e++) { + var b = a.pop(), e = +a.pop(); + D(e, a.length); + for (var c = [], d = 0;d < e;d++) { c.push(a.pop()); } b._as2Interfaces = c; } - function Tb(a, b) { - var d = b[5], c = b[3], e = b[1], g = b[2], f = b[4], k = b[6], h = a.context, l = a.scopeContainer, m = a.scope, r = a.constantPool, n = a.registers, w = h.isTryCatchListening, p; + function Sb(a, b) { + var e = b[5], c = b[3], d = b[1], f = b[2], g = b[4], k = b[6], h = a.context, l = a.scopeContainer, n = a.scope, q = a.constantPool, m = a.registers, p = h.isTryCatchListening, r; try { - h.isTryCatchListening = !0, Aa(g, l, r, n); - } catch (q) { - h.isTryCatchListening = w, c && q instanceof La ? ("string" === typeof e ? m.asSetPublicProperty(e, q.error) : n[e] = q.error, Aa(f, l, r, n)) : p = q; + h.isTryCatchListening = !0, va(f, l, q, m); + } catch (s) { + h.isTryCatchListening = p, c && s instanceof Ha ? ("string" === typeof d ? n.asSetPublicProperty(d, s.error) : m[d] = s.error, va(g, l, q, m)) : r = s; } - h.isTryCatchListening = w; - d && Aa(k, l, r, n); - if (p) { - throw p; + h.isTryCatchListening = p; + e && va(k, l, q, m); + if (r) { + throw r; } } + function Tb(a) { + a = a.stack.pop(); + throw new Ha(a); + } function Ub(a) { - a = a.stack.pop(); - throw new La(a); - } - function Vb(a) { - var b = a.stack, d = a.global, c = L(b); + var b = a.stack, e = a.global, c = B(b); a = b.length; b.push(void 0); - d = d.fscommand.apply(null, c); - b[a] = d; + e = e.fscommand.apply(null, c); + b[a] = e; } - function cc(a, b) { + function bc(a, b) { } - function dc(a) { - return function(b, d) { - var e; + function cc(a) { + return function(b, e) { + var c; try { - a(b, d), b.recoveringFromError = !1; - } catch (g) { - e = b.context; - g = w(g); - if (g instanceof ua) { - throw g; + a(b, e), b.recoveringFromError = !1; + } catch (f) { + c = b.context; + f = x(f); + if (f instanceof ra) { + throw f; } - if (g instanceof La) { - throw g; + if (f instanceof Ha) { + throw f; } - Wb.instance.reportTelemetry({topic:"error", error:1}); + Vb.instance.reportTelemetry({topic:"error", error:1}); if (!b.recoveringFromError) { - if (1E3 <= e.errorsIgnored++) { - throw new ua("long running script -- AVM1 errors limit is reached"); + if (1E3 <= c.errorsIgnored++) { + throw new ra("long running script -- AVM1 errors limit is reached"); } - console.log(typeof g); - console.log(Object.getPrototypeOf(g)); - console.log(Object.getPrototypeOf(Object.getPrototypeOf(g))); - console.error("AVM1 error: " + g); - c.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:g.message, stack:g.stack}); + console.log(typeof f); + console.log(Object.getPrototypeOf(f)); + console.log(Object.getPrototypeOf(Object.getPrototypeOf(f))); + console.error("AVM1 error: " + f); + d.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:f.message, stack:f.stack}); b.recoveringFromError = !0; } } }; } - function ec() { + function dc() { var a; - a = h.avm1ErrorsEnabled.value ? function(a) { + a = k.avm1ErrorsEnabled.value ? function(a) { return a; - } : dc; - return{ActionGotoFrame:a(Z), ActionGetURL:a(Q), ActionNextFrame:a(S), ActionPreviousFrame:a(O), ActionPlay:a(P), ActionStop:a(V), ActionToggleQuality:a($), ActionStopSounds:a(W), ActionWaitForFrame:a(x), ActionSetTarget:a(ea), ActionGoToLabel:a(Y), ActionPush:a(R), ActionPop:a(U), ActionAdd:a(ba), ActionSubtract:a(X), ActionMultiply:a(ga), ActionDivide:a(ja), ActionEquals:a(aa), ActionLess:a(ia), ActionAnd:a(T), ActionOr:a(da), ActionNot:a(fa), ActionStringEquals:a(la), ActionStringLength:a(ca), - ActionMBStringLength:a(na), ActionStringAdd:a(ma), ActionStringExtract:a(ra), ActionMBStringExtract:a(wa), ActionStringLess:a(qa), ActionToInteger:a(ya), ActionCharToAscii:a(pa), ActionMBCharToAscii:a(za), ActionAsciiToChar:a(ha), ActionMBAsciiToChar:a(Ha), ActionJump:a(Ma), ActionIf:a(va), ActionCall:a(xa), ActionGetVariable:a(Ia), ActionSetVariable:a(Ja), ActionGetURL2:a(Ca), ActionGotoFrame2:a(ta), ActionSetTarget2:a(Da), ActionGetProperty:a(Oa), ActionSetProperty:a(Pa), ActionCloneSprite:a(Qa), - ActionRemoveSprite:a(Ra), ActionStartDrag:a(Sa), ActionEndDrag:a(Ta), ActionWaitForFrame2:a(Ua), ActionTrace:a(Va), ActionGetTime:a(Wa), ActionRandomNumber:a(Xa), ActionCallFunction:a(ab), ActionCallMethod:a(bb), ActionConstantPool:a(cb), ActionDefineFunction:a(db), ActionDefineLocal:a(eb), ActionDefineLocal2:a(fb), ActionDelete:a(gb), ActionDelete2:a(hb), ActionEnumerate:a(ib), ActionEquals2:a(jb), ActionGetMember:a(kb), ActionInitArray:a(lb), ActionInitObject:a(mb), ActionNewMethod:a(nb), - ActionNewObject:a(ob), ActionSetMember:a(pb), ActionTargetPath:a(qb), ActionWith:a(rb), ActionToNumber:a(sb), ActionToString:a(tb), ActionTypeOf:a(ub), ActionAdd2:a(vb), ActionLess2:a(wb), ActionModulo:a(xb), ActionBitAnd:a(yb), ActionBitLShift:a(zb), ActionBitOr:a(Ab), ActionBitRShift:a(Bb), ActionBitURShift:a(Cb), ActionBitXor:a(Db), ActionDecrement:a(Eb), ActionIncrement:a(Fb), ActionPushDuplicate:a(Gb), ActionReturn:a(Hb), ActionStackSwap:a(Ib), ActionStoreRegister:a(Jb), ActionInstanceOf:a(Kb), - ActionEnumerate2:a(Lb), ActionStrictEquals:a(Mb), ActionGreater:a(Nb), ActionStringGreater:a(Ob), ActionDefineFunction2:a(Pb), ActionExtends:a(Qb), ActionCastOp:a(Rb), ActionImplementsOp:a(Sb), ActionTry:a(Tb), ActionThrow:a(Ub), ActionFSCommand2:a(Vb), ActionStrictMode:a(cc)}; + } : cc; + return{ActionGotoFrame:a(T), ActionGetURL:a(O), ActionNextFrame:a(Q), ActionPreviousFrame:a(S), ActionPlay:a(V), ActionStop:a(aa), ActionToggleQuality:a($), ActionStopSounds:a(w), ActionWaitForFrame:a(U), ActionSetTarget:a(ba), ActionGoToLabel:a(R), ActionPush:a(N), ActionPop:a(Z), ActionAdd:a(fa), ActionSubtract:a(X), ActionMultiply:a(ia), ActionDivide:a(ga), ActionEquals:a(ca), ActionLess:a(da), ActionAnd:a(ea), ActionOr:a(W), ActionNot:a(ka), ActionStringEquals:a(Y), ActionStringLength:a(la), + ActionMBStringLength:a(ma), ActionStringAdd:a(na), ActionStringExtract:a(sa), ActionMBStringExtract:a(pa), ActionStringLess:a(Da), ActionToInteger:a(ta), ActionCharToAscii:a(Ea), ActionMBCharToAscii:a(ua), ActionAsciiToChar:a(ha), ActionMBAsciiToChar:a(Fa), ActionJump:a(Ia), ActionIf:a(Ca), ActionCall:a(Ba), ActionGetVariable:a(xa), ActionSetVariable:a(qa), ActionGetURL2:a(ya), ActionGotoFrame2:a(Ka), ActionSetTarget2:a(La), ActionGetProperty:a(Ma), ActionSetProperty:a(Na), ActionCloneSprite:a(Oa), + ActionRemoveSprite:a(Pa), ActionStartDrag:a(Qa), ActionEndDrag:a(Ra), ActionWaitForFrame2:a(Sa), ActionTrace:a(Ta), ActionGetTime:a(Ya), ActionRandomNumber:a(Za), ActionCallFunction:a($a), ActionCallMethod:a(ab), ActionConstantPool:a(bb), ActionDefineFunction:a(cb), ActionDefineLocal:a(db), ActionDefineLocal2:a(eb), ActionDelete:a(fb), ActionDelete2:a(gb), ActionEnumerate:a(hb), ActionEquals2:a(ib), ActionGetMember:a(jb), ActionInitArray:a(kb), ActionInitObject:a(lb), ActionNewMethod:a(mb), + ActionNewObject:a(nb), ActionSetMember:a(ob), ActionTargetPath:a(pb), ActionWith:a(qb), ActionToNumber:a(rb), ActionToString:a(sb), ActionTypeOf:a(tb), ActionAdd2:a(ub), ActionLess2:a(vb), ActionModulo:a(wb), ActionBitAnd:a(xb), ActionBitLShift:a(yb), ActionBitOr:a(zb), ActionBitRShift:a(Ab), ActionBitURShift:a(Bb), ActionBitXor:a(Cb), ActionDecrement:a(Db), ActionIncrement:a(Eb), ActionPushDuplicate:a(Fb), ActionReturn:a(Gb), ActionStackSwap:a(Hb), ActionStoreRegister:a(Ib), ActionInstanceOf:a(Jb), + ActionEnumerate2:a(Kb), ActionStrictEquals:a(Lb), ActionGreater:a(Mb), ActionStringGreater:a(Nb), ActionDefineFunction2:a(Ob), ActionExtends:a(Pb), ActionCastOp:a(Qb), ActionImplementsOp:a(Rb), ActionTry:a(Sb), ActionThrow:a(Tb), ActionFSCommand2:a(Ub), ActionStrictMode:a(bc)}; } - function Aa(a, b, d, e) { - var g = h.AVM1Context.instance; + function va(a, b, e, c) { + var f = k.AVM1Context.instance; if (!a.ir) { - var f = new h.ActionsDataParser(a, g.loaderInfo.swfVersion), k = new h.ActionsDataAnalyzer; - k.registersLimit = e.length; - k.parentResults = a.parent && a.parent.ir; - a.ir = k.analyze(f); - if (h.avm1CompilerEnabled.value) { + var g = new k.ActionsDataParser(a, f.loaderInfo.swfVersion), h = new k.ActionsDataAnalyzer; + h.registersLimit = c.length; + h.parentResults = a.parent && a.parent.ir; + a.ir = h.analyze(g); + if (k.avm1CompilerEnabled.value) { try { - var l = new fc; + var l = new ec; a.ir.compiled = l.generate(a.ir); - } catch (m) { - console.error("Unable to compile AVM1 function: " + m); + } catch (n) { + console.error("Unable to compile AVM1 function: " + n); } } } a = a.ir; - var k = a.compiled, f = [], r = 5 <= g.loaderInfo.swfVersion, n = Ya.get(), l = b.scope; - b = {context:g, global:g.globals, scopeContainer:b, scope:l, actionTracer:n, constantPool:d, registers:e, stack:f, frame:null, isSwfVersion5:r, recoveringFromError:!1, isEndOfActions:!1}; - l._as3Object && l._as3Object._deferScriptExecution && (g.deferScriptExecution = !0); - if (k) { - return k(b); + var h = a.compiled, g = [], q = 5 <= f.loaderInfo.swfVersion, m = Va.get(), l = b.scope; + b = {context:f, global:f.globals, scopeContainer:b, scope:l, actionTracer:m, constantPool:e, registers:c, stack:g, frame:null, isSwfVersion5:q, recoveringFromError:!1, isEndOfActions:!1}; + l._as3Object && l._as3Object._deferScriptExecution && (f.deferScriptExecution = !0); + if (h) { + return h(b); } - d = 0; - g = g.abortExecutionAt; - if (h.avm1DebuggerEnabled.value && (h.Debugger.pause || h.Debugger.breakpoints[a.dataId])) { + e = 0; + f = f.abortExecutionAt; + if (k.avm1DebuggerEnabled.value && (k.Debugger.pause || k.Debugger.breakpoints[a.dataId])) { debugger; } - for (e = a.actions[0];e && !b.isEndOfActions;) { - if (0 === d++ % 1E3 && Date.now() >= g) { - throw new ua("long running script -- AVM1 instruction hang timeout"); + for (c = a.actions[0];c && !b.isEndOfActions;) { + if (0 === e++ % 1E3 && Date.now() >= f) { + throw new ra("long running script -- AVM1 instruction hang timeout"); } - k = b; - l = r = void 0; + h = b; + l = q = void 0; try { - var r = k, p = e.action, q = p.actionCode, s = p.args; - r.actionTracer.print(p, r.stack); - n = !1; - switch(q | 0) { + var q = h, p = c.action, r = p.actionCode, s = p.args; + q.actionTracer.print(p, q.stack); + m = !1; + switch(r | 0) { case 129: - Z(r, s); + T(q, s); break; case 131: - Q(r, s); + O(q, s); break; case 4: - S(r); + Q(q); break; case 5: - O(r); + S(q); break; case 6: - P(r); + V(q); break; case 7: - V(r); + aa(q); break; case 8: - $(r); + $(q); break; case 9: - W(r); + w(q); break; case 138: - n = x(r, s); + m = U(q, s); break; case 139: - ea(r, s); + ba(q, s); break; case 140: - Y(r, s); + R(q, s); break; case 150: - R(r, s); + N(q, s); break; case 23: - U(r); + Z(q); break; case 10: - ba(r); + fa(q); break; case 11: - X(r); + X(q); break; case 12: - ga(r); + ia(q); break; case 13: - ja(r); + ga(q); break; case 14: - aa(r); + ca(q); break; case 15: - ia(r); + da(q); break; case 16: - T(r); + ea(q); break; case 17: - da(r); + W(q); break; case 18: - fa(r); + ka(q); break; case 19: - la(r); + Y(q); break; case 20: - ca(r); + la(q); break; case 49: - na(r); + ma(q); break; case 33: - ma(r); + na(q); break; case 21: - ra(r); + sa(q); break; case 53: - wa(r); + pa(q); break; case 41: - qa(r); + Da(q); break; case 24: - ya(r); + ta(q); break; case 50: - pa(r); + Ea(q); break; case 54: - za(r); + ua(q); break; case 51: - ha(r); + ha(q); break; case 55: - Ha(r); + Fa(q); break; case 153: break; case 157: - n = va(r, s); + m = Ca(q, s); break; case 158: - xa(r); + Ba(q); break; case 28: - Ia(r); + xa(q); break; case 29: - Ja(r); + qa(q); break; case 154: - Ca(r, s); + ya(q, s); break; case 159: - ta(r, s); + Ka(q, s); break; case 32: - Da(r); + La(q); break; case 34: - Oa(r); + Ma(q); break; case 35: - Pa(r); + Na(q); break; case 36: - Qa(r); + Oa(q); break; case 37: - Ra(r); + Pa(q); break; case 39: - Sa(r); + Qa(q); break; case 40: - Ta(r); + Ra(q); break; case 141: - n = Ua(r, s); + m = Sa(q, s); break; case 38: - Va(r); + Ta(q); break; case 52: - Wa(r); + Ya(q); break; case 48: - Xa(r); + Za(q); break; case 61: - ab(r); + $a(q); break; case 82: - bb(r); + ab(q); break; case 136: - cb(r, s); + bb(q, s); break; case 155: - db(r, s); + cb(q, s); break; case 60: - eb(r); + db(q); break; case 65: - fb(r); + eb(q); break; case 58: - gb(r); + fb(q); break; case 59: - hb(r); + gb(q); break; case 70: - ib(r); + hb(q); break; case 73: - jb(r); + ib(q); break; case 78: - kb(r); + jb(q); break; case 66: - lb(r); + kb(q); break; case 67: - mb(r); + lb(q); break; case 83: - nb(r); + mb(q); break; case 64: - ob(r); + nb(q); break; case 79: - pb(r); + ob(q); break; case 69: - qb(r); + pb(q); break; case 148: - rb(r, s); + qb(q, s); break; case 74: - sb(r); + rb(q); break; case 75: - tb(r); + sb(q); break; case 68: - ub(r); + tb(q); break; case 71: - vb(r); + ub(q); break; case 72: - wb(r); + vb(q); break; case 63: - xb(r); + wb(q); break; case 96: - yb(r); + xb(q); break; case 99: - zb(r); + yb(q); break; case 97: - Ab(r); + zb(q); break; case 100: - Bb(r); + Ab(q); break; case 101: - Cb(r); + Bb(q); break; case 98: - Db(r); + Cb(q); break; case 81: - Eb(r); + Db(q); break; case 80: - Fb(r); + Eb(q); break; case 76: - Gb(r); + Fb(q); break; case 62: - Hb(r); + Gb(q); break; case 77: - Ib(r); + Hb(q); break; case 135: - Jb(r, s); + Ib(q, s); break; case 84: - Kb(r); + Jb(q); break; case 85: - Lb(r); + Kb(q); break; case 102: - Mb(r); + Lb(q); break; case 103: - Nb(r); + Mb(q); break; case 104: - Ob(r); + Nb(q); break; case 142: - Pb(r, s); + Ob(q, s); break; case 105: - Qb(r); + Pb(q); break; case 43: - Rb(r); + Qb(q); break; case 44: - Sb(r); + Rb(q); break; case 143: - Tb(r, s); + Sb(q, s); break; case 42: - Ub(r); + Tb(q); break; case 45: - Vb(r); + Ub(q); break; case 137: break; case 0: - r.isEndOfActions = !0; + q.isEndOfActions = !0; break; default: - throw Error("Unknown action code: " + q);; + throw Error("Unknown action code: " + r);; } - l = n; - k.recoveringFromError = !1; - } catch (u) { - r = k.context; - u = w(u); - if (h.avm1ErrorsEnabled.value && !r.isTryCatchListening || u instanceof ua) { - throw u; + l = m; + h.recoveringFromError = !1; + } catch (t) { + q = h.context; + t = x(t); + if (k.avm1ErrorsEnabled.value && !q.isTryCatchListening || t instanceof ra) { + throw t; } - if (u instanceof La) { - throw u; + if (t instanceof Ha) { + throw t; } - Wb.instance.reportTelemetry({topic:"error", error:1}); - if (!k.recoveringFromError) { - if (1E3 <= r.errorsIgnored++) { - throw new ua("long running script -- AVM1 errors limit is reached"); + Vb.instance.reportTelemetry({topic:"error", error:1}); + if (!h.recoveringFromError) { + if (1E3 <= q.errorsIgnored++) { + throw new ra("long running script -- AVM1 errors limit is reached"); } - console.error("AVM1 error: " + u); - c.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:u.message, stack:u.stack}); - k.recoveringFromError = !0; + console.error("AVM1 error: " + t); + d.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:t.message, stack:t.stack}); + h.recoveringFromError = !0; } } - e = l ? e.conditionalJumpTo : e.next; - e = a.actions[e]; + c = l ? c.conditionalJumpTo : c.next; + c = a.actions[c]; } - return f.pop(); + return g.pop(); } - var Yb = c.AVM2.Runtime.forEachPublicProperty, ac = c.AVM2.Runtime.construct, Zb = c.isNumeric, Na = c.isFunction, gc = c.Debug.notImplemented, Xb = c.AVM2.Runtime.asCoerceString, $a = c.AVM2.Runtime.sliceArguments, Fa = c.Options.Option, Wb = c.Telemetry, Ea = c.Debug.assert, Ga = c.Settings.shumwayOptions.register(new c.Options.OptionSet("AVM1")); - h.avm1TraceEnabled = Ga.register(new Fa("t1", "traceAvm1", "boolean", !1, "trace AVM1 execution")); - h.avm1ErrorsEnabled = Ga.register(new Fa("e1", "errorsAvm1", "boolean", !1, "fail on AVM1 warnings and errors")); - h.avm1TimeoutDisabled = Ga.register(new Fa("ha1", "nohangAvm1", "boolean", !1, "disable fail on AVM1 hang")); - h.avm1CompilerEnabled = Ga.register(new Fa("ca1", "compileAvm1", "boolean", !0, "compiles AVM1 code")); - h.avm1DebuggerEnabled = Ga.register(new Fa("da1", "debugAvm1", "boolean", !1, "allows AVM1 code debugging")); - h.Debugger = {pause:!1, breakpoints:{}}; - var $b = "addCallback addListener addProperty addRequestHeader AsBroadcaster attachAudio attachMovie attachSound attachVideo beginFill beginGradientFill blendMode blockIndent broadcastMessage cacheAsBitmap CASEINSENSITIVE charAt charCodeAt checkPolicyFile clearInterval clearRequestHeaders concat createEmptyMovieClip curveTo DESCENDING displayState duplicateMovieClip E endFill exactSettings fromCharCode fullScreenSourceRect getBounds getBytesLoaded getBytesTotal getDate getDay getDepth getDepth getDuration getFullYear getHours getLocal getMilliseconds getMinutes getMonth getNewTextFormat getPan getPosition getRGB getSeconds getSize getTextFormat getTime getTimezoneOffset getTransform getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getUTCYear getVolume getYear globalToLocal gotoAndPlay gotoAndStop hasAccessibility hasAudio hasAudioEncoder hasEmbeddedVideo hasIME hasMP3 hasOwnProperty hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo hasVideoEncoder hitTest indexOf isActive isDebugger isFinite isNaN isPropertyEnumerable isPrototypeOf lastIndexOf leftMargin letterSpacing lineStyle lineTo LN10 LN10E LN2 LN2E loadSound localFileReadDisable localToGlobal MAX_VALUE MIN_VALUE moveTo NaN NEGATIVE_INFINITY nextFrame NUMERIC onChanged onData onDragOut onDragOver onEnterFrame onFullScreen onKeyDown onKeyUp onKillFocus onLoad onMouseDown onMouseMove onMouseUp onPress onRelease onReleaseOutside onResize onResize onRollOut onRollOver onScroller onSetFocus onStatus onSync onUnload parseFloat parseInt PI pixelAspectRatio playerType POSITIVE_INFINITY prevFrame registerClass removeListener removeMovieClip removeTextField replaceSel RETURNINDEXEDARRAY rightMargin scale9Grid scaleMode screenColor screenDPI screenResolutionX screenResolutionY serverString setClipboard setDate setDuration setFps setFullYear setHours setInterval setMask setMilliseconds setMinutes setMonth setNewTextFormat setPan setPosition setRGB setSeconds setTextFormat setTime setTimeout setTransform setTransform setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setVolume setYear showMenu showRedrawRegions sortOn SQRT1_2 SQRT2 startDrag stopDrag swapDepths tabEnabled tabIndex tabIndex tabStops toLowerCase toString toUpperCase trackAsMenu UNIQUESORT updateAfterEvent updateProperties useCodepage useHandCursor UTC valueOf".split(" "), - Ka = null, hc = function() { - function a(b, d) { + var Xb = d.AVM2.Runtime.forEachPublicProperty, $b = d.AVM2.Runtime.construct, Yb = d.isNumeric, Ja = d.isFunction, fc = d.Debug.notImplemented, Wb = d.AVM2.Runtime.asCoerceString, Xa = d.AVM2.Runtime.sliceArguments, za = d.Options.Option, Vb = d.Telemetry, Aa = d.Settings.shumwayOptions.register(new d.Options.OptionSet("AVM1")); + k.avm1TraceEnabled = Aa.register(new za("t1", "traceAvm1", "boolean", !1, "trace AVM1 execution")); + k.avm1ErrorsEnabled = Aa.register(new za("e1", "errorsAvm1", "boolean", !1, "fail on AVM1 warnings and errors")); + k.avm1TimeoutDisabled = Aa.register(new za("ha1", "nohangAvm1", "boolean", !1, "disable fail on AVM1 hang")); + k.avm1CompilerEnabled = Aa.register(new za("ca1", "compileAvm1", "boolean", !0, "compiles AVM1 code")); + k.avm1DebuggerEnabled = Aa.register(new za("da1", "debugAvm1", "boolean", !1, "allows AVM1 code debugging")); + k.Debugger = {pause:!1, breakpoints:{}}; + var Zb = "addCallback addListener addProperty addRequestHeader AsBroadcaster attachAudio attachMovie attachSound attachVideo beginFill beginGradientFill blendMode blockIndent broadcastMessage cacheAsBitmap CASEINSENSITIVE charAt charCodeAt checkPolicyFile clearInterval clearRequestHeaders concat createEmptyMovieClip curveTo DESCENDING displayState duplicateMovieClip E endFill exactSettings fromCharCode fullScreenSourceRect getBounds getBytesLoaded getBytesTotal getDate getDay getDepth getDepth getDuration getFullYear getHours getLocal getMilliseconds getMinutes getMonth getNewTextFormat getPan getPosition getRGB getSeconds getSize getTextFormat getTime getTimezoneOffset getTransform getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getUTCYear getVolume getYear globalToLocal gotoAndPlay gotoAndStop hasAccessibility hasAudio hasAudioEncoder hasEmbeddedVideo hasIME hasMP3 hasOwnProperty hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo hasVideoEncoder hitTest indexOf isActive isDebugger isFinite isNaN isPropertyEnumerable isPrototypeOf lastIndexOf leftMargin letterSpacing lineStyle lineTo LN10 LN10E LN2 LN2E loadSound localFileReadDisable localToGlobal MAX_VALUE MIN_VALUE moveTo NaN NEGATIVE_INFINITY nextFrame NUMERIC onChanged onData onDragOut onDragOver onEnterFrame onFullScreen onKeyDown onKeyUp onKillFocus onLoad onMouseDown onMouseMove onMouseUp onPress onRelease onReleaseOutside onResize onResize onRollOut onRollOver onScroller onSetFocus onStatus onSync onUnload parseFloat parseInt PI pixelAspectRatio playerType POSITIVE_INFINITY prevFrame registerClass removeListener removeMovieClip removeTextField replaceSel RETURNINDEXEDARRAY rightMargin scale9Grid scaleMode screenColor screenDPI screenResolutionX screenResolutionY serverString setClipboard setDate setDuration setFps setFullYear setHours setInterval setMask setMilliseconds setMinutes setMonth setNewTextFormat setPan setPosition setRGB setSeconds setTextFormat setTime setTimeout setTransform setTransform setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setVolume setYear showMenu showRedrawRegions sortOn SQRT1_2 SQRT2 startDrag stopDrag swapDepths tabEnabled tabIndex tabIndex tabStops toLowerCase toString toUpperCase trackAsMenu UNIQUESORT updateAfterEvent updateProperties useCodepage useHandCursor UTC valueOf".split(" "), + Ga = null, gc = function() { + function a(b, e) { this.scope = b; - this.next = d; + this.next = e; } a.prototype.create = function(b) { return new a(b, this); }; return a; - }(), bc = function(a) { + }(), ac = function(a) { function b() { a.call(this); this.asSetPublicProperty("toString", this.toString); @@ -45827,31 +45936,31 @@ __extends = this.__extends || function(c, h) { return this; }; return b; - }(c.AVM2.AS.ASObject), ic = function() { - function a(b, d, c, e) { + }(d.AVM2.AS.ASObject), hc = function() { + function a(b, e, c, d) { this.previousFrame = b; - this.currentThis = d; + this.currentThis = e; this.fn = c; - this.args = e; - this.inSequence = b ? b.calleeThis === d && b.calleeFn === c : !1; + this.args = d; + this.inSequence = b ? b.calleeThis === e && b.calleeFn === c : !1; this.resetCallee(); } - a.prototype.setCallee = function(a, b, d, c) { + a.prototype.setCallee = function(a, b, e, c) { this.calleeThis = a; this.calleeSuper = b; - this.calleeFn = d; + this.calleeFn = e; this.calleeArgs = c; }; a.prototype.resetCallee = function() { this.calleeFn = this.calleeSuper = this.calleeThis = null; }; return a; - }(), jc = function(e) { - function f(a) { - e.call(this); + }(), ic = function(c) { + function d(a) { + c.call(this); this.loaderInfo = a; - this.globals = new (h.Lib.AVM1Globals.createAVM1Class())(this); - this.initialScope = new hc(this.globals, null); + this.globals = new (k.Lib.AVM1Globals.createAVM1Class())(this); + this.initialScope = new gc(this.globals, null); this.assets = {}; this.assetsSymbols = []; this.assetsClasses = []; @@ -45863,47 +45972,45 @@ __extends = this.__extends || function(c, h) { this.deferScriptExecution = !0; this.pendingScripts = []; this.eventObservers = Object.create(null); - var c = this; - this.utils = {hasProperty:function(a, b) { - var e; - c.enterContext(function() { - e = !!d(a, b, !1); + var f = this; + this.utils = {hasProperty:function(a, e) { + var c; + f.enterContext(function() { + c = !!b(a, e, !1); }, a); - return e; - }, getProperty:function(a, d) { - var e; - c.enterContext(function() { - e = b(a, d); + return c; + }, getProperty:function(a, b) { + var c; + f.enterContext(function() { + c = e(a, b); }, a); - return e; - }, setProperty:function(a, b, d) { - c.enterContext(function() { - g(a, b, d); + return c; + }, setProperty:function(a, b, e) { + f.enterContext(function() { + q(a, b, e); }, a); }}; } - __extends(f, e); - f.prototype.addAsset = function(a, b, d) { - c.Debug.assert("string" === typeof a && !isNaN(b)); + __extends(d, c); + d.prototype.addAsset = function(a, b, e) { this.assets[a.toLowerCase()] = b; - this.assetsSymbols[b] = d; + this.assetsSymbols[b] = e; }; - f.prototype.registerClass = function(b, d) { - b = Xb(b); + d.prototype.registerClass = function(b, e) { + b = Wb(b); if (null === b) { return a("Cannot register class for symbol: className is missing"), null; } var c = this.assets[b.toLowerCase()]; - void 0 === c ? a("Cannot register " + b + " class for symbol") : this.assetsClasses[c] = d; + void 0 === c ? a("Cannot register " + b + " class for symbol") : this.assetsClasses[c] = e; }; - f.prototype.getAsset = function(a) { - a = Xb(a); + d.prototype.getAsset = function(a) { + a = Wb(a); if (null !== a && (a = this.assets[a.toLowerCase()], void 0 !== a)) { var b = this.assetsSymbols[a]; if (!b) { b = this.loaderInfo.getSymbolById(a); if (!b) { - c.Debug.warning("Symbol " + a + " is not defined."); return; } this.assetsSymbols[a] = b; @@ -45911,186 +46018,186 @@ __extends = this.__extends || function(c, h) { return{symbolId:a, symbolProps:b, theClass:this.assetsClasses[a]}; } }; - f.prototype.resolveTarget = function(a) { + d.prototype.resolveTarget = function(a) { var b = this.currentTarget || this.defaultTarget; - a ? "string" === typeof a && (a = K(a, b, this.resolveLevel(0))) : a = b; + a ? "string" === typeof a && (a = J(a, b, this.resolveLevel(0))) : a = b; if ("object" !== typeof a || null === a || !("_as3Object" in a)) { throw Error("Invalid AVM1 target object: " + Object.prototype.toString.call(a)); } return a; }; - f.prototype.resolveLevel = function(a) { + d.prototype.resolveLevel = function(a) { if (0 === a) { return this.root; } }; - f.prototype.addToPendingScripts = function(a) { + d.prototype.addToPendingScripts = function(a) { this.deferScriptExecution ? this.pendingScripts.push(a) : a(); }; - f.prototype.flushPendingScripts = function() { + d.prototype.flushPendingScripts = function() { for (var a = this.pendingScripts;a.length;) { a.shift()(); } this.deferScriptExecution = !1; }; - f.prototype.pushCallFrame = function(a, b, d) { - return this.frame = a = new ic(this.frame, a, b, d); + d.prototype.pushCallFrame = function(a, b, e) { + return this.frame = a = new hc(this.frame, a, b, e); }; - f.prototype.popCallFrame = function() { + d.prototype.popCallFrame = function() { var a = this.frame.previousFrame; return this.frame = a; }; - f.prototype.enterContext = function(a, b) { - if (this === h.AVM1Context.instance && this.isActive && this.defaultTarget === b && null === this.currentTarget) { + d.prototype.enterContext = function(a, b) { + if (this === k.AVM1Context.instance && this.isActive && this.defaultTarget === b && null === this.currentTarget) { a(), this.currentTarget = null; } else { - var d = h.AVM1Context.instance, c = this.isActive, e = this.defaultTarget, g = this.currentTarget, f; + var e = k.AVM1Context.instance, c = this.isActive, d = this.defaultTarget, f = this.currentTarget, g; try { - h.AVM1Context.instance = this, c || (this.abortExecutionAt = h.avm1TimeoutDisabled.value ? Number.MAX_VALUE : Date.now() + 1E3, this.errorsIgnored = 0, this.isActive = !0), this.defaultTarget = b, this.currentTarget = null, a(); - } catch (k) { - f = k; + k.AVM1Context.instance = this, c || (this.abortExecutionAt = k.avm1TimeoutDisabled.value ? Number.MAX_VALUE : Date.now() + 1E3, this.errorsIgnored = 0, this.isActive = !0), this.defaultTarget = b, this.currentTarget = null, a(); + } catch (h) { + g = h; } - this.defaultTarget = e; - this.currentTarget = g; + this.defaultTarget = d; + this.currentTarget = f; this.isActive = c; - h.AVM1Context.instance = d; - if (f) { - throw f; + k.AVM1Context.instance = e; + if (g) { + throw g; } } }; - f.prototype.executeActions = function(a, b) { - N(a, this, b); + d.prototype.executeActions = function(a, b) { + F(a, this, b); }; - f.prototype.registerEventPropertyObserver = function(a, b) { - var d = this.eventObservers[a]; - d || (d = [], this.eventObservers[a] = d); - d.push(b); + d.prototype.registerEventPropertyObserver = function(a, b) { + var e = this.eventObservers[a]; + e || (e = [], this.eventObservers[a] = e); + e.push(b); }; - f.prototype.unregisterEventPropertyObserver = function(a, b) { - var d = this.eventObservers[a]; - if (d) { - var c = d.indexOf(b); - 0 > c || d.splice(c, 1); + d.prototype.unregisterEventPropertyObserver = function(a, b) { + var e = this.eventObservers[a]; + if (e) { + var c = e.indexOf(b); + 0 > c || e.splice(c, 1); } }; - f.prototype.broadcastEventPropertyChange = function(a) { + d.prototype.broadcastEventPropertyChange = function(a) { var b = this.eventObservers[a]; b && b.forEach(function(b) { return b.onEventPropertyModified(a); }); }; - return f; - }(h.AVM1Context); - h.AVM1Context.create = function(a) { - return new jc(a); + return d; + }(k.AVM1Context); + k.AVM1Context.create = function(a) { + return new ic(a); }; - var La = function() { + var Ha = function() { return function(a) { this.error = a; }; - }(), ua = function(a) { - function b(d, c) { - a.call(this, d); + }(), ra = function(a) { + function b(e, c) { + a.call(this, e); this.error = c; } __extends(b, a); return b; - }(Error), sa = {link:void 0, name:null}; - h.executeActions = N; - var Za = function(a) { + }(Error), oa = {link:void 0, name:null}; + k.executeActions = F; + var Wa = function(a) { function b() { a.apply(this, arguments); } __extends(b, a); return b; - }(c.AVM2.AS.ASObject), Ba = function() { + }(d.AVM2.AS.ASObject), wa = function() { return function(a) { this.callFrame = a; }; - }(), ka = {obj:null, link:null, name:null}, fc = function() { + }(), ja = {obj:null, link:null, name:null}, ec = function() { function a() { - a.cachedCalls || (a.cachedCalls = ec()); + a.cachedCalls || (a.cachedCalls = dc()); } - a.prototype.convertArgs = function(a, b, d, c) { - for (var e = [], g = 0;g < a.length;g++) { - var f = a[g]; - if ("object" !== typeof f || null === f || Array.isArray(f)) { - void 0 === f ? e.push("undefined") : e.push(JSON.stringify(f)); + a.prototype.convertArgs = function(a, b, e, c) { + for (var d = [], f = 0;f < a.length;f++) { + var g = a[f]; + if ("object" !== typeof g || null === g || Array.isArray(g)) { + void 0 === g ? d.push("undefined") : d.push(JSON.stringify(g)); } else { - if (f instanceof h.ParsedPushConstantAction) { + if (g instanceof k.ParsedPushConstantAction) { if (c.singleConstantPool) { - var k = c.singleConstantPool[f.constantIndex]; - e.push(void 0 === k ? "undefined" : JSON.stringify(k)); + var h = c.singleConstantPool[g.constantIndex]; + d.push(void 0 === h ? "undefined" : JSON.stringify(h)); } else { - var k = "", l = d.constantPool; - l && (k = l[f.constantIndex], k = void 0 === k ? "undefined" : JSON.stringify(k), k = 0 <= k.indexOf("*/") ? "" : " /* " + k + " */"); - e.push("constantPool[" + f.constantIndex + "]" + k); + var h = "", l = e.constantPool; + l && (h = l[g.constantIndex], h = void 0 === h ? "undefined" : JSON.stringify(h), h = 0 <= h.indexOf("*/") ? "" : " /* " + h + " */"); + d.push("constantPool[" + g.constantIndex + "]" + h); } } else { - f instanceof h.ParsedPushRegisterAction ? (f = f.registerNumber, 0 > f || f >= c.registersLimit ? e.push("undefined") : e.push("registers[" + f + "]")) : f instanceof h.AVM1ActionsData ? (k = "code_" + b + "_" + g, d[k] = f, e.push("res." + k)) : gc("Unknown AVM1 action argument type"); + g instanceof k.ParsedPushRegisterAction ? (g = g.registerNumber, 0 > g || g >= c.registersLimit ? d.push("undefined") : d.push("registers[" + g + "]")) : g instanceof k.AVM1ActionsData ? (h = "code_" + b + "_" + f, e[h] = g, d.push("res." + h)) : fc("Unknown AVM1 action argument type"); } } } - return e.join(","); + return d.join(","); }; - a.prototype.convertAction = function(a, b, d, c, e) { + a.prototype.convertAction = function(a, b, e, c, d) { switch(a.action.actionCode) { case 153: ; case 62: return ""; case 136: - return d.constantPool = a.action.args[0], " constantPool = [" + this.convertArgs(a.action.args[0], b, d, e) + "];\n ectx.constantPool = constantPool;\n"; + return e.constantPool = a.action.args[0], " constantPool = [" + this.convertArgs(a.action.args[0], b, e, d) + "];\n ectx.constantPool = constantPool;\n"; case 150: - return " stack.push(" + this.convertArgs(a.action.args, b, d, e) + ");\n"; + return " stack.push(" + this.convertArgs(a.action.args, b, e, d) + ");\n"; case 135: - return a = a.action.args[0], 0 > a || a >= e.registersLimit ? "" : " registers[" + a + "] = stack[stack.length - 1];\n"; + return a = a.action.args[0], 0 > a || a >= d.registersLimit ? "" : " registers[" + a + "] = stack[stack.length - 1];\n"; case 138: ; case 141: - return " if (calls." + a.action.actionName + "(ectx,[" + this.convertArgs(a.action.args, b, d, e) + "])) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (c + 1) + "; break; }\n"; + return " if (calls." + a.action.actionName + "(ectx,[" + this.convertArgs(a.action.args, b, e, d) + "])) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (c + 1) + "; break; }\n"; case 157: return " if (!!stack.pop()) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (c + 1) + "; break; }\n"; default: - return " calls." + a.action.actionName + "(ectx" + (a.action.args ? ",[" + this.convertArgs(a.action.args, b, d, e) + "]" : "") + ");\n"; + return " calls." + a.action.actionName + "(ectx" + (a.action.args ? ",[" + this.convertArgs(a.action.args, b, e, d) + "]" : "") + ");\n"; } }; a.prototype.checkAvm1Timeout = function(a) { if (Date.now() >= a.context.abortExecutionAt) { - throw new ua("long running script -- AVM1 instruction hang timeout"); + throw new ra("long running script -- AVM1 instruction hang timeout"); } }; a.prototype.generate = function(b) { - var d = this, c = b.blocks, e = {}, g = 0, f = b.dataId, k = "return function avm1gen_" + f + "(ectx) {\nvar position = 0;\nvar checkTimeAfter = 0;\nvar constantPool = ectx.constantPool, registers = ectx.registers, stack = ectx.stack;\n"; - h.avm1DebuggerEnabled.value && (k += "/* Running " + f + " */ if (Shumway.AVM1.Debugger.pause || Shumway.AVM1.Debugger.breakpoints." + f + ") { debugger; }\n"); - k += "while (!ectx.isEndOfActions) {\nif (checkTimeAfter <= 0) { checkTimeAfter = 1000; checkTimeout(ectx); }\nswitch(position) {\n"; + var e = this, c = b.blocks, d = {}, f = 0, g = b.dataId, h = "return function avm1gen_" + g + "(ectx) {\nvar position = 0;\nvar checkTimeAfter = 0;\nvar constantPool = ectx.constantPool, registers = ectx.registers, stack = ectx.stack;\n"; + k.avm1DebuggerEnabled.value && (h += "/* Running " + g + " */ if (Shumway.AVM1.Debugger.pause || Shumway.AVM1.Debugger.breakpoints." + g + ") { debugger; }\n"); + h += "while (!ectx.isEndOfActions) {\nif (checkTimeAfter <= 0) { checkTimeAfter = 1000; checkTimeout(ectx); }\nswitch(position) {\n"; c.forEach(function(a) { - k += " case " + a.label + ":\n"; + h += " case " + a.label + ":\n"; a.items.forEach(function(a, c) { - k += d.convertAction(a, g++, e, c, b); + h += e.convertAction(a, f++, d, c, b); }); - k += " position = " + a.jump + ";\n checkTimeAfter -= " + a.items.length + ";\n break;\n"; + h += " position = " + a.jump + ";\n checkTimeAfter -= " + a.items.length + ";\n break;\n"; }); - k += " default: ectx.isEndOfActions = true; break;\n}\n}\nreturn stack.pop();};"; - k += "//# sourceURL=avm1gen-" + f; - return(new Function("calls", "res", "checkTimeout", k))(a.cachedCalls, e, this.checkAvm1Timeout); + h += " default: ectx.isEndOfActions = true; break;\n}\n}\nreturn stack.pop();};"; + h += "//# sourceURL=avm1gen-" + g; + return(new Function("calls", "res", "checkTimeout", h))(a.cachedCalls, d, this.checkAvm1Timeout); }; return a; - }(), Ya = function() { + }(), Va = function() { function a() { } a.get = function() { - return h.avm1TraceEnabled.value ? a.tracer : a.nullTracer; + return k.avm1TraceEnabled.value ? a.tracer : a.nullTracer; }; a.tracer = function() { var a = 0; - return{print:function(b, d) { - for (var c = b.position, e = b.actionCode, g = b.actionName, f = [], k = 0;k < d.length;k++) { - var h = d[k]; - h && "object" === typeof h ? (h = h.asGetPublicProperty("__constructor__"), f.push("[" + (h ? h.name : "Object") + "]")) : f.push(h); + return{print:function(b, e) { + for (var c = b.position, d = b.actionCode, f = b.actionName, g = [], h = 0;h < e.length;h++) { + var k = e[h]; + k && "object" === typeof k ? (k = k.asGetPublicProperty("__constructor__"), g.push("[" + (k ? k.name : "Object") + "]")) : g.push(k); } - console.log("AVM1 trace: " + Array(a + 1).join("..") + c + ": " + g + "(" + e.toString(16) + "), stack=" + f); + console.log("AVM1 trace: " + Array(a + 1).join("..") + c + ": " + f + "(" + d.toString(16) + "), stack=" + g); }, indent:function() { a++; }, unindent:function() { @@ -46106,72 +46213,71 @@ __extends = this.__extends || function(c, h) { }}; return a; }(); - })(c.AVM1 || (c.AVM1 = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - function s(a, c, d) { - return a.utils.hasProperty(c, d) ? !0 : (c = a.utils.getProperty(c, "_listeners")) ? c.some(function(b) { - return a.utils.hasProperty(b, d); + function r(a, c, b) { + return a.utils.hasProperty(c, b) ? !0 : (c = a.utils.getProperty(c, "_listeners")) ? c.some(function(e) { + return a.utils.hasProperty(e, b); }) : !1; } - function v(a, e, d, b) { - void 0 === b && (b = null); - var g = a.utils.getProperty(e, d); - c.isFunction(g) && g.apply(e, b); - g = a.utils.getProperty(this, "_listeners"); - Array.isArray(g) && g.forEach(function(g) { - g = a.utils.getProperty(g, d); - c.isFunction(g) && g.apply(e, b); + function v(a, c, b, e) { + void 0 === e && (e = null); + var h = a.utils.getProperty(c, b); + d.isFunction(h) && h.apply(c, e); + h = a.utils.getProperty(this, "_listeners"); + Array.isArray(h) && h.forEach(function(h) { + h = a.utils.getProperty(h, b); + d.isFunction(h) && h.apply(c, e); }); } - function p(a, e, d) { - for (var b = a.prototype;b && !b.initAVM1SymbolInstance;) { - b = b.asGetPublicProperty("__proto__"); + function u(a, c, b) { + for (var e = a.prototype;e && !e.initAVM1SymbolInstance;) { + e = e.asGetPublicProperty("__proto__"); } - c.Debug.assert(b); - b = Object.create(b); - b.asSetPublicProperty("__proto__", a.asGetPublicProperty("prototype")); - b.asDefinePublicProperty("__constructor__", {value:a, writable:!0, enumerable:!1, configurable:!1}); - e._as2Object = b; - b.initAVM1SymbolInstance(d, e); - a.call(b); - return b; + e = Object.create(e); + e.asSetPublicProperty("__proto__", a.asGetPublicProperty("prototype")); + e.asDefinePublicProperty("__constructor__", {value:a, writable:!0, enumerable:!1, configurable:!1}); + c._as2Object = e; + e.initAVM1SymbolInstance(b, c); + a.call(e); + return e; } - function u(a, c) { - return a ? a._as2Object ? a._as2Object : m.display.MovieClip.isType(a) ? a._avm1SymbolClass ? p(a._avm1SymbolClass, a, c) : p(c.globals.MovieClip, a, c) : m.display.SimpleButton.isType(a) ? p(c.globals.Button, a, c) : m.text.TextField.isType(a) ? p(c.globals.TextField, a, c) : m.display.BitmapData.isType(a) ? new a : null : null; + function t(a, c) { + return a ? a._as2Object ? a._as2Object : h.display.MovieClip.isType(a) ? a._avm1SymbolClass ? u(a._avm1SymbolClass, a, c) : u(c.globals.MovieClip, a, c) : h.display.SimpleButton.isType(a) ? u(c.globals.Button, a, c) : h.text.TextField.isType(a) ? u(c.globals.TextField, a, c) : h.display.BitmapData.isType(a) ? new a : null : null; } - function l(a, e) { - var d; - "function" === typeof a ? (d = function() { + function l(a, c) { + var b; + "function" === typeof a ? (b = function() { return a.apply(this, arguments); - }, Object.getOwnPropertyNames(a).forEach(function(b) { - d.hasOwnProperty(b) || Object.defineProperty(d, b, Object.getOwnPropertyDescriptor(a, b)); - })) : (c.Debug.assert("object" === typeof a && null !== a), d = Object.create(a)); - if (!e) { - return d; + }, Object.getOwnPropertyNames(a).forEach(function(e) { + b.hasOwnProperty(e) || Object.defineProperty(b, e, Object.getOwnPropertyDescriptor(a, e)); + })) : (d.Debug.assert("object" === typeof a && null !== a), b = Object.create(a)); + if (!c) { + return b; } - e.forEach(function(a) { - var c = a, e = a.indexOf("=>"); - 0 <= e && (c = a.substring(0, e), a = a.substring(e + 2)); - d.asDefinePublicProperty(c, {get:function() { + c.forEach(function(a) { + var c = a, d = a.indexOf("=>"); + 0 <= d && (c = a.substring(0, d), a = a.substring(d + 2)); + b.asDefinePublicProperty(c, {get:function() { return this[a]; - }, set:function(d) { - this[a] = d; + }, set:function(b) { + this[a] = b; }, enumerable:!1, configurable:!0}); }); - return d; + return b; } - function e(a, c) { + function c(a, c) { return c.context.executeActions(a, c); } - var m = c.AVM2.AS.flash, t = function() { - function a(c, d, b) { - void 0 === b && (b = null); + var h = d.AVM2.AS.flash, p = function() { + function a(c, b, e) { + void 0 === e && (e = null); this.propertyName = c; - this.eventName = d; - this.argsConverter = b; + this.eventName = b; + this.argsConverter = e; } a.prototype.onBind = function(a) { }; @@ -46179,8 +46285,8 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - a.AVM1EventHandler = t; - t = function() { + a.AVM1EventHandler = p; + p = function() { function a() { } Object.defineProperty(a.prototype, "context", {get:function() { @@ -46191,8 +46297,8 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - a.AVM1NativeObject = t; - t = function(a) { + a.AVM1NativeObject = p; + p = function(a) { function c() { a.apply(this, arguments); } @@ -46203,32 +46309,32 @@ __extends = this.__extends || function(c, h) { Object.defineProperty(c.prototype, "as3Object", {get:function() { return this._as3Object; }, enumerable:!0, configurable:!0}); - c.prototype.initAVM1SymbolInstance = function(a, b) { + c.prototype.initAVM1SymbolInstance = function(a, e) { this.initAVM1ObjectInstance(a); - this._as3Object = b; + this._as3Object = e; }; c.prototype.bindEvents = function(a) { - var b; - void 0 === b && (b = !0); + var e; + void 0 === e && (e = !0); this._events = a; var c = Object.create(null); this._eventsMap = c; this._eventsListeners = Object.create(null); - var e = this, f = this.context; + var d = this, f = this.context; a.forEach(function(a) { c[a.propertyName] = a; - f.registerEventPropertyObserver(a.propertyName, e); - e._updateEvent(a); + f.registerEventPropertyObserver(a.propertyName, d); + d._updateEvent(a); }); - b && e.as3Object.addEventListener("removedFromStage", function A() { - e.as3Object.removeEventListener("removedFromStage", A); - e.unbindEvents(); + e && d.as3Object.addEventListener("removedFromStage", function A() { + d.as3Object.removeEventListener("removedFromStage", A); + d.unbindEvents(); }); }; c.prototype.unbindEvents = function() { - var a = this, b = this.context; + var a = this, e = this.context; this._events.forEach(function(c) { - b.unregisterEventPropertyObserver(c.propertyName, a); + e.unregisterEventPropertyObserver(c.propertyName, a); a._removeEventListener(c); }); this._eventsListeners = this._eventsMap = this._events = null; @@ -46239,99 +46345,99 @@ __extends = this.__extends || function(c, h) { }, this); }; c.prototype._updateEvent = function(a) { - s(this.context, this, a.propertyName) ? this._addEventListener(a) : this._removeEventListener(a); + r(this.context, this, a.propertyName) ? this._addEventListener(a) : this._removeEventListener(a); }; c.prototype._addEventListener = function(a) { - var b = this._eventsListeners[a.propertyName]; - b || (b = function() { - var b = a.argsConverter ? a.argsConverter.apply(null, arguments) : null; - v(this.context, this, a.propertyName, b); - }.bind(this), this.as3Object.addEventListener(a.eventName, b), a.onBind(this), this._eventsListeners[a.propertyName] = b); + var e = this._eventsListeners[a.propertyName]; + e || (e = function() { + var e = a.argsConverter ? a.argsConverter.apply(null, arguments) : null; + v(this.context, this, a.propertyName, e); + }.bind(this), this.as3Object.addEventListener(a.eventName, e), a.onBind(this), this._eventsListeners[a.propertyName] = e); }; c.prototype._removeEventListener = function(a) { - var b = this._eventsListeners[a.propertyName]; - b && (this.as3Object.removeEventListener(a.eventName, b), this._eventsListeners[a.propertyName] = null); + var e = this._eventsListeners[a.propertyName]; + e && (this.as3Object.removeEventListener(a.eventName, e), this._eventsListeners[a.propertyName] = null); }; c.prototype.onEventPropertyModified = function(a) { this._updateEvent(this._eventsMap[a]); }; return c; - }(t); - a.AVM1SymbolBase = t; - a.avm1HasEventProperty = s; + }(p); + a.AVM1SymbolBase = p; + a.avm1HasEventProperty = r; a.avm1BroadcastEvent = v; - t = function() { + p = function() { function a() { } - a.addProperty = function(a, d, b, c, e) { - void 0 === e && (e = !0); - a.asDefinePublicProperty(d, {get:b, set:c || void 0, enumerable:e, configurable:!0}); + a.addProperty = function(a, b, e, c, d) { + void 0 === d && (d = !0); + a.asDefinePublicProperty(b, {get:e, set:c || void 0, enumerable:d, configurable:!0}); }; a.resolveTarget = function(a) { void 0 === a && (a = void 0); - return h.AVM1Context.instance.resolveTarget(a); + return k.AVM1Context.instance.resolveTarget(a); }; a.resolveMovieClip = function(a) { void 0 === a && (a = void 0); - return a ? h.AVM1Context.instance.resolveTarget(a) : void 0; + return a ? k.AVM1Context.instance.resolveTarget(a) : void 0; }; a.resolveLevel = function(a) { - return h.AVM1Context.instance.resolveLevel(+a); + return k.AVM1Context.instance.resolveLevel(+a); }; Object.defineProperty(a, "currentStage", {get:function() { - return h.AVM1Context.instance.root.as3Object.stage; + return k.AVM1Context.instance.root.as3Object.stage; }, enumerable:!0, configurable:!0}); Object.defineProperty(a, "swfVersion", {get:function() { - return h.AVM1Context.instance.loaderInfo.swfVersion; + return k.AVM1Context.instance.loaderInfo.swfVersion; }, enumerable:!0, configurable:!0}); a.getTarget = function(a) { a = a.as3Object; if (a === a.root) { return "/"; } - var d = ""; + var b = ""; do { - d = "/" + a.name + d, a = a.parent; + b = "/" + a.name + b, a = a.parent; } while (a !== a.root); - return d; + return b; }; return a; }(); - a.AVM1Utils = t; - a.getAVM1Object = u; + a.AVM1Utils = p; + a.getAVM1Object = t; a.wrapAVM1Object = l; - a.wrapAVM1Class = function(a, c, d) { + a.wrapAVM1Class = function(a, c, b) { c = l(a, c); - a = l(a.prototype, d); + a = l(a.prototype, b); c.asSetPublicProperty("prototype", a); return c; }; - var q = !1; + var s = !1; a.installObjectMethods = function() { - if (!q) { - q = !0; - var a = c.AVM2.AS.ASObject, e = a.asGetPublicProperty("prototype"); - a.asSetPublicProperty("registerClass", function(a, b) { - h.AVM1Context.instance.registerClass(a, b); + if (!s) { + s = !0; + var a = d.AVM2.AS.ASObject, c = a.asGetPublicProperty("prototype"); + a.asSetPublicProperty("registerClass", function(a, e) { + k.AVM1Context.instance.registerClass(a, e); }); - e.asDefinePublicProperty("addProperty", {value:function(a, b, c) { - if ("string" !== typeof a || "" === a || "function" !== typeof b || "function" !== typeof c && null !== c) { + c.asDefinePublicProperty("addProperty", {value:function(a, e, c) { + if ("string" !== typeof a || "" === a || "function" !== typeof e || "function" !== typeof c && null !== c) { return!1; } - this.asDefinePublicProperty(a, {get:b, set:c || void 0, configurable:!0, enumerable:!0}); + this.asDefinePublicProperty(a, {get:e, set:c || void 0, configurable:!0, enumerable:!0}); return!0; }, writable:!1, enumerable:!1, configurable:!1}); - Object.defineProperty(e, "__proto__avm1", {value:null, writable:!0, enumerable:!1}); - e.asDefinePublicProperty("__proto__", {get:function() { + Object.defineProperty(c, "__proto__avm1", {value:null, writable:!0, enumerable:!1}); + c.asDefinePublicProperty("__proto__", {get:function() { return this.__proto__avm1; }, set:function(a) { if (a !== this.__proto__avm1) { if (a) { - for (var b = a;b;) { - if (b === this) { + for (var e = a;e;) { + if (e === this) { return; } - b = b.__proto__avm1; + e = e.__proto__avm1; } this.__proto__avm1 = a; } else { @@ -46341,22 +46447,20 @@ __extends = this.__extends || function(c, h) { }, enumerable:!1, configurable:!1}); } }; - a.initializeAVM1Object = function(a, f, d) { - f = u(a, f); - c.Debug.assert(f); - d.variableName && f.asSetPublicProperty("variable", d.variableName); - var b = d.events; - if (b) { - for (var g = 0;g < b.length;g++) { - var l = b[g], m; - l.actionsData ? (m = new h.AVM1ActionsData(l.actionsData, "s" + d.symbolId + "e" + g), l.actionsData = null, l.compiled = m) : m = l.compiled; - c.Debug.assert(m); - m = e.bind(null, m, f); - var l = l.flags, p; - for (p in n) { - if (p |= 0, l & (p | 0)) { - var q = n[p]; - switch(p) { + a.initializeAVM1Object = function(a, d, b) { + d = t(a, d); + b.variableName && d.asSetPublicProperty("variable", b.variableName); + var e = b.events; + if (e) { + for (var h = 0;h < e.length;h++) { + var l = e[h], p; + l.actionsData ? (p = new k.AVM1ActionsData(l.actionsData, "s" + b.symbolId + "e" + h), l.actionsData = null, l.compiled = p) : p = l.compiled; + p = c.bind(null, p, d); + var l = l.flags, r; + for (r in m) { + if (r |= 0, l & (r | 0)) { + var s = m[r]; + switch(r) { case 2048: ; case 4096: @@ -46366,65 +46470,61 @@ __extends = this.__extends || function(c, h) { case 16384: a.buttonMode = !0; } - a.addEventListener(q, m); + a.addEventListener(s, p); } } } } }; - var n = Object.create(null); - n[1] = "load"; - n[2] = "frameConstructed"; - n[4] = "unload"; - n[8] = "mouseMove"; - n[16] = "mouseDown"; - n[32] = "mouseUp"; - n[64] = "keyDown"; - n[128] = "keyUp"; - n[256] = {toString:function() { - c.Debug.warning("Data ClipEvent not implemented"); + var m = Object.create(null); + m[1] = "load"; + m[2] = "frameConstructed"; + m[4] = "unload"; + m[8] = "mouseMove"; + m[16] = "mouseDown"; + m[32] = "mouseUp"; + m[64] = "keyDown"; + m[128] = "keyUp"; + m[256] = {toString:function() { }}; - n[512] = "initialize"; - n[1024] = "mouseDown"; - n[2048] = "click"; - n[4096] = "releaseOutside"; - n[8192] = "mouseOver"; - n[16384] = "mouseOut"; - n[32768] = {toString:function() { - c.Debug.warning("DragOver ClipEvent not implemented"); + m[512] = "initialize"; + m[1024] = "mouseDown"; + m[2048] = "click"; + m[4096] = "releaseOutside"; + m[8192] = "mouseOver"; + m[16384] = "mouseOut"; + m[32768] = {toString:function() { }}; - n[65536] = {toString:function() { - c.Debug.warning("DragOut ClipEvent not implemented"); + m[65536] = {toString:function() { }}; - n[131072] = {toString:function() { - c.Debug.warning("KeyPress ClipEvent not implemented"); + m[131072] = {toString:function() { }}; - n[262144] = "construct"; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + m[262144] = "construct"; + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.notImplemented, v = c.Debug.somewhatImplemented, p = c.AVM2.Runtime.forEachPublicProperty, u = c.Debug.assert, l = c.AVM2.AS.flash, e = jsGlobal.escape, m = [], t = function() { - function n(e) { - this.fscommand = l.system.FSCommand._fscommand; - this.getTimer = c.AVM2.AS.FlashUtilScript_getTimer; + var r = d.Debug.notImplemented, v = d.Debug.somewhatImplemented, u = d.AVM2.Runtime.forEachPublicProperty, t = d.AVM2.AS.flash, l = jsGlobal.escape, c = [], h = function() { + function h(c) { + this.fscommand = t.system.FSCommand._fscommand; + this.getTimer = d.AVM2.AS.FlashUtilScript_getTimer; this.NaN = Number.NaN; this.Infinity = Number.POSITIVE_INFINITY; this.isFinite = isFinite; this.isNaN = isNaN; this.parseFloat = parseFloat; this.parseInt = parseInt; - this.Object = c.AVM2.AS.ASObject; - this.Function = c.AVM2.AS.ASFunction; - this.Array = c.AVM2.AS.ASArray; - this.Number = c.AVM2.AS.ASNumber; - this.Math = c.AVM2.AS.ASMath; - this.Boolean = c.AVM2.AS.ASBoolean; - this.Date = c.AVM2.AS.ASDate; - this.RegExp = c.AVM2.AS.ASRegExp; - this.String = c.AVM2.AS.ASString; + this.Object = d.AVM2.AS.ASObject; + this.Function = d.AVM2.AS.ASFunction; + this.Array = d.AVM2.AS.ASArray; + this.Number = d.AVM2.AS.ASNumber; + this.Math = d.AVM2.AS.ASMath; + this.Boolean = d.AVM2.AS.ASBoolean; + this.Date = d.AVM2.AS.ASDate; + this.RegExp = d.AVM2.AS.ASRegExp; + this.String = d.AVM2.AS.ASString; this.undefined = void 0; this.MovieClip = a.AVM1MovieClip.createAVM1Class(); this.AsBroadcaster = a.AVM1Broadcaster.createAVM1Class(); @@ -46437,62 +46537,61 @@ __extends = this.__extends || function(c, h) { this.Mouse = a.AVM1Mouse.createAVM1Class(); this.MovieClipLoader = a.AVM1MovieClipLoader.createAVM1Class(); this.Sound = a.AVM1Sound.createAVM1Class(); - this.SharedObject = l.net.SharedObject; - this.ContextMenu = l.ui.ContextMenu; - this.ContextMenuItem = l.ui.ContextMenuItem; + this.SharedObject = t.net.SharedObject; + this.ContextMenu = t.ui.ContextMenu; + this.ContextMenuItem = t.ui.ContextMenuItem; this.TextFormat = a.AVM1TextFormat.createAVM1Class(); - n.instance = this; + h.instance = this; this._global = this; "Object Function Array Number Math Boolean Date RegExp String".split(" ").forEach(function(a) { - c.AVM2.Runtime.AVM2.instance.systemDomain.getClass(a); + d.AVM2.Runtime.AVM2.instance.systemDomain.getClass(a); }); - 8 <= e.loaderInfo.swfVersion && this._initializeFlashObject(); - this.AsBroadcaster.initializeWithContext(this.Stage, e); - this.AsBroadcaster.initializeWithContext(this.Key, e); - this.AsBroadcaster.initializeWithContext(this.Mouse, e); + 8 <= c.loaderInfo.swfVersion && this._initializeFlashObject(); + this.AsBroadcaster.initializeWithContext(this.Stage, c); + this.AsBroadcaster.initializeWithContext(this.Key, c); + this.AsBroadcaster.initializeWithContext(this.Mouse, c); } - n.createAVM1Class = function() { - return a.wrapAVM1Class(n, [], "_global flash ASSetPropFlags call chr clearInterval clearTimeout duplicateMovieClip fscommand escape unescape getTimer getURL getVersion gotoAndPlay gotoAndStop ifFrameLoaded int length=>length_ loadMovie loadMovieNum loadVariables loadVariablesNum mbchr mblength mbord mbsubstring nextFrame nextScene ord play prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip setInterval setTimeout showRedrawRegions startDrag stop stopDrag substring targetPath toggleHighQuality trace unloadMovie unloadMovieNum updateAfterEvent NaN Infinity isFinite isNaN parseFloat parseInt undefined Object Function Array Number Math Boolean Date RegExp String MovieClip AsBroadcaster System Stage Button TextField Color Key Mouse MovieClipLoader Sound SharedObject ContextMenu ContextMenuItem TextFormat toString $asfunction=>asfunction".split(" ")); + h.createAVM1Class = function() { + return a.wrapAVM1Class(h, [], "_global flash ASSetPropFlags call chr clearInterval clearTimeout duplicateMovieClip fscommand escape unescape getTimer getURL getVersion gotoAndPlay gotoAndStop ifFrameLoaded int length=>length_ loadMovie loadMovieNum loadVariables loadVariablesNum mbchr mblength mbord mbsubstring nextFrame nextScene ord play prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip setInterval setTimeout showRedrawRegions startDrag stop stopDrag substring targetPath toggleHighQuality trace unloadMovie unloadMovieNum updateAfterEvent NaN Infinity isFinite isNaN parseFloat parseInt undefined Object Function Array Number Math Boolean Date RegExp String MovieClip AsBroadcaster System Stage Button TextField Color Key Mouse MovieClipLoader Sound SharedObject ContextMenu ContextMenuItem TextFormat toString $asfunction=>asfunction".split(" ")); }; - n.prototype.asfunction = function(a) { - s("AVM1Globals.$asfunction"); + h.prototype.asfunction = function(a) { + r("AVM1Globals.$asfunction"); }; - n.prototype.ASSetPropFlags = function(a, c, d, b) { + h.prototype.ASSetPropFlags = function(a, c, d, b) { }; - n.prototype.call = function(c) { - var e = a.AVM1Utils.resolveTarget().as3Object; - c = e._getAbsFrameNumber(c, null); - void 0 !== c && e.callFrame(c); + h.prototype.call = function(c) { + var d = a.AVM1Utils.resolveTarget().as3Object; + c = d._getAbsFrameNumber(c, null); + void 0 !== c && d.callFrame(c); }; - n.prototype.chr = function(a) { + h.prototype.chr = function(a) { return String.fromCharCode(a); }; - n.prototype.clearInterval = function(a) { - var c = m[a - 1]; - c && (clearInterval(c), delete m[a - 1]); + h.prototype.clearInterval = function(a) { + var d = c[a - 1]; + d && (clearInterval(d), delete c[a - 1]); }; - n.prototype.clearTimeout = function(a) { - var c = m[a - 1]; - c && (clearTimeout(c), delete m[a - 1]); + h.prototype.clearTimeout = function(a) { + var d = c[a - 1]; + d && (clearTimeout(d), delete c[a - 1]); }; - n.prototype.duplicateMovieClip = function(c, e, d) { - a.AVM1Utils.resolveTarget(c).duplicateMovieClip(e, d, null); + h.prototype.duplicateMovieClip = function(c, d, f) { + a.AVM1Utils.resolveTarget(c).duplicateMovieClip(d, f, null); }; - n.prototype.getAVM1Property = function(c, e) { - return a.AVM1Utils.resolveTarget(c)[q[e]]; + h.prototype.getAVM1Property = function(c, d) { + return a.AVM1Utils.resolveTarget(c)[p[d]]; }; - n.prototype.getURL = function(a, e, d) { - var b = new l.net.URLRequest(String(a)); - d && (b.method = d); - "string" === typeof e && 0 === e.indexOf("_level") ? this.loadMovieNum(a, +e.substr(6), d) : c.AVM2.AS.FlashNetScript_navigateToURL(b, e); + h.prototype.getURL = function(a, c, f) { + var b = new t.net.URLRequest(String(a)); + f && (b.method = f); + "string" === typeof c && 0 === c.indexOf("_level") ? this.loadMovieNum(a, +c.substr(6), f) : d.AVM2.AS.FlashNetScript_navigateToURL(b, c); }; - n.prototype.getVersion = function() { - return l.system.Capabilities.version; + h.prototype.getVersion = function() { + return t.system.Capabilities.version; }; - n.prototype._addToPendingScripts = function(a, c, d) { + h.prototype._addToPendingScripts = function(a, c, d) { void 0 === d && (d = null); - u(c, "invalid function in _addToPendingScripts"); - var b = h.AVM1Context.instance, e = b.resolveTarget(void 0); + var b = k.AVM1Context.instance, e = b.resolveTarget(void 0); b.addToPendingScripts(function() { b.enterContext(function() { try { @@ -46503,7 +46602,7 @@ __extends = this.__extends || function(c, h) { }, e); }); }; - n.prototype.escape = function(a) { + h.prototype.escape = function(a) { return encodeURIComponent(a).replace(/!|'|\(|\)|\*|-|\.|_|~/g, function(a) { switch(a) { case "*": @@ -46515,130 +46614,129 @@ __extends = this.__extends || function(c, h) { case "_": return "%5F"; default: - return e(a); + return l(a); } }); }; - n.prototype.unescape = function(a) { + h.prototype.unescape = function(a) { return decodeURIComponent(a); }; - n.prototype.gotoAndPlay = function(c, e) { - var d = a.AVM1Utils.resolveTarget(); - 2 > arguments.length ? this._addToPendingScripts(d, d.gotoAndPlay, [arguments[0]]) : this._addToPendingScripts(d, d.gotoAndPlay, [arguments[1], arguments[0]]); + h.prototype.gotoAndPlay = function(c, d) { + var f = a.AVM1Utils.resolveTarget(); + 2 > arguments.length ? this._addToPendingScripts(f, f.gotoAndPlay, [arguments[0]]) : this._addToPendingScripts(f, f.gotoAndPlay, [arguments[1], arguments[0]]); }; - n.prototype.gotoAndStop = function(c, e) { - var d = a.AVM1Utils.resolveTarget(); - 2 > arguments.length ? this._addToPendingScripts(d, d.gotoAndStop, [arguments[0]]) : this._addToPendingScripts(d, d.gotoAndStop, [arguments[1], arguments[0]]); + h.prototype.gotoAndStop = function(c, d) { + var f = a.AVM1Utils.resolveTarget(); + 2 > arguments.length ? this._addToPendingScripts(f, f.gotoAndStop, [arguments[0]]) : this._addToPendingScripts(f, f.gotoAndStop, [arguments[1], arguments[0]]); }; - n.prototype.ifFrameLoaded = function(c, e) { - var d = a.AVM1Utils.resolveTarget(), b = d._framesloaded; - return Math.min((2 > arguments.length ? arguments[0] : arguments[1]) + 1, d._totalframes) <= b; + h.prototype.ifFrameLoaded = function(c, d) { + var f = a.AVM1Utils.resolveTarget(), b = f._framesloaded; + return Math.min((2 > arguments.length ? arguments[0] : arguments[1]) + 1, f._totalframes) <= b; }; - n.prototype.int = function(a) { + h.prototype.int = function(a) { return a | 0; }; - n.prototype.length_ = function(a) { + h.prototype.length_ = function(a) { return("" + a).length; }; - n.prototype.loadMovie = function(c, e, d) { + h.prototype.loadMovie = function(c, d, f) { if (c && 0 === c.toLowerCase().indexOf("fscommand:")) { - this.fscommand(c.substring(10), e); + this.fscommand(c.substring(10), d); } else { - var b = "string" === typeof e && 0 === e.indexOf("_level"), g; - b && (b = e.charAt(6), g = parseInt(b, 10), b = g.toString() === b); - g = new l.display.Loader; - b ? (c = new l.net.URLRequest(c), d && (c.method = d), g.load(c)) : a.AVM1Utils.resolveTarget(e).loadMovie(c, d); + var b = "string" === typeof d && 0 === d.indexOf("_level"), e; + b && (b = d.charAt(6), e = parseInt(b, 10), b = e.toString() === b); + e = new t.display.Loader; + b ? (c = new t.net.URLRequest(c), f && (c.method = f), e.load(c)) : a.AVM1Utils.resolveTarget(d).loadMovie(c, f); } }; - n.prototype._setLevel = function(a, c) { + h.prototype._setLevel = function(a, c) { }; - n.prototype.loadMovieNum = function(a, c, d) { + h.prototype.loadMovieNum = function(a, c, d) { if (a && 0 === a.toLowerCase().indexOf("fscommand:")) { return this.fscommand(a.substring(10)); } - c = new l.display.Loader; - a = new l.net.URLRequest(a); + c = new t.display.Loader; + a = new t.net.URLRequest(a); d && (a.method = d); c.load(a); }; - n.prototype.loadVariables = function(c, e, d) { - void 0 === d && (d = ""); - e = a.AVM1Utils.resolveTarget(e); - this._loadVariables(e, c, d); + h.prototype.loadVariables = function(c, d, f) { + void 0 === f && (f = ""); + d = a.AVM1Utils.resolveTarget(d); + this._loadVariables(d, c, f); }; - n.prototype.loadVariablesNum = function(c, e, d) { - void 0 === d && (d = ""); - this._loadVariables(a.AVM1Utils.resolveLevel(e), c, d); + h.prototype.loadVariablesNum = function(c, d, f) { + void 0 === f && (f = ""); + this._loadVariables(a.AVM1Utils.resolveLevel(d), c, f); }; - n.prototype._loadVariables = function(e, f, d) { + h.prototype._loadVariables = function(c, d, f) { function b(d) { - m.removeEventListener(l.events.Event.COMPLETE, b); - c.Debug.assert("object" === typeof m.data); - p(m.data, function(a, b) { - g.utils.setProperty(e, a, b); + h.removeEventListener(t.events.Event.COMPLETE, b); + u(h.data, function(a, b) { + e.utils.setProperty(c, a, b); }); - e instanceof a.AVM1MovieClip && a.avm1BroadcastEvent(g, e, "onData"); + c instanceof a.AVM1MovieClip && a.avm1BroadcastEvent(e, c, "onData"); } - f = new l.net.URLRequest(f); - d && (f.method = d); - var g = h.AVM1Context.instance, m = new l.net.URLLoader(f); - m._ignoreDecodeErrors = !0; - m.dataFormat = "variables"; - m.addEventListener(l.events.Event.COMPLETE, b); + d = new t.net.URLRequest(d); + f && (d.method = f); + var e = k.AVM1Context.instance, h = new t.net.URLLoader(d); + h._ignoreDecodeErrors = !0; + h.dataFormat = "variables"; + h.addEventListener(t.events.Event.COMPLETE, b); }; - n.prototype.mbchr = function(a) { + h.prototype.mbchr = function(a) { return String.fromCharCode(a); }; - n.prototype.mblength = function(a) { + h.prototype.mblength = function(a) { return("" + a).length; }; - n.prototype.mbord = function(a) { + h.prototype.mbord = function(a) { return("" + a).charCodeAt(0); }; - n.prototype.mbsubstring = function(a, c, d) { + h.prototype.mbsubstring = function(a, c, d) { return c !== (0 | c) || d !== (0 | d) ? "" : ("" + a).substr(c, d); }; - n.prototype.nextFrame = function() { + h.prototype.nextFrame = function() { var c = a.AVM1Utils.resolveTarget(); this._addToPendingScripts(c, c.nextFrame); }; - n.prototype.nextScene = function() { + h.prototype.nextScene = function() { var c = a.AVM1Utils.resolveTarget(); this._addToPendingScripts(c, c.nextScene); }; - n.prototype.ord = function(a) { + h.prototype.ord = function(a) { return("" + a).charCodeAt(0); }; - n.prototype.play = function() { + h.prototype.play = function() { a.AVM1Utils.resolveTarget().play(); }; - n.prototype.prevFrame = function() { + h.prototype.prevFrame = function() { var c = a.AVM1Utils.resolveTarget(); this._addToPendingScripts(c, c.prevFrame); }; - n.prototype.prevScene = function() { + h.prototype.prevScene = function() { var c = a.AVM1Utils.resolveTarget(); this._addToPendingScripts(c, c.prevScene); }; - n.prototype.print = function(a, c) { - s("AVM1Globals.print"); + h.prototype.print = function(a, c) { + r("AVM1Globals.print"); }; - n.prototype.printAsBitmap = function(a, c) { - s("AVM1Globals.printAsBitmap"); + h.prototype.printAsBitmap = function(a, c) { + r("AVM1Globals.printAsBitmap"); }; - n.prototype.printAsBitmapNum = function(a, c) { - s("AVM1Globals.printAsBitmapNum"); + h.prototype.printAsBitmapNum = function(a, c) { + r("AVM1Globals.printAsBitmapNum"); }; - n.prototype.printNum = function(a, c) { - s("AVM1Globals.printNum"); + h.prototype.printNum = function(a, c) { + r("AVM1Globals.printNum"); }; - n.prototype.random = function(a) { + h.prototype.random = function(a) { return 0 | Math.random() * (0 | a); }; - n.prototype.removeMovieClip = function(c) { + h.prototype.removeMovieClip = function(c) { a.AVM1Utils.resolveTarget(c).removeMovieClip(); }; - n.prototype.setInterval = function() { + h.prototype.setInterval = function() { if (!(2 > arguments.length)) { var a = []; if ("function" === typeof arguments[0]) { @@ -46647,12 +46745,12 @@ __extends = this.__extends || function(c, h) { if (3 > arguments.length) { return; } - var c = arguments[0], d = arguments[1]; - if (!c || "object" !== typeof c || "string" !== typeof d) { + var d = arguments[0], f = arguments[1]; + if (!d || "object" !== typeof d || "string" !== typeof f) { return; } a[0] = function() { - c.asCallPublicProperty(d, arguments); + d.asCallPublicProperty(f, arguments); }; for (var b = 2;b < arguments.length;b++) { a.push(arguments[b]); @@ -46660,56 +46758,56 @@ __extends = this.__extends || function(c, h) { } a[1] |= 0; a = setInterval.apply(null, a); - return m.push(a); + return c.push(a); } }; - n.prototype.setAVM1Property = function(c, e, d) { - a.AVM1Utils.resolveTarget(c)[q[e]] = d; + h.prototype.setAVM1Property = function(c, d, f) { + a.AVM1Utils.resolveTarget(c)[p[d]] = f; }; - n.prototype.setTimeout = function() { + h.prototype.setTimeout = function() { if (!(2 > arguments.length || "function" !== typeof arguments[0])) { arguments[1] |= 0; var a = setTimeout.apply(null, arguments); - return m.push(a); + return c.push(a); } }; - n.prototype.showRedrawRegions = function(a, c) { - s("AVM1Globals.showRedrawRegions"); + h.prototype.showRedrawRegions = function(a, c) { + r("AVM1Globals.showRedrawRegions"); }; - n.prototype.startDrag = function(c, e, d, b, g, h) { - a.AVM1Utils.resolveTarget(c).startDrag(e, 3 > arguments.length ? null : new l.geom.Rectangle(d, b, g - d, h - b)); + h.prototype.startDrag = function(c, d, f, b, e, h) { + a.AVM1Utils.resolveTarget(c).startDrag(d, 3 > arguments.length ? null : new t.geom.Rectangle(f, b, e - f, h - b)); }; - n.prototype.stop = function() { + h.prototype.stop = function() { a.AVM1Utils.resolveTarget().stop(); }; - n.prototype.stopAllSounds = function() { - l.media.SoundMixer.stopAll(); + h.prototype.stopAllSounds = function() { + t.media.SoundMixer.stopAll(); }; - n.prototype.stopDrag = function(c) { + h.prototype.stopDrag = function(c) { a.AVM1Utils.resolveTarget(c).stopDrag(); }; - n.prototype.substring = function(a, c, d) { + h.prototype.substring = function(a, c, d) { return this.mbsubstring(a, c, d); }; - n.prototype.targetPath = function(c) { + h.prototype.targetPath = function(c) { return a.AVM1Utils.resolveTarget(c)._target; }; - n.prototype.toggleHighQuality = function() { - s("AVM1Globals.toggleHighQuality"); + h.prototype.toggleHighQuality = function() { + r("AVM1Globals.toggleHighQuality"); }; - n.prototype.trace = function(a) { - c.AVM2.AS.Natives.print(a); + h.prototype.trace = function(a) { + d.AVM2.AS.Natives.print(a); }; - n.prototype.unloadMovie = function(c) { + h.prototype.unloadMovie = function(c) { a.AVM1Utils.resolveTarget(c).unloadMovie(); }; - n.prototype.unloadMovieNum = function(c) { + h.prototype.unloadMovieNum = function(c) { a.AVM1Utils.resolveLevel(c).unloadMovie(); }; - n.prototype.updateAfterEvent = function() { + h.prototype.updateAfterEvent = function() { v("AVM1Globals.updateAfterEvent"); }; - n.prototype._initializeFlashObject = function() { + h.prototype._initializeFlashObject = function() { this.flash = {}; this.flash.asSetPublicProperty("_MovieClip", this.MovieClip); var c = {}; @@ -46720,53 +46818,53 @@ __extends = this.__extends || function(c, h) { this.flash.asSetPublicProperty("external", c); this.flash.asSetPublicProperty("filters", {}); c = {}; - c.asSetPublicProperty("ColorTransform", l.geom.ColorTransform); - c.asSetPublicProperty("Matrix", l.geom.Matrix); - c.asSetPublicProperty("Point", l.geom.Point); - c.asSetPublicProperty("Rectangle", l.geom.Rectangle); + c.asSetPublicProperty("ColorTransform", t.geom.ColorTransform); + c.asSetPublicProperty("Matrix", t.geom.Matrix); + c.asSetPublicProperty("Point", t.geom.Point); + c.asSetPublicProperty("Rectangle", t.geom.Rectangle); c.asSetPublicProperty("Transform", a.AVM1Transform.createAVM1Class()); this.flash.asSetPublicProperty("geom", c); this.flash.asSetPublicProperty("text", {}); }; - n.prototype.toString = function() { + h.prototype.toString = function() { return "[type Object]"; }; - return n; + return h; }(); - a.AVM1Globals = t; - var q = "_x _y _xscale _yscale _currentframe _totalframes _alpha _visible _width _height _rotation _target _framesloaded _name _droptarget _url _highquality _focusrect _soundbuftime _quality _xmouse _ymouse".split(" "); - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1Globals = h; + var p = "_x _y _xscale _yscale _currentframe _totalframes _alpha _visible _width _height _rotation _target _framesloaded _name _droptarget _url _highquality _focusrect _soundbuftime _quality _xmouse _ymouse".split(" "); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var s = function() { - function s() { + var r = function() { + function r() { } - s.setAVM1Context = function(a) { + r.setAVM1Context = function(a) { this._context = a; }; - s.createAVM1Class = function() { - return a.wrapAVM1Class(s, ["initialize"], []); + r.createAVM1Class = function() { + return a.wrapAVM1Class(r, ["initialize"], []); }; - s.initialize = function(a) { - s.initializeWithContext(a, c.AVM1Context.instance); + r.initialize = function(a) { + r.initializeWithContext(a, d.AVM1Context.instance); }; - s.initializeWithContext = function(c, h) { - c.asSetPublicProperty("_listeners", []); - c.asSetPublicProperty("broadcastMessage", function(c) { - for (var e = [], m = 1;m < arguments.length;m++) { - e[m - 1] = arguments[m]; + r.initializeWithContext = function(d, k) { + d.asSetPublicProperty("_listeners", []); + d.asSetPublicProperty("broadcastMessage", function(d) { + for (var c = [], h = 1;h < arguments.length;h++) { + c[h - 1] = arguments[h]; } - a.avm1BroadcastEvent(h, this, c, e); + a.avm1BroadcastEvent(k, this, d, c); }); - c.asSetPublicProperty("addListener", function(a) { - h.utils.getProperty(this, "_listeners").push(a); + d.asSetPublicProperty("addListener", function(a) { + k.utils.getProperty(this, "_listeners").push(a); this.isAVM1Instance && this.updateAllEvents(); }); - c.asSetPublicProperty("removeListener", function(a) { - var c = h.utils.getProperty(this, "_listeners"); + d.asSetPublicProperty("removeListener", function(a) { + var c = k.utils.getProperty(this, "_listeners"); a = c.indexOf(a); if (0 > a) { return!1; @@ -46776,138 +46874,138 @@ __extends = this.__extends || function(c, h) { return!0; }); }; - return s; + return r; }(); - a.AVM1Broadcaster = s; - })(c.Lib || (c.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1Broadcaster = r; + })(d.Lib || (d.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { - function c() { + var d = function() { + function d() { } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, ["DOWN", "LEFT", "RIGHT", "UP", "isDown"], []); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, ["DOWN", "LEFT", "RIGHT", "UP", "isDown"], []); }; - c._bind = function(a, h) { + d._bind = function(a, k) { a.addEventListener("keyDown", function(a) { a = a.asGetPublicProperty("keyCode"); - c._lastKeyCode = a; - c._keyStates[a] = 1; - h.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyDown"]); + d._lastKeyCode = a; + d._keyStates[a] = 1; + k.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyDown"]); }, !1); a.addEventListener("keyUp", function(a) { a = a.asGetPublicProperty("keyCode"); - c._lastKeyCode = a; - delete c._keyStates[a]; - h.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyUp"]); + d._lastKeyCode = a; + delete d._keyStates[a]; + k.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyUp"]); }, !1); }; - c.isDown = function(a) { - return!!c._keyStates[a]; + d.isDown = function(a) { + return!!d._keyStates[a]; }; - c.DOWN = 40; - c.LEFT = 37; - c.RIGHT = 39; - c.UP = 38; - c._keyStates = []; - c._lastKeyCode = 0; - return c; + d.DOWN = 40; + d.LEFT = 37; + d.RIGHT = 39; + d.UP = 38; + d._keyStates = []; + d._lastKeyCode = 0; + return d; }(); - a.AVM1Key = c; - })(c.Lib || (c.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1Key = d; + })(d.Lib || (d.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { - function c() { + var d = function() { + function d() { } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, ["show", "hide"], []); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, ["show", "hide"], []); }; - c._bind = function(a, c) { + d._bind = function(a, d) { a.addEventListener("mouseDown", function(a) { - c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseDown"]); + d.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseDown"]); }, !1); a.addEventListener("mouseMove", function(a) { - c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]); + d.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]); }, !1); a.addEventListener("mouseOut", function(a) { - c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]); + d.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]); }, !1); a.addEventListener("mouseUp", function(a) { - c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseUp"]); + d.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseUp"]); }, !1); }; - c.hide = function() { + d.hide = function() { }; - c.show = function() { + d.show = function() { }; - return c; + return d; }(); - a.AVM1Mouse = c; - })(c.Lib || (c.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1Mouse = d; + })(d.Lib || (d.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function() { - function c() { + var d = function() { + function d() { } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, "align displayState fullScreenSourceRect height scaleMode showMenu width".split(" "), []); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, "align displayState fullScreenSourceRect height scaleMode showMenu width".split(" "), []); }; - Object.defineProperty(c, "align", {get:function() { + Object.defineProperty(d, "align", {get:function() { return a.AVM1Utils.currentStage.align; - }, set:function(c) { - a.AVM1Utils.currentStage.align = c; + }, set:function(d) { + a.AVM1Utils.currentStage.align = d; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "displayState", {get:function() { + Object.defineProperty(d, "displayState", {get:function() { return a.AVM1Utils.currentStage.displayState; - }, set:function(c) { - a.AVM1Utils.currentStage.displayState = c; + }, set:function(d) { + a.AVM1Utils.currentStage.displayState = d; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "fullScreenSourceRect", {get:function() { + Object.defineProperty(d, "fullScreenSourceRect", {get:function() { return a.AVM1Utils.currentStage.fullScreenSourceRect; - }, set:function(c) { - a.AVM1Utils.currentStage.fullScreenSourceRect = c; + }, set:function(d) { + a.AVM1Utils.currentStage.fullScreenSourceRect = d; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "height", {get:function() { + Object.defineProperty(d, "height", {get:function() { return a.AVM1Utils.currentStage.stageHeight; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "scaleMode", {get:function() { + Object.defineProperty(d, "scaleMode", {get:function() { return a.AVM1Utils.currentStage.scaleMode; - }, set:function(c) { - a.AVM1Utils.currentStage.scaleMode = c; + }, set:function(d) { + a.AVM1Utils.currentStage.scaleMode = d; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "showMenu", {get:function() { + Object.defineProperty(d, "showMenu", {get:function() { return a.AVM1Utils.currentStage.showDefaultContextMenu; - }, set:function(c) { - a.AVM1Utils.currentStage.showDefaultContextMenu = c; + }, set:function(d) { + a.AVM1Utils.currentStage.showDefaultContextMenu = d; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "width", {get:function() { + Object.defineProperty(d, "width", {get:function() { return a.AVM1Utils.currentStage.stageWidth; }, enumerable:!0, configurable:!0}); - return c; + return d; }(); - a.AVM1Stage = c; - })(c.Lib || (c.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1Stage = d; + })(d.Lib || (d.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.AVM2.AS.flash, v = c.Debug.assert, p = c.AVM2.ABC.Multiname, u = c.AVM2.Runtime.resolveMultinameProperty, l = Object.prototype.asGetProperty, e = Object.prototype.asHasProperty, m = Object.prototype.asGetEnumerableKeys, t = function(a) { - function c(e, d, b) { + var r = d.AVM2.AS.flash, v = d.AVM2.ABC.Multiname, u = d.AVM2.Runtime.resolveMultinameProperty, t = Object.prototype.asGetProperty, l = Object.prototype.asHasProperty, c = Object.prototype.asGetEnumerableKeys, h = function(a) { + function c(d, f, b) { void 0 === b && (b = null); - a.call(this, e, d, b); - this.propertyName = e; - this.eventName = d; + a.call(this, d, f, b); + this.propertyName = d; + this.eventName = f; this.argsConverter = b; } __extends(c, a); @@ -46915,359 +47013,359 @@ __extends = this.__extends || function(c, h) { a.as3Object.buttonMode = !0; }; return c; - }(a.AVM1EventHandler), q = function(n) { - function k() { - n.call(this); + }(a.AVM1EventHandler), p = function(p) { + function m() { + p.call(this); } - __extends(k, n); - k.createAVM1Class = function() { - return a.wrapAVM1Class(k, [], "_alpha attachAudio attachBitmap attachMovie beginFill beginBitmapFill beginGradientFill blendMode cacheAsBitmap _callFrame clear createEmptyMovieClip createTextField _currentframe curveTo _droptarget duplicateMovieClip enabled endFill filters _framesloaded focusEnabled _focusrect forceSmothing getBounds getBytesLoaded getBytesTotal getDepth getInstanceAtDepth getNextHighestDepth getRect getSWFVersion getTextSnapshot getURL globalToLocal gotoAndPlay gotoAndStop _height _highquality hitArea hitTest lineGradientStyle listStyle lineTo loadMovie loadVariables localToGlobal _lockroot menu moveTo _name nextFrame opaqueBackground _parent play prevFrame _quality removeMovieClip _rotation scale9Grid scrollRect setMask _soundbuftime startDrag stop stopDrag swapDepths tabChildren tabEnabled tabIndex _target _totalframes trackAsMenu transform toString unloadMovie _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale".split(" ")); + __extends(m, p); + m.createAVM1Class = function() { + return a.wrapAVM1Class(m, [], "_alpha attachAudio attachBitmap attachMovie beginFill beginBitmapFill beginGradientFill blendMode cacheAsBitmap _callFrame clear createEmptyMovieClip createTextField _currentframe curveTo _droptarget duplicateMovieClip enabled endFill filters _framesloaded focusEnabled _focusrect forceSmothing getBounds getBytesLoaded getBytesTotal getDepth getInstanceAtDepth getNextHighestDepth getRect getSWFVersion getTextSnapshot getURL globalToLocal gotoAndPlay gotoAndStop _height _highquality hitArea hitTest lineGradientStyle listStyle lineTo loadMovie loadVariables localToGlobal _lockroot menu moveTo _name nextFrame opaqueBackground _parent play prevFrame _quality removeMovieClip _rotation scale9Grid scrollRect setMask _soundbuftime startDrag stop stopDrag swapDepths tabChildren tabEnabled tabIndex _target _totalframes trackAsMenu transform toString unloadMovie _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale".split(" ")); }; - Object.defineProperty(k.prototype, "graphics", {get:function() { + Object.defineProperty(m.prototype, "graphics", {get:function() { return this.as3Object.graphics; }, enumerable:!0, configurable:!0}); - k.prototype.initAVM1SymbolInstance = function(a, d) { - n.prototype.initAVM1SymbolInstance.call(this, a, d); + m.prototype.initAVM1SymbolInstance = function(a, c) { + p.prototype.initAVM1SymbolInstance.call(this, a, c); this._boundExecuteFrameScripts = this._frameScripts = null; this._initEventsHandlers(); }; - k.prototype.__lookupChild = function(c) { + m.prototype.__lookupChild = function(c) { return "." == c ? this : ".." == c ? a.getAVM1Object(this.as3Object.parent, this.context) : a.getAVM1Object(this._lookupChildByName(c), this.context); }; - k.prototype._lookupChildByName = function(a) { + m.prototype._lookupChildByName = function(a) { a = asCoerceString(a); return this.as3Object._lookupChildByName(a); }; - Object.defineProperty(k.prototype, "__targetPath", {get:function() { + Object.defineProperty(m.prototype, "__targetPath", {get:function() { var a = this._target; return "/" != a ? "_level0" + a.replace(/\//g, ".") : "_level0"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_alpha", {get:function() { + Object.defineProperty(m.prototype, "_alpha", {get:function() { return this.as3Object.alpha; }, set:function(a) { this.as3Object.alpha = a; }, enumerable:!0, configurable:!0}); - k.prototype.attachAudio = function(a) { + m.prototype.attachAudio = function(a) { throw "Not implemented: attachAudio"; }; - k.prototype._constructMovieClipSymbol = function(a, d) { - var b = h.AVM1Context.instance.getAsset(a); + m.prototype._constructMovieClipSymbol = function(a, c) { + var b = k.AVM1Context.instance.getAsset(a); if (b) { - var c = Object.create(b.symbolProps); - c.avm1Name = d; - c.avm1SymbolClass = b.theClass; - b = s.display.MovieClip.initializeFrom(c); - s.display.MovieClip.instanceConstructorNoInitialize.call(b); + var e = Object.create(b.symbolProps); + e.avm1Name = c; + e.avm1SymbolClass = b.theClass; + b = r.display.MovieClip.initializeFrom(e); + r.display.MovieClip.instanceConstructorNoInitialize.call(b); return b; } }; - k.prototype.attachMovie = function(a, d, b, c) { - if (a = this._constructMovieClipSymbol(a, d)) { + m.prototype.attachMovie = function(a, c, b, e) { + if (a = this._constructMovieClipSymbol(a, c)) { b = this._insertChildAtDepth(a, b); - for (var e in c) { - b[e] = c[e]; + for (var d in e) { + b[d] = e[d]; } return b; } }; - k.prototype.beginFill = function(a, d) { - this.graphics.beginFill(a, d); + m.prototype.beginFill = function(a, c) { + this.graphics.beginFill(a, c); }; - k.prototype.beginBitmapFill = function(a, d, b, c) { - a instanceof s.display.BitmapData && this.graphics.beginBitmapFill(a, d, b, c); + m.prototype.beginBitmapFill = function(a, c, b, e) { + a instanceof r.display.BitmapData && this.graphics.beginBitmapFill(a, c, b, e); }; - k.prototype.beginGradientFill = function(a, d, b, c, e, k, h, l) { - this.graphics.beginGradientFill(a, d, b, c, e, k, h, l); + m.prototype.beginGradientFill = function(a, c, b, e, d, h, k, l) { + this.graphics.beginGradientFill(a, c, b, e, d, h, k, l); }; - Object.defineProperty(k.prototype, "blendMode", {get:function() { + Object.defineProperty(m.prototype, "blendMode", {get:function() { return this.as3Object.blendMode; }, set:function(a) { this.as3Object.blendMode = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "cacheAsBitmap", {get:function() { + Object.defineProperty(m.prototype, "cacheAsBitmap", {get:function() { return this.as3Object.cacheAsBitmap; }, set:function(a) { this.as3Object.cacheAsBitmap = a; }, enumerable:!0, configurable:!0}); - k.prototype._callFrame = function(a) { + m.prototype._callFrame = function(a) { }; - k.prototype.clear = function() { + m.prototype.clear = function() { this.graphics.clear(); }; - k.prototype._insertChildAtDepth = function(c, d) { + m.prototype._insertChildAtDepth = function(c, d) { var b = this.as3Object; b.addTimelineObjectAtDepth(c, Math.min(b.numChildren, d)); - return s.display.Bitmap.isType(c) ? null : a.getAVM1Object(c, this.context); + return r.display.Bitmap.isType(c) ? null : a.getAVM1Object(c, this.context); }; - k.prototype.createEmptyMovieClip = function(a, d) { - var b = new s.display.MovieClip; + m.prototype.createEmptyMovieClip = function(a, c) { + var b = new r.display.MovieClip; b.name = a; - return this._insertChildAtDepth(b, d); + return this._insertChildAtDepth(b, c); }; - k.prototype.createTextField = function(a, d, b, c, e, k) { - var h = new s.text.TextField; - h.name = a; - h.x = b; - h.y = c; - h.width = e; - h.height = k; - return this._insertChildAtDepth(h, d); + m.prototype.createTextField = function(a, c, b, e, d, h) { + var k = new r.text.TextField; + k.name = a; + k.x = b; + k.y = e; + k.width = d; + k.height = h; + return this._insertChildAtDepth(k, c); }; - Object.defineProperty(k.prototype, "_currentframe", {get:function() { + Object.defineProperty(m.prototype, "_currentframe", {get:function() { return this.as3Object.currentFrame; }, enumerable:!0, configurable:!0}); - k.prototype.curveTo = function(a, d, b, c) { - this.graphics.curveTo(a, d, b, c); + m.prototype.curveTo = function(a, c, b, e) { + this.graphics.curveTo(a, c, b, e); }; - Object.defineProperty(k.prototype, "_droptarget", {get:function() { + Object.defineProperty(m.prototype, "_droptarget", {get:function() { return this.as3Object.dropTarget; }, enumerable:!0, configurable:!0}); - k.prototype._duplicate = function(a, d, b) { + m.prototype._duplicate = function(a, c, b) { }; - k.prototype.duplicateMovieClip = function(c, d, b) { + m.prototype.duplicateMovieClip = function(c, d, b) { return a.getAVM1Object(this._duplicate(c, +d, b), this.context); }; - Object.defineProperty(k.prototype, "enabled", {get:function() { + Object.defineProperty(m.prototype, "enabled", {get:function() { return this.as3Object.enabled; }, set:function(a) { this.as3Object.enabled = a; }, enumerable:!0, configurable:!0}); - k.prototype.endFill = function() { + m.prototype.endFill = function() { this.graphics.endFill(); }; - Object.defineProperty(k.prototype, "filters", {get:function() { + Object.defineProperty(m.prototype, "filters", {get:function() { throw "Not implemented: get$filters"; }, set:function(a) { throw "Not implemented: set$filters"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "focusEnabled", {get:function() { + Object.defineProperty(m.prototype, "focusEnabled", {get:function() { throw "Not implemented: get$focusEnabled"; }, set:function(a) { throw "Not implemented: set$focusEnabled"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_focusrect", {get:function() { + Object.defineProperty(m.prototype, "_focusrect", {get:function() { throw "Not implemented: get$_focusrect"; }, set:function(a) { throw "Not implemented: set$_focusrect"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "forceSmoothing", {get:function() { + Object.defineProperty(m.prototype, "forceSmoothing", {get:function() { throw "Not implemented: get$forceSmoothing"; }, set:function(a) { throw "Not implemented: set$forceSmoothing"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_framesloaded", {get:function() { + Object.defineProperty(m.prototype, "_framesloaded", {get:function() { return this.as3Object.framesLoaded; }, enumerable:!0, configurable:!0}); - k.prototype.getBounds = function(a) { + m.prototype.getBounds = function(a) { a = a.as3Object; if (!a) { throw "Unsupported bounds type"; } return this.as3Object.getBounds(a); }; - k.prototype.getBytesLoaded = function() { + m.prototype.getBytesLoaded = function() { return this.as3Object.loaderInfo.bytesLoaded; }; - k.prototype.getBytesTotal = function() { + m.prototype.getBytesTotal = function() { return this.as3Object.loaderInfo.bytesTotal; }; - k.prototype.getDepth = function() { + m.prototype.getDepth = function() { return this.as3Object._depth; }; - k.prototype.getInstanceAtDepth = function(c) { + m.prototype.getInstanceAtDepth = function(c) { for (var d = this.as3Object, b = 0, e = d.numChildren;b < e;b++) { - var k = d._lookupChildByIndex(b); - if (k && k._depth === c) { - return s.display.Bitmap.isType(k) ? this : a.getAVM1Object(k, this.context); + var h = d._lookupChildByIndex(b); + if (h && h._depth === c) { + return r.display.Bitmap.isType(h) ? this : a.getAVM1Object(h, this.context); } } return null; }; - k.prototype.getNextHighestDepth = function() { - for (var a = this.as3Object, d = 0, b = 0, c = a.numChildren;b < c;b++) { - var e = a._lookupChildByIndex(b); - e._depth > d && (d = e._depth); + m.prototype.getNextHighestDepth = function() { + for (var a = this.as3Object, c = 0, b = 0, e = a.numChildren;b < e;b++) { + var d = a._lookupChildByIndex(b); + d._depth > c && (c = d._depth); } - return d + 1; + return c + 1; }; - k.prototype.getRect = function(a) { + m.prototype.getRect = function(a) { throw "Not implemented: getRect"; }; - k.prototype.getSWFVersion = function() { + m.prototype.getSWFVersion = function() { return this.as3Object.loaderInfo.swfVersion; }; - k.prototype.getTextSnapshot = function() { + m.prototype.getTextSnapshot = function() { throw "Not implemented: getTextSnapshot"; }; - k.prototype.getURL = function(a, d, b) { - a = new s.net.URLRequest(a); + m.prototype.getURL = function(a, c, b) { + a = new r.net.URLRequest(a); b && (a.method = b); - c.AVM2.AS.FlashNetScript_navigateToURL(a, d); + d.AVM2.AS.FlashNetScript_navigateToURL(a, c); }; - k.prototype.globalToLocal = function(a) { - var d = this.as3Object.globalToLocal(new s.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y"))); - a.asSetPublicProperty("x", d.x); - a.asSetPublicProperty("y", d.y); + m.prototype.globalToLocal = function(a) { + var c = this.as3Object.globalToLocal(new r.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y"))); + a.asSetPublicProperty("x", c.x); + a.asSetPublicProperty("y", c.y); }; - k.prototype.gotoAndPlay = function(a) { + m.prototype.gotoAndPlay = function(a) { return this.as3Object.gotoAndPlay(a); }; - k.prototype.gotoAndStop = function(a) { + m.prototype.gotoAndStop = function(a) { return this.as3Object.gotoAndStop(a); }; - Object.defineProperty(k.prototype, "_height", {get:function() { + Object.defineProperty(m.prototype, "_height", {get:function() { return this.as3Object.height; }, set:function(a) { isNaN(a) || (this.as3Object.height = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_highquality", {get:function() { + Object.defineProperty(m.prototype, "_highquality", {get:function() { return 1; }, set:function(a) { }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "hitArea", {get:function() { + Object.defineProperty(m.prototype, "hitArea", {get:function() { throw "Not implemented: get$hitArea"; }, set:function(a) { throw "Not implemented: set$hitArea"; }, enumerable:!0, configurable:!0}); - k.prototype.hitTest = function(a, d, b) { - return a instanceof k ? this.as3Object.hitTestObject(a.as3Object) : this.as3Object.hitTestPoint(a, d, b); + m.prototype.hitTest = function(a, c, b) { + return a instanceof m ? this.as3Object.hitTestObject(a.as3Object) : this.as3Object.hitTestPoint(a, c, b); }; - k.prototype.lineGradientStyle = function(a, d, b, c, e, k, h, l) { - this.graphics.lineGradientStyle(a, d, b, c, e, k, h, l); + m.prototype.lineGradientStyle = function(a, c, b, e, d, h, k, l) { + this.graphics.lineGradientStyle(a, c, b, e, d, h, k, l); }; - k.prototype.lineStyle = function(a, d, b, c, e, k, h, l) { - this.graphics.lineStyle(a, d, b, c, e, k, h, l); + m.prototype.lineStyle = function(a, c, b, e, d, h, k, l) { + this.graphics.lineStyle(a, c, b, e, d, h, k, l); }; - k.prototype.lineTo = function(a, d) { - this.graphics.lineTo(a, d); + m.prototype.lineTo = function(a, c) { + this.graphics.lineTo(a, c); }; - k.prototype.loadMovie = function(a, d) { + m.prototype.loadMovie = function(a, c) { function b(a) { - c.removeEventListener(s.events.Event.COMPLETE, b); + e.removeEventListener(r.events.Event.COMPLETE, b); a = this.as3Object.parent; - var d = a.getChildIndex(this.as3Object); + var c = a.getChildIndex(this.as3Object); a.removeChild(this.as3Object); - a.addChildAt(c.content, d); + a.addChildAt(e.content, c); } - var c = new s.display.Loader, e = new s.net.URLRequest(a); - d && (e.method = d); - c.load(e); - c.addEventListener(s.events.Event.COMPLETE, b); + var e = new r.display.Loader, d = new r.net.URLRequest(a); + c && (d.method = c); + e.load(d); + e.addEventListener(r.events.Event.COMPLETE, b); }; - k.prototype.loadVariables = function(a, d) { - this.context.globals._loadVariables(this, a, d); + m.prototype.loadVariables = function(a, c) { + this.context.globals._loadVariables(this, a, c); }; - k.prototype.localToGlobal = function(a) { - var d = this.as3Object.localToGlobal(new s.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y"))); - a.asSetPublicProperty("x", d.x); - a.asSetPublicProperty("y", d.y); + m.prototype.localToGlobal = function(a) { + var c = this.as3Object.localToGlobal(new r.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y"))); + a.asSetPublicProperty("x", c.x); + a.asSetPublicProperty("y", c.y); }; - Object.defineProperty(k.prototype, "_lockroot", {get:function() { + Object.defineProperty(m.prototype, "_lockroot", {get:function() { throw "Not implemented: get$_lockroot"; }, set:function(a) { throw "Not implemented: set$_lockroot"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "menu", {get:function() { + Object.defineProperty(m.prototype, "menu", {get:function() { return this.as3Object.contextMenu; }, set:function(a) { this.as3Object.contextMenu = a; }, enumerable:!0, configurable:!0}); - k.prototype.moveTo = function(a, d) { - this.graphics.moveTo(a, d); + m.prototype.moveTo = function(a, c) { + this.graphics.moveTo(a, c); }; - Object.defineProperty(k.prototype, "_name", {get:function() { + Object.defineProperty(m.prototype, "_name", {get:function() { return this.as3Object.name; }, set:function(a) { this.as3Object.name = a; }, enumerable:!0, configurable:!0}); - k.prototype.nextFrame = function() { + m.prototype.nextFrame = function() { this.as3Object.nextFrame(); }; - k.prototype.nextScene = function() { + m.prototype.nextScene = function() { this.as3Object.nextScene(); }; - Object.defineProperty(k.prototype, "opaqueBackground", {get:function() { + Object.defineProperty(m.prototype, "opaqueBackground", {get:function() { return this.as3Object.opaqueBackground; }, set:function(a) { this.as3Object.opaqueBackground = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_parent", {get:function() { + Object.defineProperty(m.prototype, "_parent", {get:function() { return a.getAVM1Object(this.as3Object.parent, this.context) || void 0; }, set:function(a) { throw "Not implemented: set$_parent"; }, enumerable:!0, configurable:!0}); - k.prototype.play = function() { + m.prototype.play = function() { this.as3Object.play(); }; - k.prototype.prevFrame = function() { + m.prototype.prevFrame = function() { this.as3Object.prevFrame(); }; - k.prototype.prevScene = function() { + m.prototype.prevScene = function() { this.as3Object.prevScene(); }; - Object.defineProperty(k.prototype, "_quality", {get:function() { + Object.defineProperty(m.prototype, "_quality", {get:function() { return "HIGH"; }, set:function(a) { }, enumerable:!0, configurable:!0}); - k.prototype.removeMovieClip = function() { + m.prototype.removeMovieClip = function() { this._parent.as3Object.removeChild(this.as3Object); }; - Object.defineProperty(k.prototype, "_rotation", {get:function() { + Object.defineProperty(m.prototype, "_rotation", {get:function() { return this.as3Object.rotation; }, set:function(a) { this.as3Object.rotation = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "scale9Grid", {get:function() { + Object.defineProperty(m.prototype, "scale9Grid", {get:function() { throw "Not implemented: get$scale9Grid"; }, set:function(a) { throw "Not implemented: set$scale9Grid"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "scrollRect", {get:function() { + Object.defineProperty(m.prototype, "scrollRect", {get:function() { throw "Not implemented: get$scrollRect"; }, set:function(a) { throw "Not implemented: set$scrollRect"; }, enumerable:!0, configurable:!0}); - k.prototype.setMask = function(c) { + m.prototype.setMask = function(c) { var d = this.as3Object; if (c = a.AVM1Utils.resolveMovieClip(c)) { d.mask = c.as3Object; } }; - Object.defineProperty(k.prototype, "_soundbuftime", {get:function() { + Object.defineProperty(m.prototype, "_soundbuftime", {get:function() { throw "Not implemented: get$_soundbuftime"; }, set:function(a) { throw "Not implemented: set$_soundbuftime"; }, enumerable:!0, configurable:!0}); - k.prototype.startDrag = function(a, d, b, c, e) { - this.as3Object.startDrag(a, 3 > arguments.length ? null : new s.geom.Rectangle(d, b, c - d, e - b)); + m.prototype.startDrag = function(a, c, b, e, d) { + this.as3Object.startDrag(a, 3 > arguments.length ? null : new r.geom.Rectangle(c, b, e - c, d - b)); }; - k.prototype.stop = function() { + m.prototype.stop = function() { return this.as3Object.stop(); }; - k.prototype.stopDrag = function() { + m.prototype.stopDrag = function() { return this.as3Object.stopDrag(); }; - k.prototype.swapDepths = function(c) { + m.prototype.swapDepths = function(c) { var d = this.as3Object; c = "number" === typeof c ? a.AVM1Utils.resolveLevel(Number(c)).as3Object : a.AVM1Utils.resolveTarget(c).as3Object; d.parent === c.parent && d.parent.swapChildren(d, c); }; - Object.defineProperty(k.prototype, "tabChildren", {get:function() { + Object.defineProperty(m.prototype, "tabChildren", {get:function() { return this.as3Object.tabChildren; }, set:function(a) { this.as3Object.tabChildren = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "tabEnabled", {get:function() { + Object.defineProperty(m.prototype, "tabEnabled", {get:function() { return this.as3Object.tabEnabled; }, set:function(a) { this.as3Object.tabEnabled = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "tabIndex", {get:function() { + Object.defineProperty(m.prototype, "tabIndex", {get:function() { return this.as3Object.tabIndex; }, set:function(a) { this.as3Object.tabIndex = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_target", {get:function() { + Object.defineProperty(m.prototype, "_target", {get:function() { var a = this.as3Object; if (a === a.root) { return "/"; @@ -47278,118 +47376,118 @@ __extends = this.__extends || function(c, h) { } while (a !== a.root); return c; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_totalframes", {get:function() { + Object.defineProperty(m.prototype, "_totalframes", {get:function() { return this.as3Object.totalFrames; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "trackAsMenu", {get:function() { + Object.defineProperty(m.prototype, "trackAsMenu", {get:function() { throw "Not implemented: get$trackAsMenu"; }, set:function(a) { throw "Not implemented: set$trackAsMenu"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "transform", {get:function() { + Object.defineProperty(m.prototype, "transform", {get:function() { throw "Not implemented: get$transform"; }, set:function(a) { throw "Not implemented: set$transform"; }, enumerable:!0, configurable:!0}); - k.prototype.toString = function() { + m.prototype.toString = function() { return this.as3Object.toString(); }; - k.prototype.unloadMovie = function() { + m.prototype.unloadMovie = function() { var a = this.as3Object, c = a.loaderInfo.loader; c.parent && c.parent.removeChild(c); a.stop(); }; - Object.defineProperty(k.prototype, "_url", {get:function() { + Object.defineProperty(m.prototype, "_url", {get:function() { return this.as3Object.loaderInfo.url; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "useHandCursor", {get:function() { + Object.defineProperty(m.prototype, "useHandCursor", {get:function() { return this.as3Object.useHandCursor; }, set:function(a) { this.as3Object.useHandCursor = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_visible", {get:function() { + Object.defineProperty(m.prototype, "_visible", {get:function() { return this.as3Object.visible; }, set:function(a) { this.as3Object.visible = 0 !== +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_width", {get:function() { + Object.defineProperty(m.prototype, "_width", {get:function() { return this.as3Object.width; }, set:function(a) { isNaN(a) || (this.as3Object.width = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_x", {get:function() { + Object.defineProperty(m.prototype, "_x", {get:function() { return this.as3Object.x; }, set:function(a) { isNaN(a) || (this.as3Object.x = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_xmouse", {get:function() { + Object.defineProperty(m.prototype, "_xmouse", {get:function() { return this.as3Object.mouseX; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_xscale", {get:function() { + Object.defineProperty(m.prototype, "_xscale", {get:function() { return 100 * this.as3Object.scaleX; }, set:function(a) { isNaN(a) || (this.as3Object.scaleX = a / 100); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_y", {get:function() { + Object.defineProperty(m.prototype, "_y", {get:function() { return this.as3Object.y; }, set:function(a) { isNaN(a) || (this.as3Object.y = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_ymouse", {get:function() { + Object.defineProperty(m.prototype, "_ymouse", {get:function() { return this.as3Object.mouseY; }, enumerable:!0, configurable:!0}); - Object.defineProperty(k.prototype, "_yscale", {get:function() { + Object.defineProperty(m.prototype, "_yscale", {get:function() { return 100 * this.as3Object.scaleY; }, set:function(a) { isNaN(a) || (this.as3Object.scaleY = a / 100); }, enumerable:!0, configurable:!0}); - k.prototype._resolveLevelNProperty = function(a) { + m.prototype._resolveLevelNProperty = function(a) { if ("_root" === a || "_level0" === a) { - return h.AVM1Context.instance.resolveLevel(0); + return k.AVM1Context.instance.resolveLevel(0); } if (0 === a.indexOf("_level")) { a = a.substring(6); var c = a | 0; if (0 < c && a == c) { - return h.AVM1Context.instance.resolveLevel(c); + return k.AVM1Context.instance.resolveLevel(c); } } return null; }; - k.prototype.asGetProperty = function(a, c, b) { - if (e.call(this, a, c, b)) { - return l.call(this, a, c, b); + m.prototype.asGetProperty = function(a, c, b) { + if (l.call(this, a, c, b)) { + return t.call(this, a, c, b); } if ("string" === typeof c && "_" === c[0]) { - var g = this._resolveLevelNProperty(c); - if (g) { - return g; + var e = this._resolveLevelNProperty(c); + if (e) { + return e; } } a = u(a, c, b); - if (p.isPublicQualifiedName(a) && this.isAVM1Instance) { - return this.__lookupChild(p.getNameFromPublicQualifiedName(a)); + if (v.isPublicQualifiedName(a) && this.isAVM1Instance) { + return this.__lookupChild(v.getNameFromPublicQualifiedName(a)); } }; - k.prototype.asHasProperty = function(a, c, b) { - if (e.call(this, a, c, b) || "string" === typeof c && "_" === c[0] && this._resolveLevelNProperty(c)) { + m.prototype.asHasProperty = function(a, c, b) { + if (l.call(this, a, c, b) || "string" === typeof c && "_" === c[0] && this._resolveLevelNProperty(c)) { return!0; } a = u(a, c, b); - return p.isPublicQualifiedName(a) && this.isAVM1Instance ? !!this.__lookupChild(p.getNameFromPublicQualifiedName(a)) : !1; + return v.isPublicQualifiedName(a) && this.isAVM1Instance ? !!this.__lookupChild(v.getNameFromPublicQualifiedName(a)) : !1; }; - k.prototype.asGetEnumerableKeys = function() { - var a = m.call(this); + m.prototype.asGetEnumerableKeys = function() { + var a = c.call(this); if (!this.isAVM1Instance) { return a; } - for (var c = this.as3Object, b = 0, g = c._children.length;b < g;b++) { - var k = c._children[b].name; - e.call(this, void 0, k, 0) || a.push(p.getPublicQualifiedName(k)); + for (var d = this.as3Object, b = 0, e = d._children.length;b < e;b++) { + var h = d._children[b].name; + l.call(this, void 0, h, 0) || a.push(v.getPublicQualifiedName(h)); } return a; }; - k.prototype.addFrameActionBlocks = function(a, c) { + m.prototype.addFrameActionBlocks = function(a, c) { var b = c.initActionBlocks, e = c.actionBlocks; b && this._addInitActionBlocks(a, b); if (e) { @@ -47398,52 +47496,50 @@ __extends = this.__extends || function(c, h) { } } }; - k.prototype.addFrameScript = function(a, c) { + m.prototype.addFrameScript = function(a, c) { var b = this._frameScripts; - b || (v(!this._boundExecuteFrameScripts), this._boundExecuteFrameScripts = this._executeFrameScripts.bind(this), b = this._frameScripts = []); + b || (this._boundExecuteFrameScripts = this._executeFrameScripts.bind(this), b = this._frameScripts = []); var e = b[a + 1]; e || (e = b[a + 1] = [], this.as3Object.addFrameScript(a, this._boundExecuteFrameScripts)); - b = new h.AVM1ActionsData(c, "f" + a + "i" + e.length); + b = new k.AVM1ActionsData(c, "f" + a + "i" + e.length); e.push(b); }; - k.prototype._addInitActionBlocks = function(a, c) { - function b(l) { + m.prototype._addInitActionBlocks = function(a, c) { + function b(h) { if (e.currentFrame === a + 1) { e.removeEventListener("enterFrame", b); - l = k.context; - for (var m = 0;m < c.length;m++) { - var n = new h.AVM1ActionsData(c[m].actionsData, "f" + a + "i" + m); - l.executeActions(n, k); + h = d.context; + for (var l = 0;l < c.length;l++) { + var m = new k.AVM1ActionsData(c[l].actionsData, "f" + a + "i" + l); + h.executeActions(m, d); } } } - var e = this.as3Object, k = this; + var e = this.as3Object, d = this; e.addEventListener("enterFrame", b); }; - k.prototype._executeFrameScripts = function() { - var a = this.context, c = this._frameScripts[this.as3Object.currentFrame]; - v(c && c.length); - for (var b = 0;b < c.length;b++) { + m.prototype._executeFrameScripts = function() { + for (var a = this.context, c = this._frameScripts[this.as3Object.currentFrame], b = 0;b < c.length;b++) { a.executeActions(c[b], this); } }; - k.prototype._initEventsHandlers = function() { + m.prototype._initEventsHandlers = function() { this.bindEvents([new a.AVM1EventHandler("onData", "data"), new a.AVM1EventHandler("onDragOut", "dragOut"), new a.AVM1EventHandler("onDragOver", "dragOver"), new a.AVM1EventHandler("onEnterFrame", "enterFrame"), new a.AVM1EventHandler("onKeyDown", "keyDown"), new a.AVM1EventHandler("onKeyUp", "keyUp"), new a.AVM1EventHandler("onKillFocus", "focusOut", function(a) { return[a.relatedObject]; - }), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new t("onPress", "mouseDown"), new t("onRelease", "mouseUp"), new t("onReleaseOutside", "releaseOutside"), new t("onRollOut", "mouseOut"), new t("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) { + }), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new h("onPress", "mouseDown"), new h("onRelease", "mouseUp"), new h("onReleaseOutside", "releaseOutside"), new h("onRollOut", "mouseOut"), new h("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) { return[a.relatedObject]; }), new a.AVM1EventHandler("onUnload", "unload")]); }; - return k; + return m; }(a.AVM1SymbolBase); - a.AVM1MovieClip = q; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1MovieClip = p; + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.Debug.somewhatImplemented, v; + var r = d.Debug.somewhatImplemented, v; (function(a) { a[a.IdleToOverUp = 1] = "IdleToOverUp"; a[a.OverUpToIdle = 2] = "OverUpToIdle"; @@ -47455,60 +47551,60 @@ __extends = this.__extends || function(c, h) { a[a.IdleToOverDown = 128] = "IdleToOverDown"; a[a.OverDownToIdle = 256] = "OverDownToIdle"; })(v || (v = {})); - var p = [-1, 37, 39, 36, 35, 45, 46, -1, 8, -1, -1, -1, -1, 13, 38, 40, 33, 34, 9, 27]; - v = function(c) { + var u = [-1, 37, 39, 36, 35, 45, 46, -1, 8, -1, -1, -1, -1, 13, 38, 40, 33, 34, 9, 27]; + v = function(d) { function l() { - c.apply(this, arguments); + d.apply(this, arguments); } - __extends(l, c); + __extends(l, d); l.createAVM1Class = function() { return a.wrapAVM1Class(l, [], "_alpha blendMode cacheAsBitmap enabled filters _focusrect getDepth _height _highquality menu _name _parent _quality _rotation scale9Grid _soundbuftime tabEnabled tabIndex _target trackAsMenu _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale".split(" ")); }; - l.prototype.initAVM1SymbolInstance = function(a, l) { - c.prototype.initAVM1SymbolInstance.call(this, a, l); - var p = this._as3Object; - if (p._symbol && p._symbol.data.buttonActions) { - p.buttonMode = !0; - p.addEventListener("addedToStage", this._addListeners.bind(this)); - p.addEventListener("removedFromStage", this._removeListeners.bind(this)); - for (var q = this._requiredListeners = Object.create(null), n = this._actions = p._symbol.data.buttonActions, k = 0;k < n.length;k++) { - var f = n[k]; - f.actionsBlock || (f.actionsBlock = new h.AVM1ActionsData(f.actionsData, "s" + p._symbol.id + "e" + k)); + l.prototype.initAVM1SymbolInstance = function(a, h) { + d.prototype.initAVM1SymbolInstance.call(this, a, h); + var l = this._as3Object; + if (l._symbol && l._symbol.data.buttonActions) { + l.buttonMode = !0; + l.addEventListener("addedToStage", this._addListeners.bind(this)); + l.addEventListener("removedFromStage", this._removeListeners.bind(this)); + for (var s = this._requiredListeners = Object.create(null), m = this._actions = l._symbol.data.buttonActions, g = 0;g < m.length;g++) { + var f = m[g]; + f.actionsBlock || (f.actionsBlock = new k.AVM1ActionsData(f.actionsData, "s" + l._symbol.id + "e" + g)); if (f.keyCode) { - q.keyDown = this._keyDownHandler.bind(this); + s.keyDown = this._keyDownHandler.bind(this); } else { - var d; + var b; switch(f.stateTransitionFlags) { case 64: - d = "releaseOutside"; + b = "releaseOutside"; break; case 1: - d = "rollOver"; + b = "rollOver"; break; case 2: - d = "rollOut"; + b = "rollOut"; break; case 4: - d = "mouseDown"; + b = "mouseDown"; break; case 8: - d = "mouseUp"; + b = "mouseUp"; break; case 16: ; case 32: - s("AVM1 drag over/out button actions"); + r("AVM1 drag over/out button actions"); break; case 128: ; case 256: - s("AVM1 drag trackAsMenu over/out button actions"); + r("AVM1 drag trackAsMenu over/out button actions"); break; default: console.warn("Unknown AVM1 button action type: " + f.stateTransitionFlags); continue; } - q[d] = this._mouseEventHandler.bind(this, f.stateTransitionFlags); + s[b] = this._mouseEventHandler.bind(this, f.stateTransitionFlags); } } } @@ -47663,14 +47759,14 @@ __extends = this.__extends || function(c, h) { } }; l.prototype._keyDownHandler = function(a) { - for (var c = this._actions, h = 0;h < c.length;h++) { - var l = c[h]; - l.keyCode && (32 > l.keyCode && p[l.keyCode] === a.asGetPublicProperty("keyCode") || l.keyCode === a.asGetPublicProperty("charCode")) && this._runAction(l); + for (var d = this._actions, k = 0;k < d.length;k++) { + var l = d[k]; + l.keyCode && (32 > l.keyCode && u[l.keyCode] === a.asGetPublicProperty("keyCode") || l.keyCode === a.asGetPublicProperty("charCode")) && this._runAction(l); } }; l.prototype._mouseEventHandler = function(a) { - for (var c = this._actions, h = 0;h < c.length;h++) { - var l = c[h]; + for (var d = this._actions, k = 0;k < d.length;k++) { + var l = d[k]; l.stateTransitionFlags === a && this._runAction(l); } }; @@ -47687,770 +47783,770 @@ __extends = this.__extends || function(c, h) { return l; }(a.AVM1SymbolBase); a.AVM1Button = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { +(function(d) { + (function(d) { (function(a) { - var c = function(c) { - function h() { - c.apply(this, arguments); + var d = function(d) { + function k() { + d.apply(this, arguments); } - __extends(h, c); - h.createAVM1Class = function() { - return a.wrapAVM1Class(h, [], "_alpha antiAliasType autoSize background backgroundColor border borderColor bottomScroll condenseWhite embedFonts getNewTextFormat getTextFormat _height _highquality hscroll html htmlText length maxChars maxhscroll maxscroll multiline _name _parent password _quality _rotation scroll selectable setNewTextFormat setTextFormat _soundbuftime tabEnabled tabIndex _target text textColor textHeight textWidth type _url _visible _width wordWrap _x _xmouse _xscale _y _ymouse _yscale".split(" ")); + __extends(k, d); + k.createAVM1Class = function() { + return a.wrapAVM1Class(k, [], "_alpha antiAliasType autoSize background backgroundColor border borderColor bottomScroll condenseWhite embedFonts getNewTextFormat getTextFormat _height _highquality hscroll html htmlText length maxChars maxhscroll maxscroll multiline _name _parent password _quality _rotation scroll selectable setNewTextFormat setTextFormat _soundbuftime tabEnabled tabIndex _target text textColor textHeight textWidth type _url _visible _width wordWrap _x _xmouse _xscale _y _ymouse _yscale".split(" ")); }; - h.prototype.initAVM1SymbolInstance = function(a, h) { - c.prototype.initAVM1SymbolInstance.call(this, a, h); + k.prototype.initAVM1SymbolInstance = function(a, k) { + d.prototype.initAVM1SymbolInstance.call(this, a, k); this._variable = ""; this._exitFrameHandler = null; - h._symbol && (this.variable = h._symbol.variableName || ""); + k._symbol && (this.variable = k._symbol.variableName || ""); this._initEventsHandlers(); }; - Object.defineProperty(h.prototype, "_alpha", {get:function() { + Object.defineProperty(k.prototype, "_alpha", {get:function() { return this._as3Object.alpha; }, set:function(a) { this._as3Object.alpha = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "antiAliasType", {get:function() { + Object.defineProperty(k.prototype, "antiAliasType", {get:function() { return this._as3Object.antiAliasType; }, set:function(a) { this._as3Object.antiAliasType = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "autoSize", {get:function() { + Object.defineProperty(k.prototype, "autoSize", {get:function() { return this._as3Object.autoSize; }, set:function(a) { !0 === a ? a = "left" : !1 === a && (a = "none"); this._as3Object.autoSize = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "background", {get:function() { + Object.defineProperty(k.prototype, "background", {get:function() { return this._as3Object.background; }, set:function(a) { this._as3Object.background = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "backgroundColor", {get:function() { + Object.defineProperty(k.prototype, "backgroundColor", {get:function() { return this._as3Object.backgroundColor; }, set:function(a) { this._as3Object.backgroundColor = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "border", {get:function() { + Object.defineProperty(k.prototype, "border", {get:function() { return this._as3Object.border; }, set:function(a) { this._as3Object.border = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "borderColor", {get:function() { + Object.defineProperty(k.prototype, "borderColor", {get:function() { return this._as3Object.borderColor; }, set:function(a) { this._as3Object.borderColor = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "bottomScroll", {get:function() { + Object.defineProperty(k.prototype, "bottomScroll", {get:function() { return this._as3Object.bottomScrollV; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "condenseWhite", {get:function() { + Object.defineProperty(k.prototype, "condenseWhite", {get:function() { return this._as3Object.condenseWhite; }, set:function(a) { this._as3Object.condenseWhite = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "embedFonts", {get:function() { + Object.defineProperty(k.prototype, "embedFonts", {get:function() { return this._as3Object.embedFonts; }, set:function(a) { this._as3Object.embedFonts = a; }, enumerable:!0, configurable:!0}); - h.prototype.getNewTextFormat = function() { + k.prototype.getNewTextFormat = function() { return this._as3Object.defaultTextFormat; }; - h.prototype.getTextFormat = function() { + k.prototype.getTextFormat = function() { return this._as3Object.getTextFormat; }; - Object.defineProperty(h.prototype, "_height", {get:function() { + Object.defineProperty(k.prototype, "_height", {get:function() { return this._as3Object.height; }, set:function(a) { isNaN(a) || (this._as3Object.height = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_highquality", {get:function() { + Object.defineProperty(k.prototype, "_highquality", {get:function() { return 1; }, set:function(a) { }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "hscroll", {get:function() { + Object.defineProperty(k.prototype, "hscroll", {get:function() { return this._as3Object.scrollH; }, set:function(a) { this._as3Object.scrollH = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "html", {get:function() { + Object.defineProperty(k.prototype, "html", {get:function() { throw "Not implemented: get$_html"; }, set:function(a) { throw "Not implemented: set$_html"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "htmlText", {get:function() { + Object.defineProperty(k.prototype, "htmlText", {get:function() { return this._as3Object.htmlText; }, set:function(a) { this._as3Object.htmlText = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "length", {get:function() { + Object.defineProperty(k.prototype, "length", {get:function() { return this._as3Object.length; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "maxChars", {get:function() { + Object.defineProperty(k.prototype, "maxChars", {get:function() { return this._as3Object.maxChars; }, set:function(a) { this._as3Object.maxChars = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "maxhscroll", {get:function() { + Object.defineProperty(k.prototype, "maxhscroll", {get:function() { return this._as3Object.maxScrollH; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "maxscroll", {get:function() { + Object.defineProperty(k.prototype, "maxscroll", {get:function() { return this._as3Object.maxScrollV; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "multiline", {get:function() { + Object.defineProperty(k.prototype, "multiline", {get:function() { return this._as3Object.multiline; }, set:function(a) { this._as3Object.multiline = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_name", {get:function() { + Object.defineProperty(k.prototype, "_name", {get:function() { return this.as3Object._name; }, set:function(a) { this.as3Object._name = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_parent", {get:function() { + Object.defineProperty(k.prototype, "_parent", {get:function() { return this._as3Object.parent; }, set:function(a) { throw "Not implemented: set$_parent"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "password", {get:function() { + Object.defineProperty(k.prototype, "password", {get:function() { return this._as3Object.displayAsPassword; }, set:function(a) { this._as3Object.displayAsPassword = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_quality", {get:function() { + Object.defineProperty(k.prototype, "_quality", {get:function() { return "HIGH"; }, set:function(a) { }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_rotation", {get:function() { + Object.defineProperty(k.prototype, "_rotation", {get:function() { return this._as3Object.rotation; }, set:function(a) { this._as3Object.rotation = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "scroll", {get:function() { + Object.defineProperty(k.prototype, "scroll", {get:function() { return this._as3Object.scrollV; }, set:function(a) { this._as3Object.scrollV = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "selectable", {get:function() { + Object.defineProperty(k.prototype, "selectable", {get:function() { return this._as3Object.selectable; }, set:function(a) { this._as3Object.selectable = a; }, enumerable:!0, configurable:!0}); - h.prototype.setNewTextFormat = function(a) { + k.prototype.setNewTextFormat = function(a) { this._as3Object.defaultTextFormat = a; }; - h.prototype.setTextFormat = function() { + k.prototype.setTextFormat = function() { this._as3Object.setTextFormat.apply(this._as3Object, arguments); }; - Object.defineProperty(h.prototype, "_soundbuftime", {get:function() { + Object.defineProperty(k.prototype, "_soundbuftime", {get:function() { throw "Not implemented: get$_soundbuftime"; }, set:function(a) { throw "Not implemented: set$_soundbuftime"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "tabEnabled", {get:function() { + Object.defineProperty(k.prototype, "tabEnabled", {get:function() { return this._as3Object.tabEnabled; }, set:function(a) { this._as3Object.tabEnabled = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "tabIndex", {get:function() { + Object.defineProperty(k.prototype, "tabIndex", {get:function() { return this._as3Object.tabIndex; }, set:function(a) { this._as3Object.tabIndex = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_target", {get:function() { + Object.defineProperty(k.prototype, "_target", {get:function() { return a.AVM1Utils.getTarget(this); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "text", {get:function() { + Object.defineProperty(k.prototype, "text", {get:function() { return this._as3Object.text; }, set:function(a) { this._as3Object.text = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "textColor", {get:function() { + Object.defineProperty(k.prototype, "textColor", {get:function() { return this._as3Object.textColor; }, set:function(a) { this._as3Object.textColor = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "textHeight", {get:function() { + Object.defineProperty(k.prototype, "textHeight", {get:function() { return this._as3Object.textHeight; }, set:function(a) { throw "Not supported: set$textHeight"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "textWidth", {get:function() { + Object.defineProperty(k.prototype, "textWidth", {get:function() { return this._as3Object.textWidth; }, set:function(a) { throw "Not supported: set$textWidth"; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "type", {get:function() { + Object.defineProperty(k.prototype, "type", {get:function() { return this._as3Object.type; }, set:function(a) { this._as3Object.type = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_url", {get:function() { + Object.defineProperty(k.prototype, "_url", {get:function() { return this._as3Object.loaderInfo.url; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "variable", {get:function() { + Object.defineProperty(k.prototype, "variable", {get:function() { return this._variable; }, set:function(a) { if (a !== this._variable) { - var c = this.as3Object; - this._exitFrameHandler && !a && (c.removeEventListener("exitFrame", this._exitFrameHandler), this._exitFrameHandler = null); + var d = this.as3Object; + this._exitFrameHandler && !a && (d.removeEventListener("exitFrame", this._exitFrameHandler), this._exitFrameHandler = null); this._variable = a; - !this._exitFrameHandler && a && (this._exitFrameHandler = this._onAS3ObjectExitFrame.bind(this), c.addEventListener("exitFrame", this._exitFrameHandler)); + !this._exitFrameHandler && a && (this._exitFrameHandler = this._onAS3ObjectExitFrame.bind(this), d.addEventListener("exitFrame", this._exitFrameHandler)); } }, enumerable:!0, configurable:!0}); - h.prototype._onAS3ObjectExitFrame = function() { + k.prototype._onAS3ObjectExitFrame = function() { this._syncTextFieldValue(this.as3Object, this._variable); }; - h.prototype._syncTextFieldValue = function(c, h) { - var e; - e = 0 <= h.indexOf(".") || 0 <= h.indexOf(":"); - var m = this.context.utils; - if (e) { - var p = h.split(/[.:\/]/g); - h = p.pop(); + k.prototype._syncTextFieldValue = function(d, k) { + var c; + c = 0 <= k.indexOf(".") || 0 <= k.indexOf(":"); + var h = this.context.utils; + if (c) { + var p = k.split(/[.:\/]/g); + k = p.pop(); if ("_root" == p[0] || "" === p[0]) { - if (null === c.root) { + if (null === d.root) { return; } - e = a.getAVM1Object(c.root, this.context); + c = a.getAVM1Object(d.root, this.context); p.shift(); "" === p[0] && p.shift(); } else { - e = a.getAVM1Object(c._parent, this.context); + c = a.getAVM1Object(d._parent, this.context); } for (;0 < p.length;) { - var q = p.shift(); - e = m.getProperty(e, q); - if (!e) { + var r = p.shift(); + c = h.getProperty(c, r); + if (!c) { return; } } } else { - e = a.getAVM1Object(c._parent, this.context); + c = a.getAVM1Object(d._parent, this.context); } - m.hasProperty(e, h) || m.setProperty(e, h, c.text); - c.text = "" + m.getProperty(e, h); + h.hasProperty(c, k) || h.setProperty(c, k, d.text); + d.text = "" + h.getProperty(c, k); }; - Object.defineProperty(h.prototype, "_visible", {get:function() { + Object.defineProperty(k.prototype, "_visible", {get:function() { return this._as3Object.visible; }, set:function(a) { this._as3Object.visible = 0 !== +a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_width", {get:function() { + Object.defineProperty(k.prototype, "_width", {get:function() { return this._as3Object.width; }, set:function(a) { isNaN(a) || (this._as3Object.width = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "wordWrap", {get:function() { + Object.defineProperty(k.prototype, "wordWrap", {get:function() { return this._as3Object.wordWrap; }, set:function(a) { this._as3Object.wordWrap = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_x", {get:function() { + Object.defineProperty(k.prototype, "_x", {get:function() { return this._as3Object.x; }, set:function(a) { isNaN(a) || (this._as3Object.x = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_xmouse", {get:function() { + Object.defineProperty(k.prototype, "_xmouse", {get:function() { return this._as3Object.mouseX; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_xscale", {get:function() { + Object.defineProperty(k.prototype, "_xscale", {get:function() { return this._as3Object.scaleX; }, set:function(a) { isNaN(a) || (this._as3Object.scaleX = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_y", {get:function() { + Object.defineProperty(k.prototype, "_y", {get:function() { return this._as3Object.y; }, set:function(a) { isNaN(a) || (this._as3Object.y = a); }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_ymouse", {get:function() { + Object.defineProperty(k.prototype, "_ymouse", {get:function() { return this._as3Object.mouseY; }, enumerable:!0, configurable:!0}); - Object.defineProperty(h.prototype, "_yscale", {get:function() { + Object.defineProperty(k.prototype, "_yscale", {get:function() { return this._as3Object.scaleY; }, set:function(a) { isNaN(a) || (this._as3Object.scaleY = a); }, enumerable:!0, configurable:!0}); - h.prototype._initEventsHandlers = function() { + k.prototype._initEventsHandlers = function() { this.bindEvents([new a.AVM1EventHandler("onDragOut", "dragOut"), new a.AVM1EventHandler("onDragOver", "dragOver"), new a.AVM1EventHandler("onKeyDown", "keyDown"), new a.AVM1EventHandler("onKeyUp", "keyUp"), new a.AVM1EventHandler("onKillFocus", "focusOut", function(a) { return[a.relatedObject]; }), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new a.AVM1EventHandler("onPress", "mouseDown"), new a.AVM1EventHandler("onRelease", "mouseUp"), new a.AVM1EventHandler("onReleaseOutside", "releaseOutside"), new a.AVM1EventHandler("onRollOut", "mouseOut"), new a.AVM1EventHandler("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) { return[a.relatedObject]; })]); }; - return h; + return k; }(a.AVM1SymbolBase); - a.AVM1TextField = c; - })(c.Lib || (c.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + a.AVM1TextField = d; + })(d.Lib || (d.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function() { - function c(h) { - this._target = a.AVM1Utils.resolveTarget(h); + var k = d.AVM2.AS.flash, v = function() { + function d(k) { + this._target = a.AVM1Utils.resolveTarget(k); } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, [], ["getRGB", "getTransform", "setRGB", "setTransform"]); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, [], ["getRGB", "getTransform", "setRGB", "setTransform"]); }; - c.prototype.getRGB = function() { + d.prototype.getRGB = function() { return this.getTransform().asGetPublicProperty("color"); }; - c.prototype.getTransform = function() { + d.prototype.getTransform = function() { return this._target.as3Object.transform.colorTransform; }; - c.prototype.setRGB = function(a) { - var c = new h.geom.ColorTransform; - c.asSetPublicProperty("color", a); - this.setTransform(c); + d.prototype.setRGB = function(a) { + var d = new k.geom.ColorTransform; + d.asSetPublicProperty("color", a); + this.setTransform(d); }; - c.prototype.setTransform = function(a) { + d.prototype.setTransform = function(a) { this._target.as3Object.transform.colorTransform = a; }; - return c; + return d; }(); a.AVM1Color = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function() { - function c(h) { - this._target = a.AVM1Utils.resolveTarget(h); + var k = d.AVM2.AS.flash, v = function() { + function d(k) { + this._target = a.AVM1Utils.resolveTarget(k); } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, [], ["matrix", "concatenatedMatrix", "colorTransform", "pixelBounds"]); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, [], ["matrix", "concatenatedMatrix", "colorTransform", "pixelBounds"]); }; - Object.defineProperty(c.prototype, "matrix", {get:function() { + Object.defineProperty(d.prototype, "matrix", {get:function() { return this._target.as3Object.transform.matrix; }, set:function(a) { - if (a instanceof h.geom.Matrix) { + if (a instanceof k.geom.Matrix) { this._target.as3Object.transform.matrix = a; } else { if (null != a) { - var c = this.matrix; - a.asHasProperty(void 0, "a", 0) && (c.a = a.asGetPublicProperty("a")); - a.asHasProperty(void 0, "b", 0) && (c.b = a.asGetPublicProperty("b")); - a.asHasProperty(void 0, "c", 0) && (c.c = a.asGetPublicProperty("c")); - a.asHasProperty(void 0, "d", 0) && (c.d = a.asGetPublicProperty("d")); - a.asHasProperty(void 0, "tx", 0) && (c.tx = a.asGetPublicProperty("tx")); - a.asHasProperty(void 0, "ty", 0) && (c.ty = a.asGetPublicProperty("ty")); - this._target.as3Object.transform.matrix = c; + var d = this.matrix; + a.asHasProperty(void 0, "a", 0) && (d.a = a.asGetPublicProperty("a")); + a.asHasProperty(void 0, "b", 0) && (d.b = a.asGetPublicProperty("b")); + a.asHasProperty(void 0, "c", 0) && (d.c = a.asGetPublicProperty("c")); + a.asHasProperty(void 0, "d", 0) && (d.d = a.asGetPublicProperty("d")); + a.asHasProperty(void 0, "tx", 0) && (d.tx = a.asGetPublicProperty("tx")); + a.asHasProperty(void 0, "ty", 0) && (d.ty = a.asGetPublicProperty("ty")); + this._target.as3Object.transform.matrix = d; } } }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "concatenatedMatrix", {get:function() { + Object.defineProperty(d.prototype, "concatenatedMatrix", {get:function() { return this._target.as3Object.transform.concatenatedMatrix; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "colorTransform", {get:function() { + Object.defineProperty(d.prototype, "colorTransform", {get:function() { return this._target.as3Object.transform.colorTransform; }, set:function(a) { this._target.as3Object.transform.colorTransform = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c.prototype, "pixelBounds", {get:function() { + Object.defineProperty(d.prototype, "pixelBounds", {get:function() { return this._target.as3Object.pixelBounds; }, enumerable:!0, configurable:!0}); - return c; + return d; }(); a.AVM1Transform = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.Debug.notImplemented, v = Object.prototype.asGetProperty, p = Object.prototype.asSetProperty, u = Object.prototype.asCallProperty, l = Object.prototype.asHasProperty, e = Object.prototype.asHasOwnProperty, m = Object.prototype.asHasTraitProperty, t = Object.prototype.asDeleteProperty, q = function(c) { - function k() { + var k = d.Debug.notImplemented, v = Object.prototype.asGetProperty, u = Object.prototype.asSetProperty, t = Object.prototype.asCallProperty, l = Object.prototype.asHasProperty, c = Object.prototype.asHasOwnProperty, h = Object.prototype.asHasTraitProperty, p = Object.prototype.asDeleteProperty, s = function(d) { + function g() { } - __extends(k, c); - k.prototype.setTarget = function(a) { + __extends(g, d); + g.prototype.setTarget = function(a) { this._target = a; }; - k.prototype._isInternalProperty = function(a, c, b) { - return!this._target || a || "__proto__" === c || "__constructor__" === c ? !0 : !1; + g.prototype._isInternalProperty = function(a, b, c) { + return!this._target || a || "__proto__" === b || "__constructor__" === b ? !0 : !1; }; - k.prototype.asGetProperty = function(a, c, b) { - return this._isInternalProperty(a, c, b) ? v.call(this, a, c, b) : this._target.asGetPublicProperty(c); + g.prototype.asGetProperty = function(a, b, c) { + return this._isInternalProperty(a, b, c) ? v.call(this, a, b, c) : this._target.asGetPublicProperty(b); }; - k.prototype.asGetNumericProperty = function(a) { + g.prototype.asGetNumericProperty = function(a) { return this._target.asGetNumericProperty(a); }; - k.prototype.asSetNumericProperty = function(a, c) { - return this._target.asSetNumericProperty(a, c); + g.prototype.asSetNumericProperty = function(a, b) { + return this._target.asSetNumericProperty(a, b); }; - k.prototype.asSetProperty = function(a, c, b, e) { - if (this._isInternalProperty(a, c, b)) { - p.call(this, a, c, b, e); + g.prototype.asSetProperty = function(a, b, c, d) { + if (this._isInternalProperty(a, b, c)) { + u.call(this, a, b, c, d); } else { - return this._target.asSetPublicProperty(c, e); + return this._target.asSetPublicProperty(b, d); } }; - k.prototype.asCallProperty = function(a, c, b, e, k) { - return this._isInternalProperty(a, c, b) ? u.call(this, a, c, b, !1, k) : this._target.asCallPublicProperty(c, k); + g.prototype.asCallProperty = function(a, b, c, d, g) { + return this._isInternalProperty(a, b, c) ? t.call(this, a, b, c, !1, g) : this._target.asCallPublicProperty(b, g); }; - k.prototype.asHasProperty = function(a, c, b) { - return this._isInternalProperty(a, c, b) ? l.call(this, a, c, b) : this._target.asHasProperty(void 0, c, 0); + g.prototype.asHasProperty = function(a, b, c) { + return this._isInternalProperty(a, b, c) ? l.call(this, a, b, c) : this._target.asHasProperty(void 0, b, 0); }; - k.prototype.asHasOwnProperty = function(a, c, b) { - return this._isInternalProperty(a, c, b) ? e.call(this, a, c, b) : this._target.asHasOwnProperty(void 0, c, 0); + g.prototype.asHasOwnProperty = function(a, b, e) { + return this._isInternalProperty(a, b, e) ? c.call(this, a, b, e) : this._target.asHasOwnProperty(void 0, b, 0); }; - k.prototype.asDeleteProperty = function(a, c, b) { - if (m.call(this, a, c, b)) { - return t.call(this, a, c, b); + g.prototype.asDeleteProperty = function(a, b, c) { + if (h.call(this, a, b, c)) { + return p.call(this, a, b, c); } - h("AVM1Proxy asDeleteProperty"); + k("AVM1Proxy asDeleteProperty"); return!1; }; - k.prototype.asNextName = function(a) { - h("AVM1Proxy asNextName"); + g.prototype.asNextName = function(a) { + k("AVM1Proxy asNextName"); }; - k.prototype.asNextValue = function(a) { - h("AVM1Proxy asNextValue"); + g.prototype.asNextValue = function(a) { + k("AVM1Proxy asNextValue"); }; - k.prototype.asNextNameIndex = function(a) { - h("AVM1Proxy asNextNameIndex"); + g.prototype.asNextNameIndex = function(a) { + k("AVM1Proxy asNextNameIndex"); }; - k.prototype.proxyNativeMethod = function(a) { + g.prototype.proxyNativeMethod = function(a) { this._target.asSetPublicProperty(a, this._target[a].bind(this._target)); }; - k.wrap = function(c, d) { - function b() { - var b = Object.create(c.prototype); - a.AVM1TextFormat.apply(b, arguments); - this.setTarget(b); - d && d.methods && d.methods.forEach(this.proxyNativeMethod, this); + g.wrap = function(c, b) { + function e() { + var e = Object.create(c.prototype); + a.AVM1TextFormat.apply(e, arguments); + this.setTarget(e); + b && b.methods && b.methods.forEach(this.proxyNativeMethod, this); } - b.prototype = k.prototype; - return b; + e.prototype = g.prototype; + return e; }; - return k; - }(c.AVM2.AS.ASObject); - a.AVM1Proxy = q; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + return g; + }(d.AVM2.AS.ASObject); + a.AVM1Proxy = s; + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = c.AVM2.Runtime.asCoerceString, p = function(c) { - function l(a, c, l, p, n, k, f, d, b, g, r, w, u) { - h.text.TextFormat.apply(this, arguments); + var k = d.AVM2.AS.flash, v = d.AVM2.Runtime.asCoerceString, u = function(d) { + function l(a, d, l, s, m, g, f, b, e, q, n, t, u) { + k.text.TextFormat.apply(this, arguments); } - __extends(l, c); + __extends(l, d); l.createAVM1Class = function() { return a.AVM1Proxy.wrap(l, {methods:["getTextExtent"]}); }; - l.prototype.getTextExtent = function(a, c) { + l.prototype.getTextExtent = function(a, d) { a = v(a); - c = +c; + d = +d; var p = l._measureTextField; - p || (p = new h.text.TextField, p.multiline = !0, l._measureTextField = p); - !isNaN(c) && 0 < c ? (p.width = c + 4, p.wordWrap = !0) : p.wordWrap = !1; + p || (p = new k.text.TextField, p.multiline = !0, l._measureTextField = p); + !isNaN(d) && 0 < d ? (p.width = d + 4, p.wordWrap = !0) : p.wordWrap = !1; p.defaultTextFormat = this; p.text = a; - var q = {}, n = p.textWidth, k = p.textHeight; - q.asSetPublicProperty("width", n); - q.asSetPublicProperty("height", k); - q.asSetPublicProperty("textFieldWidth", n + 4); - q.asSetPublicProperty("textFieldHeight", k + 4); + var s = {}, m = p.textWidth, g = p.textHeight; + s.asSetPublicProperty("width", m); + s.asSetPublicProperty("height", g); + s.asSetPublicProperty("textFieldWidth", m + 4); + s.asSetPublicProperty("textFieldHeight", g + 4); p = p.getLineMetrics(); - q.asSetPublicProperty("ascent", p.asGetPublicProperty("ascent")); - q.asSetPublicProperty("descent", p.asGetPublicProperty("descent")); - return q; + s.asSetPublicProperty("ascent", p.asGetPublicProperty("ascent")); + s.asSetPublicProperty("descent", p.asGetPublicProperty("descent")); + return s; }; return l; - }(h.text.TextFormat); - a.AVM1TextFormat = p; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + }(k.text.TextFormat); + a.AVM1TextFormat = u; + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var s = c.AVM2.AS.flash, v = function(c) { - function u() { - c.apply(this, arguments); + var r = d.AVM2.AS.flash, v = function(d) { + function t() { + d.apply(this, arguments); } - __extends(u, c); - u.createAVM1Class = function() { - var c = a.AVM1Proxy.wrap(u, null); - c.asSetPublicProperty("loadBitmap", u.loadBitmap); - return c; + __extends(t, d); + t.createAVM1Class = function() { + var d = a.AVM1Proxy.wrap(t, null); + d.asSetPublicProperty("loadBitmap", t.loadBitmap); + return d; }; - u.loadBitmap = function(a) { + t.loadBitmap = function(a) { a = asCoerceString(a); - return(a = h.AVM1Context.instance.getAsset(a)) && a.symbolProps instanceof s.display.BitmapSymbol ? (a = u.initializeFrom(a), a.class.instanceConstructorNoInitialize.call(a), a) : null; + return(a = k.AVM1Context.instance.getAsset(a)) && a.symbolProps instanceof r.display.BitmapSymbol ? (a = t.initializeFrom(a), a.class.instanceConstructorNoInitialize.call(a), a) : null; }; - return u; - }(s.display.BitmapData); + return t; + }(r.display.BitmapData); a.AVM1BitmapData = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function() { - function c() { + var k = d.AVM2.AS.flash, v = function() { + function d() { } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, ["available", "addCallback", "call"], []); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, ["available", "addCallback", "call"], []); }; - Object.defineProperty(c, "available", {get:function() { - return h.external.ExternalInterface.asGetPublicProperty("available"); + Object.defineProperty(d, "available", {get:function() { + return k.external.ExternalInterface.asGetPublicProperty("available"); }, enumerable:!0, configurable:!0}); - c.addCallback = function(a, c, e) { + d.addCallback = function(a, d, c) { try { - return h.external.ExternalInterface.asCallPublicProperty("addCallback", [a, function() { - return e.apply(c, arguments); + return k.external.ExternalInterface.asCallPublicProperty("addCallback", [a, function() { + return c.apply(d, arguments); }]), !0; - } catch (m) { + } catch (h) { } return!1; }; - c.call = function(a) { - var c = Array.prototype.slice.call(arguments, 0); - return h.external.ExternalInterface.asCallPublicProperty("call", c); + d.call = function(a) { + var d = Array.prototype.slice.call(arguments, 0); + return k.external.ExternalInterface.asCallPublicProperty("call", d); }; - return c; + return d; }(); a.AVM1ExternalInterface = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function(c) { - function u(h) { - c.call(this); - this._target = a.AVM1Utils.resolveTarget(h); + var k = d.AVM2.AS.flash, v = function(d) { + function t(k) { + d.call(this); + this._target = a.AVM1Utils.resolveTarget(k); this._linkageID = this._channel = this._sound = null; } - __extends(u, c); - u.createAVM1Class = function() { - return a.wrapAVM1Class(u, [], "attachSound duration getBytesLoaded getBytesTotal getPan setPan getTransform setTransform getVolume setVolume start stop".split(" ")); + __extends(t, d); + t.createAVM1Class = function() { + return a.wrapAVM1Class(t, [], "attachSound duration getBytesLoaded getBytesTotal getPan setPan getTransform setTransform getVolume setVolume start stop".split(" ")); }; - u.prototype.attachSound = function(a) { + t.prototype.attachSound = function(a) { var c = this.context.getAsset(a); - c && (c = Object.create(c.symbolProps), c = h.media.Sound.initializeFrom(c), h.media.Sound.instanceConstructorNoInitialize.call(c), this._linkageID = a, this._sound = c); + c && (c = Object.create(c.symbolProps), c = k.media.Sound.initializeFrom(c), k.media.Sound.instanceConstructorNoInitialize.call(c), this._linkageID = a, this._sound = c); }; - u.prototype.loadSound = function(a, c) { + t.prototype.loadSound = function(a, c) { }; - u.prototype.getBytesLoaded = function() { + t.prototype.getBytesLoaded = function() { return 0; }; - u.prototype.getBytesTotal = function() { + t.prototype.getBytesTotal = function() { return 0; }; - u.prototype.getPan = function() { + t.prototype.getPan = function() { var a = this._channel && this._channel.soundTransform; return a ? 100 * a.asGetPublicProperty("pan") : 0; }; - u.prototype.setPan = function(a) { + t.prototype.setPan = function(a) { var c = this._channel && this._channel.soundTransform; c && (c.asSetPublicProperty("pan", a / 100), this._channel.soundTransform = c); }; - u.prototype.getTransform = function() { + t.prototype.getTransform = function() { return null; }; - u.prototype.setTransform = function(a) { + t.prototype.setTransform = function(a) { }; - u.prototype.getVolume = function() { + t.prototype.getVolume = function() { var a = this._channel && this._channel.soundTransform; return a ? 100 * a.asGetPublicProperty("volume") : 0; }; - u.prototype.setVolume = function(a) { + t.prototype.setVolume = function(a) { var c = this._channel && this._channel.soundTransform; c && (c.asSetPublicProperty("volume", a / 100), this._channel.soundTransform = c); }; - u.prototype.start = function(a, c) { + t.prototype.start = function(a, c) { this._sound && (a = isNaN(a) || 0 > a ? 0 : +a, c = isNaN(c) || 1 > c ? 1 : Math.floor(c), this._stopSoundChannel(), this._channel = this._sound.play(a, c - 1)); }; - u.prototype._stopSoundChannel = function() { + t.prototype._stopSoundChannel = function() { this._channel && (this._channel.stop(), this._channel = null); }; - u.prototype.stop = function(a) { + t.prototype.stop = function(a) { a && a !== this._linkageID || this._stopSoundChannel(); }; - return u; + return t; }(a.AVM1NativeObject); a.AVM1Sound = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function() { - function c() { + var k = d.AVM2.AS.flash, v = function() { + function d() { } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, ["capabilities", "security"], []); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, ["capabilities", "security"], []); }; - Object.defineProperty(c, "capabilities", {get:function() { - return h.system.Capabilities; + Object.defineProperty(d, "capabilities", {get:function() { + return k.system.Capabilities; }, enumerable:!0, configurable:!0}); - Object.defineProperty(c, "security", {get:function() { - return h.system.Security; + Object.defineProperty(d, "security", {get:function() { + return k.system.Security; }, enumerable:!0, configurable:!0}); - return c; + return d; }(); a.AVM1System = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = function() { - function c() { - this._loader = new h.display.Loader; + var k = d.AVM2.AS.flash, v = function() { + function d() { + this._loader = new k.display.Loader; } - c.createAVM1Class = function() { - return a.wrapAVM1Class(c, [], ["loadClip", "unloadClip", "getProgress"]); + d.createAVM1Class = function() { + return a.wrapAVM1Class(d, [], ["loadClip", "unloadClip", "getProgress"]); }; - c.prototype.initAVM1ObjectInstance = function(a) { + d.prototype.initAVM1ObjectInstance = function(a) { }; - c.prototype.loadClip = function(c, l) { + d.prototype.loadClip = function(d, l) { this._target = "number" === typeof l ? a.AVM1Utils.resolveLevel(l) : a.AVM1Utils.resolveTarget(l); this._target.as3Object.addChild(this._loader); - this._loader.contentLoaderInfo.addEventListener(h.events.Event.OPEN, this.openHandler.bind(this)); - this._loader.contentLoaderInfo.addEventListener(h.events.ProgressEvent.PROGRESS, this.progressHandler.bind(this)); - this._loader.contentLoaderInfo.addEventListener(h.events.IOErrorEvent.IO_ERROR, this.ioErrorHandler.bind(this)); - this._loader.contentLoaderInfo.addEventListener(h.events.Event.COMPLETE, this.completeHandler.bind(this)); - this._loader.contentLoaderInfo.addEventListener(h.events.Event.INIT, this.initHandler.bind(this)); - this._loader.load(new h.net.URLRequest(c)); + this._loader.contentLoaderInfo.addEventListener(k.events.Event.OPEN, this.openHandler.bind(this)); + this._loader.contentLoaderInfo.addEventListener(k.events.ProgressEvent.PROGRESS, this.progressHandler.bind(this)); + this._loader.contentLoaderInfo.addEventListener(k.events.IOErrorEvent.IO_ERROR, this.ioErrorHandler.bind(this)); + this._loader.contentLoaderInfo.addEventListener(k.events.Event.COMPLETE, this.completeHandler.bind(this)); + this._loader.contentLoaderInfo.addEventListener(k.events.Event.INIT, this.initHandler.bind(this)); + this._loader.load(new k.net.URLRequest(d)); return!0; }; - c.prototype.unloadClip = function(c) { - ("number" === typeof c ? a.AVM1Utils.resolveLevel(c) : a.AVM1Utils.resolveTarget(c)).as3Object.removeChild(this._loader); + d.prototype.unloadClip = function(d) { + ("number" === typeof d ? a.AVM1Utils.resolveLevel(d) : a.AVM1Utils.resolveTarget(d)).as3Object.removeChild(this._loader); return!0; }; - c.prototype.getProgress = function(a) { + d.prototype.getProgress = function(a) { return this._loader.contentLoaderInfo.bytesLoaded; }; - c.prototype._broadcastMessage = function(c, h) { - void 0 === h && (h = null); - a.avm1BroadcastEvent(this._target.context, this, c, h); + d.prototype._broadcastMessage = function(d, k) { + void 0 === k && (k = null); + a.avm1BroadcastEvent(this._target.context, this, d, k); }; - c.prototype.openHandler = function(a) { + d.prototype.openHandler = function(a) { this._broadcastMessage("onLoadStart", [this._target]); }; - c.prototype.progressHandler = function(a) { + d.prototype.progressHandler = function(a) { this._broadcastMessage("onLoadProgress", [this._target, a.bytesLoaded, a.bytesTotal]); }; - c.prototype.ioErrorHandler = function(a) { + d.prototype.ioErrorHandler = function(a) { this._broadcastMessage("onLoadError", [this._target, a.errorID, 501]); }; - c.prototype.completeHandler = function(a) { + d.prototype.completeHandler = function(a) { this._broadcastMessage("onLoadComplete", [this._target]); }; - c.prototype.initHandler = function(a) { - var c = function() { - this._target.as3Object.removeEventListener(h.events.Event.EXIT_FRAME, c); + d.prototype.initHandler = function(a) { + var d = function() { + this._target.as3Object.removeEventListener(k.events.Event.EXIT_FRAME, d); this._broadcastMessage("onLoadInit", [this._target]); }.bind(this); - this._target.as3Object.addEventListener(h.events.Event.EXIT_FRAME, c); + this._target.as3Object.addEventListener(k.events.Event.EXIT_FRAME, d); }; - return c; + return d; }(); a.AVM1MovieClipLoader = v; - })(h.Lib || (h.Lib = {})); - })(c.AVM1 || (c.AVM1 = {})); + })(k.Lib || (k.Lib = {})); + })(d.AVM1 || (d.AVM1 = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load AVM1 Dependencies"); -(function(c) { - (function(h) { - function a(a, b, d) { - return m && d ? "string" === typeof b ? (a = c.ColorUtilities.cssStyleToRGBA(b), c.ColorUtilities.rgbaToCSSStyle(d.transformRGBA(a))) : b instanceof CanvasGradient && b._template ? b._template.createCanvasGradient(a, d) : b : b; +(function(d) { + (function(k) { + function a(a, b, e) { + return c && e ? "string" === typeof b ? (a = d.ColorUtilities.cssStyleToRGBA(b), d.ColorUtilities.rgbaToCSSStyle(e.transformRGBA(a))) : b instanceof CanvasGradient && b._template ? b._template.createCanvasGradient(a, e) : b : b; } - var s = c.Debug.assert, v = c.NumberUtilities.clamp; + var r = d.NumberUtilities.clamp; (function(a) { a[a.None = 0] = "None"; a[a.Brief = 1] = "Brief"; a[a.Verbose = 2] = "Verbose"; - })(h.TraceLevel || (h.TraceLevel = {})); - var p = c.Metrics.Counter.instance; - h.frameCounter = new c.Metrics.Counter(!0); - h.traceLevel = 2; - h.writer = null; - h.frameCount = function(a) { - p.count(a); - h.frameCounter.count(a); + })(k.TraceLevel || (k.TraceLevel = {})); + var v = d.Metrics.Counter.instance; + k.frameCounter = new d.Metrics.Counter(!0); + k.traceLevel = 2; + k.writer = null; + k.frameCount = function(a) { + v.count(a); + k.frameCounter.count(a); }; - h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("GFX"); - h.enterTimeline = function(a, b) { + k.timelineBuffer = new d.Tools.Profiler.TimelineBuffer("GFX"); + k.enterTimeline = function(a, b) { }; - h.leaveTimeline = function(a, b) { + k.leaveTimeline = function(a, b) { }; - var u = null, l = null, e = null, m = !0; - m && "undefined" !== typeof CanvasRenderingContext2D && (u = CanvasGradient.prototype.addColorStop, l = CanvasRenderingContext2D.prototype.createLinearGradient, e = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(a, b, c, d) { - return(new q(a, b, c, d)).createCanvasGradient(this, null); - }, CanvasRenderingContext2D.prototype.createRadialGradient = function(a, b, c, d, e, g) { - return(new n(a, b, c, d, e, g)).createCanvasGradient(this, null); + var u = null, t = null, l = null, c = !0; + c && "undefined" !== typeof CanvasRenderingContext2D && (u = CanvasGradient.prototype.addColorStop, t = CanvasRenderingContext2D.prototype.createLinearGradient, l = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(a, b, c, e) { + return(new p(a, b, c, e)).createCanvasGradient(this, null); + }, CanvasRenderingContext2D.prototype.createRadialGradient = function(a, b, c, e, d, f) { + return(new s(a, b, c, e, d, f)).createCanvasGradient(this, null); }, CanvasGradient.prototype.addColorStop = function(a, b) { u.call(this, a, b); this._template.addColorStop(a, b); }); - var t = function() { + var h = function() { return function(a, b) { this.offset = a; this.color = b; }; - }(), q = function() { - function b(a, c, d, e) { + }(), p = function() { + function b(a, c, e, d) { this.x0 = a; this.y0 = c; - this.x1 = d; - this.y1 = e; - this.colorStops = []; - } - b.prototype.addColorStop = function(a, b) { - this.colorStops.push(new t(a, b)); - }; - b.prototype.createCanvasGradient = function(b, c) { - for (var d = l.call(b, this.x0, this.y0, this.x1, this.y1), e = this.colorStops, g = 0;g < e.length;g++) { - var f = e[g], k = f.offset, f = f.color, f = c ? a(b, f, c) : f; - u.call(d, k, f); - } - d._template = this; - d._transform = this._transform; - return d; - }; - return b; - }(), n = function() { - function b(a, c, d, e, g, f) { - this.x0 = a; - this.y0 = c; - this.r0 = d; this.x1 = e; - this.y1 = g; - this.r1 = f; + this.y1 = d; this.colorStops = []; } b.prototype.addColorStop = function(a, b) { - this.colorStops.push(new t(a, b)); + this.colorStops.push(new h(a, b)); }; b.prototype.createCanvasGradient = function(b, c) { - for (var d = e.call(b, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), g = this.colorStops, f = 0;f < g.length;f++) { - var k = g[f], h = k.offset, k = k.color, k = c ? a(b, k, c) : k; - u.call(d, h, k); + for (var e = t.call(b, this.x0, this.y0, this.x1, this.y1), d = this.colorStops, f = 0;f < d.length;f++) { + var g = d[f], k = g.offset, g = g.color, g = c ? a(b, g, c) : g; + u.call(e, k, g); } - d._template = this; - d._transform = this._transform; - return d; + e._template = this; + e._transform = this._transform; + return e; }; return b; - }(), k; + }(), s = function() { + function b(a, c, e, d, f, g) { + this.x0 = a; + this.y0 = c; + this.r0 = e; + this.x1 = d; + this.y1 = f; + this.r1 = g; + this.colorStops = []; + } + b.prototype.addColorStop = function(a, b) { + this.colorStops.push(new h(a, b)); + }; + b.prototype.createCanvasGradient = function(b, c) { + for (var e = l.call(b, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), d = this.colorStops, f = 0;f < d.length;f++) { + var g = d[f], k = g.offset, g = g.color, g = c ? a(b, g, c) : g; + u.call(e, k, g); + } + e._template = this; + e._transform = this._transform; + return e; + }; + return b; + }(), m; (function(a) { a[a.ClosePath = 1] = "ClosePath"; a[a.MoveTo = 2] = "MoveTo"; @@ -48463,8 +48559,8 @@ console.timeEnd("Load AVM1 Dependencies"); a[a.Save = 9] = "Save"; a[a.Restore = 10] = "Restore"; a[a.Transform = 11] = "Transform"; - })(k || (k = {})); - var f = function() { + })(m || (m = {})); + var g = function() { function a(b) { this._commands = new Uint8Array(a._arrayBufferPool.acquire(8), 0, 8); this._commandPosition = 0; @@ -48473,33 +48569,33 @@ console.timeEnd("Load AVM1 Dependencies"); b instanceof a && this.addPath(b); } a._apply = function(a, b) { - var c = a._commands, d = a._data, e = 0, g = 0; + var c = a._commands, e = a._data, d = 0, f = 0; b.beginPath(); - for (var f = a._commandPosition;e < f;) { - switch(c[e++]) { + for (var g = a._commandPosition;d < g;) { + switch(c[d++]) { case 1: b.closePath(); break; case 2: - b.moveTo(d[g++], d[g++]); + b.moveTo(e[f++], e[f++]); break; case 3: - b.lineTo(d[g++], d[g++]); + b.lineTo(e[f++], e[f++]); break; case 4: - b.quadraticCurveTo(d[g++], d[g++], d[g++], d[g++]); + b.quadraticCurveTo(e[f++], e[f++], e[f++], e[f++]); break; case 5: - b.bezierCurveTo(d[g++], d[g++], d[g++], d[g++], d[g++], d[g++]); + b.bezierCurveTo(e[f++], e[f++], e[f++], e[f++], e[f++], e[f++]); break; case 6: - b.arcTo(d[g++], d[g++], d[g++], d[g++], d[g++]); + b.arcTo(e[f++], e[f++], e[f++], e[f++], e[f++]); break; case 7: - b.rect(d[g++], d[g++], d[g++], d[g++]); + b.rect(e[f++], e[f++], e[f++], e[f++]); break; case 8: - b.arc(d[g++], d[g++], d[g++], d[g++], d[g++], !!d[g++]); + b.arc(e[f++], e[f++], e[f++], e[f++], e[f++], !!e[f++]); break; case 9: b.save(); @@ -48508,7 +48604,7 @@ console.timeEnd("Load AVM1 Dependencies"); b.restore(); break; case 11: - b.transform(d[g++], d[g++], d[g++], d[g++], d[g++], d[g++]); + b.transform(e[f++], e[f++], e[f++], e[f++], e[f++], e[f++]); } } }; @@ -48522,15 +48618,14 @@ console.timeEnd("Load AVM1 Dependencies"); this._commandPosition >= this._commands.length && this._ensureCommandCapacity(this._commandPosition + 1); this._commands[this._commandPosition++] = a; }; - a.prototype._writeData = function(a, b, c, d, e, g) { - var f = arguments.length; - s(6 >= f && (0 === f % 2 || 5 === f)); - this._dataPosition + f >= this._data.length && this._ensureDataCapacity(this._dataPosition + f); + a.prototype._writeData = function(a, b, e, c, d, f) { + var g = arguments.length; + this._dataPosition + g >= this._data.length && this._ensureDataCapacity(this._dataPosition + g); var k = this._data, h = this._dataPosition; k[h] = a; k[h + 1] = b; - 2 < f && (k[h + 2] = c, k[h + 3] = d, 4 < f && (k[h + 4] = e, 6 === f && (k[h + 5] = g))); - this._dataPosition += f; + 2 < g && (k[h + 2] = e, k[h + 3] = c, 4 < g && (k[h + 4] = d, 6 === g && (k[h + 5] = f))); + this._dataPosition += g; }; a.prototype.closePath = function() { this._writeCommand(1); @@ -48543,135 +48638,134 @@ console.timeEnd("Load AVM1 Dependencies"); this._writeCommand(3); this._writeData(a, b); }; - a.prototype.quadraticCurveTo = function(a, b, c, d) { + a.prototype.quadraticCurveTo = function(a, b, e, c) { this._writeCommand(4); - this._writeData(a, b, c, d); + this._writeData(a, b, e, c); }; - a.prototype.bezierCurveTo = function(a, b, c, d, e, g) { + a.prototype.bezierCurveTo = function(a, b, e, c, d, f) { this._writeCommand(5); - this._writeData(a, b, c, d, e, g); + this._writeData(a, b, e, c, d, f); }; - a.prototype.arcTo = function(a, b, c, d, e) { + a.prototype.arcTo = function(a, b, e, c, d) { this._writeCommand(6); - this._writeData(a, b, c, d, e); + this._writeData(a, b, e, c, d); }; - a.prototype.rect = function(a, b, c, d) { + a.prototype.rect = function(a, b, e, c) { this._writeCommand(7); - this._writeData(a, b, c, d); + this._writeData(a, b, e, c); }; - a.prototype.arc = function(a, b, c, d, e, g) { + a.prototype.arc = function(a, b, e, c, d, f) { this._writeCommand(8); - this._writeData(a, b, c, d, e, +g); + this._writeData(a, b, e, c, d, +f); }; a.prototype.addPath = function(a, b) { b && (this._writeCommand(9), this._writeCommand(11), this._writeData(b.a, b.b, b.c, b.d, b.e, b.f)); - var c = this._commandPosition + a._commandPosition; - c >= this._commands.length && this._ensureCommandCapacity(c); - for (var d = this._commands, e = a._commands, g = this._commandPosition, f = 0;g < c;g++) { - d[g] = e[f++]; + var e = this._commandPosition + a._commandPosition; + e >= this._commands.length && this._ensureCommandCapacity(e); + for (var c = this._commands, d = a._commands, f = this._commandPosition, g = 0;f < e;f++) { + c[f] = d[g++]; } - this._commandPosition = c; - c = this._dataPosition + a._dataPosition; - c >= this._data.length && this._ensureDataCapacity(c); - d = this._data; - e = a._data; - g = this._dataPosition; - for (f = 0;g < c;g++) { - d[g] = e[f++]; + this._commandPosition = e; + e = this._dataPosition + a._dataPosition; + e >= this._data.length && this._ensureDataCapacity(e); + c = this._data; + d = a._data; + f = this._dataPosition; + for (g = 0;f < e;f++) { + c[f] = d[g++]; } - this._dataPosition = c; + this._dataPosition = e; b && this._writeCommand(10); }; - a._arrayBufferPool = new c.ArrayBufferPool; + a._arrayBufferPool = new d.ArrayBufferPool; return a; }(); - h.Path = f; + k.Path = g; if ("undefined" !== typeof CanvasRenderingContext2D && ("undefined" === typeof Path2D || !Path2D.prototype.addPath)) { - var d = CanvasRenderingContext2D.prototype.fill; + var f = CanvasRenderingContext2D.prototype.fill; CanvasRenderingContext2D.prototype.fill = function(a, b) { - arguments.length && (a instanceof f ? f._apply(a, this) : b = a); - b ? d.call(this, b) : d.call(this); + arguments.length && (a instanceof g ? g._apply(a, this) : b = a); + b ? f.call(this, b) : f.call(this); }; var b = CanvasRenderingContext2D.prototype.stroke; - CanvasRenderingContext2D.prototype.stroke = function(a, c) { - arguments.length && (a instanceof f ? f._apply(a, this) : c = a); - c ? b.call(this, c) : b.call(this); + CanvasRenderingContext2D.prototype.stroke = function(a, e) { + arguments.length && (a instanceof g ? g._apply(a, this) : e = a); + e ? b.call(this, e) : b.call(this); }; - var g = CanvasRenderingContext2D.prototype.clip; + var e = CanvasRenderingContext2D.prototype.clip; CanvasRenderingContext2D.prototype.clip = function(a, b) { - arguments.length && (a instanceof f ? f._apply(a, this) : b = a); - b ? g.call(this, b) : g.call(this); + arguments.length && (a instanceof g ? g._apply(a, this) : b = a); + b ? e.call(this, b) : e.call(this); }; - window.Path2D = f; + window.Path2D = g; } if ("undefined" !== typeof CanvasPattern && Path2D.prototype.addPath) { - k = function(a) { + m = function(a) { this._transform = a; this._template && (this._template._transform = a); }; - CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = k); - CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = k); - var r = CanvasRenderingContext2D.prototype.fill, w = CanvasRenderingContext2D.prototype.stroke; + CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = m); + CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = m); + var q = CanvasRenderingContext2D.prototype.fill, n = CanvasRenderingContext2D.prototype.stroke; CanvasRenderingContext2D.prototype.fill = function(a, b) { - var c = !!this.fillStyle._transform; - if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && c && a instanceof Path2D) { - var c = this.fillStyle._transform, d; + var e = !!this.fillStyle._transform; + if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && e && a instanceof Path2D) { + var e = this.fillStyle._transform, c; try { - d = c.inverse(); - } catch (e) { - d = c = h.Geometry.Matrix.createIdentitySVGMatrix(); + c = e.inverse(); + } catch (d) { + c = e = k.Geometry.Matrix.createIdentitySVGMatrix(); } + this.transform(e.a, e.b, e.c, e.d, e.e, e.f); + e = new Path2D; + e.addPath(a, c); + q.call(this, e, b); this.transform(c.a, c.b, c.c, c.d, c.e, c.f); - c = new Path2D; - c.addPath(a, d); - r.call(this, c, b); - this.transform(d.a, d.b, d.c, d.d, d.e, d.f); } else { - 0 === arguments.length ? r.call(this) : 1 === arguments.length ? r.call(this, a) : 2 === arguments.length && r.call(this, a, b); + 0 === arguments.length ? q.call(this) : 1 === arguments.length ? q.call(this, a) : 2 === arguments.length && q.call(this, a, b); } }; CanvasRenderingContext2D.prototype.stroke = function(a) { var b = !!this.strokeStyle._transform; if ((this.strokeStyle instanceof CanvasPattern || this.strokeStyle instanceof CanvasGradient) && b && a instanceof Path2D) { - var c = this.strokeStyle._transform, b = c.inverse(); - this.transform(c.a, c.b, c.c, c.d, c.e, c.f); - c = new Path2D; - c.addPath(a, b); - var d = this.lineWidth; + var e = this.strokeStyle._transform, b = e.inverse(); + this.transform(e.a, e.b, e.c, e.d, e.e, e.f); + e = new Path2D; + e.addPath(a, b); + var c = this.lineWidth; this.lineWidth *= (b.a + b.d) / 2; - w.call(this, c); + n.call(this, e); this.transform(b.a, b.b, b.c, b.d, b.e, b.f); - this.lineWidth = d; + this.lineWidth = c; } else { - 0 === arguments.length ? w.call(this) : 1 === arguments.length && w.call(this, a); + 0 === arguments.length ? n.call(this) : 1 === arguments.length && n.call(this, a); } }; } "undefined" !== typeof CanvasRenderingContext2D && function() { function a() { - s(this.mozCurrentTransform); - return h.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform); + return k.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform); } CanvasRenderingContext2D.prototype.flashStroke = function(a, b) { - var d = this.currentTransform; - if (d) { - var e = new Path2D; - e.addPath(a, d); - var g = this.lineWidth; + var e = this.currentTransform; + if (e) { + var c = new Path2D; + c.addPath(a, e); + var f = this.lineWidth; this.setTransform(1, 0, 0, 1, 0, 0); switch(b) { case 1: - this.lineWidth = v(g * (c.getScaleX(d) + c.getScaleY(d)) / 2, 1, 1024); + this.lineWidth = r(f * (d.getScaleX(e) + d.getScaleY(e)) / 2, 1, 1024); break; case 2: - this.lineWidth = v(g * c.getScaleY(d), 1, 1024); + this.lineWidth = r(f * d.getScaleY(e), 1, 1024); break; case 3: - this.lineWidth = v(g * c.getScaleX(d), 1, 1024); + this.lineWidth = r(f * d.getScaleX(e), 1, 1024); } - this.stroke(e); - this.setTransform(d.a, d.b, d.c, d.d, d.e, d.f); - this.lineWidth = g; + this.stroke(c); + this.setTransform(e.a, e.b, e.c, e.d, e.e, e.f); + this.lineWidth = f; } else { this.stroke(a); } @@ -48679,52 +48773,52 @@ console.timeEnd("Load AVM1 Dependencies"); !("currentTransform" in CanvasRenderingContext2D.prototype) && "mozCurrentTransform" in CanvasRenderingContext2D.prototype && Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:a}); }(); if ("undefined" !== typeof CanvasRenderingContext2D && void 0 === CanvasRenderingContext2D.prototype.globalColorMatrix) { - var z = CanvasRenderingContext2D.prototype.fill, A = CanvasRenderingContext2D.prototype.stroke, B = CanvasRenderingContext2D.prototype.fillText, M = CanvasRenderingContext2D.prototype.strokeText; + var x = CanvasRenderingContext2D.prototype.fill, L = CanvasRenderingContext2D.prototype.stroke, A = CanvasRenderingContext2D.prototype.fillText, H = CanvasRenderingContext2D.prototype.strokeText; Object.defineProperty(CanvasRenderingContext2D.prototype, "globalColorMatrix", {get:function() { return this._globalColorMatrix ? this._globalColorMatrix.clone() : null; }, set:function(a) { a ? this._globalColorMatrix ? this._globalColorMatrix.set(a) : this._globalColorMatrix = a.clone() : this._globalColorMatrix = null; }, enumerable:!0, configurable:!0}); - CanvasRenderingContext2D.prototype.fill = function(b, c) { - var d = null; - this._globalColorMatrix && (d = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix)); - 0 === arguments.length ? z.call(this) : 1 === arguments.length ? z.call(this, b) : 2 === arguments.length && z.call(this, b, c); - d && (this.fillStyle = d); + CanvasRenderingContext2D.prototype.fill = function(b, e) { + var c = null; + this._globalColorMatrix && (c = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix)); + 0 === arguments.length ? x.call(this) : 1 === arguments.length ? x.call(this, b) : 2 === arguments.length && x.call(this, b, e); + c && (this.fillStyle = c); }; - CanvasRenderingContext2D.prototype.stroke = function(b, c) { - var d = null; - this._globalColorMatrix && (d = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix)); - 0 === arguments.length ? A.call(this) : 1 === arguments.length && A.call(this, b); - d && (this.strokeStyle = d); + CanvasRenderingContext2D.prototype.stroke = function(b, e) { + var c = null; + this._globalColorMatrix && (c = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix)); + 0 === arguments.length ? L.call(this) : 1 === arguments.length && L.call(this, b); + c && (this.strokeStyle = c); }; - CanvasRenderingContext2D.prototype.fillText = function(b, d, e, g) { - var f = null; - this._globalColorMatrix && (f = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix)); - 3 === arguments.length ? B.call(this, b, d, e) : 4 === arguments.length ? B.call(this, b, d, e, g) : c.Debug.unexpected(); - f && (this.fillStyle = f); + CanvasRenderingContext2D.prototype.fillText = function(b, e, c, f) { + var g = null; + this._globalColorMatrix && (g = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix)); + 3 === arguments.length ? A.call(this, b, e, c) : 4 === arguments.length ? A.call(this, b, e, c, f) : d.Debug.unexpected(); + g && (this.fillStyle = g); }; - CanvasRenderingContext2D.prototype.strokeText = function(b, d, e, g) { - var f = null; - this._globalColorMatrix && (f = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix)); - 3 === arguments.length ? M.call(this, b, d, e) : 4 === arguments.length ? M.call(this, b, d, e, g) : c.Debug.unexpected(); - f && (this.strokeStyle = f); + CanvasRenderingContext2D.prototype.strokeText = function(b, e, c, f) { + var g = null; + this._globalColorMatrix && (g = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix)); + 3 === arguments.length ? H.call(this, b, e, c) : 4 === arguments.length ? H.call(this, b, e, c, f) : d.Debug.unexpected(); + g && (this.strokeStyle = g); }; } - })(c.GFX || (c.GFX = {})); + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(c) { - c.ScreenShot = function() { - return function(a, c, h) { +(function(d) { + (function(d) { + d.ScreenShot = function() { + return function(a, d, k) { this.dataURL = a; - this.w = c; - this.h = h; + this.w = d; + this.h = k; }; }(); - })(c.GFX || (c.GFX = {})); + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - var h = c.Debug.assert, a = function() { +(function(d) { + var k = function() { function a() { this._count = 0; this._head = this._tail = null; @@ -48736,12 +48830,10 @@ console.timeEnd("Load AVM1 Dependencies"); return this._head; }, enumerable:!0, configurable:!0}); a.prototype._unshift = function(a) { - h(!a.next && !a.previous); 0 === this._count ? this._head = this._tail = a : (a.next = this._head, this._head = a.next.previous = a); this._count++; }; a.prototype._remove = function(a) { - h(0 < this._count); a === this._head && a === this._tail ? this._head = this._tail = null : a === this._head ? (this._head = a.next, this._head.previous = null) : a == this._tail ? (this._tail = a.previous, this._tail.next = null) : (a.previous.next = a.next, a.next.previous = a.previous); a.previous = a.next = null; this._count--; @@ -48757,102 +48849,102 @@ console.timeEnd("Load AVM1 Dependencies"); this._remove(a); return a; }; - a.prototype.visit = function(a, c) { - void 0 === c && (c = !0); - for (var h = c ? this._head : this._tail;h && a(h);) { - h = c ? h.next : h.previous; + a.prototype.visit = function(a, d) { + void 0 === d && (d = !0); + for (var k = d ? this._head : this._tail;k && a(k);) { + k = d ? k.next : k.previous; } }; return a; }(); - c.LRUList = a; - c.getScaleX = function(a) { + d.LRUList = k; + d.getScaleX = function(a) { return a.a; }; - c.getScaleY = function(a) { + d.getScaleY = function(a) { return a.d; }; })(Shumway || (Shumway = {})); -var Shumway$$inline_737 = Shumway || (Shumway = {}), GFX$$inline_738 = Shumway$$inline_737.GFX || (Shumway$$inline_737.GFX = {}), Option$$inline_739 = Shumway$$inline_737.Options.Option, OptionSet$$inline_740 = Shumway$$inline_737.Options.OptionSet, shumwayOptions$$inline_741 = Shumway$$inline_737.Settings.shumwayOptions, rendererOptions$$inline_742 = shumwayOptions$$inline_741.register(new OptionSet$$inline_740("Renderer Options")); -GFX$$inline_738.imageUpdateOption = rendererOptions$$inline_742.register(new Option$$inline_739("", "imageUpdate", "boolean", !0, "Enable image updating.")); -GFX$$inline_738.imageConvertOption = rendererOptions$$inline_742.register(new Option$$inline_739("", "imageConvert", "boolean", !0, "Enable image conversion.")); -GFX$$inline_738.stageOptions = shumwayOptions$$inline_741.register(new OptionSet$$inline_740("Stage Renderer Options")); -GFX$$inline_738.forcePaint = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "forcePaint", "boolean", !1, "Force repainting.")); -GFX$$inline_738.ignoreViewport = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport.")); -GFX$$inline_738.viewportLoupeDiameter = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}})); -GFX$$inline_738.disableClipping = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "disableClipping", "boolean", !1, "Disable clipping.")); -GFX$$inline_738.debugClipping = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "debugClipping", "boolean", !1, "Disable clipping.")); -GFX$$inline_738.hud = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "hud", "boolean", !1, "Enable HUD.")); -var webGLOptions$$inline_743 = GFX$$inline_738.stageOptions.register(new OptionSet$$inline_740("WebGL Options")); -GFX$$inline_738.perspectiveCamera = webGLOptions$$inline_743.register(new Option$$inline_739("", "pc", "boolean", !1, "Use perspective camera.")); -GFX$$inline_738.perspectiveCameraFOV = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcFOV", "number", 60, "Perspective Camera FOV.")); -GFX$$inline_738.perspectiveCameraDistance = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcDistance", "number", 2, "Perspective Camera Distance.")); -GFX$$inline_738.perspectiveCameraAngle = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcAngle", "number", 0, "Perspective Camera Angle.")); -GFX$$inline_738.perspectiveCameraAngleRotate = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcRotate", "boolean", !1, "Rotate Use perspective camera.")); -GFX$$inline_738.perspectiveCameraSpacing = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcSpacing", "number", .01, "Element Spacing.")); -GFX$$inline_738.perspectiveCameraSpacingInflate = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcInflate", "boolean", !1, "Rotate Use perspective camera.")); -GFX$$inline_738.drawTiles = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawTiles", "boolean", !1, "Draw WebGL Tiles")); -GFX$$inline_738.drawSurfaces = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces.")); -GFX$$inline_738.drawSurface = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawSurface", "number", -1, "Draw WebGL Surface #")); -GFX$$inline_738.drawElements = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck.")); -GFX$$inline_738.disableSurfaceUploads = webGLOptions$$inline_743.register(new Option$$inline_739("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads.")); -GFX$$inline_738.premultipliedAlpha = webGLOptions$$inline_743.register(new Option$$inline_739("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext().")); -GFX$$inline_738.unpackPremultiplyAlpha = webGLOptions$$inline_743.register(new Option$$inline_739("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei.")); -var factorChoices$$inline_744 = {ZERO:0, ONE:1, SRC_COLOR:768, ONE_MINUS_SRC_COLOR:769, DST_COLOR:774, ONE_MINUS_DST_COLOR:775, SRC_ALPHA:770, ONE_MINUS_SRC_ALPHA:771, DST_ALPHA:772, ONE_MINUS_DST_ALPHA:773, SRC_ALPHA_SATURATE:776, CONSTANT_COLOR:32769, ONE_MINUS_CONSTANT_COLOR:32770, CONSTANT_ALPHA:32771, ONE_MINUS_CONSTANT_ALPHA:32772}; -GFX$$inline_738.sourceBlendFactor = webGLOptions$$inline_743.register(new Option$$inline_739("", "sourceBlendFactor", "number", factorChoices$$inline_744.ONE, "", {choices:factorChoices$$inline_744})); -GFX$$inline_738.destinationBlendFactor = webGLOptions$$inline_743.register(new Option$$inline_739("", "destinationBlendFactor", "number", factorChoices$$inline_744.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_744})); -var canvas2DOptions$$inline_745 = GFX$$inline_738.stageOptions.register(new OptionSet$$inline_740("Canvas2D Options")); -GFX$$inline_738.clipDirtyRegions = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions.")); -GFX$$inline_738.clipCanvas = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "clipCanvas", "boolean", !1, "Clip Regions.")); -GFX$$inline_738.cull = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cull", "boolean", !1, "Enable culling.")); -GFX$$inline_738.snapToDevicePixels = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "snapToDevicePixels", "boolean", !1, "")); -GFX$$inline_738.imageSmoothing = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "imageSmoothing", "boolean", !1, "")); -GFX$$inline_738.masking = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "masking", "boolean", !0, "Composite Mask.")); -GFX$$inline_738.blending = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "blending", "boolean", !0, "")); -GFX$$inline_738.debugLayers = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "debugLayers", "boolean", !1, "")); -GFX$$inline_738.filters = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "filters", "boolean", !1, "")); -GFX$$inline_738.cacheShapes = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapes", "boolean", !0, "")); -GFX$$inline_738.cacheShapesMaxSize = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}})); -GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}})); -(function(c) { - (function(h) { +var Shumway$$inline_742 = Shumway || (Shumway = {}), GFX$$inline_743 = Shumway$$inline_742.GFX || (Shumway$$inline_742.GFX = {}), Option$$inline_744 = Shumway$$inline_742.Options.Option, OptionSet$$inline_745 = Shumway$$inline_742.Options.OptionSet, shumwayOptions$$inline_746 = Shumway$$inline_742.Settings.shumwayOptions, rendererOptions$$inline_747 = shumwayOptions$$inline_746.register(new OptionSet$$inline_745("Renderer Options")); +GFX$$inline_743.imageUpdateOption = rendererOptions$$inline_747.register(new Option$$inline_744("", "imageUpdate", "boolean", !0, "Enable image updating.")); +GFX$$inline_743.imageConvertOption = rendererOptions$$inline_747.register(new Option$$inline_744("", "imageConvert", "boolean", !0, "Enable image conversion.")); +GFX$$inline_743.stageOptions = shumwayOptions$$inline_746.register(new OptionSet$$inline_745("Stage Renderer Options")); +GFX$$inline_743.forcePaint = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "forcePaint", "boolean", !1, "Force repainting.")); +GFX$$inline_743.ignoreViewport = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport.")); +GFX$$inline_743.viewportLoupeDiameter = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}})); +GFX$$inline_743.disableClipping = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "disableClipping", "boolean", !1, "Disable clipping.")); +GFX$$inline_743.debugClipping = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "debugClipping", "boolean", !1, "Disable clipping.")); +GFX$$inline_743.hud = GFX$$inline_743.stageOptions.register(new Option$$inline_744("", "hud", "boolean", !1, "Enable HUD.")); +var webGLOptions$$inline_748 = GFX$$inline_743.stageOptions.register(new OptionSet$$inline_745("WebGL Options")); +GFX$$inline_743.perspectiveCamera = webGLOptions$$inline_748.register(new Option$$inline_744("", "pc", "boolean", !1, "Use perspective camera.")); +GFX$$inline_743.perspectiveCameraFOV = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcFOV", "number", 60, "Perspective Camera FOV.")); +GFX$$inline_743.perspectiveCameraDistance = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcDistance", "number", 2, "Perspective Camera Distance.")); +GFX$$inline_743.perspectiveCameraAngle = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcAngle", "number", 0, "Perspective Camera Angle.")); +GFX$$inline_743.perspectiveCameraAngleRotate = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcRotate", "boolean", !1, "Rotate Use perspective camera.")); +GFX$$inline_743.perspectiveCameraSpacing = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcSpacing", "number", .01, "Element Spacing.")); +GFX$$inline_743.perspectiveCameraSpacingInflate = webGLOptions$$inline_748.register(new Option$$inline_744("", "pcInflate", "boolean", !1, "Rotate Use perspective camera.")); +GFX$$inline_743.drawTiles = webGLOptions$$inline_748.register(new Option$$inline_744("", "drawTiles", "boolean", !1, "Draw WebGL Tiles")); +GFX$$inline_743.drawSurfaces = webGLOptions$$inline_748.register(new Option$$inline_744("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces.")); +GFX$$inline_743.drawSurface = webGLOptions$$inline_748.register(new Option$$inline_744("", "drawSurface", "number", -1, "Draw WebGL Surface #")); +GFX$$inline_743.drawElements = webGLOptions$$inline_748.register(new Option$$inline_744("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck.")); +GFX$$inline_743.disableSurfaceUploads = webGLOptions$$inline_748.register(new Option$$inline_744("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads.")); +GFX$$inline_743.premultipliedAlpha = webGLOptions$$inline_748.register(new Option$$inline_744("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext().")); +GFX$$inline_743.unpackPremultiplyAlpha = webGLOptions$$inline_748.register(new Option$$inline_744("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei.")); +var factorChoices$$inline_749 = {ZERO:0, ONE:1, SRC_COLOR:768, ONE_MINUS_SRC_COLOR:769, DST_COLOR:774, ONE_MINUS_DST_COLOR:775, SRC_ALPHA:770, ONE_MINUS_SRC_ALPHA:771, DST_ALPHA:772, ONE_MINUS_DST_ALPHA:773, SRC_ALPHA_SATURATE:776, CONSTANT_COLOR:32769, ONE_MINUS_CONSTANT_COLOR:32770, CONSTANT_ALPHA:32771, ONE_MINUS_CONSTANT_ALPHA:32772}; +GFX$$inline_743.sourceBlendFactor = webGLOptions$$inline_748.register(new Option$$inline_744("", "sourceBlendFactor", "number", factorChoices$$inline_749.ONE, "", {choices:factorChoices$$inline_749})); +GFX$$inline_743.destinationBlendFactor = webGLOptions$$inline_748.register(new Option$$inline_744("", "destinationBlendFactor", "number", factorChoices$$inline_749.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_749})); +var canvas2DOptions$$inline_750 = GFX$$inline_743.stageOptions.register(new OptionSet$$inline_745("Canvas2D Options")); +GFX$$inline_743.clipDirtyRegions = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions.")); +GFX$$inline_743.clipCanvas = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "clipCanvas", "boolean", !1, "Clip Regions.")); +GFX$$inline_743.cull = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "cull", "boolean", !1, "Enable culling.")); +GFX$$inline_743.snapToDevicePixels = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "snapToDevicePixels", "boolean", !1, "")); +GFX$$inline_743.imageSmoothing = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "imageSmoothing", "boolean", !1, "")); +GFX$$inline_743.masking = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "masking", "boolean", !0, "Composite Mask.")); +GFX$$inline_743.blending = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "blending", "boolean", !0, "")); +GFX$$inline_743.debugLayers = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "debugLayers", "boolean", !1, "")); +GFX$$inline_743.filters = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "filters", "boolean", !1, "")); +GFX$$inline_743.cacheShapes = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "cacheShapes", "boolean", !0, "")); +GFX$$inline_743.cacheShapesMaxSize = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}})); +GFX$$inline_743.cacheShapesThreshold = canvas2DOptions$$inline_750.register(new Option$$inline_744("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}})); +(function(d) { + (function(k) { (function(a) { - function s(a, c, d, e) { - var f = 1 - e; - return a * f * f + 2 * c * f * e + d * e * e; + function r(a, e, c, d) { + var f = 1 - d; + return a * f * f + 2 * e * f * d + c * d * d; } - function v(a, c, d, e, f) { - var k = f * f, h = 1 - f, l = h * h; - return a * h * l + 3 * c * f * l + 3 * d * h * k + e * f * k; + function v(a, e, c, d, f) { + var g = f * f, k = 1 - f, h = k * k; + return a * k * h + 3 * e * f * h + 3 * c * k * g + d * f * g; } - var p = c.NumberUtilities.clamp, u = c.NumberUtilities.pow2, l = c.NumberUtilities.epsilonEquals, e = c.Debug.assert; + var u = d.NumberUtilities.clamp, t = d.NumberUtilities.pow2, l = d.NumberUtilities.epsilonEquals; a.radianToDegrees = function(a) { return 180 * a / Math.PI; }; a.degreesToRadian = function(a) { return a * Math.PI / 180; }; - a.quadraticBezier = s; - a.quadraticBezierExtreme = function(a, c, d) { - var e = (a - c) / (a - 2 * c + d); - return 0 > e ? a : 1 < e ? d : s(a, c, d, e); + a.quadraticBezier = r; + a.quadraticBezierExtreme = function(a, e, c) { + var d = (a - e) / (a - 2 * e + c); + return 0 > d ? a : 1 < d ? c : r(a, e, c, d); }; a.cubicBezier = v; - a.cubicBezierExtremes = function(a, c, d, e) { - var f = c - a, k; - k = 2 * (d - c); - var h = e - d; - f + h === k && (h *= 1.0001); - var l = 2 * f - k, m = k - 2 * f, m = Math.sqrt(m * m - 4 * f * (f - k + h)); - k = 2 * (f - k + h); - f = (l + m) / k; - l = (l - m) / k; - m = []; - 0 <= f && 1 >= f && m.push(v(a, c, d, e, f)); - 0 <= l && 1 >= l && m.push(v(a, c, d, e, l)); - return m; + a.cubicBezierExtremes = function(a, e, c, d) { + var f = e - a, g; + g = 2 * (c - e); + var k = d - c; + f + k === g && (k *= 1.0001); + var h = 2 * f - g, l = g - 2 * f, l = Math.sqrt(l * l - 4 * f * (f - g + k)); + g = 2 * (f - g + k); + f = (h + l) / g; + h = (h - l) / g; + l = []; + 0 <= f && 1 >= f && l.push(v(a, e, c, d, f)); + 0 <= h && 1 >= h && l.push(v(a, e, c, d, h)); + return l; }; - var m = function() { + var c = function() { function a(b, c) { this.x = b; this.y = c; @@ -48894,27 +48986,27 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return "{x: " + this.x.toFixed(a) + ", y: " + this.y.toFixed(a) + "}"; }; a.prototype.inTriangle = function(a, b, c) { - var d = a.y * c.x - a.x * c.y + (c.y - a.y) * this.x + (a.x - c.x) * this.y, e = a.x * b.y - a.y * b.x + (a.y - b.y) * this.x + (b.x - a.x) * this.y; - if (0 > d != 0 > e) { + var d = a.y * c.x - a.x * c.y + (c.y - a.y) * this.x + (a.x - c.x) * this.y, f = a.x * b.y - a.y * b.x + (a.y - b.y) * this.x + (b.x - a.x) * this.y; + if (0 > d != 0 > f) { return!1; } a = -b.y * c.x + a.y * (c.x - b.x) + a.x * (b.y - c.y) + b.x * c.y; - 0 > a && (d = -d, e = -e, a = -a); - return 0 < d && 0 < e && d + e < a; + 0 > a && (d = -d, f = -f, a = -a); + return 0 < d && 0 < f && d + f < a; }; a.createEmpty = function() { return new a(0, 0); }; a.createEmptyPoints = function(c) { - for (var d = [], e = 0;e < c;e++) { + for (var d = [], f = 0;f < c;f++) { d.push(new a(0, 0)); } return d; }; return a; }(); - a.Point = m; - var t = function() { + a.Point = c; + var h = function() { function a(b, c, d) { this.x = b; this.y = c; @@ -48973,17 +49065,17 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return new a(0, 0, 0); }; a.createEmptyPoints = function(c) { - for (var d = [], e = 0;e < c;e++) { + for (var d = [], f = 0;f < c;f++) { d.push(new a(0, 0, 0)); } return d; }; return a; }(); - a.Point3D = t; - var q = function() { - function a(c, d, e, f) { - this.setElements(c, d, e, f); + a.Point3D = h; + var p = function() { + function a(c, d, f, g) { + this.setElements(c, d, f, g); a.allocationCount++; } a.prototype.setElements = function(a, b, c, d) { @@ -48999,8 +49091,8 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new this.h = a.h; }; a.prototype.contains = function(a) { - var b = a.x + a.w, c = a.y + a.h, d = this.x + this.w, e = this.y + this.h; - return a.x >= this.x && a.x < d && a.y >= this.y && a.y < e && b > this.x && b <= d && c > this.y && c <= e; + var b = a.x + a.w, c = a.y + a.h, d = this.x + this.w, f = this.y + this.h; + return a.x >= this.x && a.x < d && a.y >= this.y && a.y < f && b > this.x && b <= d && c > this.y && c <= f; }; a.prototype.containsPoint = function(a) { return a.x >= this.x && a.x < this.x + this.w && a.y >= this.y && a.y < this.y + this.h; @@ -49029,12 +49121,12 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new this.y > a.y && (c = a.y); var d = this.x + this.w; d < a.x + a.w && (d = a.x + a.w); - var e = this.y + this.h; - e < a.y + a.h && (e = a.y + a.h); + var f = this.y + this.h; + f < a.y + a.h && (f = a.y + a.h); this.x = b; this.y = c; this.w = d - b; - this.h = e - c; + this.h = f - c; } } }; @@ -49065,18 +49157,18 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return!(0 >= b || 0 >= a); }; a.prototype.intersectsTransformedAABB = function(c, d) { - var e = a._temporary; - e.set(c); - d.transformRectangleAABB(e); - return this.intersects(e); + var f = a._temporary; + f.set(c); + d.transformRectangleAABB(f); + return this.intersects(f); }; a.prototype.intersectsTranslated = function(a, b, c) { if (this.isEmpty() || a.isEmpty()) { return!1; } - var d = Math.max(this.x, a.x + b), e = Math.max(this.y, a.y + c); + var d = Math.max(this.x, a.x + b), f = Math.max(this.y, a.y + c); b = Math.min(this.x + this.w, a.x + b + a.w) - d; - a = Math.min(this.y + this.h, a.y + c + a.h) - e; + a = Math.min(this.y + this.h, a.y + c + a.h) - f; return!(0 >= b || 0 >= a); }; a.prototype.area = function() { @@ -49124,7 +49216,7 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return this; }; a.prototype.getCenter = function() { - return new m(this.x + this.w / 2, this.y + this.h / 2); + return new c(this.x + this.w / 2, this.y + this.h / 2); }; a.prototype.getAbsoluteBounds = function() { return new a(0, 0, this.w, this.h); @@ -49162,8 +49254,8 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new a._dirtyStack = []; return a; }(); - a.Rectangle = q; - var n = function() { + a.Rectangle = p; + var s = function() { function a(b) { this.corners = b.map(function(a) { return a.clone(); @@ -49178,14 +49270,14 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return a.getBounds(this.corners); }; a.getBounds = function(a) { - for (var b = new m(Number.MAX_VALUE, Number.MAX_VALUE), c = new m(Number.MIN_VALUE, Number.MIN_VALUE), d = 0;4 > d;d++) { - var e = a[d].x, f = a[d].y; - b.x = Math.min(b.x, e); - b.y = Math.min(b.y, f); - c.x = Math.max(c.x, e); - c.y = Math.max(c.y, f); + for (var b = new c(Number.MAX_VALUE, Number.MAX_VALUE), d = new c(Number.MIN_VALUE, Number.MIN_VALUE), f = 0;4 > f;f++) { + var g = a[f].x, k = a[f].y; + b.x = Math.min(b.x, g); + b.y = Math.min(b.y, k); + d.x = Math.max(d.x, g); + d.y = Math.max(d.y, k); } - return new q(b.x, b.y, c.x - b.x, c.y - b.y); + return new p(b.x, b.y, d.x - b.x, d.y - b.y); }; a.prototype.intersects = function(a) { return this.intersectsOneWay(a) && a.intersectsOneWay(this); @@ -49193,10 +49285,10 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new a.prototype.intersectsOneWay = function(a) { for (var b = 0;2 > b;b++) { for (var c = 0;4 > c;c++) { - var d = a.corners[c].dot(this.axes[b]), e, f; - 0 === c ? f = e = d : d < e ? e = d : d > f && (f = d); + var d = a.corners[c].dot(this.axes[b]), f, g; + 0 === c ? g = f = d : d < f ? f = d : d > g && (g = d); } - if (e > 1 + this.origins[b] || f < this.origins[b]) { + if (f > 1 + this.origins[b] || g < this.origins[b]) { return!1; } } @@ -49204,17 +49296,17 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new }; return a; }(); - a.OBB = n; + a.OBB = s; (function(a) { a[a.Unknown = 0] = "Unknown"; a[a.Identity = 1] = "Identity"; a[a.Translation = 2] = "Translation"; })(a.MatrixType || (a.MatrixType = {})); - var k = function() { - function a(c, d, e, f, k, h) { + var m = function() { + function a(c, d, f, g, k, h) { this._data = new Float64Array(6); this._type = 0; - this.setElements(c, d, e, f, k, h); + this.setElements(c, d, f, g, k, h); a.allocationCount++; } Object.defineProperty(a.prototype, "a", {get:function() { @@ -49253,14 +49345,14 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new this._data[5] = a; 1 === this._type && (this._type = 2); }, enumerable:!0, configurable:!0}); - a.prototype.setElements = function(a, b, c, d, e, f) { + a.prototype.setElements = function(a, b, c, d, f, g) { var k = this._data; k[0] = a; k[1] = b; k[2] = c; k[3] = d; - k[4] = e; - k[5] = f; + k[4] = f; + k[5] = g; this._type = 0; }; a.prototype.set = function(a) { @@ -49301,28 +49393,27 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new a.prototype.free = function() { a._dirtyStack.push(this); }; - a.prototype.transform = function(a, b, c, d, e, f) { - var k = this._data, h = k[0], l = k[1], m = k[2], n = k[3], p = k[4], q = k[5]; + a.prototype.transform = function(a, b, c, d, f, g) { + var k = this._data, h = k[0], l = k[1], m = k[2], p = k[3], r = k[4], s = k[5]; k[0] = h * a + m * b; - k[1] = l * a + n * b; + k[1] = l * a + p * b; k[2] = h * c + m * d; - k[3] = l * c + n * d; - k[4] = h * e + m * f + p; - k[5] = l * e + n * f + q; + k[3] = l * c + p * d; + k[4] = h * f + m * g + r; + k[5] = l * f + p * g + s; this._type = 0; return this; }; a.prototype.transformRectangle = function(a, b) { - e(4 === b.length); - var c = this._data, d = c[0], f = c[1], k = c[2], h = c[3], l = c[4], c = c[5], m = a.x, n = a.y, p = a.w, q = a.h; - b[0].x = d * m + k * n + l; - b[0].y = f * m + h * n + c; - b[1].x = d * (m + p) + k * n + l; - b[1].y = f * (m + p) + h * n + c; - b[2].x = d * (m + p) + k * (n + q) + l; - b[2].y = f * (m + p) + h * (n + q) + c; - b[3].x = d * m + k * (n + q) + l; - b[3].y = f * m + h * (n + q) + c; + var c = this._data, d = c[0], f = c[1], g = c[2], k = c[3], h = c[4], c = c[5], l = a.x, m = a.y, p = a.w, r = a.h; + b[0].x = d * l + g * m + h; + b[0].y = f * l + k * m + c; + b[1].x = d * (l + p) + g * m + h; + b[1].y = f * (l + p) + k * m + c; + b[2].x = d * (l + p) + g * (m + r) + h; + b[2].y = f * (l + p) + k * (m + r) + c; + b[3].x = d * l + g * (m + r) + h; + b[3].y = f * l + k * (m + r) + c; }; a.prototype.isTranslationOnly = function() { if (2 === this._type) { @@ -49337,15 +49428,15 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new if (2 === this._type) { a.x += b[4], a.y += b[5]; } else { - var c = b[0], d = b[1], e = b[2], f = b[3], k = b[4], h = b[5], l = a.x, m = a.y, n = a.w, p = a.h, b = c * l + e * m + k, q = d * l + f * m + h, s = c * (l + n) + e * m + k, t = d * (l + n) + f * m + h, u = c * (l + n) + e * (m + p) + k, n = d * (l + n) + f * (m + p) + h, c = c * l + e * (m + p) + k, d = d * l + f * (m + p) + h, f = 0; - b > s && (f = b, b = s, s = f); - u > c && (f = u, u = c, c = f); - a.x = b < u ? b : u; - a.w = (s > c ? s : c) - a.x; - q > t && (f = q, q = t, t = f); - n > d && (f = n, n = d, d = f); - a.y = q < n ? q : n; - a.h = (t > d ? t : d) - a.y; + var c = b[0], d = b[1], f = b[2], g = b[3], k = b[4], h = b[5], l = a.x, m = a.y, p = a.w, r = a.h, b = c * l + f * m + k, s = d * l + g * m + h, t = c * (l + p) + f * m + k, u = d * (l + p) + g * m + h, v = c * (l + p) + f * (m + r) + k, p = d * (l + p) + g * (m + r) + h, c = c * l + f * (m + r) + k, d = d * l + g * (m + r) + h, g = 0; + b > t && (g = b, b = t, t = g); + v > c && (g = v, v = c, c = g); + a.x = b < v ? b : v; + a.w = (t > c ? t : c) - a.x; + s > u && (g = s, s = u, u = g); + p > d && (g = p, p = d, d = g); + a.y = s < p ? s : p; + a.h = (u > d ? u : d) - a.y; } } }; @@ -49364,12 +49455,12 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return 1 === a && 1 === b ? this : this.clone().scale(a, b); }; a.prototype.rotate = function(a) { - var b = this._data, c = b[0], d = b[1], e = b[2], f = b[3], k = b[4], h = b[5], l = Math.cos(a); + var b = this._data, c = b[0], d = b[1], f = b[2], g = b[3], k = b[4], h = b[5], l = Math.cos(a); a = Math.sin(a); b[0] = l * c - a * d; b[1] = a * c + l * d; - b[2] = l * e - a * f; - b[3] = a * e + l * f; + b[2] = l * f - a * g; + b[3] = a * f + l * g; b[4] = l * k - a * h; b[5] = a * k + l * h; this._type = 0; @@ -49381,14 +49472,14 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new } var b = this._data; a = a._data; - var c = b[0] * a[0], d = 0, e = 0, f = b[3] * a[3], k = b[4] * a[0] + a[4], h = b[5] * a[3] + a[5]; + var c = b[0] * a[0], d = 0, f = 0, g = b[3] * a[3], k = b[4] * a[0] + a[4], h = b[5] * a[3] + a[5]; if (0 !== b[1] || 0 !== b[2] || 0 !== a[1] || 0 !== a[2]) { - c += b[1] * a[2], f += b[2] * a[1], d += b[0] * a[1] + b[1] * a[3], e += b[2] * a[0] + b[3] * a[2], k += b[5] * a[2], h += b[4] * a[1]; + c += b[1] * a[2], g += b[2] * a[1], d += b[0] * a[1] + b[1] * a[3], f += b[2] * a[0] + b[3] * a[2], k += b[5] * a[2], h += b[4] * a[1]; } b[0] = c; b[1] = d; - b[2] = e; - b[3] = f; + b[2] = f; + b[3] = g; b[4] = k; b[5] = h; this._type = 0; @@ -49404,14 +49495,14 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new } else { if (1 !== a._type) { a = c[0] * b[0]; - var d = 0, e = 0, f = c[3] * b[3], k = c[4] * b[0] + b[4], h = c[5] * b[3] + b[5]; + var d = 0, f = 0, g = c[3] * b[3], k = c[4] * b[0] + b[4], h = c[5] * b[3] + b[5]; if (0 !== c[1] || 0 !== c[2] || 0 !== b[1] || 0 !== b[2]) { - a += c[1] * b[2], f += c[2] * b[1], d += c[0] * b[1] + c[1] * b[3], e += c[2] * b[0] + c[3] * b[2], k += c[5] * b[2], h += c[4] * b[1]; + a += c[1] * b[2], g += c[2] * b[1], d += c[0] * b[1] + c[1] * b[3], f += c[2] * b[0] + c[3] * b[2], k += c[5] * b[2], h += c[4] * b[1]; } b[0] = a; b[1] = d; - b[2] = e; - b[3] = f; + b[2] = f; + b[3] = g; b[4] = k; b[5] = h; this._type = 0; @@ -49471,15 +49562,15 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new if (2 === this._type) { c[0] = 1, c[1] = 0, c[2] = 0, c[3] = 1, c[4] = -b[4], c[5] = -b[5], a._type = 2; } else { - var d = b[1], e = b[2], f = b[4], k = b[5]; - if (0 === d && 0 === e) { + var d = b[1], f = b[2], g = b[4], k = b[5]; + if (0 === d && 0 === f) { var h = c[0] = 1 / b[0], b = c[3] = 1 / b[3]; c[1] = 0; c[2] = 0; - c[4] = -h * f; + c[4] = -h * g; c[5] = -b * k; } else { - var h = b[0], b = b[3], l = h * b - d * e; + var h = b[0], b = b[3], l = h * b - d * f; if (0 === l) { a.setIdentity(); return; @@ -49487,10 +49578,10 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new l = 1 / l; c[0] = b * l; d = c[1] = -d * l; - e = c[2] = -e * l; + f = c[2] = -f * l; b = c[3] = h * l; - c[4] = -(c[0] * f + e * k); - c[5] = -(d * f + b * k); + c[4] = -(c[0] * g + f * k); + c[5] = -(d * g + b * k); } a._type = 0; } @@ -49589,43 +49680,43 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new }; return a; }(); - a.Matrix = k; - k = function() { + a.Matrix = m; + m = function() { function a(b) { this._m = new Float32Array(b); } a.prototype.asWebGLMatrix = function() { return this._m; }; - a.createCameraLookAt = function(c, d, e) { + a.createCameraLookAt = function(c, d, f) { d = c.clone().sub(d).normalize(); - e = e.clone().cross(d).normalize(); - var f = d.clone().cross(e); - return new a([e.x, e.y, e.z, 0, f.x, f.y, f.z, 0, d.x, d.y, d.z, 0, c.x, c.y, c.z, 1]); + f = f.clone().cross(d).normalize(); + var g = d.clone().cross(f); + return new a([f.x, f.y, f.z, 0, g.x, g.y, g.z, 0, d.x, d.y, d.z, 0, c.x, c.y, c.z, 1]); }; - a.createLookAt = function(c, d, e) { + a.createLookAt = function(c, d, f) { d = c.clone().sub(d).normalize(); - e = e.clone().cross(d).normalize(); - var f = d.clone().cross(e); - return new a([e.x, f.x, d.x, 0, f.x, f.y, d.y, 0, d.x, f.z, d.z, 0, -e.dot(c), -f.dot(c), -d.dot(c), 1]); + f = f.clone().cross(d).normalize(); + var g = d.clone().cross(f); + return new a([f.x, g.x, d.x, 0, g.x, g.y, d.y, 0, d.x, g.z, d.z, 0, -f.dot(c), -g.dot(c), -d.dot(c), 1]); }; a.prototype.mul = function(a) { a = [a.x, a.y, a.z, 0]; for (var b = this._m, c = [], d = 0;4 > d;d++) { c[d] = 0; - for (var e = 4 * d, f = 0;4 > f;f++) { - c[d] += b[e + f] * a[f]; + for (var f = 4 * d, g = 0;4 > g;g++) { + c[d] += b[f + g] * a[g]; } } - return new t(c[0], c[1], c[2]); + return new h(c[0], c[1], c[2]); }; - a.create2DProjection = function(c, d, e) { - return new a([2 / c, 0, 0, 0, 0, -2 / d, 0, 0, 0, 0, 2 / e, 0, -1, 1, 0, 1]); + a.create2DProjection = function(c, d, f) { + return new a([2 / c, 0, 0, 0, 0, -2 / d, 0, 0, 0, 0, 2 / f, 0, -1, 1, 0, 1]); }; - a.createPerspective = function(c, d, e, f) { + a.createPerspective = function(c, d, f, g) { c = Math.tan(.5 * Math.PI - .5 * c); - var k = 1 / (e - f); - return new a([c / d, 0, 0, 0, 0, c, 0, 0, 0, 0, (e + f) * k, -1, 0, 0, e * f * k * 2, 0]); + var k = 1 / (f - g); + return new a([c / d, 0, 0, 0, 0, c, 0, 0, 0, 0, (f + g) * k, -1, 0, 0, f * g * k * 2, 0]); }; a.createIdentity = function() { return a.createTranslation(); @@ -49648,38 +49739,38 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new c = Math.sin(c); return new a([d, c, 0, 0, -c, d, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); }; - a.createScale = function(c, d, e) { - return new a([c, 0, 0, 0, 0, d, 0, 0, 0, 0, e, 0, 0, 0, 0, 1]); + a.createScale = function(c, d, f) { + return new a([c, 0, 0, 0, 0, d, 0, 0, 0, 0, f, 0, 0, 0, 0, 1]); }; a.createMultiply = function(c, d) { - var e = c._m, f = d._m, k = e[0], h = e[1], l = e[2], m = e[3], n = e[4], p = e[5], q = e[6], s = e[7], t = e[8], u = e[9], v = e[10], E = e[11], F = e[12], I = e[13], G = e[14], e = e[15], Z = f[0], Q = f[1], S = f[2], O = f[3], P = f[4], V = f[5], $ = f[6], W = f[7], x = f[8], ea = f[9], Y = f[10], R = f[11], U = f[12], ba = f[13], X = f[14], f = f[15]; - return new a([k * Z + h * P + l * x + m * U, k * Q + h * V + l * ea + m * ba, k * S + h * $ + l * Y + m * X, k * O + h * W + l * R + m * f, n * Z + p * P + q * x + s * U, n * Q + p * V + q * ea + s * ba, n * S + p * $ + q * Y + s * X, n * O + p * W + q * R + s * f, t * Z + u * P + v * x + E * U, t * Q + u * V + v * ea + E * ba, t * S + u * $ + v * Y + E * X, t * O + u * W + v * R + E * f, F * Z + I * P + G * x + e * U, F * Q + I * V + G * ea + e * ba, F * S + I * $ + G * Y + e * X, F * - O + I * W + G * R + e * f]); + var f = c._m, g = d._m, k = f[0], h = f[1], l = f[2], m = f[3], p = f[4], r = f[5], s = f[6], t = f[7], u = f[8], v = f[9], y = f[10], z = f[11], G = f[12], C = f[13], I = f[14], f = f[15], P = g[0], T = g[1], O = g[2], Q = g[3], S = g[4], V = g[5], aa = g[6], $ = g[7], w = g[8], U = g[9], ba = g[10], R = g[11], N = g[12], Z = g[13], fa = g[14], g = g[15]; + return new a([k * P + h * S + l * w + m * N, k * T + h * V + l * U + m * Z, k * O + h * aa + l * ba + m * fa, k * Q + h * $ + l * R + m * g, p * P + r * S + s * w + t * N, p * T + r * V + s * U + t * Z, p * O + r * aa + s * ba + t * fa, p * Q + r * $ + s * R + t * g, u * P + v * S + y * w + z * N, u * T + v * V + y * U + z * Z, u * O + v * aa + y * ba + z * fa, u * Q + v * $ + y * R + z * g, G * P + C * S + I * w + f * N, G * T + C * V + I * U + f * Z, G * O + C * aa + I * ba + f * fa, + G * Q + C * $ + I * R + f * g]); }; a.createInverse = function(c) { var d = c._m; c = d[0]; - var e = d[1], f = d[2], k = d[3], h = d[4], l = d[5], m = d[6], n = d[7], p = d[8], q = d[9], s = d[10], t = d[11], u = d[12], v = d[13], E = d[14], d = d[15], F = s * d, I = E * t, G = m * d, Z = E * n, Q = m * t, S = s * n, O = f * d, P = E * k, V = f * t, $ = s * k, W = f * n, x = m * k, ea = p * v, Y = u * q, R = h * v, U = u * l, ba = h * q, X = p * l, ga = c * v, ja = u * e, aa = c * q, ia = p * e, T = c * l, da = h * e, fa = F * l + Z * q + Q * v - (I * l + G * q + S * v), la = I * - e + O * q + $ * v - (F * e + P * q + V * v), v = G * e + P * l + W * v - (Z * e + O * l + x * v), e = S * e + V * l + x * q - (Q * e + $ * l + W * q), l = 1 / (c * fa + h * la + p * v + u * e); - return new a([l * fa, l * la, l * v, l * e, l * (I * h + G * p + S * u - (F * h + Z * p + Q * u)), l * (F * c + P * p + V * u - (I * c + O * p + $ * u)), l * (Z * c + O * h + x * u - (G * c + P * h + W * u)), l * (Q * c + $ * h + W * p - (S * c + V * h + x * p)), l * (ea * n + U * t + ba * d - (Y * n + R * t + X * d)), l * (Y * k + ga * t + ia * d - (ea * k + ja * t + aa * d)), l * (R * k + ja * n + T * d - (U * k + ga * n + da * d)), l * (X * k + aa * n + da * t - (ba * k + ia * n + T * - t)), l * (R * s + X * E + Y * m - (ba * E + ea * m + U * s)), l * (aa * E + ea * f + ja * s - (ga * s + ia * E + Y * f)), l * (ga * m + da * E + U * f - (T * E + R * f + ja * m)), l * (T * s + ba * f + ia * m - (aa * m + da * s + X * f))]); + var f = d[1], g = d[2], k = d[3], h = d[4], l = d[5], m = d[6], p = d[7], r = d[8], s = d[9], t = d[10], u = d[11], v = d[12], y = d[13], z = d[14], d = d[15], G = t * d, C = z * u, I = m * d, P = z * p, T = m * u, O = t * p, Q = g * d, S = z * k, V = g * u, aa = t * k, $ = g * p, w = m * k, U = r * y, ba = v * s, R = h * y, N = v * l, Z = h * s, fa = r * l, X = c * y, ia = v * f, ga = c * s, ca = r * f, da = c * l, ea = h * f, W = G * l + P * s + T * y - (C * l + I * s + O * y), ka = C * + f + Q * s + aa * y - (G * f + S * s + V * y), y = I * f + S * l + $ * y - (P * f + Q * l + w * y), f = O * f + V * l + w * s - (T * f + aa * l + $ * s), l = 1 / (c * W + h * ka + r * y + v * f); + return new a([l * W, l * ka, l * y, l * f, l * (C * h + I * r + O * v - (G * h + P * r + T * v)), l * (G * c + S * r + V * v - (C * c + Q * r + aa * v)), l * (P * c + Q * h + w * v - (I * c + S * h + $ * v)), l * (T * c + aa * h + $ * r - (O * c + V * h + w * r)), l * (U * p + N * u + Z * d - (ba * p + R * u + fa * d)), l * (ba * k + X * u + ca * d - (U * k + ia * u + ga * d)), l * (R * k + ia * p + da * d - (N * k + X * p + ea * d)), l * (fa * k + ga * p + ea * u - (Z * k + ca * p + da * + u)), l * (R * t + fa * z + ba * m - (Z * z + U * m + N * t)), l * (ga * z + U * g + ia * t - (X * t + ca * z + ba * g)), l * (X * m + ea * z + N * g - (da * z + R * g + ia * m)), l * (da * t + Z * g + ca * m - (ga * m + ea * t + fa * g))]); }; return a; }(); - a.Matrix3D = k; - k = function() { - function a(c, d, e) { - void 0 === e && (e = 7); - var f = this.size = 1 << e; - this.sizeInBits = e; + a.Matrix3D = m; + m = function() { + function a(c, d, f) { + void 0 === f && (f = 7); + var g = this.size = 1 << f; + this.sizeInBits = f; this.w = c; this.h = d; - this.c = Math.ceil(c / f); - this.r = Math.ceil(d / f); + this.c = Math.ceil(c / g); + this.r = Math.ceil(d / g); this.grid = []; for (c = 0;c < this.r;c++) { for (this.grid.push([]), d = 0;d < this.c;d++) { - this.grid[c][d] = new a.Cell(new q(d * f, c * f, f, f)); + this.grid[c][d] = new a.Cell(new p(d * g, c * g, g, g)); } } } @@ -49691,7 +49782,7 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new } }; a.prototype.getBounds = function() { - return new q(0, 0, this.w, this.h); + return new p(0, 0, this.w, this.h); }; a.prototype.addDirtyRectangle = function(a) { var b = a.x >> this.sizeInBits, c = a.y >> this.sizeInBits; @@ -49704,8 +49795,8 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new if (d.region.contains(a)) { d.bounds.isEmpty() ? d.bounds.set(a) : d.bounds.contains(a) || d.bounds.union(a); } else { - for (var e = Math.min(this.c, Math.ceil((a.x + a.w) / this.size)) - b, f = Math.min(this.r, Math.ceil((a.y + a.h) / this.size)) - c, k = 0;k < e;k++) { - for (var h = 0;h < f;h++) { + for (var f = Math.min(this.c, Math.ceil((a.x + a.w) / this.size)) - b, g = Math.min(this.r, Math.ceil((a.y + a.h) / this.size)) - c, k = 0;k < f;k++) { + for (var h = 0;h < g;h++) { d = this.grid[c + h][b + k], d = d.region.clone(), d.intersect(a), d.isEmpty() || this.addDirtyRectangle(d); } } @@ -49741,10 +49832,10 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new if (b && b.drawGrid) { a.strokeStyle = "white"; for (var d = 0;d < this.r;d++) { - for (var e = 0;e < this.c;e++) { - var f = this.grid[d][e]; + for (var f = 0;f < this.c;f++) { + var g = this.grid[d][f]; a.beginPath(); - c(f.region); + c(g.region); a.closePath(); a.stroke(); } @@ -49752,20 +49843,20 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new } a.strokeStyle = "#E0F8D8"; for (d = 0;d < this.r;d++) { - for (e = 0;e < this.c;e++) { - f = this.grid[d][e], a.beginPath(), c(f.bounds), a.closePath(), a.stroke(); + for (f = 0;f < this.c;f++) { + g = this.grid[d][f], a.beginPath(), c(g.bounds), a.closePath(), a.stroke(); } } }; - a.tmpRectangle = q.createEmpty(); + a.tmpRectangle = p.createEmpty(); return a; }(); - a.DirtyRegion = k; + a.DirtyRegion = m; (function(a) { var c = function() { function a(b) { this.region = b; - this.bounds = q.createEmpty(); + this.bounds = p.createEmpty(); } a.prototype.clear = function() { this.bounds.setEmpty(); @@ -49773,40 +49864,39 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new return a; }(); a.Cell = c; - })(k = a.DirtyRegion || (a.DirtyRegion = {})); - var f = function() { - function a(b, c, d, e, f, k) { + })(m = a.DirtyRegion || (a.DirtyRegion = {})); + var g = function() { + function a(b, c, d, f, g, k) { this.index = b; this.x = c; this.y = d; this.scale = k; - this.bounds = new q(c * e, d * f, e, f); + this.bounds = new p(c * f, d * g, f, g); } a.prototype.getOBB = function() { if (this._obb) { return this._obb; } this.bounds.getCorners(a.corners); - return this._obb = new n(a.corners); + return this._obb = new s(a.corners); }; - a.corners = m.createEmptyPoints(4); + a.corners = c.createEmptyPoints(4); return a; }(); - a.Tile = f; - var d = function() { - function a(b, c, d, k, h) { + a.Tile = g; + var f = function() { + function a(b, c, d, f, k) { this.tileW = d; - this.tileH = k; - this.scale = h; + this.tileH = f; + this.scale = k; this.w = b; this.h = c; - this.rows = Math.ceil(c / k); + this.rows = Math.ceil(c / f); this.columns = Math.ceil(b / d); - e(2048 > this.rows && 2048 > this.columns); this.tiles = []; for (c = b = 0;c < this.rows;c++) { - for (var l = 0;l < this.columns;l++) { - this.tiles.push(new f(b++, l, c, d, k, h)); + for (var h = 0;h < this.columns;h++) { + this.tiles.push(new g(b++, h, c, d, f, k)); } } } @@ -49820,39 +49910,39 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new var c = this.columns * this.rows; return 40 > c && b.isScaleOrRotation() ? this.getFewTiles(a, b, 10 < c) : this.getManyTiles(a, b); }; - a.prototype.getFewTiles = function(c, d, e) { - void 0 === e && (e = !0); + a.prototype.getFewTiles = function(c, d, f) { + void 0 === f && (f = !0); if (d.isTranslationOnly() && 1 === this.tiles.length) { return this.tiles[0].bounds.intersectsTranslated(c, d.tx, d.ty) ? [this.tiles[0]] : []; } d.transformRectangle(c, a._points); - var f; - c = new q(0, 0, this.w, this.h); - e && (f = new n(a._points)); - c.intersect(n.getBounds(a._points)); + var g; + c = new p(0, 0, this.w, this.h); + f && (g = new s(a._points)); + c.intersect(s.getBounds(a._points)); if (c.isEmpty()) { return[]; } var k = c.x / this.tileW | 0; d = c.y / this.tileH | 0; - var h = Math.ceil((c.x + c.w) / this.tileW) | 0, l = Math.ceil((c.y + c.h) / this.tileH) | 0, k = p(k, 0, this.columns), h = p(h, 0, this.columns); - d = p(d, 0, this.rows); - for (var l = p(l, 0, this.rows), m = [];k < h;k++) { - for (var s = d;s < l;s++) { - var t = this.tiles[s * this.columns + k]; - t.bounds.intersects(c) && (e ? t.getOBB().intersects(f) : 1) && m.push(t); + var h = Math.ceil((c.x + c.w) / this.tileW) | 0, l = Math.ceil((c.y + c.h) / this.tileH) | 0, k = u(k, 0, this.columns), h = u(h, 0, this.columns); + d = u(d, 0, this.rows); + for (var l = u(l, 0, this.rows), m = [];k < h;k++) { + for (var r = d;r < l;r++) { + var t = this.tiles[r * this.columns + k]; + t.bounds.intersects(c) && (f ? t.getOBB().intersects(g) : 1) && m.push(t); } } return m; }; a.prototype.getManyTiles = function(c, d) { - function e(a, b, c) { + function f(a, b, c) { return(a - b.x) * (c.y - b.y) / (c.x - b.x) + b.y; } - function f(a, b, c, d, e) { + function g(a, b, c, e, d) { if (!(0 > c || c >= b.columns)) { - for (d = p(d, 0, b.rows), e = p(e + 1, 0, b.rows);d < e;d++) { - a.push(b.tiles[d * b.columns + c]); + for (e = u(e, 0, b.rows), d = u(d + 1, 0, b.rows);e < d;e++) { + a.push(b.tiles[e * b.columns + c]); } } } @@ -49862,40 +49952,40 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new h.push(k[l % 4]); } (h[1].x - h[0].x) * (h[3].y - h[0].y) < (h[1].y - h[0].y) * (h[3].x - h[0].x) && (k = h[1], h[1] = h[3], h[3] = k); - var k = [], n, q, l = Math.floor(h[0].x / this.tileW), m = (l + 1) * this.tileW; + var k = [], p, r, l = Math.floor(h[0].x / this.tileW), m = (l + 1) * this.tileW; if (h[2].x < m) { - n = Math.min(h[0].y, h[1].y, h[2].y, h[3].y); - q = Math.max(h[0].y, h[1].y, h[2].y, h[3].y); - var s = Math.floor(n / this.tileH), t = Math.floor(q / this.tileH); - f(k, this, l, s, t); + p = Math.min(h[0].y, h[1].y, h[2].y, h[3].y); + r = Math.max(h[0].y, h[1].y, h[2].y, h[3].y); + var s = Math.floor(p / this.tileH), t = Math.floor(r / this.tileH); + g(k, this, l, s, t); return k; } - var u = 0, v = 4, C = !1; + var v = 0, E = 4, y = !1; if (h[0].x === h[1].x || h[0].x === h[3].x) { - h[0].x === h[1].x ? (C = !0, u++) : v--, n = e(m, h[u], h[u + 1]), q = e(m, h[v], h[v - 1]), s = Math.floor(h[u].y / this.tileH), t = Math.floor(h[v].y / this.tileH), f(k, this, l, s, t), l++; + h[0].x === h[1].x ? (y = !0, v++) : E--, p = f(m, h[v], h[v + 1]), r = f(m, h[E], h[E - 1]), s = Math.floor(h[v].y / this.tileH), t = Math.floor(h[E].y / this.tileH), g(k, this, l, s, t), l++; } do { - var E, F, I, G; - h[u + 1].x < m ? (E = h[u + 1].y, I = !0) : (E = e(m, h[u], h[u + 1]), I = !1); - h[v - 1].x < m ? (F = h[v - 1].y, G = !0) : (F = e(m, h[v], h[v - 1]), G = !1); - s = Math.floor((h[u].y < h[u + 1].y ? n : E) / this.tileH); - t = Math.floor((h[v].y > h[v - 1].y ? q : F) / this.tileH); - f(k, this, l, s, t); - if (I && C) { + var z, G, C, I; + h[v + 1].x < m ? (z = h[v + 1].y, C = !0) : (z = f(m, h[v], h[v + 1]), C = !1); + h[E - 1].x < m ? (G = h[E - 1].y, I = !0) : (G = f(m, h[E], h[E - 1]), I = !1); + s = Math.floor((h[v].y < h[v + 1].y ? p : z) / this.tileH); + t = Math.floor((h[E].y > h[E - 1].y ? r : G) / this.tileH); + g(k, this, l, s, t); + if (C && y) { break; } - I ? (C = !0, u++, n = e(m, h[u], h[u + 1])) : n = E; - G ? (v--, q = e(m, h[v], h[v - 1])) : q = F; + C ? (y = !0, v++, p = f(m, h[v], h[v + 1])) : p = z; + I ? (E--, r = f(m, h[E], h[E - 1])) : r = G; l++; m = (l + 1) * this.tileW; - } while (u < v); + } while (v < E); return k; }; - a._points = m.createEmptyPoints(4); + a._points = c.createEmptyPoints(4); return a; }(); - a.TileCache = d; - k = function() { + a.TileCache = f; + m = function() { function a(b, c, d) { this._cacheLevels = []; this._source = b; @@ -49903,114 +49993,110 @@ GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new this._minUntiledSize = d; } a.prototype._getTilesAtScale = function(a, b, c) { - var f = Math.max(b.getAbsoluteScaleX(), b.getAbsoluteScaleY()), k = 0; - 1 !== f && (k = p(Math.round(Math.log(1 / f) / Math.LN2), -5, 3)); - f = u(k); + var d = Math.max(b.getAbsoluteScaleX(), b.getAbsoluteScaleY()), g = 0; + 1 !== d && (g = u(Math.round(Math.log(1 / d) / Math.LN2), -5, 3)); + d = t(g); if (this._source.hasFlags(1048576)) { for (;;) { - f = u(k); - if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(f, f))) { + d = t(g); + if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(d, d))) { break; } - k--; - e(-5 <= k); + g--; } } - this._source.hasFlags(2097152) || (k = p(k, -5, 0)); - f = u(k); - c = 5 + k; - k = this._cacheLevels[c]; - if (!k) { - var k = this._source.getBounds().getAbsoluteBounds().clone().scale(f, f), h, l; - this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(k.w, k.h) <= this._minUntiledSize ? (h = k.w, l = k.h) : h = l = this._tileSize; - k = this._cacheLevels[c] = new d(k.w, k.h, h, l, f); + this._source.hasFlags(2097152) || (g = u(g, -5, 0)); + d = t(g); + c = 5 + g; + g = this._cacheLevels[c]; + if (!g) { + var g = this._source.getBounds().getAbsoluteBounds().clone().scale(d, d), h, k; + this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(g.w, g.h) <= this._minUntiledSize ? (h = g.w, k = g.h) : h = k = this._tileSize; + g = this._cacheLevels[c] = new f(g.w, g.h, h, k, d); } - return k.getTiles(a, b.scaleClone(f, f)); + return g.getTiles(a, b.scaleClone(d, d)); }; a.prototype.fetchTiles = function(a, b, c, d) { - var e = new q(0, 0, c.canvas.width, c.canvas.height); - a = this._getTilesAtScale(a, b, e); - var f; + var f = new p(0, 0, c.canvas.width, c.canvas.height); + a = this._getTilesAtScale(a, b, f); + var g; b = this._source; - for (var k = 0;k < a.length;k++) { - var h = a[k]; - h.cachedSurfaceRegion && h.cachedSurfaceRegion.surface && !b.hasFlags(1048592) || (f || (f = []), f.push(h)); + for (var h = 0;h < a.length;h++) { + var k = a[h]; + k.cachedSurfaceRegion && k.cachedSurfaceRegion.surface && !b.hasFlags(1048592) || (g || (g = []), g.push(k)); } - f && this._cacheTiles(c, f, d, e); + g && this._cacheTiles(c, g, d, f); b.removeFlags(16); return a; }; a.prototype._getTileBounds = function(a) { - for (var b = q.createEmpty(), c = 0;c < a.length;c++) { + for (var b = p.createEmpty(), c = 0;c < a.length;c++) { b.union(a[c].bounds); } return b; }; a.prototype._cacheTiles = function(a, b, c, d, f) { void 0 === f && (f = 4); - e(0 < f, "Infinite recursion is likely."); - var k = this._getTileBounds(b); + var g = this._getTileBounds(b); a.save(); a.setTransform(1, 0, 0, 1, 0, 0); a.clearRect(0, 0, d.w, d.h); - a.translate(-k.x, -k.y); + a.translate(-g.x, -g.y); a.scale(b[0].scale, b[0].scale); - var l = this._source.getBounds(); - a.translate(-l.x, -l.y); - 2 <= h.traceLevel && h.writer && h.writer.writeLn("Rendering Tiles: " + k); + var h = this._source.getBounds(); + a.translate(-h.x, -h.y); + 2 <= k.traceLevel && k.writer && k.writer.writeLn("Rendering Tiles: " + g); this._source.render(a, 0); a.restore(); - for (var l = null, m = 0;m < b.length;m++) { - var n = b[m], p = n.bounds.clone(); - p.x -= k.x; - p.y -= k.y; - d.contains(p) || (l || (l = []), l.push(n)); - n.cachedSurfaceRegion = c(n.cachedSurfaceRegion, a, p); + for (var h = null, l = 0;l < b.length;l++) { + var m = b[l], p = m.bounds.clone(); + p.x -= g.x; + p.y -= g.y; + d.contains(p) || (h || (h = []), h.push(m)); + m.cachedSurfaceRegion = c(m.cachedSurfaceRegion, a, p); } - l && (2 <= l.length ? (b = l.slice(0, l.length / 2 | 0), k = l.slice(b.length), this._cacheTiles(a, b, c, d, f - 1), this._cacheTiles(a, k, c, d, f - 1)) : this._cacheTiles(a, l, c, d, f - 1)); + h && (2 <= h.length ? (b = h.slice(0, h.length / 2 | 0), g = h.slice(b.length), this._cacheTiles(a, b, c, d, f - 1), this._cacheTiles(a, g, c, d, f - 1)) : this._cacheTiles(a, h, c, d, f - 1)); }; return a; }(); - a.RenderableTileCache = k; - })(h.Geometry || (h.Geometry = {})); - })(c.GFX || (c.GFX = {})); + a.RenderableTileCache = m; + })(k.Geometry || (k.Geometry = {})); + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { - var a = c.IntegerUtilities.roundToMultipleOfPowerOfTwo, s = c.Debug.assert, v = h.Geometry.Rectangle; - (function(c) { +(function(d) { + (function(k) { + var a = d.IntegerUtilities.roundToMultipleOfPowerOfTwo, r = k.Geometry.Rectangle; + (function(d) { var u = function(a) { function c() { a.apply(this, arguments); } __extends(c, a); return c; - }(h.Geometry.Rectangle); - c.Region = u; - var l = function() { + }(k.Geometry.Rectangle); + d.Region = u; + var t = function() { function a(c, d) { - this._root = new e(0, 0, c | 0, d | 0, !1); + this._root = new l(0, 0, c | 0, d | 0, !1); } a.prototype.allocate = function(a, c) { a = Math.ceil(a); c = Math.ceil(c); - s(0 < a && 0 < c); var b = this._root.insert(a, c); b && (b.allocator = this, b.allocated = !0); return b; }; a.prototype.free = function(a) { - s(a.allocator === this); a.clear(); a.allocated = !1; }; @@ -50018,10 +50104,10 @@ __extends = this.__extends || function(c, h) { a.MAX_DEPTH = 256; return a; }(); - c.CompactAllocator = l; - var e = function(a) { - function c(d, b, e, f, h) { - a.call(this, d, b, e, f); + d.CompactAllocator = t; + var l = function(a) { + function c(d, b, e, g, h) { + a.call(this, d, b, e, g); this._children = null; this._horizontal = h; this.allocated = !1; @@ -50035,19 +50121,19 @@ __extends = this.__extends || function(c, h) { return this._insert(a, b, 0); }; c.prototype._insert = function(a, b, e) { - if (!(e > l.MAX_DEPTH || this.allocated || this.w < a || this.h < b)) { + if (!(e > t.MAX_DEPTH || this.allocated || this.w < a || this.h < b)) { if (this._children) { - var k; - if ((k = this._children[0]._insert(a, b, e + 1)) || (k = this._children[1]._insert(a, b, e + 1))) { - return k; + var d; + if ((d = this._children[0]._insert(a, b, e + 1)) || (d = this._children[1]._insert(a, b, e + 1))) { + return d; } } else { - return k = !this._horizontal, l.RANDOM_ORIENTATION && (k = .5 <= Math.random()), this._children = this._horizontal ? [new c(this.x, this.y, this.w, b, !1), new c(this.x, this.y + b, this.w, this.h - b, k)] : [new c(this.x, this.y, a, this.h, !0), new c(this.x + a, this.y, this.w - a, this.h, k)], k = this._children[0], k.w === a && k.h === b ? (k.allocated = !0, k) : this._insert(a, b, e + 1); + return d = !this._horizontal, t.RANDOM_ORIENTATION && (d = .5 <= Math.random()), this._children = this._horizontal ? [new c(this.x, this.y, this.w, b, !1), new c(this.x, this.y + b, this.w, this.h - b, d)] : [new c(this.x, this.y, a, this.h, !0), new c(this.x + a, this.y, this.w - a, this.h, d)], d = this._children[0], d.w === a && d.h === b ? (d.allocated = !0, d) : this._insert(a, b, e + 1); } } }; return c; - }(c.Region), m = function() { + }(d.Region), c = function() { function a(c, d, b, e) { this._columns = c / b | 0; this._rows = d / e | 0; @@ -50060,112 +50146,108 @@ __extends = this.__extends || function(c, h) { a.prototype.allocate = function(a, c) { a = Math.ceil(a); c = Math.ceil(c); - s(0 < a && 0 < c); var b = this._sizeW, e = this._sizeH; if (a > b || c > e) { return null; } - var k = this._freeList, h = this._index; - return 0 < k.length ? (b = k.pop(), s(!1 === b.allocated), b.w = a, b.h = c, b.allocated = !0, b) : h < this._total ? (k = h / this._columns | 0, b = new t((h - k * this._columns) * b, k * e, a, c), b.index = h, b.allocator = this, b.allocated = !0, this._index++, b) : null; + var d = this._freeList, k = this._index; + return 0 < d.length ? (b = d.pop(), b.w = a, b.h = c, b.allocated = !0, b) : k < this._total ? (d = k / this._columns | 0, b = new h((k - d * this._columns) * b, d * e, a, c), b.index = k, b.allocator = this, b.allocated = !0, this._index++, b) : null; }; a.prototype.free = function(a) { - s(a.allocator === this); a.allocated = !1; this._freeList.push(a); }; return a; }(); - c.GridAllocator = m; - var t = function(a) { - function c(d, b, e, f) { - a.call(this, d, b, e, f); + d.GridAllocator = c; + var h = function(a) { + function c(d, b, e, g) { + a.call(this, d, b, e, g); this.index = -1; } __extends(c, a); return c; - }(c.Region); - c.GridCell = t; - var q = function() { + }(d.Region); + d.GridCell = h; + var p = function() { return function(a, c, d) { this.size = a; this.region = c; this.allocator = d; }; - }(), n = function(a) { - function c(d, b, e, f, h) { - a.call(this, d, b, e, f); + }(), s = function(a) { + function c(d, b, e, g, h) { + a.call(this, d, b, e, g); this.region = h; } __extends(c, a); return c; - }(c.Region); - c.BucketCell = n; + }(d.Region); + d.BucketCell = s; u = function() { - function c(a, d) { - s(0 < a && 0 < d); + function d(a, c) { this._buckets = []; this._w = a | 0; - this._h = d | 0; + this._h = c | 0; this._filled = 0; } - c.prototype.allocate = function(c, d) { - c = Math.ceil(c); + d.prototype.allocate = function(d, f) { d = Math.ceil(d); - s(0 < c && 0 < d); - var b = Math.max(c, d); - if (c > this._w || d > this._h) { + f = Math.ceil(f); + var b = Math.max(d, f); + if (d > this._w || f > this._h) { return null; } - var e = null, k, h = this._buckets; + var e = null, h, k = this._buckets; do { - for (var l = 0;l < h.length && !(h[l].size >= b && (k = h[l], e = k.allocator.allocate(c, d)));l++) { + for (var l = 0;l < k.length && !(k[l].size >= b && (h = k[l], e = h.allocator.allocate(d, f)));l++) { } if (!e) { - var p = this._h - this._filled; - if (p < d) { + var m = this._h - this._filled; + if (m < f) { return null; } var l = a(b, 8), t = 2 * l; - t > p && (t = p); + t > m && (t = m); if (t < l) { return null; } - p = new v(0, this._filled, this._w, t); - this._buckets.push(new q(l, p, new m(p.w, p.h, l, l))); + m = new r(0, this._filled, this._w, t); + this._buckets.push(new p(l, m, new c(m.w, m.h, l, l))); this._filled += t; } } while (!e); - return new n(k.region.x + e.x, k.region.y + e.y, e.w, e.h, e); + return new s(h.region.x + e.x, h.region.y + e.y, e.w, e.h, e); }; - c.prototype.free = function(a) { + d.prototype.free = function(a) { a.region.allocator.free(a.region); }; - return c; + return d; }(); - c.BucketAllocator = u; - })(h.RegionAllocator || (h.RegionAllocator = {})); + d.BucketAllocator = u; + })(k.RegionAllocator || (k.RegionAllocator = {})); (function(a) { - var c = function() { - function a(c) { - this._createSurface = c; + var d = function() { + function a(d) { + this._createSurface = d; this._surfaces = []; } Object.defineProperty(a.prototype, "surfaces", {get:function() { return this._surfaces; }, enumerable:!0, configurable:!0}); a.prototype._createNewSurface = function(a, c) { - var h = this._createSurface(a, c); - this._surfaces.push(h); - return h; + var d = this._createSurface(a, c); + this._surfaces.push(d); + return d; }; a.prototype.addSurface = function(a) { this._surfaces.push(a); }; - a.prototype.allocate = function(a, c) { - for (var h = 0;h < this._surfaces.length;h++) { - var l = this._surfaces[h].allocate(a, c); - if (l) { - return l; + a.prototype.allocate = function(a, c, d) { + for (var k = 0;k < this._surfaces.length;k++) { + var r = this._surfaces[k]; + if (r !== d && (r = r.allocate(a, c))) { + return r; } } return this._createNewSurface(a, c).allocate(a, c); @@ -50174,13 +50256,13 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - a.SimpleAllocator = c; - })(h.SurfaceRegionAllocator || (h.SurfaceRegionAllocator = {})); - })(c.GFX || (c.GFX = {})); + a.SimpleAllocator = d; + })(k.SurfaceRegionAllocator || (k.SurfaceRegionAllocator = {})); + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = h.Geometry.Rectangle, s = h.Geometry.Matrix, v = h.Geometry.DirtyRegion, p = c.Debug.assert; +(function(d) { + (function(k) { + var a = k.Geometry.Rectangle, r = k.Geometry.Matrix, v = k.Geometry.DirtyRegion; (function(a) { a[a.Normal = 1] = "Normal"; a[a.Layer = 2] = "Layer"; @@ -50196,8 +50278,8 @@ __extends = this.__extends || function(c, h) { a[a.Erase = 12] = "Erase"; a[a.Overlay = 13] = "Overlay"; a[a.HardLight = 14] = "HardLight"; - })(h.BlendMode || (h.BlendMode = {})); - var u = h.BlendMode; + })(k.BlendMode || (k.BlendMode = {})); + var u = k.BlendMode; (function(a) { a[a.None = 0] = "None"; a[a.BoundsAutoCompute = 2] = "BoundsAutoCompute"; @@ -50223,21 +50305,21 @@ __extends = this.__extends || function(c, h) { a[a.Scalable = 2097152] = "Scalable"; a[a.Tileable = 4194304] = "Tileable"; a[a.Transparent = 32768] = "Transparent"; - })(h.NodeFlags || (h.NodeFlags = {})); - var l = h.NodeFlags; + })(k.NodeFlags || (k.NodeFlags = {})); + var t = k.NodeFlags; (function(a) { a[a.Node = 1] = "Node"; a[a.Shape = 3] = "Shape"; a[a.Group = 5] = "Group"; a[a.Stage = 13] = "Stage"; a[a.Renderable = 33] = "Renderable"; - })(h.NodeType || (h.NodeType = {})); - var e = h.NodeType; + })(k.NodeType || (k.NodeType = {})); + var l = k.NodeType; (function(a) { a[a.None = 0] = "None"; a[a.OnStageBoundsChanged = 1] = "OnStageBoundsChanged"; - })(h.NodeEventType || (h.NodeEventType = {})); - var m = function() { + })(k.NodeEventType || (k.NodeEventType = {})); + var c = function() { function a() { } a.prototype.visitNode = function(a, b) { @@ -50259,16 +50341,16 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - h.NodeVisitor = m; - var t = function() { + k.NodeVisitor = c; + var h = function() { return function() { }; }(); - h.State = t; - var q = function(a) { + k.State = h; + var p = function(a) { function b() { a.call(this); - this.matrix = s.createIdentity(); + this.matrix = r.createIdentity(); } __extends(b, a); b.prototype.transform = function(a) { @@ -50295,9 +50377,9 @@ __extends = this.__extends || function(c, h) { }; b._dirtyStack = []; return b; - }(t); - h.MatrixState = q; - var n = function(a) { + }(h); + k.MatrixState = p; + var s = function(a) { function b() { a.apply(this, arguments); this.isDirty = !0; @@ -50305,7 +50387,7 @@ __extends = this.__extends || function(c, h) { __extends(b, a); b.prototype.start = function(a, b) { this._dirtyRegion = b; - var c = new q; + var c = new p; c.matrix.setIdentity(); a.visit(this, c); c.free(); @@ -50324,9 +50406,9 @@ __extends = this.__extends || function(c, h) { a.toggleFlags(); }; return b; - }(m); - h.DirtyNodeVisitor = n; - t = function(a) { + }(c); + k.DirtyNodeVisitor = s; + h = function(a) { function b(c) { a.call(this); this.writer = c; @@ -50351,22 +50433,22 @@ __extends = this.__extends || function(c, h) { this.visitGroup(a, b); }; return b; - }(m); - h.TracingNodeVisitor = t; - var k = function() { - function f() { + }(c); + k.TracingNodeVisitor = h; + var m = function() { + function c() { this._clip = -1; this._eventListeners = null; - this._id = f._nextId++; + this._id = c._nextId++; this._type = 1; this._index = -1; this._parent = null; this.reset(); } - Object.defineProperty(f.prototype, "id", {get:function() { + Object.defineProperty(c.prototype, "id", {get:function() { return this._id; }, enumerable:!0, configurable:!0}); - f.prototype._dispatchEvent = function() { + c.prototype._dispatchEvent = function() { if (this._eventListeners) { for (var a = this._eventListeners, b = 0;b < a.length;b++) { var c = a[b]; @@ -50374,26 +50456,26 @@ __extends = this.__extends || function(c, h) { } } }; - f.prototype.addEventListener = function(a, b) { + c.prototype.addEventListener = function(a, b) { this._eventListeners || (this._eventListeners = []); this._eventListeners.push({type:a, listener:b}); }; - Object.defineProperty(f.prototype, "properties", {get:function() { + Object.defineProperty(c.prototype, "properties", {get:function() { return this._properties || (this._properties = {}); }, enumerable:!0, configurable:!0}); - f.prototype.reset = function() { - this._flags = l.Default; + c.prototype.reset = function() { + this._flags = t.Default; this._properties = this._transform = this._layer = this._bounds = null; }; - Object.defineProperty(f.prototype, "clip", {get:function() { + Object.defineProperty(c.prototype, "clip", {get:function() { return this._clip; }, set:function(a) { this._clip = a; }, enumerable:!0, configurable:!0}); - Object.defineProperty(f.prototype, "parent", {get:function() { + Object.defineProperty(c.prototype, "parent", {get:function() { return this._parent; }, enumerable:!0, configurable:!0}); - f.prototype.getTransformedBounds = function(a) { + c.prototype.getTransformedBounds = function(a) { var b = this.getBounds(!0); if (a !== this && !b.isEmpty()) { var c = this.getTransform().getConcatenatedMatrix(); @@ -50401,9 +50483,9 @@ __extends = this.__extends || function(c, h) { } return b; }; - f.prototype._markCurrentBoundsAsDirtyRegion = function() { + c.prototype._markCurrentBoundsAsDirtyRegion = function() { }; - f.prototype.getStage = function(a) { + c.prototype.getStage = function(a) { void 0 === a && (a = !0); for (var b = this._parent;b;) { if (b.isType(13)) { @@ -50420,36 +50502,35 @@ __extends = this.__extends || function(c, h) { } return null; }; - f.prototype.getChildren = function(a) { - throw c.Debug.abstractMethod("Node::getChildren"); + c.prototype.getChildren = function(a) { + throw void 0; }; - f.prototype.getBounds = function(a) { - throw c.Debug.abstractMethod("Node::getBounds"); + c.prototype.getBounds = function(a) { + throw void 0; }; - f.prototype.setBounds = function(b) { - p(!(this._flags & 2)); + c.prototype.setBounds = function(b) { (this._bounds || (this._bounds = a.createEmpty())).set(b); this.removeFlags(256); }; - f.prototype.clone = function() { - throw c.Debug.abstractMethod("Node::clone"); + c.prototype.clone = function() { + throw void 0; }; - f.prototype.setFlags = function(a) { + c.prototype.setFlags = function(a) { this._flags |= a; }; - f.prototype.hasFlags = function(a) { + c.prototype.hasFlags = function(a) { return(this._flags & a) === a; }; - f.prototype.hasAnyFlags = function(a) { + c.prototype.hasAnyFlags = function(a) { return!!(this._flags & a); }; - f.prototype.removeFlags = function(a) { + c.prototype.removeFlags = function(a) { this._flags &= ~a; }; - f.prototype.toggleFlags = function() { + c.prototype.toggleFlags = function() { this._flags &= -17; }; - f.prototype._propagateFlagsUp = function(a) { + c.prototype._propagateFlagsUp = function(a) { if (0 !== a && !this.hasFlags(a)) { this.hasFlags(2) || (a &= -257); this.setFlags(a); @@ -50457,47 +50538,44 @@ __extends = this.__extends || function(c, h) { b && b._propagateFlagsUp(a); } }; - f.prototype._propagateFlagsDown = function(a) { - throw c.Debug.abstractMethod("Node::_propagateFlagsDown"); + c.prototype._propagateFlagsDown = function(a) { + throw void 0; }; - f.prototype.isAncestor = function(a) { + c.prototype.isAncestor = function(a) { for (;a;) { if (a === this) { return!0; } - p(a !== a._parent); a = a._parent; } return!1; }; - f._getAncestors = function(a, b) { - var c = f._path; - for (c.length = 0;a && a !== b;) { - p(a !== a._parent), c.push(a), a = a._parent; + c._getAncestors = function(a, b) { + var d = c._path; + for (d.length = 0;a && a !== b;) { + d.push(a), a = a._parent; } - p(a === b, "Last ancestor is not an ancestor."); - return c; + return d; }; - f.prototype._findClosestAncestor = function() { + c.prototype._findClosestAncestor = function() { for (var a = this;a;) { if (!1 === a.hasFlags(512)) { return a; } - p(a !== a._parent); a = a._parent; } return null; }; - f.prototype.isType = function(a) { + c.prototype.isType = function(a) { return this._type === a; }; - f.prototype.isTypeOf = function(a) { + c.prototype.isTypeOf = function(a) { return(this._type & a) === a; }; - f.prototype.isLeaf = function() { + c.prototype.isLeaf = function() { return this.isType(33) || this.isType(3); }; - f.prototype.isLinear = function() { + c.prototype.isLinear = function() { if (this.isLeaf()) { return!0; } @@ -50509,20 +50587,20 @@ __extends = this.__extends || function(c, h) { } return!1; }; - f.prototype.getTransformMatrix = function() { + c.prototype.getTransformMatrix = function() { var a; void 0 === a && (a = !1); return this.getTransform().getMatrix(a); }; - f.prototype.getTransform = function() { - null === this._transform && (this._transform = new d(this)); + c.prototype.getTransform = function() { + null === this._transform && (this._transform = new f(this)); return this._transform; }; - f.prototype.getLayer = function() { + c.prototype.getLayer = function() { null === this._layer && (this._layer = new b(this)); return this._layer; }; - f.prototype.visit = function(a, b) { + c.prototype.visit = function(a, b) { switch(this._type) { case 1: a.visitNode(this, b); @@ -50540,24 +50618,24 @@ __extends = this.__extends || function(c, h) { a.visitRenderable(this, b); break; default: - c.Debug.unexpectedCase(); + d.Debug.unexpectedCase(); } }; - f.prototype.invalidate = function() { - this._propagateFlagsUp(l.UpOnInvalidate); + c.prototype.invalidate = function() { + this._propagateFlagsUp(t.UpOnInvalidate); }; - f.prototype.toString = function(a) { + c.prototype.toString = function(a) { void 0 === a && (a = !1); - var b = e[this._type] + " " + this._id; + var b = l[this._type] + " " + this._id; a && (b += " " + this._bounds.toString()); return b; }; - f._path = []; - f._nextId = 0; - return f; + c._path = []; + c._nextId = 0; + return c; }(); - h.Node = k; - var f = function(b) { + k.Node = m; + var g = function(b) { function c() { b.call(this); this._type = 5; @@ -50569,45 +50647,37 @@ __extends = this.__extends || function(c, h) { return a ? this._children.slice(0) : this._children; }; c.prototype.childAt = function(a) { - p(0 <= a && a < this._children.length); return this._children[a]; }; Object.defineProperty(c.prototype, "child", {get:function() { - p(1 === this._children.length); return this._children[0]; }, enumerable:!0, configurable:!0}); Object.defineProperty(c.prototype, "groupChild", {get:function() { - p(1 === this._children.length); - p(this._children[0] instanceof c); return this._children[0]; }, enumerable:!0, configurable:!0}); c.prototype.addChild = function(a) { - p(a); - p(!a.isAncestor(this)); a._parent && a._parent.removeChildAt(a._index); a._parent = this; a._index = this._children.length; this._children.push(a); - this._propagateFlagsUp(l.UpOnAddedOrRemoved); - a._propagateFlagsDown(l.DownOnAddedOrRemoved); + this._propagateFlagsUp(t.UpOnAddedOrRemoved); + a._propagateFlagsDown(t.DownOnAddedOrRemoved); }; c.prototype.removeChildAt = function(a) { - p(0 <= a && a < this._children.length); var b = this._children[a]; - p(a === b._index); this._children.splice(a, 1); b._index = -1; b._parent = null; - this._propagateFlagsUp(l.UpOnAddedOrRemoved); - b._propagateFlagsDown(l.DownOnAddedOrRemoved); + this._propagateFlagsUp(t.UpOnAddedOrRemoved); + b._propagateFlagsDown(t.DownOnAddedOrRemoved); }; c.prototype.clearChildren = function() { for (var a = 0;a < this._children.length;a++) { var b = this._children[a]; - b && (b._index = -1, b._parent = null, b._propagateFlagsDown(l.DownOnAddedOrRemoved)); + b && (b._index = -1, b._parent = null, b._propagateFlagsDown(t.DownOnAddedOrRemoved)); } this._children.length = 0; - this._propagateFlagsUp(l.UpOnAddedOrRemoved); + this._propagateFlagsUp(t.UpOnAddedOrRemoved); }; c.prototype._propagateFlagsDown = function(a) { if (!this.hasFlags(a)) { @@ -50634,24 +50704,24 @@ __extends = this.__extends || function(c, h) { return b ? c.clone() : c; }; return c; - }(k); - h.Group = f; - var d = function() { + }(m); + k.Group = g; + var f = function() { function a(b) { this._node = b; - this._matrix = s.createIdentity(); - this._colorMatrix = h.ColorMatrix.createIdentity(); - this._concatenatedMatrix = s.createIdentity(); - this._invertedConcatenatedMatrix = s.createIdentity(); - this._concatenatedColorMatrix = h.ColorMatrix.createIdentity(); + this._matrix = r.createIdentity(); + this._colorMatrix = k.ColorMatrix.createIdentity(); + this._concatenatedMatrix = r.createIdentity(); + this._invertedConcatenatedMatrix = r.createIdentity(); + this._concatenatedColorMatrix = k.ColorMatrix.createIdentity(); } a.prototype.setMatrix = function(a) { - this._matrix.isEqual(a) || (this._matrix.set(a), this._node._propagateFlagsUp(l.UpOnMoved), this._node._propagateFlagsDown(l.DownOnMoved)); + this._matrix.isEqual(a) || (this._matrix.set(a), this._node._propagateFlagsUp(t.UpOnMoved), this._node._propagateFlagsDown(t.DownOnMoved)); }; a.prototype.setColorMatrix = function(a) { this._colorMatrix.set(a); - this._node._propagateFlagsUp(l.UpOnColorMatrixChanged); - this._node._propagateFlagsDown(l.DownOnColorMatrixChanged); + this._node._propagateFlagsUp(t.UpOnColorMatrixChanged); + this._node._propagateFlagsDown(t.DownOnColorMatrixChanged); }; a.prototype.getMatrix = function(a) { void 0 === a && (a = !1); @@ -50662,16 +50732,15 @@ __extends = this.__extends || function(c, h) { }; a.prototype.getColorMatrix = function(a) { void 0 === a && (a = !1); - null === this._colorMatrix && (this._colorMatrix = h.ColorMatrix.createIdentity()); + null === this._colorMatrix && (this._colorMatrix = k.ColorMatrix.createIdentity()); return a ? this._colorMatrix.clone() : this._colorMatrix; }; a.prototype.getConcatenatedMatrix = function() { var a; void 0 === a && (a = !1); if (this._node.hasFlags(512)) { - for (var b = this._node._findClosestAncestor(), c = k._getAncestors(this._node, b), d = b ? b.getTransform()._concatenatedMatrix.clone() : s.createIdentity(), e = c.length - 1;0 <= e;e--) { + for (var b = this._node._findClosestAncestor(), c = m._getAncestors(this._node, b), d = b ? b.getTransform()._concatenatedMatrix.clone() : r.createIdentity(), e = c.length - 1;0 <= e;e--) { var b = c[e], f = b.getTransform(); - p(b.hasFlags(512)); d.preMultiply(f._matrix); f._concatenatedMatrix.set(d); b.removeFlags(512); @@ -50690,7 +50759,7 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - h.Transform = d; + k.Transform = f; var b = function() { function a(b) { this._node = b; @@ -50718,11 +50787,10 @@ __extends = this.__extends || function(c, h) { }; return a; }(); - h.Layer = b; - t = function(b) { + k.Layer = b; + h = function(b) { function c(a) { b.call(this); - p(a); this._source = a; this._type = 3; this.ratio = 0; @@ -50744,9 +50812,9 @@ __extends = this.__extends || function(c, h) { return[this._source]; }; return c; - }(k); - h.Shape = t; - h.RendererOptions = function() { + }(m); + k.Shape = h; + k.RendererOptions = function() { return function() { this.debug = !1; this.paintRenderable = !0; @@ -50760,47 +50828,47 @@ __extends = this.__extends || function(c, h) { a[a.Both = 2] = "Both"; a[a.DOM = 3] = "DOM"; a[a.SVG = 4] = "SVG"; - })(h.Backend || (h.Backend = {})); - m = function(b) { - function d(c, e, f) { + })(k.Backend || (k.Backend = {})); + c = function(b) { + function c(d, f, g) { b.call(this); - this._container = c; - this._stage = e; - this._options = f; + this._container = d; + this._stage = f; + this._options = g; this._viewport = a.createSquare(); this._devicePixelRatio = 1; } - __extends(d, b); - Object.defineProperty(d.prototype, "viewport", {set:function(a) { + __extends(c, b); + Object.defineProperty(c.prototype, "viewport", {set:function(a) { this._viewport.set(a); }, enumerable:!0, configurable:!0}); - d.prototype.render = function() { - throw c.Debug.abstractMethod("Renderer::render"); + c.prototype.render = function() { + throw void 0; }; - d.prototype.resize = function() { - throw c.Debug.abstractMethod("Renderer::resize"); + c.prototype.resize = function() { + throw void 0; }; - d.prototype.screenShot = function(a, b) { - throw c.Debug.abstractMethod("Renderer::screenShot"); + c.prototype.screenShot = function(a, b) { + throw void 0; }; - return d; - }(m); - h.Renderer = m; - m = function(b) { - function c(d, e, k) { - void 0 === k && (k = !1); + return c; + }(c); + k.Renderer = c; + c = function(b) { + function c(d, f, h) { + void 0 === h && (h = !1); b.call(this); - this._dirtyVisitor = new n; + this._dirtyVisitor = new s; this._flags &= -3; this._type = 13; this._scaleMode = c.DEFAULT_SCALE; this._align = c.DEFAULT_ALIGN; - this._content = new f; + this._content = new g; this._content._flags &= -3; this.addChild(this._content); this.setFlags(16); - this.setBounds(new a(0, 0, d, e)); - k ? (this._dirtyRegion = new v(d, e), this._dirtyRegion.addDirtyRectangle(new a(0, 0, d, e))) : this._dirtyRegion = null; + this.setBounds(new a(0, 0, d, f)); + h ? (this._dirtyRegion = new v(d, f), this._dirtyRegion.addDirtyRectangle(new a(0, 0, d, f))) : this._dirtyRegion = null; this._updateContentMatrix(); } __extends(c, b); @@ -50835,7 +50903,7 @@ __extends = this.__extends || function(c, h) { }, enumerable:!0, configurable:!0}); c.prototype._updateContentMatrix = function() { if (this._scaleMode === c.DEFAULT_SCALE && this._align === c.DEFAULT_ALIGN) { - this._content.getTransform().setMatrix(new s(1, 0, 0, 1, 0, 0)); + this._content.getTransform().setMatrix(new r(1, 0, 0, 1, 0, 0)); } else { var a = this.getBounds(), b = this._content.getBounds(), d = a.w / b.w, e = a.h / b.h; switch(this._scaleMode) { @@ -50853,26 +50921,26 @@ __extends = this.__extends || function(c, h) { var f; f = this._align & 4 ? 0 : this._align & 8 ? a.w - b.w * d : (a.w - b.w * d) / 2; a = this._align & 1 ? 0 : this._align & 2 ? a.h - b.h * e : (a.h - b.h * e) / 2; - this._content.getTransform().setMatrix(new s(d, 0, 0, e, f, a)); + this._content.getTransform().setMatrix(new r(d, 0, 0, e, f, a)); } }; c.DEFAULT_SCALE = 4; c.DEFAULT_ALIGN = 5; return c; - }(f); - h.Stage = m; - })(c.GFX || (c.GFX = {})); + }(g); + k.Stage = c; + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - function a(a, b, c) { - return a + (b - a) * c; +(function(d) { + (function(k) { + function a(a, c, d) { + return a + (c - a) * d; } - function s(b, c, d) { + function r(b, c, d) { return a(b >> 24 & 255, c >> 24 & 255, d) << 24 | a(b >> 16 & 255, c >> 16 & 255, d) << 16 | a(b >> 8 & 255, c >> 8 & 255, d) << 8 | a(b & 255, c & 255, d); } - var v = h.Geometry.Point, p = h.Geometry.Rectangle, u = h.Geometry.Matrix, l = c.Debug.assertUnreachable, e = c.Debug.assert, m = c.ArrayUtilities.indexOf, t = function(a) { - function b() { + var v = k.Geometry.Point, u = k.Geometry.Rectangle, t = k.Geometry.Matrix, l = d.ArrayUtilities.indexOf, c = function(a) { + function c() { a.call(this); this._parents = []; this._renderableParents = []; @@ -50880,30 +50948,26 @@ __extends = this.__extends || function(c, h) { this._flags &= -3; this._type = 33; } - __extends(b, a); - b.prototype.addParent = function(a) { - e(a); - var b = m(this._parents, a); - e(0 > b); + __extends(c, a); + c.prototype.addParent = function(a) { + l(this._parents, a); this._parents.push(a); }; - b.prototype.addRenderableParent = function(a) { - e(a); - var b = m(this._renderableParents, a); - e(0 > b); + c.prototype.addRenderableParent = function(a) { + l(this._renderableParents, a); this._renderableParents.push(a); }; - b.prototype.wrap = function() { + c.prototype.wrap = function() { for (var a, b = this._parents, c = 0;c < b.length;c++) { if (a = b[c], !a._parent) { return a; } } - a = new h.Shape(this); + a = new k.Shape(this); this.addParent(a); return a; }; - b.prototype.invalidate = function() { + c.prototype.invalidate = function() { this.setFlags(16); for (var a = this._parents, b = 0;b < a.length;b++) { a[b].invalidate(); @@ -50918,137 +50982,169 @@ __extends = this.__extends || function(c, h) { } } }; - b.prototype.addInvalidateEventListener = function(a) { + c.prototype.addInvalidateEventListener = function(a) { this._invalidateEventListeners || (this._invalidateEventListeners = []); - var b = m(this._invalidateEventListeners, a); - e(0 > b); + l(this._invalidateEventListeners, a); this._invalidateEventListeners.push(a); }; - b.prototype.getBounds = function(a) { + c.prototype.getBounds = function(a) { void 0 === a && (a = !1); return a ? this._bounds.clone() : this._bounds; }; - b.prototype.getChildren = function(a) { + c.prototype.getChildren = function(a) { return null; }; - b.prototype._propagateFlagsUp = function(a) { + c.prototype._propagateFlagsUp = function(a) { if (0 !== a && !this.hasFlags(a)) { for (var b = 0;b < this._parents.length;b++) { this._parents[b]._propagateFlagsUp(a); } } }; - b.prototype.render = function(a, b, c, d, e) { + c.prototype.render = function(a, b, c, d, e) { }; - return b; - }(h.Node); - h.Renderable = t; - var q = function(a) { - function b(c, d) { + return c; + }(k.Node); + k.Renderable = c; + var h = function(a) { + function c(d, e) { a.call(this); - this.setBounds(c); - this.render = d; + this.setBounds(d); + this.render = e; } - __extends(b, a); - return b; - }(t); - h.CustomRenderable = q; + __extends(c, a); + return c; + }(c); + k.CustomRenderable = h; (function(a) { a[a.Idle = 1] = "Idle"; a[a.Playing = 2] = "Playing"; a[a.Paused = 3] = "Paused"; - })(h.RenderableVideoState || (h.RenderableVideoState = {})); - q = function(a) { - function b(c, d) { + a[a.Ended = 4] = "Ended"; + })(k.RenderableVideoState || (k.RenderableVideoState = {})); + h = function(a) { + function c(d, f) { a.call(this); this._flags = 1048592; this._lastPausedTime = this._lastTimeInvalidated = 0; - this._seekHappens = !1; + this._pauseHappening = this._seekHappening = !1; this._isDOMElement = !0; - this.setBounds(new p(0, 0, 1, 1)); - this._assetId = c; - this._eventSerializer = d; - var e = document.createElement("video"), f = this._handleVideoEvent.bind(this); - e.preload = "metadata"; - e.addEventListener("play", f); - e.addEventListener("ended", f); - e.addEventListener("loadeddata", f); - e.addEventListener("progress", f); - e.addEventListener("waiting", f); - e.addEventListener("loadedmetadata", f); - e.addEventListener("error", f); - e.addEventListener("seeking", f); - this._video = e; - this._videoEventHandler = f; - b._renderableVideos.push(this); + this.setBounds(new u(0, 0, 1, 1)); + this._assetId = d; + this._eventSerializer = f; + var g = document.createElement("video"), h = this._handleVideoEvent.bind(this); + g.preload = "metadata"; + g.addEventListener("play", h); + g.addEventListener("pause", h); + g.addEventListener("ended", h); + g.addEventListener("loadeddata", h); + g.addEventListener("progress", h); + g.addEventListener("suspend", h); + g.addEventListener("loadedmetadata", h); + g.addEventListener("error", h); + g.addEventListener("seeking", h); + g.addEventListener("seeked", h); + g.addEventListener("canplay", h); + this._video = g; + this._videoEventHandler = h; + c._renderableVideos.push(this); "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(-1, -1, this); this._state = 1; } - __extends(b, a); - Object.defineProperty(b.prototype, "video", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "video", {get:function() { return this._video; }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "state", {get:function() { + Object.defineProperty(c.prototype, "state", {get:function() { return this._state; }, enumerable:!0, configurable:!0}); - b.prototype.play = function() { + c.prototype.play = function() { this._video.play(); this._state = 2; }; - b.prototype.pause = function() { + c.prototype.pause = function() { this._video.pause(); this._state = 3; }; - b.prototype._handleVideoEvent = function(a) { + c.prototype._handleVideoEvent = function(a) { var b = null, c = this._video; switch(a.type) { case "play": - a = 1; + if (!this._pauseHappening) { + return; + } + a = 7; + break; + case "pause": + a = 6; + this._pauseHappening = !0; break; case "ended": - a = 2; - break; - case "loadeddata": - a = 3; - break; - case "progress": + this._state = 4; + this._notifyNetStream(3, b); a = 4; break; - case "waiting": + case "loadeddata": + this._pauseHappening = !1; + this._notifyNetStream(2, b); + this.play(); + return; + case "canplay": + if (this._pauseHappening) { + return; + } a = 5; break; + case "progress": + a = 10; + break; + case "suspend": + return; case "loadedmetadata": - a = 7; + a = 1; b = {videoWidth:c.videoWidth, videoHeight:c.videoHeight, duration:c.duration}; break; case "error": - a = 6; + a = 11; b = {code:c.error.code}; break; case "seeking": + if (!this._seekHappening) { + return; + } a = 8; - this._seekHappens = !0; + break; + case "seeked": + if (!this._seekHappening) { + return; + } + a = 9; + this._seekHappening = !1; break; default: return; } this._notifyNetStream(a, b); }; - b.prototype._notifyNetStream = function(a, b) { + c.prototype._notifyNetStream = function(a, b) { this._eventSerializer.sendVideoPlaybackEvent(this._assetId, a, b); }; - b.prototype.processControlRequest = function(a, b) { + c.prototype.processControlRequest = function(a, b) { var c = this._video; switch(a) { case 1: c.src = b.url; + 1 < this._state && this.play(); this._notifyNetStream(0, null); break; + case 9: + c.paused && c.play(); + break; case 2: - c && (b.paused && !c.paused ? (this._lastPausedTime = isNaN(b.time) ? c.currentTime : c.currentTime = b.time, this.pause()) : !b.paused && c.paused && (this.play(), isNaN(b.time) || this._lastPausedTime === b.time || (c.currentTime = b.time), this._seekHappens && (this._seekHappens = !1, this._notifyNetStream(3, null)))); + c && (b.paused && !c.paused ? (isNaN(b.time) ? this._lastPausedTime = c.currentTime : (0 !== c.seekable.length && (c.currentTime = b.time), this._lastPausedTime = b.time), this.pause()) : !b.paused && c.paused && (this.play(), isNaN(b.time) || this._lastPausedTime === b.time || 0 === c.seekable.length || (c.currentTime = b.time))); break; case 3: - c && (c.currentTime = b.time); + c && 0 !== c.seekable.length && (this._seekHappening = !0, c.currentTime = b.time); break; case 4: return c ? c.currentTime : 0; @@ -51074,95 +51170,93 @@ __extends = this.__extends || function(c, h) { return c ? Math.round(500 * c.duration) : 0; } }; - b.prototype.checkForUpdate = function() { + c.prototype.checkForUpdate = function() { this._lastTimeInvalidated !== this._video.currentTime && (this._isDOMElement || this.invalidate()); this._lastTimeInvalidated = this._video.currentTime; }; - b.checkForVideoUpdates = function() { - for (var a = b._renderableVideos, c = 0;c < a.length;c++) { - a[c].checkForUpdate(); + c.checkForVideoUpdates = function() { + for (var a = c._renderableVideos, b = 0;b < a.length;b++) { + a[b].checkForUpdate(); } }; - b.prototype.render = function(a, b, c) { - h.enterTimeline("RenderableVideo.render"); + c.prototype.render = function(a, b, c) { + k.enterTimeline("RenderableVideo.render"); (b = this._video) && 0 < b.videoWidth && a.drawImage(b, 0, 0, b.videoWidth, b.videoHeight, 0, 0, this._bounds.w, this._bounds.h); - h.leaveTimeline("RenderableVideo.render"); + k.leaveTimeline("RenderableVideo.render"); }; - b._renderableVideos = []; - return b; - }(t); - h.RenderableVideo = q; - q = function(a) { - function b(c, d) { + c._renderableVideos = []; + return c; + }(c); + k.RenderableVideo = h; + h = function(a) { + function c(d, e) { a.call(this); this._flags = 1048592; this.properties = {}; - this.setBounds(d); - c instanceof HTMLCanvasElement ? this._initializeSourceCanvas(c) : this._sourceImage = c; + this.setBounds(e); + d instanceof HTMLCanvasElement ? this._initializeSourceCanvas(d) : this._sourceImage = d; } - __extends(b, a); - b.FromDataBuffer = function(a, c, d) { - h.enterTimeline("RenderableBitmap.FromDataBuffer"); - var e = document.createElement("canvas"); - e.width = d.w; - e.height = d.h; - d = new b(e, d); - d.updateFromDataBuffer(a, c); - h.leaveTimeline("RenderableBitmap.FromDataBuffer"); + __extends(c, a); + c.FromDataBuffer = function(a, b, d) { + k.enterTimeline("RenderableBitmap.FromDataBuffer"); + var f = document.createElement("canvas"); + f.width = d.w; + f.height = d.h; + d = new c(f, d); + d.updateFromDataBuffer(a, b); + k.leaveTimeline("RenderableBitmap.FromDataBuffer"); return d; }; - b.FromNode = function(a, c, d, e, f) { - h.enterTimeline("RenderableBitmap.FromFrame"); - var g = document.createElement("canvas"), k = a.getBounds(); - g.width = k.w; - g.height = k.h; - g = new b(g, k); - g.drawNode(a, c, d, e, f); - h.leaveTimeline("RenderableBitmap.FromFrame"); - return g; + c.FromNode = function(a, b, d, f, g) { + k.enterTimeline("RenderableBitmap.FromFrame"); + var h = document.createElement("canvas"), l = a.getBounds(); + h.width = l.w; + h.height = l.h; + h = new c(h, l); + h.drawNode(a, b, d, f, g); + k.leaveTimeline("RenderableBitmap.FromFrame"); + return h; }; - b.FromImage = function(a, c, d) { - return new b(a, new p(0, 0, c, d)); + c.FromImage = function(a, b, d) { + return new c(a, new u(0, 0, b, d)); }; - b.prototype.updateFromDataBuffer = function(a, b) { - if (h.imageUpdateOption.value) { - var d = b.buffer; - h.enterTimeline("RenderableBitmap.updateFromDataBuffer", {length:b.length}); - if (4 === a || 5 === a || 6 === a) { - c.Debug.assertUnreachable("Mustn't encounter un-decoded images here"); - } else { + c.prototype.updateFromDataBuffer = function(a, b) { + if (k.imageUpdateOption.value) { + var c = b.buffer; + k.enterTimeline("RenderableBitmap.updateFromDataBuffer", {length:b.length}); + if (4 !== a && 5 !== a && 6 !== a) { var e = this._bounds, f = this._imageData; f && f.width === e.w && f.height === e.h || (f = this._imageData = this._context.createImageData(e.w, e.h)); - h.imageConvertOption.value && (h.enterTimeline("ColorUtilities.convertImage"), d = new Int32Array(d), e = new Int32Array(f.data.buffer), c.ColorUtilities.convertImage(a, 3, d, e), h.leaveTimeline("ColorUtilities.convertImage")); - h.enterTimeline("putImageData"); + k.imageConvertOption.value && (k.enterTimeline("ColorUtilities.convertImage"), c = new Int32Array(c), e = new Int32Array(f.data.buffer), d.ColorUtilities.convertImage(a, 3, c, e), k.leaveTimeline("ColorUtilities.convertImage")); + k.enterTimeline("putImageData"); this._ensureSourceCanvas(); this._context.putImageData(f, 0, 0); - h.leaveTimeline("putImageData"); + k.leaveTimeline("putImageData"); } this.invalidate(); - h.leaveTimeline("RenderableBitmap.updateFromDataBuffer"); + k.leaveTimeline("RenderableBitmap.updateFromDataBuffer"); } }; - b.prototype.readImageData = function(a) { + c.prototype.readImageData = function(a) { a.writeRawBytes(this.imageData.data); }; - b.prototype.render = function(a, b, c) { - h.enterTimeline("RenderableBitmap.render"); + c.prototype.render = function(a, b, c) { + k.enterTimeline("RenderableBitmap.render"); this.renderSource ? a.drawImage(this.renderSource, 0, 0) : this._renderFallback(a); - h.leaveTimeline("RenderableBitmap.render"); + k.leaveTimeline("RenderableBitmap.render"); }; - b.prototype.drawNode = function(a, b, c, d, e) { - h.enterTimeline("RenderableBitmap.drawFrame"); - c = h.Canvas2D; + c.prototype.drawNode = function(a, b, c, d, e) { + k.enterTimeline("RenderableBitmap.drawFrame"); + c = k.Canvas2D; d = this.getBounds(); (new c.Canvas2DRenderer(this._canvas, null)).renderNode(a, e || d, b); - h.leaveTimeline("RenderableBitmap.drawFrame"); + k.leaveTimeline("RenderableBitmap.drawFrame"); }; - b.prototype._initializeSourceCanvas = function(a) { + c.prototype._initializeSourceCanvas = function(a) { this._canvas = a; this._context = this._canvas.getContext("2d"); }; - b.prototype._ensureSourceCanvas = function() { + c.prototype._ensureSourceCanvas = function() { if (!this._canvas) { var a = document.createElement("canvas"), b = this._bounds; a.width = b.w; @@ -51170,65 +51264,56 @@ __extends = this.__extends || function(c, h) { this._initializeSourceCanvas(a); } }; - Object.defineProperty(b.prototype, "imageData", {get:function() { - this._canvas || (e(this._sourceImage), this._ensureSourceCanvas(), this._context.drawImage(this._sourceImage, 0, 0), this._sourceImage = null); + Object.defineProperty(c.prototype, "imageData", {get:function() { + this._canvas || (this._ensureSourceCanvas(), this._context.drawImage(this._sourceImage, 0, 0), this._sourceImage = null); return this._context.getImageData(0, 0, this._bounds.w, this._bounds.h); }, enumerable:!0, configurable:!0}); - Object.defineProperty(b.prototype, "renderSource", {get:function() { + Object.defineProperty(c.prototype, "renderSource", {get:function() { return this._canvas || this._sourceImage; }, enumerable:!0, configurable:!0}); - b.prototype._renderFallback = function(a) { - this.fillStyle || (this.fillStyle = c.ColorStyle.randomStyle()); - var b = this._bounds; - a.save(); - a.beginPath(); - a.lineWidth = 2; - a.fillStyle = this.fillStyle; - a.fillRect(b.x, b.y, b.w, b.h); - a.restore(); + c.prototype._renderFallback = function(a) { }; - return b; - }(t); - h.RenderableBitmap = q; + return c; + }(c); + k.RenderableBitmap = h; (function(a) { a[a.Fill = 0] = "Fill"; a[a.Stroke = 1] = "Stroke"; a[a.StrokeFill = 2] = "StrokeFill"; - })(h.PathType || (h.PathType = {})); - var n = function() { - return function(a, b, c, d) { + })(k.PathType || (k.PathType = {})); + var p = function() { + return function(a, c, d, f) { this.type = a; - this.style = b; - this.smoothImage = c; - this.strokeProperties = d; + this.style = c; + this.smoothImage = d; + this.strokeProperties = f; this.path = new Path2D; - e(1 === a === !!d); }; }(); - h.StyledPath = n; - var k = function() { - return function(a, b, c, d, e) { + k.StyledPath = p; + var s = function() { + return function(a, c, d, f, g) { this.thickness = a; - this.scaleMode = b; - this.capsStyle = c; - this.jointsStyle = d; - this.miterLimit = e; + this.scaleMode = c; + this.capsStyle = d; + this.jointsStyle = f; + this.miterLimit = g; }; }(); - h.StrokeProperties = k; - var f = function(a) { - function b(c, d, e, f) { + k.StrokeProperties = s; + var m = function(a) { + function c(d, e, f, g) { a.call(this); this._flags = 6291472; this.properties = {}; - this.setBounds(f); - this._id = c; - this._pathData = d; - this._textures = e; - e.length && this.setFlags(1048576); + this.setBounds(g); + this._id = d; + this._pathData = e; + this._textures = f; + f.length && this.setFlags(1048576); } - __extends(b, a); - b.prototype.update = function(a, b, c) { + __extends(c, a); + c.prototype.update = function(a, b, c) { this.setBounds(c); this._pathData = a; this._paths = null; @@ -51236,151 +51321,136 @@ __extends = this.__extends || function(c, h) { this.setFlags(1048576); this.invalidate(); }; - b.prototype.render = function(a, b, c, d, f) { + c.prototype.render = function(a, b, c, d, e) { void 0 === d && (d = !1); - void 0 === f && (f = !1); + void 0 === e && (e = !1); a.fillStyle = a.strokeStyle = "transparent"; b = this._deserializePaths(this._pathData, a, b); - e(b); - h.enterTimeline("RenderableShape.render", this); + k.enterTimeline("RenderableShape.render", this); for (c = 0;c < b.length;c++) { - var g = b[c]; - a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = g.smoothImage; - if (0 === g.type) { - a.fillStyle = f ? "#FF4981" : g.style, d ? a.clip(g.path, "evenodd") : a.fill(g.path, "evenodd"), a.fillStyle = "transparent"; + var f = b[c]; + a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = f.smoothImage; + if (0 === f.type) { + d ? a.clip(f.path, "evenodd") : (a.fillStyle = e ? "#000000" : f.style, a.fill(f.path, "evenodd"), a.fillStyle = "transparent"); } else { - if (!d && !f) { - a.strokeStyle = g.style; - var k = 1; - g.strokeProperties && (k = g.strokeProperties.scaleMode, a.lineWidth = g.strokeProperties.thickness, a.lineCap = g.strokeProperties.capsStyle, a.lineJoin = g.strokeProperties.jointsStyle, a.miterLimit = g.strokeProperties.miterLimit); - var l = a.lineWidth; - (l = 1 === l || 3 === l) && a.translate(.5, .5); - a.flashStroke(g.path, k); - l && a.translate(-.5, -.5); + if (!d && !e) { + a.strokeStyle = f.style; + var g = 1; + f.strokeProperties && (g = f.strokeProperties.scaleMode, a.lineWidth = f.strokeProperties.thickness, a.lineCap = f.strokeProperties.capsStyle, a.lineJoin = f.strokeProperties.jointsStyle, a.miterLimit = f.strokeProperties.miterLimit); + var h = a.lineWidth; + (h = 1 === h || 3 === h) && a.translate(.5, .5); + a.flashStroke(f.path, g); + h && a.translate(-.5, -.5); a.strokeStyle = "transparent"; } } } - h.leaveTimeline("RenderableShape.render"); + k.leaveTimeline("RenderableShape.render"); }; - b.prototype._deserializePaths = function(a, d, f) { - e(a ? !this._paths : this._paths); - h.enterTimeline("RenderableShape.deserializePaths"); + c.prototype._deserializePaths = function(a, b, f) { + k.enterTimeline("RenderableShape.deserializePaths"); if (this._paths) { return this._paths; } f = this._paths = []; - for (var g = null, m = null, n = 0, p = 0, q, s, t = !1, u = 0, v = 0, C = a.commands, E = a.coordinates, F = a.styles, I = F.position = 0, G = a.commandsPosition, Z = 0;Z < G;Z++) { - switch(q = C[Z], q) { + var g = null, h = null, l = 0, m = 0, p, r, t = !1, u = 0, v = 0, E = a.commands, y = a.coordinates, z = a.styles, G = z.position = 0; + a = a.commandsPosition; + for (var C = 0;C < a;C++) { + switch(E[C]) { case 9: - e(I <= a.coordinatesPosition - 2); - t && g && (g.lineTo(u, v), m && m.lineTo(u, v)); + t && g && (g.lineTo(u, v), h && h.lineTo(u, v)); t = !0; - n = u = E[I++] / 20; - p = v = E[I++] / 20; - g && g.moveTo(n, p); - m && m.moveTo(n, p); + l = u = y[G++] / 20; + m = v = y[G++] / 20; + g && g.moveTo(l, m); + h && h.moveTo(l, m); break; case 10: - e(I <= a.coordinatesPosition - 2); - n = E[I++] / 20; - p = E[I++] / 20; - g && g.lineTo(n, p); - m && m.lineTo(n, p); + l = y[G++] / 20; + m = y[G++] / 20; + g && g.lineTo(l, m); + h && h.lineTo(l, m); break; case 11: - e(I <= a.coordinatesPosition - 4); - q = E[I++] / 20; - s = E[I++] / 20; - n = E[I++] / 20; - p = E[I++] / 20; - g && g.quadraticCurveTo(q, s, n, p); - m && m.quadraticCurveTo(q, s, n, p); + p = y[G++] / 20; + r = y[G++] / 20; + l = y[G++] / 20; + m = y[G++] / 20; + g && g.quadraticCurveTo(p, r, l, m); + h && h.quadraticCurveTo(p, r, l, m); break; case 12: - e(I <= a.coordinatesPosition - 6); - q = E[I++] / 20; - s = E[I++] / 20; - var Q = E[I++] / 20, S = E[I++] / 20, n = E[I++] / 20, p = E[I++] / 20; - g && g.bezierCurveTo(q, s, Q, S, n, p); - m && m.bezierCurveTo(q, s, Q, S, n, p); + p = y[G++] / 20; + r = y[G++] / 20; + var I = y[G++] / 20, P = y[G++] / 20, l = y[G++] / 20, m = y[G++] / 20; + g && g.bezierCurveTo(p, r, I, P, l, m); + h && h.bezierCurveTo(p, r, I, P, l, m); break; case 1: - e(4 <= F.bytesAvailable); - g = this._createPath(0, c.ColorUtilities.rgbaToCSSStyle(F.readUnsignedInt()), !1, null, n, p); + g = this._createPath(0, d.ColorUtilities.rgbaToCSSStyle(z.readUnsignedInt()), !1, null, l, m); break; case 3: - q = this._readBitmap(F, d); - g = this._createPath(0, q.style, q.smoothImage, null, n, p); + p = this._readBitmap(z, b); + g = this._createPath(0, p.style, p.smoothImage, null, l, m); break; case 2: - g = this._createPath(0, this._readGradient(F, d), !1, null, n, p); + g = this._createPath(0, this._readGradient(z, b), !1, null, l, m); break; case 4: g = null; break; case 5: - m = c.ColorUtilities.rgbaToCSSStyle(F.readUnsignedInt()); - F.position += 1; - q = F.readByte(); - s = b.LINE_CAPS_STYLES[F.readByte()]; - Q = b.LINE_JOINTS_STYLES[F.readByte()]; - q = new k(E[I++] / 20, q, s, Q, F.readByte()); - m = this._createPath(1, m, !1, q, n, p); + h = d.ColorUtilities.rgbaToCSSStyle(z.readUnsignedInt()); + z.position += 1; + p = z.readByte(); + r = c.LINE_CAPS_STYLES[z.readByte()]; + I = c.LINE_JOINTS_STYLES[z.readByte()]; + p = new s(y[G++] / 20, p, r, I, z.readByte()); + h = this._createPath(1, h, !1, p, l, m); break; case 6: - m = this._createPath(2, this._readGradient(F, d), !1, null, n, p); + h = this._createPath(2, this._readGradient(z, b), !1, null, l, m); break; case 7: - q = this._readBitmap(F, d); - m = this._createPath(2, q.style, q.smoothImage, null, n, p); + p = this._readBitmap(z, b); + h = this._createPath(2, p.style, p.smoothImage, null, l, m); break; case 8: - m = null; - break; - default: - l("Invalid command " + q + " encountered at index" + Z + " of " + G); + h = null; } } - e(0 === F.bytesAvailable); - e(Z === G); - e(I === a.coordinatesPosition); - t && g && (g.lineTo(u, v), m && m.lineTo(u, v)); + t && g && (g.lineTo(u, v), h && h.lineTo(u, v)); this._pathData = null; - h.leaveTimeline("RenderableShape.deserializePaths"); + k.leaveTimeline("RenderableShape.deserializePaths"); return f; }; - b.prototype._createPath = function(a, b, c, d, e, f) { - a = new n(a, b, c, d); + c.prototype._createPath = function(a, b, c, d, e, f) { + a = new p(a, b, c, d); this._paths.push(a); a.path.moveTo(e, f); return a.path; }; - b.prototype._readMatrix = function(a) { - return new u(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat()); + c.prototype._readMatrix = function(a) { + return new t(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat()); }; - b.prototype._readGradient = function(a, b) { - e(34 <= a.bytesAvailable); - var d = a.readUnsignedByte(), f = 2 * a.readShort() / 255; - e(-1 <= f && 1 >= f); - var g = this._readMatrix(a), d = 16 === d ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(f, 0, 0, 0, 0, 1); - d.setTransform && d.setTransform(g.toSVGMatrix()); - g = a.readUnsignedByte(); - for (f = 0;f < g;f++) { - var k = a.readUnsignedByte() / 255, h = c.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt()); - d.addColorStop(k, h); + c.prototype._readGradient = function(a, b) { + var c = a.readUnsignedByte(), e = 2 * a.readShort() / 255, f = this._readMatrix(a), c = 16 === c ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(e, 0, 0, 0, 0, 1); + c.setTransform && c.setTransform(f.toSVGMatrix()); + f = a.readUnsignedByte(); + for (e = 0;e < f;e++) { + var g = a.readUnsignedByte() / 255, h = d.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt()); + c.addColorStop(g, h); } a.position += 2; - return d; + return c; }; - b.prototype._readBitmap = function(a, b) { - e(30 <= a.bytesAvailable); - var c = a.readUnsignedInt(), d = this._readMatrix(a), f = a.readBoolean() ? "repeat" : "no-repeat", g = a.readBoolean(); - (c = this._textures[c]) ? (f = b.createPattern(c.renderSource, f), f.setTransform(d.toSVGMatrix())) : f = null; - return{style:f, smoothImage:g}; + c.prototype._readBitmap = function(a, b) { + var c = a.readUnsignedInt(), d = this._readMatrix(a), e = a.readBoolean() ? "repeat" : "no-repeat", f = a.readBoolean(); + (c = this._textures[c]) ? (e = b.createPattern(c.renderSource, e), e.setTransform(d.toSVGMatrix())) : e = null; + return{style:e, smoothImage:f}; }; - b.prototype._renderFallback = function(a) { - this.fillStyle || (this.fillStyle = c.ColorStyle.randomStyle()); + c.prototype._renderFallback = function(a) { + this.fillStyle || (this.fillStyle = d.ColorStyle.randomStyle()); var b = this._bounds; a.save(); a.beginPath(); @@ -51389,389 +51459,373 @@ __extends = this.__extends || function(c, h) { a.fillRect(b.x, b.y, b.w, b.h); a.restore(); }; - b.LINE_CAPS_STYLES = ["round", "butt", "square"]; - b.LINE_JOINTS_STYLES = ["round", "bevel", "miter"]; - return b; - }(t); - h.RenderableShape = f; - q = function(b) { - function d() { + c.LINE_CAPS_STYLES = ["round", "butt", "square"]; + c.LINE_JOINTS_STYLES = ["round", "bevel", "miter"]; + return c; + }(c); + k.RenderableShape = m; + h = function(b) { + function c() { b.apply(this, arguments); this._flags = 7340048; this._morphPaths = Object.create(null); } - __extends(d, b); - d.prototype._deserializePaths = function(b, d, g) { - h.enterTimeline("RenderableMorphShape.deserializePaths"); - if (this._morphPaths[g]) { - return this._morphPaths[g]; + __extends(c, b); + c.prototype._deserializePaths = function(b, c, e) { + k.enterTimeline("RenderableMorphShape.deserializePaths"); + if (this._morphPaths[e]) { + return this._morphPaths[e]; } - var m = this._morphPaths[g] = [], n = null, r = null, p = 0, q = 0, t, u, v = !1, J = 0, C = 0, E = b.commands, F = b.coordinates, I = b.morphCoordinates, G = b.styles, Z = b.morphStyles; - G.position = 0; - for (var Q = Z.position = 0, S = b.commandsPosition, O = 0;O < S;O++) { - switch(t = E[O], t) { + var f = this._morphPaths[e] = [], g = null, h = null, l = 0, p = 0, t, u, v = !1, B = 0, E = 0, y = b.commands, z = b.coordinates, G = b.morphCoordinates, C = b.styles, I = b.morphStyles; + C.position = 0; + var P = I.position = 0; + b = b.commandsPosition; + for (var T = 0;T < b;T++) { + switch(y[T]) { case 9: - e(Q <= b.coordinatesPosition - 2); - v && n && (n.lineTo(J, C), r && r.lineTo(J, C)); + v && g && (g.lineTo(B, E), h && h.lineTo(B, E)); v = !0; - p = J = a(F[Q], I[Q++], g) / 20; - q = C = a(F[Q], I[Q++], g) / 20; - n && n.moveTo(p, q); - r && r.moveTo(p, q); + l = B = a(z[P], G[P++], e) / 20; + p = E = a(z[P], G[P++], e) / 20; + g && g.moveTo(l, p); + h && h.moveTo(l, p); break; case 10: - e(Q <= b.coordinatesPosition - 2); - p = a(F[Q], I[Q++], g) / 20; - q = a(F[Q], I[Q++], g) / 20; - n && n.lineTo(p, q); - r && r.lineTo(p, q); + l = a(z[P], G[P++], e) / 20; + p = a(z[P], G[P++], e) / 20; + g && g.lineTo(l, p); + h && h.lineTo(l, p); break; case 11: - e(Q <= b.coordinatesPosition - 4); - t = a(F[Q], I[Q++], g) / 20; - u = a(F[Q], I[Q++], g) / 20; - p = a(F[Q], I[Q++], g) / 20; - q = a(F[Q], I[Q++], g) / 20; - n && n.quadraticCurveTo(t, u, p, q); - r && r.quadraticCurveTo(t, u, p, q); + t = a(z[P], G[P++], e) / 20; + u = a(z[P], G[P++], e) / 20; + l = a(z[P], G[P++], e) / 20; + p = a(z[P], G[P++], e) / 20; + g && g.quadraticCurveTo(t, u, l, p); + h && h.quadraticCurveTo(t, u, l, p); break; case 12: - e(Q <= b.coordinatesPosition - 6); - t = a(F[Q], I[Q++], g) / 20; - u = a(F[Q], I[Q++], g) / 20; - var P = a(F[Q], I[Q++], g) / 20, V = a(F[Q], I[Q++], g) / 20, p = a(F[Q], I[Q++], g) / 20, q = a(F[Q], I[Q++], g) / 20; - n && n.bezierCurveTo(t, u, P, V, p, q); - r && r.bezierCurveTo(t, u, P, V, p, q); + t = a(z[P], G[P++], e) / 20; + u = a(z[P], G[P++], e) / 20; + var O = a(z[P], G[P++], e) / 20, Q = a(z[P], G[P++], e) / 20, l = a(z[P], G[P++], e) / 20, p = a(z[P], G[P++], e) / 20; + g && g.bezierCurveTo(t, u, O, Q, l, p); + h && h.bezierCurveTo(t, u, O, Q, l, p); break; case 1: - e(4 <= G.bytesAvailable); - n = this._createMorphPath(0, g, c.ColorUtilities.rgbaToCSSStyle(s(G.readUnsignedInt(), Z.readUnsignedInt(), g)), !1, null, p, q); + g = this._createMorphPath(0, e, d.ColorUtilities.rgbaToCSSStyle(r(C.readUnsignedInt(), I.readUnsignedInt(), e)), !1, null, l, p); break; case 3: - t = this._readMorphBitmap(G, Z, g, d); - n = this._createMorphPath(0, g, t.style, t.smoothImage, null, p, q); + t = this._readMorphBitmap(C, I, e, c); + g = this._createMorphPath(0, e, t.style, t.smoothImage, null, l, p); break; case 2: - t = this._readMorphGradient(G, Z, g, d); - n = this._createMorphPath(0, g, t, !1, null, p, q); + t = this._readMorphGradient(C, I, e, c); + g = this._createMorphPath(0, e, t, !1, null, l, p); break; case 4: - n = null; + g = null; break; case 5: - t = a(F[Q], I[Q++], g) / 20; - r = c.ColorUtilities.rgbaToCSSStyle(s(G.readUnsignedInt(), Z.readUnsignedInt(), g)); - G.position += 1; - u = G.readByte(); - P = f.LINE_CAPS_STYLES[G.readByte()]; - V = f.LINE_JOINTS_STYLES[G.readByte()]; - t = new k(t, u, P, V, G.readByte()); - r = this._createMorphPath(1, g, r, !1, t, p, q); + t = a(z[P], G[P++], e) / 20; + h = d.ColorUtilities.rgbaToCSSStyle(r(C.readUnsignedInt(), I.readUnsignedInt(), e)); + C.position += 1; + u = C.readByte(); + O = m.LINE_CAPS_STYLES[C.readByte()]; + Q = m.LINE_JOINTS_STYLES[C.readByte()]; + t = new s(t, u, O, Q, C.readByte()); + h = this._createMorphPath(1, e, h, !1, t, l, p); break; case 6: - t = this._readMorphGradient(G, Z, g, d); - r = this._createMorphPath(2, g, t, !1, null, p, q); + t = this._readMorphGradient(C, I, e, c); + h = this._createMorphPath(2, e, t, !1, null, l, p); break; case 7: - t = this._readMorphBitmap(G, Z, g, d); - r = this._createMorphPath(2, g, t.style, t.smoothImage, null, p, q); + t = this._readMorphBitmap(C, I, e, c); + h = this._createMorphPath(2, e, t.style, t.smoothImage, null, l, p); break; case 8: - r = null; - break; - default: - l("Invalid command " + t + " encountered at index" + O + " of " + S); + h = null; } } - e(0 === G.bytesAvailable); - e(O === S); - e(Q === b.coordinatesPosition); - v && n && (n.lineTo(J, C), r && r.lineTo(J, C)); - h.leaveTimeline("RenderableMorphShape.deserializPaths"); - return m; + v && g && (g.lineTo(B, E), h && h.lineTo(B, E)); + k.leaveTimeline("RenderableMorphShape.deserializPaths"); + return f; }; - d.prototype._createMorphPath = function(a, b, c, d, e, f, g) { - a = new n(a, c, d, e); + c.prototype._createMorphPath = function(a, b, c, d, e, f, g) { + a = new p(a, c, d, e); this._morphPaths[b].push(a); a.path.moveTo(f, g); return a.path; }; - d.prototype._readMorphMatrix = function(b, c, d) { - return new u(a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d)); + c.prototype._readMorphMatrix = function(b, c, d) { + return new t(a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d)); }; - d.prototype._readMorphGradient = function(b, d, f, g) { - e(34 <= b.bytesAvailable); - var k = b.readUnsignedByte(), h = 2 * b.readShort() / 255; - e(-1 <= h && 1 >= h); - var l = this._readMorphMatrix(b, d, f); - g = 16 === k ? g.createLinearGradient(-1, 0, 1, 0) : g.createRadialGradient(h, 0, 0, 0, 0, 1); - g.setTransform && g.setTransform(l.toSVGMatrix()); - l = b.readUnsignedByte(); - for (k = 0;k < l;k++) { - var h = a(b.readUnsignedByte() / 255, d.readUnsignedByte() / 255, f), m = s(b.readUnsignedInt(), d.readUnsignedInt(), f), m = c.ColorUtilities.rgbaToCSSStyle(m); - g.addColorStop(h, m); + c.prototype._readMorphGradient = function(b, c, e, f) { + var g = b.readUnsignedByte(), h = 2 * b.readShort() / 255, k = this._readMorphMatrix(b, c, e); + f = 16 === g ? f.createLinearGradient(-1, 0, 1, 0) : f.createRadialGradient(h, 0, 0, 0, 0, 1); + f.setTransform && f.setTransform(k.toSVGMatrix()); + k = b.readUnsignedByte(); + for (g = 0;g < k;g++) { + var h = a(b.readUnsignedByte() / 255, c.readUnsignedByte() / 255, e), l = r(b.readUnsignedInt(), c.readUnsignedInt(), e), l = d.ColorUtilities.rgbaToCSSStyle(l); + f.addColorStop(h, l); } b.position += 2; - return g; + return f; }; - d.prototype._readMorphBitmap = function(a, b, c, d) { - e(30 <= a.bytesAvailable); - var f = a.readUnsignedInt(); + c.prototype._readMorphBitmap = function(a, b, c, d) { + var e = a.readUnsignedInt(); b = this._readMorphMatrix(a, b, c); c = a.readBoolean() ? "repeat" : "no-repeat"; a = a.readBoolean(); - f = this._textures[f]; - e(f._canvas); - d = d.createPattern(f._canvas, c); + d = d.createPattern(this._textures[e]._canvas, c); d.setTransform(b.toSVGMatrix()); return{style:d, smoothImage:a}; }; - return d; - }(f); - h.RenderableMorphShape = q; - var d = function() { + return c; + }(m); + k.RenderableMorphShape = h; + var g = function() { function a() { this.align = this.leading = this.descent = this.ascent = this.width = this.y = this.x = 0; this.runs = []; } - a.prototype.addRun = function(c, d, e, f) { - if (e) { + a.prototype.addRun = function(c, d, g, h) { + if (g) { a._measureContext.font = c; - var k = a._measureContext.measureText(e).width | 0; - this.runs.push(new b(c, d, e, k, f)); + var k = a._measureContext.measureText(g).width | 0; + this.runs.push(new f(c, d, g, k, h)); this.width += k; } }; a.prototype.wrap = function(c) { - var d = [this], e = this.runs, f = this; - f.width = 0; - f.runs = []; - for (var k = a._measureContext, h = 0;h < e.length;h++) { - var l = e[h], m = l.text; - l.text = ""; - l.width = 0; - k.font = l.font; - for (var n = c, p = m.split(/[\s.-]/), q = 0, s = 0;s < p.length;s++) { - var t = p[s], u = m.substr(q, t.length + 1), v = k.measureText(u).width | 0; - if (v > n) { + var d = [this], g = this.runs, h = this; + h.width = 0; + h.runs = []; + for (var k = a._measureContext, l = 0;l < g.length;l++) { + var m = g[l], p = m.text; + m.text = ""; + m.width = 0; + k.font = m.font; + for (var r = c, s = p.split(/[\s.-]/), t = 0, u = 0;u < s.length;u++) { + var v = s[u], E = p.substr(t, v.length + 1), y = k.measureText(E).width | 0; + if (y > r) { do { - if (l.text && (f.runs.push(l), f.width += l.width, l = new b(l.font, l.fillStyle, "", 0, l.underline), n = new a, n.y = f.y + f.descent + f.leading + f.ascent | 0, n.ascent = f.ascent, n.descent = f.descent, n.leading = f.leading, n.align = f.align, d.push(n), f = n), n = c - v, 0 > n) { - var v = u.length, F, I; + if (m.text && (h.runs.push(m), h.width += m.width, m = new f(m.font, m.fillStyle, "", 0, m.underline), r = new a, r.y = h.y + h.descent + h.leading + h.ascent | 0, r.ascent = h.ascent, r.descent = h.descent, r.leading = h.leading, r.align = h.align, d.push(r), h = r), r = c - y, 0 > r) { + var y = E.length, z, G; do { - v--; - if (1 > v) { + y--; + if (1 > y) { throw Error("Shall never happen: bad maxWidth?"); } - F = u.substr(0, v); - I = k.measureText(F).width | 0; - } while (I > c); - l.text = F; - l.width = I; - u = u.substr(v); - v = k.measureText(u).width | 0; + z = E.substr(0, y); + G = k.measureText(z).width | 0; + } while (G > c); + m.text = z; + m.width = G; + E = E.substr(y); + y = k.measureText(E).width | 0; } - } while (0 > n); + } while (0 > r); } else { - n -= v; + r -= y; } - l.text += u; - l.width += v; - q += t.length + 1; + m.text += E; + m.width += y; + t += v.length + 1; } - f.runs.push(l); - f.width += l.width; + h.runs.push(m); + h.width += m.width; } return d; }; a._measureContext = document.createElement("canvas").getContext("2d"); return a; }(); - h.TextLine = d; - var b = function() { - return function(a, b, c, d, e) { + k.TextLine = g; + var f = function() { + return function(a, c, d, f, g) { void 0 === a && (a = ""); - void 0 === b && (b = ""); void 0 === c && (c = ""); - void 0 === d && (d = 0); - void 0 === e && (e = !1); + void 0 === d && (d = ""); + void 0 === f && (f = 0); + void 0 === g && (g = !1); this.font = a; - this.fillStyle = b; - this.text = c; - this.width = d; - this.underline = e; + this.fillStyle = c; + this.text = d; + this.width = f; + this.underline = g; }; }(); - h.TextRun = b; - q = function(a) { - function b(c) { + k.TextRun = f; + h = function(a) { + function c(d) { a.call(this); this._flags = 1048592; this.properties = {}; - this._textBounds = c.clone(); + this._textBounds = d.clone(); this._textRunData = null; this._plainText = ""; this._borderColor = this._backgroundColor = 0; - this._matrix = u.createIdentity(); + this._matrix = t.createIdentity(); this._coords = null; this._scrollV = 1; this._scrollH = 0; - this.textRect = c.clone(); + this.textRect = d.clone(); this.lines = []; - this.setBounds(c); + this.setBounds(d); } - __extends(b, a); - b.prototype.setBounds = function(b) { - a.prototype.setBounds.call(this, b); - this._textBounds.set(b); - this.textRect.setElements(b.x + 2, b.y + 2, b.w - 2, b.h - 2); + __extends(c, a); + c.prototype.setBounds = function(c) { + a.prototype.setBounds.call(this, c); + this._textBounds.set(c); + this.textRect.setElements(c.x + 2, c.y + 2, c.w - 2, c.h - 2); }; - b.prototype.setContent = function(a, b, c, d) { + c.prototype.setContent = function(a, b, c, d) { this._textRunData = b; this._plainText = a; this._matrix.set(c); this._coords = d; this.lines = []; }; - b.prototype.setStyle = function(a, b, c, d) { + c.prototype.setStyle = function(a, b, c, d) { this._backgroundColor = a; this._borderColor = b; this._scrollV = c; this._scrollH = d; }; - b.prototype.reflow = function(a, b) { - var e = this._textRunData; - if (e) { - var f = this._bounds, g = f.w - 4, k = this._plainText, l = this.lines, m = new d, n = 0, r = 0, p = 0, q = 0, s = 0, t = -1; - for (h.enterTimeline("RenderableText.reflow");e.position < e.length;) { - var u = e.readInt(), v = e.readInt(), G = e.readInt(), Z = e.readUTF(), Q = e.readInt(), S = e.readInt(), O = e.readInt(); - Q > p && (p = Q); - S > q && (q = S); - O > s && (s = O); - Q = e.readBoolean(); - S = ""; - e.readBoolean() && (S += "italic "); - Q && (S += "bold "); - G = S + G + "px " + Z; - Z = e.readInt(); - Z = c.ColorUtilities.rgbToHex(Z); - Q = e.readInt(); - -1 === t && (t = Q); - e.readBoolean(); - e.readInt(); - e.readInt(); - e.readInt(); - e.readInt(); - e.readInt(); - for (var Q = e.readBoolean(), P = "", S = !1;!S;u++) { - S = u >= v - 1; - O = k[u]; - if ("\r" !== O && "\n" !== O && (P += O, u < k.length - 1)) { + c.prototype.reflow = function(a, b) { + var c = this._textRunData; + if (c) { + var e = this._bounds, f = e.w - 4, h = this._plainText, l = this.lines, m = new g, p = 0, r = 0, s = 0, t = 0, u = 0, v = -1; + for (k.enterTimeline("RenderableText.reflow");c.position < c.length;) { + var z = c.readInt(), G = c.readInt(), C = c.readInt(), I = c.readUTF(), P = c.readInt(), T = c.readInt(), O = c.readInt(); + P > s && (s = P); + T > t && (t = T); + O > u && (u = O); + P = c.readBoolean(); + T = ""; + c.readBoolean() && (T += "italic "); + P && (T += "bold "); + C = T + C + "px " + I; + I = c.readInt(); + I = d.ColorUtilities.rgbToHex(I); + P = c.readInt(); + -1 === v && (v = P); + c.readBoolean(); + c.readInt(); + c.readInt(); + c.readInt(); + c.readInt(); + c.readInt(); + for (var P = c.readBoolean(), Q = "", T = !1;!T;z++) { + T = z >= G - 1; + O = h[z]; + if ("\r" !== O && "\n" !== O && (Q += O, z < h.length - 1)) { continue; } - m.addRun(G, Z, P, Q); + m.addRun(C, I, Q, P); if (m.runs.length) { - l.length && (n += s); - n += p; - m.y = n | 0; - n += q; - m.ascent = p; - m.descent = q; - m.leading = s; - m.align = t; - if (b && m.width > g) { - for (m = m.wrap(g), P = 0;P < m.length;P++) { - var V = m[P], n = V.y + V.descent + V.leading; - l.push(V); - V.width > r && (r = V.width); + l.length && (p += u); + p += s; + m.y = p | 0; + p += t; + m.ascent = s; + m.descent = t; + m.leading = u; + m.align = v; + if (b && m.width > f) { + for (m = m.wrap(f), Q = 0;Q < m.length;Q++) { + var S = m[Q], p = S.y + S.descent + S.leading; + l.push(S); + S.width > r && (r = S.width); } } else { l.push(m), m.width > r && (r = m.width); } - m = new d; + m = new g; } else { - n += p + q + s; + p += s + t + u; } - P = ""; - if (S) { - s = q = p = 0; - t = -1; + Q = ""; + if (T) { + u = t = s = 0; + v = -1; break; } - "\r" === O && "\n" === k[u + 1] && u++; + "\r" === O && "\n" === h[z + 1] && z++; } - m.addRun(G, Z, P, Q); + m.addRun(C, I, Q, P); } - e = k[k.length - 1]; - "\r" !== e && "\n" !== e || l.push(m); - e = this.textRect; - e.w = r; - e.h = n; + c = h[h.length - 1]; + "\r" !== c && "\n" !== c || l.push(m); + c = this.textRect; + c.w = r; + c.h = p; if (a) { if (!b) { - g = r; - r = f.w; + f = r; + r = e.w; switch(a) { case 1: - e.x = r - (g + 4) >> 1; + c.x = r - (f + 4) >> 1; break; case 3: - e.x = r - (g + 4); + c.x = r - (f + 4); } - this._textBounds.setElements(e.x - 2, e.y - 2, e.w + 4, e.h + 4); + this._textBounds.setElements(c.x - 2, c.y - 2, c.w + 4, c.h + 4); } - f.h = n + 4; + e.h = p + 4; } else { - this._textBounds = f; + this._textBounds = e; } - for (u = 0;u < l.length;u++) { - if (f = l[u], f.width < g) { - switch(f.align) { + for (z = 0;z < l.length;z++) { + if (e = l[z], e.width < f) { + switch(e.align) { case 1: - f.x = g - f.width | 0; + e.x = f - e.width | 0; break; case 2: - f.x = (g - f.width) / 2 | 0; + e.x = (f - e.width) / 2 | 0; } } } this.invalidate(); - h.leaveTimeline("RenderableText.reflow"); + k.leaveTimeline("RenderableText.reflow"); } }; - b.roundBoundPoints = function(a) { - e(a === b.absoluteBoundPoints); - for (var c = 0;c < a.length;c++) { - var d = a[c]; - d.x = Math.floor(d.x + .1) + .5; - d.y = Math.floor(d.y + .1) + .5; + c.roundBoundPoints = function(a) { + for (var b = 0;b < a.length;b++) { + var c = a[b]; + c.x = Math.floor(c.x + .1) + .5; + c.y = Math.floor(c.y + .1) + .5; } }; - b.prototype.render = function(a) { - h.enterTimeline("RenderableText.render"); + c.prototype.render = function(a) { + k.enterTimeline("RenderableText.render"); a.save(); - var d = this._textBounds; - this._backgroundColor && (a.fillStyle = c.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(d.x, d.y, d.w, d.h)); + var b = this._textBounds; + this._backgroundColor && (a.fillStyle = d.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(b.x, b.y, b.w, b.h)); if (this._borderColor) { - a.strokeStyle = c.ColorUtilities.rgbaToCSSStyle(this._borderColor); + a.strokeStyle = d.ColorUtilities.rgbaToCSSStyle(this._borderColor); a.lineCap = "square"; a.lineWidth = 1; - var e = b.absoluteBoundPoints, f = a.currentTransform; - f ? (d = d.clone(), (new u(f.a, f.b, f.c, f.d, f.e, f.f)).transformRectangle(d, e), a.setTransform(1, 0, 0, 1, 0, 0)) : (e[0].x = d.x, e[0].y = d.y, e[1].x = d.x + d.w, e[1].y = d.y, e[2].x = d.x + d.w, e[2].y = d.y + d.h, e[3].x = d.x, e[3].y = d.y + d.h); - b.roundBoundPoints(e); - d = new Path2D; - d.moveTo(e[0].x, e[0].y); - d.lineTo(e[1].x, e[1].y); - d.lineTo(e[2].x, e[2].y); - d.lineTo(e[3].x, e[3].y); - d.lineTo(e[0].x, e[0].y); - a.stroke(d); - f && a.setTransform(f.a, f.b, f.c, f.d, f.e, f.f); + var f = c.absoluteBoundPoints, g = a.currentTransform; + g ? (b = b.clone(), (new t(g.a, g.b, g.c, g.d, g.e, g.f)).transformRectangle(b, f), a.setTransform(1, 0, 0, 1, 0, 0)) : (f[0].x = b.x, f[0].y = b.y, f[1].x = b.x + b.w, f[1].y = b.y, f[2].x = b.x + b.w, f[2].y = b.y + b.h, f[3].x = b.x, f[3].y = b.y + b.h); + c.roundBoundPoints(f); + b = new Path2D; + b.moveTo(f[0].x, f[0].y); + b.lineTo(f[1].x, f[1].y); + b.lineTo(f[2].x, f[2].y); + b.lineTo(f[3].x, f[3].y); + b.lineTo(f[0].x, f[0].y); + a.stroke(b); + g && a.setTransform(g.a, g.b, g.c, g.d, g.e, g.f); } this._coords ? this._renderChars(a) : this._renderLines(a); a.restore(); - h.leaveTimeline("RenderableText.render"); + k.leaveTimeline("RenderableText.render"); }; - b.prototype._renderChars = function(a) { + c.prototype._renderChars = function(a) { if (this._matrix) { var b = this._matrix; a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty); @@ -51781,273 +51835,272 @@ __extends = this.__extends || function(c, h) { var g = e[f]; a.font = g.font; a.fillStyle = g.fillStyle; - for (var g = g.text, k = 0;k < g.length;k++) { - var h = c.readInt() / 20, l = c.readInt() / 20; - a.fillText(g[k], h, l); + for (var g = g.text, h = 0;h < g.length;h++) { + var k = c.readInt() / 20, l = c.readInt() / 20; + a.fillText(g[h], k, l); } } } }; - b.prototype._renderLines = function(a) { + c.prototype._renderLines = function(a) { var b = this._textBounds; a.beginPath(); a.rect(b.x + 2, b.y + 2, b.w - 4, b.h - 4); a.clip(); a.translate(b.x - this._scrollH + 2, b.y + 2); for (var c = this.lines, d = this._scrollV, e = 0, f = 0;f < c.length;f++) { - var g = c[f], k = g.x, h = g.y; + var g = c[f], h = g.x, k = g.y; if (f + 1 < d) { - e = h + g.descent + g.leading; + e = k + g.descent + g.leading; } else { - h -= e; - if (f + 1 - d && h > b.h) { + k -= e; + if (f + 1 - d && k > b.h) { break; } for (var l = g.runs, m = 0;m < l.length;m++) { - var n = l[m]; - a.font = n.font; - a.fillStyle = n.fillStyle; - n.underline && a.fillRect(k, h + g.descent / 2 | 0, n.width, 1); + var p = l[m]; + a.font = p.font; + a.fillStyle = p.fillStyle; + p.underline && a.fillRect(h, k + g.descent / 2 | 0, p.width, 1); a.textAlign = "left"; a.textBaseline = "alphabetic"; - a.fillText(n.text, k, h); - k += n.width; + a.fillText(p.text, h, k); + h += p.width; } } } }; - b.absoluteBoundPoints = [new v(0, 0), new v(0, 0), new v(0, 0), new v(0, 0)]; - return b; - }(t); - h.RenderableText = q; - t = function(a) { - function b(c, d) { + c.absoluteBoundPoints = [new v(0, 0), new v(0, 0), new v(0, 0), new v(0, 0)]; + return c; + }(c); + k.RenderableText = h; + c = function(a) { + function c(d, e) { a.call(this); this._flags = 3145728; this.properties = {}; - this.setBounds(new p(0, 0, c, d)); + this.setBounds(new u(0, 0, d, e)); } - __extends(b, a); - Object.defineProperty(b.prototype, "text", {get:function() { + __extends(c, a); + Object.defineProperty(c.prototype, "text", {get:function() { return this._text; }, set:function(a) { this._text = a; }, enumerable:!0, configurable:!0}); - b.prototype.render = function(a, b, c) { + c.prototype.render = function(a, b, c) { a.save(); a.textBaseline = "top"; a.fillStyle = "white"; a.fillText(this.text, 0, 0); a.restore(); }; - return b; - }(t); - h.Label = t; - })(c.GFX || (c.GFX = {})); + return c; + }(c); + k.Label = c; + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = c.ColorUtilities.clampByte, s = c.Debug.assert, v = function() { +(function(d) { + (function(k) { + var a = d.ColorUtilities.clampByte, r = function() { return function() { }; }(); - h.Filter = v; - var p = function(a) { - function c(e, h, l) { + k.Filter = r; + var v = function(a) { + function d(k, c, h) { a.call(this); - this.blurX = e; - this.blurY = h; - this.quality = l; + this.blurX = k; + this.blurY = c; + this.quality = h; } - __extends(c, a); - return c; - }(v); - h.BlurFilter = p; - p = function(a) { - function c(e, h, l, p, n, k, f, d, b, g, r) { - a.call(this); - this.alpha = e; - this.angle = h; - this.blurX = l; - this.blurY = p; - this.color = n; - this.distance = k; - this.hideObject = f; - this.inner = d; - this.knockout = b; - this.quality = g; - this.strength = r; - } - __extends(c, a); - return c; - }(v); - h.DropshadowFilter = p; + __extends(d, a); + return d; + }(r); + k.BlurFilter = v; v = function(a) { - function c(e, h, l, p, n, k, f, d) { + function d(k, c, h, p, r, m, g, f, b, e, q) { a.call(this); - this.alpha = e; + this.alpha = k; + this.angle = c; this.blurX = h; - this.blurY = l; - this.color = p; - this.inner = n; - this.knockout = k; - this.quality = f; - this.strength = d; + this.blurY = p; + this.color = r; + this.distance = m; + this.hideObject = g; + this.inner = f; + this.knockout = b; + this.quality = e; + this.strength = q; } - __extends(c, a); - return c; - }(v); - h.GlowFilter = v; + __extends(d, a); + return d; + }(r); + k.DropshadowFilter = v; + r = function(a) { + function d(k, c, h, p, r, m, g, f) { + a.call(this); + this.alpha = k; + this.blurX = c; + this.blurY = h; + this.color = p; + this.inner = r; + this.knockout = m; + this.quality = g; + this.strength = f; + } + __extends(d, a); + return d; + }(r); + k.GlowFilter = r; (function(a) { a[a.Unknown = 0] = "Unknown"; a[a.Identity = 1] = "Identity"; - })(h.ColorMatrixType || (h.ColorMatrixType = {})); - v = function() { - function c(a) { - s(20 === a.length); + })(k.ColorMatrixType || (k.ColorMatrixType = {})); + r = function() { + function d(a) { this._data = new Float32Array(a); this._type = 0; } - c.prototype.clone = function() { - var a = new c(this._data); + d.prototype.clone = function() { + var a = new d(this._data); a._type = this._type; return a; }; - c.prototype.set = function(a) { + d.prototype.set = function(a) { this._data.set(a._data); this._type = a._type; }; - c.prototype.toWebGLMatrix = function() { + d.prototype.toWebGLMatrix = function() { return new Float32Array(this._data); }; - c.prototype.asWebGLMatrix = function() { + d.prototype.asWebGLMatrix = function() { return this._data.subarray(0, 16); }; - c.prototype.asWebGLVector = function() { + d.prototype.asWebGLVector = function() { return this._data.subarray(16, 20); }; - c.prototype.isIdentity = function() { + d.prototype.isIdentity = function() { if (this._type & 1) { return!0; } var a = this._data; return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 1 == a[15] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19]; }; - c.createIdentity = function() { - var a = new c([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]); + d.createIdentity = function() { + var a = new d([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]); a._type = 1; return a; }; - c.prototype.setMultipliersAndOffsets = function(a, c, h, p, q, n, k, f) { - for (var d = this._data, b = 0;b < d.length;b++) { - d[b] = 0; + d.prototype.setMultipliersAndOffsets = function(a, d, c, h, k, r, m, g) { + for (var f = this._data, b = 0;b < f.length;b++) { + f[b] = 0; } - d[0] = a; - d[5] = c; - d[10] = h; - d[15] = p; - d[16] = q / 255; - d[17] = n / 255; - d[18] = k / 255; - d[19] = f / 255; + f[0] = a; + f[5] = d; + f[10] = c; + f[15] = h; + f[16] = k / 255; + f[17] = r / 255; + f[18] = m / 255; + f[19] = g / 255; this._type = 0; }; - c.prototype.transformRGBA = function(c) { - var e = c >> 24 & 255, h = c >> 16 & 255, p = c >> 8 & 255, q = c & 255, n = this._data; - c = a(e * n[0] + h * n[1] + p * n[2] + q * n[3] + 255 * n[16]); - var k = a(e * n[4] + h * n[5] + p * n[6] + q * n[7] + 255 * n[17]), f = a(e * n[8] + h * n[9] + p * n[10] + q * n[11] + 255 * n[18]), e = a(e * n[12] + h * n[13] + p * n[14] + q * n[15] + 255 * n[19]); - return c << 24 | k << 16 | f << 8 | e; + d.prototype.transformRGBA = function(d) { + var k = d >> 24 & 255, c = d >> 16 & 255, h = d >> 8 & 255, p = d & 255, r = this._data; + d = a(k * r[0] + c * r[1] + h * r[2] + p * r[3] + 255 * r[16]); + var m = a(k * r[4] + c * r[5] + h * r[6] + p * r[7] + 255 * r[17]), g = a(k * r[8] + c * r[9] + h * r[10] + p * r[11] + 255 * r[18]), k = a(k * r[12] + c * r[13] + h * r[14] + p * r[15] + 255 * r[19]); + return d << 24 | m << 16 | g << 8 | k; }; - c.prototype.multiply = function(a) { + d.prototype.multiply = function(a) { if (!(a._type & 1)) { - var c = this._data, h = a._data; - a = c[0]; - var p = c[1], q = c[2], n = c[3], k = c[4], f = c[5], d = c[6], b = c[7], g = c[8], r = c[9], s = c[10], u = c[11], v = c[12], B = c[13], M = c[14], N = c[15], K = c[16], y = c[17], D = c[18], L = c[19], H = h[0], J = h[1], C = h[2], E = h[3], F = h[4], I = h[5], G = h[6], Z = h[7], Q = h[8], S = h[9], O = h[10], P = h[11], V = h[12], $ = h[13], W = h[14], x = h[15], ea = h[16], Y = h[17], R = h[18], h = h[19]; - c[0] = a * H + k * J + g * C + v * E; - c[1] = p * H + f * J + r * C + B * E; - c[2] = q * H + d * J + s * C + M * E; - c[3] = n * H + b * J + u * C + N * E; - c[4] = a * F + k * I + g * G + v * Z; - c[5] = p * F + f * I + r * G + B * Z; - c[6] = q * F + d * I + s * G + M * Z; - c[7] = n * F + b * I + u * G + N * Z; - c[8] = a * Q + k * S + g * O + v * P; - c[9] = p * Q + f * S + r * O + B * P; - c[10] = q * Q + d * S + s * O + M * P; - c[11] = n * Q + b * S + u * O + N * P; - c[12] = a * V + k * $ + g * W + v * x; - c[13] = p * V + f * $ + r * W + B * x; - c[14] = q * V + d * $ + s * W + M * x; - c[15] = n * V + b * $ + u * W + N * x; - c[16] = a * ea + k * Y + g * R + v * h + K; - c[17] = p * ea + f * Y + r * R + B * h + y; - c[18] = q * ea + d * Y + s * R + M * h + D; - c[19] = n * ea + b * Y + u * R + N * h + L; + var d = this._data, c = a._data; + a = d[0]; + var h = d[1], k = d[2], r = d[3], m = d[4], g = d[5], f = d[6], b = d[7], e = d[8], q = d[9], n = d[10], u = d[11], v = d[12], A = d[13], H = d[14], K = d[15], F = d[16], J = d[17], M = d[18], D = d[19], B = c[0], E = c[1], y = c[2], z = c[3], G = c[4], C = c[5], I = c[6], P = c[7], T = c[8], O = c[9], Q = c[10], S = c[11], V = c[12], aa = c[13], $ = c[14], w = c[15], U = c[16], ba = c[17], R = c[18], c = c[19]; + d[0] = a * B + m * E + e * y + v * z; + d[1] = h * B + g * E + q * y + A * z; + d[2] = k * B + f * E + n * y + H * z; + d[3] = r * B + b * E + u * y + K * z; + d[4] = a * G + m * C + e * I + v * P; + d[5] = h * G + g * C + q * I + A * P; + d[6] = k * G + f * C + n * I + H * P; + d[7] = r * G + b * C + u * I + K * P; + d[8] = a * T + m * O + e * Q + v * S; + d[9] = h * T + g * O + q * Q + A * S; + d[10] = k * T + f * O + n * Q + H * S; + d[11] = r * T + b * O + u * Q + K * S; + d[12] = a * V + m * aa + e * $ + v * w; + d[13] = h * V + g * aa + q * $ + A * w; + d[14] = k * V + f * aa + n * $ + H * w; + d[15] = r * V + b * aa + u * $ + K * w; + d[16] = a * U + m * ba + e * R + v * c + F; + d[17] = h * U + g * ba + q * R + A * c + J; + d[18] = k * U + f * ba + n * R + H * c + M; + d[19] = r * U + b * ba + u * R + K * c + D; this._type = 0; } }; - Object.defineProperty(c.prototype, "alphaMultiplier", {get:function() { + Object.defineProperty(d.prototype, "alphaMultiplier", {get:function() { return this._data[15]; }, enumerable:!0, configurable:!0}); - c.prototype.hasOnlyAlphaMultiplier = function() { + d.prototype.hasOnlyAlphaMultiplier = function() { var a = this._data; return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19]; }; - c.prototype.equals = function(a) { + d.prototype.equals = function(a) { if (!a) { return!1; } if (this._type === a._type && 1 === this._type) { return!0; } - var c = this._data; + var d = this._data; a = a._data; - for (var h = 0;20 > h;h++) { - if (.001 < Math.abs(c[h] - a[h])) { + for (var c = 0;20 > c;c++) { + if (.001 < Math.abs(d[c] - a[c])) { return!1; } } return!0; }; - c.prototype.toSVGFilterMatrix = function() { + d.prototype.toSVGFilterMatrix = function() { var a = this._data; return[a[0], a[4], a[8], a[12], a[16], a[1], a[5], a[9], a[13], a[17], a[2], a[6], a[10], a[14], a[18], a[3], a[7], a[11], a[15], a[19]].join(" "); }; - return c; + return d; }(); - h.ColorMatrix = v; - })(c.GFX || (c.GFX = {})); + k.ColorMatrix = r; + })(d.GFX || (d.GFX = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("Player"); - h.counter = new c.Metrics.Counter(!0); - h.writer = null; - h.enterTimeline = function(a, c) { - h.writer && h.writer.enter(a); +(function(d) { + (function(k) { + k.timelineBuffer = new d.Tools.Profiler.TimelineBuffer("Player"); + k.counter = new d.Metrics.Counter(!1); + k.writer = null; + k.enterTimeline = function(a, d) { + k.writer && k.writer.enter(a); }; - h.leaveTimeline = function(a, c) { - h.writer && h.writer.leave(a); + k.leaveTimeline = function(a, d) { + k.writer && k.writer.leave(a); }; - })(c.Player || (c.Player = {})); + })(d.Player || (d.Player = {})); })(Shumway || (Shumway = {})); -var Shumway$$inline_609 = Shumway || (Shumway = {}); -Shumway$$inline_609.playerOptions = Shumway$$inline_609.Settings.shumwayOptions.register(new Shumway$$inline_609.Options.OptionSet("Player Options")); -Shumway$$inline_609.frameEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Frame Execution", "boolean", !0, "Enable frame execution.")); -Shumway$$inline_609.timerEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Timers", "boolean", !0, "Enable timer events.")); -Shumway$$inline_609.pumpEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Pump", "boolean", !0, "Enable display tree serialization.")); -Shumway$$inline_609.pumpRateOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Pump Rate", "number", 60, "Number of times / second that the display list is synchronized.", {range:{min:1, max:120, step:1}})); -Shumway$$inline_609.frameRateOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Frame Rate", "number", 60, "Override a movie's frame rate, set to -1 to use the movies default frame rate.", {range:{min:-1, max:120, step:1}})); -Shumway$$inline_609.tracePlayerOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("tp", "Trace Player", "number", 0, "Trace player every n frames.", {range:{min:0, max:512, step:1}})); -Shumway$$inline_609.traceMouseEventOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("tme", "Trace Mouse Events", "boolean", !1, "Trace mouse events.")); -Shumway$$inline_609.frameRateMultiplierOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Frame Rate Multiplier", "number", 1, "Play frames at a faster rate.", {range:{min:1, max:16, step:1}})); -Shumway$$inline_609.dontSkipFramesOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Disables Frame Skipping", "boolean", !1, "Play all frames, e.g. no skipping frame during throttle.")); -Shumway$$inline_609.playAllSymbolsOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbols", "boolean", !1, "Plays all SWF symbols automatically.")); -Shumway$$inline_609.playSymbolOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Number", "number", 0, "Select symbol by Id.", {range:{min:0, max:2E4, step:1}})); -Shumway$$inline_609.playSymbolFrameDurationOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Duration", "number", 0, "How many frames to play, 0 for all frames of the movie clip.", {range:{min:0, max:128, step:1}})); -Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Count", "number", -1, "Select symbol count.", {range:{min:0, max:2E4, step:1}})); -(function(c) { - var h = function() { +var Shumway$$inline_614 = Shumway || (Shumway = {}); +Shumway$$inline_614.playerOptions = Shumway$$inline_614.Settings.shumwayOptions.register(new Shumway$$inline_614.Options.OptionSet("Player Options")); +Shumway$$inline_614.frameEnabledOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("enableFrames", "Enable Frame Execution", "boolean", !0, "Enable frame execution.")); +Shumway$$inline_614.timerEnabledOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("enableTimers", "Enable Timers", "boolean", !0, "Enable timer events.")); +Shumway$$inline_614.pumpEnabledOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("enablePump", "Enable Pump", "boolean", !0, "Enable display tree serialization.")); +Shumway$$inline_614.pumpRateOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("pumpRate", "Pump Rate", "number", 60, "Number of times / second that the display list is synchronized.", {range:{min:1, max:120, step:1}})); +Shumway$$inline_614.frameRateOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("frameRate", "Frame Rate", "number", 60, "Override a movie's frame rate, set to -1 to use the movies default frame rate.", {range:{min:-1, max:120, step:1}})); +Shumway$$inline_614.tracePlayerOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("tp", "Trace Player", "number", 0, "Trace player every n frames.", {range:{min:0, max:512, step:1}})); +Shumway$$inline_614.traceMouseEventOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("tme", "Trace Mouse Events", "boolean", !1, "Trace mouse events.")); +Shumway$$inline_614.frameRateMultiplierOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Frame Rate Multiplier", "number", 1, "Play frames at a faster rate.", {range:{min:1, max:16, step:1}})); +Shumway$$inline_614.dontSkipFramesOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Disables Frame Skipping", "boolean", !1, "Play all frames, e.g. no skipping frame during throttle.")); +Shumway$$inline_614.playAllSymbolsOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Play Symbols", "boolean", !1, "Plays all SWF symbols automatically.")); +Shumway$$inline_614.playSymbolOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Play Symbol Number", "number", 0, "Select symbol by Id.", {range:{min:0, max:2E4, step:1}})); +Shumway$$inline_614.playSymbolFrameDurationOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Play Symbol Duration", "number", 0, "How many frames to play, 0 for all frames of the movie clip.", {range:{min:0, max:128, step:1}})); +Shumway$$inline_614.playSymbolCountOption = Shumway$$inline_614.playerOptions.register(new Shumway$$inline_614.Options.Option("", "Play Symbol Count", "number", -1, "Select symbol count.", {range:{min:0, max:2E4, step:1}})); +(function(d) { + var k = function() { function a() { this._expectedNextFrameAt = performance.now(); this._drawStats = []; @@ -52061,8 +52114,8 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re if (this._drawsSkipped >= a.MAX_DRAWS_TO_SKIP) { return!1; } - var c = this._drawStats.length < a.STATS_TO_REMEMBER ? 0 : this._drawStatsSum / this._drawStats.length; - return performance.now() + c + a.INTERVAL_PADDING_MS > this._expectedNextFrameAt; + var d = this._drawStats.length < a.STATS_TO_REMEMBER ? 0 : this._drawStatsSum / this._drawStats.length; + return performance.now() + d + a.INTERVAL_PADDING_MS > this._expectedNextFrameAt; }, enumerable:!0, configurable:!0}); Object.defineProperty(a.prototype, "nextFrameIn", {get:function() { return Math.max(0, this._expectedNextFrameAt - performance.now()); @@ -52070,24 +52123,24 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re Object.defineProperty(a.prototype, "isOnTime", {get:function() { return this._onTime; }, enumerable:!0, configurable:!0}); - a.prototype.startFrame = function(c) { - var h = c = 1E3 / c, p = this._onTimeDelta + this._delta; - 0 !== p && (0 > p ? h *= a.SPEED_ADJUST_RATE : 0 < p && (h /= a.SPEED_ADJUST_RATE), this._onTimeDelta += c - h); - this._expectedNextFrameAt += h; + a.prototype.startFrame = function(d) { + var k = d = 1E3 / d, u = this._onTimeDelta + this._delta; + 0 !== u && (0 > u ? k *= a.SPEED_ADJUST_RATE : 0 < u && (k /= a.SPEED_ADJUST_RATE), this._onTimeDelta += d - k); + this._expectedNextFrameAt += k; this._onTime = !0; }; a.prototype.endFrame = function() { - var c = performance.now() + a.INTERVAL_PADDING_MS; - c > this._expectedNextFrameAt && (this._trackDelta && (this._onTimeDelta += this._expectedNextFrameAt - c, console.log(this._onTimeDelta)), this._expectedNextFrameAt = c, this._onTime = !1); + var d = performance.now() + a.INTERVAL_PADDING_MS; + d > this._expectedNextFrameAt && (this._trackDelta && (this._onTimeDelta += this._expectedNextFrameAt - d, console.log(this._onTimeDelta)), this._expectedNextFrameAt = d, this._onTime = !1); }; a.prototype.startDraw = function() { this._drawsSkipped = 0; this._drawStarted = performance.now(); }; a.prototype.endDraw = function() { - var c = performance.now() - this._drawStarted; - this._drawStats.push(c); - for (this._drawStatsSum += c;this._drawStats.length > a.STATS_TO_REMEMBER;) { + var d = performance.now() - this._drawStarted; + this._drawStats.push(d); + for (this._drawStatsSum += d;this._drawStats.length > a.STATS_TO_REMEMBER;) { this._drawStatsSum -= this._drawStats.shift(); } }; @@ -52109,12 +52162,12 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re a.SPEED_ADJUST_RATE = .9; return a; }(); - c.FrameScheduler = h; + d.FrameScheduler = k; })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.AVM2.AS.flash, v = h.display, p = h.display.BitmapData, u = h.display.DisplayObjectFlags, l = h.display.BlendMode, e = h.display.PixelSnapping, m = h.geom.Point, t = c.Bounds, q = h.ui.MouseCursor, n = c.Debug.assert, k = c.Player.writer, f = function() { + var k = d.AVM2.AS.flash, v = k.display, u = k.display.BitmapData, t = k.display.DisplayObjectFlags, l = k.display.BlendMode, c = k.display.PixelSnapping, h = k.geom.Point, p = d.Bounds, s = k.ui.MouseCursor, m = d.Player.writer, g = function() { function a() { this.phase = 0; this.roots = null; @@ -52124,60 +52177,60 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re }; a.prototype.remoteObjects = function() { this.phase = 0; - for (var a = this.roots, d = 0;d < a.length;d++) { - c.Player.enterTimeline("remoting objects"), this.writeDirtyDisplayObjects(a[d]), c.Player.leaveTimeline("remoting objects"); + for (var a = this.roots, c = 0;c < a.length;c++) { + d.Player.enterTimeline("remoting objects"), this.writeDirtyDisplayObjects(a[c]), d.Player.leaveTimeline("remoting objects"); } }; a.prototype.remoteReferences = function() { this.phase = 1; - for (var a = this.roots, d = 0;d < a.length;d++) { - c.Player.enterTimeline("remoting references"), this.writeDirtyDisplayObjects(a[d], !0), c.Player.leaveTimeline("remoting references"); + for (var a = this.roots, c = 0;c < a.length;c++) { + d.Player.enterTimeline("remoting references"), this.writeDirtyDisplayObjects(a[c], !0), d.Player.leaveTimeline("remoting references"); } }; - a.prototype.writeDirtyDisplayObjects = function(a, d) { - void 0 === d && (d = !1); - var e = this, f = this.roots; + a.prototype.writeDirtyDisplayObjects = function(a, c) { + void 0 === c && (c = !1); + var f = this, g = this.roots; a.visit(function(a) { - a._hasAnyFlags(u.Dirty) && (e.writeUpdateFrame(a), f && a.mask && c.ArrayUtilities.pushUnique(f, a.mask._findFurthestAncestorOrSelf())); - e.writeDirtyAssets(a); + a._hasAnyFlags(t.Dirty) && (f.writeUpdateFrame(a), g && a.mask && d.ArrayUtilities.pushUnique(g, a.mask._findFurthestAncestorOrSelf())); + f.writeDirtyAssets(a); if (a._hasFlags(536870912)) { return 0; } - d && a._removeFlags(536870912); + c && a._removeFlags(536870912); return 2; }, 0); }; a.prototype.writeStage = function(a, c) { - k && k.writeLn("Sending Stage"); + m && m.writeLn("Sending Stage"); this.output.writeInt(104); this.output.writeInt(a._id); this.output.writeInt(a.color); - this._writeRectangle(new t(0, 0, 20 * a.stageWidth, 20 * a.stageHeight)); - this.output.writeInt(h.display.StageAlign.toNumber(a.align)); - this.output.writeInt(h.display.StageScaleMode.toNumber(a.scaleMode)); - this.output.writeInt(h.display.StageDisplayState.toNumber(a.displayState)); - var d = h.ui.Mouse.cursor; + this._writeRectangle(new p(0, 0, 20 * a.stageWidth, 20 * a.stageHeight)); + this.output.writeInt(k.display.StageAlign.toNumber(a.align)); + this.output.writeInt(k.display.StageScaleMode.toNumber(a.scaleMode)); + this.output.writeInt(k.display.StageDisplayState.toNumber(a.displayState)); + var d = k.ui.Mouse.cursor; if (c) { - if (this.output.writeInt(c._id), d === q.AUTO) { - var e = c; + if (this.output.writeInt(c._id), d === s.AUTO) { + var f = c; do { - if (h.display.SimpleButton.isType(e) || h.display.Sprite.isType(e) && e.buttonMode && c.useHandCursor) { - d = q.BUTTON; + if (k.display.SimpleButton.isType(f) || k.display.Sprite.isType(f) && f.buttonMode && c.useHandCursor) { + d = s.BUTTON; break; } - e = e._parent; - } while (e && e !== a); + f = f._parent; + } while (f && f !== a); } } else { this.output.writeInt(-1); } - this.output.writeInt(q.toNumber(d)); + this.output.writeInt(s.toNumber(d)); }; a.prototype.writeGraphics = function(a) { if (a._isDirty) { - k && k.writeLn("Sending Graphics: " + a._id); - for (var c = a._textures, d = c.length, e = 0;e < d;e++) { - c[e] && this.writeBitmapData(c[e]); + m && m.writeLn("Sending Graphics: " + a._id); + for (var c = a._textures, d = c.length, f = 0;f < d;f++) { + c[f] && this.writeBitmapData(c[f]); } this.output.writeInt(101); this.output.writeInt(a._id); @@ -52185,26 +52238,26 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re this._writeRectangle(a._getContentBounds()); this._writeAsset(a._graphicsData.toPlainObject()); this.output.writeInt(d); - for (e = 0;e < d;e++) { - this.output.writeInt(c[e] ? c[e]._id : -1); + for (f = 0;f < d;f++) { + this.output.writeInt(c[f] ? c[f]._id : -1); } a._isDirty = !1; } }; a.prototype.writeNetStream = function(a, c) { - a._isDirty && (k && k.writeLn("Sending NetStream: " + a._id), this.output.writeInt(105), this.output.writeInt(a._id), this._writeRectangle(c), a._isDirty = !1); + a._isDirty && (m && m.writeLn("Sending NetStream: " + a._id), this.output.writeInt(105), this.output.writeInt(a._id), this._writeRectangle(c), a._isDirty = !1); }; a.prototype.writeBitmapData = function(a) { - a._isDirty && (k && k.writeLn("Sending BitmapData: " + a._id), this.output.writeInt(102), this.output.writeInt(a._id), this.output.writeInt(a._symbol ? a._symbol.id : -1), this._writeRectangle(a._getContentBounds()), this.output.writeInt(a._type), this._writeAsset(a._dataBuffer.toPlainObject()), a._isDirty = !1); + a._isDirty && (m && m.writeLn("Sending BitmapData: " + a._id), this.output.writeInt(102), this.output.writeInt(a._id), this.output.writeInt(a._symbol ? a._symbol.id : -1), this._writeRectangle(a._getContentBounds()), this.output.writeInt(a._type), this._writeAsset(a._dataBuffer.toPlainObject()), a._isDirty = !1); }; a.prototype.writeTextContent = function(a) { - if (a.flags & c.TextContentFlags.Dirty) { - k && k.writeLn("Sending TextContent: " + a._id); + if (a.flags & d.TextContentFlags.Dirty) { + m && m.writeLn("Sending TextContent: " + a._id); this.output.writeInt(103); this.output.writeInt(a._id); this.output.writeInt(-1); this._writeRectangle(a.bounds); - this._writeMatrix(a.matrix || h.geom.Matrix.FROZEN_IDENTITY_MATRIX); + this._writeMatrix(a.matrix || k.geom.Matrix.FROZEN_IDENTITY_MATRIX); this.output.writeInt(a.backgroundColor); this.output.writeInt(a.borderColor); this.output.writeInt(a.autoSize); @@ -52213,17 +52266,17 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re this.output.writeInt(a.scrollH); this._writeAsset(a.plainText); this._writeAsset(a.textRunData.toPlainObject()); - var d = a.coords; - if (d) { - var e = d.length; - this.output.writeInt(e); - for (var f = 0;f < e;f++) { - this.output.writeInt(d[f]); + var c = a.coords; + if (c) { + var f = c.length; + this.output.writeInt(f); + for (var g = 0;g < f;g++) { + this.output.writeInt(c[g]); } } else { this.output.writeInt(0); } - a.flags &= ~c.TextContentFlags.Dirty; + a.flags &= ~d.TextContentFlags.Dirty; } }; a.prototype.writeClippedObjectsCount = function(a) { @@ -52244,66 +52297,66 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re a.prototype.writeUpdateFrame = function(a) { this.output.writeInt(100); this.output.writeInt(a._id); - k && k.writeLn("Sending UpdateFrame: " + a.debugName(!0)); - var c = !1, d = a._hasFlags(1048576), f = a._hasFlags(67108864), m = a._hasFlags(1073741824), n = null; - h.media.Video.isType(a) && (n = a); - var p = !1; - 1 === this.phase && (p = a._hasAnyFlags(65011712), c = a._hasFlags(134217728)); - var q = null; - v.Bitmap.isType(a) && (q = a); - var t = a._hasFlags(268435456), K; - K = 0 | (d ? 1 : 0) | (f ? 8 : 0); - K |= c ? 64 : 0; - K |= t ? 128 : 0; - K |= m ? 32 : 0; - K |= p ? 4 : 0; - this.output.writeInt(K); - d && this._writeMatrix(a._getMatrix()); - f && this._writeColorTransform(a._colorTransform); - c && this.output.writeInt(a.mask ? a.mask._id : -1); - t && this.writeClippedObjectsCount(a); - m && (this.output.writeInt(a._ratio), this.output.writeInt(l.toNumber(a._blendMode)), this._writeFilters(a.filters), this.output.writeBoolean(a._hasFlags(1)), this.output.writeBoolean(a.cacheAsBitmap), q ? (this.output.writeInt(e.toNumber(q.pixelSnapping)), this.output.writeInt(q.smoothing ? 1 : 0)) : (this.output.writeInt(e.toNumber(e.AUTO)), this.output.writeInt(1))); - c = a._getGraphics(); - d = a._getTextContent(); - if (p) { - k && k.enter("Children: {"); - if (q) { - q.bitmapData ? (this.output.writeInt(1), this.output.writeInt(134217728 | q.bitmapData._id)) : this.output.writeInt(0); + m && m.writeLn("Sending UpdateFrame: " + a.debugName(!0)); + var d = !1, f = a._hasFlags(1048576), g = a._hasFlags(67108864), h = a._hasFlags(1073741824), p = null; + k.media.Video.isType(a) && (p = a); + var s = !1; + 1 === this.phase && (s = a._hasAnyFlags(65011712), d = a._hasFlags(134217728)); + var u = null; + v.Bitmap.isType(a) && (u = a); + var K = a._hasFlags(268435456), F; + F = 0 | (f ? 1 : 0) | (g ? 8 : 0); + F |= d ? 64 : 0; + F |= K ? 128 : 0; + F |= h ? 32 : 0; + F |= s ? 4 : 0; + this.output.writeInt(F); + f && this._writeMatrix(a._getMatrix()); + g && this._writeColorTransform(a._colorTransform); + d && this.output.writeInt(a.mask ? a.mask._id : -1); + K && this.writeClippedObjectsCount(a); + h && (this.output.writeInt(a._ratio), this.output.writeInt(l.toNumber(a._blendMode)), this._writeFilters(a.filters), this.output.writeBoolean(a._hasFlags(1)), this.output.writeBoolean(a.cacheAsBitmap), u ? (this.output.writeInt(c.toNumber(u.pixelSnapping)), this.output.writeInt(u.smoothing ? 1 : 0)) : (this.output.writeInt(c.toNumber(c.AUTO)), this.output.writeInt(1))); + d = a._getGraphics(); + f = a._getTextContent(); + if (s) { + m && m.enter("Children: {"); + if (u) { + u.bitmapData ? (this.output.writeInt(1), this.output.writeInt(134217728 | u.bitmapData._id)) : this.output.writeInt(0); } else { - if (n) { - n._netStream ? (this.output.writeInt(1), this.output.writeInt(134217728 | n._netStream._id)) : this.output.writeInt(0); + if (p) { + p._netStream ? (this.output.writeInt(1), this.output.writeInt(134217728 | p._netStream._id)) : this.output.writeInt(0); } else { - if (p = c || d ? 1 : 0, (n = a._children) && (p += n.length), this.output.writeInt(p), c ? (k && k.writeLn("Reference Graphics: " + c._id), this.output.writeInt(134217728 | c._id)) : d && (k && k.writeLn("Reference TextContent: " + d._id), this.output.writeInt(134217728 | d._id)), n) { - for (p = 0;p < n.length;p++) { - k && k.writeLn("Reference DisplayObject: " + n[p].debugName()), this.output.writeInt(n[p]._id), 0 <= n[p]._clipDepth && n[p]._setFlags(268435456); + if (s = d || f ? 1 : 0, (p = a._children) && (s += p.length), this.output.writeInt(s), d ? (m && m.writeLn("Reference Graphics: " + d._id), this.output.writeInt(134217728 | d._id)) : f && (m && m.writeLn("Reference TextContent: " + f._id), this.output.writeInt(134217728 | f._id)), p) { + for (s = 0;s < p.length;s++) { + m && m.writeLn("Reference DisplayObject: " + p[s].debugName()), this.output.writeInt(p[s]._id), 0 <= p[s]._clipDepth && p[s]._setFlags(268435456); } } } } - k && k.leave("}"); + m && m.leave("}"); } - 1 === this.phase && a._removeFlags(u.Dirty); + 1 === this.phase && a._removeFlags(t.Dirty); }; a.prototype.writeDirtyAssets = function(a) { var c = a._getGraphics(); - c ? this.writeGraphics(c) : (c = a._getTextContent()) ? this.writeTextContent(c) : (c = null, v.Bitmap.isType(a) ? (c = a, c.bitmapData && this.writeBitmapData(c.bitmapData)) : (c = null, h.media.Video.isType(a) && (c = a, c._netStream && this.writeNetStream(c._netStream, c._getContentBounds())))); + c ? this.writeGraphics(c) : (c = a._getTextContent()) ? this.writeTextContent(c) : (c = null, v.Bitmap.isType(a) ? (c = a, c.bitmapData && this.writeBitmapData(c.bitmapData)) : (c = null, k.media.Video.isType(a) && (c = a, c._netStream && this.writeNetStream(c._netStream, c._getContentBounds())))); }; - a.prototype.writeDrawToBitmap = function(a, c, d, e, f, h, k) { + a.prototype.writeDrawToBitmap = function(a, c, d, f, g, h, k) { void 0 === d && (d = null); - void 0 === e && (e = null); void 0 === f && (f = null); + void 0 === g && (g = null); void 0 === h && (h = null); void 0 === k && (k = !1); this.output.writeInt(200); this.output.writeInt(a._id); - p.isType(c) ? this.output.writeInt(134217728 | c._id) : this.output.writeInt(c._id); - a = 0 | (d ? 1 : 0) | (e ? 8 : 0); + u.isType(c) ? this.output.writeInt(134217728 | c._id) : this.output.writeInt(c._id); + a = 0 | (d ? 1 : 0) | (f ? 8 : 0); a |= h ? 16 : 0; this.output.writeInt(a); d && this._writeMatrix(d); - e && this._writeColorTransform(e); - h && this._writeRectangle(t.FromRectangle(h)); - this.output.writeInt(l.toNumber(f)); + f && this._writeColorTransform(f); + h && this._writeRectangle(p.FromRectangle(h)); + this.output.writeInt(l.toNumber(g)); this.output.writeBoolean(k); }; a.prototype._writeMatrix = function(a) { @@ -52317,35 +52370,34 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re this.outputAssets.push(a); }; a.prototype._writeFilters = function(a) { - for (var d = 0, e = 0;e < a.length;e++) { - h.filters.BlurFilter.isType(a[e]) || h.filters.DropShadowFilter.isType(a[e]) || h.filters.GlowFilter.isType(a[e]) ? d++ : c.Debug.somewhatImplemented(a[e].toString()); + for (var c = 0, f = 0;f < a.length;f++) { + k.filters.BlurFilter.isType(a[f]) || k.filters.DropShadowFilter.isType(a[f]) || k.filters.GlowFilter.isType(a[f]) ? c++ : d.Debug.somewhatImplemented(a[f].toString()); } - this.output.writeInt(d); - for (e = 0;e < a.length;e++) { - d = a[e], h.filters.BlurFilter.isType(d) ? (this.output.writeInt(0), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.quality)) : h.filters.DropShadowFilter.isType(d) ? (this.output.writeInt(1), this.output.writeFloat(d.alpha), this.output.writeFloat(d.angle), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.color), this.output.writeFloat(d.distance), this.output.writeBoolean(d.hideObject), this.output.writeBoolean(d.inner), - this.output.writeBoolean(d.knockout), this.output.writeInt(d.quality), this.output.writeFloat(d.strength)) : h.filters.GlowFilter.isType(d) && (this.output.writeInt(1), this.output.writeFloat(d.alpha), this.output.writeFloat(0), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.color), this.output.writeFloat(0), this.output.writeBoolean(!1), this.output.writeBoolean(d.inner), this.output.writeBoolean(d.knockout), this.output.writeInt(d.quality), - this.output.writeFloat(d.strength)); + this.output.writeInt(c); + for (f = 0;f < a.length;f++) { + c = a[f], k.filters.BlurFilter.isType(c) ? (this.output.writeInt(0), this.output.writeFloat(c.blurX), this.output.writeFloat(c.blurY), this.output.writeInt(c.quality)) : k.filters.DropShadowFilter.isType(c) ? (this.output.writeInt(1), this.output.writeFloat(c.alpha), this.output.writeFloat(c.angle), this.output.writeFloat(c.blurX), this.output.writeFloat(c.blurY), this.output.writeInt(c.color), this.output.writeFloat(c.distance), this.output.writeBoolean(c.hideObject), this.output.writeBoolean(c.inner), + this.output.writeBoolean(c.knockout), this.output.writeInt(c.quality), this.output.writeFloat(c.strength)) : k.filters.GlowFilter.isType(c) && (this.output.writeInt(1), this.output.writeFloat(c.alpha), this.output.writeFloat(0), this.output.writeFloat(c.blurX), this.output.writeFloat(c.blurY), this.output.writeInt(c.color), this.output.writeFloat(0), this.output.writeBoolean(!1), this.output.writeBoolean(c.inner), this.output.writeBoolean(c.knockout), this.output.writeInt(c.quality), + this.output.writeFloat(c.strength)); } }; a.prototype._writeColorTransform = function(a) { - var c = this.output, d = a.redMultiplier, e = a.greenMultiplier, f = a.blueMultiplier, h = a.alphaMultiplier, k = a.redOffset, l = a.greenOffset, m = a.blueOffset; + var c = this.output, d = a.redMultiplier, f = a.greenMultiplier, g = a.blueMultiplier, h = a.alphaMultiplier, k = a.redOffset, l = a.greenOffset, m = a.blueOffset; a = a.alphaOffset; - k === l && l === m && m === a && 0 === a && d === e && e === f && 1 === f ? 1 === h ? c.writeInt(0) : (c.writeInt(1), c.writeFloat(h)) : (c.writeInt(2), c.writeFloat(d), c.writeFloat(e), c.writeFloat(f), c.writeFloat(h), c.writeInt(k), c.writeInt(l), c.writeInt(m), c.writeInt(a)); + k === l && l === m && m === a && 0 === a && d === f && f === g && 1 === g ? 1 === h ? c.writeInt(0) : (c.writeInt(1), c.writeFloat(h)) : (c.writeInt(2), c.writeFloat(d), c.writeFloat(f), c.writeFloat(g), c.writeFloat(h), c.writeInt(k), c.writeInt(l), c.writeInt(m), c.writeInt(a)); }; a.prototype.writeRequestBitmapData = function(a) { - k && k.writeLn("Sending BitmapData Request"); + m && m.writeLn("Sending BitmapData Request"); this.output.writeInt(106); this.output.writeInt(a._id); }; return a; }(); - a.PlayerChannelSerializer = f; - f = function() { + a.PlayerChannelSerializer = g; + g = function() { function a() { } a.prototype.read = function() { - var a = this.input.readInt(); - switch(a) { + switch(this.input.readInt()) { case 300: return this._readMouseEvent(); case 301: @@ -52353,41 +52405,41 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re case 302: return this._readFocusEvent(); } - n(!1, "Unknown MessageReader tag: " + a); }; a.prototype._readFocusEvent = function() { return{tag:302, type:this.input.readInt()}; }; a.prototype._readMouseEvent = function() { - var a = this.input, d = a.readInt(), d = c.Remoting.MouseEventNames[d], e = a.readFloat(), f = a.readFloat(), h = a.readInt(), a = a.readInt(); - return{tag:300, type:d, point:new m(e, f), ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4), buttons:h}; + var a = this.input, c = a.readInt(), c = d.Remoting.MouseEventNames[c], f = a.readFloat(), g = a.readFloat(), k = a.readInt(), a = a.readInt(); + return{tag:300, type:c, point:new h(f, g), ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4), buttons:k}; }; a.prototype._readKeyboardEvent = function() { - var a = this.input, d = a.readInt(), d = c.Remoting.KeyboardEventNames[d], e = a.readInt(), f = a.readInt(), h = a.readInt(), a = a.readInt(); - return{tag:301, type:d, keyCode:e, charCode:f, location:h, ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4)}; + var a = this.input, c = a.readInt(), c = d.Remoting.KeyboardEventNames[c], f = a.readInt(), g = a.readInt(), h = a.readInt(), a = a.readInt(); + return{tag:301, type:c, keyCode:f, charCode:g, location:h, ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4)}; }; return a; }(); - a.PlayerChannelDeserializer = f; - })(h.Player || (h.Player = {})); - })(c.Remoting || (c.Remoting = {})); + a.PlayerChannelDeserializer = g; + })(k.Player || (k.Player = {})); + })(d.Remoting || (d.Remoting = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { - var a = c.Debug.assert, s = c.Debug.somewhatImplemented, v = c.AVM2.AS.flash, p = c.ArrayUtilities.DataBuffer, u = c.AVM2.Runtime.AVM2, l = v.events.Event, e = v.display.DisplayObject, m = v.events.EventDispatcher, t = v.display.Loader, q = v.ui.MouseEventDispatcher, n = v.ui.KeyboardEventDispatcher, k = function() { - function f() { +(function(d) { + (function(k) { + var a = d.Debug.somewhatImplemented, r = d.AVM2.AS.flash, v = d.ArrayUtilities.DataBuffer, u = d.AVM2.Runtime.AVM2, t = r.events.Event, l = r.display.DisplayObject, c = r.events.EventDispatcher, h = r.display.Loader, p = r.ui.MouseEventDispatcher, s = r.ui.KeyboardEventDispatcher, m = function() { + function g() { this._framesPlayed = 0; this._videoEventListeners = []; this._pendingPromises = []; this.externalCallback = null; this._lastPumpTime = 0; this._hasFocus = this._isPageVisible = !0; - this._keyboardEventDispatcher = new n; - this._mouseEventDispatcher = new q; - this._writer = new c.IndentingWriter; + this._loaderUrl = this._swfUrl = this._pageUrl = null; + this._keyboardEventDispatcher = new s; + this._mouseEventDispatcher = new p; + this._writer = new d.IndentingWriter; u.instance.globals["Shumway.Player.Utils"] = this; } - f.prototype._getNextAvailablePromiseId = function() { + g.prototype._getNextAvailablePromiseId = function() { for (var a = this._pendingPromises.length, b = 0;b < a;b++) { if (!this._pendingPromises[b]) { return b; @@ -52395,34 +52447,47 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re } return a; }; - Object.defineProperty(f.prototype, "stage", {get:function() { + Object.defineProperty(g.prototype, "stage", {get:function() { return this._stage; }, enumerable:!0, configurable:!0}); - f.prototype.onSendUpdates = function(a, b, c) { + g.prototype.onSendUpdates = function(a, b, c) { throw Error("This method is abstract"); }; - f.prototype._shouldThrottleDownRendering = function() { + g.prototype._shouldThrottleDownRendering = function() { return!this._isPageVisible; }; - f.prototype._shouldThrottleDownFrameExecution = function() { + g.prototype._shouldThrottleDownFrameExecution = function() { return!this._isPageVisible; }; - f.prototype.load = function(d, b) { - a(!this._loader, "Can't load twice."); - this._stage = new v.display.Stage; - var e = this._loaderInfo = (this._loader = v.display.Loader.getRootLoader()).contentLoaderInfo; - c.playAllSymbolsOption.value ? (this._playAllSymbols(), e._allowCodeExecution = !1) : this._enterRootLoadingLoop(); - e = this.createLoaderContext(); + Object.defineProperty(g.prototype, "pageUrl", {get:function() { + return this._pageUrl; + }, set:function(a) { + this._pageUrl = a || null; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(g.prototype, "loaderUrl", {get:function() { + return this._loaderUrl; + }, set:function(a) { + this._loaderUrl = a || null; + }, enumerable:!0, configurable:!0}); + Object.defineProperty(g.prototype, "swfUrl", {get:function() { + return this._swfUrl; + }, enumerable:!0, configurable:!0}); + g.prototype.load = function(a, b) { + this._swfUrl = this._loaderUrl = a; + this._stage = new r.display.Stage; + var c = this._loaderInfo = (this._loader = r.display.Loader.getRootLoader()).contentLoaderInfo; + d.playAllSymbolsOption.value ? (this._playAllSymbols(), c._allowCodeExecution = !1) : this._enterRootLoadingLoop(); + c = this.createLoaderContext(); if (b) { - var f = c.Timeline.BinarySymbol.FromData({id:-1, data:b}), h = f.symbolClass.initializeFrom(f); - f.symbolClass.instanceConstructorNoInitialize.call(h); - this._loader.loadBytes(h, e); + var g = d.Timeline.BinarySymbol.FromData({id:-1, data:b}), h = g.symbolClass.initializeFrom(g); + g.symbolClass.instanceConstructorNoInitialize.call(h); + this._loader.loadBytes(h, c); } else { - this._loader.load(new v.net.URLRequest(d), e); + this._loader.load(new r.net.URLRequest(a), c); } }; - f.prototype.createLoaderContext = function() { - var a = new v.system.LoaderContext; + g.prototype.createLoaderContext = function() { + var a = new r.system.LoaderContext; if (this.movieParams) { var b = {}, c; for (c in this.movieParams) { @@ -52432,21 +52497,21 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re } return a; }; - f.prototype.processUpdates = function(a, b) { - var e = new c.Remoting.Player.PlayerChannelDeserializer; + g.prototype.processUpdates = function(a, b) { + var e = new d.Remoting.Player.PlayerChannelDeserializer; e.input = a; e.inputAssets = b; e = e.read(); switch(e.tag) { case 301: - var f = this._stage.focus ? this._stage.focus : this._stage; - this._keyboardEventDispatcher.target = f; + var g = this._stage.focus ? this._stage.focus : this._stage; + this._keyboardEventDispatcher.target = g; this._keyboardEventDispatcher.dispatchKeyboardEvent(e); break; case 300: this._mouseEventDispatcher.stage = this._stage; - f = this._mouseEventDispatcher.handleMouseEvent(e); - c.traceMouseEventOption.value && (this._writer.writeLn("Mouse Event: type: " + e.type + ", point: " + e.point + ", target: " + f + (f ? ", name: " + f._name : "")), "click" === e.type && f && f.debugTrace()); + g = this._mouseEventDispatcher.handleMouseEvent(e); + d.traceMouseEventOption.value && (this._writer.writeLn("Mouse Event: type: " + e.type + ", point: " + e.point + ", target: " + g + (g ? ", name: " + g._name : "")), "click" === e.type && g && g.debugTrace()); break; case 302: switch(e.type) { @@ -52460,188 +52525,186 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re this._hasFocus = !1; break; case 3: - m.broadcastEventDispatchQueue.dispatchEvent(l.getBroadcastInstance(l.ACTIVATE)), this._hasFocus = !0; + c.broadcastEventDispatchQueue.dispatchEvent(t.getBroadcastInstance(t.ACTIVATE)), this._hasFocus = !0; } ; } }; - f.prototype._pumpDisplayListUpdates = function() { + g.prototype._pumpDisplayListUpdates = function() { this.syncDisplayObject(this._stage); }; - f.prototype.syncDisplayObject = function(a, b) { + g.prototype.syncDisplayObject = function(a, b) { void 0 === b && (b = !0); - var e = new p, f = [], k = new c.Remoting.Player.PlayerChannelSerializer; - k.output = e; - k.outputAssets = f; - v.display.Stage.isType(a) && k.writeStage(a, this._mouseEventDispatcher.currentTarget); - k.begin(a); - k.remoteObjects(); - k.remoteReferences(); - e.writeInt(0); - h.enterTimeline("remoting assets"); - e = this.onSendUpdates(e, f, b); - h.leaveTimeline("remoting assets"); - return e; + var c = new v, g = [], h = new d.Remoting.Player.PlayerChannelSerializer; + h.output = c; + h.outputAssets = g; + r.display.Stage.isType(a) && h.writeStage(a, this._mouseEventDispatcher.currentTarget); + h.begin(a); + h.remoteObjects(); + h.remoteReferences(); + c.writeInt(0); + k.enterTimeline("remoting assets"); + c = this.onSendUpdates(c, g, b); + k.leaveTimeline("remoting assets"); + return c; }; - f.prototype.requestBitmapData = function(a) { - var b = new p, e = [], f = new c.Remoting.Player.PlayerChannelSerializer; - f.output = b; - f.outputAssets = e; - f.writeRequestBitmapData(a); + g.prototype.requestBitmapData = function(a) { + var b = new v, c = [], g = new d.Remoting.Player.PlayerChannelSerializer; + g.output = b; + g.outputAssets = c; + g.writeRequestBitmapData(a); b.writeInt(0); - return this.onSendUpdates(b, e, !1); + return this.onSendUpdates(b, c, !1); }; - f.prototype.drawToBitmap = function(a, b, e, f, k, l, m) { - void 0 === e && (e = null); - void 0 === f && (f = null); - void 0 === k && (k = null); + g.prototype.drawToBitmap = function(a, b, c, g, h, l, m) { + void 0 === c && (c = null); + void 0 === g && (g = null); + void 0 === h && (h = null); void 0 === l && (l = null); void 0 === m && (m = !1); - var n = new p, q = [], s = new c.Remoting.Player.PlayerChannelSerializer; - s.output = n; - s.outputAssets = q; - s.writeBitmapData(a); - v.display.BitmapData.isType(b) ? s.writeBitmapData(b) : (s.begin(b), s.remoteObjects(), s.remoteReferences()); - s.writeDrawToBitmap(a, b, e, f, k, l, m); - n.writeInt(0); - h.enterTimeline("sendUpdates"); - this.onSendUpdates(n, q, !1); - h.leaveTimeline("sendUpdates"); + var p = new v, s = [], t = new d.Remoting.Player.PlayerChannelSerializer; + t.output = p; + t.outputAssets = s; + t.writeBitmapData(a); + r.display.BitmapData.isType(b) ? t.writeBitmapData(b) : (t.begin(b), t.remoteObjects(), t.remoteReferences()); + t.writeDrawToBitmap(a, b, c, g, h, l, m); + p.writeInt(0); + k.enterTimeline("sendUpdates"); + this.onSendUpdates(p, s, !1); + k.leaveTimeline("sendUpdates"); }; - f.prototype.registerEventListener = function(a, b) { + g.prototype.registerEventListener = function(a, b) { this._videoEventListeners[a] = b; }; - f.prototype.notifyVideoControl = function(a, b, c) { + g.prototype.notifyVideoControl = function(a, b, c) { return this.onVideoControl(a, b, c); }; - f.prototype.executeFSCommand = function(a, b) { - switch(a) { + g.prototype.executeFSCommand = function(c, b) { + switch(c) { case "quit": this._leaveEventLoop(); break; default: - s("FSCommand " + a); + a("FSCommand " + c); } - this.onFSCommand(a, b); + this.onFSCommand(c, b); }; - f.prototype.requestRendering = function() { + g.prototype.requestRendering = function() { this._pumpDisplayListUpdates(); }; - f.prototype._pumpUpdates = function() { - if (c.dontSkipFramesOption.value || !(this._shouldThrottleDownRendering() || performance.now() - this._lastPumpTime < 1E3 / c.pumpRateOption.value)) { - h.enterTimeline("pump"), c.pumpEnabledOption.value && (this._pumpDisplayListUpdates(), this._lastPumpTime = performance.now()), h.leaveTimeline("pump"); + g.prototype._pumpUpdates = function() { + if (d.dontSkipFramesOption.value || !(this._shouldThrottleDownRendering() || performance.now() - this._lastPumpTime < 1E3 / d.pumpRateOption.value)) { + k.enterTimeline("pump"), d.pumpEnabledOption.value && (this._pumpDisplayListUpdates(), this._lastPumpTime = performance.now()), k.leaveTimeline("pump"); } }; - f.prototype._leaveSyncLoop = function() { - a(-1 < this._frameTimeout); + g.prototype._leaveSyncLoop = function() { clearInterval(this._frameTimeout); }; - f.prototype._getFrameInterval = function() { - var a = c.frameRateOption.value; + g.prototype._getFrameInterval = function() { + var a = d.frameRateOption.value; 0 > a && (a = this._stage.frameRate); return Math.floor(1E3 / a); }; - f.prototype._enterEventLoop = function() { + g.prototype._enterEventLoop = function() { this._eventLoopIsRunning = !0; this._eventLoopTick = this._eventLoopTick.bind(this); this._eventLoopTick(); }; - f.prototype._enterRootLoadingLoop = function() { + g.prototype._enterRootLoadingLoop = function() { function a() { - var f = e.contentLoaderInfo; - if (f._file) { - var h = b._stage, k = void 0 !== b.defaultStageColor ? b.defaultStageColor : f._file.backgroundColor; - h._loaderInfo = f; + var g = c.contentLoaderInfo; + if (g._file) { + var h = b._stage, k = void 0 !== b.defaultStageColor ? b.defaultStageColor : g._file.backgroundColor; + h._loaderInfo = g; h.align = b.stageAlign || ""; - h.scaleMode = b.stageScale || "showall"; - h.frameRate = f.frameRate; - h.setStageWidth(f.width); - h.setStageHeight(f.height); - h.setStageColor(c.ColorUtilities.RGBAToARGB(k)); + !b.stageScale || 0 > r.display.StageScaleMode.toNumber(b.stageScale) ? h.scaleMode = r.display.StageScaleMode.SHOW_ALL : h.scaleMode = b.stageScale; + h.frameRate = g.frameRate; + h.setStageWidth(g.width); + h.setStageHeight(g.height); + h.setStageColor(d.ColorUtilities.RGBAToARGB(k)); b.displayParameters && b.processDisplayParameters(b.displayParameters); b._enterEventLoop(); } else { setTimeout(a, b._getFrameInterval()); } } - var b = this, e = t.getRootLoader(); - e._setStage(this._stage); + var b = this, c = h.getRootLoader(); + c._setStage(this._stage); a(); }; - f.prototype._eventLoopTick = function() { - var a = !c.playAllSymbolsOption.value, b = c.dontSkipFramesOption.value; + g.prototype._eventLoopTick = function() { + var a = !d.playAllSymbolsOption.value, b = d.dontSkipFramesOption.value; this._frameTimeout = setTimeout(this._eventLoopTick, this._getFrameInterval()); - if (b || !(!c.frameEnabledOption.value && a || this._shouldThrottleDownFrameExecution())) { - e._stage = this._stage; - if (!t.getRootLoader().content && (t.processEvents(), !t.getRootLoader().content)) { + if (b || !(!d.frameEnabledOption.value && a || this._shouldThrottleDownFrameExecution())) { + l._stage = this._stage; + if (!h.getRootLoader().content && (h.processEvents(), !h.getRootLoader().content)) { return; } - for (b = 0;b < c.frameRateMultiplierOption.value;b++) { - h.enterTimeline("eventLoop"); - var f = performance.now(); - e.performFrameNavigation(!0, a); - h.counter.count("performFrameNavigation", 1, performance.now() - f); - t.processEvents(); - h.leaveTimeline("eventLoop"); + for (b = 0;b < d.frameRateMultiplierOption.value;b++) { + k.enterTimeline("eventLoop"); + var c = performance.now(); + l.performFrameNavigation(!0, a); + k.counter.count("performFrameNavigation", 1, performance.now() - c); + h.processEvents(); + k.leaveTimeline("eventLoop"); } this._framesPlayed++; - 0 < c.tracePlayerOption.value && 0 === this._framesPlayed % c.tracePlayerOption.value && this._tracePlayer(); + 0 < d.tracePlayerOption.value && 0 === this._framesPlayed % d.tracePlayerOption.value && this._tracePlayer(); this._stage.render(); this._pumpUpdates(); this.onFrameProcessed(); } }; - f.prototype._tracePlayer = function() { + g.prototype._tracePlayer = function() { var a = this._writer; a.enter("Frame: " + this._framesPlayed); - c.AVM2.counter.traceSorted(a); - c.AVM2.counter.clear(); - c.Player.counter.traceSorted(a); - c.Player.counter.clear(); - a.writeLn("advancableInstances: " + v.display.DisplayObject._advancableInstances.length); + d.AVM2.counter.traceSorted(a); + d.AVM2.counter.clear(); + d.Player.counter.traceSorted(a); + d.Player.counter.clear(); + a.writeLn("advancableInstances: " + r.display.DisplayObject._advancableInstances.length); a.outdent(); }; - f.prototype._leaveEventLoop = function() { - a(this._eventLoopIsRunning); + g.prototype._leaveEventLoop = function() { clearTimeout(this._frameTimeout); this._eventLoopIsRunning = !1; }; - f.prototype._playAllSymbols = function() { - var a = this._stage, b = this._loader, e = this._loaderInfo, f = this; - e.addEventListener(v.events.ProgressEvent.PROGRESS, function z() { - b.content && (e.removeEventListener(v.events.ProgressEvent.PROGRESS, z), f._enterEventLoop()); + g.prototype._playAllSymbols = function() { + var a = this._stage, b = this._loader, c = this._loaderInfo, g = this; + c.addEventListener(r.events.ProgressEvent.PROGRESS, function x() { + b.content && (c.removeEventListener(r.events.ProgressEvent.PROGRESS, x), g._enterEventLoop()); }); - e.addEventListener(v.events.Event.COMPLETE, function() { + c.addEventListener(r.events.Event.COMPLETE, function() { function b() { var l; - 0 < c.playSymbolOption.value ? (l = e.getSymbolById(c.playSymbolOption.value), l instanceof c.Timeline.DisplaySymbol || (l = null)) : (l = h[k++], k === h.length && (k = 0), 0 <= c.playSymbolCountOption.value && k > c.playSymbolCountOption.value && (k = 0)); + 0 < d.playSymbolOption.value ? (l = c.getSymbolById(d.playSymbolOption.value), l instanceof d.Timeline.DisplaySymbol || (l = null)) : (l = h[k++], k === h.length && (k = 0), 0 <= d.playSymbolCountOption.value && k > d.playSymbolCountOption.value && (k = 0)); var m = 1; if (l && 0 < l.id) { - var n = l; - v.display.DisplayObject.reset(); - v.display.MovieClip.reset(); - var p = n.symbolClass.initializeFrom(n); - n.symbolClass.instanceConstructorNoInitialize.call(p); - for (n instanceof v.display.BitmapSymbol && (p = new v.display.Bitmap(p));0 < a.numChildren;) { + var p = l; + r.display.DisplayObject.reset(); + r.display.MovieClip.reset(); + var s = p.symbolClass.initializeFrom(p); + p.symbolClass.instanceConstructorNoInitialize.call(s); + for (p instanceof r.display.BitmapSymbol && (s = new r.display.Bitmap(s));0 < a.numChildren;) { a.removeChildAt(0); } - a.addChild(p); - l instanceof v.display.SpriteSymbol && (m = l.numFrames); + a.addChild(s); + l instanceof r.display.SpriteSymbol && (m = l.numFrames); } - 0 < c.playSymbolFrameDurationOption.value && (m = c.playSymbolFrameDurationOption.value); - setTimeout(b, f._getFrameInterval() * m); + 0 < d.playSymbolFrameDurationOption.value && (m = d.playSymbolFrameDurationOption.value); + setTimeout(b, g._getFrameInterval() * m); } a.setStageWidth(1024); a.setStageHeight(1024); var h = []; - e._dictionary.forEach(function(a, b) { - a instanceof c.Timeline.DisplaySymbol && h.push(a); + c._dictionary.forEach(function(a, b) { + a instanceof d.Timeline.DisplaySymbol && h.push(a); }); var k = 0; - setTimeout(b, f._getFrameInterval()); + setTimeout(b, g._getFrameInterval()); }); }; - f.prototype.processExternalCallback = function(a) { + g.prototype.processExternalCallback = function(a) { if (this.externalCallback) { try { a.result = this.externalCallback(a.functionName, a.args); @@ -52650,36 +52713,35 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re } } }; - f.prototype.processVideoEvent = function(a, b, e) { + g.prototype.processVideoEvent = function(a, b, c) { a = this._videoEventListeners[a]; - c.Debug.assert(a, "Video event listener is not found"); - a(b, e); + d.Debug.assert(a, "Video event listener is not found"); + a(b, c); }; - f.prototype.processDisplayParameters = function(a) { + g.prototype.processDisplayParameters = function(a) { this._stage.setStageContainerSize(a.stageWidth, a.stageHeight, a.pixelRatio); }; - f.prototype.onExternalCommand = function(a) { + g.prototype.onExternalCommand = function(a) { throw Error("This method is abstract"); }; - f.prototype.onFSCommand = function(a, b) { + g.prototype.onFSCommand = function(a, b) { throw Error("This method is abstract"); }; - f.prototype.onVideoControl = function(a, b, c) { + g.prototype.onVideoControl = function(a, b, c) { throw Error("This method is abstract"); }; - f.prototype.onFrameProcessed = function() { + g.prototype.onFrameProcessed = function() { throw Error("This method is abstract"); }; - f.prototype.registerFontOrImage = function(d, b) { - a(d.syncId); - d.resolveAssetPromise = new c.PromiseWrapper; - this.registerFontOrImageImpl(d, b); - "font" === b.type && inFirefox ? d.ready = !0 : d.resolveAssetPromise.then(d.resolveAssetCallback, null); + g.prototype.registerFontOrImage = function(a, b) { + a.resolveAssetPromise = new d.PromiseWrapper; + this.registerFontOrImageImpl(a, b); + "font" === b.type && inFirefox ? a.ready = !0 : a.resolveAssetPromise.then(a.resolveAssetCallback, null); }; - f.prototype.registerFontOrImageImpl = function(a, b) { + g.prototype.registerFontOrImageImpl = function(a, b) { throw Error("This method is abstract"); }; - f.prototype.createExternalInterfaceService = function() { + g.prototype.createExternalInterfaceService = function() { var a, b = this; return{get enabled() { if (void 0 === a) { @@ -52709,52 +52771,51 @@ Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.re return a.result; }}; }; - return f; + return g; }(); - h.Player = k; - })(c.Player || (c.Player = {})); + k.Player = m; + })(d.Player || (d.Player = {})); })(Shumway || (Shumway = {})); -(function(c) { - var h = c.BinaryFileReader, a = c.AVM2.ABC.AbcFile, s = c.AVM2.Runtime.AVM2, v = c.Debug.assert; - c.createAVM2 = function(p, u, l, e, m) { - var t; - v(p); - (new h(p)).readAll(function(p) { - s.initialize(l, e); - t = s.instance; - c.AVM2.AS.linkNatives(t); +(function(d) { + var k = d.BinaryFileReader, a = d.AVM2.ABC.AbcFile, r = d.AVM2.Runtime.AVM2; + d.createAVM2 = function(v, u, t, l, c) { + var h; + (new k(v)).readAll(function(p) { + r.initialize(t, l); + h = r.instance; + d.AVM2.AS.linkNatives(h); console.time("Execute builtin.abc"); - t.builtinsLoaded = !1; - t.systemDomain.executeAbc(new a(new Uint8Array(p), "builtin.abc")); - t.builtinsLoaded = !0; + h.builtinsLoaded = !1; + h.systemDomain.executeAbc(new a(new Uint8Array(p), "builtin.abc")); + h.builtinsLoaded = !0; console.timeEnd("Execute builtin.abc"); - "string" === typeof u ? (new h(u)).readAll(function(c) { - t.systemDomain.executeAbc(new a(new Uint8Array(c), u)); - m(t); - }) : s.isPlayerglobalLoaded() || s.loadPlayerglobal(u.abcs, u.catalog).then(function() { - m(t); + "string" === typeof u ? (new k(u)).readAll(function(d) { + h.systemDomain.executeAbc(new a(new Uint8Array(d), u)); + c(h); + }) : r.isPlayerglobalLoaded() || r.loadPlayerglobal(u.abcs, u.catalog).then(function() { + c(h); }); }); }; })(Shumway || (Shumway = {})); -__extends = this.__extends || function(c, h) { +__extends = this.__extends || function(d, k) { function a() { - this.constructor = c; + this.constructor = d; } - for (var s in h) { - h.hasOwnProperty(s) && (c[s] = h[s]); + for (var r in k) { + k.hasOwnProperty(r) && (d[r] = k[r]); } - a.prototype = h.prototype; - c.prototype = new a; + a.prototype = k.prototype; + d.prototype = new a; }; -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.ArrayUtilities.DataBuffer, v = function(a) { - function u(c, e) { + var k = d.ArrayUtilities.DataBuffer, v = function(a) { + function t(d, c) { a.call(this); - this._window = c; - this._parent = e || c.parent; + this._window = d; + this._parent = c || d.parent; this._window.addEventListener("message", function(a) { this.onWindowMessage(a.data, !0); }.bind(this)); @@ -52762,45 +52823,45 @@ __extends = this.__extends || function(c, h) { this.onWindowMessage(a.detail, !1); }.bind(this)); } - __extends(u, a); - u.prototype.onSendUpdates = function(a, c, m) { - void 0 === m && (m = !0); + __extends(t, a); + t.prototype.onSendUpdates = function(a, c, d) { + void 0 === d && (d = !0); a = a.getBytes(); c = {type:"player", updates:a, assets:c, result:void 0}; a = [a.buffer]; - if (!m) { - return m = this._parent.document.createEvent("CustomEvent"), m.initCustomEvent("syncmessage", !1, !1, c), this._parent.dispatchEvent(m), h.FromPlainObject(c.result); + if (!d) { + return d = this._parent.document.createEvent("CustomEvent"), d.initCustomEvent("syncmessage", !1, !1, c), this._parent.dispatchEvent(d), k.FromPlainObject(c.result); } this._parent.postMessage(c, "*", a); return null; }; - u.prototype.onExternalCommand = function(a) { + t.prototype.onExternalCommand = function(a) { var c = this._parent.document.createEvent("CustomEvent"); c.initCustomEvent("syncmessage", !1, !1, {type:"external", request:a}); this._parent.dispatchEvent(c); }; - u.prototype.onFSCommand = function(a, c) { + t.prototype.onFSCommand = function(a, c) { this._parent.postMessage({type:"fscommand", command:a, args:c}, "*"); }; - u.prototype.onVideoControl = function(a, c, h) { - var p = this._parent.document.createEvent("CustomEvent"); - p.initCustomEvent("syncmessage", !1, !1, {type:"videoControl", id:a, eventType:c, data:h, result:void 0}); - this._parent.dispatchEvent(p); - return p.detail.result; + t.prototype.onVideoControl = function(a, c, d) { + var k = this._parent.document.createEvent("CustomEvent"); + k.initCustomEvent("syncmessage", !1, !1, {type:"videoControl", id:a, eventType:c, data:d, result:void 0}); + this._parent.dispatchEvent(k); + return k.detail.result; }; - u.prototype.onFrameProcessed = function() { + t.prototype.onFrameProcessed = function() { this._parent.postMessage({type:"frame"}, "*"); }; - u.prototype.registerFontOrImageImpl = function(a, c) { - var h = this._parent.document.createEvent("CustomEvent"); - h.initCustomEvent("syncmessage", !1, !1, {type:"registerFontOrImage", syncId:a.syncId, symbolId:a.id, assetType:c.type, data:c, resolve:a.resolveAssetPromise.resolve}); - this._parent.dispatchEvent(h); + t.prototype.registerFontOrImageImpl = function(a, c) { + var d = this._parent.document.createEvent("CustomEvent"); + d.initCustomEvent("syncmessage", !1, !1, {type:"registerFontOrImage", syncId:a.syncId, symbolId:a.id, assetType:c.type, data:c, resolve:a.resolveAssetPromise.resolve}); + this._parent.dispatchEvent(d); }; - u.prototype.onWindowMessage = function(a, e) { + t.prototype.onWindowMessage = function(a, c) { if ("object" === typeof a && null !== a) { switch(a.type) { case "gfx": - var h = c.ArrayUtilities.DataBuffer.FromArrayBuffer(a.updates.buffer); + var h = d.ArrayUtilities.DataBuffer.FromArrayBuffer(a.updates.buffer); this.processUpdates(h, a.assets); break; case "externalCallback": @@ -52813,84 +52874,84 @@ __extends = this.__extends || function(c, h) { this.processDisplayParameters(a.params); break; case "options": - c.Settings.setSettings(a.settings); + d.Settings.setSettings(a.settings); break; case "timeline": switch(a.request) { case "AVM2": if ("clear" === a.cmd) { - c.AVM2.timelineBuffer.reset(); + d.AVM2.timelineBuffer.reset(); break; } - this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.AVM2.timelineBuffer}, "*"); + this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:d.AVM2.timelineBuffer}, "*"); break; case "Player": if ("clear" === a.cmd) { - c.Player.timelineBuffer.reset(); + d.Player.timelineBuffer.reset(); break; } - this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.Player.timelineBuffer}, "*"); + this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:d.Player.timelineBuffer}, "*"); break; case "SWF": if ("clear" === a.cmd) { - c.SWF.timelineBuffer.reset(); + d.SWF.timelineBuffer.reset(); break; } - this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.SWF.timelineBuffer}, "*"); + this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:d.SWF.timelineBuffer}, "*"); } ; } } }; - return u; - }(c.Player.Player); + return t; + }(d.Player.Player); a.WindowPlayer = v; - })(h.Window || (h.Window = {})); - })(c.Player || (c.Player = {})); + })(k.Window || (k.Window = {})); + })(d.Player || (d.Player = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(k) { (function(a) { - var h = c.ArrayUtilities.DataBuffer, v = function(a) { - function u() { + var k = d.ArrayUtilities.DataBuffer, v = function(a) { + function t() { a.call(this); - this._worker = c.Player.Test.FakeSyncWorker.instance; + this._worker = d.Player.Test.FakeSyncWorker.instance; this._worker.addEventListener("message", this._onWorkerMessage.bind(this)); this._worker.addEventListener("syncmessage", this._onSyncWorkerMessage.bind(this)); } - __extends(u, a); - u.prototype.onSendUpdates = function(a, c, m) { - void 0 === m && (m = !0); + __extends(t, a); + t.prototype.onSendUpdates = function(a, c, d) { + void 0 === d && (d = !0); a = a.getBytes(); c = {type:"player", updates:a, assets:c}; a = [a.buffer]; - if (!m) { - return m = this._worker.postSyncMessage(c, a), h.FromPlainObject(m); + if (!d) { + return d = this._worker.postSyncMessage(c, a), k.FromPlainObject(d); } this._worker.postMessage(c, a); return null; }; - u.prototype.onExternalCommand = function(a) { + t.prototype.onExternalCommand = function(a) { this._worker.postSyncMessage({type:"external", command:a}); }; - u.prototype.onFSCommand = function(a, c) { + t.prototype.onFSCommand = function(a, c) { this._worker.postMessage({type:"fscommand", command:a, args:c}); }; - u.prototype.onVideoControl = function(a, c, h) { - return this._worker.postSyncMessage({type:"videoControl", id:a, eventType:c, data:h}); + t.prototype.onVideoControl = function(a, c, d) { + return this._worker.postSyncMessage({type:"videoControl", id:a, eventType:c, data:d}); }; - u.prototype.onFrameProcessed = function() { + t.prototype.onFrameProcessed = function() { this._worker.postMessage({type:"frame"}); }; - u.prototype.registerFontOrImageImpl = function(a, c) { + t.prototype.registerFontOrImageImpl = function(a, c) { return this._worker.postSyncMessage({type:"registerFontOrImage", syncId:a.syncId, symbolId:a.id, assetType:c.type, data:c, resolve:a.resolveAssetPromise.resolve}); }; - u.prototype._onWorkerMessage = function(a) { + t.prototype._onWorkerMessage = function(a) { var c = a.data; if ("object" === typeof c && null !== c) { switch(c.type) { case "gfx": - c = h.FromArrayBuffer(a.data.updates.buffer); + c = k.FromArrayBuffer(a.data.updates.buffer); this.processUpdates(c, a.data.assets); break; case "externalCallback": @@ -52905,19 +52966,19 @@ __extends = this.__extends || function(c, h) { } } }; - u.prototype._onSyncWorkerMessage = function(a) { + t.prototype._onSyncWorkerMessage = function(a) { return this._onWorkerMessage(a); }; - return u; - }(c.Player.Player); + return t; + }(d.Player.Player); a.TestPlayer = v; - })(h.Test || (h.Test = {})); - })(c.Player || (c.Player = {})); + })(k.Test || (k.Test = {})); + })(d.Player || (d.Player = {})); })(Shumway || (Shumway = {})); -(function(c) { - (function(h) { +(function(d) { + (function(d) { (function(a) { - var h = function() { + var d = function() { function a() { this._onmessageListeners = []; this._onsyncmessageListeners = []; @@ -52926,51 +52987,48 @@ __extends = this.__extends || function(c, h) { a._singelton || (a._singelton = new a); return a._singelton; }, enumerable:!0, configurable:!0}); - a.prototype.addEventListener = function(a, h, l) { - c.Debug.assert("syncmessage" === a || "message" === a); - "syncmessage" !== a ? this._onmessageListeners.push(h) : this._onsyncmessageListeners.push(h); + a.prototype.addEventListener = function(a, d, k) { + "syncmessage" !== a ? this._onmessageListeners.push(d) : this._onsyncmessageListeners.push(d); }; - a.prototype.removeEventListener = function(a, c, h) { - "syncmessage" === a ? (a = this._onsyncmessageListeners.indexOf(c), 0 <= a && this._onsyncmessageListeners.splice(a, 1)) : (a = this._onmessageListeners.indexOf(c), 0 <= a && this._onmessageListeners.splice(a, 1)); + a.prototype.removeEventListener = function(a, d, k) { + "syncmessage" === a ? (a = this._onsyncmessageListeners.indexOf(d), 0 <= a && this._onsyncmessageListeners.splice(a, 1)) : (a = this._onmessageListeners.indexOf(d), 0 <= a && this._onmessageListeners.splice(a, 1)); }; - a.prototype.postMessage = function(a, h) { - var l; - this._onmessageListeners.some(function(e) { - var h = {data:a, result:void 0, handled:!1}; + a.prototype.postMessage = function(a, d) { + var k; + this._onmessageListeners.some(function(c) { + var d = {data:a, result:void 0, handled:!1}; try { - if ("function" === typeof e ? e(h) : e.handleEvent(h), !h.handled) { + if ("function" === typeof c ? c(d) : c.handleEvent(d), !d.handled) { return!1; } - } catch (s) { - c.Debug.warning("Failure at postMessage: " + s.message); + } catch (p) { } - l = h.result; + k = d.result; return!0; }); - return l; + return k; }; - a.prototype.postSyncMessage = function(a, h) { - var l; - this._onsyncmessageListeners.some(function(e) { - var h = {data:a, result:void 0, handled:!1}; + a.prototype.postSyncMessage = function(a, d) { + var k; + this._onsyncmessageListeners.some(function(c) { + var d = {data:a, result:void 0, handled:!1}; try { - if ("function" === typeof e ? e(h) : e.handleEvent(h), !h.handled) { + if ("function" === typeof c ? c(d) : c.handleEvent(d), !d.handled) { return!1; } - } catch (s) { - c.Debug.warning("Failure at postSyncMessage: " + s.message); + } catch (p) { } - l = h.result; + k = d.result; return!0; }); - return l; + return k; }; a.WORKER_PATH = "../../src/player/fakechannel.js"; return a; }(); - a.FakeSyncWorker = h; - })(h.Test || (h.Test = {})); - })(c.Player || (c.Player = {})); + a.FakeSyncWorker = d; + })(d.Test || (d.Test = {})); + })(d.Player || (d.Player = {})); })(Shumway || (Shumway = {})); console.timeEnd("Load Player Dependencies"); diff --git a/browser/extensions/shumway/content/version.txt b/browser/extensions/shumway/content/version.txt index 9e3bc8a04a07..b4820457d777 100644 --- a/browser/extensions/shumway/content/version.txt +++ b/browser/extensions/shumway/content/version.txt @@ -1,2 +1,2 @@ -0.9.3693 -217e2e2 +0.9.3775 +a82ac47 diff --git a/browser/extensions/shumway/content/web/viewer.html b/browser/extensions/shumway/content/web/viewer.html index 95fae611b503..0c03147d96dd 100644 --- a/browser/extensions/shumway/content/web/viewer.html +++ b/browser/extensions/shumway/content/web/viewer.html @@ -111,7 +111,7 @@ limitations under the License. - + diff --git a/browser/extensions/shumway/content/web/viewer.js b/browser/extensions/shumway/content/web/viewer.js index dc21281266fd..717c83873fe9 100644 --- a/browser/extensions/shumway/content/web/viewer.js +++ b/browser/extensions/shumway/content/web/viewer.js @@ -161,6 +161,10 @@ function runViewer() { document.getElementById('inspectorMenu').addEventListener('click', showInInspector); document.getElementById('reportMenu').addEventListener('click', reportIssue); document.getElementById('aboutMenu').addEventListener('click', showAbout); + + var version = Shumway.version || ''; + document.getElementById('aboutMenu').label = + document.getElementById('aboutMenu').label.replace('%version%', version); } function showURL() { diff --git a/browser/extensions/shumway/content/web/viewerPlayer.js b/browser/extensions/shumway/content/web/viewerPlayer.js index b199b6797533..36b44428a9f0 100644 --- a/browser/extensions/shumway/content/web/viewerPlayer.js +++ b/browser/extensions/shumway/content/web/viewerPlayer.js @@ -44,7 +44,7 @@ function runSwfPlayer(flashParams) { Shumway.AVM2.Verifier.enabled.value = compilerSettings.verifier; Shumway.createAVM2(builtinPath, viewerPlayerglobalInfo, sysMode, appMode, function (avm2) { - function runSWF(file) { + function runSWF(file, buffer, baseUrl) { var player = new Shumway.Player.Window.WindowPlayer(window, window.parent); player.defaultStageColor = flashParams.bgcolor; player.movieParams = flashParams.movieParams; @@ -54,17 +54,18 @@ function runSwfPlayer(flashParams) { Shumway.ExternalInterfaceService.instance = player.createExternalInterfaceService(); - player.load(file); + player.pageUrl = baseUrl; + player.load(file, buffer); } Shumway.FileLoadingService.instance.setBaseUrl(baseUrl); if (asyncLoading) { - runSWF(movieUrl); + runSWF(movieUrl, undefined, baseUrl); } else { new Shumway.BinaryFileReader(movieUrl).readAll(null, function(buffer, error) { if (!buffer) { throw "Unable to open the file " + movieUrl + ": " + error; } - runSWF(movieUrl, buffer); + runSWF(movieUrl, buffer, baseUrl); }); } }); @@ -127,6 +128,11 @@ function setupServices() { this.onprogress && this.onprogress(args.array, {bytesLoaded: args.loaded, bytesTotal: args.total}); break; } + }, + close: function () { + if (Shumway.FileLoadingService.instance.sessions[sessionId]) { + // TODO send abort + } } }; }, diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 1d1adf7e9f40..d9724291b9fb 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -1808,25 +1808,33 @@ void ContentChild::ProcessingError(Result aCode, const char* aReason) { switch (aCode) { - case MsgDropped: - NS_WARNING("MsgDropped in ContentChild"); - return; - case MsgNotKnown: - NS_RUNTIMEABORT("aborting because of MsgNotKnown"); - case MsgNotAllowed: - NS_RUNTIMEABORT("aborting because of MsgNotAllowed"); - case MsgPayloadError: - NS_RUNTIMEABORT("aborting because of MsgPayloadError"); - case MsgProcessingError: - NS_RUNTIMEABORT("aborting because of MsgProcessingError"); - case MsgRouteError: - NS_RUNTIMEABORT("aborting because of MsgRouteError"); - case MsgValueError: - NS_RUNTIMEABORT("aborting because of MsgValueError"); + case MsgDropped: + NS_WARNING("MsgDropped in ContentChild"); + return; - default: - NS_RUNTIMEABORT("not reached"); + case MsgNotKnown: + case MsgNotAllowed: + case MsgPayloadError: + case MsgProcessingError: + case MsgRouteError: + case MsgValueError: + break; + + default: + NS_RUNTIMEABORT("not reached"); } + +#if defined(MOZ_CRASHREPORTER) && !defined(MOZ_B2G) + if (ManagedPCrashReporterChild().Length() > 0) { + CrashReporterChild* crashReporter = + static_cast(ManagedPCrashReporterChild()[0]); + nsDependentCString reason(aReason); + crashReporter->SendAnnotateCrashReport( + NS_LITERAL_CSTRING("ipc_channel_error"), + reason); + } +#endif + NS_RUNTIMEABORT("Content child abort due to IPC error"); } void diff --git a/dom/messages/SystemMessageInternal.js b/dom/messages/SystemMessageInternal.js index bde7b8926d98..c6305701cb5e 100644 --- a/dom/messages/SystemMessageInternal.js +++ b/dom/messages/SystemMessageInternal.js @@ -497,10 +497,10 @@ SystemMessageInternal.prototype = { return; } - // Return the |msg| of each pending message (drop the |msgID|). + // Return the |msg| of each pending message. let pendingMessages = []; page.pendingMessages.forEach(function(aMessage) { - pendingMessages.push(aMessage.msg); + pendingMessages.push({ msg: aMessage.msg, msgID: aMessage.msgID }); }); // Clear the pending queue for this page. This is OK since we'll store diff --git a/dom/messages/SystemMessageManager.js b/dom/messages/SystemMessageManager.js index 6d86798ecc15..31925e15c12d 100644 --- a/dom/messages/SystemMessageManager.js +++ b/dom/messages/SystemMessageManager.js @@ -267,7 +267,7 @@ SystemMessageManager.prototype = { } let messages = (aMessage.name == "SystemMessageManager:Message") - ? [msg.msg] + ? [{ msg: msg.msg, msgID: msg.msgID }] : msg.msgQueue; // We only dispatch messages when a handler is registered. @@ -285,7 +285,7 @@ SystemMessageManager.prototype = { } messages.forEach(function(aMsg) { - this._dispatchMessage(msg.type, dispatcher, aMsg, msg.msgID); + this._dispatchMessage(msg.type, dispatcher, aMsg.msg, aMsg.msgID); }, this); } else { diff --git a/js/src/asmjs/AsmJSModule.cpp b/js/src/asmjs/AsmJSModule.cpp index da05269127ba..76d8192529c1 100644 --- a/js/src/asmjs/AsmJSModule.cpp +++ b/js/src/asmjs/AsmJSModule.cpp @@ -535,13 +535,13 @@ TryEnablingJit(JSContext *cx, AsmJSModule &module, HandleFunction fun, uint32_t // BaselineScript, so if those checks hold now they must hold at least until // the BaselineScript is discarded and when that happens the FFI exit is // patched back. - if (!types::TypeScript::ThisTypes(script)->hasType(types::Type::UndefinedType())) + if (!TypeScript::ThisTypes(script)->hasType(TypeSet::UndefinedType())) return true; for (uint32_t i = 0; i < fun->nargs(); i++) { - types::StackTypeSet *typeset = types::TypeScript::ArgTypes(script, i); - types::Type type = types::Type::DoubleType(); + StackTypeSet *typeset = TypeScript::ArgTypes(script, i); + TypeSet::Type type = TypeSet::DoubleType(); if (!argv[i].isDouble()) - type = types::Type::PrimitiveType(argv[i].extractNonDoubleType()); + type = TypeSet::PrimitiveType(argv[i].extractNonDoubleType()); if (!typeset->hasType(type)) return true; } diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 1aefb09b067d..c0b088c23b0f 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -21,7 +21,6 @@ #include "vm/Shape-inl.h" using namespace js; -using namespace js::types; using js::frontend::IsIdentifier; using mozilla::ArrayLength; diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp index f573d4022ec5..5bf876f547fa 100644 --- a/js/src/builtin/RegExp.cpp +++ b/js/src/builtin/RegExp.cpp @@ -19,7 +19,6 @@ #include "vm/NativeObject-inl.h" using namespace js; -using namespace js::types; using mozilla::ArrayLength; using mozilla::Maybe; diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp index 827eb1ba72e6..5f76ad7d528e 100644 --- a/js/src/builtin/TypedObject.cpp +++ b/js/src/builtin/TypedObject.cpp @@ -2729,7 +2729,7 @@ js::StoreReference##T::Func(JSContext *cx, unsigned argc, Value *vp) \ int32_t offset = args[1].toInt32(); \ \ jsid id = args[2].isString() \ - ? types::IdToTypeId(AtomToId(&args[2].toString()->asAtom())) \ + ? IdToTypeId(AtomToId(&args[2].toString()->asAtom())) \ : JSID_VOID; \ \ /* Should be guaranteed by the typed objects API: */ \ @@ -2795,8 +2795,8 @@ StoreReferenceHeapValue::store(JSContext *cx, HeapValue *heap, const Value &v, // considered to contain undefined. if (!v.isUndefined()) { if (cx->isJSContext()) - types::AddTypePropertyId(cx->asJSContext(), obj, id, v); - else if (!types::HasTypePropertyId(obj, id, v)) + AddTypePropertyId(cx->asJSContext(), obj, id, v); + else if (!HasTypePropertyId(obj, id, v)) return false; } @@ -2815,8 +2815,8 @@ StoreReferenceHeapPtrObject::store(JSContext *cx, HeapPtrObject *heap, const Val // considered to contain null. if (v.isObject()) { if (cx->isJSContext()) - types::AddTypePropertyId(cx->asJSContext(), obj, id, v); - else if (!types::HasTypePropertyId(obj, id, v)) + AddTypePropertyId(cx->asJSContext(), obj, id, v); + else if (!HasTypePropertyId(obj, id, v)) return false; } diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 78d757e22436..a347e08813a8 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -1902,7 +1902,7 @@ BindNameToSlotHelper(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn) * has no object to stand in the static scope chain, 2. to minimize memory * bloat where a single live function keeps its whole global script * alive.), ScopeCoordinateToTypeSet is not able to find the var/let's - * associated types::TypeSet. + * associated TypeSet. */ if (skip) { BytecodeEmitter *bceSkipped = bce; @@ -3704,7 +3704,7 @@ EmitDestructuringOpsObjectHelper(ExclusiveContext *cx, BytecodeEmitter *bce, Par // used PNK_NUMBER instead, but also watch for ids which TI treats // as indexes for simplification of downstream analysis. jsid id = NameToId(name); - if (id != types::IdToTypeId(id)) { + if (id != IdToTypeId(id)) { if (!EmitTree(cx, bce, key)) // ... OBJ OBJ KEY return false; } else { @@ -6622,7 +6622,7 @@ EmitObject(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn) // used PNK_NUMBER instead, but also watch for ids which TI treats // as indexes for simpliciation of downstream analysis. jsid id = NameToId(key->pn_atom->asPropertyName()); - if (id != types::IdToTypeId(id)) { + if (id != IdToTypeId(id)) { if (!EmitTree(cx, bce, key)) return false; isIndex = true; diff --git a/js/src/frontend/FoldConstants.cpp b/js/src/frontend/FoldConstants.cpp index c78eb62fca72..f6a0cd44fd15 100644 --- a/js/src/frontend/FoldConstants.cpp +++ b/js/src/frontend/FoldConstants.cpp @@ -834,7 +834,7 @@ Fold(ExclusiveContext *cx, ParseNode **pnp, } } - if (name && NameToId(name) == types::IdToTypeId(NameToId(name))) { + if (name && NameToId(name) == IdToTypeId(NameToId(name))) { // Optimization 3: We have pn1["foo"] where foo is not an index. // Convert to a property access (like pn1.foo) which we optimize // better downstream. Don't bother with this for names which TI diff --git a/js/src/gc/GCTrace.cpp b/js/src/gc/GCTrace.cpp index d4ec2e4c655a..ff578d5690ee 100644 --- a/js/src/gc/GCTrace.cpp +++ b/js/src/gc/GCTrace.cpp @@ -17,7 +17,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; JS_STATIC_ASSERT(AllocKinds == FINALIZE_LIMIT); JS_STATIC_ASSERT(LastObjectAllocKind == FINALIZE_OBJECT_LAST); diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index b8e6fd0101b5..b05152c46cde 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -787,18 +787,18 @@ gc::MarkValueRoot(JSTracer *trc, Value *v, const char *name) } void -gc::MarkTypeRoot(JSTracer *trc, types::Type *v, const char *name) +TypeSet::MarkTypeRoot(JSTracer *trc, TypeSet::Type *v, const char *name) { JS_ROOT_MARKING_ASSERT(trc); trc->setTracingName(name); if (v->isSingleton()) { JSObject *obj = v->singleton(); MarkInternal(trc, &obj); - *v = types::Type::ObjectType(obj); + *v = TypeSet::ObjectType(obj); } else if (v->isGroup()) { ObjectGroup *group = v->group(); MarkInternal(trc, &group); - *v = types::Type::ObjectType(group); + *v = TypeSet::ObjectType(group); } } @@ -1426,7 +1426,7 @@ ScanObjectGroup(GCMarker *gcmarker, ObjectGroup *group) { unsigned count = group->getPropertyCount(); for (unsigned i = 0; i < count; i++) { - if (types::Property *prop = group->getProperty(i)) + if (ObjectGroup::Property *prop = group->getProperty(i)) MarkId(gcmarker, &prop->id, "ObjectGroup property id"); } @@ -1454,8 +1454,7 @@ gc::MarkChildren(JSTracer *trc, ObjectGroup *group) { unsigned count = group->getPropertyCount(); for (unsigned i = 0; i < count; i++) { - types::Property *prop = group->getProperty(i); - if (prop) + if (ObjectGroup::Property *prop = group->getProperty(i)) MarkId(trc, &prop->id, "group_property"); } diff --git a/js/src/gc/Marking.h b/js/src/gc/Marking.h index 8255d46aadc3..4d67bc900f32 100644 --- a/js/src/gc/Marking.h +++ b/js/src/gc/Marking.h @@ -37,10 +37,6 @@ struct IonScript; struct VMFunction; } -namespace types { -class Type; -} - namespace gc { /*** Object Marking ***/ @@ -213,9 +209,6 @@ MarkValueRootRange(JSTracer *trc, Value *begin, Value *end, const char *name) MarkValueRootRange(trc, end - begin, begin, name); } -void -MarkTypeRoot(JSTracer *trc, types::Type *v, const char *name); - bool IsValueMarked(Value *v); diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index a9d5c872aabf..a311fa12a14e 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -112,7 +112,7 @@ MarkExactStackRootsAcrossTypes(T context, JSTracer *trc) MarkExactStackRootList(trc, context, "exact-lazy-script"); MarkExactStackRootList(trc, context, "exact-id"); MarkExactStackRootList(trc, context, "exact-value"); - MarkExactStackRootList(trc, context, "types::Type"); + MarkExactStackRootList(trc, context, "TypeSet::Type"); MarkExactStackRootList(trc, context, "Bindings"); MarkExactStackRootList( trc, context, "JSPropertyDescriptor"); diff --git a/js/src/gc/Zone.cpp b/js/src/gc/Zone.cpp index 85c7b87b4d46..f8b799abf25c 100644 --- a/js/src/gc/Zone.cpp +++ b/js/src/gc/Zone.cpp @@ -115,7 +115,7 @@ Zone::beginSweepTypes(FreeOp *fop, bool releaseTypes) if (active) releaseTypes = false; - types::AutoClearTypeInferenceStateOnOOM oom(this); + AutoClearTypeInferenceStateOnOOM oom(this); types.beginSweep(fop, releaseTypes, oom); } diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h index 503efc147e78..0f17dc0f0cb8 100644 --- a/js/src/gc/Zone.h +++ b/js/src/gc/Zone.h @@ -237,7 +237,7 @@ struct Zone : public JS::shadow::Zone, public: js::gc::ArenaLists arenas; - js::types::TypeZone types; + js::TypeZone types; // The set of compartments in this zone. typedef js::Vector CompartmentVector; diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp index c950926e07a4..361fcaca4728 100644 --- a/js/src/jit/BaselineCompiler.cpp +++ b/js/src/jit/BaselineCompiler.cpp @@ -90,7 +90,7 @@ BaselineCompiler::compile() return Method_Error; // Pin analysis info during compilation. - types::AutoEnterAnalysis autoEnterAnalysis(cx); + AutoEnterAnalysis autoEnterAnalysis(cx); MOZ_ASSERT(!script->hasBaselineScript()); @@ -250,7 +250,7 @@ BaselineCompiler::compile() #endif uint32_t *bytecodeMap = baselineScript->bytecodeTypeMap(); - types::FillBytecodeTypeMap(script, bytecodeMap); + FillBytecodeTypeMap(script, bytecodeMap); // The last entry in the last index found, and is used to avoid binary // searches for the sought entry when queries are in linear order. diff --git a/js/src/jit/BaselineDebugModeOSR.cpp b/js/src/jit/BaselineDebugModeOSR.cpp index c3199f0c9343..802e22271990 100644 --- a/js/src/jit/BaselineDebugModeOSR.cpp +++ b/js/src/jit/BaselineDebugModeOSR.cpp @@ -771,7 +771,7 @@ CloneOldBaselineStub(JSContext *cx, DebugModeOSREntryVector &entries, size_t ent static bool InvalidateScriptsInZone(JSContext *cx, Zone *zone, const Vector &entries) { - types::RecompileInfoVector invalid; + RecompileInfoVector invalid; for (UniqueScriptOSREntryIter iter(entries); !iter.done(); ++iter) { JSScript *script = iter.entry().script; if (script->compartment()->zone() != zone) diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 39e68863b2a0..97e466898557 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -1197,12 +1197,12 @@ DoTypeMonitorFallback(JSContext *cx, BaselineFrame *frame, ICTypeMonitor_Fallbac uint32_t argument; if (stub->monitorsThis()) { MOZ_ASSERT(pc == script->code()); - types::TypeScript::SetThis(cx, script, value); + TypeScript::SetThis(cx, script, value); } else if (stub->monitorsArgument(&argument)) { MOZ_ASSERT(pc == script->code()); - types::TypeScript::SetArgument(cx, script, argument, value); + TypeScript::SetArgument(cx, script, argument, value); } else { - types::TypeScript::Monitor(cx, script, pc, value); + TypeScript::Monitor(cx, script, pc, value); } if (!stub->addMonitorStubForValue(cx, script, value)) @@ -1324,12 +1324,12 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO return true; } - types::EnsureTrackPropertyTypes(cx, obj, id); + EnsureTrackPropertyTypes(cx, obj, id); // Make sure that undefined values are explicitly included in the property // types for an object if generating a stub to write an undefined value. - if (val.isUndefined() && types::CanHaveEmptyPropertyTypesForOwnProperty(obj)) - types::AddTypePropertyId(cx, obj, id, val); + if (val.isUndefined() && CanHaveEmptyPropertyTypesForOwnProperty(obj)) + AddTypePropertyId(cx, obj, id, val); if (val.isPrimitive()) { JSValueType type = val.isDouble() ? JSVAL_TYPE_DOUBLE : val.extractNonDoubleType(); @@ -1423,7 +1423,7 @@ DoTypeUpdateFallback(JSContext *cx, BaselineFrame *frame, ICUpdatedStub *stub, H case ICStub::SetElem_DenseAdd: { MOZ_ASSERT(obj->isNative()); id = JSID_VOID; - types::AddTypePropertyId(cx, obj, id, value); + AddTypePropertyId(cx, obj, id, value); break; } case ICStub::SetProp_Native: @@ -1435,7 +1435,7 @@ DoTypeUpdateFallback(JSContext *cx, BaselineFrame *frame, ICUpdatedStub *stub, H id = NameToId(ScopeCoordinateName(cx->runtime()->scopeCoordinateNameCache, script, pc)); else id = NameToId(script->getName(pc)); - types::AddTypePropertyId(cx, obj, id, value); + AddTypePropertyId(cx, obj, id, value); break; } case ICStub::SetProp_TypedObject: { @@ -1448,12 +1448,12 @@ DoTypeUpdateFallback(JSContext *cx, BaselineFrame *frame, ICUpdatedStub *stub, H // and non-object non-null values will cause the stub to fail to // match shortly and we will end up doing the assignment in the VM. if (value.isObject()) - types::AddTypePropertyId(cx, obj, id, value); + AddTypePropertyId(cx, obj, id, value); } else { // Ignore undefined values, which are included implicitly in type // information for this property. if (!value.isUndefined()) - types::AddTypePropertyId(cx, obj, id, value); + AddTypePropertyId(cx, obj, id, value); } break; } @@ -3975,13 +3975,13 @@ DoGetElemFallback(JSContext *cx, BaselineFrame *frame, ICGetElem_Fallback *stub_ if (!GetElemOptimizedArguments(cx, frame, &lhsCopy, rhs, res, &isOptimizedArgs)) return false; if (isOptimizedArgs) - types::TypeScript::Monitor(cx, frame->script(), pc, res); + TypeScript::Monitor(cx, frame->script(), pc, res); } if (!isOptimizedArgs) { if (!GetElementOperation(cx, op, &lhsCopy, rhs, res)) return false; - types::TypeScript::Monitor(cx, frame->script(), pc, res); + TypeScript::Monitor(cx, frame->script(), pc, res); } // Check if debug mode toggling made the stub invalid. @@ -5803,7 +5803,7 @@ TryAttachGlobalNameStub(JSContext *cx, HandleScript script, jsbytecode *pc, // Instantiate this global property, for use during Ion compilation. if (IsIonEnabled(cx)) - types::EnsureTrackPropertyTypes(cx, current, id); + EnsureTrackPropertyTypes(cx, current, id); if (shape->hasDefaultGetter() && shape->hasSlot()) { @@ -6006,7 +6006,7 @@ DoGetNameFallback(JSContext *cx, BaselineFrame *frame, ICGetName_Fallback *stub_ return false; } - types::TypeScript::Monitor(cx, script, pc, res); + TypeScript::Monitor(cx, script, pc, res); // Check if debug mode toggling made the stub invalid. if (stub.invalid()) @@ -6195,7 +6195,7 @@ DoGetIntrinsicFallback(JSContext *cx, BaselineFrame *frame, ICGetIntrinsic_Fallb // needs to be monitored once. Attach a stub to load the resulting constant // directly. - types::TypeScript::Monitor(cx, script, pc, res); + TypeScript::Monitor(cx, script, pc, res); // Check if debug mode toggling made the stub invalid. if (stub.invalid()) @@ -6383,7 +6383,7 @@ HasUnanalyzedNewScript(JSObject *obj) if (obj->isSingleton()) return false; - types::TypeNewScript *newScript = obj->group()->newScript(); + TypeNewScript *newScript = obj->group()->newScript(); if (newScript && !newScript->analyzed()) return true; @@ -6451,7 +6451,7 @@ TryAttachNativeGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc, // Instantiate this property for singleton holders, for use during Ion compilation. if (IsIonEnabled(cx)) - types::EnsureTrackPropertyTypes(cx, holder, NameToId(name)); + EnsureTrackPropertyTypes(cx, holder, NameToId(name)); ICStub::Kind kind; if (obj == holder) @@ -6741,7 +6741,7 @@ TryAttachPrimitiveGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc // Instantiate this property, for use during Ion compilation. RootedId id(cx, NameToId(name)); if (IsIonEnabled(cx)) - types::EnsureTrackPropertyTypes(cx, proto, id); + EnsureTrackPropertyTypes(cx, proto, id); // For now, only look for properties directly set on the prototype. RootedShape shape(cx, proto->lookup(cx, id)); @@ -6869,7 +6869,7 @@ DoGetPropFallback(JSContext *cx, BaselineFrame *frame, ICGetProp_Fallback *stub_ if (!ComputeGetPropResult(cx, frame, op, name, val, res)) return false; - types::TypeScript::Monitor(cx, frame->script(), pc, res); + TypeScript::Monitor(cx, frame->script(), pc, res); // Check if debug mode toggling made the stub invalid. if (stub.invalid()) @@ -8054,8 +8054,8 @@ TryAttachSetValuePropStub(JSContext *cx, HandleScript script, jsbytecode *pc, IC // properties, TI will not mark the property as having been // overwritten. Don't attach a stub in this case, so that we don't // execute another write to the property without TI seeing that write. - types::EnsureTrackPropertyTypes(cx, obj, id); - if (!types::PropertyHasBeenMarkedNonConstant(obj, id)) { + EnsureTrackPropertyTypes(cx, obj, id); + if (!PropertyHasBeenMarkedNonConstant(obj, id)) { *attached = true; return true; } @@ -9327,7 +9327,7 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb // Keep track of the function's |prototype| property in type // information, for use during Ion compilation. if (IsIonEnabled(cx)) - types::EnsureTrackPropertyTypes(cx, fun, NameToId(cx->names().prototype)); + EnsureTrackPropertyTypes(cx, fun, NameToId(cx->names().prototype)); // Remember the template object associated with any script being called // as a constructor, for later use during Ion compilation. @@ -9345,7 +9345,7 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb // stub. After the analysis is performed, CreateThisForFunction may // start returning objects with a different type, and the Ion // compiler might get confused. - types::TypeNewScript *newScript = templateObject->group()->newScript(); + TypeNewScript *newScript = templateObject->group()->newScript(); if (newScript && !newScript->analyzed()) { // Clear the object just created from the preliminary objects // on the TypeNewScript, as it will not be used or filled in by @@ -9573,7 +9573,7 @@ DoCallFallback(JSContext *cx, BaselineFrame *frame, ICCall_Fallback *stub_, uint return false; } - types::TypeScript::Monitor(cx, script, pc, res); + TypeScript::Monitor(cx, script, pc, res); // Check if debug mode toggling made the stub invalid. if (stub.invalid()) @@ -11234,7 +11234,7 @@ DoInstanceOfFallback(JSContext *cx, BaselineFrame *frame, ICInstanceOf_Fallback // For functions, keep track of the |prototype| property in type information, // for use during Ion compilation. - types::EnsureTrackPropertyTypes(cx, obj, NameToId(cx->names().prototype)); + EnsureTrackPropertyTypes(cx, obj, NameToId(cx->names().prototype)); if (stub->numOptimizedStubs() >= ICInstanceOf_Fallback::MAX_OPTIMIZED_STUBS) return true; diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index c4450739e272..a55ea7e9867d 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -3395,7 +3395,7 @@ CodeGenerator::generateArgumentsChecks(bool bailout) for (uint32_t i = info.startArgSlot(); i < info.endArgSlot(); i++) { // All initial parameters are guaranteed to be MParameters. MParameter *param = rp->getOperand(i)->toParameter(); - const types::TypeSet *types = param->resultTypeSet(); + const TypeSet *types = param->resultTypeSet(); if (!types || types->unknown()) continue; @@ -7215,11 +7215,11 @@ CodeGenerator::generate() struct AutoDiscardIonCode { JSContext *cx; - types::RecompileInfo *recompileInfo; + RecompileInfo *recompileInfo; IonScript *ionScript; bool keep; - AutoDiscardIonCode(JSContext *cx, types::RecompileInfo *recompileInfo) + AutoDiscardIonCode(JSContext *cx, RecompileInfo *recompileInfo) : cx(cx), recompileInfo(recompileInfo), ionScript(nullptr), keep(false) {} ~AutoDiscardIonCode() { @@ -7240,7 +7240,7 @@ struct AutoDiscardIonCode }; bool -CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) +CodeGenerator::link(JSContext *cx, CompilerConstraintList *constraints) { RootedScript script(cx, gen->info().script()); OptimizationLevel optimizationLevel = gen->optimizationInfo().level(); @@ -7261,8 +7261,8 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) // Check to make sure we didn't have a mid-build invalidation. If so, we // will trickle to jit::Compile() and return Method_Skipped. uint32_t warmUpCount = script->getWarmUpCount(); - types::RecompileInfo recompileInfo; - if (!types::FinishCompilation(cx, script, constraints, &recompileInfo)) + RecompileInfo recompileInfo; + if (!FinishCompilation(cx, script, constraints, &recompileInfo)) return true; // IonMonkey could have inferred better type information during diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h index 823ae4bbba0f..205d37a719e4 100644 --- a/js/src/jit/CodeGenerator.h +++ b/js/src/jit/CodeGenerator.h @@ -56,7 +56,7 @@ class CodeGenerator : public CodeGeneratorSpecific public: bool generate(); bool generateAsmJS(AsmJSFunctionLabels *labels); - bool link(JSContext *cx, types::CompilerConstraintList *constraints); + bool link(JSContext *cx, CompilerConstraintList *constraints); void visitLabel(LLabel *lir); void visitNop(LNop *lir); diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 455d57e0b4f4..ff3950b6c23a 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -471,7 +471,7 @@ jit::LazyLinkTopActivation(JSContext *cx) IonBuilder *builder = it.script()->ionScript()->pendingBuilder(); it.script()->setPendingIonBuilder(cx, nullptr); - types::AutoEnterAnalysis enterTypes(cx); + AutoEnterAnalysis enterTypes(cx); RootedScript script(cx, builder->script()); // Remove from pending. @@ -749,7 +749,7 @@ IonScript::IonScript() } IonScript * -IonScript::New(JSContext *cx, types::RecompileInfo recompileInfo, +IonScript::New(JSContext *cx, RecompileInfo recompileInfo, uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, @@ -1600,7 +1600,7 @@ AttachFinishedCompilations(JSContext *cx) if (!ion) return; - types::AutoEnterAnalysis enterTypes(cx); + AutoEnterAnalysis enterTypes(cx); AutoLockHelperThreadState lock; GlobalHelperThreadState::IonBuilderVector &finished = HelperThreadState().ionFinishedList(); @@ -1758,7 +1758,7 @@ TrackAllProperties(JSContext *cx, JSObject *obj) MOZ_ASSERT(obj->isSingleton()); for (Shape::Range range(obj->lastProperty()); !range.empty(); range.popFront()) - types::EnsureTrackPropertyTypes(cx, obj, range.front().propid()); + EnsureTrackPropertyTypes(cx, obj, range.front().propid()); } static void @@ -1839,7 +1839,7 @@ IonCompile(JSContext *cx, JSScript *script, JitContext jctx(cx, temp); - types::AutoEnterAnalysis enter(cx); + AutoEnterAnalysis enter(cx); if (!cx->compartment()->ensureJitCompartmentExists(cx)) return AbortReason_Alloc; @@ -1872,7 +1872,7 @@ IonCompile(JSContext *cx, JSScript *script, return AbortReason_Alloc; } - types::CompilerConstraintList *constraints = types::NewCompilerConstraintList(*temp); + CompilerConstraintList *constraints = NewCompilerConstraintList(*temp); if (!constraints) return AbortReason_Alloc; @@ -2645,8 +2645,8 @@ jit::InvalidateAll(FreeOp *fop, Zone *zone) void -jit::Invalidate(types::TypeZone &types, FreeOp *fop, - const types::RecompileInfoVector &invalid, bool resetUses, +jit::Invalidate(TypeZone &types, FreeOp *fop, + const RecompileInfoVector &invalid, bool resetUses, bool cancelOffThread) { JitSpew(JitSpew_IonInvalidate, "Start invalidation."); @@ -2655,7 +2655,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop, // to the traversal which frames have been invalidated. size_t numInvalidations = 0; for (size_t i = 0; i < invalid.length(); i++) { - const types::CompilerOutput *co = invalid[i].compilerOutput(types); + const CompilerOutput *co = invalid[i].compilerOutput(types); if (!co) continue; MOZ_ASSERT(co->isValid()); @@ -2688,7 +2688,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop, // IonScript will be immediately destroyed. Otherwise, it will be held live // until its last invalidated frame is destroyed. for (size_t i = 0; i < invalid.length(); i++) { - types::CompilerOutput *co = invalid[i].compilerOutput(types); + CompilerOutput *co = invalid[i].compilerOutput(types); if (!co) continue; MOZ_ASSERT(co->isValid()); @@ -2716,7 +2716,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop, } void -jit::Invalidate(JSContext *cx, const types::RecompileInfoVector &invalid, bool resetUses, +jit::Invalidate(JSContext *cx, const RecompileInfoVector &invalid, bool resetUses, bool cancelOffThread) { jit::Invalidate(cx->zone()->types, cx->runtime()->defaultFreeOp(), invalid, resetUses, @@ -2727,7 +2727,7 @@ bool jit::IonScript::invalidate(JSContext *cx, bool resetUses, const char *reason) { JitSpew(JitSpew_IonInvalidate, " Invalidate IonScript %p: %s", this, reason); - types::RecompileInfoVector list; + RecompileInfoVector list; if (!list.append(recompileInfo())) return false; Invalidate(cx, list, resetUses, true); @@ -2760,7 +2760,7 @@ jit::Invalidate(JSContext *cx, JSScript *script, bool resetUses, bool cancelOffT js_free(buf); } - types::RecompileInfoVector scripts; + RecompileInfoVector scripts; MOZ_ASSERT(script->hasIonScript()); if (!scripts.append(script->ionScript()->recompileInfo())) return false; @@ -2772,11 +2772,11 @@ jit::Invalidate(JSContext *cx, JSScript *script, bool resetUses, bool cancelOffT static void FinishInvalidationOf(FreeOp *fop, JSScript *script, IonScript *ionScript) { - types::TypeZone &types = script->zone()->types; + TypeZone &types = script->zone()->types; // Note: If the script is about to be swept, the compiler output may have // already been destroyed. - if (types::CompilerOutput *output = ionScript->recompileInfo().compilerOutput(types)) + if (CompilerOutput *output = ionScript->recompileInfo().compilerOutput(types)) output->invalidate(); // If this script has Ion code on the stack, invalidated() will return diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h index f6c2516ecf57..dbfd07c7b986 100644 --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -122,10 +122,10 @@ JitExecStatus IonCannon(JSContext *cx, RunState &state); JitExecStatus FastInvoke(JSContext *cx, HandleFunction fun, CallArgs &args); // Walk the stack and invalidate active Ion frames for the invalid scripts. -void Invalidate(types::TypeZone &types, FreeOp *fop, - const types::RecompileInfoVector &invalid, bool resetUses = true, +void Invalidate(TypeZone &types, FreeOp *fop, + const RecompileInfoVector &invalid, bool resetUses = true, bool cancelOffThread = true); -void Invalidate(JSContext *cx, const types::RecompileInfoVector &invalid, bool resetUses = true, +void Invalidate(JSContext *cx, const RecompileInfoVector &invalid, bool resetUses = true, bool cancelOffThread = true); bool Invalidate(JSContext *cx, JSScript *script, bool resetUses = true, bool cancelOffThread = true); diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index 349564a6d54b..df8d92748f7b 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -2484,8 +2484,8 @@ TryEliminateTypeBarrier(MTypeBarrier *barrier, bool *eliminated) { MOZ_ASSERT(!*eliminated); - const types::TemporaryTypeSet *barrierTypes = barrier->resultTypeSet(); - const types::TemporaryTypeSet *inputTypes = barrier->input()->resultTypeSet(); + const TemporaryTypeSet *barrierTypes = barrier->resultTypeSet(); + const TemporaryTypeSet *inputTypes = barrier->input()->resultTypeSet(); // Disregard the possible unbox added before the Typebarrier. if (barrier->input()->isUnbox() && barrier->input()->toUnbox()->mode() != MUnbox::Fallible) @@ -2494,8 +2494,8 @@ TryEliminateTypeBarrier(MTypeBarrier *barrier, bool *eliminated) if (!barrierTypes || !inputTypes) return true; - bool filtersNull = barrierTypes->filtersType(inputTypes, types::Type::NullType()); - bool filtersUndefined = barrierTypes->filtersType(inputTypes, types::Type::UndefinedType()); + bool filtersNull = barrierTypes->filtersType(inputTypes, TypeSet::NullType()); + bool filtersUndefined = barrierTypes->filtersType(inputTypes, TypeSet::UndefinedType()); if (!filtersNull && !filtersUndefined) return true; @@ -2883,7 +2883,7 @@ static bool AnalyzePoppedThis(JSContext *cx, ObjectGroup *group, MDefinition *thisValue, MInstruction *ins, bool definitelyExecuted, HandlePlainObject baseobj, - Vector *initializerList, + Vector *initializerList, Vector *accessedProperties, bool *phandled) { @@ -2926,7 +2926,7 @@ AnalyzePoppedThis(JSContext *cx, ObjectGroup *group, return true; RootedId id(cx, NameToId(setprop->name())); - if (!types::AddClearDefiniteGetterSetterForPrototypeChain(cx, group, id)) { + if (!AddClearDefiniteGetterSetterForPrototypeChain(cx, group, id)) { // The prototype chain already contains a getter/setter for this // property, or type information is too imprecise. return true; @@ -2952,15 +2952,15 @@ AnalyzePoppedThis(JSContext *cx, ObjectGroup *group, for (int i = callerResumePoints.length() - 1; i >= 0; i--) { MResumePoint *rp = callerResumePoints[i]; JSScript *script = rp->block()->info().script(); - types::TypeNewScript::Initializer entry(types::TypeNewScript::Initializer::SETPROP_FRAME, - script->pcToOffset(rp->pc())); + TypeNewScript::Initializer entry(TypeNewScript::Initializer::SETPROP_FRAME, + script->pcToOffset(rp->pc())); if (!initializerList->append(entry)) return false; } JSScript *script = ins->block()->info().script(); - types::TypeNewScript::Initializer entry(types::TypeNewScript::Initializer::SETPROP, - script->pcToOffset(setprop->resumePoint()->pc())); + TypeNewScript::Initializer entry(TypeNewScript::Initializer::SETPROP, + script->pcToOffset(setprop->resumePoint()->pc())); if (!initializerList->append(entry)) return false; @@ -2986,7 +2986,7 @@ AnalyzePoppedThis(JSContext *cx, ObjectGroup *group, if (!baseobj->lookup(cx, id) && !accessedProperties->append(get->name())) return false; - if (!types::AddClearDefiniteGetterSetterForPrototypeChain(cx, group, id)) { + if (!AddClearDefiniteGetterSetterForPrototypeChain(cx, group, id)) { // The |this| value can escape if any property reads it does go // through a getter. return true; @@ -3014,7 +3014,7 @@ CmpInstructions(const void *a, const void *b) bool jit::AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, ObjectGroup *group, HandlePlainObject baseobj, - Vector *initializerList) + Vector *initializerList) { MOZ_ASSERT(cx->zone()->types.activeAnalysis); @@ -3050,7 +3050,7 @@ jit::AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, return true; } - types::TypeScript::SetThis(cx, script, types::Type::ObjectType(group)); + TypeScript::SetThis(cx, script, TypeSet::ObjectType(group)); MIRGraph graph(&temp); InlineScriptTree *inlineScriptTree = InlineScriptTree::New(&temp, nullptr, nullptr, script); @@ -3065,7 +3065,7 @@ jit::AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, const OptimizationInfo *optimizationInfo = js_IonOptimizations.get(Optimization_Normal); - types::CompilerConstraintList *constraints = types::NewCompilerConstraintList(temp); + CompilerConstraintList *constraints = NewCompilerConstraintList(temp); if (!constraints) { js_ReportOutOfMemory(cx); return false; @@ -3083,7 +3083,7 @@ jit::AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, return true; } - types::FinishDefinitePropertiesAnalysis(cx, constraints); + FinishDefinitePropertiesAnalysis(cx, constraints); if (!SplitCriticalEdges(graph)) return false; @@ -3183,7 +3183,7 @@ jit::AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, if (MResumePoint *rp = block->callerResumePoint()) { if (block->numPredecessors() == 1 && block->getPredecessor(0) == rp->block()) { JSScript *script = rp->block()->info().script(); - if (!types::AddClearDefiniteFunctionUsesInScript(cx, group, script, block->info().script())) + if (!AddClearDefiniteFunctionUsesInScript(cx, group, script, block->info().script())) return false; } } @@ -3234,7 +3234,7 @@ bool jit::AnalyzeArgumentsUsage(JSContext *cx, JSScript *scriptArg) { RootedScript script(cx, scriptArg); - types::AutoEnterAnalysis enter(cx); + AutoEnterAnalysis enter(cx); MOZ_ASSERT(!script->analyzedArgsUsage()); @@ -3293,7 +3293,7 @@ jit::AnalyzeArgumentsUsage(JSContext *cx, JSScript *scriptArg) const OptimizationInfo *optimizationInfo = js_IonOptimizations.get(Optimization_Normal); - types::CompilerConstraintList *constraints = types::NewCompilerConstraintList(temp); + CompilerConstraintList *constraints = NewCompilerConstraintList(temp); if (!constraints) return false; diff --git a/js/src/jit/IonAnalysis.h b/js/src/jit/IonAnalysis.h index 0a4b4bb9f28d..56482dd8b383 100644 --- a/js/src/jit/IonAnalysis.h +++ b/js/src/jit/IonAnalysis.h @@ -171,7 +171,7 @@ ConvertLinearInequality(TempAllocator &alloc, MBasicBlock *block, const LinearSu bool AnalyzeNewScriptDefiniteProperties(JSContext *cx, JSFunction *fun, ObjectGroup *group, HandlePlainObject baseobj, - Vector *initializerList); + Vector *initializerList); bool AnalyzeArgumentsUsage(JSContext *cx, JSScript *script); diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index a35e751ab17a..e9b427023187 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -45,14 +45,14 @@ using JS::TrackedTypeSite; class jit::BaselineFrameInspector { public: - types::Type thisType; + TypeSet::Type thisType; JSObject *singletonScopeChain; - Vector argTypes; - Vector varTypes; + Vector argTypes; + Vector varTypes; explicit BaselineFrameInspector(TempAllocator *temp) - : thisType(types::Type::UndefinedType()), + : thisType(TypeSet::UndefinedType()), singletonScopeChain(nullptr), argTypes(*temp), varTypes(*temp) @@ -72,7 +72,7 @@ jit::NewBaselineFrameInspector(TempAllocator *temp, BaselineFrame *frame, Compil // during compilation could capture nursery pointers, so the values' types // are recorded instead. - inspector->thisType = types::GetMaybeUntrackedValueType(frame->thisValue()); + inspector->thisType = TypeSet::GetMaybeUntrackedValueType(frame->thisValue()); if (frame->scopeChain()->isSingleton()) inspector->singletonScopeChain = frame->scopeChain(); @@ -84,15 +84,17 @@ jit::NewBaselineFrameInspector(TempAllocator *temp, BaselineFrame *frame, Compil return nullptr; for (size_t i = 0; i < frame->numFormalArgs(); i++) { if (script->formalIsAliased(i)) { - inspector->argTypes.infallibleAppend(types::Type::UndefinedType()); + inspector->argTypes.infallibleAppend(TypeSet::UndefinedType()); } else if (!script->argsObjAliasesFormals()) { - types::Type type = types::GetMaybeUntrackedValueType(frame->unaliasedFormal(i)); + TypeSet::Type type = + TypeSet::GetMaybeUntrackedValueType(frame->unaliasedFormal(i)); inspector->argTypes.infallibleAppend(type); } else if (frame->hasArgsObj()) { - types::Type type = types::GetMaybeUntrackedValueType(frame->argsObj().arg(i)); + TypeSet::Type type = + TypeSet::GetMaybeUntrackedValueType(frame->argsObj().arg(i)); inspector->argTypes.infallibleAppend(type); } else { - inspector->argTypes.infallibleAppend(types::Type::UndefinedType()); + inspector->argTypes.infallibleAppend(TypeSet::UndefinedType()); } } } @@ -101,9 +103,9 @@ jit::NewBaselineFrameInspector(TempAllocator *temp, BaselineFrame *frame, Compil return nullptr; for (size_t i = 0; i < frame->script()->nfixed(); i++) { if (info->isSlotAliasedAtOsr(i + info->firstLocalSlot())) { - inspector->varTypes.infallibleAppend(types::Type::UndefinedType()); + inspector->varTypes.infallibleAppend(TypeSet::UndefinedType()); } else { - types::Type type = types::GetMaybeUntrackedValueType(frame->unaliasedLocal(i)); + TypeSet::Type type = TypeSet::GetMaybeUntrackedValueType(frame->unaliasedLocal(i)); inspector->varTypes.infallibleAppend(type); } } @@ -113,7 +115,7 @@ jit::NewBaselineFrameInspector(TempAllocator *temp, BaselineFrame *frame, Compil IonBuilder::IonBuilder(JSContext *analysisContext, CompileCompartment *comp, const JitCompileOptions &options, TempAllocator *temp, - MIRGraph *graph, types::CompilerConstraintList *constraints, + MIRGraph *graph, CompilerConstraintList *constraints, BaselineInspector *inspector, CompileInfo *info, const OptimizationInfo *optimizationInfo, BaselineFrameInspector *baselineFrame, size_t inliningDepth, @@ -323,7 +325,7 @@ IonBuilder::CFGState::TableSwitch(jsbytecode *exitpc, MTableSwitch *ins) } JSFunction * -IonBuilder::getSingleCallTarget(types::TemporaryTypeSet *calleeTypes) +IonBuilder::getSingleCallTarget(TemporaryTypeSet *calleeTypes) { if (!calleeTypes) return nullptr; @@ -336,7 +338,7 @@ IonBuilder::getSingleCallTarget(types::TemporaryTypeSet *calleeTypes) } bool -IonBuilder::getPolyCallTargets(types::TemporaryTypeSet *calleeTypes, bool constructing, +IonBuilder::getPolyCallTargets(TemporaryTypeSet *calleeTypes, bool constructing, ObjectVector &targets, uint32_t maxTargets) { MOZ_ASSERT(targets.empty()); @@ -501,7 +503,7 @@ IonBuilder::canInlineTarget(JSFunction *target, CallInfo &callInfo) return DontInline(inlineScript, "Script is debuggee"); } - types::TypeSetObjectKey *targetKey = types::TypeSetObjectKey::get(target); + TypeSet::ObjectKey *targetKey = TypeSet::ObjectKey::get(target); if (targetKey->unknownProperties()) { trackOptimizationOutcome(TrackedOutcome::CantInlineUnknownProps); return DontInline(inlineScript, "Target type has unknown properties"); @@ -595,7 +597,7 @@ IonBuilder::analyzeNewLoopTypes(MBasicBlock *entry, jsbytecode *start, jsbytecod last = earlier; if (js_CodeSpec[*last].format & JOF_TYPESET) { - types::TemporaryTypeSet *typeSet = bytecodeTypes(last); + TemporaryTypeSet *typeSet = bytecodeTypes(last); if (!typeSet->empty()) { MIRType type = typeSet->getKnownMIRType(); if (!phi->addBackedgeType(type, typeSet)) @@ -717,11 +719,8 @@ IonBuilder::pushLoop(CFGState::State initial, jsbytecode *stopAt, MBasicBlock *e bool IonBuilder::init() { - if (!types::TypeScript::FreezeTypeSets(constraints(), script(), - &thisTypes, &argTypes, &typeArray)) - { + if (!TypeScript::FreezeTypeSets(constraints(), script(), &thisTypes, &argTypes, &typeArray)) return false; - } if (inlineCallInfo_) { // If we're inlining, the actual this/argument types are not necessarily @@ -742,7 +741,7 @@ IonBuilder::init() bytecodeTypeMap = alloc_->lifoAlloc()->newArrayUninitialized(script()->nTypeSets()); if (!bytecodeTypeMap) return false; - types::FillBytecodeTypeMap(script(), bytecodeTypeMap); + FillBytecodeTypeMap(script(), bytecodeTypeMap); } return true; @@ -1032,7 +1031,7 @@ IonBuilder::rewriteParameter(uint32_t slotIdx, MDefinition *param, int32_t argIn { MOZ_ASSERT(param->isParameter() || param->isGetArgumentsObjectArg()); - types::TemporaryTypeSet *types = param->resultTypeSet(); + TemporaryTypeSet *types = param->resultTypeSet(); MDefinition *actual = ensureDefiniteType(param, types->getKnownMIRType()); if (actual == param) return; @@ -1084,7 +1083,7 @@ IonBuilder::initParameters() current->initSlot(info().thisSlot(), param); for (uint32_t i = 0; i < info().nargs(); i++) { - types::TemporaryTypeSet *types = &argTypes[i]; + TemporaryTypeSet *types = &argTypes[i]; if (types->empty() && baselineFrame_ && !script_->baselineScript()->modifiesArguments()) { @@ -1186,7 +1185,7 @@ IonBuilder::initArgumentsObject() bool IonBuilder::addOsrValueTypeBarrier(uint32_t slot, MInstruction **def_, - MIRType type, types::TemporaryTypeSet *typeSet) + MIRType type, TemporaryTypeSet *typeSet) { MInstruction *&def = *def_; MBasicBlock *osrBlock = def->block(); @@ -1206,9 +1205,9 @@ IonBuilder::addOsrValueTypeBarrier(uint32_t slot, MInstruction **def_, { // No unbox instruction will be added below, so check the type by // adding a type barrier for a singleton type set. - types::Type ntype = types::Type::PrimitiveType(ValueTypeFromMIRType(type)); + TypeSet::Type ntype = TypeSet::PrimitiveType(ValueTypeFromMIRType(type)); LifoAlloc *lifoAlloc = alloc().lifoAlloc(); - typeSet = lifoAlloc->new_(lifoAlloc, ntype); + typeSet = lifoAlloc->new_(lifoAlloc, ntype); if (!typeSet) return false; MInstruction *barrier = MTypeBarrier::New(alloc(), def, typeSet); @@ -1315,7 +1314,7 @@ IonBuilder::maybeAddOsrTypeBarriers() MPhi *headerPhi = headerRp->getOperand(slot)->toPhi(); MIRType type = headerPhi->type(); - types::TemporaryTypeSet *typeSet = headerPhi->resultTypeSet(); + TemporaryTypeSet *typeSet = headerPhi->resultTypeSet(); if (!addOsrValueTypeBarrier(slot, &def, type, typeSet)) return false; @@ -3284,7 +3283,7 @@ IonBuilder::tableSwitch(JSOp op, jssrcnote *sn) } bool -IonBuilder::replaceTypeSet(MDefinition *subject, types::TemporaryTypeSet *type, MTest *test) +IonBuilder::replaceTypeSet(MDefinition *subject, TemporaryTypeSet *type, MTest *test) { if (type->unknown()) return true; @@ -3299,8 +3298,8 @@ IonBuilder::replaceTypeSet(MDefinition *subject, types::TemporaryTypeSet *type, if (ins->isFilterTypeSet() && ins->getOperand(0) == subject && ins->dependency() == test) { - types::TemporaryTypeSet *intersect = - types::TypeSet::intersectSets(ins->resultTypeSet(), type, alloc_->lifoAlloc()); + TemporaryTypeSet *intersect = + TypeSet::intersectSets(ins->resultTypeSet(), type, alloc_->lifoAlloc()); if (!intersect) return false; @@ -3446,7 +3445,7 @@ IonBuilder::improveTypesAtCompare(MCompare *ins, bool trueBranch, MTest *test) if (!altersUndefined && !altersNull) return true; - types::TemporaryTypeSet *type; + TemporaryTypeSet *type; // Decide if we need to filter the type or set it. if ((op == JSOP_STRICTEQ || op == JSOP_EQ) ^ trueBranch) { @@ -3457,17 +3456,17 @@ IonBuilder::improveTypesAtCompare(MCompare *ins, bool trueBranch, MTest *test) // Set undefined/null. uint32_t flags = 0; if (altersUndefined) { - flags |= types::TYPE_FLAG_UNDEFINED; + flags |= TYPE_FLAG_UNDEFINED; // If TypeSet emulates undefined, then we cannot filter the objects. if (subject->resultTypeSet()->maybeEmulatesUndefined(constraints())) - flags |= types::TYPE_FLAG_ANYOBJECT; + flags |= TYPE_FLAG_ANYOBJECT; } if (altersNull) - flags |= types::TYPE_FLAG_NULL; + flags |= TYPE_FLAG_NULL; - types::TemporaryTypeSet base(flags, static_cast(nullptr)); - type = types::TypeSet::intersectSets(&base, subject->resultTypeSet(), alloc_->lifoAlloc()); + TemporaryTypeSet base(flags, static_cast(nullptr)); + type = TypeSet::intersectSets(&base, subject->resultTypeSet(), alloc_->lifoAlloc()); } if (!type) @@ -3491,13 +3490,13 @@ IonBuilder::improveTypesAtTest(MDefinition *ins, bool trueBranch, MTest *test) case MDefinition::Op_Not: return improveTypesAtTest(ins->toNot()->getOperand(0), !trueBranch, test); case MDefinition::Op_IsObject: { - types::TemporaryTypeSet *oldType = ins->getOperand(0)->resultTypeSet(); + TemporaryTypeSet *oldType = ins->getOperand(0)->resultTypeSet(); if (!oldType) return true; if (oldType->unknown() || !oldType->mightBeMIRType(MIRType_Object)) return true; - types::TemporaryTypeSet *type = nullptr; + TemporaryTypeSet *type = nullptr; if (trueBranch) type = oldType->cloneObjectsOnly(alloc_->lifoAlloc()); else @@ -3564,8 +3563,8 @@ IonBuilder::improveTypesAtTest(MDefinition *ins, bool trueBranch, MTest *test) if (!ins->resultTypeSet() || ins->resultTypeSet()->unknown()) return true; - types::TemporaryTypeSet *oldType = ins->resultTypeSet(); - types::TemporaryTypeSet *type; + TemporaryTypeSet *oldType = ins->resultTypeSet(); + TemporaryTypeSet *type; // Decide either to set or filter. if (trueBranch) { @@ -3579,24 +3578,24 @@ IonBuilder::improveTypesAtTest(MDefinition *ins, bool trueBranch, MTest *test) } else { // According to the standards, we cannot filter out: Strings, // Int32, Double, Booleans, Objects (if they emulate undefined) - uint32_t flags = types::TYPE_FLAG_PRIMITIVE; + uint32_t flags = TYPE_FLAG_PRIMITIVE; // If the typeset does emulate undefined, then we cannot filter out // objects. if (oldType->maybeEmulatesUndefined(constraints())) - flags |= types::TYPE_FLAG_ANYOBJECT; + flags |= TYPE_FLAG_ANYOBJECT; // Only intersect the typesets if it will generate a more narrow // typeset. The first part takes care of primitives and AnyObject, // while the second line specific (type)objects. - if (!oldType->hasAnyFlag(~flags & types::TYPE_FLAG_BASE_MASK) && + if (!oldType->hasAnyFlag(~flags & TYPE_FLAG_BASE_MASK) && (oldType->maybeEmulatesUndefined(constraints()) || !oldType->maybeObject())) { return true; } - types::TemporaryTypeSet base(flags, static_cast(nullptr)); - type = types::TypeSet::intersectSets(&base, oldType, alloc_->lifoAlloc()); + TemporaryTypeSet base(flags, static_cast(nullptr)); + type = TypeSet::intersectSets(&base, oldType, alloc_->lifoAlloc()); } return replaceTypeSet(ins, type, test); @@ -4451,9 +4450,9 @@ IonBuilder::inlineScriptedCall(CallInfo &callInfo, JSFunction *target) if (callInfo.constructing() && !callInfo.thisArg()->resultTypeSet()) { - types::StackTypeSet *types = types::TypeScript::ThisTypes(calleeScript); + StackTypeSet *types = TypeScript::ThisTypes(calleeScript); if (types && !types->unknown()) { - types::TemporaryTypeSet *clonedTypes = types->clone(alloc_->lifoAlloc()); + TemporaryTypeSet *clonedTypes = types->clone(alloc_->lifoAlloc()); if (!clonedTypes) return oom(); MTypeBarrier *barrier = MTypeBarrier::New(alloc(), callInfo.thisArg(), clonedTypes); @@ -4584,7 +4583,7 @@ MDefinition * IonBuilder::specializeInlinedReturn(MDefinition *rdef, MBasicBlock *exit) { // Remove types from the return definition that weren't observed. - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); // The observed typeset doesn't contain extra information. if (types->empty() || types->unknown()) @@ -4758,7 +4757,7 @@ IonBuilder::makeInliningDecision(JSObject *targetArg, CallInfo &callInfo) } // TI calls ObjectStateChange to trigger invalidation of the caller. - types::TypeSetObjectKey *targetKey = types::TypeSetObjectKey::get(target); + TypeSet::ObjectKey *targetKey = TypeSet::ObjectKey::get(target); targetKey->watchStateChangeForInlinedCall(constraints()); return InliningDecision_Inline; @@ -5234,7 +5233,7 @@ IonBuilder::inlineCalls(CallInfo &callInfo, const ObjectVector &targets, // During inlining the 'this' value is assigned a type set which is // specialized to the groups which can generate that inlining target. // After inlining the original type set is restored. - types::TemporaryTypeSet *cacheObjectTypeSet = + TemporaryTypeSet *cacheObjectTypeSet = maybeCache ? maybeCache->object()->resultTypeSet() : nullptr; // Inline each of the inlineable targets. @@ -5291,7 +5290,7 @@ IonBuilder::inlineCalls(CallInfo &callInfo, const ObjectVector &targets, if (maybeCache) { MOZ_ASSERT(callInfo.thisArg() == maybeCache->object()); - types::TemporaryTypeSet *targetThisTypes = + TemporaryTypeSet *targetThisTypes = maybeCache->propTable()->buildTypeSetForFunction(original); if (!targetThisTypes) return false; @@ -5516,12 +5515,12 @@ IonBuilder::createThisScripted(MDefinition *callee) JSObject * IonBuilder::getSingletonPrototype(JSFunction *target) { - types::TypeSetObjectKey *targetKey = types::TypeSetObjectKey::get(target); + TypeSet::ObjectKey *targetKey = TypeSet::ObjectKey::get(target); if (targetKey->unknownProperties()) return nullptr; jsid protoid = NameToId(names().prototype); - types::HeapTypeSetKey protoProperty = targetKey->property(protoid); + HeapTypeSetKey protoProperty = targetKey->property(protoid); return protoProperty.singleton(constraints()); } @@ -5542,12 +5541,12 @@ IonBuilder::createThisScriptedSingleton(JSFunction *target, MDefinition *callee) if (templateObject->getProto() != proto) return nullptr; - types::TypeSetObjectKey *templateObjectKey = types::TypeSetObjectKey::get(templateObject->group()); + TypeSet::ObjectKey *templateObjectKey = TypeSet::ObjectKey::get(templateObject->group()); if (templateObjectKey->hasFlags(constraints(), OBJECT_FLAG_NEW_SCRIPT_CLEARED)) return nullptr; - types::StackTypeSet *thisTypes = types::TypeScript::ThisTypes(target->nonLazyScript()); - if (!thisTypes || !thisTypes->hasType(types::Type::ObjectType(templateObject))) + StackTypeSet *thisTypes = TypeScript::ThisTypes(target->nonLazyScript()); + if (!thisTypes || !thisTypes->hasType(TypeSet::ObjectType(templateObject))) return nullptr; // Generate an inline path to create a new |this| object with @@ -5604,7 +5603,7 @@ IonBuilder::jsop_funcall(uint32_t argc) int funcDepth = -((int)argc + 1); // If |Function.prototype.call| may be overridden, don't optimize callsite. - types::TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); + TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); JSFunction *native = getSingleCallTarget(calleeTypes); if (!native || !native->isNative() || native->native() != &js_fun_call) { CallInfo callInfo(alloc(), false); @@ -5615,7 +5614,7 @@ IonBuilder::jsop_funcall(uint32_t argc) current->peek(calleeDepth)->setImplicitlyUsedUnchecked(); // Extract call target. - types::TemporaryTypeSet *funTypes = current->peek(funcDepth)->resultTypeSet(); + TemporaryTypeSet *funTypes = current->peek(funcDepth)->resultTypeSet(); JSFunction *target = getSingleCallTarget(funTypes); // Shimmy the slots down to remove the native 'call' function. @@ -5661,7 +5660,7 @@ IonBuilder::jsop_funapply(uint32_t argc) { int calleeDepth = -((int)argc + 2); - types::TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); + TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); JSFunction *native = getSingleCallTarget(calleeTypes); if (argc != 2 || info().analysisMode() == Analysis_ArgumentsUsage) { CallInfo callInfo(alloc(), false); @@ -5711,7 +5710,7 @@ IonBuilder::jsop_funapplyarguments(uint32_t argc) int funcDepth = -((int)argc + 1); // Extract call target. - types::TemporaryTypeSet *funTypes = current->peek(funcDepth)->resultTypeSet(); + TemporaryTypeSet *funTypes = current->peek(funcDepth)->resultTypeSet(); JSFunction *target = getSingleCallTarget(funTypes); // When this script isn't inlined, use MApplyArgs, @@ -5742,7 +5741,7 @@ IonBuilder::jsop_funapplyarguments(uint32_t argc) if (!resumeAfter(apply)) return false; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(apply, types, BarrierKind::TypeSet); } @@ -5799,15 +5798,15 @@ IonBuilder::jsop_call(uint32_t argc, bool constructing) // If this call has never executed, try to seed the observed type set // based on how the call result is used. - types::TemporaryTypeSet *observed = bytecodeTypes(pc); + TemporaryTypeSet *observed = bytecodeTypes(pc); if (observed->empty()) { if (BytecodeFlowsToBitop(pc)) { - observed->addType(types::Type::Int32Type(), alloc_->lifoAlloc()); + observed->addType(TypeSet::Int32Type(), alloc_->lifoAlloc()); } else if (*GetNextPc(pc) == JSOP_POS) { // Note: this is lame, overspecialized on the code patterns used // by asm.js and should be replaced by a more general mechanism. // See bug 870847. - observed->addType(types::Type::DoubleType(), alloc_->lifoAlloc()); + observed->addType(TypeSet::DoubleType(), alloc_->lifoAlloc()); } } @@ -5815,7 +5814,7 @@ IonBuilder::jsop_call(uint32_t argc, bool constructing) // Acquire known call target if existent. ObjectVector originals(alloc()); - types::TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); + TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); if (calleeTypes && !getPolyCallTargets(calleeTypes, constructing, originals, 4)) return false; @@ -5889,8 +5888,7 @@ IonBuilder::makeCallsiteClone(JSFunction *target, MDefinition *fun) } bool -IonBuilder::testShouldDOMCall(types::TypeSet *inTypes, - JSFunction *func, JSJitInfo::OpType opType) +IonBuilder::testShouldDOMCall(TypeSet *inTypes, JSFunction *func, JSJitInfo::OpType opType) { if (IsInsideNursery(func)) return false; @@ -5909,7 +5907,7 @@ IonBuilder::testShouldDOMCall(types::TypeSet *inTypes, return false; for (unsigned i = 0; i < inTypes->getObjectCount(); i++) { - types::TypeSetObjectKey *key = inTypes->getObject(i); + TypeSet::ObjectKey *key = inTypes->getObject(i); if (!key) continue; @@ -5924,7 +5922,7 @@ IonBuilder::testShouldDOMCall(types::TypeSet *inTypes, } static bool -ArgumentTypesMatch(MDefinition *def, types::StackTypeSet *calleeTypes) +ArgumentTypesMatch(MDefinition *def, StackTypeSet *calleeTypes) { if (!calleeTypes) return false; @@ -5954,15 +5952,15 @@ IonBuilder::testNeedsArgumentCheck(JSFunction *target, CallInfo &callInfo) JSScript *targetScript = target->nonLazyScript(); - if (!ArgumentTypesMatch(callInfo.thisArg(), types::TypeScript::ThisTypes(targetScript))) + if (!ArgumentTypesMatch(callInfo.thisArg(), TypeScript::ThisTypes(targetScript))) return true; uint32_t expected_args = Min(callInfo.argc(), target->nargs()); for (size_t i = 0; i < expected_args; i++) { - if (!ArgumentTypesMatch(callInfo.getArg(i), types::TypeScript::ArgTypes(targetScript, i))) + if (!ArgumentTypesMatch(callInfo.getArg(i), TypeScript::ArgTypes(targetScript, i))) return true; } for (size_t i = callInfo.argc(); i < target->nargs(); i++) { - if (!types::TypeScript::ArgTypes(targetScript, i)->mightBeMIRType(MIRType_Undefined)) + if (!TypeScript::ArgTypes(targetScript, i)->mightBeMIRType(MIRType_Undefined)) return true; } @@ -5987,7 +5985,7 @@ IonBuilder::makeCallHelper(JSFunction *target, CallInfo &callInfo, bool cloneAtC // We know we have a single call target. Check whether the "this" types // are DOM types and our function a DOM function, and if so flag the // MCall accordingly. - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); if (thisTypes && thisTypes->getKnownMIRType() == MIRType_Object && thisTypes->isDOMClass(constraints()) && @@ -6051,7 +6049,7 @@ IonBuilder::makeCallHelper(JSFunction *target, CallInfo &callInfo, bool cloneAtC } static bool -DOMCallNeedsBarrier(const JSJitInfo* jitinfo, types::TemporaryTypeSet *types) +DOMCallNeedsBarrier(const JSJitInfo* jitinfo, TemporaryTypeSet *types) { // If the return type of our DOM native is in "types" already, we don't // actually need a barrier. @@ -6083,7 +6081,7 @@ IonBuilder::makeCall(JSFunction *target, CallInfo &callInfo, bool cloneAtCallsit if (call->isEffectful() && !resumeAfter(call)) return false; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); if (call->isCallDOMNative()) return pushDOMTypeBarrier(call, types, call->getSingleTarget()); @@ -6095,7 +6093,7 @@ bool IonBuilder::jsop_eval(uint32_t argc) { int calleeDepth = -((int)argc + 2); - types::TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); + TemporaryTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet(); // Emit a normal call if the eval has never executed. This keeps us from // disabling compilation for the script when testing with --ion-eager. @@ -6138,7 +6136,7 @@ IonBuilder::jsop_eval(uint32_t argc) // ES5 15.1.2.1 step 1. if (!string->mightBeType(MIRType_String)) { current->push(string); - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(string, types, BarrierKind::TypeSet); } @@ -6177,7 +6175,7 @@ IonBuilder::jsop_eval(uint32_t argc) current->add(ins); current->push(ins); - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return resumeAfter(ins) && pushTypeBarrier(ins, types, BarrierKind::TypeSet); } @@ -6237,10 +6235,10 @@ IonBuilder::jsop_newarray(uint32_t count) current->add(ins); current->push(ins); - types::TemporaryTypeSet::DoubleConversion conversion = + TemporaryTypeSet::DoubleConversion conversion = ins->resultTypeSet()->convertDoubleElements(constraints()); - if (conversion == types::TemporaryTypeSet::AlwaysConvertToDoubles) + if (conversion == TemporaryTypeSet::AlwaysConvertToDoubles) templateObject->as().setShouldConvertDoubleElements(); else templateObject->as().clearShouldConvertDoubleElements(); @@ -6324,12 +6322,12 @@ IonBuilder::jsop_initelem_array() if (obj->isUnknownValue()) { needStub = true; } else { - types::TypeSetObjectKey *initializer = obj->resultTypeSet()->getObject(0); + TypeSet::ObjectKey *initializer = obj->resultTypeSet()->getObject(0); if (value->type() == MIRType_MagicHole) { if (!initializer->hasFlags(constraints(), OBJECT_FLAG_NON_PACKED)) needStub = true; } else if (!initializer->unknownProperties()) { - types::HeapTypeSetKey elemTypes = initializer->property(JSID_VOID); + HeapTypeSetKey elemTypes = initializer->property(JSID_VOID); if (!TypeSetIncludes(elemTypes.maybeTypes(), value->type(), value->resultTypeSet())) { elemTypes.freeze(constraints()); needStub = true; @@ -6728,7 +6726,7 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool MPhi *phi = block->getSlot(i)->toPhi(); // Get the type from the baseline frame. - types::Type existingType = types::Type::UndefinedType(); + TypeSet::Type existingType = TypeSet::UndefinedType(); uint32_t arg = i - info().firstArgSlot(); uint32_t var = i - info().firstLocalSlot(); if (info().funMaybeLazy() && i == info().thisSlot()) @@ -6740,8 +6738,8 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool // Extract typeset from value. LifoAlloc *lifoAlloc = alloc().lifoAlloc(); - types::TemporaryTypeSet *typeSet = - lifoAlloc->new_(lifoAlloc, existingType); + TemporaryTypeSet *typeSet = + lifoAlloc->new_(lifoAlloc, existingType); if (!typeSet) return nullptr; MIRType type = typeSet->getKnownMIRType(); @@ -6906,14 +6904,14 @@ IonBuilder::testSingletonProperty(JSObject *obj, PropertyName *name) if (!ClassHasEffectlessLookup(obj->getClass(), name)) return nullptr; - types::TypeSetObjectKey *objKey = types::TypeSetObjectKey::get(obj); + TypeSet::ObjectKey *objKey = TypeSet::ObjectKey::get(obj); if (analysisContext) objKey->ensureTrackedProperty(analysisContext, NameToId(name)); if (objKey->unknownProperties()) return nullptr; - types::HeapTypeSetKey property = objKey->property(NameToId(name)); + HeapTypeSetKey property = objKey->property(NameToId(name)); if (property.isOwnProperty(constraints())) { if (obj->isSingleton()) return property.singleton(constraints()); @@ -6940,7 +6938,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr *testObject = false; *testString = false; - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (types && types->unknownObject()) return false; @@ -6972,7 +6970,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr if (!types) return false; - if (types->hasType(types::Type::StringType())) { + if (types->hasType(TypeSet::StringType())) { key = JSProto_String; *testString = true; break; @@ -6985,7 +6983,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr // find a prototype common to all the objects; if that prototype // has the singleton property, the access will not be on a missing property. for (unsigned i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; if (analysisContext) @@ -6996,7 +6994,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr return false; if (key->unknownProperties()) return false; - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); if (property.isOwnProperty(constraints())) return false; @@ -7025,7 +7023,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr } bool -IonBuilder::pushTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, BarrierKind kind) +IonBuilder::pushTypeBarrier(MDefinition *def, TemporaryTypeSet *observed, BarrierKind kind) { MOZ_ASSERT(def == current->peek(-1)); @@ -7045,7 +7043,7 @@ IonBuilder::pushTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, // value is returned. // (4) Lastly, a type barrier instruction is added and returned. MDefinition * -IonBuilder::addTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, BarrierKind kind, +IonBuilder::addTypeBarrier(MDefinition *def, TemporaryTypeSet *observed, BarrierKind kind, MTypeBarrier **pbarrier) { // Barriers are never needed for instructions whose result will not be used. @@ -7081,7 +7079,7 @@ IonBuilder::addTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, } bool -IonBuilder::pushDOMTypeBarrier(MInstruction *ins, types::TemporaryTypeSet *observed, JSFunction* func) +IonBuilder::pushDOMTypeBarrier(MInstruction *ins, TemporaryTypeSet *observed, JSFunction* func) { MOZ_ASSERT(func && func->isNative() && func->jitInfo()); @@ -7143,7 +7141,7 @@ IonBuilder::ensureDefiniteType(MDefinition *def, MIRType definiteType) } MDefinition * -IonBuilder::ensureDefiniteTypeSet(MDefinition *def, types::TemporaryTypeSet *types) +IonBuilder::ensureDefiniteTypeSet(MDefinition *def, TemporaryTypeSet *types) { // We cannot arbitrarily add a typeset to a definition. It can be shared // in another path. So we always need to create a new MIR. @@ -7212,7 +7210,7 @@ IonBuilder::getStaticName(JSObject *staticObject, PropertyName *name, bool *psuc return true; } - types::TypeSetObjectKey *staticKey = types::TypeSetObjectKey::get(staticObject); + TypeSet::ObjectKey *staticKey = TypeSet::ObjectKey::get(staticObject); if (analysisContext) staticKey->ensureTrackedProperty(analysisContext, NameToId(name)); @@ -7221,7 +7219,7 @@ IonBuilder::getStaticName(JSObject *staticObject, PropertyName *name, bool *psuc return true; } - types::HeapTypeSetKey property = staticKey->property(id); + HeapTypeSetKey property = staticKey->property(id); if (!property.maybeTypes() || !property.maybeTypes()->definiteProperty() || property.nonData(constraints())) @@ -7232,7 +7230,7 @@ IonBuilder::getStaticName(JSObject *staticObject, PropertyName *name, bool *psuc return true; } - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(), staticKey, name, types, /* updateObserved = */ true); @@ -7270,7 +7268,7 @@ IonBuilder::getStaticName(JSObject *staticObject, PropertyName *name, bool *psuc // Whether 'types' includes all possible values represented by input/inputTypes. bool -jit::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *inputTypes) +jit::TypeSetIncludes(TypeSet *types, MIRType input, TypeSet *inputTypes) { if (!types) return inputTypes && inputTypes->empty(); @@ -7285,7 +7283,7 @@ jit::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *input case MIRType_String: case MIRType_Symbol: case MIRType_MagicOptimizedArguments: - return types->hasType(types::Type::PrimitiveType(ValueTypeFromMIRType(input))); + return types->hasType(TypeSet::PrimitiveType(ValueTypeFromMIRType(input))); case MIRType_Object: return types->unknownObject() || (inputTypes && inputTypes->isSubset(types)); @@ -7316,11 +7314,11 @@ IonBuilder::setStaticName(JSObject *staticObject, PropertyName *name) MDefinition *value = current->peek(-1); - types::TypeSetObjectKey *staticKey = types::TypeSetObjectKey::get(staticObject); + TypeSet::ObjectKey *staticKey = TypeSet::ObjectKey::get(staticObject); if (staticKey->unknownProperties()) return jsop_setprop(name); - types::HeapTypeSetKey property = staticKey->property(id); + HeapTypeSetKey property = staticKey->property(id); if (!property.maybeTypes() || !property.maybeTypes()->definiteProperty() || property.nonData(constraints()) || @@ -7365,7 +7363,7 @@ IonBuilder::jsop_getgname(PropertyName *name) if (succeeded) return true; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); MDefinition *globalObj = constant(ObjectValue(*obj)); if (!getPropTryCommonGetter(&succeeded, globalObj, name, types)) return false; @@ -7399,14 +7397,14 @@ IonBuilder::jsop_getname(PropertyName *name) if (!resumeAfter(ins)) return false; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(ins, types, BarrierKind::TypeSet); } bool IonBuilder::jsop_intrinsic(PropertyName *name) { - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); // If we haven't executed this opcode yet, we need to get the intrinsic // value and monitor the result. @@ -7425,7 +7423,7 @@ IonBuilder::jsop_intrinsic(PropertyName *name) // Bake in the intrinsic. Make sure that TI agrees with us on the type. Value vp; JS_ALWAYS_TRUE(script()->global().maybeGetIntrinsicValue(name, &vp)); - MOZ_ASSERT(types->hasType(types::GetValueType(vp))); + MOZ_ASSERT(types->hasType(TypeSet::GetValueType(vp))); pushConstant(vp); return true; @@ -7446,7 +7444,7 @@ IonBuilder::jsop_bindname(PropertyName *name) } static MIRType -GetElemKnownType(bool needsHoleCheck, types::TemporaryTypeSet *types) +GetElemKnownType(bool needsHoleCheck, TemporaryTypeSet *types) { MIRType knownType = types->getKnownMIRType(); @@ -7488,7 +7486,7 @@ IonBuilder::jsop_getelem() if (!resumeAfter(ins)) return false; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(ins, types, BarrierKind::TypeSet); } @@ -7538,7 +7536,7 @@ IonBuilder::jsop_getelem() if (!resumeAfter(ins)) return false; - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(ins, types, BarrierKind::TypeSet); } @@ -7624,7 +7622,7 @@ IonBuilder::checkTypedObjectIndexInBounds(int32_t elemSize, // If we are not loading the length from the object itself, only // optimize if the array buffer can't have been neutered. - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) { trackOptimizationOutcome(TrackedOutcome::TypedObjectNeutered); return false; @@ -7710,8 +7708,8 @@ IonBuilder::pushScalarLoadFromTypedObject(MDefinition *obj, // the array type to determine the result type, even if the opcode has // never executed. The known pushed type is only used to distinguish // uint32 reads that may produce either doubles or integers. - types::TemporaryTypeSet *resultTypes = bytecodeTypes(pc); - bool allowDouble = resultTypes->hasType(types::Type::DoubleType()); + TemporaryTypeSet *resultTypes = bytecodeTypes(pc); + bool allowDouble = resultTypes->hasType(TypeSet::DoubleType()); // Note: knownType is not necessarily in resultTypes; e.g. if we // have only observed integers coming out of float array. @@ -7738,7 +7736,7 @@ IonBuilder::pushReferenceLoadFromTypedObject(MDefinition *typedObj, size_t alignment = ReferenceTypeDescr::alignment(type); loadTypedObjectElements(typedObj, byteOffset, alignment, &elements, &scaledOffset, &adjustment); - types::TemporaryTypeSet *observedTypes = bytecodeTypes(pc); + TemporaryTypeSet *observedTypes = bytecodeTypes(pc); MInstruction *load = nullptr; // initialize to silence GCC warning BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(), @@ -7748,7 +7746,7 @@ IonBuilder::pushReferenceLoadFromTypedObject(MDefinition *typedObj, case ReferenceTypeDescr::TYPE_ANY: { // Make sure the barrier reflects the possibility of reading undefined. bool bailOnUndefined = barrier == BarrierKind::NoBarrier && - !observedTypes->hasType(types::Type::UndefinedType()); + !observedTypes->hasType(TypeSet::UndefinedType()); if (bailOnUndefined) barrier = BarrierKind::TypeTagOnly; load = MLoadElement::New(alloc(), elements, scaledOffset, false, false, adjustment); @@ -7760,7 +7758,7 @@ IonBuilder::pushReferenceLoadFromTypedObject(MDefinition *typedObj, // MLoadUnboxedObjectOrNull, which avoids the need to box the result // for a type barrier instruction. MLoadUnboxedObjectOrNull::NullBehavior nullBehavior; - if (barrier == BarrierKind::NoBarrier && !observedTypes->hasType(types::Type::NullType())) + if (barrier == BarrierKind::NoBarrier && !observedTypes->hasType(TypeSet::NullType())) nullBehavior = MLoadUnboxedObjectOrNull::BailOnNull; else nullBehavior = MLoadUnboxedObjectOrNull::HandleNull; @@ -7770,7 +7768,7 @@ IonBuilder::pushReferenceLoadFromTypedObject(MDefinition *typedObj, } case ReferenceTypeDescr::TYPE_STRING: { load = MLoadUnboxedString::New(alloc(), elements, scaledOffset, adjustment); - observedTypes->addType(types::Type::StringType(), alloc().lifoAlloc()); + observedTypes->addType(TypeSet::StringType(), alloc().lifoAlloc()); break; } } @@ -7834,7 +7832,7 @@ IonBuilder::pushDerivedTypedObject(bool *emitted, // incoming object from which the derived typed object is, well, derived. // The prototype will be determined based on the type descriptor (and is // immutable). - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); const Class *expectedClass = nullptr; if (const Class *objClass = objTypes ? objTypes->getKnownClass(constraints()) : nullptr) { MOZ_ASSERT(IsTypedObjectClass(objClass)); @@ -7845,7 +7843,7 @@ IonBuilder::pushDerivedTypedObject(bool *emitted, // Determine (if possible) the class/proto that the observed type set // describes. - types::TemporaryTypeSet *observedTypes = bytecodeTypes(pc); + TemporaryTypeSet *observedTypes = bytecodeTypes(pc); const Class *observedClass = observedTypes->getKnownClass(constraints()); JSObject *observedProto = observedTypes->getCommonPrototype(constraints()); @@ -7943,7 +7941,7 @@ IonBuilder::getStaticTypedArrayObject(MDefinition *obj, MDefinition *index) return nullptr; } - types::TypeSetObjectKey *tarrKey = types::TypeSetObjectKey::get(tarrObj); + TypeSet::ObjectKey *tarrKey = TypeSet::ObjectKey::get(tarrObj); if (tarrKey->unknownProperties()) { trackOptimizationOutcome(TrackedOutcome::UnknownProperties); return nullptr; @@ -7975,7 +7973,7 @@ IonBuilder::getElemTryTypedStatic(bool *emitted, MDefinition *obj, MDefinition * // Emit LoadTypedArrayElementStatic. if (tarrObj->is()) { - types::TypeSetObjectKey *tarrKey = types::TypeSetObjectKey::get(tarrObj); + TypeSet::ObjectKey *tarrKey = TypeSet::ObjectKey::get(tarrObj); tarrKey->watchStateChangeForTypedArrayData(constraints()); } @@ -8038,7 +8036,7 @@ IonBuilder::getElemTryString(bool *emitted, MDefinition *obj, MDefinition *index // If the index is expected to be out-of-bounds, don't optimize to avoid // frequent bailouts. - if (bytecodeTypes(pc)->hasType(types::Type::UndefinedType())) { + if (bytecodeTypes(pc)->hasType(TypeSet::UndefinedType())) { trackOptimizationOutcome(TrackedOutcome::OutOfBounds); return true; } @@ -8100,7 +8098,7 @@ IonBuilder::getElemTryArguments(bool *emitted, MDefinition *obj, MDefinition *in current->add(load); current->push(load); - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); if (!pushTypeBarrier(load, types, BarrierKind::TypeSet)) return false; @@ -8182,7 +8180,7 @@ IonBuilder::getElemTryCache(bool *emitted, MDefinition *obj, MDefinition *index) // Emit GetElementCache. - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(), obj, nullptr, types); @@ -8219,7 +8217,7 @@ IonBuilder::getElemTryCache(bool *emitted, MDefinition *obj, MDefinition *index) bool IonBuilder::jsop_getelem_dense(MDefinition *obj, MDefinition *index) { - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); MOZ_ASSERT(index->type() == MIRType_Int32 || index->type() == MIRType_Double); if (JSOp(*pc) == JSOP_CALLELEM) { @@ -8237,7 +8235,7 @@ IonBuilder::jsop_getelem_dense(MDefinition *obj, MDefinition *index) // undefined values have been observed at this access site and the access // cannot hit another indexed property on the object or its prototypes. bool readOutOfBounds = - types->hasType(types::Type::UndefinedType()) && + types->hasType(TypeSet::UndefinedType()) && !ElementAccessHasExtraIndexedProperty(constraints(), obj); MIRType knownType = MIRType_Value; @@ -8261,7 +8259,7 @@ IonBuilder::jsop_getelem_dense(MDefinition *obj, MDefinition *index) // If we can load the element as a definite double, make sure to check that // the array has been converted to homogenous doubles first. - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); bool loadDouble = barrier == BarrierKind::NoBarrier && loopDepth_ && @@ -8269,7 +8267,7 @@ IonBuilder::jsop_getelem_dense(MDefinition *obj, MDefinition *index) !needsHoleCheck && knownType == MIRType_Double && objTypes && - objTypes->convertDoubleElements(constraints()) == types::TemporaryTypeSet::AlwaysConvertToDoubles; + objTypes->convertDoubleElements(constraints()) == TemporaryTypeSet::AlwaysConvertToDoubles; if (loadDouble) elements = addConvertElementsToDoubles(elements); @@ -8326,7 +8324,7 @@ IonBuilder::addTypedArrayLengthAndData(MDefinition *obj, if (isTenured && tarr->isSingleton()) { // The 'data' pointer of TypedArrayObject can change in rare circumstances // (ArrayBufferObject::changeContents). - types::TypeSetObjectKey *tarrKey = types::TypeSetObjectKey::get(tarr); + TypeSet::ObjectKey *tarrKey = TypeSet::ObjectKey::get(tarr); if (!tarrKey->unknownProperties()) { if (tarr->is()) tarrKey->watchStateChangeForTypedArrayData(constraints()); @@ -8429,14 +8427,14 @@ bool IonBuilder::jsop_getelem_typed(MDefinition *obj, MDefinition *index, Scalar::Type arrayType) { - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); - bool maybeUndefined = types->hasType(types::Type::UndefinedType()); + bool maybeUndefined = types->hasType(TypeSet::UndefinedType()); // Reading from an Uint32Array will result in a double for values // that don't fit in an int32. We have to bailout if this happens // and the instruction is not known to return a double. - bool allowDouble = types->hasType(types::Type::DoubleType()); + bool allowDouble = types->hasType(TypeSet::DoubleType()); // Ensure id is an integer. MInstruction *idInt32 = MToInt32::New(alloc(), index); @@ -8481,7 +8479,7 @@ IonBuilder::jsop_getelem_typed(MDefinition *obj, MDefinition *index, case Scalar::Uint16: case Scalar::Int32: case Scalar::Uint32: - if (types->hasType(types::Type::Int32Type())) + if (types->hasType(TypeSet::Int32Type())) barrier = BarrierKind::NoBarrier; break; case Scalar::Float32: @@ -8686,7 +8684,7 @@ IonBuilder::setElemTryTypedStatic(bool *emitted, MDefinition *object, // Emit StoreTypedArrayElementStatic. if (tarrObj->is()) { - types::TypeSetObjectKey *tarrKey = types::TypeSetObjectKey::get(tarrObj); + TypeSet::ObjectKey *tarrKey = TypeSet::ObjectKey::get(tarrObj); tarrKey->watchStateChangeForTypedArrayData(constraints()); } @@ -8756,11 +8754,11 @@ IonBuilder::setElemTryDense(bool *emitted, MDefinition *object, return true; } - types::TemporaryTypeSet::DoubleConversion conversion = + TemporaryTypeSet::DoubleConversion conversion = object->resultTypeSet()->convertDoubleElements(constraints()); // If AmbiguousDoubleConversion, only handle int32 values for now. - if (conversion == types::TemporaryTypeSet::AmbiguousDoubleConversion && + if (conversion == TemporaryTypeSet::AmbiguousDoubleConversion && value->type() != MIRType_Int32) { trackOptimizationOutcome(TrackedOutcome::ArrayDoubleConversion); @@ -8858,7 +8856,7 @@ IonBuilder::setElemTryCache(bool *emitted, MDefinition *object, } bool -IonBuilder::jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion conversion, +IonBuilder::jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion, SetElemSafety safety, MDefinition *obj, MDefinition *id, MDefinition *value) { @@ -8887,15 +8885,15 @@ IonBuilder::jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion convers // Ensure the value is a double, if double conversion might be needed. MDefinition *newValue = value; switch (conversion) { - case types::TemporaryTypeSet::AlwaysConvertToDoubles: - case types::TemporaryTypeSet::MaybeConvertToDoubles: { + case TemporaryTypeSet::AlwaysConvertToDoubles: + case TemporaryTypeSet::MaybeConvertToDoubles: { MInstruction *valueDouble = MToDouble::New(alloc(), value); current->add(valueDouble); newValue = valueDouble; break; } - case types::TemporaryTypeSet::AmbiguousDoubleConversion: { + case TemporaryTypeSet::AmbiguousDoubleConversion: { MOZ_ASSERT(value->type() == MIRType_Int32); MInstruction *maybeDouble = MMaybeToDoubleElement::New(alloc(), elements, value); current->add(maybeDouble); @@ -8903,7 +8901,7 @@ IonBuilder::jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion convers break; } - case types::TemporaryTypeSet::DontConvertToDoubles: + case TemporaryTypeSet::DontConvertToDoubles: break; default: @@ -9055,7 +9053,7 @@ IonBuilder::jsop_length() bool IonBuilder::jsop_length_fastPath() { - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); if (types->getKnownMIRType() != MIRType_Int32) return false; @@ -9073,7 +9071,7 @@ IonBuilder::jsop_length_fastPath() } if (obj->mightBeType(MIRType_Object)) { - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); // Compute the length for array objects. if (objTypes && @@ -9094,7 +9092,7 @@ IonBuilder::jsop_length_fastPath() // Compute the length for array typed objects. TypedObjectPrediction prediction = typedObjectPrediction(obj); if (!prediction.isUseless()) { - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return false; @@ -9203,7 +9201,7 @@ IonBuilder::jsop_rest() } uint32_t -IonBuilder::getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name) +IonBuilder::getDefiniteSlot(TemporaryTypeSet *types, PropertyName *name) { if (!types || types->unknownObject()) { trackOptimizationOutcome(TrackedOutcome::NoTypeInfo); @@ -9222,7 +9220,7 @@ IonBuilder::getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name) // objects, which often have a different number of fixed slots from // subsequent objects. for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; @@ -9238,7 +9236,7 @@ IonBuilder::getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name) uint32_t slot = UINT32_MAX; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; @@ -9252,7 +9250,7 @@ IonBuilder::getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name) return UINT32_MAX; } - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); if (!property.maybeTypes() || !property.maybeTypes()->definiteProperty() || property.nonData(constraints())) @@ -9274,7 +9272,7 @@ IonBuilder::getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name) } uint32_t -IonBuilder::getUnboxedOffset(types::TemporaryTypeSet *types, PropertyName *name, JSValueType *punboxedType) +IonBuilder::getUnboxedOffset(TemporaryTypeSet *types, PropertyName *name, JSValueType *punboxedType) { if (!types || types->unknownObject()) { trackOptimizationOutcome(TrackedOutcome::NoTypeInfo); @@ -9284,7 +9282,7 @@ IonBuilder::getUnboxedOffset(types::TemporaryTypeSet *types, PropertyName *name, uint32_t offset = UINT32_MAX; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; @@ -9346,7 +9344,7 @@ IonBuilder::jsop_not() } bool -IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyName *name, +IonBuilder::objectsHaveCommonPrototype(TemporaryTypeSet *types, PropertyName *name, bool isGetter, JSObject *foundProto, bool *guardGlobal) { // With foundProto a prototype with a getter or setter for name, return @@ -9363,7 +9361,7 @@ IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyN if (types->getSingleton(i) == foundProto) continue; - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; @@ -9392,13 +9390,13 @@ IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyN // Test for isOwnProperty() without freezing. If we end up // optimizing, freezePropertiesForCommonPropFunc will freeze the // property type sets later on. - types::HeapTypeSetKey property = key->property(NameToId(name)); - if (types::TypeSet *types = property.maybeTypes()) { + HeapTypeSetKey property = key->property(NameToId(name)); + if (TypeSet *types = property.maybeTypes()) { if (!types->empty() || types->nonDataProperty()) return false; } if (singleton) { - if (types::CanHaveEmptyPropertyTypesForOwnProperty(singleton)) { + if (CanHaveEmptyPropertyTypesForOwnProperty(singleton)) { MOZ_ASSERT(singleton->is()); *guardGlobal = true; } @@ -9412,7 +9410,7 @@ IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyN // object's prototype chain. return false; } - key = types::TypeSetObjectKey::get(proto); + key = TypeSet::ObjectKey::get(proto); } } @@ -9420,7 +9418,7 @@ IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyN } void -IonBuilder::freezePropertiesForCommonPrototype(types::TemporaryTypeSet *types, PropertyName *name, +IonBuilder::freezePropertiesForCommonPrototype(TemporaryTypeSet *types, PropertyName *name, JSObject *foundProto, bool allowEmptyTypesforGlobal/* = false*/) { @@ -9430,12 +9428,12 @@ IonBuilder::freezePropertiesForCommonPrototype(types::TemporaryTypeSet *types, P if (types->getSingleton(i) == foundProto) continue; - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; while (true) { - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); JS_ALWAYS_TRUE(!property.isOwnProperty(constraints(), allowEmptyTypesforGlobal)); // Don't mark the proto. It will be held down by the shape @@ -9443,13 +9441,13 @@ IonBuilder::freezePropertiesForCommonPrototype(types::TemporaryTypeSet *types, P // with properties unknown to TI. if (key->proto() == TaggedProto(foundProto)) break; - key = types::TypeSetObjectKey::get(key->proto().toObjectOrNull()); + key = TypeSet::ObjectKey::get(key->proto().toObjectOrNull()); } } } bool -IonBuilder::testCommonGetterSetter(types::TemporaryTypeSet *types, PropertyName *name, +IonBuilder::testCommonGetterSetter(TemporaryTypeSet *types, PropertyName *name, bool isGetter, JSObject *foundProto, Shape *lastProperty, MDefinition **guard, Shape *globalShape/* = nullptr*/, @@ -9505,8 +9503,8 @@ IonBuilder::replaceMaybeFallbackFunctionGetter(MGetPropertyCache *cache) bool IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPropCache, - types::TemporaryTypeSet *objTypes, - types::TemporaryTypeSet *pushedTypes) + TemporaryTypeSet *objTypes, + TemporaryTypeSet *pushedTypes) { PropertyName *name = getPropCache->name(); @@ -9537,7 +9535,7 @@ IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPro ObjectGroup *group = objTypes->getGroup(i); if (!group) continue; - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(group); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(group); if (key->unknownProperties() || !key->proto().isObject()) continue; @@ -9545,7 +9543,7 @@ IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPro if (!ClassHasEffectlessLookup(clasp, name) || ClassHasResolveHook(compartment, clasp, name)) continue; - types::HeapTypeSetKey ownTypes = key->property(NameToId(name)); + HeapTypeSetKey ownTypes = key->property(NameToId(name)); if (ownTypes.isOwnProperty(constraints())) continue; @@ -9554,7 +9552,7 @@ IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPro continue; // Don't add cases corresponding to non-observed pushes - if (!pushedTypes->hasType(types::Type::ObjectType(singleton))) + if (!pushedTypes->hasType(TypeSet::ObjectType(singleton))) continue; if (!inlinePropTable->addEntry(alloc(), group, &singleton->as())) @@ -9607,7 +9605,7 @@ IonBuilder::invalidatedIdempotentCache() bool IonBuilder::loadSlot(MDefinition *obj, size_t slot, size_t nfixed, MIRType rvalType, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { if (slot < nfixed) { MLoadFixedSlot *load = MLoadFixedSlot::New(alloc(), obj, slot); @@ -9631,7 +9629,7 @@ IonBuilder::loadSlot(MDefinition *obj, size_t slot, size_t nfixed, MIRType rvalT bool IonBuilder::loadSlot(MDefinition *obj, Shape *shape, MIRType rvalType, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { return loadSlot(obj, shape->slot(), shape->numFixedSlots(), rvalType, barrier, types); } @@ -9678,7 +9676,7 @@ IonBuilder::jsop_getprop(PropertyName *name) startTrackingOptimizations(); MDefinition *obj = current->pop(); - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); trackTypeInfo(TrackedTypeSite::Receiver, obj->type(), obj->resultTypeSet()); @@ -9807,12 +9805,12 @@ IonBuilder::checkIsDefinitelyOptimizedArguments(MDefinition *obj, bool *isOptimi bool IonBuilder::getPropTryInferredConstant(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types) + TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); // Need a result typeset to optimize. - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); if (!objTypes) { trackOptimizationOutcome(TrackedOutcome::NoTypeInfo); return true; @@ -9824,13 +9822,13 @@ IonBuilder::getPropTryInferredConstant(bool *emitted, MDefinition *obj, Property return true; } - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(singleton); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(singleton); if (key->unknownProperties()) { trackOptimizationOutcome(TrackedOutcome::UnknownProperties); return true; } - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); Value constantValue = UndefinedValue(); if (property.constant(constraints(), &constantValue)) { @@ -9838,7 +9836,7 @@ IonBuilder::getPropTryInferredConstant(bool *emitted, MDefinition *obj, Property obj->setImplicitlyUsedUnchecked(); if (!pushConstant(constantValue)) return false; - types->addType(types::GetValueType(constantValue), alloc_->lifoAlloc()); + types->addType(TypeSet::GetValueType(constantValue), alloc_->lifoAlloc()); trackOptimizationSuccess(); *emitted = true; } @@ -9903,7 +9901,7 @@ IonBuilder::getPropTryArgumentsCallee(bool *emitted, MDefinition *obj, PropertyN bool IonBuilder::getPropTryConstant(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types) + TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); @@ -9983,7 +9981,7 @@ IonBuilder::getPropTryScalarPropOfTypedObject(bool *emitted, MDefinition *typedO Scalar::Type fieldType = fieldPrediction.scalarType(); // Don't optimize if the typed object might be neutered. - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return true; @@ -10005,7 +10003,7 @@ IonBuilder::getPropTryReferencePropOfTypedObject(bool *emitted, MDefinition *typ { ReferenceTypeDescr::Type fieldType = fieldPrediction.referenceType(); - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return true; @@ -10027,7 +10025,7 @@ IonBuilder::getPropTryComplexPropOfTypedObject(bool *emitted, size_t fieldIndex) { // Don't optimize if the typed object might be neutered. - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return true; @@ -10047,7 +10045,7 @@ IonBuilder::getPropTryComplexPropOfTypedObject(bool *emitted, bool IonBuilder::getPropTryDefiniteSlot(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); @@ -10087,7 +10085,7 @@ IonBuilder::getPropTryDefiniteSlot(bool *emitted, MDefinition *obj, PropertyName MInstruction * IonBuilder::loadUnboxedProperty(MDefinition *obj, size_t offset, JSValueType unboxedType, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { size_t scaledOffsetConstant = offset / UnboxedTypeSize(unboxedType); MInstruction *scaledOffset = MConstant::New(alloc(), Int32Value(scaledOffsetConstant)); @@ -10124,7 +10122,7 @@ IonBuilder::loadUnboxedProperty(MDefinition *obj, size_t offset, JSValueType unb case JSVAL_TYPE_OBJECT: { MLoadUnboxedObjectOrNull::NullBehavior nullBehavior; - if (types->hasType(types::Type::NullType()) || barrier != BarrierKind::NoBarrier) + if (types->hasType(TypeSet::NullType()) || barrier != BarrierKind::NoBarrier) nullBehavior = MLoadUnboxedObjectOrNull::HandleNull; else nullBehavior = MLoadUnboxedObjectOrNull::NullNotPossible; @@ -10143,7 +10141,7 @@ IonBuilder::loadUnboxedProperty(MDefinition *obj, size_t offset, JSValueType unb bool IonBuilder::getPropTryUnboxed(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); @@ -10193,7 +10191,7 @@ IonBuilder::addShapeGuardsForGetterSetter(MDefinition *obj, JSObject *holder, Sh bool IonBuilder::getPropTryCommonGetter(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types) + TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); @@ -10209,7 +10207,7 @@ IonBuilder::getPropTryCommonGetter(bool *emitted, MDefinition *obj, PropertyName return true; } - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); MDefinition *guard = nullptr; MDefinition *globalGuard = nullptr; bool canUseTIForGetter = @@ -10383,7 +10381,7 @@ GetPropertyShapes(jsid id, const BaselineInspector::ShapeVector &shapes, bool IonBuilder::getPropTryInlineAccess(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); @@ -10496,14 +10494,14 @@ IonBuilder::getPropTryInlineAccess(bool *emitted, MDefinition *obj, PropertyName bool IonBuilder::getPropTryCache(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types) + BarrierKind barrier, TemporaryTypeSet *types) { MOZ_ASSERT(*emitted == false); // The input value must either be an object, or we should have strong suspicions // that it can be safely unboxed to an object. if (obj->type() != MIRType_Object) { - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types || !types->objectOrSentinel()) { trackOptimizationOutcome(TrackedOutcome::NoTypeInfo); return true; @@ -10584,7 +10582,7 @@ IonBuilder::tryInnerizeWindow(MDefinition *obj) if (obj->type() != MIRType_Object) return obj; - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types) return obj; @@ -10599,7 +10597,7 @@ IonBuilder::tryInnerizeWindow(MDefinition *obj) // When we navigate, the outer object is brain transplanted and we'll mark // its ObjectGroup as having unknown properties. The type constraint we add // here will invalidate JIT code when this happens. - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(singleton); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(singleton); if (key->hasFlags(constraints(), OBJECT_FLAG_UNKNOWN_PROPERTIES)) return obj; @@ -10609,7 +10607,7 @@ IonBuilder::tryInnerizeWindow(MDefinition *obj) bool IonBuilder::getPropTryInnerize(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types) + TemporaryTypeSet *types) { // See the comment in tryInnerizeWindow for how this works. @@ -10674,7 +10672,7 @@ IonBuilder::jsop_setprop(PropertyName *name) if (!setPropTryTypedObject(&emitted, obj, name, value) || emitted) return emitted; - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); bool barrier = PropertyWriteNeedsTypeBarrier(alloc(), constraints(), current, &obj, name, &value, /* canModify = */ true); @@ -10720,7 +10718,7 @@ IonBuilder::setPropTryCommonSetter(bool *emitted, MDefinition *obj, return true; } - types::TemporaryTypeSet *objTypes = obj->resultTypeSet(); + TemporaryTypeSet *objTypes = obj->resultTypeSet(); MDefinition *guard = nullptr; bool canUseTIForSetter = testCommonGetterSetter(objTypes, name, /* isGetter = */ false, @@ -10813,7 +10811,7 @@ IonBuilder::setPropTryCommonSetter(bool *emitted, MDefinition *obj, bool IonBuilder::setPropTryCommonDOMSetter(bool *emitted, MDefinition *obj, MDefinition *value, JSFunction *setter, - types::TemporaryTypeSet *objTypes) + TemporaryTypeSet *objTypes) { MOZ_ASSERT(*emitted == false); @@ -10878,7 +10876,7 @@ IonBuilder::setPropTryReferencePropOfTypedObject(bool *emitted, { ReferenceTypeDescr::Type fieldType = fieldPrediction.referenceType(); - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return true; @@ -10907,7 +10905,7 @@ IonBuilder::setPropTryScalarPropOfTypedObject(bool *emitted, Scalar::Type fieldType = fieldPrediction.scalarType(); // Don't optimize if the typed object might be neutered. - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED)) return true; @@ -10928,7 +10926,7 @@ IonBuilder::setPropTryScalarPropOfTypedObject(bool *emitted, bool IonBuilder::setPropTryDefiniteSlot(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes) + bool barrier, TemporaryTypeSet *objTypes) { MOZ_ASSERT(*emitted == false); @@ -10943,11 +10941,11 @@ IonBuilder::setPropTryDefiniteSlot(bool *emitted, MDefinition *obj, bool writeBarrier = false; for (size_t i = 0; i < obj->resultTypeSet()->getObjectCount(); i++) { - types::TypeSetObjectKey *key = obj->resultTypeSet()->getObject(i); + TypeSet::ObjectKey *key = obj->resultTypeSet()->getObject(i); if (!key) continue; - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); if (property.nonWritable(constraints())) { trackOptimizationOutcome(TrackedOutcome::NonWritableProperty); return true; @@ -11029,7 +11027,7 @@ IonBuilder::storeUnboxedProperty(MDefinition *obj, size_t offset, JSValueType un bool IonBuilder::setPropTryUnboxed(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes) + bool barrier, TemporaryTypeSet *objTypes) { MOZ_ASSERT(*emitted == false); @@ -11063,7 +11061,7 @@ IonBuilder::setPropTryUnboxed(bool *emitted, MDefinition *obj, bool IonBuilder::setPropTryInlineAccess(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes) + bool barrier, TemporaryTypeSet *objTypes) { MOZ_ASSERT(*emitted == false); @@ -11177,7 +11175,7 @@ IonBuilder::setPropTryInlineAccess(bool *emitted, MDefinition *obj, bool IonBuilder::setPropTryCache(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes) + bool barrier, TemporaryTypeSet *objTypes) { MOZ_ASSERT(*emitted == false); @@ -11239,7 +11237,7 @@ IonBuilder::jsop_regexp(RegExpObject *reobj) // avoid cloning in this case. bool mustClone = true; - types::TypeSetObjectKey *globalKey = types::TypeSetObjectKey::get(&script()->global()); + TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global()); if (!globalKey->hasFlags(constraints(), OBJECT_FLAG_REGEXP_FLAGS_SET)) { #ifdef DEBUG // Only compare the statics if the one on script()->global() has been @@ -11379,7 +11377,7 @@ IonBuilder::jsop_setarg(uint32_t arg) } if (!otherUses) { MOZ_ASSERT(op->resultTypeSet() == &argTypes[arg]); - argTypes[arg].addType(types::Type::UnknownType(), alloc_->lifoAlloc()); + argTypes[arg].addType(TypeSet::UnknownType(), alloc_->lifoAlloc()); if (val->isMul()) { val->setResultType(MIRType_Double); val->toMul()->setSpecialization(MIRType_Double); @@ -11627,8 +11625,8 @@ IonBuilder::hasStaticScopeObject(ScopeCoordinate sc, JSObject **pcall) if (!outerScript || !outerScript->treatAsRunOnce()) return false; - types::TypeSetObjectKey *funKey = - types::TypeSetObjectKey::get(outerScript->functionNonDelazifying()); + TypeSet::ObjectKey *funKey = + TypeSet::ObjectKey::get(outerScript->functionNonDelazifying()); if (funKey->hasFlags(constraints(), OBJECT_FLAG_RUNONCE_INVALIDATED)) return false; @@ -11717,7 +11715,7 @@ IonBuilder::jsop_getaliasedvar(ScopeCoordinate sc) load = getAliasedVar(sc); current->push(load); - types::TemporaryTypeSet *types = bytecodeTypes(pc); + TemporaryTypeSet *types = bytecodeTypes(pc); return pushTypeBarrier(load, types, BarrierKind::TypeSet); } @@ -11830,7 +11828,7 @@ IonBuilder::jsop_in_dense() } static bool -HasOnProtoChain(types::CompilerConstraintList *constraints, types::TypeSetObjectKey *key, +HasOnProtoChain(CompilerConstraintList *constraints, TypeSet::ObjectKey *key, JSObject *protoObject, bool *hasOnProto) { MOZ_ASSERT(protoObject); @@ -11850,7 +11848,7 @@ HasOnProtoChain(types::CompilerConstraintList *constraints, types::TypeSetObject return true; } - key = types::TypeSetObjectKey::get(proto); + key = TypeSet::ObjectKey::get(proto); } MOZ_CRASH("Unreachable"); @@ -11868,7 +11866,7 @@ IonBuilder::tryFoldInstanceOf(MDefinition *lhs, JSObject *protoObject) return true; } - types::TemporaryTypeSet *lhsTypes = lhs->resultTypeSet(); + TemporaryTypeSet *lhsTypes = lhs->resultTypeSet(); if (!lhsTypes || lhsTypes->unknownObject()) return false; @@ -11878,7 +11876,7 @@ IonBuilder::tryFoldInstanceOf(MDefinition *lhs, JSObject *protoObject) bool knownIsInstance = false; for (unsigned i = 0; i < lhsTypes->getObjectCount(); i++) { - types::TypeSetObjectKey *key = lhsTypes->getObject(i); + TypeSet::ObjectKey *key = lhsTypes->getObject(i); if (!key) continue; @@ -11920,16 +11918,16 @@ IonBuilder::jsop_instanceof() // If this is an 'x instanceof function' operation and we can determine the // exact function and prototype object being tested for, use a typed path. do { - types::TemporaryTypeSet *rhsTypes = rhs->resultTypeSet(); + TemporaryTypeSet *rhsTypes = rhs->resultTypeSet(); JSObject *rhsObject = rhsTypes ? rhsTypes->maybeSingleton() : nullptr; if (!rhsObject || !rhsObject->is() || rhsObject->isBoundFunction()) break; - types::TypeSetObjectKey *rhsKey = types::TypeSetObjectKey::get(rhsObject); + TypeSet::ObjectKey *rhsKey = TypeSet::ObjectKey::get(rhsObject); if (rhsKey->unknownProperties()) break; - types::HeapTypeSetKey protoProperty = + HeapTypeSetKey protoProperty = rhsKey->property(NameToId(names().prototype)); JSObject *protoObject = protoProperty.singleton(constraints()); if (!protoObject) @@ -12064,10 +12062,10 @@ IonBuilder::addShapeGuardPolymorphic(MDefinition *obj, const BaselineInspector:: return guard; } -types::TemporaryTypeSet * +TemporaryTypeSet * IonBuilder::bytecodeTypes(jsbytecode *pc) { - return types::TypeScript::BytecodeTypes(script(), pc, bytecodeTypeMap, &typeArrayHint, typeArray); + return TypeScript::BytecodeTypes(script(), pc, bytecodeTypeMap, &typeArrayHint, typeArray); } TypedObjectPrediction @@ -12078,12 +12076,12 @@ IonBuilder::typedObjectPrediction(MDefinition *typedObj) return typedObj->toNewDerivedTypedObject()->prediction(); } - types::TemporaryTypeSet *types = typedObj->resultTypeSet(); + TemporaryTypeSet *types = typedObj->resultTypeSet(); return typedObjectPrediction(types); } TypedObjectPrediction -IonBuilder::typedObjectPrediction(types::TemporaryTypeSet *types) +IonBuilder::typedObjectPrediction(TemporaryTypeSet *types) { // Type set must be known to be an object. if (!types || types->getKnownMIRType() != MIRType_Object) @@ -12096,7 +12094,7 @@ IonBuilder::typedObjectPrediction(types::TemporaryTypeSet *types) TypedObjectPrediction out; for (uint32_t i = 0; i < types->getObjectCount(); i++) { ObjectGroup *group = types->getGroup(i); - if (!group || !types::TypeSetObjectKey::get(group)->hasStableClassAndProto(constraints())) + if (!group || !TypeSet::ObjectKey::get(group)->hasStableClassAndProto(constraints())) return TypedObjectPrediction(); if (!IsTypedObjectClass(group->clasp())) @@ -12177,7 +12175,7 @@ IonBuilder::loadTypedObjectElements(MDefinition *typedObj, if (!ownerByteOffset.add(baseByteOffset)) setForceAbort(); - types::TemporaryTypeSet *ownerTypes = owner->resultTypeSet(); + TemporaryTypeSet *ownerTypes = owner->resultTypeSet(); const Class *clasp = ownerTypes ? ownerTypes->getKnownClass(constraints()) : nullptr; if (clasp && IsInlineTypedObjectClass(clasp)) { // Perform the load directly from the owner pointer. diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h index e71054cc2197..01f54779cb24 100644 --- a/js/src/jit/IonBuilder.h +++ b/js/src/jit/IonBuilder.h @@ -218,7 +218,7 @@ class IonBuilder public: IonBuilder(JSContext *analysisContext, CompileCompartment *comp, const JitCompileOptions &options, TempAllocator *temp, - MIRGraph *graph, types::CompilerConstraintList *constraints, + MIRGraph *graph, CompilerConstraintList *constraints, BaselineInspector *inspector, CompileInfo *info, const OptimizationInfo *optimizationInfo, BaselineFrameInspector *baselineFrame, size_t inliningDepth = 0, uint32_t loopDepth = 0); @@ -240,8 +240,8 @@ class IonBuilder MInstruction *constantMaybeNursery(JSObject *obj); - JSFunction *getSingleCallTarget(types::TemporaryTypeSet *calleeTypes); - bool getPolyCallTargets(types::TemporaryTypeSet *calleeTypes, bool constructing, + JSFunction *getSingleCallTarget(TemporaryTypeSet *calleeTypes); + bool getPolyCallTargets(TemporaryTypeSet *calleeTypes, bool constructing, ObjectVector &targets, uint32_t maxTargets); void popCfgStack(); @@ -318,7 +318,7 @@ class IonBuilder // Incorporates a type/typeSet into an OSR value for a loop, after the loop // body has been processed. bool addOsrValueTypeBarrier(uint32_t slot, MInstruction **def, - MIRType type, types::TemporaryTypeSet *typeSet); + MIRType type, TemporaryTypeSet *typeSet); bool maybeAddOsrTypeBarriers(); // Restarts processing of a loop if the type information at its header was @@ -358,18 +358,18 @@ class IonBuilder bool improveTypesAtCompare(MCompare *ins, bool trueBranch, MTest *test); // Used to detect triangular structure at test. bool detectAndOrStructure(MPhi *ins, bool *branchIsTrue); - bool replaceTypeSet(MDefinition *subject, types::TemporaryTypeSet *type, MTest *test); + bool replaceTypeSet(MDefinition *subject, TemporaryTypeSet *type, MTest *test); // Add a guard which ensure that the set of type which goes through this // generated code correspond to the observed types for the bytecode. - MDefinition *addTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, + MDefinition *addTypeBarrier(MDefinition *def, TemporaryTypeSet *observed, BarrierKind kind, MTypeBarrier **pbarrier = nullptr); - bool pushTypeBarrier(MDefinition *def, types::TemporaryTypeSet *observed, BarrierKind kind); + bool pushTypeBarrier(MDefinition *def, TemporaryTypeSet *observed, BarrierKind kind); // As pushTypeBarrier, but will compute the needBarrier boolean itself based // on observed and the JSFunction that we're planning to call. The // JSFunction must be a DOM method or getter. - bool pushDOMTypeBarrier(MInstruction *ins, types::TemporaryTypeSet *observed, JSFunction* func); + bool pushDOMTypeBarrier(MInstruction *ins, TemporaryTypeSet *observed, JSFunction* func); // If definiteType is not known or def already has the right type, just // returns def. Otherwise, returns an MInstruction that has that definite @@ -378,7 +378,7 @@ class IonBuilder MDefinition *ensureDefiniteType(MDefinition* def, MIRType definiteType); // Creates a MDefinition based on the given def improved with type as TypeSet. - MDefinition *ensureDefiniteTypeSet(MDefinition* def, types::TemporaryTypeSet *types); + MDefinition *ensureDefiniteTypeSet(MDefinition* def, TemporaryTypeSet *types); JSObject *getSingletonPrototype(JSFunction *target); @@ -404,9 +404,9 @@ class IonBuilder bool hasStaticScopeObject(ScopeCoordinate sc, JSObject **pcall); bool loadSlot(MDefinition *obj, size_t slot, size_t nfixed, MIRType rvalType, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); bool loadSlot(MDefinition *obj, Shape *shape, MIRType rvalType, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); bool storeSlot(MDefinition *obj, size_t slot, size_t nfixed, MDefinition *value, bool needsBarrier, MIRType slotType = MIRType_None); @@ -418,19 +418,19 @@ class IonBuilder // jsop_getprop() helpers. bool checkIsDefinitelyOptimizedArguments(MDefinition *obj, bool *isOptimizedArgs); bool getPropTryInferredConstant(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types); + TemporaryTypeSet *types); bool getPropTryArgumentsLength(bool *emitted, MDefinition *obj); bool getPropTryArgumentsCallee(bool *emitted, MDefinition *obj, PropertyName *name); bool getPropTryConstant(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types); + TemporaryTypeSet *types); bool getPropTryDefiniteSlot(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); bool getPropTryUnboxed(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); bool getPropTryCommonGetter(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types); + TemporaryTypeSet *types); bool getPropTryInlineAccess(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); bool getPropTryTypedObject(bool *emitted, MDefinition *obj, PropertyName *name); bool getPropTryScalarPropOfTypedObject(bool *emitted, MDefinition *typedObj, int32_t fieldOffset, @@ -444,25 +444,25 @@ class IonBuilder TypedObjectPrediction fieldTypeReprs, size_t fieldIndex); bool getPropTryInnerize(bool *emitted, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *types); + TemporaryTypeSet *types); bool getPropTryCache(bool *emitted, MDefinition *obj, PropertyName *name, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); // jsop_setprop() helpers. bool setPropTryCommonSetter(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value); bool setPropTryCommonDOMSetter(bool *emitted, MDefinition *obj, MDefinition *value, JSFunction *setter, - types::TemporaryTypeSet *objTypes); + TemporaryTypeSet *objTypes); bool setPropTryDefiniteSlot(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes); + bool barrier, TemporaryTypeSet *objTypes); bool setPropTryUnboxed(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes); + bool barrier, TemporaryTypeSet *objTypes); bool setPropTryInlineAccess(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes); + bool barrier, TemporaryTypeSet *objTypes); bool setPropTryTypedObject(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value); bool setPropTryReferencePropOfTypedObject(bool *emitted, @@ -478,11 +478,11 @@ class IonBuilder TypedObjectPrediction fieldTypeReprs); bool setPropTryCache(bool *emitted, MDefinition *obj, PropertyName *name, MDefinition *value, - bool barrier, types::TemporaryTypeSet *objTypes); + bool barrier, TemporaryTypeSet *objTypes); // binary data lookup helpers. TypedObjectPrediction typedObjectPrediction(MDefinition *typedObj); - TypedObjectPrediction typedObjectPrediction(types::TemporaryTypeSet *types); + TypedObjectPrediction typedObjectPrediction(TemporaryTypeSet *types); bool typedObjectHasField(MDefinition *typedObj, PropertyName *name, size_t *fieldOffset, @@ -650,7 +650,7 @@ class IonBuilder bool jsop_getelem_dense(MDefinition *obj, MDefinition *index); bool jsop_getelem_typed(MDefinition *obj, MDefinition *index, ScalarTypeDescr::Type arrayType); bool jsop_setelem(); - bool jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion conversion, + bool jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion, SetElemSafety safety, MDefinition *object, MDefinition *index, MDefinition *value); bool jsop_setelem_typed(ScalarTypeDescr::Type arrayType, @@ -726,7 +726,7 @@ class IonBuilder // Native inlining helpers. // The typeset for the return value of our function. These are // the types it's been observed returning in the past. - types::TemporaryTypeSet *getInlineReturnTypeSet(); + TemporaryTypeSet *getInlineReturnTypeSet(); // The known MIR type of getInlineReturnTypeSet. MIRType getInlineReturnType(); @@ -863,18 +863,18 @@ class IonBuilder MBasicBlock *bottom); MDefinition *specializeInlinedReturn(MDefinition *rdef, MBasicBlock *exit); - bool objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyName *name, + bool objectsHaveCommonPrototype(TemporaryTypeSet *types, PropertyName *name, bool isGetter, JSObject *foundProto, bool *guardGlobal); - void freezePropertiesForCommonPrototype(types::TemporaryTypeSet *types, PropertyName *name, + void freezePropertiesForCommonPrototype(TemporaryTypeSet *types, PropertyName *name, JSObject *foundProto, bool allowEmptyTypesForGlobal = false); /* * Callers must pass a non-null globalGuard if they pass a non-null globalShape. */ - bool testCommonGetterSetter(types::TemporaryTypeSet *types, PropertyName *name, + bool testCommonGetterSetter(TemporaryTypeSet *types, PropertyName *name, bool isGetter, JSObject *foundProto, Shape *lastProperty, MDefinition **guard, Shape *globalShape = nullptr, MDefinition **globalGuard = nullptr); - bool testShouldDOMCall(types::TypeSet *inTypes, + bool testShouldDOMCall(TypeSet *inTypes, JSFunction *func, JSJitInfo::OpType opType); MDefinition *addShapeGuardsForGetterSetter(MDefinition *obj, JSObject *holder, Shape *holderShape, @@ -882,27 +882,27 @@ class IonBuilder bool isOwnProperty); bool annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPropCache, - types::TemporaryTypeSet *objTypes, - types::TemporaryTypeSet *pushedTypes); + TemporaryTypeSet *objTypes, + TemporaryTypeSet *pushedTypes); MGetPropertyCache *getInlineableGetPropertyCache(CallInfo &callInfo); JSObject *testSingletonProperty(JSObject *obj, PropertyName *name); bool testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, PropertyName *name, bool *testObject, bool *testString); - uint32_t getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name); - uint32_t getUnboxedOffset(types::TemporaryTypeSet *types, PropertyName *name, + uint32_t getDefiniteSlot(TemporaryTypeSet *types, PropertyName *name); + uint32_t getUnboxedOffset(TemporaryTypeSet *types, PropertyName *name, JSValueType *punboxedType); MInstruction *loadUnboxedProperty(MDefinition *obj, size_t offset, JSValueType unboxedType, - BarrierKind barrier, types::TemporaryTypeSet *types); + BarrierKind barrier, TemporaryTypeSet *types); MInstruction *storeUnboxedProperty(MDefinition *obj, size_t offset, JSValueType unboxedType, MDefinition *value); - bool freezePropTypeSets(types::TemporaryTypeSet *types, + bool freezePropTypeSets(TemporaryTypeSet *types, JSObject *foundProto, PropertyName *name); bool canInlinePropertyOpShapes(const BaselineInspector::ShapeVector &nativeShapes, const BaselineInspector::ObjectGroupVector &unboxedGroups); - types::TemporaryTypeSet *bytecodeTypes(jsbytecode *pc); + TemporaryTypeSet *bytecodeTypes(jsbytecode *pc); // Use one of the below methods for updating the current block, rather than // updating |current| directly. setCurrent() should only be used in cases @@ -946,7 +946,7 @@ class IonBuilder CodeGenerator *backgroundCodegen() const { return backgroundCodegen_; } void setBackgroundCodegen(CodeGenerator *codegen) { backgroundCodegen_ = codegen; } - types::CompilerConstraintList *constraints() { + CompilerConstraintList *constraints() { return constraints_; } @@ -978,7 +978,7 @@ class IonBuilder BaselineFrameInspector *baselineFrame_; // Constraints for recording dependencies on type information. - types::CompilerConstraintList *constraints_; + CompilerConstraintList *constraints_; // Basic analysis information about the script. BytecodeAnalysis analysis_; @@ -986,7 +986,7 @@ class IonBuilder return analysis_; } - types::TemporaryTypeSet *thisTypes, *argTypes, *typeArray; + TemporaryTypeSet *thisTypes, *argTypes, *typeArray; uint32_t typeArrayHint; uint32_t *bytecodeTypeMap; @@ -1119,7 +1119,7 @@ class IonBuilder // unchecked variants, despite the unchecked variants having no other // callers. void trackTypeInfo(JS::TrackedTypeSite site, MIRType mirType, - types::TemporaryTypeSet *typeSet) + TemporaryTypeSet *typeSet) { if (MOZ_UNLIKELY(current->trackedSite()->hasOptimizations())) trackTypeInfoUnchecked(site, mirType, typeSet); @@ -1156,7 +1156,7 @@ class IonBuilder // Out-of-line variants that don't check if optimization tracking is // enabled. void trackTypeInfoUnchecked(JS::TrackedTypeSite site, MIRType mirType, - types::TemporaryTypeSet *typeSet); + TemporaryTypeSet *typeSet); void trackTypeInfoUnchecked(JS::TrackedTypeSite site, JSObject *obj); void trackTypeInfoUnchecked(CallInfo &callInfo); void trackOptimizationAttemptUnchecked(JS::TrackedStrategy strategy); @@ -1292,7 +1292,7 @@ class CallInfo } }; -bool TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *inputTypes); +bool TypeSetIncludes(TypeSet *types, MIRType input, TypeSet *inputTypes); bool NeedsPostBarrier(CompileInfo &info, MDefinition *value); diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp index 88cd9ce87c21..e54d474c0205 100644 --- a/js/src/jit/IonCaches.cpp +++ b/js/src/jit/IonCaches.cpp @@ -1268,10 +1268,9 @@ GetPropertyIC::allowArrayLength(Context cx, HandleObject obj) const CacheLocation *locs = ion->getCacheLocs(locationIndex); for (size_t i = 0; i < numLocations; i++) { CacheLocation &curLoc = locs[i]; - types::StackTypeSet *bcTypes = - types::TypeScript::BytecodeTypes(curLoc.script, curLoc.pc); + StackTypeSet *bcTypes = TypeScript::BytecodeTypes(curLoc.script, curLoc.pc); - if (!bcTypes->hasType(types::Type::Int32Type())) + if (!bcTypes->hasType(TypeSet::Int32Type())) return false; } @@ -1855,7 +1854,7 @@ GetPropertyIC::update(JSContext *cx, size_t cacheIndex, // Monitor changes to cache entry. if (!cache.monitoredResult()) - types::TypeScript::Monitor(cx, script, pc, vp); + TypeScript::Monitor(cx, script, pc, vp); } return true; @@ -1900,11 +1899,11 @@ CheckTypeSetForWrite(MacroAssembler &masm, JSObject *obj, jsid id, ObjectGroup *group = obj->group(); if (group->unknownProperties()) return; - types::HeapTypeSet *propTypes = group->maybeGetProperty(id); + HeapTypeSet *propTypes = group->maybeGetProperty(id); MOZ_ASSERT(propTypes); // guardTypeSet can read from type sets without triggering read barriers. - types::TypeSet::readBarrier(propTypes); + TypeSet::readBarrier(propTypes); Register scratch = object; masm.guardTypeSet(valReg, propTypes, BarrierKind::TypeSet, scratch, failure); @@ -2581,7 +2580,7 @@ CanInlineSetPropTypeCheck(JSObject *obj, jsid id, ConstantOrRegister val, bool * bool shouldCheck = false; ObjectGroup *group = obj->group(); if (!group->unknownProperties()) { - types::HeapTypeSet *propTypes = group->maybeGetProperty(id); + HeapTypeSet *propTypes = group->maybeGetProperty(id); if (!propTypes) return false; if (!propTypes->unknown()) { @@ -2590,7 +2589,7 @@ CanInlineSetPropTypeCheck(JSObject *obj, jsid id, ConstantOrRegister val, bool * shouldCheck = true; if (val.constant()) { // If the input is a constant, then don't bother if the barrier will always fail. - if (!propTypes->hasType(types::GetValueType(val.value()))) + if (!propTypes->hasType(TypeSet::GetValueType(val.value()))) return false; shouldCheck = false; } else { @@ -2601,7 +2600,7 @@ CanInlineSetPropTypeCheck(JSObject *obj, jsid id, ConstantOrRegister val, bool * // contains the specific object, but doesn't have ANYOBJECT set. if (reg.hasTyped() && reg.type() != MIRType_Object) { JSValueType valType = ValueTypeFromMIRType(reg.type()); - if (!propTypes->hasType(types::Type::PrimitiveType(valType))) + if (!propTypes->hasType(TypeSet::PrimitiveType(valType))) return false; shouldCheck = false; } @@ -3409,7 +3408,7 @@ GetElementIC::update(JSContext *cx, size_t cacheIndex, HandleObject obj, if (!GetObjectElementOperation(cx, JSOp(*pc), obj, idval, res)) return false; if (!cache.monitoredResult()) - types::TypeScript::Monitor(cx, script, pc, res); + TypeScript::Monitor(cx, script, pc, res); return true; } @@ -3463,7 +3462,7 @@ GetElementIC::update(JSContext *cx, size_t cacheIndex, HandleObject obj, } if (!cache.monitoredResult()) - types::TypeScript::Monitor(cx, script, pc, res); + TypeScript::Monitor(cx, script, pc, res); return true; } @@ -4143,7 +4142,7 @@ NameIC::update(JSContext *cx, size_t cacheIndex, HandleObject scopeChain, } // Monitor changes to cache entry. - types::TypeScript::Monitor(cx, script, pc, vp); + TypeScript::Monitor(cx, script, pc, vp); return true; } diff --git a/js/src/jit/IonCode.h b/js/src/jit/IonCode.h index 4875b410fd9d..6393eca0044b 100644 --- a/js/src/jit/IonCode.h +++ b/js/src/jit/IonCode.h @@ -265,7 +265,7 @@ struct IonScript uint32_t invalidationCount_; // Identifier of the compilation which produced this code. - types::RecompileInfo recompileInfo_; + RecompileInfo recompileInfo_; // The optimization level this script was compiled in. OptimizationLevel optimizationLevel_; @@ -332,7 +332,7 @@ struct IonScript // Do not call directly, use IonScript::New. This is public for cx->new_. IonScript(); - static IonScript *New(JSContext *cx, types::RecompileInfo recompileInfo, + static IonScript *New(JSContext *cx, RecompileInfo recompileInfo, uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, @@ -541,10 +541,10 @@ struct IonScript if (!invalidationCount_) Destroy(fop, this); } - const types::RecompileInfo& recompileInfo() const { + const RecompileInfo& recompileInfo() const { return recompileInfo_; } - types::RecompileInfo& recompileInfoRef() { + RecompileInfo& recompileInfoRef() { return recompileInfo_; } OptimizationLevel optimizationLevel() const { diff --git a/js/src/jit/JitFrames.cpp b/js/src/jit/JitFrames.cpp index 29bc331326eb..b4c9e11a2c50 100644 --- a/js/src/jit/JitFrames.cpp +++ b/js/src/jit/JitFrames.cpp @@ -2115,7 +2115,7 @@ SnapshotIterator::computeInstructionResults(JSContext *cx, RInstructionResults * // Use AutoEnterAnalysis to avoid invoking the object metadata callback, // which could try to walk the stack while bailing out. - types::AutoEnterAnalysis enter(cx); + AutoEnterAnalysis enter(cx); // Fill with the results of recover instructions. SnapshotIterator s(*this); diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index 125de1706013..3a72f308172b 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -2295,7 +2295,7 @@ LIRGenerator::visitTypeBarrier(MTypeBarrier *ins) // Requesting a non-GC pointer is safe here since we never re-enter C++ // from inside a type barrier test. - const types::TemporaryTypeSet *types = ins->resultTypeSet(); + const TemporaryTypeSet *types = ins->resultTypeSet(); bool needTemp = !types->unknownObject() && types->getObjectCount() > 0; MIRType inputType = ins->getOperand(0)->type(); @@ -2325,7 +2325,7 @@ LIRGenerator::visitTypeBarrier(MTypeBarrier *ins) } // Handle typebarrier with specific ObjectGroup/SingleObjects. - if (inputType == MIRType_Object && !types->hasType(types::Type::AnyObjectType()) && + if (inputType == MIRType_Object && !types->hasType(TypeSet::AnyObjectType()) && ins->barrierKind() != BarrierKind::TypeTagOnly) { LDefinition tmp = needTemp ? temp() : LDefinition::BogusTemp(); @@ -2346,7 +2346,7 @@ LIRGenerator::visitMonitorTypes(MMonitorTypes *ins) // Requesting a non-GC pointer is safe here since we never re-enter C++ // from inside a type check. - const types::TemporaryTypeSet *types = ins->typeSet(); + const TemporaryTypeSet *types = ins->typeSet(); bool needTemp = !types->unknownObject() && types->getObjectCount() > 0; LDefinition tmp = needTemp ? temp() : tempToUnbox(); diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp index 36b9496dc3eb..aaa1e1bee359 100644 --- a/js/src/jit/MCallOptimize.cpp +++ b/js/src/jit/MCallOptimize.cpp @@ -274,7 +274,7 @@ IonBuilder::inlineNativeGetter(CallInfo &callInfo, JSFunction *target) if (!optimizationInfo().inlineNative()) return InliningStatus_NotInlined; - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); MOZ_ASSERT(callInfo.argc() == 0); // Try to optimize typed array lengths. There is one getter on @@ -321,7 +321,7 @@ IonBuilder::inlineNonFunctionCall(CallInfo &callInfo, JSObject *target) return InliningStatus_NotInlined; } -types::TemporaryTypeSet * +TemporaryTypeSet * IonBuilder::getInlineReturnTypeSet() { return bytecodeTypes(pc); @@ -330,7 +330,7 @@ IonBuilder::getInlineReturnTypeSet() MIRType IonBuilder::getInlineReturnType() { - types::TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); + TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); return returnTypes->getKnownMIRType(); } @@ -377,9 +377,9 @@ IonBuilder::inlineArray(CallInfo &callInfo) initLength = callInfo.argc(); allocating = NewArray_FullyAllocating; - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(templateArray); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(templateArray); if (!key->unknownProperties()) { - types::HeapTypeSetKey elemTypes = key->property(JSID_VOID); + HeapTypeSetKey elemTypes = key->property(JSID_VOID); for (uint32_t i = 0; i < initLength; i++) { MDefinition *value = callInfo.getArg(i); @@ -391,9 +391,9 @@ IonBuilder::inlineArray(CallInfo &callInfo) } } - types::TemporaryTypeSet::DoubleConversion conversion = + TemporaryTypeSet::DoubleConversion conversion = getInlineReturnTypeSet()->convertDoubleElements(constraints()); - if (conversion == types::TemporaryTypeSet::AlwaysConvertToDoubles) + if (conversion == TemporaryTypeSet::AlwaysConvertToDoubles) templateArray->setShouldConvertDoubleElements(); else templateArray->clearShouldConvertDoubleElements(); @@ -461,7 +461,7 @@ IonBuilder::inlineArray(CallInfo &callInfo) current->add(id); MDefinition *value = callInfo.getArg(i); - if (conversion == types::TemporaryTypeSet::AlwaysConvertToDoubles) { + if (conversion == TemporaryTypeSet::AlwaysConvertToDoubles) { MInstruction *valueDouble = MToDouble::New(alloc(), value); current->add(valueDouble); value = valueDouble; @@ -512,7 +512,7 @@ IonBuilder::inlineArrayPopShift(CallInfo &callInfo, MArrayPopShift::Mode mode) OBJECT_FLAG_ITERATED; MDefinition *obj = callInfo.thisArg(); - types::TemporaryTypeSet *thisTypes = obj->resultTypeSet(); + TemporaryTypeSet *thisTypes = obj->resultTypeSet(); if (!thisTypes || thisTypes->getKnownClass(constraints()) != &ArrayObject::class_) return InliningStatus_NotInlined; if (thisTypes->hasObjectFlags(constraints(), unhandledFlags)) { @@ -520,7 +520,7 @@ IonBuilder::inlineArrayPopShift(CallInfo &callInfo, MArrayPopShift::Mode mode) return InliningStatus_NotInlined; } - if (types::ArrayPrototypeHasIndexedProperty(constraints(), script())) { + if (ArrayPrototypeHasIndexedProperty(constraints(), script())) { trackOptimizationOutcome(TrackedOutcome::ProtoIndexedProps); return InliningStatus_NotInlined; } @@ -529,9 +529,9 @@ IonBuilder::inlineArrayPopShift(CallInfo &callInfo, MArrayPopShift::Mode mode) obj = addMaybeCopyElementsForWrite(obj); - types::TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); + TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); bool needsHoleCheck = thisTypes->hasObjectFlags(constraints(), OBJECT_FLAG_NON_PACKED); - bool maybeUndefined = returnTypes->hasType(types::Type::UndefinedType()); + bool maybeUndefined = returnTypes->hasType(TypeSet::UndefinedType()); BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(), obj, nullptr, returnTypes); @@ -640,7 +640,7 @@ IonBuilder::inlineArrayPush(CallInfo &callInfo) if (callInfo.thisArg()->type() != MIRType_Object) return InliningStatus_NotInlined; - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); if (!thisTypes || thisTypes->getKnownClass(constraints()) != &ArrayObject::class_) return InliningStatus_NotInlined; if (thisTypes->hasObjectFlags(constraints(), OBJECT_FLAG_SPARSE_INDEXES | @@ -650,14 +650,14 @@ IonBuilder::inlineArrayPush(CallInfo &callInfo) return InliningStatus_NotInlined; } - if (types::ArrayPrototypeHasIndexedProperty(constraints(), script())) { + if (ArrayPrototypeHasIndexedProperty(constraints(), script())) { trackOptimizationOutcome(TrackedOutcome::ProtoIndexedProps); return InliningStatus_NotInlined; } - types::TemporaryTypeSet::DoubleConversion conversion = + TemporaryTypeSet::DoubleConversion conversion = thisTypes->convertDoubleElements(constraints()); - if (conversion == types::TemporaryTypeSet::AmbiguousDoubleConversion) { + if (conversion == TemporaryTypeSet::AmbiguousDoubleConversion) { trackOptimizationOutcome(TrackedOutcome::ArrayDoubleConversion); return InliningStatus_NotInlined; } @@ -665,8 +665,8 @@ IonBuilder::inlineArrayPush(CallInfo &callInfo) callInfo.setImplicitlyUsedUnchecked(); value = callInfo.getArg(0); - if (conversion == types::TemporaryTypeSet::AlwaysConvertToDoubles || - conversion == types::TemporaryTypeSet::MaybeConvertToDoubles) + if (conversion == TemporaryTypeSet::AlwaysConvertToDoubles || + conversion == TemporaryTypeSet::MaybeConvertToDoubles) { MInstruction *valueDouble = MToDouble::New(alloc(), value); current->add(valueDouble); @@ -704,8 +704,8 @@ IonBuilder::inlineArrayConcat(CallInfo &callInfo) return InliningStatus_NotInlined; // |this| and the argument must be dense arrays. - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); - types::TemporaryTypeSet *argTypes = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *argTypes = callInfo.getArg(0)->resultTypeSet(); if (!thisTypes || !argTypes) return InliningStatus_NotInlined; @@ -728,7 +728,7 @@ IonBuilder::inlineArrayConcat(CallInfo &callInfo) } // Watch out for indexed properties on the prototype. - if (types::ArrayPrototypeHasIndexedProperty(constraints(), script())) { + if (ArrayPrototypeHasIndexedProperty(constraints(), script())) { trackOptimizationOutcome(TrackedOutcome::ProtoIndexedProps); return InliningStatus_NotInlined; } @@ -741,7 +741,7 @@ IonBuilder::inlineArrayConcat(CallInfo &callInfo) ObjectGroup *thisGroup = thisTypes->getGroup(0); if (!thisGroup) return InliningStatus_NotInlined; - types::TypeSetObjectKey *thisKey = types::TypeSetObjectKey::get(thisGroup); + TypeSet::ObjectKey *thisKey = TypeSet::ObjectKey::get(thisGroup); if (thisKey->unknownProperties()) return InliningStatus_NotInlined; @@ -757,21 +757,21 @@ IonBuilder::inlineArrayConcat(CallInfo &callInfo) // Constraints modeling this concat have not been generated by inference, // so check that type information already reflects possible side effects of // this call. - types::HeapTypeSetKey thisElemTypes = thisKey->property(JSID_VOID); + HeapTypeSetKey thisElemTypes = thisKey->property(JSID_VOID); - types::TemporaryTypeSet *resTypes = getInlineReturnTypeSet(); - if (!resTypes->hasType(types::Type::ObjectType(thisKey))) + TemporaryTypeSet *resTypes = getInlineReturnTypeSet(); + if (!resTypes->hasType(TypeSet::ObjectType(thisKey))) return InliningStatus_NotInlined; for (unsigned i = 0; i < argTypes->getObjectCount(); i++) { - types::TypeSetObjectKey *key = argTypes->getObject(i); + TypeSet::ObjectKey *key = argTypes->getObject(i); if (!key) continue; if (key->unknownProperties()) return InliningStatus_NotInlined; - types::HeapTypeSetKey elemTypes = key->property(JSID_VOID); + HeapTypeSetKey elemTypes = key->property(JSID_VOID); if (!elemTypes.knownSubset(constraints(), thisElemTypes)) return InliningStatus_NotInlined; } @@ -1236,11 +1236,11 @@ IonBuilder::inlineMathFRound(CallInfo &callInfo) // MIRType can't be Float32, as this point, as getInlineReturnType uses JSVal types // to infer the returned MIR type. - types::TemporaryTypeSet *returned = getInlineReturnTypeSet(); + TemporaryTypeSet *returned = getInlineReturnTypeSet(); if (returned->empty()) { // As there's only one possible returned type, just add it to the observed // returned typeset - returned->addType(types::Type::DoubleType(), alloc_->lifoAlloc()); + returned->addType(TypeSet::DoubleType(), alloc_->lifoAlloc()); } else { MIRType returnType = getInlineReturnType(); if (!IsNumberType(returnType)) @@ -1377,15 +1377,15 @@ IonBuilder::inlineStringSplit(CallInfo &callInfo) return InliningStatus_NotInlined; MOZ_ASSERT(templateObject->is()); - types::TypeSetObjectKey *retKey = types::TypeSetObjectKey::get(templateObject); + TypeSet::ObjectKey *retKey = TypeSet::ObjectKey::get(templateObject); if (retKey->unknownProperties()) return InliningStatus_NotInlined; - types::HeapTypeSetKey key = retKey->property(JSID_VOID); + HeapTypeSetKey key = retKey->property(JSID_VOID); if (!key.maybeTypes()) return InliningStatus_NotInlined; - if (!key.maybeTypes()->hasType(types::Type::StringType())) { + if (!key.maybeTypes()->hasType(TypeSet::StringType())) { key.freeze(constraints()); return InliningStatus_NotInlined; } @@ -1547,7 +1547,7 @@ IonBuilder::inlineRegExpExec(CallInfo &callInfo) if (callInfo.thisArg()->type() != MIRType_Object) return InliningStatus_NotInlined; - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); const Class *clasp = thisTypes ? thisTypes->getKnownClass(constraints()) : nullptr; if (clasp != &RegExpObject::class_) return InliningStatus_NotInlined; @@ -1588,7 +1588,7 @@ IonBuilder::inlineRegExpTest(CallInfo &callInfo) if (callInfo.thisArg()->type() != MIRType_Object) return InliningStatus_NotInlined; - types::TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); + TemporaryTypeSet *thisTypes = callInfo.thisArg()->resultTypeSet(); const Class *clasp = thisTypes ? thisTypes->getKnownClass(constraints()) : nullptr; if (clasp != &RegExpObject::class_) return InliningStatus_NotInlined; @@ -1627,7 +1627,7 @@ IonBuilder::inlineStrReplace(CallInfo &callInfo) return InliningStatus_NotInlined; // Arg 0: RegExp. - types::TemporaryTypeSet *arg0Type = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *arg0Type = callInfo.getArg(0)->resultTypeSet(); const Class *clasp = arg0Type ? arg0Type->getKnownClass(constraints()) : nullptr; if (clasp != &RegExpObject::class_ && callInfo.getArg(0)->type() != MIRType_String) return InliningStatus_NotInlined; @@ -1704,7 +1704,7 @@ IonBuilder::inlineObjectCreate(CallInfo &callInfo) if (IsInsideNursery(proto)) return InliningStatus_NotInlined; - types::TemporaryTypeSet *types = arg->resultTypeSet(); + TemporaryTypeSet *types = arg->resultTypeSet(); if (!types || types->maybeSingleton() != proto) return InliningStatus_NotInlined; @@ -1851,7 +1851,7 @@ IonBuilder::inlineUnsafeSetDenseArrayElement(CallInfo &callInfo, uint32_t base) MDefinition *id = callInfo.getArg(base + 1); MDefinition *elem = callInfo.getArg(base + 2); - types::TemporaryTypeSet::DoubleConversion conversion = + TemporaryTypeSet::DoubleConversion conversion = obj->resultTypeSet()->convertDoubleElements(constraints()); if (!jsop_setelem_dense(conversion, SetElem_Unsafe, obj, id, elem)) return false; @@ -1913,7 +1913,7 @@ IonBuilder::inlineHasClass(CallInfo &callInfo, if (getInlineReturnType() != MIRType_Boolean) return InliningStatus_NotInlined; - types::TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); const Class *knownClass = types ? types->getKnownClass(constraints()) : nullptr; if (knownClass) { pushConstant(BooleanValue(knownClass == clasp1 || @@ -1966,20 +1966,20 @@ IonBuilder::inlineIsTypedArray(CallInfo &callInfo) // The test is elaborate: in-line only if there is exact // information. - types::TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); if (!types) return InliningStatus_NotInlined; bool result = false; switch (types->forAllClasses(constraints(), IsTypedArrayClass)) { - case types::TemporaryTypeSet::ForAllResult::ALL_FALSE: - case types::TemporaryTypeSet::ForAllResult::EMPTY: + case TemporaryTypeSet::ForAllResult::ALL_FALSE: + case TemporaryTypeSet::ForAllResult::EMPTY: result = false; break; - case types::TemporaryTypeSet::ForAllResult::ALL_TRUE: + case TemporaryTypeSet::ForAllResult::ALL_TRUE: result = true; break; - case types::TemporaryTypeSet::ForAllResult::MIXED: + case TemporaryTypeSet::ForAllResult::MIXED: return InliningStatus_NotInlined; } @@ -2026,20 +2026,20 @@ IonBuilder::inlineObjectIsTypeDescr(CallInfo &callInfo) // The test is elaborate: in-line only if there is exact // information. - types::TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); if (!types) return InliningStatus_NotInlined; bool result = false; switch (types->forAllClasses(constraints(), IsTypeDescrClass)) { - case types::TemporaryTypeSet::ForAllResult::ALL_FALSE: - case types::TemporaryTypeSet::ForAllResult::EMPTY: + case TemporaryTypeSet::ForAllResult::ALL_FALSE: + case TemporaryTypeSet::ForAllResult::EMPTY: result = false; break; - case types::TemporaryTypeSet::ForAllResult::ALL_TRUE: + case TemporaryTypeSet::ForAllResult::ALL_TRUE: result = true; break; - case types::TemporaryTypeSet::ForAllResult::MIXED: + case TemporaryTypeSet::ForAllResult::MIXED: return InliningStatus_NotInlined; } @@ -2070,15 +2070,15 @@ IonBuilder::inlineSetTypedObjectOffset(CallInfo &callInfo) // with TI or because of something else -- but we'll just let it // fall through to the SetTypedObjectOffset intrinsic in such // cases. - types::TemporaryTypeSet *types = typedObj->resultTypeSet(); + TemporaryTypeSet *types = typedObj->resultTypeSet(); if (typedObj->type() != MIRType_Object || !types) return InliningStatus_NotInlined; switch (types->forAllClasses(constraints(), IsTypedObjectClass)) { - case types::TemporaryTypeSet::ForAllResult::ALL_FALSE: - case types::TemporaryTypeSet::ForAllResult::EMPTY: - case types::TemporaryTypeSet::ForAllResult::MIXED: + case TemporaryTypeSet::ForAllResult::ALL_FALSE: + case TemporaryTypeSet::ForAllResult::EMPTY: + case TemporaryTypeSet::ForAllResult::MIXED: return InliningStatus_NotInlined; - case types::TemporaryTypeSet::ForAllResult::ALL_TRUE: + case TemporaryTypeSet::ForAllResult::ALL_TRUE: break; } @@ -2188,7 +2188,7 @@ IonBuilder::inlineIsCallable(CallInfo &callInfo) isCallableKnown = true; isCallableConstant = false; } else { - types::TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *types = callInfo.getArg(0)->resultTypeSet(); const Class *clasp = types ? types->getKnownClass(constraints()) : nullptr; if (clasp && !clasp->isProxy()) { isCallableKnown = true; @@ -2588,7 +2588,7 @@ IonBuilder::atomicsMeetsPreconditions(CallInfo &callInfo, Scalar::Type *arrayTyp // optimize and that the return type is suitable for that element // type. - types::TemporaryTypeSet *arg0Types = callInfo.getArg(0)->resultTypeSet(); + TemporaryTypeSet *arg0Types = callInfo.getArg(0)->resultTypeSet(); if (!arg0Types) return false; diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index baba48cc77d0..2d7f540ab599 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -270,7 +270,7 @@ MDefinition::mightBeMagicType() const if (MIRType_Value != type()) return false; - return !resultTypeSet() || resultTypeSet()->hasType(types::Type::MagicArgType()); + return !resultTypeSet() || resultTypeSet()->hasType(TypeSet::MagicArgType()); } MDefinition * @@ -339,12 +339,12 @@ MInstruction::clearResumePoint() } static bool -MaybeEmulatesUndefined(types::CompilerConstraintList *constraints, MDefinition *op) +MaybeEmulatesUndefined(CompilerConstraintList *constraints, MDefinition *op) { if (!op->mightBeType(MIRType_Object)) return false; - types::TemporaryTypeSet *types = op->resultTypeSet(); + TemporaryTypeSet *types = op->resultTypeSet(); if (!types) return true; @@ -352,12 +352,12 @@ MaybeEmulatesUndefined(types::CompilerConstraintList *constraints, MDefinition * } static bool -MaybeCallable(types::CompilerConstraintList *constraints, MDefinition *op) +MaybeCallable(CompilerConstraintList *constraints, MDefinition *op) { if (!op->mightBeType(MIRType_Object)) return false; - types::TemporaryTypeSet *types = op->resultTypeSet(); + TemporaryTypeSet *types = op->resultTypeSet(); if (!types) return true; @@ -371,7 +371,7 @@ MTest::New(TempAllocator &alloc, MDefinition *ins, MBasicBlock *ifTrue, MBasicBl } void -MTest::cacheOperandMightEmulateUndefined(types::CompilerConstraintList *constraints) +MTest::cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints) { MOZ_ASSERT(operandMightEmulateUndefined()); @@ -621,13 +621,13 @@ MDefinition::emptyResultTypeSet() const } MConstant * -MConstant::New(TempAllocator &alloc, const Value &v, types::CompilerConstraintList *constraints) +MConstant::New(TempAllocator &alloc, const Value &v, CompilerConstraintList *constraints) { return new(alloc) MConstant(v, constraints); } MConstant * -MConstant::NewTypedValue(TempAllocator &alloc, const Value &v, MIRType type, types::CompilerConstraintList *constraints) +MConstant::NewTypedValue(TempAllocator &alloc, const Value &v, MIRType type, CompilerConstraintList *constraints) { MOZ_ASSERT(!IsSimdType(type)); MConstant *constant = new(alloc) MConstant(v, constraints); @@ -647,29 +647,29 @@ MConstant::NewConstraintlessObject(TempAllocator &alloc, JSObject *v) return new(alloc) MConstant(v); } -types::TemporaryTypeSet * -jit::MakeSingletonTypeSet(types::CompilerConstraintList *constraints, JSObject *obj) +TemporaryTypeSet * +jit::MakeSingletonTypeSet(CompilerConstraintList *constraints, JSObject *obj) { // Invalidate when this object's ObjectGroup gets unknown properties. This // happens for instance when we mutate an object's __proto__, in this case // we want to invalidate and mark this TypeSet as containing AnyObject // (because mutating __proto__ will change an object's ObjectGroup). MOZ_ASSERT(constraints); - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(obj); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(obj); key->hasStableClassAndProto(constraints); LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - return alloc->new_(alloc, types::Type::ObjectType(obj)); + return alloc->new_(alloc, TypeSet::ObjectType(obj)); } -static types::TemporaryTypeSet * +static TemporaryTypeSet * MakeUnknownTypeSet() { LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - return alloc->new_(alloc, types::Type::UnknownType()); + return alloc->new_(alloc, TypeSet::UnknownType()); } -MConstant::MConstant(const js::Value &vp, types::CompilerConstraintList *constraints) +MConstant::MConstant(const js::Value &vp, CompilerConstraintList *constraints) : value_(vp) { setResultType(MIRTypeFromValue(vp)); @@ -806,7 +806,7 @@ MConstant::canProduceFloat32() const return true; } -MNurseryObject::MNurseryObject(JSObject *obj, uint32_t index, types::CompilerConstraintList *constraints) +MNurseryObject::MNurseryObject(JSObject *obj, uint32_t index, CompilerConstraintList *constraints) : index_(index) { setResultType(MIRType_Object); @@ -820,7 +820,7 @@ MNurseryObject::MNurseryObject(JSObject *obj, uint32_t index, types::CompilerCon MNurseryObject * MNurseryObject::New(TempAllocator &alloc, JSObject *obj, uint32_t index, - types::CompilerConstraintList *constraints) + CompilerConstraintList *constraints) { return new(alloc) MNurseryObject(obj, index, constraints); } @@ -1107,7 +1107,7 @@ MMathFunction::foldsTo(TempAllocator &alloc) } MParameter * -MParameter::New(TempAllocator &alloc, int32_t index, types::TemporaryTypeSet *types) +MParameter::New(TempAllocator &alloc, int32_t index, TemporaryTypeSet *types) { return new(alloc) MParameter(index, types); } @@ -1624,20 +1624,20 @@ MPhi::congruentTo(const MDefinition *ins) const return congruentIfOperandsEqual(ins); } -static inline types::TemporaryTypeSet * +static inline TemporaryTypeSet * MakeMIRTypeSet(MIRType type) { MOZ_ASSERT(type != MIRType_Value); - types::Type ntype = type == MIRType_Object - ? types::Type::AnyObjectType() - : types::Type::PrimitiveType(ValueTypeFromMIRType(type)); + TypeSet::Type ntype = type == MIRType_Object + ? TypeSet::AnyObjectType() + : TypeSet::PrimitiveType(ValueTypeFromMIRType(type)); LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - return alloc->new_(alloc, ntype); + return alloc->new_(alloc, ntype); } bool -jit::MergeTypes(MIRType *ptype, types::TemporaryTypeSet **ptypeSet, - MIRType newType, types::TemporaryTypeSet *newTypeSet) +jit::MergeTypes(MIRType *ptype, TemporaryTypeSet **ptypeSet, + MIRType newType, TemporaryTypeSet *newTypeSet) { if (newTypeSet && newTypeSet->empty()) return true; @@ -1664,7 +1664,7 @@ jit::MergeTypes(MIRType *ptype, types::TemporaryTypeSet **ptypeSet, } if (newTypeSet) { if (!newTypeSet->isSubset(*ptypeSet)) - *ptypeSet = types::TypeSet::unionSets(*ptypeSet, newTypeSet, alloc); + *ptypeSet = TypeSet::unionSets(*ptypeSet, newTypeSet, alloc); } else { *ptypeSet = nullptr; } @@ -1694,7 +1694,7 @@ MPhi::specializeType() } MIRType resultType = this->type(); - types::TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); + TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); for (size_t i = start; i < inputs_.length(); i++) { MDefinition *def = getOperand(i); @@ -1708,13 +1708,13 @@ MPhi::specializeType() } bool -MPhi::addBackedgeType(MIRType type, types::TemporaryTypeSet *typeSet) +MPhi::addBackedgeType(MIRType type, TemporaryTypeSet *typeSet) { MOZ_ASSERT(!specialized_); if (hasBackedgeType_) { MIRType resultType = this->type(); - types::TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); + TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); if (!MergeTypes(&resultType, &resultTypeSet, type, typeSet)) return false; @@ -1735,7 +1735,7 @@ MPhi::typeIncludes(MDefinition *def) if (def->type() == MIRType_Int32 && this->type() == MIRType_Double) return true; - if (types::TemporaryTypeSet *types = def->resultTypeSet()) { + if (TemporaryTypeSet *types = def->resultTypeSet()) { if (this->resultTypeSet()) return types->isSubset(this->resultTypeSet()); if (this->type() == MIRType_Value || types->empty()) @@ -1756,7 +1756,7 @@ bool MPhi::checkForTypeChange(MDefinition *ins, bool *ptypeChange) { MIRType resultType = this->type(); - types::TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); + TemporaryTypeSet *resultTypeSet = this->resultTypeSet(); if (!MergeTypes(&resultType, &resultTypeSet, ins->type(), ins->resultTypeSet())) return false; @@ -2468,7 +2468,7 @@ MBinaryArithInstruction::inferFallback(BaselineInspector *inspector, // either to avoid degrading subsequent analysis. if (getOperand(0)->emptyResultTypeSet() || getOperand(1)->emptyResultTypeSet()) { LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - types::TemporaryTypeSet *types = alloc->new_(); + TemporaryTypeSet *types = alloc->new_(); if (types) setResultTypeSet(types); } @@ -2496,7 +2496,7 @@ ObjectOrSimplePrimitive(MDefinition *op) } static bool -CanDoValueBitwiseCmp(types::CompilerConstraintList *constraints, +CanDoValueBitwiseCmp(CompilerConstraintList *constraints, MDefinition *lhs, MDefinition *rhs, bool looseEq) { // Only primitive (not double/string) or objects are supported. @@ -2619,7 +2619,7 @@ MBinaryInstruction::tryUseUnsignedOperands() } void -MCompare::infer(types::CompilerConstraintList *constraints, BaselineInspector *inspector, jsbytecode *pc) +MCompare::infer(CompilerConstraintList *constraints, BaselineInspector *inspector, jsbytecode *pc) { MOZ_ASSERT(operandMightEmulateUndefined()); @@ -2827,7 +2827,7 @@ MTypeOf::foldsTo(TempAllocator &alloc) } void -MTypeOf::cacheInputMaybeCallableOrEmulatesUndefined(types::CompilerConstraintList *constraints) +MTypeOf::cacheInputMaybeCallableOrEmulatesUndefined(CompilerConstraintList *constraints) { MOZ_ASSERT(inputMaybeCallableOrEmulatesUndefined()); @@ -3568,7 +3568,7 @@ MCompare::filtersUndefinedOrNull(bool trueBranch, MDefinition **subject, bool *f } void -MNot::cacheOperandMightEmulateUndefined(types::CompilerConstraintList *constraints) +MNot::cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints) { MOZ_ASSERT(operandMightEmulateUndefined()); @@ -4030,16 +4030,16 @@ InlinePropertyTable::hasFunction(JSFunction *func) const return false; } -types::TemporaryTypeSet * +TemporaryTypeSet * InlinePropertyTable::buildTypeSetForFunction(JSFunction *func) const { LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - types::TemporaryTypeSet *types = alloc->new_(); + TemporaryTypeSet *types = alloc->new_(); if (!types) return nullptr; for (size_t i = 0; i < numEntries(); i++) { if (entries_[i]->func == func) - types->addType(types::Type::ObjectType(entries_[i]->group), alloc); + types->addType(TypeSet::ObjectType(entries_[i]->group), alloc); } return types; } @@ -4085,7 +4085,7 @@ MGetElementCache::allowDoubleResult() const if (!resultTypeSet()) return true; - return resultTypeSet()->hasType(types::Type::DoubleType()); + return resultTypeSet()->hasType(TypeSet::DoubleType()); } size_t @@ -4277,7 +4277,7 @@ MArrayJoin::foldsTo(TempAllocator &alloc) { } bool -jit::ElementAccessIsDenseNative(types::CompilerConstraintList *constraints, +jit::ElementAccessIsDenseNative(CompilerConstraintList *constraints, MDefinition *obj, MDefinition *id) { if (obj->mightBeType(MIRType_String)) @@ -4286,7 +4286,7 @@ jit::ElementAccessIsDenseNative(types::CompilerConstraintList *constraints, if (id->type() != MIRType_Int32 && id->type() != MIRType_Double) return false; - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types) return false; @@ -4296,7 +4296,7 @@ jit::ElementAccessIsDenseNative(types::CompilerConstraintList *constraints, } bool -jit::ElementAccessIsAnyTypedArray(types::CompilerConstraintList *constraints, +jit::ElementAccessIsAnyTypedArray(CompilerConstraintList *constraints, MDefinition *obj, MDefinition *id, Scalar::Type *arrayType) { @@ -4306,7 +4306,7 @@ jit::ElementAccessIsAnyTypedArray(types::CompilerConstraintList *constraints, if (id->type() != MIRType_Int32 && id->type() != MIRType_Double) return false; - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types) return false; @@ -4318,47 +4318,47 @@ jit::ElementAccessIsAnyTypedArray(types::CompilerConstraintList *constraints, } bool -jit::ElementAccessIsPacked(types::CompilerConstraintList *constraints, MDefinition *obj) +jit::ElementAccessIsPacked(CompilerConstraintList *constraints, MDefinition *obj) { - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); return types && !types->hasObjectFlags(constraints, OBJECT_FLAG_NON_PACKED); } bool -jit::ElementAccessMightBeCopyOnWrite(types::CompilerConstraintList *constraints, MDefinition *obj) +jit::ElementAccessMightBeCopyOnWrite(CompilerConstraintList *constraints, MDefinition *obj) { - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); return !types || types->hasObjectFlags(constraints, OBJECT_FLAG_COPY_ON_WRITE); } bool -jit::ElementAccessHasExtraIndexedProperty(types::CompilerConstraintList *constraints, +jit::ElementAccessHasExtraIndexedProperty(CompilerConstraintList *constraints, MDefinition *obj) { - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types || types->hasObjectFlags(constraints, OBJECT_FLAG_LENGTH_OVERFLOW)) return true; - return types::TypeCanHaveExtraIndexedProperties(constraints, types); + return TypeCanHaveExtraIndexedProperties(constraints, types); } MIRType -jit::DenseNativeElementType(types::CompilerConstraintList *constraints, MDefinition *obj) +jit::DenseNativeElementType(CompilerConstraintList *constraints, MDefinition *obj) { - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); MIRType elementType = MIRType_None; unsigned count = types->getObjectCount(); for (unsigned i = 0; i < count; i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; if (key->unknownProperties()) return MIRType_None; - types::HeapTypeSetKey elementTypes = key->property(JSID_VOID); + HeapTypeSetKey elementTypes = key->property(JSID_VOID); MIRType type = elementTypes.knownMIRType(constraints); if (type == MIRType_None) @@ -4374,9 +4374,9 @@ jit::DenseNativeElementType(types::CompilerConstraintList *constraints, MDefinit } static BarrierKind -PropertyReadNeedsTypeBarrier(types::CompilerConstraintList *constraints, - types::TypeSetObjectKey *key, PropertyName *name, - types::TypeSet *observed) +PropertyReadNeedsTypeBarrier(CompilerConstraintList *constraints, + TypeSet::ObjectKey *key, PropertyName *name, + TypeSet *observed) { // If the object being read from has types for the property which haven't // been observed at this access site, the read could produce a new type and @@ -4393,7 +4393,7 @@ PropertyReadNeedsTypeBarrier(types::CompilerConstraintList *constraints, } jsid id = name ? NameToId(name) : JSID_VOID; - types::HeapTypeSetKey property = key->property(id); + HeapTypeSetKey property = key->property(id); if (property.maybeTypes()) { if (!TypeSetIncludes(observed, MIRType_Value, property.maybeTypes())) { // If all possible objects have been observed, we don't have to @@ -4412,7 +4412,7 @@ PropertyReadNeedsTypeBarrier(types::CompilerConstraintList *constraints, // other than undefined, a barrier is required. if (key->isSingleton()) { JSObject *obj = key->singleton(); - if (name && types::CanHaveEmptyPropertyTypesForOwnProperty(obj) && + if (name && CanHaveEmptyPropertyTypesForOwnProperty(obj) && (!property.maybeTypes() || property.maybeTypes()->empty())) { return BarrierKind::TypeSet; @@ -4425,9 +4425,9 @@ PropertyReadNeedsTypeBarrier(types::CompilerConstraintList *constraints, BarrierKind jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, - types::CompilerConstraintList *constraints, - types::TypeSetObjectKey *key, PropertyName *name, - types::TemporaryTypeSet *observed, bool updateObserved) + CompilerConstraintList *constraints, + TypeSet::ObjectKey *key, PropertyName *name, + TemporaryTypeSet *observed, bool updateObserved) { // If this access has never executed, try to add types to the observed set // according to any property which exists on the object or its prototype. @@ -4442,14 +4442,14 @@ jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, if (!obj->getClass()->isNative()) break; - types::TypeSetObjectKey *key = types::TypeSetObjectKey::get(obj); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(obj); if (propertycx) key->ensureTrackedProperty(propertycx, NameToId(name)); if (!key->unknownProperties()) { - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); if (property.maybeTypes()) { - types::TypeSet::TypeList types; + TypeSet::TypeList types; if (!property.maybeTypes()->enumerateTypes(&types)) break; if (types.length()) { @@ -4469,14 +4469,14 @@ jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, BarrierKind jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, - types::CompilerConstraintList *constraints, + CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed) + TemporaryTypeSet *observed) { if (observed->unknown()) return BarrierKind::NoBarrier; - types::TypeSet *types = obj->resultTypeSet(); + TypeSet *types = obj->resultTypeSet(); if (!types || types->unknownObject()) return BarrierKind::TypeSet; @@ -4484,8 +4484,7 @@ jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, bool updateObserved = types->getObjectCount() == 1; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); - if (key) { + if (TypeSet::ObjectKey *key = types->getObject(i)) { BarrierKind kind = PropertyReadNeedsTypeBarrier(propertycx, constraints, key, name, observed, updateObserved); if (kind == BarrierKind::TypeSet) @@ -4504,21 +4503,21 @@ jit::PropertyReadNeedsTypeBarrier(JSContext *propertycx, } BarrierKind -jit::PropertyReadOnPrototypeNeedsTypeBarrier(types::CompilerConstraintList *constraints, +jit::PropertyReadOnPrototypeNeedsTypeBarrier(CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed) + TemporaryTypeSet *observed) { if (observed->unknown()) return BarrierKind::NoBarrier; - types::TypeSet *types = obj->resultTypeSet(); + TypeSet *types = obj->resultTypeSet(); if (!types || types->unknownObject()) return BarrierKind::TypeSet; BarrierKind res = BarrierKind::NoBarrier; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; while (true) { @@ -4526,7 +4525,7 @@ jit::PropertyReadOnPrototypeNeedsTypeBarrier(types::CompilerConstraintList *cons return BarrierKind::TypeSet; if (!key->proto().isObject()) break; - key = types::TypeSetObjectKey::get(key->proto().toObject()); + key = TypeSet::ObjectKey::get(key->proto().toObject()); BarrierKind kind = PropertyReadNeedsTypeBarrier(constraints, key, name, observed); if (kind == BarrierKind::TypeSet) return BarrierKind::TypeSet; @@ -4544,23 +4543,22 @@ jit::PropertyReadOnPrototypeNeedsTypeBarrier(types::CompilerConstraintList *cons } bool -jit::PropertyReadIsIdempotent(types::CompilerConstraintList *constraints, +jit::PropertyReadIsIdempotent(CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name) { // Determine if reading a property from obj is likely to be idempotent. - types::TypeSet *types = obj->resultTypeSet(); + TypeSet *types = obj->resultTypeSet(); if (!types || types->unknownObject()) return false; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); - if (key) { + if (TypeSet::ObjectKey *key = types->getObject(i)) { if (key->unknownProperties()) return false; // Check if the property has been reconfigured or is a getter. - types::HeapTypeSetKey property = key->property(NameToId(name)); + HeapTypeSetKey property = key->property(NameToId(name)); if (property.nonData(constraints)) return false; } @@ -4571,62 +4569,61 @@ jit::PropertyReadIsIdempotent(types::CompilerConstraintList *constraints, void jit::AddObjectsForPropertyRead(MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed) + TemporaryTypeSet *observed) { // Add objects to observed which *could* be observed by reading name from obj, // to hopefully avoid unnecessary type barriers and code invalidations. LifoAlloc *alloc = GetJitContext()->temp->lifoAlloc(); - types::TemporaryTypeSet *types = obj->resultTypeSet(); + TemporaryTypeSet *types = obj->resultTypeSet(); if (!types || types->unknownObject()) { - observed->addType(types::Type::AnyObjectType(), alloc); + observed->addType(TypeSet::AnyObjectType(), alloc); return; } for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key) continue; if (key->unknownProperties()) { - observed->addType(types::Type::AnyObjectType(), alloc); + observed->addType(TypeSet::AnyObjectType(), alloc); return; } jsid id = name ? NameToId(name) : JSID_VOID; - types::HeapTypeSetKey property = key->property(id); - types::HeapTypeSet *types = property.maybeTypes(); + HeapTypeSetKey property = key->property(id); + HeapTypeSet *types = property.maybeTypes(); if (!types) continue; if (types->unknownObject()) { - observed->addType(types::Type::AnyObjectType(), alloc); + observed->addType(TypeSet::AnyObjectType(), alloc); return; } for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); - if (key) - observed->addType(types::Type::ObjectType(key), alloc); + if (TypeSet::ObjectKey *key = types->getObject(i)) + observed->addType(TypeSet::ObjectType(key), alloc); } } } static bool -PropertyTypeIncludes(TempAllocator &alloc, types::HeapTypeSetKey property, +PropertyTypeIncludes(TempAllocator &alloc, HeapTypeSetKey property, MDefinition *value, MIRType implicitType) { // If implicitType is not MIRType_None, it is an additional type which the // property implicitly includes. In this case, make a new type set which // explicitly contains the type. - types::TypeSet *types = property.maybeTypes(); + TypeSet *types = property.maybeTypes(); if (implicitType != MIRType_None) { - types::Type newType = types::Type::PrimitiveType(ValueTypeFromMIRType(implicitType)); + TypeSet::Type newType = TypeSet::PrimitiveType(ValueTypeFromMIRType(implicitType)); if (types) types = types->clone(alloc.lifoAlloc()); else - types = alloc.lifoAlloc()->new_(); + types = alloc.lifoAlloc()->new_(); types->addType(newType, alloc.lifoAlloc()); } @@ -4634,8 +4631,8 @@ PropertyTypeIncludes(TempAllocator &alloc, types::HeapTypeSetKey property, } static bool -TryAddTypeBarrierForWrite(TempAllocator &alloc, types::CompilerConstraintList *constraints, - MBasicBlock *current, types::TemporaryTypeSet *objTypes, +TryAddTypeBarrierForWrite(TempAllocator &alloc, CompilerConstraintList *constraints, + MBasicBlock *current, TemporaryTypeSet *objTypes, PropertyName *name, MDefinition **pvalue, MIRType implicitType) { // Return whether pvalue was modified to include a type barrier ensuring @@ -4645,10 +4642,10 @@ TryAddTypeBarrierForWrite(TempAllocator &alloc, types::CompilerConstraintList *c // All objects in the set must have the same types for name. Otherwise, we // could bail out without subsequently triggering a type change that // invalidates the compiled code. - Maybe aggregateProperty; + Maybe aggregateProperty; for (size_t i = 0; i < objTypes->getObjectCount(); i++) { - types::TypeSetObjectKey *key = objTypes->getObject(i); + TypeSet::ObjectKey *key = objTypes->getObject(i); if (!key) continue; @@ -4656,7 +4653,7 @@ TryAddTypeBarrierForWrite(TempAllocator &alloc, types::CompilerConstraintList *c return false; jsid id = name ? NameToId(name) : JSID_VOID; - types::HeapTypeSetKey property = key->property(id); + HeapTypeSetKey property = key->property(id); if (!property.maybeTypes() || property.couldBeConstant(constraints)) return false; @@ -4704,7 +4701,7 @@ TryAddTypeBarrierForWrite(TempAllocator &alloc, types::CompilerConstraintList *c if ((*pvalue)->type() != MIRType_Value) return false; - types::TemporaryTypeSet *types = aggregateProperty->maybeTypes()->clone(alloc.lifoAlloc()); + TemporaryTypeSet *types = aggregateProperty->maybeTypes()->clone(alloc.lifoAlloc()); if (!types) return false; @@ -4721,7 +4718,7 @@ TryAddTypeBarrierForWrite(TempAllocator &alloc, types::CompilerConstraintList *c static MInstruction * AddGroupGuard(TempAllocator &alloc, MBasicBlock *current, MDefinition *obj, - types::TypeSetObjectKey *key, bool bailOnEquality) + TypeSet::ObjectKey *key, bool bailOnEquality) { MInstruction *guard; @@ -4742,8 +4739,8 @@ AddGroupGuard(TempAllocator &alloc, MBasicBlock *current, MDefinition *obj, // Whether value can be written to property without changing type information. bool -jit::CanWriteProperty(TempAllocator &alloc, types::CompilerConstraintList *constraints, - types::HeapTypeSetKey property, MDefinition *value, +jit::CanWriteProperty(TempAllocator &alloc, CompilerConstraintList *constraints, + HeapTypeSetKey property, MDefinition *value, MIRType implicitType /* = MIRType_None */) { if (property.couldBeConstant(constraints)) @@ -4752,7 +4749,7 @@ jit::CanWriteProperty(TempAllocator &alloc, types::CompilerConstraintList *const } bool -jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstraintList *constraints, +jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, CompilerConstraintList *constraints, MBasicBlock *current, MDefinition **pobj, PropertyName *name, MDefinition **pvalue, bool canModify, MIRType implicitType) @@ -4763,7 +4760,7 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstrai // properties that are accounted for by type information, i.e. normal data // properties and elements. - types::TemporaryTypeSet *types = (*pobj)->resultTypeSet(); + TemporaryTypeSet *types = (*pobj)->resultTypeSet(); if (!types || types->unknownObject()) return true; @@ -4774,7 +4771,7 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstrai bool success = true; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key || key->unknownProperties()) continue; @@ -4784,7 +4781,7 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstrai continue; jsid id = name ? NameToId(name) : JSID_VOID; - types::HeapTypeSetKey property = key->property(id); + HeapTypeSetKey property = key->property(id); if (!CanWriteProperty(alloc, constraints, property, *pvalue, implicitType)) { // Either pobj or pvalue needs to be modified to filter out the // types which the value could have but are not in the property, @@ -4808,16 +4805,16 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstrai if (types->getObjectCount() <= 1) return true; - types::TypeSetObjectKey *excluded = nullptr; + TypeSet::ObjectKey *excluded = nullptr; for (size_t i = 0; i < types->getObjectCount(); i++) { - types::TypeSetObjectKey *key = types->getObject(i); + TypeSet::ObjectKey *key = types->getObject(i); if (!key || key->unknownProperties()) continue; if (!name && IsAnyTypedArrayClass(key->clasp())) continue; jsid id = name ? NameToId(name) : JSID_VOID; - types::HeapTypeSetKey property = key->property(id); + HeapTypeSetKey property = key->property(id); if (CanWriteProperty(alloc, constraints, property, *pvalue, implicitType)) continue; diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 678c296880d0..3d11175c0bf6 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -363,7 +363,7 @@ class MDefinition : public MNode uint32_t flags_; // Bit flags. Range *range_; // Any computed range for this def. MIRType resultType_; // Representation of result type. - types::TemporaryTypeSet *resultTypeSet_; // Optional refinement of the result type. + TemporaryTypeSet *resultTypeSet_; // Optional refinement of the result type. union { MInstruction *dependency_; // Implicit dependency (store, call, etc.) of this instruction. // Used by alias analysis, GVN and LICM. @@ -608,7 +608,7 @@ class MDefinition : public MNode return resultType_; } - types::TemporaryTypeSet *resultTypeSet() const { + TemporaryTypeSet *resultTypeSet() const { return resultTypeSet_; } bool emptyResultTypeSet() const; @@ -781,7 +781,7 @@ class MDefinition : public MNode void setResultType(MIRType type) { resultType_ = type; } - void setResultTypeSet(types::TemporaryTypeSet *types) { + void setResultTypeSet(TemporaryTypeSet *types) { resultTypeSet_ = types; } @@ -1277,15 +1277,15 @@ class MConstant : public MNullaryInstruction Value value_; protected: - MConstant(const Value &v, types::CompilerConstraintList *constraints); + MConstant(const Value &v, CompilerConstraintList *constraints); explicit MConstant(JSObject *obj); public: INSTRUCTION_HEADER(Constant) static MConstant *New(TempAllocator &alloc, const Value &v, - types::CompilerConstraintList *constraints = nullptr); + CompilerConstraintList *constraints = nullptr); static MConstant *NewTypedValue(TempAllocator &alloc, const Value &v, MIRType type, - types::CompilerConstraintList *constraints = nullptr); + CompilerConstraintList *constraints = nullptr); static MConstant *NewAsmJS(TempAllocator &alloc, const Value &v, MIRType type); static MConstant *NewConstraintlessObject(TempAllocator &alloc, JSObject *v); @@ -1335,12 +1335,12 @@ class MNurseryObject : public MNullaryInstruction uint32_t index_; protected: - MNurseryObject(JSObject *obj, uint32_t index, types::CompilerConstraintList *constraints); + MNurseryObject(JSObject *obj, uint32_t index, CompilerConstraintList *constraints); public: INSTRUCTION_HEADER(NurseryObject) static MNurseryObject *New(TempAllocator &alloc, JSObject *obj, uint32_t index, - types::CompilerConstraintList *constraints = nullptr); + CompilerConstraintList *constraints = nullptr); HashNumber valueHash() const MOZ_OVERRIDE; bool congruentTo(const MDefinition *ins) const MOZ_OVERRIDE; @@ -2197,7 +2197,7 @@ class MParameter : public MNullaryInstruction public: static const int32_t THIS_SLOT = -1; - MParameter(int32_t index, types::TemporaryTypeSet *types) + MParameter(int32_t index, TemporaryTypeSet *types) : index_(index) { setResultType(MIRType_Value); @@ -2206,7 +2206,7 @@ class MParameter : public MNullaryInstruction public: INSTRUCTION_HEADER(Parameter) - static MParameter *New(TempAllocator &alloc, int32_t index, types::TemporaryTypeSet *types); + static MParameter *New(TempAllocator &alloc, int32_t index, TemporaryTypeSet *types); int32_t index() const { return index_; @@ -2540,7 +2540,7 @@ class MTest // background threads. So make callers explicitly call it if they want us // to check whether the operand might do this. If this method is never // called, we'll assume our operand can emulate undefined. - void cacheOperandMightEmulateUndefined(types::CompilerConstraintList *constraints); + void cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints); MDefinition *foldsTo(TempAllocator &alloc) MOZ_OVERRIDE; void filtersUndefinedOrNull(bool trueBranch, MDefinition **subject, bool *filtersUndefined, bool *filtersNull); @@ -2632,12 +2632,12 @@ class MThrow }; // Fabricate a type set containing only the type of the specified object. -types::TemporaryTypeSet * -MakeSingletonTypeSet(types::CompilerConstraintList *constraints, JSObject *obj); +TemporaryTypeSet * +MakeSingletonTypeSet(CompilerConstraintList *constraints, JSObject *obj); bool -MergeTypes(MIRType *ptype, types::TemporaryTypeSet **ptypeSet, - MIRType newType, types::TemporaryTypeSet *newTypeSet); +MergeTypes(MIRType *ptype, TemporaryTypeSet **ptypeSet, + MIRType newType, TemporaryTypeSet *newTypeSet); // Helper class to assert all GC pointers embedded in MIR instructions are // tenured. Off-thread Ion compilation and nursery GCs can happen in parallel, @@ -2689,7 +2689,7 @@ class MNewArray // Allocate space at initialization or not AllocatingBehaviour allocating_; - MNewArray(types::CompilerConstraintList *constraints, uint32_t count, MConstant *templateConst, + MNewArray(CompilerConstraintList *constraints, uint32_t count, MConstant *templateConst, gc::InitialHeap initialHeap, AllocatingBehaviour allocating) : MUnaryInstruction(templateConst), count_(count), @@ -2705,7 +2705,7 @@ class MNewArray public: INSTRUCTION_HEADER(NewArray) - static MNewArray *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MNewArray *New(TempAllocator &alloc, CompilerConstraintList *constraints, uint32_t count, MConstant *templateConst, gc::InitialHeap initialHeap, AllocatingBehaviour allocating) { @@ -2755,7 +2755,7 @@ class MNewArrayCopyOnWrite : public MNullaryInstruction AlwaysTenured templateObject_; gc::InitialHeap initialHeap_; - MNewArrayCopyOnWrite(types::CompilerConstraintList *constraints, ArrayObject *templateObject, + MNewArrayCopyOnWrite(CompilerConstraintList *constraints, ArrayObject *templateObject, gc::InitialHeap initialHeap) : templateObject_(templateObject), initialHeap_(initialHeap) @@ -2769,7 +2769,7 @@ class MNewArrayCopyOnWrite : public MNullaryInstruction INSTRUCTION_HEADER(NewArrayCopyOnWrite) static MNewArrayCopyOnWrite *New(TempAllocator &alloc, - types::CompilerConstraintList *constraints, + CompilerConstraintList *constraints, ArrayObject *templateObject, gc::InitialHeap initialHeap) { @@ -2796,7 +2796,7 @@ class MNewArrayDynamicLength AlwaysTenured templateObject_; gc::InitialHeap initialHeap_; - MNewArrayDynamicLength(types::CompilerConstraintList *constraints, ArrayObject *templateObject, + MNewArrayDynamicLength(CompilerConstraintList *constraints, ArrayObject *templateObject, gc::InitialHeap initialHeap, MDefinition *length) : MUnaryInstruction(length), templateObject_(templateObject), @@ -2811,7 +2811,7 @@ class MNewArrayDynamicLength public: INSTRUCTION_HEADER(NewArrayDynamicLength) - static MNewArrayDynamicLength *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MNewArrayDynamicLength *New(TempAllocator &alloc, CompilerConstraintList *constraints, ArrayObject *templateObject, gc::InitialHeap initialHeap, MDefinition *length) { @@ -2844,7 +2844,7 @@ class MNewObject gc::InitialHeap initialHeap_; Mode mode_; - MNewObject(types::CompilerConstraintList *constraints, MConstant *templateConst, + MNewObject(CompilerConstraintList *constraints, MConstant *templateConst, gc::InitialHeap initialHeap, Mode mode) : MUnaryInstruction(templateConst), initialHeap_(initialHeap), @@ -2867,7 +2867,7 @@ class MNewObject public: INSTRUCTION_HEADER(NewObject) - static MNewObject *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MNewObject *New(TempAllocator &alloc, CompilerConstraintList *constraints, MConstant *templateConst, gc::InitialHeap initialHeap, Mode mode) { @@ -2903,7 +2903,7 @@ class MNewTypedObject : public MNullaryInstruction AlwaysTenured templateObject_; gc::InitialHeap initialHeap_; - MNewTypedObject(types::CompilerConstraintList *constraints, + MNewTypedObject(CompilerConstraintList *constraints, InlineTypedObject *templateObject, gc::InitialHeap initialHeap) : templateObject_(templateObject), @@ -2917,7 +2917,7 @@ class MNewTypedObject : public MNullaryInstruction INSTRUCTION_HEADER(NewTypedObject) static MNewTypedObject *New(TempAllocator &alloc, - types::CompilerConstraintList *constraints, + CompilerConstraintList *constraints, InlineTypedObject *templateObject, gc::InitialHeap initialHeap) { @@ -2978,7 +2978,7 @@ class MSimdBox AlwaysTenured templateObject_; gc::InitialHeap initialHeap_; - MSimdBox(types::CompilerConstraintList *constraints, + MSimdBox(CompilerConstraintList *constraints, MDefinition *op, InlineTypedObject *templateObject, gc::InitialHeap initialHeap) @@ -2996,7 +2996,7 @@ class MSimdBox INSTRUCTION_HEADER(SimdBox) static MSimdBox *New(TempAllocator &alloc, - types::CompilerConstraintList *constraints, + CompilerConstraintList *constraints, MDefinition *op, InlineTypedObject *templateObject, gc::InitialHeap initialHeap) @@ -3910,7 +3910,7 @@ class MCompare void filtersUndefinedOrNull(bool trueBranch, MDefinition **subject, bool *filtersUndefined, bool *filtersNull); - void infer(types::CompilerConstraintList *constraints, + void infer(CompilerConstraintList *constraints, BaselineInspector *inspector, jsbytecode *pc); CompareType compareType() const { return compareType_; @@ -4002,10 +4002,10 @@ class MBox if (ins->resultTypeSet()) { setResultTypeSet(ins->resultTypeSet()); } else if (ins->type() != MIRType_Value) { - types::Type ntype = ins->type() == MIRType_Object - ? types::Type::AnyObjectType() - : types::Type::PrimitiveType(ValueTypeFromMIRType(ins->type())); - setResultTypeSet(alloc.lifoAlloc()->new_(alloc.lifoAlloc(), ntype)); + TypeSet::Type ntype = ins->type() == MIRType_Object + ? TypeSet::AnyObjectType() + : TypeSet::PrimitiveType(ValueTypeFromMIRType(ins->type())); + setResultTypeSet(alloc.lifoAlloc()->new_(alloc.lifoAlloc(), ntype)); } setMovable(); } @@ -4261,7 +4261,7 @@ class MCreateThisWithTemplate { gc::InitialHeap initialHeap_; - MCreateThisWithTemplate(types::CompilerConstraintList *constraints, MConstant *templateConst, + MCreateThisWithTemplate(CompilerConstraintList *constraints, MConstant *templateConst, gc::InitialHeap initialHeap) : MUnaryInstruction(templateConst), initialHeap_(initialHeap) @@ -4272,7 +4272,7 @@ class MCreateThisWithTemplate public: INSTRUCTION_HEADER(CreateThisWithTemplate) - static MCreateThisWithTemplate *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MCreateThisWithTemplate *New(TempAllocator &alloc, CompilerConstraintList *constraints, MConstant *templateConst, gc::InitialHeap initialHeap) { return new(alloc) MCreateThisWithTemplate(constraints, templateConst, initialHeap); @@ -4971,7 +4971,7 @@ class MTypeOf } MDefinition *foldsTo(TempAllocator &alloc) MOZ_OVERRIDE; - void cacheInputMaybeCallableOrEmulatesUndefined(types::CompilerConstraintList *constraints); + void cacheInputMaybeCallableOrEmulatesUndefined(CompilerConstraintList *constraints); bool inputMaybeCallableOrEmulatesUndefined() const { return inputMaybeCallableOrEmulatesUndefined_; @@ -6293,7 +6293,7 @@ class MStringSplit : public MTernaryInstruction, public MixPolicy, StringPolicy<1> >::Data { - MStringSplit(types::CompilerConstraintList *constraints, MDefinition *string, MDefinition *sep, + MStringSplit(CompilerConstraintList *constraints, MDefinition *string, MDefinition *sep, MConstant *templateObject) : MTernaryInstruction(string, sep, templateObject) { @@ -6304,7 +6304,7 @@ class MStringSplit public: INSTRUCTION_HEADER(StringSplit) - static MStringSplit *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MStringSplit *New(TempAllocator &alloc, CompilerConstraintList *constraints, MDefinition *string, MDefinition *sep, MConstant *templateObject) { @@ -6504,7 +6504,7 @@ class MPhi MOZ_FINAL // Add types for this phi which speculate about new inputs that may come in // via a loop backedge. - bool addBackedgeType(MIRType type, types::TemporaryTypeSet *typeSet); + bool addBackedgeType(MIRType type, TemporaryTypeSet *typeSet); // Initializes the operands vector to the given capacity, // permitting use of addInput() instead of addInputSlow(). @@ -6904,7 +6904,7 @@ class MRegExp : public MNullaryInstruction AlwaysTenured source_; bool mustClone_; - MRegExp(types::CompilerConstraintList *constraints, RegExpObject *source, bool mustClone) + MRegExp(CompilerConstraintList *constraints, RegExpObject *source, bool mustClone) : source_(source), mustClone_(mustClone) { @@ -6915,7 +6915,7 @@ class MRegExp : public MNullaryInstruction public: INSTRUCTION_HEADER(RegExp) - static MRegExp *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MRegExp *New(TempAllocator &alloc, CompilerConstraintList *constraints, RegExpObject *source, bool mustClone) { return new(alloc) MRegExp(constraints, source, mustClone); @@ -7183,7 +7183,7 @@ class MLambda { LambdaFunctionInfo info_; - MLambda(types::CompilerConstraintList *constraints, MDefinition *scopeChain, MConstant *cst) + MLambda(CompilerConstraintList *constraints, MDefinition *scopeChain, MConstant *cst) : MBinaryInstruction(scopeChain, cst), info_(&cst->value().toObject().as()) { setResultType(MIRType_Object); @@ -7194,7 +7194,7 @@ class MLambda public: INSTRUCTION_HEADER(Lambda) - static MLambda *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MLambda *New(TempAllocator &alloc, CompilerConstraintList *constraints, MDefinition *scopeChain, MConstant *fun) { return new(alloc) MLambda(constraints, scopeChain, fun); @@ -7220,7 +7220,7 @@ class MLambdaArrow { LambdaFunctionInfo info_; - MLambdaArrow(types::CompilerConstraintList *constraints, MDefinition *scopeChain, + MLambdaArrow(CompilerConstraintList *constraints, MDefinition *scopeChain, MDefinition *this_, JSFunction *fun) : MBinaryInstruction(scopeChain, this_), info_(fun) { @@ -7233,7 +7233,7 @@ class MLambdaArrow public: INSTRUCTION_HEADER(LambdaArrow) - static MLambdaArrow *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MLambdaArrow *New(TempAllocator &alloc, CompilerConstraintList *constraints, MDefinition *scopeChain, MDefinition *this_, JSFunction *fun) { return new(alloc) MLambdaArrow(constraints, scopeChain, this_, fun); @@ -7773,7 +7773,7 @@ class MNot INSTRUCTION_HEADER(Not) - void cacheOperandMightEmulateUndefined(types::CompilerConstraintList *constraints); + void cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints); MDefinition *foldsTo(TempAllocator &alloc) MOZ_OVERRIDE; void markOperandCantEmulateUndefined() { @@ -8514,7 +8514,7 @@ class MArrayConcat AlwaysTenured templateObj_; gc::InitialHeap initialHeap_; - MArrayConcat(types::CompilerConstraintList *constraints, MDefinition *lhs, MDefinition *rhs, + MArrayConcat(CompilerConstraintList *constraints, MDefinition *lhs, MDefinition *rhs, ArrayObject *templateObj, gc::InitialHeap initialHeap) : MBinaryInstruction(lhs, rhs), templateObj_(templateObj), @@ -8527,7 +8527,7 @@ class MArrayConcat public: INSTRUCTION_HEADER(ArrayConcat) - static MArrayConcat *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MArrayConcat *New(TempAllocator &alloc, CompilerConstraintList *constraints, MDefinition *lhs, MDefinition *rhs, ArrayObject *templateObj, gc::InitialHeap initialHeap) { @@ -9251,7 +9251,7 @@ class InlinePropertyTable : public TempObject } bool hasFunction(JSFunction *func) const; - types::TemporaryTypeSet *buildTypeSetForFunction(JSFunction *func) const; + TemporaryTypeSet *buildTypeSetForFunction(JSFunction *func) const; // Remove targets that vetoed inlining from the InlinePropertyTable. void trimTo(ObjectVector &targets, BoolVector &choiceSet); @@ -11319,7 +11319,7 @@ class MRest public MRestCommon, public IntPolicy<0>::Data { - MRest(types::CompilerConstraintList *constraints, MDefinition *numActuals, unsigned numFormals, + MRest(CompilerConstraintList *constraints, MDefinition *numActuals, unsigned numFormals, ArrayObject *templateObject) : MUnaryInstruction(numActuals), MRestCommon(numFormals, templateObject) @@ -11331,7 +11331,7 @@ class MRest public: INSTRUCTION_HEADER(Rest) - static MRest *New(TempAllocator &alloc, types::CompilerConstraintList *constraints, + static MRest *New(TempAllocator &alloc, CompilerConstraintList *constraints, MDefinition *numActuals, unsigned numFormals, ArrayObject *templateObject) { @@ -11354,7 +11354,7 @@ class MFilterTypeSet : public MUnaryInstruction, public FilterTypeSetPolicy::Data { - MFilterTypeSet(MDefinition *def, types::TemporaryTypeSet *types) + MFilterTypeSet(MDefinition *def, TemporaryTypeSet *types) : MUnaryInstruction(def) { MOZ_ASSERT(!types->unknown()); @@ -11365,7 +11365,7 @@ class MFilterTypeSet public: INSTRUCTION_HEADER(FilterTypeSet) - static MFilterTypeSet *New(TempAllocator &alloc, MDefinition *def, types::TemporaryTypeSet *types) { + static MFilterTypeSet *New(TempAllocator &alloc, MDefinition *def, TemporaryTypeSet *types) { return new(alloc) MFilterTypeSet(def, types); } @@ -11388,7 +11388,7 @@ class MTypeBarrier { BarrierKind barrierKind_; - MTypeBarrier(MDefinition *def, types::TemporaryTypeSet *types, BarrierKind kind) + MTypeBarrier(MDefinition *def, TemporaryTypeSet *types, BarrierKind kind) : MUnaryInstruction(def), barrierKind_(kind) { @@ -11405,7 +11405,7 @@ class MTypeBarrier public: INSTRUCTION_HEADER(TypeBarrier) - static MTypeBarrier *New(TempAllocator &alloc, MDefinition *def, types::TemporaryTypeSet *types, + static MTypeBarrier *New(TempAllocator &alloc, MDefinition *def, TemporaryTypeSet *types, BarrierKind kind = BarrierKind::TypeSet) { return new(alloc) MTypeBarrier(def, types, kind); } @@ -11444,10 +11444,10 @@ class MMonitorTypes : public MUnaryInstruction, public BoxInputsPolicy::Data { - const types::TemporaryTypeSet *typeSet_; + const TemporaryTypeSet *typeSet_; BarrierKind barrierKind_; - MMonitorTypes(MDefinition *def, const types::TemporaryTypeSet *types, BarrierKind kind) + MMonitorTypes(MDefinition *def, const TemporaryTypeSet *types, BarrierKind kind) : MUnaryInstruction(def), typeSet_(types), barrierKind_(kind) @@ -11461,12 +11461,12 @@ class MMonitorTypes public: INSTRUCTION_HEADER(MonitorTypes) - static MMonitorTypes *New(TempAllocator &alloc, MDefinition *def, const types::TemporaryTypeSet *types, + static MMonitorTypes *New(TempAllocator &alloc, MDefinition *def, const TemporaryTypeSet *types, BarrierKind kind) { return new(alloc) MMonitorTypes(def, types, kind); } - const types::TemporaryTypeSet *typeSet() const { + const TemporaryTypeSet *typeSet() const { return typeSet_; } BarrierKind barrierKind() const { @@ -12701,35 +12701,35 @@ MControlInstruction *MDefinition::toControlInstruction() { // Helper functions used to decide how to build MIR. -bool ElementAccessIsDenseNative(types::CompilerConstraintList *constraints, +bool ElementAccessIsDenseNative(CompilerConstraintList *constraints, MDefinition *obj, MDefinition *id); -bool ElementAccessIsAnyTypedArray(types::CompilerConstraintList *constraints, +bool ElementAccessIsAnyTypedArray(CompilerConstraintList *constraints, MDefinition *obj, MDefinition *id, Scalar::Type *arrayType); -bool ElementAccessIsPacked(types::CompilerConstraintList *constraints, MDefinition *obj); -bool ElementAccessMightBeCopyOnWrite(types::CompilerConstraintList *constraints, MDefinition *obj); -bool ElementAccessHasExtraIndexedProperty(types::CompilerConstraintList *constraints, +bool ElementAccessIsPacked(CompilerConstraintList *constraints, MDefinition *obj); +bool ElementAccessMightBeCopyOnWrite(CompilerConstraintList *constraints, MDefinition *obj); +bool ElementAccessHasExtraIndexedProperty(CompilerConstraintList *constraints, MDefinition *obj); -MIRType DenseNativeElementType(types::CompilerConstraintList *constraints, MDefinition *obj); +MIRType DenseNativeElementType(CompilerConstraintList *constraints, MDefinition *obj); BarrierKind PropertyReadNeedsTypeBarrier(JSContext *propertycx, - types::CompilerConstraintList *constraints, - types::TypeSetObjectKey *key, PropertyName *name, - types::TemporaryTypeSet *observed, bool updateObserved); + CompilerConstraintList *constraints, + TypeSet::ObjectKey *key, PropertyName *name, + TemporaryTypeSet *observed, bool updateObserved); BarrierKind PropertyReadNeedsTypeBarrier(JSContext *propertycx, - types::CompilerConstraintList *constraints, + CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed); -BarrierKind PropertyReadOnPrototypeNeedsTypeBarrier(types::CompilerConstraintList *constraints, + TemporaryTypeSet *observed); +BarrierKind PropertyReadOnPrototypeNeedsTypeBarrier(CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed); -bool PropertyReadIsIdempotent(types::CompilerConstraintList *constraints, + TemporaryTypeSet *observed); +bool PropertyReadIsIdempotent(CompilerConstraintList *constraints, MDefinition *obj, PropertyName *name); void AddObjectsForPropertyRead(MDefinition *obj, PropertyName *name, - types::TemporaryTypeSet *observed); -bool CanWriteProperty(TempAllocator &alloc, types::CompilerConstraintList *constraints, - types::HeapTypeSetKey property, MDefinition *value, + TemporaryTypeSet *observed); +bool CanWriteProperty(TempAllocator &alloc, CompilerConstraintList *constraints, + HeapTypeSetKey property, MDefinition *value, MIRType implicitType = MIRType_None); -bool PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, types::CompilerConstraintList *constraints, +bool PropertyWriteNeedsTypeBarrier(TempAllocator &alloc, CompilerConstraintList *constraints, MBasicBlock *current, MDefinition **pobj, PropertyName *name, MDefinition **pvalue, bool canModify, MIRType implicitType = MIRType_None); diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp index 27e0f278a84e..b6d94464c497 100644 --- a/js/src/jit/MacroAssembler.cpp +++ b/js/src/jit/MacroAssembler.cpp @@ -37,17 +37,17 @@ namespace { // Emulate a TypeSet logic from a Type object to avoid duplicating the guard // logic. class TypeWrapper { - types::Type t_; + TypeSet::Type t_; public: - explicit TypeWrapper(types::Type t) : t_(t) {} + explicit TypeWrapper(TypeSet::Type t) : t_(t) {} inline bool unknown() const { return t_.isUnknown(); } - inline bool hasType(types::Type t) const { - if (t == types::Type::Int32Type()) - return t == t_ || t_ == types::Type::DoubleType(); + inline bool hasType(TypeSet::Type t) const { + if (t == TypeSet::Int32Type()) + return t == t_ || t_ == TypeSet::DoubleType(); return t == t_; } inline unsigned getObjectCount() const { @@ -69,30 +69,30 @@ class TypeWrapper { } /* anonymous namespace */ -template void -MacroAssembler::guardTypeSet(const Source &address, const TypeSet *types, BarrierKind kind, +template void +MacroAssembler::guardTypeSet(const Source &address, const Set *types, BarrierKind kind, Register scratch, Label *miss) { MOZ_ASSERT(kind == BarrierKind::TypeTagOnly || kind == BarrierKind::TypeSet); MOZ_ASSERT(!types->unknown()); Label matched; - types::Type tests[8] = { - types::Type::Int32Type(), - types::Type::UndefinedType(), - types::Type::BooleanType(), - types::Type::StringType(), - types::Type::SymbolType(), - types::Type::NullType(), - types::Type::MagicArgType(), - types::Type::AnyObjectType() + TypeSet::Type tests[8] = { + TypeSet::Int32Type(), + TypeSet::UndefinedType(), + TypeSet::BooleanType(), + TypeSet::StringType(), + TypeSet::SymbolType(), + TypeSet::NullType(), + TypeSet::MagicArgType(), + TypeSet::AnyObjectType() }; // The double type also implies Int32. // So replace the int32 test with the double one. - if (types->hasType(types::Type::DoubleType())) { - MOZ_ASSERT(types->hasType(types::Type::Int32Type())); - tests[0] = types::Type::DoubleType(); + if (types->hasType(TypeSet::DoubleType())) { + MOZ_ASSERT(types->hasType(TypeSet::Int32Type())); + tests[0] = TypeSet::DoubleType(); } Register tag = extractTag(address, scratch); @@ -109,7 +109,7 @@ MacroAssembler::guardTypeSet(const Source &address, const TypeSet *types, Barrie } // If this is the last check, invert the last branch. - if (types->hasType(types::Type::AnyObjectType()) || !types->getObjectCount()) { + if (types->hasType(TypeSet::AnyObjectType()) || !types->getObjectCount()) { if (!lastBranch.isInitialized()) { jump(miss); return; @@ -156,12 +156,12 @@ MacroAssembler::guardTypeSet(const Source &address, const TypeSet *types, Barrie bind(&matched); } -template void -MacroAssembler::guardObjectType(Register obj, const TypeSet *types, +template void +MacroAssembler::guardObjectType(Register obj, const Set *types, Register scratch, Label *miss) { MOZ_ASSERT(!types->unknown()); - MOZ_ASSERT(!types->hasType(types::Type::AnyObjectType())); + MOZ_ASSERT(!types->hasType(TypeSet::AnyObjectType())); MOZ_ASSERT(types->getObjectCount()); MOZ_ASSERT(scratch != InvalidReg); @@ -229,28 +229,28 @@ MacroAssembler::guardObjectType(Register obj, const TypeSet *types, } template void -MacroAssembler::guardType(const Source &address, types::Type type, +MacroAssembler::guardType(const Source &address, TypeSet::Type type, Register scratch, Label *miss) { TypeWrapper wrapper(type); guardTypeSet(address, &wrapper, BarrierKind::TypeSet, scratch, miss); } -template void MacroAssembler::guardTypeSet(const Address &address, const types::TemporaryTypeSet *types, +template void MacroAssembler::guardTypeSet(const Address &address, const TemporaryTypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const ValueOperand &value, const types::TemporaryTypeSet *types, +template void MacroAssembler::guardTypeSet(const ValueOperand &value, const TemporaryTypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const Address &address, const types::HeapTypeSet *types, +template void MacroAssembler::guardTypeSet(const Address &address, const HeapTypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const ValueOperand &value, const types::HeapTypeSet *types, +template void MacroAssembler::guardTypeSet(const ValueOperand &value, const HeapTypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const TypedOrValueRegister ®, const types::HeapTypeSet *types, +template void MacroAssembler::guardTypeSet(const TypedOrValueRegister ®, const HeapTypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const Address &address, const types::TypeSet *types, +template void MacroAssembler::guardTypeSet(const Address &address, const TypeSet *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardTypeSet(const ValueOperand &value, const types::TypeSet *types, +template void MacroAssembler::guardTypeSet(const ValueOperand &value, const TypeSet *types, BarrierKind kind, Register scratch, Label *miss); template void MacroAssembler::guardTypeSet(const Address &address, const TypeWrapper *types, @@ -258,16 +258,16 @@ template void MacroAssembler::guardTypeSet(const Address &address, const TypeWra template void MacroAssembler::guardTypeSet(const ValueOperand &value, const TypeWrapper *types, BarrierKind kind, Register scratch, Label *miss); -template void MacroAssembler::guardObjectType(Register obj, const types::TemporaryTypeSet *types, +template void MacroAssembler::guardObjectType(Register obj, const TemporaryTypeSet *types, Register scratch, Label *miss); -template void MacroAssembler::guardObjectType(Register obj, const types::TypeSet *types, +template void MacroAssembler::guardObjectType(Register obj, const TypeSet *types, Register scratch, Label *miss); template void MacroAssembler::guardObjectType(Register obj, const TypeWrapper *types, Register scratch, Label *miss); -template void MacroAssembler::guardType(const Address &address, types::Type type, +template void MacroAssembler::guardType(const Address &address, TypeSet::Type type, Register scratch, Label *miss); -template void MacroAssembler::guardType(const ValueOperand &value, types::Type type, +template void MacroAssembler::guardType(const ValueOperand &value, TypeSet::Type type, Register scratch, Label *miss); template diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h index ddb8eae3ebaa..278f78be69aa 100644 --- a/js/src/jit/MacroAssembler.h +++ b/js/src/jit/MacroAssembler.h @@ -118,20 +118,20 @@ class MacroAssembler : public MacroAssemblerSpecific }; /* - * Creates a branch based on a specific types::Type. - * Note: emits number test (int/double) for types::Type::DoubleType() + * Creates a branch based on a specific TypeSet::Type. + * Note: emits number test (int/double) for TypeSet::DoubleType() */ class BranchType : public Branch { - types::Type type_; + TypeSet::Type type_; public: BranchType() : Branch(), - type_(types::Type::UnknownType()) + type_(TypeSet::UnknownType()) { } - BranchType(Condition cond, Register reg, types::Type type, Label *jump) + BranchType(Condition cond, Register reg, TypeSet::Type type, Label *jump) : Branch(cond, reg, jump), type_(type) { } @@ -278,7 +278,7 @@ class MacroAssembler : public MacroAssemblerSpecific template void guardObjectType(Register obj, const TypeSet *types, Register scratch, Label *miss); template - void guardType(const Source &address, types::Type type, Register scratch, Label *miss); + void guardType(const Source &address, TypeSet::Type type, Register scratch, Label *miss); void loadObjShape(Register objReg, Register dest) { loadPtr(Address(objReg, JSObject::offsetOfShape()), dest); diff --git a/js/src/jit/OptimizationTracking.cpp b/js/src/jit/OptimizationTracking.cpp index a5c3aed54015..6f9ca1a2f1ad 100644 --- a/js/src/jit/OptimizationTracking.cpp +++ b/js/src/jit/OptimizationTracking.cpp @@ -138,7 +138,7 @@ SpewTempOptimizationTypeInfoVector(const TempOptimizationTypeInfoVector *types, indent ? indent : "", TrackedTypeSiteString(t->site()), StringFromMIRType(t->mirType())); for (uint32_t i = 0; i < t->types().length(); i++) - JitSpewCont(JitSpew_OptimizationTracking, " %s", types::TypeString(t->types()[i])); + JitSpewCont(JitSpew_OptimizationTracking, " %s", TypeSet::TypeString(t->types()[i])); JitSpewFin(JitSpew_OptimizationTracking); } #endif @@ -166,7 +166,7 @@ TrackedOptimizations::spew() const } bool -OptimizationTypeInfo::trackTypeSet(types::TemporaryTypeSet *typeSet) +OptimizationTypeInfo::trackTypeSet(TemporaryTypeSet *typeSet) { if (!typeSet) return true; @@ -174,7 +174,7 @@ OptimizationTypeInfo::trackTypeSet(types::TemporaryTypeSet *typeSet) } bool -OptimizationTypeInfo::trackType(types::Type type) +OptimizationTypeInfo::trackType(TypeSet::Type type) { return types_.append(type); } @@ -202,15 +202,15 @@ CombineHash(HashNumber h, HashNumber n) } static inline HashNumber -HashType(types::Type ty) +HashType(TypeSet::Type ty) { if (ty.isObjectUnchecked()) - return PointerHasher::hash(ty.objectKey()); + return PointerHasher::hash(ty.objectKey()); return HashNumber(ty.raw()); } static HashNumber -HashTypeList(const types::TypeSet::TypeList &types) +HashTypeList(const TypeSet::TypeList &types) { HashNumber h = 0; for (uint32_t i = 0; i < types.length(); i++) @@ -348,18 +348,18 @@ class jit::UniqueTrackedTypes public: struct TypeHasher { - typedef types::Type Lookup; + typedef TypeSet::Type Lookup; static HashNumber hash(const Lookup &ty) { return HashType(ty); } - static bool match(const types::Type &ty1, const types::Type &ty2) { return ty1 == ty2; } + static bool match(const TypeSet::Type &ty1, const TypeSet::Type &ty2) { return ty1 == ty2; } }; private: - // Map of unique types::Types to indices. - typedef HashMap TypesMap; + // Map of unique TypeSet::Types to indices. + typedef HashMap TypesMap; TypesMap map_; - Vector list_; + Vector list_; public: explicit UniqueTrackedTypes(JSContext *cx) @@ -368,14 +368,14 @@ class jit::UniqueTrackedTypes { } bool init() { return map_.init(); } - bool getIndexOf(types::Type ty, uint8_t *indexp); + bool getIndexOf(TypeSet::Type ty, uint8_t *indexp); uint32_t count() const { MOZ_ASSERT(map_.count() == list_.length()); return list_.length(); } - bool enumerate(types::TypeSet::TypeList *types) const; + bool enumerate(TypeSet::TypeList *types) const; }; bool -UniqueTrackedTypes::getIndexOf(types::Type ty, uint8_t *indexp) +UniqueTrackedTypes::getIndexOf(TypeSet::Type ty, uint8_t *indexp) { TypesMap::AddPtr p = map_.lookupForAdd(ty); if (p) { @@ -398,7 +398,7 @@ UniqueTrackedTypes::getIndexOf(types::Type ty, uint8_t *indexp) } bool -UniqueTrackedTypes::enumerate(types::TypeSet::TypeList *types) const +UniqueTrackedTypes::enumerate(TypeSet::TypeList *types) const { return types->append(list_.begin(), list_.end()); } @@ -814,19 +814,19 @@ WriteOffsetsTable(CompactBufferWriter &writer, const Vector &offse } static JSFunction * -MaybeConstructorFromType(types::Type ty) +MaybeConstructorFromType(TypeSet::Type ty) { if (ty.isUnknown() || ty.isAnyObject() || !ty.isGroup()) return nullptr; ObjectGroup *obj = ty.group(); - types::TypeNewScript *newScript = obj->newScript(); + TypeNewScript *newScript = obj->newScript(); if (!newScript && obj->maybeUnboxedLayout()) newScript = obj->unboxedLayout().newScript(); return newScript ? newScript->function() : nullptr; } static void -SpewConstructor(types::Type ty, JSFunction *constructor) +SpewConstructor(TypeSet::Type ty, JSFunction *constructor) { #ifdef DEBUG char buf[512]; @@ -843,16 +843,16 @@ SpewConstructor(types::Type ty, JSFunction *constructor) } JitSpew(JitSpew_OptimizationTracking, " Unique type %s has constructor %s (%s:%u)", - types::TypeString(ty), buf, filename, lineno); + TypeSet::TypeString(ty), buf, filename, lineno); #endif } static void -SpewAllocationSite(types::Type ty, JSScript *script, uint32_t offset) +SpewAllocationSite(TypeSet::Type ty, JSScript *script, uint32_t offset) { #ifdef DEBUG JitSpew(JitSpew_OptimizationTracking, " Unique type %s has alloc site %s:%u", - types::TypeString(ty), script->filename(), + TypeSet::TypeString(ty), script->filename(), PCToLineNumber(script, script->offsetToPC(offset))); #endif } @@ -942,11 +942,11 @@ jit::WriteIonTrackedOptimizationsTable(JSContext *cx, CompactBufferWriter &write // instead of during profiling to avoid touching compartment tables during // profiling. Additionally, TypeNewScript is subject to GC in the // meantime. - types::TypeSet::TypeList uniqueTypeList; + TypeSet::TypeList uniqueTypeList; if (!uniqueTypes.enumerate(&uniqueTypeList)) return false; for (uint32_t i = 0; i < uniqueTypeList.length(); i++) { - types::Type ty = uniqueTypeList[i]; + TypeSet::Type ty = uniqueTypeList[i]; if (JSFunction *constructor = MaybeConstructorFromType(ty)) { if (!allTypes->append(IonTrackedTypeWithAddendum(ty, constructor))) return false; @@ -954,7 +954,9 @@ jit::WriteIonTrackedOptimizationsTable(JSContext *cx, CompactBufferWriter &write } else { JSScript *script; uint32_t offset; - if (ObjectGroup::findAllocationSiteForType(cx, ty, &script, &offset)) { + if (!ty.isUnknown() && !ty.isAnyObject() && ty.isGroup() && + ObjectGroup::findAllocationSite(cx, ty.group(), &script, &offset)) + { if (!allTypes->append(IonTrackedTypeWithAddendum(ty, script, offset))) return false; SpewAllocationSite(ty, script, offset); @@ -1032,7 +1034,7 @@ IonBuilder::startTrackingOptimizations() void IonBuilder::trackTypeInfoUnchecked(TrackedTypeSite kind, MIRType mirType, - types::TemporaryTypeSet *typeSet) + TemporaryTypeSet *typeSet) { BytecodeSite *site = current->trackedSite(); // OOMs are handled as if optimization tracking were turned off. @@ -1051,7 +1053,7 @@ IonBuilder::trackTypeInfoUnchecked(TrackedTypeSite kind, JSObject *obj) BytecodeSite *site = current->trackedSite(); // OOMs are handled as if optimization tracking were turned off. OptimizationTypeInfo typeInfo(kind, MIRType_Object); - if (!typeInfo.trackType(types::Type::ObjectType(obj))) + if (!typeInfo.trackType(TypeSet::ObjectType(obj))) return; if (!site->optimizations()->trackTypeInfo(mozilla::Move(typeInfo))) site->setOptimizations(nullptr); @@ -1068,7 +1070,7 @@ IonBuilder::trackTypeInfoUnchecked(CallInfo &callInfo) trackTypeInfoUnchecked(TrackedTypeSite::Call_Arg, arg->type(), arg->resultTypeSet()); } - types::TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); + TemporaryTypeSet *returnTypes = getInlineReturnTypeSet(); trackTypeInfoUnchecked(TrackedTypeSite::Call_Return, returnTypes->getKnownMIRType(), returnTypes); } @@ -1140,7 +1142,7 @@ InterpretedFunctionFromTrackedType(const IonTrackedTypeWithAddendum &tracked) if (tracked.hasConstructor()) return tracked.constructor; - types::Type ty = tracked.type; + TypeSet::Type ty = tracked.type; if (ty.isSingleton()) { JSObject *obj = ty.singleton(); @@ -1162,10 +1164,10 @@ class ForEachTypeInfoAdapter : public IonTrackedOptimizationsTypeInfo::ForEachOp { } void readType(const IonTrackedTypeWithAddendum &tracked) MOZ_OVERRIDE { - types::Type ty = tracked.type; + TypeSet::Type ty = tracked.type; if (ty.isPrimitive() || ty.isUnknown() || ty.isAnyObject()) { - op_.readType("primitive", types::NonObjectTypeString(ty), nullptr, 0); + op_.readType("primitive", TypeSet::NonObjectTypeString(ty), nullptr, 0); return; } diff --git a/js/src/jit/OptimizationTracking.h b/js/src/jit/OptimizationTracking.h index 2876dfa1a3ec..c2dbb7735a09 100644 --- a/js/src/jit/OptimizationTracking.h +++ b/js/src/jit/OptimizationTracking.h @@ -59,7 +59,7 @@ class OptimizationTypeInfo { JS::TrackedTypeSite site_; MIRType mirType_; - types::TypeSet::TypeList types_; + TypeSet::TypeList types_; public: OptimizationTypeInfo(OptimizationTypeInfo &&other) @@ -73,12 +73,12 @@ class OptimizationTypeInfo mirType_(mirType) { } - bool trackTypeSet(types::TemporaryTypeSet *typeSet); - bool trackType(types::Type type); + bool trackTypeSet(TemporaryTypeSet *typeSet); + bool trackType(TypeSet::Type type); JS::TrackedTypeSite site() const { return site_; } MIRType mirType() const { return mirType_; } - const types::TypeSet::TypeList &types() const { return types_; } + const TypeSet::TypeList &types() const { return types_; } bool operator ==(const OptimizationTypeInfo &other) const; bool operator !=(const OptimizationTypeInfo &other) const; @@ -421,7 +421,7 @@ class IonTrackedOptimizationsAttempts struct IonTrackedTypeWithAddendum { - types::Type type; + TypeSet::Type type; enum HasAddendum { HasNothing, @@ -441,19 +441,19 @@ struct IonTrackedTypeWithAddendum JSFunction *constructor; }; - explicit IonTrackedTypeWithAddendum(types::Type type) + explicit IonTrackedTypeWithAddendum(TypeSet::Type type) : type(type), hasAddendum(HasNothing) { } - IonTrackedTypeWithAddendum(types::Type type, JSScript *script, uint32_t offset) + IonTrackedTypeWithAddendum(TypeSet::Type type, JSScript *script, uint32_t offset) : type(type), hasAddendum(HasAllocationSite), script(script), offset(offset) { } - IonTrackedTypeWithAddendum(types::Type type, JSFunction *constructor) + IonTrackedTypeWithAddendum(TypeSet::Type type, JSFunction *constructor) : type(type), hasAddendum(HasConstructor), constructor(constructor) @@ -482,7 +482,7 @@ class IonTrackedOptimizationsTypeInfo // Unlike IonTrackedOptimizationAttempts, // JS::ForEachTrackedOptimizaitonTypeInfoOp cannot be used directly. The // internal API needs to deal with engine-internal data structures (e.g., - // types::Type) directly. + // TypeSet::Type) directly. struct ForEachOp { virtual void readType(const IonTrackedTypeWithAddendum &tracked) = 0; diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 7f637041f910..9547c3db5abc 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -99,7 +99,7 @@ InvokeFunction(JSContext *cx, HandleObject obj0, uint32_t argc, Value *argv, Val if (obj->is()) { jsbytecode *pc; RootedScript script(cx, cx->currentScript(&pc)); - types::TypeScript::Monitor(cx, script, pc, rv.get()); + TypeScript::Monitor(cx, script, pc, rv.get()); } *rval = rv; @@ -330,7 +330,7 @@ ArrayPopDense(JSContext *cx, HandleObject obj, MutableHandleValue rval) // have to monitor the return value. rval.set(argv[0]); if (rval.isUndefined()) - types::TypeScript::Monitor(cx, rval); + TypeScript::Monitor(cx, rval); return true; } @@ -380,7 +380,7 @@ ArrayShiftDense(JSContext *cx, HandleObject obj, MutableHandleValue rval) // have to monitor the return value. rval.set(argv[0]); if (rval.isUndefined()) - types::TypeScript::Monitor(cx, rval); + TypeScript::Monitor(cx, rval); return true; } @@ -583,7 +583,7 @@ GetIntrinsicValue(JSContext *cx, HandlePropertyName name, MutableHandleValue rva // purposes, as its side effect is not observable from JS. We are // guaranteed to bail out after this function, but because of its AliasSet, // type info will not be reflowed. Manually monitor here. - types::TypeScript::Monitor(cx, rval); + TypeScript::Monitor(cx, rval); return true; } diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp index 4a19409e54c6..5da87f372a9a 100644 --- a/js/src/jit/shared/CodeGenerator-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-shared.cpp @@ -874,7 +874,7 @@ class ReadTempAttemptsVectorOp : public JS::ForEachTrackedOptimizationAttemptOp struct ReadTempTypeInfoVectorOp : public IonTrackedOptimizationsTypeInfo::ForEachOp { TempOptimizationTypeInfoVector *types_; - types::TypeSet::TypeList accTypes_; + TypeSet::TypeList accTypes_; public: explicit ReadTempTypeInfoVectorOp(TempOptimizationTypeInfoVector *types) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index f05c46630f36..7211de669311 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -97,7 +97,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::Maybe; using mozilla::PodCopy; diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 8f99d7f54130..0aa41ddd034e 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -44,7 +44,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::Abs; using mozilla::ArrayLength; @@ -1225,8 +1224,7 @@ InitArrayTypes(JSContext *cx, ObjectGroup *group, const Value *vector, unsigned for (unsigned i = 0; i < count; i++) { if (vector[i].isMagic(JS_ELEMENTS_HOLE)) continue; - Type valtype = GetValueType(vector[i]); - types->addType(cx, valtype); + types->addType(cx, TypeSet::GetValueType(vector[i])); } } return true; diff --git a/js/src/jsbool.cpp b/js/src/jsbool.cpp index ac6496f990cc..66dde969d85f 100644 --- a/js/src/jsbool.cpp +++ b/js/src/jsbool.cpp @@ -23,7 +23,6 @@ #include "vm/BooleanObject-inl.h" using namespace js; -using namespace js::types; const Class BooleanObject::class_ = { "Boolean", diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index 9e55b9481479..e65292f81604 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -253,7 +253,7 @@ js::DestroyContext(JSContext *cx, DestroyContextMode mode) * This printing depends on atoms still existing. */ for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) - types::PrintTypes(cx, c, false); + PrintTypes(cx, c, false); } if (mode == DCM_FORCE_GC) { MOZ_ASSERT(!rt->isHeapBusy()); diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index 157f7d3ff274..fab770dd68c8 100644 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -46,7 +46,6 @@ #include "jsobjinlines.h" using namespace js; -using namespace js::types; using mozilla::ArrayLength; using mozilla::IsFinite; diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index a22148a6ff0c..4456b191fd56 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -37,7 +37,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::ArrayLength; using mozilla::PodArrayZero; diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 909bebd67b20..867977a0f5d5 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -49,7 +49,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using namespace js::frontend; using mozilla::ArrayLength; diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 861c2ab75796..1f8c4ff17be5 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2218,7 +2218,7 @@ GCRuntime::sweepTypesAfterCompacting(Zone *zone) FreeOp *fop = rt->defaultFreeOp(); zone->beginSweepTypes(fop, rt->gc.releaseObservedTypes && !zone->isPreservingCode()); - types::AutoClearTypeInferenceStateOnOOM oom(zone); + AutoClearTypeInferenceStateOnOOM oom(zone); for (ZoneCellIterUnderGC i(zone, FINALIZE_SCRIPT); !i.done(); i.next()) { JSScript *script = i.get(); @@ -5191,13 +5191,13 @@ SweepThing(Shape *shape) } static void -SweepThing(JSScript *script, types::AutoClearTypeInferenceStateOnOOM *oom) +SweepThing(JSScript *script, AutoClearTypeInferenceStateOnOOM *oom) { script->maybeSweepTypes(oom); } static void -SweepThing(ObjectGroup *group, types::AutoClearTypeInferenceStateOnOOM *oom) +SweepThing(ObjectGroup *group, AutoClearTypeInferenceStateOnOOM *oom) { group->maybeSweep(oom); } @@ -5245,7 +5245,7 @@ GCRuntime::sweepPhase(SliceBudget &sliceBudget) for (; sweepZone; sweepZone = sweepZone->nextNodeInGroup()) { ArenaLists &al = sweepZone->arenas; - types::AutoClearTypeInferenceStateOnOOM oom(sweepZone); + AutoClearTypeInferenceStateOnOOM oom(sweepZone); if (!SweepArenaList(&al.gcScriptArenasToUpdate, sliceBudget, &oom)) return NotFinished; diff --git a/js/src/jsinfer.cpp b/js/src/jsinfer.cpp index 06130703197d..d642120b57b5 100644 --- a/js/src/jsinfer.cpp +++ b/js/src/jsinfer.cpp @@ -41,7 +41,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::DebugOnly; using mozilla::Maybe; @@ -76,7 +75,7 @@ id_caller(JSContext *cx) } const char * -types::TypeIdStringImpl(jsid id) +js::TypeIdStringImpl(jsid id) { if (JSID_IS_VOID(id)) return "(index)"; @@ -97,8 +96,8 @@ types::TypeIdStringImpl(jsid id) // Logging ///////////////////////////////////////////////////////////////////// -const char * -types::NonObjectTypeString(Type type) +/* static */ const char * +TypeSet::NonObjectTypeString(TypeSet::Type type) { if (type.isPrimitive()) { switch (type.primitive()) { @@ -170,7 +169,7 @@ static bool InferSpewColorable() } const char * -types::InferSpewColorReset() +js::InferSpewColorReset() { if (!InferSpewColorable()) return ""; @@ -178,7 +177,7 @@ types::InferSpewColorReset() } const char * -types::InferSpewColor(TypeConstraint *constraint) +js::InferSpewColor(TypeConstraint *constraint) { /* Type constraints are printed out using foreground colors. */ static const char * const colors[] = { "\x1b[31m", "\x1b[32m", "\x1b[33m", @@ -190,7 +189,7 @@ types::InferSpewColor(TypeConstraint *constraint) } const char * -types::InferSpewColor(TypeSet *types) +js::InferSpewColor(TypeSet *types) { /* Type sets are printed out using bold colors. */ static const char * const colors[] = { "\x1b[1;31m", "\x1b[1;32m", "\x1b[1;33m", @@ -201,8 +200,8 @@ types::InferSpewColor(TypeSet *types) return colors[DefaultHasher::hash(types) % 7]; } -const char * -types::TypeString(Type type) +/* static */ const char * +TypeSet::TypeString(TypeSet::Type type) { if (type.isPrimitive() || type.isUnknown() || type.isAnyObject()) return NonObjectTypeString(type); @@ -219,14 +218,14 @@ types::TypeString(Type type) return bufs[which]; } -const char * -types::ObjectGroupString(ObjectGroup *group) +/* static */ const char * +TypeSet::ObjectGroupString(ObjectGroup *group) { - return TypeString(Type::ObjectType(group)); + return TypeString(TypeSet::ObjectType(group)); } void -types::InferSpew(SpewChannel channel, const char *fmt, ...) +js::InferSpew(SpewChannel channel, const char *fmt, ...) { if (!InferSpewActive(channel)) return; @@ -240,7 +239,7 @@ types::InferSpew(SpewChannel channel, const char *fmt, ...) } bool -types::TypeHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value &value) +js::ObjectGroupHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value &value) { /* * Check the correctness of the type information in the object's property @@ -253,7 +252,7 @@ types::TypeHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value & if (id == id___proto__(cx) || id == id_constructor(cx) || id == id_caller(cx)) return true; - Type type = GetValueType(value); + TypeSet::Type type = TypeSet::GetValueType(value); // Type set guards might miss when an object's group changes and its // properties become unknown. @@ -277,7 +276,8 @@ types::TypeHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value & if (!types->hasType(type)) { TypeFailure(cx, "Missing type in object %s %s: %s", - ObjectGroupString(group), TypeIdString(id), TypeString(type)); + TypeSet::ObjectGroupString(group), TypeIdString(id), + TypeSet::TypeString(type)); } } return true; @@ -286,7 +286,7 @@ types::TypeHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value & #endif void -types::TypeFailure(JSContext *cx, const char *fmt, ...) +js::TypeFailure(JSContext *cx, const char *fmt, ...) { char msgbuf[1024]; /* Larger error messages will be truncated */ char errbuf[1024]; @@ -323,12 +323,12 @@ TemporaryTypeSet::TemporaryTypeSet(LifoAlloc *alloc, Type type) flags |= TYPE_FLAG_ANYOBJECT; } else { setBaseObjectCount(1); - objectSet = reinterpret_cast(type.objectKey()); + objectSet = reinterpret_cast(type.objectKey()); if (type.isGroup()) { ObjectGroup *ngroup = type.group(); if (ngroup->newScript() && ngroup->newScript()->initializedGroup()) - addType(Type::ObjectType(ngroup->newScript()->initializedGroup()), alloc); + addType(ObjectType(ngroup->newScript()->initializedGroup()), alloc); } } } @@ -387,10 +387,10 @@ TypeSet::objectsAreSubset(TypeSet *other) return false; for (unsigned i = 0; i < getObjectCount(); i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (!key) continue; - if (!other->hasType(Type::ObjectType(key))) + if (!other->hasType(ObjectType(key))) return false; } @@ -407,10 +407,10 @@ TypeSet::isSubset(const TypeSet *other) const MOZ_ASSERT(other->unknownObject()); } else { for (unsigned i = 0; i < getObjectCount(); i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (!key) continue; - if (!other->hasType(Type::ObjectType(key))) + if (!other->hasType(ObjectType(key))) return false; } } @@ -423,12 +423,12 @@ TypeSet::enumerateTypes(TypeList *list) const { /* If any type is possible, there's no need to worry about specifics. */ if (flags & TYPE_FLAG_UNKNOWN) - return list->append(Type::UnknownType()); + return list->append(UnknownType()); /* Enqueue type set members stored as bits. */ for (TypeFlags flag = 1; flag < TYPE_FLAG_ANYOBJECT; flag <<= 1) { if (flags & flag) { - Type type = Type::PrimitiveType(TypeFlagPrimitive(flag)); + Type type = PrimitiveType(TypeFlagPrimitive(flag)); if (!list->append(type)) return false; } @@ -436,14 +436,14 @@ TypeSet::enumerateTypes(TypeList *list) const /* If any object is possible, skip specifics. */ if (flags & TYPE_FLAG_ANYOBJECT) - return list->append(Type::AnyObjectType()); + return list->append(AnyObjectType()); /* Enqueue specific object types. */ unsigned count = getObjectCount(); for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (key) { - if (!list->append(Type::ObjectType(key))) + if (!list->append(ObjectType(key))) return false; } } @@ -532,9 +532,9 @@ TypeSet::addType(Type type, LifoAlloc *alloc) { uint32_t objectCount = baseObjectCount(); - TypeSetObjectKey *key = type.objectKey(); - TypeSetObjectKey **pentry = HashSetInsert - (*alloc, objectSet, objectCount, key); + ObjectKey *key = type.objectKey(); + ObjectKey **pentry = TypeHashSet::Insert + (*alloc, objectSet, objectCount, key); if (!pentry) goto unknownObject; if (*pentry) @@ -579,7 +579,7 @@ TypeSet::addType(Type type, LifoAlloc *alloc) // corresponding fully initialized group, as an object's group may change // from the former to the latter via the acquired properties analysis. if (ngroup->newScript() && ngroup->newScript()->initializedGroup()) - addType(Type::ObjectType(ngroup->newScript()->initializedGroup()), alloc); + addType(ObjectType(ngroup->newScript()->initializedGroup()), alloc); } if (false) { @@ -600,7 +600,7 @@ ConstraintTypeSet::addType(ExclusiveContext *cxArg, Type type) TypeSet::addType(type, &cxArg->typeLifoAlloc()); if (type.isObjectUnchecked() && unknownObject()) - type = Type::AnyObjectType(); + type = AnyObjectType(); InferSpew(ISpewOps, "addType: %sT%p%s %s", InferSpewColor(this), this, InferSpewColorReset(), @@ -663,9 +663,9 @@ TypeSet::print() unsigned count = getObjectCount(); for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (key) - fprintf(stderr, " %s", TypeString(Type::ObjectType(key))); + fprintf(stderr, " %s", TypeString(ObjectType(key))); } } } @@ -677,7 +677,7 @@ TypeSet::readBarrier(const TypeSet *types) return; for (unsigned i = 0; i < types->getObjectCount(); i++) { - if (TypeSetObjectKey *key = types->getObject(i)) { + if (ObjectKey *key = types->getObject(i)) { if (key->isSingleton()) (void) key->singleton(); else @@ -692,11 +692,11 @@ TypeSet::clone(LifoAlloc *alloc, TemporaryTypeSet *result) const MOZ_ASSERT(result->empty()); unsigned objectCount = baseObjectCount(); - unsigned capacity = (objectCount >= 2) ? HashSetCapacity(objectCount) : 0; + unsigned capacity = (objectCount >= 2) ? TypeHashSet::Capacity(objectCount) : 0; - TypeSetObjectKey **newSet; + ObjectKey **newSet; if (capacity) { - newSet = alloc->newArray(capacity); + newSet = alloc->newArray(capacity); if (!newSet) return false; PodCopy(newSet, objectSet, capacity); @@ -759,18 +759,18 @@ TypeSet::cloneWithoutObjects(LifoAlloc *alloc) TypeSet::unionSets(TypeSet *a, TypeSet *b, LifoAlloc *alloc) { TemporaryTypeSet *res = alloc->new_(a->baseFlags() | b->baseFlags(), - static_cast(nullptr)); + static_cast(nullptr)); if (!res) return nullptr; if (!res->unknownObject()) { for (size_t i = 0; i < a->getObjectCount() && !res->unknownObject(); i++) { - if (TypeSetObjectKey *key = a->getObject(i)) - res->addType(Type::ObjectType(key), alloc); + if (ObjectKey *key = a->getObject(i)) + res->addType(ObjectType(key), alloc); } for (size_t i = 0; i < b->getObjectCount() && !res->unknownObject(); i++) { - if (TypeSetObjectKey *key = b->getObject(i)) - res->addType(Type::ObjectType(key), alloc); + if (ObjectKey *key = b->getObject(i)) + res->addType(ObjectType(key), alloc); } } @@ -782,7 +782,7 @@ TypeSet::intersectSets(TemporaryTypeSet *a, TemporaryTypeSet *b, LifoAlloc *allo { TemporaryTypeSet *res; res = alloc->new_(a->baseFlags() & b->baseFlags(), - static_cast(nullptr)); + static_cast(nullptr)); if (!res) return nullptr; @@ -795,7 +795,7 @@ TypeSet::intersectSets(TemporaryTypeSet *a, TemporaryTypeSet *b, LifoAlloc *allo if (a->unknownObject()) { for (size_t i = 0; i < b->getObjectCount(); i++) { if (b->getObject(i)) - res->addType(Type::ObjectType(b->getObject(i)), alloc); + res->addType(ObjectType(b->getObject(i)), alloc); } return res; } @@ -803,7 +803,7 @@ TypeSet::intersectSets(TemporaryTypeSet *a, TemporaryTypeSet *b, LifoAlloc *allo if (b->unknownObject()) { for (size_t i = 0; i < a->getObjectCount(); i++) { if (b->getObject(i)) - res->addType(Type::ObjectType(a->getObject(i)), alloc); + res->addType(ObjectType(a->getObject(i)), alloc); } return res; } @@ -816,7 +816,7 @@ TypeSet::intersectSets(TemporaryTypeSet *a, TemporaryTypeSet *b, LifoAlloc *allo continue; if (!b->getObject(j)) continue; - res->addType(Type::ObjectType(b->getObject(j)), alloc); + res->addType(ObjectType(b->getObject(j)), alloc); break; } } @@ -869,7 +869,7 @@ class CompilerConstraint virtual bool generateTypeConstraint(JSContext *cx, RecompileInfo recompileInfo) = 0; }; -class types::CompilerConstraintList +class js::CompilerConstraintList { public: struct FrozenScript @@ -949,7 +949,7 @@ class types::CompilerConstraintList }; CompilerConstraintList * -types::NewCompilerConstraintList(jit::TempAllocator &alloc) +js::NewCompilerConstraintList(jit::TempAllocator &alloc) { return alloc.lifoAlloc()->new_(alloc); } @@ -1015,7 +1015,7 @@ class TypeCompilerConstraint : public TypeConstraint const char *kind() { return data.kind(); } - void newType(JSContext *cx, TypeSet *source, Type type) { + void newType(JSContext *cx, TypeSet *source, TypeSet::Type type) { if (data.invalidateOnNewType(type)) cx->zone()->types.addPendingRecompile(cx, compilation); } @@ -1061,19 +1061,19 @@ CompilerConstraintInstance::generateTypeConstraint(JSContext *cx, RecompileIn } /* anonymous namespace */ const Class * -TypeSetObjectKey::clasp() +TypeSet::ObjectKey::clasp() { return isGroup() ? group()->clasp() : singleton()->getClass(); } TaggedProto -TypeSetObjectKey::proto() +TypeSet::ObjectKey::proto() { return isGroup() ? group()->proto() : singleton()->getTaggedProto(); } TypeNewScript * -TypeSetObjectKey::newScript() +TypeSet::ObjectKey::newScript() { if (isGroup() && group()->newScript()) return group()->newScript(); @@ -1081,7 +1081,7 @@ TypeSetObjectKey::newScript() } ObjectGroup * -TypeSetObjectKey::maybeGroup() +TypeSet::ObjectKey::maybeGroup() { if (isGroup()) return group(); @@ -1091,7 +1091,7 @@ TypeSetObjectKey::maybeGroup() } bool -TypeSetObjectKey::unknownProperties() +TypeSet::ObjectKey::unknownProperties() { if (ObjectGroup *group = maybeGroup()) return group->unknownProperties(); @@ -1099,7 +1099,7 @@ TypeSetObjectKey::unknownProperties() } HeapTypeSetKey -TypeSetObjectKey::property(jsid id) +TypeSet::ObjectKey::property(jsid id) { MOZ_ASSERT(!unknownProperties()); @@ -1113,7 +1113,7 @@ TypeSetObjectKey::property(jsid id) } void -TypeSetObjectKey::ensureTrackedProperty(JSContext *cx, jsid id) +TypeSet::ObjectKey::ensureTrackedProperty(JSContext *cx, jsid id) { // If we are accessing a lazily defined property which actually exists in // the VM and has not been instantiated yet, instantiate it now if we are @@ -1182,7 +1182,7 @@ class TypeConstraintFreezeStack : public TypeConstraint const char *kind() { return "freezeStack"; } - void newType(JSContext *cx, TypeSet *source, Type type) { + void newType(JSContext *cx, TypeSet *source, TypeSet::Type type) { /* * Unlike TypeConstraintFreeze, triggering this constraint once does * not disable it on future changes to the type set. @@ -1201,7 +1201,7 @@ class TypeConstraintFreezeStack : public TypeConstraint } /* anonymous namespace */ bool -types::FinishCompilation(JSContext *cx, HandleScript script, CompilerConstraintList *constraints, +js::FinishCompilation(JSContext *cx, HandleScript script, CompilerConstraintList *constraints, RecompileInfo *precompileInfo) { if (constraints->failed()) @@ -1254,13 +1254,13 @@ types::FinishCompilation(JSContext *cx, HandleScript script, CompilerConstraintL break; } - if (!CheckFrozenTypeSet(cx, entry.thisTypes, types::TypeScript::ThisTypes(entry.script))) + if (!CheckFrozenTypeSet(cx, entry.thisTypes, TypeScript::ThisTypes(entry.script))) succeeded = false; unsigned nargs = entry.script->functionNonDelazifying() ? entry.script->functionNonDelazifying()->nargs() : 0; for (size_t i = 0; i < nargs; i++) { - if (!CheckFrozenTypeSet(cx, &entry.argTypes[i], types::TypeScript::ArgTypes(entry.script, i))) + if (!CheckFrozenTypeSet(cx, &entry.argTypes[i], TypeScript::ArgTypes(entry.script, i))) succeeded = false; } for (size_t i = 0; i < entry.script->nTypeSets(); i++) { @@ -1310,7 +1310,7 @@ CheckDefinitePropertiesTypeSet(JSContext *cx, TemporaryTypeSet *frozen, StackTyp } void -types::FinishDefinitePropertiesAnalysis(JSContext *cx, CompilerConstraintList *constraints) +js::FinishDefinitePropertiesAnalysis(JSContext *cx, CompilerConstraintList *constraints) { #ifdef DEBUG // Assert no new types have been added to the StackTypeSets. Do this before @@ -1364,7 +1364,7 @@ class ConstraintDataFreeze const char *kind() { return "freeze"; } - bool invalidateOnNewType(Type type) { return true; } + bool invalidateOnNewType(TypeSet::Type type) { return true; } bool invalidateOnNewPropertyState(TypeSet *property) { return true; } bool invalidateOnNewObjectState(ObjectGroup *group) { return false; } @@ -1559,7 +1559,7 @@ class ConstraintDataFreezeObjectFlags const char *kind() { return "freezeObjectFlags"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return false; } bool invalidateOnNewObjectState(ObjectGroup *group) { return group->hasAnyFlags(flags); @@ -1577,7 +1577,7 @@ class ConstraintDataFreezeObjectFlags } /* anonymous namespace */ bool -TypeSetObjectKey::hasFlags(CompilerConstraintList *constraints, ObjectGroupFlags flags) +TypeSet::ObjectKey::hasFlags(CompilerConstraintList *constraints, ObjectGroupFlags flags) { MOZ_ASSERT(flags); @@ -1595,7 +1595,7 @@ TypeSetObjectKey::hasFlags(CompilerConstraintList *constraints, ObjectGroupFlags } bool -TypeSetObjectKey::hasStableClassAndProto(CompilerConstraintList *constraints) +TypeSet::ObjectKey::hasStableClassAndProto(CompilerConstraintList *constraints) { return !hasFlags(constraints, OBJECT_FLAG_UNKNOWN_PROPERTIES); } @@ -1615,7 +1615,7 @@ TemporaryTypeSet::hasObjectFlags(CompilerConstraintList *constraints, ObjectGrou unsigned count = getObjectCount(); for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (key && key->hasFlags(constraints, flags)) return true; } @@ -1636,7 +1636,7 @@ ObjectGroup::initialHeap(CompilerConstraintList *constraints) if (!canPreTenure()) return gc::DefaultHeap; - HeapTypeSetKey objectProperty = TypeSetObjectKey::get(this)->property(JSID_EMPTY); + HeapTypeSetKey objectProperty = TypeSet::ObjectKey::get(this)->property(JSID_EMPTY); LifoAlloc *alloc = constraints->alloc(); typedef CompilerConstraintInstance T; @@ -1659,7 +1659,7 @@ class ConstraintDataFreezeObjectForInlinedCall const char *kind() { return "freezeObjectForInlinedCall"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return false; } bool invalidateOnNewObjectState(ObjectGroup *group) { // We don't keep track of the exact dependencies the caller has on its @@ -1691,7 +1691,7 @@ class ConstraintDataFreezeObjectForTypedArrayData const char *kind() { return "freezeObjectForTypedArrayData"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return false; } bool invalidateOnNewObjectState(ObjectGroup *group) { TypedArrayObject &tarray = group->singleton()->as(); @@ -1713,7 +1713,7 @@ class ConstraintDataFreezeObjectForTypedArrayData } /* anonymous namespace */ void -TypeSetObjectKey::watchStateChangeForInlinedCall(CompilerConstraintList *constraints) +TypeSet::ObjectKey::watchStateChangeForInlinedCall(CompilerConstraintList *constraints) { HeapTypeSetKey objectProperty = property(JSID_EMPTY); LifoAlloc *alloc = constraints->alloc(); @@ -1723,7 +1723,7 @@ TypeSetObjectKey::watchStateChangeForInlinedCall(CompilerConstraintList *constra } void -TypeSetObjectKey::watchStateChangeForTypedArrayData(CompilerConstraintList *constraints) +TypeSet::ObjectKey::watchStateChangeForTypedArrayData(CompilerConstraintList *constraints) { TypedArrayObject &tarray = singleton()->as(); HeapTypeSetKey objectProperty = property(JSID_EMPTY); @@ -1776,7 +1776,7 @@ class ConstraintDataFreezePropertyState const char *kind() { return (which == NON_DATA) ? "freezeNonDataProperty" : "freezeNonWritableProperty"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return (which == NON_DATA) ? property->nonDataProperty() @@ -1832,7 +1832,7 @@ class ConstraintDataConstantProperty const char *kind() { return "constantProperty"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return property->nonConstantProperty(); } @@ -1894,7 +1894,7 @@ class ConstraintDataInert const char *kind() { return "inert"; } - bool invalidateOnNewType(Type type) { return false; } + bool invalidateOnNewType(TypeSet::Type type) { return false; } bool invalidateOnNewPropertyState(TypeSet *property) { return false; } bool invalidateOnNewObjectState(ObjectGroup *group) { return false; } @@ -1937,7 +1937,7 @@ TemporaryTypeSet::filtersType(const TemporaryTypeSet *other, Type filteredType) return unknown(); for (TypeFlags flag = 1; flag < TYPE_FLAG_ANYOBJECT; flag <<= 1) { - Type type = Type::PrimitiveType(TypeFlagPrimitive(flag)); + Type type = PrimitiveType(TypeFlagPrimitive(flag)); if (type != filteredType && other->hasType(type) && !hasType(type)) return false; } @@ -1946,9 +1946,9 @@ TemporaryTypeSet::filtersType(const TemporaryTypeSet *other, Type filteredType) return unknownObject(); for (size_t i = 0; i < other->getObjectCount(); i++) { - TypeSetObjectKey *key = other->getObject(i); + ObjectKey *key = other->getObject(i); if (key) { - Type type = Type::ObjectType(key); + Type type = ObjectType(key); if (type != filteredType && !hasType(type)) return false; } @@ -1968,7 +1968,7 @@ TemporaryTypeSet::convertDoubleElements(CompilerConstraintList *constraints) bool dontConvert = false; for (unsigned i = 0; i < getObjectCount(); i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (!key) continue; @@ -1985,7 +1985,7 @@ TemporaryTypeSet::convertDoubleElements(CompilerConstraintList *constraints) // information incorrect), nor for non-array objects (as their elements // may point to emptyObjectElements, which cannot be converted). if (!property.maybeTypes() || - !property.maybeTypes()->hasType(Type::DoubleType()) || + !property.maybeTypes()->hasType(DoubleType()) || key->clasp() != &ArrayObject::class_) { dontConvert = true; @@ -2040,7 +2040,7 @@ TemporaryTypeSet::getKnownClass(CompilerConstraintList *constraints) if (clasp) { for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (key && !key->hasStableClassAndProto(constraints)) return nullptr; } @@ -2182,7 +2182,7 @@ TemporaryTypeSet::getCommonPrototype(CompilerConstraintList *constraints) unsigned count = getObjectCount(); for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (!key) continue; @@ -2202,7 +2202,7 @@ TemporaryTypeSet::getCommonPrototype(CompilerConstraintList *constraints) // Guard against mutating __proto__. for (unsigned i = 0; i < count; i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (key) JS_ALWAYS_TRUE(key->hasStableClassAndProto(constraints)); } @@ -2217,7 +2217,7 @@ TemporaryTypeSet::propertyNeedsBarrier(CompilerConstraintList *constraints, jsid return true; for (unsigned i = 0; i < getObjectCount(); i++) { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); if (!key) continue; @@ -2241,11 +2241,11 @@ ClassCanHaveExtraProperties(const Class *clasp) || IsAnyTypedArrayClass(clasp); } -static inline bool +static bool PrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSObject *obj) { do { - TypeSetObjectKey *key = TypeSetObjectKey::get(obj); + TypeSet::ObjectKey *key = TypeSet::ObjectKey::get(obj); if (ClassCanHaveExtraProperties(key->clasp())) return true; if (key->unknownProperties()) @@ -2260,7 +2260,7 @@ PrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSObject *obj) } bool -types::ArrayPrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSScript *script) +js::ArrayPrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSScript *script) { if (JSObject *proto = script->global().maybeGetArrayPrototype()) return PrototypeHasIndexedProperty(constraints, proto); @@ -2268,8 +2268,8 @@ types::ArrayPrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSS } bool -types::TypeCanHaveExtraIndexedProperties(CompilerConstraintList *constraints, - TemporaryTypeSet *types) +js::TypeCanHaveExtraIndexedProperties(CompilerConstraintList *constraints, + TemporaryTypeSet *types) { const Class *clasp = types->getKnownClass(constraints); @@ -2348,7 +2348,7 @@ TypeZone::addPendingRecompile(JSContext *cx, JSScript *script) } void -types::PrintTypes(JSContext *cx, JSCompartment *comp, bool force) +js::PrintTypes(JSContext *cx, JSCompartment *comp, bool force) { #ifdef DEBUG gc::AutoSuppressGC suppressGC(cx); @@ -2388,7 +2388,7 @@ UpdatePropertyType(ExclusiveContext *cx, HeapTypeSet *types, NativeObject *obj, if (shape->hasGetterValue() || shape->hasSetterValue()) { types->setNonDataProperty(cx); - types->TypeSet::addType(Type::UnknownType(), &cx->typeLifoAlloc()); + types->TypeSet::addType(TypeSet::UnknownType(), &cx->typeLifoAlloc()); } else if (shape->hasDefaultGetter() && shape->hasSlot()) { if (!indexed && types->canSetDefinite(shape->slot())) types->setDefinite(shape->slot()); @@ -2403,11 +2403,11 @@ UpdatePropertyType(ExclusiveContext *cx, HeapTypeSet *types, NativeObject *obj, * Also don't add untracked values (initial uninitialized lexical * magic values and optimized out values) as appearing in CallObjects. */ - MOZ_ASSERT_IF(IsUntrackedValue(value), obj->is()); + MOZ_ASSERT_IF(TypeSet::IsUntrackedValue(value), obj->is()); if ((indexed || !value.isUndefined() || !CanHaveEmptyPropertyTypesForOwnProperty(obj)) && - !IsUntrackedValue(value)) + !TypeSet::IsUntrackedValue(value)) { - Type type = GetValueType(value); + TypeSet::Type type = TypeSet::GetValueType(value); types->TypeSet::addType(type, &cx->typeLifoAlloc()); } @@ -2416,7 +2416,7 @@ UpdatePropertyType(ExclusiveContext *cx, HeapTypeSet *types, NativeObject *obj, } else { InferSpew(ISpewOps, "typeSet: %sT%p%s property %s %s - setConstant", InferSpewColor(types), types, InferSpewColorReset(), - ObjectGroupString(obj->group()), TypeIdString(shape->propid())); + TypeSet::ObjectGroupString(obj->group()), TypeIdString(shape->propid())); } } } @@ -2426,7 +2426,7 @@ ObjectGroup::updateNewPropertyTypes(ExclusiveContext *cx, jsid id, HeapTypeSet * { InferSpew(ISpewOps, "typeSet: %sT%p%s property %s %s", InferSpewColor(types), types, InferSpewColorReset(), - ObjectGroupString(this), TypeIdString(id)); + TypeSet::ObjectGroupString(this), TypeIdString(id)); if (!singleton() || !singleton()->isNative()) { types->setNonConstantProperty(cx); @@ -2455,7 +2455,7 @@ ObjectGroup::updateNewPropertyTypes(ExclusiveContext *cx, jsid id, HeapTypeSet * for (size_t i = 0; i < obj->getDenseInitializedLength(); i++) { const Value &value = obj->getDenseElement(i); if (!value.isMagic(JS_ELEMENTS_HOLE)) { - Type type = GetValueType(value); + TypeSet::Type type = TypeSet::GetValueType(value); types->TypeSet::addType(type, &cx->typeLifoAlloc()); } } @@ -2531,7 +2531,7 @@ ObjectGroup::matchDefiniteProperties(HandleObject obj) } void -types::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, Type type) +js::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, TypeSet::Type type) { MOZ_ASSERT(id == IdToTypeId(id)); @@ -2547,7 +2547,7 @@ types::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, Type // Clear any constant flag if it exists. if (!types->empty() && !types->nonConstantProperty()) { InferSpew(ISpewOps, "constantMutated: %sT%p%s %s", - InferSpewColor(types), types, InferSpewColorReset(), TypeString(type)); + InferSpewColor(types), types, InferSpewColorReset(), TypeSet::TypeString(type)); types->setNonConstantProperty(cx); } @@ -2555,7 +2555,7 @@ types::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, Type return; InferSpew(ISpewOps, "externalType: property %s %s: %s", - ObjectGroupString(group), TypeIdString(id), TypeString(type)); + TypeSet::ObjectGroupString(group), TypeIdString(id), TypeSet::TypeString(type)); types->addType(cx, type); // Propagate new types from partially initialized groups to fully @@ -2565,15 +2565,15 @@ types::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, Type // from acquiring the fully initialized group. if (group->newScript() && group->newScript()->initializedGroup()) { if (type.isObjectUnchecked() && types->unknownObject()) - type = Type::AnyObjectType(); + type = TypeSet::AnyObjectType(); AddTypePropertyId(cx, group->newScript()->initializedGroup(), id, type); } } void -types::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, const Value &value) +js::AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, const Value &value) { - AddTypePropertyId(cx, group, id, GetValueType(value)); + AddTypePropertyId(cx, group, id, TypeSet::GetValueType(value)); } void @@ -2655,7 +2655,7 @@ ObjectGroup::setFlags(ExclusiveContext *cx, ObjectGroupFlags flags) addFlags(flags); - InferSpew(ISpewOps, "%s: setFlags 0x%x", ObjectGroupString(this), flags); + InferSpew(ISpewOps, "%s: setFlags 0x%x", TypeSet::ObjectGroupString(this), flags); ObjectStateChange(cx, this, false); @@ -2673,7 +2673,7 @@ ObjectGroup::markUnknown(ExclusiveContext *cx) MOZ_ASSERT(cx->zone()->types.activeAnalysis); MOZ_ASSERT(!unknownProperties()); - InferSpew(ISpewOps, "UnknownProperties: %s", ObjectGroupString(this)); + InferSpew(ISpewOps, "UnknownProperties: %s", TypeSet::ObjectGroupString(this)); clearNewScript(cx); ObjectStateChange(cx, this, true); @@ -2691,7 +2691,7 @@ ObjectGroup::markUnknown(ExclusiveContext *cx) for (unsigned i = 0; i < count; i++) { Property *prop = getProperty(i); if (prop) { - prop->types.addType(cx, Type::UnknownType()); + prop->types.addType(cx, TypeSet::UnknownType()); prop->types.setNonDataProperty(cx); } } @@ -2800,8 +2800,8 @@ ObjectGroup::print() { TaggedProto tagged(proto()); fprintf(stderr, "%s : %s", - ObjectGroupString(this), - tagged.isObject() ? TypeString(Type::ObjectType(tagged.toObject())) + TypeSet::ObjectGroupString(this), + tagged.isObject() ? TypeSet::TypeString(TypeSet::ObjectType(tagged.toObject())) : (tagged.isLazy() ? "(lazy)" : "(null)")); if (unknownProperties()) { @@ -2881,7 +2881,7 @@ class TypeConstraintClearDefiniteGetterSetter : public TypeConstraint group->clearNewScript(cx); } - void newType(JSContext *cx, TypeSet *source, Type type) {} + void newType(JSContext *cx, TypeSet *source, TypeSet::Type type) {} bool sweep(TypeZone &zone, TypeConstraint **res) { if (IsObjectGroupAboutToBeFinalized(&group)) @@ -2892,7 +2892,7 @@ class TypeConstraintClearDefiniteGetterSetter : public TypeConstraint }; bool -types::AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, ObjectGroup *group, HandleId id) +js::AddClearDefiniteGetterSetterForPrototypeChain(JSContext *cx, ObjectGroup *group, HandleId id) { /* * Ensure that if the properties named here could have a getter, setter or @@ -2929,7 +2929,7 @@ class TypeConstraintClearDefiniteSingle : public TypeConstraint const char *kind() { return "clearDefiniteSingle"; } - void newType(JSContext *cx, TypeSet *source, Type type) { + void newType(JSContext *cx, TypeSet *source, TypeSet::Type type) { if (source->baseFlags() || source->getObjectCount() > 1) group->clearNewScript(cx); } @@ -2943,7 +2943,7 @@ class TypeConstraintClearDefiniteSingle : public TypeConstraint }; bool -types::AddClearDefiniteFunctionUsesInScript(JSContext *cx, ObjectGroup *group, +js::AddClearDefiniteFunctionUsesInScript(JSContext *cx, ObjectGroup *group, JSScript *script, JSScript *calleeScript) { // Look for any uses of the specified calleeScript in type sets for @@ -2954,7 +2954,8 @@ types::AddClearDefiniteFunctionUsesInScript(JSContext *cx, ObjectGroup *group, // contain a single object, as IonBuilder does not inline polymorphic sites // during the definite properties analysis. - TypeSetObjectKey *calleeKey = Type::ObjectType(calleeScript->functionNonDelazifying()).objectKey(); + TypeSet::ObjectKey *calleeKey = + TypeSet::ObjectType(calleeScript->functionNonDelazifying()).objectKey(); unsigned count = TypeScript::NumTypeSets(script); StackTypeSet *typeArray = script->types()->typeArray(); @@ -2990,8 +2991,7 @@ types::AddClearDefiniteFunctionUsesInScript(JSContext *cx, ObjectGroup *group, ///////////////////////////////////////////////////////////////////// void -types::TypeMonitorCallSlow(JSContext *cx, JSObject *callee, const CallArgs &args, - bool constructing) +js::TypeMonitorCallSlow(JSContext *cx, JSObject *callee, const CallArgs &args, bool constructing) { unsigned nargs = callee->as().nargs(); JSScript *script = callee->as().nonLazyScript(); @@ -3014,18 +3014,18 @@ types::TypeMonitorCallSlow(JSContext *cx, JSObject *callee, const CallArgs &args } static inline bool -IsAboutToBeFinalized(TypeSetObjectKey **keyp) +IsAboutToBeFinalized(TypeSet::ObjectKey **keyp) { // Mask out the low bit indicating whether this is a group or JS object. uintptr_t flagBit = uintptr_t(*keyp) & 1; gc::Cell *tmp = reinterpret_cast(uintptr_t(*keyp) & ~1); bool isAboutToBeFinalized = IsCellAboutToBeFinalized(&tmp); - *keyp = reinterpret_cast(uintptr_t(tmp) | flagBit); + *keyp = reinterpret_cast(uintptr_t(tmp) | flagBit); return isAboutToBeFinalized; } void -types::FillBytecodeTypeMap(JSScript *script, uint32_t *bytecodeMap) +js::FillBytecodeTypeMap(JSScript *script, uint32_t *bytecodeMap) { uint32_t added = 0; for (jsbytecode *pc = script->code(); pc < script->codeEnd(); pc += GetBytecodeLength(pc)) { @@ -3040,7 +3040,7 @@ types::FillBytecodeTypeMap(JSScript *script, uint32_t *bytecodeMap) } void -types::TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval) +js::TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval) { /* Allow the non-TYPESET scenario to simplify stubs used in compound opcodes. */ if (!(js_CodeSpec[*pc].format & JOF_TYPESET)) @@ -3051,13 +3051,13 @@ types::TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const AutoEnterAnalysis enter(cx); - Type type = GetValueType(rval); + TypeSet::Type type = TypeSet::GetValueType(rval); StackTypeSet *types = TypeScript::BytecodeTypes(script, pc); if (types->hasType(type)) return; InferSpew(ISpewOps, "bytecodeType: %p %05u: %s", - script, script->pcToOffset(pc), TypeString(type)); + script, script->pcToOffset(pc), TypeSet::TypeString(type)); types->addType(cx, type); } @@ -3688,18 +3688,18 @@ ConstraintTypeSet::sweep(Zone *zone, AutoClearTypeInferenceStateOnOOM &oom) */ unsigned objectCount = baseObjectCount(); if (objectCount >= 2) { - unsigned oldCapacity = HashSetCapacity(objectCount); - TypeSetObjectKey **oldArray = objectSet; + unsigned oldCapacity = TypeHashSet::Capacity(objectCount); + ObjectKey **oldArray = objectSet; clearObjects(); objectCount = 0; for (unsigned i = 0; i < oldCapacity; i++) { - TypeSetObjectKey *key = oldArray[i]; + ObjectKey *key = oldArray[i]; if (!key) continue; if (!IsAboutToBeFinalized(&key)) { - TypeSetObjectKey **pentry = - HashSetInsert + ObjectKey **pentry = + TypeHashSet::Insert (zone->types.typeLifoAlloc, objectSet, objectCount, key); if (pentry) { *pentry = key; @@ -3722,9 +3722,9 @@ ConstraintTypeSet::sweep(Zone *zone, AutoClearTypeInferenceStateOnOOM &oom) } setBaseObjectCount(objectCount); } else if (objectCount == 1) { - TypeSetObjectKey *key = (TypeSetObjectKey *) objectSet; + ObjectKey *key = (ObjectKey *) objectSet; if (!IsAboutToBeFinalized(&key)) { - objectSet = reinterpret_cast(key); + objectSet = reinterpret_cast(key); } else { // As above, mark type sets containing objects with unknown // properties as unknown. @@ -3823,7 +3823,7 @@ ObjectGroup::maybeSweep(AutoClearTypeInferenceStateOnOOM *oom) */ unsigned propertyCount = basePropertyCount(); if (propertyCount >= 2) { - unsigned oldCapacity = HashSetCapacity(propertyCount); + unsigned oldCapacity = TypeHashSet::Capacity(propertyCount); Property **oldArray = propertySet; clearProperties(); @@ -3843,9 +3843,8 @@ ObjectGroup::maybeSweep(AutoClearTypeInferenceStateOnOOM *oom) Property *newProp = typeLifoAlloc.new_(*prop); if (newProp) { - Property **pentry = - HashSetInsert - (typeLifoAlloc, propertySet, propertyCount, prop->id); + Property **pentry = TypeHashSet::Insert + (typeLifoAlloc, propertySet, propertyCount, prop->id); if (pentry) { *pentry = newProp; newProp->types.sweep(zone(), *oom); diff --git a/js/src/jsinfer.h b/js/src/jsinfer.h index 253a61d41a83..933f57ea61af 100644 --- a/js/src/jsinfer.h +++ b/js/src/jsinfer.h @@ -23,7 +23,6 @@ #include "js/UbiNode.h" #include "js/Utility.h" #include "js/Vector.h" -#include "vm/ObjectGroup.h" namespace js { @@ -33,122 +32,12 @@ namespace jit { class TempAllocator; } -namespace types { - +class TaggedProto; struct TypeZone; -class TypeSet; -struct TypeSetObjectKey; - -/* - * Information about a single concrete type. We pack this into a single word, - * where small values are particular primitive or other singleton types, and - * larger values are either specific JS objects or object groups. - */ -class Type -{ - uintptr_t data; - explicit Type(uintptr_t data) : data(data) {} - - public: - - uintptr_t raw() const { return data; } - - bool isPrimitive() const { - return data < JSVAL_TYPE_OBJECT; - } - - bool isPrimitive(JSValueType type) const { - MOZ_ASSERT(type < JSVAL_TYPE_OBJECT); - return (uintptr_t) type == data; - } - - JSValueType primitive() const { - MOZ_ASSERT(isPrimitive()); - return (JSValueType) data; - } - - bool isMagicArguments() const { - return primitive() == JSVAL_TYPE_MAGIC; - } - - bool isSomeObject() const { - return data == JSVAL_TYPE_OBJECT || data > JSVAL_TYPE_UNKNOWN; - } - - bool isAnyObject() const { - return data == JSVAL_TYPE_OBJECT; - } - - bool isUnknown() const { - return data == JSVAL_TYPE_UNKNOWN; - } - - /* Accessors for types that are either JSObject or ObjectGroup. */ - - bool isObject() const { - MOZ_ASSERT(!isAnyObject() && !isUnknown()); - return data > JSVAL_TYPE_UNKNOWN; - } - - bool isObjectUnchecked() const { - return data > JSVAL_TYPE_UNKNOWN; - } - - inline TypeSetObjectKey *objectKey() const; - - /* Accessors for JSObject types */ - - bool isSingleton() const { - return isObject() && !!(data & 1); - } - - inline JSObject *singleton() const; - inline JSObject *singletonNoBarrier() const; - - /* Accessors for ObjectGroup types */ - - bool isGroup() const { - return isObject() && !(data & 1); - } - - inline ObjectGroup *group() const; - inline ObjectGroup *groupNoBarrier() const; - - bool operator == (Type o) const { return data == o.data; } - bool operator != (Type o) const { return data != o.data; } - - static inline Type UndefinedType() { return Type(JSVAL_TYPE_UNDEFINED); } - static inline Type NullType() { return Type(JSVAL_TYPE_NULL); } - static inline Type BooleanType() { return Type(JSVAL_TYPE_BOOLEAN); } - static inline Type Int32Type() { return Type(JSVAL_TYPE_INT32); } - static inline Type DoubleType() { return Type(JSVAL_TYPE_DOUBLE); } - static inline Type StringType() { return Type(JSVAL_TYPE_STRING); } - static inline Type SymbolType() { return Type(JSVAL_TYPE_SYMBOL); } - static inline Type MagicArgType() { return Type(JSVAL_TYPE_MAGIC); } - static inline Type AnyObjectType() { return Type(JSVAL_TYPE_OBJECT); } - static inline Type UnknownType() { return Type(JSVAL_TYPE_UNKNOWN); } - - static inline Type PrimitiveType(JSValueType type) { - MOZ_ASSERT(type < JSVAL_TYPE_UNKNOWN); - return Type(type); - } - - static inline Type ObjectType(JSObject *obj); - static inline Type ObjectType(ObjectGroup *group); - static inline Type ObjectType(TypeSetObjectKey *key); - - static js::ThingRootKind rootKind() { return js::THING_ROOT_TYPE; } -}; - -/* Get the type of a jsval, or zero for an unknown special value. */ -inline Type GetValueType(const Value &val); - -/* - * Get the type of a possibly optimized out or uninitialized let value. This - * generally only happens on unconditional type monitors on bailing out of - * Ion, such as for argument and local types. - */ -inline Type GetMaybeUntrackedValueType(const Value &val); +class TypeConstraint; +class TypeNewScript; +class CompilerConstraintList; +class HeapTypeSetKey; /* * Type inference memory management overview. @@ -162,46 +51,6 @@ inline Type GetMaybeUntrackedValueType(const Value &val); * Thus, type set and constraints only hold weak references. */ -/* - * A constraint which listens to additions to a type set and propagates those - * changes to other type sets. - */ -class TypeConstraint -{ -public: - /* Next constraint listening to the same type set. */ - TypeConstraint *next; - - TypeConstraint() - : next(nullptr) - {} - - /* Debugging name for this kind of constraint. */ - virtual const char *kind() = 0; - - /* Register a new type for the set this constraint is listening to. */ - virtual void newType(JSContext *cx, TypeSet *source, Type type) = 0; - - /* - * For constraints attached to an object property's type set, mark the - * property as having changed somehow. - */ - virtual void newPropertyState(JSContext *cx, TypeSet *source) {} - - /* - * For constraints attached to the JSID_EMPTY type set on an object, - * indicate a change in one of the object's dynamic property flags or other - * state. - */ - virtual void newObjectState(JSContext *cx, ObjectGroup *group) {} - - /* - * If the data this constraint refers to is still live, copy it into the - * zone's new allocator. Type constraints only hold weak references. - */ - virtual bool sweep(TypeZone &zone, TypeConstraint **res) = 0; -}; - /* Flags and other state stored in TypeSet::flags */ enum : uint32_t { TYPE_FLAG_UNDEFINED = 0x1, @@ -261,6 +110,81 @@ enum : uint32_t { }; typedef uint32_t TypeFlags; +/* Flags and other state stored in ObjectGroup::Flags */ +enum : uint32_t { + /* Whether this group is associated with some allocation site. */ + OBJECT_FLAG_FROM_ALLOCATION_SITE = 0x1, + + /* (0x2 and 0x4 are unused) */ + + /* Mask/shift for the number of properties in propertySet */ + OBJECT_FLAG_PROPERTY_COUNT_MASK = 0xfff8, + OBJECT_FLAG_PROPERTY_COUNT_SHIFT = 3, + OBJECT_FLAG_PROPERTY_COUNT_LIMIT = + OBJECT_FLAG_PROPERTY_COUNT_MASK >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT, + + /* Whether any objects this represents may have sparse indexes. */ + OBJECT_FLAG_SPARSE_INDEXES = 0x00010000, + + /* Whether any objects this represents may not have packed dense elements. */ + OBJECT_FLAG_NON_PACKED = 0x00020000, + + /* + * Whether any objects this represents may be arrays whose length does not + * fit in an int32. + */ + OBJECT_FLAG_LENGTH_OVERFLOW = 0x00040000, + + /* Whether any objects have been iterated over. */ + OBJECT_FLAG_ITERATED = 0x00080000, + + /* For a global object, whether flags were set on the RegExpStatics. */ + OBJECT_FLAG_REGEXP_FLAGS_SET = 0x00100000, + + /* + * For the function on a run-once script, whether the function has actually + * run multiple times. + */ + OBJECT_FLAG_RUNONCE_INVALIDATED = 0x00200000, + + /* + * For a global object, whether any array buffers in this compartment with + * typed object views have been neutered. + */ + OBJECT_FLAG_TYPED_OBJECT_NEUTERED = 0x00400000, + + /* + * Whether objects with this type should be allocated directly in the + * tenured heap. + */ + OBJECT_FLAG_PRE_TENURE = 0x00800000, + + /* Whether objects with this type might have copy on write elements. */ + OBJECT_FLAG_COPY_ON_WRITE = 0x01000000, + + /* Whether this type has had its 'new' script cleared in the past. */ + OBJECT_FLAG_NEW_SCRIPT_CLEARED = 0x02000000, + + /* + * Whether all properties of this object are considered unknown. + * If set, all other flags in DYNAMIC_MASK will also be set. + */ + OBJECT_FLAG_UNKNOWN_PROPERTIES = 0x04000000, + + /* Flags which indicate dynamic properties of represented objects. */ + OBJECT_FLAG_DYNAMIC_MASK = 0x07ff0000, + + // Mask/shift for the kind of addendum attached to this group. + OBJECT_FLAG_ADDENDUM_MASK = 0x38000000, + OBJECT_FLAG_ADDENDUM_SHIFT = 27, + + // Mask/shift for this group's generation. If out of sync with the + // TypeZone's generation, this group hasn't been swept yet. + OBJECT_FLAG_GENERATION_MASK = 0x40000000, + OBJECT_FLAG_GENERATION_SHIFT = 30, +}; +typedef uint32_t ObjectGroupFlags; + class StackTypeSet; class HeapTypeSet; class TemporaryTypeSet; @@ -271,11 +195,12 @@ class TemporaryTypeSet; * * - StackTypeSet are associated with TypeScripts, for arguments and values * observed at property reads. These are implicitly frozen on compilation - * and do not have constraints attached to them. + * and only have constraints added to them which can trigger invalidation of + * TypeNewScript information. * * - HeapTypeSet are associated with the properties of ObjectGroups. These - * may have constraints added to them to trigger invalidation of compiled - * code. + * may have constraints added to them to trigger invalidation of either + * compiled code or TypeNewScript information. * * - TemporaryTypeSet are created during compilation and do not outlive * that compilation. @@ -289,12 +214,162 @@ class TemporaryTypeSet; */ class TypeSet { + public: + // Type set entry for either a JSObject with singleton type or a + // non-singleton ObjectGroup. + class ObjectKey { + public: + static intptr_t keyBits(ObjectKey *obj) { return (intptr_t) obj; } + static ObjectKey *getKey(ObjectKey *obj) { return obj; } + + static inline ObjectKey *get(JSObject *obj); + static inline ObjectKey *get(ObjectGroup *group); + + bool isGroup() { + return (uintptr_t(this) & 1) == 0; + } + bool isSingleton() { + return (uintptr_t(this) & 1) != 0; + } + + inline ObjectGroup *group(); + inline JSObject *singleton(); + + inline ObjectGroup *groupNoBarrier(); + inline JSObject *singletonNoBarrier(); + + const Class *clasp(); + TaggedProto proto(); + TypeNewScript *newScript(); + + bool unknownProperties(); + bool hasFlags(CompilerConstraintList *constraints, ObjectGroupFlags flags); + bool hasStableClassAndProto(CompilerConstraintList *constraints); + void watchStateChangeForInlinedCall(CompilerConstraintList *constraints); + void watchStateChangeForTypedArrayData(CompilerConstraintList *constraints); + HeapTypeSetKey property(jsid id); + void ensureTrackedProperty(JSContext *cx, jsid id); + + ObjectGroup *maybeGroup(); + }; + + // Information about a single concrete type. We pack this into one word, + // where small values are particular primitive or other singleton types and + // larger values are either specific JS objects or object groups. + class Type + { + friend class TypeSet; + + uintptr_t data; + explicit Type(uintptr_t data) : data(data) {} + + public: + + uintptr_t raw() const { return data; } + + bool isPrimitive() const { + return data < JSVAL_TYPE_OBJECT; + } + + bool isPrimitive(JSValueType type) const { + MOZ_ASSERT(type < JSVAL_TYPE_OBJECT); + return (uintptr_t) type == data; + } + + JSValueType primitive() const { + MOZ_ASSERT(isPrimitive()); + return (JSValueType) data; + } + + bool isMagicArguments() const { + return primitive() == JSVAL_TYPE_MAGIC; + } + + bool isSomeObject() const { + return data == JSVAL_TYPE_OBJECT || data > JSVAL_TYPE_UNKNOWN; + } + + bool isAnyObject() const { + return data == JSVAL_TYPE_OBJECT; + } + + bool isUnknown() const { + return data == JSVAL_TYPE_UNKNOWN; + } + + /* Accessors for types that are either JSObject or ObjectGroup. */ + + bool isObject() const { + MOZ_ASSERT(!isAnyObject() && !isUnknown()); + return data > JSVAL_TYPE_UNKNOWN; + } + + bool isObjectUnchecked() const { + return data > JSVAL_TYPE_UNKNOWN; + } + + inline ObjectKey *objectKey() const; + + /* Accessors for JSObject types */ + + bool isSingleton() const { + return isObject() && !!(data & 1); + } + + inline JSObject *singleton() const; + inline JSObject *singletonNoBarrier() const; + + /* Accessors for ObjectGroup types */ + + bool isGroup() const { + return isObject() && !(data & 1); + } + + inline ObjectGroup *group() const; + inline ObjectGroup *groupNoBarrier() const; + + bool operator == (Type o) const { return data == o.data; } + bool operator != (Type o) const { return data != o.data; } + + static ThingRootKind rootKind() { return THING_ROOT_TYPE; } + }; + + static inline Type UndefinedType() { return Type(JSVAL_TYPE_UNDEFINED); } + static inline Type NullType() { return Type(JSVAL_TYPE_NULL); } + static inline Type BooleanType() { return Type(JSVAL_TYPE_BOOLEAN); } + static inline Type Int32Type() { return Type(JSVAL_TYPE_INT32); } + static inline Type DoubleType() { return Type(JSVAL_TYPE_DOUBLE); } + static inline Type StringType() { return Type(JSVAL_TYPE_STRING); } + static inline Type SymbolType() { return Type(JSVAL_TYPE_SYMBOL); } + static inline Type MagicArgType() { return Type(JSVAL_TYPE_MAGIC); } + static inline Type AnyObjectType() { return Type(JSVAL_TYPE_OBJECT); } + static inline Type UnknownType() { return Type(JSVAL_TYPE_UNKNOWN); } + + static inline Type PrimitiveType(JSValueType type) { + MOZ_ASSERT(type < JSVAL_TYPE_UNKNOWN); + return Type(type); + } + + static inline Type ObjectType(JSObject *obj); + static inline Type ObjectType(ObjectGroup *group); + static inline Type ObjectType(ObjectKey *key); + + static const char *NonObjectTypeString(Type type); + +#ifdef DEBUG + static const char *TypeString(Type type); + static const char *ObjectGroupString(ObjectGroup *group); +#else + static const char *TypeString(Type type) { return nullptr; } + static const char *ObjectGroupString(ObjectGroup *group) { return nullptr; } +#endif + protected: /* Flags for this type set. */ TypeFlags flags; /* Possible objects this type set can represent. */ - TypeSetObjectKey **objectSet; + ObjectKey **objectSet; public: @@ -350,7 +425,7 @@ class TypeSet * may return nullptr. */ inline unsigned getObjectCount() const; - inline TypeSetObjectKey *getObject(unsigned i) const; + inline ObjectKey *getObject(unsigned i) const; inline JSObject *getSingleton(unsigned i) const; inline ObjectGroup *getGroup(unsigned i) const; inline JSObject *getSingletonNoBarrier(unsigned i) const; @@ -412,6 +487,58 @@ class TypeSet inline void setBaseObjectCount(uint32_t count); void clearObjects(); + + public: + static inline Type GetValueType(const Value &val); + + static inline bool IsUntrackedValue(const Value &val); + + // Get the type of a possibly optimized out or uninitialized let value. + // This generally only happens on unconditional type monitors on bailing + // out of Ion, such as for argument and local types. + static inline Type GetMaybeUntrackedValueType(const Value &val); + + static void MarkTypeRoot(JSTracer *trc, Type *v, const char *name); +}; + +/* + * A constraint which listens to additions to a type set and propagates those + * changes to other type sets. + */ +class TypeConstraint +{ +public: + /* Next constraint listening to the same type set. */ + TypeConstraint *next; + + TypeConstraint() + : next(nullptr) + {} + + /* Debugging name for this kind of constraint. */ + virtual const char *kind() = 0; + + /* Register a new type for the set this constraint is listening to. */ + virtual void newType(JSContext *cx, TypeSet *source, TypeSet::Type type) = 0; + + /* + * For constraints attached to an object property's type set, mark the + * property as having changed somehow. + */ + virtual void newPropertyState(JSContext *cx, TypeSet *source) {} + + /* + * For constraints attached to the JSID_EMPTY type set on an object, + * indicate a change in one of the object's dynamic property flags or other + * state. + */ + virtual void newObjectState(JSContext *cx, ObjectGroup *group) {} + + /* + * If the data this constraint refers to is still live, copy it into the + * zone's new allocator. Type constraints only hold weak references. + */ + virtual bool sweep(TypeZone &zone, TypeConstraint **res) = 0; }; // If there is an OOM while sweeping types, the type information is deoptimized @@ -487,7 +614,7 @@ class TemporaryTypeSet : public TypeSet TemporaryTypeSet() {} TemporaryTypeSet(LifoAlloc *alloc, Type type); - TemporaryTypeSet(uint32_t flags, TypeSetObjectKey **objectSet) { + TemporaryTypeSet(uint32_t flags, ObjectKey **objectSet) { this->flags = flags; this->objectSet = objectSet; } @@ -772,66 +899,6 @@ class TypeNewScript /* Is this a reasonable PC to be doing inlining on? */ inline bool isInlinableCall(jsbytecode *pc); -/* - * Type information about a property. - * - * The type sets in the properties of a group describe the possible values - * that can be read out of that property in actual JS objects. In native - * objects, property types account for plain data properties (those with a - * slot and no getter or setter hook) and dense elements. In typed objects - * and unboxed objects, property types account for object and value - * properties and elements in the object. - * - * For accesses on these properties, the correspondence is as follows: - * - * 1. If the group has unknownProperties(), the possible properties and - * value types for associated JSObjects are unknown. - * - * 2. Otherwise, for any |obj| in |group|, and any |id| which is a property - * in |obj|, before obj->getProperty(id) the property in |group| for - * |id| must reflect the result of the getProperty. - * - * There are several exceptions to this: - * - * 1. For properties of global JS objects which are undefined at the point - * where the property was (lazily) generated, the property type set will - * remain empty, and the 'undefined' type will only be added after a - * subsequent assignment or deletion. After these properties have been - * assigned a defined value, the only way they can become undefined - * again is after such an assign or deletion. - * - * 2. Array lengths are special cased by the compiler and VM and are not - * reflected in property types. - * - * 3. In typed objects (but not unboxed objects), the initial values of - * properties (null pointers and undefined values) are not reflected in - * the property types. These values are always possible when reading the - * property. - * - * We establish these by using write barriers on calls to setProperty and - * defineProperty which are on native properties, and on any jitcode which - * might update the property with a new type. - */ -struct Property -{ - /* Identifier for this property, JSID_VOID for the aggregate integer index property. */ - HeapId id; - - /* Possible types for this property, including types inherited from prototypes. */ - HeapTypeSet types; - - explicit Property(jsid id) - : id(id) - {} - - Property(const Property &o) - : id(o.id.get()), types(o.types) - {} - - static uint32_t keyBits(jsid id) { return uint32_t(JSID_BITS(id)); } - static jsid getKey(Property *p) { return p->id; } -}; - /* * Whether Array.prototype, or an object on its proto chain, has an * indexed property. @@ -894,9 +961,10 @@ class TypeScript static inline void MonitorAssign(JSContext *cx, HandleObject obj, jsid id); /* Add a type for a variable in a script. */ - static inline void SetThis(JSContext *cx, JSScript *script, Type type); + static inline void SetThis(JSContext *cx, JSScript *script, TypeSet::Type type); static inline void SetThis(JSContext *cx, JSScript *script, const js::Value &value); - static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type); + static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, + TypeSet::Type type); static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value); @@ -940,45 +1008,6 @@ FinishCompilation(JSContext *cx, HandleScript script, CompilerConstraintList *co void FinishDefinitePropertiesAnalysis(JSContext *cx, CompilerConstraintList *constraints); -class HeapTypeSetKey; - -// Type set entry for either a JSObject with singleton type or a non-singleton ObjectGroup. -struct TypeSetObjectKey -{ - static intptr_t keyBits(TypeSetObjectKey *obj) { return (intptr_t) obj; } - static TypeSetObjectKey *getKey(TypeSetObjectKey *obj) { return obj; } - - static inline TypeSetObjectKey *get(JSObject *obj); - static inline TypeSetObjectKey *get(ObjectGroup *group); - - bool isGroup() { - return (uintptr_t(this) & 1) == 0; - } - bool isSingleton() { - return (uintptr_t(this) & 1) != 0; - } - - inline ObjectGroup *group(); - inline JSObject *singleton(); - - inline ObjectGroup *groupNoBarrier(); - inline JSObject *singletonNoBarrier(); - - const Class *clasp(); - TaggedProto proto(); - TypeNewScript *newScript(); - - bool unknownProperties(); - bool hasFlags(CompilerConstraintList *constraints, ObjectGroupFlags flags); - bool hasStableClassAndProto(CompilerConstraintList *constraints); - void watchStateChangeForInlinedCall(CompilerConstraintList *constraints); - void watchStateChangeForTypedArrayData(CompilerConstraintList *constraints); - HeapTypeSetKey property(jsid id); - void ensureTrackedProperty(JSContext *cx, jsid id); - - ObjectGroup *maybeGroup(); -}; - // Representation of a heap type property which may or may not be instantiated. // Heap properties for singleton types are instantiated lazily as they are used // by the compiler, but this is only done on the main thread. If we are @@ -989,10 +1018,10 @@ struct TypeSetObjectKey // during generation of baseline caches. class HeapTypeSetKey { - friend struct TypeSetObjectKey; + friend class TypeSet::ObjectKey; // Object and property being accessed. - TypeSetObjectKey *object_; + TypeSet::ObjectKey *object_; jsid id_; // If instantiated, the underlying heap type set. @@ -1003,7 +1032,7 @@ class HeapTypeSetKey : object_(nullptr), id_(JSID_EMPTY), maybeTypes_(nullptr) {} - TypeSetObjectKey *object() const { return object_; } + TypeSet::ObjectKey *object() const { return object_; } jsid id() const { return id_; } HeapTypeSet *maybeTypes() const { return maybeTypes_; } @@ -1166,8 +1195,6 @@ enum SpewChannel { SPEW_COUNT }; -const char *NonObjectTypeString(Type type); - #ifdef DEBUG const char * InferSpewColorReset(); @@ -1175,11 +1202,9 @@ const char * InferSpewColor(TypeConstraint *constraint); const char * InferSpewColor(TypeSet *types); void InferSpew(SpewChannel which, const char *fmt, ...); -const char * TypeString(Type type); -const char * ObjectGroupString(ObjectGroup *group); /* Check that the type property for id in group contains value. */ -bool TypeHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value &value); +bool ObjectGroupHasProperty(JSContext *cx, ObjectGroup *group, jsid id, const Value &value); #else @@ -1187,8 +1212,6 @@ inline const char * InferSpewColorReset() { return nullptr; } inline const char * InferSpewColor(TypeConstraint *constraint) { return nullptr; } inline const char * InferSpewColor(TypeSet *types) { return nullptr; } inline void InferSpew(SpewChannel which, const char *fmt, ...) {} -inline const char * TypeString(Type type) { return nullptr; } -inline const char * ObjectGroupString(ObjectGroup *group) { return nullptr; } #endif @@ -1199,7 +1222,6 @@ MOZ_NORETURN MOZ_COLD void TypeFailure(JSContext *cx, const char *fmt, ...); void PrintTypes(JSContext *cx, JSCompartment *comp, bool force); -} /* namespace types */ } /* namespace js */ // JS::ubi::Nodes can point to object groups; they're js::gc::Cell instances diff --git a/js/src/jsinferinlines.h b/js/src/jsinferinlines.h index e2100c156565..81a8fa250669 100644 --- a/js/src/jsinferinlines.h +++ b/js/src/jsinferinlines.h @@ -27,7 +27,6 @@ #include "jscntxtinlines.h" namespace js { -namespace types { ///////////////////////////////////////////////////////////////////// // CompilerOutput & RecompileInfo @@ -92,40 +91,40 @@ RecompileInfo::shouldSweep(TypeZone &types) // Types ///////////////////////////////////////////////////////////////////// -/* static */ inline TypeSetObjectKey * -TypeSetObjectKey::get(JSObject *obj) +/* static */ inline TypeSet::ObjectKey * +TypeSet::ObjectKey::get(JSObject *obj) { MOZ_ASSERT(obj); if (obj->isSingleton()) - return (TypeSetObjectKey *) (uintptr_t(obj) | 1); - return (TypeSetObjectKey *) obj->group(); + return (ObjectKey *) (uintptr_t(obj) | 1); + return (ObjectKey *) obj->group(); } -/* static */ inline TypeSetObjectKey * -TypeSetObjectKey::get(ObjectGroup *group) +/* static */ inline TypeSet::ObjectKey * +TypeSet::ObjectKey::get(ObjectGroup *group) { MOZ_ASSERT(group); if (group->singleton()) - return (TypeSetObjectKey *) (uintptr_t(group->singleton()) | 1); - return (TypeSetObjectKey *) group; + return (ObjectKey *) (uintptr_t(group->singleton()) | 1); + return (ObjectKey *) group; } inline ObjectGroup * -TypeSetObjectKey::groupNoBarrier() +TypeSet::ObjectKey::groupNoBarrier() { MOZ_ASSERT(isGroup()); return (ObjectGroup *) this; } inline JSObject * -TypeSetObjectKey::singletonNoBarrier() +TypeSet::ObjectKey::singletonNoBarrier() { MOZ_ASSERT(isSingleton()); return (JSObject *) (uintptr_t(this) & ~1); } inline ObjectGroup * -TypeSetObjectKey::group() +TypeSet::ObjectKey::group() { ObjectGroup *res = groupNoBarrier(); ObjectGroup::readBarrier(res); @@ -133,56 +132,56 @@ TypeSetObjectKey::group() } inline JSObject * -TypeSetObjectKey::singleton() +TypeSet::ObjectKey::singleton() { JSObject *res = singletonNoBarrier(); JSObject::readBarrier(res); return res; } -/* static */ inline Type -Type::ObjectType(JSObject *obj) +/* static */ inline TypeSet::Type +TypeSet::ObjectType(JSObject *obj) { if (obj->isSingleton()) return Type(uintptr_t(obj) | 1); return Type(uintptr_t(obj->group())); } -/* static */ inline Type -Type::ObjectType(ObjectGroup *group) +/* static */ inline TypeSet::Type +TypeSet::ObjectType(ObjectGroup *group) { if (group->singleton()) return Type(uintptr_t(group->singleton()) | 1); return Type(uintptr_t(group)); } -/* static */ inline Type -Type::ObjectType(TypeSetObjectKey *obj) +/* static */ inline TypeSet::Type +TypeSet::ObjectType(ObjectKey *obj) { return Type(uintptr_t(obj)); } -inline Type -GetValueType(const Value &val) +inline TypeSet::Type +TypeSet::GetValueType(const Value &val) { if (val.isDouble()) - return Type::DoubleType(); + return TypeSet::DoubleType(); if (val.isObject()) - return Type::ObjectType(&val.toObject()); - return Type::PrimitiveType(val.extractNonDoubleType()); + return TypeSet::ObjectType(&val.toObject()); + return TypeSet::PrimitiveType(val.extractNonDoubleType()); } inline bool -IsUntrackedValue(const Value &val) +TypeSet::IsUntrackedValue(const Value &val) { return val.isMagic() && (val.whyMagic() == JS_OPTIMIZED_OUT || val.whyMagic() == JS_UNINITIALIZED_LEXICAL); } -inline Type -GetMaybeUntrackedValueType(const Value &val) +inline TypeSet::Type +TypeSet::GetMaybeUntrackedValueType(const Value &val) { - return IsUntrackedValue(val) ? Type::UnknownType() : GetValueType(val); + return IsUntrackedValue(val) ? UnknownType() : GetValueType(val); } inline TypeFlags @@ -398,7 +397,7 @@ PropertyHasBeenMarkedNonConstant(JSObject *obj, jsid id) } inline bool -HasTypePropertyId(JSObject *obj, jsid id, Type type) +HasTypePropertyId(JSObject *obj, jsid id, TypeSet::Type type) { if (obj->hasLazyGroup()) return true; @@ -415,15 +414,15 @@ HasTypePropertyId(JSObject *obj, jsid id, Type type) inline bool HasTypePropertyId(JSObject *obj, jsid id, const Value &value) { - return HasTypePropertyId(obj, id, GetValueType(value)); + return HasTypePropertyId(obj, id, TypeSet::GetValueType(value)); } -void AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, Type type); +void AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, TypeSet::Type type); void AddTypePropertyId(ExclusiveContext *cx, ObjectGroup *group, jsid id, const Value &value); /* Add a possible type for a property of obj. */ inline void -AddTypePropertyId(ExclusiveContext *cx, JSObject *obj, jsid id, Type type) +AddTypePropertyId(ExclusiveContext *cx, JSObject *obj, jsid id, TypeSet::Type type) { id = IdToTypeId(id); if (TrackPropertyTypes(cx, obj, id)) @@ -489,10 +488,8 @@ MarkObjectStateChange(ExclusiveContext *cx, JSObject *obj) } /* Interface helpers for JSScript*. */ -extern void TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, - const js::Value &rval); -extern void TypeDynamicResult(JSContext *cx, JSScript *script, jsbytecode *pc, - js::types::Type type); +extern void TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const Value &rval); +extern void TypeDynamicResult(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet::Type type); ///////////////////////////////////////////////////////////////////// // Script interface functions @@ -622,7 +619,7 @@ TypeScript::MonitorAssign(JSContext *cx, HandleObject obj, jsid id) } /* static */ inline void -TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) +TypeScript::SetThis(JSContext *cx, JSScript *script, TypeSet::Type type) { StackTypeSet *types = ThisTypes(script); if (!types) @@ -632,7 +629,7 @@ TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) AutoEnterAnalysis enter(cx); InferSpew(ISpewOps, "externalType: setThis %p: %s", - script, TypeString(type)); + script, TypeSet::TypeString(type)); types->addType(cx, type); } } @@ -640,11 +637,11 @@ TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) /* static */ inline void TypeScript::SetThis(JSContext *cx, JSScript *script, const js::Value &value) { - SetThis(cx, script, GetValueType(value)); + SetThis(cx, script, TypeSet::GetValueType(value)); } /* static */ inline void -TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type) +TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, TypeSet::Type type) { StackTypeSet *types = ArgTypes(script, arg); if (!types) @@ -654,7 +651,7 @@ TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type AutoEnterAnalysis enter(cx); InferSpew(ISpewOps, "externalType: setArg %p %u: %s", - script, arg, TypeString(type)); + script, arg, TypeSet::TypeString(type)); types->addType(cx, type); } } @@ -662,210 +659,211 @@ TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type /* static */ inline void TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value) { - Type type = GetValueType(value); - SetArgument(cx, script, arg, type); + SetArgument(cx, script, arg, TypeSet::GetValueType(value)); } +///////////////////////////////////////////////////////////////////// +// TypeHashSet +///////////////////////////////////////////////////////////////////// + +// Hashing code shared by objects in TypeSets and properties in ObjectGroups. +struct TypeHashSet +{ + // The sets of objects in a type set grow monotonically, are usually empty, + // almost always small, and sometimes big. For empty or singleton sets, the + // the pointer refers directly to the value. For sets fitting into + // SET_ARRAY_SIZE, an array of this length is used to store the elements. + // For larger sets, a hash table filled to 25%-50% of capacity is used, + // with collisions resolved by linear probing. + static const unsigned SET_ARRAY_SIZE = 8; + static const unsigned SET_CAPACITY_OVERFLOW = 1u << 30; + + // Get the capacity of a set with the given element count. + static inline unsigned + Capacity(unsigned count) + { + MOZ_ASSERT(count >= 2); + MOZ_ASSERT(count < SET_CAPACITY_OVERFLOW); + + if (count <= SET_ARRAY_SIZE) + return SET_ARRAY_SIZE; + + return 1u << (mozilla::FloorLog2(count) + 2); + } + + // Compute the FNV hash for the low 32 bits of v. + template + static inline uint32_t + HashKey(T v) + { + uint32_t nv = KEY::keyBits(v); + + uint32_t hash = 84696351 ^ (nv & 0xff); + hash = (hash * 16777619) ^ ((nv >> 8) & 0xff); + hash = (hash * 16777619) ^ ((nv >> 16) & 0xff); + return (hash * 16777619) ^ ((nv >> 24) & 0xff); + } + + // Insert space for an element into the specified set and grow its capacity + // if needed. returned value is an existing or new entry (nullptr if new). + template + static U ** + InsertTry(LifoAlloc &alloc, U **&values, unsigned &count, T key) + { + unsigned capacity = Capacity(count); + unsigned insertpos = HashKey(key) & (capacity - 1); + + // Whether we are converting from a fixed array to hashtable. + bool converting = (count == SET_ARRAY_SIZE); + + if (!converting) { + while (values[insertpos] != nullptr) { + if (KEY::getKey(values[insertpos]) == key) + return &values[insertpos]; + insertpos = (insertpos + 1) & (capacity - 1); + } + } + + if (count >= SET_CAPACITY_OVERFLOW) + return nullptr; + + count++; + unsigned newCapacity = Capacity(count); + + if (newCapacity == capacity) { + MOZ_ASSERT(!converting); + return &values[insertpos]; + } + + U **newValues = alloc.newArray(newCapacity); + if (!newValues) + return nullptr; + mozilla::PodZero(newValues, newCapacity); + + for (unsigned i = 0; i < capacity; i++) { + if (values[i]) { + unsigned pos = HashKey(KEY::getKey(values[i])) & (newCapacity - 1); + while (newValues[pos] != nullptr) + pos = (pos + 1) & (newCapacity - 1); + newValues[pos] = values[i]; + } + } + + values = newValues; + + insertpos = HashKey(key) & (newCapacity - 1); + while (values[insertpos] != nullptr) + insertpos = (insertpos + 1) & (newCapacity - 1); + return &values[insertpos]; + } + + // Insert an element into the specified set if it is not already there, + // returning an entry which is nullptr if the element was not there. + template + static inline U ** + Insert(LifoAlloc &alloc, U **&values, unsigned &count, T key) + { + if (count == 0) { + MOZ_ASSERT(values == nullptr); + count++; + return (U **) &values; + } + + if (count == 1) { + U *oldData = (U*) values; + if (KEY::getKey(oldData) == key) + return (U **) &values; + + values = alloc.newArray(SET_ARRAY_SIZE); + if (!values) { + values = (U **) oldData; + return nullptr; + } + mozilla::PodZero(values, SET_ARRAY_SIZE); + count++; + + values[0] = oldData; + return &values[1]; + } + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return &values[i]; + } + + if (count < SET_ARRAY_SIZE) { + count++; + return &values[count - 1]; + } + } + + return InsertTry(alloc, values, count, key); + } + + // Lookup an entry in a hash set, return nullptr if it does not exist. + template + static inline U * + Lookup(U **values, unsigned count, T key) + { + if (count == 0) + return nullptr; + + if (count == 1) + return (KEY::getKey((U *) values) == key) ? (U *) values : nullptr; + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return values[i]; + } + return nullptr; + } + + unsigned capacity = Capacity(count); + unsigned pos = HashKey(key) & (capacity - 1); + + while (values[pos] != nullptr) { + if (KEY::getKey(values[pos]) == key) + return values[pos]; + pos = (pos + 1) & (capacity - 1); + } + + return nullptr; + } +}; + ///////////////////////////////////////////////////////////////////// // TypeSet ///////////////////////////////////////////////////////////////////// -/* - * The sets of objects and scripts in a type set grow monotonically, are usually - * empty, almost always small, and sometimes big. For empty or singleton sets, - * the pointer refers directly to the value. For sets fitting into SET_ARRAY_SIZE, - * an array of this length is used to store the elements. For larger sets, a hash - * table filled to 25%-50% of capacity is used, with collisions resolved by linear - * probing. TODO: replace these with jshashtables. - */ -const unsigned SET_ARRAY_SIZE = 8; -const unsigned SET_CAPACITY_OVERFLOW = 1u << 30; - -/* Get the capacity of a set with the given element count. */ -static inline unsigned -HashSetCapacity(unsigned count) -{ - MOZ_ASSERT(count >= 2); - MOZ_ASSERT(count < SET_CAPACITY_OVERFLOW); - - if (count <= SET_ARRAY_SIZE) - return SET_ARRAY_SIZE; - - return 1u << (mozilla::FloorLog2(count) + 2); -} - -/* Compute the FNV hash for the low 32 bits of v. */ -template -static inline uint32_t -HashKey(T v) -{ - uint32_t nv = KEY::keyBits(v); - - uint32_t hash = 84696351 ^ (nv & 0xff); - hash = (hash * 16777619) ^ ((nv >> 8) & 0xff); - hash = (hash * 16777619) ^ ((nv >> 16) & 0xff); - return (hash * 16777619) ^ ((nv >> 24) & 0xff); -} - -/* - * Insert space for an element into the specified set and grow its capacity if needed. - * returned value is an existing or new entry (nullptr if new). - */ -template -static U ** -HashSetInsertTry(LifoAlloc &alloc, U **&values, unsigned &count, T key) -{ - unsigned capacity = HashSetCapacity(count); - unsigned insertpos = HashKey(key) & (capacity - 1); - - /* Whether we are converting from a fixed array to hashtable. */ - bool converting = (count == SET_ARRAY_SIZE); - - if (!converting) { - while (values[insertpos] != nullptr) { - if (KEY::getKey(values[insertpos]) == key) - return &values[insertpos]; - insertpos = (insertpos + 1) & (capacity - 1); - } - } - - if (count >= SET_CAPACITY_OVERFLOW) - return nullptr; - - count++; - unsigned newCapacity = HashSetCapacity(count); - - if (newCapacity == capacity) { - MOZ_ASSERT(!converting); - return &values[insertpos]; - } - - U **newValues = alloc.newArray(newCapacity); - if (!newValues) - return nullptr; - mozilla::PodZero(newValues, newCapacity); - - for (unsigned i = 0; i < capacity; i++) { - if (values[i]) { - unsigned pos = HashKey(KEY::getKey(values[i])) & (newCapacity - 1); - while (newValues[pos] != nullptr) - pos = (pos + 1) & (newCapacity - 1); - newValues[pos] = values[i]; - } - } - - values = newValues; - - insertpos = HashKey(key) & (newCapacity - 1); - while (values[insertpos] != nullptr) - insertpos = (insertpos + 1) & (newCapacity - 1); - return &values[insertpos]; -} - -/* - * Insert an element into the specified set if it is not already there, returning - * an entry which is nullptr if the element was not there. - */ -template -static inline U ** -HashSetInsert(LifoAlloc &alloc, U **&values, unsigned &count, T key) -{ - if (count == 0) { - MOZ_ASSERT(values == nullptr); - count++; - return (U **) &values; - } - - if (count == 1) { - U *oldData = (U*) values; - if (KEY::getKey(oldData) == key) - return (U **) &values; - - values = alloc.newArray(SET_ARRAY_SIZE); - if (!values) { - values = (U **) oldData; - return nullptr; - } - mozilla::PodZero(values, SET_ARRAY_SIZE); - count++; - - values[0] = oldData; - return &values[1]; - } - - if (count <= SET_ARRAY_SIZE) { - for (unsigned i = 0; i < count; i++) { - if (KEY::getKey(values[i]) == key) - return &values[i]; - } - - if (count < SET_ARRAY_SIZE) { - count++; - return &values[count - 1]; - } - } - - return HashSetInsertTry(alloc, values, count, key); -} - -/* Lookup an entry in a hash set, return nullptr if it does not exist. */ -template -static inline U * -HashSetLookup(U **values, unsigned count, T key) -{ - if (count == 0) - return nullptr; - - if (count == 1) - return (KEY::getKey((U *) values) == key) ? (U *) values : nullptr; - - if (count <= SET_ARRAY_SIZE) { - for (unsigned i = 0; i < count; i++) { - if (KEY::getKey(values[i]) == key) - return values[i]; - } - return nullptr; - } - - unsigned capacity = HashSetCapacity(count); - unsigned pos = HashKey(key) & (capacity - 1); - - while (values[pos] != nullptr) { - if (KEY::getKey(values[pos]) == key) - return values[pos]; - pos = (pos + 1) & (capacity - 1); - } - - return nullptr; -} - -inline TypeSetObjectKey * -Type::objectKey() const +inline TypeSet::ObjectKey * +TypeSet::Type::objectKey() const { MOZ_ASSERT(isObject()); - return (TypeSetObjectKey *) data; + return (ObjectKey *) data; } inline JSObject * -Type::singleton() const +TypeSet::Type::singleton() const { return objectKey()->singleton(); } inline ObjectGroup * -Type::group() const +TypeSet::Type::group() const { return objectKey()->group(); } inline JSObject * -Type::singletonNoBarrier() const +TypeSet::Type::singletonNoBarrier() const { return objectKey()->singletonNoBarrier(); } inline ObjectGroup * -Type::groupNoBarrier() const +TypeSet::Type::groupNoBarrier() const { return objectKey()->groupNoBarrier(); } @@ -884,8 +882,8 @@ TypeSet::hasType(Type type) const return !!(flags & TYPE_FLAG_ANYOBJECT); } else { return !!(flags & TYPE_FLAG_ANYOBJECT) || - HashSetLookup - (objectSet, baseObjectCount(), type.objectKey()) != nullptr; + TypeHashSet::Lookup + (objectSet, baseObjectCount(), type.objectKey()) != nullptr; } } @@ -947,18 +945,18 @@ TypeSet::getObjectCount() const { MOZ_ASSERT(!unknownObject()); uint32_t count = baseObjectCount(); - if (count > SET_ARRAY_SIZE) - return HashSetCapacity(count); + if (count > TypeHashSet::SET_ARRAY_SIZE) + return TypeHashSet::Capacity(count); return count; } -inline TypeSetObjectKey * +inline TypeSet::ObjectKey * TypeSet::getObject(unsigned i) const { MOZ_ASSERT(i < getObjectCount()); if (baseObjectCount() == 1) { MOZ_ASSERT(i == 0); - return (TypeSetObjectKey *) objectSet; + return (ObjectKey *) objectSet; } return objectSet[i]; } @@ -966,28 +964,28 @@ TypeSet::getObject(unsigned i) const inline JSObject * TypeSet::getSingleton(unsigned i) const { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); return (key && key->isSingleton()) ? key->singleton() : nullptr; } inline ObjectGroup * TypeSet::getGroup(unsigned i) const { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); return (key && key->isGroup()) ? key->group() : nullptr; } inline JSObject * TypeSet::getSingletonNoBarrier(unsigned i) const { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); return (key && key->isSingleton()) ? key->singletonNoBarrier() : nullptr; } inline ObjectGroup * TypeSet::getGroupNoBarrier(unsigned i) const { - TypeSetObjectKey *key = getObject(i); + ObjectKey *key = getObject(i); return (key && key->isGroup()) ? key->groupNoBarrier() : nullptr; } @@ -1016,8 +1014,6 @@ TypeNewScript::writeBarrierPre(TypeNewScript *newScript) newScript->trace(zone->barrierTracer()); } -} // namespace types - ///////////////////////////////////////////////////////////////////// // ObjectGroup ///////////////////////////////////////////////////////////////////// @@ -1037,25 +1033,25 @@ ObjectGroup::setBasePropertyCount(uint32_t count) | (count << OBJECT_FLAG_PROPERTY_COUNT_SHIFT); } -inline types::HeapTypeSet * +inline HeapTypeSet * ObjectGroup::getProperty(ExclusiveContext *cx, jsid id) { MOZ_ASSERT(JSID_IS_VOID(id) || JSID_IS_EMPTY(id) || JSID_IS_STRING(id) || JSID_IS_SYMBOL(id)); - MOZ_ASSERT_IF(!JSID_IS_EMPTY(id), id == types::IdToTypeId(id)); + MOZ_ASSERT_IF(!JSID_IS_EMPTY(id), id == IdToTypeId(id)); MOZ_ASSERT(!unknownProperties()); - if (types::HeapTypeSet *types = maybeGetProperty(id)) + if (HeapTypeSet *types = maybeGetProperty(id)) return types; - types::Property *base = cx->typeLifoAlloc().new_(id); + Property *base = cx->typeLifoAlloc().new_(id); if (!base) { markUnknown(cx); return nullptr; } uint32_t propertyCount = basePropertyCount(); - types::Property **pprop = types::HashSetInsert - (cx->typeLifoAlloc(), propertySet, propertyCount, id); + Property **pprop = TypeHashSet::Insert + (cx->typeLifoAlloc(), propertySet, propertyCount, id); if (!pprop) { markUnknown(cx); return nullptr; @@ -1078,15 +1074,15 @@ ObjectGroup::getProperty(ExclusiveContext *cx, jsid id) return &base->types; } -inline types::HeapTypeSet * +inline HeapTypeSet * ObjectGroup::maybeGetProperty(jsid id) { MOZ_ASSERT(JSID_IS_VOID(id) || JSID_IS_EMPTY(id) || JSID_IS_STRING(id) || JSID_IS_SYMBOL(id)); - MOZ_ASSERT_IF(!JSID_IS_EMPTY(id), id == types::IdToTypeId(id)); + MOZ_ASSERT_IF(!JSID_IS_EMPTY(id), id == IdToTypeId(id)); MOZ_ASSERT(!unknownProperties()); - types::Property *prop = types::HashSetLookup - (propertySet, basePropertyCount(), id); + Property *prop = TypeHashSet::Lookup + (propertySet, basePropertyCount(), id); return prop ? &prop->types : nullptr; } @@ -1095,37 +1091,37 @@ inline unsigned ObjectGroup::getPropertyCount() { uint32_t count = basePropertyCount(); - if (count > types::SET_ARRAY_SIZE) - return types::HashSetCapacity(count); + if (count > TypeHashSet::SET_ARRAY_SIZE) + return TypeHashSet::Capacity(count); return count; } -inline types::Property * +inline ObjectGroup::Property * ObjectGroup::getProperty(unsigned i) { MOZ_ASSERT(i < getPropertyCount()); if (basePropertyCount() == 1) { MOZ_ASSERT(i == 0); - return (types::Property *) propertySet; + return (Property *) propertySet; } return propertySet[i]; } template <> -struct GCMethods +struct GCMethods { - static types::Type initial() { return types::Type::UnknownType(); } - static bool poisoned(const types::Type &v) { + static TypeSet::Type initial() { return TypeSet::UnknownType(); } + static bool poisoned(TypeSet::Type v) { return (v.isGroup() && IsPoisonedPtr(v.group())) || (v.isSingleton() && IsPoisonedPtr(v.singleton())); } }; template <> -struct GCMethods +struct GCMethods { - static types::Type initial() { return types::Type::UnknownType(); } - static bool poisoned(const types::Type &v) { + static TypeSet::Type initial() { return TypeSet::UnknownType(); } + static bool poisoned(TypeSet::Type v) { return (v.isGroup() && IsPoisonedPtr(v.group())) || (v.isSingleton() && IsPoisonedPtr(v.singleton())); } @@ -1133,7 +1129,7 @@ struct GCMethods } // namespace js -inline js::types::TypeScript * +inline js::TypeScript * JSScript::types() { maybeSweepTypes(nullptr); diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp index a6632f9a6be2..9123276a5596 100644 --- a/js/src/jsiter.cpp +++ b/js/src/jsiter.cpp @@ -580,7 +580,7 @@ VectorToKeyIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVecto if (obj->isSingleton() && !obj->setIteratedSingleton(cx)) return false; - types::MarkObjectGroupFlags(cx, obj, OBJECT_FLAG_ITERATED); + MarkObjectGroupFlags(cx, obj, OBJECT_FLAG_ITERATED); Rooted iterobj(cx, NewPropertyIteratorObject(cx, flags)); if (!iterobj) @@ -623,7 +623,7 @@ VectorToValueIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVec if (obj->isSingleton() && !obj->setIteratedSingleton(cx)) return false; - types::MarkObjectGroupFlags(cx, obj, OBJECT_FLAG_ITERATED); + MarkObjectGroupFlags(cx, obj, OBJECT_FLAG_ITERATED); Rooted iterobj(cx, NewPropertyIteratorObject(cx, flags)); if (!iterobj) diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 6927a0936212..462d7cceb52e 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -39,7 +39,6 @@ #include "vm/String-inl.h" using namespace js; -using namespace js::types; using mozilla::Abs; using mozilla::ArrayLength; diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 6d53c8faa247..698671cddb78 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -67,7 +67,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::DebugOnly; using mozilla::Maybe; @@ -1605,7 +1604,7 @@ CreateThisForFunctionWithGroup(JSContext *cx, HandleObjectGroup group, JSObject if (group->maybeUnboxedLayout() && newKind != SingletonObject) return UnboxedPlainObject::create(cx, group, newKind); - if (types::TypeNewScript *newScript = group->newScript()) { + if (TypeNewScript *newScript = group->newScript()) { if (newScript->analyzed()) { // The definite properties analysis has been performed for this // group, so get the shape and finalize kind to use from the @@ -1685,7 +1684,7 @@ js::CreateThisForFunctionWithProto(JSContext *cx, HandleObject callee, JSObject JSScript *script = callee->as().getOrCreateScript(cx); if (!script) return nullptr; - TypeScript::SetThis(cx, script, types::Type::ObjectType(res)); + TypeScript::SetThis(cx, script, TypeSet::ObjectType(res)); } return res; @@ -1711,7 +1710,7 @@ js::CreateThisForFunction(JSContext *cx, HandleObject callee, NewObjectKind newK NativeObject::clear(cx, nobj); JSScript *calleeScript = callee->as().nonLazyScript(); - TypeScript::SetThis(cx, calleeScript, types::Type::ObjectType(nobj)); + TypeScript::SetThis(cx, calleeScript, TypeSet::ObjectType(nobj)); return nobj; } @@ -3335,7 +3334,7 @@ js::WatchGuts(JSContext *cx, JS::HandleObject origObj, JS::HandleId id, JS::Hand if (!NativeObject::sparsifyDenseElements(cx, obj.as())) return false; - types::MarkTypePropertyNonData(cx, obj, id); + MarkTypePropertyNonData(cx, obj, id); } WatchpointMap *wpmap = cx->compartment()->watchpointMap; diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 7f15db094dff..b02581847577 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -177,7 +177,7 @@ js::GetElementNoGC(JSContext *cx, JSObject *obj, JSObject *receiver, uint32_t in inline bool js::DeleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded) { - types::MarkTypePropertyNonData(cx, obj, id); + MarkTypePropertyNonData(cx, obj, id); if (DeletePropertyOp op = obj->getOps()->deleteProperty) return op(cx, obj, id, succeeded); return NativeDeleteProperty(cx, obj.as(), id, succeeded); @@ -198,7 +198,7 @@ js::DeleteElement(JSContext *cx, HandleObject obj, uint32_t index, bool *succeed inline bool js::SetPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp) { - types::MarkTypePropertyNonData(cx, obj, id); + MarkTypePropertyNonData(cx, obj, id); SetAttributesOp op = obj->getOps()->setAttributes; if (op) return op(cx, obj, id, attrsp); @@ -758,7 +758,7 @@ NewObjectMetadata(ExclusiveContext *cxArg, JSObject **pmetadata) { // Use AutoEnterAnalysis to prohibit both any GC activity under the // callback, and any reentering of JS via Invoke() etc. - types::AutoEnterAnalysis enter(cx); + AutoEnterAnalysis enter(cx); if (!cx->compartment()->callObjectMetadataCallback(cx, pmetadata)) return false; diff --git a/js/src/json.cpp b/js/src/json.cpp index c83f907f31dc..13376c3c201f 100644 --- a/js/src/json.cpp +++ b/js/src/json.cpp @@ -29,7 +29,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::IsFinite; using mozilla::Maybe; diff --git a/js/src/jsscript.h b/js/src/jsscript.h index 166afd92407a..00a2063694be 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -823,7 +823,7 @@ class JSScript : public js::gc::TenuredCell private: /* Persistent type information retained across GCs. */ - js::types::TypeScript *types_; + js::TypeScript *types_; // This script's ScriptSourceObject, or a CCW thereof. // @@ -1455,9 +1455,9 @@ class JSScript : public js::gc::TenuredCell /* Ensure the script has a TypeScript. */ inline bool ensureHasTypes(JSContext *cx); - inline js::types::TypeScript *types(); + inline js::TypeScript *types(); - void maybeSweepTypes(js::types::AutoClearTypeInferenceStateOnOOM *oom); + void maybeSweepTypes(js::AutoClearTypeInferenceStateOnOOM *oom); inline js::GlobalObject &global() const; js::GlobalObject &uninlinedGlobal() const; diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index 4d11745d25df..ef843a257105 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -52,7 +52,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using namespace js::unicode; using JS::Symbol; @@ -3788,7 +3787,7 @@ js::str_split(JSContext *cx, unsigned argc, Value *vp) RootedObjectGroup group(cx, ObjectGroup::callingAllocationSiteGroup(cx, JSProto_Array)); if (!group) return false; - AddTypePropertyId(cx, group, JSID_VOID, Type::StringType()); + AddTypePropertyId(cx, group, JSID_VOID, TypeSet::StringType()); /* Step 5: Use the second argument as the split limit, if given. */ uint32_t limit; diff --git a/js/src/vm/ArgumentsObject.cpp b/js/src/vm/ArgumentsObject.cpp index 1d9ff6c822a3..1b8762d7fadf 100644 --- a/js/src/vm/ArgumentsObject.cpp +++ b/js/src/vm/ArgumentsObject.cpp @@ -340,7 +340,7 @@ ArgSetter(JSContext *cx, HandleObject obj, HandleId id, bool strict, MutableHand if (arg < argsobj->initialLength() && !argsobj->isElementDeleted(arg)) { argsobj->setElement(cx, arg, vp); if (arg < script->functionNonDelazifying()->nargs()) - types::TypeScript::SetArgument(cx, script, arg, vp); + TypeScript::SetArgument(cx, script, arg, vp); return true; } } else { diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index 9befbec20bec..3734c1c33a9d 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -58,7 +58,6 @@ using mozilla::UniquePtr; using namespace js; using namespace js::gc; -using namespace js::types; /* * Convert |v| to an array index for an array of length |length| per @@ -523,7 +522,7 @@ ArrayBufferObject::neuter(JSContext *cx, Handle buffer, // flag change will be observed. if (!cx->global()->getGroup(cx)) CrashAtUnhandlableOOM("ArrayBufferObject::neuter"); - types::MarkObjectGroupFlags(cx, cx->global(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED); + MarkObjectGroupFlags(cx, cx->global(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED); cx->compartment()->neuteredTypedObjects = 1; } diff --git a/js/src/vm/ArrayObject-inl.h b/js/src/vm/ArrayObject-inl.h index 793656fda281..380e517c1b97 100644 --- a/js/src/vm/ArrayObject-inl.h +++ b/js/src/vm/ArrayObject-inl.h @@ -22,7 +22,7 @@ ArrayObject::setLength(ExclusiveContext *cx, uint32_t length) if (length > INT32_MAX) { /* Track objects with overflowing lengths in type information. */ - types::MarkObjectGroupFlags(cx, this, OBJECT_FLAG_LENGTH_OVERFLOW); + MarkObjectGroupFlags(cx, this, OBJECT_FLAG_LENGTH_OVERFLOW); } getElementsHeader()->length = length; diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 423646a4fc52..35810d435e69 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -1910,7 +1910,7 @@ UpdateExecutionObservabilityOfScriptsInZone(JSContext *cx, Zone *zone, // Iterate through observable scripts, invalidating their Ion scripts and // appending them to a vector for discarding their baseline scripts later. { - types::AutoEnterAnalysis enter(fop, zone); + AutoEnterAnalysis enter(fop, zone); if (JSScript *script = obs.singleScriptForZoneInvalidation()) { if (obs.shouldRecompileOrInvalidate(script)) { if (!AppendAndInvalidateScript(cx, zone, script, scripts)) diff --git a/js/src/vm/GeneratorObject.cpp b/js/src/vm/GeneratorObject.cpp index bb4a2bfe166a..ee6de2c4307b 100644 --- a/js/src/vm/GeneratorObject.cpp +++ b/js/src/vm/GeneratorObject.cpp @@ -13,7 +13,6 @@ #include "vm/Stack-inl.h" using namespace js; -using namespace js::types; JSObject * GeneratorObject::create(JSContext *cx, AbstractFramePtr frame) diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index 8941310380cf..f2e0527593c3 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -199,7 +199,7 @@ GlobalObject::resolveConstructor(JSContext *cx, Handle global, JS if (clasp->spec.shouldDefineConstructor()) { // Stash type information, so that what we do here is equivalent to // initBuiltinConstructor. - types::AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); + AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); } return true; @@ -224,7 +224,7 @@ GlobalObject::initBuiltinConstructor(JSContext *cx, Handle global global->setPrototype(key, ObjectValue(*proto)); global->setConstructorPropertySlot(key, ObjectValue(*ctor)); - types::AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); + AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); return true; } diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index ee4c37708880..4e722391d76b 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -55,7 +55,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::DebugOnly; using mozilla::NumberEqualsInt32; @@ -1322,7 +1321,7 @@ static MOZ_ALWAYS_INLINE bool SetObjectElementOperation(JSContext *cx, Handle obj, HandleId id, const Value &value, bool strict, JSScript *script = nullptr, jsbytecode *pc = nullptr) { - types::TypeScript::MonitorAssign(cx, obj, id); + TypeScript::MonitorAssign(cx, obj, id); if (obj->isNative() && JSID_IS_INT(id)) { uint32_t length = obj->as().getDenseInitializedLength(); @@ -3963,8 +3962,7 @@ js::RunOnceScriptPrologue(JSContext *cx, HandleScript script) if (!script->functionNonDelazifying()->getGroup(cx)) return false; - types::MarkObjectGroupFlags(cx, script->functionNonDelazifying(), - OBJECT_FLAG_RUNONCE_INVALIDATED); + MarkObjectGroupFlags(cx, script->functionNonDelazifying(), OBJECT_FLAG_RUNONCE_INVALIDATED); return true; } diff --git a/js/src/vm/NativeObject-inl.h b/js/src/vm/NativeObject-inl.h index 4652d213011f..687d3d14096e 100644 --- a/js/src/vm/NativeObject-inl.h +++ b/js/src/vm/NativeObject-inl.h @@ -81,9 +81,9 @@ NativeObject::setDenseElementWithType(ExclusiveContext *cx, uint32_t index, { // Avoid a slow AddTypePropertyId call if the type is the same as the type // of the previous element. - types::Type thisType = types::GetValueType(val); - if (index == 0 || types::GetValueType(elements_[index - 1]) != thisType) - types::AddTypePropertyId(cx, this, JSID_VOID, thisType); + TypeSet::Type thisType = TypeSet::GetValueType(val); + if (index == 0 || TypeSet::GetValueType(elements_[index - 1]) != thisType) + AddTypePropertyId(cx, this, JSID_VOID, thisType); setDenseElementMaybeConvertDouble(index, val); } @@ -92,14 +92,14 @@ NativeObject::initDenseElementWithType(ExclusiveContext *cx, uint32_t index, const Value &val) { MOZ_ASSERT(!shouldConvertDoubleElements()); - types::AddTypePropertyId(cx, this, JSID_VOID, val); + AddTypePropertyId(cx, this, JSID_VOID, val); initDenseElement(index, val); } inline void NativeObject::setDenseElementHole(ExclusiveContext *cx, uint32_t index) { - types::MarkObjectGroupFlags(cx, this, OBJECT_FLAG_NON_PACKED); + MarkObjectGroupFlags(cx, this, OBJECT_FLAG_NON_PACKED); setDenseElement(index, MagicValue(JS_ELEMENTS_HOLE)); } @@ -107,9 +107,7 @@ NativeObject::setDenseElementHole(ExclusiveContext *cx, uint32_t index) NativeObject::removeDenseElementForSparseIndex(ExclusiveContext *cx, HandleNativeObject obj, uint32_t index) { - types::MarkObjectGroupFlags(cx, obj, - OBJECT_FLAG_NON_PACKED | - OBJECT_FLAG_SPARSE_INDEXES); + MarkObjectGroupFlags(cx, obj, OBJECT_FLAG_NON_PACKED | OBJECT_FLAG_SPARSE_INDEXES); if (obj->containsDenseElement(index)) obj->setDenseElement(index, MagicValue(JS_ELEMENTS_HOLE)); } @@ -124,7 +122,7 @@ inline void NativeObject::markDenseElementsNotPacked(ExclusiveContext *cx) { MOZ_ASSERT(isNative()); - types::MarkObjectGroupFlags(cx, this, OBJECT_FLAG_NON_PACKED); + MarkObjectGroupFlags(cx, this, OBJECT_FLAG_NON_PACKED); } inline void @@ -320,7 +318,7 @@ NativeObject::setSlotWithType(ExclusiveContext *cx, Shape *shape, if (overwriting) shape->setOverwritten(); - types::AddTypePropertyId(cx, this, shape->propid(), value); + AddTypePropertyId(cx, this, shape->propid(), value); } /* Make an object with pregenerated shape from a NEWOBJECT bytecode. */ diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index e6e0dc24aa8a..34c21d8151cc 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -1118,15 +1118,15 @@ UpdateShapeTypeAndValue(ExclusiveContext *cx, NativeObject *obj, Shape *shape, c // Per the acquired properties analysis, when the shape of a partially // initialized object is changed to its fully initialized shape, its // group can be updated as well. - if (types::TypeNewScript *newScript = obj->groupRaw()->newScript()) { + if (TypeNewScript *newScript = obj->groupRaw()->newScript()) { if (newScript->initializedShape() == shape) obj->setGroup(newScript->initializedGroup()); } } if (!shape->hasSlot() || !shape->hasDefaultGetter() || !shape->hasDefaultSetter()) - types::MarkTypePropertyNonData(cx, obj, id); + MarkTypePropertyNonData(cx, obj, id); if (!shape->writable()) - types::MarkTypePropertyNonWritable(cx, obj, id); + MarkTypePropertyNonWritable(cx, obj, id); return true; } @@ -1596,7 +1596,7 @@ GetExistingProperty(JSContext *cx, !obj->isSingleton() && !obj->template is() && shape->hasDefaultGetter(), - js::types::TypeHasProperty(cx, obj->group(), shape->propid(), vp)); + ObjectGroupHasProperty(cx, obj->group(), shape->propid(), vp)); } else { vp.setUndefined(); } @@ -2294,7 +2294,7 @@ js::NativeSetPropertyAttributes(JSContext *cx, HandleNativeObject obj, HandleId if (!NativeObject::changePropertyAttributes(cx, nobj.as(), shape, *attrsp)) return false; if (*attrsp & JSPROP_READONLY) - types::MarkTypePropertyNonWritable(cx, nobj, id); + MarkTypePropertyNonWritable(cx, nobj, id); return true; } else { return SetPropertyAttributes(cx, nobj, id, attrsp); diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp index a36ea633a077..3243d46a0728 100644 --- a/js/src/vm/ObjectGroup.cpp +++ b/js/src/vm/ObjectGroup.cpp @@ -19,7 +19,6 @@ #include "jsobjinlines.h" using namespace js; -using namespace js::types; using mozilla::PodZero; @@ -549,22 +548,22 @@ ObjectGroup::defaultNewGroup(ExclusiveContext *cx, const Class *clasp, const JSAtomState &names = cx->names(); if (obj->is()) { - AddTypePropertyId(cx, group, NameToId(names.source), Type::StringType()); - AddTypePropertyId(cx, group, NameToId(names.global), Type::BooleanType()); - AddTypePropertyId(cx, group, NameToId(names.ignoreCase), Type::BooleanType()); - AddTypePropertyId(cx, group, NameToId(names.multiline), Type::BooleanType()); - AddTypePropertyId(cx, group, NameToId(names.sticky), Type::BooleanType()); - AddTypePropertyId(cx, group, NameToId(names.lastIndex), Type::Int32Type()); + AddTypePropertyId(cx, group, NameToId(names.source), TypeSet::StringType()); + AddTypePropertyId(cx, group, NameToId(names.global), TypeSet::BooleanType()); + AddTypePropertyId(cx, group, NameToId(names.ignoreCase), TypeSet::BooleanType()); + AddTypePropertyId(cx, group, NameToId(names.multiline), TypeSet::BooleanType()); + AddTypePropertyId(cx, group, NameToId(names.sticky), TypeSet::BooleanType()); + AddTypePropertyId(cx, group, NameToId(names.lastIndex), TypeSet::Int32Type()); } if (obj->is()) - AddTypePropertyId(cx, group, NameToId(names.length), Type::Int32Type()); + AddTypePropertyId(cx, group, NameToId(names.length), TypeSet::Int32Type()); if (obj->is()) { - AddTypePropertyId(cx, group, NameToId(names.fileName), Type::StringType()); - AddTypePropertyId(cx, group, NameToId(names.lineNumber), Type::Int32Type()); - AddTypePropertyId(cx, group, NameToId(names.columnNumber), Type::Int32Type()); - AddTypePropertyId(cx, group, NameToId(names.stack), Type::StringType()); + AddTypePropertyId(cx, group, NameToId(names.fileName), TypeSet::StringType()); + AddTypePropertyId(cx, group, NameToId(names.lineNumber), TypeSet::Int32Type()); + AddTypePropertyId(cx, group, NameToId(names.columnNumber), TypeSet::Int32Type()); + AddTypePropertyId(cx, group, NameToId(names.stack), TypeSet::StringType()); } } @@ -715,14 +714,14 @@ ObjectGroup::defaultNewGroup(JSContext *cx, JSProtoKey key) struct ObjectGroupCompartment::ArrayObjectKey : public DefaultHasher { - Type type; + TypeSet::Type type; JSObject *proto; ArrayObjectKey() - : type(Type::UndefinedType()), proto(nullptr) + : type(TypeSet::UndefinedType()), proto(nullptr) {} - ArrayObjectKey(Type type, JSObject *proto) + ArrayObjectKey(TypeSet::Type type, JSObject *proto) : type(type), proto(proto) {} @@ -744,7 +743,7 @@ struct ObjectGroupCompartment::ArrayObjectKey : public DefaultHashergetDenseElement(0)); + TypeSet::Type type = GetValueTypeForTable(obj->getDenseElement(0)); for (unsigned i = 1; i < len; i++) { - Type ntype = GetValueTypeForTable(obj->getDenseElement(i)); + TypeSet::Type ntype = GetValueTypeForTable(obj->getDenseElement(i)); if (ntype != type) { if (NumberTypes(type, ntype)) - type = Type::DoubleType(); + type = TypeSet::DoubleType(); else return; } @@ -801,11 +800,12 @@ ObjectGroup::fixRestArgumentsGroup(ExclusiveContext *cx, ArrayObject *obj) // Tracking element types for rest argument arrays is not worth it, but we // still want it to be known that it's a dense array. - setGroupToHomogenousArray(cx, obj, Type::UnknownType()); + setGroupToHomogenousArray(cx, obj, TypeSet::UnknownType()); } /* static */ void -ObjectGroup::setGroupToHomogenousArray(ExclusiveContext *cx, JSObject *obj, Type elementType) +ObjectGroup::setGroupToHomogenousArray(ExclusiveContext *cx, JSObject *obj, + TypeSet::Type elementType) { MOZ_ASSERT(cx->zone()->types.activeAnalysis); @@ -888,7 +888,7 @@ struct ObjectGroupCompartment::PlainObjectEntry { ReadBarrieredObjectGroup group; ReadBarrieredShape shape; - Type *types; + TypeSet::Type *types; }; /* static */ void @@ -898,8 +898,8 @@ ObjectGroupCompartment::updatePlainObjectEntryTypes(ExclusiveContext *cx, PlainO if (entry.group->unknownProperties()) return; for (size_t i = 0; i < nproperties; i++) { - Type type = entry.types[i]; - Type ntype = GetValueTypeForTable(properties[i].value); + TypeSet::Type type = entry.types[i]; + TypeSet::Type ntype = GetValueTypeForTable(properties[i].value); if (ntype == type) continue; if (ntype.isPrimitive(JSVAL_TYPE_INT32) && @@ -911,7 +911,7 @@ ObjectGroupCompartment::updatePlainObjectEntryTypes(ExclusiveContext *cx, PlainO type.isPrimitive(JSVAL_TYPE_INT32)) { /* Include 'double' in the property types to avoid the update below later. */ - entry.types[i] = Type::DoubleType(); + entry.types[i] = TypeSet::DoubleType(); } AddTypePropertyId(cx, entry.group, IdToTypeId(properties[i].id), ntype); } @@ -986,7 +986,8 @@ ObjectGroup::fixPlainObjectGroup(ExclusiveContext *cx, PlainObject *obj) if (!ids) return; - ScopedJSFreePtr types(group->zone()->pod_calloc(properties.length())); + ScopedJSFreePtr types( + group->zone()->pod_calloc(properties.length())); if (!types) return; @@ -1240,16 +1241,12 @@ ObjectGroup::getCopyOnWriteObject(JSScript *script, jsbytecode *pc) } /* static */ bool -ObjectGroup::findAllocationSiteForType(JSContext *cx, Type type, - JSScript **script, uint32_t *offset) +ObjectGroup::findAllocationSite(JSContext *cx, ObjectGroup *group, + JSScript **script, uint32_t *offset) { *script = nullptr; *offset = 0; - if (type.isUnknown() || type.isAnyObject() || !type.isGroup()) - return false; - ObjectGroup *obj = type.group(); - const ObjectGroupCompartment::AllocationSiteTable *table = cx->compartment()->objectGroups.allocationSiteTable; @@ -1260,7 +1257,7 @@ ObjectGroup::findAllocationSiteForType(JSContext *cx, Type type, !r.empty(); r.popFront()) { - if (obj == r.front().value()) { + if (group == r.front().value()) { *script = r.front().key().script; *offset = r.front().key().offset; return true; @@ -1395,7 +1392,7 @@ ObjectGroupCompartment::sweep(FreeOp *fop) if (IsObjectGroupAboutToBeFinalizedFromAnyThread(&group)) remove = true; else - key.type = Type::ObjectType(group); + key.type = TypeSet::ObjectType(group); } if (key.proto && key.proto != TaggedProto::LazyProto && IsObjectAboutToBeFinalizedFromAnyThread(&key.proto)) @@ -1441,7 +1438,7 @@ ObjectGroupCompartment::sweep(FreeOp *fop) if (IsObjectGroupAboutToBeFinalizedFromAnyThread(&group)) remove = true; else if (group != entry.types[i].groupNoBarrier()) - entry.types[i] = Type::ObjectType(group); + entry.types[i] = TypeSet::ObjectType(group); } } diff --git a/js/src/vm/ObjectGroup.h b/js/src/vm/ObjectGroup.h index e869f76b3f53..7db33e946522 100644 --- a/js/src/vm/ObjectGroup.h +++ b/js/src/vm/ObjectGroup.h @@ -9,6 +9,7 @@ #include "jsbytecode.h" #include "jsfriendapi.h" +#include "jsinfer.h" #include "ds/IdValuePair.h" #include "gc/Barrier.h" @@ -18,17 +19,11 @@ namespace js { class TypeDescr; class UnboxedLayout; -namespace types { - -class Type; class TypeNewScript; class HeapTypeSet; -struct Property; class AutoClearTypeInferenceStateOnOOM; class CompilerConstraintList; -} // namespace types - // Information about an object prototype, which can be either a particular // object, null, or a lazily generated object. The latter is only used by // certain kinds of proxies. @@ -118,81 +113,6 @@ class RootedBase : public TaggedProtoOperations } }; -/* Flags and other state stored in ObjectGroupFlags */ -enum : uint32_t { - /* Whether this group is associated with some allocation site. */ - OBJECT_FLAG_FROM_ALLOCATION_SITE = 0x1, - - /* (0x2 and 0x4 are unused) */ - - /* Mask/shift for the number of properties in propertySet */ - OBJECT_FLAG_PROPERTY_COUNT_MASK = 0xfff8, - OBJECT_FLAG_PROPERTY_COUNT_SHIFT = 3, - OBJECT_FLAG_PROPERTY_COUNT_LIMIT = - OBJECT_FLAG_PROPERTY_COUNT_MASK >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT, - - /* Whether any objects this represents may have sparse indexes. */ - OBJECT_FLAG_SPARSE_INDEXES = 0x00010000, - - /* Whether any objects this represents may not have packed dense elements. */ - OBJECT_FLAG_NON_PACKED = 0x00020000, - - /* - * Whether any objects this represents may be arrays whose length does not - * fit in an int32. - */ - OBJECT_FLAG_LENGTH_OVERFLOW = 0x00040000, - - /* Whether any objects have been iterated over. */ - OBJECT_FLAG_ITERATED = 0x00080000, - - /* For a global object, whether flags were set on the RegExpStatics. */ - OBJECT_FLAG_REGEXP_FLAGS_SET = 0x00100000, - - /* - * For the function on a run-once script, whether the function has actually - * run multiple times. - */ - OBJECT_FLAG_RUNONCE_INVALIDATED = 0x00200000, - - /* - * For a global object, whether any array buffers in this compartment with - * typed object views have been neutered. - */ - OBJECT_FLAG_TYPED_OBJECT_NEUTERED = 0x00400000, - - /* - * Whether objects with this type should be allocated directly in the - * tenured heap. - */ - OBJECT_FLAG_PRE_TENURE = 0x00800000, - - /* Whether objects with this type might have copy on write elements. */ - OBJECT_FLAG_COPY_ON_WRITE = 0x01000000, - - /* Whether this type has had its 'new' script cleared in the past. */ - OBJECT_FLAG_NEW_SCRIPT_CLEARED = 0x02000000, - - /* - * Whether all properties of this object are considered unknown. - * If set, all other flags in DYNAMIC_MASK will also be set. - */ - OBJECT_FLAG_UNKNOWN_PROPERTIES = 0x04000000, - - /* Flags which indicate dynamic properties of represented objects. */ - OBJECT_FLAG_DYNAMIC_MASK = 0x07ff0000, - - // Mask/shift for the kind of addendum attached to this group. - OBJECT_FLAG_ADDENDUM_MASK = 0x38000000, - OBJECT_FLAG_ADDENDUM_SHIFT = 27, - - // Mask/shift for this group's generation. If out of sync with the - // TypeZone's generation, this group hasn't been swept yet. - OBJECT_FLAG_GENERATION_MASK = 0x40000000, - OBJECT_FLAG_GENERATION_SHIFT = 30, -}; -typedef uint32_t ObjectGroupFlags; - /* * Lazy object groups overview. * @@ -301,9 +221,9 @@ class ObjectGroup : public gc::TenuredCell ((flags_ & OBJECT_FLAG_ADDENDUM_MASK) >> OBJECT_FLAG_ADDENDUM_SHIFT); } - types::TypeNewScript *newScriptDontCheckGeneration() const { + TypeNewScript *newScriptDontCheckGeneration() const { if (addendumKind() == Addendum_NewScript) - return reinterpret_cast(addendum_); + return reinterpret_cast(addendum_); return nullptr; } @@ -313,7 +233,7 @@ class ObjectGroup : public gc::TenuredCell return nullptr; } - types::TypeNewScript *anyNewScript(); + TypeNewScript *anyNewScript(); void detachNewScript(bool writeBarrier); public: @@ -333,12 +253,12 @@ class ObjectGroup : public gc::TenuredCell flags_ &= ~flags; } - types::TypeNewScript *newScript() { + TypeNewScript *newScript() { maybeSweep(nullptr); return newScriptDontCheckGeneration(); } - void setNewScript(types::TypeNewScript *newScript) { + void setNewScript(TypeNewScript *newScript) { setAddendum(Addendum_NewScript, newScript); } @@ -385,13 +305,71 @@ class ObjectGroup : public gc::TenuredCell setAddendum(Addendum_InterpretedFunction, fun); } + class Property + { + public: + // Identifier for this property, JSID_VOID for the aggregate integer + // index property, or JSID_EMPTY for properties holding constraints + // listening to changes in the group's state. + HeapId id; + + // Possible own types for this property. + HeapTypeSet types; + + explicit Property(jsid id) + : id(id) + {} + + Property(const Property &o) + : id(o.id.get()), types(o.types) + {} + + static uint32_t keyBits(jsid id) { return uint32_t(JSID_BITS(id)); } + static jsid getKey(Property *p) { return p->id; } + }; + private: - // Properties of this object. This may contain JSID_VOID, representing the - // types of all integer indexes of the object, and/or JSID_EMPTY, holding - // constraints listening to changes to the object's state. - // - // See types::Property for more detail about the types represented here. - types::Property **propertySet; + /* + * Properties of this object. + * + * The type sets in the properties of a group describe the possible values + * that can be read out of that property in actual JS objects. In native + * objects, property types account for plain data properties (those with a + * slot and no getter or setter hook) and dense elements. In typed objects + * and unboxed objects, property types account for object and value + * properties and elements in the object. + * + * For accesses on these properties, the correspondence is as follows: + * + * 1. If the group has unknownProperties(), the possible properties and + * value types for associated JSObjects are unknown. + * + * 2. Otherwise, for any |obj| in |group|, and any |id| which is a property + * in |obj|, before obj->getProperty(id) the property in |group| for + * |id| must reflect the result of the getProperty. + * + * There are several exceptions to this: + * + * 1. For properties of global JS objects which are undefined at the point + * where the property was (lazily) generated, the property type set will + * remain empty, and the 'undefined' type will only be added after a + * subsequent assignment or deletion. After these properties have been + * assigned a defined value, the only way they can become undefined + * again is after such an assign or deletion. + * + * 2. Array lengths are special cased by the compiler and VM and are not + * reflected in property types. + * + * 3. In typed objects (but not unboxed objects), the initial values of + * properties (null pointers and undefined values) are not reflected in + * the property types. These values are always possible when reading the + * property. + * + * We establish these by using write barriers on calls to setProperty and + * defineProperty which are on native properties, and on any jitcode which + * might update the property with a new type. + */ + Property **propertySet; public: inline ObjectGroup(const Class *clasp, TaggedProto proto, ObjectGroupFlags initialFlags); @@ -415,7 +393,7 @@ class ObjectGroup : public gc::TenuredCell return hasAnyFlags(OBJECT_FLAG_PRE_TENURE) && !unknownProperties(); } - gc::InitialHeap initialHeap(types::CompilerConstraintList *constraints); + gc::InitialHeap initialHeap(CompilerConstraintList *constraints); bool canPreTenure() { return !unknownProperties(); @@ -434,17 +412,17 @@ class ObjectGroup : public gc::TenuredCell * Get or create a property of this object. Only call this for properties which * a script accesses explicitly. */ - inline types::HeapTypeSet *getProperty(ExclusiveContext *cx, jsid id); + inline HeapTypeSet *getProperty(ExclusiveContext *cx, jsid id); /* Get a property only if it already exists. */ - inline types::HeapTypeSet *maybeGetProperty(jsid id); + inline HeapTypeSet *maybeGetProperty(jsid id); inline unsigned getPropertyCount(); - inline types::Property *getProperty(unsigned i); + inline Property *getProperty(unsigned i); /* Helpers */ - void updateNewPropertyTypes(ExclusiveContext *cx, jsid id, types::HeapTypeSet *types); + void updateNewPropertyTypes(ExclusiveContext *cx, jsid id, HeapTypeSet *types); bool addDefiniteProperties(ExclusiveContext *cx, Shape *shape); bool matchDefiniteProperties(HandleObject obj); void markPropertyNonData(ExclusiveContext *cx, jsid id); @@ -460,7 +438,7 @@ class ObjectGroup : public gc::TenuredCell void print(); inline void clearProperties(); - void maybeSweep(types::AutoClearTypeInferenceStateOnOOM *oom); + void maybeSweep(AutoClearTypeInferenceStateOnOOM *oom); private: #ifdef DEBUG @@ -568,12 +546,13 @@ class ObjectGroup : public gc::TenuredCell static ArrayObject *getCopyOnWriteObject(JSScript *script, jsbytecode *pc); // Returns false if not found. - static bool findAllocationSiteForType(JSContext *cx, types::Type type, - JSScript **script, uint32_t *offset); + static bool findAllocationSite(JSContext *cx, ObjectGroup *group, + JSScript **script, uint32_t *offset); private: static ObjectGroup *defaultNewGroup(JSContext *cx, JSProtoKey key); - static void setGroupToHomogenousArray(ExclusiveContext *cx, JSObject *obj, types::Type type); + static void setGroupToHomogenousArray(ExclusiveContext *cx, JSObject *obj, + TypeSet::Type type); }; // Structure used to manage the groups in a compartment. diff --git a/js/src/vm/ProxyObject.cpp b/js/src/vm/ProxyObject.cpp index 324b5810ef7c..80c1424110d1 100644 --- a/js/src/vm/ProxyObject.cpp +++ b/js/src/vm/ProxyObject.cpp @@ -66,7 +66,7 @@ ProxyObject::New(JSContext *cx, const BaseProxyHandler *handler, HandleValue pri /* Don't track types of properties of non-DOM and non-singleton proxies. */ if (newKind != SingletonObject && !clasp->isDOMClass()) - types::MarkObjectGroupUnknownProperties(cx, proxy->group()); + MarkObjectGroupUnknownProperties(cx, proxy->group()); return proxy; } diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp index 3d6b4a4557d7..26ea3bf7cea9 100644 --- a/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp @@ -738,8 +738,8 @@ RegExpCompartment::createMatchResultTemplateObject(JSContext *cx) // Make sure type information reflects the indexed properties which might // be added. - types::AddTypePropertyId(cx, templateObject, JSID_VOID, types::Type::StringType()); - types::AddTypePropertyId(cx, templateObject, JSID_VOID, types::Type::UndefinedType()); + AddTypePropertyId(cx, templateObject, JSID_VOID, TypeSet::StringType()); + AddTypePropertyId(cx, templateObject, JSID_VOID, TypeSet::UndefinedType()); matchResultTemplateObject_.set(templateObject); diff --git a/js/src/vm/RegExpStatics.cpp b/js/src/vm/RegExpStatics.cpp index 4097fd9eb3af..5c7514d2d2a6 100644 --- a/js/src/vm/RegExpStatics.cpp +++ b/js/src/vm/RegExpStatics.cpp @@ -76,7 +76,7 @@ RegExpStatics::markFlagsSet(JSContext *cx) // always be performed). MOZ_ASSERT_IF(cx->global()->hasRegExpStatics(), this == cx->global()->getRegExpStatics(cx)); - types::MarkObjectGroupFlags(cx, cx->global(), OBJECT_FLAG_REGEXP_FLAGS_SET); + MarkObjectGroupFlags(cx, cx->global(), OBJECT_FLAG_REGEXP_FLAGS_SET); } bool diff --git a/js/src/vm/ScopeObject-inl.h b/js/src/vm/ScopeObject-inl.h index 9ebe26da5380..99558f37f46b 100644 --- a/js/src/vm/ScopeObject-inl.h +++ b/js/src/vm/ScopeObject-inl.h @@ -24,7 +24,7 @@ ScopeObject::setAliasedVar(JSContext *cx, ScopeCoordinate sc, PropertyName *name if (isSingleton()) { MOZ_ASSERT(name); - types::AddTypePropertyId(cx, this, NameToId(name), v); + AddTypePropertyId(cx, this, NameToId(name), v); // Keep track of properties which have ever been overwritten. if (!getSlot(sc.slot()).isUndefined()) { @@ -42,7 +42,7 @@ CallObject::setAliasedVar(JSContext *cx, AliasedFormalIter fi, PropertyName *nam MOZ_ASSERT(name == fi->name()); setSlot(fi.scopeSlot(), v); if (isSingleton()) - types::AddTypePropertyId(cx, this, NameToId(name), v); + AddTypePropertyId(cx, this, NameToId(name), v); } inline void @@ -50,7 +50,7 @@ CallObject::setAliasedVarFromArguments(JSContext *cx, const Value &argsValue, js { setSlot(ArgumentsObject::SlotFromMagicScopeSlotValue(argsValue), v); if (isSingleton()) - types::AddTypePropertyId(cx, this, id, v); + AddTypePropertyId(cx, this, id, v); } inline void diff --git a/js/src/vm/ScopeObject.cpp b/js/src/vm/ScopeObject.cpp index 97f473150977..4b560f53eebb 100644 --- a/js/src/vm/ScopeObject.cpp +++ b/js/src/vm/ScopeObject.cpp @@ -25,7 +25,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::PodZero; diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp index caa9bd7702cd..8c54d180d948 100644 --- a/js/src/vm/Shape.cpp +++ b/js/src/vm/Shape.cpp @@ -893,7 +893,7 @@ NativeObject::changeProperty(ExclusiveContext *cx, HandleNativeObject obj, MOZ_ASSERT(!((attrs ^ shape->attrs) & JSPROP_SHARED) || !(attrs & JSPROP_SHARED)); - types::MarkTypePropertyNonData(cx, obj, shape->propid()); + MarkTypePropertyNonData(cx, obj, shape->propid()); if (!CheckCanChangeAttrs(cx, obj, shape, &attrs)) return nullptr; diff --git a/js/src/vm/SharedTypedArrayObject.cpp b/js/src/vm/SharedTypedArrayObject.cpp index 26a6ed3119d8..617aa22e27c4 100644 --- a/js/src/vm/SharedTypedArrayObject.cpp +++ b/js/src/vm/SharedTypedArrayObject.cpp @@ -47,7 +47,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::IsNaN; using mozilla::NegativeInfinity; diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index 8d48a1825d4d..45619273d4a5 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -47,7 +47,6 @@ using namespace js; using namespace js::gc; -using namespace js::types; using mozilla::IsNaN; using mozilla::NegativeInfinity; diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp index 15dfe30ba064..b64a9347e585 100644 --- a/js/src/vm/UnboxedObject.cpp +++ b/js/src/vm/UnboxedObject.cpp @@ -42,10 +42,10 @@ UnboxedLayout::sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) } void -UnboxedLayout::setNewScript(types::TypeNewScript *newScript, bool writeBarrier /* = true */) +UnboxedLayout::setNewScript(TypeNewScript *newScript, bool writeBarrier /* = true */) { if (newScript_ && writeBarrier) - types::TypeNewScript::writeBarrierPre(newScript_); + TypeNewScript::writeBarrierPre(newScript_); newScript_ = newScript; } @@ -92,7 +92,7 @@ UnboxedPlainObject::setValue(JSContext *cx, const UnboxedLayout::Property &prope // Update property types when writing object properties. Types for // other properties were captured when the unboxed layout was // created. - types::AddTypePropertyId(cx, this, NameToId(property.name), v); + AddTypePropertyId(cx, this, NameToId(property.name), v); *reinterpret_cast(p) = v.toObjectOrNull(); return true; @@ -440,7 +440,7 @@ PropertiesAreSuperset(const UnboxedLayout::PropertyVector &properties, UnboxedLa bool js::TryConvertToUnboxedLayout(JSContext *cx, Shape *templateShape, - ObjectGroup *group, types::PreliminaryObjectArray *objects) + ObjectGroup *group, PreliminaryObjectArray *objects) { if (!cx->runtime()->options().unboxedObjects()) return true; @@ -453,7 +453,7 @@ js::TryConvertToUnboxedLayout(JSContext *cx, Shape *templateShape, return false; size_t objectCount = 0; - for (size_t i = 0; i < types::PreliminaryObjectArray::COUNT; i++) { + for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) { JSObject *obj = objects->get(i); if (!obj) continue; @@ -625,7 +625,7 @@ js::TryConvertToUnboxedLayout(JSContext *cx, Shape *templateShape, Vector values; if (!values.reserve(objectCount * templateShape->slotSpan())) return false; - for (size_t i = 0; i < types::PreliminaryObjectArray::COUNT; i++) { + for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) { if (!objects->get(i)) continue; @@ -639,14 +639,14 @@ js::TryConvertToUnboxedLayout(JSContext *cx, Shape *templateShape, obj->setLastPropertyMakeNonNative(newShape); } - if (types::TypeNewScript *newScript = group->newScript()) + if (TypeNewScript *newScript = group->newScript()) layout->setNewScript(newScript); group->setClasp(&UnboxedPlainObject::class_); group->setUnboxedLayout(layout.get()); size_t valueCursor = 0; - for (size_t i = 0; i < types::PreliminaryObjectArray::COUNT; i++) { + for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) { if (!objects->get(i)) continue; UnboxedPlainObject *obj = &objects->get(i)->as(); diff --git a/js/src/vm/UnboxedObject.h b/js/src/vm/UnboxedObject.h index 75b926106bf9..37acecb39d98 100644 --- a/js/src/vm/UnboxedObject.h +++ b/js/src/vm/UnboxedObject.h @@ -58,7 +58,7 @@ class UnboxedLayout : public mozilla::LinkedListElement size_t size_; // Any 'new' script information associated with this layout. - types::TypeNewScript *newScript_; + TypeNewScript *newScript_; // List for use in tracing objects with this layout. This has the same // structure as the trace list on a TypeDescr. @@ -80,11 +80,11 @@ class UnboxedLayout : public mozilla::LinkedListElement return properties_; } - types::TypeNewScript *newScript() const { + TypeNewScript *newScript() const { return newScript_; } - void setNewScript(types::TypeNewScript *newScript, bool writeBarrier = true); + void setNewScript(TypeNewScript *newScript, bool writeBarrier = true); const int32_t *traceList() const { return traceList_; @@ -182,7 +182,7 @@ class UnboxedPlainObject : public JSObject // preliminary objects and their group to the new unboxed representation. bool TryConvertToUnboxedLayout(JSContext *cx, Shape *templateShape, - ObjectGroup *group, types::PreliminaryObjectArray *objects); + ObjectGroup *group, PreliminaryObjectArray *objects); inline gc::AllocKind UnboxedLayout::getAllocKind() const diff --git a/mobile/android/modules/AppConstants.jsm b/mobile/android/modules/AppConstants.jsm index 1713cbbadaad..76c7a8780f58 100644 --- a/mobile/android/modules/AppConstants.jsm +++ b/mobile/android/modules/AppConstants.jsm @@ -1,4 +1,4 @@ -#filter substitution; +#filter substitution /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -63,13 +63,6 @@ let AppConstants = Object.freeze({ false, #endif - MOZ_DEVICES: -#ifdef MOZ_DEVICES - true, -#else - false, -#endif - MOZ_SAFE_BROWSING: #ifdef MOZ_SAFE_BROWSING true,