diff --git a/.eslintignore b/.eslintignore
index fcbb279aa666..779c64502487 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -72,7 +72,6 @@ browser/components/tabview/**
browser/components/translation/**
browser/extensions/pdfjs/**
browser/extensions/pocket/content/panels/js/vendor/**
-browser/extensions/shumway/**
browser/locales/**
# Ignore all of loop since it is imported from github and checked at source.
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index a102b653b907..a5aa5b0a843e 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1397,11 +1397,6 @@ pref("pdfjs.firstRun", true);
pref("pdfjs.previousHandler.preferredAction", 0);
pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
-// Shumway is only bundled in Nightly.
-#ifdef NIGHTLY_BUILD
-pref("shumway.disabled", true);
-#endif
-
// The maximum amount of decoded image data we'll willingly keep around (we
// might keep around more than this, but we'll try to get down to this value).
// (This is intentionally on the high side; see bug 746055.)
diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js
index dbce85e8fb6a..6f5b9617d851 100644
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -64,11 +64,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PdfJs",
XPCOMUtils.defineLazyModuleGetter(this, "ProcessHangMonitor",
"resource:///modules/ProcessHangMonitor.jsm");
-if (AppConstants.NIGHTLY_BUILD) {
- XPCOMUtils.defineLazyModuleGetter(this, "ShumwayUtils",
- "resource://shumway/ShumwayUtils.jsm");
-}
-
XPCOMUtils.defineLazyModuleGetter(this, "webrtcUI",
"resource:///modules/webrtcUI.jsm");
@@ -995,13 +990,6 @@ BrowserGlue.prototype = {
// passively.
Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap.js", true);
- if (AppConstants.NIGHTLY_BUILD) {
- // Registering Shumway bootstrap script the child processes.
- Services.ppmm.loadProcessScript("chrome://shumway/content/bootstrap-content.js", true);
- // Initializing Shumway (shall be run after child script registration).
- ShumwayUtils.init();
- }
-
if (AppConstants.platform == "win") {
// For Windows 7, initialize the jump list module.
const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
diff --git a/browser/extensions/moz.build b/browser/extensions/moz.build
index 11279a10fe18..443a70c6c6f4 100644
--- a/browser/extensions/moz.build
+++ b/browser/extensions/moz.build
@@ -8,5 +8,4 @@ DIRS += [
'loop',
'pdfjs',
'pocket',
- 'shumway',
]
diff --git a/browser/extensions/shumway/LICENSE b/browser/extensions/shumway/LICENSE
deleted file mode 100644
index e454a52586f2..000000000000
--- a/browser/extensions/shumway/LICENSE
+++ /dev/null
@@ -1,178 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
diff --git a/browser/extensions/shumway/chrome.manifest b/browser/extensions/shumway/chrome.manifest
deleted file mode 100644
index 397b394a3a61..000000000000
--- a/browser/extensions/shumway/chrome.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-content shumway chrome/
-resource shumway content/
diff --git a/browser/extensions/shumway/chrome/ExternalInterface.jsm b/browser/extensions/shumway/chrome/ExternalInterface.jsm
deleted file mode 100644
index 515af05ebf77..000000000000
--- a/browser/extensions/shumway/chrome/ExternalInterface.jsm
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['ExternalInterface'];
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-// Helper class to forward external interface messages between chrome code and
-// content window / object element.
-function ExternalInterface(window, embedTag, callback) {
- this.window = window;
- this.embedTag = embedTag;
- this.callback = callback;
- this.externalComInitialized = false;
-}
-ExternalInterface.prototype = {
- processAction: function (data) {
- var parentWindow = this.window;
- var embedTag = this.embedTag;
-
- switch (data.action) {
- case 'init':
- if (this.externalComInitialized)
- return;
-
- this.externalComInitialized = true;
- this.initExternalCom(parentWindow, embedTag, this.callback);
- return;
- case 'getId':
- return embedTag.id;
- case 'eval':
- return this.__flash__eval(data.expression);
- case 'call':
- return this.__flash__call(data.request);
- case 'register':
- return this.__flash__registerCallback(data.functionName);
- case 'unregister':
- return this.__flash__unregisterCallback(data.functionName);
- }
- },
-
- initExternalCom: function (window, embedTag, onExternalCallback) {
- var traceExternalInterface = getBoolPref('shumway.externalInterface.trace', false);
- // Initialize convenience functions. Notice that these functions are
- // exposed to the content via Cu.exportFunction, so be careful (e.g. don't
- // use `this` pointer).
- this.__flash__toXML = function __flash__toXML(obj) {
- switch (typeof obj) {
- case 'boolean':
- return obj ? '' : '';
- case 'number':
- return '' + obj + '';
- case 'object':
- if (obj === null) {
- return '';
- }
- if ('hasOwnProperty' in obj && obj.hasOwnProperty('length')) {
- // array
- var xml = '';
- for (var i = 0; i < obj.length; i++) {
- xml += '' + __flash__toXML(obj[i]) + '';
- }
- return xml + '';
- }
- var xml = '';
- case 'string':
- return '' + obj.replace(/&/g, '&').replace(//g, '>') + '';
- case 'undefined':
- return '';
- }
- };
- this.__flash__eval = function (expr) {
- traceExternalInterface && window.console.log('__flash__eval: ' + expr);
- // allowScriptAccess protects page from unwanted swf scripts,
- // we can execute script in the page context without restrictions.
- var result = window.eval(expr);
- traceExternalInterface && window.console.log('__flash__eval (result): ' + result);
- return result;
- };
- this.__flash__call = function (expr) {
- traceExternalInterface && window.console.log('__flash__call (ignored): ' + expr);
- };
-
- this.__flash__registerCallback = function (functionName) {
- traceExternalInterface && window.console.log('__flash__registerCallback: ' + functionName);
- Components.utils.exportFunction(function () {
- var args = Array.prototype.slice.call(arguments, 0);
- traceExternalInterface && window.console.log('__flash__callIn: ' + functionName);
- var result;
- if (onExternalCallback) {
- result = onExternalCallback({functionName: functionName, args: args});
- traceExternalInterface && window.console.log('__flash__callIn (result): ' + result);
- }
- return window.eval(result);
- }, embedTag.wrappedJSObject, {defineAs: functionName});
- };
- this.__flash__unregisterCallback = function (functionName) {
- traceExternalInterface && window.console.log('__flash__unregisterCallback: ' + functionName);
- delete embedTag.wrappedJSObject[functionName];
- };
-
- this.exportInterfaceFunctions();
- },
-
- exportInterfaceFunctions: function () {
- var window = this.window;
- // We need to export window functions only once.
- if (!window.wrappedJSObject.__flash__initialized) {
- window.wrappedJSObject.__flash__initialized = true;
- // JavaScript eval'ed code use those functions.
- // TODO find the case when JavaScript code patches those
- // __flash__toXML will be called by the eval'ed code.
- Components.utils.exportFunction(this.__flash__toXML, window.wrappedJSObject,
- {defineAs: '__flash__toXML'});
- // The functions below are used for compatibility and are not called by chrome code.
- Components.utils.exportFunction(this.__flash__eval, window.wrappedJSObject,
- {defineAs: '__flash__eval'});
- Components.utils.exportFunction(this.__flash__call, window.wrappedJSObject,
- {defineAs: '__flash__call'});
- }
- }
-};
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
diff --git a/browser/extensions/shumway/chrome/FileLoader.jsm b/browser/extensions/shumway/chrome/FileLoader.jsm
deleted file mode 100644
index 52cf382baeb0..000000000000
--- a/browser/extensions/shumway/chrome/FileLoader.jsm
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['FileLoader'];
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-Components.utils.import('resource://gre/modules/Promise.jsm');
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/NetUtil.jsm');
-
-function FileLoaderSession(sessionId) {
- this.sessionId = sessionId;
- this.xhr = null;
-}
-FileLoaderSession.prototype = {
- abort() {
- if (this.xhr) {
- this.xhr.abort();
- this.xhr = null;
- }
- }
-};
-
-
-function FileLoader(swfUrl, baseUrl, refererUrl, callback) {
- this.swfUrl = swfUrl;
- this.baseUrl = baseUrl;
- this.refererUrl = refererUrl;
- this.callback = callback;
- this.activeSessions = Object.create(null);
-
- this.crossdomainRequestsCache = Object.create(null);
-}
-
-FileLoader.prototype = {
- load: function (data) {
- function notifyLoadFileListener(data) {
- if (!onLoadFileCallback) {
- return;
- }
- onLoadFileCallback(data);
- }
-
- var onLoadFileCallback = this.callback;
- var crossdomainRequestsCache = this.crossdomainRequestsCache;
- var baseUrl = this.baseUrl;
- var swfUrl = this.swfUrl;
-
- var url = data.url;
- var checkPolicyFile = data.checkPolicyFile;
- var sessionId = data.sessionId;
- var limit = data.limit || 0;
- var method = data.method || "GET";
- var mimeType = data.mimeType;
- var postData = data.postData || null;
- var sendReferer = canSendReferer(swfUrl, this.refererUrl);
-
- var session = new FileLoaderSession(sessionId);
- this.activeSessions[sessionId] = session;
- var self = this;
-
- var performXHR = function () {
- // Load has been aborted before we reached this point.
- if (!self.activeSessions[sessionId]) {
- return;
- }
- var xhr = session.xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].
- createInstance(Components.interfaces.nsIXMLHttpRequest);
- xhr.open(method, url, true);
- xhr.responseType = "moz-chunked-arraybuffer";
-
- if (sendReferer) {
- // Setting the referer uri, some site doing checks if swf is embedded
- // on the original page.
- xhr.setRequestHeader("Referer", self.refererUrl);
- }
-
- // TODO apply range request headers if limit is specified
-
- var lastPosition = 0;
- xhr.onprogress = function (e) {
- var position = e.loaded;
- var total = e.total;
- var data = new Uint8Array(xhr.response);
- // The event's `loaded` and `total` properties are sometimes lower than the actual
- // number of loaded bytes. In that case, increase them to that value.
- position = Math.max(position, data.byteLength);
- total = Math.max(total, data.byteLength);
-
- notifyLoadFileListener({callback:"loadFile", sessionId: sessionId,
- topic: "progress", array: data, loaded: position, total: total});
- lastPosition = position;
- if (limit && total >= limit) {
- xhr.abort();
- }
- };
- xhr.onreadystatechange = function(event) {
- if (xhr.readyState === 4) {
- delete self.activeSessions[sessionId];
- if (xhr.status !== 200 && xhr.status !== 0) {
- notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "error", error: xhr.statusText});
- }
- notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "close"});
- }
- };
- if (mimeType)
- xhr.setRequestHeader("Content-Type", mimeType);
- xhr.send(postData);
- notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "open"});
- };
-
- canDownloadFile(url, checkPolicyFile, swfUrl, crossdomainRequestsCache).then(function () {
- performXHR();
- }, function (reason) {
- log("data access is prohibited to " + url + " from " + baseUrl);
- delete self.activeSessions[sessionId];
- notifyLoadFileListener({
- callback: "loadFile", sessionId: sessionId, topic: "error",
- error: "only original swf file or file from the same origin loading supported (XDOMAIN)"
- });
- });
- },
- abort: function(sessionId) {
- var session = this.activeSessions[sessionId];
- if (!session) {
- log("Warning: trying to abort invalid session " + sessionId);
- return;
- }
- session.abort();
- delete this.activeSessions[sessionId];
- }
-};
-
-function log(aMsg) {
- let msg = 'FileLoader.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
- Services.console.logStringMessage(msg);
- dump(msg + '\n');
-}
-
-function getStringPref(pref, def) {
- try {
- return Services.prefs.getComplexValue(pref, Components.interfaces.nsISupportsString).data;
- } catch (ex) {
- return def;
- }
-}
-
-function disableXHRRedirect(xhr) {
- var listener = {
- asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) {
- // TODO perform URL check?
- callback.onRedirectVerifyCallback(Components.results.NS_ERROR_ABORT);
- },
- getInterface: function(iid) {
- return this.QueryInterface(iid);
- },
- QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIChannelEventSink])
- };
- xhr.channel.notificationCallbacks = listener;
-}
-
-function canSendReferer(url, refererUrl) {
- if (!refererUrl) {
- return false;
- }
- // Allow sending HTTPS referer only to HTTPS.
- var parsedUrl, parsedRefererUrl;
- try {
- parsedRefererUrl = NetUtil.newURI(refererUrl);
- } catch (ex) { /* skipping invalid urls */ }
- if (!parsedRefererUrl ||
- parsedRefererUrl.scheme.toLowerCase() !== 'https') {
- return true;
- }
- try {
- parsedUrl = NetUtil.newURI(url);
- } catch (ex) { /* skipping invalid urls */ }
- return !!parsedUrl && parsedUrl.scheme.toLowerCase() === 'https';
-}
-
-function canDownloadFile(url, checkPolicyFile, swfUrl, cache) {
- // TODO flash cross-origin request
- if (url === swfUrl) {
- // Allows downloading for the original file.
- return Promise.resolve(undefined);
- }
-
- // Allows downloading from the same origin.
- var parsedUrl, parsedBaseUrl;
- try {
- parsedUrl = NetUtil.newURI(url);
- } catch (ex) { /* skipping invalid urls */ }
- try {
- parsedBaseUrl = NetUtil.newURI(swfUrl);
- } catch (ex) { /* skipping invalid urls */ }
-
- if (parsedUrl && parsedBaseUrl &&
- parsedUrl.prePath === parsedBaseUrl.prePath) {
- return Promise.resolve(undefined);
- }
-
- // Additionally using internal whitelist.
- var whitelist = getStringPref('shumway.whitelist', '');
- if (whitelist && parsedUrl) {
- var whitelisted = whitelist.split(',').some(function (i) {
- return domainMatches(parsedUrl.host, i);
- });
- if (whitelisted) {
- return Promise.resolve();
- }
- }
-
- if (!parsedUrl || !parsedBaseUrl) {
- return Promise.reject('Invalid or non-specified URL or Base URL.');
- }
-
- if (!checkPolicyFile) {
- return Promise.reject('Check of the policy file is not allowed.');
- }
-
- // We can request crossdomain.xml.
- return fetchPolicyFile(parsedUrl.prePath + '/crossdomain.xml', cache).
- then(function (policy) {
-
- if (policy.siteControl === 'none') {
- throw 'Site control is set to \"none\"';
- }
- // TODO assuming master-only, there are also 'by-content-type', 'all', etc.
-
- var allowed = policy.allowAccessFrom.some(function (i) {
- return domainMatches(parsedBaseUrl.host, i.domain) &&
- (!i.secure || parsedBaseUrl.scheme.toLowerCase() === 'https');
- });
- if (!allowed) {
- throw 'crossdomain.xml does not contain source URL.';
- }
- return undefined;
- });
-}
-
-function domainMatches(host, pattern) {
- if (!pattern) return false;
- if (pattern === '*') return true;
- host = host.toLowerCase();
- var parts = pattern.toLowerCase().split('*');
- if (host.indexOf(parts[0]) !== 0) return false;
- var p = parts[0].length;
- for (var i = 1; i < parts.length; i++) {
- var j = host.indexOf(parts[i], p);
- if (j === -1) return false;
- p = j + parts[i].length;
- }
- return parts[parts.length - 1] === '' || p === host.length;
-}
-
-function fetchPolicyFile(url, cache) {
- if (url in cache) {
- return cache[url];
- }
-
- var deferred = Promise.defer();
-
- log('Fetching policy file at ' + url);
- var MAX_POLICY_SIZE = 8192;
- var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Components.interfaces.nsIXMLHttpRequest);
- xhr.open('GET', url, true);
- disableXHRRedirect(xhr);
- xhr.overrideMimeType('text/xml');
- xhr.onprogress = function (e) {
- if (e.loaded >= MAX_POLICY_SIZE) {
- xhr.abort();
- cache[url] = false;
- deferred.reject('Max policy size');
- }
- };
- xhr.onreadystatechange = function(event) {
- if (xhr.readyState === 4) {
- // TODO disable redirects
- var doc = xhr.responseXML;
- if (xhr.status !== 200 || !doc) {
- deferred.reject('Invalid HTTP status: ' + xhr.statusText);
- return;
- }
- // parsing params
- var params = doc.documentElement.childNodes;
- var policy = { siteControl: null, allowAccessFrom: []};
- for (var i = 0; i < params.length; i++) {
- switch (params[i].localName) {
- case 'site-control':
- policy.siteControl = params[i].getAttribute('permitted-cross-domain-policies');
- break;
- case 'allow-access-from':
- var access = {
- domain: params[i].getAttribute('domain'),
- security: params[i].getAttribute('security') === 'true'
- };
- policy.allowAccessFrom.push(access);
- break;
- default:
- // TODO allow-http-request-headers-from and other
- break;
- }
- }
- deferred.resolve(policy);
- }
- };
- xhr.send(null);
- return (cache[url] = deferred.promise);
-}
diff --git a/browser/extensions/shumway/chrome/LocalConnection.jsm b/browser/extensions/shumway/chrome/LocalConnection.jsm
deleted file mode 100644
index f2c1c9445d42..000000000000
--- a/browser/extensions/shumway/chrome/LocalConnection.jsm
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['LocalConnectionService'];
-
-Components.utils.import('resource://gre/modules/NetUtil.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-const localConnectionsRegistry = Object.create(null);
-
-function isConnectionNameValid(connectionName) {
- return typeof connectionName === 'string' &&
- (connectionName[0] === '_' || connectionName.split(':').length === 2);
-}
-
-/**
- * Creates a trusted qualified connection name from an already qualified name and a swfUrl.
- *
- * While connection names are already qualified at this point, the qualification happens in
- * untrusted code. To ensure that the name is correctly qualified, this function compares the
- * qualification domain with the current SWF's URL and substitutes that URL's domain if
- * required. A warning is logged in that case.
- */
-function _getQualifiedConnectionName(connectionName, swfUrl) {
- // Already syntactically invalid connection names mustn't get here.
- if (!isConnectionNameValid(connectionName)) {
- // TODO: add telemetry
- throw new Error('Syntactically invalid local-connection name encountered', connectionName,
- swfUrl);
- }
- var [domain, name] = connectionName.split(':');
- var parsedURL = NetUtil.newURI(swfUrl);
- if (domain !== parsedURL.host) {
- // TODO: add telemetry
- log('Warning: invalid local-connection name qualification found: ' + connectionName);
- return parsedURL.host + ':' + swfUrl;
- }
- return connectionName;
-}
-
-function _getLocalConnection(connectionName) {
- // Treat invalid connection names as non-existent. This can only happen if player code
- // misbehaves, though.
- if (!isConnectionNameValid(connectionName)) {
- // TODO: add telemetry
- return null;
- }
- var connection = localConnectionsRegistry[connectionName];
- if (connection && Components.utils.isDeadWrapper(connection.callback)) {
- delete localConnectionsRegistry[connectionName];
- return null;
- }
- return localConnectionsRegistry[connectionName];
-}
-
-function LocalConnectionService(content, environment) {
- var traceLocalConnection = getBoolPref('shumway.localConnection.trace', false);
- var api = {
- createLocalConnection: function (connectionName, callback) {
- connectionName = connectionName + '';
- traceLocalConnection && content.console.log(`Creating local connection "${connectionName}" ` +
- `for SWF with URL ${environment.swfUrl}`);
-
- if (!isConnectionNameValid(connectionName)) {
- // TODO: add telemetry
- traceLocalConnection && content.console.warn(`Invalid localConnection name `);
- return -1; // LocalConnectionConnectResult.InvalidName
- }
- if (typeof callback !== 'function') {
- // TODO: add telemetry
- traceLocalConnection && content.console.warn(`Invalid callback for localConnection`);
- return -3; // LocalConnectionConnectResult.InvalidCallback
- }
- connectionName = _getQualifiedConnectionName(connectionName, environment.swfUrl);
- if (_getLocalConnection(connectionName)) {
- traceLocalConnection && content.console.log(`localConnection ` +
- `name "${connectionName}" already taken`);
- return -2; // LocalConnectionConnectResult.AlreadyTaken
- }
-
- var parsedURL = NetUtil.newURI(environment.swfUrl);
-
- var connection = {
- callback,
- domain: parsedURL.host,
- environment: environment,
- secure: parsedURL.protocol === 'https:',
- allowedSecureDomains: Object.create(null),
- allowedInsecureDomains: Object.create(null)
- };
- localConnectionsRegistry[connectionName] = connection;
- return 0; // LocalConnectionConnectResult.Success
- },
- hasLocalConnection: function (connectionName) {
- connectionName = _getQualifiedConnectionName(connectionName + '', environment.swfUrl);
-
- var result = !!_getLocalConnection(connectionName);
- traceLocalConnection && content.console.log(`hasLocalConnection "${connectionName}"? ` +
- result);
- return result;
- },
- closeLocalConnection: function (connectionName) {
- connectionName = _getQualifiedConnectionName(connectionName + '', environment.swfUrl);
- traceLocalConnection && content.console.log(`Closing local connection "${connectionName}" ` +
- `for SWF with URL ${environment.swfUrl}`);
-
- var connection = _getLocalConnection(connectionName);
- if (!connection) {
- traceLocalConnection && content.console.log(`localConnection "${connectionName}" not ` +
- `connected`);
- return -1; // LocalConnectionCloseResult.NotConnected
- } else if (connection.environment !== environment) {
- // Attempts to close connections from a SWF instance that didn't create them shouldn't
- // happen. If they do, we treat them as if the connection didn't exist.
- traceLocalConnection && content.console.warn(`Ignored attempt to close localConnection ` +
- `"${connectionName}" from SWF instance that ` +
- `didn't create it`);
- return -1; // LocalConnectionCloseResult.NotConnected
- }
- delete localConnectionsRegistry[connectionName];
- return 0; // LocalConnectionCloseResult.Success
- },
- sendLocalConnectionMessage: function (connectionName, methodName, argsBuffer, sender,
- senderDomain, senderIsSecure) {
- connectionName = connectionName + '';
- methodName = methodName + '';
- senderDomain = senderDomain + '';
- senderIsSecure = !!senderIsSecure;
- // TODO: sanitize argsBuffer argument. Ask bholley how to do so.
- traceLocalConnection && content.console.log(`sending localConnection message ` +
- `"${methodName}" to "${connectionName}"`);
-
- // Since we don't currently trust the sender information passed in here, we use the
- // currently running SWF's URL instead.
- var parsedURL = NetUtil.newURI(environment.swfUrl);
- var parsedURLIsSecure = parsedURL.protocol === 'https:';
- if (parsedURL.host !== senderDomain || parsedURLIsSecure !== senderIsSecure) {
- traceLocalConnection && content.console.warn(`sending localConnection message ` +
- `"${methodName}" to "${connectionName}"`);
- }
- senderDomain = parsedURL.host;
- senderIsSecure = parsedURLIsSecure;
-
- var connection = _getLocalConnection(connectionName);
- if (!connection) {
- traceLocalConnection && content.console.log(`localConnection "${connectionName}" not ` +
- `connected`);
- return;
- }
- try {
- var allowed = false;
- if (connection.secure) {
- // If the receiver is secure, the sender has to be, too, or it has to be whitelisted
- // with allowInsecureDomain.
- if (senderIsSecure) {
- if (senderDomain === connection.domain ||
- senderDomain in connection.allowedSecureDomains ||
- '*' in connection.allowedSecureDomains) {
- allowed = true;
- }
- } else {
- if (senderDomain in connection.allowedInsecureDomains ||
- '*' in connection.allowedInsecureDomains) {
- allowed = true;
- }
- }
- } else {
- // For non-secure connections, allowedSecureDomains is expected to contain all allowed
- // domains, secure on non-secure, so we don't have to check both.
- if (senderDomain === connection.domain ||
- senderDomain in connection.allowedSecureDomains ||
- '*' in connection.allowedSecureDomains) {
- allowed = true;
- }
- }
- if (!allowed) {
- traceLocalConnection && content.console.warn(`LocalConnection message rejected: domain ` +
- `${senderDomain} not allowed.`);
- return {
- name: 'SecurityError',
- $Bgmessage: "The current security context does not allow this operation.",
- _errorID: 3315
- };
- }
- var callback = connection.callback;
- var clonedArgs = Components.utils.cloneInto(argsBuffer, callback);
- callback(methodName, clonedArgs);
- } catch (e) {
- // TODO: add telemetry
- content.console.warn('Unexpected error encountered while sending LocalConnection message.');
- }
- },
- allowDomainsForLocalConnection: function (connectionName, domains, secure) {
- connectionName = _getQualifiedConnectionName(connectionName + '', environment.swfUrl);
- secure = !!secure;
- var connection = _getLocalConnection(connectionName);
- if (!connection) {
- return;
- }
- try {
- domains = Components.utils.cloneInto(domains, connection);
- } catch (e) {
- log('error in allowDomainsForLocalConnection: ' + e);
- return;
- }
- traceLocalConnection && content.console.log(`allowing ${secure ? '' : 'in'}secure domains ` +
- `[${domains}] for localConnection ` +
- `"${connectionName}"`);
- function validateDomain(domain) {
- if (typeof domain !== 'string') {
- return false;
- }
- if (domain === '*') {
- return true;
- }
- try {
- var uri = NetUtil.newURI('http://' + domain);
- return uri.host === domain;
- } catch (e) {
- return false;
- }
- }
- if (!Array.isArray(domains) || !domains.every(validateDomain)) {
- traceLocalConnection && content.console.warn(`Invalid domains rejected`);
- return;
- }
- var allowedDomains = secure ?
- connection.allowedSecureDomains :
- connection.allowedInsecureDomains;
- domains.forEach(domain => allowedDomains[domain] = true);
- }
- };
-
- // Don't return `this` even though this function is treated as a ctor. Makes cloning into the
- // content compartment an internal operation the client code doesn't have to worry about.
- return Components.utils.cloneInto(api, content, {cloneFunctions:true});
-}
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
diff --git a/browser/extensions/shumway/chrome/RtmpUtils.jsm b/browser/extensions/shumway/chrome/RtmpUtils.jsm
deleted file mode 100644
index 972a9a31b0ba..000000000000
--- a/browser/extensions/shumway/chrome/RtmpUtils.jsm
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2014 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['RtmpUtils'];
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-var RtmpUtils = {
- get isRtmpEnabled() {
- try {
- return Services.prefs.getBoolPref('shumway.rtmp.enabled');
- } catch (ex) {
- return false;
- }
- },
-
- createSocket: function (sandbox, params) {
- var host = params.host, port = params.port, ssl = params.ssl;
-
- var baseSocket = Cc["@mozilla.org/tcp-socket;1"].createInstance(Ci.nsIDOMTCPSocket);
- var socket = baseSocket.open(host, port, {useSecureTransport: ssl, binaryType: 'arraybuffer'});
- if (!socket) {
- return null;
- }
-
- socket.onopen = function () {
- if (wrapperOnOpen) {
- wrapperOnOpen(new sandbox.Object());
- }
- };
- socket.ondata = function (e) {
- if (wrapperOnData) {
- var wrappedE = new sandbox.Object();
- wrappedE.data = Components.utils.cloneInto(e.data, sandbox);
- wrapperOnData(wrappedE);
- }
- };
- socket.ondrain = function () {
- if (wrapperOnDrain) {
- wrapperOnDrain(new sandbox.Object());
- }
- };
- socket.onerror = function (e) {
- if (wrapperOnError) {
- var wrappedE = new sandbox.Object();
- wrappedE.data = Components.utils.cloneInto(e.data, sandbox);
- wrapperOnError(wrappedE);
- }
- };
- socket.onclose = function () {
- if (wrapperOnClose) {
- wrapperOnClose(new sandbox.Object());
- }
- };
-
- var wrapperOnOpen, wrapperOnData, wrapperOnDrain, wrapperOnError, wrapperOnClose;
- var wrapper = Components.utils.cloneInto({
- setOpenCallback: function (callback) {
- wrapperOnOpen = callback;
- },
- setDataCallback: function (callback) {
- wrapperOnData = callback;
- },
- setDrainCallback: function (callback) {
- wrapperOnDrain = callback;
- },
- setErrorCallback: function (callback) {
- wrapperOnError = callback;
- },
- setCloseCallback: function (callback) {
- wrapperOnClose = callback;
- },
-
- send: function (buffer, offset, count) {
- return socket.send(buffer, offset, count);
- },
-
- close: function () {
- socket.close();
- }
- }, sandbox, {cloneFunctions:true});
- return wrapper;
- },
-
- createXHR: function (sandbox) {
- var xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Ci.nsIXMLHttpRequest);
-
- xhr.onload = function () {
- wrapper.status = xhr.status;
- wrapper.response = Components.utils.cloneInto(xhr.response, sandbox);
- if (wrapperOnLoad) {
- wrapperOnLoad(new sandbox.Object());
- }
- };
- xhr.onerror = function () {
- wrapper.status = xhr.status;
- if (wrapperOnError) {
- wrapperOnError(new sandbox.Object());
- }
- };
-
- var wrapperOnLoad, wrapperOnError;
- var wrapper = Components.utils.cloneInto({
- status: 0,
- response: undefined,
- responseType: 'text',
-
- setLoadCallback: function (callback) {
- wrapperOnLoad = callback;
- },
- setErrorCallback: function (callback) {
- wrapperOnError = callback;
- },
-
- open: function (method, path, async) {
- if (method !== 'POST' || !path || (async !== undefined && !async)) {
- throw new Error('invalid open() arguments');
- }
- // TODO check path
- xhr.open('POST', path, true);
- xhr.responseType = 'arraybuffer';
- xhr.setRequestHeader('Content-Type', 'application/x-fcs');
- },
-
- setRequestHeader: function (header, value) {
- if (header !== 'Content-Type' || value !== 'application/x-fcs') {
- throw new Error('invalid setRequestHeader() arguments');
- }
- },
-
- send: function (data) {
- if (wrapper.responseType !== 'arraybuffer') {
- throw new Error('Invalid responseType.');
- }
- xhr.send(data);
- }
- }, sandbox, {cloneFunctions:true});
- return wrapper;
- }
-};
diff --git a/browser/extensions/shumway/chrome/ShumwayCom.jsm b/browser/extensions/shumway/chrome/ShumwayCom.jsm
deleted file mode 100644
index c08ef8fb5106..000000000000
--- a/browser/extensions/shumway/chrome/ShumwayCom.jsm
+++ /dev/null
@@ -1,777 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['ShumwayCom'];
-
-Components.utils.import('resource://gre/modules/NetUtil.jsm');
-Components.utils.import('resource://gre/modules/Promise.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-
-Components.utils.import('chrome://shumway/content/SpecialInflate.jsm');
-Components.utils.import('chrome://shumway/content/SpecialStorage.jsm');
-Components.utils.import('chrome://shumway/content/RtmpUtils.jsm');
-Components.utils.import('chrome://shumway/content/ExternalInterface.jsm');
-Components.utils.import('chrome://shumway/content/FileLoader.jsm');
-Components.utils.import('chrome://shumway/content/LocalConnection.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, 'ShumwayTelemetry',
- 'resource://shumway/ShumwayTelemetry.jsm');
-
-const MAX_USER_INPUT_TIMEOUT = 250; // ms
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function getCharPref(pref, def) {
- try {
- return Services.prefs.getCharPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function log(aMsg) {
- let msg = 'ShumwayCom.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
- Services.console.logStringMessage(msg);
- dump(msg + '\n');
-}
-
-function sanitizeTelemetryArgs(args) {
- var request = {
- topic: String(args.topic)
- };
- switch (request.topic) {
- case 'firstFrame':
- break;
- case 'parseInfo':
- request.info = {
- parseTime: +args.parseTime,
- size: +args.bytesTotal,
- swfVersion: args.swfVersion | 0,
- frameRate: +args.frameRate,
- width: args.width | 0,
- height: args.height | 0,
- bannerType: args.bannerType | 0,
- isAvm2: !!args.isAvm2
- };
- break;
- case 'feature':
- request.featureType = args.feature | 0;
- break;
- case 'loadResource':
- request.resultType = args.resultType | 0;
- break;
- case 'error':
- request.errorType = args.error | 0;
- break;
- }
- return request;
-}
-
-function sanitizeLoadFileArgs(args) {
- return {
- url: String(args.url || ''),
- checkPolicyFile: !!args.checkPolicyFile,
- sessionId: +args.sessionId,
- limit: +args.limit || 0,
- mimeType: String(args.mimeType || ''),
- method: (args.method + '') || 'GET',
- postData: args.postData || null
- };
-}
-
-function sanitizeExternalComArgs(args) {
- var request = {
- action: String(args.action)
- };
- switch (request.action) {
- case 'eval':
- request.expression = String(args.expression);
- break;
- case 'call':
- request.expression = String(args.request);
- break;
- case 'register':
- case 'unregister':
- request.functionName = String(args.functionName);
- break;
- }
- return request;
-}
-
-var cloneIntoFromContent = (function () {
- // waiveXrays are used due to bug 1150771, checking if we are affected
- // TODO remove workaround after Firefox 40 is released (2015-08-11)
- let sandbox1 = new Components.utils.Sandbox(null);
- let sandbox2 = new Components.utils.Sandbox(null);
- let arg = Components.utils.evalInSandbox('({buf: new ArrayBuffer(2)})', sandbox1);
- let clonedArg = Components.utils.cloneInto(arg, sandbox2);
- if (!Components.utils.waiveXrays(clonedArg).buf) {
- return function (obj, contentSandbox) {
- return Components.utils.cloneInto(
- Components.utils.waiveXrays(obj), contentSandbox);
- };
- }
-
- return function (obj, contentSandbox) {
- return Components.utils.cloneInto(obj, contentSandbox);
- };
-})();
-
-var ShumwayEnvironment = {
- DEBUG: 'debug',
- DEVELOPMENT: 'dev',
- RELEASE: 'release',
- TEST: 'test'
-};
-
-var ShumwayCom = {
- environment: getCharPref('shumway.environment', 'dev'),
-
- createAdapter: function (content, callbacks, hooks) {
- // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
- // up Xray wrappers.
- var wrapped = {
- environment: ShumwayCom.environment,
-
- enableDebug: function () {
- callbacks.enableDebug()
- },
-
- fallback: function () {
- callbacks.sendMessage('fallback', null, false);
- },
-
- getSettings: function () {
- return Components.utils.cloneInto(
- callbacks.sendMessage('getSettings', null, true), content);
- },
-
- getPluginParams: function () {
- return Components.utils.cloneInto(
- callbacks.sendMessage('getPluginParams', null, true), content);
- },
-
- reportIssue: function () {
- callbacks.sendMessage('reportIssue', null, false);
- },
-
- reportTelemetry: function (args) {
- var request = sanitizeTelemetryArgs(args);
- callbacks.sendMessage('reportTelemetry', request, false);
- },
-
- setupGfxComBridge: function (gfxWindow) {
- // Creates ShumwayCom adapter for the gfx iframe exposing only subset
- // of the privileged function. Removing Xrays to setup the ShumwayCom
- // property and for usage as a sandbox for cloneInto operations.
- var gfxContent = gfxWindow.contentWindow.wrappedJSObject;
- ShumwayCom.createGfxAdapter(gfxContent, callbacks, hooks);
-
- setupUserInput(gfxWindow.contentWindow, callbacks);
- },
-
- setupPlayerComBridge: function (playerWindow) {
- // Creates ShumwayCom adapter for the player iframe exposing only subset
- // of the privileged function. Removing Xrays to setup the ShumwayCom
- // property and for usage as a sandbox for cloneInto operations.
- var playerContent = playerWindow.contentWindow.wrappedJSObject;
- ShumwayCom.createPlayerAdapter(playerContent, callbacks, hooks);
- }
- };
-
- var shumwayComAdapter = Components.utils.cloneInto(wrapped, content, {cloneFunctions:true});
- content.ShumwayCom = shumwayComAdapter;
- },
-
- createGfxAdapter: function (content, callbacks, hooks) {
- // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
- // up Xray wrappers.
- var wrapped = {
- environment: ShumwayCom.environment,
-
- setFullscreen: function (value) {
- value = !!value;
- callbacks.sendMessage('setFullscreen', value, false);
- },
-
- reportTelemetry: function (args) {
- var request = sanitizeTelemetryArgs(args);
- callbacks.sendMessage('reportTelemetry', request, false);
- },
-
- postAsyncMessage: function (msg) {
- if (hooks.onPlayerAsyncMessageCallback) {
- hooks.onPlayerAsyncMessageCallback(msg);
- }
- },
-
- setSyncMessageCallback: function (callback) {
- if (typeof callback !== 'function') {
- log('error: attempt to set non-callable as callback in setSyncMessageCallback');
- return;
- }
- hooks.onGfxSyncMessageCallback = function (msg, sandbox) {
- var reclonedMsg = cloneIntoFromContent(msg, content);
- var result = callback(reclonedMsg);
- return cloneIntoFromContent(result, sandbox);
- };
- },
-
- setAsyncMessageCallback: function (callback) {
- if (typeof callback !== 'function') {
- log('error: attempt to set non-callable as callback in setAsyncMessageCallback');
- return;
- }
- hooks.onGfxAsyncMessageCallback = function (msg) {
- var reclonedMsg = cloneIntoFromContent(msg, content);
- callback(reclonedMsg);
- };
- }
- };
-
- if (ShumwayCom.environment === ShumwayEnvironment.TEST) {
- wrapped.processFrame = function () {
- callbacks.sendMessage('processFrame');
- };
-
- wrapped.processFSCommand = function (command, args) {
- callbacks.sendMessage('processFSCommand', command, args);
- };
-
- wrapped.setScreenShotCallback = function (callback) {
- callbacks.sendMessage('setScreenShotCallback', callback);
- };
- }
-
- var shumwayComAdapter = Components.utils.cloneInto(wrapped, content, {cloneFunctions:true});
- content.ShumwayCom = shumwayComAdapter;
- },
-
- createPlayerAdapter: function (content, callbacks, hooks) {
- // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
- // up Xray wrappers.
- var wrapped = {
- environment: ShumwayCom.environment,
-
- externalCom: function (args) {
- var request = sanitizeExternalComArgs(args);
- var result = String(callbacks.sendMessage('externalCom', request, true));
- return result;
- },
-
- loadFile: function (args) {
- var request = sanitizeLoadFileArgs(args);
- callbacks.sendMessage('loadFile', request, false);
- },
-
- abortLoad: function (sessionId) {
- sessionId = sessionId|0;
- callbacks.sendMessage('abortLoad', sessionId, false);
- },
-
- reportTelemetry: function (args) {
- var request = sanitizeTelemetryArgs(args);
- callbacks.sendMessage('reportTelemetry', request, false);
- },
-
- setClipboard: function (args) {
- if (typeof args !== 'string') {
- return; // ignore non-string argument
- }
- callbacks.sendMessage('setClipboard', args, false);
- },
-
- navigateTo: function (args) {
- var request = {
- url: String(args.url || ''),
- target: String(args.target || '')
- };
- callbacks.sendMessage('navigateTo', request, false);
- },
-
- loadSystemResource: function (id) {
- loadShumwaySystemResource(id).then(function (data) {
- if (onSystemResourceCallback) {
- onSystemResourceCallback(id, Components.utils.cloneInto(data, content));
- }
- });
- },
-
- sendSyncMessage: function (msg) {
- var result;
- if (hooks.onGfxSyncMessageCallback) {
- result = hooks.onGfxSyncMessageCallback(msg, content);
- }
- return result;
- },
-
- postAsyncMessage: function (msg) {
- if (hooks.onGfxAsyncMessageCallback) {
- hooks.onGfxAsyncMessageCallback(msg);
- }
- },
-
- setAsyncMessageCallback: function (callback) {
- if (typeof callback !== 'function') {
- log('error: attempt to set non-callable as callback in setAsyncMessageCallback');
- return;
- }
- hooks.onPlayerAsyncMessageCallback = function (msg) {
- var reclonedMsg = cloneIntoFromContent(msg, content);
- callback(reclonedMsg);
- };
- },
-
- createSpecialStorage: function () {
- var environment = callbacks.getEnvironment();
- return SpecialStorageUtils.createWrappedSpecialStorage(content,
- environment.swfUrl, environment.privateBrowsing);
- },
-
- getWeakMapKeys: function (weakMap) {
- var keys = ThreadSafeChromeUtils.nondeterministicGetWeakMapKeys(weakMap);
- var result = new content.Array();
- keys.forEach(function (key) {
- result.push(key);
- });
- return result;
- },
-
- setLoadFileCallback: function (callback) {
- if (callback !== null && typeof callback !== 'function') {
- return;
- }
- onLoadFileCallback = callback;
- },
- setExternalCallback: function (callback) {
- if (callback !== null && typeof callback !== 'function') {
- return;
- }
- onExternalCallback = callback;
- },
- setSystemResourceCallback: function (callback) {
- if (callback !== null && typeof callback !== 'function') {
- return;
- }
- onSystemResourceCallback = callback;
- },
-
- getLocalConnectionService: function() {
- if (!wrappedLocalConnectionService) {
- wrappedLocalConnectionService = new LocalConnectionService(content,
- callbacks.getEnvironment());
- }
- return wrappedLocalConnectionService;
- }
- };
-
- // Exposing createSpecialInflate function for DEFLATE stream decoding using
- // Gecko API.
- if (SpecialInflateUtils.isSpecialInflateEnabled) {
- wrapped.createSpecialInflate = function () {
- return SpecialInflateUtils.createWrappedSpecialInflate(content);
- };
- }
-
- // Exposing createRtmpSocket/createRtmpXHR functions to support RTMP stream
- // functionality.
- if (RtmpUtils.isRtmpEnabled) {
- wrapped.createRtmpSocket = function (params) {
- return RtmpUtils.createSocket(content, params);
- };
- wrapped.createRtmpXHR = function () {
- return RtmpUtils.createXHR(content);
- };
- }
-
- if (ShumwayCom.environment === ShumwayEnvironment.TEST) {
- wrapped.print = function(msg) {
- callbacks.sendMessage('print', msg);
- }
- }
-
- var onSystemResourceCallback = null;
- var onExternalCallback = null;
- var onLoadFileCallback = null;
-
- var wrappedLocalConnectionService = null;
-
- hooks.onLoadFileCallback = function (arg) {
- if (onLoadFileCallback) {
- onLoadFileCallback(Components.utils.cloneInto(arg, content));
- }
- };
- hooks.onExternalCallback = function (call) {
- if (onExternalCallback) {
- return onExternalCallback(Components.utils.cloneInto(call, content));
- }
- };
-
- var shumwayComAdapter = Components.utils.cloneInto(wrapped, content, {cloneFunctions:true});
- content.ShumwayCom = shumwayComAdapter;
- },
-
- createActions: function (startupInfo, window, document) {
- return new ShumwayChromeActions(startupInfo, window, document);
- }
-};
-
-function loadShumwaySystemResource(id) {
- var url, type;
- switch (id) {
- case 0: // BuiltinAbc
- url = 'resource://shumway/libs/builtin.abc';
- type = 'arraybuffer';
- break;
- case 1: // PlayerglobalAbcs
- url = 'resource://shumway/playerglobal/playerglobal.abcs';
- type = 'arraybuffer';
- break;
- case 2: // PlayerglobalManifest
- url = 'resource://shumway/playerglobal/playerglobal.json';
- type = 'json';
- break;
- default:
- return Promise.reject('Unsupported system resource id');
- }
-
- var deferred = Promise.defer();
-
- var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Components.interfaces.nsIXMLHttpRequest);
- xhr.open('GET', url, true);
- xhr.responseType = type;
- xhr.onload = function () {
- deferred.resolve(xhr.response);
- };
- xhr.send(null);
-
- return deferred.promise;
-}
-
-function setupUserInput(contentWindow, callbacks) {
- function notifyUserInput() {
- callbacks.sendMessage('userInput', null, true);
- }
-
- // Ignoring the untrusted events by providing the 4th argument for addEventListener.
- contentWindow.document.addEventListener('mousedown', notifyUserInput, true, false);
- contentWindow.document.addEventListener('mouseup', notifyUserInput, true, false);
- contentWindow.document.addEventListener('keydown', notifyUserInput, true, false);
- contentWindow.document.addEventListener('keyup', notifyUserInput, true, false);
-}
-
-// All the privileged actions.
-function ShumwayChromeActions(startupInfo, window, document) {
- this.url = startupInfo.url;
- this.objectParams = startupInfo.objectParams;
- this.movieParams = startupInfo.movieParams;
- this.baseUrl = startupInfo.baseUrl;
- this.isOverlay = startupInfo.isOverlay;
- this.embedTag = startupInfo.embedTag;
- this.isPausedAtStart = startupInfo.isPausedAtStart;
- this.initStartTime = startupInfo.initStartTime;
- this.window = window;
- this.document = document;
- this.allowScriptAccess = startupInfo.allowScriptAccess;
- this.lastUserInput = 0;
- this.telemetry = {
- startTime: Date.now(),
- features: [],
- errors: []
- };
-
- this.fileLoader = new FileLoader(startupInfo.url, startupInfo.baseUrl, startupInfo.refererUrl,
- function (args) { this.onLoadFileCallback(args); }.bind(this));
- this.onLoadFileCallback = null;
-
- this.externalInterface = null;
- this.onExternalCallback = null;
-}
-
-ShumwayChromeActions.prototype = {
- // The method is created for convenience of routing messages from the OOP
- // handler or remote debugger adapter. All method calls are originated from
- // the ShumwayCom adapter (see above), or from the debugger adapter.
- // See viewerWrapper.js for these usages near sendMessage calls.
- invoke: function (name, args) {
- return this[name].call(this, args);
- },
-
- getBoolPref: function (data) {
- if (!/^shumway\./.test(data.pref)) {
- return null;
- }
- return getBoolPref(data.pref, data.def);
- },
-
- getSettings: function getSettings() {
- return {
- compilerSettings: {
- appCompiler: getBoolPref('shumway.appCompiler', true),
- sysCompiler: getBoolPref('shumway.sysCompiler', false),
- verifier: getBoolPref('shumway.verifier', true)
- },
- playerSettings: {
- turboMode: getBoolPref('shumway.turboMode', false),
- hud: getBoolPref('shumway.hud', false),
- forceHidpi: getBoolPref('shumway.force_hidpi', false)
- }
- }
- },
-
- getPluginParams: function getPluginParams() {
- return {
- url: this.url,
- baseUrl : this.baseUrl,
- movieParams: this.movieParams,
- objectParams: this.objectParams,
- isOverlay: this.isOverlay,
- isPausedAtStart: this.isPausedAtStart,
- initStartTime: this.initStartTime,
- isDebuggerEnabled: getBoolPref('shumway.debug.enabled', false)
- };
- },
-
- loadFile: function loadFile(data) {
- this.fileLoader.load(data);
- },
-
- abortLoad: function abortLoad(sessionId) {
- this.fileLoader.abort(sessionId);
- },
-
- navigateTo: function (data) {
- // Our restrictions are a little bit different from Flash's: let's enable
- // only http(s) and only when script execution is allowed.
- // See https://helpx.adobe.com/flash/kb/control-access-scripts-host-web.html
- var url = data.url || 'about:blank';
- var target = data.target || '_self';
- var isWhitelistedProtocol = /^(http|https):\/\//i.test(url);
- if (!isWhitelistedProtocol || !this.allowScriptAccess) {
- return;
- }
- // ...and only when user input is in-progress.
- if (!this.isUserInputInProgress()) {
- return;
- }
- var embedTag = this.embedTag;
- var window = embedTag ? embedTag.ownerDocument.defaultView : this.window;
- window.open(url, target);
- },
-
- fallback: function(automatic) {
- automatic = !!automatic;
- var event = this.document.createEvent('CustomEvent');
- event.initCustomEvent('shumwayFallback', true, true, {
- automatic: automatic
- });
- this.window.dispatchEvent(event);
- },
-
- userInput: function() {
- // Recording time of last user input for isUserInputInProgress below.
- this.lastUserInput = Date.now();
- },
-
- isUserInputInProgress: function () {
- // We don't trust our Shumway non-privileged code just yet to verify the
- // user input -- using userInput function above to track that.
- if ((Date.now() - this.lastUserInput) > MAX_USER_INPUT_TIMEOUT) {
- return false;
- }
- // TODO other security checks?
- return true;
- },
-
- setClipboard: function (data) {
- if (!this.isUserInputInProgress()) {
- return;
- }
-
- let clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
- .getService(Components.interfaces.nsIClipboardHelper);
- clipboard.copyString(data);
- },
-
- setFullscreen: function (enabled) {
- if (!this.isUserInputInProgress()) {
- return;
- }
-
- var target = this.embedTag || this.document.body;
- if (enabled) {
- target.mozRequestFullScreen();
- } else {
- target.ownerDocument.mozCancelFullScreen();
- }
- },
-
- reportTelemetry: function (request) {
- switch (request.topic) {
- case 'firstFrame':
- var time = Date.now() - this.telemetry.startTime;
- ShumwayTelemetry.onFirstFrame(time);
- break;
- case 'parseInfo':
- ShumwayTelemetry.onParseInfo(request.info);
- break;
- case 'feature':
- var featureType = request.featureType;
- var MIN_FEATURE_TYPE = 0, MAX_FEATURE_TYPE = 999;
- if (featureType >= MIN_FEATURE_TYPE && featureType <= MAX_FEATURE_TYPE &&
- !this.telemetry.features[featureType]) {
- this.telemetry.features[featureType] = true; // record only one feature per SWF
- ShumwayTelemetry.onFeature(featureType);
- }
- break;
- case 'loadResource':
- var resultType = request.resultType;
- var MIN_RESULT_TYPE = 0, MAX_RESULT_TYPE = 10;
- if (resultType >= MIN_RESULT_TYPE && resultType <= MAX_RESULT_TYPE) {
- ShumwayTelemetry.onLoadResource(resultType);
- }
- break;
- case 'error':
- var errorType = request.errorType;
- var MIN_ERROR_TYPE = 0, MAX_ERROR_TYPE = 2;
- if (errorType >= MIN_ERROR_TYPE && errorType <= MAX_ERROR_TYPE &&
- !this.telemetry.errors[errorType]) {
- this.telemetry.errors[errorType] = true; // record only one report per SWF
- ShumwayTelemetry.onError(errorType);
- }
- break;
- }
- },
-
- reportIssue: function (exceptions) {
- var urlTemplate = "https://bugzilla.mozilla.org/enter_bug.cgi?op_sys=All&priority=--" +
- "&rep_platform=All&target_milestone=---&version=Trunk&product=Firefox" +
- "&component=Shumway&short_desc=&comment={comment}" +
- "&bug_file_loc={url}";
- var windowUrl = this.window.parent.location.href + '';
- var url = urlTemplate.split('{url}').join(encodeURIComponent(windowUrl));
- var params = {
- swf: encodeURIComponent(this.url)
- };
- getVersionInfo().then(function (versions) {
- params.versions = versions;
- }).then(function () {
- var ffbuild = params.versions.geckoVersion + ' (' + params.versions.geckoBuildID + ')';
- //params.exceptions = encodeURIComponent(exceptions);
- var comment = '+++ Initially filed via the problem reporting functionality in Shumway +++\n' +
- 'Please add any further information that you deem helpful here:\n\n\n\n' +
- '----------------------\n\n' +
- 'Technical Information:\n' +
- 'Firefox version: ' + ffbuild + '\n' +
- 'Shumway version: ' + params.versions.shumwayVersion;
- url = url.split('{comment}').join(encodeURIComponent(comment));
- this.window.open(url);
- }.bind(this));
- },
-
- externalCom: function (data) {
- if (!this.allowScriptAccess)
- return;
-
- // TODO check more security stuff ?
- if (!this.externalInterface) {
- var parentWindow = this.window.parent; // host page -- parent of PlayPreview frame
- var embedTag = this.embedTag;
- this.externalInterface = new ExternalInterface(parentWindow, embedTag, function (call) {
- return this.onExternalCallback(call);
- }.bind(this));
- }
-
- return this.externalInterface.processAction(data);
- },
-
- postMessage: function (type, data) {
- var embedTag = this.embedTag;
- var event = embedTag.ownerDocument.createEvent('CustomEvent');
- var detail = Components.utils.cloneInto({ type: type, data: data }, embedTag.ownerDocument.wrappedJSObject);
- event.initCustomEvent('message', false, false, detail);
- embedTag.dispatchEvent(event);
- },
-
- processFrame: function () {
- this.postMessage('processFrame');
- },
-
- processFSCommand: function (command, data) {
- this.postMessage('processFSCommand', { command: command, data: data });
- },
-
- print: function (msg) {
- this.postMessage('print', msg);
- },
-
- setScreenShotCallback: function (callback) {
- var embedTag = this.embedTag;
- Components.utils.exportFunction(function () {
- // `callback` can be wrapped in a CPOW and thus cause a slow synchronous cross-process operation.
- var result = callback();
- return Components.utils.cloneInto(result, embedTag.ownerDocument);
- }, embedTag.wrappedJSObject, {defineAs: 'getCanvasData'});
- }
-};
-
-function getVersionInfo() {
- var deferred = Promise.defer();
- var versionInfo = {
- geckoVersion: 'unknown',
- geckoBuildID: 'unknown',
- shumwayVersion: 'unknown'
- };
- try {
- var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
- .getService(Components.interfaces.nsIXULAppInfo);
- versionInfo.geckoVersion = appInfo.version;
- versionInfo.geckoBuildID = appInfo.appBuildID;
- } catch (e) {
- log('Error encountered while getting platform version info: ' + e);
- }
- var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Components.interfaces.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;
-}
diff --git a/browser/extensions/shumway/chrome/SpecialInflate.jsm b/browser/extensions/shumway/chrome/SpecialInflate.jsm
deleted file mode 100644
index b4f3402eea75..000000000000
--- a/browser/extensions/shumway/chrome/SpecialInflate.jsm
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2014 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['SpecialInflate', 'SpecialInflateUtils'];
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-function SimpleStreamListener() {
- this.binaryStream = Cc['@mozilla.org/binaryinputstream;1']
- .createInstance(Ci.nsIBinaryInputStream);
- this.onData = null;
- this.buffer = null;
-}
-SimpleStreamListener.prototype = {
- QueryInterface: function (iid) {
- if (iid.equals(Ci.nsIStreamListener) ||
- iid.equals(Ci.nsIRequestObserver) ||
- iid.equals(Ci.nsISupports))
- return this;
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
- onStartRequest: function (aRequest, aContext) {
- return Cr.NS_OK;
- },
- onStopRequest: function (aRequest, aContext, sStatusCode) {
- return Cr.NS_OK;
- },
- onDataAvailable: function (aRequest, aContext, aInputStream, aOffset, aCount) {
- this.binaryStream.setInputStream(aInputStream);
- if (!this.buffer || aCount > this.buffer.byteLength) {
- this.buffer = new ArrayBuffer(aCount);
- }
- this.binaryStream.readArrayBuffer(aCount, this.buffer);
- this.onData(new Uint8Array(this.buffer, 0, aCount));
- return Cr.NS_OK;
- }
-};
-
-function SpecialInflate() {
- var listener = new SimpleStreamListener();
- listener.onData = function (data) {
- this.onData(data);
- }.bind(this);
-
- var converterService = Cc["@mozilla.org/streamConverters;1"].getService(Ci.nsIStreamConverterService);
- var converter = converterService.asyncConvertData("deflate", "uncompressed", listener, null);
- converter.onStartRequest(null, null);
- this.converter = converter;
-
- var binaryStream = Cc["@mozilla.org/binaryoutputstream;1"].createInstance(Ci.nsIBinaryOutputStream);
- var pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
- pipe.init(true, true, 0, 0xFFFFFFFF, null);
- binaryStream.setOutputStream(pipe.outputStream);
- this.binaryStream = binaryStream;
-
- this.pipeInputStream = pipe.inputStream;
-
- this.onData = null;
-}
-SpecialInflate.prototype = {
- push: function (data) {
- this.binaryStream.writeByteArray(data, data.length);
- this.converter.onDataAvailable(null, null, this.pipeInputStream, 0, data.length);
- },
- close: function () {
- this.binaryStream.close();
- this.converter.onStopRequest(null, null, Cr.NS_OK);
- }
-};
-
-var SpecialInflateUtils = {
- get isSpecialInflateEnabled() {
- try {
- return Services.prefs.getBoolPref('shumway.specialInflate');
- } catch (ex) {
- return false; // TODO true;
- }
- },
-
- createWrappedSpecialInflate: function (sandbox) {
- var wrapped = new SpecialInflate();
- var wrapperOnData;
- wrapped.onData = function(data) {
- if (wrapperOnData) {
- wrapperOnData(Components.utils.cloneInto(data, sandbox));
- }
- };
-
-
- // We will return object created in the sandbox/content, with some exposed
- // properties/methods, so we can send data between wrapped object and
- // and sandbox/content.
- var wrapper = Components.utils.cloneInto({
- setDataCallback: function (callback) {
- wrapperOnData = callback;
- },
-
- push: function (data) {
- // Uint8Array is expected in the data parameter.
- // SpecialInflate.push() fails with other argument types.
- return wrapped.push(data);
- },
- close: function () {
- return wrapped.close();
- }
- }, sandbox, {cloneFunctions:true});
- return wrapper;
- }
-};
diff --git a/browser/extensions/shumway/chrome/SpecialStorage.jsm b/browser/extensions/shumway/chrome/SpecialStorage.jsm
deleted file mode 100644
index 636d263eebe7..000000000000
--- a/browser/extensions/shumway/chrome/SpecialStorage.jsm
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['SpecialStorageUtils'];
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-var SpecialStorageUtils = {
- createWrappedSpecialStorage: function (sandbox, swfUrl, privateBrowsing) {
- // Creating internal localStorage object based on url and privateBrowsing setting.
- var uri = Services.io.newURI(swfUrl, null, null);
- var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Components.interfaces.nsIScriptSecurityManager);
- var principal = ssm.createCodebasePrincipal(uri, {});
- var dsm = Components.classes["@mozilla.org/dom/localStorage-manager;1"]
- .getService(Components.interfaces.nsIDOMStorageManager);
- var storage = dsm.createStorage(null, principal, privateBrowsing);
-
- // We will return object created in the sandbox/content, with some exposed
- // properties/methods, so we can send data between wrapped object and
- // and sandbox/content.
- var wrapper = Components.utils.cloneInto({
- getItem: function (key) {
- return storage.getItem(key);
- },
- setItem: function (key, value) {
- storage.setItem(key, value);
- },
- removeItem: function (key) {
- storage.removeItem(key);
- }
- }, sandbox, {cloneFunctions:true});
- return wrapper;
- }
-};
diff --git a/browser/extensions/shumway/chrome/StartupInfo.jsm b/browser/extensions/shumway/chrome/StartupInfo.jsm
deleted file mode 100644
index 5d0dacae9ef4..000000000000
--- a/browser/extensions/shumway/chrome/StartupInfo.jsm
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ['getStartupInfo', 'parseQueryString', 'isContentWindowPrivate'];
-
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, 'PrivateBrowsingUtils',
- 'resource://gre/modules/PrivateBrowsingUtils.jsm');
-
-function flashUnescape(s) {
- return decodeURIComponent(s.split('+').join(' '));
-}
-
-function parseQueryString(qs) {
- if (!qs)
- return {};
-
- if (qs.charAt(0) == '?')
- qs = qs.slice(1);
-
- var values = qs.split('&');
- var obj = {};
- for (var i = 0; i < values.length; i++) {
- var pair = values[i], j = pair.indexOf('=');
- if (j < 0) {
- continue; // skipping invalid values
- }
- var key = pair.substring(0, j), value = pair.substring(j + 1);
- obj[flashUnescape(key)] = flashUnescape(value);
- }
-
- return obj;
-}
-
-function isContentWindowPrivate(win) {
- if (!('isContentWindowPrivate' in PrivateBrowsingUtils)) {
- return PrivateBrowsingUtils.isWindowPrivate(win);
- }
- return PrivateBrowsingUtils.isContentWindowPrivate(win);
-}
-
-function isStandardEmbedWrapper(embedElement) {
- try {
- if (embedElement.tagName !== 'EMBED') {
- return false;
- }
- var swfUrl = embedElement.src;
- var document = embedElement.ownerDocument;
- var docUrl = document.location.href;
- if (swfUrl !== docUrl) {
- return false; // document URL shall match embed src
- }
- if (document.body.children.length !== 1 ||
- document.body.firstChild !== embedElement) {
- return false; // not the only child
- }
- if (document.defaultView.top !== document.defaultView) {
- return false; // not a top window
- }
- // Looks like a standard wrapper
- return true;
- } catch (e) {
- // Declare that is not a standard fullscreen plugin wrapper for any error
- return false;
- }
-}
-
-function isScriptAllowed(allowScriptAccessParameter, url, pageUrl) {
- if (!allowScriptAccessParameter) {
- allowScriptAccessParameter = 'sameDomain';
- }
- var allowScriptAccess = false;
- switch (allowScriptAccessParameter.toLowerCase()) { // ignoring case here
- case 'always':
- allowScriptAccess = true;
- break;
- case 'never':
- allowScriptAccess = false;
- break;
- default: // 'samedomain'
- if (!pageUrl)
- break;
- try {
- // checking if page is in same domain (? same protocol and port)
- allowScriptAccess =
- Services.io.newURI('/', null, Services.io.newURI(pageUrl, null, null)).spec ==
- Services.io.newURI('/', null, Services.io.newURI(url, null, null)).spec;
- } catch (ex) {}
- break;
- }
- return allowScriptAccess;
-}
-
-function getStartupInfo(element) {
- var initStartTime = Date.now();
- var baseUrl;
- var pageUrl;
- var isOverlay = false;
- var objectParams = {};
-
- // Getting absolute URL from the EMBED tag
- var url = element.srcURI && element.srcURI.spec;
-
- pageUrl = element.ownerDocument.location.href; // proper page url?
-
- var tagName = element.nodeName;
- if (tagName == 'EMBED') {
- for (var i = 0; i < element.attributes.length; ++i) {
- var paramName = element.attributes[i].localName.toLowerCase();
- objectParams[paramName] = element.attributes[i].value;
- }
- } else {
- for (var i = 0; i < element.childNodes.length; ++i) {
- var paramElement = element.childNodes[i];
- if (paramElement.nodeType != 1 ||
- paramElement.nodeName != 'PARAM') {
- continue;
- }
- var paramName = paramElement.getAttribute('name').toLowerCase();
- objectParams[paramName] = paramElement.getAttribute('value');
- }
- }
-
- baseUrl = pageUrl;
- if (objectParams.base) {
- try {
- // Verifying base URL, passed in object parameters. It shall be okay to
- // ignore bad/corrupted base.
- var parsedPageUrl = Services.io.newURI(pageUrl, null, null);
- baseUrl = Services.io.newURI(objectParams.base, null, parsedPageUrl).spec;
- } catch (e) { /* it's okay to ignore any exception */ }
- }
-
- var movieParams = {};
- if (objectParams.flashvars) {
- movieParams = parseQueryString(objectParams.flashvars);
- }
- var queryStringMatch = url && /\?([^#]+)/.exec(url);
- if (queryStringMatch) {
- var queryStringParams = parseQueryString(queryStringMatch[1]);
- for (var i in queryStringParams) {
- if (!(i in movieParams)) {
- movieParams[i] = queryStringParams[i];
- }
- }
- }
-
- var allowScriptAccess = !!url &&
- isScriptAllowed(objectParams.allowscriptaccess, url, pageUrl);
- var isFullscreenSwf = isStandardEmbedWrapper(element);
-
- var document = element.ownerDocument;
- var window = document.defaultView;
-
- var startupInfo = {};
- startupInfo.window = window;
- startupInfo.url = url;
- startupInfo.privateBrowsing = isContentWindowPrivate(window);
- startupInfo.objectParams = objectParams;
- startupInfo.movieParams = movieParams;
- startupInfo.baseUrl = baseUrl || url;
- startupInfo.isOverlay = isOverlay;
- startupInfo.refererUrl = !isFullscreenSwf ? baseUrl : null;
- startupInfo.embedTag = element;
- startupInfo.initStartTime = initStartTime;
- startupInfo.allowScriptAccess = allowScriptAccess;
- startupInfo.pageIndex = 0;
- return startupInfo;
-}
diff --git a/browser/extensions/shumway/chrome/bootstrap-content.js b/browser/extensions/shumway/chrome/bootstrap-content.js
deleted file mode 100644
index 6687c690d083..000000000000
--- a/browser/extensions/shumway/chrome/bootstrap-content.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2014 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-(function contentScriptClosure() {
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- const Cm = Components.manager;
- const Cu = Components.utils;
- const Cr = Components.results;
-
- // we need to use closure here -- we are running in the global context
- Cu.import('resource://gre/modules/Services.jsm');
-
- var isRemote = Services.appinfo.processType ===
- Services.appinfo.PROCESS_TYPE_CONTENT;
- var isStarted = false;
-
- function startup() {
- if (isStarted) {
- return;
- }
-
- isStarted = true;
- Cu.import('resource://shumway/ShumwayBootstrapUtils.jsm');
- ShumwayBootstrapUtils.register();
- }
-
- function shutdown() {
- if (!isStarted) {
- return;
- }
-
- isStarted = false;
- ShumwayBootstrapUtils.unregister();
- Cu.unload('resource://shumway/ShumwayBootstrapUtils.jsm');
- }
-
-
- function updateSettings() {
- let mm = Cc["@mozilla.org/childprocessmessagemanager;1"]
- .getService(Ci.nsISyncMessageSender);
- var results = mm.sendSyncMessage('Shumway:Chrome:isEnabled');
- var isEnabled = results.some(function (item) {
- return item;
- });
-
- if (isEnabled) {
- startup();
- } else {
- shutdown();
- }
- }
-
- if (isRemote && typeof ShumwayBootstrapUtils !== 'undefined') {
- // Treat content as non-remote when bootstrap.js or ShumwayUtils.jsm
- // already registered the Shumway components for current content scope.
- isRemote = false;
- }
-
- if (isRemote) {
- addMessageListener('Shumway:Child:refreshSettings', updateSettings);
- updateSettings();
-
- addMessageListener('Shumway:Child:shutdown', function shutdownListener(e) {
- removeMessageListener('Shumway:Child:refreshSettings', updateSettings);
- removeMessageListener('Shumway:Child:shutdown', shutdownListener);
-
- shutdown();
- });
- }
-})();
diff --git a/browser/extensions/shumway/chrome/content.html b/browser/extensions/shumway/chrome/content.html
deleted file mode 100644
index 0e5043918106..000000000000
--- a/browser/extensions/shumway/chrome/content.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/browser/extensions/shumway/chrome/content.js b/browser/extensions/shumway/chrome/content.js
deleted file mode 100644
index 315173bb6b94..000000000000
--- a/browser/extensions/shumway/chrome/content.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-Components.utils.import('resource://gre/modules/Promise.jsm');
-
-Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
-
-var messageManager, viewerReady;
-// Checking if we loading content.js in the OOP/mozbrowser or jsplugins.
-// TODO remove mozbrowser logic when we switch to jsplugins only support
-if (typeof document === 'undefined') { // mozbrowser OOP frame script
- messageManager = this;
- viewerReady = Promise.resolve(content);
- messageManager.sendAsyncMessage('Shumway:constructed', null);
-} else { // jsplugins instance
- messageManager = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIDocShell)
- .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIContentFrameMessageManager);
-
- var viewer = document.getElementById('viewer');
- viewerReady = new Promise(function (resolve) {
- viewer.addEventListener('load', function () {
- messageManager.sendAsyncMessage('Shumway:constructed', null);
- resolve(viewer.contentWindow);
- });
- });
-}
-
-
-var externalInterfaceWrapper = {
- callback: function (call) {
- if (!shumwayComAdapterHooks.onExternalCallback) {
- return undefined;
- }
- return shumwayComAdapterHooks.onExternalCallback(
- Components.utils.cloneInto(JSON.parse(call), content));
- }
-};
-
-var shumwayComAdapterHooks = {};
-
-function sendMessage(action, data, sync) {
- var detail = {action: action, data: data, sync: sync};
- if (!sync) {
- messageManager.sendAsyncMessage('Shumway:message', detail);
- return;
- }
- var result = String(messageManager.sendSyncMessage('Shumway:message', detail));
- result = result == 'undefined' ? undefined : JSON.parse(result);
- return Components.utils.cloneInto(result, content);
-}
-
-function enableDebug() {
- messageManager.sendAsyncMessage('Shumway:enableDebug', null);
-}
-
-messageManager.addMessageListener('Shumway:init', function (message) {
- var environment = message.data;
-
- messageManager.sendAsyncMessage('Shumway:running', {}, {
- externalInterface: externalInterfaceWrapper
- });
-
- viewerReady.then(function (viewerWindow) {
- ShumwayCom.createAdapter(viewerWindow.wrappedJSObject, {
- sendMessage: sendMessage,
- enableDebug: enableDebug,
- getEnvironment: function () { return environment; }
- }, shumwayComAdapterHooks);
-
- viewerWindow.wrappedJSObject.runViewer();
- });
-});
-
-messageManager.addMessageListener('Shumway:loadFile', function (message) {
- if (!shumwayComAdapterHooks.onLoadFileCallback) {
- return;
- }
- shumwayComAdapterHooks.onLoadFileCallback(Components.utils.cloneInto(message.data, content));
-});
diff --git a/browser/extensions/shumway/chrome/pingpong.js b/browser/extensions/shumway/chrome/pingpong.js
deleted file mode 100644
index 2438f22f78ed..000000000000
--- a/browser/extensions/shumway/chrome/pingpong.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Simple class for synchronous XHR communication.
-// See also examples/inspector/debug/server.js.
-
-var PingPongConnection = (function () {
- function PingPongConnection(url, onlySend) {
- this.url = url;
- this.onData = null;
- this.onError = null;
- this.currentXhr = null;
- this.closed = false;
-
- if (!onlySend) {
- this.idle();
- }
- }
-
- PingPongConnection.prototype = {
- idle: function () {
- function requestIncoming(connection) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', connection.url + '?idle', true);
- xhr.onload = function () {
- if (xhr.status === 204 &&
- xhr.getResponseHeader('X-PingPong-Error') === 'timeout') {
- requestIncoming(connection);
- return;
- }
- if (xhr.status === 200) {
- var result;
- if (connection.onData) {
- var response = xhr.responseText;
- result = connection.onData(response ? JSON.parse(response) : undefined);
- }
- if (xhr.getResponseHeader('X-PingPong-Async') === '1') {
- requestIncoming(connection);
- } else {
- sendResponse(connection, result);
- }
- return;
- }
-
- if (connection.onError) {
- connection.onError(xhr.statusText);
- }
- };
- xhr.onerror = function () {
- if (connection.onError) {
- connection.onError(xhr.error);
- }
- };
- xhr.send();
- connection.currentXhr = xhr;
- }
- function sendResponse(connection, result) {
- var xhr = new XMLHttpRequest();
- xhr.open('POST', connection.url + '?response', false);
- xhr.onload = function () {
- if (xhr.status !== 204) {
- if (connection.onError) {
- connection.onError(xhr.statusText);
- }
- }
- requestIncoming(connection);
- };
- xhr.onerror = function () {
- if (connection.onError) {
- connection.onError(xhr.error);
- }
- };
- xhr.send(result === undefined ? '' : JSON.stringify(result));
- connection.currentXhr = xhr;
- }
- requestIncoming(this);
- },
- send: function (data, async, timeout) {
- if (this.closed) {
- throw new Error('connection closed');
- }
-
- async = !!async;
- timeout |= 0;
-
- var encoded = data === undefined ? '' : JSON.stringify(data);
- if (async) {
- var xhr = new XMLHttpRequest();
- xhr.open('POST', this.url + '?async', true);
- xhr.send(encoded);
- return;
- } else {
- var xhr = new XMLHttpRequest();
- xhr.open('POST', this.url, false);
- if (timeout > 0) {
- xhr.setRequestHeader('X-PingPong-Timeout', timeout);
- }
- xhr.send(encoded);
- if (xhr.status === 204 &&
- xhr.getResponseHeader('X-PingPong-Error') === 'timeout') {
- throw new Error('sync request timeout');
- }
- var response = xhr.responseText;
- return response ? JSON.parse(response) : undefined;
- }
- },
- close: function () {
- if (this.currentXhr) {
- this.currentXhr.abort();
- this.currentXhr = null;
- }
- this.closed = true;
- }
- };
-
- return PingPongConnection;
-})();
diff --git a/browser/extensions/shumway/chrome/plugin.js b/browser/extensions/shumway/chrome/plugin.js
deleted file mode 100644
index 55afe0b407bf..000000000000
--- a/browser/extensions/shumway/chrome/plugin.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-Components.utils.import('resource://gre/modules/Promise.jsm');
-
-Components.utils.import('chrome://shumway/content/StartupInfo.jsm');
-Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, 'PrivateBrowsingUtils',
- 'resource://gre/modules/PrivateBrowsingUtils.jsm');
-
-function log(str) {
- var msg = 'plugin.js: ' + str;
- Services.console.logStringMessage(msg);
- dump(msg + '\n');
-}
-
-function runViewer() {
- function handlerOOP() {
- var frameLoader = pluginElement.frameLoader;
- var messageManager = frameLoader.messageManager;
-
- var externalInterface;
-
- messageManager.addMessageListener('Shumway:running', function (message) {
- externalInterface = message.objects.externalInterface;
- });
-
- messageManager.addMessageListener('Shumway:message', function (message) {
- var data = message.data;
- var result = shumwayActions.invoke(data.action, data.data);
- if (message.sync) {
- return result === undefined ? 'undefined' : JSON.stringify(result);
- }
- });
-
- messageManager.addMessageListener('Shumway:enableDebug', function (message) {
- enableDebug();
- });
-
- shumwayActions.onExternalCallback = function (call) {
- return externalInterface.callback(JSON.stringify(call));
- };
-
- shumwayActions.onLoadFileCallback = function (args) {
- messageManager.sendAsyncMessage('Shumway:loadFile', args);
- };
-
- messageManager.addMessageListener('Shumway:constructed', function (message) {
- messageManager.sendAsyncMessage('Shumway:init', getEnvironment());
- });
- }
-
- function getEnvironment() {
- return {
- swfUrl: startupInfo.url,
- privateBrowsing: startupInfo.privateBrowsing
- };
- }
-
- function enableDebug() {
- DebugUtils.enableDebug(startupInfo.url);
- setTimeout(function () {
- // TODO fix plugin instance reloading for jsplugins
- }, 1000);
- }
-
- var startupInfo = getStartupInfo(pluginElement);
- if (!startupInfo.url) {
- // Special case when movie URL is not specified, e.g. swfobject
- // checks only version. No need to instantiate the flash plugin.
- if (startupInfo.embedTag) {
- setupSimpleExternalInterface(startupInfo.embedTag);
- }
- return;
- }
-
- var document = pluginElement.ownerDocument;
- var window = document.defaultView;
- var shumwayActions = ShumwayCom.createActions(startupInfo, window, document);
-
- handlerOOP();
-
- // TODO fix remote debugging for jsplugins
-}
-
-function setupSimpleExternalInterface(embedTag) {
- Components.utils.exportFunction(function (variable) {
- switch (variable) {
- case '$version':
- return 'SHUMWAY 10,0,0';
- default:
- log('Unsupported GetVariable() call: ' + variable);
- return undefined;
- }
- }, embedTag.wrappedJSObject, {defineAs: 'GetVariable'});
-}
-
-runViewer();
-
diff --git a/browser/extensions/shumway/chrome/viewer.wrapper.html b/browser/extensions/shumway/chrome/viewer.wrapper.html
deleted file mode 100644
index 95ffa0adbe2a..000000000000
--- a/browser/extensions/shumway/chrome/viewer.wrapper.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/browser/extensions/shumway/chrome/viewerDebugger.js b/browser/extensions/shumway/chrome/viewerDebugger.js
deleted file mode 100644
index a0ef85287257..000000000000
--- a/browser/extensions/shumway/chrome/viewerDebugger.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-var DebugUtils = (function () {
- var baseUrl = null;
-
- function getBaseUrl() {
- if (baseUrl === null) {
- try {
- baseUrl = Services.prefs.getCharPref('shumway.debug.url');
- } catch (e) {
- baseUrl = 'http://localhost:8010';
- }
- }
- return baseUrl;
- }
-
- var uniqueId = (Date.now() % 888888) * 2 + 1;
-
- function getEnabledDebuggerId(swfUrl) {
- return new Promise(function (resolve) {
- var url = getBaseUrl() + '/debugController/' + uniqueId;
- var connection = new PingPongConnection(url);
- connection.onData = function (data) {
- if (data.action === 'setDebugger' && data.swfUrl === swfUrl) {
- resolve(data.debuggerId);
- }
- };
- try {
- connection.send({action: 'getDebugger', swfUrl: swfUrl, swfId: uniqueId}, true);
- } catch (e) {
- // ignoring failed send request
- }
- setTimeout(function () {
- resolve(0);
- connection.close();
- }, 500);
- });
- }
-
- function enableDebug(swfUrl) {
- var url = getBaseUrl() + '/debugController/' + uniqueId;
- var connection = new PingPongConnection(url, true);
- try {
- connection.send({action: 'enableDebugging', swfUrl: swfUrl}, true);
- } catch (e) {
- // ignoring failed send request
- }
- connection.close();
- }
-
- function createDebuggerConnection(swfUrl) {
- return getEnabledDebuggerId(swfUrl).then(function (debuggerId) {
- if (!debuggerId) {
- return null;
- }
-
- var url = getBaseUrl() + '/debug/' + uniqueId + '/' + debuggerId;
- console.log('Starting remote debugger with ' + url);
- return new PingPongConnection(url);
- });
- }
-
- return {
- get isEnabled() {
- try {
- return Services.prefs.getBoolPref('shumway.debug.enabled');
- } catch (e) {
- return false;
- }
- },
- enableDebug: enableDebug,
- createDebuggerConnection: createDebuggerConnection
- };
-})();
diff --git a/browser/extensions/shumway/chrome/viewerWrapper.js b/browser/extensions/shumway/chrome/viewerWrapper.js
deleted file mode 100644
index 3f9713582b61..000000000000
--- a/browser/extensions/shumway/chrome/viewerWrapper.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 2014 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var viewer = document.getElementById('viewer'), onLoaded;
-var promise = new Promise(function (resolve) {
- onLoaded = resolve;
-});
-viewer.addEventListener('load', function () {
- onLoaded(false);
-});
-viewer.addEventListener('mozbrowserloadend', function () {
- onLoaded(true);
-});
-
-Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
-
-function runViewer() {
- function handler() {
- function sendMessage(action, data, sync) {
- var result = shumwayActions.invoke(action, data);
- return Components.utils.cloneInto(result, childWindow);
- }
-
- var childWindow = viewer.contentWindow.wrappedJSObject;
-
- var shumwayComAdapterHooks = {};
- ShumwayCom.createAdapter(childWindow, {
- sendMessage: sendMessage,
- enableDebug: enableDebug,
- getEnvironment: getEnvironment,
- }, shumwayComAdapterHooks);
-
- shumwayActions.onExternalCallback = function (call) {
- return shumwayComAdapterHooks.onExternalCallback(Components.utils.cloneInto(call, childWindow));
- };
-
- shumwayActions.onLoadFileCallback = function (args) {
- shumwayComAdapterHooks.onLoadFileCallback(Components.utils.cloneInto(args, childWindow));
- };
-
- childWindow.runViewer();
- }
-
- function handlerOOP() {
- var frameLoader = viewer.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
- var messageManager = frameLoader.messageManager;
- messageManager.loadFrameScript('chrome://shumway/content/content.js', false);
-
- var externalInterface;
-
- messageManager.addMessageListener('Shumway:running', function (message) {
- externalInterface = message.objects.externalInterface;
- });
-
- messageManager.addMessageListener('Shumway:message', function (message) {
- var data = message.data;
- var result = shumwayActions.invoke(data.action, data.data);
- if (message.sync) {
- return result === undefined ? 'undefined' : JSON.stringify(result);
- }
- });
-
- messageManager.addMessageListener('Shumway:enableDebug', function (message) {
- enableDebug();
- });
-
- shumwayActions.onExternalCallback = function (call) {
- return externalInterface.callback(JSON.stringify(call));
- };
-
- shumwayActions.onLoadFileCallback = function (args) {
- messageManager.sendAsyncMessage('Shumway:loadFile', args);
- };
-
- messageManager.sendAsyncMessage('Shumway:init', getEnvironment());
- }
-
-
- function handleDebug(connection) {
- viewer.parentNode.removeChild(viewer); // we don't need viewer anymore
- document.body.className = 'remoteDebug';
-
- function sendMessage(data) {
- return shumwayActions.invoke(data.id, data.data);
- }
-
- connection.onData = function (data) {
- switch (data.action) {
- case 'sendMessage':
- return sendMessage(data);
- case 'reload':
- document.body.className = 'remoteReload';
- setTimeout(function () {
- window.top.location.reload();
- }, 1000);
- return;
- }
- };
-
- shumwayActions.onExternalCallback = function (call) {
- return connection.send({action: 'onExternalCallback', detail: call});
- };
-
- shumwayActions.onLoadFileCallback = function (args) {
- if (args.array) {
- args.array = Array.prototype.slice.call(args.array, 0);
- }
- return connection.send({action: 'onLoadFileCallback', detail: args}, true);
- };
-
- connection.send({action: 'runViewer'}, true);
- }
-
- function getEnvironment() {
- return {
- swfUrl: window.shumwayStartupInfo.url,
- privateBrowsing: window.shumwayStartupInfo.privateBrowsing
- };
- }
-
- function enableDebug() {
- DebugUtils.enableDebug(window.shumwayStartupInfo.url);
- setTimeout(function () {
- window.top.location.reload();
- }, 1000);
- }
-
- var startupInfo = window.shumwayStartupInfo;
- var shumwayActions = ShumwayCom.createActions(startupInfo, window, document);
-
- promise.then(function (oop) {
- if (DebugUtils.isEnabled) {
- DebugUtils.createDebuggerConnection(window.shumwayStartupInfo.url).then(
- function (debuggerConnection) {
- if (debuggerConnection) {
- handleDebug(debuggerConnection);
- } else if (oop) {
- handlerOOP();
- } else {
- handler();
- }
- });
- return;
- }
-
- if (oop) {
- handlerOOP();
- } else {
- handler();
- }
- });
-}
diff --git a/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm b/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm
deleted file mode 100644
index f2441c6edc77..000000000000
--- a/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var EXPORTED_SYMBOLS = ['ShumwayBootstrapUtils'];
-
-const PREF_PREFIX = 'shumway.';
-const PREF_IGNORE_CTP = PREF_PREFIX + 'ignoreCTP';
-const PREF_WHITELIST = PREF_PREFIX + 'swf.whitelist';
-const SWF_CONTENT_TYPE = 'application/x-shockwave-flash';
-const PLUGIN_HANLDER_URI = 'chrome://shumway/content/content.html';
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cm = Components.manager;
-var Cu = Components.utils;
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-
-var Ph = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function getStringPref(pref, def) {
- try {
- return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data;
- } catch (ex) {
- return def;
- }
-}
-
-function log(str) {
- var msg = 'ShumwayBootstrapUtils.jsm: ' + str;
- Services.console.logStringMessage(msg);
- dump(msg + '\n');
-}
-
-// Register/unregister a constructor as a factory.
-function Factory() {}
-Factory.prototype = {
- register: function register(targetConstructor) {
- var proto = targetConstructor.prototype;
- this._classID = proto.classID;
-
- var factory = XPCOMUtils._getFactory(targetConstructor);
- this._factory = factory;
-
- var registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
- registrar.registerFactory(proto.classID, proto.classDescription,
- proto.contractID, factory);
-
- if (proto.classID2) {
- this._classID2 = proto.classID2;
- registrar.registerFactory(proto.classID2, proto.classDescription,
- proto.contractID2, factory);
- }
- },
-
- unregister: function unregister() {
- var registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
- registrar.unregisterFactory(this._classID, this._factory);
- if (this._classID2) {
- registrar.unregisterFactory(this._classID2, this._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 = {
- isRegistered: false,
- isJSPluginsSupported: false,
-
- register: function () {
- if (this.isRegistered) {
- return;
- }
-
- this.isRegistered = true;
-
- // Register the components.
- this.isJSPluginsSupported = !!Ph.registerFakePlugin &&
- getBoolPref('shumway.jsplugins', false);
-
- if (this.isJSPluginsSupported) {
- let initPluginDict = {
- handlerURI: PLUGIN_HANLDER_URI,
- mimeEntries: [
- {
- type: SWF_CONTENT_TYPE,
- description: 'Shockwave Flash',
- extension: 'swf'
- }
- ],
- niceName: 'Shumway plugin',
- name: 'Shumway',
- supersedeExisting: true, // TODO verify when jsplugins (bug 558184) is implemented
- sandboxScript: 'chrome://shumway/content/plugin.js', // TODO verify when jsplugins (bug 558184) is implemented
- version: '10.0.0.0'
- };
- Ph.registerFakePlugin(initPluginDict);
- } else {
- Cu.import('resource://shumway/ShumwayStreamConverter.jsm');
-
- let converterFactory = new Factory();
- converterFactory.register(ShumwayStreamConverter);
- this.converterFactory = converterFactory;
- }
- },
-
- unregister: function () {
- if (!this.isRegistered) {
- return;
- }
-
- this.isRegistered = false;
-
- // Remove the contract/component.
- if (this.isJSPluginsSupported) {
- Ph.unregisterFakePlugin(PLUGIN_HANLDER_URI);
- } else {
- this.converterFactory.unregister();
- this.converterFactory = null;
- }
- }
-};
diff --git a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm b/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
deleted file mode 100644
index 53c6d99f411f..000000000000
--- a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright 2015 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var EXPORTED_SYMBOLS = ['ShumwayStreamConverter', 'ShumwayStreamOverlayConverter'];
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-const Cu = Components.utils;
-
-const SHUMWAY_CONTENT_TYPE = 'application/x-shockwave-flash';
-const EXPECTED_PLAYPREVIEW_URI_PREFIX = 'data:application/x-moz-playpreview;,' +
- SHUMWAY_CONTENT_TYPE;
-
-const FIREFOX_ID = '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}';
-const SEAMONKEY_ID = '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}';
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/NetUtil.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, 'PrivateBrowsingUtils',
- 'resource://gre/modules/PrivateBrowsingUtils.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, 'ShumwayTelemetry',
- 'resource://shumway/ShumwayTelemetry.jsm');
-
-Components.utils.import('chrome://shumway/content/StartupInfo.jsm');
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function log(aMsg) {
- let msg = 'ShumwayStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
- Services.console.logStringMessage(msg);
- dump(msg + '\n');
-}
-
-function getDOMWindow(aChannel) {
- var requestor = aChannel.notificationCallbacks ||
- aChannel.loadGroup.notificationCallbacks;
- var win = requestor.getInterface(Components.interfaces.nsIDOMWindow);
- return win;
-}
-
-function isShumwayEnabledFor(startupInfo) {
- // disabled for PrivateBrowsing windows
- if (isContentWindowPrivate(startupInfo.window) &&
- !getBoolPref('shumway.enableForPrivate', false)) {
- return false;
- }
- // disabled if embed tag specifies shumwaymode (for testing purpose)
- if (startupInfo.objectParams['shumwaymode'] === 'off') {
- return false;
- }
-
- var url = startupInfo.url;
- var baseUrl = startupInfo.baseUrl;
-
- // blacklisting well known sites with issues
- if (/\.ytimg\.com\//i.test(url) /* youtube movies */ ||
- /\/vui.swf\b/i.test(url) /* vidyo manager */ ||
- /soundcloud\.com\/player\/assets\/swf/i.test(url) /* soundcloud */ ||
- /sndcdn\.com\/assets\/swf/.test(url) /* soundcloud */ ||
- /vimeocdn\.com/.test(url) /* vimeo */) {
- return false;
- }
-
- return true;
-}
-
-function activateShumwayScripts(window) {
- function initScripts() {
- window.wrappedJSObject.runViewer();
-
- var parentWindow = window.parent;
- var viewerWindow = window.viewer.contentWindow;
-
- function activate(e) {
- e.preventDefault();
- viewerWindow.removeEventListener('mousedown', activate, true);
-
- parentWindow.addEventListener('keydown', forwardKeyEvent, true);
- parentWindow.addEventListener('keyup', forwardKeyEvent, true);
-
- sendFocusEvent('focus');
-
- parentWindow.addEventListener('blur', deactivate, true);
- parentWindow.addEventListener('mousedown', deactivate, true);
- viewerWindow.addEventListener('unload', deactivate, true);
- }
-
- function deactivate() {
- parentWindow.removeEventListener('blur', deactivate, true);
- parentWindow.removeEventListener('mousedown', deactivate, true);
- viewerWindow.removeEventListener('unload', deactivate, true);
-
- parentWindow.removeEventListener('keydown', forwardKeyEvent, true);
- parentWindow.removeEventListener('keyup', forwardKeyEvent, true);
-
- sendFocusEvent('blur');
-
- viewerWindow.addEventListener('mousedown', activate, true);
- }
-
- function forwardKeyEvent(e) {
- var event = viewerWindow.document.createEvent('KeyboardEvent');
- event.initKeyEvent(e.type,
- e.bubbles,
- e.cancelable,
- e.view,
- e.ctrlKey,
- e.altKey,
- e.shiftKey,
- e.metaKey,
- e.keyCode,
- e.charCode);
- viewerWindow.dispatchEvent(event);
- }
-
- function sendFocusEvent(type) {
- var event = viewerWindow.document.createEvent("UIEvent");
- event.initEvent(type, false, true);
- viewerWindow.dispatchEvent(event);
- }
-
- if (viewerWindow) {
- viewerWindow.addEventListener('mousedown', activate, true);
- }
-
- window.addEventListener('shumwayFallback', function (e) {
- var automatic = !!e.detail.automatic;
- fallbackToNativePlugin(window, !automatic, automatic);
- });
- }
-
- if (window.document.readyState === "interactive" ||
- window.document.readyState === "complete") {
- initScripts();
- } else {
- window.document.addEventListener('DOMContentLoaded', initScripts);
- }
-}
-
-function fallbackToNativePlugin(window, userAction, activateCTP) {
- var obj = window.frameElement;
- var doc = obj.ownerDocument;
- var e = doc.createEvent("CustomEvent");
- e.initCustomEvent("MozPlayPlugin", true, true, activateCTP);
- obj.dispatchEvent(e);
-
- ShumwayTelemetry.onFallback(userAction);
-}
-
-function ShumwayStreamConverterBase() {
-}
-
-ShumwayStreamConverterBase.prototype = {
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsISupports,
- Ci.nsIStreamConverter,
- Ci.nsIStreamListener,
- Ci.nsIRequestObserver
- ]),
-
- /*
- * This component works as such:
- * 1. asyncConvertData stores the listener
- * 2. onStartRequest creates a new channel, streams the viewer and cancels
- * the request so Shumway can do the request
- * Since the request is cancelled onDataAvailable should not be called. The
- * onStopRequest does nothing. The convert function just returns the stream,
- * it's just the synchronous version of asyncConvertData.
- */
-
- // nsIStreamConverter::convert
- convert: function(aFromStream, aFromType, aToType, aCtxt) {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
-
- getUrlHint: function(requestUrl) {
- return requestUrl.spec;
- },
-
- getStartupInfo: function(window, url) {
- var initStartTime = Date.now();
- var element = window.frameElement;
- var isOverlay = false;
- if (element) {
- // PlayPreview overlay "belongs" to the embed/object tag and consists of
- // DIV and IFRAME. Starting from IFRAME and looking for first object tag.
- var tagName = element.nodeName, containerElement;
- while (tagName != 'EMBED' && tagName != 'OBJECT') {
- // plugin overlay skipping until the target plugin is found
- isOverlay = true;
- containerElement = element;
- element = element.parentNode;
- if (!element) {
- throw new Error('Plugin element is not found');
- }
- tagName = element.nodeName;
- }
-
- if (isOverlay) {
- // HACK For Facebook, CSS embed tag rescaling -- iframe (our overlay)
- // has no styling in document. Shall removed with jsplugins.
- for (var child = window.frameElement; child !== element; child = child.parentNode) {
- child.setAttribute('style', 'max-width: 100%; max-height: 100%');
- }
-
- // Checking if overlay is a proper PlayPreview overlay.
- for (var i = 0; i < element.children.length; i++) {
- if (element.children[i] === containerElement) {
- throw new Error('Plugin element is invalid');
- }
- }
- }
- }
-
- if (element) {
- return getStartupInfo(element);
- }
-
- // Stream converter is used in top level window, just providing basic
- // information about SWF.
-
- var objectParams = {};
- var movieParams = {};
- var queryStringMatch = url && /\?([^#]+)/.exec(url);
- if (queryStringMatch) {
- var queryStringParams = parseQueryString(queryStringMatch[1]);
- for (var i in queryStringParams) {
- if (!(i in movieParams)) {
- movieParams[i] = queryStringParams[i];
- }
- }
- }
-
- // Using the same data structure as we return in StartupInfo.jsm and
- // assigning constant values for fields that is not applicable for
- // the stream converter when it is used in a top level window.
- var startupInfo = {};
- startupInfo.window = window;
- startupInfo.url = url;
- startupInfo.privateBrowsing = isContentWindowPrivate(window);
- startupInfo.objectParams = objectParams;
- startupInfo.movieParams = movieParams;
- startupInfo.baseUrl = url;
- startupInfo.isOverlay = false;
- startupInfo.refererUrl = null;
- startupInfo.embedTag = null;
- startupInfo.isPausedAtStart = /\bpaused=true$/.test(url);
- startupInfo.initStartTime = initStartTime;
- startupInfo.allowScriptAccess = false;
- return startupInfo;
- },
-
- // nsIStreamConverter::asyncConvertData
- asyncConvertData: function(aFromType, aToType, aListener, aCtxt) {
- // Store the listener passed to us
- this.listener = aListener;
- },
-
- // nsIStreamListener::onDataAvailable
- onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
- // Do nothing since all the data loading is handled by the viewer.
- log('SANITY CHECK: onDataAvailable SHOULD NOT BE CALLED!');
- },
-
- // nsIRequestObserver::onStartRequest
- onStartRequest: function(aRequest, aContext) {
- // Setup the request so we can use it below.
- aRequest.QueryInterface(Ci.nsIChannel);
-
- aRequest.QueryInterface(Ci.nsIWritablePropertyBag);
-
- // Change the content type so we don't get stuck in a loop.
- aRequest.setProperty('contentType', aRequest.contentType);
- aRequest.contentType = 'text/html';
-
- // TODO For now suspending request, however we can continue fetching data
- aRequest.suspend();
-
- var originalURI = aRequest.URI;
-
- // Create a new channel that loads the viewer as a chrome resource.
- var viewerUrl = 'chrome://shumway/content/viewer.wrapper.html';
- var channel = NetUtil.newChannel({
- uri: viewerUrl,
- loadUsingSystemPrincipal: true
- });
-
- var converter = this;
- var listener = this.listener;
- // Proxy all the request observer calls, when it gets to onStopRequest
- // we can get the dom window.
- var proxy = {
- onStartRequest: function(request, context) {
- listener.onStartRequest(aRequest, context);
- },
- onDataAvailable: function(request, context, inputStream, offset, count) {
- listener.onDataAvailable(aRequest, context, inputStream, offset, count);
- },
- onStopRequest: function(request, context, statusCode) {
- // Cancel the request so the viewer can handle it.
- aRequest.resume();
- aRequest.cancel(Cr.NS_BINDING_ABORTED);
-
- var domWindow = getDOMWindow(channel);
- let startupInfo = converter.getStartupInfo(domWindow, converter.getUrlHint(originalURI));
-
- listener.onStopRequest(aRequest, context, statusCode);
-
- if (!startupInfo.url) {
- // Special case when movie URL is not specified, e.g. swfobject
- // checks only version. No need to instantiate the flash plugin.
- if (startupInfo.embedTag) {
- setupSimpleExternalInterface(startupInfo.embedTag);
- }
- return;
- }
-
- if (!isShumwayEnabledFor(startupInfo)) {
- fallbackToNativePlugin(domWindow, false, true);
- return;
- }
-
- domWindow.shumwayStartupInfo = startupInfo;
-
- // TODO Report telemetry on amount of swfs on the page
- // ShumwayTelemetry.onPageIndex(pageIndex);
-
- activateShumwayScripts(domWindow);
- }
- };
-
- // Keep the URL the same so the browser sees it as the same.
- channel.originalURI = aRequest.URI;
- channel.loadGroup = aRequest.loadGroup;
-
- // We can use all powerful principal: we are opening chrome:// web page,
- // which will need lots of permission.
- var securityManager = Cc['@mozilla.org/scriptsecuritymanager;1']
- .getService(Ci.nsIScriptSecurityManager);
- var resourcePrincipal = securityManager.getSystemPrincipal();
- aRequest.owner = resourcePrincipal;
- channel.asyncOpen2(proxy);
- },
-
- // nsIRequestObserver::onStopRequest
- onStopRequest: function(aRequest, aContext, aStatusCode) {
- // Do nothing.
- }
-};
-
-function setupSimpleExternalInterface(embedTag) {
- Components.utils.exportFunction(function (variable) {
- switch (variable) {
- case '$version':
- return 'SHUMWAY 10,0,0';
- default:
- log('Unsupported GetVariable() call: ' + variable);
- return undefined;
- }
- }, embedTag.wrappedJSObject, {defineAs: 'GetVariable'});
-}
-
-// properties required for XPCOM registration:
-function copyProperties(obj, template) {
- for (var prop in template) {
- obj[prop] = template[prop];
- }
-}
-
-function ShumwayStreamConverter() {}
-ShumwayStreamConverter.prototype = new ShumwayStreamConverterBase();
-copyProperties(ShumwayStreamConverter.prototype, {
- classID: Components.ID('{4c6030f7-e20a-264f-5b0e-ada3a9e97384}'),
- classDescription: 'Shumway Content Converter Component',
- contractID: '@mozilla.org/streamconv;1?from=application/x-shockwave-flash&to=*/*',
-
- classID2: Components.ID('{4c6030f8-e20a-264f-5b0e-ada3a9e97384}'),
- contractID2: '@mozilla.org/streamconv;1?from=application/x-shockwave-flash&to=text/html'
-});
-
-function ShumwayStreamOverlayConverter() {}
-ShumwayStreamOverlayConverter.prototype = new ShumwayStreamConverterBase();
-copyProperties(ShumwayStreamOverlayConverter.prototype, {
- classID: Components.ID('{4c6030f7-e20a-264f-5f9b-ada3a9e97384}'),
- classDescription: 'Shumway PlayPreview Component',
- contractID: '@mozilla.org/streamconv;1?from=application/x-moz-playpreview&to=*/*'
-});
-ShumwayStreamOverlayConverter.prototype.getUrlHint = function (requestUrl) {
- return '';
-};
diff --git a/browser/extensions/shumway/content/ShumwayTelemetry.jsm b/browser/extensions/shumway/content/ShumwayTelemetry.jsm
deleted file mode 100644
index e696a767a267..000000000000
--- a/browser/extensions/shumway/content/ShumwayTelemetry.jsm
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright 2013 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/* jshint esnext:true */
-
-'use strict';
-
-this.EXPORTED_SYMBOLS = ['ShumwayTelemetry'];
-
-const Cu = Components.utils;
-Cu.import('resource://gre/modules/Services.jsm');
-
-const BANNER_SIZES = [
- "88x31", "120x60", "120x90", "120x240", "120x600", "125x125", "160x600",
- "180x150", "234x60", "240x400", "250x250", "300x100", "300x250", "300x600",
- "300x1050", "336x280", "468x60", "550x480", "720x100", "728x90", "970x90",
- "970x250"];
-
-function getBannerType(width, height) {
- return BANNER_SIZES.indexOf(width + 'x' + height) + 1;
-}
-
-this.ShumwayTelemetry = {
- onFirstFrame: function (timeToDisplay) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_TIME_TO_VIEW_MS");
- histogram.add(timeToDisplay);
- },
- onParseInfo: function (parseInfo) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_PARSING_MS");
- histogram.add(parseInfo.parseTime);
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_SIZE_KB");
- histogram.add(parseInfo.size / 1024);
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_VERSION");
- histogram.add(parseInfo.swfVersion);
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_FRAME_RATE");
- histogram.add(parseInfo.frameRate);
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_AREA");
- histogram.add(parseInfo.width * parseInfo.height);
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_BANNER");
- histogram.add(getBannerType(parseInfo.width, parseInfo.height));
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_AVM2");
- histogram.add(parseInfo.isAvm2);
- },
- onError: function (errorType) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_ERROR");
- histogram.add(errorType);
- },
- onPageIndex: function (pageIndex) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_SWF_INDEX_ON_PAGE");
- histogram.add(pageIndex);
- },
- onFeature: function (featureType) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_FEATURE_USED");
- histogram.add(featureType);
- },
- onLoadResource: function (resultType) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_LOAD_RESOURCE_RESULT");
- histogram.add(resultType);
- },
- onFallback: function (userAction) {
- var histogram = Services.telemetry.getHistogramById("SHUMWAY_FALLBACK");
- histogram.add(userAction);
- }
-};
diff --git a/browser/extensions/shumway/content/ShumwayUtils.jsm b/browser/extensions/shumway/content/ShumwayUtils.jsm
deleted file mode 100644
index 688dedfe6186..000000000000
--- a/browser/extensions/shumway/content/ShumwayUtils.jsm
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Copyright 2012 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var EXPORTED_SYMBOLS = ["ShumwayUtils"];
-
-const PREF_PREFIX = 'shumway.';
-const PREF_DISABLED = PREF_PREFIX + 'disabled';
-const PREF_WHITELIST = PREF_PREFIX + 'swf.whitelist';
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cm = Components.manager;
-var Cu = Components.utils;
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function log(str) {
- dump(str + '\n');
-}
-
-var ShumwayUtils = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
- _registered: false,
-
- init: function init() {
- this.migratePreferences();
- if (this.enabled)
- this._ensureRegistered();
- else
- this._ensureUnregistered();
-
- Cc["@mozilla.org/parentprocessmessagemanager;1"]
- .getService(Ci.nsIMessageBroadcaster)
- .addMessageListener('Shumway:Chrome:isEnabled', this);
-
- // Listen for when shumway is completely disabled.
- 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)
- this._ensureRegistered();
- else
- this._ensureUnregistered();
- },
-
- receiveMessage: function(message) {
- switch (message.name) {
- case 'Shumway:Chrome:isEnabled':
- return this.enabled;
- }
- },
-
- /**
- * shumway is only enabled if the global switch enabling is true.
- * @return {boolean} Wether or not it's enabled.
- */
- get enabled() {
- return !getBoolPref(PREF_DISABLED, true);
- },
-
- _ensureRegistered: function _ensureRegistered() {
- if (this._registered)
- return;
-
- // Load the component and register it.
- Cu.import('resource://shumway/ShumwayBootstrapUtils.jsm');
- ShumwayBootstrapUtils.register();
-
- this._registered = true;
-
- log('Shumway is registered');
-
- let globalMM = Cc['@mozilla.org/globalmessagemanager;1']
- .getService(Ci.nsIFrameScriptLoader);
- globalMM.broadcastAsyncMessage('Shumway:Child:refreshSettings');
- },
-
- _ensureUnregistered: function _ensureUnregistered() {
- if (!this._registered)
- return;
-
- // Remove the contract/component.
- ShumwayBootstrapUtils.unregister();
- Cu.unload('resource://shumway/ShumwayBootstrapUtils.jsm');
-
- this._registered = false;
-
- log('Shumway is unregistered');
-
- let globalMM = Cc['@mozilla.org/globalmessagemanager;1']
- .getService(Ci.nsIFrameScriptLoader);
- globalMM.broadcastAsyncMessage('Shumway:Child:refreshSettings');
- }
-};
diff --git a/browser/extensions/shumway/content/gfx/gl/shaders/combined.frag b/browser/extensions/shumway/content/gfx/gl/shaders/combined.frag
deleted file mode 100644
index b2b14de419b3..000000000000
--- a/browser/extensions/shumway/content/gfx/gl/shaders/combined.frag
+++ /dev/null
@@ -1,46 +0,0 @@
-precision mediump float;
-
-varying vec4 vColor;
-uniform mat4 uColorMatrix;
-uniform vec4 uColorVector;
-uniform sampler2D uSampler[8];
-varying vec2 vCoordinate;
-varying float vKind;
-varying float vSampler;
-
-void main() {
- vec4 color;
- int kind = int(floor(vKind + 0.5));
- if (kind == 0) {
- color = vColor;
- } else if (kind == 1 || kind == 2) {
- int sampler = int(floor(vSampler + 0.5));
- if (sampler == 0) {
- color = vColor * texture2D(uSampler[0], vCoordinate);
- } else if (sampler == 1) {
- color = vColor * texture2D(uSampler[1], vCoordinate);
- } else if (sampler == 2) {
- color = vColor * texture2D(uSampler[2], vCoordinate);
- } else if (sampler == 3) {
- color = vColor * texture2D(uSampler[3], vCoordinate);
- } else if (sampler == 4) {
- color = vColor * texture2D(uSampler[4], vCoordinate);
- } else if (sampler == 5) {
- color = vColor * texture2D(uSampler[5], vCoordinate);
- } else if (sampler == 6) {
- color = vColor * texture2D(uSampler[6], vCoordinate);
- } else if (sampler == 7) {
- color = vColor * texture2D(uSampler[7], vCoordinate);
- }
- if (kind == 2) {
- color = color * uColorMatrix + uColorVector;
- }
- } else {
- color = vec4(1.0, 0.0, 0.0, 1.0);
- }
- // color.rgb *= color.a;
- if (color.a < 0.01) {
- discard;
- }
- gl_FragColor = color;
-}
\ No newline at end of file
diff --git a/browser/extensions/shumway/content/gfx/gl/shaders/combined.vert b/browser/extensions/shumway/content/gfx/gl/shaders/combined.vert
deleted file mode 100644
index 7adbe10cbadb..000000000000
--- a/browser/extensions/shumway/content/gfx/gl/shaders/combined.vert
+++ /dev/null
@@ -1,22 +0,0 @@
-uniform vec2 uResolution;
-uniform mat3 uTransformMatrix;
-uniform mat4 uTransformMatrix3D;
-
-attribute vec4 aPosition;
-attribute vec4 aColor;
-attribute vec2 aCoordinate;
-attribute float aKind;
-attribute float aSampler;
-
-varying vec4 vColor;
-varying vec2 vCoordinate;
-varying float vKind;
-varying float vSampler;
-
-void main() {
- gl_Position = uTransformMatrix3D * aPosition;
- vColor = aColor;
- vCoordinate = aCoordinate;
- vKind = aKind;
- vSampler = aSampler;
-}
\ No newline at end of file
diff --git a/browser/extensions/shumway/content/libs/builtin.abc b/browser/extensions/shumway/content/libs/builtin.abc
deleted file mode 100644
index a54a058b3aa0..000000000000
Binary files a/browser/extensions/shumway/content/libs/builtin.abc and /dev/null differ
diff --git a/browser/extensions/shumway/content/playerglobal/playerglobal.abcs b/browser/extensions/shumway/content/playerglobal/playerglobal.abcs
deleted file mode 100644
index 1bdf39e81dbc..000000000000
Binary files a/browser/extensions/shumway/content/playerglobal/playerglobal.abcs and /dev/null differ
diff --git a/browser/extensions/shumway/content/playerglobal/playerglobal.json b/browser/extensions/shumway/content/playerglobal/playerglobal.json
deleted file mode 100644
index c17f4a5b0042..000000000000
--- a/browser/extensions/shumway/content/playerglobal/playerglobal.json
+++ /dev/null
@@ -1,2745 +0,0 @@
-[
- {
- "name": "flash/accessibility/Accessibility",
- "defs": [
- "flash.accessibility:Accessibility"
- ],
- "offset": 0,
- "length": 355
- },
- {
- "name": "flash/accessibility/AccessibilityImplementation",
- "defs": [
- "flash.accessibility:AccessibilityImplementation"
- ],
- "offset": 355,
- "length": 995
- },
- {
- "name": "flash/accessibility/AccessibilityProperties",
- "defs": [
- "flash.accessibility:AccessibilityProperties"
- ],
- "offset": 1350,
- "length": 334
- },
- {
- "name": "flash/accessibility/ISearchableText",
- "defs": [
- "flash.accessibility:ISearchableText"
- ],
- "offset": 1684,
- "length": 183
- },
- {
- "name": "flash/accessibility/ISimpleTextSelection",
- "defs": [
- "flash.accessibility:ISimpleTextSelection"
- ],
- "offset": 1867,
- "length": 232
- },
- {
- "name": "flash/desktop/Clipboard",
- "defs": [
- "flash.desktop:Clipboard"
- ],
- "offset": 2099,
- "length": 552
- },
- {
- "name": "flash/desktop/ClipboardTransferMode",
- "defs": [
- "flash.desktop:ClipboardTransferMode"
- ],
- "offset": 2651,
- "length": 375
- },
- {
- "name": "flash/desktop/ClipboardFormats",
- "defs": [
- "flash.desktop:ClipboardFormats"
- ],
- "offset": 3026,
- "length": 653
- },
- {
- "name": "flash/errors/InvalidSWFError",
- "defs": [
- "flash.errors:InvalidSWFError"
- ],
- "offset": 3679,
- "length": 217
- },
- {
- "name": "flash/errors/StackOverflowError",
- "defs": [
- "flash.errors:StackOverflowError"
- ],
- "offset": 3896,
- "length": 223
- },
- {
- "name": "flash/errors/ScriptTimeoutError",
- "defs": [
- "flash.errors:ScriptTimeoutError"
- ],
- "offset": 4119,
- "length": 223
- },
- {
- "name": "flash/display/ActionScriptVersion",
- "defs": [
- "flash.display:ActionScriptVersion"
- ],
- "offset": 4342,
- "length": 253
- },
- {
- "name": "flash/display/AVM1Movie",
- "defs": [
- "flash.display:AVM1Movie"
- ],
- "offset": 4595,
- "length": 318
- },
- {
- "name": "flash/display/Bitmap",
- "defs": [
- "flash.display:Bitmap"
- ],
- "offset": 4913,
- "length": 390
- },
- {
- "name": "flash/display/BitmapData",
- "defs": [
- "flash.display:BitmapData"
- ],
- "offset": 5303,
- "length": 1445
- },
- {
- "name": "flash/display/BitmapDataChannel",
- "defs": [
- "flash.display:BitmapDataChannel"
- ],
- "offset": 6748,
- "length": 274
- },
- {
- "name": "flash/display/BitmapEncodingColorSpace",
- "defs": [
- "flash.display:BitmapEncodingColorSpace"
- ],
- "offset": 7022,
- "length": 355
- },
- {
- "name": "flash/display/BlendMode",
- "defs": [
- "flash.display:BlendMode"
- ],
- "offset": 7377,
- "length": 595
- },
- {
- "name": "flash/display/CapsStyle",
- "defs": [
- "flash.display:CapsStyle"
- ],
- "offset": 7972,
- "length": 256
- },
- {
- "name": "flash/display/ColorCorrection",
- "defs": [
- "flash.display:ColorCorrection"
- ],
- "offset": 8228,
- "length": 262
- },
- {
- "name": "flash/display/ColorCorrectionSupport",
- "defs": [
- "flash.display:ColorCorrectionSupport"
- ],
- "offset": 8490,
- "length": 314
- },
- {
- "name": "flash/display/DisplayObject",
- "defs": [
- "flash.display:DisplayObject"
- ],
- "offset": 8804,
- "length": 1466
- },
- {
- "name": "flash/display/DisplayObjectContainer",
- "defs": [
- "flash.display:DisplayObjectContainer"
- ],
- "offset": 10270,
- "length": 898
- },
- {
- "name": "flash/display/FocusDirection",
- "defs": [
- "flash.display:FocusDirection"
- ],
- "offset": 11168,
- "length": 262
- },
- {
- "name": "flash/display/FrameLabel",
- "defs": [
- "flash.display:FrameLabel"
- ],
- "offset": 11430,
- "length": 278
- },
- {
- "name": "flash/display/Graphics",
- "defs": [
- "flash.display:Graphics"
- ],
- "offset": 11708,
- "length": 956
- },
- {
- "name": "flash/display/GradientType",
- "defs": [
- "flash.display:GradientType"
- ],
- "offset": 12664,
- "length": 239
- },
- {
- "name": "flash/display/GraphicsBitmapFill",
- "defs": [
- "flash.display:GraphicsBitmapFill"
- ],
- "offset": 12903,
- "length": 346
- },
- {
- "name": "flash/display/GraphicsEndFill",
- "defs": [
- "flash.display:GraphicsEndFill"
- ],
- "offset": 13249,
- "length": 215
- },
- {
- "name": "flash/display/GraphicsGradientFill",
- "defs": [
- "flash.display:GraphicsGradientFill"
- ],
- "offset": 13464,
- "length": 697
- },
- {
- "name": "flash/display/GraphicsPath",
- "defs": [
- "flash.display:GraphicsPath"
- ],
- "offset": 14161,
- "length": 1258
- },
- {
- "name": "flash/display/GraphicsPathCommand",
- "defs": [
- "flash.display:GraphicsPathCommand"
- ],
- "offset": 15419,
- "length": 368
- },
- {
- "name": "flash/display/GraphicsPathWinding",
- "defs": [
- "flash.display:GraphicsPathWinding"
- ],
- "offset": 15787,
- "length": 259
- },
- {
- "name": "flash/display/GraphicsSolidFill",
- "defs": [
- "flash.display:GraphicsSolidFill"
- ],
- "offset": 16046,
- "length": 283
- },
- {
- "name": "flash/display/GraphicsStroke",
- "defs": [
- "flash.display:GraphicsStroke"
- ],
- "offset": 16329,
- "length": 1542
- },
- {
- "name": "flash/display/GraphicsTrianglePath",
- "defs": [
- "flash.display:GraphicsTrianglePath"
- ],
- "offset": 17871,
- "length": 680
- },
- {
- "name": "flash/display/IBitmapDrawable",
- "defs": [
- "flash.display:IBitmapDrawable"
- ],
- "offset": 18551,
- "length": 105
- },
- {
- "name": "flash/display/IDrawCommand",
- "defs": [
- "flash.display:IDrawCommand"
- ],
- "offset": 18656,
- "length": 102
- },
- {
- "name": "flash/display/IGraphicsData",
- "defs": [
- "flash.display:IGraphicsData"
- ],
- "offset": 18758,
- "length": 103
- },
- {
- "name": "flash/display/IGraphicsFill",
- "defs": [
- "flash.display:IGraphicsFill"
- ],
- "offset": 18861,
- "length": 103
- },
- {
- "name": "flash/display/IGraphicsPath",
- "defs": [
- "flash.display:IGraphicsPath"
- ],
- "offset": 18964,
- "length": 103
- },
- {
- "name": "flash/display/IGraphicsStroke",
- "defs": [
- "flash.display:IGraphicsStroke"
- ],
- "offset": 19067,
- "length": 105
- },
- {
- "name": "flash/display/InteractiveObject",
- "defs": [
- "flash.display:InteractiveObject"
- ],
- "offset": 19172,
- "length": 764
- },
- {
- "name": "flash/display/InterpolationMethod",
- "defs": [
- "flash.display:InterpolationMethod"
- ],
- "offset": 19936,
- "length": 254
- },
- {
- "name": "flash/display/JointStyle",
- "defs": [
- "flash.display:JointStyle"
- ],
- "offset": 20190,
- "length": 258
- },
- {
- "name": "flash/display/JPEGEncoderOptions",
- "defs": [
- "flash.display:JPEGEncoderOptions"
- ],
- "offset": 20448,
- "length": 216
- },
- {
- "name": "flash/display/JPEGXREncoderOptions",
- "defs": [
- "flash.display:JPEGXREncoderOptions"
- ],
- "offset": 20664,
- "length": 295
- },
- {
- "name": "flash/display/LineScaleMode",
- "defs": [
- "flash.display:LineScaleMode"
- ],
- "offset": 20959,
- "length": 307
- },
- {
- "name": "flash/display/Loader",
- "defs": [
- "flash.display:Loader"
- ],
- "offset": 21266,
- "length": 756
- },
- {
- "name": "flash/display/LoaderInfo",
- "defs": [
- "flash.display:LoaderInfo"
- ],
- "offset": 22022,
- "length": 992
- },
- {
- "name": "flash/display/MorphShape",
- "defs": [
- "flash.display:MorphShape"
- ],
- "offset": 23014,
- "length": 263
- },
- {
- "name": "flash/display/MovieClip",
- "defs": [
- "flash.display:MovieClip"
- ],
- "offset": 23277,
- "length": 845
- },
- {
- "name": "flash/display/NativeMenu",
- "defs": [
- "flash.display:NativeMenu"
- ],
- "offset": 24122,
- "length": 226
- },
- {
- "name": "flash/display/NativeMenuItem",
- "defs": [
- "flash.display:NativeMenuItem"
- ],
- "offset": 24348,
- "length": 285
- },
- {
- "name": "flash/display/PixelSnapping",
- "defs": [
- "flash.display:PixelSnapping"
- ],
- "offset": 24633,
- "length": 264
- },
- {
- "name": "flash/display/PNGEncoderOptions",
- "defs": [
- "flash.display:PNGEncoderOptions"
- ],
- "offset": 24897,
- "length": 224
- },
- {
- "name": "flash/display/Scene",
- "defs": [
- "flash.display:Scene"
- ],
- "offset": 25121,
- "length": 255
- },
- {
- "name": "flash/display/Shape",
- "defs": [
- "flash.display:Shape"
- ],
- "offset": 25376,
- "length": 266
- },
- {
- "name": "flash/display/SimpleButton",
- "defs": [
- "flash.display:SimpleButton"
- ],
- "offset": 25642,
- "length": 596
- },
- {
- "name": "flash/display/SpreadMethod",
- "defs": [
- "flash.display:SpreadMethod"
- ],
- "offset": 26238,
- "length": 264
- },
- {
- "name": "flash/display/Sprite",
- "defs": [
- "flash.display:Sprite"
- ],
- "offset": 26502,
- "length": 670
- },
- {
- "name": "flash/display/Stage",
- "defs": [
- "flash.display:Stage"
- ],
- "offset": 27172,
- "length": 2409
- },
- {
- "name": "flash/display/Stage3D",
- "defs": [
- "flash.display:Stage3D"
- ],
- "offset": 29581,
- "length": 443
- },
- {
- "name": "flash/display/StageAlign",
- "defs": [
- "flash.display:StageAlign"
- ],
- "offset": 30024,
- "length": 383
- },
- {
- "name": "flash/display/StageDisplayState",
- "defs": [
- "flash.display:StageDisplayState"
- ],
- "offset": 30407,
- "length": 319
- },
- {
- "name": "flash/display/StageQuality",
- "defs": [
- "flash.display:StageQuality"
- ],
- "offset": 30726,
- "length": 429
- },
- {
- "name": "flash/display/StageScaleMode",
- "defs": [
- "flash.display:StageScaleMode"
- ],
- "offset": 31155,
- "length": 317
- },
- {
- "name": "flash/display/SWFVersion",
- "defs": [
- "flash.display:SWFVersion"
- ],
- "offset": 31472,
- "length": 454
- },
- {
- "name": "flash/display/TriangleCulling",
- "defs": [
- "flash.display:TriangleCulling"
- ],
- "offset": 31926,
- "length": 278
- },
- {
- "name": "flash/external/ExternalInterface",
- "defs": [
- "flash.external:ExternalInterface"
- ],
- "offset": 32204,
- "length": 380
- },
- {
- "name": "flash/events/AccelerometerEvent",
- "defs": [
- "flash.events:AccelerometerEvent"
- ],
- "offset": 32584,
- "length": 817
- },
- {
- "name": "flash/events/ActivityEvent",
- "defs": [
- "flash.events:ActivityEvent"
- ],
- "offset": 33401,
- "length": 505
- },
- {
- "name": "flash/events/AsyncErrorEvent",
- "defs": [
- "flash.events:AsyncErrorEvent"
- ],
- "offset": 33906,
- "length": 398
- },
- {
- "name": "flash/events/ContextMenuEvent",
- "defs": [
- "flash.events:ContextMenuEvent"
- ],
- "offset": 34304,
- "length": 829
- },
- {
- "name": "flash/events/DataEvent",
- "defs": [
- "flash.events:DataEvent"
- ],
- "offset": 35133,
- "length": 546
- },
- {
- "name": "flash/events/ErrorEvent",
- "defs": [
- "flash.events:ErrorEvent"
- ],
- "offset": 35679,
- "length": 388
- },
- {
- "name": "flash/events/Event",
- "defs": [
- "flash.events:Event"
- ],
- "offset": 36067,
- "length": 2036
- },
- {
- "name": "flash/events/EventDispatcher",
- "defs": [
- "flash.events:EventDispatcher"
- ],
- "offset": 38103,
- "length": 463
- },
- {
- "name": "flash/events/EventPhase",
- "defs": [
- "flash.events:EventPhase"
- ],
- "offset": 38566,
- "length": 262
- },
- {
- "name": "flash/events/FocusEvent",
- "defs": [
- "flash.events:FocusEvent"
- ],
- "offset": 38828,
- "length": 980
- },
- {
- "name": "flash/events/FullScreenEvent",
- "defs": [
- "flash.events:FullScreenEvent"
- ],
- "offset": 39808,
- "length": 643
- },
- {
- "name": "flash/events/GameInputEvent",
- "defs": [
- "flash.events:GameInputEvent"
- ],
- "offset": 40451,
- "length": 390
- },
- {
- "name": "flash/events/GeolocationEvent",
- "defs": [
- "flash.events:GeolocationEvent"
- ],
- "offset": 40841,
- "length": 1137
- },
- {
- "name": "flash/events/GestureEvent",
- "defs": [
- "flash.events:GestureEvent"
- ],
- "offset": 41978,
- "length": 669
- },
- {
- "name": "flash/events/GesturePhase",
- "defs": [
- "flash.events:GesturePhase"
- ],
- "offset": 42647,
- "length": 281
- },
- {
- "name": "flash/events/HTTPStatusEvent",
- "defs": [
- "flash.events:HTTPStatusEvent"
- ],
- "offset": 42928,
- "length": 457
- },
- {
- "name": "flash/events/IEventDispatcher",
- "defs": [
- "flash.events:IEventDispatcher"
- ],
- "offset": 43385,
- "length": 353
- },
- {
- "name": "flash/events/IMEEvent",
- "defs": [
- "flash.events:IMEEvent"
- ],
- "offset": 43738,
- "length": 632
- },
- {
- "name": "flash/events/IOErrorEvent",
- "defs": [
- "flash.events:IOErrorEvent"
- ],
- "offset": 44370,
- "length": 495
- },
- {
- "name": "flash/events/KeyboardEvent",
- "defs": [
- "flash.events:KeyboardEvent"
- ],
- "offset": 44865,
- "length": 617
- },
- {
- "name": "flash/events/MouseEvent",
- "defs": [
- "flash.events:MouseEvent"
- ],
- "offset": 45482,
- "length": 1503
- },
- {
- "name": "flash/events/NetDataEvent",
- "defs": [
- "flash.events:NetDataEvent"
- ],
- "offset": 46985,
- "length": 565
- },
- {
- "name": "flash/events/NetFilterEvent",
- "defs": [
- "flash.events:NetFilterEvent"
- ],
- "offset": 47550,
- "length": 454
- },
- {
- "name": "flash/events/NetMonitorEvent",
- "defs": [
- "flash.events:NetMonitorEvent"
- ],
- "offset": 48004,
- "length": 516
- },
- {
- "name": "flash/events/NetStatusEvent",
- "defs": [
- "flash.events:NetStatusEvent"
- ],
- "offset": 48520,
- "length": 385
- },
- {
- "name": "flash/events/OutputProgressEvent",
- "defs": [
- "flash.events:OutputProgressEvent"
- ],
- "offset": 48905,
- "length": 638
- },
- {
- "name": "flash/events/PressAndTapGestureEvent",
- "defs": [
- "flash.events:PressAndTapGestureEvent"
- ],
- "offset": 49543,
- "length": 944
- },
- {
- "name": "flash/events/ProgressEvent",
- "defs": [
- "flash.events:ProgressEvent"
- ],
- "offset": 50487,
- "length": 460
- },
- {
- "name": "flash/events/SampleDataEvent",
- "defs": [
- "flash.events:SampleDataEvent"
- ],
- "offset": 50947,
- "length": 639
- },
- {
- "name": "flash/events/SecurityErrorEvent",
- "defs": [
- "flash.events:SecurityErrorEvent"
- ],
- "offset": 51586,
- "length": 511
- },
- {
- "name": "flash/events/SoftKeyboardEvent",
- "defs": [
- "flash.events:SoftKeyboardEvent"
- ],
- "offset": 52097,
- "length": 793
- },
- {
- "name": "flash/events/SoftKeyboardTrigger",
- "defs": [
- "flash.events:SoftKeyboardTrigger"
- ],
- "offset": 52890,
- "length": 287
- },
- {
- "name": "flash/events/StageVideoAvailabilityEvent",
- "defs": [
- "flash.events:StageVideoAvailabilityEvent"
- ],
- "offset": 53177,
- "length": 377
- },
- {
- "name": "flash/events/StageVideoEvent",
- "defs": [
- "flash.events:StageVideoEvent"
- ],
- "offset": 53554,
- "length": 535
- },
- {
- "name": "flash/events/StatusEvent",
- "defs": [
- "flash.events:StatusEvent"
- ],
- "offset": 54089,
- "length": 366
- },
- {
- "name": "flash/events/SyncEvent",
- "defs": [
- "flash.events:SyncEvent"
- ],
- "offset": 54455,
- "length": 466
- },
- {
- "name": "flash/events/TextEvent",
- "defs": [
- "flash.events:TextEvent"
- ],
- "offset": 54921,
- "length": 381
- },
- {
- "name": "flash/events/ThrottleEvent",
- "defs": [
- "flash.events:ThrottleEvent"
- ],
- "offset": 55302,
- "length": 553
- },
- {
- "name": "flash/events/ThrottleType",
- "defs": [
- "flash.events:ThrottleType"
- ],
- "offset": 55855,
- "length": 268
- },
- {
- "name": "flash/events/TimerEvent",
- "defs": [
- "flash.events:TimerEvent"
- ],
- "offset": 56123,
- "length": 389
- },
- {
- "name": "flash/events/TouchEvent",
- "defs": [
- "flash.events:TouchEvent"
- ],
- "offset": 56512,
- "length": 1501
- },
- {
- "name": "flash/events/TransformGestureEvent",
- "defs": [
- "flash.events:TransformGestureEvent"
- ],
- "offset": 58013,
- "length": 1154
- },
- {
- "name": "flash/events/UncaughtErrorEvent",
- "defs": [
- "flash.events:UncaughtErrorEvent"
- ],
- "offset": 59167,
- "length": 525
- },
- {
- "name": "flash/events/UncaughtErrorEvents",
- "defs": [
- "flash.events:UncaughtErrorEvents"
- ],
- "offset": 59692,
- "length": 236
- },
- {
- "name": "flash/events/VideoEvent",
- "defs": [
- "flash.events:VideoEvent"
- ],
- "offset": 59928,
- "length": 461
- },
- {
- "name": "flash/geom/ColorTransform",
- "defs": [
- "flash.geom:ColorTransform"
- ],
- "offset": 60389,
- "length": 586
- },
- {
- "name": "flash/geom/Matrix",
- "defs": [
- "flash.geom:Matrix"
- ],
- "offset": 60975,
- "length": 814
- },
- {
- "name": "flash/geom/Matrix3D",
- "defs": [
- "flash.geom:Matrix3D"
- ],
- "offset": 61789,
- "length": 1092
- },
- {
- "name": "flash/geom/Orientation3D",
- "defs": [
- "flash.geom:Orientation3D"
- ],
- "offset": 62881,
- "length": 290
- },
- {
- "name": "flash/geom/PerspectiveProjection",
- "defs": [
- "flash.geom:PerspectiveProjection"
- ],
- "offset": 63171,
- "length": 389
- },
- {
- "name": "flash/geom/Point",
- "defs": [
- "flash.geom:Point"
- ],
- "offset": 63560,
- "length": 516
- },
- {
- "name": "flash/geom/Rectangle",
- "defs": [
- "flash.geom:Rectangle"
- ],
- "offset": 64076,
- "length": 889
- },
- {
- "name": "flash/geom/Transform",
- "defs": [
- "flash.geom:Transform"
- ],
- "offset": 64965,
- "length": 553
- },
- {
- "name": "flash/geom/Utils3D",
- "defs": [
- "flash.geom:Utils3D"
- ],
- "offset": 65518,
- "length": 342
- },
- {
- "name": "flash/geom/Vector3D",
- "defs": [
- "flash.geom:Vector3D"
- ],
- "offset": 65860,
- "length": 830
- },
- {
- "name": "flash/filters/BevelFilter",
- "defs": [
- "flash.filters:BevelFilter"
- ],
- "offset": 66690,
- "length": 685
- },
- {
- "name": "flash/filters/BitmapFilter",
- "defs": [
- "flash.filters:BitmapFilter"
- ],
- "offset": 67375,
- "length": 209
- },
- {
- "name": "flash/filters/BitmapFilterQuality",
- "defs": [
- "flash.filters:BitmapFilterQuality"
- ],
- "offset": 67584,
- "length": 256
- },
- {
- "name": "flash/filters/BitmapFilterType",
- "defs": [
- "flash.filters:BitmapFilterType"
- ],
- "offset": 67840,
- "length": 268
- },
- {
- "name": "flash/filters/BlurFilter",
- "defs": [
- "flash.filters:BlurFilter"
- ],
- "offset": 68108,
- "length": 342
- },
- {
- "name": "flash/filters/ColorMatrixFilter",
- "defs": [
- "flash.filters:ColorMatrixFilter"
- ],
- "offset": 68450,
- "length": 294
- },
- {
- "name": "flash/filters/ConvolutionFilter",
- "defs": [
- "flash.filters:ConvolutionFilter"
- ],
- "offset": 68744,
- "length": 570
- },
- {
- "name": "flash/filters/DisplacementMapFilter",
- "defs": [
- "flash.filters:DisplacementMapFilter"
- ],
- "offset": 69314,
- "length": 632
- },
- {
- "name": "flash/filters/DisplacementMapFilterMode",
- "defs": [
- "flash.filters:DisplacementMapFilterMode"
- ],
- "offset": 69946,
- "length": 315
- },
- {
- "name": "flash/filters/DropShadowFilter",
- "defs": [
- "flash.filters:DropShadowFilter"
- ],
- "offset": 70261,
- "length": 627
- },
- {
- "name": "flash/filters/GlowFilter",
- "defs": [
- "flash.filters:GlowFilter"
- ],
- "offset": 70888,
- "length": 517
- },
- {
- "name": "flash/filters/GradientBevelFilter",
- "defs": [
- "flash.filters:GradientBevelFilter"
- ],
- "offset": 71405,
- "length": 649
- },
- {
- "name": "flash/filters/GradientGlowFilter",
- "defs": [
- "flash.filters:GradientGlowFilter"
- ],
- "offset": 72054,
- "length": 646
- },
- {
- "name": "flash/globalization/Collator",
- "defs": [
- "flash.globalization:Collator"
- ],
- "offset": 72700,
- "length": 692
- },
- {
- "name": "flash/globalization/CollatorMode",
- "defs": [
- "flash.globalization:CollatorMode"
- ],
- "offset": 73392,
- "length": 257
- },
- {
- "name": "flash/globalization/CurrencyFormatter",
- "defs": [
- "flash.globalization:CurrencyFormatter"
- ],
- "offset": 73649,
- "length": 1104
- },
- {
- "name": "flash/globalization/CurrencyParseResult",
- "defs": [
- "flash.globalization:CurrencyParseResult"
- ],
- "offset": 74753,
- "length": 350
- },
- {
- "name": "flash/globalization/DateTimeFormatter",
- "defs": [
- "flash.globalization:DateTimeFormatter"
- ],
- "offset": 75103,
- "length": 830
- },
- {
- "name": "flash/globalization/DateTimeNameContext",
- "defs": [
- "flash.globalization:DateTimeNameContext"
- ],
- "offset": 75933,
- "length": 273
- },
- {
- "name": "flash/globalization/DateTimeNameStyle",
- "defs": [
- "flash.globalization:DateTimeNameStyle"
- ],
- "offset": 76206,
- "length": 330
- },
- {
- "name": "flash/globalization/DateTimeStyle",
- "defs": [
- "flash.globalization:DateTimeStyle"
- ],
- "offset": 76536,
- "length": 330
- },
- {
- "name": "flash/globalization/LastOperationStatus",
- "defs": [
- "flash.globalization:LastOperationStatus"
- ],
- "offset": 76866,
- "length": 1104
- },
- {
- "name": "flash/globalization/LocaleID",
- "defs": [
- "flash.globalization:LocaleID"
- ],
- "offset": 77970,
- "length": 560
- },
- {
- "name": "flash/globalization/NationalDigitsType",
- "defs": [
- "flash.globalization:NationalDigitsType"
- ],
- "offset": 78530,
- "length": 1055
- },
- {
- "name": "flash/globalization/NumberFormatter",
- "defs": [
- "flash.globalization:NumberFormatter"
- ],
- "offset": 79585,
- "length": 946
- },
- {
- "name": "flash/globalization/NumberParseResult",
- "defs": [
- "flash.globalization:NumberParseResult"
- ],
- "offset": 80531,
- "length": 367
- },
- {
- "name": "flash/globalization/StringTools",
- "defs": [
- "flash.globalization:StringTools"
- ],
- "offset": 80898,
- "length": 460
- },
- {
- "name": "flash/media/AudioDecoder",
- "defs": [
- "flash.media:AudioDecoder"
- ],
- "offset": 81358,
- "length": 448
- },
- {
- "name": "flash/media/Camera",
- "defs": [
- "flash.media:Camera"
- ],
- "offset": 81806,
- "length": 1009
- },
- {
- "name": "flash/media/H264Level",
- "defs": [
- "flash.media:H264Level"
- ],
- "offset": 82815,
- "length": 613
- },
- {
- "name": "flash/media/H264Profile",
- "defs": [
- "flash.media:H264Profile"
- ],
- "offset": 83428,
- "length": 233
- },
- {
- "name": "flash/media/H264VideoStreamSettings",
- "defs": [
- "flash.media:H264VideoStreamSettings"
- ],
- "offset": 83661,
- "length": 1137
- },
- {
- "name": "flash/media/ID3Info",
- "defs": [
- "flash.media:ID3Info"
- ],
- "offset": 84798,
- "length": 300
- },
- {
- "name": "flash/media/Microphone",
- "defs": [
- "flash.media:Microphone"
- ],
- "offset": 85098,
- "length": 986
- },
- {
- "name": "flash/media/MicrophoneEnhancedMode",
- "defs": [
- "flash.media:MicrophoneEnhancedMode"
- ],
- "offset": 86084,
- "length": 367
- },
- {
- "name": "flash/media/MicrophoneEnhancedOptions",
- "defs": [
- "flash.media:MicrophoneEnhancedOptions"
- ],
- "offset": 86451,
- "length": 604
- },
- {
- "name": "flash/media/Sound",
- "defs": [
- "flash.media:Sound"
- ],
- "offset": 87055,
- "length": 726
- },
- {
- "name": "flash/media/SoundChannel",
- "defs": [
- "flash.media:SoundChannel"
- ],
- "offset": 87781,
- "length": 390
- },
- {
- "name": "flash/media/SoundCodec",
- "defs": [
- "flash.media:SoundCodec"
- ],
- "offset": 88171,
- "length": 287
- },
- {
- "name": "flash/media/SoundLoaderContext",
- "defs": [
- "flash.media:SoundLoaderContext"
- ],
- "offset": 88458,
- "length": 261
- },
- {
- "name": "flash/media/SoundMixer",
- "defs": [
- "flash.media:SoundMixer"
- ],
- "offset": 88719,
- "length": 513
- },
- {
- "name": "flash/media/SoundTransform",
- "defs": [
- "flash.media:SoundTransform"
- ],
- "offset": 89232,
- "length": 422
- },
- {
- "name": "flash/media/StageVideo",
- "defs": [
- "flash.media:StageVideo"
- ],
- "offset": 89654,
- "length": 570
- },
- {
- "name": "flash/media/StageVideoAvailability",
- "defs": [
- "flash.media:StageVideoAvailability"
- ],
- "offset": 90224,
- "length": 271
- },
- {
- "name": "flash/media/Video",
- "defs": [
- "flash.media:Video"
- ],
- "offset": 90495,
- "length": 494
- },
- {
- "name": "flash/media/VideoCodec",
- "defs": [
- "flash.media:VideoCodec"
- ],
- "offset": 90989,
- "length": 256
- },
- {
- "name": "flash/media/VideoStatus",
- "defs": [
- "flash.media:VideoStatus"
- ],
- "offset": 91245,
- "length": 286
- },
- {
- "name": "flash/media/VideoStreamSettings",
- "defs": [
- "flash.media:VideoStreamSettings"
- ],
- "offset": 91531,
- "length": 651
- },
- {
- "name": "flash/profiler/Telemetry",
- "defs": [
- "flash.profiler:Telemetry"
- ],
- "offset": 92182,
- "length": 422
- },
- {
- "name": "flash/printing/PrintJob",
- "defs": [
- "flash.printing:PrintJob"
- ],
- "offset": 92604,
- "length": 711
- },
- {
- "name": "flash/printing/PrintJobOptions",
- "defs": [
- "flash.printing:PrintJobOptions"
- ],
- "offset": 93315,
- "length": 216
- },
- {
- "name": "flash/printing/PrintJobOrientation",
- "defs": [
- "flash.printing:PrintJobOrientation"
- ],
- "offset": 93531,
- "length": 265
- },
- {
- "name": "flash/security/CertificateStatus",
- "defs": [
- "flash.security:CertificateStatus"
- ],
- "offset": 93796,
- "length": 533
- },
- {
- "name": "flash/security/X500DistinguishedName",
- "defs": [
- "flash.security:X500DistinguishedName"
- ],
- "offset": 94329,
- "length": 427
- },
- {
- "name": "flash/security/X509Certificate",
- "defs": [
- "flash.security:X509Certificate"
- ],
- "offset": 94756,
- "length": 635
- },
- {
- "name": "flash/sampler/ClassFactory",
- "defs": [
- "flash.sampler:ClassFactory"
- ],
- "offset": 95391,
- "length": 285
- },
- {
- "name": "flash/sampler/DeleteObjectSample",
- "defs": [
- "flash.sampler:DeleteObjectSample"
- ],
- "offset": 95676,
- "length": 233
- },
- {
- "name": "flash/sampler/NewObjectSample",
- "defs": [
- "flash.sampler:NewObjectSample"
- ],
- "offset": 95909,
- "length": 308
- },
- {
- "name": "flash/sampler/Sample",
- "defs": [
- "flash.sampler:Sample"
- ],
- "offset": 96217,
- "length": 205
- },
- {
- "name": "flash/sampler/StackFrame",
- "defs": [
- "flash.sampler:StackFrame"
- ],
- "offset": 96422,
- "length": 310
- },
- {
- "name": "flash/system/ApplicationDomain",
- "defs": [
- "flash.system:ApplicationDomain"
- ],
- "offset": 96732,
- "length": 498
- },
- {
- "name": "flash/system/ApplicationInstaller",
- "defs": [
- "flash.system:ApplicationInstaller"
- ],
- "offset": 97230,
- "length": 426
- },
- {
- "name": "flash/system/AuthorizedFeatures",
- "defs": [
- "flash.system:AuthorizedFeatures"
- ],
- "offset": 97656,
- "length": 456
- },
- {
- "name": "flash/system/AuthorizedFeaturesLoader",
- "defs": [
- "flash.system:AuthorizedFeaturesLoader"
- ],
- "offset": 98112,
- "length": 398
- },
- {
- "name": "flash/system/Capabilities",
- "defs": [
- "flash.system:Capabilities"
- ],
- "offset": 98510,
- "length": 1133
- },
- {
- "name": "flash/system/DomainMemoryWithStage3D",
- "defs": [
- "flash.system:DomainMemoryWithStage3D"
- ],
- "offset": 99643,
- "length": 191
- },
- {
- "name": "flash/system/FSCommand",
- "defs": [
- "flash.system:FSCommand",
- "flash.system:fscommand"
- ],
- "offset": 99834,
- "length": 95
- },
- {
- "name": "flash/system/ImageDecodingPolicy",
- "defs": [
- "flash.system:ImageDecodingPolicy"
- ],
- "offset": 99929,
- "length": 257
- },
- {
- "name": "flash/system/IME",
- "defs": [
- "flash.system:IME"
- ],
- "offset": 100186,
- "length": 469
- },
- {
- "name": "flash/system/IMEConversionMode",
- "defs": [
- "flash.system:IMEConversionMode"
- ],
- "offset": 100655,
- "length": 432
- },
- {
- "name": "flash/system/JPEGLoaderContext",
- "defs": [
- "flash.system:JPEGLoaderContext"
- ],
- "offset": 101087,
- "length": 309
- },
- {
- "name": "flash/system/LoaderContext",
- "defs": [
- "flash.system:LoaderContext"
- ],
- "offset": 101396,
- "length": 480
- },
- {
- "name": "flash/system/MessageChannel",
- "defs": [
- "flash.system:MessageChannel"
- ],
- "offset": 101876,
- "length": 584
- },
- {
- "name": "flash/system/MessageChannelState",
- "defs": [
- "flash.system:MessageChannelState"
- ],
- "offset": 102460,
- "length": 278
- },
- {
- "name": "flash/system/Security",
- "defs": [
- "flash.system:Security"
- ],
- "offset": 102738,
- "length": 773
- },
- {
- "name": "flash/system/SecurityDomain",
- "defs": [
- "flash.system:SecurityDomain"
- ],
- "offset": 103511,
- "length": 221
- },
- {
- "name": "flash/system/SecurityPanel",
- "defs": [
- "flash.system:SecurityPanel"
- ],
- "offset": 103732,
- "length": 430
- },
- {
- "name": "flash/system/System",
- "defs": [
- "flash.system:System"
- ],
- "offset": 104162,
- "length": 602
- },
- {
- "name": "flash/system/SystemUpdater",
- "defs": [
- "flash.system:SystemUpdater"
- ],
- "offset": 104764,
- "length": 322
- },
- {
- "name": "flash/system/SystemUpdaterType",
- "defs": [
- "flash.system:SystemUpdaterType"
- ],
- "offset": 105086,
- "length": 241
- },
- {
- "name": "flash/system/TouchscreenType",
- "defs": [
- "flash.system:TouchscreenType"
- ],
- "offset": 105327,
- "length": 268
- },
- {
- "name": "flash/trace/Trace",
- "defs": [
- "flash.trace:Trace"
- ],
- "offset": 105595,
- "length": 488
- },
- {
- "name": "flash/ui/ContextMenu",
- "defs": [
- "flash.ui:ContextMenu"
- ],
- "offset": 106083,
- "length": 636
- },
- {
- "name": "flash/ui/ContextMenuBuiltInItems",
- "defs": [
- "flash.ui:ContextMenuBuiltInItems"
- ],
- "offset": 106719,
- "length": 467
- },
- {
- "name": "flash/ui/ContextMenuClipboardItems",
- "defs": [
- "flash.ui:ContextMenuClipboardItems"
- ],
- "offset": 107186,
- "length": 380
- },
- {
- "name": "flash/ui/ContextMenuItem",
- "defs": [
- "flash.ui:ContextMenuItem"
- ],
- "offset": 107566,
- "length": 458
- },
- {
- "name": "flash/ui/GameInput",
- "defs": [
- "flash.ui:GameInput"
- ],
- "offset": 108024,
- "length": 333
- },
- {
- "name": "flash/ui/GameInputControl",
- "defs": [
- "flash.ui:GameInputControl"
- ],
- "offset": 108357,
- "length": 458
- },
- {
- "name": "flash/ui/GameInputControlType",
- "defs": [
- "flash.ui:GameInputControlType"
- ],
- "offset": 108815,
- "length": 389
- },
- {
- "name": "flash/ui/GameInputDevice",
- "defs": [
- "flash.ui:GameInputDevice"
- ],
- "offset": 109204,
- "length": 623
- },
- {
- "name": "flash/ui/GameInputFinger",
- "defs": [
- "flash.ui:GameInputFinger"
- ],
- "offset": 109827,
- "length": 291
- },
- {
- "name": "flash/ui/GameInputHand",
- "defs": [
- "flash.ui:GameInputHand"
- ],
- "offset": 110118,
- "length": 256
- },
- {
- "name": "flash/ui/Keyboard",
- "defs": [
- "flash.ui:Keyboard"
- ],
- "offset": 110374,
- "length": 9336
- },
- {
- "name": "flash/ui/KeyboardType",
- "defs": [
- "flash.ui:KeyboardType"
- ],
- "offset": 119710,
- "length": 266
- },
- {
- "name": "flash/ui/KeyLocation",
- "defs": [
- "flash.ui:KeyLocation"
- ],
- "offset": 119976,
- "length": 273
- },
- {
- "name": "flash/ui/Mouse",
- "defs": [
- "flash.ui:Mouse"
- ],
- "offset": 120249,
- "length": 383
- },
- {
- "name": "flash/ui/MouseCursor",
- "defs": [
- "flash.ui:MouseCursor"
- ],
- "offset": 120632,
- "length": 302
- },
- {
- "name": "flash/ui/MouseCursorData",
- "defs": [
- "flash.ui:MouseCursorData"
- ],
- "offset": 120934,
- "length": 352
- },
- {
- "name": "flash/ui/Multitouch",
- "defs": [
- "flash.ui:Multitouch"
- ],
- "offset": 121286,
- "length": 435
- },
- {
- "name": "flash/ui/MultitouchInputMode",
- "defs": [
- "flash.ui:MultitouchInputMode"
- ],
- "offset": 121721,
- "length": 279
- },
- {
- "name": "flash/sensors/Accelerometer",
- "defs": [
- "flash.sensors:Accelerometer"
- ],
- "offset": 122000,
- "length": 357
- },
- {
- "name": "flash/sensors/Geolocation",
- "defs": [
- "flash.sensors:Geolocation"
- ],
- "offset": 122357,
- "length": 351
- },
- {
- "name": "flash/display3D/Context3D",
- "defs": [
- "flash.display3D:Context3D"
- ],
- "offset": 122708,
- "length": 2088
- },
- {
- "name": "flash/display3D/Context3DBlendFactor",
- "defs": [
- "flash.display3D:Context3DBlendFactor"
- ],
- "offset": 124796,
- "length": 681
- },
- {
- "name": "flash/display3D/Context3DClearMask",
- "defs": [
- "flash.display3D:Context3DClearMask"
- ],
- "offset": 125477,
- "length": 292
- },
- {
- "name": "flash/display3D/Context3DProfile",
- "defs": [
- "flash.display3D:Context3DProfile"
- ],
- "offset": 125769,
- "length": 282
- },
- {
- "name": "flash/display3D/Context3DProgramType",
- "defs": [
- "flash.display3D:Context3DProgramType"
- ],
- "offset": 126051,
- "length": 263
- },
- {
- "name": "flash/display3D/Context3DRenderMode",
- "defs": [
- "flash.display3D:Context3DRenderMode"
- ],
- "offset": 126314,
- "length": 257
- },
- {
- "name": "flash/display3D/Context3DCompareMode",
- "defs": [
- "flash.display3D:Context3DCompareMode"
- ],
- "offset": 126571,
- "length": 452
- },
- {
- "name": "flash/display3D/Context3DStencilAction",
- "defs": [
- "flash.display3D:Context3DStencilAction"
- ],
- "offset": 127023,
- "length": 499
- },
- {
- "name": "flash/display3D/Context3DTextureFormat",
- "defs": [
- "flash.display3D:Context3DTextureFormat"
- ],
- "offset": 127522,
- "length": 315
- },
- {
- "name": "flash/display3D/Context3DTriangleFace",
- "defs": [
- "flash.display3D:Context3DTriangleFace"
- ],
- "offset": 127837,
- "length": 323
- },
- {
- "name": "flash/display3D/Context3DVertexBufferFormat",
- "defs": [
- "flash.display3D:Context3DVertexBufferFormat"
- ],
- "offset": 128160,
- "length": 365
- },
- {
- "name": "flash/display3D/IndexBuffer3D",
- "defs": [
- "flash.display3D:IndexBuffer3D"
- ],
- "offset": 128525,
- "length": 364
- },
- {
- "name": "flash/display3D/Program3D",
- "defs": [
- "flash.display3D:Program3D"
- ],
- "offset": 128889,
- "length": 275
- },
- {
- "name": "flash/display3D/VertexBuffer3D",
- "defs": [
- "flash.display3D:VertexBuffer3D"
- ],
- "offset": 129164,
- "length": 367
- },
- {
- "name": "flash/display3D/textures/CubeTexture",
- "defs": [
- "flash.display3D.textures:CubeTexture"
- ],
- "offset": 129531,
- "length": 501
- },
- {
- "name": "flash/display3D/textures/Texture",
- "defs": [
- "flash.display3D.textures:Texture"
- ],
- "offset": 130032,
- "length": 487
- },
- {
- "name": "flash/display3D/textures/TextureBase",
- "defs": [
- "flash.display3D.textures:TextureBase"
- ],
- "offset": 130519,
- "length": 292
- },
- {
- "name": "flash/net/DynamicPropertyOutput",
- "defs": [
- "flash.net:DynamicPropertyOutput"
- ],
- "offset": 130811,
- "length": 308
- },
- {
- "name": "flash/net/FileFilter",
- "defs": [
- "flash.net:FileFilter"
- ],
- "offset": 131119,
- "length": 318
- },
- {
- "name": "flash/net/FileReference",
- "defs": [
- "flash.net:FileReference"
- ],
- "offset": 131437,
- "length": 666
- },
- {
- "name": "flash/net/FileReferenceList",
- "defs": [
- "flash.net:FileReferenceList"
- ],
- "offset": 132103,
- "length": 315
- },
- {
- "name": "flash/net/GroupSpecifier",
- "defs": [
- "flash.net:GroupSpecifier"
- ],
- "offset": 132418,
- "length": 1492
- },
- {
- "name": "flash/net/IDynamicPropertyOutput",
- "defs": [
- "flash.net:IDynamicPropertyOutput"
- ],
- "offset": 133910,
- "length": 197
- },
- {
- "name": "flash/net/IDynamicPropertyWriter",
- "defs": [
- "flash.net:IDynamicPropertyWriter"
- ],
- "offset": 134107,
- "length": 225
- },
- {
- "name": "flash/net/LocalConnection",
- "defs": [
- "flash.net:LocalConnection"
- ],
- "offset": 134332,
- "length": 469
- },
- {
- "name": "flash/net/NetConnection",
- "defs": [
- "flash.net:NetConnection"
- ],
- "offset": 134801,
- "length": 759
- },
- {
- "name": "flash/net/NetGroup",
- "defs": [
- "flash.net:NetGroup"
- ],
- "offset": 135560,
- "length": 1299
- },
- {
- "name": "flash/net/NetGroupInfo",
- "defs": [
- "flash.net:NetGroupInfo"
- ],
- "offset": 136859,
- "length": 768
- },
- {
- "name": "flash/net/NetGroupReceiveMode",
- "defs": [
- "flash.net:NetGroupReceiveMode"
- ],
- "offset": 137627,
- "length": 245
- },
- {
- "name": "flash/net/NetGroupReplicationStrategy",
- "defs": [
- "flash.net:NetGroupReplicationStrategy"
- ],
- "offset": 137872,
- "length": 283
- },
- {
- "name": "flash/net/NetGroupSendMode",
- "defs": [
- "flash.net:NetGroupSendMode"
- ],
- "offset": 138155,
- "length": 273
- },
- {
- "name": "flash/net/NetGroupSendResult",
- "defs": [
- "flash.net:NetGroupSendResult"
- ],
- "offset": 138428,
- "length": 270
- },
- {
- "name": "flash/net/NetMonitor",
- "defs": [
- "flash.net:NetMonitor"
- ],
- "offset": 138698,
- "length": 279
- },
- {
- "name": "flash/net/NetStream",
- "defs": [
- "flash.net:NetStream"
- ],
- "offset": 138977,
- "length": 3025
- },
- {
- "name": "flash/net/NetStreamAppendBytesAction",
- "defs": [
- "flash.net:NetStreamAppendBytesAction"
- ],
- "offset": 142002,
- "length": 315
- },
- {
- "name": "flash/net/NetStreamMulticastInfo",
- "defs": [
- "flash.net:NetStreamMulticastInfo"
- ],
- "offset": 142317,
- "length": 2712
- },
- {
- "name": "flash/net/NetStreamInfo",
- "defs": [
- "flash.net:NetStreamInfo"
- ],
- "offset": 145029,
- "length": 1958
- },
- {
- "name": "flash/net/NetStreamPlayOptions",
- "defs": [
- "flash.net:NetStreamPlayOptions"
- ],
- "offset": 146987,
- "length": 355
- },
- {
- "name": "flash/net/NetStreamPlayTransitions",
- "defs": [
- "flash.net:NetStreamPlayTransitions"
- ],
- "offset": 147342,
- "length": 406
- },
- {
- "name": "flash/net/ObjectEncoding",
- "defs": [
- "flash.net:ObjectEncoding"
- ],
- "offset": 147748,
- "length": 345
- },
- {
- "name": "flash/net/Responder",
- "defs": [
- "flash.net:Responder"
- ],
- "offset": 148093,
- "length": 239
- },
- {
- "name": "flash/net/SecureSocket",
- "defs": [
- "flash.net:SecureSocket"
- ],
- "offset": 148332,
- "length": 566
- },
- {
- "name": "flash/net/SharedObject",
- "defs": [
- "flash.net:SharedObject"
- ],
- "offset": 148898,
- "length": 699
- },
- {
- "name": "flash/net/SharedObjectFlushStatus",
- "defs": [
- "flash.net:SharedObjectFlushStatus"
- ],
- "offset": 149597,
- "length": 257
- },
- {
- "name": "flash/net/URLLoader",
- "defs": [
- "flash.net:URLLoader"
- ],
- "offset": 149854,
- "length": 435
- },
- {
- "name": "flash/net/Socket",
- "defs": [
- "flash.net:Socket"
- ],
- "offset": 150289,
- "length": 1282
- },
- {
- "name": "flash/net/URLLoaderDataFormat",
- "defs": [
- "flash.net:URLLoaderDataFormat"
- ],
- "offset": 151571,
- "length": 276
- },
- {
- "name": "flash/net/URLRequest",
- "defs": [
- "flash.net:URLRequest"
- ],
- "offset": 151847,
- "length": 379
- },
- {
- "name": "flash/net/URLRequestHeader",
- "defs": [
- "flash.net:URLRequestHeader"
- ],
- "offset": 152226,
- "length": 223
- },
- {
- "name": "flash/net/URLStream",
- "defs": [
- "flash.net:URLStream"
- ],
- "offset": 152449,
- "length": 894
- },
- {
- "name": "flash/net/URLRequestMethod",
- "defs": [
- "flash.net:URLRequestMethod"
- ],
- "offset": 153343,
- "length": 304
- },
- {
- "name": "flash/net/URLVariables",
- "defs": [
- "flash.net:URLVariables"
- ],
- "offset": 153647,
- "length": 245
- },
- {
- "name": "flash/net/XMLSocket",
- "defs": [
- "flash.net:XMLSocket"
- ],
- "offset": 153892,
- "length": 480
- },
- {
- "name": "flash/text/AntiAliasType",
- "defs": [
- "flash.text:AntiAliasType"
- ],
- "offset": 154372,
- "length": 239
- },
- {
- "name": "flash/text/CSMSettings",
- "defs": [
- "flash.text:CSMSettings"
- ],
- "offset": 154611,
- "length": 248
- },
- {
- "name": "flash/text/Font",
- "defs": [
- "flash.text:Font"
- ],
- "offset": 154859,
- "length": 361
- },
- {
- "name": "flash/text/FontStyle",
- "defs": [
- "flash.text:FontStyle"
- ],
- "offset": 155220,
- "length": 292
- },
- {
- "name": "flash/text/FontType",
- "defs": [
- "flash.text:FontType"
- ],
- "offset": 155512,
- "length": 269
- },
- {
- "name": "flash/text/GridFitType",
- "defs": [
- "flash.text:GridFitType"
- ],
- "offset": 155781,
- "length": 258
- },
- {
- "name": "flash/text/StaticText",
- "defs": [
- "flash.text:StaticText"
- ],
- "offset": 156039,
- "length": 299
- },
- {
- "name": "flash/text/StyleSheet",
- "defs": [
- "flash.text:StyleSheet"
- ],
- "offset": 156338,
- "length": 386
- },
- {
- "name": "flash/text/TextColorType",
- "defs": [
- "flash.text:TextColorType"
- ],
- "offset": 156724,
- "length": 241
- },
- {
- "name": "flash/text/TextDisplayMode",
- "defs": [
- "flash.text:TextDisplayMode"
- ],
- "offset": 156965,
- "length": 258
- },
- {
- "name": "flash/text/TextField",
- "defs": [
- "flash.text:TextField"
- ],
- "offset": 157223,
- "length": 2296
- },
- {
- "name": "flash/text/TextFieldAutoSize",
- "defs": [
- "flash.text:TextFieldAutoSize"
- ],
- "offset": 159519,
- "length": 291
- },
- {
- "name": "flash/text/TextFieldType",
- "defs": [
- "flash.text:TextFieldType"
- ],
- "offset": 159810,
- "length": 235
- },
- {
- "name": "flash/text/TextFormat",
- "defs": [
- "flash.text:TextFormat"
- ],
- "offset": 160045,
- "length": 778
- },
- {
- "name": "flash/text/TextFormatAlign",
- "defs": [
- "flash.text:TextFormatAlign"
- ],
- "offset": 160823,
- "length": 343
- },
- {
- "name": "flash/text/TextFormatDisplay",
- "defs": [
- "flash.text:TextFormatDisplay"
- ],
- "offset": 161166,
- "length": 241
- },
- {
- "name": "flash/text/TextInteractionMode",
- "defs": [
- "flash.text:TextInteractionMode"
- ],
- "offset": 161407,
- "length": 253
- },
- {
- "name": "flash/text/TextLineMetrics",
- "defs": [
- "flash.text:TextLineMetrics"
- ],
- "offset": 161660,
- "length": 300
- },
- {
- "name": "flash/text/TextRenderer",
- "defs": [
- "flash.text:TextRenderer"
- ],
- "offset": 161960,
- "length": 373
- },
- {
- "name": "flash/text/TextRun",
- "defs": [
- "flash.text:TextRun"
- ],
- "offset": 162333,
- "length": 294
- },
- {
- "name": "flash/text/TextSnapshot",
- "defs": [
- "flash.text:TextSnapshot"
- ],
- "offset": 162627,
- "length": 513
- },
- {
- "name": "flash/text/engine/BreakOpportunity",
- "defs": [
- "flash.text.engine:BreakOpportunity"
- ],
- "offset": 163140,
- "length": 293
- },
- {
- "name": "flash/text/engine/CFFHinting",
- "defs": [
- "flash.text.engine:CFFHinting"
- ],
- "offset": 163433,
- "length": 256
- },
- {
- "name": "flash/text/engine/ContentElement",
- "defs": [
- "flash.text.engine:ContentElement"
- ],
- "offset": 163689,
- "length": 624
- },
- {
- "name": "flash/text/engine/DigitCase",
- "defs": [
- "flash.text.engine:DigitCase"
- ],
- "offset": 164313,
- "length": 277
- },
- {
- "name": "flash/text/engine/DigitWidth",
- "defs": [
- "flash.text.engine:DigitWidth"
- ],
- "offset": 164590,
- "length": 288
- },
- {
- "name": "flash/text/engine/EastAsianJustifier",
- "defs": [
- "flash.text.engine:EastAsianJustifier"
- ],
- "offset": 164878,
- "length": 495
- },
- {
- "name": "flash/text/engine/ElementFormat",
- "defs": [
- "flash.text.engine:ElementFormat"
- ],
- "offset": 165373,
- "length": 1204
- },
- {
- "name": "flash/text/engine/FontDescription",
- "defs": [
- "flash.text.engine:FontDescription"
- ],
- "offset": 166577,
- "length": 672
- },
- {
- "name": "flash/text/engine/FontLookup",
- "defs": [
- "flash.text.engine:FontLookup"
- ],
- "offset": 167249,
- "length": 254
- },
- {
- "name": "flash/text/engine/FontMetrics",
- "defs": [
- "flash.text.engine:FontMetrics"
- ],
- "offset": 167503,
- "length": 512
- },
- {
- "name": "flash/text/engine/FontPosture",
- "defs": [
- "flash.text.engine:FontPosture"
- ],
- "offset": 168015,
- "length": 245
- },
- {
- "name": "flash/text/engine/FontWeight",
- "defs": [
- "flash.text.engine:FontWeight"
- ],
- "offset": 168260,
- "length": 239
- },
- {
- "name": "flash/text/engine/GraphicElement",
- "defs": [
- "flash.text.engine:GraphicElement"
- ],
- "offset": 168499,
- "length": 497
- },
- {
- "name": "flash/text/engine/GroupElement",
- "defs": [
- "flash.text.engine:GroupElement"
- ],
- "offset": 168996,
- "length": 714
- },
- {
- "name": "flash/text/engine/JustificationStyle",
- "defs": [
- "flash.text.engine:JustificationStyle"
- ],
- "offset": 169710,
- "length": 356
- },
- {
- "name": "flash/text/engine/Kerning",
- "defs": [
- "flash.text.engine:Kerning"
- ],
- "offset": 170066,
- "length": 248
- },
- {
- "name": "flash/text/engine/LigatureLevel",
- "defs": [
- "flash.text.engine:LigatureLevel"
- ],
- "offset": 170314,
- "length": 338
- },
- {
- "name": "flash/text/engine/LineJustification",
- "defs": [
- "flash.text.engine:LineJustification"
- ],
- "offset": 170652,
- "length": 388
- },
- {
- "name": "flash/text/engine/RenderingMode",
- "defs": [
- "flash.text.engine:RenderingMode"
- ],
- "offset": 171040,
- "length": 243
- },
- {
- "name": "flash/text/engine/SpaceJustifier",
- "defs": [
- "flash.text.engine:SpaceJustifier"
- ],
- "offset": 171283,
- "length": 527
- },
- {
- "name": "flash/text/engine/TabAlignment",
- "defs": [
- "flash.text.engine:TabAlignment"
- ],
- "offset": 171810,
- "length": 299
- },
- {
- "name": "flash/text/engine/TabStop",
- "defs": [
- "flash.text.engine:TabStop"
- ],
- "offset": 172109,
- "length": 357
- },
- {
- "name": "flash/text/engine/TextBaseline",
- "defs": [
- "flash.text.engine:TextBaseline"
- ],
- "offset": 172466,
- "length": 483
- },
- {
- "name": "flash/text/engine/TextBlock",
- "defs": [
- "flash.text.engine:TextBlock"
- ],
- "offset": 172949,
- "length": 2184
- },
- {
- "name": "flash/text/engine/TextElement",
- "defs": [
- "flash.text.engine:TextElement"
- ],
- "offset": 175133,
- "length": 383
- },
- {
- "name": "flash/text/engine/TextJustifier",
- "defs": [
- "flash.text.engine:TextJustifier"
- ],
- "offset": 175516,
- "length": 774
- },
- {
- "name": "flash/text/engine/TextLine",
- "defs": [
- "flash.text.engine:TextLine"
- ],
- "offset": 176290,
- "length": 2027
- },
- {
- "name": "flash/text/engine/TextLineCreationResult",
- "defs": [
- "flash.text.engine:TextLineCreationResult"
- ],
- "offset": 178317,
- "length": 360
- },
- {
- "name": "flash/text/engine/TextLineMirrorRegion",
- "defs": [
- "flash.text.engine:TextLineMirrorRegion"
- ],
- "offset": 178677,
- "length": 451
- },
- {
- "name": "flash/text/engine/TextLineValidity",
- "defs": [
- "flash.text.engine:TextLineValidity"
- ],
- "offset": 179128,
- "length": 332
- },
- {
- "name": "flash/text/engine/TextRotation",
- "defs": [
- "flash.text.engine:TextRotation"
- ],
- "offset": 179460,
- "length": 352
- },
- {
- "name": "flash/text/engine/TypographicCase",
- "defs": [
- "flash.text.engine:TypographicCase"
- ],
- "offset": 179812,
- "length": 436
- },
- {
- "name": "flash/text/ime/CompositionAttributeRange",
- "defs": [
- "flash.text.ime:CompositionAttributeRange"
- ],
- "offset": 180248,
- "length": 315
- },
- {
- "name": "flash/text/ime/IIMEClient",
- "defs": [
- "flash.text.ime:IIMEClient"
- ],
- "offset": 180563,
- "length": 525
- },
- {
- "name": "flash/net/FlashNetScript",
- "defs": [
- "flash.net:navigateToURL",
- "flash.net:sendToURL",
- "flash.net:registerClassAlias",
- "flash.net:getClassByAlias"
- ],
- "offset": 181088,
- "length": 343
- },
- {
- "name": "flash/utils/FlashUtilScript",
- "defs": [
- "flash.utils:describeType",
- "flash.utils:getAliasName",
- "flash.utils:getQualifiedClassName",
- "flash.utils:getDefinitionByName",
- "flash.utils:getQualifiedSuperclassName",
- "flash.utils:getTimer",
- "flash.utils:escapeMultiByte",
- "flash.utils:unescapeMultiByte"
- ],
- "offset": 181431,
- "length": 545
- },
- {
- "name": "flash/utils/Endian",
- "defs": [
- "flash.utils:Endian"
- ],
- "offset": 181976,
- "length": 243
- },
- {
- "name": "flash/utils/IExternalizable",
- "defs": [
- "flash.utils:IExternalizable"
- ],
- "offset": 182219,
- "length": 223
- },
- {
- "name": "flash/utils/Timer",
- "defs": [
- "flash.utils:Timer"
- ],
- "offset": 182442,
- "length": 400
- },
- {
- "name": "flash/utils/SetIntervalTimer",
- "defs": [
- "flash.utils:SetIntervalTimer",
- "flash.utils:setInterval",
- "flash.utils:setTimeout",
- "flash.utils:clearInterval",
- "flash.utils:clearTimeout"
- ],
- "offset": 182842,
- "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
deleted file mode 100644
index e67d8785efbc..000000000000
--- a/browser/extensions/shumway/content/shumway.gfx.js
+++ /dev/null
@@ -1,13581 +0,0 @@
-/*
-
- Copyright 2014 Mozilla Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-console.time("Load Shared Dependencies");
-var Shumway, Shumway$$inline_0 = Shumway || (Shumway = {});
-Shumway$$inline_0.version = "0.11.422";
-Shumway$$inline_0.build = "137ba70";
-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 = function() {
- return Date.now();
-});
-function lazyInitializer(k, p, u) {
- Object.defineProperty(k, p, {get:function() {
- var a = u();
- Object.defineProperty(k, p, {value:a, configurable:!0, enumerable:!0});
- return a;
- }, configurable:!0, enumerable:!0});
-}
-var START_TIME = performance.now();
-(function(k) {
- function p(e) {
- return (e | 0) === e;
- }
- function u(e) {
- return "object" === typeof e || "function" === typeof e;
- }
- function a(e) {
- return String(Number(e)) === e;
- }
- function w(e) {
- var g = 0;
- if ("number" === typeof e) {
- return g = e | 0, e === g && 0 <= g ? !0 : e >>> 0 === e;
- }
- if ("string" !== typeof e) {
- return !1;
- }
- var d = e.length;
- if (0 === d) {
- return !1;
- }
- if ("0" === e) {
- return !0;
- }
- if (d > k.UINT32_CHAR_BUFFER_LENGTH) {
- return !1;
- }
- var c = 0, g = e.charCodeAt(c++) - 48;
- if (1 > g || 9 < g) {
- return !1;
- }
- for (var f = 0, y = 0;c < d;) {
- y = e.charCodeAt(c++) - 48;
- if (0 > y || 9 < y) {
- return !1;
- }
- f = g;
- g = 10 * g + y;
- }
- return f < k.UINT32_MAX_DIV_10 || f === k.UINT32_MAX_DIV_10 && y <= k.UINT32_MAX_MOD_10 ? !0 : !1;
- }
- (function(e) {
- e[e._0 = 48] = "_0";
- e[e._1 = 49] = "_1";
- e[e._2 = 50] = "_2";
- e[e._3 = 51] = "_3";
- e[e._4 = 52] = "_4";
- e[e._5 = 53] = "_5";
- e[e._6 = 54] = "_6";
- e[e._7 = 55] = "_7";
- e[e._8 = 56] = "_8";
- e[e._9 = 57] = "_9";
- })(k.CharacterCodes || (k.CharacterCodes = {}));
- k.UINT32_CHAR_BUFFER_LENGTH = 10;
- k.UINT32_MAX = 4294967295;
- k.UINT32_MAX_DIV_10 = 429496729;
- k.UINT32_MAX_MOD_10 = 5;
- k.isString = function(e) {
- return "string" === typeof e;
- };
- k.isFunction = function(e) {
- return "function" === typeof e;
- };
- k.isNumber = function(e) {
- return "number" === typeof e;
- };
- k.isInteger = p;
- k.isArray = function(e) {
- return e instanceof Array;
- };
- k.isNumberOrString = function(e) {
- return "number" === typeof e || "string" === typeof e;
- };
- k.isObject = u;
- k.toNumber = function(e) {
- return +e;
- };
- k.isNumericString = a;
- k.isNumeric = function(e) {
- if ("number" === typeof e) {
- return !0;
- }
- if ("string" === typeof e) {
- var g = e.charCodeAt(0);
- return 65 <= g && 90 >= g || 97 <= g && 122 >= g || 36 === g || 95 === g ? !1 : w(e) || a(e);
- }
- return !1;
- };
- k.isIndex = w;
- k.isNullOrUndefined = function(e) {
- return void 0 == e;
- };
- k.argumentsToString = function(e) {
- for (var g = [], d = 0;d < e.length;d++) {
- var c = e[d];
- try {
- var f;
- f = "object" === typeof c && c ? "toString" in c ? c.toString() : Object.prototype.toString.call(c) : c + "";
- g.push(f);
- } catch (y) {
- g.push("");
- }
- }
- return g.join(", ");
- };
- var m;
- (function(e) {
- e.error = function(c) {
- console.error(c);
- throw Error(c);
- };
- e.assert = function(c, f) {
- void 0 === f && (f = "assertion failed");
- "" === c && (c = !0);
- if (!c) {
- if ("undefined" !== typeof console && "assert" in console) {
- throw console.assert(!1, f), Error(f);
- }
- e.error(f.toString());
- }
- };
- e.assertUnreachable = function(c) {
- var f = Error().stack.split("\n")[1];
- throw Error("Reached unreachable location " + f + c);
- };
- e.assertNotImplemented = function(c, f) {
- c || e.error("notImplemented: " + f);
- };
- var g = Object.create(null);
- e.warning = function(c, f, d) {
- };
- e.warnCounts = function() {
- var c = [], f;
- for (f in g) {
- c.push({key:f, count:g[f]});
- }
- c.sort(function(f, c) {
- return c.count - f.count;
- });
- return c.reduce(function(f, c) {
- return f + ("\n" + c.count + "\t" + c.key);
- }, "");
- };
- e.notUsed = function(c) {
- };
- e.notImplemented = function(c) {
- };
- e.dummyConstructor = function(c) {
- };
- e.abstractMethod = function(c) {
- };
- var d = {};
- e.somewhatImplemented = function(c) {
- d[c] || (d[c] = !0, e.warning("somewhatImplemented: " + c));
- };
- e.unexpected = function(c) {
- e.assert(!1, "Unexpected: " + c);
- };
- e.unexpectedCase = function(c) {
- e.assert(!1, "Unexpected Case: " + c);
- };
- })(m = k.Debug || (k.Debug = {}));
- k.getTicks = function() {
- return performance.now();
- };
- (function(e) {
- function g(c, f) {
- for (var d = 0, x = c.length;d < x;d++) {
- if (c[d] === f) {
- return d;
- }
- }
- c.push(f);
- return c.length - 1;
- }
- e.popManyInto = function(c, f, d) {
- for (var x = f - 1;0 <= x;x--) {
- d[x] = c.pop();
- }
- d.length = f;
- };
- e.popMany = function(c, f) {
- var d = c.length - f, x = c.slice(d, this.length);
- c.length = d;
- return x;
- };
- e.popManyIntoVoid = function(c, f) {
- c.length -= f;
- };
- e.pushMany = function(c, f) {
- for (var d = 0;d < f.length;d++) {
- c.push(f[d]);
- }
- };
- e.top = function(c) {
- return c.length && c[c.length - 1];
- };
- e.last = function(c) {
- return c.length && c[c.length - 1];
- };
- e.peek = function(c) {
- return c[c.length - 1];
- };
- e.indexOf = function(c, f) {
- for (var d = 0, x = c.length;d < x;d++) {
- if (c[d] === f) {
- return d;
- }
- }
- return -1;
- };
- e.equals = function(c, f) {
- if (c.length !== f.length) {
- return !1;
- }
- for (var d = 0;d < c.length;d++) {
- if (c[d] !== f[d]) {
- return !1;
- }
- }
- return !0;
- };
- e.pushUnique = g;
- e.unique = function(c) {
- for (var f = [], d = 0;d < c.length;d++) {
- g(f, c[d]);
- }
- return f;
- };
- e.copyFrom = function(c, f) {
- c.length = 0;
- e.pushMany(c, f);
- };
- e.ensureTypedArrayCapacity = function(c, f) {
- if (c.length < f) {
- var d = c;
- c = new c.constructor(k.IntegerUtilities.nearestPowerOfTwo(f));
- c.set(d, 0);
- }
- return c;
- };
- e.memCopy = function(c, f, d, x, g) {
- void 0 === d && (d = 0);
- void 0 === x && (x = 0);
- void 0 === g && (g = 0);
- 0 < x || 0 < g && g < f.length ? (0 >= g && (g = f.length - x), c.set(f.subarray(x, x + g), d)) : c.set(f, d);
- };
- var d = function() {
- function c(f) {
- void 0 === f && (f = 16);
- this._f32 = this._i32 = this._u16 = this._u8 = null;
- this._offset = 0;
- this.ensureCapacity(f);
- }
- c.prototype.reset = function() {
- this._offset = 0;
- };
- Object.defineProperty(c.prototype, "offset", {get:function() {
- return this._offset;
- }, enumerable:!0, configurable:!0});
- c.prototype.getIndex = function(f) {
- return this._offset / f;
- };
- c.prototype.ensureAdditionalCapacity = function(f) {
- this.ensureCapacity(this._offset + f);
- };
- c.prototype.ensureCapacity = function(f) {
- if (!this._u8) {
- this._u8 = new Uint8Array(f);
- } else {
- if (this._u8.length > f) {
- return;
- }
- }
- var c = 2 * this._u8.length;
- c < f && (c = f);
- f = new Uint8Array(c);
- 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);
- };
- c.prototype.writeInt = function(f) {
- this.ensureCapacity(this._offset + 4);
- this.writeIntUnsafe(f);
- };
- c.prototype.writeIntAt = function(f, c) {
- this.ensureCapacity(c + 4);
- this._i32[c >> 2] = f;
- };
- c.prototype.writeIntUnsafe = function(f) {
- this._i32[this._offset >> 2] = f;
- this._offset += 4;
- };
- c.prototype.writeFloat = function(f) {
- this.ensureCapacity(this._offset + 4);
- this.writeFloatUnsafe(f);
- };
- c.prototype.writeFloatUnsafe = function(f) {
- this._f32[this._offset >> 2] = f;
- this._offset += 4;
- };
- c.prototype.write4Floats = function(f, c, d, g) {
- this.ensureCapacity(this._offset + 16);
- this.write4FloatsUnsafe(f, c, d, g);
- };
- c.prototype.write4FloatsUnsafe = function(f, c, d, g) {
- var e = this._offset >> 2;
- this._f32[e + 0] = f;
- this._f32[e + 1] = c;
- this._f32[e + 2] = d;
- this._f32[e + 3] = g;
- this._offset += 16;
- };
- c.prototype.write6Floats = function(f, c, d, g, e, b) {
- this.ensureCapacity(this._offset + 24);
- this.write6FloatsUnsafe(f, c, d, g, e, b);
- };
- c.prototype.write6FloatsUnsafe = function(f, c, d, g, e, b) {
- var a = this._offset >> 2;
- this._f32[a + 0] = f;
- this._f32[a + 1] = c;
- this._f32[a + 2] = d;
- this._f32[a + 3] = g;
- this._f32[a + 4] = e;
- this._f32[a + 5] = b;
- this._offset += 24;
- };
- c.prototype.subF32View = function() {
- return this._f32.subarray(0, this._offset >> 2);
- };
- c.prototype.subI32View = function() {
- return this._i32.subarray(0, this._offset >> 2);
- };
- c.prototype.subU16View = function() {
- return this._u16.subarray(0, this._offset >> 1);
- };
- c.prototype.subU8View = function() {
- return this._u8.subarray(0, this._offset);
- };
- c.prototype.hashWords = function(f, c, d) {
- c = this._i32;
- for (var g = 0;g < d;g++) {
- f = (31 * f | 0) + c[g] | 0;
- }
- return f;
- };
- c.prototype.reserve = function(f) {
- f = f + 3 & -4;
- this.ensureCapacity(this._offset + f);
- this._offset += f;
- };
- return c;
- }();
- e.ArrayWriter = d;
- })(k.ArrayUtilities || (k.ArrayUtilities = {}));
- var b = function() {
- function e(g) {
- this._u8 = new Uint8Array(g);
- this._u16 = new Uint16Array(g);
- this._i32 = new Int32Array(g);
- this._f32 = new Float32Array(g);
- this._offset = 0;
- }
- Object.defineProperty(e.prototype, "offset", {get:function() {
- return this._offset;
- }, enumerable:!0, configurable:!0});
- e.prototype.isEmpty = function() {
- return this._offset === this._u8.length;
- };
- e.prototype.readInt = function() {
- var g = this._i32[this._offset >> 2];
- this._offset += 4;
- return g;
- };
- e.prototype.readFloat = function() {
- var g = this._f32[this._offset >> 2];
- this._offset += 4;
- return g;
- };
- return e;
- }();
- k.ArrayReader = b;
- (function(e) {
- function g(c, f) {
- return Object.prototype.hasOwnProperty.call(c, f);
- }
- function d(c, f) {
- for (var d in f) {
- g(f, d) && (c[d] = f[d]);
- }
- }
- e.boxValue = function(c) {
- return void 0 == c || u(c) ? c : Object(c);
- };
- e.toKeyValueArray = function(c) {
- var f = Object.prototype.hasOwnProperty, d = [], g;
- for (g in c) {
- f.call(c, g) && d.push([g, c[g]]);
- }
- return d;
- };
- e.isPrototypeWriteable = function(c) {
- return Object.getOwnPropertyDescriptor(c, "prototype").writable;
- };
- e.hasOwnProperty = g;
- e.propertyIsEnumerable = function(c, f) {
- return Object.prototype.propertyIsEnumerable.call(c, f);
- };
- e.getPropertyDescriptor = function(c, f) {
- do {
- var d = Object.getOwnPropertyDescriptor(c, f);
- if (d) {
- return d;
- }
- c = Object.getPrototypeOf(c);
- } while (c);
- return null;
- };
- e.hasOwnGetter = function(c, f) {
- var d = Object.getOwnPropertyDescriptor(c, f);
- return !(!d || !d.get);
- };
- e.getOwnGetter = function(c, f) {
- var d = Object.getOwnPropertyDescriptor(c, f);
- return d ? d.get : null;
- };
- e.hasOwnSetter = function(c, f) {
- var d = Object.getOwnPropertyDescriptor(c, f);
- return !(!d || !d.set);
- };
- e.createMap = function() {
- return Object.create(null);
- };
- e.createArrayMap = function() {
- return [];
- };
- e.defineReadOnlyProperty = function(c, f, d) {
- Object.defineProperty(c, f, {value:d, writable:!1, configurable:!0, enumerable:!1});
- };
- e.getOwnPropertyDescriptors = function(c) {
- for (var f = e.createMap(), d = Object.getOwnPropertyNames(c), g = 0;g < d.length;g++) {
- f[d[g]] = Object.getOwnPropertyDescriptor(c, d[g]);
- }
- return f;
- };
- e.cloneObject = function(c) {
- var f = Object.create(Object.getPrototypeOf(c));
- d(f, c);
- return f;
- };
- e.copyProperties = function(c, f) {
- for (var d in f) {
- c[d] = f[d];
- }
- };
- e.copyOwnProperties = d;
- e.copyOwnPropertyDescriptors = function(c, f, d, e, b) {
- void 0 === d && (d = null);
- void 0 === e && (e = !0);
- void 0 === b && (b = !1);
- for (var a in f) {
- if (g(f, a) && (!d || d(a))) {
- var l = Object.getOwnPropertyDescriptor(f, a);
- if (e || !g(c, a)) {
- try {
- b && !1 === l.writable && (l.writable = !0), Object.defineProperty(c, a, l);
- } catch (h) {
- m.assert("Can't define: " + a);
- }
- }
- }
- }
- };
- e.copyPropertiesByList = function(c, f, d) {
- for (var g = 0;g < d.length;g++) {
- var e = d[g];
- c[e] = f[e];
- }
- };
- e.getLatestGetterOrSetterPropertyDescriptor = function(c, f) {
- for (var d = {};c;) {
- var g = Object.getOwnPropertyDescriptor(c, f);
- g && (d.get = d.get || g.get, d.set = d.set || g.set);
- if (d.get && d.set) {
- break;
- }
- c = Object.getPrototypeOf(c);
- }
- return d;
- };
- e.defineNonEnumerableGetterOrSetter = function(c, f, d, g) {
- var b = e.getLatestGetterOrSetterPropertyDescriptor(c, f);
- b.configurable = !0;
- b.enumerable = !1;
- g ? b.get = d : b.set = d;
- Object.defineProperty(c, f, b);
- };
- e.defineNonEnumerableGetter = function(c, f, d) {
- Object.defineProperty(c, f, {get:d, configurable:!0, enumerable:!1});
- };
- e.defineNonEnumerableSetter = function(c, f, d) {
- Object.defineProperty(c, f, {set:d, configurable:!0, enumerable:!1});
- };
- e.defineNonEnumerableProperty = function(c, f, d) {
- Object.defineProperty(c, f, {value:d, writable:!0, configurable:!0, enumerable:!1});
- };
- e.defineNonEnumerableForwardingProperty = function(c, f, d) {
- Object.defineProperty(c, f, {get:l.makeForwardingGetter(d), set:l.makeForwardingSetter(d), writable:!0, configurable:!0, enumerable:!1});
- };
- e.defineNewNonEnumerableProperty = function(c, f, d) {
- e.defineNonEnumerableProperty(c, f, d);
- };
- e.createPublicAliases = function(c, f) {
- for (var d = {value:null, writable:!0, configurable:!0, enumerable:!1}, g = 0;g < f.length;g++) {
- var e = f[g];
- d.value = c[e];
- Object.defineProperty(c, "$Bg" + e, d);
- }
- };
- })(k.ObjectUtilities || (k.ObjectUtilities = {}));
- var l;
- (function(e) {
- e.makeForwardingGetter = function(g) {
- return new Function('return this["' + g + '"]//# sourceURL=fwd-get-' + g + ".as");
- };
- e.makeForwardingSetter = function(g) {
- return new Function("value", 'this["' + g + '"] = value;//# sourceURL=fwd-set-' + g + ".as");
- };
- e.bindSafely = function(g, d) {
- function c() {
- return g.apply(d, arguments);
- }
- c.boundTo = d;
- return c;
- };
- })(l = k.FunctionUtilities || (k.FunctionUtilities = {}));
- (function(e) {
- function g(f) {
- return "string" === typeof f ? '"' + f + '"' : "number" === typeof f || "boolean" === typeof f ? String(f) : f instanceof Array ? "[] " + f.length : typeof f;
- }
- function d(c, d, g) {
- f[0] = c;
- f[1] = d;
- f[2] = g;
- return f.join("");
- }
- function c(f, c, d, g) {
- y[0] = f;
- y[1] = c;
- y[2] = d;
- y[3] = g;
- return y.join("");
- }
- e.repeatString = function(f, c) {
- for (var d = "", g = 0;g < c;g++) {
- d += f;
- }
- return d;
- };
- e.memorySizeToString = function(f) {
- f |= 0;
- return 1024 > f ? f + " B" : 1048576 > f ? (f / 1024).toFixed(2) + "KB" : (f / 1048576).toFixed(2) + "MB";
- };
- e.toSafeString = g;
- e.toSafeArrayString = function(f) {
- for (var c = [], d = 0;d < f.length;d++) {
- c.push(g(f[d]));
- }
- return c.join(", ");
- };
- e.utf8decode = function(f) {
- for (var c = new Uint8Array(4 * f.length), d = 0, g = 0, e = f.length;g < e;g++) {
- var x = f.charCodeAt(g);
- if (127 >= x) {
- c[d++] = x;
- } else {
- if (55296 <= x && 56319 >= x) {
- var y = f.charCodeAt(g + 1);
- 56320 <= y && 57343 >= y && (x = ((x & 1023) << 10) + (y & 1023) + 65536, ++g);
- }
- 0 !== (x & 4292870144) ? (c[d++] = 248 | x >>> 24 & 3, c[d++] = 128 | x >>> 18 & 63, c[d++] = 128 | x >>> 12 & 63, c[d++] = 128 | x >>> 6 & 63) : 0 !== (x & 4294901760) ? (c[d++] = 240 | x >>> 18 & 7, c[d++] = 128 | x >>> 12 & 63, c[d++] = 128 | x >>> 6 & 63) : 0 !== (x & 4294965248) ? (c[d++] = 224 | x >>> 12 & 15, c[d++] = 128 | x >>> 6 & 63) : c[d++] = 192 | x >>> 6 & 31;
- c[d++] = 128 | x & 63;
- }
- }
- return c.subarray(0, d);
- };
- e.utf8encode = function(f) {
- for (var c = 0, d = "";c < f.length;) {
- var g = f[c++] & 255;
- if (127 >= g) {
- d += String.fromCharCode(g);
- } else {
- var e = 192, x = 5;
- do {
- if ((g & (e >> 1 | 128)) === e) {
- break;
- }
- e = e >> 1 | 128;
- --x;
- } while (0 <= x);
- if (0 >= x) {
- d += String.fromCharCode(g);
- } else {
- for (var g = g & (1 << x) - 1, e = !1, y = 5;y >= x;--y) {
- var b = f[c++];
- if (128 != (b & 192)) {
- e = !0;
- break;
- }
- g = g << 6 | b & 63;
- }
- if (e) {
- for (x = c - (7 - y);x < c;++x) {
- d += String.fromCharCode(f[x] & 255);
- }
- } else {
- d = 65536 <= g ? d + String.fromCharCode(g - 65536 >> 10 & 1023 | 55296, g & 1023 | 56320) : d + String.fromCharCode(g);
- }
- }
- }
- }
- return d;
- };
- e.base64ArrayBuffer = function(f) {
- var g = "";
- f = new Uint8Array(f);
- for (var e = f.byteLength, x = e % 3, e = e - x, y, b, a, I, l = 0;l < e;l += 3) {
- I = f[l] << 16 | f[l + 1] << 8 | f[l + 2], y = (I & 16515072) >> 18, b = (I & 258048) >> 12, a = (I & 4032) >> 6, I &= 63, g += c("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[y], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[b], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I]);
- }
- 1 == x ? (I = f[e], g += d("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I & 252) >> 2], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I & 3) << 4], "==")) : 2 == x && (I = f[e] << 8 | f[e + 1], g += c("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I & 64512) >> 10], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I & 1008) >> 4], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I & 15) <<
- 2], "="));
- return g;
- };
- e.escapeString = function(f) {
- void 0 !== f && (f = f.replace(/[^\w$]/gi, "$"), /^\d/.test(f) && (f = "$" + f));
- return f;
- };
- e.fromCharCodeArray = function(f) {
- for (var c = "", d = 0;d < f.length;d += 16384) {
- var g = Math.min(f.length - d, 16384), c = c + String.fromCharCode.apply(null, f.subarray(d, d + g))
- }
- return c;
- };
- e.variableLengthEncodeInt32 = function(f) {
- for (var c = 32 - Math.clz32(f), d = Math.ceil(c / 6), c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[d], d = d - 1;0 <= d;d--) {
- c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[f >> 6 * d & 63];
- }
- return c;
- };
- e.toEncoding = function(f) {
- return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[f];
- };
- e.fromEncoding = function(f) {
- if (65 <= f && 90 >= f) {
- return f - 65;
- }
- if (97 <= f && 122 >= f) {
- return f - 71;
- }
- if (48 <= f && 57 >= f) {
- return f + 4;
- }
- if (36 === f) {
- return 62;
- }
- if (95 === f) {
- return 63;
- }
- };
- e.variableLengthDecodeInt32 = function(f) {
- for (var c = e.fromEncoding(f.charCodeAt(0)), d = 0, g = 0;g < c;g++) {
- var x = 6 * (c - g - 1), d = d | e.fromEncoding(f.charCodeAt(1 + g)) << x
- }
- return d;
- };
- e.trimMiddle = function(f, c) {
- if (f.length <= c) {
- return f;
- }
- var d = c >> 1, g = c - d - 1;
- return f.substr(0, d) + "\u2026" + f.substr(f.length - g, g);
- };
- e.multiple = function(f, c) {
- for (var d = "", g = 0;g < c;g++) {
- d += f;
- }
- return d;
- };
- e.indexOfAny = function(f, c, d) {
- for (var g = f.length, e = 0;e < c.length;e++) {
- var x = f.indexOf(c[e], d);
- 0 <= x && (g = Math.min(g, x));
- }
- return g === f.length ? -1 : g;
- };
- var f = Array(3), y = Array(4), x = Array(5), b = Array(6), a = Array(7), l = Array(8), h = Array(9);
- e.concat3 = d;
- e.concat4 = c;
- e.concat5 = function(f, c, d, g, e) {
- x[0] = f;
- x[1] = c;
- x[2] = d;
- x[3] = g;
- x[4] = e;
- return x.join("");
- };
- e.concat6 = function(f, c, d, g, e, x) {
- b[0] = f;
- b[1] = c;
- b[2] = d;
- b[3] = g;
- b[4] = e;
- b[5] = x;
- return b.join("");
- };
- e.concat7 = function(f, c, d, g, e, x, y) {
- a[0] = f;
- a[1] = c;
- a[2] = d;
- a[3] = g;
- a[4] = e;
- a[5] = x;
- a[6] = y;
- return a.join("");
- };
- e.concat8 = function(f, c, d, g, e, x, y, b) {
- l[0] = f;
- l[1] = c;
- l[2] = d;
- l[3] = g;
- l[4] = e;
- l[5] = x;
- l[6] = y;
- l[7] = b;
- return l.join("");
- };
- e.concat9 = function(f, c, d, g, e, x, y, b, a) {
- h[0] = f;
- h[1] = c;
- h[2] = d;
- h[3] = g;
- h[4] = e;
- h[5] = x;
- h[6] = y;
- h[7] = b;
- h[8] = a;
- return h.join("");
- };
- })(k.StringUtilities || (k.StringUtilities = {}));
- (function(e) {
- var g = 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]), d = 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]);
- e.hashBytesTo32BitsMD5 = function(c, f, e) {
- var x = 1732584193, b = -271733879, a = -1732584194, l = 271733878, h = e + 72 & -64, v = new Uint8Array(h), r;
- for (r = 0;r < e;++r) {
- v[r] = c[f++];
- }
- v[r++] = 128;
- for (c = h - 8;r < c;) {
- v[r++] = 0;
- }
- v[r++] = e << 3 & 255;
- v[r++] = e >> 5 & 255;
- v[r++] = e >> 13 & 255;
- v[r++] = e >> 21 & 255;
- v[r++] = e >>> 29 & 255;
- v[r++] = 0;
- v[r++] = 0;
- v[r++] = 0;
- c = new Int32Array(16);
- for (r = 0;r < h;) {
- for (e = 0;16 > e;++e, r += 4) {
- c[e] = v[r] | v[r + 1] << 8 | v[r + 2] << 16 | v[r + 3] << 24;
- }
- var n = x;
- f = b;
- var t = a, m = l, q, k;
- for (e = 0;64 > e;++e) {
- 16 > e ? (q = f & t | ~f & m, k = e) : 32 > e ? (q = m & f | ~m & t, k = 5 * e + 1 & 15) : 48 > e ? (q = f ^ t ^ m, k = 3 * e + 5 & 15) : (q = t ^ (f | ~m), k = 7 * e & 15);
- var w = m, n = n + q + d[e] + c[k] | 0;
- q = g[e];
- m = t;
- t = f;
- f = f + (n << q | n >>> 32 - q) | 0;
- n = w;
- }
- x = x + n | 0;
- b = b + f | 0;
- a = a + t | 0;
- l = l + m | 0;
- }
- return x;
- };
- e.hashBytesTo32BitsAdler = function(c, f, d) {
- var g = 1, e = 0;
- for (d = f + d;f < d;++f) {
- g = (g + (c[f] & 255)) % 65521, e = (e + g) % 65521;
- }
- return e << 16 | g;
- };
- e.mixHash = function(c, f) {
- return (31 * c | 0) + f | 0;
- };
- })(k.HashUtilities || (k.HashUtilities = {}));
- var r = function() {
- function e() {
- }
- e.seed = function(g) {
- e._state[0] = g;
- e._state[1] = g;
- };
- e.reset = function() {
- e._state[0] = 57005;
- e._state[1] = 48879;
- };
- e.next = function() {
- var g = this._state, d = Math.imul(18273, g[0] & 65535) + (g[0] >>> 16) | 0;
- g[0] = d;
- var c = Math.imul(36969, g[1] & 65535) + (g[1] >>> 16) | 0;
- g[1] = c;
- g = (d << 16) + (c & 65535) | 0;
- return 2.3283064365386963E-10 * (0 > g ? g + 4294967296 : g);
- };
- e._state = new Uint32Array([57005, 48879]);
- return e;
- }();
- k.Random = r;
- Math.random = function() {
- return r.next();
- };
- k.installTimeWarper = function() {
- var e = Date, g = 1428107694580;
- jsGlobal.Date = function(d, c, f, y, x, b, a) {
- switch(arguments.length) {
- case 0:
- return new e(g);
- case 1:
- return new e(d);
- case 2:
- return new e(d, c);
- case 3:
- return new e(d, c, f);
- case 4:
- return new e(d, c, f, y);
- case 5:
- return new e(d, c, f, y, x);
- case 6:
- return new e(d, c, f, y, x, b);
- default:
- return new e(d, c, f, y, x, b, a);
- }
- };
- jsGlobal.Date.now = function() {
- return g += 10;
- };
- jsGlobal.Date.UTC = function() {
- return e.UTC.apply(e, arguments);
- };
- };
- (function() {
- function e() {
- this.id = "$weakmap" + g++;
- }
- if ("function" !== typeof jsGlobal.WeakMap) {
- var g = 0;
- e.prototype = {has:function(d) {
- return d.hasOwnProperty(this.id);
- }, get:function(d, c) {
- return d.hasOwnProperty(this.id) ? d[this.id] : c;
- }, set:function(d, c) {
- Object.defineProperty(d, this.id, {value:c, enumerable:!1, configurable:!0});
- }, delete:function(d) {
- delete d[this.id];
- }};
- jsGlobal.WeakMap = e;
- }
- })();
- b = function() {
- function e() {
- "undefined" !== typeof ShumwayCom && ShumwayCom.getWeakMapKeys ? (this._map = new WeakMap, this._id = 0, this._newAdditions = []) : this._list = [];
- }
- e.prototype.clear = function() {
- this._map ? this._map = new WeakMap() : this._list.length = 0;
- };
- e.prototype.push = function(g) {
- this._map ? (this._map.set(g, this._id++), this._newAdditions.forEach(function(d) {
- d.push(g);
- })) : this._list.push(g);
- };
- e.prototype.remove = function(g) {
- this._map ? this._map.delete(g) : this._list[this._list.indexOf(g)] = null;
- };
- e.prototype.forEach = function(g) {
- if (this._map) {
- var d = [];
- this._newAdditions.push(d);
- var c = this._map, f = ShumwayCom.getWeakMapKeys(c);
- f.sort(function(f, d) {
- return c.get(f) - c.get(d);
- });
- f.forEach(function(f) {
- 0 !== f._referenceCount && g(f);
- });
- d.forEach(function(f) {
- 0 !== f._referenceCount && g(f);
- });
- this._newAdditions.splice(this._newAdditions.indexOf(d), 1);
- } else {
- for (var d = this._list, e = 0, f = 0;f < d.length;f++) {
- var x = d[f];
- x && (0 === x._referenceCount ? (d[f] = null, e++) : g(x));
- }
- if (16 < e && e > d.length >> 2) {
- e = [];
- for (f = 0;f < d.length;f++) {
- (x = d[f]) && 0 < x._referenceCount && e.push(x);
- }
- this._list = e;
- }
- }
- };
- Object.defineProperty(e.prototype, "length", {get:function() {
- return this._map ? -1 : this._list.length;
- }, enumerable:!0, configurable:!0});
- return e;
- }();
- k.WeakList = b;
- var h;
- (function(e) {
- e.pow2 = function(g) {
- return g === (g | 0) ? 0 > g ? 1 / (1 << -g) : 1 << g : Math.pow(2, g);
- };
- e.clamp = function(g, d, c) {
- return Math.max(d, Math.min(c, g));
- };
- e.roundHalfEven = function(g) {
- if (.5 === Math.abs(g % 1)) {
- var d = Math.floor(g);
- return 0 === d % 2 ? d : Math.ceil(g);
- }
- return Math.round(g);
- };
- e.altTieBreakRound = function(g, d) {
- return .5 !== Math.abs(g % 1) || d ? Math.round(g) : g | 0;
- };
- e.epsilonEquals = function(g, d) {
- return 1E-7 > Math.abs(g - d);
- };
- })(h = k.NumberUtilities || (k.NumberUtilities = {}));
- (function(e) {
- e[e.MaxU16 = 65535] = "MaxU16";
- e[e.MaxI16 = 32767] = "MaxI16";
- e[e.MinI16 = -32768] = "MinI16";
- })(k.Numbers || (k.Numbers = {}));
- var t;
- (function(e) {
- function g(f) {
- return 256 * f << 16 >> 16;
- }
- function d(f) {
- return f / 256;
- }
- var c = new ArrayBuffer(8);
- e.i8 = new Int8Array(c);
- e.u8 = new Uint8Array(c);
- e.i32 = new Int32Array(c);
- e.f32 = new Float32Array(c);
- e.f64 = new Float64Array(c);
- e.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
- e.floatToInt32 = function(f) {
- e.f32[0] = f;
- return e.i32[0];
- };
- e.int32ToFloat = function(f) {
- e.i32[0] = f;
- return e.f32[0];
- };
- e.swap16 = function(f) {
- return (f & 255) << 8 | f >> 8 & 255;
- };
- e.swap32 = function(f) {
- return (f & 255) << 24 | (f & 65280) << 8 | f >> 8 & 65280 | f >> 24 & 255;
- };
- e.toS8U8 = g;
- e.fromS8U8 = d;
- e.clampS8U8 = function(f) {
- return d(g(f));
- };
- e.toS16 = function(f) {
- return f << 16 >> 16;
- };
- e.bitCount = function(f) {
- f -= f >> 1 & 1431655765;
- f = (f & 858993459) + (f >> 2 & 858993459);
- return 16843009 * (f + (f >> 4) & 252645135) >> 24;
- };
- e.ones = function(f) {
- f -= f >> 1 & 1431655765;
- f = (f & 858993459) + (f >> 2 & 858993459);
- return 16843009 * (f + (f >> 4) & 252645135) >> 24;
- };
- e.trailingZeros = function(f) {
- return e.ones((f & -f) - 1);
- };
- e.getFlags = function(f, c) {
- var d = "";
- for (f = 0;f < c.length;f++) {
- f & 1 << f && (d += c[f] + " ");
- }
- return 0 === d.length ? "" : d.trim();
- };
- e.isPowerOfTwo = function(f) {
- return f && 0 === (f & f - 1);
- };
- e.roundToMultipleOfFour = function(f) {
- return f + 3 & -4;
- };
- e.nearestPowerOfTwo = function(f) {
- f--;
- f |= f >> 1;
- f |= f >> 2;
- f |= f >> 4;
- f |= f >> 8;
- f |= f >> 16;
- f++;
- return f;
- };
- e.roundToMultipleOfPowerOfTwo = function(f, c) {
- var d = (1 << c) - 1;
- return f + d & ~d;
- };
- e.toHEX = function(f) {
- return "0x" + ("00000000" + (0 > f ? 4294967295 + f + 1 : f).toString(16)).substr(-8);
- };
- Math.imul || (Math.imul = function(f, c) {
- var d = f & 65535, g = c & 65535;
- return d * g + ((f >>> 16 & 65535) * g + d * (c >>> 16 & 65535) << 16 >>> 0) | 0;
- });
- Math.clz32 || (Math.clz32 = function(f) {
- f |= f >> 1;
- f |= f >> 2;
- f |= f >> 4;
- f |= f >> 8;
- return 32 - e.ones(f | f >> 16);
- });
- })(t = k.IntegerUtilities || (k.IntegerUtilities = {}));
- (function(e) {
- function g(d, c, f, g, e, b) {
- return (f - d) * (b - c) - (g - c) * (e - d);
- }
- e.pointInPolygon = function(d, c, f) {
- for (var g = 0, e = f.length - 2, b = 0;b < e;b += 2) {
- var a = f[b + 0], l = f[b + 1], h = f[b + 2], v = f[b + 3];
- (l <= c && v > c || l > c && v <= c) && d < a + (c - l) / (v - l) * (h - a) && g++;
- }
- return 1 === (g & 1);
- };
- e.signedArea = g;
- e.counterClockwise = function(d, c, f, e, x, b) {
- return 0 < g(d, c, f, e, x, b);
- };
- e.clockwise = function(d, c, f, e, x, b) {
- return 0 > g(d, c, f, e, x, b);
- };
- e.pointInPolygonInt32 = function(d, c, f) {
- d |= 0;
- c |= 0;
- for (var g = 0, e = f.length - 2, b = 0;b < e;b += 2) {
- var a = f[b + 0], l = f[b + 1], h = f[b + 2], v = f[b + 3];
- (l <= c && v > c || l > c && v <= c) && d < a + (c - l) / (v - l) * (h - a) && g++;
- }
- return 1 === (g & 1);
- };
- })(k.GeometricUtilities || (k.GeometricUtilities = {}));
- (function(e) {
- e[e.Error = 1] = "Error";
- e[e.Warn = 2] = "Warn";
- e[e.Debug = 4] = "Debug";
- e[e.Log = 8] = "Log";
- e[e.Info = 16] = "Info";
- e[e.All = 31] = "All";
- })(k.LogLevel || (k.LogLevel = {}));
- b = function() {
- function e(g, d) {
- void 0 === g && (g = !1);
- this._tab = " ";
- this._padding = "";
- this._suppressOutput = g;
- this._out = d || e._consoleOut;
- this._outNoNewline = d || e._consoleOutNoNewline;
- }
- Object.defineProperty(e.prototype, "suppressOutput", {get:function() {
- return this._suppressOutput;
- }, set:function(g) {
- this._suppressOutput = g;
- }, enumerable:!0, configurable:!0});
- e.prototype.write = function(g, d) {
- void 0 === g && (g = "");
- void 0 === d && (d = !1);
- this._suppressOutput || this._outNoNewline((d ? this._padding : "") + g);
- };
- e.prototype.writeLn = function(g) {
- void 0 === g && (g = "");
- this._suppressOutput || this._out(this._padding + g);
- };
- e.prototype.writeObject = function(g, d) {
- void 0 === g && (g = "");
- this._suppressOutput || this._out(this._padding + g, d);
- };
- e.prototype.writeTimeLn = function(g) {
- void 0 === g && (g = "");
- this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + g);
- };
- e.prototype.writeComment = function(g) {
- g = (g || "").split("\n");
- if (1 === g.length) {
- this.writeLn("// " + g[0]);
- } else {
- this.writeLn("/**");
- for (var d = 0;d < g.length;d++) {
- this.writeLn(" * " + g[d]);
- }
- this.writeLn(" */");
- }
- };
- e.prototype.writeLns = function(g) {
- g = (g || "").split("\n");
- for (var d = 0;d < g.length;d++) {
- this.writeLn(g[d]);
- }
- };
- e.prototype.errorLn = function(g) {
- e.logLevel & 1 && this.boldRedLn(g);
- };
- e.prototype.warnLn = function(g) {
- e.logLevel & 2 && this.yellowLn(g);
- };
- e.prototype.debugLn = function(g) {
- e.logLevel & 4 && this.purpleLn(g);
- };
- e.prototype.logLn = function(g) {
- e.logLevel & 8 && this.writeLn(g);
- };
- e.prototype.infoLn = function(g) {
- e.logLevel & 16 && this.writeLn(g);
- };
- e.prototype.yellowLn = function(g) {
- this.colorLn(e.YELLOW, g);
- };
- e.prototype.greenLn = function(g) {
- this.colorLn(e.GREEN, g);
- };
- e.prototype.boldRedLn = function(g) {
- this.colorLn(e.BOLD_RED, g);
- };
- e.prototype.redLn = function(g) {
- this.colorLn(e.RED, g);
- };
- e.prototype.purpleLn = function(g) {
- this.colorLn(e.PURPLE, g);
- };
- e.prototype.colorLn = function(g, d) {
- this._suppressOutput || (inBrowser ? this._out(this._padding + d) : this._out(this._padding + g + d + e.ENDC));
- };
- e.prototype.redLns = function(g) {
- this.colorLns(e.RED, g);
- };
- e.prototype.colorLns = function(g, d) {
- for (var c = (d || "").split("\n"), f = 0;f < c.length;f++) {
- this.colorLn(g, c[f]);
- }
- };
- e.prototype.enter = function(g) {
- this._suppressOutput || this._out(this._padding + g);
- this.indent();
- };
- e.prototype.leaveAndEnter = function(g) {
- this.leave(g);
- this.indent();
- };
- e.prototype.leave = function(g) {
- this.outdent();
- !this._suppressOutput && g && this._out(this._padding + g);
- };
- e.prototype.indent = function() {
- this._padding += this._tab;
- };
- e.prototype.outdent = function() {
- 0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length));
- };
- e.prototype.writeArray = function(g, d, c) {
- void 0 === d && (d = !1);
- void 0 === c && (c = !1);
- d = d || !1;
- for (var f = 0, e = g.length;f < e;f++) {
- var x = "";
- d && (x = null === g[f] ? "null" : void 0 === g[f] ? "undefined" : g[f].constructor.name, x += " ");
- var b = c ? "" : ("" + f).padRight(" ", 4);
- this.writeLn(b + x + g[f]);
- }
- };
- e.PURPLE = "\u001b[94m";
- e.YELLOW = "\u001b[93m";
- e.GREEN = "\u001b[92m";
- e.RED = "\u001b[91m";
- e.BOLD_RED = "\u001b[1;91m";
- e.ENDC = "\u001b[0m";
- e.logLevel = 31;
- e._consoleOut = console.log.bind(console);
- e._consoleOutNoNewline = console.log.bind(console);
- return e;
- }();
- k.IndentingWriter = b;
- var q = function() {
- return function(e, g) {
- this.value = e;
- this.next = g;
- };
- }(), b = function() {
- function e(g) {
- this._compare = g;
- this._head = null;
- this._length = 0;
- }
- e.prototype.push = function(g) {
- this._length++;
- if (this._head) {
- var d = this._head, c = null;
- g = new q(g, null);
- for (var f = this._compare;d;) {
- if (0 < f(d.value, g.value)) {
- c ? (g.next = d, c.next = g) : (g.next = this._head, this._head = g);
- return;
- }
- c = d;
- d = d.next;
- }
- c.next = g;
- } else {
- this._head = new q(g, null);
- }
- };
- e.prototype.forEach = function(g) {
- for (var d = this._head, c = null;d;) {
- var f = g(d.value);
- if (f === e.RETURN) {
- break;
- } else {
- f === e.DELETE ? d = c ? c.next = d.next : this._head = this._head.next : (c = d, d = d.next);
- }
- }
- };
- e.prototype.isEmpty = function() {
- return !this._head;
- };
- e.prototype.pop = function() {
- if (this._head) {
- this._length--;
- var g = this._head;
- this._head = this._head.next;
- return g.value;
- }
- };
- e.prototype.contains = function(g) {
- for (var d = this._head;d;) {
- if (d.value === g) {
- return !0;
- }
- d = d.next;
- }
- return !1;
- };
- e.prototype.toString = function() {
- for (var g = "[", d = this._head;d;) {
- g += d.value.toString(), (d = d.next) && (g += ",");
- }
- return g + "]";
- };
- e.RETURN = 1;
- e.DELETE = 2;
- return e;
- }();
- k.SortedList = b;
- b = function() {
- function e(g, d) {
- void 0 === d && (d = 12);
- this.start = this.index = 0;
- this._size = 1 << d;
- this._mask = this._size - 1;
- this.array = new g(this._size);
- }
- e.prototype.get = function(g) {
- return this.array[g];
- };
- e.prototype.forEachInReverse = function(g) {
- if (!this.isEmpty()) {
- for (var d = 0 === this.index ? this._size - 1 : this.index - 1, c = this.start - 1 & this._mask;d !== c && !g(this.array[d], d);) {
- d = 0 === d ? this._size - 1 : d - 1;
- }
- }
- };
- e.prototype.write = function(g) {
- this.array[this.index] = g;
- this.index = this.index + 1 & this._mask;
- this.index === this.start && (this.start = this.start + 1 & this._mask);
- };
- e.prototype.isFull = function() {
- return (this.index + 1 & this._mask) === this.start;
- };
- e.prototype.isEmpty = function() {
- return this.index === this.start;
- };
- e.prototype.reset = function() {
- this.start = this.index = 0;
- };
- return e;
- }();
- k.CircularBuffer = b;
- (function(e) {
- function g(f) {
- return f + (e.BITS_PER_WORD - 1) >> e.ADDRESS_BITS_PER_WORD << e.ADDRESS_BITS_PER_WORD;
- }
- function d(f, c) {
- f = f || "1";
- c = c || "0";
- for (var d = "", g = 0;g < length;g++) {
- d += this.get(g) ? f : c;
- }
- return d;
- }
- function c(f) {
- for (var c = [], d = 0;d < length;d++) {
- this.get(d) && c.push(f ? f[d] : d);
- }
- return c.join(", ");
- }
- e.ADDRESS_BITS_PER_WORD = 5;
- e.BITS_PER_WORD = 1 << e.ADDRESS_BITS_PER_WORD;
- e.BIT_INDEX_MASK = e.BITS_PER_WORD - 1;
- var f = function() {
- function f(c) {
- this.size = g(c);
- this.dirty = this.count = 0;
- this.length = c;
- this.bits = new Uint32Array(this.size >> e.ADDRESS_BITS_PER_WORD);
- }
- f.prototype.recount = function() {
- if (this.dirty) {
- for (var f = this.bits, c = 0, d = 0, g = f.length;d < g;d++) {
- var e = f[d], e = e - (e >> 1 & 1431655765), e = (e & 858993459) + (e >> 2 & 858993459), c = c + (16843009 * (e + (e >> 4) & 252645135) >> 24)
- }
- this.count = c;
- this.dirty = 0;
- }
- };
- f.prototype.set = function(f) {
- var c = f >> e.ADDRESS_BITS_PER_WORD, d = this.bits[c];
- f = d | 1 << (f & e.BIT_INDEX_MASK);
- this.bits[c] = f;
- this.dirty |= d ^ f;
- };
- f.prototype.setAll = function() {
- for (var f = this.bits, c = 0, d = f.length;c < d;c++) {
- f[c] = 4294967295;
- }
- this.count = this.size;
- this.dirty = 0;
- };
- f.prototype.assign = function(f) {
- this.count = f.count;
- this.dirty = f.dirty;
- this.size = f.size;
- for (var c = 0, d = this.bits.length;c < d;c++) {
- this.bits[c] = f.bits[c];
- }
- };
- f.prototype.clear = function(f) {
- var c = f >> e.ADDRESS_BITS_PER_WORD, d = this.bits[c];
- f = d & ~(1 << (f & e.BIT_INDEX_MASK));
- this.bits[c] = f;
- this.dirty |= d ^ f;
- };
- f.prototype.get = function(f) {
- return 0 !== (this.bits[f >> e.ADDRESS_BITS_PER_WORD] & 1 << (f & e.BIT_INDEX_MASK));
- };
- f.prototype.clearAll = function() {
- for (var f = this.bits, c = 0, d = f.length;c < d;c++) {
- f[c] = 0;
- }
- this.dirty = this.count = 0;
- };
- f.prototype._union = function(f) {
- var c = this.dirty, d = this.bits;
- f = f.bits;
- for (var g = 0, e = d.length;g < e;g++) {
- var x = d[g], y = x | f[g];
- d[g] = y;
- c |= x ^ y;
- }
- this.dirty = c;
- };
- f.prototype.intersect = function(f) {
- var c = this.dirty, d = this.bits;
- f = f.bits;
- for (var g = 0, e = d.length;g < e;g++) {
- var x = d[g], y = x & f[g];
- d[g] = y;
- c |= x ^ y;
- }
- this.dirty = c;
- };
- f.prototype.subtract = function(f) {
- var c = this.dirty, d = this.bits;
- f = f.bits;
- for (var g = 0, e = d.length;g < e;g++) {
- var x = d[g], y = x & ~f[g];
- d[g] = y;
- c |= x ^ y;
- }
- this.dirty = c;
- };
- f.prototype.negate = function() {
- for (var f = this.dirty, c = this.bits, d = 0, g = c.length;d < g;d++) {
- var e = c[d], x = ~e;
- c[d] = x;
- f |= e ^ x;
- }
- this.dirty = f;
- };
- f.prototype.forEach = function(f) {
- for (var c = this.bits, d = 0, g = c.length;d < g;d++) {
- var x = c[d];
- if (x) {
- for (var y = 0;y < e.BITS_PER_WORD;y++) {
- x & 1 << y && f(d * e.BITS_PER_WORD + y);
- }
- }
- }
- };
- f.prototype.toArray = function() {
- for (var f = [], c = this.bits, d = 0, g = c.length;d < g;d++) {
- var x = c[d];
- if (x) {
- for (var y = 0;y < e.BITS_PER_WORD;y++) {
- x & 1 << y && f.push(d * e.BITS_PER_WORD + y);
- }
- }
- }
- return f;
- };
- f.prototype.equals = function(f) {
- if (this.size !== f.size) {
- return !1;
- }
- var c = this.bits;
- f = f.bits;
- for (var d = 0, g = c.length;d < g;d++) {
- if (c[d] !== f[d]) {
- return !1;
- }
- }
- return !0;
- };
- f.prototype.contains = function(f) {
- if (this.size !== f.size) {
- return !1;
- }
- var c = this.bits;
- f = f.bits;
- for (var d = 0, g = c.length;d < g;d++) {
- if ((c[d] | f[d]) !== c[d]) {
- return !1;
- }
- }
- return !0;
- };
- f.prototype.isEmpty = function() {
- this.recount();
- return 0 === this.count;
- };
- f.prototype.clone = function() {
- var c = new f(this.length);
- c._union(this);
- return c;
- };
- return f;
- }();
- e.Uint32ArrayBitSet = f;
- var y = function() {
- function f(c) {
- this.dirty = this.count = 0;
- this.size = g(c);
- this.bits = 0;
- this.singleWord = !0;
- this.length = c;
- }
- f.prototype.recount = function() {
- if (this.dirty) {
- var f = this.bits, f = f - (f >> 1 & 1431655765), f = (f & 858993459) + (f >> 2 & 858993459);
- this.count = 0 + (16843009 * (f + (f >> 4) & 252645135) >> 24);
- this.dirty = 0;
- }
- };
- f.prototype.set = function(f) {
- var c = this.bits;
- this.bits = f = c | 1 << (f & e.BIT_INDEX_MASK);
- this.dirty |= c ^ f;
- };
- f.prototype.setAll = function() {
- this.bits = 4294967295;
- this.count = this.size;
- this.dirty = 0;
- };
- f.prototype.assign = function(f) {
- this.count = f.count;
- this.dirty = f.dirty;
- this.size = f.size;
- this.bits = f.bits;
- };
- f.prototype.clear = function(f) {
- var c = this.bits;
- this.bits = f = c & ~(1 << (f & e.BIT_INDEX_MASK));
- this.dirty |= c ^ f;
- };
- f.prototype.get = function(f) {
- return 0 !== (this.bits & 1 << (f & e.BIT_INDEX_MASK));
- };
- f.prototype.clearAll = function() {
- this.dirty = this.count = this.bits = 0;
- };
- f.prototype._union = function(f) {
- var c = this.bits;
- this.bits = f = c | f.bits;
- this.dirty = c ^ f;
- };
- f.prototype.intersect = function(f) {
- var c = this.bits;
- this.bits = f = c & f.bits;
- this.dirty = c ^ f;
- };
- f.prototype.subtract = function(f) {
- var c = this.bits;
- this.bits = f = c & ~f.bits;
- this.dirty = c ^ f;
- };
- f.prototype.negate = function() {
- var f = this.bits, c = ~f;
- this.bits = c;
- this.dirty = f ^ c;
- };
- f.prototype.forEach = function(f) {
- var c = this.bits;
- if (c) {
- for (var d = 0;d < e.BITS_PER_WORD;d++) {
- c & 1 << d && f(d);
- }
- }
- };
- f.prototype.toArray = function() {
- var f = [], c = this.bits;
- if (c) {
- for (var d = 0;d < e.BITS_PER_WORD;d++) {
- c & 1 << d && f.push(d);
- }
- }
- return f;
- };
- f.prototype.equals = function(f) {
- return this.bits === f.bits;
- };
- f.prototype.contains = function(f) {
- var c = this.bits;
- return (c | f.bits) === c;
- };
- f.prototype.isEmpty = function() {
- this.recount();
- return 0 === this.count;
- };
- f.prototype.clone = function() {
- var c = new f(this.length);
- c._union(this);
- return c;
- };
- return f;
- }();
- e.Uint32BitSet = y;
- y.prototype.toString = c;
- y.prototype.toBitString = d;
- f.prototype.toString = c;
- f.prototype.toBitString = d;
- e.BitSetFunctor = function(c) {
- var d = 1 === g(c) >> e.ADDRESS_BITS_PER_WORD ? y : f;
- return function() {
- return new d(c);
- };
- };
- })(k.BitSets || (k.BitSets = {}));
- b = function() {
- function e() {
- }
- e.randomStyle = function() {
- e._randomStyleCache || (e._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 e._randomStyleCache[e._nextStyle++ % e._randomStyleCache.length];
- };
- e.gradientColor = function(g) {
- return e._gradient[e._gradient.length * h.clamp(g, 0, 1) | 0];
- };
- e.contrastStyle = function(g) {
- g = parseInt(g.substr(1), 16);
- return 128 <= (299 * (g >> 16) + 587 * (g >> 8 & 255) + 114 * (g & 255)) / 1E3 ? "#000000" : "#ffffff";
- };
- e.reset = function() {
- e._nextStyle = 0;
- };
- e.TabToolbar = "#252c33";
- e.Toolbars = "#343c45";
- e.HighlightBlue = "#1d4f73";
- e.LightText = "#f5f7fa";
- e.ForegroundText = "#b6babf";
- e.Black = "#000000";
- e.VeryDark = "#14171a";
- e.Dark = "#181d20";
- e.Light = "#a9bacb";
- e.Grey = "#8fa1b2";
- e.DarkGrey = "#5f7387";
- e.Blue = "#46afe3";
- e.Purple = "#6b7abb";
- e.Pink = "#df80ff";
- e.Red = "#eb5368";
- e.Orange = "#d96629";
- e.LightOrange = "#d99b28";
- e.Green = "#70bf53";
- e.BlueGrey = "#5e88b0";
- e._nextStyle = 0;
- e._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 e;
- }();
- k.ColorStyle = b;
- b = function() {
- function e(g, d, c, f) {
- this.xMin = g | 0;
- this.yMin = d | 0;
- this.xMax = c | 0;
- this.yMax = f | 0;
- }
- e.FromUntyped = function(g) {
- return new e(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- e.FromRectangle = function(g) {
- return new e(20 * g.x | 0, 20 * g.y | 0, 20 * (g.x + g.width) | 0, 20 * (g.y + g.height) | 0);
- };
- e.prototype.setElements = function(g, d, c, f) {
- this.xMin = g;
- this.yMin = d;
- this.xMax = c;
- this.yMax = f;
- };
- e.prototype.copyFrom = function(g) {
- this.setElements(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- e.prototype.contains = function(g, d) {
- return g < this.xMin !== g < this.xMax && d < this.yMin !== d < this.yMax;
- };
- e.prototype.unionInPlace = function(g) {
- g.isEmpty() || (this.extendByPoint(g.xMin, g.yMin), this.extendByPoint(g.xMax, g.yMax));
- };
- e.prototype.extendByPoint = function(g, d) {
- this.extendByX(g);
- this.extendByY(d);
- };
- e.prototype.extendByX = function(g) {
- 134217728 === this.xMin ? this.xMin = this.xMax = g : (this.xMin = Math.min(this.xMin, g), this.xMax = Math.max(this.xMax, g));
- };
- e.prototype.extendByY = function(g) {
- 134217728 === this.yMin ? this.yMin = this.yMax = g : (this.yMin = Math.min(this.yMin, g), this.yMax = Math.max(this.yMax, g));
- };
- e.prototype.intersects = function(g) {
- return this.contains(g.xMin, g.yMin) || this.contains(g.xMax, g.yMax);
- };
- e.prototype.isEmpty = function() {
- return this.xMax <= this.xMin || this.yMax <= this.yMin;
- };
- Object.defineProperty(e.prototype, "width", {get:function() {
- return this.xMax - this.xMin;
- }, set:function(g) {
- this.xMax = this.xMin + g;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "height", {get:function() {
- return this.yMax - this.yMin;
- }, set:function(g) {
- this.yMax = this.yMin + g;
- }, enumerable:!0, configurable:!0});
- e.prototype.getBaseWidth = function(g) {
- var d = Math.abs(Math.cos(g));
- g = Math.abs(Math.sin(g));
- return d * (this.xMax - this.xMin) + g * (this.yMax - this.yMin);
- };
- e.prototype.getBaseHeight = function(g) {
- var d = Math.abs(Math.cos(g));
- return Math.abs(Math.sin(g)) * (this.xMax - this.xMin) + d * (this.yMax - this.yMin);
- };
- e.prototype.setEmpty = function() {
- this.xMin = this.yMin = this.xMax = this.yMax = 0;
- };
- e.prototype.setToSentinels = function() {
- this.xMin = this.yMin = this.xMax = this.yMax = 134217728;
- };
- e.prototype.clone = function() {
- return new e(this.xMin, this.yMin, this.xMax, this.yMax);
- };
- e.prototype.toString = function() {
- return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }";
- };
- return e;
- }();
- k.Bounds = b;
- b = function() {
- function e(g, d, c, f) {
- m.assert(p(g));
- m.assert(p(d));
- m.assert(p(c));
- m.assert(p(f));
- this._xMin = g | 0;
- this._yMin = d | 0;
- this._xMax = c | 0;
- this._yMax = f | 0;
- }
- e.FromUntyped = function(g) {
- return new e(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- e.FromRectangle = function(g) {
- return new e(20 * g.x | 0, 20 * g.y | 0, 20 * (g.x + g.width) | 0, 20 * (g.y + g.height) | 0);
- };
- e.prototype.setElements = function(g, d, c, f) {
- this.xMin = g;
- this.yMin = d;
- this.xMax = c;
- this.yMax = f;
- };
- e.prototype.copyFrom = function(g) {
- this.setElements(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- e.prototype.contains = function(g, d) {
- return g < this.xMin !== g < this.xMax && d < this.yMin !== d < this.yMax;
- };
- e.prototype.unionInPlace = function(g) {
- g.isEmpty() || (this.extendByPoint(g.xMin, g.yMin), this.extendByPoint(g.xMax, g.yMax));
- };
- e.prototype.extendByPoint = function(g, d) {
- this.extendByX(g);
- this.extendByY(d);
- };
- e.prototype.extendByX = function(g) {
- 134217728 === this.xMin ? this.xMin = this.xMax = g : (this.xMin = Math.min(this.xMin, g), this.xMax = Math.max(this.xMax, g));
- };
- e.prototype.extendByY = function(g) {
- 134217728 === this.yMin ? this.yMin = this.yMax = g : (this.yMin = Math.min(this.yMin, g), this.yMax = Math.max(this.yMax, g));
- };
- e.prototype.intersects = function(g) {
- return this.contains(g._xMin, g._yMin) || this.contains(g._xMax, g._yMax);
- };
- e.prototype.isEmpty = function() {
- return this._xMax <= this._xMin || this._yMax <= this._yMin;
- };
- Object.defineProperty(e.prototype, "xMin", {get:function() {
- return this._xMin;
- }, set:function(g) {
- m.assert(p(g));
- this._xMin = g;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "yMin", {get:function() {
- return this._yMin;
- }, set:function(g) {
- m.assert(p(g));
- this._yMin = g | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "xMax", {get:function() {
- return this._xMax;
- }, set:function(g) {
- m.assert(p(g));
- this._xMax = g | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "width", {get:function() {
- return this._xMax - this._xMin;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "yMax", {get:function() {
- return this._yMax;
- }, set:function(g) {
- m.assert(p(g));
- this._yMax = g | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "height", {get:function() {
- return this._yMax - this._yMin;
- }, enumerable:!0, configurable:!0});
- e.prototype.getBaseWidth = function(g) {
- var d = Math.abs(Math.cos(g));
- g = Math.abs(Math.sin(g));
- return d * (this._xMax - this._xMin) + g * (this._yMax - this._yMin);
- };
- e.prototype.getBaseHeight = function(g) {
- var d = Math.abs(Math.cos(g));
- return Math.abs(Math.sin(g)) * (this._xMax - this._xMin) + d * (this._yMax - this._yMin);
- };
- e.prototype.setEmpty = function() {
- this._xMin = this._yMin = this._xMax = this._yMax = 0;
- };
- e.prototype.clone = function() {
- return new e(this.xMin, this.yMin, this.xMax, this.yMax);
- };
- e.prototype.toString = function() {
- return "{ xMin: " + this._xMin + ", yMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }";
- };
- e.prototype.assertValid = function() {
- };
- return e;
- }();
- k.DebugBounds = b;
- b = function() {
- function e(g, d, c, f) {
- this.r = g;
- this.g = d;
- this.b = c;
- this.a = f;
- }
- e.FromARGB = function(g) {
- return new e((g >> 16 & 255) / 255, (g >> 8 & 255) / 255, (g >> 0 & 255) / 255, (g >> 24 & 255) / 255);
- };
- e.FromRGBA = function(g) {
- return e.FromARGB(n.RGBAToARGB(g));
- };
- e.prototype.toRGBA = function() {
- return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a;
- };
- e.prototype.toCSSStyle = function() {
- return n.rgbaToCSSStyle(this.toRGBA());
- };
- e.prototype.set = function(g) {
- this.r = g.r;
- this.g = g.g;
- this.b = g.b;
- this.a = g.a;
- };
- e.randomColor = function(g) {
- void 0 === g && (g = 1);
- return new e(Math.random(), Math.random(), Math.random(), g);
- };
- e.parseColor = function(g) {
- e.colorCache || (e.colorCache = Object.create(null));
- if (e.colorCache[g]) {
- return e.colorCache[g];
- }
- var d = document.createElement("span");
- document.body.appendChild(d);
- d.style.backgroundColor = g;
- var c = getComputedStyle(d).backgroundColor;
- document.body.removeChild(d);
- (d = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(c)) || (d = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(c));
- c = new e(0, 0, 0, 0);
- c.r = parseFloat(d[1]) / 255;
- c.g = parseFloat(d[2]) / 255;
- c.b = parseFloat(d[3]) / 255;
- c.a = d[4] ? parseFloat(d[4]) / 255 : 1;
- return e.colorCache[g] = c;
- };
- e.Red = new e(1, 0, 0, 1);
- e.Green = new e(0, 1, 0, 1);
- e.Blue = new e(0, 0, 1, 1);
- e.None = new e(0, 0, 0, 0);
- e.White = new e(1, 1, 1, 1);
- e.Black = new e(0, 0, 0, 1);
- e.colorCache = {};
- return e;
- }();
- k.Color = b;
- var n;
- (function(e) {
- function g(f) {
- var c = f >> 0 & 255, d = f >> 8 & 255, g = f >> 24 & 255;
- f = (Math.imul(f >> 16 & 255, g) + 127) / 255 | 0;
- d = (Math.imul(d, g) + 127) / 255 | 0;
- c = (Math.imul(c, g) + 127) / 255 | 0;
- return g << 24 | f << 16 | d << 8 | c;
- }
- function d() {
- if (!c) {
- c = new Uint8Array(65536);
- for (var f = 0;256 > f;f++) {
- for (var d = 0;256 > d;d++) {
- c[(d << 8) + f] = Math.imul(255, f) / d;
- }
- }
- }
- }
- e.RGBAToARGB = function(f) {
- return f >> 8 & 16777215 | (f & 255) << 24;
- };
- e.ARGBToRGBA = function(f) {
- return f << 8 | f >> 24 & 255;
- };
- e.rgbaToCSSStyle = function(f) {
- return k.StringUtilities.concat9("rgba(", f >> 24 & 255, ",", f >> 16 & 255, ",", f >> 8 & 255, ",", (f & 255) / 255, ")");
- };
- e.cssStyleToRGBA = function(f) {
- if ("#" === f[0]) {
- if (7 === f.length) {
- return parseInt(f.substring(1), 16) << 8 | 255;
- }
- } else {
- if ("r" === f[0]) {
- var c = f.substring(5, f.length - 1).split(",");
- f = parseInt(c[0]);
- var d = parseInt(c[1]), g = parseInt(c[2]), c = parseFloat(c[3]);
- return (f & 255) << 24 | (d & 255) << 16 | (g & 255) << 8 | 255 * c & 255;
- }
- }
- return 4278190335;
- };
- e.hexToRGB = function(f) {
- return parseInt(f.slice(1), 16);
- };
- e.rgbToHex = function(f) {
- return "#" + ("000000" + (f >>> 0).toString(16)).slice(-6);
- };
- e.isValidHexColor = function(f) {
- return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(f);
- };
- e.clampByte = function(f) {
- return Math.max(0, Math.min(255, f));
- };
- e.unpremultiplyARGB = function(f) {
- var c = f >> 0 & 255, d = f >> 8 & 255, g = f >> 24 & 255;
- f = Math.imul(255, f >> 16 & 255) / g & 255;
- d = Math.imul(255, d) / g & 255;
- c = Math.imul(255, c) / g & 255;
- return g << 24 | f << 16 | d << 8 | c;
- };
- e.premultiplyARGB = g;
- var c;
- e.ensureUnpremultiplyTable = d;
- e.getUnpremultiplyTable = function() {
- d();
- return c;
- };
- e.tableLookupUnpremultiplyARGB = function(f) {
- f |= 0;
- var d = f >> 24 & 255;
- if (0 === d) {
- return 0;
- }
- if (255 === d) {
- return f;
- }
- var g, e, b = d << 8, a = c;
- e = a[b + (f >> 16 & 255)];
- g = a[b + (f >> 8 & 255)];
- f = a[b + (f >> 0 & 255)];
- return d << 24 | e << 16 | g << 8 | f;
- };
- e.blendPremultipliedBGRA = function(f, c) {
- var d = c & 16711935, g = c >> 8 & 16711935, e, b = f >> 8 & 16711935, a = 256 - (c & 255);
- e = Math.imul(f & 16711935, a) >> 8;
- b = Math.imul(b, a) >> 8;
- return (g + b & 16711935) << 8 | d + e & 16711935;
- };
- var f = t.swap32;
- e.convertImage = function(d, e, b, a) {
- var l = b.length;
- if (d === e) {
- if (b !== a) {
- for (d = 0;d < l;d++) {
- a[d] = b[d];
- }
- }
- } else {
- if (1 === d && 3 === e) {
- for (k.ColorUtilities.ensureUnpremultiplyTable(), d = 0;d < l;d++) {
- var h = b[d];
- e = h & 255;
- if (0 === e) {
- a[d] = 0;
- } else {
- if (255 === e) {
- a[d] = 4278190080 | h >> 8 & 16777215;
- } else {
- var r = h >> 24 & 255, n = h >> 16 & 255, h = h >> 8 & 255, t = e << 8, q = c, h = q[t + h], n = q[t + n], r = q[t + r];
- a[d] = e << 24 | r << 16 | n << 8 | h;
- }
- }
- }
- } else {
- if (2 === d && 3 === e) {
- for (d = 0;d < l;d++) {
- a[d] = f(b[d]);
- }
- } else {
- if (3 === d && 1 === e) {
- for (d = 0;d < l;d++) {
- e = b[d], a[d] = f(g(e & 4278255360 | e >> 16 & 255 | (e & 255) << 16));
- }
- } else {
- for (m.somewhatImplemented("Image Format Conversion: " + v[d] + " -> " + v[e]), d = 0;d < l;d++) {
- a[d] = b[d];
- }
- }
- }
- }
- }
- };
- })(n = k.ColorUtilities || (k.ColorUtilities = {}));
- b = function() {
- function e(g) {
- void 0 === g && (g = 32);
- this._list = [];
- this._maxSize = g;
- }
- e.prototype.acquire = function(g) {
- if (e._enabled) {
- for (var d = this._list, c = 0;c < d.length;c++) {
- var f = d[c];
- if (f.byteLength >= g) {
- return d.splice(c, 1), f;
- }
- }
- }
- return new ArrayBuffer(g);
- };
- e.prototype.release = function(g) {
- if (e._enabled) {
- var d = this._list;
- d.length === this._maxSize && d.shift();
- d.push(g);
- }
- };
- e.prototype.ensureUint8ArrayLength = function(g, d) {
- if (g.length >= d) {
- return g;
- }
- var c = Math.max(g.length + d, (3 * g.length >> 1) + 1), c = new Uint8Array(this.acquire(c), 0, c);
- c.set(g);
- this.release(g.buffer);
- return c;
- };
- e.prototype.ensureFloat64ArrayLength = function(g, d) {
- if (g.length >= d) {
- return g;
- }
- var c = Math.max(g.length + d, (3 * g.length >> 1) + 1), c = new Float64Array(this.acquire(c * Float64Array.BYTES_PER_ELEMENT), 0, c);
- c.set(g);
- this.release(g.buffer);
- return c;
- };
- e._enabled = !0;
- return e;
- }();
- k.ArrayBufferPool = b;
- (function(e) {
- (function(g) {
- g[g.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE";
- g[g.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE";
- g[g.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE";
- g[g.VIDEO_FEATURE = 4] = "VIDEO_FEATURE";
- g[g.SOUND_FEATURE = 5] = "SOUND_FEATURE";
- g[g.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE";
- })(e.Feature || (e.Feature = {}));
- (function(g) {
- g[g.AVM1_ERROR = 1] = "AVM1_ERROR";
- g[g.AVM2_ERROR = 2] = "AVM2_ERROR";
- })(e.ErrorTypes || (e.ErrorTypes = {}));
- (function(g) {
- g[g.LoadSource = 0] = "LoadSource";
- g[g.LoadWhitelistAllowed = 1] = "LoadWhitelistAllowed";
- g[g.LoadWhitelistDenied = 2] = "LoadWhitelistDenied";
- g[g.StreamAllowed = 3] = "StreamAllowed";
- g[g.StreamDenied = 4] = "StreamDenied";
- g[g.StreamCrossdomain = 5] = "StreamCrossdomain";
- })(e.LoadResource || (e.LoadResource = {}));
- e.instance;
- })(k.Telemetry || (k.Telemetry = {}));
- (function(e) {
- e.instance;
- })(k.FileLoadingService || (k.FileLoadingService = {}));
- (function(e) {
- e[e.BuiltinAbc = 0] = "BuiltinAbc";
- e[e.PlayerglobalAbcs = 1] = "PlayerglobalAbcs";
- e[e.PlayerglobalManifest = 2] = "PlayerglobalManifest";
- e[e.ShellAbc = 3] = "ShellAbc";
- })(k.SystemResourceId || (k.SystemResourceId = {}));
- (function(e) {
- e.instance;
- })(k.SystemResourcesLoadingService || (k.SystemResourcesLoadingService = {}));
- k.registerCSSFont = function(e, g, d) {
- if (inBrowser) {
- var c = document.head;
- c.insertBefore(document.createElement("style"), c.firstChild);
- c = document.styleSheets[0];
- g = "@font-face{font-family:swffont" + e + ";src:url(data:font/opentype;base64," + k.StringUtilities.base64ArrayBuffer(g.buffer) + ")}";
- c.insertRule(g, c.cssRules.length);
- d && (d = document.createElement("div"), d.style.fontFamily = "swffont" + e, d.innerHTML = "hello", document.body.appendChild(d), document.body.removeChild(d));
- } else {
- m.warning("Cannot register CSS font outside the browser");
- }
- };
- k.registerFallbackFont = function() {
- var e = document.styleSheets[0];
- e.insertRule('@font-face{font-family:AdobeBlank;src:url("data:font/opentype;base64,T1RUTwAKAIAAAwAgQ0ZGIDTeCDQAACFkAAAZPERTSUcAAAABAABKqAAAAAhPUy8yAF+xmwAAARAAAABgY21hcCRDbtEAAAdcAAAZ6GhlYWQFl9tDAAAArAAAADZoaGVhB1oD7wAAAOQAAAAkaG10eAPoAHwAADqgAAAQBm1heHAIAVAAAAABCAAAAAZuYW1lIE0HkgAAAXAAAAXrcG9zdP+4ADIAACFEAAAAIAABAAAAAQuFfcPHtV8PPPUAAwPoAAAAANFMRfMAAAAA0UxF8wB8/4gDbANwAAAAAwACAAAAAAAAAAEAAANw/4gAAAPoAHwAfANsAAEAAAAAAAAAAAAAAAAAAAACAABQAAgBAAAAAwPoAZAABQAAAooCWAAAAEsCigJYAAABXgAyANwAAAAAAAAAAAAAAAD3/67/+9///w/gAD8AAAAAQURCTwBAAAD//wNw/4gAAANwAHhgLwH/AAAAAAAAAAAAAAAgAAAAAAARANIAAQAAAAAAAQALAAAAAQAAAAAAAgAHAAsAAQAAAAAAAwAbABIAAQAAAAAABAALAAAAAQAAAAAABQA6AC0AAQAAAAAABgAKAGcAAwABBAkAAACUAHEAAwABBAkAAQAWAQUAAwABBAkAAgAOARsAAwABBAkAAwA2ASkAAwABBAkABAAWAQUAAwABBAkABQB0AV8AAwABBAkABgAUAdMAAwABBAkACAA0AecAAwABBAkACwA0AhsAAwABBAkADQKWAk8AAwABBAkADgA0BOVBZG9iZSBCbGFua1JlZ3VsYXIxLjA0NTtBREJPO0Fkb2JlQmxhbms7QURPQkVWZXJzaW9uIDEuMDQ1O1BTIDEuMDQ1O2hvdGNvbnYgMS4wLjgyO21ha2VvdGYubGliMi41LjYzNDA2QWRvYmVCbGFuawBDAG8AcAB5AHIAaQBnAGgAdAAgAKkAIAAyADAAMQAzACwAIAAyADAAMQA1ACAAQQBkAG8AYgBlACAAUwB5AHMAdABlAG0AcwAgAEkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAAKABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBkAG8AYgBlAC4AYwBvAG0ALwApAC4AQQBkAG8AYgBlACAAQgBsAGEAbgBrAFIAZQBnAHUAbABhAHIAMQAuADAANAA1ADsAQQBEAEIATwA7AEEAZABvAGIAZQBCAGwAYQBuAGsAOwBBAEQATwBCAEUAVgBlAHIAcwBpAG8AbgAgADEALgAwADQANQA7AFAAUwAgADEALgAwADQANQA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAMgA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYAMwA0ADAANgBBAGQAbwBiAGUAQgBsAGEAbgBrAEEAZABvAGIAZQAgAFMAeQBzAHQAZQBtAHMAIABJAG4AYwBvAHIAcABvAHIAYQB0AGUAZABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBkAG8AYgBlAC4AYwBvAG0ALwB0AHkAcABlAC8AVABoAGkAcwAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUAIABpAHMAIABsAGkAYwBlAG4AcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAFMASQBMACAATwBwAGUAbgAgAEYAbwBuAHQAIABMAGkAYwBlAG4AcwBlACwAIABWAGUAcgBzAGkAbwBuACAAMQAuADEALgAgAFQAaABpAHMAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlACAAaQBzACAAZABpAHMAdAByAGkAYgB1AHQAZQBkACAAbwBuACAAYQBuACAAIgBBAFMAIABJAFMAIgAgAEIAQQBTAEkAUwAsACAAVwBJAFQASABPAFUAVAAgAFcAQQBSAFIAQQBOAFQASQBFAFMAIABPAFIAIABDAE8ATgBEAEkAVABJAE8ATgBTACAATwBGACAAQQBOAFkAIABLAEkATgBEACwAIABlAGkAdABoAGUAcgAgAGUAeABwAHIAZQBzAHMAIABvAHIAIABpAG0AcABsAGkAZQBkAC4AIABTAGUAZQAgAHQAaABlACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUAIABmAG8AcgAgAHQAaABlACAAcwBwAGUAYwBpAGYAaQBjACAAbABhAG4AZwB1AGEAZwBlACwAIABwAGUAcgBtAGkAcwBzAGkAbwBuAHMAIABhAG4AZAAgAGwAaQBtAGkAdABhAHQAaQBvAG4AcwAgAGcAbwB2AGUAcgBuAGkAbgBnACAAeQBvAHUAcgAgAHUAcwBlACAAbwBmACAAdABoAGkAcwAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUALgBoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAABQAAAAMAAAA4AAAABAAAAFgAAQAAAAAALAADAAEAAAA4AAMACgAAAFgABgAMAAAAAAABAAAABAAgAAAABAAEAAEAAAf///8AAAAA//8AAQABAAAAAAAMAAAAABmQAAAAAAAAAiAAAAAAAAAH/wAAAAEAAAgAAAAP/wAAAAEAABAAAAAX/wAAAAEAABgAAAAf/wAAAAEAACAAAAAn/wAAAAEAACgAAAAv/wAAAAEAADAAAAA3/wAAAAEAADgAAAA//wAAAAEAAEAAAABH/wAAAAEAAEgAAABP/wAAAAEAAFAAAABX/wAAAAEAAFgAAABf/wAAAAEAAGAAAABn/wAAAAEAAGgAAABv/wAAAAEAAHAAAAB3/wAAAAEAAHgAAAB//wAAAAEAAIAAAACH/wAAAAEAAIgAAACP/wAAAAEAAJAAAACX/wAAAAEAAJgAAACf/wAAAAEAAKAAAACn/wAAAAEAAKgAAACv/wAAAAEAALAAAAC3/wAAAAEAALgAAAC//wAAAAEAAMAAAADH/wAAAAEAAMgAAADP/wAAAAEAANAAAADX/wAAAAEAAOAAAADn/wAAAAEAAOgAAADv/wAAAAEAAPAAAAD3/wAAAAEAAPgAAAD9zwAAAAEAAP3wAAD//QAABfEAAQAAAAEH/wAAAAEAAQgAAAEP/wAAAAEAARAAAAEX/wAAAAEAARgAAAEf/wAAAAEAASAAAAEn/wAAAAEAASgAAAEv/wAAAAEAATAAAAE3/wAAAAEAATgAAAE//wAAAAEAAUAAAAFH/wAAAAEAAUgAAAFP/wAAAAEAAVAAAAFX/wAAAAEAAVgAAAFf/wAAAAEAAWAAAAFn/wAAAAEAAWgAAAFv/wAAAAEAAXAAAAF3/wAAAAEAAXgAAAF//wAAAAEAAYAAAAGH/wAAAAEAAYgAAAGP/wAAAAEAAZAAAAGX/wAAAAEAAZgAAAGf/wAAAAEAAaAAAAGn/wAAAAEAAagAAAGv/wAAAAEAAbAAAAG3/wAAAAEAAbgAAAG//wAAAAEAAcAAAAHH/wAAAAEAAcgAAAHP/wAAAAEAAdAAAAHX/wAAAAEAAdgAAAHf/wAAAAEAAeAAAAHn/wAAAAEAAegAAAHv/wAAAAEAAfAAAAH3/wAAAAEAAfgAAAH//QAAAAEAAgAAAAIH/wAAAAEAAggAAAIP/wAAAAEAAhAAAAIX/wAAAAEAAhgAAAIf/wAAAAEAAiAAAAIn/wAAAAEAAigAAAIv/wAAAAEAAjAAAAI3/wAAAAEAAjgAAAI//wAAAAEAAkAAAAJH/wAAAAEAAkgAAAJP/wAAAAEAAlAAAAJX/wAAAAEAAlgAAAJf/wAAAAEAAmAAAAJn/wAAAAEAAmgAAAJv/wAAAAEAAnAAAAJ3/wAAAAEAAngAAAJ//wAAAAEAAoAAAAKH/wAAAAEAAogAAAKP/wAAAAEAApAAAAKX/wAAAAEAApgAAAKf/wAAAAEAAqAAAAKn/wAAAAEAAqgAAAKv/wAAAAEAArAAAAK3/wAAAAEAArgAAAK//wAAAAEAAsAAAALH/wAAAAEAAsgAAALP/wAAAAEAAtAAAALX/wAAAAEAAtgAAALf/wAAAAEAAuAAAALn/wAAAAEAAugAAALv/wAAAAEAAvAAAAL3/wAAAAEAAvgAAAL//QAAAAEAAwAAAAMH/wAAAAEAAwgAAAMP/wAAAAEAAxAAAAMX/wAAAAEAAxgAAAMf/wAAAAEAAyAAAAMn/wAAAAEAAygAAAMv/wAAAAEAAzAAAAM3/wAAAAEAAzgAAAM//wAAAAEAA0AAAANH/wAAAAEAA0gAAANP/wAAAAEAA1AAAANX/wAAAAEAA1gAAANf/wAAAAEAA2AAAANn/wAAAAEAA2gAAANv/wAAAAEAA3AAAAN3/wAAAAEAA3gAAAN//wAAAAEAA4AAAAOH/wAAAAEAA4gAAAOP/wAAAAEAA5AAAAOX/wAAAAEAA5gAAAOf/wAAAAEAA6AAAAOn/wAAAAEAA6gAAAOv/wAAAAEAA7AAAAO3/wAAAAEAA7gAAAO//wAAAAEAA8AAAAPH/wAAAAEAA8gAAAPP/wAAAAEAA9AAAAPX/wAAAAEAA9gAAAPf/wAAAAEAA+AAAAPn/wAAAAEAA+gAAAPv/wAAAAEAA/AAAAP3/wAAAAEAA/gAAAP//QAAAAEABAAAAAQH/wAAAAEABAgAAAQP/wAAAAEABBAAAAQX/wAAAAEABBgAAAQf/wAAAAEABCAAAAQn/wAAAAEABCgAAAQv/wAAAAEABDAAAAQ3/wAAAAEABDgAAAQ//wAAAAEABEAAAARH/wAAAAEABEgAAARP/wAAAAEABFAAAARX/wAAAAEABFgAAARf/wAAAAEABGAAAARn/wAAAAEABGgAAARv/wAAAAEABHAAAAR3/wAAAAEABHgAAAR//wAAAAEABIAAAASH/wAAAAEABIgAAASP/wAAAAEABJAAAASX/wAAAAEABJgAAASf/wAAAAEABKAAAASn/wAAAAEABKgAAASv/wAAAAEABLAAAAS3/wAAAAEABLgAAAS//wAAAAEABMAAAATH/wAAAAEABMgAAATP/wAAAAEABNAAAATX/wAAAAEABNgAAATf/wAAAAEABOAAAATn/wAAAAEABOgAAATv/wAAAAEABPAAAAT3/wAAAAEABPgAAAT//QAAAAEABQAAAAUH/wAAAAEABQgAAAUP/wAAAAEABRAAAAUX/wAAAAEABRgAAAUf/wAAAAEABSAAAAUn/wAAAAEABSgAAAUv/wAAAAEABTAAAAU3/wAAAAEABTgAAAU//wAAAAEABUAAAAVH/wAAAAEABUgAAAVP/wAAAAEABVAAAAVX/wAAAAEABVgAAAVf/wAAAAEABWAAAAVn/wAAAAEABWgAAAVv/wAAAAEABXAAAAV3/wAAAAEABXgAAAV//wAAAAEABYAAAAWH/wAAAAEABYgAAAWP/wAAAAEABZAAAAWX/wAAAAEABZgAAAWf/wAAAAEABaAAAAWn/wAAAAEABagAAAWv/wAAAAEABbAAAAW3/wAAAAEABbgAAAW//wAAAAEABcAAAAXH/wAAAAEABcgAAAXP/wAAAAEABdAAAAXX/wAAAAEABdgAAAXf/wAAAAEABeAAAAXn/wAAAAEABegAAAXv/wAAAAEABfAAAAX3/wAAAAEABfgAAAX//QAAAAEABgAAAAYH/wAAAAEABggAAAYP/wAAAAEABhAAAAYX/wAAAAEABhgAAAYf/wAAAAEABiAAAAYn/wAAAAEABigAAAYv/wAAAAEABjAAAAY3/wAAAAEABjgAAAY//wAAAAEABkAAAAZH/wAAAAEABkgAAAZP/wAAAAEABlAAAAZX/wAAAAEABlgAAAZf/wAAAAEABmAAAAZn/wAAAAEABmgAAAZv/wAAAAEABnAAAAZ3/wAAAAEABngAAAZ//wAAAAEABoAAAAaH/wAAAAEABogAAAaP/wAAAAEABpAAAAaX/wAAAAEABpgAAAaf/wAAAAEABqAAAAan/wAAAAEABqgAAAav/wAAAAEABrAAAAa3/wAAAAEABrgAAAa//wAAAAEABsAAAAbH/wAAAAEABsgAAAbP/wAAAAEABtAAAAbX/wAAAAEABtgAAAbf/wAAAAEABuAAAAbn/wAAAAEABugAAAbv/wAAAAEABvAAAAb3/wAAAAEABvgAAAb//QAAAAEABwAAAAcH/wAAAAEABwgAAAcP/wAAAAEABxAAAAcX/wAAAAEABxgAAAcf/wAAAAEAByAAAAcn/wAAAAEABygAAAcv/wAAAAEABzAAAAc3/wAAAAEABzgAAAc//wAAAAEAB0AAAAdH/wAAAAEAB0gAAAdP/wAAAAEAB1AAAAdX/wAAAAEAB1gAAAdf/wAAAAEAB2AAAAdn/wAAAAEAB2gAAAdv/wAAAAEAB3AAAAd3/wAAAAEAB3gAAAd//wAAAAEAB4AAAAeH/wAAAAEAB4gAAAeP/wAAAAEAB5AAAAeX/wAAAAEAB5gAAAef/wAAAAEAB6AAAAen/wAAAAEAB6gAAAev/wAAAAEAB7AAAAe3/wAAAAEAB7gAAAe//wAAAAEAB8AAAAfH/wAAAAEAB8gAAAfP/wAAAAEAB9AAAAfX/wAAAAEAB9gAAAff/wAAAAEAB+AAAAfn/wAAAAEAB+gAAAfv/wAAAAEAB/AAAAf3/wAAAAEAB/gAAAf//QAAAAEACAAAAAgH/wAAAAEACAgAAAgP/wAAAAEACBAAAAgX/wAAAAEACBgAAAgf/wAAAAEACCAAAAgn/wAAAAEACCgAAAgv/wAAAAEACDAAAAg3/wAAAAEACDgAAAg//wAAAAEACEAAAAhH/wAAAAEACEgAAAhP/wAAAAEACFAAAAhX/wAAAAEACFgAAAhf/wAAAAEACGAAAAhn/wAAAAEACGgAAAhv/wAAAAEACHAAAAh3/wAAAAEACHgAAAh//wAAAAEACIAAAAiH/wAAAAEACIgAAAiP/wAAAAEACJAAAAiX/wAAAAEACJgAAAif/wAAAAEACKAAAAin/wAAAAEACKgAAAiv/wAAAAEACLAAAAi3/wAAAAEACLgAAAi//wAAAAEACMAAAAjH/wAAAAEACMgAAAjP/wAAAAEACNAAAAjX/wAAAAEACNgAAAjf/wAAAAEACOAAAAjn/wAAAAEACOgAAAjv/wAAAAEACPAAAAj3/wAAAAEACPgAAAj//QAAAAEACQAAAAkH/wAAAAEACQgAAAkP/wAAAAEACRAAAAkX/wAAAAEACRgAAAkf/wAAAAEACSAAAAkn/wAAAAEACSgAAAkv/wAAAAEACTAAAAk3/wAAAAEACTgAAAk//wAAAAEACUAAAAlH/wAAAAEACUgAAAlP/wAAAAEACVAAAAlX/wAAAAEACVgAAAlf/wAAAAEACWAAAAln/wAAAAEACWgAAAlv/wAAAAEACXAAAAl3/wAAAAEACXgAAAl//wAAAAEACYAAAAmH/wAAAAEACYgAAAmP/wAAAAEACZAAAAmX/wAAAAEACZgAAAmf/wAAAAEACaAAAAmn/wAAAAEACagAAAmv/wAAAAEACbAAAAm3/wAAAAEACbgAAAm//wAAAAEACcAAAAnH/wAAAAEACcgAAAnP/wAAAAEACdAAAAnX/wAAAAEACdgAAAnf/wAAAAEACeAAAAnn/wAAAAEACegAAAnv/wAAAAEACfAAAAn3/wAAAAEACfgAAAn//QAAAAEACgAAAAoH/wAAAAEACggAAAoP/wAAAAEAChAAAAoX/wAAAAEAChgAAAof/wAAAAEACiAAAAon/wAAAAEACigAAAov/wAAAAEACjAAAAo3/wAAAAEACjgAAAo//wAAAAEACkAAAApH/wAAAAEACkgAAApP/wAAAAEAClAAAApX/wAAAAEAClgAAApf/wAAAAEACmAAAApn/wAAAAEACmgAAApv/wAAAAEACnAAAAp3/wAAAAEACngAAAp//wAAAAEACoAAAAqH/wAAAAEACogAAAqP/wAAAAEACpAAAAqX/wAAAAEACpgAAAqf/wAAAAEACqAAAAqn/wAAAAEACqgAAAqv/wAAAAEACrAAAAq3/wAAAAEACrgAAAq//wAAAAEACsAAAArH/wAAAAEACsgAAArP/wAAAAEACtAAAArX/wAAAAEACtgAAArf/wAAAAEACuAAAArn/wAAAAEACugAAArv/wAAAAEACvAAAAr3/wAAAAEACvgAAAr//QAAAAEACwAAAAsH/wAAAAEACwgAAAsP/wAAAAEACxAAAAsX/wAAAAEACxgAAAsf/wAAAAEACyAAAAsn/wAAAAEACygAAAsv/wAAAAEACzAAAAs3/wAAAAEACzgAAAs//wAAAAEAC0AAAAtH/wAAAAEAC0gAAAtP/wAAAAEAC1AAAAtX/wAAAAEAC1gAAAtf/wAAAAEAC2AAAAtn/wAAAAEAC2gAAAtv/wAAAAEAC3AAAAt3/wAAAAEAC3gAAAt//wAAAAEAC4AAAAuH/wAAAAEAC4gAAAuP/wAAAAEAC5AAAAuX/wAAAAEAC5gAAAuf/wAAAAEAC6AAAAun/wAAAAEAC6gAAAuv/wAAAAEAC7AAAAu3/wAAAAEAC7gAAAu//wAAAAEAC8AAAAvH/wAAAAEAC8gAAAvP/wAAAAEAC9AAAAvX/wAAAAEAC9gAAAvf/wAAAAEAC+AAAAvn/wAAAAEAC+gAAAvv/wAAAAEAC/AAAAv3/wAAAAEAC/gAAAv//QAAAAEADAAAAAwH/wAAAAEADAgAAAwP/wAAAAEADBAAAAwX/wAAAAEADBgAAAwf/wAAAAEADCAAAAwn/wAAAAEADCgAAAwv/wAAAAEADDAAAAw3/wAAAAEADDgAAAw//wAAAAEADEAAAAxH/wAAAAEADEgAAAxP/wAAAAEADFAAAAxX/wAAAAEADFgAAAxf/wAAAAEADGAAAAxn/wAAAAEADGgAAAxv/wAAAAEADHAAAAx3/wAAAAEADHgAAAx//wAAAAEADIAAAAyH/wAAAAEADIgAAAyP/wAAAAEADJAAAAyX/wAAAAEADJgAAAyf/wAAAAEADKAAAAyn/wAAAAEADKgAAAyv/wAAAAEADLAAAAy3/wAAAAEADLgAAAy//wAAAAEADMAAAAzH/wAAAAEADMgAAAzP/wAAAAEADNAAAAzX/wAAAAEADNgAAAzf/wAAAAEADOAAAAzn/wAAAAEADOgAAAzv/wAAAAEADPAAAAz3/wAAAAEADPgAAAz//QAAAAEADQAAAA0H/wAAAAEADQgAAA0P/wAAAAEADRAAAA0X/wAAAAEADRgAAA0f/wAAAAEADSAAAA0n/wAAAAEADSgAAA0v/wAAAAEADTAAAA03/wAAAAEADTgAAA0//wAAAAEADUAAAA1H/wAAAAEADUgAAA1P/wAAAAEADVAAAA1X/wAAAAEADVgAAA1f/wAAAAEADWAAAA1n/wAAAAEADWgAAA1v/wAAAAEADXAAAA13/wAAAAEADXgAAA1//wAAAAEADYAAAA2H/wAAAAEADYgAAA2P/wAAAAEADZAAAA2X/wAAAAEADZgAAA2f/wAAAAEADaAAAA2n/wAAAAEADagAAA2v/wAAAAEADbAAAA23/wAAAAEADbgAAA2//wAAAAEADcAAAA3H/wAAAAEADcgAAA3P/wAAAAEADdAAAA3X/wAAAAEADdgAAA3f/wAAAAEADeAAAA3n/wAAAAEADegAAA3v/wAAAAEADfAAAA33/wAAAAEADfgAAA3//QAAAAEADgAAAA4H/wAAAAEADggAAA4P/wAAAAEADhAAAA4X/wAAAAEADhgAAA4f/wAAAAEADiAAAA4n/wAAAAEADigAAA4v/wAAAAEADjAAAA43/wAAAAEADjgAAA4//wAAAAEADkAAAA5H/wAAAAEADkgAAA5P/wAAAAEADlAAAA5X/wAAAAEADlgAAA5f/wAAAAEADmAAAA5n/wAAAAEADmgAAA5v/wAAAAEADnAAAA53/wAAAAEADngAAA5//wAAAAEADoAAAA6H/wAAAAEADogAAA6P/wAAAAEADpAAAA6X/wAAAAEADpgAAA6f/wAAAAEADqAAAA6n/wAAAAEADqgAAA6v/wAAAAEADrAAAA63/wAAAAEADrgAAA6//wAAAAEADsAAAA7H/wAAAAEADsgAAA7P/wAAAAEADtAAAA7X/wAAAAEADtgAAA7f/wAAAAEADuAAAA7n/wAAAAEADugAAA7v/wAAAAEADvAAAA73/wAAAAEADvgAAA7//QAAAAEADwAAAA8H/wAAAAEADwgAAA8P/wAAAAEADxAAAA8X/wAAAAEADxgAAA8f/wAAAAEADyAAAA8n/wAAAAEADygAAA8v/wAAAAEADzAAAA83/wAAAAEADzgAAA8//wAAAAEAD0AAAA9H/wAAAAEAD0gAAA9P/wAAAAEAD1AAAA9X/wAAAAEAD1gAAA9f/wAAAAEAD2AAAA9n/wAAAAEAD2gAAA9v/wAAAAEAD3AAAA93/wAAAAEAD3gAAA9//wAAAAEAD4AAAA+H/wAAAAEAD4gAAA+P/wAAAAEAD5AAAA+X/wAAAAEAD5gAAA+f/wAAAAEAD6AAAA+n/wAAAAEAD6gAAA+v/wAAAAEAD7AAAA+3/wAAAAEAD7gAAA+//wAAAAEAD8AAAA/H/wAAAAEAD8gAAA/P/wAAAAEAD9AAAA/X/wAAAAEAD9gAAA/f/wAAAAEAD+AAAA/n/wAAAAEAD+gAAA/v/wAAAAEAD/AAAA/3/wAAAAEAD/gAAA///QAAAAEAEAAAABAH/wAAAAEAEAgAABAP/wAAAAEAEBAAABAX/wAAAAEAEBgAABAf/wAAAAEAECAAABAn/wAAAAEAECgAABAv/wAAAAEAEDAAABA3/wAAAAEAEDgAABA//wAAAAEAEEAAABBH/wAAAAEAEEgAABBP/wAAAAEAEFAAABBX/wAAAAEAEFgAABBf/wAAAAEAEGAAABBn/wAAAAEAEGgAABBv/wAAAAEAEHAAABB3/wAAAAEAEHgAABB//wAAAAEAEIAAABCH/wAAAAEAEIgAABCP/wAAAAEAEJAAABCX/wAAAAEAEJgAABCf/wAAAAEAEKAAABCn/wAAAAEAEKgAABCv/wAAAAEAELAAABC3/wAAAAEAELgAABC//wAAAAEAEMAAABDH/wAAAAEAEMgAABDP/wAAAAEAENAAABDX/wAAAAEAENgAABDf/wAAAAEAEOAAABDn/wAAAAEAEOgAABDv/wAAAAEAEPAAABD3/wAAAAEAEPgAABD//QAAAAEAAwAAAAAAAP+1ADIAAAAAAAAAAAAAAAAAAAAAAAAAAAEABAIAAQEBC0Fkb2JlQmxhbmsAAQEBMPgb+ByLDB74HQH4HgKL+wz6APoEBR4aBF8MHxwIAQwi91UP92IR91oMJRwZHwwkAAUBAQYOVmFwQWRvYmVJZGVudGl0eUNvcHlyaWdodCAyMDEzLCAyMDE1IEFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkIChodHRwOi8vd3d3LmFkb2JlLmNvbS8pLkFkb2JlIEJsYW5rQWRvYmVCbGFuay0yMDQ5AAACAAEH/wMAAQAAAAgBCAECAAEASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAGIAYwBkAGUAZgBnAGgAaQBqAGsAbABtAG4AbwBwAHEAcgBzAHQAdQB2AHcAeAB5AHoAewB8AH0AfgB/AIAAgQCCAIMAhACFAIYAhwCIAIkAigCLAIwAjQCOAI8AkACRAJIAkwCUAJUAlgCXAJgAmQCaAJsAnACdAJ4AnwCgAKEAogCjAKQApQCmAKcAqACpAKoAqwCsAK0ArgCvALAAsQCyALMAtAC1ALYAtwC4ALkAugC7ALwAvQC+AL8AwADBAMIAwwDEAMUAxgDHAMgAyQDKAMsAzADNAM4AzwDQANEA0gDTANQA1QDWANcA2ADZANoA2wDcAN0A3gDfAOAA4QDiAOMA5ADlAOYA5wDoAOkA6gDrAOwA7QDuAO8A8ADxAPIA8wD0APUA9gD3APgA+QD6APsA/AD9AP4A/wEAAQEBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeAR8BIAEhASIBIwEkASUBJgEnASgBKQEqASsBLAEtAS4BLwEwATEBMgEzATQBNQE2ATcBOAE5AToBOwE8AT0BPgE/AUABQQFCAUMBRAFFAUYBRwFIAUkBSgFLAUwBTQFOAU8BUAFRAVIBUwFUAVUBVgFXAVgBWQFaAVsBXAFdAV4BXwFgAWEBYgFjAWQBZQFmAWcBaAFpAWoBawFsAW0BbgFvAXABcQFyAXMBdAF1AXYBdwF4AXkBegF7AXwBfQF+AX8BgAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHPAdAB0QHSAdMB1AHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAfQB9QH2AfcB+AH5AfoB+wH8Af0B/gH/AgACAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGQIaAhsCHAIdAh4CHwIgAiECIgIjAiQCJQImAicCKAIpAioCKwIsAi0CLgIvAjACMQIyAjMCNAI1AjYCNwI4AjkCOgI7AjwCPQI+Aj8CQAJBAkICQwJEAkUCRgJHAkgCSQJKAksCTAJNAk4CTwJQAlECUgJTAlQCVQJWAlcCWAJZAloCWwJcAl0CXgJfAmACYQJiAmMCZAJlAmYCZwJoAmkCagJrAmwCbQJuAm8CcAJxAnICcwJ0AnUCdgJ3AngCeQJ6AnsCfAJ9An4CfwKAAoECggKDAoQChQKGAocCiAKJAooCiwKMAo0CjgKPApACkQKSApMClAKVApYClwKYApkCmgKbApwCnQKeAp8CoAKhAqICowKkAqUCpgKnAqgCqQKqAqsCrAKtAq4CrwKwArECsgKzArQCtQK2ArcCuAK5AroCuwK8Ar0CvgK/AsACwQLCAsMCxALFAsYCxwLIAskCygLLAswCzQLOAs8C0ALRAtIC0wLUAtUC1gLXAtgC2QLaAtsC3ALdAt4C3wLgAuEC4gLjAuQC5QLmAucC6ALpAuoC6wLsAu0C7gLvAvAC8QLyAvMC9AL1AvYC9wL4AvkC+gL7AvwC/QL+Av8DAAMBAwIDAwMEAwUDBgMHAwgDCQMKAwsDDAMNAw4DDwMQAxEDEgMTAxQDFQMWAxcDGAMZAxoDGwMcAx0DHgMfAyADIQMiAyMDJAMlAyYDJwMoAykDKgMrAywDLQMuAy8DMAMxAzIDMwM0AzUDNgM3AzgDOQM6AzsDPAM9Az4DPwNAA0EDQgNDA0QDRQNGA0cDSANJA0oDSwNMA00DTgNPA1ADUQNSA1MDVANVA1YDVwNYA1kDWgNbA1wDXQNeA18DYANhA2IDYwNkA2UDZgNnA2gDaQNqA2sDbANtA24DbwNwA3EDcgNzA3QDdQN2A3cDeAN5A3oDewN8A30DfgN/A4ADgQOCA4MDhAOFA4YDhwOIA4kDigOLA4wDjQOOA48DkAORA5IDkwOUA5UDlgOXA5gDmQOaA5sDnAOdA54DnwOgA6EDogOjA6QDpQOmA6cDqAOpA6oDqwOsA60DrgOvA7ADsQOyA7MDtAO1A7YDtwO4A7kDugO7A7wDvQO+A78DwAPBA8IDwwPEA8UDxgPHA8gDyQPKA8sDzAPNA84DzwPQA9ED0gPTA9QD1QPWA9cD2APZA9oD2wPcA90D3gPfA+AD4QPiA+MD5APlA+YD5wPoA+kD6gPrA+wD7QPuA+8D8APxA/ID8wP0A/UD9gP3A/gD+QP6A/sD/AP9A/4D/wQABAEEAgQDBAQEBQQGBAcECAQJBAoECwQMBA0EDgQPBBAEEQQSBBMEFAQVBBYEFwQYBBkEGgQbBBwEHQQeBB8EIAQhBCIEIwQkBCUEJgQnBCgEKQQqBCsELAQtBC4ELwQwBDEEMgQzBDQENQQ2BDcEOAQ5BDoEOwQ8BD0EPgQ/BEAEQQRCBEMERARFBEYERwRIBEkESgRLBEwETQROBE8EUARRBFIEUwRUBFUEVgRXBFgEWQRaBFsEXARdBF4EXwRgBGEEYgRjBGQEZQRmBGcEaARpBGoEawRsBG0EbgRvBHAEcQRyBHMEdAR1BHYEdwR4BHkEegR7BHwEfQR+BH8EgASBBIIEgwSEBIUEhgSHBIgEiQSKBIsEjASNBI4EjwSQBJEEkgSTBJQElQSWBJcEmASZBJoEmwScBJ0EngSfBKAEoQSiBKMEpASlBKYEpwSoBKkEqgSrBKwErQSuBK8EsASxBLIEswS0BLUEtgS3BLgEuQS6BLsEvAS9BL4EvwTABMEEwgTDBMQExQTGBMcEyATJBMoEywTMBM0EzgTPBNAE0QTSBNME1ATVBNYE1wTYBNkE2gTbBNwE3QTeBN8E4AThBOIE4wTkBOUE5gTnBOgE6QTqBOsE7ATtBO4E7wTwBPEE8gTzBPQE9QT2BPcE+AT5BPoE+wT8BP0E/gT/BQAFAQUCBQMFBAUFBQYFBwUIBQkFCgULBQwFDQUOBQ8FEAURBRIFEwUUBRUFFgUXBRgFGQUaBRsFHAUdBR4FHwUgBSEFIgUjBSQFJQUmBScFKAUpBSoFKwUsBS0FLgUvBTAFMQUyBTMFNAU1BTYFNwU4BTkFOgU7BTwFPQU+BT8FQAVBBUIFQwVEBUUFRgVHBUgFSQVKBUsFTAVNBU4FTwVQBVEFUgVTBVQFVQVWBVcFWAVZBVoFWwVcBV0FXgVfBWAFYQViBWMFZAVlBWYFZwVoBWkFagVrBWwFbQVuBW8FcAVxBXIFcwV0BXUFdgV3BXgFeQV6BXsFfAV9BX4FfwWABYEFggWDBYQFhQWGBYcFiAWJBYoFiwWMBY0FjgWPBZAFkQWSBZMFlAWVBZYFlwWYBZkFmgWbBZwFnQWeBZ8FoAWhBaIFowWkBaUFpgWnBagFqQWqBasFrAWtBa4FrwWwBbEFsgWzBbQFtQW2BbcFuAW5BboFuwW8Bb0FvgW/BcAFwQXCBcMFxAXFBcYFxwXIBckFygXLBcwFzQXOBc8F0AXRBdIF0wXUBdUF1gXXBdgF2QXaBdsF3AXdBd4F3wXgBeEF4gXjBeQF5QXmBecF6AXpBeoF6wXsBe0F7gXvBfAF8QXyBfMF9AX1BfYF9wX4BfkF+gX7BfwF/QX+Bf8GAAYBBgIGAwYEBgUGBgYHBggGCQYKBgsGDAYNBg4GDwYQBhEGEgYTBhQGFQYWBhcGGAYZBhoGGwYcBh0GHgYfBiAGIQYiBiMGJAYlBiYGJwYoBikGKgYrBiwGLQYuBi8GMAYxBjIGMwY0BjUGNgY3BjgGOQY6BjsGPAY9Bj4GPwZABkEGQgZDBkQGRQZGBkcGSAZJBkoGSwZMBk0GTgZPBlAGUQZSBlMGVAZVBlYGVwZYBlkGWgZbBlwGXQZeBl8GYAZhBmIGYwZkBmUGZgZnBmgGaQZqBmsGbAZtBm4GbwZwBnEGcgZzBnQGdQZ2BncGeAZ5BnoGewZ8Bn0GfgZ/BoAGgQaCBoMGhAaFBoYGhwaIBokGigaLBowGjQaOBo8GkAaRBpIGkwaUBpUGlgaXBpgGmQaaBpsGnAadBp4GnwagBqEGogajBqQGpQamBqcGqAapBqoGqwasBq0GrgavBrAGsQayBrMGtAa1BrYGtwa4BrkGuga7BrwGvQa+Br8GwAbBBsIGwwbEBsUGxgbHBsgGyQbKBssGzAbNBs4GzwbQBtEG0gbTBtQG1QbWBtcG2AbZBtoG2wbcBt0G3gbfBuAG4QbiBuMG5AblBuYG5wboBukG6gbrBuwG7QbuBu8G8AbxBvIG8wb0BvUG9gb3BvgG+Qb6BvsG/Ab9Bv4G/wcABwEHAgcDBwQHBQcGBwcHCAcJBwoHCwcMBw0HDgcPBxAHEQcSBxMHFAcVBxYHFwcYBxkHGgcbBxwHHQceBx8HIAchByIHIwckByUHJgcnBygHKQcqBysHLActBy4HLwcwBzEHMgczBzQHNQc2BzcHOAc5BzoHOwc8Bz0HPgc/B0AHQQdCB0MHRAdFB0YHRwdIB0kHSgdLB0wHTQdOB08HUAdRB1IHUwdUB1UHVgdXB1gHWQdaB1sHXAddB14HXwdgB2EHYgdjB2QHZQdmB2cHaAdpB2oHawdsB20HbgdvB3AHcQdyB3MHdAd1B3YHdwd4B3kHegd7B3wHfQd+B38HgAeBB4IHgweEB4UHhgeHB4gHiQeKB4sHjAeNB44HjweQB5EHkgeTB5QHlQeWB5cHmAeZB5oHmwecB50HngefB6AHoQeiB6MHpAelB6YHpweoB6kHqgerB6wHrQeuB68HsAexB7IHswe0B7UHtge3B7gHuQe6B7sHvAe9B74HvwfAB8EHwgfDB8QHxQfGB8cHyAfJB8oHywfMB80HzgfPB9AH0QfSB9MH1AfVB9YH1wfYB9kH2gfbB9wH3QfeB98H4AfhB+IH4wfkB+UH5gfnB+gH6QfqB+sH7AftB+4H7wfwB/EH8gfzB/QH9Qf2B/cH+Af5B/oH+wf8B/0H/gf/CAAIAQgCCAMIBAgFCAYIBwgICAkICggLCAwIDQgOCA8IEAgRCBIIEwgUCBUIFggXCBgIGQgaCBsIHAgdCB4IHwggCCEIIggjCCQIJQgmCCcIKAgpCCoIKwgsCC0ILggvCDAIMQgyCDMINAg1CDYINwg4CDkIOgg7CDwIPQg+CD8IQAhBCEIIQwhECEUIRghHCEgISQhKCEsg+wy3+iS3AfcQt/kstwP3EPoEFf58+YT6fAf9WP4nFfnSB/fF/DMFprAV+8X4NwX49gamYhX90gf7xfgzBXBmFffF/DcF/PYGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OAAEBAQr4HwwmmhwZLRL7joscBUaLBr0KvQv65xUD6AB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA==");}',
- e.cssRules.length);
- };
- (function(e) {
- e.instance = {enabled:!1, initJS:function(g) {
- }, registerCallback:function(g) {
- }, unregisterCallback:function(g) {
- }, eval:function(g) {
- }, call:function(g) {
- }, getId:function() {
- return null;
- }};
- })(k.ExternalInterfaceService || (k.ExternalInterfaceService = {}));
- (function(e) {
- e[e.InvalidCallback = -3] = "InvalidCallback";
- e[e.AlreadyTaken = -2] = "AlreadyTaken";
- e[e.InvalidName = -1] = "InvalidName";
- e[e.Success = 0] = "Success";
- })(k.LocalConnectionConnectResult || (k.LocalConnectionConnectResult = {}));
- (function(e) {
- e[e.NotConnected = -1] = "NotConnected";
- e[e.Success = 0] = "Success";
- })(k.LocalConnectionCloseResult || (k.LocalConnectionCloseResult = {}));
- (function(e) {
- e.instance;
- })(k.LocalConnectionService || (k.LocalConnectionService = {}));
- (function(e) {
- e.instance = {setClipboard:function(g) {
- }};
- })(k.ClipboardService || (k.ClipboardService = {}));
- b = function() {
- function e() {
- this._queues = {};
- }
- e.prototype.register = function(g, d) {
- m.assert(g);
- m.assert(d);
- var c = this._queues[g];
- if (c) {
- if (-1 < c.indexOf(d)) {
- return;
- }
- } else {
- c = this._queues[g] = [];
- }
- c.push(d);
- };
- e.prototype.unregister = function(g, d) {
- m.assert(g);
- m.assert(d);
- var c = this._queues[g];
- if (c) {
- var f = c.indexOf(d);
- -1 !== f && c.splice(f, 1);
- 0 === c.length && (this._queues[g] = null);
- }
- };
- e.prototype.notify = function(g, d) {
- var c = this._queues[g];
- if (c) {
- c = c.slice();
- d = Array.prototype.slice.call(arguments, 0);
- for (var f = 0;f < c.length;f++) {
- c[f].apply(null, d);
- }
- }
- };
- e.prototype.notify1 = function(g, d) {
- var c = this._queues[g];
- if (c) {
- for (var c = c.slice(), f = 0;f < c.length;f++) {
- (0,c[f])(g, d);
- }
- }
- };
- return e;
- }();
- k.Callback = b;
- (function(e) {
- e[e.None = 0] = "None";
- e[e.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB";
- e[e.StraightAlphaARGB = 2] = "StraightAlphaARGB";
- e[e.StraightAlphaRGBA = 3] = "StraightAlphaRGBA";
- e[e.JPEG = 4] = "JPEG";
- e[e.PNG = 5] = "PNG";
- e[e.GIF = 6] = "GIF";
- })(k.ImageType || (k.ImageType = {}));
- var v = k.ImageType;
- k.getMIMETypeForImageType = function(e) {
- switch(e) {
- case 4:
- return "image/jpeg";
- case 5:
- return "image/png";
- case 6:
- return "image/gif";
- default:
- return "text/plain";
- }
- };
- (function(e) {
- e.toCSSCursor = function(g) {
- switch(g) {
- case 0:
- return "auto";
- case 2:
- return "pointer";
- case 3:
- return "grab";
- case 4:
- return "text";
- default:
- return "default";
- }
- };
- })(k.UI || (k.UI = {}));
- b = function() {
- function e() {
- this.promise = new Promise(function(g, d) {
- this.resolve = g;
- this.reject = d;
- }.bind(this));
- }
- e.prototype.then = function(g, d) {
- return this.promise.then(g, d);
- };
- return e;
- }();
- k.PromiseWrapper = b;
-})(Shumway || (Shumway = {}));
-(function() {
- function k(c) {
- if ("function" !== typeof c) {
- throw new TypeError("Invalid deferred constructor");
- }
- var f = q();
- c = new c(f);
- var d = f.resolve;
- if ("function" !== typeof d) {
- throw new TypeError("Invalid resolve construction function");
- }
- f = f.reject;
- if ("function" !== typeof f) {
- throw new TypeError("Invalid reject construction function");
- }
- return {promise:c, resolve:d, reject:f};
- }
- function p(c, f) {
- if ("object" !== typeof c || null === c) {
- return !1;
- }
- try {
- var d = c.then;
- if ("function" !== typeof d) {
- return !1;
- }
- d.call(c, f.resolve, f.reject);
- } catch (g) {
- d = f.reject, d(g);
- }
- return !0;
- }
- function u(c) {
- return "object" === typeof c && null !== c && "undefined" !== typeof c.promiseStatus;
- }
- function a(c, f) {
- if ("unresolved" === c.promiseStatus) {
- var d = c.rejectReactions;
- c.result = f;
- c.resolveReactions = void 0;
- c.rejectReactions = void 0;
- c.promiseStatus = "has-rejection";
- w(d, f);
- }
- }
- function w(c, f) {
- for (var d = 0;d < c.length;d++) {
- m({reaction:c[d], argument:f});
- }
- }
- function m(c) {
- 0 === d.length && setTimeout(b, 0);
- d.push(c);
- }
- function b() {
- for (;0 < d.length;) {
- var c = d[0];
- try {
- a: {
- var f = c.reaction, g = f.deferred, x = f.handler, b = void 0, a = void 0;
- try {
- b = x(c.argument);
- } catch (l) {
- var h = g.reject;
- h(l);
- break a;
- }
- if (b === g.promise) {
- h = g.reject, h(new TypeError("Self resolution"));
- } else {
- try {
- if (a = p(b, g), !a) {
- var v = g.resolve;
- v(b);
- }
- } catch (r) {
- h = g.reject, h(r);
- }
- }
- }
- } catch (n) {
- if ("function" === typeof e.onerror) {
- e.onerror(n);
- }
- }
- d.shift();
- }
- }
- function l(c) {
- throw c;
- }
- function r(c) {
- return c;
- }
- function h(c) {
- return function(f) {
- a(c, f);
- };
- }
- function t(c) {
- return function(f) {
- if ("unresolved" === c.promiseStatus) {
- var d = c.resolveReactions;
- c.result = f;
- c.resolveReactions = void 0;
- c.rejectReactions = void 0;
- c.promiseStatus = "has-resolution";
- w(d, f);
- }
- };
- }
- function q() {
- function c(f, d) {
- c.resolve = f;
- c.reject = d;
- }
- return c;
- }
- function n(c, f, d) {
- return function(g) {
- if (g === c) {
- return d(new TypeError("Self resolution"));
- }
- var e = c.promiseConstructor;
- if (u(g) && g.promiseConstructor === e) {
- return g.then(f, d);
- }
- e = k(e);
- return p(g, e) ? e.promise.then(f, d) : f(g);
- };
- }
- function v(c, f, d, g) {
- return function(e) {
- f[c] = e;
- g.countdown--;
- 0 === g.countdown && d.resolve(f);
- };
- }
- function e(c) {
- if ("function" !== typeof c) {
- throw new TypeError("resolver is not a function");
- }
- if ("object" !== typeof this) {
- throw new TypeError("Promise to initialize is not an object");
- }
- this.promiseStatus = "unresolved";
- this.resolveReactions = [];
- this.rejectReactions = [];
- this.result = void 0;
- var f = t(this), d = h(this);
- try {
- c(f, d);
- } catch (g) {
- a(this, g);
- }
- this.promiseConstructor = e;
- return this;
- }
- var g = Function("return this")();
- if (g.Promise) {
- "function" !== typeof g.Promise.all && (g.Promise.all = function(c) {
- var f = 0, d = [], e, b, a = new g.Promise(function(f, c) {
- e = f;
- b = c;
- });
- c.forEach(function(c, g) {
- f++;
- c.then(function(c) {
- d[g] = c;
- f--;
- 0 === f && e(d);
- }, b);
- });
- 0 === f && e(d);
- return a;
- }), "function" !== typeof g.Promise.resolve && (g.Promise.resolve = function(c) {
- return new g.Promise(function(f) {
- f(c);
- });
- });
- } else {
- var d = [];
- e.all = function(c) {
- var f = k(this), d = [], g = {countdown:0}, e = 0;
- c.forEach(function(c) {
- c = this.cast(c);
- var b = v(e, d, f, g);
- c.then(b, f.reject);
- e++;
- g.countdown++;
- }, this);
- 0 === e && f.resolve(d);
- return f.promise;
- };
- e.cast = function(c) {
- if (u(c)) {
- return c;
- }
- var f = k(this);
- f.resolve(c);
- return f.promise;
- };
- e.reject = function(c) {
- var f = k(this);
- f.reject(c);
- return f.promise;
- };
- e.resolve = function(c) {
- var f = k(this);
- f.resolve(c);
- return f.promise;
- };
- e.prototype = {"catch":function(c) {
- this.then(void 0, c);
- }, then:function(c, f) {
- if (!u(this)) {
- throw new TypeError("this is not a Promises");
- }
- var d = k(this.promiseConstructor), g = "function" === typeof f ? f : l, e = n(this, "function" === typeof c ? c : r, g), e = {deferred:d, handler:e}, g = {deferred:d, handler:g};
- switch(this.promiseStatus) {
- case "unresolved":
- this.resolveReactions.push(e);
- this.rejectReactions.push(g);
- break;
- case "has-resolution":
- m({reaction:e, argument:this.result});
- break;
- case "has-rejection":
- m({reaction:g, argument:this.result});
- }
- return d.promise;
- }};
- g.Promise = e;
- }
-})();
-"undefined" !== typeof exports && (exports.Shumway = Shumway);
-(function() {
- function k(k, u, a) {
- k[u] || Object.defineProperty(k, u, {value:a, writable:!0, configurable:!0, enumerable:!1});
- }
- k(String.prototype, "padRight", function(k, u) {
- var a = this, w = a.replace(/\033\[[0-9]*m/g, "").length;
- if (!k || w >= u) {
- return a;
- }
- for (var w = (u - w) / k.length, m = 0;m < w;m++) {
- a += k;
- }
- return a;
- });
- k(String.prototype, "padLeft", function(k, u) {
- var a = this, w = a.length;
- if (!k || w >= u) {
- return a;
- }
- for (var w = (u - w) / k.length, m = 0;m < w;m++) {
- a = k + a;
- }
- return a;
- });
- k(String.prototype, "trim", function() {
- return this.replace(/^\s+|\s+$/g, "");
- });
- k(String.prototype, "endsWith", function(k) {
- return -1 !== this.indexOf(k, this.length - k.length);
- });
- k(Array.prototype, "replace", function(k, u) {
- if (k === u) {
- return 0;
- }
- for (var a = 0, w = 0;w < this.length;w++) {
- this[w] === k && (this[w] = u, a++);
- }
- return a;
- });
-})();
-(function(k) {
- (function(p) {
- var u = k.isObject, a = function() {
- function b(a, l, t, m) {
- this.shortName = a;
- this.longName = l;
- this.type = t;
- m = m || {};
- this.positional = m.positional;
- this.parseFn = m.parse;
- this.value = m.defaultValue;
- }
- b.prototype.parse = function(b) {
- this.value = "boolean" === this.type ? b : "number" === this.type ? parseInt(b, 10) : b;
- this.parseFn && this.parseFn(this.value);
- };
- return b;
- }();
- p.Argument = a;
- var w = function() {
- function b() {
- this.args = [];
- }
- b.prototype.addArgument = function(b, l, t, m) {
- b = new a(b, l, t, m);
- this.args.push(b);
- return b;
- };
- b.prototype.addBoundOption = function(b) {
- this.args.push(new a(b.shortName, b.longName, b.type, {parse:function(a) {
- b.value = a;
- }}));
- };
- b.prototype.addBoundOptionSet = function(b) {
- var a = this;
- b.options.forEach(function(b) {
- m.isOptionSet(b) ? a.addBoundOptionSet(b) : a.addBoundOption(b);
- });
- };
- b.prototype.getUsage = function() {
- var b = "";
- this.args.forEach(function(a) {
- b = a.positional ? b + a.longName : b + ("[-" + a.shortName + "|--" + a.longName + ("boolean" === a.type ? "" : " " + a.type[0].toUpperCase()) + "]");
- b += " ";
- });
- return b;
- };
- b.prototype.parse = function(b) {
- var a = {}, l = [];
- this.args.forEach(function(g) {
- g.positional ? l.push(g) : (a["-" + g.shortName] = g, a["--" + g.longName] = g);
- });
- for (var m = [];b.length;) {
- var n = b.shift(), v = null, e = n;
- if ("--" == n) {
- m = m.concat(b);
- break;
- } else {
- if ("-" == n.slice(0, 1) || "--" == n.slice(0, 2)) {
- v = a[n];
- if (!v) {
- continue;
- }
- e = "boolean" !== v.type ? b.shift() : !0;
- } else {
- l.length ? v = l.shift() : m.push(e);
- }
- }
- v && v.parse(e);
- }
- return m;
- };
- return b;
- }();
- p.ArgumentParser = w;
- var m = function() {
- function a(b, l) {
- void 0 === l && (l = null);
- this.open = !1;
- this.name = b;
- this.settings = l || {};
- this.options = [];
- }
- a.isOptionSet = function(r) {
- return r instanceof a ? !0 : "object" !== typeof r || null === r || r instanceof b ? !1 : "options" in r && "name" in r && "settings" in r;
- };
- a.prototype.register = function(b) {
- if (a.isOptionSet(b)) {
- for (var h = 0;h < this.options.length;h++) {
- var t = this.options[h];
- if (a.isOptionSet(t) && t.name === b.name) {
- return t;
- }
- }
- }
- this.options.push(b);
- if (this.settings) {
- if (a.isOptionSet(b)) {
- h = this.settings[b.name], u(h) && (b.settings = h.settings, b.open = h.open);
- } else {
- if ("undefined" !== typeof this.settings[b.longName]) {
- switch(b.type) {
- case "boolean":
- b.value = !!this.settings[b.longName];
- break;
- case "number":
- b.value = +this.settings[b.longName];
- break;
- default:
- b.value = this.settings[b.longName];
- }
- }
- }
- }
- return b;
- };
- a.prototype.trace = function(b) {
- b.enter(this.name + " {");
- this.options.forEach(function(a) {
- a.trace(b);
- });
- b.leave("}");
- };
- a.prototype.getSettings = function() {
- var b = {};
- this.options.forEach(function(h) {
- a.isOptionSet(h) ? b[h.name] = {settings:h.getSettings(), open:h.open} : b[h.longName] = h.value;
- });
- return b;
- };
- a.prototype.setSettings = function(b) {
- b && this.options.forEach(function(h) {
- a.isOptionSet(h) ? h.name in b && h.setSettings(b[h.name].settings) : h.longName in b && (h.value = b[h.longName]);
- });
- };
- return a;
- }();
- p.OptionSet = m;
- var b = function() {
- function b(a, l, t, m, n, v) {
- void 0 === v && (v = null);
- this.longName = l;
- this.shortName = a;
- this.type = t;
- this.value = this.defaultValue = m;
- this.description = n;
- this.config = v;
- }
- b.prototype.parse = function(b) {
- this.value = b;
- };
- b.prototype.trace = function(b) {
- b.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")");
- };
- return b;
- }();
- p.Option = b;
- })(k.Options || (k.Options = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(u) {
- u.ROOT = "Shumway Options";
- u.shumwayOptions = new k.Options.OptionSet(u.ROOT);
- u.setSettings = function(a) {
- u.shumwayOptions.setSettings(a);
- };
- u.getSettings = function() {
- return u.shumwayOptions.getSettings();
- };
- })(k.Settings || (k.Settings = {}));
- var p = k.Options.Option;
- k.loggingOptions = k.Settings.shumwayOptions.register(new k.Options.OptionSet("Logging Options"));
- k.omitRepeatedWarnings = k.loggingOptions.register(new p("wo", "warnOnce", "boolean", !0, "Omit Repeated Warnings"));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- var u = function() {
- function a(a, m) {
- this._parent = a;
- this._timers = k.ObjectUtilities.createMap();
- this._name = m;
- this._count = this._total = this._last = this._begin = 0;
- }
- a.time = function(k, m) {
- a.start(k);
- m();
- a.stop();
- };
- a.start = function(k) {
- a._top = a._top._timers[k] || (a._top._timers[k] = new a(a._top, k));
- a._top.start();
- k = a._flat._timers[k] || (a._flat._timers[k] = new a(a._flat, k));
- k.start();
- a._flatStack.push(k);
- };
- a.stop = function() {
- a._top.stop();
- a._top = a._top._parent;
- a._flatStack.pop().stop();
- };
- a.stopStart = function(k) {
- a.stop();
- a.start(k);
- };
- a.prototype.start = function() {
- this._begin = k.getTicks();
- };
- a.prototype.stop = function() {
- this._last = k.getTicks() - this._begin;
- this._total += this._last;
- this._count += 1;
- };
- a.prototype.toJSON = function() {
- return {name:this._name, total:this._total, timers:this._timers};
- };
- 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 m in this._timers) {
- this._timers[m].trace(a);
- }
- a.outdent();
- };
- a.trace = function(k) {
- a._base.trace(k);
- a._flat.trace(k);
- };
- a._base = new a(null, "Total");
- a._top = a._base;
- a._flat = new a(null, "Flat");
- a._flatStack = [];
- return a;
- }();
- p.Timer = u;
- u = function() {
- function a(a) {
- this._enabled = a;
- this.clear();
- }
- Object.defineProperty(a.prototype, "counts", {get:function() {
- return this._counts;
- }, enumerable:!0, configurable:!0});
- a.prototype.setEnabled = function(a) {
- this._enabled = a;
- };
- a.prototype.clear = function() {
- this._counts = k.ObjectUtilities.createMap();
- this._times = k.ObjectUtilities.createMap();
- };
- a.prototype.toJSON = function() {
- return {counts:this._counts, times:this._times};
- };
- a.prototype.count = function(a, m, b) {
- void 0 === m && (m = 1);
- void 0 === b && (b = 0);
- if (this._enabled) {
- return void 0 === this._counts[a] && (this._counts[a] = 0, this._times[a] = 0), this._counts[a] += m, this._times[a] += b, this._counts[a];
- }
- };
- a.prototype.trace = function(a) {
- for (var m in this._counts) {
- a.writeLn(m + ": " + this._counts[m]);
- }
- };
- a.prototype._pairToString = function(a, m) {
- var b = m[0], l = m[1], r = a[b], b = b + ": " + l;
- r && (b += ", " + r.toFixed(4), 1 < l && (b += " (" + (r / l).toFixed(4) + ")"));
- return b;
- };
- a.prototype.toStringSorted = function() {
- var a = this, m = this._times, b = [], l;
- for (l in this._counts) {
- b.push([l, this._counts[l]]);
- }
- b.sort(function(b, a) {
- return a[1] - b[1];
- });
- return b.map(function(b) {
- return a._pairToString(m, b);
- }).join(", ");
- };
- a.prototype.traceSorted = function(a, m) {
- void 0 === m && (m = !1);
- var b = this, l = this._times, r = [], h;
- for (h in this._counts) {
- r.push([h, this._counts[h]]);
- }
- r.sort(function(b, a) {
- return a[1] - b[1];
- });
- m ? a.writeLn(r.map(function(a) {
- return b._pairToString(l, a);
- }).join(", ")) : r.forEach(function(h) {
- a.writeLn(b._pairToString(l, h));
- });
- };
- a.instance = new a(!0);
- return a;
- }();
- p.Counter = u;
- u = function() {
- function a(a) {
- this._samples = new Float64Array(a);
- this._index = this._count = 0;
- }
- a.prototype.push = function(a) {
- this._count < this._samples.length && this._count++;
- this._index++;
- this._samples[this._index % this._samples.length] = a;
- };
- a.prototype.average = function() {
- for (var a = 0, m = 0;m < this._count;m++) {
- a += this._samples[m];
- }
- return a / this._count;
- };
- return a;
- }();
- p.Average = u;
- })(k.Metrics || (k.Metrics = {}));
-})(Shumway || (Shumway = {}));
-var __extends = this.__extends || function(k, p) {
- function u() {
- this.constructor = k;
- }
- for (var a in p) {
- p.hasOwnProperty(a) && (k[a] = p[a]);
- }
- u.prototype = p.prototype;
- k.prototype = new u;
-};
-(function(k) {
- (function(k) {
- function u(d) {
- for (var c = Math.max.apply(null, d), f = d.length, g = 1 << c, e = new Uint32Array(g), b = c << 16 | 65535, a = 0;a < g;a++) {
- e[a] = b;
- }
- for (var b = 0, a = 1, l = 2;a <= c;b <<= 1, ++a, l <<= 1) {
- for (var h = 0;h < f;++h) {
- if (d[h] === a) {
- for (var v = 0, n = 0;n < a;++n) {
- v = 2 * v + (b >> n & 1);
- }
- for (n = v;n < g;n += l) {
- e[n] = a << 16 | h;
- }
- ++b;
- }
- }
- }
- return {codes:e, maxBits:c};
- }
- var a;
- (function(d) {
- d[d.INIT = 0] = "INIT";
- d[d.BLOCK_0 = 1] = "BLOCK_0";
- d[d.BLOCK_1 = 2] = "BLOCK_1";
- d[d.BLOCK_2_PRE = 3] = "BLOCK_2_PRE";
- d[d.BLOCK_2 = 4] = "BLOCK_2";
- d[d.DONE = 5] = "DONE";
- d[d.ERROR = 6] = "ERROR";
- d[d.VERIFY_HEADER = 7] = "VERIFY_HEADER";
- })(a || (a = {}));
- a = function() {
- function d(c) {
- }
- d.prototype.push = function(c) {
- };
- d.prototype.close = function() {
- };
- d.create = function(c) {
- return "undefined" !== typeof ShumwayCom && ShumwayCom.createSpecialInflate ? new v(c, ShumwayCom.createSpecialInflate) : new w(c);
- };
- d.prototype._processZLibHeader = function(c, f, d) {
- if (f + 2 > d) {
- return 0;
- }
- c = c[f] << 8 | c[f + 1];
- f = null;
- 2048 !== (c & 3840) ? f = "inflate: unknown compression method" : 0 !== c % 31 ? f = "inflate: bad FCHECK" : 0 !== (c & 32) && (f = "inflate: FDICT bit set");
- if (f) {
- if (this.onError) {
- this.onError(f);
- }
- return -1;
- }
- return 2;
- };
- d.inflate = function(c, f, g) {
- var e = new Uint8Array(f), b = 0;
- f = d.create(g);
- f.onData = function(f) {
- var c = Math.min(f.length, e.length - b);
- c && k.memCopy(e, f, b, 0, c);
- b += c;
- };
- f.onError = function(f) {
- throw Error(f);
- };
- f.push(c);
- f.close();
- return e;
- };
- return d;
- }();
- k.Inflate = a;
- var w = function(d) {
- function c(f) {
- d.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 = 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};
- if (!n) {
- m = 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);
- l = new Uint8Array(30);
- for (var c = f = 0, g = 1;30 > f;++f) {
- b[f] = g, g += 1 << (l[f] = ~~((c += 2 < f ? 1 : 0) / 2));
- }
- var e = new Uint8Array(288);
- for (f = 0;32 > f;++f) {
- e[f] = 5;
- }
- r = u(e.subarray(0, 32));
- h = new Uint16Array(29);
- t = new Uint8Array(29);
- c = f = 0;
- for (g = 3;29 > f;++f) {
- h[f] = g - (28 == f ? 1 : 0), g += 1 << (t[f] = ~~((c += 4 < f ? 1 : 0) / 4 % 6));
- }
- for (f = 0;288 > f;++f) {
- e[f] = 144 > f || 279 < f ? 8 : 256 > f ? 9 : 7;
- }
- q = u(e);
- n = !0;
- }
- }
- __extends(c, d);
- c.prototype.push = function(f) {
- if (!this._buffer || this._buffer.length < this._bufferSize + f.length) {
- var c = new Uint8Array(this._bufferSize + f.length);
- this._buffer && c.set(this._buffer);
- this._buffer = c;
- }
- this._buffer.set(f, this._bufferSize);
- this._bufferSize += f.length;
- this._bufferPosition = 0;
- f = !1;
- do {
- c = this._windowPosition;
- if (0 === this._state && (f = this._decodeInitState())) {
- break;
- }
- switch(this._state) {
- case 1:
- f = this._decodeBlock0();
- break;
- case 3:
- if (f = this._decodeBlock2Pre()) {
- break;
- }
- ;
- case 2:
- ;
- case 4:
- f = this._decodeBlock();
- break;
- case 6:
- ;
- case 5:
- this._bufferPosition = this._bufferSize;
- break;
- case 7:
- var d = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize);
- 0 < d ? (this._bufferPosition += d, this._state = 0) : 0 === d ? f = !0 : this._state = 6;
- }
- if (0 < this._windowPosition - c) {
- this.onData(this._window.subarray(c, 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 (!f && 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;
- };
- c.prototype._decodeInitState = function() {
- if (this._isFinalBlock) {
- return this._state = 5, !1;
- }
- var f = this._buffer, c = this._bufferSize, d = this._bitBuffer, g = this._bitLength, e = this._bufferPosition;
- if (3 > (c - e << 3) + g) {
- return !0;
- }
- 3 > g && (d |= f[e++] << g, g += 8);
- var b = d & 7, d = d >> 3, g = g - 3;
- switch(b >> 1) {
- case 0:
- g = d = 0;
- if (4 > c - e) {
- return !0;
- }
- var a = f[e] | f[e + 1] << 8, f = f[e + 2] | f[e + 3] << 8, e = e + 4;
- if (65535 !== (a ^ f)) {
- this._error("inflate: invalid block 0 length");
- f = 6;
- break;
- }
- 0 === a ? f = 0 : (this._block0Read = a, f = 1);
- break;
- case 1:
- f = 2;
- this._literalTable = q;
- this._distanceTable = r;
- break;
- case 2:
- if (26 > (c - e << 3) + g) {
- return !0;
- }
- for (;14 > g;) {
- d |= f[e++] << g, g += 8;
- }
- a = (d >> 10 & 15) + 4;
- if ((c - e << 3) + g < 14 + 3 * a) {
- return !0;
- }
- for (var c = {numLiteralCodes:(d & 31) + 257, numDistanceCodes:(d >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, d = d >> 14, g = g - 14, l = new Uint8Array(19), h = 0;h < a;++h) {
- 3 > g && (d |= f[e++] << g, g += 8), l[m[h]] = d & 7, d >>= 3, g -= 3;
- }
- for (;19 > h;h++) {
- l[m[h]] = 0;
- }
- c.bitLengths = new Uint8Array(c.numLiteralCodes + c.numDistanceCodes);
- c.codeLengthTable = u(l);
- this._block2State = c;
- f = 3;
- break;
- default:
- return this._error("inflate: unsupported block type"), !1;
- }
- this._isFinalBlock = !!(b & 1);
- this._state = f;
- this._bufferPosition = e;
- this._bitBuffer = d;
- this._bitLength = g;
- return !1;
- };
- c.prototype._error = function(f) {
- if (this.onError) {
- this.onError(f);
- }
- };
- c.prototype._decodeBlock0 = function() {
- var f = this._bufferPosition, c = this._windowPosition, d = this._block0Read, g = 65794 - c, e = this._bufferSize - f, b = e < d, a = Math.min(g, e, d);
- this._window.set(this._buffer.subarray(f, f + a), c);
- this._windowPosition = c + a;
- this._bufferPosition = f + a;
- this._block0Read = d - a;
- return d === a ? (this._state = 0, !1) : b && g < e;
- };
- c.prototype._readBits = function(f) {
- var c = this._bitBuffer, d = this._bitLength;
- if (f > d) {
- var g = this._bufferPosition, e = this._bufferSize;
- do {
- if (g >= e) {
- return this._bufferPosition = g, this._bitBuffer = c, this._bitLength = d, -1;
- }
- c |= this._buffer[g++] << d;
- d += 8;
- } while (f > d);
- this._bufferPosition = g;
- }
- this._bitBuffer = c >> f;
- this._bitLength = d - f;
- return c & (1 << f) - 1;
- };
- c.prototype._readCode = function(f) {
- var c = this._bitBuffer, d = this._bitLength, g = f.maxBits;
- if (g > d) {
- var e = this._bufferPosition, b = this._bufferSize;
- do {
- if (e >= b) {
- return this._bufferPosition = e, this._bitBuffer = c, this._bitLength = d, -1;
- }
- c |= this._buffer[e++] << d;
- d += 8;
- } while (g > d);
- this._bufferPosition = e;
- }
- f = f.codes[c & (1 << g) - 1];
- g = f >> 16;
- if (f & 32768) {
- return this._error("inflate: invalid encoding"), this._state = 6, -1;
- }
- this._bitBuffer = c >> g;
- this._bitLength = d - g;
- return f & 65535;
- };
- c.prototype._decodeBlock2Pre = function() {
- var f = this._block2State, c = f.numLiteralCodes + f.numDistanceCodes, d = f.bitLengths, g = f.codesRead, e = 0 < g ? d[g - 1] : 0, b = f.codeLengthTable, a;
- if (0 < f.dupBits) {
- a = this._readBits(f.dupBits);
- if (0 > a) {
- return !0;
- }
- for (;a--;) {
- d[g++] = e;
- }
- f.dupBits = 0;
- }
- for (;g < c;) {
- var l = this._readCode(b);
- if (0 > l) {
- return f.codesRead = g, !0;
- }
- if (16 > l) {
- d[g++] = e = l;
- } else {
- var h;
- switch(l) {
- case 16:
- h = 2;
- a = 3;
- l = e;
- break;
- case 17:
- a = h = 3;
- l = 0;
- break;
- case 18:
- h = 7, a = 11, l = 0;
- }
- for (;a--;) {
- d[g++] = l;
- }
- a = this._readBits(h);
- if (0 > a) {
- return f.codesRead = g, f.dupBits = h, !0;
- }
- for (;a--;) {
- d[g++] = l;
- }
- e = l;
- }
- }
- this._literalTable = u(d.subarray(0, f.numLiteralCodes));
- this._distanceTable = u(d.subarray(f.numLiteralCodes));
- this._state = 4;
- this._block2State = null;
- return !1;
- };
- c.prototype._decodeBlock = function() {
- var f = this._literalTable, c = this._distanceTable, d = this._window, g = this._windowPosition, e = this._copyState, a, v, n, r;
- if (0 !== e.state) {
- switch(e.state) {
- case 1:
- if (0 > (a = this._readBits(e.lenBits))) {
- return !0;
- }
- e.len += a;
- e.state = 2;
- case 2:
- if (0 > (a = this._readCode(c))) {
- return !0;
- }
- e.distBits = l[a];
- e.dist = b[a];
- e.state = 3;
- case 3:
- a = 0;
- if (0 < e.distBits && 0 > (a = this._readBits(e.distBits))) {
- return !0;
- }
- r = e.dist + a;
- v = e.len;
- for (a = g - r;v--;) {
- d[g++] = d[a++];
- }
- e.state = 0;
- if (65536 <= g) {
- return this._windowPosition = g, !1;
- }
- break;
- }
- }
- do {
- a = this._readCode(f);
- if (0 > a) {
- return this._windowPosition = g, !0;
- }
- if (256 > a) {
- d[g++] = a;
- } else {
- if (256 < a) {
- this._windowPosition = g;
- a -= 257;
- n = t[a];
- v = h[a];
- a = 0 === n ? 0 : this._readBits(n);
- if (0 > a) {
- return e.state = 1, e.len = v, e.lenBits = n, !0;
- }
- v += a;
- a = this._readCode(c);
- if (0 > a) {
- return e.state = 2, e.len = v, !0;
- }
- n = l[a];
- r = b[a];
- a = 0 === n ? 0 : this._readBits(n);
- if (0 > a) {
- return e.state = 3, e.len = v, e.dist = r, e.distBits = n, !0;
- }
- r += a;
- for (a = g - r;v--;) {
- d[g++] = d[a++];
- }
- } else {
- this._state = 0;
- break;
- }
- }
- } while (65536 > g);
- this._windowPosition = g;
- return !1;
- };
- return c;
- }(a), m, b, l, r, h, t, q, n = !1, v = function(d) {
- function c(f, c) {
- d.call(this, f);
- this._verifyHeader = f;
- this._specialInflate = c();
- this._specialInflate.setDataCallback(function(f) {
- this.onData(f);
- }.bind(this));
- }
- __extends(c, d);
- c.prototype.push = function(f) {
- if (this._verifyHeader) {
- var c;
- this._buffer ? (c = new Uint8Array(this._buffer.length + f.length), c.set(this._buffer), c.set(f, this._buffer.length), this._buffer = null) : c = new Uint8Array(f);
- var d = this._processZLibHeader(c, 0, c.length);
- if (0 === d) {
- this._buffer = c;
- return;
- }
- this._verifyHeader = !0;
- 0 < d && (f = c.subarray(d));
- }
- this._specialInflate.push(f);
- };
- c.prototype.close = function() {
- this._specialInflate && (this._specialInflate.close(), this._specialInflate = null);
- };
- return c;
- }(a), e;
- (function(d) {
- d[d.WRITE = 0] = "WRITE";
- d[d.DONE = 1] = "DONE";
- d[d.ZLIB_HEADER = 2] = "ZLIB_HEADER";
- })(e || (e = {}));
- var g = function() {
- function d() {
- this.a = 1;
- this.b = 0;
- }
- d.prototype.update = function(c, f, d) {
- for (var g = this.a, e = this.b;f < d;++f) {
- g = (g + (c[f] & 255)) % 65521, e = (e + g) % 65521;
- }
- this.a = g;
- this.b = e;
- };
- d.prototype.getChecksum = function() {
- return this.b << 16 | this.a;
- };
- return d;
- }();
- k.Adler32 = g;
- e = function() {
- function d(c) {
- this._state = (this._writeZlibHeader = c) ? 2 : 0;
- this._adler32 = c ? new g : null;
- }
- d.prototype.push = function(c) {
- 2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0);
- for (var f = c.length, d = f + 5 * Math.ceil(f / 65535), d = new Uint8Array(d), g = 0, e = 0;65535 < f;) {
- d.set(new Uint8Array([0, 255, 255, 0, 0]), g), g += 5, d.set(c.subarray(e, e + 65535), g), e += 65535, g += 65535, f -= 65535;
- }
- d.set(new Uint8Array([0, f & 255, f >> 8 & 255, ~f & 255, ~f >> 8 & 255]), g);
- g += 5;
- d.set(c.subarray(e, f), g);
- this.onData(d);
- this._adler32 && this._adler32.update(c, 0, f);
- };
- d.prototype.close = function() {
- this._state = 1;
- this.onData(new Uint8Array([1, 0, 0, 255, 255]));
- if (this._adler32) {
- var c = this._adler32.getChecksum();
- this.onData(new Uint8Array([c & 255, c >> 8 & 255, c >> 16 & 255, c >>> 24 & 255]));
- }
- };
- return d;
- }();
- k.Deflate = e;
- })(k.ArrayUtilities || (k.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- function u(c) {
- for (var f = new Uint16Array(c), d = 0;d < c;d++) {
- f[d] = 1024;
- }
- return f;
- }
- function a(c, f, d, g) {
- for (var e = 1, b = 0, a = 0;a < d;a++) {
- var l = g.decodeBit(c, e + f), e = (e << 1) + l, b = b | l << a
- }
- return b;
- }
- function w(c, f) {
- var d = [];
- d.length = f;
- for (var g = 0;g < f;g++) {
- d[g] = new h(c);
- }
- return d;
- }
- var m = function() {
- function c() {
- this.pos = this.available = 0;
- this.buffer = new Uint8Array(2E3);
- }
- c.prototype.append = function(f) {
- var c = this.pos + this.available, d = c + f.length;
- if (d > this.buffer.length) {
- for (var g = 2 * this.buffer.length;g < d;) {
- g *= 2;
- }
- d = new Uint8Array(g);
- d.set(this.buffer);
- this.buffer = d;
- }
- this.buffer.set(f, c);
- this.available += f.length;
- };
- c.prototype.compact = function() {
- 0 !== this.available && (this.buffer.set(this.buffer.subarray(this.pos, this.pos + this.available), 0), this.pos = 0);
- };
- c.prototype.readByte = function() {
- if (0 >= this.available) {
- throw Error("Unexpected end of file");
- }
- this.available--;
- return this.buffer[this.pos++];
- };
- return c;
- }(), b = function() {
- function c(f) {
- this.onData = f;
- this.processed = 0;
- }
- c.prototype.writeBytes = function(f) {
- this.onData.call(null, f);
- this.processed += f.length;
- };
- return c;
- }(), l = function() {
- function c(f) {
- this.outStream = f;
- this.buf = null;
- this.size = this.pos = 0;
- this.isFull = !1;
- this.totalPos = this.writePos = 0;
- }
- c.prototype.create = function(f) {
- this.buf = new Uint8Array(f);
- this.pos = 0;
- this.size = f;
- this.isFull = !1;
- this.totalPos = this.writePos = 0;
- };
- c.prototype.putByte = function(f) {
- this.totalPos++;
- this.buf[this.pos++] = f;
- this.pos === this.size && (this.flush(), this.pos = 0, this.isFull = !0);
- };
- c.prototype.getByte = function(f) {
- return this.buf[f <= this.pos ? this.pos - f : this.size - f + this.pos];
- };
- c.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);
- };
- c.prototype.copyMatch = function(f, c) {
- for (var d = this.pos, g = this.size, e = this.buf, b = f <= d ? d - f : g - f + d, a = c;0 < a;) {
- for (var l = Math.min(Math.min(a, g - d), g - b), h = 0;h < l;h++) {
- var v = e[b++];
- e[d++] = v;
- }
- d === g && (this.pos = d, this.flush(), d = 0, this.isFull = !0);
- b === g && (b = 0);
- a -= l;
- }
- this.pos = d;
- this.totalPos += c;
- };
- c.prototype.checkDistance = function(f) {
- return f <= this.pos || this.isFull;
- };
- c.prototype.isEmpty = function() {
- return 0 === this.pos && !this.isFull;
- };
- return c;
- }(), r = function() {
- function c(f) {
- this.inStream = f;
- this.code = this.range = 0;
- this.corrupted = !1;
- }
- c.prototype.init = function() {
- 0 !== this.inStream.readByte() && (this.corrupted = !0);
- this.range = -1;
- for (var f = 0, c = 0;4 > c;c++) {
- f = f << 8 | this.inStream.readByte();
- }
- f === this.range && (this.corrupted = !0);
- this.code = f;
- };
- c.prototype.isFinishedOK = function() {
- return 0 === this.code;
- };
- c.prototype.decodeDirectBits = function(f) {
- var c = 0, d = this.range, g = this.code;
- do {
- var d = d >>> 1 | 0, g = g - d | 0, e = g >> 31, g = g + (d & e) | 0;
- g === d && (this.corrupted = !0);
- 0 <= d && 16777216 > d && (d <<= 8, g = g << 8 | this.inStream.readByte());
- c = (c << 1) + e + 1 | 0;
- } while (--f);
- this.range = d;
- this.code = g;
- return c;
- };
- c.prototype.decodeBit = function(f, c) {
- var d = this.range, g = this.code, e = f[c], b = (d >>> 11) * e;
- g >>> 0 < b ? (e = e + (2048 - e >> 5) | 0, d = b | 0, b = 0) : (e = e - (e >> 5) | 0, g = g - b | 0, d = d - b | 0, b = 1);
- f[c] = e & 65535;
- 0 <= d && 16777216 > d && (d <<= 8, g = g << 8 | this.inStream.readByte());
- this.range = d;
- this.code = g;
- return b;
- };
- return c;
- }(), h = function() {
- function d(f) {
- this.numBits = f;
- this.probs = u(1 << f);
- }
- d.prototype.decode = function(f) {
- for (var d = 1, c = 0;c < this.numBits;c++) {
- d = (d << 1) + f.decodeBit(this.probs, d);
- }
- return d - (1 << this.numBits);
- };
- d.prototype.reverseDecode = function(f) {
- return a(this.probs, 0, this.numBits, f);
- };
- return d;
- }(), t = function() {
- function d() {
- this.choice = u(2);
- this.lowCoder = w(3, 16);
- this.midCoder = w(3, 16);
- this.highCoder = new h(8);
- }
- d.prototype.decode = function(f, d) {
- return 0 === f.decodeBit(this.choice, 0) ? this.lowCoder[d].decode(f) : 0 === f.decodeBit(this.choice, 1) ? 8 + this.midCoder[d].decode(f) : 16 + this.highCoder.decode(f);
- };
- return d;
- }(), q = function() {
- function d(f, c) {
- this.rangeDec = new r(f);
- this.outWindow = new l(c);
- 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;
- }
- d.prototype.decodeProperties = function(f) {
- var d = f[0];
- if (225 <= d) {
- throw Error("Incorrect LZMA properties");
- }
- this.lc = d % 9;
- d = d / 9 | 0;
- this.pb = d / 5 | 0;
- this.lp = d % 5;
- for (d = this.dictSizeInProperties = 0;4 > d;d++) {
- this.dictSizeInProperties |= f[d + 1] << 8 * d;
- }
- this.dictSize = this.dictSizeInProperties;
- 4096 > this.dictSize && (this.dictSize = 4096);
- };
- d.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;
- };
- d.prototype.decodeLiteral = function(f, d) {
- var c = this.outWindow, g = this.rangeDec, e = 0;
- c.isEmpty() || (e = c.getByte(1));
- var b = 1, e = 768 * (((c.totalPos & (1 << this.lp) - 1) << this.lc) + (e >> 8 - this.lc));
- if (7 <= f) {
- c = c.getByte(d + 1);
- do {
- var a = c >> 7 & 1, c = c << 1, l = g.decodeBit(this.litProbs, e + ((1 + a << 8) + b)), b = b << 1 | l;
- if (a !== l) {
- break;
- }
- } while (256 > b);
- }
- for (;256 > b;) {
- b = b << 1 | g.decodeBit(this.litProbs, e + b);
- }
- return b - 256 & 255;
- };
- d.prototype.decodeDistance = function(f) {
- var d = f;
- 3 < d && (d = 3);
- f = this.rangeDec;
- d = this.posSlotDecoder[d].decode(f);
- if (4 > d) {
- return d;
- }
- var c = (d >> 1) - 1, g = (2 | d & 1) << c;
- 14 > d ? g = g + a(this.posDecoders, g - d, c, f) | 0 : (g = g + (f.decodeDirectBits(c - 4) << 4) | 0, g = g + this.alignDecoder.reverseDecode(f) | 0);
- return g;
- };
- d.prototype.init = function() {
- this.litProbs = u(768 << this.lc + this.lp);
- this.posSlotDecoder = w(6, 4);
- this.alignDecoder = new h(4);
- this.posDecoders = u(115);
- this.isMatch = u(192);
- this.isRep = u(12);
- this.isRepG0 = u(12);
- this.isRepG1 = u(12);
- this.isRepG2 = u(12);
- this.isRep0Long = u(192);
- this.lenDecoder = new t;
- this.repLenDecoder = new t;
- };
- d.prototype.decode = function(f) {
- for (var d = this.rangeDec, c = this.outWindow, b = this.pb, a = this.dictSize, l = this.markerIsMandatory, h = this.leftToUnpack, r = this.isMatch, m = this.isRep, t = this.isRepG0, q = this.isRepG1, k = this.isRepG2, u = this.isRep0Long, p = this.lenDecoder, w = this.repLenDecoder, z = this.reps[0], B = this.reps[1], E = this.reps[2], A = this.reps[3], C = this.state;;) {
- if (f && 48 > d.inStream.available) {
- this.outWindow.flush();
- break;
- }
- if (0 === h && !l && (this.outWindow.flush(), d.isFinishedOK())) {
- return e;
- }
- var F = c.totalPos & (1 << b) - 1;
- if (0 === d.decodeBit(r, (C << 4) + F)) {
- if (0 === h) {
- return n;
- }
- c.putByte(this.decodeLiteral(C, z));
- C = 4 > C ? 0 : 10 > C ? C - 3 : C - 6;
- h--;
- } else {
- if (0 !== d.decodeBit(m, C)) {
- if (0 === h || c.isEmpty()) {
- return n;
- }
- if (0 === d.decodeBit(t, C)) {
- if (0 === d.decodeBit(u, (C << 4) + F)) {
- C = 7 > C ? 9 : 11;
- c.putByte(c.getByte(z + 1));
- h--;
- continue;
- }
- } else {
- var G;
- 0 === d.decodeBit(q, C) ? G = B : (0 === d.decodeBit(k, C) ? G = E : (G = A, A = E), E = B);
- B = z;
- z = G;
- }
- F = w.decode(d, F);
- C = 7 > C ? 8 : 11;
- } else {
- A = E;
- E = B;
- B = z;
- F = p.decode(d, F);
- C = 7 > C ? 7 : 10;
- z = this.decodeDistance(F);
- if (-1 === z) {
- return this.outWindow.flush(), d.isFinishedOK() ? v : n;
- }
- if (0 === h || z >= a || !c.checkDistance(z)) {
- return n;
- }
- }
- F += 2;
- G = !1;
- void 0 !== h && h < F && (F = h, G = !0);
- c.copyMatch(z + 1, F);
- h -= F;
- if (G) {
- return n;
- }
- }
- }
- this.state = C;
- this.reps[0] = z;
- this.reps[1] = B;
- this.reps[2] = E;
- this.reps[3] = A;
- this.leftToUnpack = h;
- return g;
- };
- d.prototype.flushOutput = function() {
- this.outWindow.flush();
- };
- return d;
- }(), n = 0, v = 1, e = 2, g = 3, d;
- (function(d) {
- d[d.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER";
- d[d.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER";
- d[d.PROCESS_DATA = 2] = "PROCESS_DATA";
- d[d.CLOSED = 3] = "CLOSED";
- d[d.ERROR = 4] = "ERROR";
- })(d || (d = {}));
- d = function() {
- function d(f) {
- void 0 === f && (f = !1);
- this._state = f ? 1 : 0;
- this.buffer = null;
- }
- d.prototype.push = function(f) {
- if (2 > this._state) {
- var d = this.buffer ? this.buffer.length : 0, c = (1 === this._state ? 17 : 13) + 5;
- if (d + f.length < c) {
- c = new Uint8Array(d + f.length);
- 0 < d && c.set(this.buffer);
- c.set(f, d);
- this.buffer = c;
- return;
- }
- var e = new Uint8Array(c);
- 0 < d && e.set(this.buffer);
- e.set(f.subarray(0, c - d), d);
- this._inStream = new m;
- this._inStream.append(e.subarray(c - 5));
- this._outStream = new b(function(d) {
- this.onData.call(null, d);
- }.bind(this));
- this._decoder = new q(this._inStream, this._outStream);
- if (1 === this._state) {
- this._decoder.decodeProperties(e.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((e[4] | e[5] << 8 | e[6] << 16 | e[7] << 24) >>> 0) - 8;
- } else {
- this._decoder.decodeProperties(e.subarray(0, 5));
- for (var d = 0, a = !1, l = 0;8 > l;l++) {
- var h = e[5 + l];
- 255 !== h && (a = !0);
- d |= h << 8 * l;
- }
- this._decoder.markerIsMandatory = !a;
- this._decoder.unpackSize = a ? d : void 0;
- }
- this._decoder.create();
- f = f.subarray(c);
- this._state = 2;
- } else {
- if (2 !== this._state) {
- return;
- }
- }
- try {
- this._inStream.append(f);
- var v = this._decoder.decode(!0);
- this._inStream.compact();
- v !== g && this._checkError(v);
- } catch (n) {
- this._decoder.flushOutput(), this._decoder = null, this._error(n);
- }
- };
- d.prototype.close = function() {
- if (2 === this._state) {
- this._state = 3;
- try {
- var d = this._decoder.decode(!1);
- this._checkError(d);
- } catch (c) {
- this._decoder.flushOutput(), this._error(c);
- }
- this._decoder = null;
- }
- };
- d.prototype._error = function(d) {
- this._state = 4;
- if (this.onError) {
- this.onError(d);
- }
- };
- d.prototype._checkError = function(d) {
- var c;
- d === n ? c = "LZMA decoding error" : d === g ? c = "Decoding is not complete" : d === v ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (c = "Finished with end marker before than specified size") : c = "Internal LZMA Error";
- c && this._error(c);
- };
- return d;
- }();
- k.LzmaDecoder = d;
- })(k.ArrayUtilities || (k.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- function u(b) {
- return "string" === typeof b ? b : void 0 == b ? null : b + "";
- }
- var a = k.Debug.notImplemented, w = k.StringUtilities.utf8decode, m = k.StringUtilities.utf8encode, b = k.NumberUtilities.clamp, l = function() {
- return function(b, a, e) {
- this.buffer = b;
- this.length = a;
- this.littleEndian = e;
- };
- }();
- p.PlainObjectDataBuffer = l;
- for (var r = new Uint32Array(33), h = 1, t = 0;32 >= h;h++) {
- r[h] = t = t << 1 | 1;
- }
- var q;
- (function(b) {
- b[b.U8 = 1] = "U8";
- b[b.I32 = 2] = "I32";
- b[b.F32 = 4] = "F32";
- })(q || (q = {}));
- h = function() {
- function h(b) {
- void 0 === b && (b = h.INITIAL_SIZE);
- this._buffer || (this._buffer = new ArrayBuffer(b), this._position = this._length = 0, this._resetViews(), this._littleEndian = h._nativeLittleEndian, this._bitLength = this._bitBuffer = 0);
- }
- h.FromArrayBuffer = function(b, e) {
- void 0 === e && (e = -1);
- var g = Object.create(h.prototype);
- g._buffer = b;
- g._length = -1 === e ? b.byteLength : e;
- g._position = 0;
- g._resetViews();
- g._littleEndian = h._nativeLittleEndian;
- g._bitBuffer = 0;
- g._bitLength = 0;
- return g;
- };
- h.FromPlainObject = function(b) {
- var e = h.FromArrayBuffer(b.buffer, b.length);
- e._littleEndian = b.littleEndian;
- return e;
- };
- h.prototype.toPlainObject = function() {
- return new l(this._buffer, this._length, this._littleEndian);
- };
- h.prototype._resetViews = function() {
- this._u8 = new Uint8Array(this._buffer);
- this._f32 = this._i32 = null;
- };
- h.prototype._requestViews = function(b) {
- 0 === (this._buffer.byteLength & 3) && (null === this._i32 && b & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && b & 4 && (this._f32 = new Float32Array(this._buffer)));
- };
- h.prototype.getBytes = function() {
- return new Uint8Array(this._buffer, 0, this._length);
- };
- h.prototype._ensureCapacity = function(b) {
- var e = this._buffer;
- if (!(e.byteLength >= b)) {
- for (var g = Math.max(e.byteLength, 1);g < b;) {
- g *= 2;
- }
- 4294967295 < g && this.sec.throwError("RangeError", Errors.ParamRangeError);
- g = h._arrayBufferPool.acquire(g);
- b = this._u8;
- this._buffer = g;
- this._resetViews();
- this._u8.set(b);
- g = this._u8;
- for (b = b.length;b < g.length;b++) {
- g[b] = 0;
- }
- h._arrayBufferPool.release(e);
- }
- };
- h.prototype.clear = function() {
- this._position = this._length = 0;
- };
- h.prototype.readBoolean = function() {
- return 0 !== this.readUnsignedByte();
- };
- h.prototype.readByte = function() {
- return this.readUnsignedByte() << 24 >> 24;
- };
- h.prototype.readUnsignedByte = function() {
- this._position + 1 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- return this._u8[this._position++];
- };
- h.prototype.readBytes = function(b, e, g) {
- var d = this._position;
- e >>>= 0;
- g >>>= 0;
- 0 === g && (g = this._length - d);
- d + g > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- b.length < e + g && (b._ensureCapacity(e + g), b.length = e + g);
- b._u8.set(new Uint8Array(this._buffer, d, g), e);
- this._position += g;
- };
- h.prototype.readShort = function() {
- return this.readUnsignedShort() << 16 >> 16;
- };
- h.prototype.readUnsignedShort = function() {
- var b = this._u8, e = this._position;
- e + 2 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = b[e + 0], b = b[e + 1];
- this._position = e + 2;
- return this._littleEndian ? b << 8 | g : g << 8 | b;
- };
- h.prototype.readInt = function() {
- var b = this._u8, e = this._position;
- e + 4 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = b[e + 0], d = b[e + 1], c = b[e + 2], b = b[e + 3];
- this._position = e + 4;
- return this._littleEndian ? b << 24 | c << 16 | d << 8 | g : g << 24 | d << 16 | c << 8 | b;
- };
- h.prototype.readUnsignedInt = function() {
- return this.readInt() >>> 0;
- };
- h.prototype.readFloat = function() {
- var b = this._position;
- b + 4 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- this._position = b + 4;
- this._requestViews(4);
- if (this._littleEndian && 0 === (b & 3) && this._f32) {
- return this._f32[b >> 2];
- }
- var e = this._u8, g = k.IntegerUtilities.u8;
- this._littleEndian ? (g[0] = e[b + 0], g[1] = e[b + 1], g[2] = e[b + 2], g[3] = e[b + 3]) : (g[3] = e[b + 0], g[2] = e[b + 1], g[1] = e[b + 2], g[0] = e[b + 3]);
- return k.IntegerUtilities.f32[0];
- };
- h.prototype.readDouble = function() {
- var b = this._u8, e = this._position;
- e + 8 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = k.IntegerUtilities.u8;
- this._littleEndian ? (g[0] = b[e + 0], g[1] = b[e + 1], g[2] = b[e + 2], g[3] = b[e + 3], g[4] = b[e + 4], g[5] = b[e + 5], g[6] = b[e + 6], g[7] = b[e + 7]) : (g[0] = b[e + 7], g[1] = b[e + 6], g[2] = b[e + 5], g[3] = b[e + 4], g[4] = b[e + 3], g[5] = b[e + 2], g[6] = b[e + 1], g[7] = b[e + 0]);
- this._position = e + 8;
- return k.IntegerUtilities.f64[0];
- };
- h.prototype.writeBoolean = function(b) {
- this.writeByte(b ? 1 : 0);
- };
- h.prototype.writeByte = function(b) {
- var e = this._position + 1;
- this._ensureCapacity(e);
- this._u8[this._position++] = b;
- e > this._length && (this._length = e);
- };
- h.prototype.writeUnsignedByte = function(b) {
- var e = this._position + 1;
- this._ensureCapacity(e);
- this._u8[this._position++] = b;
- e > this._length && (this._length = e);
- };
- h.prototype.writeRawBytes = function(b) {
- var e = this._position + b.length;
- this._ensureCapacity(e);
- this._u8.set(b, this._position);
- this._position = e;
- e > this._length && (this._length = e);
- };
- h.prototype.writeBytes = function(a, e, g) {
- k.isNullOrUndefined(a) && this.sec.throwError("TypeError", Errors.NullPointerError, "bytes");
- e >>>= 0;
- g >>>= 0;
- 2 > arguments.length && (e = 0);
- 3 > arguments.length && (g = 0);
- e === b(e, 0, a.length) && e + g === b(e + g, 0, a.length) || this.sec.throwError("RangeError", Errors.ParamRangeError);
- 0 === g && (g = a.length - e);
- this.writeRawBytes(new Int8Array(a._buffer, e, g));
- };
- h.prototype.writeShort = function(b) {
- this.writeUnsignedShort(b);
- };
- h.prototype.writeUnsignedShort = function(b) {
- var e = this._position;
- this._ensureCapacity(e + 2);
- var g = this._u8;
- this._littleEndian ? (g[e + 0] = b, g[e + 1] = b >> 8) : (g[e + 0] = b >> 8, g[e + 1] = b);
- this._position = e += 2;
- e > this._length && (this._length = e);
- };
- h.prototype.writeInt = function(b) {
- this.writeUnsignedInt(b);
- };
- h.prototype.write2Ints = function(b, e) {
- this.write2UnsignedInts(b, e);
- };
- h.prototype.write4Ints = function(b, e, g, d) {
- this.write4UnsignedInts(b, e, g, d);
- };
- h.prototype.writeUnsignedInt = function(b) {
- var e = this._position;
- this._ensureCapacity(e + 4);
- this._requestViews(2);
- if (this._littleEndian === h._nativeLittleEndian && 0 === (e & 3) && this._i32) {
- this._i32[e >> 2] = b;
- } else {
- var g = this._u8;
- this._littleEndian ? (g[e + 0] = b, g[e + 1] = b >> 8, g[e + 2] = b >> 16, g[e + 3] = b >> 24) : (g[e + 0] = b >> 24, g[e + 1] = b >> 16, g[e + 2] = b >> 8, g[e + 3] = b);
- }
- this._position = e += 4;
- e > this._length && (this._length = e);
- };
- h.prototype.write2UnsignedInts = function(b, e) {
- var g = this._position;
- this._ensureCapacity(g + 8);
- this._requestViews(2);
- this._littleEndian === h._nativeLittleEndian && 0 === (g & 3) && this._i32 ? (this._i32[(g >> 2) + 0] = b, this._i32[(g >> 2) + 1] = e, this._position = g += 8, g > this._length && (this._length = g)) : (this.writeUnsignedInt(b), this.writeUnsignedInt(e));
- };
- h.prototype.write4UnsignedInts = function(b, e, g, d) {
- var c = this._position;
- this._ensureCapacity(c + 16);
- this._requestViews(2);
- this._littleEndian === h._nativeLittleEndian && 0 === (c & 3) && this._i32 ? (this._i32[(c >> 2) + 0] = b, this._i32[(c >> 2) + 1] = e, this._i32[(c >> 2) + 2] = g, this._i32[(c >> 2) + 3] = d, this._position = c += 16, c > this._length && (this._length = c)) : (this.writeUnsignedInt(b), this.writeUnsignedInt(e), this.writeUnsignedInt(g), this.writeUnsignedInt(d));
- };
- h.prototype.writeFloat = function(b) {
- var e = this._position;
- this._ensureCapacity(e + 4);
- this._requestViews(4);
- if (this._littleEndian === h._nativeLittleEndian && 0 === (e & 3) && this._f32) {
- this._f32[e >> 2] = b;
- } else {
- var g = this._u8;
- k.IntegerUtilities.f32[0] = b;
- b = k.IntegerUtilities.u8;
- this._littleEndian ? (g[e + 0] = b[0], g[e + 1] = b[1], g[e + 2] = b[2], g[e + 3] = b[3]) : (g[e + 0] = b[3], g[e + 1] = b[2], g[e + 2] = b[1], g[e + 3] = b[0]);
- }
- this._position = e += 4;
- e > this._length && (this._length = e);
- };
- h.prototype.write6Floats = function(b, e, g, d, c, f) {
- var a = this._position;
- this._ensureCapacity(a + 24);
- this._requestViews(4);
- this._littleEndian === h._nativeLittleEndian && 0 === (a & 3) && this._f32 ? (this._f32[(a >> 2) + 0] = b, this._f32[(a >> 2) + 1] = e, this._f32[(a >> 2) + 2] = g, this._f32[(a >> 2) + 3] = d, this._f32[(a >> 2) + 4] = c, this._f32[(a >> 2) + 5] = f, this._position = a += 24, a > this._length && (this._length = a)) : (this.writeFloat(b), this.writeFloat(e), this.writeFloat(g), this.writeFloat(d), this.writeFloat(c), this.writeFloat(f));
- };
- h.prototype.writeDouble = function(b) {
- var e = this._position;
- this._ensureCapacity(e + 8);
- var g = this._u8;
- k.IntegerUtilities.f64[0] = b;
- b = k.IntegerUtilities.u8;
- this._littleEndian ? (g[e + 0] = b[0], g[e + 1] = b[1], g[e + 2] = b[2], g[e + 3] = b[3], g[e + 4] = b[4], g[e + 5] = b[5], g[e + 6] = b[6], g[e + 7] = b[7]) : (g[e + 0] = b[7], g[e + 1] = b[6], g[e + 2] = b[5], g[e + 3] = b[4], g[e + 4] = b[3], g[e + 5] = b[2], g[e + 6] = b[1], g[e + 7] = b[0]);
- this._position = e += 8;
- e > this._length && (this._length = e);
- };
- h.prototype.readRawBytes = function() {
- return new Int8Array(this._buffer, 0, this._length);
- };
- h.prototype.writeUTF = function(b) {
- b = u(b);
- b = w(b);
- this.writeShort(b.length);
- this.writeRawBytes(b);
- };
- h.prototype.writeUTFBytes = function(b) {
- b = u(b);
- b = w(b);
- this.writeRawBytes(b);
- };
- h.prototype.readUTF = function() {
- return this.readUTFBytes(this.readShort());
- };
- h.prototype.readUTFBytes = function(b) {
- b >>>= 0;
- var e = this._position;
- e + b > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- this._position += b;
- return m(new Int8Array(this._buffer, e, b));
- };
- Object.defineProperty(h.prototype, "length", {get:function() {
- return this._length;
- }, set:function(a) {
- a >>>= 0;
- a > this._buffer.byteLength && this._ensureCapacity(a);
- this._length = a;
- this._position = b(this._position, 0, this._length);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "bytesAvailable", {get:function() {
- return this._length - this._position;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "position", {get:function() {
- return this._position;
- }, set:function(b) {
- this._position = b >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "buffer", {get:function() {
- return this._buffer;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "bytes", {get:function() {
- return this._u8;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "ints", {get:function() {
- this._requestViews(2);
- return this._i32;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "objectEncoding", {get:function() {
- return this._objectEncoding;
- }, set:function(b) {
- this._objectEncoding = b >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "endian", {get:function() {
- return this._littleEndian ? "littleEndian" : "bigEndian";
- }, set:function(b) {
- b = u(b);
- this._littleEndian = "auto" === b ? h._nativeLittleEndian : "littleEndian" === b;
- }, enumerable:!0, configurable:!0});
- h.prototype.toString = function() {
- return m(new Int8Array(this._buffer, 0, this._length));
- };
- h.prototype.toBlob = function(b) {
- return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:b});
- };
- h.prototype.writeMultiByte = function(b, e) {
- u(b);
- u(e);
- a("packageInternal flash.utils.ObjectOutput::writeMultiByte");
- };
- h.prototype.readMultiByte = function(b, e) {
- u(e);
- a("packageInternal flash.utils.ObjectInput::readMultiByte");
- };
- h.prototype.getValue = function(b) {
- b |= 0;
- return b >= this._length ? void 0 : this._u8[b];
- };
- h.prototype.setValue = function(b, e) {
- b |= 0;
- var g = b + 1;
- this._ensureCapacity(g);
- this._u8[b] = e;
- g > this._length && (this._length = g);
- };
- h.prototype.readFixed = function() {
- return this.readInt() / 65536;
- };
- h.prototype.readFixed8 = function() {
- return this.readShort() / 256;
- };
- h.prototype.readFloat16 = function() {
- var b = this.readUnsignedShort(), e = b >> 15 ? -1 : 1, g = (b & 31744) >> 10, b = b & 1023;
- return g ? 31 === g ? b ? NaN : Infinity * e : e * Math.pow(2, g - 15) * (1 + b / 1024) : e * Math.pow(2, -14) * (b / 1024);
- };
- h.prototype.readEncodedU32 = function() {
- var b = this.readUnsignedByte();
- if (!(b & 128)) {
- return b;
- }
- b = b & 127 | this.readUnsignedByte() << 7;
- if (!(b & 16384)) {
- return b;
- }
- b = b & 16383 | this.readUnsignedByte() << 14;
- if (!(b & 2097152)) {
- return b;
- }
- b = b & 2097151 | this.readUnsignedByte() << 21;
- return b & 268435456 ? b & 268435455 | this.readUnsignedByte() << 28 : b;
- };
- h.prototype.readBits = function(b) {
- return this.readUnsignedBits(b) << 32 - b >> 32 - b;
- };
- h.prototype.readUnsignedBits = function(b) {
- for (var e = this._bitBuffer, g = this._bitLength;b > g;) {
- e = e << 8 | this.readUnsignedByte(), g += 8;
- }
- g -= b;
- b = e >>> g & r[b];
- this._bitBuffer = e;
- this._bitLength = g;
- return b;
- };
- h.prototype.readFixedBits = function(b) {
- return this.readBits(b) / 65536;
- };
- h.prototype.readString = function(b) {
- var e = this._position;
- if (b) {
- e + b > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError), this._position += b;
- } else {
- b = 0;
- for (var g = e;g < this._length && this._u8[g];g++) {
- b++;
- }
- this._position += b + 1;
- }
- return m(new Int8Array(this._buffer, e, b));
- };
- h.prototype.align = function() {
- this._bitLength = this._bitBuffer = 0;
- };
- h.prototype.deflate = function() {
- this.compress("deflate");
- };
- h.prototype.inflate = function() {
- this.uncompress("deflate");
- };
- h.prototype.compress = function(b) {
- b = 0 === arguments.length ? "zlib" : u(b);
- var e;
- switch(b) {
- case "zlib":
- e = new p.Deflate(!0);
- break;
- case "deflate":
- e = new p.Deflate(!1);
- break;
- default:
- return;
- }
- var g = new h;
- e.onData = g.writeRawBytes.bind(g);
- e.push(this._u8.subarray(0, this._length));
- e.close();
- this._ensureCapacity(g._u8.length);
- this._u8.set(g._u8);
- this.length = g.length;
- this._position = 0;
- };
- h.prototype.uncompress = function(b) {
- b = 0 === arguments.length ? "zlib" : u(b);
- var e;
- switch(b) {
- case "zlib":
- e = p.Inflate.create(!0);
- break;
- case "deflate":
- e = p.Inflate.create(!1);
- break;
- case "lzma":
- e = new p.LzmaDecoder(!1);
- break;
- default:
- return;
- }
- var g = new h, d;
- e.onData = g.writeRawBytes.bind(g);
- e.onError = function(c) {
- return d = c;
- };
- e.push(this._u8.subarray(0, this._length));
- d && this.sec.throwError("IOError", Errors.CompressedDataError);
- e.close();
- this._ensureCapacity(g._u8.length);
- this._u8.set(g._u8);
- this.length = g.length;
- this._position = 0;
- };
- h._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
- h.INITIAL_SIZE = 128;
- h._arrayBufferPool = new k.ArrayBufferPool;
- return h;
- }();
- p.DataBuffer = h;
- })(k.ArrayUtilities || (k.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- var p = k.ArrayUtilities.DataBuffer, u = k.ArrayUtilities.ensureTypedArrayCapacity;
- (function(a) {
- a[a.BeginSolidFill = 1] = "BeginSolidFill";
- a[a.BeginGradientFill = 2] = "BeginGradientFill";
- a[a.BeginBitmapFill = 3] = "BeginBitmapFill";
- a[a.EndFill = 4] = "EndFill";
- a[a.LineStyleSolid = 5] = "LineStyleSolid";
- a[a.LineStyleGradient = 6] = "LineStyleGradient";
- a[a.LineStyleBitmap = 7] = "LineStyleBitmap";
- a[a.LineEnd = 8] = "LineEnd";
- a[a.MoveTo = 9] = "MoveTo";
- a[a.LineTo = 10] = "LineTo";
- a[a.CurveTo = 11] = "CurveTo";
- a[a.CubicCurveTo = 12] = "CubicCurveTo";
- })(k.PathCommand || (k.PathCommand = {}));
- (function(a) {
- a[a.Linear = 16] = "Linear";
- a[a.Radial = 18] = "Radial";
- })(k.GradientType || (k.GradientType = {}));
- (function(a) {
- a[a.Pad = 0] = "Pad";
- a[a.Reflect = 1] = "Reflect";
- a[a.Repeat = 2] = "Repeat";
- })(k.GradientSpreadMethod || (k.GradientSpreadMethod = {}));
- (function(a) {
- a[a.RGB = 0] = "RGB";
- a[a.LinearRGB = 1] = "LinearRGB";
- })(k.GradientInterpolationMethod || (k.GradientInterpolationMethod = {}));
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Normal = 1] = "Normal";
- a[a.Vertical = 2] = "Vertical";
- a[a.Horizontal = 3] = "Horizontal";
- })(k.LineScaleMode || (k.LineScaleMode = {}));
- var a = function() {
- return function(a, b, l, r, h, t, q, n, v, e, g) {
- this.commands = a;
- this.commandsPosition = b;
- this.coordinates = l;
- this.morphCoordinates = r;
- this.coordinatesPosition = h;
- this.styles = t;
- this.stylesLength = q;
- this.morphStyles = n;
- this.morphStylesLength = v;
- this.hasFills = e;
- this.hasLines = g;
- };
- }();
- k.PlainObjectShapeData = a;
- var w;
- (function(a) {
- a[a.Commands = 32] = "Commands";
- a[a.Coordinates = 128] = "Coordinates";
- a[a.Styles = 16] = "Styles";
- })(w || (w = {}));
- w = function() {
- function m(b) {
- void 0 === b && (b = !0);
- b && this.clear();
- }
- m.FromPlainObject = function(b) {
- var a = new m(!1);
- a.commands = b.commands;
- a.coordinates = b.coordinates;
- a.morphCoordinates = b.morphCoordinates;
- a.commandsPosition = b.commandsPosition;
- a.coordinatesPosition = b.coordinatesPosition;
- a.styles = p.FromArrayBuffer(b.styles, b.stylesLength);
- a.styles.endian = "auto";
- b.morphStyles && (a.morphStyles = p.FromArrayBuffer(b.morphStyles, b.morphStylesLength), a.morphStyles.endian = "auto");
- a.hasFills = b.hasFills;
- a.hasLines = b.hasLines;
- return a;
- };
- m.prototype.moveTo = function(b, a) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = 9;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- };
- m.prototype.lineTo = function(b, a) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = 10;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- };
- m.prototype.curveTo = function(b, a, r, h) {
- this.ensurePathCapacities(1, 4);
- this.commands[this.commandsPosition++] = 11;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- this.coordinates[this.coordinatesPosition++] = r;
- this.coordinates[this.coordinatesPosition++] = h;
- };
- m.prototype.cubicCurveTo = function(b, a, r, h, t, q) {
- this.ensurePathCapacities(1, 6);
- this.commands[this.commandsPosition++] = 12;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- this.coordinates[this.coordinatesPosition++] = r;
- this.coordinates[this.coordinatesPosition++] = h;
- this.coordinates[this.coordinatesPosition++] = t;
- this.coordinates[this.coordinatesPosition++] = q;
- };
- m.prototype.beginFill = function(b) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 1;
- this.styles.writeUnsignedInt(b);
- this.hasFills = !0;
- };
- m.prototype.writeMorphFill = function(b) {
- this.morphStyles.writeUnsignedInt(b);
- };
- m.prototype.endFill = function() {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 4;
- };
- m.prototype.endLine = function() {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 8;
- };
- m.prototype.lineStyle = function(b, a, r, h, t, q, n) {
- this.ensurePathCapacities(2, 0);
- this.commands[this.commandsPosition++] = 5;
- this.coordinates[this.coordinatesPosition++] = b;
- b = this.styles;
- b.writeUnsignedInt(a);
- b.writeBoolean(r);
- b.writeUnsignedByte(h);
- b.writeUnsignedByte(t);
- b.writeUnsignedByte(q);
- b.writeUnsignedByte(n);
- this.hasLines = !0;
- };
- m.prototype.writeMorphLineStyle = function(b, a) {
- this.morphCoordinates[this.coordinatesPosition - 1] = b;
- this.morphStyles.writeUnsignedInt(a);
- };
- m.prototype.beginBitmap = function(b, a, r, h, t) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = b;
- b = this.styles;
- b.writeUnsignedInt(a);
- this._writeStyleMatrix(r, !1);
- b.writeBoolean(h);
- b.writeBoolean(t);
- this.hasFills = !0;
- };
- m.prototype.writeMorphBitmap = function(b) {
- this._writeStyleMatrix(b, !0);
- };
- m.prototype.beginGradient = function(b, a, r, h, t, q, n, m) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = b;
- b = this.styles;
- b.writeUnsignedByte(h);
- b.writeShort(m);
- this._writeStyleMatrix(t, !1);
- h = a.length;
- b.writeByte(h);
- for (t = 0;t < h;t++) {
- b.writeUnsignedByte(r[t]), b.writeUnsignedInt(a[t]);
- }
- b.writeUnsignedByte(q);
- b.writeUnsignedByte(n);
- this.hasFills = !0;
- };
- m.prototype.writeMorphGradient = function(b, a, r) {
- this._writeStyleMatrix(r, !0);
- r = this.morphStyles;
- for (var h = 0;h < b.length;h++) {
- r.writeUnsignedByte(a[h]), r.writeUnsignedInt(b[h]);
- }
- };
- m.prototype.writeCommandAndCoordinates = function(b, a, r) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- this.coordinates[this.coordinatesPosition++] = r;
- };
- m.prototype.writeCoordinates = function(b, a) {
- this.ensurePathCapacities(0, 2);
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = a;
- };
- m.prototype.writeMorphCoordinates = function(b, a) {
- this.morphCoordinates = u(this.morphCoordinates, this.coordinatesPosition);
- this.morphCoordinates[this.coordinatesPosition - 2] = b;
- this.morphCoordinates[this.coordinatesPosition - 1] = a;
- };
- m.prototype.clear = function() {
- this.commandsPosition = this.coordinatesPosition = 0;
- this.commands = new Uint8Array(32);
- this.coordinates = new Int32Array(128);
- this.styles = new p(16);
- this.styles.endian = "auto";
- this.hasFills = this.hasLines = !1;
- };
- m.prototype.isEmpty = function() {
- return 0 === this.commandsPosition;
- };
- m.prototype.clone = function() {
- var b = new m(!1);
- b.commands = new Uint8Array(this.commands);
- b.commandsPosition = this.commandsPosition;
- b.coordinates = new Int32Array(this.coordinates);
- b.coordinatesPosition = this.coordinatesPosition;
- b.styles = new p(this.styles.length);
- b.styles.writeRawBytes(this.styles.bytes.subarray(0, this.styles.length));
- this.morphStyles && (b.morphStyles = new p(this.morphStyles.length), b.morphStyles.writeRawBytes(this.morphStyles.bytes.subarray(0, this.morphStyles.length)));
- b.hasFills = this.hasFills;
- b.hasLines = this.hasLines;
- return b;
- };
- m.prototype.toPlainObject = function() {
- return new a(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(m.prototype, "buffers", {get:function() {
- var b = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer];
- this.morphCoordinates && b.push(this.morphCoordinates.buffer);
- this.morphStyles && b.push(this.morphStyles.buffer);
- return b;
- }, enumerable:!0, configurable:!0});
- m.prototype._writeStyleMatrix = function(b, a) {
- (a ? this.morphStyles : this.styles).write6Floats(b.a, b.b, b.c, b.d, b.tx, b.ty);
- };
- m.prototype.ensurePathCapacities = function(b, a) {
- this.commands = u(this.commands, this.commandsPosition + b);
- this.coordinates = u(this.coordinates, this.coordinatesPosition + a);
- };
- return m;
- }();
- k.ShapeData = w;
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- (function(a) {
- a[a.CODE_END = 0] = "CODE_END";
- a[a.CODE_SHOW_FRAME = 1] = "CODE_SHOW_FRAME";
- a[a.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
- a[a.CODE_FREE_CHARACTER = 3] = "CODE_FREE_CHARACTER";
- a[a.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
- a[a.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
- a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- a[a.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
- a[a.CODE_JPEG_TABLES = 8] = "CODE_JPEG_TABLES";
- a[a.CODE_SET_BACKGROUND_COLOR = 9] = "CODE_SET_BACKGROUND_COLOR";
- a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- a[a.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
- a[a.CODE_DO_ACTION = 12] = "CODE_DO_ACTION";
- a[a.CODE_DEFINE_FONT_INFO = 13] = "CODE_DEFINE_FONT_INFO";
- a[a.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
- a[a.CODE_START_SOUND = 15] = "CODE_START_SOUND";
- a[a.CODE_STOP_SOUND = 16] = "CODE_STOP_SOUND";
- a[a.CODE_DEFINE_BUTTON_SOUND = 17] = "CODE_DEFINE_BUTTON_SOUND";
- a[a.CODE_SOUND_STREAM_HEAD = 18] = "CODE_SOUND_STREAM_HEAD";
- a[a.CODE_SOUND_STREAM_BLOCK = 19] = "CODE_SOUND_STREAM_BLOCK";
- a[a.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
- a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- a[a.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
- a[a.CODE_DEFINE_BUTTON_CXFORM = 23] = "CODE_DEFINE_BUTTON_CXFORM";
- a[a.CODE_PROTECT = 24] = "CODE_PROTECT";
- a[a.CODE_PATHS_ARE_POSTSCRIPT = 25] = "CODE_PATHS_ARE_POSTSCRIPT";
- a[a.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
- a[a.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
- a[a.CODE_SYNC_FRAME = 29] = "CODE_SYNC_FRAME";
- a[a.CODE_FREE_ALL = 31] = "CODE_FREE_ALL";
- a[a.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
- a[a.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
- a[a.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
- a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- a[a.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
- a[a.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
- a[a.CODE_DEFINE_VIDEO = 38] = "CODE_DEFINE_VIDEO";
- a[a.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
- a[a.CODE_NAME_CHARACTER = 40] = "CODE_NAME_CHARACTER";
- a[a.CODE_PRODUCT_INFO = 41] = "CODE_PRODUCT_INFO";
- a[a.CODE_DEFINE_TEXT_FORMAT = 42] = "CODE_DEFINE_TEXT_FORMAT";
- a[a.CODE_FRAME_LABEL = 43] = "CODE_FRAME_LABEL";
- a[a.CODE_DEFINE_BEHAVIOUR = 44] = "CODE_DEFINE_BEHAVIOUR";
- a[a.CODE_SOUND_STREAM_HEAD2 = 45] = "CODE_SOUND_STREAM_HEAD2";
- a[a.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
- a[a.CODE_GENERATE_FRAME = 47] = "CODE_GENERATE_FRAME";
- a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- a[a.CODE_GEN_COMMAND = 49] = "CODE_GEN_COMMAND";
- a[a.CODE_DEFINE_COMMAND_OBJECT = 50] = "CODE_DEFINE_COMMAND_OBJECT";
- a[a.CODE_CHARACTER_SET = 51] = "CODE_CHARACTER_SET";
- a[a.CODE_EXTERNAL_FONT = 52] = "CODE_EXTERNAL_FONT";
- a[a.CODE_DEFINE_FUNCTION = 53] = "CODE_DEFINE_FUNCTION";
- a[a.CODE_PLACE_FUNCTION = 54] = "CODE_PLACE_FUNCTION";
- a[a.CODE_GEN_TAG_OBJECTS = 55] = "CODE_GEN_TAG_OBJECTS";
- a[a.CODE_EXPORT_ASSETS = 56] = "CODE_EXPORT_ASSETS";
- a[a.CODE_IMPORT_ASSETS = 57] = "CODE_IMPORT_ASSETS";
- a[a.CODE_ENABLE_DEBUGGER = 58] = "CODE_ENABLE_DEBUGGER";
- a[a.CODE_DO_INIT_ACTION = 59] = "CODE_DO_INIT_ACTION";
- a[a.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
- a[a.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
- a[a.CODE_DEFINE_FONT_INFO2 = 62] = "CODE_DEFINE_FONT_INFO2";
- a[a.CODE_DEBUG_ID = 63] = "CODE_DEBUG_ID";
- a[a.CODE_ENABLE_DEBUGGER2 = 64] = "CODE_ENABLE_DEBUGGER2";
- a[a.CODE_SCRIPT_LIMITS = 65] = "CODE_SCRIPT_LIMITS";
- a[a.CODE_SET_TAB_INDEX = 66] = "CODE_SET_TAB_INDEX";
- a[a.CODE_FILE_ATTRIBUTES = 69] = "CODE_FILE_ATTRIBUTES";
- a[a.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
- a[a.CODE_IMPORT_ASSETS2 = 71] = "CODE_IMPORT_ASSETS2";
- a[a.CODE_DO_ABC_DEFINE = 72] = "CODE_DO_ABC_DEFINE";
- a[a.CODE_DEFINE_FONT_ALIGN_ZONES = 73] = "CODE_DEFINE_FONT_ALIGN_ZONES";
- a[a.CODE_CSM_TEXT_SETTINGS = 74] = "CODE_CSM_TEXT_SETTINGS";
- a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- a[a.CODE_SYMBOL_CLASS = 76] = "CODE_SYMBOL_CLASS";
- a[a.CODE_METADATA = 77] = "CODE_METADATA";
- a[a.CODE_DEFINE_SCALING_GRID = 78] = "CODE_DEFINE_SCALING_GRID";
- a[a.CODE_DO_ABC = 82] = "CODE_DO_ABC";
- a[a.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
- a[a.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
- a[a.CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA = 86] = "CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA";
- a[a.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
- a[a.CODE_DEFINE_FONT_NAME = 88] = "CODE_DEFINE_FONT_NAME";
- a[a.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
- a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- a[a.CODE_TELEMETRY = 93] = "CODE_TELEMETRY";
- })(k.SwfTagCode || (k.SwfTagCode = {}));
- (function(a) {
- a[a.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
- a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- a[a.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
- a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- a[a.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
- a[a.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
- a[a.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
- a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- a[a.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
- a[a.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
- a[a.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
- a[a.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
- a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- a[a.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
- a[a.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
- a[a.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
- a[a.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
- a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- a[a.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
- a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- a[a.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
- a[a.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
- a[a.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
- a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- })(k.DefinitionTags || (k.DefinitionTags = {}));
- (function(a) {
- a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- })(k.ImageDefinitionTags || (k.ImageDefinitionTags = {}));
- (function(a) {
- a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- })(k.FontDefinitionTags || (k.FontDefinitionTags = {}));
- (function(a) {
- a[a.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
- a[a.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
- a[a.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
- a[a.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
- a[a.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
- a[a.CODE_START_SOUND = 15] = "CODE_START_SOUND";
- a[a.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
- a[a.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
- })(k.ControlTags || (k.ControlTags = {}));
- (function(a) {
- a[a.Move = 1] = "Move";
- a[a.HasCharacter = 2] = "HasCharacter";
- a[a.HasMatrix = 4] = "HasMatrix";
- a[a.HasColorTransform = 8] = "HasColorTransform";
- a[a.HasRatio = 16] = "HasRatio";
- a[a.HasName = 32] = "HasName";
- a[a.HasClipDepth = 64] = "HasClipDepth";
- a[a.HasClipActions = 128] = "HasClipActions";
- a[a.HasFilterList = 256] = "HasFilterList";
- a[a.HasBlendMode = 512] = "HasBlendMode";
- a[a.HasCacheAsBitmap = 1024] = "HasCacheAsBitmap";
- a[a.HasClassName = 2048] = "HasClassName";
- a[a.HasImage = 4096] = "HasImage";
- a[a.HasVisible = 8192] = "HasVisible";
- a[a.OpaqueBackground = 16384] = "OpaqueBackground";
- a[a.Reserved = 32768] = "Reserved";
- })(k.PlaceObjectFlags || (k.PlaceObjectFlags = {}));
- (function(a) {
- a[a.Load = 1] = "Load";
- a[a.EnterFrame = 2] = "EnterFrame";
- a[a.Unload = 4] = "Unload";
- a[a.MouseMove = 8] = "MouseMove";
- a[a.MouseDown = 16] = "MouseDown";
- a[a.MouseUp = 32] = "MouseUp";
- a[a.KeyDown = 64] = "KeyDown";
- a[a.KeyUp = 128] = "KeyUp";
- a[a.Data = 256] = "Data";
- a[a.Initialize = 512] = "Initialize";
- a[a.Press = 1024] = "Press";
- a[a.Release = 2048] = "Release";
- a[a.ReleaseOutside = 4096] = "ReleaseOutside";
- a[a.RollOver = 8192] = "RollOver";
- a[a.RollOut = 16384] = "RollOut";
- a[a.DragOver = 32768] = "DragOver";
- a[a.DragOut = 65536] = "DragOut";
- a[a.KeyPress = 131072] = "KeyPress";
- a[a.Construct = 262144] = "Construct";
- })(k.AVM1ClipEvents || (k.AVM1ClipEvents = {}));
- (function(a) {
- a[a.StateUp = 1] = "StateUp";
- a[a.StateOver = 2] = "StateOver";
- a[a.StateDown = 4] = "StateDown";
- a[a.StateHitTest = 8] = "StateHitTest";
- a[a.HasFilterList = 16] = "HasFilterList";
- a[a.HasBlendMode = 32] = "HasBlendMode";
- })(k.ButtonCharacterFlags || (k.ButtonCharacterFlags = {}));
- (function(a) {
- a[a.Bold = 1] = "Bold";
- a[a.Italic = 2] = "Italic";
- a[a.WideOrHasFontData = 4] = "WideOrHasFontData";
- a[a.WideOffset = 8] = "WideOffset";
- a[a.Ansi = 16] = "Ansi";
- a[a.SmallText = 32] = "SmallText";
- a[a.ShiftJis = 64] = "ShiftJis";
- a[a.HasLayout = 128] = "HasLayout";
- })(k.FontFlags || (k.FontFlags = {}));
- (function(a) {
- a[a.HasMoveX = 1] = "HasMoveX";
- a[a.HasMoveY = 2] = "HasMoveY";
- a[a.HasColor = 4] = "HasColor";
- a[a.HasFont = 8] = "HasFont";
- })(k.TextRecordFlags || (k.TextRecordFlags = {}));
- (function(a) {
- a[a.HasInPoint = 1] = "HasInPoint";
- a[a.HasOutPoint = 2] = "HasOutPoint";
- a[a.HasLoops = 4] = "HasLoops";
- a[a.HasEnvelope = 8] = "HasEnvelope";
- a[a.NoMultiple = 16] = "NoMultiple";
- a[a.Stop = 32] = "Stop";
- })(k.SoundInfoFlags || (k.SoundInfoFlags = {}));
- (function(a) {
- a[a.HasFont = 1] = "HasFont";
- a[a.HasMaxLength = 2] = "HasMaxLength";
- a[a.HasColor = 4] = "HasColor";
- a[a.ReadOnly = 8] = "ReadOnly";
- a[a.Password = 16] = "Password";
- a[a.Multiline = 32] = "Multiline";
- a[a.WordWrap = 64] = "WordWrap";
- a[a.HasText = 128] = "HasText";
- a[a.UseOutlines = 256] = "UseOutlines";
- a[a.Html = 512] = "Html";
- a[a.WasStatic = 1024] = "WasStatic";
- a[a.Border = 2048] = "Border";
- a[a.NoSelect = 4096] = "NoSelect";
- a[a.HasLayout = 8192] = "HasLayout";
- a[a.AutoSize = 16384] = "AutoSize";
- a[a.HasFontClass = 32768] = "HasFontClass";
- })(k.TextFlags || (k.TextFlags = {}));
- (function(a) {
- a[a.UsesScalingStrokes = 1] = "UsesScalingStrokes";
- a[a.UsesNonScalingStrokes = 2] = "UsesNonScalingStrokes";
- a[a.UsesFillWindingRule = 4] = "UsesFillWindingRule";
- a[a.IsMorph = 8] = "IsMorph";
- })(k.ShapeFlags || (k.ShapeFlags = {}));
- (function(a) {
- a[a.Move = 1] = "Move";
- a[a.HasFillStyle0 = 2] = "HasFillStyle0";
- a[a.HasFillStyle1 = 4] = "HasFillStyle1";
- a[a.HasLineStyle = 8] = "HasLineStyle";
- a[a.HasNewStyles = 16] = "HasNewStyles";
- a[a.IsStraight = 32] = "IsStraight";
- a[a.IsGeneral = 64] = "IsGeneral";
- a[a.IsVertical = 128] = "IsVertical";
- })(k.ShapeRecordFlags || (k.ShapeRecordFlags = {}));
- })(k.Parser || (k.Parser = {}));
- })(k.SWF || (k.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- var p = k.Debug.unexpected, u = function() {
- function a(a, m, b, l) {
- this.url = a;
- this.method = m;
- this.mimeType = b;
- this.data = l;
- }
- a.prototype.readAll = function(a, m) {
- var b = this.url, l = this.xhr = new XMLHttpRequest({mozSystem:!0});
- l.open(this.method || "GET", this.url, !0);
- l.responseType = "arraybuffer";
- a && (l.onprogress = function(b) {
- a(l.response, b.loaded, b.total);
- });
- l.onreadystatechange = function(a) {
- 4 === l.readyState && (200 !== l.status && 0 !== l.status || null === l.response ? (p("Path: " + b + " not found."), m(null, l.statusText)) : m(l.response));
- };
- this.mimeType && l.setRequestHeader("Content-Type", this.mimeType);
- l.send(this.data || null);
- };
- a.prototype.readChunked = function(a, m, b, l, r, h) {
- if (0 >= a) {
- this.readAsync(m, b, l, r, h);
- } else {
- var t = 0, q = new Uint8Array(a), n = 0, k;
- this.readAsync(function(b, g) {
- k = g.total;
- for (var d = b.length, c = 0;t + d >= a;) {
- var f = a - t;
- q.set(b.subarray(c, c + f), t);
- c += f;
- d -= f;
- n += a;
- m(q, {loaded:n, total:k});
- t = 0;
- }
- q.set(b.subarray(c), t);
- t += d;
- }, b, l, function() {
- 0 < t && (n += t, m(q.subarray(0, t), {loaded:n, total:k}), t = 0);
- r && r();
- }, h);
- }
- };
- a.prototype.readAsync = function(a, m, b, l, r) {
- var h = this.xhr = new XMLHttpRequest({mozSystem:!0}), t = this.url, q = 0, n = 0;
- h.open(this.method || "GET", t, !0);
- h.responseType = "moz-chunked-arraybuffer";
- var k = "moz-chunked-arraybuffer" !== h.responseType;
- k && (h.responseType = "arraybuffer");
- h.onprogress = function(b) {
- k || (q = b.loaded, n = b.total, b = new Uint8Array(h.response), q = Math.max(q, b.byteLength), n = Math.max(n, b.byteLength), a(b, {loaded:q, total:n}));
- };
- h.onreadystatechange = function(b) {
- 2 === h.readyState && r && r(t, h.status, h.getAllResponseHeaders());
- 4 === h.readyState && (200 !== h.status && 0 !== h.status || null === h.response && (0 === n || q !== n) ? m(h.statusText) : k && (b = h.response, a(new Uint8Array(b), {loaded:b.byteLength, total:b.byteLength})));
- };
- h.onload = function() {
- l && l();
- };
- this.mimeType && h.setRequestHeader("Content-Type", this.mimeType);
- h.send(this.data || null);
- b && b();
- };
- a.prototype.abort = function() {
- this.xhr && (this.xhr.abort(), this.xhr = null);
- };
- return a;
- }();
- k.BinaryFileReader = u;
-})(Shumway || (Shumway = {}));
-(function(k) {
- var p = function() {
- function k() {
- this.isAS3TraceOn = !0;
- this._startTime = Date.now();
- }
- Object.defineProperty(k.prototype, "currentTimestamp", {get:function() {
- return Date.now() - this._startTime;
- }, enumerable:!0, configurable:!0});
- k.prototype._writeLine = function(a) {
- };
- k.prototype.writeAS3Trace = function(a) {
- };
- return k;
- }();
- k.FlashLog = p;
- k.flashlog = null;
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(a) {
- a[a.Objects = 0] = "Objects";
- a[a.References = 1] = "References";
- })(k.RemotingPhase || (k.RemotingPhase = {}));
- (function(a) {
- a[a.HasMatrix = 1] = "HasMatrix";
- a[a.HasBounds = 2] = "HasBounds";
- a[a.HasChildren = 4] = "HasChildren";
- a[a.HasColorTransform = 8] = "HasColorTransform";
- a[a.HasClipRect = 16] = "HasClipRect";
- a[a.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties";
- a[a.HasMask = 64] = "HasMask";
- a[a.HasClip = 128] = "HasClip";
- })(k.MessageBits || (k.MessageBits = {}));
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Asset = 134217728] = "Asset";
- })(k.IDMask || (k.IDMask = {}));
- (function(a) {
- a[a.EOF = 0] = "EOF";
- a[a.UpdateFrame = 100] = "UpdateFrame";
- a[a.UpdateGraphics = 101] = "UpdateGraphics";
- a[a.UpdateBitmapData = 102] = "UpdateBitmapData";
- a[a.UpdateTextContent = 103] = "UpdateTextContent";
- a[a.UpdateStage = 104] = "UpdateStage";
- a[a.UpdateNetStream = 105] = "UpdateNetStream";
- a[a.RequestBitmapData = 106] = "RequestBitmapData";
- a[a.DrawToBitmap = 200] = "DrawToBitmap";
- a[a.MouseEvent = 300] = "MouseEvent";
- a[a.KeyboardEvent = 301] = "KeyboardEvent";
- a[a.FocusEvent = 302] = "FocusEvent";
- })(k.MessageTag || (k.MessageTag = {}));
- (function(a) {
- a[a.Blur = 0] = "Blur";
- a[a.DropShadow = 1] = "DropShadow";
- a[a.ColorMatrix = 2] = "ColorMatrix";
- })(k.FilterType || (k.FilterType = {}));
- (function(a) {
- a[a.Identity = 0] = "Identity";
- a[a.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly";
- a[a.All = 2] = "All";
- })(k.ColorTransformEncoding || (k.ColorTransformEncoding = {}));
- (function(a) {
- a[a.Initialized = 0] = "Initialized";
- 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";
- a[a.Seeked = 9] = "Seeked";
- a[a.Progress = 10] = "Progress";
- a[a.Error = 11] = "Error";
- })(k.VideoPlaybackEvent || (k.VideoPlaybackEvent = {}));
- (function(a) {
- a[a.Init = 1] = "Init";
- a[a.Pause = 2] = "Pause";
- a[a.Seek = 3] = "Seek";
- a[a.GetTime = 4] = "GetTime";
- a[a.GetBufferLength = 5] = "GetBufferLength";
- a[a.SetSoundLevels = 6] = "SetSoundLevels";
- a[a.GetBytesLoaded = 7] = "GetBytesLoaded";
- a[a.GetBytesTotal = 8] = "GetBytesTotal";
- a[a.EnsurePlaying = 9] = "EnsurePlaying";
- })(k.VideoControlEvent || (k.VideoControlEvent = {}));
- (function(a) {
- a[a.ShowAll = 0] = "ShowAll";
- a[a.ExactFit = 1] = "ExactFit";
- a[a.NoBorder = 2] = "NoBorder";
- a[a.NoScale = 4] = "NoScale";
- })(k.StageScaleMode || (k.StageScaleMode = {}));
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Top = 1] = "Top";
- a[a.Bottom = 2] = "Bottom";
- a[a.Left = 4] = "Left";
- a[a.Right = 8] = "Right";
- a[a.TopLeft = a.Top | a.Left] = "TopLeft";
- a[a.BottomLeft = a.Bottom | a.Left] = "BottomLeft";
- a[a.BottomRight = a.Bottom | a.Right] = "BottomRight";
- a[a.TopRight = a.Top | a.Right] = "TopRight";
- })(k.StageAlignFlags || (k.StageAlignFlags = {}));
- k.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" ");
- k.KeyboardEventNames = ["keydown", "keypress", "keyup"];
- (function(a) {
- a[a.CtrlKey = 1] = "CtrlKey";
- a[a.AltKey = 2] = "AltKey";
- a[a.ShiftKey = 4] = "ShiftKey";
- })(k.KeyboardEventFlags || (k.KeyboardEventFlags = {}));
- (function(a) {
- a[a.DocumentHidden = 0] = "DocumentHidden";
- a[a.DocumentVisible = 1] = "DocumentVisible";
- a[a.WindowBlur = 2] = "WindowBlur";
- a[a.WindowFocus = 3] = "WindowFocus";
- })(k.FocusEventType || (k.FocusEventType = {}));
- var u = function() {
- function a(a, m) {
- this.window = a;
- this.target = m;
- }
- Object.defineProperty(a.prototype, "onAsyncMessage", {set:function(a) {
- this.window.addEventListener("message", function(m) {
- Promise.resolve(m.data).then(function(b) {
- a(b);
- });
- });
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "onSyncMessage", {set:function(a) {
- this.window.addEventListener("syncmessage", function(m) {
- m = m.detail;
- m.result = a(m.msg);
- });
- }, enumerable:!0, configurable:!0});
- a.prototype.postAsyncMessage = function(a, m) {
- this.target.postMessage(a, "*", m);
- };
- a.prototype.sendSyncMessage = function(a, m) {
- var b = this.target.document.createEvent("CustomEvent"), l = {msg:a, result:void 0};
- b.initCustomEvent("syncmessage", !1, !1, l);
- this.target.dispatchEvent(b);
- return l.result;
- };
- return a;
- }();
- k.WindowTransportPeer = u;
- u = function() {
- function a() {
- }
- Object.defineProperty(a.prototype, "onAsyncMessage", {set:function(a) {
- ShumwayCom.setAsyncMessageCallback(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "onSyncMessage", {set:function(a) {
- ShumwayCom.setSyncMessageCallback(a);
- }, enumerable:!0, configurable:!0});
- a.prototype.postAsyncMessage = function(a, m) {
- ShumwayCom.postAsyncMessage(a);
- };
- a.prototype.sendSyncMessage = function(a, m) {
- return ShumwayCom.sendSyncMessage(a);
- };
- return a;
- }();
- k.ShumwayComTransportPeer = u;
- })(k.Remoting || (k.Remoting = {}));
-})(Shumway || (Shumway = {}));
-var throwError, Errors;
-(function(k) {
- (function(k) {
- (function(k) {
- var a = function() {
- function a() {
- }
- a.toRGBA = function(b, a, r, h) {
- void 0 === h && (h = 1);
- return "rgba(" + b + "," + a + "," + r + "," + h + ")";
- };
- return a;
- }();
- k.UI = a;
- var p = function() {
- function m() {
- }
- m.prototype.tabToolbar = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(37, 44, 51, b);
- };
- m.prototype.toolbars = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(52, 60, 69, b);
- };
- m.prototype.selectionBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(29, 79, 115, b);
- };
- m.prototype.selectionText = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(245, 247, 250, b);
- };
- m.prototype.splitters = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(0, 0, 0, b);
- };
- m.prototype.bodyBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(17, 19, 21, b);
- };
- m.prototype.sidebarBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(24, 29, 32, b);
- };
- m.prototype.attentionBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(161, 134, 80, b);
- };
- m.prototype.bodyText = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(143, 161, 178, b);
- };
- m.prototype.foregroundTextGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(182, 186, 191, b);
- };
- m.prototype.contentTextHighContrast = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(169, 186, 203, b);
- };
- m.prototype.contentTextGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(143, 161, 178, b);
- };
- m.prototype.contentTextDarkGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(95, 115, 135, b);
- };
- m.prototype.blueHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(70, 175, 227, b);
- };
- m.prototype.purpleHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(107, 122, 187, b);
- };
- m.prototype.pinkHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(223, 128, 255, b);
- };
- m.prototype.redHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(235, 83, 104, b);
- };
- m.prototype.orangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(217, 102, 41, b);
- };
- m.prototype.lightOrangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(217, 155, 40, b);
- };
- m.prototype.greenHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(112, 191, 83, b);
- };
- m.prototype.blueGreyHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(94, 136, 176, b);
- };
- return m;
- }();
- k.UIThemeDark = p;
- p = function() {
- function m() {
- }
- m.prototype.tabToolbar = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(235, 236, 237, b);
- };
- m.prototype.toolbars = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(240, 241, 242, b);
- };
- m.prototype.selectionBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(76, 158, 217, b);
- };
- m.prototype.selectionText = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(245, 247, 250, b);
- };
- m.prototype.splitters = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(170, 170, 170, b);
- };
- m.prototype.bodyBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(252, 252, 252, b);
- };
- m.prototype.sidebarBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(247, 247, 247, b);
- };
- m.prototype.attentionBackground = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(161, 134, 80, b);
- };
- m.prototype.bodyText = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(24, 25, 26, b);
- };
- m.prototype.foregroundTextGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(88, 89, 89, b);
- };
- m.prototype.contentTextHighContrast = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(41, 46, 51, b);
- };
- m.prototype.contentTextGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(143, 161, 178, b);
- };
- m.prototype.contentTextDarkGrey = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(102, 115, 128, b);
- };
- m.prototype.blueHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(0, 136, 204, b);
- };
- m.prototype.purpleHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(91, 95, 255, b);
- };
- m.prototype.pinkHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(184, 46, 229, b);
- };
- m.prototype.redHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(237, 38, 85, b);
- };
- m.prototype.orangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(241, 60, 0, b);
- };
- m.prototype.lightOrangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(217, 126, 0, b);
- };
- m.prototype.greenHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(44, 187, 15, b);
- };
- m.prototype.blueGreyHighlight = function(b) {
- void 0 === b && (b = 1);
- return a.toRGBA(95, 136, 176, b);
- };
- return m;
- }();
- k.UIThemeLight = p;
- })(k.Theme || (k.Theme = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- var a = function() {
- function a(m, b) {
- this._buffers = m || [];
- this._snapshots = [];
- this._windowStart = this._startTime = b;
- this._maxDepth = 0;
- }
- a.prototype.addBuffer = function(a) {
- this._buffers.push(a);
- };
- a.prototype.getSnapshotAt = function(a) {
- return this._snapshots[a];
- };
- Object.defineProperty(a.prototype, "hasSnapshots", {get:function() {
- return 0 < this.snapshotCount;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "snapshotCount", {get:function() {
- return this._snapshots.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "startTime", {get:function() {
- return this._startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "endTime", {get:function() {
- return this._endTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "totalTime", {get:function() {
- return this.endTime - this.startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "windowStart", {get:function() {
- return this._windowStart;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "windowEnd", {get:function() {
- return this._windowEnd;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "windowLength", {get:function() {
- return this.windowEnd - this.windowStart;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "maxDepth", {get:function() {
- return this._maxDepth;
- }, enumerable:!0, configurable:!0});
- a.prototype.forEachSnapshot = function(a) {
- for (var b = 0, l = this.snapshotCount;b < l;b++) {
- a(this._snapshots[b], b);
- }
- };
- a.prototype.createSnapshots = function() {
- var a = Number.MIN_VALUE, b = 0;
- for (this._snapshots = [];0 < this._buffers.length;) {
- var l = this._buffers.shift().createSnapshot();
- l && (a < l.endTime && (a = l.endTime), b < l.maxDepth && (b = l.maxDepth), this._snapshots.push(l));
- }
- this._windowEnd = this._endTime = a;
- this._maxDepth = b;
- };
- a.prototype.setWindow = function(a, b) {
- if (a > b) {
- var l = a;
- a = b;
- b = l;
- }
- l = Math.min(b - a, this.totalTime);
- a < this._startTime ? (a = this._startTime, b = this._startTime + l) : b > this._endTime && (a = this._endTime - l, b = this._endTime);
- this._windowStart = a;
- this._windowEnd = b;
- };
- a.prototype.moveWindowTo = function(a) {
- this.setWindow(a - this.windowLength / 2, a + this.windowLength / 2);
- };
- return a;
- }();
- k.Profile = a;
- })(k.Profiler || (k.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(k, p) {
- function u() {
- this.constructor = k;
- }
- for (var a in p) {
- p.hasOwnProperty(a) && (k[a] = p[a]);
- }
- u.prototype = p.prototype;
- k.prototype = new u;
-};
-(function(k) {
- (function(k) {
- (function(k) {
- var a = function() {
- return function(a) {
- this.kind = a;
- this.totalTime = this.selfTime = this.count = 0;
- };
- }();
- k.TimelineFrameStatistics = a;
- var p = function() {
- function k(b, a, r, h, t, q) {
- this.parent = b;
- this.kind = a;
- this.startData = r;
- this.endData = h;
- this.startTime = t;
- this.endTime = q;
- this.maxDepth = 0;
- }
- Object.defineProperty(k.prototype, "totalTime", {get:function() {
- return this.endTime - this.startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "selfTime", {get:function() {
- var b = this.totalTime;
- if (this.children) {
- for (var a = 0, r = this.children.length;a < r;a++) {
- var h = this.children[a], b = b - (h.endTime - h.startTime)
- }
- }
- return b;
- }, enumerable:!0, configurable:!0});
- k.prototype.getChildIndex = function(b) {
- for (var a = this.children, r = 0;r < a.length;r++) {
- if (a[r].endTime > b) {
- return r;
- }
- }
- return 0;
- };
- k.prototype.getChildRange = function(b, a) {
- if (this.children && b <= this.endTime && a >= this.startTime && a >= b) {
- var r = this._getNearestChild(b), h = this._getNearestChildReverse(a);
- if (r <= h) {
- return b = this.children[r].startTime, a = this.children[h].endTime, {startIndex:r, endIndex:h, startTime:b, endTime:a, totalTime:a - b};
- }
- }
- return null;
- };
- k.prototype._getNearestChild = function(b) {
- var a = this.children;
- if (a && a.length) {
- if (b <= a[0].endTime) {
- return 0;
- }
- for (var r, h = 0, t = a.length - 1;t > h;) {
- r = (h + t) / 2 | 0;
- var q = a[r];
- if (b >= q.startTime && b <= q.endTime) {
- return r;
- }
- b > q.endTime ? h = r + 1 : t = r;
- }
- return Math.ceil((h + t) / 2);
- }
- return 0;
- };
- k.prototype._getNearestChildReverse = function(b) {
- var a = this.children;
- if (a && a.length) {
- var r = a.length - 1;
- if (b >= a[r].startTime) {
- return r;
- }
- for (var h, t = 0;r > t;) {
- h = Math.ceil((t + r) / 2);
- var q = a[h];
- if (b >= q.startTime && b <= q.endTime) {
- return h;
- }
- b > q.endTime ? t = h : r = h - 1;
- }
- return (t + r) / 2 | 0;
- }
- return 0;
- };
- k.prototype.query = function(b) {
- if (b < this.startTime || b > this.endTime) {
- return null;
- }
- var a = this.children;
- if (a && 0 < a.length) {
- for (var r, h = 0, t = a.length - 1;t > h;) {
- var q = (h + t) / 2 | 0;
- r = a[q];
- if (b >= r.startTime && b <= r.endTime) {
- return r.query(b);
- }
- b > r.endTime ? h = q + 1 : t = q;
- }
- r = a[t];
- if (b >= r.startTime && b <= r.endTime) {
- return r.query(b);
- }
- }
- return this;
- };
- k.prototype.queryNext = function(b) {
- for (var a = this;b > a.endTime;) {
- if (a.parent) {
- a = a.parent;
- } else {
- break;
- }
- }
- return a.query(b);
- };
- k.prototype.getDepth = function() {
- for (var b = 0, a = this;a;) {
- b++, a = a.parent;
- }
- return b;
- };
- k.prototype.calculateStatistics = function() {
- function b(r) {
- if (r.kind) {
- var h = l[r.kind.id] || (l[r.kind.id] = new a(r.kind));
- h.count++;
- h.selfTime += r.selfTime;
- h.totalTime += r.totalTime;
- }
- r.children && r.children.forEach(b);
- }
- var l = this.statistics = [];
- b(this);
- };
- k.prototype.trace = function(b) {
- var a = (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);
- }
- b.outdent();
- } else {
- b.writeLn(a);
- }
- };
- return k;
- }();
- k.TimelineFrame = p;
- p = function(a) {
- function b(b) {
- a.call(this, null, null, null, null, NaN, NaN);
- this.name = b;
- }
- __extends(b, a);
- return b;
- }(p);
- k.TimelineBufferSnapshot = p;
- })(k.Profiler || (k.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = function() {
- function a(m, b) {
- void 0 === m && (m = "");
- this.name = m || "";
- this._startTime = k.isNullOrUndefined(b) ? jsGlobal.START_TIME : b;
- }
- a.prototype.getKind = function(a) {
- return this._kinds[a];
- };
- Object.defineProperty(a.prototype, "kinds", {get:function() {
- return this._kinds.concat();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "depth", {get:function() {
- return this._depth;
- }, enumerable:!0, configurable:!0});
- a.prototype._initialize = function() {
- this._depth = 0;
- this._stack = [];
- this._data = [];
- this._kinds = [];
- this._kindNameMap = Object.create(null);
- this._marks = new k.CircularBuffer(Int32Array, 20);
- this._times = new k.CircularBuffer(Float64Array, 20);
- };
- a.prototype._getKindId = function(k) {
- var b = a.MAX_KINDID;
- if (void 0 === this._kindNameMap[k]) {
- if (b = this._kinds.length, b < a.MAX_KINDID) {
- var l = {id:b, name:k, visible:!0};
- this._kinds.push(l);
- this._kindNameMap[k] = l;
- } else {
- b = a.MAX_KINDID;
- }
- } else {
- b = this._kindNameMap[k].id;
- }
- return b;
- };
- a.prototype._getMark = function(m, b, l) {
- var r = a.MAX_DATAID;
- k.isNullOrUndefined(l) || b === a.MAX_KINDID || (r = this._data.length, r < a.MAX_DATAID ? this._data.push(l) : r = a.MAX_DATAID);
- return m | r << 16 | b;
- };
- a.prototype.enter = function(m, b, l) {
- l = (k.isNullOrUndefined(l) ? performance.now() : l) - this._startTime;
- this._marks || this._initialize();
- this._depth++;
- m = this._getKindId(m);
- this._marks.write(this._getMark(a.ENTER, m, b));
- this._times.write(l);
- this._stack.push(m);
- };
- a.prototype.leave = function(m, b, l) {
- l = (k.isNullOrUndefined(l) ? performance.now() : l) - this._startTime;
- var r = this._stack.pop();
- m && (r = this._getKindId(m));
- this._marks.write(this._getMark(a.LEAVE, r, b));
- this._times.write(l);
- this._depth--;
- };
- a.prototype.count = function(a, b, l) {
- };
- a.prototype.createSnapshot = function(m) {
- void 0 === m && (m = Number.MAX_VALUE);
- if (!this._marks) {
- return null;
- }
- var b = this._times, l = this._kinds, r = this._data, h = new u.TimelineBufferSnapshot(this.name), t = [h], q = 0;
- this._marks || this._initialize();
- this._marks.forEachInReverse(function(h, v) {
- var e = r[h >>> 16 & a.MAX_DATAID], g = l[h & a.MAX_KINDID];
- if (k.isNullOrUndefined(g) || g.visible) {
- var d = h & 2147483648, c = b.get(v), f = t.length;
- if (d === a.LEAVE) {
- if (1 === f && (q++, q > m)) {
- return !0;
- }
- t.push(new u.TimelineFrame(t[f - 1], g, null, e, NaN, c));
- } else {
- if (d === a.ENTER) {
- if (g = t.pop(), d = t[t.length - 1]) {
- for (d.children ? d.children.unshift(g) : d.children = [g], d = t.length, g.depth = d, g.startData = e, g.startTime = c;g;) {
- if (g.maxDepth < d) {
- g.maxDepth = d, g = g.parent;
- } else {
- break;
- }
- }
- } else {
- return !0;
- }
- }
- }
- }
- });
- h.children && h.children.length && (h.startTime = h.children[0].startTime, h.endTime = h.children[h.children.length - 1].endTime);
- return h;
- };
- a.prototype.reset = function(a) {
- this._startTime = k.isNullOrUndefined(a) ? performance.now() : a;
- this._marks ? (this._depth = 0, this._data = [], this._marks.reset(), this._times.reset()) : this._initialize();
- };
- a.FromFirefoxProfile = function(k, b) {
- for (var l = k.profile.threads[0].samples, r = new a(b, l[0].time), h = [], t, q = 0;q < l.length;q++) {
- t = l[q];
- var n = t.time, v = t.frames, e = 0;
- for (t = Math.min(v.length, h.length);e < t && v[e].location === h[e].location;) {
- e++;
- }
- for (var g = h.length - e, d = 0;d < g;d++) {
- t = h.pop(), r.leave(t.location, null, n);
- }
- for (;e < v.length;) {
- t = v[e++], r.enter(t.location, null, n);
- }
- h = v;
- }
- for (;t = h.pop();) {
- r.leave(t.location, null, n);
- }
- return r;
- };
- a.FromChromeProfile = function(k, b) {
- var l = k.timestamps, r = k.samples, h = new a(b, l[0] / 1E3), t = [], q = {}, n;
- a._resolveIds(k.head, q);
- for (var v = 0;v < l.length;v++) {
- var e = l[v] / 1E3, g = [];
- for (n = q[r[v]];n;) {
- g.unshift(n), n = n.parent;
- }
- var d = 0;
- for (n = Math.min(g.length, t.length);d < n && g[d] === t[d];) {
- d++;
- }
- for (var c = t.length - d, f = 0;f < c;f++) {
- n = t.pop(), h.leave(n.functionName, null, e);
- }
- for (;d < g.length;) {
- n = g[d++], h.enter(n.functionName, null, e);
- }
- t = g;
- }
- for (;n = t.pop();) {
- h.leave(n.functionName, null, e);
- }
- return h;
- };
- a._resolveIds = function(k, b) {
- b[k.id] = k;
- if (k.children) {
- for (var l = 0;l < k.children.length;l++) {
- k.children[l].parent = k, a._resolveIds(k.children[l], b);
- }
- }
- };
- a.ENTER = 0;
- a.LEAVE = -2147483648;
- a.MAX_KINDID = 65535;
- a.MAX_DATAID = 32767;
- return a;
- }();
- u.TimelineBuffer = a;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- (function(a) {
- a[a.DARK = 0] = "DARK";
- a[a.LIGHT = 1] = "LIGHT";
- })(u.UIThemeType || (u.UIThemeType = {}));
- var a = function() {
- function a(k, b) {
- void 0 === b && (b = 0);
- this._container = k;
- this._headers = [];
- this._charts = [];
- this._profiles = [];
- this._activeProfile = null;
- this.themeType = b;
- this._tooltip = this._createTooltip();
- }
- a.prototype.createProfile = function(a, b) {
- var l = new u.Profile(a, b);
- l.createSnapshots();
- this._profiles.push(l);
- this.activateProfile(l);
- return l;
- };
- a.prototype.activateProfile = function(a) {
- this.deactivateProfile();
- this._activeProfile = a;
- this._createViews();
- this._initializeViews();
- };
- a.prototype.activateProfileAt = function(a) {
- this.activateProfile(this.getProfileAt(a));
- };
- a.prototype.deactivateProfile = function() {
- this._activeProfile && (this._destroyViews(), this._activeProfile = null);
- };
- a.prototype.resize = function() {
- this._onResize();
- };
- a.prototype.getProfileAt = function(a) {
- return this._profiles[a];
- };
- Object.defineProperty(a.prototype, "activeProfile", {get:function() {
- return this._activeProfile;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "profileCount", {get:function() {
- return this._profiles.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "container", {get:function() {
- return this._container;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "themeType", {get:function() {
- return this._themeType;
- }, set:function(a) {
- switch(a) {
- case 0:
- this._theme = new p.Theme.UIThemeDark;
- break;
- case 1:
- this._theme = new p.Theme.UIThemeLight;
- }
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "theme", {get:function() {
- return this._theme;
- }, enumerable:!0, configurable:!0});
- a.prototype.getSnapshotAt = function(a) {
- return this._activeProfile.getSnapshotAt(a);
- };
- a.prototype._createViews = function() {
- if (this._activeProfile) {
- var a = this;
- this._overviewHeader = new u.FlameChartHeader(this, 0);
- this._overview = new u.FlameChartOverview(this, 0);
- this._activeProfile.forEachSnapshot(function(b, l) {
- a._headers.push(new u.FlameChartHeader(a, 1));
- a._charts.push(new u.FlameChart(a, b));
- });
- window.addEventListener("resize", this._onResize.bind(this));
- }
- };
- a.prototype._destroyViews = function() {
- if (this._activeProfile) {
- this._overviewHeader.destroy();
- for (this._overview.destroy();this._headers.length;) {
- this._headers.pop().destroy();
- }
- for (;this._charts.length;) {
- this._charts.pop().destroy();
- }
- window.removeEventListener("resize", this._onResize.bind(this));
- }
- };
- a.prototype._initializeViews = function() {
- if (this._activeProfile) {
- var a = this, b = this._activeProfile.startTime, l = this._activeProfile.endTime;
- this._overviewHeader.initialize(b, l);
- this._overview.initialize(b, l);
- this._activeProfile.forEachSnapshot(function(r, h) {
- a._headers[h].initialize(b, l);
- a._charts[h].initialize(b, l);
- });
- }
- };
- a.prototype._onResize = function() {
- if (this._activeProfile) {
- var a = this, b = this._container.offsetWidth;
- this._overviewHeader.setSize(b);
- this._overview.setSize(b);
- this._activeProfile.forEachSnapshot(function(l, r) {
- a._headers[r].setSize(b);
- a._charts[r].setSize(b);
- });
- }
- };
- a.prototype._updateViews = function() {
- if (this._activeProfile) {
- var a = this, b = this._activeProfile.windowStart, l = this._activeProfile.windowEnd;
- this._overviewHeader.setWindow(b, l);
- this._overview.setWindow(b, l);
- this._activeProfile.forEachSnapshot(function(r, h) {
- a._headers[h].setWindow(b, l);
- a._charts[h].setWindow(b, l);
- });
- }
- };
- a.prototype._drawViews = function() {
- };
- a.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;
- };
- a.prototype.setWindow = function(a, b) {
- this._activeProfile.setWindow(a, b);
- this._updateViews();
- };
- a.prototype.moveWindowTo = function(a) {
- this._activeProfile.moveWindowTo(a);
- this._updateViews();
- };
- a.prototype.showTooltip = function(a, b, l, r) {
- this.removeTooltipContent();
- this._tooltip.appendChild(this.createTooltipContent(a, b));
- this._tooltip.style.display = "block";
- var h = this._tooltip.firstChild;
- b = h.clientWidth;
- h = h.clientHeight;
- l += l + b >= a.canvas.clientWidth - 50 ? -(b + 20) : 25;
- r += a.canvas.offsetTop - h / 2;
- this._tooltip.style.left = l + "px";
- this._tooltip.style.top = r + "px";
- };
- a.prototype.hideTooltip = function() {
- this._tooltip.style.display = "none";
- };
- a.prototype.createTooltipContent = function(a, b) {
- var l = Math.round(1E5 * b.totalTime) / 1E5, r = Math.round(1E5 * b.selfTime) / 1E5, h = Math.round(1E4 * b.selfTime / b.totalTime) / 100, t = document.createElement("div"), k = document.createElement("h1");
- k.textContent = b.kind.name;
- t.appendChild(k);
- k = document.createElement("p");
- k.textContent = "Total: " + l + " ms";
- t.appendChild(k);
- l = document.createElement("p");
- l.textContent = "Self: " + r + " ms (" + h + "%)";
- t.appendChild(l);
- if (r = a.getStatistics(b.kind)) {
- h = document.createElement("p"), h.textContent = "Count: " + r.count, t.appendChild(h), h = Math.round(1E5 * r.totalTime) / 1E5, l = document.createElement("p"), l.textContent = "All Total: " + h + " ms", t.appendChild(l), r = Math.round(1E5 * r.selfTime) / 1E5, h = document.createElement("p"), h.textContent = "All Self: " + r + " ms", t.appendChild(h);
- }
- this.appendDataElements(t, b.startData);
- this.appendDataElements(t, b.endData);
- return t;
- };
- a.prototype.appendDataElements = function(a, b) {
- if (!k.isNullOrUndefined(b)) {
- a.appendChild(document.createElement("hr"));
- var l;
- if (k.isObject(b)) {
- for (var r in b) {
- l = document.createElement("p"), l.textContent = r + ": " + b[r], a.appendChild(l);
- }
- } else {
- l = document.createElement("p"), l.textContent = b.toString(), a.appendChild(l);
- }
- }
- };
- a.prototype.removeTooltipContent = function() {
- for (var a = this._tooltip;a.firstChild;) {
- a.removeChild(a.firstChild);
- }
- };
- return a;
- }();
- u.Controller = a;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.NumberUtilities.clamp, p = function() {
- function a(b) {
- this.value = b;
- }
- a.prototype.toString = function() {
- return this.value;
- };
- 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;
- }();
- u.MouseCursor = p;
- var m = function() {
- function b(a, b) {
- this._target = a;
- this._eventTarget = b;
- this._wheelDisabled = !1;
- this._boundOnMouseDown = this._onMouseDown.bind(this);
- this._boundOnMouseUp = this._onMouseUp.bind(this);
- this._boundOnMouseOver = this._onMouseOver.bind(this);
- this._boundOnMouseOut = this._onMouseOut.bind(this);
- 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);
- }
- b.prototype.destroy = function() {
- var a = this._eventTarget;
- a.removeEventListener("mousedown", this._boundOnMouseDown);
- a.removeEventListener("mouseover", this._boundOnMouseOver);
- a.removeEventListener("mouseout", this._boundOnMouseOut);
- a.removeEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel);
- window.removeEventListener("mousemove", this._boundOnDrag);
- window.removeEventListener("mouseup", this._boundOnMouseUp);
- this._killHoverCheck();
- this._target = this._eventTarget = null;
- };
- b.prototype.updateCursor = function(a) {
- if (!b._cursorOwner || b._cursorOwner === this._target) {
- var r = this._eventTarget.parentElement;
- b._cursor !== a && (b._cursor = a, ["", "-moz-", "-webkit-"].forEach(function(b) {
- r.style.cursor = b + a;
- }));
- b._cursorOwner = b._cursor === p.DEFAULT ? null : this._target;
- }
- };
- b.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};
- window.addEventListener("mousemove", this._boundOnDrag, !1);
- window.addEventListener("mouseup", this._boundOnMouseUp, !1);
- this._target.onMouseDown(b.x, b.y);
- }
- };
- b.prototype._onDrag = function(a) {
- var b = this._dragInfo;
- a = this._getTargetMousePos(a, b.originalTarget);
- var h = {x:a.x - b.start.x, y:a.y - b.start.y};
- b.current = a;
- b.delta = h;
- b.hasMoved = !0;
- this._target.onDrag(b.start.x, b.start.y, a.x, a.y, h.x, h.y);
- };
- b.prototype._onMouseUp = function(a) {
- window.removeEventListener("mousemove", this._boundOnDrag);
- window.removeEventListener("mouseup", this._boundOnMouseUp);
- var b = 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);
- } else {
- this._target.onClick(a.current.x, a.current.y);
- }
- this._dragInfo = null;
- this._wheelDisabled = !0;
- setTimeout(function() {
- b._wheelDisabled = !1;
- }, 500);
- };
- b.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);
- this._startHoverCheck(a);
- }
- };
- b.prototype._onMouseOut = function(a) {
- a.target.removeEventListener("mousemove", this._boundOnMouseMove, !1);
- if (!this._dragInfo) {
- this._target.onMouseOut();
- }
- this._killHoverCheck();
- };
- b.prototype._onMouseMove = function(a) {
- if (!this._dragInfo) {
- var b = this._getTargetMousePos(a, a.target);
- this._target.onMouseMove(b.x, b.y);
- this._killHoverCheck();
- this._startHoverCheck(a);
- }
- };
- b.prototype._onMouseWheel = function(b) {
- if (!(b.altKey || b.metaKey || b.ctrlKey || b.shiftKey || (b.preventDefault(), this._dragInfo || this._wheelDisabled))) {
- var r = this._getTargetMousePos(b, b.target);
- b = a("undefined" !== typeof b.deltaY ? b.deltaY / 16 : -b.wheelDelta / 40, -1, 1);
- b = Math.pow(1.2, b) - 1;
- this._target.onMouseWheel(r.x, r.y, b);
- }
- };
- b.prototype._startHoverCheck = function(a) {
- this._hoverInfo = {isHovering:!1, timeoutHandle:setTimeout(this._onMouseMoveIdleHandler.bind(this), b.HOVER_TIMEOUT), pos:this._getTargetMousePos(a, a.target)};
- };
- b.prototype._killHoverCheck = function() {
- if (this._hoverInfo) {
- clearTimeout(this._hoverInfo.timeoutHandle);
- if (this._hoverInfo.isHovering) {
- this._target.onHoverEnd();
- }
- this._hoverInfo = null;
- }
- };
- b.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 h = b.getBoundingClientRect();
- return {x:a.clientX - h.left, y:a.clientY - h.top};
- };
- b.HOVER_TIMEOUT = 500;
- b._cursor = p.DEFAULT;
- return b;
- }();
- u.MouseController = m;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- (function(a) {
- a[a.NONE = 0] = "NONE";
- a[a.WINDOW = 1] = "WINDOW";
- a[a.HANDLE_LEFT = 2] = "HANDLE_LEFT";
- a[a.HANDLE_RIGHT = 3] = "HANDLE_RIGHT";
- a[a.HANDLE_BOTH = 4] = "HANDLE_BOTH";
- })(k.FlameChartDragTarget || (k.FlameChartDragTarget = {}));
- var a = function() {
- function a(m) {
- this._controller = m;
- this._initialized = !1;
- this._canvas = document.createElement("canvas");
- this._context = this._canvas.getContext("2d");
- this._mouseController = new k.MouseController(this, this._canvas);
- m = m.container;
- m.appendChild(this._canvas);
- m = m.getBoundingClientRect();
- this.setSize(m.width);
- }
- Object.defineProperty(a.prototype, "canvas", {get:function() {
- return this._canvas;
- }, enumerable:!0, configurable:!0});
- a.prototype.setSize = function(a, b) {
- void 0 === b && (b = 20);
- this._width = a;
- this._height = b;
- this._resetCanvas();
- this.draw();
- };
- a.prototype.initialize = function(a, b) {
- this._initialized = !0;
- this.setRange(a, b, !1);
- this.setWindow(a, b, !1);
- this.draw();
- };
- a.prototype.setWindow = function(a, b, l) {
- void 0 === l && (l = !0);
- this._windowStart = a;
- this._windowEnd = b;
- !l || this.draw();
- };
- a.prototype.setRange = function(a, b, l) {
- void 0 === l && (l = !0);
- this._rangeStart = a;
- this._rangeEnd = b;
- !l || this.draw();
- };
- a.prototype.destroy = function() {
- this._mouseController.destroy();
- this._mouseController = null;
- this._controller.container.removeChild(this._canvas);
- this._controller = null;
- };
- a.prototype._resetCanvas = function() {
- var a = window.devicePixelRatio, b = this._canvas;
- b.width = this._width * a;
- b.height = this._height * a;
- b.style.width = this._width + "px";
- b.style.height = this._height + "px";
- };
- a.prototype.draw = function() {
- };
- a.prototype._almostEq = function(a, b, l) {
- void 0 === l && (l = 10);
- l = Math.pow(10, l);
- return Math.abs(a - b) < 1 / l;
- };
- a.prototype._windowEqRange = function() {
- return this._almostEq(this._windowStart, this._rangeStart) && this._almostEq(this._windowEnd, this._rangeEnd);
- };
- a.prototype._decimalPlaces = function(a) {
- return (+a).toFixed(10).replace(/^-?\d*\.?|0+$/g, "").length;
- };
- a.prototype._toPixelsRelative = function(a) {
- return 0;
- };
- a.prototype._toPixels = function(a) {
- return 0;
- };
- a.prototype._toTimeRelative = function(a) {
- return 0;
- };
- a.prototype._toTime = function(a) {
- return 0;
- };
- a.prototype.onMouseWheel = function(k, b, l) {
- k = this._toTime(k);
- b = this._windowStart;
- var r = this._windowEnd, h = r - b;
- l = Math.max((a.MIN_WINDOW_LEN - h) / h, l);
- this._controller.setWindow(b + (b - k) * l, r + (r - k) * l);
- this.onHoverEnd();
- };
- a.prototype.onMouseDown = function(a, b) {
- };
- a.prototype.onMouseMove = function(a, b) {
- };
- a.prototype.onMouseOver = function(a, b) {
- };
- a.prototype.onMouseOut = function() {
- };
- a.prototype.onDrag = function(a, b, l, k, h, t) {
- };
- a.prototype.onDragEnd = function(a, b, l, k, h, t) {
- };
- a.prototype.onClick = function(a, b) {
- };
- a.prototype.onHoverStart = function(a, b) {
- };
- a.prototype.onHoverEnd = function() {
- };
- a.DRAGHANDLE_WIDTH = 4;
- a.MIN_WINDOW_LEN = .1;
- return a;
- }();
- k.FlameChartBase = a;
- })(k.Profiler || (k.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.StringUtilities.trimMiddle, p = function(m) {
- function b(a, b) {
- m.call(this, a);
- this._textWidth = {};
- this._minFrameWidthInPixels = 1;
- this._snapshot = b;
- this._kindStyle = Object.create(null);
- }
- __extends(b, m);
- b.prototype.setSize = function(a, b) {
- m.prototype.setSize.call(this, a, b || this._initialized ? 12.5 * this._maxDepth : 100);
- };
- b.prototype.initialize = function(a, b) {
- this._initialized = !0;
- this._maxDepth = this._snapshot.maxDepth;
- this.setRange(a, b, !1);
- this.setWindow(a, b, !1);
- this.setSize(this._width, 12.5 * this._maxDepth);
- };
- b.prototype.destroy = function() {
- m.prototype.destroy.call(this);
- this._snapshot = null;
- };
- b.prototype.draw = function() {
- var a = this._context, b = window.devicePixelRatio;
- k.ColorStyle.reset();
- a.save();
- a.scale(b, b);
- 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 h = a.getChildRange(this._windowStart, this._windowEnd);
- if (h) {
- for (var t = h.startIndex;t <= h.endIndex;t++) {
- var k = a.children[t];
- this._drawFrame(k, b) && this._drawChildren(k, b + 1);
- }
- }
- };
- b.prototype._drawFrame = function(a, b) {
- var h = this._context, t = this._toPixels(a.startTime), q = this._toPixels(a.endTime), n = q - t;
- if (n <= this._minFrameWidthInPixels) {
- return h.fillStyle = this._controller.theme.tabToolbar(1), h.fillRect(t, 12.5 * b, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1;
- }
- 0 > t && (q = n + t, t = 0);
- var q = q - t, v = this._kindStyle[a.kind.id];
- v || (v = k.ColorStyle.randomStyle(), v = this._kindStyle[a.kind.id] = {bgColor:v, textColor:k.ColorStyle.contrastStyle(v)});
- h.save();
- h.fillStyle = v.bgColor;
- h.fillRect(t, 12.5 * b, q, 12);
- 12 < n && (n = a.kind.name) && n.length && (n = this._prepareText(h, n, q - 4), n.length && (h.fillStyle = v.textColor, h.textBaseline = "bottom", h.fillText(n, t + 2, 12.5 * (b + 1) - 1)));
- h.restore();
- return !0;
- };
- b.prototype._prepareText = function(b, k, h) {
- var t = this._measureWidth(b, k);
- if (h > t) {
- return k;
- }
- for (var t = 3, q = k.length;t < q;) {
- var n = t + q >> 1;
- this._measureWidth(b, a(k, n)) < h ? t = n + 1 : q = n;
- }
- k = a(k, q - 1);
- t = this._measureWidth(b, k);
- return t <= h ? k : "";
- };
- b.prototype._measureWidth = function(a, b) {
- var h = this._textWidth[b];
- h || (h = a.measureText(b).width, this._textWidth[b] = h);
- return h;
- };
- b.prototype._toPixelsRelative = function(a) {
- return a * this._width / (this._windowEnd - this._windowStart);
- };
- b.prototype._toPixels = function(a) {
- return this._toPixelsRelative(a - this._windowStart);
- };
- b.prototype._toTimeRelative = function(a) {
- return a * (this._windowEnd - this._windowStart) / this._width;
- };
- b.prototype._toTime = function(a) {
- return this._toTimeRelative(a) + this._windowStart;
- };
- b.prototype._getFrameAtPosition = function(a, b) {
- var h = this._toTime(a), k = 1 + b / 12.5 | 0;
- if ((h = this._snapshot.query(h)) && h.depth >= k) {
- for (;h && h.depth > k;) {
- h = h.parent;
- }
- return h;
- }
- return null;
- };
- b.prototype.onMouseDown = function(a, b) {
- this._windowEqRange() || (this._mouseController.updateCursor(u.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1});
- };
- b.prototype.onMouseMove = function(a, b) {
- };
- b.prototype.onMouseOver = function(a, b) {
- };
- b.prototype.onMouseOut = function() {
- };
- b.prototype.onDrag = function(a, b, h, k, q, n) {
- if (a = this._dragInfo) {
- q = this._toTimeRelative(-q), this._controller.setWindow(a.windowStartInitial + q, a.windowEndInitial + q);
- }
- };
- b.prototype.onDragEnd = function(a, b, h, k, q, n) {
- this._dragInfo = null;
- this._mouseController.updateCursor(u.MouseCursor.DEFAULT);
- };
- b.prototype.onClick = function(a, b) {
- this._dragInfo = null;
- this._mouseController.updateCursor(u.MouseCursor.DEFAULT);
- };
- b.prototype.onHoverStart = function(a, b) {
- var h = this._getFrameAtPosition(a, b);
- h && (this._hoveredFrame = h, this._controller.showTooltip(this, h, a, b));
- };
- b.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];
- };
- return b;
- }(u.FlameChartBase);
- u.FlameChart = p;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.NumberUtilities.clamp;
- (function(a) {
- a[a.OVERLAY = 0] = "OVERLAY";
- a[a.STACK = 1] = "STACK";
- a[a.UNION = 2] = "UNION";
- })(u.FlameChartOverviewMode || (u.FlameChartOverviewMode = {}));
- var p = function(k) {
- function b(a, b) {
- void 0 === b && (b = 1);
- this._mode = b;
- this._overviewCanvasDirty = !0;
- this._overviewCanvas = document.createElement("canvas");
- this._overviewContext = this._overviewCanvas.getContext("2d");
- k.call(this, a);
- }
- __extends(b, k);
- b.prototype.setSize = function(a, b) {
- k.prototype.setSize.call(this, a, b || 64);
- };
- Object.defineProperty(b.prototype, "mode", {set:function(a) {
- this._mode = a;
- this.draw();
- }, enumerable:!0, configurable:!0});
- b.prototype._resetCanvas = function() {
- k.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, h = this._width, k = this._height;
- a.save();
- a.scale(b, b);
- a.fillStyle = this._controller.theme.bodyBackground(1);
- a.fillRect(0, 0, h, k);
- 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, h = window.devicePixelRatio, k = this._selection ? this._selection.left : this._toPixels(this._windowStart), q = this._selection ? this._selection.right : this._toPixels(this._windowEnd), n = this._controller.theme;
- a.save();
- a.scale(h, h);
- this._selection ? (a.fillStyle = n.selectionText(.15), a.fillRect(k, 1, q - k, b - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(k + .5, 0, q - k - 1, 4), a.fillRect(k + .5, b - 4, q - k - 1, 4)) : (a.fillStyle = n.bodyBackground(.4), a.fillRect(0, 1, k, b - 1), a.fillRect(q, 1, this._width, b - 1));
- a.beginPath();
- a.moveTo(k, 0);
- a.lineTo(k, b);
- a.moveTo(q, 0);
- a.lineTo(q, b);
- a.lineWidth = .5;
- a.strokeStyle = n.foregroundTextGrey(1);
- a.stroke();
- b = this._selection ? this._toTime(this._selection.left) : this._windowStart;
- h = this._selection ? this._toTime(this._selection.right) : this._windowEnd;
- b = Math.abs(h - b);
- a.fillStyle = n.selectionText(.5);
- a.font = "8px sans-serif";
- a.textBaseline = "alphabetic";
- a.textAlign = "end";
- a.fillText(b.toFixed(2), Math.min(k, q) - 4, 10);
- a.fillText((b / 60).toFixed(2), Math.min(k, q) - 4, 20);
- a.restore();
- };
- b.prototype._drawChart = function() {
- var a = window.devicePixelRatio, b = this._height, h = this._controller.activeProfile, k = 4 * this._width, q = h.totalTime / k, n = this._overviewContext, v = this._controller.theme.blueHighlight(1);
- n.save();
- n.translate(0, a * b);
- var e = -a * b / (h.maxDepth - 1);
- n.scale(a / 4, e);
- n.clearRect(0, 0, k, h.maxDepth - 1);
- 1 == this._mode && n.scale(1, 1 / h.snapshotCount);
- for (var g = 0, d = h.snapshotCount;g < d;g++) {
- var c = h.getSnapshotAt(g);
- if (c) {
- var f = null, y = 0;
- n.beginPath();
- n.moveTo(0, 0);
- for (var x = 0;x < k;x++) {
- y = h.startTime + x * q, y = (f = f ? f.queryNext(y) : c.query(y)) ? f.getDepth() - 1 : 0, n.lineTo(x, y);
- }
- n.lineTo(x, 0);
- n.fillStyle = v;
- n.fill();
- 1 == this._mode && n.translate(0, -b * a / e);
- }
- }
- n.restore();
- };
- b.prototype._toPixelsRelative = function(a) {
- return a * this._width / (this._rangeEnd - this._rangeStart);
- };
- b.prototype._toPixels = function(a) {
- return this._toPixelsRelative(a - this._rangeStart);
- };
- b.prototype._toTimeRelative = function(a) {
- return a * (this._rangeEnd - this._rangeStart) / this._width;
- };
- b.prototype._toTime = function(a) {
- return this._toTimeRelative(a) + this._rangeStart;
- };
- b.prototype._getDragTargetUnderCursor = function(a, b) {
- if (0 <= b && b < this._height) {
- var h = this._toPixels(this._windowStart), k = this._toPixels(this._windowEnd), q = 2 + u.FlameChartBase.DRAGHANDLE_WIDTH / 2, n = a >= h - q && a <= h + q, v = a >= k - q && a <= k + q;
- if (n && v) {
- return 4;
- }
- if (n) {
- return 2;
- }
- if (v) {
- return 3;
- }
- if (!this._windowEqRange() && a > h + q && a < k - q) {
- return 1;
- }
- }
- return 0;
- };
- b.prototype.onMouseDown = function(a, b) {
- var h = this._getDragTargetUnderCursor(a, b);
- 0 === h ? (this._selection = {left:a, right:a}, this.draw()) : (1 === h && this._mouseController.updateCursor(u.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:h});
- };
- b.prototype.onMouseMove = function(a, b) {
- var h = u.MouseCursor.DEFAULT, k = this._getDragTargetUnderCursor(a, b);
- 0 === k || this._selection || (h = 1 === k ? u.MouseCursor.GRAB : u.MouseCursor.EW_RESIZE);
- this._mouseController.updateCursor(h);
- };
- b.prototype.onMouseOver = function(a, b) {
- this.onMouseMove(a, b);
- };
- b.prototype.onMouseOut = function() {
- this._mouseController.updateCursor(u.MouseCursor.DEFAULT);
- };
- b.prototype.onDrag = function(b, k, h, t, q, n) {
- if (this._selection) {
- this._selection = {left:b, right:a(h, 0, this._width - 1)}, this.draw();
- } else {
- b = this._dragInfo;
- if (4 === b.target) {
- if (0 !== q) {
- b.target = 0 > q ? 2 : 3;
- } else {
- return;
- }
- }
- k = this._windowStart;
- h = this._windowEnd;
- q = this._toTimeRelative(q);
- switch(b.target) {
- case 1:
- k = b.windowStartInitial + q;
- h = b.windowEndInitial + q;
- break;
- case 2:
- k = a(b.windowStartInitial + q, this._rangeStart, h - u.FlameChartBase.MIN_WINDOW_LEN);
- break;
- case 3:
- h = a(b.windowEndInitial + q, k + u.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
- break;
- default:
- return;
- }
- this._controller.setWindow(k, h);
- }
- };
- b.prototype.onDragEnd = function(a, b, h, k, q, n) {
- this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(h)));
- this._dragInfo = null;
- this.onMouseMove(h, k);
- };
- b.prototype.onClick = function(a, b) {
- this._selection = this._dragInfo = null;
- this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, b) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, b));
- this.draw();
- };
- b.prototype.onHoverStart = function(a, b) {
- };
- b.prototype.onHoverEnd = function() {
- };
- return b;
- }(u.FlameChartBase);
- u.FlameChartOverview = p;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(p) {
- var a = k.NumberUtilities.clamp;
- (function(a) {
- a[a.OVERVIEW = 0] = "OVERVIEW";
- a[a.CHART = 1] = "CHART";
- })(p.FlameChartHeaderType || (p.FlameChartHeaderType = {}));
- var w = function(k) {
- function b(a, b) {
- this._type = b;
- k.call(this, a);
- }
- __extends(b, k);
- b.prototype.draw = function() {
- var a = this._context, b = window.devicePixelRatio, h = this._width, k = this._height;
- a.save();
- a.scale(b, b);
- a.fillStyle = this._controller.theme.tabToolbar(1);
- a.fillRect(0, 0, h, k);
- this._initialized && (0 == this._type ? (b = this._toPixels(this._windowStart), h = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(b, 0, h - b, k), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(b), this._drawDragHandle(h)) : this._drawLabels(this._windowStart, this._windowEnd));
- a.restore();
- };
- b.prototype._drawLabels = function(a, k) {
- var h = this._context, t = this._calculateTickInterval(a, k), q = Math.ceil(a / t) * t, n = 500 <= t, v = n ? 1E3 : 1, e = this._decimalPlaces(t / v), n = n ? "s" : "ms", g = this._toPixels(q), d = this._height / 2, c = this._controller.theme;
- h.lineWidth = 1;
- h.strokeStyle = c.contentTextDarkGrey(.5);
- h.fillStyle = c.contentTextDarkGrey(1);
- h.textAlign = "right";
- h.textBaseline = "middle";
- h.font = "11px sans-serif";
- for (c = this._width + b.TICK_MAX_WIDTH;g < c;) {
- var f = (q / v).toFixed(e) + " " + n;
- h.fillText(f, g - 7, d + 1);
- h.beginPath();
- h.moveTo(g, 0);
- h.lineTo(g, this._height + 1);
- h.closePath();
- h.stroke();
- q += t;
- g = this._toPixels(q);
- }
- };
- b.prototype._calculateTickInterval = function(a, k) {
- var h = (k - a) / (this._width / b.TICK_MAX_WIDTH), t = Math.pow(10, Math.floor(Math.log(h) / Math.LN10)), h = h / t;
- return 5 < h ? 10 * t : 2 < h ? 5 * t : 1 < h ? 2 * t : t;
- };
- 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 - p.FlameChartBase.DRAGHANDLE_WIDTH / 2, 1, p.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2, 2, !0);
- };
- b.prototype._drawRoundedRect = function(a, b, h, k, q, n, v, e) {
- void 0 === v && (v = !0);
- void 0 === e && (e = !0);
- a.beginPath();
- a.moveTo(b + n, h);
- a.lineTo(b + k - n, h);
- a.quadraticCurveTo(b + k, h, b + k, h + n);
- a.lineTo(b + k, h + q - n);
- a.quadraticCurveTo(b + k, h + q, b + k - n, h + q);
- a.lineTo(b + n, h + q);
- a.quadraticCurveTo(b, h + q, b, h + q - n);
- a.lineTo(b, h + n);
- a.quadraticCurveTo(b, h, b + n, h);
- a.closePath();
- v && a.stroke();
- e && a.fill();
- };
- b.prototype._toPixelsRelative = function(a) {
- return a * this._width / (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart);
- };
- b.prototype._toPixels = function(a) {
- return this._toPixelsRelative(a - (0 === this._type ? this._rangeStart : this._windowStart));
- };
- b.prototype._toTimeRelative = function(a) {
- return a * (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart) / this._width;
- };
- b.prototype._toTime = function(a) {
- var b = 0 === this._type ? this._rangeStart : this._windowStart;
- return this._toTimeRelative(a) + b;
- };
- b.prototype._getDragTargetUnderCursor = function(a, b) {
- if (0 <= b && b < this._height) {
- if (0 === this._type) {
- var h = this._toPixels(this._windowStart), k = this._toPixels(this._windowEnd), q = 2 + p.FlameChartBase.DRAGHANDLE_WIDTH / 2, h = a >= h - q && a <= h + q, k = a >= k - q && a <= k + q;
- if (h && k) {
- return 4;
- }
- if (h) {
- return 2;
- }
- if (k) {
- return 3;
- }
- }
- if (!this._windowEqRange()) {
- return 1;
- }
- }
- return 0;
- };
- b.prototype.onMouseDown = function(a, b) {
- var h = this._getDragTargetUnderCursor(a, b);
- 1 === h && this._mouseController.updateCursor(p.MouseCursor.GRABBING);
- this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:h};
- };
- b.prototype.onMouseMove = function(a, b) {
- var h = p.MouseCursor.DEFAULT, k = this._getDragTargetUnderCursor(a, b);
- 0 !== k && (1 !== k ? h = p.MouseCursor.EW_RESIZE : 1 !== k || this._windowEqRange() || (h = p.MouseCursor.GRAB));
- this._mouseController.updateCursor(h);
- };
- b.prototype.onMouseOver = function(a, b) {
- this.onMouseMove(a, b);
- };
- b.prototype.onMouseOut = function() {
- this._mouseController.updateCursor(p.MouseCursor.DEFAULT);
- };
- b.prototype.onDrag = function(b, k, h, t, q, n) {
- b = this._dragInfo;
- if (4 === b.target) {
- if (0 !== q) {
- b.target = 0 > q ? 2 : 3;
- } else {
- return;
- }
- }
- k = this._windowStart;
- h = this._windowEnd;
- q = this._toTimeRelative(q);
- switch(b.target) {
- case 1:
- h = 0 === this._type ? 1 : -1;
- k = b.windowStartInitial + h * q;
- h = b.windowEndInitial + h * q;
- break;
- case 2:
- k = a(b.windowStartInitial + q, this._rangeStart, h - p.FlameChartBase.MIN_WINDOW_LEN);
- break;
- case 3:
- h = a(b.windowEndInitial + q, k + p.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
- break;
- default:
- return;
- }
- this._controller.setWindow(k, h);
- };
- b.prototype.onDragEnd = function(a, b, h, k, q, n) {
- this._dragInfo = null;
- this.onMouseMove(h, k);
- };
- b.prototype.onClick = function(a, b) {
- 1 === this._dragInfo.target && this._mouseController.updateCursor(p.MouseCursor.GRAB);
- };
- b.prototype.onHoverStart = function(a, b) {
- };
- b.prototype.onHoverEnd = function() {
- };
- b.TICK_MAX_WIDTH = 75;
- return b;
- }(p.FlameChartBase);
- p.FlameChartHeader = w;
- })(p.Profiler || (p.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- (function(a) {
- var k = function() {
- function a(b, k, h, t, q) {
- this.pageLoaded = b;
- this.threadsTotal = k;
- this.threadsLoaded = h;
- this.threadFilesTotal = t;
- this.threadFilesLoaded = q;
- }
- a.prototype.toString = function() {
- return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, b, h) {
- return a + ":" + this[a];
- }, this).join(", ") + "]";
- };
- return a;
- }();
- a.TraceLoggerProgressInfo = k;
- var m = function() {
- function b(a) {
- this._baseUrl = a;
- this._threads = [];
- this._progressInfo = null;
- }
- b.prototype.loadPage = function(a, b, h) {
- this._threads = [];
- this._pageLoadCallback = b;
- this._pageLoadProgressCallback = h;
- this._progressInfo = new k(!1, 0, 0, 0, 0);
- this._loadData([a], this._onLoadPage.bind(this));
- };
- Object.defineProperty(b.prototype, "buffers", {get:function() {
- for (var a = [], b = 0, h = this._threads.length;b < h;b++) {
- a.push(this._threads[b].buffer);
- }
- return a;
- }, enumerable:!0, configurable:!0});
- b.prototype._onProgress = function() {
- this._pageLoadProgressCallback && this._pageLoadProgressCallback.call(this, this._progressInfo);
- };
- b.prototype._onLoadPage = function(b) {
- if (b && 1 == b.length) {
- var k = this, h = 0;
- b = b[0];
- var t = b.length;
- this._threads = Array(t);
- this._progressInfo.pageLoaded = !0;
- this._progressInfo.threadsTotal = t;
- for (var q = 0;q < b.length;q++) {
- var n = b[q], v = [n.dict, n.tree];
- n.corrections && v.push(n.corrections);
- this._progressInfo.threadFilesTotal += v.length;
- this._loadData(v, function(b) {
- return function(g) {
- g && (g = new a.Thread(g), g.buffer.name = "Thread " + b, k._threads[b] = g);
- h++;
- k._progressInfo.threadsLoaded++;
- k._onProgress();
- h === t && k._pageLoadCallback.call(k, null, k._threads);
- };
- }(q), function(a) {
- k._progressInfo.threadFilesLoaded++;
- k._onProgress();
- });
- }
- this._onProgress();
- } else {
- this._pageLoadCallback.call(this, "Error loading page.", null);
- }
- };
- b.prototype._loadData = function(a, b, h) {
- var k = 0, q = 0, n = a.length, v = [];
- v.length = n;
- for (var e = 0;e < n;e++) {
- var g = this._baseUrl + a[e], d = /\.tl$/i.test(g), c = new XMLHttpRequest, d = d ? "arraybuffer" : "json";
- c.open("GET", g, !0);
- c.responseType = d;
- c.onload = function(d, c) {
- return function(a) {
- if ("json" === c) {
- if (a = this.response, "string" === typeof a) {
- try {
- a = JSON.parse(a), v[d] = a;
- } catch (g) {
- q++;
- }
- } else {
- v[d] = a;
- }
- } else {
- v[d] = this.response;
- }
- ++k;
- h && h(k);
- k === n && b(v);
- };
- }(e, d);
- c.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.TraceLogger = m;
- })(k.TraceLogger || (k.TraceLogger = {}));
- })(k.Profiler || (k.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- (function(a) {
- var p;
- (function(a) {
- a[a.START_HI = 0] = "START_HI";
- a[a.START_LO = 4] = "START_LO";
- a[a.STOP_HI = 8] = "STOP_HI";
- a[a.STOP_LO = 12] = "STOP_LO";
- a[a.TEXTID = 16] = "TEXTID";
- a[a.NEXTID = 20] = "NEXTID";
- })(p || (p = {}));
- p = function() {
- function a(b) {
- 2 <= b.length && (this._text = b[0], this._data = new DataView(b[1]), this._buffer = new k.TimelineBuffer, this._walkTree(0));
- }
- Object.defineProperty(a.prototype, "buffer", {get:function() {
- return this._buffer;
- }, enumerable:!0, configurable:!0});
- a.prototype._walkTree = function(b) {
- var k = this._data, r = this._buffer;
- do {
- var h = b * a.ITEM_SIZE, t = 4294967295 * k.getUint32(h + 0) + k.getUint32(h + 4), q = 4294967295 * k.getUint32(h + 8) + k.getUint32(h + 12), n = k.getUint32(h + 16), h = k.getUint32(h + 20), v = 1 === (n & 1), n = n >>> 1, n = this._text[n];
- r.enter(n, null, t / 1E6);
- v && this._walkTree(b + 1);
- r.leave(n, null, q / 1E6);
- b = h;
- } while (0 !== b);
- };
- a.ITEM_SIZE = 24;
- return a;
- }();
- a.Thread = p;
- })(k.TraceLogger || (k.TraceLogger = {}));
- })(k.Profiler || (k.Profiler = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(p) {
- var a = k.NumberUtilities.clamp, w = function() {
- function a() {
- this.length = 0;
- this.lines = [];
- this.format = [];
- this.time = [];
- this.repeat = [];
- this.length = 0;
- }
- a.prototype.append = function(a, b) {
- 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(b ? {backgroundFillStyle:b} : void 0), this.time.push(performance.now()), this.length++);
- };
- a.prototype.get = function(a) {
- return this.lines[a];
- };
- a.prototype.getFormat = function(a) {
- return this.format[a];
- };
- a.prototype.getTime = function(a) {
- return this.time[a];
- };
- a.prototype.getRepeat = function(a) {
- return this.repeat[a];
- };
- return a;
- }();
- p.Buffer = w;
- var m = function() {
- function b(a) {
- this.lineColor = "#2A2A2A";
- this.alternateLineColor = "#262626";
- this.textColor = "#FFFFFF";
- this.selectionColor = "#96C9F3";
- this.selectionTextColor = "#000000";
- this.ratio = 1;
- this.showLineNumbers = !0;
- this.showLineCounter = this.showLineTime = !1;
- this.canvas = a;
- this.canvas.focus();
- this.context = a.getContext("2d", {original:!0});
- this.context.fillStyle = "#FFFFFF";
- this.fontSize = 10;
- this.columnIndex = this.pageIndex = this.lineIndex = 0;
- this.selection = null;
- this.lineHeight = 15;
- this.hasFocus = !1;
- window.addEventListener("resize", this._resizeHandler.bind(this), !1);
- this._resizeHandler();
- this.textMarginBottom = this.textMarginLeft = 4;
- this.refreshFrequency = 0;
- this.buffer = new w;
- a.addEventListener("keydown", function(a) {
- var l = 0;
- switch(a.keyCode) {
- case x:
- this.printHelp();
- break;
- case f:
- this.showLineNumbers = !this.showLineNumbers;
- break;
- case y:
- this.showLineTime = !this.showLineTime;
- break;
- case n:
- l = -1;
- break;
- case v:
- l = 1;
- break;
- case b:
- l = -this.pageLineCount;
- break;
- case h:
- l = this.pageLineCount;
- break;
- case k:
- l = -this.lineIndex;
- break;
- case q:
- l = this.buffer.length - this.lineIndex;
- break;
- case e:
- this.columnIndex -= a.metaKey ? 10 : 1;
- 0 > this.columnIndex && (this.columnIndex = 0);
- a.preventDefault();
- break;
- case g:
- this.columnIndex += a.metaKey ? 10 : 1;
- a.preventDefault();
- break;
- case d:
- if (a.metaKey || a.ctrlKey) {
- this.selection = {start:0, end:this.buffer.length - 1}, a.preventDefault();
- }
- break;
- case c:
- ;
- case I:
- if (a.metaKey || a.ctrlKey) {
- var m = "";
- if (this.selection) {
- for (var S = this.selection.start;S <= this.selection.end;S++) {
- m += this.buffer.get(S) + "\n";
- }
- } else {
- m = this.buffer.get(this.lineIndex);
- }
- a.keyCode === c ? alert(m) : window.open(URL.createObjectURL(new Blob([m], {type:"text/plain"})), "_blank");
- }
- ;
- }
- 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);
- a.addEventListener("focus", function(d) {
- this.hasFocus = !0;
- }.bind(this), !1);
- a.addEventListener("blur", function(d) {
- this.hasFocus = !1;
- }.bind(this), !1);
- var b = 33, h = 34, k = 36, q = 35, n = 38, v = 40, e = 37, g = 39, d = 65, c = 67, f = 78, y = 84, x = 72, I = 83;
- }
- b.prototype.printHelp = function() {
- var a = this;
- "h - help;n - turn on/off line numbers;t - turn on/off line time;arrow_keys - navigation;cmd/ctrl+a - select all;cmd/ctrl+c - copy/alert selection;cmd/ctrl+s - open selection in new tab;shift+arrow_keys - selection".split(";").forEach(function(b) {
- return a.buffer.append(b, "#002000");
- });
- };
- b.prototype.resize = function() {
- this._resizeHandler();
- };
- b.prototype._resizeHandler = function() {
- var a = this.canvas.parentElement, b = a.clientWidth, a = a.clientHeight && a.clientHeight - 1, h = window.devicePixelRatio || 1;
- 1 !== h ? (this.ratio = h / 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);
- this.pageLineCount = Math.floor(this.canvas.height / this.lineHeight);
- };
- b.prototype.gotoLine = function(b) {
- this.lineIndex = a(b, 0, this.buffer.length - 1);
- };
- b.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) {
- this.gotoLine(this.lineIndex + a);
- this.scrollIntoView();
- };
- b.prototype.paint = function() {
- var a = this.pageLineCount;
- this.pageIndex + a > this.buffer.length && (a = this.buffer.length - this.pageIndex);
- var b = this.textMarginLeft, h = b + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), k = h + (this.showLineTime ? 40 : 10), q = k + 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, v = this.lineHeight, e = 0;e < a;e++) {
- var g = e * this.lineHeight, d = this.pageIndex + e, c = this.buffer.get(d), f = this.buffer.getFormat(d), y = this.buffer.getRepeat(d), x = 1 < d ? this.buffer.getTime(d) - this.buffer.getTime(0) : 0;
- this.context.fillStyle = d % 2 ? this.lineColor : this.alternateLineColor;
- f && f.backgroundFillStyle && (this.context.fillStyle = f.backgroundFillStyle);
- this.context.fillRect(0, g, n, v);
- this.context.fillStyle = this.selectionTextColor;
- this.context.fillStyle = this.textColor;
- this.selection && d >= this.selection.start && d <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, g, n, v), this.context.fillStyle = this.selectionTextColor);
- this.hasFocus && d === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, g, n, v), this.context.fillStyle = this.selectionTextColor);
- 0 < this.columnIndex && (c = c.substring(this.columnIndex));
- g = (e + 1) * this.lineHeight - this.textMarginBottom;
- this.showLineNumbers && this.context.fillText(String(d), b, g);
- this.showLineTime && this.context.fillText(x.toFixed(1).padLeft(" ", 6), h, g);
- 1 < y && this.context.fillText(String(y).padLeft(" ", 3), k, g);
- this.context.fillText(c, q, g);
- }
- };
- b.prototype.refreshEvery = function(a) {
- function b() {
- h.paint();
- h.refreshFrequency && setTimeout(b, h.refreshFrequency);
- }
- var h = this;
- this.refreshFrequency = a;
- h.refreshFrequency && setTimeout(b, h.refreshFrequency);
- };
- b.prototype.isScrolledToBottom = function() {
- return this.lineIndex === this.buffer.length - 1;
- };
- return b;
- }();
- p.Terminal = m;
- })(p.Terminal || (p.Terminal = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- var a = function() {
- function a(k) {
- 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 = k;
- 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, b = this._containerHeight;
- this._onContainerSizeChanged();
- var k = this;
- setInterval(function() {
- if (a !== k._containerWidth || b !== k._containerHeight) {
- k._onContainerSizeChanged(), a = k._containerWidth, b = k._containerHeight;
- }
- }, 10);
- };
- a.prototype._onContainerSizeChanged = function() {
- var a = this._containerWidth, b = this._containerHeight, k = window.devicePixelRatio || 1;
- 1 !== k ? (this._ratio = k / 1, this._canvas.width = a * this._ratio, this._canvas.height = b * this._ratio, this._canvas.style.width = a + "px", this._canvas.style.height = b + "px") : (this._ratio = 1, this._canvas.width = a, this._canvas.height = b);
- };
- Object.defineProperty(a.prototype, "_containerWidth", {get:function() {
- return this._container.clientWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "_containerHeight", {get:function() {
- return this._container.clientHeight;
- }, enumerable:!0, configurable:!0});
- a.prototype.tickAndRender = function(a, b) {
- void 0 === a && (a = !1);
- void 0 === b && (b = 0);
- if (0 === this._lastTime) {
- this._lastTime = performance.now();
- } else {
- var k = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, r = this._context, h = 2 * this._ratio, t = 30 * this._ratio, q = performance;
- q.memory && (t += 30 * this._ratio);
- var n = (this._canvas.width - t) / (h + 1) | 0, v = this._index++;
- this._index > n && (this._index = 0);
- n = this._canvas.height;
- r.globalAlpha = 1;
- r.fillStyle = "black";
- r.fillRect(t + v * (h + 1), 0, 4 * h, this._canvas.height);
- var e = Math.min(1E3 / 60 / k, 1);
- r.fillStyle = "#00FF00";
- r.globalAlpha = a ? .5 : 1;
- e = n / 2 * e | 0;
- r.fillRect(t + v * (h + 1), n - e, h, e);
- b && (e = Math.min(1E3 / 240 / b, 1), r.fillStyle = "#FF6347", e = n / 2 * e | 0, r.fillRect(t + v * (h + 1), n / 2 - e, h, e));
- 0 === v % 16 && (r.globalAlpha = 1, r.fillStyle = "black", r.fillRect(0, 0, t, this._canvas.height), r.fillStyle = "white", r.font = 8 * this._ratio + "px Arial", r.textBaseline = "middle", h = (1E3 / k).toFixed(0), b && (h += " " + b.toFixed(0)), q.memory && (h += " " + (q.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), r.fillText(h, 2 * this._ratio, this._containerHeight / 2 * this._ratio));
- this._lastTime = performance.now();
- this._lastWeightedTime = k;
- }
- };
- return a;
- }();
- k.FPS = a;
- })(k.Mini || (k.Mini = {}));
- })(k.Tools || (k.Tools = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load Shared Dependencies");
-console.time("Load GFX Dependencies");
-(function(k) {
- (function(p) {
- function u(d, f, a) {
- return r && a ? "string" === typeof f ? (d = k.ColorUtilities.cssStyleToRGBA(f), k.ColorUtilities.rgbaToCSSStyle(a.transformRGBA(d))) : f instanceof CanvasGradient && f._template ? f._template.createCanvasGradient(d, a) : f : f;
- }
- var a = k.NumberUtilities.clamp;
- (function(d) {
- d[d.None = 0] = "None";
- d[d.Brief = 1] = "Brief";
- d[d.Verbose = 2] = "Verbose";
- })(p.TraceLevel || (p.TraceLevel = {}));
- var w = k.Metrics.Counter.instance;
- p.frameCounter = new k.Metrics.Counter(!0);
- p.traceLevel = 2;
- p.writer = null;
- p.frameCount = function(d) {
- w.count(d);
- p.frameCounter.count(d);
- };
- p.timelineBuffer = new k.Tools.Profiler.TimelineBuffer("GFX");
- p.enterTimeline = function(d, f) {
- };
- p.leaveTimeline = function(d, f) {
- };
- var m = null, b = null, l = null, r = !0;
- r && "undefined" !== typeof CanvasRenderingContext2D && (m = CanvasGradient.prototype.addColorStop, b = CanvasRenderingContext2D.prototype.createLinearGradient, l = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(d, f, a, c) {
- return (new t(d, f, a, c)).createCanvasGradient(this, null);
- }, CanvasRenderingContext2D.prototype.createRadialGradient = function(d, f, a, c, b, g) {
- return (new q(d, f, a, c, b, g)).createCanvasGradient(this, null);
- }, CanvasGradient.prototype.addColorStop = function(d, f) {
- m.call(this, d, f);
- this._template.addColorStop(d, f);
- });
- var h = function() {
- return function(d, f) {
- this.offset = d;
- this.color = f;
- };
- }(), t = function() {
- function d(f, a, c, b) {
- this.x0 = f;
- this.y0 = a;
- this.x1 = c;
- this.y1 = b;
- this.colorStops = [];
- }
- d.prototype.addColorStop = function(d, f) {
- this.colorStops.push(new h(d, f));
- };
- d.prototype.createCanvasGradient = function(d, f) {
- for (var a = b.call(d, this.x0, this.y0, this.x1, this.y1), c = this.colorStops, g = 0;g < c.length;g++) {
- var e = c[g], x = e.offset, e = e.color, e = f ? u(d, e, f) : e;
- m.call(a, x, e);
- }
- a._template = this;
- a._transform = this._transform;
- return a;
- };
- return d;
- }(), q = function() {
- function d(f, a, c, b, g, e) {
- this.x0 = f;
- this.y0 = a;
- this.r0 = c;
- this.x1 = b;
- this.y1 = g;
- this.r1 = e;
- this.colorStops = [];
- }
- d.prototype.addColorStop = function(d, f) {
- this.colorStops.push(new h(d, f));
- };
- d.prototype.createCanvasGradient = function(d, f) {
- for (var a = l.call(d, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), c = this.colorStops, b = 0;b < c.length;b++) {
- var g = c[b], e = g.offset, g = g.color, g = f ? u(d, g, f) : g;
- m.call(a, e, g);
- }
- a._template = this;
- a._transform = this._transform;
- return a;
- };
- return d;
- }(), n;
- (function(d) {
- d[d.ClosePath = 1] = "ClosePath";
- d[d.MoveTo = 2] = "MoveTo";
- d[d.LineTo = 3] = "LineTo";
- d[d.QuadraticCurveTo = 4] = "QuadraticCurveTo";
- d[d.BezierCurveTo = 5] = "BezierCurveTo";
- d[d.ArcTo = 6] = "ArcTo";
- d[d.Rect = 7] = "Rect";
- d[d.Arc = 8] = "Arc";
- d[d.Save = 9] = "Save";
- d[d.Restore = 10] = "Restore";
- d[d.Transform = 11] = "Transform";
- })(n || (n = {}));
- var v = function() {
- function d(f) {
- this._commands = new Uint8Array(d._arrayBufferPool.acquire(8), 0, 8);
- this._commandPosition = 0;
- this._data = new Float64Array(d._arrayBufferPool.acquire(8 * Float64Array.BYTES_PER_ELEMENT), 0, 8);
- this._dataPosition = 0;
- f instanceof d && this.addPath(f);
- }
- d._apply = function(d, f) {
- var a = d._commands, c = d._data, b = 0, g = 0;
- f.beginPath();
- for (var e = d._commandPosition;b < e;) {
- switch(a[b++]) {
- case 1:
- f.closePath();
- break;
- case 2:
- f.moveTo(c[g++], c[g++]);
- break;
- case 3:
- f.lineTo(c[g++], c[g++]);
- break;
- case 4:
- f.quadraticCurveTo(c[g++], c[g++], c[g++], c[g++]);
- break;
- case 5:
- f.bezierCurveTo(c[g++], c[g++], c[g++], c[g++], c[g++], c[g++]);
- break;
- case 6:
- f.arcTo(c[g++], c[g++], c[g++], c[g++], c[g++]);
- break;
- case 7:
- f.rect(c[g++], c[g++], c[g++], c[g++]);
- break;
- case 8:
- f.arc(c[g++], c[g++], c[g++], c[g++], c[g++], !!c[g++]);
- break;
- case 9:
- f.save();
- break;
- case 10:
- f.restore();
- break;
- case 11:
- f.transform(c[g++], c[g++], c[g++], c[g++], c[g++], c[g++]);
- }
- }
- };
- d.prototype._ensureCommandCapacity = function(f) {
- this._commands = d._arrayBufferPool.ensureUint8ArrayLength(this._commands, f);
- };
- d.prototype._ensureDataCapacity = function(f) {
- this._data = d._arrayBufferPool.ensureFloat64ArrayLength(this._data, f);
- };
- d.prototype._writeCommand = function(d) {
- this._commandPosition >= this._commands.length && this._ensureCommandCapacity(this._commandPosition + 1);
- this._commands[this._commandPosition++] = d;
- };
- d.prototype._writeData = function(d, f, a, c, b, g) {
- var e = arguments.length;
- this._dataPosition + e >= this._data.length && this._ensureDataCapacity(this._dataPosition + e);
- var x = this._data, h = this._dataPosition;
- x[h] = d;
- x[h + 1] = f;
- 2 < e && (x[h + 2] = a, x[h + 3] = c, 4 < e && (x[h + 4] = b, 6 === e && (x[h + 5] = g)));
- this._dataPosition += e;
- };
- d.prototype.closePath = function() {
- this._writeCommand(1);
- };
- d.prototype.moveTo = function(d, f) {
- this._writeCommand(2);
- this._writeData(d, f);
- };
- d.prototype.lineTo = function(d, f) {
- this._writeCommand(3);
- this._writeData(d, f);
- };
- d.prototype.quadraticCurveTo = function(d, f, a, c) {
- this._writeCommand(4);
- this._writeData(d, f, a, c);
- };
- d.prototype.bezierCurveTo = function(d, f, a, c, b, g) {
- this._writeCommand(5);
- this._writeData(d, f, a, c, b, g);
- };
- d.prototype.arcTo = function(d, f, a, c, b) {
- this._writeCommand(6);
- this._writeData(d, f, a, c, b);
- };
- d.prototype.rect = function(d, f, a, c) {
- this._writeCommand(7);
- this._writeData(d, f, a, c);
- };
- d.prototype.arc = function(d, f, a, c, b, g) {
- this._writeCommand(8);
- this._writeData(d, f, a, c, b, +g);
- };
- d.prototype.addPath = function(d, 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 + d._commandPosition;
- a >= this._commands.length && this._ensureCommandCapacity(a);
- for (var c = this._commands, b = d._commands, g = this._commandPosition, e = 0;g < a;g++) {
- c[g] = b[e++];
- }
- this._commandPosition = a;
- a = this._dataPosition + d._dataPosition;
- a >= this._data.length && this._ensureDataCapacity(a);
- c = this._data;
- b = d._data;
- g = this._dataPosition;
- for (e = 0;g < a;g++) {
- c[g] = b[e++];
- }
- this._dataPosition = a;
- f && this._writeCommand(10);
- };
- d._arrayBufferPool = new k.ArrayBufferPool;
- return d;
- }();
- p.Path = v;
- if ("undefined" !== typeof CanvasRenderingContext2D && ("undefined" === typeof Path2D || !Path2D.prototype.addPath)) {
- var e = CanvasRenderingContext2D.prototype.fill;
- CanvasRenderingContext2D.prototype.fill = function(d, f) {
- arguments.length && (d instanceof v ? v._apply(d, this) : f = d);
- f ? e.call(this, f) : e.call(this);
- };
- var g = CanvasRenderingContext2D.prototype.stroke;
- CanvasRenderingContext2D.prototype.stroke = function(d, f) {
- arguments.length && (d instanceof v ? v._apply(d, this) : f = d);
- f ? g.call(this, f) : g.call(this);
- };
- var d = CanvasRenderingContext2D.prototype.clip;
- CanvasRenderingContext2D.prototype.clip = function(f, a) {
- arguments.length && (f instanceof v ? v._apply(f, this) : a = f);
- a ? d.call(this, a) : d.call(this);
- };
- window.Path2D = v;
- }
- if ("undefined" !== typeof CanvasPattern && Path2D.prototype.addPath) {
- n = function(d) {
- this._transform = d;
- this._template && (this._template._transform = d);
- };
- CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = n);
- CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = n);
- var c = CanvasRenderingContext2D.prototype.fill, f = CanvasRenderingContext2D.prototype.stroke;
- CanvasRenderingContext2D.prototype.fill = function(d, f) {
- var a = !!this.fillStyle._transform;
- if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && a && d instanceof Path2D) {
- var a = this.fillStyle._transform, b;
- try {
- b = a.inverse();
- } catch (g) {
- b = a = p.Geometry.Matrix.createIdentitySVGMatrix();
- }
- this.transform(a.a, a.b, a.c, a.d, a.e, a.f);
- a = new Path2D;
- a.addPath(d, b);
- c.call(this, a, f);
- this.transform(b.a, b.b, b.c, b.d, b.e, b.f);
- } else {
- 0 === arguments.length ? c.call(this) : 1 === arguments.length ? c.call(this, d) : 2 === arguments.length && c.call(this, d, f);
- }
- };
- CanvasRenderingContext2D.prototype.stroke = function(d) {
- var a = !!this.strokeStyle._transform;
- if ((this.strokeStyle instanceof CanvasPattern || this.strokeStyle instanceof CanvasGradient) && a && d instanceof Path2D) {
- var c = this.strokeStyle._transform, a = c.inverse();
- this.transform(c.a, c.b, c.c, c.d, c.e, c.f);
- c = new Path2D;
- c.addPath(d, a);
- var b = this.lineWidth;
- this.lineWidth *= (a.a + a.d) / 2;
- f.call(this, c);
- this.transform(a.a, a.b, a.c, a.d, a.e, a.f);
- this.lineWidth = b;
- } else {
- 0 === arguments.length ? f.call(this) : 1 === arguments.length && f.call(this, d);
- }
- };
- }
- "undefined" !== typeof CanvasRenderingContext2D && function() {
- function d() {
- return p.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform);
- }
- var f = "currentTransform" in CanvasRenderingContext2D.prototype;
- CanvasRenderingContext2D.prototype.flashStroke = function(d, c) {
- if (f) {
- var b = this.currentTransform, g = new Path2D;
- g.addPath(d, b);
- var e = this.lineWidth;
- this.setTransform(1, 0, 0, 1, 0, 0);
- switch(c) {
- case 1:
- var x = Math.sqrt((b.a + b.c) * (b.a + b.c) + (b.d + b.b) * (b.d + b.b)) * Math.SQRT1_2;
- this.lineWidth = a(e * x, 1, 1024);
- break;
- case 2:
- this.lineWidth = a(e * (b.d + b.b), 1, 1024);
- break;
- case 3:
- this.lineWidth = a(e * (b.a + b.c), 1, 1024);
- }
- this.stroke(g);
- this.setTransform(b.a, b.b, b.c, b.d, b.e, b.f);
- this.lineWidth = e;
- } else {
- this.stroke(d);
- }
- };
- if (!f) {
- if ("mozCurrentTransform" in CanvasRenderingContext2D.prototype) {
- Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:d}), f = !0;
- } else {
- var c = CanvasRenderingContext2D.prototype.setTransform;
- CanvasRenderingContext2D.prototype.setTransform = function(d, f, a, b, g, e) {
- var x = this.currentTransform;
- x.a = d;
- x.b = f;
- x.c = a;
- x.d = b;
- x.e = g;
- x.f = e;
- c.call(this, d, f, a, b, g, e);
- };
- Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:function() {
- return this._currentTransform || (this._currentTransform = p.Geometry.Matrix.createIdentitySVGMatrix());
- }});
- }
- }
- }();
- if ("undefined" !== typeof CanvasRenderingContext2D && void 0 === CanvasRenderingContext2D.prototype.globalColorMatrix) {
- var y = CanvasRenderingContext2D.prototype.fill, x = CanvasRenderingContext2D.prototype.stroke, I = CanvasRenderingContext2D.prototype.fillText, da = CanvasRenderingContext2D.prototype.strokeText;
- Object.defineProperty(CanvasRenderingContext2D.prototype, "globalColorMatrix", {get:function() {
- return this._globalColorMatrix ? this._globalColorMatrix.clone() : null;
- }, set:function(d) {
- d ? this._globalColorMatrix ? this._globalColorMatrix.set(d) : this._globalColorMatrix = d.clone() : this._globalColorMatrix = null;
- }, enumerable:!0, configurable:!0});
- CanvasRenderingContext2D.prototype.fill = function(d, f) {
- var a = null;
- this._globalColorMatrix && (a = this.fillStyle, this.fillStyle = u(this, this.fillStyle, this._globalColorMatrix));
- 0 === arguments.length ? y.call(this) : 1 === arguments.length ? y.call(this, d) : 2 === arguments.length && y.call(this, d, f);
- a && (this.fillStyle = a);
- };
- CanvasRenderingContext2D.prototype.stroke = function(d, f) {
- var a = null;
- this._globalColorMatrix && (a = this.strokeStyle, this.strokeStyle = u(this, this.strokeStyle, this._globalColorMatrix));
- 0 === arguments.length ? x.call(this) : 1 === arguments.length && x.call(this, d);
- a && (this.strokeStyle = a);
- };
- CanvasRenderingContext2D.prototype.fillText = function(d, f, a, c) {
- var b = null;
- this._globalColorMatrix && (b = this.fillStyle, this.fillStyle = u(this, this.fillStyle, this._globalColorMatrix));
- 3 === arguments.length ? I.call(this, d, f, a) : 4 === arguments.length ? I.call(this, d, f, a, c) : k.Debug.unexpected();
- b && (this.fillStyle = b);
- };
- CanvasRenderingContext2D.prototype.strokeText = function(d, f, a, c) {
- var b = null;
- this._globalColorMatrix && (b = this.strokeStyle, this.strokeStyle = u(this, this.strokeStyle, this._globalColorMatrix));
- 3 === arguments.length ? da.call(this, d, f, a) : 4 === arguments.length ? da.call(this, d, f, a, c) : k.Debug.unexpected();
- b && (this.strokeStyle = b);
- };
- }
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- var u = function() {
- return function(a, k, m, b) {
- this.dataURL = a;
- this.w = k;
- this.h = m;
- this.pixelRatio = b;
- };
- }();
- k.ScreenShot = u;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- var p = function() {
- function k() {
- this._count = 0;
- this._head = this._tail = null;
- }
- Object.defineProperty(k.prototype, "count", {get:function() {
- return this._count;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "head", {get:function() {
- return this._head;
- }, enumerable:!0, configurable:!0});
- k.prototype._unshift = function(a) {
- 0 === this._count ? this._head = this._tail = a : (a.next = this._head, this._head = a.next.previous = a);
- this._count++;
- };
- k.prototype._remove = function(a) {
- 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--;
- };
- k.prototype.use = function(a) {
- this._head !== a && ((a.next || a.previous || this._tail === a) && this._remove(a), this._unshift(a));
- };
- k.prototype.pop = function() {
- if (!this._tail) {
- return null;
- }
- var a = this._tail;
- this._remove(a);
- return a;
- };
- k.prototype.visit = function(a, k) {
- void 0 === k && (k = !0);
- for (var m = k ? this._head : this._tail;m && a(m);) {
- m = k ? m.next : m.previous;
- }
- };
- return k;
- }();
- k.LRUList = p;
-})(Shumway || (Shumway = {}));
-var Shumway$$inline_39 = Shumway || (Shumway = {}), GFX$$inline_40 = Shumway$$inline_39.GFX || (Shumway$$inline_39.GFX = {}), Option$$inline_41 = Shumway$$inline_39.Options.Option, OptionSet$$inline_42 = Shumway$$inline_39.Options.OptionSet, shumwayOptions$$inline_43 = Shumway$$inline_39.Settings.shumwayOptions, rendererOptions$$inline_44 = shumwayOptions$$inline_43.register(new OptionSet$$inline_42("Renderer Options"));
-GFX$$inline_40.imageUpdateOption = rendererOptions$$inline_44.register(new Option$$inline_41("", "imageUpdate", "boolean", !0, "Enable image updating."));
-GFX$$inline_40.imageConvertOption = rendererOptions$$inline_44.register(new Option$$inline_41("", "imageConvert", "boolean", !0, "Enable image conversion."));
-GFX$$inline_40.stageOptions = shumwayOptions$$inline_43.register(new OptionSet$$inline_42("Stage Renderer Options"));
-GFX$$inline_40.forcePaint = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "forcePaint", "boolean", !1, "Force repainting."));
-GFX$$inline_40.ignoreViewport = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport."));
-GFX$$inline_40.viewportLoupeDiameter = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}}));
-GFX$$inline_40.disableClipping = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "disableClipping", "boolean", !1, "Disable clipping."));
-GFX$$inline_40.debugClipping = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "debugClipping", "boolean", !1, "Disable clipping."));
-GFX$$inline_40.hud = GFX$$inline_40.stageOptions.register(new Option$$inline_41("", "hud", "boolean", !1, "Enable HUD."));
-var webGLOptions$$inline_45 = GFX$$inline_40.stageOptions.register(new OptionSet$$inline_42("WebGL Options"));
-GFX$$inline_40.perspectiveCamera = webGLOptions$$inline_45.register(new Option$$inline_41("", "pc", "boolean", !1, "Use perspective camera."));
-GFX$$inline_40.perspectiveCameraFOV = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcFOV", "number", 60, "Perspective Camera FOV."));
-GFX$$inline_40.perspectiveCameraDistance = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcDistance", "number", 2, "Perspective Camera Distance."));
-GFX$$inline_40.perspectiveCameraAngle = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcAngle", "number", 0, "Perspective Camera Angle."));
-GFX$$inline_40.perspectiveCameraAngleRotate = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcRotate", "boolean", !1, "Rotate Use perspective camera."));
-GFX$$inline_40.perspectiveCameraSpacing = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcSpacing", "number", .01, "Element Spacing."));
-GFX$$inline_40.perspectiveCameraSpacingInflate = webGLOptions$$inline_45.register(new Option$$inline_41("", "pcInflate", "boolean", !1, "Rotate Use perspective camera."));
-GFX$$inline_40.drawTiles = webGLOptions$$inline_45.register(new Option$$inline_41("", "drawTiles", "boolean", !1, "Draw WebGL Tiles"));
-GFX$$inline_40.drawSurfaces = webGLOptions$$inline_45.register(new Option$$inline_41("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces."));
-GFX$$inline_40.drawSurface = webGLOptions$$inline_45.register(new Option$$inline_41("", "drawSurface", "number", -1, "Draw WebGL Surface #"));
-GFX$$inline_40.drawElements = webGLOptions$$inline_45.register(new Option$$inline_41("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck."));
-GFX$$inline_40.disableSurfaceUploads = webGLOptions$$inline_45.register(new Option$$inline_41("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads."));
-GFX$$inline_40.premultipliedAlpha = webGLOptions$$inline_45.register(new Option$$inline_41("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext()."));
-GFX$$inline_40.unpackPremultiplyAlpha = webGLOptions$$inline_45.register(new Option$$inline_41("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei."));
-var factorChoices$$inline_46 = {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_40.sourceBlendFactor = webGLOptions$$inline_45.register(new Option$$inline_41("", "sourceBlendFactor", "number", factorChoices$$inline_46.ONE, "", {choices:factorChoices$$inline_46}));
-GFX$$inline_40.destinationBlendFactor = webGLOptions$$inline_45.register(new Option$$inline_41("", "destinationBlendFactor", "number", factorChoices$$inline_46.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_46}));
-var canvas2DOptions$$inline_47 = GFX$$inline_40.stageOptions.register(new OptionSet$$inline_42("Canvas2D Options"));
-GFX$$inline_40.clipDirtyRegions = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions."));
-GFX$$inline_40.clipCanvas = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "clipCanvas", "boolean", !1, "Clip Regions."));
-GFX$$inline_40.cull = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "cull", "boolean", !1, "Enable culling."));
-GFX$$inline_40.snapToDevicePixels = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "snapToDevicePixels", "boolean", !1, ""));
-GFX$$inline_40.imageSmoothing = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "imageSmoothing", "boolean", !1, ""));
-GFX$$inline_40.masking = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "masking", "boolean", !0, "Composite Mask."));
-GFX$$inline_40.blending = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "blending", "boolean", !0, ""));
-GFX$$inline_40.debugLayers = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "debugLayers", "boolean", !1, ""));
-GFX$$inline_40.filters = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "filters", "boolean", !0, ""));
-GFX$$inline_40.cacheShapes = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "cacheShapes", "boolean", !0, ""));
-GFX$$inline_40.cacheShapesMaxSize = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}}));
-GFX$$inline_40.cacheShapesThreshold = canvas2DOptions$$inline_47.register(new Option$$inline_41("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}}));
-(function(k) {
- (function(p) {
- (function(u) {
- function a(a, d, c, f) {
- var b = 1 - f;
- return a * b * b + 2 * d * b * f + c * f * f;
- }
- function w(a, d, c, f, b) {
- var e = b * b, h = 1 - b, k = h * h;
- return a * h * k + 3 * d * b * k + 3 * c * h * e + f * b * e;
- }
- var m = k.NumberUtilities.clamp, b = k.NumberUtilities.pow2, l = k.NumberUtilities.epsilonEquals;
- u.radianToDegrees = function(a) {
- return 180 * a / Math.PI;
- };
- u.degreesToRadian = function(a) {
- return a * Math.PI / 180;
- };
- u.quadraticBezier = a;
- u.quadraticBezierExtreme = function(b, d, c) {
- var f = (b - d) / (b - 2 * d + c);
- return 0 > f ? b : 1 < f ? c : a(b, d, c, f);
- };
- u.cubicBezier = w;
- u.cubicBezierExtremes = function(a, d, c, f) {
- var b = d - a, e;
- e = 2 * (c - d);
- var h = f - c;
- b + h === e && (h *= 1.0001);
- var k = 2 * b - e, n = e - 2 * b, n = Math.sqrt(n * n - 4 * b * (b - e + h));
- e = 2 * (b - e + h);
- b = (k + n) / e;
- k = (k - n) / e;
- n = [];
- 0 <= b && 1 >= b && n.push(w(a, d, c, f, b));
- 0 <= k && 1 >= k && n.push(w(a, d, c, f, k));
- return n;
- };
- var r = function() {
- function a(d, c) {
- this.x = d;
- this.y = c;
- }
- a.prototype.setElements = function(d, a) {
- this.x = d;
- this.y = a;
- return this;
- };
- a.prototype.set = function(d) {
- this.x = d.x;
- this.y = d.y;
- return this;
- };
- a.prototype.dot = function(d) {
- return this.x * d.x + this.y * d.y;
- };
- a.prototype.squaredLength = function() {
- return this.dot(this);
- };
- a.prototype.distanceTo = function(d) {
- return Math.sqrt(this.dot(d));
- };
- a.prototype.sub = function(d) {
- this.x -= d.x;
- this.y -= d.y;
- return this;
- };
- a.prototype.mul = function(d) {
- this.x *= d;
- this.y *= d;
- return this;
- };
- a.prototype.clone = function() {
- return new a(this.x, this.y);
- };
- a.prototype.toString = function(d) {
- void 0 === d && (d = 2);
- return "{x: " + this.x.toFixed(d) + ", y: " + this.y.toFixed(d) + "}";
- };
- a.prototype.inTriangle = function(d, a, f) {
- var b = d.y * f.x - d.x * f.y + (f.y - d.y) * this.x + (d.x - f.x) * this.y, g = d.x * a.y - d.y * a.x + (d.y - a.y) * this.x + (a.x - d.x) * this.y;
- if (0 > b != 0 > g) {
- return !1;
- }
- d = -a.y * f.x + d.y * (f.x - a.x) + d.x * (a.y - f.y) + a.x * f.y;
- 0 > d && (b = -b, g = -g, d = -d);
- return 0 < b && 0 < g && b + g < d;
- };
- a.createEmpty = function() {
- return new a(0, 0);
- };
- a.createEmptyPoints = function(d) {
- for (var c = [], f = 0;f < d;f++) {
- c.push(new a(0, 0));
- }
- return c;
- };
- return a;
- }();
- u.Point = r;
- var h = function() {
- function a(d, c, f) {
- this.x = d;
- this.y = c;
- this.z = f;
- }
- a.prototype.setElements = function(d, a, f) {
- this.x = d;
- this.y = a;
- this.z = f;
- return this;
- };
- a.prototype.set = function(d) {
- this.x = d.x;
- this.y = d.y;
- this.z = d.z;
- return this;
- };
- a.prototype.dot = function(d) {
- return this.x * d.x + this.y * d.y + this.z * d.z;
- };
- a.prototype.cross = function(d) {
- var a = this.z * d.x - this.x * d.z, f = this.x * d.y - this.y * d.x;
- this.x = this.y * d.z - this.z * d.y;
- this.y = a;
- this.z = f;
- return this;
- };
- a.prototype.squaredLength = function() {
- return this.dot(this);
- };
- a.prototype.sub = function(d) {
- this.x -= d.x;
- this.y -= d.y;
- this.z -= d.z;
- return this;
- };
- a.prototype.mul = function(d) {
- this.x *= d;
- this.y *= d;
- this.z *= d;
- return this;
- };
- a.prototype.normalize = function() {
- var d = Math.sqrt(this.squaredLength());
- 1E-5 < d ? this.mul(1 / d) : this.setElements(0, 0, 0);
- return this;
- };
- a.prototype.clone = function() {
- return new a(this.x, this.y, this.z);
- };
- a.prototype.toString = function(d) {
- void 0 === d && (d = 2);
- return "{x: " + this.x.toFixed(d) + ", y: " + this.y.toFixed(d) + ", z: " + this.z.toFixed(d) + "}";
- };
- a.createEmpty = function() {
- return new a(0, 0, 0);
- };
- a.createEmptyPoints = function(d) {
- for (var c = [], f = 0;f < d;f++) {
- c.push(new a(0, 0, 0));
- }
- return c;
- };
- return a;
- }();
- u.Point3D = h;
- var t = function() {
- function a(d, c, f, b) {
- this.setElements(d, c, f, b);
- a.allocationCount++;
- }
- a.prototype.setElements = function(d, a, f, b) {
- this.x = d;
- this.y = a;
- this.w = f;
- this.h = b;
- };
- a.prototype.set = function(a) {
- this.x = a.x;
- this.y = a.y;
- this.w = a.w;
- this.h = a.h;
- };
- a.prototype.contains = function(a) {
- var c = a.x + a.w, f = a.y + a.h, b = this.x + this.w, g = this.y + this.h;
- return a.x >= this.x && a.x < b && a.y >= this.y && a.y < g && c > this.x && c <= b && f > this.y && f <= g;
- };
- 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.isContained = function(a) {
- for (var c = 0;c < a.length;c++) {
- if (a[c].contains(this)) {
- return !0;
- }
- }
- return !1;
- };
- a.prototype.isSmallerThan = function(a) {
- return this.w < a.w && this.h < a.h;
- };
- a.prototype.isLargerThan = function(a) {
- return this.w > a.w && this.h > a.h;
- };
- a.prototype.union = function(a) {
- if (this.isEmpty()) {
- this.set(a);
- } else {
- if (!a.isEmpty()) {
- var c = this.x, f = this.y;
- this.x > a.x && (c = a.x);
- this.y > a.y && (f = a.y);
- var b = this.x + this.w;
- b < a.x + a.w && (b = a.x + a.w);
- var g = this.y + this.h;
- g < a.y + a.h && (g = a.y + a.h);
- this.x = c;
- this.y = f;
- this.w = b - c;
- this.h = g - f;
- }
- }
- };
- a.prototype.isEmpty = function() {
- return 0 >= this.w || 0 >= this.h;
- };
- a.prototype.setEmpty = function() {
- this.h = this.w = this.y = this.x = 0;
- };
- a.prototype.intersect = function(d) {
- var c = a.createEmpty();
- if (this.isEmpty() || d.isEmpty()) {
- return c.setEmpty(), c;
- }
- c.x = Math.max(this.x, d.x);
- c.y = Math.max(this.y, d.y);
- c.w = Math.min(this.x + this.w, d.x + d.w) - c.x;
- c.h = Math.min(this.y + this.h, d.y + d.h) - c.y;
- c.isEmpty() && c.setEmpty();
- this.set(c);
- };
- a.prototype.intersects = function(a) {
- if (this.isEmpty() || a.isEmpty()) {
- return !1;
- }
- var c = Math.max(this.x, a.x), f = Math.max(this.y, a.y), c = Math.min(this.x + this.w, a.x + a.w) - c;
- a = Math.min(this.y + this.h, a.y + a.h) - f;
- return !(0 >= c || 0 >= a);
- };
- a.prototype.intersectsTransformedAABB = function(d, c) {
- var f = a._temporary;
- f.set(d);
- c.transformRectangleAABB(f);
- return this.intersects(f);
- };
- a.prototype.intersectsTranslated = function(a, c, f) {
- if (this.isEmpty() || a.isEmpty()) {
- return !1;
- }
- var b = Math.max(this.x, a.x + c), g = Math.max(this.y, a.y + f);
- c = Math.min(this.x + this.w, a.x + c + a.w) - b;
- a = Math.min(this.y + this.h, a.y + f + a.h) - g;
- return !(0 >= c || 0 >= a);
- };
- a.prototype.area = function() {
- return this.w * this.h;
- };
- a.prototype.clone = function() {
- var d = a.allocate();
- d.set(this);
- return d;
- };
- a.allocate = function() {
- var d = a._dirtyStack;
- return d.length ? d.pop() : new a(12345, 67890, 12345, 67890);
- };
- a.prototype.free = function() {
- a._dirtyStack.push(this);
- };
- a.prototype.snap = function() {
- var a = Math.ceil(this.x + this.w), c = 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 = c - this.y;
- return this;
- };
- a.prototype.scale = function(a, c) {
- this.x *= a;
- this.y *= c;
- this.w *= a;
- this.h *= c;
- return this;
- };
- a.prototype.offset = function(a, c) {
- this.x += a;
- this.y += c;
- return this;
- };
- a.prototype.resize = function(a, c) {
- this.w += a;
- this.h += c;
- return this;
- };
- a.prototype.expand = function(a, c) {
- this.offset(-a, -c).resize(2 * a, 2 * c);
- return this;
- };
- a.prototype.getCenter = function() {
- return new r(this.x + this.w / 2, this.y + this.h / 2);
- };
- 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.createEmpty = function() {
- var d = a.allocate();
- d.setEmpty();
- return d;
- };
- a.createSquare = function(d) {
- return new a(-d / 2, -d / 2, d, d);
- };
- a.createMaxI16 = function() {
- return new a(-32768, -32768, 65535, 65535);
- };
- 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.allocationCount = 0;
- a._temporary = new a(0, 0, 0, 0);
- a._dirtyStack = [];
- return a;
- }();
- u.Rectangle = t;
- var q = function() {
- function a(d) {
- this.corners = d.map(function(a) {
- return a.clone();
- });
- this.axes = [d[1].clone().sub(d[0]), d[3].clone().sub(d[0])];
- this.origins = [];
- for (var c = 0;2 > c;c++) {
- this.axes[c].mul(1 / this.axes[c].squaredLength()), this.origins.push(d[0].dot(this.axes[c]));
- }
- }
- a.prototype.getBounds = function() {
- return a.getBounds(this.corners);
- };
- a.getBounds = function(a) {
- for (var c = new r(Number.MAX_VALUE, Number.MAX_VALUE), f = new r(Number.MIN_VALUE, Number.MIN_VALUE), b = 0;4 > b;b++) {
- var g = a[b].x, e = a[b].y;
- c.x = Math.min(c.x, g);
- c.y = Math.min(c.y, e);
- f.x = Math.max(f.x, g);
- f.y = Math.max(f.y, e);
- }
- return new t(c.x, c.y, f.x - c.x, f.y - c.y);
- };
- a.prototype.intersects = function(a) {
- return this.intersectsOneWay(a) && a.intersectsOneWay(this);
- };
- a.prototype.intersectsOneWay = function(a) {
- for (var c = 0;2 > c;c++) {
- for (var f = 0;4 > f;f++) {
- var b = a.corners[f].dot(this.axes[c]), g, e;
- 0 === f ? e = g = b : b < g ? g = b : b > e && (e = b);
- }
- if (g > 1 + this.origins[c] || e < this.origins[c]) {
- return !1;
- }
- }
- return !0;
- };
- return a;
- }();
- u.OBB = q;
- (function(a) {
- a[a.Unknown = 0] = "Unknown";
- a[a.Identity = 1] = "Identity";
- a[a.Translation = 2] = "Translation";
- })(u.MatrixType || (u.MatrixType = {}));
- var n = function() {
- function a(d, c, f, b, e, h) {
- this._data = new Float64Array(6);
- this._type = 0;
- this.setElements(d, c, f, b, e, h);
- a.allocationCount++;
- }
- Object.defineProperty(a.prototype, "a", {get:function() {
- return this._data[0];
- }, set:function(a) {
- this._data[0] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "b", {get:function() {
- return this._data[1];
- }, set:function(a) {
- this._data[1] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "c", {get:function() {
- return this._data[2];
- }, set:function(a) {
- this._data[2] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "d", {get:function() {
- return this._data[3];
- }, set:function(a) {
- this._data[3] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "tx", {get:function() {
- return this._data[4];
- }, set:function(a) {
- this._data[4] = a;
- 1 === this._type && (this._type = 2);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ty", {get:function() {
- return this._data[5];
- }, set:function(a) {
- this._data[5] = a;
- 1 === this._type && (this._type = 2);
- }, enumerable:!0, configurable:!0});
- a._createSVGMatrix = function() {
- a._svg || (a._svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"));
- return a._svg.createSVGMatrix();
- };
- a.prototype.setElements = function(a, c, f, b, e, g) {
- var h = this._data;
- h[0] = a;
- h[1] = c;
- h[2] = f;
- h[3] = b;
- h[4] = e;
- h[5] = g;
- this._type = 0;
- };
- a.prototype.set = function(a) {
- var c = this._data, f = a._data;
- c[0] = f[0];
- c[1] = f[1];
- c[2] = f[2];
- c[3] = f[3];
- c[4] = f[4];
- c[5] = f[5];
- this._type = a._type;
- };
- a.prototype.emptyArea = function(a) {
- a = this._data;
- return 0 === a[0] || 0 === a[3] ? !0 : !1;
- };
- a.prototype.infiniteArea = function(a) {
- a = this._data;
- return Infinity === Math.abs(a[0]) || Infinity === Math.abs(a[3]) ? !0 : !1;
- };
- a.prototype.isEqual = function(a) {
- if (1 === this._type && 1 === a._type) {
- return !0;
- }
- var c = this._data;
- a = a._data;
- return c[0] === a[0] && c[1] === a[1] && c[2] === a[2] && c[3] === a[3] && c[4] === a[4] && c[5] === a[5];
- };
- a.prototype.clone = function() {
- var d = a.allocate();
- d.set(this);
- return d;
- };
- a.allocate = function() {
- var d = a._dirtyStack;
- return d.length ? d.pop() : new a(12345, 12345, 12345, 12345, 12345, 12345);
- };
- a.prototype.free = function() {
- a._dirtyStack.push(this);
- };
- a.prototype.transform = function(a, c, f, b, e, g) {
- var h = this._data, k = h[0], n = h[1], q = h[2], t = h[3], l = h[4], v = h[5];
- h[0] = k * a + q * c;
- h[1] = n * a + t * c;
- h[2] = k * f + q * b;
- h[3] = n * f + t * b;
- h[4] = k * e + q * g + l;
- h[5] = n * e + t * g + v;
- this._type = 0;
- return this;
- };
- a.prototype.transformRectangle = function(a, c) {
- var f = this._data, b = f[0], e = f[1], g = f[2], h = f[3], k = f[4], f = f[5], n = a.x, q = a.y, t = a.w, l = a.h;
- c[0].x = b * n + g * q + k;
- c[0].y = e * n + h * q + f;
- c[1].x = b * (n + t) + g * q + k;
- c[1].y = e * (n + t) + h * q + f;
- c[2].x = b * (n + t) + g * (q + l) + k;
- c[2].y = e * (n + t) + h * (q + l) + f;
- c[3].x = b * n + g * (q + l) + k;
- c[3].y = e * n + h * (q + l) + f;
- };
- a.prototype.isTranslationOnly = function() {
- if (2 === this._type) {
- return !0;
- }
- var a = this._data;
- return 1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3] || l(a[0], 1) && l(a[1], 0) && l(a[2], 0) && l(a[3], 1) ? (this._type = 2, !0) : !1;
- };
- a.prototype.transformRectangleAABB = function(a) {
- var c = this._data;
- if (1 !== this._type) {
- if (2 === this._type) {
- a.x += c[4], a.y += c[5];
- } else {
- var f = c[0], b = c[1], e = c[2], g = c[3], h = c[4], k = c[5], n = a.x, q = a.y, t = a.w, l = a.h, c = f * n + e * q + h, v = b * n + g * q + k, r = f * (n + t) + e * q + h, m = b * (n + t) + g * q + k, p = f * (n + t) + e * (q + l) + h, t = b * (n + t) + g * (q + l) + k, f = f * n + e * (q + l) + h, b = b * n + g * (q + l) + k, g = 0;
- c > r && (g = c, c = r, r = g);
- p > f && (g = p, p = f, f = g);
- a.x = c < p ? c : p;
- a.w = (r > f ? r : f) - a.x;
- v > m && (g = v, v = m, m = g);
- t > b && (g = t, t = b, b = g);
- a.y = v < t ? v : t;
- a.h = (m > b ? m : b) - a.y;
- }
- }
- };
- a.prototype.scale = function(a, c) {
- var f = this._data;
- f[0] *= a;
- f[1] *= c;
- f[2] *= a;
- f[3] *= c;
- f[4] *= a;
- f[5] *= c;
- this._type = 0;
- return this;
- };
- a.prototype.scaleClone = function(a, c) {
- return 1 === a && 1 === c ? this : this.clone().scale(a, c);
- };
- a.prototype.rotate = function(a) {
- var c = this._data, f = c[0], b = c[1], e = c[2], g = c[3], h = c[4], k = c[5], n = Math.cos(a);
- a = Math.sin(a);
- c[0] = n * f - a * b;
- c[1] = a * f + n * b;
- c[2] = n * e - a * g;
- c[3] = a * e + n * g;
- c[4] = n * h - a * k;
- c[5] = a * h + n * k;
- this._type = 0;
- return this;
- };
- a.prototype.concat = function(a) {
- if (1 === a._type) {
- return this;
- }
- var c = this._data;
- a = a._data;
- var f = c[0] * a[0], b = 0, e = 0, g = c[3] * a[3], h = c[4] * a[0] + a[4], k = c[5] * a[3] + a[5];
- if (0 !== c[1] || 0 !== c[2] || 0 !== a[1] || 0 !== a[2]) {
- f += c[1] * a[2], g += c[2] * a[1], b += c[0] * a[1] + c[1] * a[3], e += c[2] * a[0] + c[3] * a[2], h += c[5] * a[2], k += c[4] * a[1];
- }
- c[0] = f;
- c[1] = b;
- c[2] = e;
- c[3] = g;
- c[4] = h;
- c[5] = k;
- this._type = 0;
- return this;
- };
- a.prototype.concatClone = function(a) {
- return this.clone().concat(a);
- };
- a.prototype.preMultiply = function(a) {
- var c = this._data, f = a._data;
- if (2 === a._type && this._type & 3) {
- c[4] += f[4], c[5] += f[5], this._type = 2;
- } else {
- if (1 !== a._type) {
- a = f[0] * c[0];
- var b = 0, e = 0, g = f[3] * c[3], h = f[4] * c[0] + c[4], k = f[5] * c[3] + c[5];
- if (0 !== f[1] || 0 !== f[2] || 0 !== c[1] || 0 !== c[2]) {
- a += f[1] * c[2], g += f[2] * c[1], b += f[0] * c[1] + f[1] * c[3], e += f[2] * c[0] + f[3] * c[2], h += f[5] * c[2], k += f[4] * c[1];
- }
- c[0] = a;
- c[1] = b;
- c[2] = e;
- c[3] = g;
- c[4] = h;
- c[5] = k;
- this._type = 0;
- }
- }
- };
- a.prototype.translate = function(a, c) {
- var f = this._data;
- f[4] += a;
- f[5] += c;
- 1 === this._type && (this._type = 2);
- return this;
- };
- a.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;
- this._type = 1;
- };
- 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];
- };
- a.prototype.transformPoint = function(a) {
- if (1 !== this._type) {
- var c = this._data, f = a.x, b = a.y;
- a.x = c[0] * f + c[2] * b + c[4];
- a.y = c[1] * f + c[3] * b + c[5];
- }
- };
- a.prototype.transformPoints = function(a) {
- if (1 !== this._type) {
- for (var c = 0;c < a.length;c++) {
- this.transformPoint(a[c]);
- }
- }
- };
- a.prototype.deltaTransformPoint = function(a) {
- if (1 !== this._type) {
- var c = this._data, f = a.x, b = a.y;
- a.x = c[0] * f + c[2] * b;
- a.y = c[1] * f + c[3] * b;
- }
- };
- a.prototype.inverse = function(a) {
- var c = this._data, f = a._data;
- if (1 === this._type) {
- a.setIdentity();
- } else {
- if (2 === this._type) {
- f[0] = 1, f[1] = 0, f[2] = 0, f[3] = 1, f[4] = -c[4], f[5] = -c[5], a._type = 2;
- } else {
- var b = c[1], e = c[2], g = c[4], h = c[5];
- if (0 === b && 0 === e) {
- var k = f[0] = 1 / c[0], c = f[3] = 1 / c[3];
- f[1] = 0;
- f[2] = 0;
- f[4] = -k * g;
- f[5] = -c * h;
- } else {
- var k = c[0], c = c[3], n = k * c - b * e;
- if (0 === n) {
- a.setIdentity();
- return;
- }
- n = 1 / n;
- f[0] = c * n;
- b = f[1] = -b * n;
- e = f[2] = -e * n;
- c = f[3] = k * n;
- f[4] = -(f[0] * g + e * h);
- f[5] = -(b * g + c * h);
- }
- a._type = 0;
- }
- }
- };
- a.prototype.getTranslateX = function() {
- return this._data[4];
- };
- a.prototype.getTranslateY = function() {
- return this._data[4];
- };
- a.prototype.getScaleX = function() {
- var a = this._data;
- if (1 === a[0] && 0 === a[1]) {
- return 1;
- }
- var c = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
- return 0 < a[0] ? c : -c;
- };
- a.prototype.getScaleY = function() {
- var a = this._data;
- if (0 === a[2] && 1 === a[3]) {
- return 1;
- }
- var c = Math.sqrt(a[2] * a[2] + a[3] * a[3]);
- return 0 < a[3] ? c : -c;
- };
- a.prototype.getScale = function() {
- return (this.getScaleX() + this.getScaleY()) / 2;
- };
- a.prototype.getAbsoluteScaleX = function() {
- return Math.abs(this.getScaleX());
- };
- a.prototype.getAbsoluteScaleY = function() {
- return Math.abs(this.getScaleY());
- };
- a.prototype.getRotation = function() {
- var a = this._data;
- return 180 * Math.atan(a[1] / a[0]) / Math.PI;
- };
- a.prototype.isScaleOrRotation = function() {
- var a = this._data;
- return .01 > Math.abs(a[0] * a[2] + a[1] * a[3]);
- };
- a.prototype.toString = function(a) {
- void 0 === a && (a = 2);
- var c = this._data;
- return "{" + c[0].toFixed(a) + ", " + c[1].toFixed(a) + ", " + c[2].toFixed(a) + ", " + c[3].toFixed(a) + ", " + c[4].toFixed(a) + ", " + c[5].toFixed(a) + "}";
- };
- a.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.prototype.toCSSTransform = function() {
- var a = this._data;
- return "matrix(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
- };
- a.createIdentity = function() {
- var d = a.allocate();
- d.setIdentity();
- return d;
- };
- a.prototype.toSVGMatrix = function() {
- var d = this._data, c = a._createSVGMatrix();
- try {
- c.a = d[0], c.b = d[1], c.c = d[2], c.d = d[3], c.e = d[4], c.f = d[5];
- } catch (f) {
- return a._createSVGMatrix();
- }
- return c;
- };
- a.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.createIdentitySVGMatrix = function() {
- return a._createSVGMatrix();
- };
- a.createSVGMatrixFromArray = function(d) {
- var c = a._createSVGMatrix();
- c.a = d[0];
- c.b = d[1];
- c.c = d[2];
- c.d = d[3];
- c.e = d[4];
- c.f = d[5];
- return c;
- };
- a.allocationCount = 0;
- a._dirtyStack = [];
- a.multiply = function(a, c) {
- var f = c._data;
- a.transform(f[0], f[1], f[2], f[3], f[4], f[5]);
- };
- return a;
- }();
- u.Matrix = n;
- n = function() {
- function a(d) {
- this._m = new Float32Array(d);
- }
- a.prototype.asWebGLMatrix = function() {
- return this._m;
- };
- a.createCameraLookAt = function(d, c, f) {
- c = d.clone().sub(c).normalize();
- f = f.clone().cross(c).normalize();
- var b = c.clone().cross(f);
- return new a([f.x, f.y, f.z, 0, b.x, b.y, b.z, 0, c.x, c.y, c.z, 0, d.x, d.y, d.z, 1]);
- };
- a.createLookAt = function(d, c, f) {
- c = d.clone().sub(c).normalize();
- f = f.clone().cross(c).normalize();
- var b = c.clone().cross(f);
- return new a([f.x, b.x, c.x, 0, b.x, b.y, c.y, 0, c.x, b.z, c.z, 0, -f.dot(d), -b.dot(d), -c.dot(d), 1]);
- };
- a.prototype.mul = function(a) {
- a = [a.x, a.y, a.z, 0];
- for (var c = this._m, f = [], b = 0;4 > b;b++) {
- f[b] = 0;
- for (var e = 4 * b, g = 0;4 > g;g++) {
- f[b] += c[e + g] * a[g];
- }
- }
- return new h(f[0], f[1], f[2]);
- };
- a.create2DProjection = function(d, c, f) {
- return new a([2 / d, 0, 0, 0, 0, -2 / c, 0, 0, 0, 0, 2 / f, 0, -1, 1, 0, 1]);
- };
- a.createPerspective = function(d, c, f, b) {
- d = Math.tan(.5 * Math.PI - .5 * d);
- var e = 1 / (f - b);
- return new a([d / c, 0, 0, 0, 0, d, 0, 0, 0, 0, (f + b) * e, -1, 0, 0, f * b * e * 2, 0]);
- };
- a.createIdentity = function() {
- return a.createTranslation(0, 0, 0);
- };
- a.createTranslation = function(d, c, f) {
- return new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, c, f, 1]);
- };
- a.createXRotation = function(d) {
- var c = Math.cos(d);
- d = Math.sin(d);
- return new a([1, 0, 0, 0, 0, c, d, 0, 0, -d, c, 0, 0, 0, 0, 1]);
- };
- a.createYRotation = function(d) {
- var c = Math.cos(d);
- d = Math.sin(d);
- return new a([c, 0, -d, 0, 0, 1, 0, 0, d, 0, c, 0, 0, 0, 0, 1]);
- };
- a.createZRotation = function(d) {
- var c = Math.cos(d);
- d = Math.sin(d);
- return new a([c, d, 0, 0, -d, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
- };
- a.createScale = function(d, c, f) {
- return new a([d, 0, 0, 0, 0, c, 0, 0, 0, 0, f, 0, 0, 0, 0, 1]);
- };
- a.createMultiply = function(d, c) {
- var f = d._m, b = c._m, e = f[0], h = f[1], k = f[2], n = f[3], q = f[4], t = f[5], l = f[6], v = f[7], r = f[8], m = f[9], p = f[10], u = f[11], w = f[12], z = f[13], B = f[14], f = f[15], E = b[0], A = b[1], C = b[2], F = b[3], G = b[4], J = b[5], H = b[6], K = b[7], L = b[8], M = b[9], N = b[10], O = b[11], P = b[12], Q = b[13], R = b[14], b = b[15];
- return new a([e * E + h * G + k * L + n * P, e * A + h * J + k * M + n * Q, e * C + h * H + k * N + n * R, e * F + h * K + k * O + n * b, q * E + t * G + l * L + v * P, q * A + t * J + l * M + v * Q, q * C + t * H + l * N + v * R, q * F + t * K + l * O + v * b, r * E + m * G + p * L + u * P, r * A + m * J + p * M + u * Q, r * C + m * H + p * N + u * R, r * F + m * K + p * O + u * b, w * E + z * G + B * L + f * P, w * A + z * J + B * M + f * Q, w * C + z * H + B * N + f * R, w * F + z *
- K + B * O + f * b]);
- };
- a.createInverse = function(d) {
- var c = d._m;
- d = c[0];
- var f = c[1], b = c[2], e = c[3], h = c[4], k = c[5], n = c[6], q = c[7], t = c[8], l = c[9], v = c[10], r = c[11], m = c[12], p = c[13], u = c[14], c = c[15], w = v * c, z = u * r, B = n * c, E = u * q, A = n * r, C = v * q, F = b * c, G = u * e, J = b * r, H = v * e, K = b * q, L = n * e, M = t * p, N = m * l, O = h * p, P = m * k, Q = h * l, R = t * k, X = d * p, Y = m * f, Z = d * l, aa = t * f, ba = d * k, ca = h * f, ea = w * k + E * l + A * p - (z * k + B * l + C * p), fa = z * f +
- F * l + H * p - (w * f + G * l + J * p), p = B * f + G * k + K * p - (E * f + F * k + L * p), f = C * f + J * k + L * l - (A * f + H * k + K * l), k = 1 / (d * ea + h * fa + t * p + m * f);
- return new a([k * ea, k * fa, k * p, k * f, k * (z * h + B * t + C * m - (w * h + E * t + A * m)), k * (w * d + G * t + J * m - (z * d + F * t + H * m)), k * (E * d + F * h + L * m - (B * d + G * h + K * m)), k * (A * d + H * h + K * t - (C * d + J * h + L * t)), k * (M * q + P * r + Q * c - (N * q + O * r + R * c)), k * (N * e + X * r + aa * c - (M * e + Y * r + Z * c)), k * (O * e + Y * q + ba * c - (P * e + X * q + ca * c)), k * (R * e + Z * q + ca * r - (Q * e + aa * q + ba * r)), k *
- (O * v + R * u + N * n - (Q * u + M * n + P * v)), k * (Z * u + M * b + Y * v - (X * v + aa * u + N * b)), k * (X * n + ca * u + P * b - (ba * u + O * b + Y * n)), k * (ba * v + Q * b + aa * n - (Z * n + ca * v + R * b))]);
- };
- return a;
- }();
- u.Matrix3D = n;
- n = function() {
- function a(d, c, f) {
- void 0 === f && (f = 7);
- var b = this.size = 1 << f;
- this.sizeInBits = f;
- this.w = d;
- this.h = c;
- this.c = Math.ceil(d / b);
- this.r = Math.ceil(c / b);
- this.grid = [];
- for (d = 0;d < this.r;d++) {
- for (this.grid.push([]), c = 0;c < this.c;c++) {
- this.grid[d][c] = new a.Cell(new t(c * b, d * b, b, b));
- }
- }
- }
- a.prototype.clear = function() {
- for (var a = 0;a < this.r;a++) {
- for (var c = 0;c < this.c;c++) {
- this.grid[a][c].clear();
- }
- }
- };
- a.prototype.getBounds = function() {
- return new t(0, 0, this.w, this.h);
- };
- a.prototype.addDirtyRectangle = function(a) {
- var c = a.x >> this.sizeInBits, f = a.y >> this.sizeInBits;
- if (!(c >= this.c || f >= this.r)) {
- 0 > c && (c = 0);
- 0 > f && (f = 0);
- var b = this.grid[f][c];
- a = a.clone();
- a.snap();
- if (b.region.contains(a)) {
- b.bounds.isEmpty() ? b.bounds.set(a) : b.bounds.contains(a) || b.bounds.union(a);
- } else {
- for (var e = Math.min(this.c, Math.ceil((a.x + a.w) / this.size)) - c, g = Math.min(this.r, Math.ceil((a.y + a.h) / this.size)) - f, h = 0;h < e;h++) {
- for (var k = 0;k < g;k++) {
- b = this.grid[f + k][c + h], b = b.region.clone(), b.intersect(a), b.isEmpty() || this.addDirtyRectangle(b);
- }
- }
- }
- }
- };
- a.prototype.gatherRegions = function(a) {
- for (var c = 0;c < this.r;c++) {
- for (var f = 0;f < this.c;f++) {
- this.grid[c][f].bounds.isEmpty() || a.push(this.grid[c][f].bounds);
- }
- }
- };
- a.prototype.gatherOptimizedRegions = function(a) {
- this.gatherRegions(a);
- };
- a.prototype.getDirtyRatio = function() {
- var a = this.w * this.h;
- if (0 === a) {
- return 0;
- }
- for (var c = 0, f = 0;f < this.r;f++) {
- for (var b = 0;b < this.c;b++) {
- c += this.grid[f][b].region.area();
- }
- }
- return c / a;
- };
- a.prototype.render = function(a, c) {
- function f(f) {
- a.rect(f.x, f.y, f.w, f.h);
- }
- if (c && c.drawGrid) {
- a.strokeStyle = "white";
- for (var b = 0;b < this.r;b++) {
- for (var e = 0;e < this.c;e++) {
- var g = this.grid[b][e];
- a.beginPath();
- f(g.region);
- a.closePath();
- a.stroke();
- }
- }
- }
- a.strokeStyle = "#E0F8D8";
- for (b = 0;b < this.r;b++) {
- for (e = 0;e < this.c;e++) {
- g = this.grid[b][e], a.beginPath(), f(g.bounds), a.closePath(), a.stroke();
- }
- }
- };
- a.tmpRectangle = t.createEmpty();
- return a;
- }();
- u.DirtyRegion = n;
- (function(a) {
- var d = function() {
- function a(f) {
- this.region = f;
- this.bounds = t.createEmpty();
- }
- a.prototype.clear = function() {
- this.bounds.setEmpty();
- };
- return a;
- }();
- a.Cell = d;
- })(n = u.DirtyRegion || (u.DirtyRegion = {}));
- var v = function() {
- function a(d, c, f, b, e, g) {
- this.index = d;
- this.x = c;
- this.y = f;
- this.scale = g;
- this.bounds = new t(c * b, f * e, b, e);
- }
- a.prototype.getOBB = function() {
- if (this._obb) {
- return this._obb;
- }
- this.bounds.getCorners(a.corners);
- return this._obb = new q(a.corners);
- };
- a.corners = r.createEmptyPoints(4);
- return a;
- }();
- u.Tile = v;
- var e = function() {
- function a(d, c, f, b, e) {
- this.tileW = f;
- this.tileH = b;
- this.scale = e;
- this.w = d;
- this.h = c;
- this.rows = Math.ceil(c / b);
- this.columns = Math.ceil(d / f);
- this.tiles = [];
- for (c = d = 0;c < this.rows;c++) {
- for (var g = 0;g < this.columns;g++) {
- this.tiles.push(new v(d++, g, c, f, b, e));
- }
- }
- }
- a.prototype.getTiles = function(a, c) {
- if (c.emptyArea(a)) {
- return [];
- }
- if (c.infiniteArea(a)) {
- return this.tiles;
- }
- var f = this.columns * this.rows;
- return 40 > f && c.isScaleOrRotation() ? this.getFewTiles(a, c, 10 < f) : this.getManyTiles(a, c);
- };
- a.prototype.getFewTiles = function(d, c, f) {
- void 0 === f && (f = !0);
- if (c.isTranslationOnly() && 1 === this.tiles.length) {
- return this.tiles[0].bounds.intersectsTranslated(d, c.tx, c.ty) ? [this.tiles[0]] : [];
- }
- c.transformRectangle(d, a._points);
- var b;
- d = new t(0, 0, this.w, this.h);
- f && (b = new q(a._points));
- d.intersect(q.getBounds(a._points));
- if (d.isEmpty()) {
- return [];
- }
- var e = d.x / this.tileW | 0;
- c = d.y / this.tileH | 0;
- var h = Math.ceil((d.x + d.w) / this.tileW) | 0, k = Math.ceil((d.y + d.h) / this.tileH) | 0, e = m(e, 0, this.columns), h = m(h, 0, this.columns);
- c = m(c, 0, this.rows);
- for (var k = m(k, 0, this.rows), n = [];e < h;e++) {
- for (var l = c;l < k;l++) {
- var v = this.tiles[l * this.columns + e];
- v.bounds.intersects(d) && (f ? v.getOBB().intersects(b) : 1) && n.push(v);
- }
- }
- return n;
- };
- a.prototype.getManyTiles = function(d, c) {
- function f(a, f, c) {
- return (a - f.x) * (c.y - f.y) / (c.x - f.x) + f.y;
- }
- function b(a, f, c, d, e) {
- if (!(0 > c || c >= f.columns)) {
- for (d = m(d, 0, f.rows), e = m(e + 1, 0, f.rows);d < e;d++) {
- a.push(f.tiles[d * f.columns + c]);
- }
- }
- }
- var e = a._points;
- c.transformRectangle(d, e);
- for (var h = e[0].x < e[1].x ? 0 : 1, k = e[2].x < e[3].x ? 2 : 3, k = e[h].x < e[k].x ? h : k, h = [], n = 0;5 > n;n++, k++) {
- h.push(e[k % 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) && (e = h[1], h[1] = h[3], h[3] = e);
- var e = [], q, t, k = Math.floor(h[0].x / this.tileW), n = (k + 1) * this.tileW;
- if (h[2].x < n) {
- q = Math.min(h[0].y, h[1].y, h[2].y, h[3].y);
- t = Math.max(h[0].y, h[1].y, h[2].y, h[3].y);
- var l = Math.floor(q / this.tileH), v = Math.floor(t / this.tileH);
- b(e, this, k, l, v);
- return e;
- }
- var r = 0, p = 4, u = !1;
- if (h[0].x === h[1].x || h[0].x === h[3].x) {
- h[0].x === h[1].x ? (u = !0, r++) : p--, q = f(n, h[r], h[r + 1]), t = f(n, h[p], h[p - 1]), l = Math.floor(h[r].y / this.tileH), v = Math.floor(h[p].y / this.tileH), b(e, this, k, l, v), k++;
- }
- do {
- var w, D, z, B;
- h[r + 1].x < n ? (w = h[r + 1].y, z = !0) : (w = f(n, h[r], h[r + 1]), z = !1);
- h[p - 1].x < n ? (D = h[p - 1].y, B = !0) : (D = f(n, h[p], h[p - 1]), B = !1);
- l = Math.floor((h[r].y < h[r + 1].y ? q : w) / this.tileH);
- v = Math.floor((h[p].y > h[p - 1].y ? t : D) / this.tileH);
- b(e, this, k, l, v);
- if (z && u) {
- break;
- }
- z ? (u = !0, r++, q = f(n, h[r], h[r + 1])) : q = w;
- B ? (p--, t = f(n, h[p], h[p - 1])) : t = D;
- k++;
- n = (k + 1) * this.tileW;
- } while (r < p);
- return e;
- };
- a._points = r.createEmptyPoints(4);
- return a;
- }();
- u.TileCache = e;
- n = function() {
- function a(d, c, f) {
- this._cacheLevels = [];
- this._source = d;
- this._tileSize = c;
- this._minUntiledSize = f;
- }
- a.prototype._getTilesAtScale = function(a, c, f) {
- var g = Math.max(c.getAbsoluteScaleX(), c.getAbsoluteScaleY()), h = 0;
- 1 !== g && (h = m(Math.round(Math.log(1 / g) / Math.LN2), -5, 3));
- g = b(h);
- if (this._source.hasFlags(1048576)) {
- for (;;) {
- g = b(h);
- if (f.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(g, g))) {
- break;
- }
- h--;
- }
- }
- this._source.hasFlags(2097152) || (h = m(h, -5, 0));
- g = b(h);
- f = 5 + h;
- h = this._cacheLevels[f];
- if (!h) {
- var h = this._source.getBounds().getAbsoluteBounds().clone().scale(g, g), k, n;
- this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(h.w, h.h) <= this._minUntiledSize ? (k = h.w, n = h.h) : k = n = this._tileSize;
- h = this._cacheLevels[f] = new e(h.w, h.h, k, n, g);
- }
- return h.getTiles(a, c.scaleClone(g, g));
- };
- a.prototype.fetchTiles = function(a, c, f, b) {
- var e = new t(0, 0, f.canvas.width, f.canvas.height);
- a = this._getTilesAtScale(a, c, e);
- var g;
- c = this._source;
- for (var h = 0;h < a.length;h++) {
- var k = a[h];
- k.cachedSurfaceRegion && k.cachedSurfaceRegion.surface && !c.hasFlags(1048592) || (g || (g = []), g.push(k));
- }
- g && this._cacheTiles(f, g, b, e);
- c.removeFlags(16);
- return a;
- };
- a.prototype._getTileBounds = function(a) {
- for (var c = t.createEmpty(), f = 0;f < a.length;f++) {
- c.union(a[f].bounds);
- }
- return c;
- };
- a.prototype._cacheTiles = function(a, c, f, b, e) {
- void 0 === e && (e = 4);
- var g = this._getTileBounds(c);
- a.save();
- a.setTransform(1, 0, 0, 1, 0, 0);
- a.clearRect(0, 0, b.w, b.h);
- a.translate(-g.x, -g.y);
- a.scale(c[0].scale, c[0].scale);
- var h = this._source.getBounds();
- a.translate(-h.x, -h.y);
- 2 <= p.traceLevel && p.writer && p.writer.writeLn("Rendering Tiles: " + g);
- this._source.render(a, 0);
- a.restore();
- for (var h = null, k = 0;k < c.length;k++) {
- var n = c[k], q = n.bounds.clone();
- q.x -= g.x;
- q.y -= g.y;
- b.contains(q) || (h || (h = []), h.push(n));
- n.cachedSurfaceRegion = f(n.cachedSurfaceRegion, a, q);
- }
- h && (2 <= h.length ? (c = h.slice(0, h.length / 2 | 0), g = h.slice(c.length), this._cacheTiles(a, c, f, b, e - 1), this._cacheTiles(a, g, f, b, e - 1)) : this._cacheTiles(a, h, f, b, e - 1));
- };
- return a;
- }();
- u.RenderableTileCache = n;
- })(p.Geometry || (p.Geometry = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(k, p) {
- function u() {
- this.constructor = k;
- }
- for (var a in p) {
- p.hasOwnProperty(a) && (k[a] = p[a]);
- }
- u.prototype = p.prototype;
- k.prototype = new u;
-};
-(function(k) {
- (function(p) {
- var u = k.IntegerUtilities.roundToMultipleOfPowerOfTwo, a = p.Geometry.Rectangle;
- (function(k) {
- var m = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(p.Geometry.Rectangle);
- k.Region = m;
- var b = function() {
- function a(b, e) {
- this._root = new l(0, 0, b | 0, e | 0, !1);
- }
- a.prototype.allocate = function(a, b) {
- a = Math.ceil(a);
- b = Math.ceil(b);
- var g = this._root.insert(a, b);
- g && (g.allocator = this, g.allocated = !0);
- return g;
- };
- a.prototype.free = function(a) {
- a.clear();
- a.allocated = !1;
- };
- a.RANDOM_ORIENTATION = !0;
- a.MAX_DEPTH = 256;
- return a;
- }();
- k.CompactAllocator = b;
- var l = function(a) {
- function h(b, g, d, c, f) {
- a.call(this, b, g, d, c);
- this._children = null;
- this._horizontal = f;
- this.allocated = !1;
- }
- __extends(h, a);
- h.prototype.clear = function() {
- this._children = null;
- this.allocated = !1;
- };
- h.prototype.insert = function(a, b) {
- return this._insert(a, b, 0);
- };
- h.prototype._insert = function(a, g, d) {
- if (!(d > b.MAX_DEPTH || this.allocated || this.w < a || this.h < g)) {
- if (this._children) {
- var c;
- if ((c = this._children[0]._insert(a, g, d + 1)) || (c = this._children[1]._insert(a, g, d + 1))) {
- return c;
- }
- } else {
- return c = !this._horizontal, b.RANDOM_ORIENTATION && (c = .5 <= Math.random()), this._children = this._horizontal ? [new h(this.x, this.y, this.w, g, !1), new h(this.x, this.y + g, this.w, this.h - g, c)] : [new h(this.x, this.y, a, this.h, !0), new h(this.x + a, this.y, this.w - a, this.h, c)], c = this._children[0], c.w === a && c.h === g ? (c.allocated = !0, c) : this._insert(a, g, d + 1);
- }
- }
- };
- return h;
- }(k.Region), r = function() {
- function a(b, e, g, d) {
- this._columns = b / g | 0;
- this._rows = e / d | 0;
- this._sizeW = g;
- this._sizeH = d;
- this._freeList = [];
- this._index = 0;
- this._total = this._columns * this._rows;
- }
- a.prototype.allocate = function(a, b) {
- a = Math.ceil(a);
- b = Math.ceil(b);
- var g = this._sizeW, d = this._sizeH;
- if (a > g || b > d) {
- return null;
- }
- var c = this._freeList, f = this._index;
- return 0 < c.length ? (g = c.pop(), g.w = a, g.h = b, g.allocated = !0, g) : f < this._total ? (c = f / this._columns | 0, g = new h((f - c * this._columns) * g, c * d, a, b), g.index = f, g.allocator = this, g.allocated = !0, this._index++, g) : null;
- };
- a.prototype.free = function(a) {
- a.allocated = !1;
- this._freeList.push(a);
- };
- return a;
- }();
- k.GridAllocator = r;
- var h = function(a) {
- function b(e, g, d, c) {
- a.call(this, e, g, d, c);
- this.index = -1;
- }
- __extends(b, a);
- return b;
- }(k.Region);
- k.GridCell = h;
- var t = function() {
- return function(a, b, e) {
- this.size = a;
- this.region = b;
- this.allocator = e;
- };
- }(), q = function(a) {
- function b(e, g, d, c, f) {
- a.call(this, e, g, d, c);
- this.region = f;
- }
- __extends(b, a);
- return b;
- }(k.Region);
- k.BucketCell = q;
- m = function() {
- function b(a, e) {
- this._buckets = [];
- this._w = a | 0;
- this._h = e | 0;
- this._filled = 0;
- }
- b.prototype.allocate = function(b, e) {
- b = Math.ceil(b);
- e = Math.ceil(e);
- var g = Math.max(b, e);
- if (b > this._w || e > this._h) {
- return null;
- }
- var d = null, c, f = this._buckets;
- do {
- for (var h = 0;h < f.length && !(f[h].size >= g && (c = f[h], d = c.allocator.allocate(b, e)));h++) {
- }
- if (!d) {
- var k = this._h - this._filled;
- if (k < e) {
- return null;
- }
- var h = u(g, 8), n = 2 * h;
- n > k && (n = k);
- if (n < h) {
- return null;
- }
- k = new a(0, this._filled, this._w, n);
- this._buckets.push(new t(h, k, new r(k.w, k.h, h, h)));
- this._filled += n;
- }
- } while (!d);
- return new q(c.region.x + d.x, c.region.y + d.y, d.w, d.h, d);
- };
- b.prototype.free = function(a) {
- a.region.allocator.free(a.region);
- };
- return b;
- }();
- k.BucketAllocator = m;
- })(p.RegionAllocator || (p.RegionAllocator = {}));
- (function(a) {
- var k = function() {
- function a(b) {
- this._createSurface = b;
- this._surfaces = [];
- }
- Object.defineProperty(a.prototype, "surfaces", {get:function() {
- return this._surfaces;
- }, enumerable:!0, configurable:!0});
- a.prototype._createNewSurface = function(a, b) {
- var h = this._createSurface(a, b);
- this._surfaces.push(h);
- return h;
- };
- a.prototype.addSurface = function(a) {
- this._surfaces.push(a);
- };
- a.prototype.allocate = function(a, b, h) {
- for (var k = 0;k < this._surfaces.length;k++) {
- var q = this._surfaces[k];
- if (q !== h && (q = q.allocate(a, b))) {
- return q;
- }
- }
- return this._createNewSurface(a, b).allocate(a, b);
- };
- a.prototype.free = function(a) {
- };
- return a;
- }();
- a.SimpleAllocator = k;
- })(p.SurfaceRegionAllocator || (p.SurfaceRegionAllocator = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- var u = p.Geometry.Rectangle, a = p.Geometry.Matrix, w = p.Geometry.DirtyRegion;
- (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";
- })(p.BlendMode || (p.BlendMode = {}));
- var m = p.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";
- })(p.NodeFlags || (p.NodeFlags = {}));
- var b = p.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";
- })(p.NodeType || (p.NodeType = {}));
- var l = p.NodeType;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.OnStageBoundsChanged = 1] = "OnStageBoundsChanged";
- a[a.RemovedFromStage = 2] = "RemovedFromStage";
- })(p.NodeEventType || (p.NodeEventType = {}));
- var r = function() {
- function a() {
- }
- a.prototype.visitNode = function(a, f) {
- };
- a.prototype.visitShape = function(a, f) {
- this.visitNode(a, f);
- };
- a.prototype.visitGroup = function(a, f) {
- this.visitNode(a, f);
- for (var b = a.getChildren(), d = 0;d < b.length;d++) {
- b[d].visit(this, f);
- }
- };
- a.prototype.visitStage = function(a, f) {
- this.visitGroup(a, f);
- };
- a.prototype.visitRenderable = function(a, f) {
- this.visitNode(a, f);
- };
- return a;
- }();
- p.NodeVisitor = r;
- var h = function() {
- return function() {
- };
- }();
- p.State = h;
- var t = function(b) {
- function c() {
- b.call(this);
- this.matrix = a.createIdentity();
- this.depth = 0;
- }
- __extends(c, b);
- c.prototype.transform = function(a) {
- var c = this.clone();
- c.matrix.preMultiply(a.getMatrix());
- return c;
- };
- c.allocate = function() {
- var a = c._dirtyStack, b = null;
- a.length && (b = a.pop());
- return b;
- };
- c.prototype.clone = function() {
- var a = c.allocate();
- a || (a = new c);
- a.set(this);
- return a;
- };
- c.prototype.set = function(a) {
- this.matrix.set(a.matrix);
- };
- c.prototype.free = function() {
- c._dirtyStack.push(this);
- };
- c._dirtyStack = [];
- return c;
- }(h);
- p.PreRenderState = t;
- var q = function(a) {
- function c() {
- a.apply(this, arguments);
- this.isDirty = !0;
- }
- __extends(c, a);
- c.prototype.start = function(a, c) {
- this._dirtyRegion = c;
- var b = new t;
- b.matrix.setIdentity();
- a.visit(this, b);
- b.free();
- };
- c.prototype.visitGroup = function(a, c) {
- var b = a.getChildren();
- this.visitNode(a, c);
- for (var d = 0;d < b.length;d++) {
- var e = b[d], g = c.transform(e.getTransform());
- e.visit(this, g);
- g.free();
- }
- };
- c.prototype.visitNode = function(a, c) {
- a.hasFlags(16) && (this.isDirty = !0);
- a.toggleFlags(16, !1);
- a.depth = c.depth++;
- };
- return c;
- }(r);
- p.PreRenderVisitor = q;
- h = function(a) {
- function c(f) {
- a.call(this);
- this.writer = f;
- }
- __extends(c, a);
- c.prototype.visitNode = function(a, c) {
- };
- c.prototype.visitShape = function(a, c) {
- this.writer.writeLn(a.toString());
- this.visitNode(a, c);
- };
- c.prototype.visitGroup = function(a, c) {
- this.visitNode(a, c);
- var b = a.getChildren();
- this.writer.enter(a.toString() + " " + b.length);
- for (var d = 0;d < b.length;d++) {
- b[d].visit(this, c);
- }
- this.writer.outdent();
- };
- c.prototype.visitStage = function(a, c) {
- this.visitGroup(a, c);
- };
- return c;
- }(r);
- p.TracingNodeVisitor = h;
- var n = function() {
- function a() {
- this._clip = -1;
- this._eventListeners = null;
- this._id = a._nextId++;
- this._type = 1;
- this._index = -1;
- this._parent = null;
- this.reset();
- }
- Object.defineProperty(a.prototype, "id", {get:function() {
- return this._id;
- }, enumerable:!0, configurable:!0});
- a.prototype._dispatchEvent = function(a) {
- if (this._eventListeners) {
- for (var f = this._eventListeners, b = 0;b < f.length;b++) {
- var d = f[b];
- d.type === a && d.listener(this, a);
- }
- }
- };
- a.prototype.addEventListener = function(a, f) {
- this._eventListeners || (this._eventListeners = []);
- this._eventListeners.push({type:a, listener:f});
- };
- a.prototype.removeEventListener = function(a, f) {
- for (var b = this._eventListeners, d = 0;d < b.length;d++) {
- var e = b[d];
- if (e.type === a && e.listener === f) {
- b.splice(d, 1);
- break;
- }
- }
- };
- Object.defineProperty(a.prototype, "properties", {get:function() {
- return this._properties || (this._properties = {});
- }, enumerable:!0, configurable:!0});
- a.prototype.reset = function() {
- this._flags = b.Default;
- this._properties = this._transform = this._layer = this._bounds = null;
- this.depth = -1;
- };
- Object.defineProperty(a.prototype, "clip", {get:function() {
- return this._clip;
- }, set:function(a) {
- this._clip = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "parent", {get:function() {
- return this._parent;
- }, enumerable:!0, configurable:!0});
- a.prototype.getTransformedBounds = function(a) {
- var f = this.getBounds(!0);
- if (a !== this && !f.isEmpty()) {
- var b = this.getTransform().getConcatenatedMatrix();
- a ? (a = a.getTransform().getInvertedConcatenatedMatrix(!0), a.preMultiply(b), a.transformRectangleAABB(f), a.free()) : b.transformRectangleAABB(f);
- }
- return f;
- };
- a.prototype._markCurrentBoundsAsDirtyRegion = function() {
- };
- a.prototype.getStage = function(a) {
- void 0 === a && (a = !0);
- for (var f = this._parent;f;) {
- if (f.isType(13)) {
- var b = f;
- if (a) {
- if (b.dirtyRegion) {
- return b;
- }
- } else {
- return b;
- }
- }
- f = f._parent;
- }
- return null;
- };
- a.prototype.getChildren = function(a) {
- throw void 0;
- };
- a.prototype.getBounds = function(a) {
- throw void 0;
- };
- a.prototype.setBounds = function(a) {
- (this._bounds || (this._bounds = u.createEmpty())).set(a);
- this.removeFlags(256);
- };
- a.prototype.clone = function() {
- throw void 0;
- };
- a.prototype.setFlags = function(a) {
- this._flags |= a;
- };
- a.prototype.hasFlags = function(a) {
- return (this._flags & a) === a;
- };
- a.prototype.hasAnyFlags = function(a) {
- return !!(this._flags & a);
- };
- a.prototype.removeFlags = function(a) {
- this._flags &= ~a;
- };
- a.prototype.toggleFlags = function(a, f) {
- this._flags = f ? this._flags | a : this._flags & ~a;
- };
- a.prototype._propagateFlagsUp = function(a) {
- if (0 !== a && !this.hasFlags(a)) {
- this.hasFlags(2) || (a &= -257);
- this.setFlags(a);
- var f = this._parent;
- f && f._propagateFlagsUp(a);
- }
- };
- a.prototype._propagateFlagsDown = function(a) {
- throw void 0;
- };
- a.prototype.isAncestor = function(a) {
- for (;a;) {
- if (a === this) {
- return !0;
- }
- a = a._parent;
- }
- return !1;
- };
- a._getAncestors = function(c, f) {
- var b = a._path;
- for (b.length = 0;c && c !== f;) {
- b.push(c), c = c._parent;
- }
- return b;
- };
- a.prototype._findClosestAncestor = function(a, f) {
- for (var b = this;b;) {
- if (b.hasFlags(a) === f) {
- return b;
- }
- b = b._parent;
- }
- return null;
- };
- a.prototype.isType = function(a) {
- return this._type === a;
- };
- a.prototype.isTypeOf = function(a) {
- return (this._type & a) === a;
- };
- a.prototype.isLeaf = function() {
- return this.isType(33) || this.isType(3);
- };
- a.prototype.isLinear = function() {
- if (this.isLeaf()) {
- return !0;
- }
- if (this.isType(5)) {
- var a = this._children;
- if (1 === a.length && a[0].isLinear()) {
- return !0;
- }
- }
- return !1;
- };
- a.prototype.getTransformMatrix = function(a) {
- void 0 === a && (a = !1);
- return this.getTransform().getMatrix(a);
- };
- a.prototype.getTransform = function() {
- null === this._transform && (this._transform = new e(this));
- return this._transform;
- };
- a.prototype.getLayer = function() {
- null === this._layer && (this._layer = new g(this));
- return this._layer;
- };
- a.prototype.getLayerBounds = function(a) {
- var f = this.getBounds();
- a && this._layer && this._layer.expandBounds(f);
- return f;
- };
- a.prototype.visit = function(a, f) {
- switch(this._type) {
- case 1:
- a.visitNode(this, f);
- break;
- case 5:
- a.visitGroup(this, f);
- break;
- case 13:
- a.visitStage(this, f);
- break;
- case 3:
- a.visitShape(this, f);
- break;
- case 33:
- a.visitRenderable(this, f);
- break;
- default:
- k.Debug.unexpectedCase();
- }
- };
- a.prototype.invalidate = function() {
- this._propagateFlagsUp(b.UpOnInvalidate);
- };
- a.prototype.toString = function(a) {
- void 0 === a && (a = !1);
- var f = l[this._type] + " " + this._id;
- a && (f += " " + this._bounds.toString());
- return f;
- };
- a._path = [];
- a._nextId = 0;
- return a;
- }();
- p.Node = n;
- var v = function(a) {
- function c() {
- a.call(this);
- this._type = 5;
- this._children = [];
- }
- __extends(c, a);
- c.prototype.getChildren = function(a) {
- void 0 === a && (a = !1);
- return a ? this._children.slice(0) : this._children;
- };
- c.prototype.childAt = function(a) {
- return this._children[a];
- };
- Object.defineProperty(c.prototype, "child", {get:function() {
- return this._children[0];
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "groupChild", {get:function() {
- return this._children[0];
- }, enumerable:!0, configurable:!0});
- c.prototype.addChild = function(a) {
- a._parent && a._parent.removeChildAt(a._index);
- a._parent = this;
- a._index = this._children.length;
- this._children.push(a);
- this._propagateFlagsUp(b.UpOnAddedOrRemoved);
- a._propagateFlagsDown(b.DownOnAddedOrRemoved);
- };
- c.prototype.removeChildAt = function(a) {
- var c = this._children[a];
- this._children.splice(a, 1);
- c._index = -1;
- c._parent = null;
- this._propagateFlagsUp(b.UpOnAddedOrRemoved);
- c._propagateFlagsDown(b.DownOnAddedOrRemoved);
- };
- c.prototype.clearChildren = function() {
- for (var a = 0;a < this._children.length;a++) {
- var c = this._children[a];
- c && (c._index = -1, c._parent = null, c._propagateFlagsDown(b.DownOnAddedOrRemoved));
- }
- this._children.length = 0;
- this._propagateFlagsUp(b.UpOnAddedOrRemoved);
- };
- c.prototype._propagateFlagsDown = function(a) {
- if (!this.hasFlags(a)) {
- this.setFlags(a);
- for (var c = this._children, b = 0;b < c.length;b++) {
- c[b]._propagateFlagsDown(a);
- }
- }
- };
- c.prototype.getBounds = function(a) {
- void 0 === a && (a = !1);
- var c = this._bounds || (this._bounds = u.createEmpty());
- if (this.hasFlags(256)) {
- c.setEmpty();
- for (var b = this._children, d = u.allocate(), e = 0;e < b.length;e++) {
- var g = b[e];
- d.set(g.getBounds());
- g.getTransformMatrix().transformRectangleAABB(d);
- c.union(d);
- }
- d.free();
- this.removeFlags(256);
- }
- return a ? c.clone() : c;
- };
- c.prototype.getLayerBounds = function(a) {
- if (!a) {
- return this.getBounds();
- }
- for (var c = u.createEmpty(), b = this._children, d = u.allocate(), e = 0;e < b.length;e++) {
- var g = b[e];
- d.set(g.getLayerBounds(a));
- g.getTransformMatrix().transformRectangleAABB(d);
- c.union(d);
- }
- d.free();
- a && this._layer && this._layer.expandBounds(c);
- return c;
- };
- return c;
- }(n);
- p.Group = v;
- var e = function() {
- function d(c) {
- this._node = c;
- this._matrix = a.createIdentity();
- this._colorMatrix = p.ColorMatrix.createIdentity();
- this._concatenatedMatrix = a.createIdentity();
- this._invertedConcatenatedMatrix = a.createIdentity();
- this._concatenatedColorMatrix = p.ColorMatrix.createIdentity();
- }
- d.prototype.setMatrix = function(a) {
- this._matrix.isEqual(a) || (this._matrix.set(a), this._node._propagateFlagsUp(b.UpOnMoved), this._node._propagateFlagsDown(b.DownOnMoved));
- };
- d.prototype.setColorMatrix = function(a) {
- this._colorMatrix.set(a);
- this._node._propagateFlagsUp(b.UpOnColorMatrixChanged);
- this._node._propagateFlagsDown(b.DownOnColorMatrixChanged);
- };
- d.prototype.getMatrix = function(a) {
- void 0 === a && (a = !1);
- return a ? this._matrix.clone() : this._matrix;
- };
- d.prototype.hasColorMatrix = function() {
- return null !== this._colorMatrix;
- };
- d.prototype.getColorMatrix = function(a) {
- void 0 === a && (a = !1);
- null === this._colorMatrix && (this._colorMatrix = p.ColorMatrix.createIdentity());
- return a ? this._colorMatrix.clone() : this._colorMatrix;
- };
- d.prototype.getConcatenatedMatrix = function(c) {
- void 0 === c && (c = !1);
- if (this._node.hasFlags(512)) {
- for (var f = this._node._findClosestAncestor(512, !1), b = n._getAncestors(this._node, f), d = f ? f.getTransform()._concatenatedMatrix.clone() : a.createIdentity(), e = b.length - 1;0 <= e;e--) {
- var f = b[e], g = f.getTransform();
- d.preMultiply(g._matrix);
- g._concatenatedMatrix.set(d);
- f.removeFlags(512);
- }
- }
- return c ? this._concatenatedMatrix.clone() : this._concatenatedMatrix;
- };
- d.prototype.getInvertedConcatenatedMatrix = function(a) {
- void 0 === a && (a = !1);
- this._node.hasFlags(1024) && (this.getConcatenatedMatrix().inverse(this._invertedConcatenatedMatrix), this._node.removeFlags(1024));
- return a ? this._invertedConcatenatedMatrix.clone() : this._invertedConcatenatedMatrix;
- };
- d.prototype.toString = function() {
- return this._matrix.toString();
- };
- return d;
- }();
- p.Transform = e;
- var g = function() {
- function a(c) {
- this._node = c;
- this._mask = null;
- this._blendMode = 1;
- }
- Object.defineProperty(a.prototype, "filters", {get:function() {
- return this._filters;
- }, set:function(a) {
- this._filters = a;
- a.length && this._node.invalidate();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blendMode", {get:function() {
- return this._blendMode;
- }, set:function(a) {
- this._blendMode = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "mask", {get:function() {
- return this._mask;
- }, set:function(a) {
- this._mask !== a && (this._node.invalidate(), this._mask && this._mask.removeFlags(4));
- (this._mask = a) && this._mask.setFlags(4);
- }, enumerable:!0, configurable:!0});
- a.prototype.toString = function() {
- return m[this._blendMode];
- };
- a.prototype.expandBounds = function(a) {
- var f = this._filters;
- if (f) {
- for (var b = 0;b < f.length;b++) {
- f[b].expandBounds(a);
- }
- }
- };
- return a;
- }();
- p.Layer = g;
- h = function(a) {
- function b(f) {
- a.call(this);
- this._source = f;
- 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 = u.createEmpty());
- this.hasFlags(256) && (b.set(this._source.getBounds()), this.removeFlags(256));
- return a ? b.clone() : b;
- };
- Object.defineProperty(b.prototype, "source", {get:function() {
- return this._source;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ratio", {get:function() {
- return this._ratio;
- }, set:function(a) {
- a !== this._ratio && (this.invalidate(), this._ratio = a);
- }, enumerable:!0, configurable:!0});
- b.prototype._propagateFlagsDown = function(a) {
- this.setFlags(a);
- };
- b.prototype.getChildren = function(a) {
- return [this._source];
- };
- return b;
- }(n);
- p.Shape = h;
- h = function() {
- return function() {
- this.debug = !1;
- this.paintRenderable = !0;
- this.paintViewport = this.paintFlashing = this.paintDirtyRegion = this.paintBounds = !1;
- this.clear = !0;
- };
- }();
- p.RendererOptions = h;
- (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";
- })(p.Backend || (p.Backend = {}));
- r = function(a) {
- function b(f, c, e) {
- a.call(this);
- this._container = f;
- this._stage = c;
- this._options = e;
- this._viewport = u.createSquare(1024);
- this._devicePixelRatio = 1;
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "viewport", {set:function(a) {
- this._viewport.set(a);
- }, enumerable:!0, configurable:!0});
- b.prototype.render = function() {
- throw void 0;
- };
- b.prototype.resize = function() {
- throw void 0;
- };
- b.prototype.screenShot = function(a, b, c) {
- throw void 0;
- };
- return b;
- }(r);
- p.Renderer = r;
- r = function(b) {
- function c(a, e, g) {
- void 0 === g && (g = !1);
- b.call(this);
- this._preVisitor = new q;
- this._flags &= -3;
- this._type = 13;
- this._scaleMode = c.DEFAULT_SCALE;
- this._align = c.DEFAULT_ALIGN;
- this._content = new v;
- this._content._flags &= -3;
- this.addChild(this._content);
- this.setFlags(16);
- this.setBounds(new u(0, 0, a, e));
- g ? (this._dirtyRegion = new w(a, e), this._dirtyRegion.addDirtyRectangle(new u(0, 0, a, e))) : this._dirtyRegion = null;
- this._updateContentMatrix();
- }
- __extends(c, b);
- Object.defineProperty(c.prototype, "dirtyRegion", {get:function() {
- return this._dirtyRegion;
- }, enumerable:!0, configurable:!0});
- c.prototype.setBounds = function(a) {
- b.prototype.setBounds.call(this, a);
- this._updateContentMatrix();
- this._dispatchEvent(1);
- this._dirtyRegion && (this._dirtyRegion = new w(a.w, a.h), this._dirtyRegion.addDirtyRectangle(a));
- };
- Object.defineProperty(c.prototype, "content", {get:function() {
- return this._content;
- }, enumerable:!0, configurable:!0});
- c.prototype.readyToRender = function() {
- this._preVisitor.isDirty = !1;
- this._preVisitor.start(this, this._dirtyRegion);
- return this._preVisitor.isDirty ? !0 : !1;
- };
- Object.defineProperty(c.prototype, "align", {get:function() {
- return this._align;
- }, set:function(a) {
- this._align = a;
- this._updateContentMatrix();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "scaleMode", {get:function() {
- return this._scaleMode;
- }, set:function(a) {
- this._scaleMode = a;
- this._updateContentMatrix();
- }, enumerable:!0, configurable:!0});
- c.prototype._updateContentMatrix = function() {
- if (this._scaleMode === c.DEFAULT_SCALE && this._align === c.DEFAULT_ALIGN) {
- this._content.getTransform().setMatrix(new a(1, 0, 0, 1, 0, 0));
- } else {
- var f = this.getBounds(), b = this._content.getBounds(), d = f.w / b.w, e = f.h / b.h;
- switch(this._scaleMode) {
- case 2:
- d = e = Math.max(d, e);
- break;
- case 4:
- d = e = 1;
- break;
- case 1:
- break;
- default:
- d = e = Math.min(d, e);
- }
- var g;
- g = this._align & 4 ? 0 : this._align & 8 ? f.w - b.w * d : (f.w - b.w * d) / 2;
- f = this._align & 1 ? 0 : this._align & 2 ? f.h - b.h * e : (f.h - b.h * e) / 2;
- this._content.getTransform().setMatrix(new a(d, 0, 0, e, g, f));
- }
- };
- c.DEFAULT_SCALE = 4;
- c.DEFAULT_ALIGN = 5;
- return c;
- }(v);
- p.Stage = r;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- function u(a, b, f) {
- return a + (b - a) * f;
- }
- function a(a, b, f) {
- return u(a >> 24 & 255, b >> 24 & 255, f) << 24 | u(a >> 16 & 255, b >> 16 & 255, f) << 16 | u(a >> 8 & 255, b >> 8 & 255, f) << 8 | u(a & 255, b & 255, f);
- }
- function w(a, b, f) {
- a = a.measureText(b).width | 0;
- 0 < f && (a += b.length * f);
- return a;
- }
- var m = p.Geometry.Point, b = p.Geometry.Rectangle, l = p.Geometry.Matrix, r = k.ArrayUtilities.indexOf, h = function(a) {
- function b() {
- a.call(this);
- this._parents = [];
- this._renderableParents = [];
- this._invalidateEventListeners = null;
- this._flags &= -3;
- this._type = 33;
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "parents", {get:function() {
- return this._parents;
- }, enumerable:!0, configurable:!0});
- b.prototype.addParent = function(a) {
- r(this._parents, a);
- this._parents.push(a);
- };
- b.prototype.willRender = function() {
- for (var a = this._parents, b = 0;b < a.length;b++) {
- for (var c = a[b];c;) {
- if (c.isType(13)) {
- return !0;
- }
- if (!c.hasFlags(65536)) {
- break;
- }
- c = c._parent;
- }
- }
- return !1;
- };
- b.prototype.addRenderableParent = function(a) {
- this._renderableParents.push(a);
- };
- b.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 p.Shape(this);
- this.addParent(a);
- return a;
- };
- b.prototype.invalidate = function() {
- this.setFlags(16);
- for (var a = this._parents, b = 0;b < a.length;b++) {
- a[b].invalidate();
- }
- a = this._renderableParents;
- for (b = 0;b < a.length;b++) {
- a[b].invalidate();
- }
- if (a = this._invalidateEventListeners) {
- for (b = 0;b < a.length;b++) {
- a[b](this);
- }
- }
- };
- b.prototype.addInvalidateEventListener = function(a) {
- this._invalidateEventListeners || (this._invalidateEventListeners = []);
- r(this._invalidateEventListeners, a);
- this._invalidateEventListeners.push(a);
- };
- b.prototype.getBounds = function(a) {
- void 0 === a && (a = !1);
- return a ? this._bounds.clone() : this._bounds;
- };
- b.prototype.getChildren = function(a) {
- 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.render = function(a, b, c, d, e) {
- };
- return b;
- }(p.Node);
- p.Renderable = h;
- var t = function(a) {
- function b(f, c) {
- a.call(this);
- this.setBounds(f);
- this.render = c;
- }
- __extends(b, a);
- return b;
- }(h);
- p.CustomRenderable = t;
- (function(a) {
- a[a.Idle = 1] = "Idle";
- a[a.Playing = 2] = "Playing";
- a[a.Paused = 3] = "Paused";
- a[a.Ended = 4] = "Ended";
- })(p.RenderableVideoState || (p.RenderableVideoState = {}));
- t = function(a) {
- function c(f, e) {
- a.call(this);
- this._flags = 1048592;
- this._lastPausedTime = this._lastTimeInvalidated = 0;
- this._pauseHappening = this._seekHappening = !1;
- this._isDOMElement = !0;
- this.setBounds(new b(0, 0, 1, 1));
- this._assetId = f;
- this._eventSerializer = e;
- 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);
- g.style.position = "absolute";
- this._video = g;
- this._videoEventHandler = h;
- c._renderableVideos.push(this);
- "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(-1, -1, this);
- this._state = 1;
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "video", {get:function() {
- return this._video;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "state", {get:function() {
- return this._state;
- }, enumerable:!0, configurable:!0});
- c.prototype.play = function() {
- this._state = 2;
- this._video.play();
- };
- c.prototype.pause = function() {
- this._state = 3;
- this._video.pause();
- };
- c.prototype._handleVideoEvent = function(a) {
- var b = null, c = this._video;
- switch(a.type) {
- case "play":
- if (!this._pauseHappening) {
- return;
- }
- a = 7;
- break;
- case "pause":
- if (2 === this._state) {
- c.play();
- return;
- }
- a = 6;
- this._pauseHappening = !0;
- break;
- case "ended":
- this._state = 4;
- this._notifyNetStream(3, b);
- a = 4;
- break;
- 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 = 1;
- b = {videoWidth:c.videoWidth, videoHeight:c.videoHeight, duration:c.duration};
- break;
- case "error":
- a = 11;
- b = {code:c.error.code};
- break;
- case "seeking":
- if (!this._seekHappening) {
- return;
- }
- a = 8;
- break;
- case "seeked":
- if (!this._seekHappening) {
- return;
- }
- a = 9;
- this._seekHappening = !1;
- break;
- default:
- return;
- }
- this._notifyNetStream(a, b);
- };
- c.prototype._notifyNetStream = function(a, b) {
- this._eventSerializer.sendVideoPlaybackEvent(this._assetId, a, b);
- };
- c.prototype.processControlRequest = function(a, b) {
- var c = this._video;
- switch(a) {
- case 1:
- c.src = b.url;
- this.play();
- this._notifyNetStream(0, null);
- break;
- case 9:
- c.paused && c.play();
- break;
- case 2:
- 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 && 0 !== c.seekable.length && (this._seekHappening = !0, c.currentTime = b.time);
- break;
- case 4:
- return c ? c.currentTime : 0;
- case 5:
- return c ? c.duration : 0;
- case 6:
- c && (c.volume = b.volume);
- break;
- case 7:
- if (!c) {
- return 0;
- }
- var d = -1;
- if (c.buffered) {
- for (var e = 0;e < c.buffered.length;e++) {
- d = Math.max(d, c.buffered.end(e));
- }
- } else {
- d = c.duration;
- }
- return Math.round(500 * d);
- case 8:
- return c ? Math.round(500 * c.duration) : 0;
- }
- };
- c.prototype.checkForUpdate = function() {
- this._lastTimeInvalidated !== this._video.currentTime && (this._isDOMElement || this.invalidate());
- this._lastTimeInvalidated = this._video.currentTime;
- };
- c.checkForVideoUpdates = function() {
- for (var a = c._renderableVideos, b = 0;b < a.length;b++) {
- var d = a[b];
- d.willRender() ? (d._video.parentElement || d.invalidate(), d._video.style.zIndex = d.parents[0].depth + "") : d._video.parentElement && d._dispatchEvent(2);
- a[b].checkForUpdate();
- }
- };
- c.prototype.render = function(a, b, c) {
- (b = this._video) && 0 < b.videoWidth && a.drawImage(b, 0, 0, b.videoWidth, b.videoHeight, 0, 0, this._bounds.w, this._bounds.h);
- };
- c._renderableVideos = [];
- return c;
- }(h);
- p.RenderableVideo = t;
- t = function(a) {
- function c(b, c) {
- a.call(this);
- this._flags = 1048592;
- this.properties = {};
- this.setBounds(c);
- b instanceof HTMLCanvasElement ? this._initializeSourceCanvas(b) : this._sourceImage = b;
- }
- __extends(c, a);
- c.FromDataBuffer = function(a, b, d) {
- var e = document.createElement("canvas");
- e.width = d.w;
- e.height = d.h;
- d = new c(e, d);
- d.updateFromDataBuffer(a, b);
- return d;
- };
- c.FromNode = function(a, b, d, e, g) {
- var h = document.createElement("canvas"), k = a.getBounds();
- h.width = k.w;
- h.height = k.h;
- h = new c(h, k);
- h.drawNode(a, b, d, e, g);
- return h;
- };
- c.FromImage = function(a, d, e) {
- return new c(a, new b(0, 0, d, e));
- };
- c.prototype.updateFromDataBuffer = function(a, b) {
- if (p.imageUpdateOption.value) {
- var c = b.buffer;
- if (4 !== a && 5 !== a && 6 !== a) {
- 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));
- p.imageConvertOption.value && (c = new Int32Array(c), d = new Int32Array(e.data.buffer), k.ColorUtilities.convertImage(a, 3, c, d));
- this._ensureSourceCanvas();
- this._context.putImageData(e, 0, 0);
- }
- this.invalidate();
- }
- };
- c.prototype.readImageData = function(a) {
- a.writeRawBytes(this.imageData.data);
- };
- c.prototype.render = function(a, b, c) {
- this.renderSource ? a.drawImage(this.renderSource, 0, 0) : this._renderFallback(a);
- };
- c.prototype.drawNode = function(a, b, c, d, e) {
- c = p.Canvas2D;
- d = this.getBounds();
- (new c.Canvas2DRenderer(this._canvas, null)).renderNode(a, e || d, b);
- };
- c.prototype.mask = function(a) {
- for (var b = this.imageData, c = new Int32Array(b.data.buffer), d = k.ColorUtilities.getUnpremultiplyTable(), e = 0;e < a.length;e++) {
- var g = a[e];
- if (0 === g) {
- c[e] = 0;
- } else {
- if (255 !== g) {
- var h = c[e], n = h >> 0 & 255, q = h >> 8 & 255, h = h >> 16 & 255, t = g << 8, n = d[t + Math.min(n, g)], q = d[t + Math.min(q, g)], h = d[t + Math.min(h, g)];
- c[e] = g << 24 | h << 16 | q << 8 | n;
- }
- }
- }
- this._context.putImageData(b, 0, 0);
- };
- c.prototype._initializeSourceCanvas = function(a) {
- this._canvas = a;
- this._context = this._canvas.getContext("2d");
- };
- c.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);
- }
- };
- 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(c.prototype, "renderSource", {get:function() {
- return this._canvas || this._sourceImage;
- }, enumerable:!0, configurable:!0});
- c.prototype._renderFallback = function(a) {
- };
- return c;
- }(h);
- p.RenderableBitmap = t;
- (function(a) {
- a[a.Fill = 0] = "Fill";
- a[a.Stroke = 1] = "Stroke";
- a[a.StrokeFill = 2] = "StrokeFill";
- })(p.PathType || (p.PathType = {}));
- var q = function() {
- return function(a, b, f, e) {
- this.type = a;
- this.style = b;
- this.smoothImage = f;
- this.strokeProperties = e;
- this.path = new Path2D;
- };
- }();
- p.StyledPath = q;
- var n = function() {
- return function(a, b, f, e, g) {
- this.thickness = a;
- this.scaleMode = b;
- this.capsStyle = f;
- this.jointsStyle = e;
- this.miterLimit = g;
- };
- }();
- p.StrokeProperties = n;
- var v = function(a) {
- function b(c, e, g, h) {
- a.call(this);
- this._flags = 6291472;
- this.properties = {};
- this.setBounds(h);
- this._id = c;
- this._pathData = e;
- this._textures = g;
- g.length && this.setFlags(1048576);
- }
- __extends(b, a);
- b.prototype.update = function(a, b, c) {
- this.setBounds(c);
- this._pathData = a;
- this._paths = null;
- this._textures = b;
- this.setFlags(1048576);
- this.invalidate();
- };
- b.prototype.render = function(a, b, c, d, e) {
- void 0 === d && (d = null);
- void 0 === e && (e = !1);
- a.fillStyle = a.strokeStyle = "transparent";
- b = this._deserializePaths(this._pathData, a, b);
- for (c = 0;c < b.length;c++) {
- var g = b[c];
- a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = g.smoothImage;
- if (0 === g.type) {
- d ? d.addPath(g.path, a.currentTransform) : (a.fillStyle = e ? "#000000" : g.style, a.fill(g.path, "evenodd"), a.fillStyle = "transparent");
- } else {
- if (!d && !e) {
- a.strokeStyle = g.style;
- var h = 1;
- g.strokeProperties && (h = g.strokeProperties.scaleMode, a.lineWidth = g.strokeProperties.thickness, a.lineCap = g.strokeProperties.capsStyle, a.lineJoin = g.strokeProperties.jointsStyle, a.miterLimit = g.strokeProperties.miterLimit);
- var k = a.lineWidth;
- (k = 1 === k || 3 === k) && a.translate(.5, .5);
- a.flashStroke(g.path, h);
- k && a.translate(-.5, -.5);
- a.strokeStyle = "transparent";
- }
- }
- }
- };
- b.prototype._deserializePaths = function(a, d, e) {
- if (this._paths) {
- return this._paths;
- }
- e = this._paths = [];
- var g = null, h = null, q = 0, t = 0, l, v, r = !1, m = 0, p = 0, u = a.commands, w = a.coordinates, D = a.styles, z = D.position = 0;
- a = a.commandsPosition;
- for (var B = 0;B < a;B++) {
- switch(u[B]) {
- case 9:
- r && g && (g.lineTo(m, p), h && h.lineTo(m, p));
- r = !0;
- q = m = w[z++] / 20;
- t = p = w[z++] / 20;
- g && g.moveTo(q, t);
- h && h.moveTo(q, t);
- break;
- case 10:
- q = w[z++] / 20;
- t = w[z++] / 20;
- g && g.lineTo(q, t);
- h && h.lineTo(q, t);
- break;
- case 11:
- l = w[z++] / 20;
- v = w[z++] / 20;
- q = w[z++] / 20;
- t = w[z++] / 20;
- g && g.quadraticCurveTo(l, v, q, t);
- h && h.quadraticCurveTo(l, v, q, t);
- break;
- case 12:
- l = w[z++] / 20;
- v = w[z++] / 20;
- var E = w[z++] / 20, A = w[z++] / 20, q = w[z++] / 20, t = w[z++] / 20;
- g && g.bezierCurveTo(l, v, E, A, q, t);
- h && h.bezierCurveTo(l, v, E, A, q, t);
- break;
- case 1:
- g = this._createPath(0, k.ColorUtilities.rgbaToCSSStyle(D.readUnsignedInt()), !1, null, q, t);
- break;
- case 3:
- l = this._readBitmap(D, d);
- g = this._createPath(0, l.style, l.smoothImage, null, q, t);
- break;
- case 2:
- g = this._createPath(0, this._readGradient(D, d), !1, null, q, t);
- break;
- case 4:
- g = null;
- break;
- case 5:
- h = k.ColorUtilities.rgbaToCSSStyle(D.readUnsignedInt());
- D.position += 1;
- l = D.readByte();
- v = b.LINE_CAPS_STYLES[D.readByte()];
- E = b.LINE_JOINTS_STYLES[D.readByte()];
- l = new n(w[z++] / 20, l, v, E, D.readByte());
- h = this._createPath(1, h, !1, l, q, t);
- break;
- case 6:
- h = this._createPath(2, this._readGradient(D, d), !1, null, q, t);
- break;
- case 7:
- l = this._readBitmap(D, d);
- h = this._createPath(2, l.style, l.smoothImage, null, q, t);
- break;
- case 8:
- h = null;
- }
- }
- r && g && (g.lineTo(m, p), h && h.lineTo(m, p));
- this._pathData = null;
- return e;
- };
- b.prototype._createPath = function(a, b, c, d, e, g) {
- a = new q(a, b, c, d);
- this._paths.push(a);
- a.path.moveTo(e, g);
- return a.path;
- };
- b.prototype._readMatrix = function(a) {
- return new l(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat());
- };
- b.prototype._readGradient = function(a, b) {
- var c = a.readUnsignedByte(), d = 2 * a.readShort() / 255, e = this._readMatrix(a), c = 16 === c ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(d, 0, 0, 0, 0, 1);
- c.setTransform && c.setTransform(e.toSVGMatrix());
- e = a.readUnsignedByte();
- for (d = 0;d < e;d++) {
- var g = a.readUnsignedByte() / 255, h = k.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt());
- c.addColorStop(g, h);
- }
- a.position += 2;
- return c;
- };
- b.prototype._readBitmap = function(a, b) {
- var c = a.readUnsignedInt(), d = this._readMatrix(a), e = a.readBoolean() ? "repeat" : "no-repeat", g = a.readBoolean();
- (c = this._textures[c]) ? (e = b.createPattern(c.renderSource, e), e.setTransform(d.toSVGMatrix())) : e = null;
- return {style:e, smoothImage:g};
- };
- b.prototype._renderFallback = function(a) {
- this.fillStyle || (this.fillStyle = k.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.LINE_CAPS_STYLES = ["round", "butt", "square"];
- b.LINE_JOINTS_STYLES = ["round", "bevel", "miter"];
- return b;
- }(h);
- p.RenderableShape = v;
- t = function(b) {
- function c() {
- b.apply(this, arguments);
- this._flags = 7340048;
- this._morphPaths = Object.create(null);
- }
- __extends(c, b);
- c.prototype._deserializePaths = function(b, c, d) {
- if (this._morphPaths[d]) {
- return this._morphPaths[d];
- }
- var e = this._morphPaths[d] = [], g = null, h = null, q = 0, t = 0, l, r, m = !1, p = 0, w = 0, T = b.commands, D = b.coordinates, z = b.morphCoordinates, B = b.styles, E = b.morphStyles;
- B.position = 0;
- var A = E.position = 0;
- b = b.commandsPosition;
- for (var C = 0;C < b;C++) {
- switch(T[C]) {
- case 9:
- m && g && (g.lineTo(p, w), h && h.lineTo(p, w));
- m = !0;
- q = p = u(D[A], z[A++], d) / 20;
- t = w = u(D[A], z[A++], d) / 20;
- g && g.moveTo(q, t);
- h && h.moveTo(q, t);
- break;
- case 10:
- q = u(D[A], z[A++], d) / 20;
- t = u(D[A], z[A++], d) / 20;
- g && g.lineTo(q, t);
- h && h.lineTo(q, t);
- break;
- case 11:
- l = u(D[A], z[A++], d) / 20;
- r = u(D[A], z[A++], d) / 20;
- q = u(D[A], z[A++], d) / 20;
- t = u(D[A], z[A++], d) / 20;
- g && g.quadraticCurveTo(l, r, q, t);
- h && h.quadraticCurveTo(l, r, q, t);
- break;
- case 12:
- l = u(D[A], z[A++], d) / 20;
- r = u(D[A], z[A++], d) / 20;
- var F = u(D[A], z[A++], d) / 20, G = u(D[A], z[A++], d) / 20, q = u(D[A], z[A++], d) / 20, t = u(D[A], z[A++], d) / 20;
- g && g.bezierCurveTo(l, r, F, G, q, t);
- h && h.bezierCurveTo(l, r, F, G, q, t);
- break;
- case 1:
- g = this._createMorphPath(0, d, k.ColorUtilities.rgbaToCSSStyle(a(B.readUnsignedInt(), E.readUnsignedInt(), d)), !1, null, q, t);
- break;
- case 3:
- l = this._readMorphBitmap(B, E, d, c);
- g = this._createMorphPath(0, d, l.style, l.smoothImage, null, q, t);
- break;
- case 2:
- l = this._readMorphGradient(B, E, d, c);
- g = this._createMorphPath(0, d, l, !1, null, q, t);
- break;
- case 4:
- g = null;
- break;
- case 5:
- l = u(D[A], z[A++], d) / 20;
- h = k.ColorUtilities.rgbaToCSSStyle(a(B.readUnsignedInt(), E.readUnsignedInt(), d));
- B.position += 1;
- r = B.readByte();
- F = v.LINE_CAPS_STYLES[B.readByte()];
- G = v.LINE_JOINTS_STYLES[B.readByte()];
- l = new n(l, r, F, G, B.readByte());
- h = this._createMorphPath(1, d, h, !1, l, q, t);
- break;
- case 6:
- l = this._readMorphGradient(B, E, d, c);
- h = this._createMorphPath(2, d, l, !1, null, q, t);
- break;
- case 7:
- l = this._readMorphBitmap(B, E, d, c);
- h = this._createMorphPath(2, d, l.style, l.smoothImage, null, q, t);
- break;
- case 8:
- h = null;
- }
- }
- m && g && (g.lineTo(p, w), h && h.lineTo(p, w));
- return e;
- };
- c.prototype._createMorphPath = function(a, b, c, d, e, g, h) {
- a = new q(a, c, d, e);
- this._morphPaths[b].push(a);
- a.path.moveTo(g, h);
- return a.path;
- };
- c.prototype._readMorphMatrix = function(a, b, c) {
- return new l(u(a.readFloat(), b.readFloat(), c), u(a.readFloat(), b.readFloat(), c), u(a.readFloat(), b.readFloat(), c), u(a.readFloat(), b.readFloat(), c), u(a.readFloat(), b.readFloat(), c), u(a.readFloat(), b.readFloat(), c));
- };
- c.prototype._readMorphGradient = function(b, c, d, e) {
- var g = b.readUnsignedByte(), h = 2 * b.readShort() / 255, q = this._readMorphMatrix(b, c, d);
- e = 16 === g ? e.createLinearGradient(-1, 0, 1, 0) : e.createRadialGradient(h, 0, 0, 0, 0, 1);
- e.setTransform && e.setTransform(q.toSVGMatrix());
- q = b.readUnsignedByte();
- for (g = 0;g < q;g++) {
- var h = u(b.readUnsignedByte() / 255, c.readUnsignedByte() / 255, d), n = a(b.readUnsignedInt(), c.readUnsignedInt(), d), n = k.ColorUtilities.rgbaToCSSStyle(n);
- e.addColorStop(h, n);
- }
- b.position += 2;
- return e;
- };
- 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();
- d = d.createPattern(this._textures[e]._canvas, c);
- d.setTransform(b.toSVGMatrix());
- return {style:d, smoothImage:a};
- };
- return c;
- }(v);
- p.RenderableMorphShape = t;
- var e = function() {
- function a() {
- this.align = this.leading = this.descent = this.ascent = this.width = this.y = this.x = 0;
- this.runs = [];
- }
- a._getMeasureContext = function() {
- a._measureContext || (a._measureContext = document.createElement("canvas").getContext("2d"));
- return a._measureContext;
- };
- a.prototype.addRun = function(b, f, e, h, k) {
- if (e) {
- var q = a._getMeasureContext();
- q.font = b;
- q = w(q, e, h);
- this.runs.push(new g(b, f, e, q, h, k));
- this.width += q;
- }
- };
- a.prototype.wrap = function(b) {
- var f = [this], e = this.runs, h = this;
- h.width = 0;
- h.runs = [];
- for (var k = a._getMeasureContext(), q = 0;q < e.length;q++) {
- var n = e[q], t = n.text;
- n.text = "";
- n.width = 0;
- k.font = n.font;
- for (var l = b, v = t.split(/[\s.-]/), r = 0, m = 0;m < v.length;m++) {
- var p = v[m], u = t.substr(r, p.length + 1), T = n.letterSpacing, D = w(k, u, T);
- if (D > l) {
- do {
- if (n.text && (h.runs.push(n), h.width += n.width, n = new g(n.font, n.fillStyle, "", 0, n.letterSpacing, n.underline), l = new a, l.y = h.y + h.descent + h.leading + h.ascent | 0, l.ascent = h.ascent, l.descent = h.descent, l.leading = h.leading, l.align = h.align, f.push(l), h = l), l = b - D, 0 > l) {
- for (var z = u.length, B = u;1 < z && !(z--, B = u.substr(0, z), D = w(k, B, T), D <= b);) {
- }
- n.text = B;
- n.width = D;
- u = u.substr(z);
- D = w(k, u, T);
- }
- } while (u && 0 > l);
- } else {
- l -= D;
- }
- n.text += u;
- n.width += D;
- r += p.length + 1;
- }
- h.runs.push(n);
- h.width += n.width;
- }
- return f;
- };
- a.prototype.toString = function() {
- return "TextLine {x: " + this.x + ", y: " + this.y + ", width: " + this.width + ", height: " + (this.ascent + this.descent + this.leading) + "}";
- };
- return a;
- }();
- p.TextLine = e;
- var g = function() {
- return function(a, b, f, e, g, h) {
- void 0 === a && (a = "");
- void 0 === b && (b = "");
- void 0 === f && (f = "");
- void 0 === e && (e = 0);
- void 0 === g && (g = 0);
- void 0 === h && (h = !1);
- this.font = a;
- this.fillStyle = b;
- this.text = f;
- this.width = e;
- this.letterSpacing = g;
- this.underline = h;
- };
- }();
- p.TextRun = g;
- t = function(a) {
- function b(c) {
- a.call(this);
- this._flags = 1048592;
- this.properties = {};
- this._textBounds = c.clone();
- this._textRunData = null;
- this._plainText = "";
- this._borderColor = this._backgroundColor = 0;
- this._matrix = l.createIdentity();
- this._coords = null;
- this._scrollV = 1;
- this._scrollH = 0;
- this.textRect = c.clone();
- this.lines = [];
- this.setBounds(c);
- }
- __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);
- };
- b.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) {
- this._backgroundColor = a;
- this._borderColor = b;
- this._scrollV = c;
- this._scrollH = d;
- };
- b.prototype.reflow = function(a, b) {
- var c = this._textRunData;
- if (c) {
- for (var d = this._bounds, g = d.w - 4, h = this._plainText, n = this.lines, q = new e, t = 0, l = 0, v = 0, r = 0, m = -4294967295, p = -1;c.position < c.length;) {
- var u = c.readInt(), w = c.readInt(), B = c.readInt(), E = c.readUTF(), A = c.readInt(), C = c.readInt(), F = c.readInt();
- A > v && (v = A);
- C > r && (r = C);
- F > m && (m = F);
- A = c.readBoolean();
- C = "";
- c.readBoolean() && (C += "italic ");
- A && (C += "bold ");
- B = C + B + "px " + E + ", AdobeBlank";
- E = c.readInt();
- E = k.ColorUtilities.rgbToHex(E);
- A = c.readInt();
- -1 === p && (p = A);
- c.readBoolean();
- c.readInt();
- c.readInt();
- c.readInt();
- A = c.readInt();
- c.readInt();
- for (var C = c.readBoolean(), G = "", F = !1;!F;u++) {
- var F = u >= w - 1, J = h[u];
- if ("\r" !== J && "\n" !== J && (G += J, u < h.length - 1)) {
- continue;
- }
- q.addRun(B, E, G, A, C);
- if (q.runs.length) {
- n.length && (t += m);
- t += v;
- q.y = t | 0;
- t += r;
- q.ascent = v;
- q.descent = r;
- q.leading = m;
- q.align = p;
- if (b && q.width > g) {
- for (q = q.wrap(g), G = 0;G < q.length;G++) {
- var H = q[G], t = H.y + H.descent + H.leading;
- n.push(H);
- H.width > l && (l = H.width);
- }
- } else {
- n.push(q), q.width > l && (l = q.width);
- }
- q = new e;
- } else {
- t += v + r + m;
- }
- G = "";
- if (F) {
- r = v = 0;
- m = -4294967295;
- p = -1;
- break;
- }
- "\r" === J && "\n" === h[u + 1] && u++;
- }
- q.addRun(B, E, G, A, C);
- }
- c = h[h.length - 1];
- "\r" !== c && "\n" !== c || n.push(q);
- c = this.textRect;
- c.w = l;
- c.h = t;
- if (a) {
- if (!b) {
- g = l;
- l = d.w;
- switch(a) {
- case 1:
- c.x = l - (g + 4) >> 1;
- break;
- case 3:
- c.x = l - (g + 4);
- }
- this._textBounds.setElements(c.x - 2, c.y - 2, c.w + 4, c.h + 4);
- d.w = g + 4;
- }
- d.x = c.x - 2;
- d.h = t + 4;
- } else {
- this._textBounds = d;
- }
- for (u = 0;u < n.length;u++) {
- if (d = n[u], d.width < g) {
- switch(d.align) {
- case 1:
- d.x = g - d.width | 0;
- break;
- case 2:
- d.x = (g - d.width) / 2 | 0;
- }
- }
- }
- this.invalidate();
- }
- };
- b.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) {
- a.save();
- var d = this._textBounds;
- this._backgroundColor && (a.fillStyle = k.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(d.x, d.y, d.w, d.h));
- if (this._borderColor) {
- a.strokeStyle = k.ColorUtilities.rgbaToCSSStyle(this._borderColor);
- a.lineCap = "square";
- a.lineWidth = 1;
- var e = b.absoluteBoundPoints, g = a.currentTransform;
- g ? (d = d.clone(), (new l(g.a, g.b, g.c, g.d, g.e, g.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);
- 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();
- };
- b.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);
- }
- var b = this.lines, c = this._coords;
- c.position = 0;
- for (var d = "", e = "", g = 0;g < b.length;g++) {
- for (var h = b[g].runs, k = 0;k < h.length;k++) {
- var q = h[k];
- q.font !== d && (a.font = d = q.font);
- q.fillStyle !== e && (a.fillStyle = e = q.fillStyle);
- for (var q = q.text, n = 0;n < q.length;n++) {
- var t = c.readInt() / 20, l = c.readInt() / 20;
- a.fillText(q[n], t, l);
- }
- }
- }
- };
- b.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);
- var c = this.lines, d = this._scrollV, e = 0, g = "", h = "";
- a.textAlign = "left";
- a.textBaseline = "alphabetic";
- for (var k = 0;k < c.length;k++) {
- var q = c[k], n = q.x, t = q.y;
- if (k + 1 < d) {
- e = t + q.descent + q.leading;
- } else {
- t -= e;
- if (k + 1 - d && t > b.h) {
- break;
- }
- for (var l = q.runs, v = 0;v < l.length;v++) {
- var r = l[v];
- r.font !== g && (a.font = g = r.font);
- r.fillStyle !== h && (a.fillStyle = h = r.fillStyle);
- r.underline && a.fillRect(n, t + q.descent / 2 | 0, r.width, 1);
- a.textAlign = "left";
- a.textBaseline = "alphabetic";
- if (0 < r.letterSpacing) {
- for (var m = r.text, p = 0;p < m.length;p++) {
- a.fillText(m[p], n, t), n += w(a, m[p], r.letterSpacing);
- }
- } else {
- a.fillText(r.text, n, t), n += r.width;
- }
- }
- }
- }
- };
- b.absoluteBoundPoints = [new m(0, 0), new m(0, 0), new m(0, 0), new m(0, 0)];
- return b;
- }(h);
- p.RenderableText = t;
- h = function(a) {
- function c(c, e) {
- a.call(this);
- this._flags = 3145728;
- this.properties = {};
- this.setBounds(new b(0, 0, c, e));
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "text", {get:function() {
- return this._text;
- }, set:function(a) {
- this._text = a;
- }, enumerable:!0, configurable:!0});
- c.prototype.render = function(a, b, c) {
- a.save();
- a.textBaseline = "top";
- a.fillStyle = "white";
- a.fillText(this.text, 0, 0);
- a.restore();
- };
- return c;
- }(h);
- p.Label = h;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- function u(a, b, h, k, q) {
- b = m[b - 1];
- q && (q = b / 4, h -= q, k -= q);
- q = Math.ceil((1 > h ? 1 : h) / (b - 1E-9));
- b = Math.ceil((1 > k ? 1 : k) / (b - 1E-9));
- a.x -= q;
- a.w += 2 * q;
- a.y -= b;
- a.h += 2 * b;
- }
- var a = k.ColorUtilities.clampByte, w = function() {
- function a() {
- }
- a.prototype.expandBounds = function(a) {
- };
- return a;
- }();
- p.Filter = w;
- var m = [2, 1 / 1.05, 1 / 1.35, 1 / 1.55, 1 / 1.75, 1 / 1.9, .5, 1 / 2.1, 1 / 2.2, 1 / 2.3, .4, 1 / 3, 1 / 3, 1 / 3.5, 1 / 3.5], b = function(a) {
- function b(h, k, q) {
- a.call(this);
- this.blurX = h;
- this.blurY = k;
- this.quality = q;
- }
- __extends(b, a);
- b.prototype.expandBounds = function(a) {
- u(a, this.quality, this.blurX, this.blurY, !0);
- };
- return b;
- }(w);
- p.BlurFilter = b;
- b = function(a) {
- function b(h, k, q, n, v, e, g, d, c, f, r) {
- a.call(this);
- this.alpha = h;
- this.angle = k;
- this.blurX = q;
- this.blurY = n;
- this.color = v;
- this.distance = e;
- this.hideObject = g;
- this.inner = d;
- this.knockout = c;
- this.quality = f;
- this.strength = r;
- }
- __extends(b, a);
- b.prototype.expandBounds = function(a) {
- if (!this.inner && (u(a, this.quality, this.blurX, this.blurY, !1), this.distance)) {
- var b = this.angle * Math.PI / 180, k = Math.cos(b) * this.distance, n = Math.sin(b) * this.distance, b = a.x + (0 <= k ? 0 : Math.floor(k)), k = a.x + a.w + Math.ceil(Math.abs(k)), l = a.y + (0 <= n ? 0 : Math.floor(n)), n = a.y + a.h + Math.ceil(Math.abs(n));
- a.x = b;
- a.w = k - b;
- a.y = l;
- a.h = n - l;
- }
- };
- return b;
- }(w);
- p.DropshadowFilter = b;
- b = function(a) {
- function b(h, k, q, n, v, e, g, d) {
- a.call(this);
- this.alpha = h;
- this.blurX = k;
- this.blurY = q;
- this.color = n;
- this.inner = v;
- this.knockout = e;
- this.quality = g;
- this.strength = d;
- }
- __extends(b, a);
- b.prototype.expandBounds = function(a) {
- this.inner || u(a, this.quality, this.blurX, this.blurY, !1);
- };
- return b;
- }(w);
- p.GlowFilter = b;
- (function(a) {
- a[a.Unknown = 0] = "Unknown";
- a[a.Identity = 1] = "Identity";
- })(p.ColorMatrixType || (p.ColorMatrixType = {}));
- w = function(b) {
- function k(a) {
- b.call(this);
- this._data = new Float32Array(a);
- this._type = 0;
- }
- __extends(k, b);
- k.prototype.clone = function() {
- var a = new k(this._data);
- a._type = this._type;
- return a;
- };
- k.prototype.set = function(a) {
- this._data.set(a._data);
- this._type = a._type;
- };
- k.prototype.toWebGLMatrix = function() {
- return new Float32Array(this._data);
- };
- k.prototype.asWebGLMatrix = function() {
- return this._data.subarray(0, 16);
- };
- k.prototype.asWebGLVector = function() {
- return this._data.subarray(16, 20);
- };
- k.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];
- };
- k.createIdentity = function() {
- var a = new k([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;
- };
- k.prototype.setMultipliersAndOffsets = function(a, b, k, n, l, e, g, d) {
- for (var c = this._data, f = 0;f < c.length;f++) {
- c[f] = 0;
- }
- c[0] = a;
- c[5] = b;
- c[10] = k;
- c[15] = n;
- c[16] = l / 255;
- c[17] = e / 255;
- c[18] = g / 255;
- c[19] = d / 255;
- this._type = 0;
- };
- k.prototype.transformRGBA = function(b) {
- var k = b >> 24 & 255, q = b >> 16 & 255, n = b >> 8 & 255, l = b & 255, e = this._data;
- b = a(k * e[0] + q * e[1] + n * e[2] + l * e[3] + 255 * e[16]);
- var g = a(k * e[4] + q * e[5] + n * e[6] + l * e[7] + 255 * e[17]), d = a(k * e[8] + q * e[9] + n * e[10] + l * e[11] + 255 * e[18]), k = a(k * e[12] + q * e[13] + n * e[14] + l * e[15] + 255 * e[19]);
- return b << 24 | g << 16 | d << 8 | k;
- };
- k.prototype.multiply = function(a) {
- if (!(a._type & 1)) {
- var b = this._data, k = a._data;
- a = b[0];
- var n = b[1], l = b[2], e = b[3], g = b[4], d = b[5], c = b[6], f = b[7], r = b[8], x = b[9], m = b[10], p = b[11], u = b[12], w = b[13], S = b[14], W = b[15], ga = b[16], ha = b[17], ia = b[18], ja = b[19], T = k[0], D = k[1], z = k[2], B = k[3], E = k[4], A = k[5], C = k[6], F = k[7], G = k[8], J = k[9], H = k[10], K = k[11], L = k[12], M = k[13], N = k[14], O = k[15], P = k[16], Q = k[17], R = k[18], k = k[19];
- b[0] = a * T + g * D + r * z + u * B;
- b[1] = n * T + d * D + x * z + w * B;
- b[2] = l * T + c * D + m * z + S * B;
- b[3] = e * T + f * D + p * z + W * B;
- b[4] = a * E + g * A + r * C + u * F;
- b[5] = n * E + d * A + x * C + w * F;
- b[6] = l * E + c * A + m * C + S * F;
- b[7] = e * E + f * A + p * C + W * F;
- b[8] = a * G + g * J + r * H + u * K;
- b[9] = n * G + d * J + x * H + w * K;
- b[10] = l * G + c * J + m * H + S * K;
- b[11] = e * G + f * J + p * H + W * K;
- b[12] = a * L + g * M + r * N + u * O;
- b[13] = n * L + d * M + x * N + w * O;
- b[14] = l * L + c * M + m * N + S * O;
- b[15] = e * L + f * M + p * N + W * O;
- b[16] = a * P + g * Q + r * R + u * k + ga;
- b[17] = n * P + d * Q + x * R + w * k + ha;
- b[18] = l * P + c * Q + m * R + S * k + ia;
- b[19] = e * P + f * Q + p * R + W * k + ja;
- this._type = 0;
- }
- };
- Object.defineProperty(k.prototype, "alphaMultiplier", {get:function() {
- return this._data[15];
- }, enumerable:!0, configurable:!0});
- k.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];
- };
- k.prototype.equals = function(a) {
- if (!a) {
- return !1;
- }
- if (this._type === a._type && 1 === this._type) {
- return !0;
- }
- var b = this._data;
- a = a._data;
- for (var k = 0;20 > k;k++) {
- if (.001 < Math.abs(b[k] - a[k])) {
- return !1;
- }
- }
- return !0;
- };
- k.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 k;
- }(w);
- p.ColorMatrix = w;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- function a(a, b) {
- return -1 !== a.indexOf(b, this.length - b.length);
- }
- var w = p.Geometry.Point3D, m = p.Geometry.Matrix3D, b = p.Geometry.degreesToRadian, l = k.Debug.unexpected, r = k.Debug.notImplemented;
- u.SHADER_ROOT = "shaders/";
- var h = function() {
- function h(a, b) {
- this._fillColor = k.Color.Red;
- this._surfaceRegionCache = new k.LRUList;
- this.modelViewProjectionMatrix = m.createIdentity();
- this._canvas = a;
- this._options = b;
- 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, b.unpackPremultiplyAlpha ? this.gl.ONE : this.gl.ZERO);
- this._backgroundColor = k.Color.Black;
- this._geometry = new u.WebGLGeometry(this);
- this._tmpVertices = u.Vertex.createEmptyVertices(u.Vertex, 64);
- this._maxSurfaces = b.maxSurfaces;
- this._maxSurfaceSize = b.maxSurfaceSize;
- this.gl.blendFunc(this.gl.ONE, this.gl.ONE_MINUS_SRC_ALPHA);
- this.gl.enable(this.gl.BLEND);
- this.modelViewProjectionMatrix = m.create2DProjection(this._w, this._h, 2E3);
- var l = this;
- this._surfaceRegionAllocator = new p.SurfaceRegionAllocator.SimpleAllocator(function() {
- var a = l._createTexture(1024, 1024);
- return new u.WebGLSurface(1024, 1024, a);
- });
- }
- Object.defineProperty(h.prototype, "surfaces", {get:function() {
- return this._surfaceRegionAllocator.surfaces;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "fillStyle", {set:function(a) {
- this._fillColor.set(k.Color.parseColor(a));
- }, enumerable:!0, configurable:!0});
- h.prototype.setBlendMode = function(a) {
- var b = this.gl;
- switch(a) {
- case 8:
- b.blendFunc(b.SRC_ALPHA, b.DST_ALPHA);
- break;
- case 3:
- b.blendFunc(b.DST_COLOR, b.ONE_MINUS_SRC_ALPHA);
- break;
- case 4:
- b.blendFunc(b.SRC_ALPHA, b.ONE);
- break;
- case 2:
- ;
- case 1:
- b.blendFunc(b.ONE, b.ONE_MINUS_SRC_ALPHA);
- break;
- default:
- r("Blend Mode: " + a);
- }
- };
- h.prototype.setBlendOptions = function() {
- this.gl.blendFunc(this._options.sourceBlendFactor, this._options.destinationBlendFactor);
- };
- h.glSupportedBlendMode = function(a) {
- switch(a) {
- case 8:
- ;
- case 3:
- ;
- case 4:
- ;
- case 1:
- return !0;
- default:
- return !1;
- }
- };
- h.prototype.create2DProjectionMatrix = function() {
- return m.create2DProjection(this._w, this._h, -this._w);
- };
- h.prototype.createPerspectiveMatrix = function(a, h, k) {
- k = b(k);
- h = m.createPerspective(b(h), 1, .1, 5E3);
- var e = new w(0, 1, 0), g = new w(0, 0, 0);
- a = new w(0, 0, a);
- a = m.createCameraLookAt(a, g, e);
- a = m.createInverse(a);
- e = m.createIdentity();
- e = m.createMultiply(e, m.createTranslation(-this._w / 2, -this._h / 2, 0));
- e = m.createMultiply(e, m.createScale(1 / this._w, -1 / this._h, .01));
- e = m.createMultiply(e, m.createYRotation(k));
- e = m.createMultiply(e, a);
- return e = m.createMultiply(e, h);
- };
- h.prototype.discardCachedImages = function() {
- 2 <= p.traceLevel && p.writer && p.writer.writeLn("Discard Cache");
- for (var a = this._surfaceRegionCache.count / 2 | 0, b = 0;b < a;b++) {
- var h = this._surfaceRegionCache.pop();
- 2 <= p.traceLevel && p.writer && p.writer.writeLn("Discard: " + h);
- h.texture.atlas.remove(h.region);
- h.texture = null;
- }
- };
- h.prototype.cacheImage = function(a) {
- var b = this.allocateSurfaceRegion(a.width, a.height);
- 2 <= p.traceLevel && p.writer && p.writer.writeLn("Uploading Image: @ " + b.region);
- this._surfaceRegionCache.use(b);
- this.updateSurfaceRegion(a, b);
- return b;
- };
- h.prototype.allocateSurfaceRegion = function(a, b, h) {
- return this._surfaceRegionAllocator.allocate(a, b, null);
- };
- h.prototype.updateSurfaceRegion = function(a, b) {
- var h = this.gl;
- h.bindTexture(h.TEXTURE_2D, b.surface.texture);
- h.texSubImage2D(h.TEXTURE_2D, 0, b.region.x, b.region.y, h.RGBA, h.UNSIGNED_BYTE, a);
- };
- h.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]);
- }
- };
- h.prototype._initializeProgram = function(a) {
- this.gl.useProgram(a);
- };
- h.prototype._createShaderFromFile = function(b) {
- var h = u.SHADER_ROOT + b, k = this.gl;
- b = new XMLHttpRequest;
- b.open("GET", h, !1);
- b.send();
- if (a(h, ".vert")) {
- h = k.VERTEX_SHADER;
- } else {
- if (a(h, ".frag")) {
- h = k.FRAGMENT_SHADER;
- } else {
- throw "Shader Type: not supported.";
- }
- }
- return this._createShader(h, b.responseText);
- };
- h.prototype.createProgramFromFiles = function(a, b) {
- var h = a + "-" + b, e = this._programCache[h];
- e || (e = this._createProgram([this._createShaderFromFile(a), this._createShaderFromFile(b)]), this._queryProgramAttributesAndUniforms(e), this._initializeProgram(e), this._programCache[h] = e);
- return e;
- };
- h.prototype._createProgram = function(a) {
- var b = this.gl, h = b.createProgram();
- a.forEach(function(a) {
- b.attachShader(h, a);
- });
- b.linkProgram(h);
- b.getProgramParameter(h, b.LINK_STATUS) || (a = b.getProgramInfoLog(h), l("Cannot link program: " + a), b.deleteProgram(h));
- return h;
- };
- h.prototype._createShader = function(a, b) {
- var h = this.gl, e = h.createShader(a);
- h.shaderSource(e, b);
- h.compileShader(e);
- if (!h.getShaderParameter(e, h.COMPILE_STATUS)) {
- var g = h.getShaderInfoLog(e);
- l("Cannot compile shader: " + g);
- h.deleteShader(e);
- return null;
- }
- return e;
- };
- h.prototype._createTexture = function(a, b) {
- var h = this.gl, e = h.createTexture();
- h.bindTexture(h.TEXTURE_2D, e);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_S, h.CLAMP_TO_EDGE);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_T, h.CLAMP_TO_EDGE);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MIN_FILTER, h.LINEAR);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MAG_FILTER, h.LINEAR);
- h.texImage2D(h.TEXTURE_2D, 0, h.RGBA, a, b, 0, h.RGBA, h.UNSIGNED_BYTE, null);
- return e;
- };
- h.prototype._createFramebuffer = function(a) {
- var b = this.gl, h = b.createFramebuffer();
- b.bindFramebuffer(b.FRAMEBUFFER, h);
- b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, a, 0);
- b.bindFramebuffer(b.FRAMEBUFFER, null);
- return h;
- };
- h.prototype._queryProgramAttributesAndUniforms = function(a) {
- a.uniforms = {};
- a.attributes = {};
- for (var b = this.gl, h = 0, e = b.getProgramParameter(a, b.ACTIVE_ATTRIBUTES);h < e;h++) {
- var g = b.getActiveAttrib(a, h);
- a.attributes[g.name] = g;
- g.location = b.getAttribLocation(a, g.name);
- }
- h = 0;
- for (e = b.getProgramParameter(a, b.ACTIVE_UNIFORMS);h < e;h++) {
- g = b.getActiveUniform(a, h), a.uniforms[g.name] = g, g.location = b.getUniformLocation(a, g.name);
- }
- };
- Object.defineProperty(h.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));
- }, enumerable:!0, configurable:!0});
- h.prototype.clear = function(a) {
- a = this.gl;
- a.clearColor(0, 0, 0, 0);
- a.clear(a.COLOR_BUFFER_BIT);
- };
- h.prototype.clearTextureRegion = function(a, b) {
- void 0 === b && (b = k.Color.None);
- var h = this.gl, e = a.region;
- this.target = a.surface;
- h.enable(h.SCISSOR_TEST);
- h.scissor(e.x, e.y, e.w, e.h);
- h.clearColor(b.r, b.g, b.b, b.a);
- h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT);
- h.disable(h.SCISSOR_TEST);
- };
- h.prototype.sizeOf = function(a) {
- var b = this.gl;
- switch(a) {
- case b.UNSIGNED_BYTE:
- return 1;
- case b.UNSIGNED_SHORT:
- return 2;
- case this.gl.INT:
- ;
- case this.gl.FLOAT:
- return 4;
- default:
- r(a);
- }
- };
- h.MAX_SURFACES = 8;
- return h;
- }();
- u.WebGLContext = h;
- })(p.WebGL || (p.WebGL = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(k, p) {
- function u() {
- this.constructor = k;
- }
- for (var a in p) {
- p.hasOwnProperty(a) && (k[a] = p[a]);
- }
- u.prototype = p.prototype;
- k.prototype = new u;
-};
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.Debug.assert, w = function(b) {
- function k() {
- b.apply(this, arguments);
- }
- __extends(k, b);
- k.prototype.ensureVertexCapacity = function(b) {
- a(0 === (this._offset & 3));
- this.ensureCapacity(this._offset + 8 * b);
- };
- k.prototype.writeVertex = function(b, h) {
- a(0 === (this._offset & 3));
- this.ensureCapacity(this._offset + 8);
- this.writeVertexUnsafe(b, h);
- };
- k.prototype.writeVertexUnsafe = function(a, b) {
- var k = this._offset >> 2;
- this._f32[k] = a;
- this._f32[k + 1] = b;
- this._offset += 8;
- };
- k.prototype.writeVertex3D = function(b, h, k) {
- a(0 === (this._offset & 3));
- this.ensureCapacity(this._offset + 12);
- this.writeVertex3DUnsafe(b, h, k);
- };
- k.prototype.writeVertex3DUnsafe = function(a, b, k) {
- var l = this._offset >> 2;
- this._f32[l] = a;
- this._f32[l + 1] = b;
- this._f32[l + 2] = k;
- this._offset += 12;
- };
- k.prototype.writeTriangleElements = function(b, h, k) {
- a(0 === (this._offset & 1));
- this.ensureCapacity(this._offset + 6);
- var l = this._offset >> 1;
- this._u16[l] = b;
- this._u16[l + 1] = h;
- this._u16[l + 2] = k;
- this._offset += 6;
- };
- k.prototype.ensureColorCapacity = function(b) {
- a(0 === (this._offset & 2));
- this.ensureCapacity(this._offset + 16 * b);
- };
- k.prototype.writeColorFloats = function(b, h, k, l) {
- a(0 === (this._offset & 2));
- this.ensureCapacity(this._offset + 16);
- this.writeColorFloatsUnsafe(b, h, k, l);
- };
- k.prototype.writeColorFloatsUnsafe = function(a, b, k, l) {
- var n = this._offset >> 2;
- this._f32[n] = a;
- this._f32[n + 1] = b;
- this._f32[n + 2] = k;
- this._f32[n + 3] = l;
- this._offset += 16;
- };
- k.prototype.writeColor = function(b, h, k, l) {
- a(0 === (this._offset & 3));
- this.ensureCapacity(this._offset + 4);
- this._i32[this._offset >> 2] = l << 24 | k << 16 | h << 8 | b;
- this._offset += 4;
- };
- k.prototype.writeColorUnsafe = function(a, b, k, l) {
- this._i32[this._offset >> 2] = l << 24 | k << 16 | b << 8 | a;
- this._offset += 4;
- };
- k.prototype.writeRandomColor = function() {
- this.writeColor(Math.random(), Math.random(), Math.random(), Math.random() / 2);
- };
- return k;
- }(k.ArrayUtilities.ArrayWriter);
- u.BufferWriter = w;
- var m = function() {
- return function(a, k, r, h) {
- void 0 === h && (h = !1);
- this.name = a;
- this.size = k;
- this.type = r;
- this.normalized = h;
- };
- }();
- u.WebGLAttribute = m;
- m = function() {
- function a(b) {
- this.size = 0;
- this.attributes = b;
- }
- a.prototype.initialize = function(a) {
- for (var b = 0, h = 0;h < this.attributes.length;h++) {
- this.attributes[h].offset = b, b += a.sizeOf(this.attributes[h].type) * this.attributes[h].size;
- }
- this.size = b;
- };
- return a;
- }();
- u.WebGLAttributeList = m;
- m = function() {
- function a(b) {
- this._elementOffset = this.triangleCount = 0;
- this.context = b;
- this.array = new w(8);
- this.buffer = b.gl.createBuffer();
- this.elementArray = new w(8);
- this.elementBuffer = b.gl.createBuffer();
- }
- Object.defineProperty(a.prototype, "elementOffset", {get:function() {
- return this._elementOffset;
- }, enumerable:!0, configurable:!0});
- 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;
- };
- a.prototype.resetElementOffset = function() {
- this._elementOffset = 0;
- };
- a.prototype.reset = function() {
- this.array.reset();
- this.elementArray.reset();
- this.resetElementOffset();
- this.triangleCount = 0;
- };
- 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 a;
- }();
- u.WebGLGeometry = m;
- m = function(a) {
- function k(l, h, t) {
- a.call(this, l, h, t);
- }
- __extends(k, a);
- k.createEmptyVertices = function(a, b) {
- for (var k = [], l = 0;l < b;l++) {
- k.push(new a(0, 0, 0));
- }
- return k;
- };
- return k;
- }(p.Geometry.Point3D);
- u.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";
- })(u.WebGLBlendFactor || (u.WebGLBlendFactor = {}));
- })(p.WebGL || (p.WebGL = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(u) {
- var a = function() {
- function a(b, l, r) {
- this.texture = r;
- this.w = b;
- this.h = l;
- this._regionAllocator = new k.RegionAllocator.CompactAllocator(this.w, this.h);
- }
- a.prototype.allocate = function(a, k) {
- var r = this._regionAllocator.allocate(a, k);
- return r ? new w(this, r) : null;
- };
- a.prototype.free = function(a) {
- this._regionAllocator.free(a.region);
- };
- return a;
- }();
- u.WebGLSurface = a;
- var w = function() {
- return function(a, b) {
- this.surface = a;
- this.region = b;
- this.next = this.previous = null;
- };
- }();
- u.WebGLSurfaceRegion = w;
- })(k.WebGL || (k.WebGL = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.Color;
- u.TILE_SIZE = 256;
- u.MIN_UNTILED_SIZE = 256;
- var w = p.Geometry.Matrix, m = p.Geometry.Rectangle, b = function(a) {
- function b() {
- a.apply(this, arguments);
- this.maxSurfaces = 8;
- this.maxSurfaceSize = 4096;
- this.animateZoom = !0;
- this.disableSurfaceUploads = !1;
- this.frameSpacing = 1E-4;
- this.drawSurfaces = this.ignoreColorMatrix = !1;
- this.drawSurface = -1;
- this.premultipliedAlpha = !1;
- this.unpackPremultiplyAlpha = !0;
- this.showTemporaryCanvases = !1;
- this.sourceBlendFactor = 1;
- this.destinationBlendFactor = 771;
- }
- __extends(b, a);
- return b;
- }(p.RendererOptions);
- u.WebGLRendererOptions = b;
- var l = function(k) {
- function h(a, h, n) {
- void 0 === n && (n = new b);
- k.call(this, a, h, n);
- this._tmpVertices = u.Vertex.createEmptyVertices(u.Vertex, 64);
- this._cachedTiles = [];
- a = this._context = new u.WebGLContext(this._canvas, n);
- this._updateSize();
- this._brush = new u.WebGLCombinedBrush(a, new u.WebGLGeometry(a));
- this._stencilBrush = new u.WebGLCombinedBrush(a, new u.WebGLGeometry(a));
- this._scratchCanvas = document.createElement("canvas");
- this._scratchCanvas.width = this._scratchCanvas.height = 2048;
- this._scratchCanvasContext = this._scratchCanvas.getContext("2d", {willReadFrequently:!0});
- this._dynamicScratchCanvas = document.createElement("canvas");
- this._dynamicScratchCanvas.width = this._dynamicScratchCanvas.height = 0;
- this._dynamicScratchCanvasContext = this._dynamicScratchCanvas.getContext("2d", {willReadFrequently:!0});
- this._uploadCanvas = document.createElement("canvas");
- this._uploadCanvas.width = this._uploadCanvas.height = 0;
- this._uploadCanvasContext = this._uploadCanvas.getContext("2d", {willReadFrequently:!0});
- n.showTemporaryCanvases && (document.getElementById("temporaryCanvasPanelContainer").appendChild(this._uploadCanvas), document.getElementById("temporaryCanvasPanelContainer").appendChild(this._scratchCanvas));
- this._clipStack = [];
- }
- __extends(h, k);
- h.prototype.resize = function() {
- this._updateSize();
- this.render();
- };
- h.prototype._updateSize = function() {
- this._viewport = new m(0, 0, this._canvas.width, this._canvas.height);
- this._context._resize();
- };
- h.prototype._cacheImageCallback = function(a, b, h) {
- var k = h.w, e = h.h, g = h.x;
- h = h.y;
- this._uploadCanvas.width = k + 2;
- this._uploadCanvas.height = e + 2;
- this._uploadCanvasContext.drawImage(b.canvas, g, h, k, e, 1, 1, k, e);
- this._uploadCanvasContext.drawImage(b.canvas, g, h, k, 1, 1, 0, k, 1);
- this._uploadCanvasContext.drawImage(b.canvas, g, h + e - 1, k, 1, 1, e + 1, k, 1);
- this._uploadCanvasContext.drawImage(b.canvas, g, h, 1, e, 0, 1, 1, e);
- this._uploadCanvasContext.drawImage(b.canvas, g + k - 1, h, 1, e, k + 1, 1, 1, e);
- return a && a.surface ? (this._options.disableSurfaceUploads || this._context.updateSurfaceRegion(this._uploadCanvas, a), a) : this._context.cacheImage(this._uploadCanvas);
- };
- h.prototype._enterClip = function(a, b, h, k) {
- h.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));
- this._clipStack.push(a);
- b.colorMask(!1, !1, !1, !1);
- b.stencilOp(b.KEEP, b.KEEP, b.INCR);
- h.flush();
- b.colorMask(!0, !0, !0, !0);
- b.stencilFunc(b.NOTEQUAL, 0, this._clipStack.length);
- b.stencilOp(b.KEEP, b.KEEP, b.KEEP);
- };
- h.prototype._leaveClip = function(a, b, h, k) {
- h.flush();
- b = this._context.gl;
- if (a = this._clipStack.pop()) {
- b.colorMask(!1, !1, !1, !1), b.stencilOp(b.KEEP, b.KEEP, b.DECR), h.flush(), b.colorMask(!0, !0, !0, !0), b.stencilFunc(b.NOTEQUAL, 0, this._clipStack.length), b.stencilOp(b.KEEP, b.KEEP, b.KEEP);
- }
- 0 === this._clipStack.length && b.disable(b.STENCIL_TEST);
- };
- h.prototype._renderFrame = function(a, b, h, k, e) {
- };
- h.prototype._renderSurfaces = function(b) {
- var h = this._options, k = this._context, l = this._viewport;
- if (h.drawSurfaces) {
- var e = k.surfaces, k = w.createIdentity();
- if (0 <= h.drawSurface && h.drawSurface < e.length) {
- for (var h = e[h.drawSurface | 0], e = new m(0, 0, h.w, h.h), g = e.clone();g.w > l.w;) {
- g.scale(.5, .5);
- }
- b.drawImage(new u.WebGLSurfaceRegion(h, e), g, a.White, null, k, .2);
- } else {
- g = l.w / 5;
- g > l.h / e.length && (g = l.h / e.length);
- b.fillRectangle(new m(l.w - g, 0, g, l.h), new a(0, 0, 0, .5), k, .1);
- for (var d = 0;d < e.length;d++) {
- var h = e[d], c = new m(l.w - g, d * g, g, g);
- b.drawImage(new u.WebGLSurfaceRegion(h, new m(0, 0, h.w, h.h)), c, a.White, null, k, .2);
- }
- }
- b.flush();
- }
- };
- h.prototype.render = function() {
- var b = this._options, h = this._context.gl;
- this._context.modelViewProjectionMatrix = b.perspectiveCamera ? this._context.createPerspectiveMatrix(b.perspectiveCameraDistance + (b.animateZoom ? .8 * Math.sin(Date.now() / 3E3) : 0), b.perspectiveCameraFOV, b.perspectiveCameraAngle) : this._context.create2DProjectionMatrix();
- var k = this._brush;
- h.clearColor(0, 0, 0, 0);
- h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT);
- k.reset();
- h = this._viewport;
- k.flush();
- b.paintViewport && (k.fillRectangle(h, new a(.5, 0, 0, .25), w.createIdentity(), 0), k.flush());
- this._renderSurfaces(k);
- };
- return h;
- }(p.Renderer);
- u.WebGLRenderer = l;
- })(p.WebGL || (p.WebGL = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.Color, w = p.Geometry.Point, m = p.Geometry.Matrix3D, b = function() {
- function a(b, k, l) {
- this._target = l;
- this._context = b;
- this._geometry = k;
- }
- a.prototype.reset = function() {
- };
- a.prototype.flush = function() {
- };
- Object.defineProperty(a.prototype, "target", {get:function() {
- return this._target;
- }, set:function(a) {
- this._target !== a && this.flush();
- this._target = a;
- }, enumerable:!0, configurable:!0});
- return a;
- }();
- u.WebGLBrush = b;
- (function(a) {
- a[a.FillColor = 0] = "FillColor";
- a[a.FillTexture = 1] = "FillTexture";
- a[a.FillTextureWithColorMatrix = 2] = "FillTextureWithColorMatrix";
- })(u.WebGLCombinedBrushKind || (u.WebGLCombinedBrushKind = {}));
- var l = function(b) {
- function h(h, k, l) {
- b.call(this, h, k, l);
- this.kind = 0;
- this.color = new a(0, 0, 0, 0);
- this.sampler = 0;
- this.coordinate = new w(0, 0);
- }
- __extends(h, b);
- h.initializeAttributeList = function(a) {
- var b = a.gl;
- h.attributeList || (h.attributeList = new u.WebGLAttributeList([new u.WebGLAttribute("aPosition", 3, b.FLOAT), new u.WebGLAttribute("aCoordinate", 2, b.FLOAT), new u.WebGLAttribute("aColor", 4, b.UNSIGNED_BYTE, !0), new u.WebGLAttribute("aKind", 1, b.FLOAT), new u.WebGLAttribute("aSampler", 1, b.FLOAT)]), h.attributeList.initialize(a));
- };
- h.prototype.writeTo = function(a) {
- a = a.array;
- a.ensureAdditionalCapacity(68);
- a.writeVertex3DUnsafe(this.x, this.y, this.z);
- a.writeVertexUnsafe(this.coordinate.x, this.coordinate.y);
- a.writeColorUnsafe(255 * this.color.r, 255 * this.color.g, 255 * this.color.b, 255 * this.color.a);
- a.writeFloatUnsafe(this.kind);
- a.writeFloatUnsafe(this.sampler);
- };
- return h;
- }(u.Vertex);
- u.WebGLCombinedBrushVertex = l;
- b = function(a) {
- function b(h, k, n) {
- void 0 === n && (n = null);
- a.call(this, h, k, n);
- this._blendMode = 1;
- this._program = h.createProgramFromFiles("combined.vert", "combined.frag");
- this._surfaces = [];
- l.initializeAttributeList(this._context);
- }
- __extends(b, a);
- b.prototype.reset = function() {
- this._surfaces = [];
- this._geometry.reset();
- };
- b.prototype.drawImage = function(a, k, l, m, e, g, d) {
- void 0 === g && (g = 0);
- void 0 === d && (d = 1);
- if (!a || !a.surface) {
- return !0;
- }
- k = k.clone();
- this._colorMatrix && (m && this._colorMatrix.equals(m) || this.flush());
- this._colorMatrix = m;
- this._blendMode !== d && (this.flush(), this._blendMode = d);
- d = this._surfaces.indexOf(a.surface);
- 0 > d && (8 === this._surfaces.length && this.flush(), this._surfaces.push(a.surface), d = this._surfaces.length - 1);
- var c = b._tmpVertices, f = a.region.clone();
- f.offset(1, 1).resize(-2, -2);
- f.scale(1 / a.surface.w, 1 / a.surface.h);
- e.transformRectangle(k, c);
- for (a = 0;4 > a;a++) {
- c[a].z = g;
- }
- c[0].coordinate.x = f.x;
- c[0].coordinate.y = f.y;
- c[1].coordinate.x = f.x + f.w;
- c[1].coordinate.y = f.y;
- c[2].coordinate.x = f.x + f.w;
- c[2].coordinate.y = f.y + f.h;
- c[3].coordinate.x = f.x;
- c[3].coordinate.y = f.y + f.h;
- for (a = 0;4 > a;a++) {
- g = b._tmpVertices[a], g.kind = m ? 2 : 1, g.color.set(l), g.sampler = d, g.writeTo(this._geometry);
- }
- this._geometry.addQuad();
- return !0;
- };
- b.prototype.fillRectangle = function(a, k, l, m) {
- void 0 === m && (m = 0);
- l.transformRectangle(a, b._tmpVertices);
- for (a = 0;4 > a;a++) {
- l = b._tmpVertices[a], l.kind = 0, l.color.set(k), l.z = m, l.writeTo(this._geometry);
- }
- this._geometry.addQuad();
- };
- b.prototype.flush = function() {
- var a = this._geometry, b = this._program, h = this._context.gl, k;
- a.uploadBuffers();
- h.useProgram(b);
- 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;
- h.uniformMatrix4fv(b.uniforms.uTransformMatrix3D.location, !1, k.asWebGLMatrix());
- this._colorMatrix && (h.uniformMatrix4fv(b.uniforms.uColorMatrix.location, !1, this._colorMatrix.asWebGLMatrix()), h.uniform4fv(b.uniforms.uColorVector.location, this._colorMatrix.asWebGLVector()));
- for (k = 0;k < this._surfaces.length;k++) {
- h.activeTexture(h.TEXTURE0 + k), h.bindTexture(h.TEXTURE_2D, this._surfaces[k].texture);
- }
- h.uniform1iv(b.uniforms["uSampler[0]"].location, [0, 1, 2, 3, 4, 5, 6, 7]);
- h.bindBuffer(h.ARRAY_BUFFER, a.buffer);
- var e = l.attributeList.size, g = l.attributeList.attributes;
- for (k = 0;k < g.length;k++) {
- var d = g[k], c = b.attributes[d.name].location;
- h.enableVertexAttribArray(c);
- h.vertexAttribPointer(c, d.size, d.type, d.normalized, e, d.offset);
- }
- this._context.setBlendOptions();
- this._context.target = this._target;
- h.bindBuffer(h.ELEMENT_ARRAY_BUFFER, a.elementBuffer);
- h.drawElements(h.TRIANGLES, 3 * a.triangleCount, h.UNSIGNED_SHORT, 0);
- this.reset();
- };
- b._tmpVertices = u.Vertex.createEmptyVertices(l, 4);
- b._depth = 1;
- return b;
- }(b);
- u.WebGLCombinedBrush = b;
- })(p.WebGL || (p.WebGL = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(k) {
- (function(k) {
- var a = CanvasRenderingContext2D.prototype.save, p = CanvasRenderingContext2D.prototype.clip, m = CanvasRenderingContext2D.prototype.fill, b = CanvasRenderingContext2D.prototype.stroke, l = CanvasRenderingContext2D.prototype.restore, r = CanvasRenderingContext2D.prototype.beginPath;
- k.notifyReleaseChanged = function() {
- CanvasRenderingContext2D.prototype.save = a;
- CanvasRenderingContext2D.prototype.clip = p;
- CanvasRenderingContext2D.prototype.fill = m;
- CanvasRenderingContext2D.prototype.stroke = b;
- CanvasRenderingContext2D.prototype.restore = l;
- CanvasRenderingContext2D.prototype.beginPath = r;
- };
- CanvasRenderingContext2D.prototype.enterBuildingClippingRegion = function() {
- this.buildingClippingRegionDepth || (this.buildingClippingRegionDepth = 0);
- this.buildingClippingRegionDepth++;
- };
- CanvasRenderingContext2D.prototype.leaveBuildingClippingRegion = function() {
- this.buildingClippingRegionDepth--;
- };
- })(k.Canvas2D || (k.Canvas2D = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- function a(a, b) {
- var k = a / 2;
- switch(b) {
- case 0:
- return 0;
- case 1:
- return k / 2.7;
- case 2:
- return k / 1.28;
- default:
- return k;
- }
- }
- function w(a) {
- var b = "source-over";
- switch(a) {
- case 1:
- ;
- case 2:
- break;
- case 3:
- b = "multiply";
- break;
- case 8:
- ;
- case 4:
- b = "screen";
- break;
- case 5:
- b = "lighten";
- break;
- case 6:
- b = "darken";
- break;
- case 7:
- b = "difference";
- break;
- case 13:
- b = "overlay";
- break;
- case 14:
- b = "hard-light";
- break;
- case 11:
- b = "destination-in";
- break;
- case 12:
- b = "destination-out";
- break;
- default:
- k.Debug.somewhatImplemented("Blend Mode: " + p.BlendMode[a]);
- }
- return b;
- }
- var m = k.NumberUtilities.clamp;
- navigator.userAgent.indexOf("Firefox");
- var b = function() {
- function b() {
- }
- b._prepareSVGFilters = function() {
- if (!b._svgBlurFilter) {
- var a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
- a.setAttribute("style", "display:block;width:0px;height:0px");
- var k = document.createElementNS("http://www.w3.org/2000/svg", "defs"), l = document.createElementNS("http://www.w3.org/2000/svg", "filter");
- l.setAttribute("id", "svgBlurFilter");
- var m = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur");
- m.setAttribute("stdDeviation", "0 0");
- l.appendChild(m);
- k.appendChild(l);
- b._svgBlurFilter = m;
- l = document.createElementNS("http://www.w3.org/2000/svg", "filter");
- l.setAttribute("id", "svgDropShadowFilter");
- m = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur");
- m.setAttribute("in", "SourceAlpha");
- m.setAttribute("stdDeviation", "3");
- l.appendChild(m);
- b._svgDropshadowFilterBlur = m;
- m = document.createElementNS("http://www.w3.org/2000/svg", "feOffset");
- m.setAttribute("dx", "0");
- m.setAttribute("dy", "0");
- m.setAttribute("result", "offsetblur");
- l.appendChild(m);
- b._svgDropshadowFilterOffset = m;
- m = document.createElementNS("http://www.w3.org/2000/svg", "feFlood");
- m.setAttribute("flood-color", "rgba(0,0,0,1)");
- l.appendChild(m);
- b._svgDropshadowFilterFlood = m;
- m = document.createElementNS("http://www.w3.org/2000/svg", "feComposite");
- m.setAttribute("in2", "offsetblur");
- m.setAttribute("operator", "in");
- l.appendChild(m);
- var m = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"), e = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode");
- m.appendChild(e);
- e = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode");
- e.setAttribute("in", "SourceGraphic");
- m.appendChild(e);
- l.appendChild(m);
- k.appendChild(l);
- l = document.createElementNS("http://www.w3.org/2000/svg", "filter");
- l.setAttribute("id", "svgColorMatrixFilter");
- m = document.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix");
- m.setAttribute("color-interpolation-filters", "sRGB");
- m.setAttribute("in", "SourceGraphic");
- m.setAttribute("type", "matrix");
- l.appendChild(m);
- k.appendChild(l);
- b._svgColorMatrixFilter = m;
- a.appendChild(k);
- document.documentElement.appendChild(a);
- }
- };
- b._applyFilter = function(l, q, n) {
- if (b._svgFiltersAreSupported) {
- if (b._prepareSVGFilters(), b._removeFilter(q), n instanceof p.BlurFilter) {
- var m = a(l, n.quality);
- b._svgBlurFilter.setAttribute("stdDeviation", n.blurX * m + " " + n.blurY * m);
- q.filter = "url(#svgBlurFilter)";
- } else {
- n instanceof p.DropshadowFilter ? (m = a(l, n.quality), b._svgDropshadowFilterBlur.setAttribute("stdDeviation", n.blurX * m + " " + n.blurY * m), b._svgDropshadowFilterOffset.setAttribute("dx", String(Math.cos(n.angle * Math.PI / 180) * n.distance * l)), b._svgDropshadowFilterOffset.setAttribute("dy", String(Math.sin(n.angle * Math.PI / 180) * n.distance * l)), b._svgDropshadowFilterFlood.setAttribute("flood-color", k.ColorUtilities.rgbaToCSSStyle(n.color << 8 | Math.round(255 * n.alpha))),
- q.filter = "url(#svgDropShadowFilter)") : n instanceof p.ColorMatrix && (b._svgColorMatrixFilter.setAttribute("values", n.toSVGFilterMatrix()), q.filter = "url(#svgColorMatrixFilter)");
- }
- }
- };
- b._removeFilter = function(a) {
- a.filter = "none";
- };
- b._applyColorMatrix = function(a, b) {
- b.isIdentity() ? (a.globalAlpha = 1, a.globalColorMatrix = null) : b.hasOnlyAlphaMultiplier() ? (a.globalAlpha = m(b.alphaMultiplier, 0, 1), a.globalColorMatrix = null) : (a.globalAlpha = 1, a.globalColorMatrix = b);
- };
- b._svgFiltersAreSupported = !!Object.getOwnPropertyDescriptor(CanvasRenderingContext2D.prototype, "filter");
- return b;
- }();
- u.Filters = b;
- p.filters && b._svgFiltersAreSupported && ("registerScratchCanvas" in window || (window.registerScratchCanvas = function(a) {
- a.style.display = "none";
- document.body.appendChild(a);
- }));
- var l = function() {
- function a(b, h, k, l) {
- this.surface = b;
- this.region = h;
- this.w = k;
- this.h = l;
- }
- a.prototype.free = function() {
- this.surface.free(this);
- };
- a._ensureCopyCanvasSize = function(b, l) {
- var n;
- if (a._copyCanvasContext) {
- if (n = a._copyCanvasContext.canvas, n.width < b || n.height < l) {
- n.width = k.IntegerUtilities.nearestPowerOfTwo(b), n.height = k.IntegerUtilities.nearestPowerOfTwo(l);
- }
- } else {
- n = document.createElement("canvas"), "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(n), n.width = k.IntegerUtilities.nearestPowerOfTwo(b), n.height = k.IntegerUtilities.nearestPowerOfTwo(l), a._copyCanvasContext = n.getContext("2d");
- }
- };
- a.prototype.draw = function(k, l, n, m, e, g, d, c, f) {
- this.context.setTransform(1, 0, 0, 1, 0, 0);
- var r, x = 0, p = 0;
- k.context.canvas === this.context.canvas ? (a._ensureCopyCanvasSize(m, e), r = a._copyCanvasContext, r.clearRect(0, 0, m, e), r.drawImage(k.surface.canvas, k.region.x, k.region.y, m, e, 0, 0, m, e), g = r, p = x = 0) : (g = k.surface.context, x = k.region.x, p = k.region.y);
- a: {
- switch(d) {
- case 11:
- k = !0;
- break a;
- default:
- k = !1;
- }
- }
- k && (this.context.save(), this.context.beginPath(), this.context.rect(l, n, m, e), this.context.clip());
- this.context.globalAlpha = 1;
- this.context.globalCompositeOperation = w(d);
- if (c) {
- d = 0;
- if (1 < c.length) {
- var u, V, U, S;
- r ? (U = r, r = g, g = U) : (a._ensureCopyCanvasSize(m, e), r = a._copyCanvasContext, V = u = 0);
- for (;d < c.length - 1;d++) {
- r.clearRect(0, 0, m, e), b._applyFilter(f, r, c[d]), r.drawImage(g.canvas, x, p, m, e, u, V, m, e), b._removeFilter(r), U = r, V = x, S = p, r = g, g = U, p = x = u, u = V, V = S;
- }
- b._removeFilter(g);
- b._removeFilter(r);
- }
- b._applyFilter(f, this.context, c[d]);
- }
- this.context.drawImage(g.canvas, x, p, m, e, l, n, m, e);
- this.context.globalCompositeOperation = w(1);
- b._removeFilter(this.context);
- k && this.context.restore();
- };
- Object.defineProperty(a.prototype, "context", {get:function() {
- return this.surface.context;
- }, enumerable:!0, configurable:!0});
- a.prototype.resetTransform = function() {
- this.surface.context.setTransform(1, 0, 0, 1, 0, 0);
- };
- a.prototype.reset = function() {
- var a = this.surface.context;
- a.setTransform(1, 0, 0, 1, 0, 0);
- a.fillStyle = "#000000";
- a.strokeStyle = "#000000";
- a.globalAlpha = 1;
- a.globalColorMatrix = null;
- a.globalCompositeOperation = w(1);
- };
- a.prototype.fill = function(a) {
- var b = this.surface.context, h = this.region;
- b.fillStyle = a;
- b.fillRect(h.x, h.y, h.w, h.h);
- };
- a.prototype.clear = function(a) {
- var b = this.surface.context, h = this.region;
- a || (a = h);
- b.clearRect(a.x, a.y, a.w, a.h);
- };
- return a;
- }();
- u.Canvas2DSurfaceRegion = l;
- var r = function() {
- function a(b, h) {
- this.canvas = b;
- this.context = b.getContext("2d");
- this.w = b.width;
- this.h = b.height;
- this._regionAllocator = h;
- }
- a.prototype.allocate = function(a, b) {
- var h = this._regionAllocator.allocate(a, b);
- return h ? new l(this, h, a, b) : null;
- };
- a.prototype.free = function(a) {
- this._regionAllocator.free(a.region);
- };
- return a;
- }();
- u.Canvas2DSurface = r;
- })(p.Canvas2D || (p.Canvas2D = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.Debug.assert, w = k.GFX.Geometry.Rectangle, m = k.GFX.Geometry.Point, b = k.GFX.Geometry.Matrix, l = k.NumberUtilities.clamp, r = k.NumberUtilities.pow2, h = function() {
- return function(a, b) {
- this.surfaceRegion = a;
- this.scale = b;
- };
- }();
- u.MipMapLevel = h;
- var t = function() {
- function a(b, c, f, e) {
- this._node = c;
- this._levels = [];
- this._surfaceRegionAllocator = f;
- this._size = e;
- this._renderer = b;
- }
- a.prototype.getLevel = function(a) {
- a = Math.max(a.getAbsoluteScaleX(), a.getAbsoluteScaleY());
- var b = 0;
- 1 !== a && (b = l(Math.round(Math.log(a) / Math.LN2), -5, 3));
- this._node.hasFlags(2097152) || (b = l(b, -5, 0));
- a = r(b);
- var f = 5 + b, b = this._levels[f];
- if (!b) {
- var e = this._node.getBounds().clone();
- e.scale(a, a);
- e.snap();
- var g = this._surfaceRegionAllocator.allocate(e.w, e.h, null), k = g.region, b = this._levels[f] = new h(g, a), f = new n(g);
- f.clip.set(k);
- f.matrix.setElements(a, 0, 0, a, k.x - e.x, k.y - e.y);
- f.flags |= 64;
- this._renderer.renderNodeWithState(this._node, f);
- f.free();
- }
- return b;
- };
- return a;
- }();
- u.MipMap = t;
- (function(a) {
- a[a.NonZero = 0] = "NonZero";
- a[a.EvenOdd = 1] = "EvenOdd";
- })(u.FillRule || (u.FillRule = {}));
- var q = function(a) {
- function b() {
- a.apply(this, arguments);
- this.blending = this.imageSmoothing = this.snapToDevicePixels = !0;
- this.debugLayers = !1;
- this.filters = this.masking = !0;
- this.cacheShapes = !1;
- this.cacheShapesMaxSize = 256;
- this.cacheShapesThreshold = 16;
- this.alpha = !1;
- }
- __extends(b, a);
- return b;
- }(p.RendererOptions);
- u.Canvas2DRendererOptions = q;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.IgnoreNextLayer = 1] = "IgnoreNextLayer";
- a[a.RenderMask = 2] = "RenderMask";
- a[a.IgnoreMask = 4] = "IgnoreMask";
- a[a.PaintStencil = 8] = "PaintStencil";
- a[a.PaintClip = 16] = "PaintClip";
- a[a.IgnoreRenderable = 32] = "IgnoreRenderable";
- a[a.IgnoreNextRenderWithCache = 64] = "IgnoreNextRenderWithCache";
- a[a.CacheShapes = 256] = "CacheShapes";
- a[a.PaintFlashing = 512] = "PaintFlashing";
- a[a.PaintBounds = 1024] = "PaintBounds";
- a[a.PaintDirtyRegion = 2048] = "PaintDirtyRegion";
- a[a.ImageSmoothing = 4096] = "ImageSmoothing";
- a[a.PixelSnapping = 8192] = "PixelSnapping";
- })(u.RenderFlags || (u.RenderFlags = {}));
- w.createMaxI16();
- var n = function(a) {
- function d(c) {
- a.call(this);
- this.clip = w.createEmpty();
- this.clipList = [];
- this.clipPath = null;
- this.flags = 0;
- this.target = null;
- this.matrix = b.createIdentity();
- this.colorMatrix = p.ColorMatrix.createIdentity();
- d.allocationCount++;
- this.target = c;
- }
- __extends(d, a);
- d.prototype.set = function(a) {
- this.clip.set(a.clip);
- this.clipPath = a.clipPath;
- this.target = a.target;
- this.matrix.set(a.matrix);
- this.colorMatrix.set(a.colorMatrix);
- this.flags = a.flags;
- k.ArrayUtilities.copyFrom(this.clipList, a.clipList);
- };
- d.prototype.clone = function() {
- var a = d.allocate();
- a || (a = new d(this.target));
- a.set(this);
- return a;
- };
- d.allocate = function() {
- var a = d._dirtyStack, b = null;
- a.length && (b = a.pop());
- return b;
- };
- d.prototype.free = function() {
- this.clipPath = null;
- d._dirtyStack.push(this);
- };
- d.prototype.transform = function(a) {
- var b = this.clone();
- b.matrix.preMultiply(a.getMatrix());
- a.hasColorMatrix() && b.colorMatrix.multiply(a.getColorMatrix());
- return b;
- };
- d.prototype.hasFlags = function(a) {
- return (this.flags & a) === a;
- };
- d.prototype.removeFlags = function(a) {
- this.flags &= ~a;
- };
- d.prototype.toggleFlags = function(a, b) {
- this.flags = b ? this.flags | a : this.flags & ~a;
- };
- d.prototype.beginClipPath = function(a) {
- this.target.context.save();
- this.clipPath = new Path2D;
- };
- d.prototype.applyClipPath = function() {
- var a = this.target.context;
- a.setTransform(1, 0, 0, 1, 0, 0);
- a.clip(this.clipPath);
- var b = this.matrix;
- a.setTransform(b.a, b.b, b.c, b.d, b.tx, b.ty);
- };
- d.prototype.closeClipPath = function() {
- this.target.context.restore();
- };
- d.allocationCount = 0;
- d._dirtyStack = [];
- return d;
- }(p.State);
- u.RenderState = n;
- var v = function() {
- function a() {
- this.culledNodes = this.groups = this.shapes = this._count = 0;
- }
- a.prototype.enter = function(a) {
- this._count++;
- };
- a.prototype.leave = function() {
- };
- return a;
- }();
- u.FrameInfo = v;
- var e = function(e) {
- function d(a, b, h) {
- void 0 === h && (h = new q);
- e.call(this, a, b, h);
- this._visited = 0;
- this._frameInfo = new v;
- this._fontSize = 0;
- this._layers = [];
- if (a instanceof HTMLCanvasElement) {
- var k = a;
- this._viewport = new w(0, 0, k.width, k.height);
- this._target = this._createTarget(k);
- } else {
- this._addLayer("Background Layer");
- h = this._addLayer("Canvas Layer");
- k = document.createElement("canvas");
- h.appendChild(k);
- this._viewport = new w(0, 0, a.scrollWidth, a.scrollHeight);
- var l = this;
- b.addEventListener(1, function() {
- l._onStageBoundsChanged(k);
- });
- this._onStageBoundsChanged(k);
- }
- d._prepareSurfaceAllocators();
- }
- __extends(d, e);
- d.prototype._addLayer = function(a) {
- a = document.createElement("div");
- a.style.position = "absolute";
- a.style.overflow = "hidden";
- a.style.width = "100%";
- a.style.height = "100%";
- a.style.zIndex = this._layers.length + "";
- this._container.appendChild(a);
- this._layers.push(a);
- return a;
- };
- Object.defineProperty(d.prototype, "_backgroundVideoLayer", {get:function() {
- return this._layers[0];
- }, enumerable:!0, configurable:!0});
- d.prototype._createTarget = function(a) {
- return new u.Canvas2DSurfaceRegion(new u.Canvas2DSurface(a), new p.RegionAllocator.Region(0, 0, a.width, a.height), a.width, a.height);
- };
- d.prototype._onStageBoundsChanged = function(a) {
- var b = this._stage.getBounds(!0);
- b.snap();
- for (var d = this._devicePixelRatio = window.devicePixelRatio || 1, e = b.w / d + "px", d = b.h / d + "px", g = 0;g < this._layers.length;g++) {
- var h = this._layers[g];
- h.style.width = e;
- h.style.height = d;
- }
- a.width = b.w;
- a.height = b.h;
- a.style.position = "absolute";
- a.style.width = e;
- a.style.height = d;
- this._target = this._createTarget(a);
- this._fontSize = 10 * this._devicePixelRatio;
- };
- d._prepareSurfaceAllocators = function() {
- d._initializedCaches || (d._surfaceCache = new p.SurfaceRegionAllocator.SimpleAllocator(function(a, b) {
- var d = document.createElement("canvas");
- "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(d);
- var e = Math.max(1024, a), g = Math.max(1024, b);
- d.width = e;
- d.height = g;
- var h = null, h = 512 <= a || 512 <= b ? new p.RegionAllocator.GridAllocator(e, g, e, g) : new p.RegionAllocator.BucketAllocator(e, g);
- return new u.Canvas2DSurface(d, h);
- }), d._shapeCache = new p.SurfaceRegionAllocator.SimpleAllocator(function(a, b) {
- var d = document.createElement("canvas");
- "undefined" !== typeof registerScratchCanvas && registerScratchCanvas(d);
- d.width = 1024;
- d.height = 1024;
- var e = e = new p.RegionAllocator.CompactAllocator(1024, 1024);
- return new u.Canvas2DSurface(d, e);
- }), d._initializedCaches = !0);
- };
- d.prototype.render = function() {
- var a = this._stage, b = this._target, d = this._options, e = this._viewport;
- b.reset();
- b.context.save();
- b.context.beginPath();
- b.context.rect(e.x, e.y, e.w, e.h);
- b.context.clip();
- this._renderStageToTarget(b, a, e);
- b.reset();
- d.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());
- b.context.restore();
- };
- d.prototype.renderNode = function(a, b, d) {
- var e = new n(this._target);
- e.clip.set(b);
- e.flags = 256;
- e.matrix.set(d);
- a.visit(this, e);
- e.free();
- };
- d.prototype.renderNodeWithState = function(a, b) {
- a.visit(this, b);
- };
- d.prototype._renderWithCache = function(a, b) {
- var e = b.matrix, g = a.getBounds();
- if (g.isEmpty()) {
- return !1;
- }
- var h = this._options.cacheShapesMaxSize, k = Math.max(e.getAbsoluteScaleX(), e.getAbsoluteScaleY()), l = !!(b.flags & 16), n = !!(b.flags & 8);
- if (b.hasFlags(256)) {
- if (n || l || !b.colorMatrix.isIdentity() || a.hasFlags(1048576) || 100 < this._options.cacheShapesThreshold || g.w * k > h || g.h * k > h) {
- return !1;
- }
- (k = a.properties.mipMap) || (k = a.properties.mipMap = new t(this, a, d._shapeCache, h));
- l = k.getLevel(e);
- h = l.surfaceRegion;
- k = h.region;
- return l ? (l = b.target.context, l.imageSmoothingEnabled = l.mozImageSmoothingEnabled = !0, l.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty), l.drawImage(h.surface.canvas, k.x, k.y, k.w, k.h, g.x, g.y, g.w, g.h), !0) : !1;
- }
- };
- d.prototype._intersectsClipList = function(a, b) {
- var d = a.getBounds(!0), e = !1;
- b.matrix.transformRectangleAABB(d);
- b.clip.intersects(d) && (e = !0);
- var g = b.clipList;
- if (e && g.length) {
- for (var e = !1, h = 0;h < g.length;h++) {
- if (d.intersects(g[h])) {
- e = !0;
- break;
- }
- }
- }
- d.free();
- return e;
- };
- d.prototype.visitGroup = function(a, b) {
- this._frameInfo.groups++;
- a.getBounds();
- if ((!a.hasFlags(4) || b.flags & 4) && a.hasFlags(65536)) {
- var d = b.flags & 1;
- if (!d && ((1 !== a.getLayer().blendMode || a.getLayer().mask) && this._options.blending || a.getLayer().filters && this._options.filters)) {
- b = b.clone(), b.flags |= 1, this._renderLayer(a, b), b.free();
- } else {
- if (d && b.removeFlags(1), this._intersectsClipList(a, b)) {
- for (var d = null, e = a.getChildren(), g = 0;g < e.length;g++) {
- var h = e[g], k = h.getTransform(), l = b.transform(k);
- l.toggleFlags(4096, h.hasFlags(524288));
- if (0 <= h.clip) {
- d = d || new Uint8Array(e.length);
- d[h.clip + g]++;
- var n = l.clone();
- n.flags |= 16;
- n.beginClipPath(k.getMatrix());
- h.visit(this, n);
- n.applyClipPath();
- n.free();
- } else {
- h.visit(this, l);
- }
- if (d && 0 < d[g]) {
- for (;d[g]--;) {
- b.closeClipPath();
- }
- }
- l.free();
- }
- } else {
- this._frameInfo.culledNodes++;
- }
- }
- this._renderDebugInfo(a, b);
- }
- };
- d.prototype._renderDebugInfo = function(a, b) {
- if (b.flags & 1024) {
- var e = b.target.context, g = a.getBounds(!0), h = a.properties.style;
- h || (h = a.properties.style = k.Color.randomColor(.4).toCSSStyle());
- e.strokeStyle = h;
- b.matrix.transformRectangleAABB(g);
- e.setTransform(1, 0, 0, 1, 0, 0);
- g.free();
- g = a.getBounds();
- h = d._debugPoints;
- b.matrix.transformRectangle(g, h);
- e.lineWidth = 1;
- e.beginPath();
- e.moveTo(h[0].x, h[0].y);
- e.lineTo(h[1].x, h[1].y);
- e.lineTo(h[2].x, h[2].y);
- e.lineTo(h[3].x, h[3].y);
- e.lineTo(h[0].x, h[0].y);
- e.stroke();
- }
- };
- d.prototype.visitStage = function(a, b) {
- var d = b.target.context, e = a.getBounds(!0);
- b.matrix.transformRectangleAABB(e);
- e.intersect(b.clip);
- b.target.reset();
- b = b.clone();
- this._options.clear && b.target.clear(b.clip);
- a.hasFlags(32768) || !a.color || b.flags & 32 || (this._container.style.backgroundColor = a.color.toCSSStyle());
- this.visitGroup(a, b);
- a.dirtyRegion && (d.restore(), b.target.reset(), d.globalAlpha = .4, b.hasFlags(2048) && a.dirtyRegion.render(b.target.context), a.dirtyRegion.clear());
- b.free();
- };
- d.prototype.visitShape = function(a, b) {
- if (this._intersectsClipList(a, b)) {
- var d = b.matrix;
- b.flags & 8192 && (d = d.clone(), d.snap());
- var e = b.target.context;
- u.Filters._applyColorMatrix(e, b.colorMatrix);
- a.source instanceof p.RenderableVideo ? this.visitRenderableVideo(a.source, b) : 0 < e.globalAlpha && this.visitRenderable(a.source, b, a.ratio);
- b.flags & 8192 && d.free();
- u.Filters._removeFilter(e);
- }
- };
- d.prototype.visitRenderableVideo = function(a, b) {
- if (a.video && a.video.videoWidth) {
- var d = this._devicePixelRatio, e = b.matrix.clone();
- e.scale(1 / d, 1 / d);
- var d = a.getBounds(), g = k.GFX.Geometry.Matrix.createIdentity();
- g.scale(d.w / a.video.videoWidth, d.h / a.video.videoHeight);
- e.preMultiply(g);
- g.free();
- d = e.toCSSTransform();
- a.video.style.transformOrigin = "0 0";
- a.video.style.transform = d;
- var h = this._backgroundVideoLayer;
- h !== a.video.parentElement && (h.appendChild(a.video), a.addEventListener(2, function U(a) {
- h.removeChild(a.video);
- a.removeEventListener(2, U);
- }));
- e.free();
- }
- };
- d.prototype.visitRenderable = function(a, b, d) {
- var e = a.getBounds();
- if (!(b.flags & 32 || e.isEmpty())) {
- if (b.hasFlags(64)) {
- b.removeFlags(64);
- } else {
- if (this._renderWithCache(a, b)) {
- return;
- }
- }
- var g = b.matrix, e = b.target.context, h = !!(b.flags & 16), k = !!(b.flags & 8);
- e.setTransform(g.a, g.b, g.c, g.d, g.tx, g.ty);
- this._frameInfo.shapes++;
- e.imageSmoothingEnabled = e.mozImageSmoothingEnabled = b.hasFlags(4096);
- g = a.properties.renderCount || 0;
- a.properties.renderCount = ++g;
- a.render(e, d, null, h ? b.clipPath : null, k);
- }
- };
- d.prototype._renderLayer = function(a, b) {
- var d = a.getLayer(), e = d.mask;
- if (e) {
- var g = !a.hasFlags(131072) || !e.hasFlags(131072);
- this._renderWithMask(a, e, d.blendMode, g, b);
- } else {
- e = w.allocate();
- if (g = this._renderToTemporarySurface(a, a.getLayerBounds(!!this._options.filters), b, e, b.target.surface)) {
- b.target.draw(g, e.x, e.y, e.w, e.h, b.colorMatrix, this._options.blending ? d.blendMode : 1, this._options.filters ? d.filters : null, this._devicePixelRatio), g.free();
- }
- e.free();
- }
- };
- d.prototype._renderWithMask = function(a, b, d, e, g) {
- var h = b.getTransform().getConcatenatedMatrix(!0);
- b.parent || (h = h.scale(this._devicePixelRatio, this._devicePixelRatio));
- var k = a.getBounds().clone();
- g.matrix.transformRectangleAABB(k);
- k.snap();
- if (!k.isEmpty()) {
- var l = b.getBounds().clone();
- h.transformRectangleAABB(l);
- l.snap();
- if (!l.isEmpty()) {
- var n = g.clip.clone();
- n.intersect(k);
- n.intersect(l);
- n.snap();
- n.isEmpty() || (k = g.clone(), k.clip.set(n), a = this._renderToTemporarySurface(a, a.getBounds(), k, w.createEmpty(), null), k.free(), l = g.clone(), l.clip.set(n), l.matrix = h, l.flags |= 4, e && (l.flags |= 8), b = this._renderToTemporarySurface(b, b.getBounds(), l, w.createEmpty(), a.surface), l.free(), a.draw(b, 0, 0, n.w, n.h, l.colorMatrix, 11, null, this._devicePixelRatio), g.target.draw(a, n.x, n.y, n.w, n.h, k.colorMatrix, d, null, this._devicePixelRatio), b.free(), a.free());
- }
- }
- };
- d.prototype._renderStageToTarget = function(a, d, e) {
- w.allocationCount = b.allocationCount = n.allocationCount = 0;
- a = new n(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);
- d.visit(this, a);
- this._frameInfo.leave();
- };
- d.prototype._renderToTemporarySurface = function(a, b, d, e, g) {
- var h = d.matrix;
- b = b.clone();
- h.transformRectangleAABB(b);
- b.snap();
- e.set(b);
- e.intersect(d.clip);
- e.snap();
- if (e.isEmpty()) {
- return null;
- }
- g = this._allocateSurface(e.w, e.h, g);
- b = g.region;
- b = new w(b.x, b.y, e.w, e.h);
- g.context.setTransform(1, 0, 0, 1, 0, 0);
- g.clear();
- h = h.clone();
- h.translate(b.x - e.x, b.y - e.y);
- g.context.save();
- d = d.clone();
- d.target = g;
- d.matrix = h;
- d.clip.set(b);
- a.visit(this, d);
- d.free();
- g.context.restore();
- return g;
- };
- d.prototype._allocateSurface = function(a, b, e) {
- return d._surfaceCache.allocate(a, b, e);
- };
- d.prototype.screenShot = function(b, d, e) {
- d && (d = this._stage.content.groupChild.child, a(d instanceof p.Stage), b = d.content.getBounds(!0), d.content.getTransform().getConcatenatedMatrix().transformRectangleAABB(b), b.intersect(this._viewport));
- b || (b = new w(0, 0, this._target.w, this._target.h));
- d = b.w;
- var g = b.h, h = this._devicePixelRatio;
- e && (d /= h, g /= h, h = 1);
- e = document.createElement("canvas");
- e.width = d;
- e.height = g;
- var k = e.getContext("2d");
- k.fillStyle = this._container.style.backgroundColor;
- k.fillRect(0, 0, d, g);
- k.drawImage(this._target.context.canvas, b.x, b.y, b.w, b.h, 0, 0, d, g);
- return new p.ScreenShot(e.toDataURL("image/png"), d, g, h);
- };
- d._initializedCaches = !1;
- d._debugPoints = m.createEmptyPoints(4);
- return d;
- }(p.Renderer);
- u.Canvas2DRenderer = e;
- })(p.Canvas2D || (p.Canvas2D = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- var u = p.Geometry.Point, a = p.Geometry.Matrix, w = p.Geometry.Rectangle, m = k.Tools.Mini.FPS, b = function() {
- function a() {
- }
- a.prototype.onMouseUp = function(a, b) {
- a.state = this;
- };
- a.prototype.onMouseDown = function(a, b) {
- a.state = this;
- };
- a.prototype.onMouseMove = function(a, b) {
- a.state = this;
- };
- a.prototype.onMouseWheel = function(a, b) {
- a.state = this;
- };
- a.prototype.onMouseClick = function(a, b) {
- a.state = this;
- };
- a.prototype.onKeyUp = function(a, b) {
- a.state = this;
- };
- a.prototype.onKeyDown = function(a, b) {
- a.state = this;
- };
- a.prototype.onKeyPress = function(a, b) {
- a.state = this;
- };
- return a;
- }();
- p.UIState = b;
- var l = function(a) {
- function b() {
- a.apply(this, arguments);
- this._keyCodes = [];
- }
- __extends(b, a);
- b.prototype.onMouseDown = function(a, b) {
- b.altKey && (a.state = new h(a.worldView, a.getMousePosition(b, null), a.worldView.getTransform().getMatrix(!0)));
- };
- b.prototype.onMouseClick = function(a, b) {
- };
- b.prototype.onKeyDown = function(a, b) {
- this._keyCodes[b.keyCode] = !0;
- };
- b.prototype.onKeyUp = function(a, b) {
- this._keyCodes[b.keyCode] = !1;
- };
- return b;
- }(b), r = function(a) {
- function b() {
- a.apply(this, arguments);
- this._keyCodes = [];
- this._paused = !1;
- this._mousePosition = new u(0, 0);
- }
- __extends(b, a);
- b.prototype.onMouseMove = function(a, b) {
- this._mousePosition = a.getMousePosition(b, null);
- this._update(a);
- };
- b.prototype.onMouseDown = function(a, b) {
- };
- b.prototype.onMouseClick = function(a, b) {
- };
- b.prototype.onMouseWheel = function(a, b) {
- var e = "DOMMouseScroll" === b.type ? -b.detail : b.wheelDelta / 40;
- if (b.altKey) {
- b.preventDefault();
- var g = a.getMousePosition(b, null), d = a.worldView.getTransform().getMatrix(!0), e = 1 + e / 1E3;
- d.translate(-g.x, -g.y);
- d.scale(e, e);
- d.translate(g.x, g.y);
- a.worldView.getTransform().setMatrix(d);
- }
- };
- b.prototype.onKeyPress = function(a, b) {
- if (b.altKey) {
- var e = b.keyCode || b.which;
- console.info("onKeyPress Code: " + e);
- switch(e) {
- case 248:
- this._paused = !this._paused;
- b.preventDefault();
- break;
- case 223:
- a.toggleOption("paintRenderable");
- b.preventDefault();
- break;
- case 8730:
- a.toggleOption("paintViewport");
- b.preventDefault();
- break;
- case 8747:
- a.toggleOption("paintBounds");
- b.preventDefault();
- break;
- case 8706:
- a.toggleOption("paintDirtyRegion");
- b.preventDefault();
- break;
- case 231:
- a.toggleOption("clear");
- b.preventDefault();
- break;
- case 402:
- a.toggleOption("paintFlashing"), b.preventDefault();
- }
- this._update(a);
- }
- };
- b.prototype.onKeyDown = function(a, b) {
- this._keyCodes[b.keyCode] = !0;
- this._update(a);
- };
- b.prototype.onKeyUp = function(a, b) {
- this._keyCodes[b.keyCode] = !1;
- this._update(a);
- };
- b.prototype._update = function(a) {
- a.paused = this._paused;
- if (a.getOption("paintViewport")) {
- var b = p.viewportLoupeDiameter.value, e = p.viewportLoupeDiameter.value;
- a.viewport = new w(this._mousePosition.x - b / 2, this._mousePosition.y - e / 2, b, e);
- } else {
- a.viewport = null;
- }
- };
- return b;
- }(b);
- (function(a) {
- function b() {
- a.apply(this, arguments);
- this._startTime = Date.now();
- }
- __extends(b, a);
- b.prototype.onMouseMove = function(a, b) {
- if (!(10 > Date.now() - this._startTime)) {
- var e = a._world;
- e && (a.state = new h(e, a.getMousePosition(b, null), e.getTransform().getMatrix(!0)));
- }
- };
- b.prototype.onMouseUp = function(a, b) {
- a.state = new l;
- a.selectNodeUnderMouse(b);
- };
- return b;
- })(b);
- var h = function(a) {
- function b(h, k, e) {
- a.call(this);
- this._target = h;
- this._startPosition = k;
- this._startMatrix = e;
- }
- __extends(b, a);
- b.prototype.onMouseMove = function(a, b) {
- b.preventDefault();
- var e = a.getMousePosition(b, null);
- e.sub(this._startPosition);
- this._target.getTransform().setMatrix(this._startMatrix.clone().translate(e.x, e.y));
- a.state = this;
- };
- b.prototype.onMouseUp = function(a, b) {
- a.state = new l;
- };
- return b;
- }(b), b = function() {
- function b(a, h, t) {
- function e(a) {
- c._state.onMouseWheel(c, a);
- c._persistentState.onMouseWheel(c, a);
- }
- void 0 === h && (h = !1);
- void 0 === t && (t = void 0);
- this._state = new l;
- this._persistentState = new r;
- this.paused = !1;
- this.viewport = null;
- this._selectedNodes = [];
- this._isRendering = !1;
- this._rAF = void 0;
- this._eventListeners = Object.create(null);
- this._fullScreen = !1;
- this._container = a;
- this._stage = new p.Stage(512, 512, !0);
- this._worldView = this._stage.content;
- this._world = new p.Group;
- this._worldView.addChild(this._world);
- this._disableHiDPI = h;
- h = document.createElement("div");
- h.style.position = "absolute";
- h.style.width = "100%";
- h.style.height = "100%";
- h.style.zIndex = "0";
- a.appendChild(h);
- if (p.hud.value) {
- var g = document.createElement("div");
- g.style.position = "absolute";
- g.style.width = "100%";
- g.style.height = "100%";
- g.style.pointerEvents = "none";
- var d = document.createElement("div");
- d.style.position = "absolute";
- d.style.width = "100%";
- d.style.height = "20px";
- d.style.pointerEvents = "none";
- g.appendChild(d);
- a.appendChild(g);
- this._fps = new m(d);
- } else {
- this._fps = null;
- }
- this.transparent = g = 0 === t;
- void 0 === t || 0 === t || k.ColorUtilities.rgbaToCSSStyle(t);
- this._options = new p.Canvas2D.Canvas2DRendererOptions;
- this._options.alpha = g;
- this._renderer = new p.Canvas2D.Canvas2DRenderer(h, 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 c = this;
- window.addEventListener("mouseup", function(a) {
- c._state.onMouseUp(c, a);
- c._render();
- }, !1);
- window.addEventListener("mousemove", function(a) {
- c._state.onMouseMove(c, a);
- c._persistentState.onMouseMove(c, a);
- }, !1);
- window.addEventListener("DOMMouseScroll", e);
- window.addEventListener("mousewheel", e);
- a.addEventListener("mousedown", function(a) {
- c._state.onMouseDown(c, a);
- });
- window.addEventListener("keydown", function(a) {
- c._state.onKeyDown(c, a);
- if (c._state !== c._persistentState) {
- c._persistentState.onKeyDown(c, a);
- }
- }, !1);
- window.addEventListener("keypress", function(a) {
- c._state.onKeyPress(c, a);
- if (c._state !== c._persistentState) {
- c._persistentState.onKeyPress(c, a);
- }
- }, !1);
- window.addEventListener("keyup", function(a) {
- c._state.onKeyUp(c, a);
- if (c._state !== c._persistentState) {
- c._persistentState.onKeyUp(c, a);
- }
- }, !1);
- }
- b.prototype._listenForContainerSizeChanges = function() {
- var a = this._containerWidth, b = this._containerHeight;
- this._onContainerSizeChanged();
- var h = this;
- setInterval(function() {
- if (a !== h._containerWidth || b !== h._containerHeight) {
- h._onContainerSizeChanged(), a = h._containerWidth, b = h._containerHeight;
- }
- }, 10);
- };
- b.prototype._onContainerSizeChanged = function() {
- var b = this.getRatio(), h = Math.ceil(this._containerWidth * b), k = Math.ceil(this._containerHeight * b);
- this._stage.setBounds(new w(0, 0, h, k));
- this._stage.content.setBounds(new w(0, 0, h, k));
- this._worldView.getTransform().setMatrix(new a(b, 0, 0, b, 0, 0));
- this._dispatchEvent("resize");
- };
- b.prototype.addEventListener = function(a, b) {
- this._eventListeners[a] || (this._eventListeners[a] = []);
- this._eventListeners[a].push(b);
- };
- b.prototype._dispatchEvent = function(a) {
- if (a = this._eventListeners[a]) {
- for (var b = 0;b < a.length;b++) {
- a[b]();
- }
- }
- };
- b.prototype.startRendering = function() {
- if (!this._isRendering) {
- this._isRendering = !0;
- var a = this;
- this._rAF = requestAnimationFrame(function v() {
- a.render();
- a._rAF = requestAnimationFrame(v);
- });
- }
- };
- b.prototype.stopRendering = function() {
- this._isRendering && (this._isRendering = !1, cancelAnimationFrame(this._rAF));
- };
- Object.defineProperty(b.prototype, "state", {set:function(a) {
- this._state = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "cursor", {set:function(a) {
- this._container.style.cursor = a;
- }, enumerable:!0, configurable:!0});
- b.prototype._render = function() {
- p.RenderableVideo.checkForVideoUpdates();
- var a = (this._stage.readyToRender() || p.forcePaint.value) && !this.paused, b = 0;
- if (a) {
- var h = this._renderer;
- h.viewport = this.viewport ? this.viewport : this._stage.getBounds();
- this._dispatchEvent("render");
- b = performance.now();
- h.render();
- b = performance.now() - b;
- }
- this._fps && this._fps.tickAndRender(!a, b);
- };
- b.prototype.render = function() {
- this._render();
- };
- Object.defineProperty(b.prototype, "world", {get:function() {
- return this._world;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "worldView", {get:function() {
- return this._worldView;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "stage", {get:function() {
- return this._stage;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "options", {get:function() {
- return this._options;
- }, enumerable:!0, configurable:!0});
- b.prototype.getDisplayParameters = function() {
- var a = this.getRatio();
- return {stageWidth:this._containerWidth, stageHeight:this._containerHeight, pixelRatio:a, screenWidth:window.screen ? window.screen.width : 640, screenHeight:window.screen ? window.screen.height : 480};
- };
- b.prototype.toggleOption = function(a) {
- var b = this._options;
- b[a] = !b[a];
- };
- b.prototype.getOption = function(a) {
- return this._options[a];
- };
- b.prototype.getRatio = function() {
- var a = window.devicePixelRatio || 1, b = 1;
- 1 === a || this._disableHiDPI || (b = a / 1);
- return b;
- };
- Object.defineProperty(b.prototype, "_containerWidth", {get:function() {
- return this._container.clientWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "_containerHeight", {get:function() {
- return this._container.clientHeight;
- }, enumerable:!0, configurable:!0});
- b.prototype.queryNodeUnderMouse = function(a) {
- return this._world;
- };
- b.prototype.selectNodeUnderMouse = function(a) {
- (a = this._world) && this._selectedNodes.push(a);
- this._render();
- };
- b.prototype.getMousePosition = function(b, h) {
- var k = this._container, e = k.getBoundingClientRect(), g = this.getRatio(), k = new u(k.scrollWidth / e.width * (b.clientX - e.left) * g, k.scrollHeight / e.height * (b.clientY - e.top) * g);
- if (!h) {
- return k;
- }
- e = a.createIdentity();
- h.getTransform().getConcatenatedMatrix().inverse(e);
- e.transformPoint(k);
- return k;
- };
- b.prototype.getMouseWorldPosition = function(a) {
- return this.getMousePosition(a, this._world);
- };
- b.prototype._onMouseDown = function(a) {
- };
- b.prototype._onMouseUp = function(a) {
- };
- b.prototype._onMouseMove = function(a) {
- };
- b.prototype.screenShot = function(a, b, h) {
- return this._renderer.screenShot(a, b, h);
- };
- return b;
- }();
- p.Easel = b;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- var u = k.GFX.Geometry.Matrix;
- (function(a) {
- a[a.Simple = 0] = "Simple";
- })(p.Layout || (p.Layout = {}));
- var a = function(a) {
- function b() {
- a.apply(this, arguments);
- this.layout = 0;
- }
- __extends(b, a);
- return b;
- }(p.RendererOptions);
- p.TreeRendererOptions = a;
- var w = function(k) {
- function b(b, r, h) {
- void 0 === h && (h = new a);
- k.call(this, b, r, h);
- this._canvas = document.createElement("canvas");
- this._container.appendChild(this._canvas);
- this._context = this._canvas.getContext("2d");
- this._listenForContainerSizeChanges();
- }
- __extends(b, k);
- b.prototype._listenForContainerSizeChanges = function() {
- var a = this._containerWidth, b = this._containerHeight;
- this._onContainerSizeChanged();
- var h = this;
- setInterval(function() {
- if (a !== h._containerWidth || b !== h._containerHeight) {
- h._onContainerSizeChanged(), a = h._containerWidth, b = h._containerHeight;
- }
- }, 10);
- };
- b.prototype._getRatio = function() {
- var a = window.devicePixelRatio || 1, b = 1;
- 1 !== a && (b = a / 1);
- return b;
- };
- b.prototype._onContainerSizeChanged = function() {
- var a = this._getRatio(), b = Math.ceil(this._containerWidth * a), h = Math.ceil(this._containerHeight * a), k = this._canvas;
- 0 < a ? (k.width = b * a, k.height = h * a, k.style.width = b + "px", k.style.height = h + "px") : (k.width = b, k.height = h);
- };
- Object.defineProperty(b.prototype, "_containerWidth", {get:function() {
- return this._container.clientWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "_containerHeight", {get:function() {
- return this._container.clientHeight;
- }, enumerable:!0, configurable:!0});
- b.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, u.createIdentity());
- a.restore();
- };
- b.prototype._renderNodeSimple = function(a, b, h) {
- function k(b) {
- var c = b.getChildren();
- b.hasFlags(16) ? a.fillStyle = "red" : a.fillStyle = "white";
- var f = String(b.id);
- b instanceof p.RenderableText ? f = "T" + f : b instanceof p.RenderableShape ? f = "S" + f : b instanceof p.RenderableBitmap ? f = "B" + f : b instanceof p.RenderableVideo && (f = "V" + f);
- b instanceof p.Renderable && (f = f + " [" + b._parents.length + "]");
- b = a.measureText(f).width;
- a.fillText(f, n, u);
- if (c) {
- n += b + 4;
- g = Math.max(g, n + 20);
- for (f = 0;f < c.length;f++) {
- k(c[f]), f < c.length - 1 && (u += 18, u > m._canvas.height && (a.fillStyle = "gray", n = n - e + g + 8, e = g + 8, u = 0, a.fillStyle = "white"));
- }
- n -= b + 4;
- }
- }
- var m = this;
- a.save();
- a.font = "16px Arial";
- a.fillStyle = "white";
- var n = 0, u = 0, e = 0, g = 0;
- k(b);
- a.restore();
- };
- return b;
- }(p.Renderer);
- p.TreeRenderer = w;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.GFX.BlurFilter, w = k.GFX.DropshadowFilter, m = k.GFX.Shape, b = k.GFX.Group, l = k.GFX.RenderableShape, r = k.GFX.RenderableMorphShape, h = k.GFX.RenderableBitmap, t = k.GFX.RenderableVideo, q = k.GFX.RenderableText, n = k.GFX.ColorMatrix, v = k.ShapeData, e = k.ArrayUtilities.DataBuffer, g = k.GFX.Stage, d = k.GFX.Geometry.Matrix, c = k.GFX.Geometry.Rectangle, f = function() {
- function a() {
- }
- a.prototype.writeMouseEvent = function(a, b) {
- var c = this.output;
- c.writeInt(300);
- var d = k.Remoting.MouseEventNames.indexOf(a.type);
- c.writeInt(d);
- c.writeFloat(b.x);
- c.writeFloat(b.y);
- c.writeInt(a.buttons);
- c.writeInt((a.ctrlKey ? 1 : 0) | (a.altKey ? 2 : 0) | (a.shiftKey ? 4 : 0));
- };
- a.prototype.writeKeyboardEvent = function(a) {
- var b = this.output;
- b.writeInt(301);
- var c = k.Remoting.KeyboardEventNames.indexOf(a.type);
- b.writeInt(c);
- b.writeInt(a.keyCode);
- b.writeInt(a.charCode);
- b.writeInt(a.location);
- b.writeInt((a.ctrlKey ? 1 : 0) | (a.altKey ? 2 : 0) | (a.shiftKey ? 4 : 0));
- };
- a.prototype.writeFocusEvent = function(a) {
- var b = this.output;
- b.writeInt(302);
- b.writeInt(a);
- };
- return a;
- }();
- u.GFXChannelSerializer = f;
- f = function() {
- function a(b, c, d) {
- function e(a) {
- a = a.getBounds(!0);
- var c = b.easel.getRatio();
- a.scale(1 / c, 1 / c);
- a.snap();
- f.setBounds(a);
- }
- var f = this.stage = new g(128, 512);
- "undefined" !== typeof registerInspectorStage && registerInspectorStage(f);
- e(b.stage);
- b.stage.addEventListener(1, e);
- b.content = f.content;
- d && this.stage.setFlags(32768);
- c.addChild(this.stage);
- this._nodes = [];
- this._assets = [];
- this._easelHost = b;
- this._canvas = document.createElement("canvas");
- this._context = this._canvas.getContext("2d");
- }
- a.prototype._registerAsset = function(a, b, c) {
- "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(a, b, c);
- this._assets[a] = c;
- };
- a.prototype._makeNode = function(a) {
- if (-1 === a) {
- return null;
- }
- var b = null;
- return b = a & 134217728 ? this._assets[a & -134217729].wrap() : this._nodes[a];
- };
- a.prototype._getAsset = function(a) {
- return this._assets[a];
- };
- a.prototype._getBitmapAsset = function(a) {
- return this._assets[a];
- };
- a.prototype._getVideoAsset = function(a) {
- return this._assets[a];
- };
- a.prototype._getTextAsset = function(a) {
- return this._assets[a];
- };
- a.prototype.registerFont = function(a, b, c) {
- k.registerCSSFont(a, b, !inFirefox);
- inFirefox ? c(null) : window.setTimeout(c, 400);
- };
- a.prototype.registerImage = function(a, b, c, d, e, f) {
- this._registerAsset(a, b, this._decodeImage(c, d, e, f));
- };
- a.prototype.registerVideo = function(a) {
- this._registerAsset(a, 0, new t(a, this));
- };
- a.prototype._decodeImage = function(a, b, d, e) {
- var f = new Image, g = h.FromImage(f, -1, -1);
- f.src = URL.createObjectURL(new Blob([b], {type:k.getMIMETypeForImageType(a)}));
- f.onload = function() {
- g.setBounds(new c(0, 0, f.width, f.height));
- d && g.mask(d);
- g.invalidate();
- e({width:f.width, height:f.height});
- };
- f.onerror = function() {
- e(null);
- };
- return g;
- };
- a.prototype.sendVideoPlaybackEvent = function(a, b, c) {
- this._easelHost.sendVideoPlaybackEvent(a, b, c);
- };
- return a;
- }();
- u.GFXChannelDeserializerContext = f;
- f = function() {
- function f() {
- }
- f.prototype.read = function() {
- 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;
- case 101:
- c++;
- this._readUpdateGraphics();
- break;
- case 102:
- d++;
- this._readUpdateBitmapData();
- break;
- case 103:
- e++;
- this._readUpdateTextContent();
- break;
- case 100:
- f++;
- this._readUpdateFrame();
- break;
- case 104:
- g++;
- this._readUpdateStage();
- break;
- case 105:
- h++;
- this._readUpdateNetStream();
- break;
- case 200:
- k++;
- this._readDrawToBitmap();
- break;
- case 106:
- l++, this._readRequestBitmapData();
- }
- }
- };
- f.prototype._readMatrix = function() {
- var a = this.input, b = f._temporaryReadMatrix;
- b.setElements(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat() / 20, a.readFloat() / 20);
- return b;
- };
- f.prototype._readRectangle = function() {
- var a = this.input, b = f._temporaryReadRectangle;
- b.setElements(a.readInt() / 20, a.readInt() / 20, a.readInt() / 20, a.readInt() / 20);
- return b;
- };
- f.prototype._readColorMatrix = function() {
- var a = this.input, b = f._temporaryReadColorMatrix, c = 1, d = 1, e = 1, g = 1, h = 0, k = 0, l = 0, m = 0;
- switch(a.readInt()) {
- case 0:
- return f._temporaryReadColorMatrixIdentity;
- case 1:
- g = a.readFloat();
- break;
- case 2:
- c = a.readFloat(), d = a.readFloat(), e = a.readFloat(), g = a.readFloat(), h = a.readInt(), k = a.readInt(), l = a.readInt(), m = a.readInt();
- }
- b.setMultipliersAndOffsets(c, d, e, g, h, k, l, m);
- return b;
- };
- f.prototype._readAsset = function() {
- var a = this.input.readInt(), b = this.inputAssets[a];
- this.inputAssets[a] = null;
- return b;
- };
- f.prototype._readUpdateGraphics = function() {
- 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()), h = a.readInt(), k = [], m = 0;m < h;m++) {
- var n = a.readInt();
- k.push(b._getBitmapAsset(n));
- }
- if (e) {
- e.update(g, k, f);
- } else {
- a = g.morphCoordinates ? new r(c, g, k, f) : new l(c, g, k, f);
- for (m = 0;m < k.length;m++) {
- k[m] && k[m].addRenderableParent(a);
- }
- b._registerAsset(c, d, a);
- }
- };
- f.prototype._readUpdateBitmapData = function() {
- var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), f = b._getBitmapAsset(c), g = this._readRectangle(), a = a.readInt(), k = e.FromPlainObject(this._readAsset());
- f ? f.updateFromDataBuffer(a, k) : (f = h.FromDataBuffer(a, k, g), b._registerAsset(c, d, f));
- };
- f.prototype._readUpdateTextContent = function() {
- var a = this.input, b = this.context, c = a.readInt(), d = a.readInt(), f = b._getTextAsset(c), g = this._readRectangle(), h = this._readMatrix(), k = a.readInt(), l = a.readInt(), m = a.readInt(), n = a.readBoolean(), p = a.readInt(), r = a.readInt(), t = this._readAsset(), u = e.FromPlainObject(this._readAsset()), v = null, w = a.readInt();
- w && (v = new e(4 * w), a.readBytes(v, 0, 4 * w));
- f ? (f.setBounds(g), f.setContent(t, u, h, v), f.setStyle(k, l, p, r), f.reflow(m, n)) : (f = new q(g), f.setContent(t, u, h, v), f.setStyle(k, l, p, r), f.reflow(m, n), b._registerAsset(c, d, f));
- if (this.output) {
- 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]);
- }
- }
- };
- f.prototype._writeLineMetrics = function(a) {
- this.output.writeInt(a.x);
- this.output.writeInt(a.width);
- this.output.writeInt(a.ascent);
- this.output.writeInt(a.descent);
- this.output.writeInt(a.leading);
- };
- f.prototype._readUpdateStage = function() {
- var a = this.context, b = this.input.readInt();
- 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 = k.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 = k.UI.toCSSCursor(c);
- a._easelHost.fullscreen = 0 === b || 1 === b;
- };
- f.prototype._readUpdateNetStream = function() {
- var a = this.context, b = this.input.readInt(), c = a._getVideoAsset(b), d = this._readRectangle();
- c || (a.registerVideo(b), c = a._getVideoAsset(b));
- c.setBounds(d);
- };
- f.prototype._readFilters = function(b) {
- var c = this.input, d = c.readInt(), e = [];
- if (d) {
- for (var f = 0;f < d;f++) {
- var g = c.readInt();
- switch(g) {
- case 0:
- e.push(new a(c.readFloat(), c.readFloat(), c.readInt()));
- break;
- case 1:
- e.push(new w(c.readFloat(), c.readFloat(), c.readFloat(), c.readFloat(), c.readInt(), c.readFloat(), c.readBoolean(), c.readBoolean(), c.readBoolean(), c.readInt(), c.readFloat()));
- break;
- case 2:
- g = new Float32Array(20);
- g[0] = c.readFloat();
- g[4] = c.readFloat();
- g[8] = c.readFloat();
- g[12] = c.readFloat();
- g[16] = c.readFloat() / 255;
- g[1] = c.readFloat();
- g[5] = c.readFloat();
- g[9] = c.readFloat();
- g[13] = c.readFloat();
- g[17] = c.readFloat() / 255;
- g[2] = c.readFloat();
- g[6] = c.readFloat();
- g[10] = c.readFloat();
- g[14] = c.readFloat();
- g[18] = c.readFloat() / 255;
- g[3] = c.readFloat();
- g[7] = c.readFloat();
- g[11] = c.readFloat();
- g[15] = c.readFloat();
- g[19] = c.readFloat() / 255;
- e.push(new n(g));
- break;
- default:
- k.Debug.somewhatImplemented(p.FilterType[g]);
- }
- }
- b.getLayer().filters = e;
- }
- };
- f.prototype._readUpdateFrame = function() {
- var a = this.input, c = this.context, d = a.readInt(), e = 0, f = c._nodes[d];
- f || (f = c._nodes[d] = new b);
- d = a.readInt();
- d & 1 && f.getTransform().setMatrix(this._readMatrix());
- d & 8 && f.getTransform().setColorMatrix(this._readColorMatrix());
- if (d & 64) {
- var g = a.readInt();
- f.getLayer().mask = 0 <= g ? c._makeNode(g) : null;
- }
- d & 128 && (f.clip = a.readInt());
- d & 32 && (e = a.readInt() / 65535, g = a.readInt(), 1 !== g && (f.getLayer().blendMode = g), this._readFilters(f), f.toggleFlags(65536, a.readBoolean()), f.toggleFlags(131072, a.readBoolean()), f.toggleFlags(262144, !!a.readInt()), f.toggleFlags(524288, !!a.readInt()));
- if (d & 4) {
- d = a.readInt();
- g = f;
- g.clearChildren();
- for (var h = 0;h < d;h++) {
- var k = a.readInt(), k = c._makeNode(k);
- g.addChild(k);
- }
- }
- e && (k = f.getChildren()[0], k instanceof m && (k.ratio = e));
- };
- f.prototype._readDrawToBitmap = function() {
- var a = this.input, b = this.context, c = a.readInt(), e = a.readInt(), f = a.readInt(), g, k, l;
- g = f & 1 ? this._readMatrix().clone() : d.createIdentity();
- f & 8 && (k = this._readColorMatrix());
- f & 16 && (l = this._readRectangle());
- f = a.readInt();
- a.readBoolean();
- a = b._getBitmapAsset(c);
- e = b._makeNode(e);
- a ? a.drawNode(e, g, k, f, l) : b._registerAsset(c, -1, h.FromNode(e, g, k, f, l));
- };
- f.prototype._readRequestBitmapData = function() {
- var a = this.output, b = this.context, c = this.input.readInt();
- b._getBitmapAsset(c).readImageData(a);
- };
- f._temporaryReadMatrix = d.createIdentity();
- f._temporaryReadRectangle = c.createEmpty();
- f._temporaryReadColorMatrix = n.createIdentity();
- f._temporaryReadColorMatrixIdentity = n.createIdentity();
- return f;
- }();
- u.GFXChannelDeserializer = f;
- })(p.GFX || (p.GFX = {}));
- })(k.Remoting || (k.Remoting = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- var u = k.GFX.Geometry.Point, a = k.ArrayUtilities.DataBuffer;
- p.ContextMenuButton = 2;
- var w = function() {
- function m(a) {
- this._easel = a;
- var l = a.transparent;
- this._group = a.world;
- this._content = null;
- this._fullscreen = !1;
- this._context = new k.Remoting.GFX.GFXChannelDeserializerContext(this, this._group, l);
- this._addEventListeners();
- k.registerFallbackFont();
- }
- m.prototype.onSendUpdates = function(a, k) {
- throw Error("This method is abstract");
- };
- Object.defineProperty(m.prototype, "easel", {get:function() {
- return this._easel;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "stage", {get:function() {
- return this._easel.stage;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "content", {set:function(a) {
- this._content = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "cursor", {set:function(a) {
- this._easel.cursor = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "fullscreen", {set:function(a) {
- this._fullscreen !== a && (this._fullscreen = a, "undefined" !== typeof ShumwayCom && ShumwayCom.setFullscreen && ShumwayCom.setFullscreen(a));
- }, enumerable:!0, configurable:!0});
- m.prototype._mouseEventListener = function(b) {
- if (b.button !== p.ContextMenuButton) {
- var l = this._easel.getMousePosition(b, this._content), l = new u(l.x, l.y), m = new a, h = new k.Remoting.GFX.GFXChannelSerializer;
- h.output = m;
- h.writeMouseEvent(b, l);
- this.onSendUpdates(m, []);
- }
- };
- m.prototype._keyboardEventListener = function(b) {
- var l = new a, m = new k.Remoting.GFX.GFXChannelSerializer;
- m.output = l;
- m.writeKeyboardEvent(b);
- this.onSendUpdates(l, []);
- };
- m.prototype._addEventListeners = function() {
- for (var a = this._mouseEventListener.bind(this), k = this._keyboardEventListener.bind(this), p = m._mouseEvents, h = 0;h < p.length;h++) {
- window.addEventListener(p[h], a);
- }
- a = m._keyboardEvents;
- for (h = 0;h < a.length;h++) {
- window.addEventListener(a[h], k);
- }
- this._addFocusEventListeners();
- this._easel.addEventListener("resize", this._resizeEventListener.bind(this));
- };
- m.prototype._sendFocusEvent = function(b) {
- var l = new a, m = new k.Remoting.GFX.GFXChannelSerializer;
- m.output = l;
- m.writeFocusEvent(b);
- this.onSendUpdates(l, []);
- };
- m.prototype._addFocusEventListeners = function() {
- var a = this;
- document.addEventListener("visibilitychange", function(k) {
- a._sendFocusEvent(document.hidden ? 0 : 1);
- });
- window.addEventListener("focus", function(k) {
- a._sendFocusEvent(3);
- });
- window.addEventListener("blur", function(k) {
- a._sendFocusEvent(2);
- });
- };
- m.prototype._resizeEventListener = function() {
- this.onDisplayParameters(this._easel.getDisplayParameters());
- };
- m.prototype.onDisplayParameters = function(a) {
- throw Error("This method is abstract");
- };
- m.prototype.processUpdates = function(a, l, m) {
- void 0 === m && (m = null);
- var h = new k.Remoting.GFX.GFXChannelDeserializer;
- h.input = a;
- h.inputAssets = l;
- h.output = m;
- h.context = this._context;
- h.read();
- };
- m.prototype.processVideoControl = function(a, k, m) {
- var h = this._context, p = h._getVideoAsset(a);
- if (!p) {
- if (1 !== k) {
- return;
- }
- h.registerVideo(a);
- p = h._getVideoAsset(a);
- }
- return p.processControlRequest(k, m);
- };
- m.prototype.processRegisterFont = function(a, k, m) {
- this._context.registerFont(a, k, m);
- };
- m.prototype.processRegisterImage = function(a, k, m, h, p, q) {
- this._context.registerImage(a, k, m, h, p, q);
- };
- m.prototype.processFSCommand = function(a, k) {
- "undefined" !== typeof ShumwayCom && "test" === ShumwayCom.environment && ShumwayCom.processFSCommand(a, k);
- };
- m.prototype.processFrame = function() {
- "undefined" !== typeof ShumwayCom && "test" === ShumwayCom.environment && ShumwayCom.processFrame();
- };
- m.prototype.onVideoPlaybackEvent = function(a, k, m) {
- throw Error("This method is abstract");
- };
- m.prototype.sendVideoPlaybackEvent = function(a, k, m) {
- this.onVideoPlaybackEvent(a, k, m);
- };
- m._mouseEvents = k.Remoting.MouseEventNames;
- m._keyboardEvents = k.Remoting.KeyboardEventNames;
- return m;
- }();
- p.EaselHost = w;
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.ArrayUtilities.DataBuffer, w = function(k) {
- function b(a, b) {
- k.call(this, a);
- this._peer = b;
- this._peer.onSyncMessage = function(a) {
- return this._onWindowMessage(a, !1);
- }.bind(this);
- this._peer.onAsyncMessage = function(a) {
- this._onWindowMessage(a, !0);
- }.bind(this);
- }
- __extends(b, k);
- b.prototype.onSendUpdates = function(a, b) {
- var h = a.getBytes();
- this._peer.postAsyncMessage({type:"gfx", updates:h, assets:b}, [h.buffer]);
- };
- b.prototype.onDisplayParameters = function(a) {
- this._peer.postAsyncMessage({type:"displayParameters", params:a});
- };
- b.prototype.onVideoPlaybackEvent = function(a, b, h) {
- this._peer.postAsyncMessage({type:"videoPlayback", id:a, eventType:b, data:h});
- };
- b.prototype._sendRegisterFontResponse = function(a, b) {
- this._peer.postAsyncMessage({type:"registerFontResponse", requestId:a, result:b});
- };
- b.prototype._sendRegisterImageResponse = function(a, b) {
- this._peer.postAsyncMessage({type:"registerImageResponse", requestId:a, result:b});
- };
- b.prototype._onWindowMessage = function(b, k) {
- var h;
- if ("object" === typeof b && null !== b) {
- if ("player" === b.type) {
- var m = a.FromArrayBuffer(b.updates.buffer);
- k ? this.processUpdates(m, b.assets) : (h = new a, this.processUpdates(m, b.assets, h), h = h.toPlainObject());
- } else {
- "frame" === b.type ? this.processFrame() : "videoControl" === b.type ? h = this.processVideoControl(b.id, b.eventType, b.data) : "registerFont" === b.type ? this.processRegisterFont(b.syncId, b.data, this._sendRegisterFontResponse.bind(this, b.requestId)) : "registerImage" === b.type ? this.processRegisterImage(b.syncId, b.symbolId, b.imageType, b.data, b.alphaData, this._sendRegisterImageResponse.bind(this, b.requestId)) : "fscommand" === b.type && this.processFSCommand(b.command,
- b.args);
- }
- }
- return h;
- };
- return b;
- }(p.EaselHost);
- u.WindowEaselHost = w;
- })(p.Window || (p.Window = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(p) {
- function a(a, b) {
- a.writeInt(b.length);
- a.writeRawBytes(b);
- }
- function w(a, b) {
- return "byteLength" in a && "buffer" in a && (a.constructor && a.constructor.name) === b;
- }
- function m(a) {
- return "byteLength" in a && "ArrayBuffer" === (a.constructor && a.constructor.name);
- }
- function b(b) {
- function g(b) {
- switch(typeof b) {
- case "undefined":
- d.writeByte(0);
- break;
- case "boolean":
- d.writeByte(b ? 2 : 3);
- break;
- case "number":
- d.writeByte(4);
- d.writeDouble(b);
- break;
- case "string":
- d.writeByte(5);
- d.writeUTF(b);
- break;
- default:
- if (null === b) {
- d.writeByte(1);
- break;
- }
- if (Array.isArray(b)) {
- d.writeByte(6);
- d.writeInt(b.length);
- for (var e = 0;e < b.length;e++) {
- g(b[e]);
- }
- } else {
- if (w(b, "Uint8Array")) {
- d.writeByte(9), a(d, b);
- } else {
- if ("length" in b && "buffer" in b && "littleEndian" in b) {
- d.writeByte(b.littleEndian ? 10 : 11), a(d, new Uint8Array(b.buffer, 0, b.length));
- } else {
- if (m(b)) {
- d.writeByte(8), a(d, new Uint8Array(b));
- } else {
- if (w(b, "Int32Array")) {
- d.writeByte(12), a(d, new Uint8Array(b.buffer, b.byteOffset, b.byteLength));
- } else {
- if (!k.isNullOrUndefined(b.buffer) && m(b.buffer) && "number" === typeof b.byteOffset) {
- throw Error("Some unsupported TypedArray is used");
- }
- d.writeByte(7);
- for (e in b) {
- d.writeUTF(e), g(b[e]);
- }
- d.writeUTF("");
- }
- }
- }
- }
- }
- ;
- }
- }
- var d = new t;
- g(b);
- return d.getBytes();
- }
- function l(a) {
- var b = new t, d = a.readInt();
- a.readBytes(b, 0, d);
- return b.getBytes();
- }
- function r(a) {
- var b = new t, d = a.readInt();
- a.readBytes(b, 0, d);
- return h(b);
- }
- function h(a) {
- var b = a.readByte();
- switch(b) {
- case 1:
- return null;
- case 2:
- return !0;
- case 3:
- return !1;
- case 4:
- return a.readDouble();
- case 5:
- return a.readUTF();
- case 6:
- for (var b = [], d = a.readInt(), c = 0;c < d;c++) {
- b[c] = h(a);
- }
- return b;
- case 7:
- for (b = {};d = a.readUTF();) {
- b[d] = h(a);
- }
- return b;
- case 8:
- return l(a).buffer;
- case 9:
- return l(a);
- case 11:
- ;
- case 10:
- return a = l(a), new q(a.buffer, a.length, 10 === b);
- case 12:
- return new Int32Array(l(a).buffer);
- }
- }
- var t = k.ArrayUtilities.DataBuffer, q = k.ArrayUtilities.PlainObjectDataBuffer, n;
- (function(a) {
- a[a.Undefined = 0] = "Undefined";
- a[a.Null = 1] = "Null";
- a[a.True = 2] = "True";
- a[a.False = 3] = "False";
- a[a.Number = 4] = "Number";
- a[a.String = 5] = "String";
- a[a.Array = 6] = "Array";
- a[a.Object = 7] = "Object";
- a[a.ArrayBuffer = 8] = "ArrayBuffer";
- a[a.Uint8Array = 9] = "Uint8Array";
- a[a.PlainObjectDataBufferLE = 10] = "PlainObjectDataBufferLE";
- a[a.PlainObjectDataBufferBE = 11] = "PlainObjectDataBufferBE";
- a[a.Int32Array = 12] = "Int32Array";
- })(n || (n = {}));
- (function(a) {
- a[a.None = 0] = "None";
- a[a.PlayerCommand = 1] = "PlayerCommand";
- a[a.PlayerCommandAsync = 2] = "PlayerCommandAsync";
- a[a.Frame = 3] = "Frame";
- a[a.Font = 4] = "Font";
- a[a.Image = 5] = "Image";
- a[a.FSCommand = 6] = "FSCommand";
- })(p.MovieRecordType || (p.MovieRecordType = {}));
- n = function() {
- function e(a) {
- this._maxRecordingSize = a;
- this._recording = new t;
- this._recordingStarted = Date.now();
- this._recording.writeRawBytes(new Uint8Array([77, 83, 87, 70]));
- this._stopped = !1;
- }
- e.prototype.stop = function() {
- this._stopped = !0;
- };
- e.prototype.getRecording = function() {
- return new Blob([this._recording.getBytes()], {type:"application/octet-stream"});
- };
- e.prototype.dump = function() {
- (new v(this._recording.getBytes())).dump();
- };
- e.prototype._createRecord = function(a, b) {
- this._stopped || (this._recording.length + 8 + (b ? b.length : 0) >= this._maxRecordingSize ? (console.error("Recording limit reached"), this._stopped = !0) : (this._recording.writeInt(Date.now() - this._recordingStarted), this._recording.writeInt(a), null !== b ? (this._recording.writeInt(b.length), this._recording.writeRawBytes(b.getBytes())) : this._recording.writeInt(0)));
- };
- e.prototype.recordPlayerCommand = function(e, d, c) {
- var f = new t;
- a(f, d);
- f.writeInt(c.length);
- c.forEach(function(c) {
- c = b(c);
- a(f, c);
- });
- this._createRecord(e ? 2 : 1, f);
- };
- e.prototype.recordFrame = function() {
- this._createRecord(3, null);
- };
- e.prototype.recordFont = function(e, d) {
- var c = new t;
- c.writeInt(e);
- a(c, b(d));
- this._createRecord(4, c);
- };
- e.prototype.recordImage = function(e, d, c, f, h) {
- var k = new t;
- k.writeInt(e);
- k.writeInt(d);
- k.writeInt(c);
- a(k, b(f));
- a(k, b(h));
- this._createRecord(5, k);
- };
- e.prototype.recordFSCommand = function(a, b) {
- var c = new t;
- c.writeUTF(a);
- c.writeUTF(b || "");
- this._createRecord(6, c);
- };
- return e;
- }();
- p.MovieRecorder = n;
- var v = function() {
- function a(b) {
- this._buffer = new t;
- this._buffer.writeRawBytes(b);
- this._buffer.position = 4;
- }
- a.prototype.readNextRecord = function() {
- if (this._buffer.position >= this._buffer.length) {
- return 0;
- }
- var a = this._buffer.readInt(), b = this._buffer.readInt(), c = this._buffer.readInt(), e = null;
- 0 < c && (e = new t, this._buffer.readBytes(e, 0, c));
- this.currentTimestamp = a;
- this.currentType = b;
- this.currentData = e;
- return b;
- };
- a.prototype.parsePlayerCommand = function() {
- for (var a = l(this.currentData), b = this.currentData.readInt(), c = [], e = 0;e < b;e++) {
- c.push(r(this.currentData));
- }
- return {updates:a, assets:c};
- };
- a.prototype.parseFSCommand = function() {
- var a = this.currentData.readUTF(), b = this.currentData.readUTF();
- return {command:a, args:b};
- };
- a.prototype.parseFont = function() {
- var a = this.currentData.readInt(), b = r(this.currentData);
- return {syncId:a, data:b};
- };
- a.prototype.parseImage = function() {
- var a = this.currentData.readInt(), b = this.currentData.readInt(), c = this.currentData.readInt(), e = r(this.currentData);
- return {syncId:a, symbolId:b, imageType:c, data:e};
- };
- a.prototype.dump = function() {
- for (var a;a = this.readNextRecord();) {
- switch(console.log("record " + a + " @" + this.currentTimestamp), a) {
- case 1:
- ;
- case 2:
- console.log(this.parsePlayerCommand());
- break;
- case 6:
- console.log(this.parseFSCommand());
- break;
- case 4:
- console.log(this.parseFont());
- break;
- case 5:
- console.log(this.parseImage());
- }
- }
- };
- return a;
- }();
- p.MovieRecordParser = v;
- })(p.Test || (p.Test = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(u) {
- var a = k.ArrayUtilities.DataBuffer, w = function(k) {
- function b(a) {
- k.call(this, a);
- this.alwaysRenderFrame = this.ignoreTimestamps = !1;
- this.cpuTimeRendering = this.cpuTimeUpdates = 0;
- this.onComplete = null;
- }
- __extends(b, k);
- Object.defineProperty(b.prototype, "cpuTime", {get:function() {
- return this.cpuTimeUpdates + this.cpuTimeRendering;
- }, enumerable:!0, configurable:!0});
- b.prototype.playUrl = function(a) {
- var b = new XMLHttpRequest;
- b.open("GET", a, !0);
- b.responseType = "arraybuffer";
- b.onload = function() {
- this.playBytes(new Uint8Array(b.response));
- }.bind(this);
- b.send();
- };
- b.prototype.playBytes = function(a) {
- this._parser = new u.MovieRecordParser(a);
- this._lastTimestamp = 0;
- this._parseNext();
- };
- b.prototype.onSendUpdates = function(a, b) {
- };
- b.prototype.onDisplayParameters = function(a) {
- };
- b.prototype.onVideoPlaybackEvent = function(a, b, h) {
- };
- b.prototype._parseNext = function() {
- if (0 !== this._parser.readNextRecord()) {
- var a = this._runRecord.bind(this), b = this._parser.currentTimestamp - this._lastTimestamp;
- this._lastTimestamp = this._parser.currentTimestamp;
- 5 > b ? Promise.resolve(void 0).then(a) : this.ignoreTimestamps ? setTimeout(a) : setTimeout(a, b);
- } else {
- if (this.onComplete) {
- this.onComplete();
- }
- }
- };
- b.prototype._runRecord = function() {
- var b, k = performance.now();
- switch(this._parser.currentType) {
- case 1:
- ;
- case 2:
- b = this._parser.parsePlayerCommand();
- var h = 2 === this._parser.currentType, m = a.FromArrayBuffer(b.updates.buffer);
- h ? this.processUpdates(m, b.assets) : (h = new a, this.processUpdates(m, b.assets, h));
- break;
- case 3:
- this.processFrame();
- break;
- case 4:
- b = this._parser.parseFont();
- this.processRegisterFont(b.syncId, b.data, function() {
- });
- break;
- case 5:
- b = this._parser.parseImage();
- this.processRegisterImage(b.syncId, b.symbolId, b.imageType, b.data, b.alphaData, function() {
- });
- break;
- case 6:
- b = this._parser.parseFSCommand();
- this.processFSCommand(b.command, b.args);
- break;
- default:
- throw Error("Invalid movie record type");;
- }
- this.cpuTimeUpdates += performance.now() - k;
- 3 === this._parser.currentType && this.alwaysRenderFrame ? requestAnimationFrame(this._renderFrameJustAfterRAF.bind(this)) : this._parseNext();
- };
- b.prototype._renderFrameJustAfterRAF = function() {
- var a = performance.now();
- this.easel.render();
- this.cpuTimeRendering += performance.now() - a;
- this._parseNext();
- };
- return b;
- }(p.EaselHost);
- u.PlaybackEaselHost = w;
- })(p.Test || (p.Test = {}));
- })(k.GFX || (k.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(k) {
- (function(p) {
- (function(p) {
- var a = function(a) {
- function k(b, l, m) {
- void 0 === m && (m = 0);
- a.call(this, b, l);
- this._recorder = null;
- this._recorder = new p.MovieRecorder(m);
- }
- __extends(k, a);
- Object.defineProperty(k.prototype, "recorder", {get:function() {
- return this._recorder;
- }, enumerable:!0, configurable:!0});
- k.prototype._onWindowMessage = function(b, k) {
- switch(b.type) {
- case "player":
- this._recorder.recordPlayerCommand(k, b.updates, b.assets);
- break;
- case "frame":
- this._recorder.recordFrame();
- break;
- case "registerFont":
- this._recorder.recordFont(b.syncId, b.data);
- break;
- case "registerImage":
- this._recorder.recordImage(b.syncId, b.symbolId, b.imageType, b.data, b.alphaData);
- break;
- case "fscommand":
- this._recorder.recordFSCommand(b.command, b.args);
- }
- return a.prototype._onWindowMessage.call(this, b, k);
- };
- return k;
- }(k.GFX.Window.WindowEaselHost);
- p.RecordingEaselHost = a;
- })(p.Test || (p.Test = {}));
- })(k.GFX || (k.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
deleted file mode 100644
index aa68c444a55b..000000000000
--- a/browser/extensions/shumway/content/shumway.player.js
+++ /dev/null
@@ -1,52115 +0,0 @@
-/*
-
- Copyright 2014 Mozilla Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-console.time("Load Player Dependencies");
-console.time("Load Shared Dependencies");
-var Shumway, Shumway$$inline_14 = Shumway || (Shumway = {});
-Shumway$$inline_14.version = "0.11.422";
-Shumway$$inline_14.build = "137ba70";
-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 = function() {
- return Date.now();
-});
-function lazyInitializer(e, b, h) {
- Object.defineProperty(e, b, {get:function() {
- var n = h();
- Object.defineProperty(e, b, {value:n, configurable:!0, enumerable:!0});
- return n;
- }, configurable:!0, enumerable:!0});
-}
-var START_TIME = performance.now();
-(function(e) {
- function b(a) {
- return (a | 0) === a;
- }
- function h(a) {
- return "object" === typeof a || "function" === typeof a;
- }
- function n(a) {
- return String(Number(a)) === a;
- }
- function t(a) {
- var g = 0;
- if ("number" === typeof a) {
- return g = a | 0, a === g && 0 <= g ? !0 : a >>> 0 === a;
- }
- if ("string" !== typeof a) {
- return !1;
- }
- var c = a.length;
- if (0 === c) {
- return !1;
- }
- if ("0" === a) {
- return !0;
- }
- if (c > e.UINT32_CHAR_BUFFER_LENGTH) {
- return !1;
- }
- var d = 0, g = a.charCodeAt(d++) - 48;
- if (1 > g || 9 < g) {
- return !1;
- }
- for (var f = 0, k = 0;d < c;) {
- k = a.charCodeAt(d++) - 48;
- if (0 > k || 9 < k) {
- return !1;
- }
- f = g;
- g = 10 * g + k;
- }
- return f < e.UINT32_MAX_DIV_10 || f === e.UINT32_MAX_DIV_10 && k <= e.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";
- })(e.CharacterCodes || (e.CharacterCodes = {}));
- e.UINT32_CHAR_BUFFER_LENGTH = 10;
- e.UINT32_MAX = 4294967295;
- e.UINT32_MAX_DIV_10 = 429496729;
- e.UINT32_MAX_MOD_10 = 5;
- e.isString = function(a) {
- return "string" === typeof a;
- };
- e.isFunction = function(a) {
- return "function" === typeof a;
- };
- e.isNumber = function(a) {
- return "number" === typeof a;
- };
- e.isInteger = b;
- e.isArray = function(a) {
- return a instanceof Array;
- };
- e.isNumberOrString = function(a) {
- return "number" === typeof a || "string" === typeof a;
- };
- e.isObject = h;
- e.toNumber = function(a) {
- return +a;
- };
- e.isNumericString = n;
- e.isNumeric = function(a) {
- if ("number" === typeof a) {
- return !0;
- }
- if ("string" === typeof a) {
- var g = a.charCodeAt(0);
- return 65 <= g && 90 >= g || 97 <= g && 122 >= g || 36 === g || 95 === g ? !1 : t(a) || n(a);
- }
- return !1;
- };
- e.isIndex = t;
- e.isNullOrUndefined = function(a) {
- return void 0 == a;
- };
- e.argumentsToString = function(a) {
- for (var g = [], c = 0;c < a.length;c++) {
- var d = a[c];
- try {
- var f;
- f = "object" === typeof d && d ? "toString" in d ? d.toString() : Object.prototype.toString.call(d) : d + "";
- g.push(f);
- } catch (k) {
- g.push("");
- }
- }
- return g.join(", ");
- };
- var m;
- (function(a) {
- a.error = function(a) {
- console.error(a);
- throw Error(a);
- };
- a.assert = function(g, c) {
- void 0 === c && (c = "assertion failed");
- "" === g && (g = !0);
- if (!g) {
- if ("undefined" !== typeof console && "assert" in console) {
- throw console.assert(!1, c), Error(c);
- }
- a.error(c.toString());
- }
- };
- a.assertUnreachable = function(a) {
- var g = Error().stack.split("\n")[1];
- throw Error("Reached unreachable location " + g + a);
- };
- a.assertNotImplemented = function(g, c) {
- g || a.error("notImplemented: " + c);
- };
- var g = Object.create(null);
- a.warning = function(a, g, c) {
- };
- a.warnCounts = function() {
- var a = [], c;
- for (c in g) {
- a.push({key:c, count:g[c]});
- }
- a.sort(function(a, g) {
- return g.count - a.count;
- });
- return a.reduce(function(a, g) {
- return a + ("\n" + g.count + "\t" + g.key);
- }, "");
- };
- a.notUsed = function(a) {
- };
- a.notImplemented = function(a) {
- };
- a.dummyConstructor = function(a) {
- };
- a.abstractMethod = function(a) {
- };
- var c = {};
- a.somewhatImplemented = function(g) {
- c[g] || (c[g] = !0, a.warning("somewhatImplemented: " + g));
- };
- a.unexpected = function(g) {
- a.assert(!1, "Unexpected: " + g);
- };
- a.unexpectedCase = function(g) {
- a.assert(!1, "Unexpected Case: " + g);
- };
- })(m = e.Debug || (e.Debug = {}));
- e.getTicks = function() {
- return performance.now();
- };
- (function(a) {
- function g(a, g) {
- for (var c = 0, d = a.length;c < d;c++) {
- if (a[c] === g) {
- return c;
- }
- }
- a.push(g);
- return a.length - 1;
- }
- a.popManyInto = function(a, g, c) {
- for (var d = g - 1;0 <= d;d--) {
- c[d] = a.pop();
- }
- c.length = g;
- };
- a.popMany = function(a, g) {
- var c = a.length - g, d = a.slice(c, this.length);
- a.length = c;
- return d;
- };
- a.popManyIntoVoid = function(a, g) {
- a.length -= g;
- };
- a.pushMany = function(a, g) {
- for (var c = 0;c < g.length;c++) {
- a.push(g[c]);
- }
- };
- a.top = function(a) {
- return a.length && a[a.length - 1];
- };
- a.last = function(a) {
- return a.length && a[a.length - 1];
- };
- a.peek = function(a) {
- return a[a.length - 1];
- };
- a.indexOf = function(a, g) {
- for (var c = 0, d = a.length;c < d;c++) {
- if (a[c] === g) {
- return c;
- }
- }
- return -1;
- };
- a.equals = function(a, g) {
- if (a.length !== g.length) {
- return !1;
- }
- for (var c = 0;c < a.length;c++) {
- if (a[c] !== g[c]) {
- return !1;
- }
- }
- return !0;
- };
- a.pushUnique = g;
- a.unique = function(a) {
- for (var c = [], d = 0;d < a.length;d++) {
- g(c, a[d]);
- }
- return c;
- };
- a.copyFrom = function(g, c) {
- g.length = 0;
- a.pushMany(g, c);
- };
- a.ensureTypedArrayCapacity = function(a, g) {
- if (a.length < g) {
- var c = a;
- a = new a.constructor(e.IntegerUtilities.nearestPowerOfTwo(g));
- a.set(c, 0);
- }
- return a;
- };
- a.memCopy = function(a, g, c, d, q) {
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- void 0 === q && (q = 0);
- 0 < d || 0 < q && q < g.length ? (0 >= q && (q = g.length - d), a.set(g.subarray(d, d + q), c)) : a.set(g, c);
- };
- var c = function() {
- function a(g) {
- void 0 === g && (g = 16);
- this._f32 = this._i32 = this._u16 = this._u8 = null;
- this._offset = 0;
- this.ensureCapacity(g);
- }
- a.prototype.reset = function() {
- this._offset = 0;
- };
- Object.defineProperty(a.prototype, "offset", {get:function() {
- return this._offset;
- }, enumerable:!0, configurable:!0});
- a.prototype.getIndex = function(a) {
- return this._offset / a;
- };
- a.prototype.ensureAdditionalCapacity = function(a) {
- this.ensureCapacity(this._offset + a);
- };
- a.prototype.ensureCapacity = function(a) {
- if (!this._u8) {
- this._u8 = new Uint8Array(a);
- } else {
- if (this._u8.length > a) {
- return;
- }
- }
- var g = 2 * this._u8.length;
- g < a && (g = a);
- a = new Uint8Array(g);
- a.set(this._u8, 0);
- this._u8 = a;
- this._u16 = new Uint16Array(a.buffer);
- this._i32 = new Int32Array(a.buffer);
- this._f32 = new Float32Array(a.buffer);
- };
- a.prototype.writeInt = function(a) {
- this.ensureCapacity(this._offset + 4);
- this.writeIntUnsafe(a);
- };
- a.prototype.writeIntAt = function(a, g) {
- this.ensureCapacity(g + 4);
- this._i32[g >> 2] = a;
- };
- a.prototype.writeIntUnsafe = function(a) {
- this._i32[this._offset >> 2] = a;
- this._offset += 4;
- };
- a.prototype.writeFloat = function(a) {
- this.ensureCapacity(this._offset + 4);
- this.writeFloatUnsafe(a);
- };
- a.prototype.writeFloatUnsafe = function(a) {
- this._f32[this._offset >> 2] = a;
- this._offset += 4;
- };
- a.prototype.write4Floats = function(a, g, c, d) {
- this.ensureCapacity(this._offset + 16);
- this.write4FloatsUnsafe(a, g, c, d);
- };
- a.prototype.write4FloatsUnsafe = function(a, g, c, d) {
- var q = this._offset >> 2;
- this._f32[q + 0] = a;
- this._f32[q + 1] = g;
- this._f32[q + 2] = c;
- this._f32[q + 3] = d;
- this._offset += 16;
- };
- a.prototype.write6Floats = function(a, g, c, d, q, p) {
- this.ensureCapacity(this._offset + 24);
- this.write6FloatsUnsafe(a, g, c, d, q, p);
- };
- a.prototype.write6FloatsUnsafe = function(a, g, c, d, q, p) {
- var f = this._offset >> 2;
- this._f32[f + 0] = a;
- this._f32[f + 1] = g;
- this._f32[f + 2] = c;
- this._f32[f + 3] = d;
- this._f32[f + 4] = q;
- this._f32[f + 5] = p;
- this._offset += 24;
- };
- a.prototype.subF32View = function() {
- return this._f32.subarray(0, this._offset >> 2);
- };
- a.prototype.subI32View = function() {
- return this._i32.subarray(0, this._offset >> 2);
- };
- a.prototype.subU16View = function() {
- return this._u16.subarray(0, this._offset >> 1);
- };
- a.prototype.subU8View = function() {
- return this._u8.subarray(0, this._offset);
- };
- a.prototype.hashWords = function(a, g, c) {
- g = this._i32;
- for (var d = 0;d < c;d++) {
- a = (31 * a | 0) + g[d] | 0;
- }
- return a;
- };
- a.prototype.reserve = function(a) {
- a = a + 3 & -4;
- this.ensureCapacity(this._offset + a);
- this._offset += a;
- };
- return a;
- }();
- a.ArrayWriter = c;
- })(e.ArrayUtilities || (e.ArrayUtilities = {}));
- var l = function() {
- function a(g) {
- this._u8 = new Uint8Array(g);
- this._u16 = new Uint16Array(g);
- this._i32 = new Int32Array(g);
- this._f32 = new Float32Array(g);
- this._offset = 0;
- }
- Object.defineProperty(a.prototype, "offset", {get:function() {
- return this._offset;
- }, enumerable:!0, configurable:!0});
- a.prototype.isEmpty = function() {
- return this._offset === this._u8.length;
- };
- a.prototype.readInt = function() {
- var a = this._i32[this._offset >> 2];
- this._offset += 4;
- return a;
- };
- a.prototype.readFloat = function() {
- var a = this._f32[this._offset >> 2];
- this._offset += 4;
- return a;
- };
- return a;
- }();
- e.ArrayReader = l;
- (function(a) {
- function g(a, g) {
- return Object.prototype.hasOwnProperty.call(a, g);
- }
- function c(a, d) {
- for (var q in d) {
- g(d, q) && (a[q] = d[q]);
- }
- }
- a.boxValue = function(a) {
- return void 0 == a || h(a) ? a : Object(a);
- };
- a.toKeyValueArray = function(a) {
- var g = Object.prototype.hasOwnProperty, c = [], d;
- for (d in a) {
- g.call(a, d) && c.push([d, a[d]]);
- }
- return c;
- };
- a.isPrototypeWriteable = function(a) {
- return Object.getOwnPropertyDescriptor(a, "prototype").writable;
- };
- a.hasOwnProperty = g;
- a.propertyIsEnumerable = function(a, g) {
- return Object.prototype.propertyIsEnumerable.call(a, g);
- };
- a.getPropertyDescriptor = function(a, g) {
- do {
- var c = Object.getOwnPropertyDescriptor(a, g);
- if (c) {
- return c;
- }
- a = Object.getPrototypeOf(a);
- } while (a);
- return null;
- };
- a.hasOwnGetter = function(a, g) {
- var c = Object.getOwnPropertyDescriptor(a, g);
- return !(!c || !c.get);
- };
- a.getOwnGetter = function(a, g) {
- var c = Object.getOwnPropertyDescriptor(a, g);
- return c ? c.get : null;
- };
- a.hasOwnSetter = function(a, g) {
- var c = Object.getOwnPropertyDescriptor(a, g);
- return !(!c || !c.set);
- };
- a.createMap = function() {
- return Object.create(null);
- };
- a.createArrayMap = function() {
- return [];
- };
- a.defineReadOnlyProperty = function(a, g, c) {
- Object.defineProperty(a, g, {value:c, writable:!1, configurable:!0, enumerable:!1});
- };
- a.getOwnPropertyDescriptors = function(g) {
- for (var c = a.createMap(), d = Object.getOwnPropertyNames(g), p = 0;p < d.length;p++) {
- c[d[p]] = Object.getOwnPropertyDescriptor(g, d[p]);
- }
- return c;
- };
- a.cloneObject = function(a) {
- var g = Object.create(Object.getPrototypeOf(a));
- c(g, a);
- return g;
- };
- a.copyProperties = function(a, g) {
- for (var c in g) {
- a[c] = g[c];
- }
- };
- a.copyOwnProperties = c;
- a.copyOwnPropertyDescriptors = function(a, c, d, q, p) {
- void 0 === d && (d = null);
- void 0 === q && (q = !0);
- void 0 === p && (p = !1);
- for (var f in c) {
- if (g(c, f) && (!d || d(f))) {
- var k = Object.getOwnPropertyDescriptor(c, f);
- if (q || !g(a, f)) {
- try {
- p && !1 === k.writable && (k.writable = !0), Object.defineProperty(a, f, k);
- } catch (u) {
- m.assert("Can't define: " + f);
- }
- }
- }
- }
- };
- a.copyPropertiesByList = function(a, g, c) {
- for (var d = 0;d < c.length;d++) {
- var q = c[d];
- a[q] = g[q];
- }
- };
- a.getLatestGetterOrSetterPropertyDescriptor = function(a, g) {
- for (var c = {};a;) {
- var d = Object.getOwnPropertyDescriptor(a, g);
- d && (c.get = c.get || d.get, c.set = c.set || d.set);
- if (c.get && c.set) {
- break;
- }
- a = Object.getPrototypeOf(a);
- }
- return c;
- };
- a.defineNonEnumerableGetterOrSetter = function(g, c, d, p) {
- var f = a.getLatestGetterOrSetterPropertyDescriptor(g, c);
- f.configurable = !0;
- f.enumerable = !1;
- p ? f.get = d : f.set = d;
- Object.defineProperty(g, c, f);
- };
- a.defineNonEnumerableGetter = function(a, g, c) {
- Object.defineProperty(a, g, {get:c, configurable:!0, enumerable:!1});
- };
- a.defineNonEnumerableSetter = function(a, g, c) {
- Object.defineProperty(a, g, {set:c, configurable:!0, enumerable:!1});
- };
- a.defineNonEnumerableProperty = function(a, g, c) {
- Object.defineProperty(a, g, {value:c, writable:!0, configurable:!0, enumerable:!1});
- };
- a.defineNonEnumerableForwardingProperty = function(a, g, c) {
- Object.defineProperty(a, g, {get:d.makeForwardingGetter(c), set:d.makeForwardingSetter(c), writable:!0, configurable:!0, enumerable:!1});
- };
- a.defineNewNonEnumerableProperty = function(g, c, d) {
- a.defineNonEnumerableProperty(g, c, d);
- };
- a.createPublicAliases = function(a, g) {
- for (var c = {value:null, writable:!0, configurable:!0, enumerable:!1}, d = 0;d < g.length;d++) {
- var q = g[d];
- c.value = a[q];
- Object.defineProperty(a, "$Bg" + q, c);
- }
- };
- })(e.ObjectUtilities || (e.ObjectUtilities = {}));
- var d;
- (function(a) {
- a.makeForwardingGetter = function(a) {
- return new Function('return this["' + a + '"]//# sourceURL=fwd-get-' + a + ".as");
- };
- a.makeForwardingSetter = function(a) {
- return new Function("value", 'this["' + a + '"] = value;//# sourceURL=fwd-set-' + a + ".as");
- };
- a.bindSafely = function(a, c) {
- function d() {
- return a.apply(c, arguments);
- }
- d.boundTo = c;
- return d;
- };
- })(d = e.FunctionUtilities || (e.FunctionUtilities = {}));
- (function(a) {
- function g(a) {
- return "string" === typeof a ? '"' + a + '"' : "number" === typeof a || "boolean" === typeof a ? String(a) : a instanceof Array ? "[] " + a.length : typeof a;
- }
- function c(a, g, d) {
- f[0] = a;
- f[1] = g;
- f[2] = d;
- return f.join("");
- }
- function d(a, g, c, f) {
- k[0] = a;
- k[1] = g;
- k[2] = c;
- k[3] = f;
- return k.join("");
- }
- a.repeatString = function(a, g) {
- for (var c = "", d = 0;d < g;d++) {
- c += a;
- }
- return c;
- };
- a.memorySizeToString = function(a) {
- a |= 0;
- return 1024 > a ? a + " B" : 1048576 > a ? (a / 1024).toFixed(2) + "KB" : (a / 1048576).toFixed(2) + "MB";
- };
- a.toSafeString = g;
- a.toSafeArrayString = function(a) {
- for (var c = [], d = 0;d < a.length;d++) {
- c.push(g(a[d]));
- }
- return c.join(", ");
- };
- a.utf8decode = function(a) {
- for (var g = new Uint8Array(4 * a.length), c = 0, d = 0, f = a.length;d < f;d++) {
- var p = a.charCodeAt(d);
- if (127 >= p) {
- g[c++] = p;
- } else {
- if (55296 <= p && 56319 >= p) {
- var q = a.charCodeAt(d + 1);
- 56320 <= q && 57343 >= q && (p = ((p & 1023) << 10) + (q & 1023) + 65536, ++d);
- }
- 0 !== (p & 4292870144) ? (g[c++] = 248 | p >>> 24 & 3, g[c++] = 128 | p >>> 18 & 63, g[c++] = 128 | p >>> 12 & 63, g[c++] = 128 | p >>> 6 & 63) : 0 !== (p & 4294901760) ? (g[c++] = 240 | p >>> 18 & 7, g[c++] = 128 | p >>> 12 & 63, g[c++] = 128 | p >>> 6 & 63) : 0 !== (p & 4294965248) ? (g[c++] = 224 | p >>> 12 & 15, g[c++] = 128 | p >>> 6 & 63) : g[c++] = 192 | p >>> 6 & 31;
- g[c++] = 128 | p & 63;
- }
- }
- return g.subarray(0, c);
- };
- a.utf8encode = function(a) {
- for (var g = 0, c = "";g < a.length;) {
- var d = a[g++] & 255;
- if (127 >= d) {
- c += String.fromCharCode(d);
- } else {
- var p = 192, f = 5;
- do {
- if ((d & (p >> 1 | 128)) === p) {
- break;
- }
- p = p >> 1 | 128;
- --f;
- } while (0 <= f);
- if (0 >= f) {
- c += String.fromCharCode(d);
- } else {
- for (var d = d & (1 << f) - 1, p = !1, q = 5;q >= f;--q) {
- var v = a[g++];
- if (128 != (v & 192)) {
- p = !0;
- break;
- }
- d = d << 6 | v & 63;
- }
- if (p) {
- for (f = g - (7 - q);f < g;++f) {
- c += String.fromCharCode(a[f] & 255);
- }
- } else {
- c = 65536 <= d ? c + String.fromCharCode(d - 65536 >> 10 & 1023 | 55296, d & 1023 | 56320) : c + String.fromCharCode(d);
- }
- }
- }
- }
- return c;
- };
- a.base64ArrayBuffer = function(a) {
- var g = "";
- a = new Uint8Array(a);
- for (var f = a.byteLength, q = f % 3, f = f - q, k, u, b, r, z = 0;z < f;z += 3) {
- r = a[z] << 16 | a[z + 1] << 8 | a[z + 2], k = (r & 16515072) >> 18, u = (r & 258048) >> 12, b = (r & 4032) >> 6, r &= 63, g += d("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[k], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[u], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[b], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[r]);
- }
- 1 == q ? (r = a[f], g += c("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r & 252) >> 2], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r & 3) << 4], "==")) : 2 == q && (r = a[f] << 8 | a[f + 1], g += d("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r & 64512) >> 10], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r & 1008) >> 4], "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(r & 15) <<
- 2], "="));
- return g;
- };
- a.escapeString = function(a) {
- void 0 !== a && (a = a.replace(/[^\w$]/gi, "$"), /^\d/.test(a) && (a = "$" + a));
- return a;
- };
- a.fromCharCodeArray = function(a) {
- for (var g = "", c = 0;c < a.length;c += 16384) {
- var d = Math.min(a.length - c, 16384), g = g + String.fromCharCode.apply(null, a.subarray(c, c + d))
- }
- return g;
- };
- a.variableLengthEncodeInt32 = function(a) {
- for (var g = 32 - Math.clz32(a), c = Math.ceil(g / 6), g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[c], c = c - 1;0 <= c;c--) {
- g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[a >> 6 * c & 63];
- }
- return g;
- };
- a.toEncoding = function(a) {
- return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[a];
- };
- a.fromEncoding = function(a) {
- if (65 <= a && 90 >= a) {
- return a - 65;
- }
- if (97 <= a && 122 >= a) {
- return a - 71;
- }
- if (48 <= a && 57 >= a) {
- return a + 4;
- }
- if (36 === a) {
- return 62;
- }
- if (95 === a) {
- return 63;
- }
- };
- a.variableLengthDecodeInt32 = function(g) {
- for (var c = a.fromEncoding(g.charCodeAt(0)), d = 0, f = 0;f < c;f++) {
- var p = 6 * (c - f - 1), d = d | a.fromEncoding(g.charCodeAt(1 + f)) << p
- }
- return d;
- };
- a.trimMiddle = function(a, g) {
- if (a.length <= g) {
- return a;
- }
- var c = g >> 1, d = g - c - 1;
- return a.substr(0, c) + "\u2026" + a.substr(a.length - d, d);
- };
- a.multiple = function(a, g) {
- for (var c = "", d = 0;d < g;d++) {
- c += a;
- }
- return c;
- };
- a.indexOfAny = function(a, g, c) {
- for (var d = a.length, f = 0;f < g.length;f++) {
- var p = a.indexOf(g[f], c);
- 0 <= p && (d = Math.min(d, p));
- }
- return d === a.length ? -1 : d;
- };
- var f = Array(3), k = Array(4), u = Array(5), b = Array(6), r = Array(7), l = Array(8), n = Array(9);
- a.concat3 = c;
- a.concat4 = d;
- a.concat5 = function(a, g, c, d, f) {
- u[0] = a;
- u[1] = g;
- u[2] = c;
- u[3] = d;
- u[4] = f;
- return u.join("");
- };
- a.concat6 = function(a, g, c, d, f, p) {
- b[0] = a;
- b[1] = g;
- b[2] = c;
- b[3] = d;
- b[4] = f;
- b[5] = p;
- return b.join("");
- };
- a.concat7 = function(a, g, c, d, f, p, q) {
- r[0] = a;
- r[1] = g;
- r[2] = c;
- r[3] = d;
- r[4] = f;
- r[5] = p;
- r[6] = q;
- return r.join("");
- };
- a.concat8 = function(a, g, c, d, f, p, q, v) {
- l[0] = a;
- l[1] = g;
- l[2] = c;
- l[3] = d;
- l[4] = f;
- l[5] = p;
- l[6] = q;
- l[7] = v;
- return l.join("");
- };
- a.concat9 = function(a, g, c, d, f, p, q, v, k) {
- n[0] = a;
- n[1] = g;
- n[2] = c;
- n[3] = d;
- n[4] = f;
- n[5] = p;
- n[6] = q;
- n[7] = v;
- n[8] = k;
- return n.join("");
- };
- })(e.StringUtilities || (e.StringUtilities = {}));
- (function(a) {
- var g = 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]), c = 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(a, d, f) {
- var q = 1732584193, k = -271733879, u = -1732584194, b = 271733878, r = f + 72 & -64, l = new Uint8Array(r), n;
- for (n = 0;n < f;++n) {
- l[n] = a[d++];
- }
- l[n++] = 128;
- for (a = r - 8;n < a;) {
- l[n++] = 0;
- }
- l[n++] = f << 3 & 255;
- l[n++] = f >> 5 & 255;
- l[n++] = f >> 13 & 255;
- l[n++] = f >> 21 & 255;
- l[n++] = f >>> 29 & 255;
- l[n++] = 0;
- l[n++] = 0;
- l[n++] = 0;
- a = new Int32Array(16);
- for (n = 0;n < r;) {
- for (f = 0;16 > f;++f, n += 4) {
- a[f] = l[n] | l[n + 1] << 8 | l[n + 2] << 16 | l[n + 3] << 24;
- }
- var h = q;
- d = k;
- var m = u, e = b, t, D;
- for (f = 0;64 > f;++f) {
- 16 > f ? (t = d & m | ~d & e, D = f) : 32 > f ? (t = e & d | ~e & m, D = 5 * f + 1 & 15) : 48 > f ? (t = d ^ m ^ e, D = 3 * f + 5 & 15) : (t = m ^ (d | ~e), D = 7 * f & 15);
- var H = e, h = h + t + c[f] + a[D] | 0;
- t = g[f];
- e = m;
- m = d;
- d = d + (h << t | h >>> 32 - t) | 0;
- h = H;
- }
- q = q + h | 0;
- k = k + d | 0;
- u = u + m | 0;
- b = b + e | 0;
- }
- return q;
- };
- a.hashBytesTo32BitsAdler = function(a, g, c) {
- var d = 1, f = 0;
- for (c = g + c;g < c;++g) {
- d = (d + (a[g] & 255)) % 65521, f = (f + d) % 65521;
- }
- return f << 16 | d;
- };
- a.mixHash = function(a, g) {
- return (31 * a | 0) + g | 0;
- };
- })(e.HashUtilities || (e.HashUtilities = {}));
- var a = function() {
- function a() {
- }
- a.seed = function(g) {
- a._state[0] = g;
- a._state[1] = g;
- };
- a.reset = function() {
- a._state[0] = 57005;
- a._state[1] = 48879;
- };
- a.next = function() {
- var a = this._state, c = Math.imul(18273, a[0] & 65535) + (a[0] >>> 16) | 0;
- a[0] = c;
- var d = Math.imul(36969, a[1] & 65535) + (a[1] >>> 16) | 0;
- a[1] = d;
- a = (c << 16) + (d & 65535) | 0;
- return 2.3283064365386963E-10 * (0 > a ? a + 4294967296 : a);
- };
- a._state = new Uint32Array([57005, 48879]);
- return a;
- }();
- e.Random = a;
- Math.random = function() {
- return a.next();
- };
- e.installTimeWarper = function() {
- var a = Date, g = 1428107694580;
- jsGlobal.Date = function(c, d, f, k, u, b, r) {
- switch(arguments.length) {
- case 0:
- return new a(g);
- case 1:
- return new a(c);
- case 2:
- return new a(c, d);
- case 3:
- return new a(c, d, f);
- case 4:
- return new a(c, d, f, k);
- case 5:
- return new a(c, d, f, k, u);
- case 6:
- return new a(c, d, f, k, u, b);
- default:
- return new a(c, d, f, k, u, b, r);
- }
- };
- jsGlobal.Date.now = function() {
- return g += 10;
- };
- jsGlobal.Date.UTC = function() {
- return a.UTC.apply(a, arguments);
- };
- };
- (function() {
- function a() {
- this.id = "$weakmap" + g++;
- }
- if ("function" !== typeof jsGlobal.WeakMap) {
- var g = 0;
- a.prototype = {has:function(a) {
- return a.hasOwnProperty(this.id);
- }, get:function(a, g) {
- return a.hasOwnProperty(this.id) ? a[this.id] : g;
- }, set:function(a, g) {
- Object.defineProperty(a, this.id, {value:g, enumerable:!1, configurable:!0});
- }, delete:function(a) {
- delete a[this.id];
- }};
- jsGlobal.WeakMap = a;
- }
- })();
- l = function() {
- function a() {
- "undefined" !== typeof ShumwayCom && ShumwayCom.getWeakMapKeys ? (this._map = new WeakMap, this._id = 0, this._newAdditions = []) : this._list = [];
- }
- a.prototype.clear = function() {
- this._map ? this._map = new WeakMap() : this._list.length = 0;
- };
- a.prototype.push = function(a) {
- this._map ? (this._map.set(a, this._id++), this._newAdditions.forEach(function(c) {
- c.push(a);
- })) : this._list.push(a);
- };
- a.prototype.remove = function(a) {
- this._map ? this._map.delete(a) : this._list[this._list.indexOf(a)] = null;
- };
- a.prototype.forEach = function(a) {
- if (this._map) {
- var c = [];
- this._newAdditions.push(c);
- var d = this._map, f = ShumwayCom.getWeakMapKeys(d);
- f.sort(function(a, g) {
- return d.get(a) - d.get(g);
- });
- f.forEach(function(c) {
- 0 !== c._referenceCount && a(c);
- });
- c.forEach(function(c) {
- 0 !== c._referenceCount && a(c);
- });
- this._newAdditions.splice(this._newAdditions.indexOf(c), 1);
- } else {
- for (var c = this._list, q = 0, f = 0;f < c.length;f++) {
- var k = c[f];
- k && (0 === k._referenceCount ? (c[f] = null, q++) : a(k));
- }
- if (16 < q && q > c.length >> 2) {
- q = [];
- for (f = 0;f < c.length;f++) {
- (k = c[f]) && 0 < k._referenceCount && q.push(k);
- }
- this._list = q;
- }
- }
- };
- Object.defineProperty(a.prototype, "length", {get:function() {
- return this._map ? -1 : this._list.length;
- }, enumerable:!0, configurable:!0});
- return a;
- }();
- e.WeakList = l;
- var c;
- (function(a) {
- a.pow2 = function(a) {
- return a === (a | 0) ? 0 > a ? 1 / (1 << -a) : 1 << a : Math.pow(2, a);
- };
- a.clamp = function(a, c, d) {
- return Math.max(c, Math.min(d, a));
- };
- a.roundHalfEven = function(a) {
- if (.5 === Math.abs(a % 1)) {
- var c = Math.floor(a);
- return 0 === c % 2 ? c : Math.ceil(a);
- }
- return Math.round(a);
- };
- a.altTieBreakRound = function(a, c) {
- return .5 !== Math.abs(a % 1) || c ? Math.round(a) : a | 0;
- };
- a.epsilonEquals = function(a, c) {
- return 1E-7 > Math.abs(a - c);
- };
- })(c = e.NumberUtilities || (e.NumberUtilities = {}));
- (function(a) {
- a[a.MaxU16 = 65535] = "MaxU16";
- a[a.MaxI16 = 32767] = "MaxI16";
- a[a.MinI16 = -32768] = "MinI16";
- })(e.Numbers || (e.Numbers = {}));
- var f;
- (function(a) {
- function g(a) {
- return 256 * a << 16 >> 16;
- }
- function c(a) {
- return a / 256;
- }
- var d = new ArrayBuffer(8);
- a.i8 = new Int8Array(d);
- a.u8 = new Uint8Array(d);
- a.i32 = new Int32Array(d);
- a.f32 = new Float32Array(d);
- a.f64 = new Float64Array(d);
- a.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
- a.floatToInt32 = function(g) {
- a.f32[0] = g;
- return a.i32[0];
- };
- a.int32ToFloat = function(g) {
- a.i32[0] = g;
- return a.f32[0];
- };
- a.swap16 = function(a) {
- return (a & 255) << 8 | a >> 8 & 255;
- };
- a.swap32 = function(a) {
- return (a & 255) << 24 | (a & 65280) << 8 | a >> 8 & 65280 | a >> 24 & 255;
- };
- a.toS8U8 = g;
- a.fromS8U8 = c;
- a.clampS8U8 = function(a) {
- return c(g(a));
- };
- a.toS16 = function(a) {
- return a << 16 >> 16;
- };
- a.bitCount = function(a) {
- a -= a >> 1 & 1431655765;
- a = (a & 858993459) + (a >> 2 & 858993459);
- return 16843009 * (a + (a >> 4) & 252645135) >> 24;
- };
- a.ones = function(a) {
- a -= a >> 1 & 1431655765;
- a = (a & 858993459) + (a >> 2 & 858993459);
- return 16843009 * (a + (a >> 4) & 252645135) >> 24;
- };
- a.trailingZeros = function(g) {
- return a.ones((g & -g) - 1);
- };
- a.getFlags = function(a, g) {
- var c = "";
- for (a = 0;a < g.length;a++) {
- a & 1 << a && (c += g[a] + " ");
- }
- return 0 === c.length ? "" : c.trim();
- };
- a.isPowerOfTwo = function(a) {
- return a && 0 === (a & a - 1);
- };
- a.roundToMultipleOfFour = function(a) {
- return a + 3 & -4;
- };
- a.nearestPowerOfTwo = function(a) {
- a--;
- a |= a >> 1;
- a |= a >> 2;
- a |= a >> 4;
- a |= a >> 8;
- a |= a >> 16;
- a++;
- return a;
- };
- a.roundToMultipleOfPowerOfTwo = function(a, g) {
- var c = (1 << g) - 1;
- return a + c & ~c;
- };
- a.toHEX = function(a) {
- return "0x" + ("00000000" + (0 > a ? 4294967295 + a + 1 : a).toString(16)).substr(-8);
- };
- Math.imul || (Math.imul = function(a, g) {
- var c = a & 65535, d = g & 65535;
- return c * d + ((a >>> 16 & 65535) * d + c * (g >>> 16 & 65535) << 16 >>> 0) | 0;
- });
- Math.clz32 || (Math.clz32 = function(g) {
- g |= g >> 1;
- g |= g >> 2;
- g |= g >> 4;
- g |= g >> 8;
- return 32 - a.ones(g | g >> 16);
- });
- })(f = e.IntegerUtilities || (e.IntegerUtilities = {}));
- (function(a) {
- function g(a, g, c, d, f, q) {
- return (c - a) * (q - g) - (d - g) * (f - a);
- }
- a.pointInPolygon = function(a, g, c) {
- for (var d = 0, f = c.length - 2, q = 0;q < f;q += 2) {
- var k = c[q + 0], u = c[q + 1], b = c[q + 2], r = c[q + 3];
- (u <= g && r > g || u > g && r <= g) && a < k + (g - u) / (r - u) * (b - k) && d++;
- }
- return 1 === (d & 1);
- };
- a.signedArea = g;
- a.counterClockwise = function(a, c, d, f, q, k) {
- return 0 < g(a, c, d, f, q, k);
- };
- a.clockwise = function(a, c, d, f, q, k) {
- return 0 > g(a, c, d, f, q, k);
- };
- a.pointInPolygonInt32 = function(a, g, c) {
- a |= 0;
- g |= 0;
- for (var d = 0, f = c.length - 2, q = 0;q < f;q += 2) {
- var k = c[q + 0], u = c[q + 1], b = c[q + 2], r = c[q + 3];
- (u <= g && r > g || u > g && r <= g) && a < k + (g - u) / (r - u) * (b - k) && d++;
- }
- return 1 === (d & 1);
- };
- })(e.GeometricUtilities || (e.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";
- })(e.LogLevel || (e.LogLevel = {}));
- l = function() {
- function a(g, c) {
- void 0 === g && (g = !1);
- this._tab = " ";
- this._padding = "";
- this._suppressOutput = g;
- this._out = c || a._consoleOut;
- this._outNoNewline = c || a._consoleOutNoNewline;
- }
- Object.defineProperty(a.prototype, "suppressOutput", {get:function() {
- return this._suppressOutput;
- }, set:function(a) {
- this._suppressOutput = a;
- }, enumerable:!0, configurable:!0});
- a.prototype.write = function(a, c) {
- void 0 === a && (a = "");
- void 0 === c && (c = !1);
- this._suppressOutput || this._outNoNewline((c ? this._padding : "") + a);
- };
- a.prototype.writeLn = function(a) {
- void 0 === a && (a = "");
- this._suppressOutput || this._out(this._padding + a);
- };
- a.prototype.writeObject = function(a, c) {
- void 0 === a && (a = "");
- this._suppressOutput || this._out(this._padding + a, c);
- };
- a.prototype.writeTimeLn = function(a) {
- void 0 === a && (a = "");
- this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + a);
- };
- a.prototype.writeComment = function(a) {
- a = (a || "").split("\n");
- if (1 === a.length) {
- this.writeLn("// " + a[0]);
- } else {
- this.writeLn("/**");
- for (var c = 0;c < a.length;c++) {
- this.writeLn(" * " + a[c]);
- }
- this.writeLn(" */");
- }
- };
- a.prototype.writeLns = function(a) {
- a = (a || "").split("\n");
- for (var c = 0;c < a.length;c++) {
- this.writeLn(a[c]);
- }
- };
- a.prototype.errorLn = function(g) {
- a.logLevel & 1 && this.boldRedLn(g);
- };
- a.prototype.warnLn = function(g) {
- a.logLevel & 2 && this.yellowLn(g);
- };
- a.prototype.debugLn = function(g) {
- a.logLevel & 4 && this.purpleLn(g);
- };
- a.prototype.logLn = function(g) {
- a.logLevel & 8 && this.writeLn(g);
- };
- a.prototype.infoLn = function(g) {
- a.logLevel & 16 && this.writeLn(g);
- };
- a.prototype.yellowLn = function(g) {
- this.colorLn(a.YELLOW, g);
- };
- a.prototype.greenLn = function(g) {
- this.colorLn(a.GREEN, g);
- };
- a.prototype.boldRedLn = function(g) {
- this.colorLn(a.BOLD_RED, g);
- };
- a.prototype.redLn = function(g) {
- this.colorLn(a.RED, g);
- };
- a.prototype.purpleLn = function(g) {
- this.colorLn(a.PURPLE, g);
- };
- a.prototype.colorLn = function(g, c) {
- this._suppressOutput || (inBrowser ? this._out(this._padding + c) : this._out(this._padding + g + c + a.ENDC));
- };
- a.prototype.redLns = function(g) {
- this.colorLns(a.RED, g);
- };
- a.prototype.colorLns = function(a, c) {
- for (var d = (c || "").split("\n"), f = 0;f < d.length;f++) {
- this.colorLn(a, d[f]);
- }
- };
- a.prototype.enter = function(a) {
- this._suppressOutput || this._out(this._padding + a);
- this.indent();
- };
- a.prototype.leaveAndEnter = function(a) {
- this.leave(a);
- this.indent();
- };
- a.prototype.leave = function(a) {
- this.outdent();
- !this._suppressOutput && a && this._out(this._padding + a);
- };
- a.prototype.indent = function() {
- this._padding += this._tab;
- };
- a.prototype.outdent = function() {
- 0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length));
- };
- a.prototype.writeArray = function(a, c, d) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- c = c || !1;
- for (var f = 0, q = a.length;f < q;f++) {
- var k = "";
- c && (k = null === a[f] ? "null" : void 0 === a[f] ? "undefined" : a[f].constructor.name, k += " ");
- var u = d ? "" : ("" + f).padRight(" ", 4);
- this.writeLn(u + k + a[f]);
- }
- };
- 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.log.bind(console);
- a._consoleOutNoNewline = console.log.bind(console);
- return a;
- }();
- e.IndentingWriter = l;
- var k = function() {
- return function(a, g) {
- this.value = a;
- this.next = g;
- };
- }(), l = function() {
- function a(g) {
- this._compare = g;
- this._head = null;
- this._length = 0;
- }
- a.prototype.push = function(a) {
- this._length++;
- if (this._head) {
- var c = this._head, d = null;
- a = new k(a, null);
- for (var f = this._compare;c;) {
- if (0 < f(c.value, a.value)) {
- d ? (a.next = c, d.next = a) : (a.next = this._head, this._head = a);
- return;
- }
- d = c;
- c = c.next;
- }
- d.next = a;
- } else {
- this._head = new k(a, null);
- }
- };
- a.prototype.forEach = function(g) {
- for (var c = this._head, d = null;c;) {
- var f = g(c.value);
- if (f === a.RETURN) {
- break;
- } else {
- f === a.DELETE ? c = d ? d.next = c.next : this._head = this._head.next : (d = c, c = c.next);
- }
- }
- };
- a.prototype.isEmpty = function() {
- return !this._head;
- };
- a.prototype.pop = function() {
- if (this._head) {
- this._length--;
- var a = this._head;
- this._head = this._head.next;
- return a.value;
- }
- };
- a.prototype.contains = function(a) {
- for (var c = this._head;c;) {
- if (c.value === a) {
- return !0;
- }
- c = c.next;
- }
- return !1;
- };
- a.prototype.toString = function() {
- for (var a = "[", c = this._head;c;) {
- a += c.value.toString(), (c = c.next) && (a += ",");
- }
- return a + "]";
- };
- a.RETURN = 1;
- a.DELETE = 2;
- return a;
- }();
- e.SortedList = l;
- l = function() {
- function a(g, c) {
- void 0 === c && (c = 12);
- this.start = this.index = 0;
- this._size = 1 << c;
- this._mask = this._size - 1;
- this.array = new g(this._size);
- }
- a.prototype.get = function(a) {
- return this.array[a];
- };
- a.prototype.forEachInReverse = function(a) {
- if (!this.isEmpty()) {
- for (var c = 0 === this.index ? this._size - 1 : this.index - 1, d = this.start - 1 & this._mask;c !== d && !a(this.array[c], c);) {
- c = 0 === c ? this._size - 1 : c - 1;
- }
- }
- };
- a.prototype.write = function(a) {
- this.array[this.index] = a;
- this.index = this.index + 1 & this._mask;
- this.index === this.start && (this.start = this.start + 1 & this._mask);
- };
- a.prototype.isFull = function() {
- return (this.index + 1 & this._mask) === this.start;
- };
- a.prototype.isEmpty = function() {
- return this.index === this.start;
- };
- a.prototype.reset = function() {
- this.start = this.index = 0;
- };
- return a;
- }();
- e.CircularBuffer = l;
- (function(a) {
- function g(g) {
- return g + (a.BITS_PER_WORD - 1) >> a.ADDRESS_BITS_PER_WORD << a.ADDRESS_BITS_PER_WORD;
- }
- function c(a, g) {
- a = a || "1";
- g = g || "0";
- for (var d = "", f = 0;f < length;f++) {
- d += this.get(f) ? a : g;
- }
- return d;
- }
- function d(a) {
- for (var g = [], c = 0;c < length;c++) {
- this.get(c) && g.push(a ? a[c] : c);
- }
- return g.join(", ");
- }
- 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 f = function() {
- function c(d) {
- this.size = g(d);
- this.dirty = this.count = 0;
- this.length = d;
- this.bits = new Uint32Array(this.size >> a.ADDRESS_BITS_PER_WORD);
- }
- c.prototype.recount = function() {
- if (this.dirty) {
- for (var a = this.bits, g = 0, c = 0, d = a.length;c < d;c++) {
- var f = a[c], f = f - (f >> 1 & 1431655765), f = (f & 858993459) + (f >> 2 & 858993459), g = g + (16843009 * (f + (f >> 4) & 252645135) >> 24)
- }
- this.count = g;
- this.dirty = 0;
- }
- };
- c.prototype.set = function(g) {
- var c = g >> a.ADDRESS_BITS_PER_WORD, d = this.bits[c];
- g = d | 1 << (g & a.BIT_INDEX_MASK);
- this.bits[c] = g;
- this.dirty |= d ^ g;
- };
- c.prototype.setAll = function() {
- for (var a = this.bits, g = 0, c = a.length;g < c;g++) {
- a[g] = 4294967295;
- }
- this.count = this.size;
- this.dirty = 0;
- };
- c.prototype.assign = function(a) {
- this.count = a.count;
- this.dirty = a.dirty;
- this.size = a.size;
- for (var g = 0, c = this.bits.length;g < c;g++) {
- this.bits[g] = a.bits[g];
- }
- };
- c.prototype.clear = function(g) {
- var c = g >> a.ADDRESS_BITS_PER_WORD, d = this.bits[c];
- g = d & ~(1 << (g & a.BIT_INDEX_MASK));
- this.bits[c] = g;
- this.dirty |= d ^ g;
- };
- c.prototype.get = function(g) {
- return 0 !== (this.bits[g >> a.ADDRESS_BITS_PER_WORD] & 1 << (g & a.BIT_INDEX_MASK));
- };
- c.prototype.clearAll = function() {
- for (var a = this.bits, g = 0, c = a.length;g < c;g++) {
- a[g] = 0;
- }
- this.dirty = this.count = 0;
- };
- c.prototype._union = function(a) {
- var g = this.dirty, c = this.bits;
- a = a.bits;
- for (var d = 0, f = c.length;d < f;d++) {
- var p = c[d], q = p | a[d];
- c[d] = q;
- g |= p ^ q;
- }
- this.dirty = g;
- };
- c.prototype.intersect = function(a) {
- var g = this.dirty, c = this.bits;
- a = a.bits;
- for (var d = 0, f = c.length;d < f;d++) {
- var p = c[d], q = p & a[d];
- c[d] = q;
- g |= p ^ q;
- }
- this.dirty = g;
- };
- c.prototype.subtract = function(a) {
- var g = this.dirty, c = this.bits;
- a = a.bits;
- for (var d = 0, f = c.length;d < f;d++) {
- var p = c[d], q = p & ~a[d];
- c[d] = q;
- g |= p ^ q;
- }
- this.dirty = g;
- };
- c.prototype.negate = function() {
- for (var a = this.dirty, g = this.bits, c = 0, d = g.length;c < d;c++) {
- var f = g[c], p = ~f;
- g[c] = p;
- a |= f ^ p;
- }
- this.dirty = a;
- };
- c.prototype.forEach = function(g) {
- for (var c = this.bits, d = 0, f = c.length;d < f;d++) {
- var p = c[d];
- if (p) {
- for (var v = 0;v < a.BITS_PER_WORD;v++) {
- p & 1 << v && g(d * a.BITS_PER_WORD + v);
- }
- }
- }
- };
- c.prototype.toArray = function() {
- for (var g = [], c = this.bits, d = 0, f = c.length;d < f;d++) {
- var p = c[d];
- if (p) {
- for (var v = 0;v < a.BITS_PER_WORD;v++) {
- p & 1 << v && g.push(d * a.BITS_PER_WORD + v);
- }
- }
- }
- return g;
- };
- c.prototype.equals = function(a) {
- if (this.size !== a.size) {
- return !1;
- }
- var g = this.bits;
- a = a.bits;
- for (var c = 0, d = g.length;c < d;c++) {
- if (g[c] !== a[c]) {
- return !1;
- }
- }
- return !0;
- };
- c.prototype.contains = function(a) {
- if (this.size !== a.size) {
- return !1;
- }
- var g = this.bits;
- a = a.bits;
- for (var c = 0, d = g.length;c < d;c++) {
- if ((g[c] | a[c]) !== g[c]) {
- return !1;
- }
- }
- return !0;
- };
- c.prototype.isEmpty = function() {
- this.recount();
- return 0 === this.count;
- };
- c.prototype.clone = function() {
- var a = new c(this.length);
- a._union(this);
- return a;
- };
- return c;
- }();
- a.Uint32ArrayBitSet = f;
- var k = function() {
- function c(a) {
- this.dirty = this.count = 0;
- this.size = g(a);
- this.bits = 0;
- this.singleWord = !0;
- this.length = a;
- }
- c.prototype.recount = function() {
- if (this.dirty) {
- var a = this.bits, a = a - (a >> 1 & 1431655765), a = (a & 858993459) + (a >> 2 & 858993459);
- this.count = 0 + (16843009 * (a + (a >> 4) & 252645135) >> 24);
- this.dirty = 0;
- }
- };
- c.prototype.set = function(g) {
- var c = this.bits;
- this.bits = g = c | 1 << (g & a.BIT_INDEX_MASK);
- this.dirty |= c ^ g;
- };
- c.prototype.setAll = function() {
- this.bits = 4294967295;
- this.count = this.size;
- this.dirty = 0;
- };
- c.prototype.assign = function(a) {
- this.count = a.count;
- this.dirty = a.dirty;
- this.size = a.size;
- this.bits = a.bits;
- };
- c.prototype.clear = function(g) {
- var c = this.bits;
- this.bits = g = c & ~(1 << (g & a.BIT_INDEX_MASK));
- this.dirty |= c ^ g;
- };
- c.prototype.get = function(g) {
- return 0 !== (this.bits & 1 << (g & a.BIT_INDEX_MASK));
- };
- c.prototype.clearAll = function() {
- this.dirty = this.count = this.bits = 0;
- };
- c.prototype._union = function(a) {
- var g = this.bits;
- this.bits = a = g | a.bits;
- this.dirty = g ^ a;
- };
- c.prototype.intersect = function(a) {
- var g = this.bits;
- this.bits = a = g & a.bits;
- this.dirty = g ^ a;
- };
- c.prototype.subtract = function(a) {
- var g = this.bits;
- this.bits = a = g & ~a.bits;
- this.dirty = g ^ a;
- };
- c.prototype.negate = function() {
- var a = this.bits, g = ~a;
- this.bits = g;
- this.dirty = a ^ g;
- };
- c.prototype.forEach = function(g) {
- var c = this.bits;
- if (c) {
- for (var d = 0;d < a.BITS_PER_WORD;d++) {
- c & 1 << d && g(d);
- }
- }
- };
- c.prototype.toArray = function() {
- var g = [], c = this.bits;
- if (c) {
- for (var d = 0;d < a.BITS_PER_WORD;d++) {
- c & 1 << d && g.push(d);
- }
- }
- return g;
- };
- c.prototype.equals = function(a) {
- return this.bits === a.bits;
- };
- c.prototype.contains = function(a) {
- var g = this.bits;
- return (g | a.bits) === g;
- };
- c.prototype.isEmpty = function() {
- this.recount();
- return 0 === this.count;
- };
- c.prototype.clone = function() {
- var a = new c(this.length);
- a._union(this);
- return a;
- };
- return c;
- }();
- a.Uint32BitSet = k;
- k.prototype.toString = d;
- k.prototype.toBitString = c;
- f.prototype.toString = d;
- f.prototype.toBitString = c;
- a.BitSetFunctor = function(c) {
- var d = 1 === g(c) >> a.ADDRESS_BITS_PER_WORD ? k : f;
- return function() {
- return new d(c);
- };
- };
- })(e.BitSets || (e.BitSets = {}));
- l = function() {
- function a() {
- }
- 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];
- };
- a.gradientColor = function(g) {
- return a._gradient[a._gradient.length * c.clamp(g, 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";
- };
- a.reset = function() {
- a._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;
- }();
- e.ColorStyle = l;
- l = function() {
- function a(g, c, d, f) {
- this.xMin = g | 0;
- this.yMin = c | 0;
- this.xMax = d | 0;
- this.yMax = f | 0;
- }
- a.FromUntyped = function(g) {
- return new a(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- a.FromRectangle = function(g) {
- return new a(20 * g.x | 0, 20 * g.y | 0, 20 * (g.x + g.width) | 0, 20 * (g.y + g.height) | 0);
- };
- a.prototype.setElements = function(a, c, d, f) {
- this.xMin = a;
- this.yMin = c;
- this.xMax = d;
- this.yMax = f;
- };
- a.prototype.copyFrom = function(a) {
- this.setElements(a.xMin, a.yMin, a.xMax, a.yMax);
- };
- a.prototype.contains = function(a, c) {
- return a < this.xMin !== a < this.xMax && c < this.yMin !== c < this.yMax;
- };
- a.prototype.unionInPlace = function(a) {
- a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax));
- };
- a.prototype.extendByPoint = function(a, c) {
- this.extendByX(a);
- this.extendByY(c);
- };
- 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));
- };
- 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));
- };
- a.prototype.intersects = function(a) {
- return this.contains(a.xMin, a.yMin) || this.contains(a.xMax, a.yMax);
- };
- a.prototype.isEmpty = function() {
- return this.xMax <= this.xMin || this.yMax <= this.yMin;
- };
- Object.defineProperty(a.prototype, "width", {get:function() {
- return this.xMax - this.xMin;
- }, set:function(a) {
- this.xMax = this.xMin + a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "height", {get:function() {
- return this.yMax - this.yMin;
- }, set:function(a) {
- this.yMax = this.yMin + a;
- }, enumerable:!0, configurable:!0});
- a.prototype.getBaseWidth = function(a) {
- var c = Math.abs(Math.cos(a));
- a = Math.abs(Math.sin(a));
- return c * (this.xMax - this.xMin) + a * (this.yMax - this.yMin);
- };
- a.prototype.getBaseHeight = function(a) {
- var c = Math.abs(Math.cos(a));
- return Math.abs(Math.sin(a)) * (this.xMax - this.xMin) + c * (this.yMax - this.yMin);
- };
- a.prototype.setEmpty = function() {
- this.xMin = this.yMin = this.xMax = this.yMax = 0;
- };
- a.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);
- };
- a.prototype.toString = function() {
- return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }";
- };
- return a;
- }();
- e.Bounds = l;
- l = function() {
- function a(g, c, d, f) {
- m.assert(b(g));
- m.assert(b(c));
- m.assert(b(d));
- m.assert(b(f));
- this._xMin = g | 0;
- this._yMin = c | 0;
- this._xMax = d | 0;
- this._yMax = f | 0;
- }
- a.FromUntyped = function(g) {
- return new a(g.xMin, g.yMin, g.xMax, g.yMax);
- };
- a.FromRectangle = function(g) {
- return new a(20 * g.x | 0, 20 * g.y | 0, 20 * (g.x + g.width) | 0, 20 * (g.y + g.height) | 0);
- };
- a.prototype.setElements = function(a, c, d, f) {
- this.xMin = a;
- this.yMin = c;
- this.xMax = d;
- this.yMax = f;
- };
- a.prototype.copyFrom = function(a) {
- this.setElements(a.xMin, a.yMin, a.xMax, a.yMax);
- };
- a.prototype.contains = function(a, c) {
- return a < this.xMin !== a < this.xMax && c < this.yMin !== c < this.yMax;
- };
- a.prototype.unionInPlace = function(a) {
- a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax));
- };
- a.prototype.extendByPoint = function(a, c) {
- this.extendByX(a);
- this.extendByY(c);
- };
- 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));
- };
- 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));
- };
- a.prototype.intersects = function(a) {
- return this.contains(a._xMin, a._yMin) || this.contains(a._xMax, a._yMax);
- };
- a.prototype.isEmpty = function() {
- return this._xMax <= this._xMin || this._yMax <= this._yMin;
- };
- Object.defineProperty(a.prototype, "xMin", {get:function() {
- return this._xMin;
- }, set:function(a) {
- m.assert(b(a));
- this._xMin = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "yMin", {get:function() {
- return this._yMin;
- }, set:function(a) {
- m.assert(b(a));
- this._yMin = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "xMax", {get:function() {
- return this._xMax;
- }, set:function(a) {
- m.assert(b(a));
- this._xMax = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "width", {get:function() {
- return this._xMax - this._xMin;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "yMax", {get:function() {
- return this._yMax;
- }, set:function(a) {
- m.assert(b(a));
- this._yMax = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "height", {get:function() {
- return this._yMax - this._yMin;
- }, enumerable:!0, configurable:!0});
- a.prototype.getBaseWidth = function(a) {
- var c = Math.abs(Math.cos(a));
- a = Math.abs(Math.sin(a));
- return c * (this._xMax - this._xMin) + a * (this._yMax - this._yMin);
- };
- a.prototype.getBaseHeight = function(a) {
- var c = Math.abs(Math.cos(a));
- return Math.abs(Math.sin(a)) * (this._xMax - this._xMin) + c * (this._yMax - this._yMin);
- };
- a.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);
- };
- a.prototype.toString = function() {
- return "{ xMin: " + this._xMin + ", yMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }";
- };
- a.prototype.assertValid = function() {
- };
- return a;
- }();
- e.DebugBounds = l;
- l = function() {
- function a(c, d, f, q) {
- this.r = c;
- this.g = d;
- this.b = f;
- this.a = q;
- }
- a.FromARGB = function(c) {
- return new a((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c >> 0 & 255) / 255, (c >> 24 & 255) / 255);
- };
- a.FromRGBA = function(c) {
- return a.FromARGB(r.RGBAToARGB(c));
- };
- a.prototype.toRGBA = function() {
- return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a;
- };
- a.prototype.toCSSStyle = function() {
- return r.rgbaToCSSStyle(this.toRGBA());
- };
- a.prototype.set = function(a) {
- this.r = a.r;
- this.g = a.g;
- this.b = a.b;
- this.a = a.a;
- };
- a.randomColor = function(c) {
- void 0 === c && (c = 1);
- return new a(Math.random(), Math.random(), Math.random(), c);
- };
- a.parseColor = function(c) {
- a.colorCache || (a.colorCache = Object.create(null));
- if (a.colorCache[c]) {
- return a.colorCache[c];
- }
- var d = document.createElement("span");
- document.body.appendChild(d);
- d.style.backgroundColor = c;
- var f = getComputedStyle(d).backgroundColor;
- document.body.removeChild(d);
- (d = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(f)) || (d = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(f));
- f = new a(0, 0, 0, 0);
- f.r = parseFloat(d[1]) / 255;
- f.g = parseFloat(d[2]) / 255;
- f.b = parseFloat(d[3]) / 255;
- f.a = d[4] ? parseFloat(d[4]) / 255 : 1;
- return a.colorCache[c] = 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;
- }();
- e.Color = l;
- var r;
- (function(a) {
- function c(a) {
- var g = a >> 0 & 255, d = a >> 8 & 255, f = a >> 24 & 255;
- a = (Math.imul(a >> 16 & 255, f) + 127) / 255 | 0;
- d = (Math.imul(d, f) + 127) / 255 | 0;
- g = (Math.imul(g, f) + 127) / 255 | 0;
- return f << 24 | a << 16 | d << 8 | g;
- }
- function d() {
- if (!v) {
- v = new Uint8Array(65536);
- for (var a = 0;256 > a;a++) {
- for (var c = 0;256 > c;c++) {
- v[(c << 8) + a] = Math.imul(255, a) / c;
- }
- }
- }
- }
- a.RGBAToARGB = function(a) {
- return a >> 8 & 16777215 | (a & 255) << 24;
- };
- a.ARGBToRGBA = function(a) {
- return a << 8 | a >> 24 & 255;
- };
- a.rgbaToCSSStyle = function(a) {
- return e.StringUtilities.concat9("rgba(", a >> 24 & 255, ",", a >> 16 & 255, ",", a >> 8 & 255, ",", (a & 255) / 255, ")");
- };
- a.cssStyleToRGBA = function(a) {
- if ("#" === a[0]) {
- if (7 === a.length) {
- return parseInt(a.substring(1), 16) << 8 | 255;
- }
- } else {
- if ("r" === a[0]) {
- var c = a.substring(5, a.length - 1).split(",");
- a = parseInt(c[0]);
- var g = parseInt(c[1]), d = parseInt(c[2]), c = parseFloat(c[3]);
- return (a & 255) << 24 | (g & 255) << 16 | (d & 255) << 8 | 255 * c & 255;
- }
- }
- return 4278190335;
- };
- a.hexToRGB = function(a) {
- return parseInt(a.slice(1), 16);
- };
- a.rgbToHex = function(a) {
- return "#" + ("000000" + (a >>> 0).toString(16)).slice(-6);
- };
- a.isValidHexColor = function(a) {
- return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(a);
- };
- a.clampByte = function(a) {
- return Math.max(0, Math.min(255, a));
- };
- a.unpremultiplyARGB = function(a) {
- var c = a >> 0 & 255, g = a >> 8 & 255, d = a >> 24 & 255;
- a = Math.imul(255, a >> 16 & 255) / d & 255;
- g = Math.imul(255, g) / d & 255;
- c = Math.imul(255, c) / d & 255;
- return d << 24 | a << 16 | g << 8 | c;
- };
- a.premultiplyARGB = c;
- var v;
- a.ensureUnpremultiplyTable = d;
- a.getUnpremultiplyTable = function() {
- d();
- return v;
- };
- a.tableLookupUnpremultiplyARGB = function(a) {
- a |= 0;
- var c = a >> 24 & 255;
- if (0 === c) {
- return 0;
- }
- if (255 === c) {
- return a;
- }
- var g, d, f = c << 8, p = v;
- d = p[f + (a >> 16 & 255)];
- g = p[f + (a >> 8 & 255)];
- a = p[f + (a >> 0 & 255)];
- return c << 24 | d << 16 | g << 8 | a;
- };
- a.blendPremultipliedBGRA = function(a, c) {
- var g = c & 16711935, d = c >> 8 & 16711935, f, p = a >> 8 & 16711935, q = 256 - (c & 255);
- f = Math.imul(a & 16711935, q) >> 8;
- p = Math.imul(p, q) >> 8;
- return (d + p & 16711935) << 8 | g + f & 16711935;
- };
- var k = f.swap32;
- a.convertImage = function(a, d, f, p) {
- var q = f.length;
- if (a === d) {
- if (f !== p) {
- for (a = 0;a < q;a++) {
- p[a] = f[a];
- }
- }
- } else {
- if (1 === a && 3 === d) {
- for (e.ColorUtilities.ensureUnpremultiplyTable(), a = 0;a < q;a++) {
- var b = f[a];
- d = b & 255;
- if (0 === d) {
- p[a] = 0;
- } else {
- if (255 === d) {
- p[a] = 4278190080 | b >> 8 & 16777215;
- } else {
- var r = b >> 24 & 255, l = b >> 16 & 255, b = b >> 8 & 255, n = d << 8, h = v, b = h[n + b], l = h[n + l], r = h[n + r];
- p[a] = d << 24 | r << 16 | l << 8 | b;
- }
- }
- }
- } else {
- if (2 === a && 3 === d) {
- for (a = 0;a < q;a++) {
- p[a] = k(f[a]);
- }
- } else {
- if (3 === a && 1 === d) {
- for (a = 0;a < q;a++) {
- d = f[a], p[a] = k(c(d & 4278255360 | d >> 16 & 255 | (d & 255) << 16));
- }
- } else {
- for (m.somewhatImplemented("Image Format Conversion: " + u[a] + " -> " + u[d]), a = 0;a < q;a++) {
- p[a] = f[a];
- }
- }
- }
- }
- }
- };
- })(r = e.ColorUtilities || (e.ColorUtilities = {}));
- l = function() {
- function a(c) {
- void 0 === c && (c = 32);
- this._list = [];
- this._maxSize = c;
- }
- a.prototype.acquire = function(c) {
- if (a._enabled) {
- for (var d = this._list, f = 0;f < d.length;f++) {
- var k = d[f];
- if (k.byteLength >= c) {
- return d.splice(f, 1), k;
- }
- }
- }
- return new ArrayBuffer(c);
- };
- a.prototype.release = function(c) {
- if (a._enabled) {
- var d = this._list;
- d.length === this._maxSize && d.shift();
- d.push(c);
- }
- };
- a.prototype.ensureUint8ArrayLength = function(a, c) {
- if (a.length >= c) {
- return a;
- }
- var d = Math.max(a.length + c, (3 * a.length >> 1) + 1), d = new Uint8Array(this.acquire(d), 0, d);
- d.set(a);
- this.release(a.buffer);
- return d;
- };
- a.prototype.ensureFloat64ArrayLength = function(a, c) {
- if (a.length >= c) {
- return a;
- }
- var d = Math.max(a.length + c, (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;
- };
- a._enabled = !0;
- return a;
- }();
- e.ArrayBufferPool = l;
- (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 = {}));
- (function(a) {
- a[a.LoadSource = 0] = "LoadSource";
- a[a.LoadWhitelistAllowed = 1] = "LoadWhitelistAllowed";
- a[a.LoadWhitelistDenied = 2] = "LoadWhitelistDenied";
- a[a.StreamAllowed = 3] = "StreamAllowed";
- a[a.StreamDenied = 4] = "StreamDenied";
- a[a.StreamCrossdomain = 5] = "StreamCrossdomain";
- })(a.LoadResource || (a.LoadResource = {}));
- a.instance;
- })(e.Telemetry || (e.Telemetry = {}));
- (function(a) {
- a.instance;
- })(e.FileLoadingService || (e.FileLoadingService = {}));
- (function(a) {
- a[a.BuiltinAbc = 0] = "BuiltinAbc";
- a[a.PlayerglobalAbcs = 1] = "PlayerglobalAbcs";
- a[a.PlayerglobalManifest = 2] = "PlayerglobalManifest";
- a[a.ShellAbc = 3] = "ShellAbc";
- })(e.SystemResourceId || (e.SystemResourceId = {}));
- (function(a) {
- a.instance;
- })(e.SystemResourcesLoadingService || (e.SystemResourcesLoadingService = {}));
- e.registerCSSFont = function(a, c, d) {
- if (inBrowser) {
- var f = document.head;
- f.insertBefore(document.createElement("style"), f.firstChild);
- f = document.styleSheets[0];
- c = "@font-face{font-family:swffont" + a + ";src:url(data:font/opentype;base64," + e.StringUtilities.base64ArrayBuffer(c.buffer) + ")}";
- f.insertRule(c, f.cssRules.length);
- d && (d = document.createElement("div"), d.style.fontFamily = "swffont" + a, d.innerHTML = "hello", document.body.appendChild(d), document.body.removeChild(d));
- } else {
- m.warning("Cannot register CSS font outside the browser");
- }
- };
- e.registerFallbackFont = function() {
- var a = document.styleSheets[0];
- a.insertRule('@font-face{font-family:AdobeBlank;src:url("data:font/opentype;base64,T1RUTwAKAIAAAwAgQ0ZGIDTeCDQAACFkAAAZPERTSUcAAAABAABKqAAAAAhPUy8yAF+xmwAAARAAAABgY21hcCRDbtEAAAdcAAAZ6GhlYWQFl9tDAAAArAAAADZoaGVhB1oD7wAAAOQAAAAkaG10eAPoAHwAADqgAAAQBm1heHAIAVAAAAABCAAAAAZuYW1lIE0HkgAAAXAAAAXrcG9zdP+4ADIAACFEAAAAIAABAAAAAQuFfcPHtV8PPPUAAwPoAAAAANFMRfMAAAAA0UxF8wB8/4gDbANwAAAAAwACAAAAAAAAAAEAAANw/4gAAAPoAHwAfANsAAEAAAAAAAAAAAAAAAAAAAACAABQAAgBAAAAAwPoAZAABQAAAooCWAAAAEsCigJYAAABXgAyANwAAAAAAAAAAAAAAAD3/67/+9///w/gAD8AAAAAQURCTwBAAAD//wNw/4gAAANwAHhgLwH/AAAAAAAAAAAAAAAgAAAAAAARANIAAQAAAAAAAQALAAAAAQAAAAAAAgAHAAsAAQAAAAAAAwAbABIAAQAAAAAABAALAAAAAQAAAAAABQA6AC0AAQAAAAAABgAKAGcAAwABBAkAAACUAHEAAwABBAkAAQAWAQUAAwABBAkAAgAOARsAAwABBAkAAwA2ASkAAwABBAkABAAWAQUAAwABBAkABQB0AV8AAwABBAkABgAUAdMAAwABBAkACAA0AecAAwABBAkACwA0AhsAAwABBAkADQKWAk8AAwABBAkADgA0BOVBZG9iZSBCbGFua1JlZ3VsYXIxLjA0NTtBREJPO0Fkb2JlQmxhbms7QURPQkVWZXJzaW9uIDEuMDQ1O1BTIDEuMDQ1O2hvdGNvbnYgMS4wLjgyO21ha2VvdGYubGliMi41LjYzNDA2QWRvYmVCbGFuawBDAG8AcAB5AHIAaQBnAGgAdAAgAKkAIAAyADAAMQAzACwAIAAyADAAMQA1ACAAQQBkAG8AYgBlACAAUwB5AHMAdABlAG0AcwAgAEkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAAKABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBkAG8AYgBlAC4AYwBvAG0ALwApAC4AQQBkAG8AYgBlACAAQgBsAGEAbgBrAFIAZQBnAHUAbABhAHIAMQAuADAANAA1ADsAQQBEAEIATwA7AEEAZABvAGIAZQBCAGwAYQBuAGsAOwBBAEQATwBCAEUAVgBlAHIAcwBpAG8AbgAgADEALgAwADQANQA7AFAAUwAgADEALgAwADQANQA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAMgA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYAMwA0ADAANgBBAGQAbwBiAGUAQgBsAGEAbgBrAEEAZABvAGIAZQAgAFMAeQBzAHQAZQBtAHMAIABJAG4AYwBvAHIAcABvAHIAYQB0AGUAZABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBkAG8AYgBlAC4AYwBvAG0ALwB0AHkAcABlAC8AVABoAGkAcwAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUAIABpAHMAIABsAGkAYwBlAG4AcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAFMASQBMACAATwBwAGUAbgAgAEYAbwBuAHQAIABMAGkAYwBlAG4AcwBlACwAIABWAGUAcgBzAGkAbwBuACAAMQAuADEALgAgAFQAaABpAHMAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlACAAaQBzACAAZABpAHMAdAByAGkAYgB1AHQAZQBkACAAbwBuACAAYQBuACAAIgBBAFMAIABJAFMAIgAgAEIAQQBTAEkAUwAsACAAVwBJAFQASABPAFUAVAAgAFcAQQBSAFIAQQBOAFQASQBFAFMAIABPAFIAIABDAE8ATgBEAEkAVABJAE8ATgBTACAATwBGACAAQQBOAFkAIABLAEkATgBEACwAIABlAGkAdABoAGUAcgAgAGUAeABwAHIAZQBzAHMAIABvAHIAIABpAG0AcABsAGkAZQBkAC4AIABTAGUAZQAgAHQAaABlACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUAIABmAG8AcgAgAHQAaABlACAAcwBwAGUAYwBpAGYAaQBjACAAbABhAG4AZwB1AGEAZwBlACwAIABwAGUAcgBtAGkAcwBzAGkAbwBuAHMAIABhAG4AZAAgAGwAaQBtAGkAdABhAHQAaQBvAG4AcwAgAGcAbwB2AGUAcgBuAGkAbgBnACAAeQBvAHUAcgAgAHUAcwBlACAAbwBmACAAdABoAGkAcwAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUALgBoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAABQAAAAMAAAA4AAAABAAAAFgAAQAAAAAALAADAAEAAAA4AAMACgAAAFgABgAMAAAAAAABAAAABAAgAAAABAAEAAEAAAf///8AAAAA//8AAQABAAAAAAAMAAAAABmQAAAAAAAAAiAAAAAAAAAH/wAAAAEAAAgAAAAP/wAAAAEAABAAAAAX/wAAAAEAABgAAAAf/wAAAAEAACAAAAAn/wAAAAEAACgAAAAv/wAAAAEAADAAAAA3/wAAAAEAADgAAAA//wAAAAEAAEAAAABH/wAAAAEAAEgAAABP/wAAAAEAAFAAAABX/wAAAAEAAFgAAABf/wAAAAEAAGAAAABn/wAAAAEAAGgAAABv/wAAAAEAAHAAAAB3/wAAAAEAAHgAAAB//wAAAAEAAIAAAACH/wAAAAEAAIgAAACP/wAAAAEAAJAAAACX/wAAAAEAAJgAAACf/wAAAAEAAKAAAACn/wAAAAEAAKgAAACv/wAAAAEAALAAAAC3/wAAAAEAALgAAAC//wAAAAEAAMAAAADH/wAAAAEAAMgAAADP/wAAAAEAANAAAADX/wAAAAEAAOAAAADn/wAAAAEAAOgAAADv/wAAAAEAAPAAAAD3/wAAAAEAAPgAAAD9zwAAAAEAAP3wAAD//QAABfEAAQAAAAEH/wAAAAEAAQgAAAEP/wAAAAEAARAAAAEX/wAAAAEAARgAAAEf/wAAAAEAASAAAAEn/wAAAAEAASgAAAEv/wAAAAEAATAAAAE3/wAAAAEAATgAAAE//wAAAAEAAUAAAAFH/wAAAAEAAUgAAAFP/wAAAAEAAVAAAAFX/wAAAAEAAVgAAAFf/wAAAAEAAWAAAAFn/wAAAAEAAWgAAAFv/wAAAAEAAXAAAAF3/wAAAAEAAXgAAAF//wAAAAEAAYAAAAGH/wAAAAEAAYgAAAGP/wAAAAEAAZAAAAGX/wAAAAEAAZgAAAGf/wAAAAEAAaAAAAGn/wAAAAEAAagAAAGv/wAAAAEAAbAAAAG3/wAAAAEAAbgAAAG//wAAAAEAAcAAAAHH/wAAAAEAAcgAAAHP/wAAAAEAAdAAAAHX/wAAAAEAAdgAAAHf/wAAAAEAAeAAAAHn/wAAAAEAAegAAAHv/wAAAAEAAfAAAAH3/wAAAAEAAfgAAAH//QAAAAEAAgAAAAIH/wAAAAEAAggAAAIP/wAAAAEAAhAAAAIX/wAAAAEAAhgAAAIf/wAAAAEAAiAAAAIn/wAAAAEAAigAAAIv/wAAAAEAAjAAAAI3/wAAAAEAAjgAAAI//wAAAAEAAkAAAAJH/wAAAAEAAkgAAAJP/wAAAAEAAlAAAAJX/wAAAAEAAlgAAAJf/wAAAAEAAmAAAAJn/wAAAAEAAmgAAAJv/wAAAAEAAnAAAAJ3/wAAAAEAAngAAAJ//wAAAAEAAoAAAAKH/wAAAAEAAogAAAKP/wAAAAEAApAAAAKX/wAAAAEAApgAAAKf/wAAAAEAAqAAAAKn/wAAAAEAAqgAAAKv/wAAAAEAArAAAAK3/wAAAAEAArgAAAK//wAAAAEAAsAAAALH/wAAAAEAAsgAAALP/wAAAAEAAtAAAALX/wAAAAEAAtgAAALf/wAAAAEAAuAAAALn/wAAAAEAAugAAALv/wAAAAEAAvAAAAL3/wAAAAEAAvgAAAL//QAAAAEAAwAAAAMH/wAAAAEAAwgAAAMP/wAAAAEAAxAAAAMX/wAAAAEAAxgAAAMf/wAAAAEAAyAAAAMn/wAAAAEAAygAAAMv/wAAAAEAAzAAAAM3/wAAAAEAAzgAAAM//wAAAAEAA0AAAANH/wAAAAEAA0gAAANP/wAAAAEAA1AAAANX/wAAAAEAA1gAAANf/wAAAAEAA2AAAANn/wAAAAEAA2gAAANv/wAAAAEAA3AAAAN3/wAAAAEAA3gAAAN//wAAAAEAA4AAAAOH/wAAAAEAA4gAAAOP/wAAAAEAA5AAAAOX/wAAAAEAA5gAAAOf/wAAAAEAA6AAAAOn/wAAAAEAA6gAAAOv/wAAAAEAA7AAAAO3/wAAAAEAA7gAAAO//wAAAAEAA8AAAAPH/wAAAAEAA8gAAAPP/wAAAAEAA9AAAAPX/wAAAAEAA9gAAAPf/wAAAAEAA+AAAAPn/wAAAAEAA+gAAAPv/wAAAAEAA/AAAAP3/wAAAAEAA/gAAAP//QAAAAEABAAAAAQH/wAAAAEABAgAAAQP/wAAAAEABBAAAAQX/wAAAAEABBgAAAQf/wAAAAEABCAAAAQn/wAAAAEABCgAAAQv/wAAAAEABDAAAAQ3/wAAAAEABDgAAAQ//wAAAAEABEAAAARH/wAAAAEABEgAAARP/wAAAAEABFAAAARX/wAAAAEABFgAAARf/wAAAAEABGAAAARn/wAAAAEABGgAAARv/wAAAAEABHAAAAR3/wAAAAEABHgAAAR//wAAAAEABIAAAASH/wAAAAEABIgAAASP/wAAAAEABJAAAASX/wAAAAEABJgAAASf/wAAAAEABKAAAASn/wAAAAEABKgAAASv/wAAAAEABLAAAAS3/wAAAAEABLgAAAS//wAAAAEABMAAAATH/wAAAAEABMgAAATP/wAAAAEABNAAAATX/wAAAAEABNgAAATf/wAAAAEABOAAAATn/wAAAAEABOgAAATv/wAAAAEABPAAAAT3/wAAAAEABPgAAAT//QAAAAEABQAAAAUH/wAAAAEABQgAAAUP/wAAAAEABRAAAAUX/wAAAAEABRgAAAUf/wAAAAEABSAAAAUn/wAAAAEABSgAAAUv/wAAAAEABTAAAAU3/wAAAAEABTgAAAU//wAAAAEABUAAAAVH/wAAAAEABUgAAAVP/wAAAAEABVAAAAVX/wAAAAEABVgAAAVf/wAAAAEABWAAAAVn/wAAAAEABWgAAAVv/wAAAAEABXAAAAV3/wAAAAEABXgAAAV//wAAAAEABYAAAAWH/wAAAAEABYgAAAWP/wAAAAEABZAAAAWX/wAAAAEABZgAAAWf/wAAAAEABaAAAAWn/wAAAAEABagAAAWv/wAAAAEABbAAAAW3/wAAAAEABbgAAAW//wAAAAEABcAAAAXH/wAAAAEABcgAAAXP/wAAAAEABdAAAAXX/wAAAAEABdgAAAXf/wAAAAEABeAAAAXn/wAAAAEABegAAAXv/wAAAAEABfAAAAX3/wAAAAEABfgAAAX//QAAAAEABgAAAAYH/wAAAAEABggAAAYP/wAAAAEABhAAAAYX/wAAAAEABhgAAAYf/wAAAAEABiAAAAYn/wAAAAEABigAAAYv/wAAAAEABjAAAAY3/wAAAAEABjgAAAY//wAAAAEABkAAAAZH/wAAAAEABkgAAAZP/wAAAAEABlAAAAZX/wAAAAEABlgAAAZf/wAAAAEABmAAAAZn/wAAAAEABmgAAAZv/wAAAAEABnAAAAZ3/wAAAAEABngAAAZ//wAAAAEABoAAAAaH/wAAAAEABogAAAaP/wAAAAEABpAAAAaX/wAAAAEABpgAAAaf/wAAAAEABqAAAAan/wAAAAEABqgAAAav/wAAAAEABrAAAAa3/wAAAAEABrgAAAa//wAAAAEABsAAAAbH/wAAAAEABsgAAAbP/wAAAAEABtAAAAbX/wAAAAEABtgAAAbf/wAAAAEABuAAAAbn/wAAAAEABugAAAbv/wAAAAEABvAAAAb3/wAAAAEABvgAAAb//QAAAAEABwAAAAcH/wAAAAEABwgAAAcP/wAAAAEABxAAAAcX/wAAAAEABxgAAAcf/wAAAAEAByAAAAcn/wAAAAEABygAAAcv/wAAAAEABzAAAAc3/wAAAAEABzgAAAc//wAAAAEAB0AAAAdH/wAAAAEAB0gAAAdP/wAAAAEAB1AAAAdX/wAAAAEAB1gAAAdf/wAAAAEAB2AAAAdn/wAAAAEAB2gAAAdv/wAAAAEAB3AAAAd3/wAAAAEAB3gAAAd//wAAAAEAB4AAAAeH/wAAAAEAB4gAAAeP/wAAAAEAB5AAAAeX/wAAAAEAB5gAAAef/wAAAAEAB6AAAAen/wAAAAEAB6gAAAev/wAAAAEAB7AAAAe3/wAAAAEAB7gAAAe//wAAAAEAB8AAAAfH/wAAAAEAB8gAAAfP/wAAAAEAB9AAAAfX/wAAAAEAB9gAAAff/wAAAAEAB+AAAAfn/wAAAAEAB+gAAAfv/wAAAAEAB/AAAAf3/wAAAAEAB/gAAAf//QAAAAEACAAAAAgH/wAAAAEACAgAAAgP/wAAAAEACBAAAAgX/wAAAAEACBgAAAgf/wAAAAEACCAAAAgn/wAAAAEACCgAAAgv/wAAAAEACDAAAAg3/wAAAAEACDgAAAg//wAAAAEACEAAAAhH/wAAAAEACEgAAAhP/wAAAAEACFAAAAhX/wAAAAEACFgAAAhf/wAAAAEACGAAAAhn/wAAAAEACGgAAAhv/wAAAAEACHAAAAh3/wAAAAEACHgAAAh//wAAAAEACIAAAAiH/wAAAAEACIgAAAiP/wAAAAEACJAAAAiX/wAAAAEACJgAAAif/wAAAAEACKAAAAin/wAAAAEACKgAAAiv/wAAAAEACLAAAAi3/wAAAAEACLgAAAi//wAAAAEACMAAAAjH/wAAAAEACMgAAAjP/wAAAAEACNAAAAjX/wAAAAEACNgAAAjf/wAAAAEACOAAAAjn/wAAAAEACOgAAAjv/wAAAAEACPAAAAj3/wAAAAEACPgAAAj//QAAAAEACQAAAAkH/wAAAAEACQgAAAkP/wAAAAEACRAAAAkX/wAAAAEACRgAAAkf/wAAAAEACSAAAAkn/wAAAAEACSgAAAkv/wAAAAEACTAAAAk3/wAAAAEACTgAAAk//wAAAAEACUAAAAlH/wAAAAEACUgAAAlP/wAAAAEACVAAAAlX/wAAAAEACVgAAAlf/wAAAAEACWAAAAln/wAAAAEACWgAAAlv/wAAAAEACXAAAAl3/wAAAAEACXgAAAl//wAAAAEACYAAAAmH/wAAAAEACYgAAAmP/wAAAAEACZAAAAmX/wAAAAEACZgAAAmf/wAAAAEACaAAAAmn/wAAAAEACagAAAmv/wAAAAEACbAAAAm3/wAAAAEACbgAAAm//wAAAAEACcAAAAnH/wAAAAEACcgAAAnP/wAAAAEACdAAAAnX/wAAAAEACdgAAAnf/wAAAAEACeAAAAnn/wAAAAEACegAAAnv/wAAAAEACfAAAAn3/wAAAAEACfgAAAn//QAAAAEACgAAAAoH/wAAAAEACggAAAoP/wAAAAEAChAAAAoX/wAAAAEAChgAAAof/wAAAAEACiAAAAon/wAAAAEACigAAAov/wAAAAEACjAAAAo3/wAAAAEACjgAAAo//wAAAAEACkAAAApH/wAAAAEACkgAAApP/wAAAAEAClAAAApX/wAAAAEAClgAAApf/wAAAAEACmAAAApn/wAAAAEACmgAAApv/wAAAAEACnAAAAp3/wAAAAEACngAAAp//wAAAAEACoAAAAqH/wAAAAEACogAAAqP/wAAAAEACpAAAAqX/wAAAAEACpgAAAqf/wAAAAEACqAAAAqn/wAAAAEACqgAAAqv/wAAAAEACrAAAAq3/wAAAAEACrgAAAq//wAAAAEACsAAAArH/wAAAAEACsgAAArP/wAAAAEACtAAAArX/wAAAAEACtgAAArf/wAAAAEACuAAAArn/wAAAAEACugAAArv/wAAAAEACvAAAAr3/wAAAAEACvgAAAr//QAAAAEACwAAAAsH/wAAAAEACwgAAAsP/wAAAAEACxAAAAsX/wAAAAEACxgAAAsf/wAAAAEACyAAAAsn/wAAAAEACygAAAsv/wAAAAEACzAAAAs3/wAAAAEACzgAAAs//wAAAAEAC0AAAAtH/wAAAAEAC0gAAAtP/wAAAAEAC1AAAAtX/wAAAAEAC1gAAAtf/wAAAAEAC2AAAAtn/wAAAAEAC2gAAAtv/wAAAAEAC3AAAAt3/wAAAAEAC3gAAAt//wAAAAEAC4AAAAuH/wAAAAEAC4gAAAuP/wAAAAEAC5AAAAuX/wAAAAEAC5gAAAuf/wAAAAEAC6AAAAun/wAAAAEAC6gAAAuv/wAAAAEAC7AAAAu3/wAAAAEAC7gAAAu//wAAAAEAC8AAAAvH/wAAAAEAC8gAAAvP/wAAAAEAC9AAAAvX/wAAAAEAC9gAAAvf/wAAAAEAC+AAAAvn/wAAAAEAC+gAAAvv/wAAAAEAC/AAAAv3/wAAAAEAC/gAAAv//QAAAAEADAAAAAwH/wAAAAEADAgAAAwP/wAAAAEADBAAAAwX/wAAAAEADBgAAAwf/wAAAAEADCAAAAwn/wAAAAEADCgAAAwv/wAAAAEADDAAAAw3/wAAAAEADDgAAAw//wAAAAEADEAAAAxH/wAAAAEADEgAAAxP/wAAAAEADFAAAAxX/wAAAAEADFgAAAxf/wAAAAEADGAAAAxn/wAAAAEADGgAAAxv/wAAAAEADHAAAAx3/wAAAAEADHgAAAx//wAAAAEADIAAAAyH/wAAAAEADIgAAAyP/wAAAAEADJAAAAyX/wAAAAEADJgAAAyf/wAAAAEADKAAAAyn/wAAAAEADKgAAAyv/wAAAAEADLAAAAy3/wAAAAEADLgAAAy//wAAAAEADMAAAAzH/wAAAAEADMgAAAzP/wAAAAEADNAAAAzX/wAAAAEADNgAAAzf/wAAAAEADOAAAAzn/wAAAAEADOgAAAzv/wAAAAEADPAAAAz3/wAAAAEADPgAAAz//QAAAAEADQAAAA0H/wAAAAEADQgAAA0P/wAAAAEADRAAAA0X/wAAAAEADRgAAA0f/wAAAAEADSAAAA0n/wAAAAEADSgAAA0v/wAAAAEADTAAAA03/wAAAAEADTgAAA0//wAAAAEADUAAAA1H/wAAAAEADUgAAA1P/wAAAAEADVAAAA1X/wAAAAEADVgAAA1f/wAAAAEADWAAAA1n/wAAAAEADWgAAA1v/wAAAAEADXAAAA13/wAAAAEADXgAAA1//wAAAAEADYAAAA2H/wAAAAEADYgAAA2P/wAAAAEADZAAAA2X/wAAAAEADZgAAA2f/wAAAAEADaAAAA2n/wAAAAEADagAAA2v/wAAAAEADbAAAA23/wAAAAEADbgAAA2//wAAAAEADcAAAA3H/wAAAAEADcgAAA3P/wAAAAEADdAAAA3X/wAAAAEADdgAAA3f/wAAAAEADeAAAA3n/wAAAAEADegAAA3v/wAAAAEADfAAAA33/wAAAAEADfgAAA3//QAAAAEADgAAAA4H/wAAAAEADggAAA4P/wAAAAEADhAAAA4X/wAAAAEADhgAAA4f/wAAAAEADiAAAA4n/wAAAAEADigAAA4v/wAAAAEADjAAAA43/wAAAAEADjgAAA4//wAAAAEADkAAAA5H/wAAAAEADkgAAA5P/wAAAAEADlAAAA5X/wAAAAEADlgAAA5f/wAAAAEADmAAAA5n/wAAAAEADmgAAA5v/wAAAAEADnAAAA53/wAAAAEADngAAA5//wAAAAEADoAAAA6H/wAAAAEADogAAA6P/wAAAAEADpAAAA6X/wAAAAEADpgAAA6f/wAAAAEADqAAAA6n/wAAAAEADqgAAA6v/wAAAAEADrAAAA63/wAAAAEADrgAAA6//wAAAAEADsAAAA7H/wAAAAEADsgAAA7P/wAAAAEADtAAAA7X/wAAAAEADtgAAA7f/wAAAAEADuAAAA7n/wAAAAEADugAAA7v/wAAAAEADvAAAA73/wAAAAEADvgAAA7//QAAAAEADwAAAA8H/wAAAAEADwgAAA8P/wAAAAEADxAAAA8X/wAAAAEADxgAAA8f/wAAAAEADyAAAA8n/wAAAAEADygAAA8v/wAAAAEADzAAAA83/wAAAAEADzgAAA8//wAAAAEAD0AAAA9H/wAAAAEAD0gAAA9P/wAAAAEAD1AAAA9X/wAAAAEAD1gAAA9f/wAAAAEAD2AAAA9n/wAAAAEAD2gAAA9v/wAAAAEAD3AAAA93/wAAAAEAD3gAAA9//wAAAAEAD4AAAA+H/wAAAAEAD4gAAA+P/wAAAAEAD5AAAA+X/wAAAAEAD5gAAA+f/wAAAAEAD6AAAA+n/wAAAAEAD6gAAA+v/wAAAAEAD7AAAA+3/wAAAAEAD7gAAA+//wAAAAEAD8AAAA/H/wAAAAEAD8gAAA/P/wAAAAEAD9AAAA/X/wAAAAEAD9gAAA/f/wAAAAEAD+AAAA/n/wAAAAEAD+gAAA/v/wAAAAEAD/AAAA/3/wAAAAEAD/gAAA///QAAAAEAEAAAABAH/wAAAAEAEAgAABAP/wAAAAEAEBAAABAX/wAAAAEAEBgAABAf/wAAAAEAECAAABAn/wAAAAEAECgAABAv/wAAAAEAEDAAABA3/wAAAAEAEDgAABA//wAAAAEAEEAAABBH/wAAAAEAEEgAABBP/wAAAAEAEFAAABBX/wAAAAEAEFgAABBf/wAAAAEAEGAAABBn/wAAAAEAEGgAABBv/wAAAAEAEHAAABB3/wAAAAEAEHgAABB//wAAAAEAEIAAABCH/wAAAAEAEIgAABCP/wAAAAEAEJAAABCX/wAAAAEAEJgAABCf/wAAAAEAEKAAABCn/wAAAAEAEKgAABCv/wAAAAEAELAAABC3/wAAAAEAELgAABC//wAAAAEAEMAAABDH/wAAAAEAEMgAABDP/wAAAAEAENAAABDX/wAAAAEAENgAABDf/wAAAAEAEOAAABDn/wAAAAEAEOgAABDv/wAAAAEAEPAAABD3/wAAAAEAEPgAABD//QAAAAEAAwAAAAAAAP+1ADIAAAAAAAAAAAAAAAAAAAAAAAAAAAEABAIAAQEBC0Fkb2JlQmxhbmsAAQEBMPgb+ByLDB74HQH4HgKL+wz6APoEBR4aBF8MHxwIAQwi91UP92IR91oMJRwZHwwkAAUBAQYOVmFwQWRvYmVJZGVudGl0eUNvcHlyaWdodCAyMDEzLCAyMDE1IEFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkIChodHRwOi8vd3d3LmFkb2JlLmNvbS8pLkFkb2JlIEJsYW5rQWRvYmVCbGFuay0yMDQ5AAACAAEH/wMAAQAAAAgBCAECAAEASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAGIAYwBkAGUAZgBnAGgAaQBqAGsAbABtAG4AbwBwAHEAcgBzAHQAdQB2AHcAeAB5AHoAewB8AH0AfgB/AIAAgQCCAIMAhACFAIYAhwCIAIkAigCLAIwAjQCOAI8AkACRAJIAkwCUAJUAlgCXAJgAmQCaAJsAnACdAJ4AnwCgAKEAogCjAKQApQCmAKcAqACpAKoAqwCsAK0ArgCvALAAsQCyALMAtAC1ALYAtwC4ALkAugC7ALwAvQC+AL8AwADBAMIAwwDEAMUAxgDHAMgAyQDKAMsAzADNAM4AzwDQANEA0gDTANQA1QDWANcA2ADZANoA2wDcAN0A3gDfAOAA4QDiAOMA5ADlAOYA5wDoAOkA6gDrAOwA7QDuAO8A8ADxAPIA8wD0APUA9gD3APgA+QD6APsA/AD9AP4A/wEAAQEBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeAR8BIAEhASIBIwEkASUBJgEnASgBKQEqASsBLAEtAS4BLwEwATEBMgEzATQBNQE2ATcBOAE5AToBOwE8AT0BPgE/AUABQQFCAUMBRAFFAUYBRwFIAUkBSgFLAUwBTQFOAU8BUAFRAVIBUwFUAVUBVgFXAVgBWQFaAVsBXAFdAV4BXwFgAWEBYgFjAWQBZQFmAWcBaAFpAWoBawFsAW0BbgFvAXABcQFyAXMBdAF1AXYBdwF4AXkBegF7AXwBfQF+AX8BgAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHPAdAB0QHSAdMB1AHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAfQB9QH2AfcB+AH5AfoB+wH8Af0B/gH/AgACAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGQIaAhsCHAIdAh4CHwIgAiECIgIjAiQCJQImAicCKAIpAioCKwIsAi0CLgIvAjACMQIyAjMCNAI1AjYCNwI4AjkCOgI7AjwCPQI+Aj8CQAJBAkICQwJEAkUCRgJHAkgCSQJKAksCTAJNAk4CTwJQAlECUgJTAlQCVQJWAlcCWAJZAloCWwJcAl0CXgJfAmACYQJiAmMCZAJlAmYCZwJoAmkCagJrAmwCbQJuAm8CcAJxAnICcwJ0AnUCdgJ3AngCeQJ6AnsCfAJ9An4CfwKAAoECggKDAoQChQKGAocCiAKJAooCiwKMAo0CjgKPApACkQKSApMClAKVApYClwKYApkCmgKbApwCnQKeAp8CoAKhAqICowKkAqUCpgKnAqgCqQKqAqsCrAKtAq4CrwKwArECsgKzArQCtQK2ArcCuAK5AroCuwK8Ar0CvgK/AsACwQLCAsMCxALFAsYCxwLIAskCygLLAswCzQLOAs8C0ALRAtIC0wLUAtUC1gLXAtgC2QLaAtsC3ALdAt4C3wLgAuEC4gLjAuQC5QLmAucC6ALpAuoC6wLsAu0C7gLvAvAC8QLyAvMC9AL1AvYC9wL4AvkC+gL7AvwC/QL+Av8DAAMBAwIDAwMEAwUDBgMHAwgDCQMKAwsDDAMNAw4DDwMQAxEDEgMTAxQDFQMWAxcDGAMZAxoDGwMcAx0DHgMfAyADIQMiAyMDJAMlAyYDJwMoAykDKgMrAywDLQMuAy8DMAMxAzIDMwM0AzUDNgM3AzgDOQM6AzsDPAM9Az4DPwNAA0EDQgNDA0QDRQNGA0cDSANJA0oDSwNMA00DTgNPA1ADUQNSA1MDVANVA1YDVwNYA1kDWgNbA1wDXQNeA18DYANhA2IDYwNkA2UDZgNnA2gDaQNqA2sDbANtA24DbwNwA3EDcgNzA3QDdQN2A3cDeAN5A3oDewN8A30DfgN/A4ADgQOCA4MDhAOFA4YDhwOIA4kDigOLA4wDjQOOA48DkAORA5IDkwOUA5UDlgOXA5gDmQOaA5sDnAOdA54DnwOgA6EDogOjA6QDpQOmA6cDqAOpA6oDqwOsA60DrgOvA7ADsQOyA7MDtAO1A7YDtwO4A7kDugO7A7wDvQO+A78DwAPBA8IDwwPEA8UDxgPHA8gDyQPKA8sDzAPNA84DzwPQA9ED0gPTA9QD1QPWA9cD2APZA9oD2wPcA90D3gPfA+AD4QPiA+MD5APlA+YD5wPoA+kD6gPrA+wD7QPuA+8D8APxA/ID8wP0A/UD9gP3A/gD+QP6A/sD/AP9A/4D/wQABAEEAgQDBAQEBQQGBAcECAQJBAoECwQMBA0EDgQPBBAEEQQSBBMEFAQVBBYEFwQYBBkEGgQbBBwEHQQeBB8EIAQhBCIEIwQkBCUEJgQnBCgEKQQqBCsELAQtBC4ELwQwBDEEMgQzBDQENQQ2BDcEOAQ5BDoEOwQ8BD0EPgQ/BEAEQQRCBEMERARFBEYERwRIBEkESgRLBEwETQROBE8EUARRBFIEUwRUBFUEVgRXBFgEWQRaBFsEXARdBF4EXwRgBGEEYgRjBGQEZQRmBGcEaARpBGoEawRsBG0EbgRvBHAEcQRyBHMEdAR1BHYEdwR4BHkEegR7BHwEfQR+BH8EgASBBIIEgwSEBIUEhgSHBIgEiQSKBIsEjASNBI4EjwSQBJEEkgSTBJQElQSWBJcEmASZBJoEmwScBJ0EngSfBKAEoQSiBKMEpASlBKYEpwSoBKkEqgSrBKwErQSuBK8EsASxBLIEswS0BLUEtgS3BLgEuQS6BLsEvAS9BL4EvwTABMEEwgTDBMQExQTGBMcEyATJBMoEywTMBM0EzgTPBNAE0QTSBNME1ATVBNYE1wTYBNkE2gTbBNwE3QTeBN8E4AThBOIE4wTkBOUE5gTnBOgE6QTqBOsE7ATtBO4E7wTwBPEE8gTzBPQE9QT2BPcE+AT5BPoE+wT8BP0E/gT/BQAFAQUCBQMFBAUFBQYFBwUIBQkFCgULBQwFDQUOBQ8FEAURBRIFEwUUBRUFFgUXBRgFGQUaBRsFHAUdBR4FHwUgBSEFIgUjBSQFJQUmBScFKAUpBSoFKwUsBS0FLgUvBTAFMQUyBTMFNAU1BTYFNwU4BTkFOgU7BTwFPQU+BT8FQAVBBUIFQwVEBUUFRgVHBUgFSQVKBUsFTAVNBU4FTwVQBVEFUgVTBVQFVQVWBVcFWAVZBVoFWwVcBV0FXgVfBWAFYQViBWMFZAVlBWYFZwVoBWkFagVrBWwFbQVuBW8FcAVxBXIFcwV0BXUFdgV3BXgFeQV6BXsFfAV9BX4FfwWABYEFggWDBYQFhQWGBYcFiAWJBYoFiwWMBY0FjgWPBZAFkQWSBZMFlAWVBZYFlwWYBZkFmgWbBZwFnQWeBZ8FoAWhBaIFowWkBaUFpgWnBagFqQWqBasFrAWtBa4FrwWwBbEFsgWzBbQFtQW2BbcFuAW5BboFuwW8Bb0FvgW/BcAFwQXCBcMFxAXFBcYFxwXIBckFygXLBcwFzQXOBc8F0AXRBdIF0wXUBdUF1gXXBdgF2QXaBdsF3AXdBd4F3wXgBeEF4gXjBeQF5QXmBecF6AXpBeoF6wXsBe0F7gXvBfAF8QXyBfMF9AX1BfYF9wX4BfkF+gX7BfwF/QX+Bf8GAAYBBgIGAwYEBgUGBgYHBggGCQYKBgsGDAYNBg4GDwYQBhEGEgYTBhQGFQYWBhcGGAYZBhoGGwYcBh0GHgYfBiAGIQYiBiMGJAYlBiYGJwYoBikGKgYrBiwGLQYuBi8GMAYxBjIGMwY0BjUGNgY3BjgGOQY6BjsGPAY9Bj4GPwZABkEGQgZDBkQGRQZGBkcGSAZJBkoGSwZMBk0GTgZPBlAGUQZSBlMGVAZVBlYGVwZYBlkGWgZbBlwGXQZeBl8GYAZhBmIGYwZkBmUGZgZnBmgGaQZqBmsGbAZtBm4GbwZwBnEGcgZzBnQGdQZ2BncGeAZ5BnoGewZ8Bn0GfgZ/BoAGgQaCBoMGhAaFBoYGhwaIBokGigaLBowGjQaOBo8GkAaRBpIGkwaUBpUGlgaXBpgGmQaaBpsGnAadBp4GnwagBqEGogajBqQGpQamBqcGqAapBqoGqwasBq0GrgavBrAGsQayBrMGtAa1BrYGtwa4BrkGuga7BrwGvQa+Br8GwAbBBsIGwwbEBsUGxgbHBsgGyQbKBssGzAbNBs4GzwbQBtEG0gbTBtQG1QbWBtcG2AbZBtoG2wbcBt0G3gbfBuAG4QbiBuMG5AblBuYG5wboBukG6gbrBuwG7QbuBu8G8AbxBvIG8wb0BvUG9gb3BvgG+Qb6BvsG/Ab9Bv4G/wcABwEHAgcDBwQHBQcGBwcHCAcJBwoHCwcMBw0HDgcPBxAHEQcSBxMHFAcVBxYHFwcYBxkHGgcbBxwHHQceBx8HIAchByIHIwckByUHJgcnBygHKQcqBysHLActBy4HLwcwBzEHMgczBzQHNQc2BzcHOAc5BzoHOwc8Bz0HPgc/B0AHQQdCB0MHRAdFB0YHRwdIB0kHSgdLB0wHTQdOB08HUAdRB1IHUwdUB1UHVgdXB1gHWQdaB1sHXAddB14HXwdgB2EHYgdjB2QHZQdmB2cHaAdpB2oHawdsB20HbgdvB3AHcQdyB3MHdAd1B3YHdwd4B3kHegd7B3wHfQd+B38HgAeBB4IHgweEB4UHhgeHB4gHiQeKB4sHjAeNB44HjweQB5EHkgeTB5QHlQeWB5cHmAeZB5oHmwecB50HngefB6AHoQeiB6MHpAelB6YHpweoB6kHqgerB6wHrQeuB68HsAexB7IHswe0B7UHtge3B7gHuQe6B7sHvAe9B74HvwfAB8EHwgfDB8QHxQfGB8cHyAfJB8oHywfMB80HzgfPB9AH0QfSB9MH1AfVB9YH1wfYB9kH2gfbB9wH3QfeB98H4AfhB+IH4wfkB+UH5gfnB+gH6QfqB+sH7AftB+4H7wfwB/EH8gfzB/QH9Qf2B/cH+Af5B/oH+wf8B/0H/gf/CAAIAQgCCAMIBAgFCAYIBwgICAkICggLCAwIDQgOCA8IEAgRCBIIEwgUCBUIFggXCBgIGQgaCBsIHAgdCB4IHwggCCEIIggjCCQIJQgmCCcIKAgpCCoIKwgsCC0ILggvCDAIMQgyCDMINAg1CDYINwg4CDkIOgg7CDwIPQg+CD8IQAhBCEIIQwhECEUIRghHCEgISQhKCEsg+wy3+iS3AfcQt/kstwP3EPoEFf58+YT6fAf9WP4nFfnSB/fF/DMFprAV+8X4NwX49gamYhX90gf7xfgzBXBmFffF/DcF/PYGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OAAEBAQr4HwwmmhwZLRL7joscBUaLBr0KvQv65xUD6AB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA==");}',
- a.cssRules.length);
- };
- (function(a) {
- a.instance = {enabled:!1, initJS:function(a) {
- }, registerCallback:function(a) {
- }, unregisterCallback:function(a) {
- }, eval:function(a) {
- }, call:function(a) {
- }, getId:function() {
- return null;
- }};
- })(e.ExternalInterfaceService || (e.ExternalInterfaceService = {}));
- (function(a) {
- a[a.InvalidCallback = -3] = "InvalidCallback";
- a[a.AlreadyTaken = -2] = "AlreadyTaken";
- a[a.InvalidName = -1] = "InvalidName";
- a[a.Success = 0] = "Success";
- })(e.LocalConnectionConnectResult || (e.LocalConnectionConnectResult = {}));
- (function(a) {
- a[a.NotConnected = -1] = "NotConnected";
- a[a.Success = 0] = "Success";
- })(e.LocalConnectionCloseResult || (e.LocalConnectionCloseResult = {}));
- (function(a) {
- a.instance;
- })(e.LocalConnectionService || (e.LocalConnectionService = {}));
- (function(a) {
- a.instance = {setClipboard:function(a) {
- m.notImplemented("setClipboard");
- }};
- })(e.ClipboardService || (e.ClipboardService = {}));
- l = function() {
- function a() {
- this._queues = {};
- }
- a.prototype.register = function(a, c) {
- m.assert(a);
- m.assert(c);
- var d = this._queues[a];
- if (d) {
- if (-1 < d.indexOf(c)) {
- return;
- }
- } else {
- d = this._queues[a] = [];
- }
- d.push(c);
- };
- a.prototype.unregister = function(a, c) {
- m.assert(a);
- m.assert(c);
- var d = this._queues[a];
- if (d) {
- var f = d.indexOf(c);
- -1 !== f && d.splice(f, 1);
- 0 === d.length && (this._queues[a] = null);
- }
- };
- a.prototype.notify = function(a, c) {
- var d = this._queues[a];
- if (d) {
- d = d.slice();
- c = Array.prototype.slice.call(arguments, 0);
- for (var f = 0;f < d.length;f++) {
- d[f].apply(null, c);
- }
- }
- };
- a.prototype.notify1 = function(a, c) {
- var d = this._queues[a];
- if (d) {
- for (var d = d.slice(), f = 0;f < d.length;f++) {
- (0,d[f])(a, c);
- }
- }
- };
- return a;
- }();
- e.Callback = l;
- (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";
- })(e.ImageType || (e.ImageType = {}));
- var u = e.ImageType;
- e.getMIMETypeForImageType = function(a) {
- switch(a) {
- case 4:
- return "image/jpeg";
- case 5:
- return "image/png";
- case 6:
- return "image/gif";
- default:
- return "text/plain";
- }
- };
- (function(a) {
- a.toCSSCursor = function(a) {
- switch(a) {
- case 0:
- return "auto";
- case 2:
- return "pointer";
- case 3:
- return "grab";
- case 4:
- return "text";
- default:
- return "default";
- }
- };
- })(e.UI || (e.UI = {}));
- l = function() {
- function a() {
- this.promise = new Promise(function(a, c) {
- this.resolve = a;
- this.reject = c;
- }.bind(this));
- }
- a.prototype.then = function(a, c) {
- return this.promise.then(a, c);
- };
- return a;
- }();
- e.PromiseWrapper = l;
-})(Shumway || (Shumway = {}));
-(function() {
- function e(a) {
- if ("function" !== typeof a) {
- throw new TypeError("Invalid deferred constructor");
- }
- var c = k();
- a = new a(c);
- var g = c.resolve;
- if ("function" !== typeof g) {
- throw new TypeError("Invalid resolve construction function");
- }
- c = c.reject;
- if ("function" !== typeof c) {
- throw new TypeError("Invalid reject construction function");
- }
- return {promise:a, resolve:g, reject:c};
- }
- function b(a, c) {
- if ("object" !== typeof a || null === a) {
- return !1;
- }
- try {
- var g = a.then;
- if ("function" !== typeof g) {
- return !1;
- }
- g.call(a, c.resolve, c.reject);
- } catch (d) {
- g = c.reject, g(d);
- }
- return !0;
- }
- function h(a) {
- return "object" === typeof a && null !== a && "undefined" !== typeof a.promiseStatus;
- }
- function n(a, c) {
- if ("unresolved" === a.promiseStatus) {
- var g = a.rejectReactions;
- a.result = c;
- a.resolveReactions = void 0;
- a.rejectReactions = void 0;
- a.promiseStatus = "has-rejection";
- t(g, c);
- }
- }
- function t(a, c) {
- for (var g = 0;g < a.length;g++) {
- m({reaction:a[g], argument:c});
- }
- }
- function m(a) {
- 0 === p.length && setTimeout(l, 0);
- p.push(a);
- }
- function l() {
- for (;0 < p.length;) {
- var a = p[0];
- try {
- a: {
- var c = a.reaction, g = c.deferred, d = c.handler, f = void 0, k = void 0;
- try {
- f = d(a.argument);
- } catch (u) {
- var r = g.reject;
- r(u);
- break a;
- }
- if (f === g.promise) {
- r = g.reject, r(new TypeError("Self resolution"));
- } else {
- try {
- if (k = b(f, g), !k) {
- var l = g.resolve;
- l(f);
- }
- } catch (n) {
- r = g.reject, r(n);
- }
- }
- }
- } catch (h) {
- if ("function" === typeof q.onerror) {
- q.onerror(h);
- }
- }
- p.shift();
- }
- }
- function d(a) {
- throw a;
- }
- function a(a) {
- return a;
- }
- function c(a) {
- return function(c) {
- n(a, c);
- };
- }
- function f(a) {
- return function(c) {
- if ("unresolved" === a.promiseStatus) {
- var g = a.resolveReactions;
- a.result = c;
- a.resolveReactions = void 0;
- a.rejectReactions = void 0;
- a.promiseStatus = "has-resolution";
- t(g, c);
- }
- };
- }
- function k() {
- function a(c, g) {
- a.resolve = c;
- a.reject = g;
- }
- return a;
- }
- function r(a, c, g) {
- return function(d) {
- if (d === a) {
- return g(new TypeError("Self resolution"));
- }
- var f = a.promiseConstructor;
- if (h(d) && d.promiseConstructor === f) {
- return d.then(c, g);
- }
- f = e(f);
- return b(d, f) ? f.promise.then(c, g) : c(d);
- };
- }
- function u(a, c, g, d) {
- return function(f) {
- c[a] = f;
- d.countdown--;
- 0 === d.countdown && g.resolve(c);
- };
- }
- function q(a) {
- if ("function" !== typeof a) {
- throw new TypeError("resolver is not a function");
- }
- if ("object" !== typeof this) {
- throw new TypeError("Promise to initialize is not an object");
- }
- this.promiseStatus = "unresolved";
- this.resolveReactions = [];
- this.rejectReactions = [];
- this.result = void 0;
- var g = f(this), d = c(this);
- try {
- a(g, d);
- } catch (p) {
- n(this, p);
- }
- this.promiseConstructor = q;
- return this;
- }
- var g = Function("return this")();
- if (g.Promise) {
- "function" !== typeof g.Promise.all && (g.Promise.all = function(a) {
- var c = 0, d = [], f, p, q = new g.Promise(function(a, c) {
- f = a;
- p = c;
- });
- a.forEach(function(a, g) {
- c++;
- a.then(function(a) {
- d[g] = a;
- c--;
- 0 === c && f(d);
- }, p);
- });
- 0 === c && f(d);
- return q;
- }), "function" !== typeof g.Promise.resolve && (g.Promise.resolve = function(a) {
- return new g.Promise(function(c) {
- c(a);
- });
- });
- } else {
- var p = [];
- q.all = function(a) {
- var c = e(this), g = [], d = {countdown:0}, f = 0;
- a.forEach(function(a) {
- a = this.cast(a);
- var p = u(f, g, c, d);
- a.then(p, c.reject);
- f++;
- d.countdown++;
- }, this);
- 0 === f && c.resolve(g);
- return c.promise;
- };
- q.cast = function(a) {
- if (h(a)) {
- return a;
- }
- var c = e(this);
- c.resolve(a);
- return c.promise;
- };
- q.reject = function(a) {
- var c = e(this);
- c.reject(a);
- return c.promise;
- };
- q.resolve = function(a) {
- var c = e(this);
- c.resolve(a);
- return c.promise;
- };
- q.prototype = {"catch":function(a) {
- this.then(void 0, a);
- }, then:function(c, g) {
- if (!h(this)) {
- throw new TypeError("this is not a Promises");
- }
- var f = e(this.promiseConstructor), p = "function" === typeof g ? g : d, q = r(this, "function" === typeof c ? c : a, p), q = {deferred:f, handler:q}, p = {deferred:f, handler:p};
- switch(this.promiseStatus) {
- case "unresolved":
- this.resolveReactions.push(q);
- this.rejectReactions.push(p);
- break;
- case "has-resolution":
- m({reaction:q, argument:this.result});
- break;
- case "has-rejection":
- m({reaction:p, argument:this.result});
- }
- return f.promise;
- }};
- g.Promise = q;
- }
-})();
-"undefined" !== typeof exports && (exports.Shumway = Shumway);
-(function() {
- function e(b, h, n) {
- b[h] || Object.defineProperty(b, h, {value:n, writable:!0, configurable:!0, enumerable:!1});
- }
- e(String.prototype, "padRight", function(b, h) {
- var n = this, e = n.replace(/\033\[[0-9]*m/g, "").length;
- if (!b || e >= h) {
- return n;
- }
- for (var e = (h - e) / b.length, m = 0;m < e;m++) {
- n += b;
- }
- return n;
- });
- e(String.prototype, "padLeft", function(b, h) {
- var n = this, e = n.length;
- if (!b || e >= h) {
- return n;
- }
- for (var e = (h - e) / b.length, m = 0;m < e;m++) {
- n = b + n;
- }
- return n;
- });
- e(String.prototype, "trim", function() {
- return this.replace(/^\s+|\s+$/g, "");
- });
- e(String.prototype, "endsWith", function(b) {
- return -1 !== this.indexOf(b, this.length - b.length);
- });
- e(Array.prototype, "replace", function(b, h) {
- if (b === h) {
- return 0;
- }
- for (var n = 0, e = 0;e < this.length;e++) {
- this[e] === b && (this[e] = h, n++);
- }
- return n;
- });
-})();
-(function(e) {
- (function(b) {
- var h = e.isObject, n = function() {
- function d(a, c, d, k) {
- this.shortName = a;
- this.longName = c;
- this.type = d;
- k = k || {};
- this.positional = k.positional;
- this.parseFn = k.parse;
- this.value = k.defaultValue;
- }
- d.prototype.parse = function(a) {
- this.value = "boolean" === this.type ? a : "number" === this.type ? parseInt(a, 10) : a;
- this.parseFn && this.parseFn(this.value);
- };
- return d;
- }();
- b.Argument = n;
- var t = function() {
- function d() {
- this.args = [];
- }
- d.prototype.addArgument = function(a, c, d, k) {
- a = new n(a, c, d, k);
- this.args.push(a);
- return a;
- };
- d.prototype.addBoundOption = function(a) {
- this.args.push(new n(a.shortName, a.longName, a.type, {parse:function(c) {
- a.value = c;
- }}));
- };
- d.prototype.addBoundOptionSet = function(a) {
- var c = this;
- a.options.forEach(function(a) {
- m.isOptionSet(a) ? c.addBoundOptionSet(a) : c.addBoundOption(a);
- });
- };
- d.prototype.getUsage = function() {
- var a = "";
- this.args.forEach(function(c) {
- a = c.positional ? a + c.longName : a + ("[-" + c.shortName + "|--" + c.longName + ("boolean" === c.type ? "" : " " + c.type[0].toUpperCase()) + "]");
- a += " ";
- });
- return a;
- };
- d.prototype.parse = function(a) {
- var c = {}, d = [];
- this.args.forEach(function(a) {
- a.positional ? d.push(a) : (c["-" + a.shortName] = a, c["--" + a.longName] = a);
- });
- for (var k = [];a.length;) {
- var b = a.shift(), u = null, q = b;
- if ("--" == b) {
- k = k.concat(a);
- break;
- } else {
- if ("-" == b.slice(0, 1) || "--" == b.slice(0, 2)) {
- u = c[b];
- if (!u) {
- continue;
- }
- q = "boolean" !== u.type ? a.shift() : !0;
- } else {
- d.length ? u = d.shift() : k.push(q);
- }
- }
- u && u.parse(q);
- }
- return k;
- };
- return d;
- }();
- b.ArgumentParser = t;
- var m = function() {
- function d(a, c) {
- void 0 === c && (c = null);
- this.open = !1;
- this.name = a;
- this.settings = c || {};
- this.options = [];
- }
- d.isOptionSet = function(a) {
- return a instanceof d ? !0 : "object" !== typeof a || null === a || a instanceof l ? !1 : "options" in a && "name" in a && "settings" in a;
- };
- d.prototype.register = function(a) {
- if (d.isOptionSet(a)) {
- for (var c = 0;c < this.options.length;c++) {
- var f = this.options[c];
- if (d.isOptionSet(f) && f.name === a.name) {
- return f;
- }
- }
- }
- this.options.push(a);
- if (this.settings) {
- if (d.isOptionSet(a)) {
- c = this.settings[a.name], h(c) && (a.settings = c.settings, a.open = c.open);
- } else {
- if ("undefined" !== typeof this.settings[a.longName]) {
- switch(a.type) {
- case "boolean":
- a.value = !!this.settings[a.longName];
- break;
- case "number":
- a.value = +this.settings[a.longName];
- break;
- default:
- a.value = this.settings[a.longName];
- }
- }
- }
- }
- return a;
- };
- d.prototype.trace = function(a) {
- a.enter(this.name + " {");
- this.options.forEach(function(c) {
- c.trace(a);
- });
- a.leave("}");
- };
- d.prototype.getSettings = function() {
- var a = {};
- this.options.forEach(function(c) {
- d.isOptionSet(c) ? a[c.name] = {settings:c.getSettings(), open:c.open} : a[c.longName] = c.value;
- });
- return a;
- };
- d.prototype.setSettings = function(a) {
- a && this.options.forEach(function(c) {
- d.isOptionSet(c) ? c.name in a && c.setSettings(a[c.name].settings) : c.longName in a && (c.value = a[c.longName]);
- });
- };
- return d;
- }();
- b.OptionSet = m;
- var l = function() {
- function d(a, c, d, k, b, u) {
- void 0 === u && (u = null);
- this.longName = c;
- this.shortName = a;
- this.type = d;
- this.value = this.defaultValue = k;
- this.description = b;
- this.config = u;
- }
- d.prototype.parse = function(a) {
- this.value = a;
- };
- d.prototype.trace = function(a) {
- a.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")");
- };
- return d;
- }();
- b.Option = l;
- })(e.Options || (e.Options = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- b.ROOT = "Shumway Options";
- b.shumwayOptions = new e.Options.OptionSet(b.ROOT);
- b.setSettings = function(n) {
- b.shumwayOptions.setSettings(n);
- };
- b.getSettings = function() {
- return b.shumwayOptions.getSettings();
- };
- })(e.Settings || (e.Settings = {}));
- var b = e.Options.Option;
- e.loggingOptions = e.Settings.shumwayOptions.register(new e.Options.OptionSet("Logging Options"));
- e.omitRepeatedWarnings = e.loggingOptions.register(new b("wo", "warnOnce", "boolean", !0, "Omit Repeated Warnings"));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var h = function() {
- function b(n, m) {
- this._parent = n;
- this._timers = e.ObjectUtilities.createMap();
- this._name = m;
- this._count = this._total = this._last = this._begin = 0;
- }
- b.time = function(h, m) {
- b.start(h);
- m();
- b.stop();
- };
- b.start = function(h) {
- b._top = b._top._timers[h] || (b._top._timers[h] = new b(b._top, h));
- b._top.start();
- h = b._flat._timers[h] || (b._flat._timers[h] = new b(b._flat, h));
- h.start();
- b._flatStack.push(h);
- };
- b.stop = function() {
- b._top.stop();
- b._top = b._top._parent;
- b._flatStack.pop().stop();
- };
- b.stopStart = function(h) {
- b.stop();
- b.start(h);
- };
- b.prototype.start = function() {
- this._begin = e.getTicks();
- };
- b.prototype.stop = function() {
- this._last = e.getTicks() - this._begin;
- this._total += this._last;
- this._count += 1;
- };
- b.prototype.toJSON = function() {
- return {name:this._name, total:this._total, timers:this._timers};
- };
- b.prototype.trace = function(b) {
- b.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms");
- for (var n in this._timers) {
- this._timers[n].trace(b);
- }
- b.outdent();
- };
- b.trace = function(h) {
- b._base.trace(h);
- b._flat.trace(h);
- };
- b._base = new b(null, "Total");
- b._top = b._base;
- b._flat = new b(null, "Flat");
- b._flatStack = [];
- return b;
- }();
- b.Timer = h;
- h = function() {
- function b(n) {
- this._enabled = n;
- this.clear();
- }
- Object.defineProperty(b.prototype, "counts", {get:function() {
- return this._counts;
- }, enumerable:!0, configurable:!0});
- b.prototype.setEnabled = function(b) {
- this._enabled = b;
- };
- b.prototype.clear = function() {
- this._counts = e.ObjectUtilities.createMap();
- this._times = e.ObjectUtilities.createMap();
- };
- b.prototype.toJSON = function() {
- return {counts:this._counts, times:this._times};
- };
- b.prototype.count = function(b, n, l) {
- void 0 === n && (n = 1);
- void 0 === l && (l = 0);
- if (this._enabled) {
- return void 0 === this._counts[b] && (this._counts[b] = 0, this._times[b] = 0), this._counts[b] += n, this._times[b] += l, this._counts[b];
- }
- };
- b.prototype.trace = function(b) {
- for (var n in this._counts) {
- b.writeLn(n + ": " + this._counts[n]);
- }
- };
- b.prototype._pairToString = function(b, n) {
- var l = n[0], d = n[1], a = b[l], l = l + ": " + d;
- a && (l += ", " + a.toFixed(4), 1 < d && (l += " (" + (a / d).toFixed(4) + ")"));
- return l;
- };
- b.prototype.toStringSorted = function() {
- var b = this, n = this._times, l = [], d;
- for (d in this._counts) {
- l.push([d, this._counts[d]]);
- }
- l.sort(function(a, c) {
- return c[1] - a[1];
- });
- return l.map(function(a) {
- return b._pairToString(n, a);
- }).join(", ");
- };
- b.prototype.traceSorted = function(b, n) {
- void 0 === n && (n = !1);
- var l = this, d = this._times, a = [], c;
- for (c in this._counts) {
- a.push([c, this._counts[c]]);
- }
- a.sort(function(a, c) {
- return c[1] - a[1];
- });
- n ? b.writeLn(a.map(function(a) {
- return l._pairToString(d, a);
- }).join(", ")) : a.forEach(function(a) {
- b.writeLn(l._pairToString(d, a));
- });
- };
- b.instance = new b(!0);
- return b;
- }();
- b.Counter = h;
- h = function() {
- function b(n) {
- this._samples = new Float64Array(n);
- this._index = this._count = 0;
- }
- b.prototype.push = function(b) {
- this._count < this._samples.length && this._count++;
- this._index++;
- this._samples[this._index % this._samples.length] = b;
- };
- b.prototype.average = function() {
- for (var b = 0, n = 0;n < this._count;n++) {
- b += this._samples[n];
- }
- return b / this._count;
- };
- return b;
- }();
- b.Average = h;
- })(e.Metrics || (e.Metrics = {}));
-})(Shumway || (Shumway = {}));
-var __extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- function h(a) {
- for (var c = Math.max.apply(null, a), g = a.length, d = 1 << c, f = new Uint32Array(d), q = c << 16 | 65535, k = 0;k < d;k++) {
- f[k] = q;
- }
- for (var q = 0, k = 1, b = 2;k <= c;q <<= 1, ++k, b <<= 1) {
- for (var u = 0;u < g;++u) {
- if (a[u] === k) {
- for (var r = 0, l = 0;l < k;++l) {
- r = 2 * r + (q >> l & 1);
- }
- for (l = r;l < d;l += b) {
- f[l] = k << 16 | u;
- }
- ++q;
- }
- }
- }
- return {codes:f, maxBits:c};
- }
- var n;
- (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";
- })(n || (n = {}));
- n = function() {
- function a(c) {
- }
- a.prototype.push = function(a) {
- };
- a.prototype.close = function() {
- };
- a.create = function(a) {
- return "undefined" !== typeof ShumwayCom && ShumwayCom.createSpecialInflate ? new u(a, ShumwayCom.createSpecialInflate) : new e(a);
- };
- a.prototype._processZLibHeader = function(a, c, g) {
- if (c + 2 > g) {
- return 0;
- }
- a = a[c] << 8 | a[c + 1];
- c = null;
- 2048 !== (a & 3840) ? c = "inflate: unknown compression method" : 0 !== a % 31 ? c = "inflate: bad FCHECK" : 0 !== (a & 32) && (c = "inflate: FDICT bit set");
- if (c) {
- if (this.onError) {
- this.onError(c);
- }
- return -1;
- }
- return 2;
- };
- a.inflate = function(c, g, d) {
- var f = new Uint8Array(g), q = 0;
- g = a.create(d);
- g.onData = function(a) {
- var c = Math.min(a.length, f.length - q);
- c && b.memCopy(f, a, q, 0, c);
- q += c;
- };
- g.onError = function(a) {
- throw Error(a);
- };
- g.push(c);
- g.close();
- return f;
- };
- return a;
- }();
- b.Inflate = n;
- var e = function(g) {
- function q(b) {
- g.call(this, b);
- this._buffer = null;
- this._bitLength = this._bitBuffer = this._bufferPosition = this._bufferSize = 0;
- this._window = new Uint8Array(65794);
- this._windowPosition = 0;
- this._state = b ? 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};
- if (!r) {
- m = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
- l = new Uint16Array(30);
- d = new Uint8Array(30);
- for (var v = b = 0, u = 1;30 > b;++b) {
- l[b] = u, u += 1 << (d[b] = ~~((v += 2 < b ? 1 : 0) / 2));
- }
- var n = new Uint8Array(288);
- for (b = 0;32 > b;++b) {
- n[b] = 5;
- }
- a = h(n.subarray(0, 32));
- c = new Uint16Array(29);
- f = new Uint8Array(29);
- v = b = 0;
- for (u = 3;29 > b;++b) {
- c[b] = u - (28 == b ? 1 : 0), u += 1 << (f[b] = ~~((v += 4 < b ? 1 : 0) / 4 % 6));
- }
- for (b = 0;288 > b;++b) {
- n[b] = 144 > b || 279 < b ? 8 : 256 > b ? 9 : 7;
- }
- k = h(n);
- r = !0;
- }
- }
- __extends(q, g);
- q.prototype.push = function(a) {
- if (!this._buffer || this._buffer.length < this._bufferSize + a.length) {
- var c = new Uint8Array(this._bufferSize + a.length);
- this._buffer && c.set(this._buffer);
- this._buffer = c;
- }
- this._buffer.set(a, this._bufferSize);
- this._bufferSize += a.length;
- this._bufferPosition = 0;
- a = !1;
- do {
- c = this._windowPosition;
- if (0 === this._state && (a = this._decodeInitState())) {
- break;
- }
- switch(this._state) {
- case 1:
- a = this._decodeBlock0();
- break;
- case 3:
- if (a = this._decodeBlock2Pre()) {
- break;
- }
- ;
- case 2:
- ;
- case 4:
- a = this._decodeBlock();
- break;
- case 6:
- ;
- case 5:
- 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 ? a = !0 : this._state = 6;
- }
- if (0 < this._windowPosition - c) {
- this.onData(this._window.subarray(c, 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);
- 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;
- };
- q.prototype._decodeInitState = function() {
- if (this._isFinalBlock) {
- return this._state = 5, !1;
- }
- var c = this._buffer, g = this._bufferSize, d = this._bitBuffer, f = this._bitLength, p = this._bufferPosition;
- if (3 > (g - p << 3) + f) {
- return !0;
- }
- 3 > f && (d |= c[p++] << f, f += 8);
- var q = d & 7, d = d >> 3, f = f - 3;
- switch(q >> 1) {
- case 0:
- f = d = 0;
- if (4 > g - p) {
- return !0;
- }
- var b = c[p] | c[p + 1] << 8, c = c[p + 2] | c[p + 3] << 8, p = p + 4;
- if (65535 !== (b ^ c)) {
- this._error("inflate: invalid block 0 length");
- c = 6;
- break;
- }
- 0 === b ? c = 0 : (this._block0Read = b, c = 1);
- break;
- case 1:
- c = 2;
- this._literalTable = k;
- this._distanceTable = a;
- break;
- case 2:
- if (26 > (g - p << 3) + f) {
- return !0;
- }
- for (;14 > f;) {
- d |= c[p++] << f, f += 8;
- }
- b = (d >> 10 & 15) + 4;
- if ((g - p << 3) + f < 14 + 3 * b) {
- return !0;
- }
- for (var g = {numLiteralCodes:(d & 31) + 257, numDistanceCodes:(d >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, d = d >> 14, f = f - 14, v = new Uint8Array(19), u = 0;u < b;++u) {
- 3 > f && (d |= c[p++] << f, f += 8), v[m[u]] = d & 7, d >>= 3, f -= 3;
- }
- for (;19 > u;u++) {
- v[m[u]] = 0;
- }
- g.bitLengths = new Uint8Array(g.numLiteralCodes + g.numDistanceCodes);
- g.codeLengthTable = h(v);
- this._block2State = g;
- c = 3;
- break;
- default:
- return this._error("inflate: unsupported block type"), !1;
- }
- this._isFinalBlock = !!(q & 1);
- this._state = c;
- this._bufferPosition = p;
- this._bitBuffer = d;
- this._bitLength = f;
- return !1;
- };
- q.prototype._error = function(a) {
- if (this.onError) {
- this.onError(a);
- }
- };
- q.prototype._decodeBlock0 = function() {
- var a = this._bufferPosition, c = this._windowPosition, g = this._block0Read, d = 65794 - c, f = this._bufferSize - a, p = f < g, q = Math.min(d, f, g);
- this._window.set(this._buffer.subarray(a, a + q), c);
- this._windowPosition = c + q;
- this._bufferPosition = a + q;
- this._block0Read = g - q;
- return g === q ? (this._state = 0, !1) : p && d < f;
- };
- q.prototype._readBits = function(a) {
- var c = this._bitBuffer, g = this._bitLength;
- if (a > g) {
- var d = this._bufferPosition, f = this._bufferSize;
- do {
- if (d >= f) {
- return this._bufferPosition = d, this._bitBuffer = c, this._bitLength = g, -1;
- }
- c |= this._buffer[d++] << g;
- g += 8;
- } while (a > g);
- this._bufferPosition = d;
- }
- this._bitBuffer = c >> a;
- this._bitLength = g - a;
- return c & (1 << a) - 1;
- };
- q.prototype._readCode = function(a) {
- var c = this._bitBuffer, g = this._bitLength, d = a.maxBits;
- if (d > g) {
- var f = this._bufferPosition, p = this._bufferSize;
- do {
- if (f >= p) {
- return this._bufferPosition = f, this._bitBuffer = c, this._bitLength = g, -1;
- }
- c |= this._buffer[f++] << g;
- g += 8;
- } while (d > g);
- this._bufferPosition = f;
- }
- a = a.codes[c & (1 << d) - 1];
- d = a >> 16;
- if (a & 32768) {
- return this._error("inflate: invalid encoding"), this._state = 6, -1;
- }
- this._bitBuffer = c >> d;
- this._bitLength = g - d;
- return a & 65535;
- };
- q.prototype._decodeBlock2Pre = function() {
- var a = this._block2State, c = a.numLiteralCodes + a.numDistanceCodes, g = a.bitLengths, d = a.codesRead, f = 0 < d ? g[d - 1] : 0, p = a.codeLengthTable, q;
- if (0 < a.dupBits) {
- q = this._readBits(a.dupBits);
- if (0 > q) {
- return !0;
- }
- for (;q--;) {
- g[d++] = f;
- }
- a.dupBits = 0;
- }
- for (;d < c;) {
- var k = this._readCode(p);
- if (0 > k) {
- return a.codesRead = d, !0;
- }
- if (16 > k) {
- g[d++] = f = k;
- } else {
- var b;
- switch(k) {
- case 16:
- b = 2;
- q = 3;
- k = f;
- break;
- case 17:
- q = b = 3;
- k = 0;
- break;
- case 18:
- b = 7, q = 11, k = 0;
- }
- for (;q--;) {
- g[d++] = k;
- }
- q = this._readBits(b);
- if (0 > q) {
- return a.codesRead = d, a.dupBits = b, !0;
- }
- for (;q--;) {
- g[d++] = k;
- }
- f = k;
- }
- }
- this._literalTable = h(g.subarray(0, a.numLiteralCodes));
- this._distanceTable = h(g.subarray(a.numLiteralCodes));
- this._state = 4;
- this._block2State = null;
- return !1;
- };
- q.prototype._decodeBlock = function() {
- var a = this._literalTable, g = this._distanceTable, p = this._window, q = this._windowPosition, k = this._copyState, b, v, u, r;
- if (0 !== k.state) {
- switch(k.state) {
- case 1:
- if (0 > (b = this._readBits(k.lenBits))) {
- return !0;
- }
- k.len += b;
- k.state = 2;
- case 2:
- if (0 > (b = this._readCode(g))) {
- return !0;
- }
- k.distBits = d[b];
- k.dist = l[b];
- k.state = 3;
- case 3:
- b = 0;
- if (0 < k.distBits && 0 > (b = this._readBits(k.distBits))) {
- return !0;
- }
- r = k.dist + b;
- v = k.len;
- for (b = q - r;v--;) {
- p[q++] = p[b++];
- }
- k.state = 0;
- if (65536 <= q) {
- return this._windowPosition = q, !1;
- }
- break;
- }
- }
- do {
- b = this._readCode(a);
- if (0 > b) {
- return this._windowPosition = q, !0;
- }
- if (256 > b) {
- p[q++] = b;
- } else {
- if (256 < b) {
- this._windowPosition = q;
- b -= 257;
- u = f[b];
- v = c[b];
- b = 0 === u ? 0 : this._readBits(u);
- if (0 > b) {
- return k.state = 1, k.len = v, k.lenBits = u, !0;
- }
- v += b;
- b = this._readCode(g);
- if (0 > b) {
- return k.state = 2, k.len = v, !0;
- }
- u = d[b];
- r = l[b];
- b = 0 === u ? 0 : this._readBits(u);
- if (0 > b) {
- return k.state = 3, k.len = v, k.dist = r, k.distBits = u, !0;
- }
- r += b;
- for (b = q - r;v--;) {
- p[q++] = p[b++];
- }
- } else {
- this._state = 0;
- break;
- }
- }
- } while (65536 > q);
- this._windowPosition = q;
- return !1;
- };
- return q;
- }(n), m, l, d, a, c, f, k, r = !1, u = function(a) {
- function c(g, d) {
- a.call(this, g);
- this._verifyHeader = g;
- this._specialInflate = d();
- this._specialInflate.setDataCallback(function(a) {
- this.onData(a);
- }.bind(this));
- }
- __extends(c, a);
- c.prototype.push = function(a) {
- if (this._verifyHeader) {
- var c;
- this._buffer ? (c = new Uint8Array(this._buffer.length + a.length), c.set(this._buffer), c.set(a, this._buffer.length), this._buffer = null) : c = new Uint8Array(a);
- var g = this._processZLibHeader(c, 0, c.length);
- if (0 === g) {
- this._buffer = c;
- return;
- }
- this._verifyHeader = !0;
- 0 < g && (a = c.subarray(g));
- }
- this._specialInflate.push(a);
- };
- c.prototype.close = function() {
- this._specialInflate && (this._specialInflate.close(), this._specialInflate = null);
- };
- return c;
- }(n), q;
- (function(a) {
- a[a.WRITE = 0] = "WRITE";
- a[a.DONE = 1] = "DONE";
- a[a.ZLIB_HEADER = 2] = "ZLIB_HEADER";
- })(q || (q = {}));
- var g = function() {
- function a() {
- this.a = 1;
- this.b = 0;
- }
- a.prototype.update = function(a, c, g) {
- for (var d = this.a, f = this.b;c < g;++c) {
- d = (d + (a[c] & 255)) % 65521, f = (f + d) % 65521;
- }
- this.a = d;
- this.b = f;
- };
- a.prototype.getChecksum = function() {
- return this.b << 16 | this.a;
- };
- return a;
- }();
- b.Adler32 = g;
- q = function() {
- function a(c) {
- this._state = (this._writeZlibHeader = c) ? 2 : 0;
- this._adler32 = c ? new g : null;
- }
- a.prototype.push = function(a) {
- 2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0);
- for (var c = a.length, g = c + 5 * Math.ceil(c / 65535), g = new Uint8Array(g), d = 0, f = 0;65535 < c;) {
- g.set(new Uint8Array([0, 255, 255, 0, 0]), d), d += 5, g.set(a.subarray(f, f + 65535), d), f += 65535, d += 65535, c -= 65535;
- }
- g.set(new Uint8Array([0, c & 255, c >> 8 & 255, ~c & 255, ~c >> 8 & 255]), d);
- d += 5;
- g.set(a.subarray(f, c), d);
- this.onData(g);
- this._adler32 && this._adler32.update(a, 0, c);
- };
- a.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]));
- }
- };
- return a;
- }();
- b.Deflate = q;
- })(e.ArrayUtilities || (e.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a) {
- for (var c = new Uint16Array(a), g = 0;g < a;g++) {
- c[g] = 1024;
- }
- return c;
- }
- function n(a, c, g, d) {
- for (var f = 1, p = 0, q = 0;q < g;q++) {
- var k = d.decodeBit(a, f + c), f = (f << 1) + k, p = p | k << q
- }
- return p;
- }
- function e(a, g) {
- var d = [];
- d.length = g;
- for (var f = 0;f < g;f++) {
- d[f] = new c(a);
- }
- return d;
- }
- var m = function() {
- function a() {
- this.pos = this.available = 0;
- this.buffer = new Uint8Array(2E3);
- }
- a.prototype.append = function(a) {
- var c = this.pos + this.available, g = c + a.length;
- if (g > this.buffer.length) {
- for (var d = 2 * this.buffer.length;d < g;) {
- d *= 2;
- }
- g = new Uint8Array(d);
- g.set(this.buffer);
- this.buffer = g;
- }
- this.buffer.set(a, c);
- this.available += a.length;
- };
- a.prototype.compact = function() {
- 0 !== this.available && (this.buffer.set(this.buffer.subarray(this.pos, this.pos + this.available), 0), this.pos = 0);
- };
- a.prototype.readByte = function() {
- if (0 >= this.available) {
- throw Error("Unexpected end of file");
- }
- this.available--;
- return this.buffer[this.pos++];
- };
- return a;
- }(), l = function() {
- function a(c) {
- this.onData = c;
- this.processed = 0;
- }
- a.prototype.writeBytes = function(a) {
- this.onData.call(null, a);
- this.processed += a.length;
- };
- return a;
- }(), d = function() {
- function a(c) {
- this.outStream = c;
- this.buf = null;
- this.size = this.pos = 0;
- this.isFull = !1;
- this.totalPos = this.writePos = 0;
- }
- a.prototype.create = function(a) {
- this.buf = new Uint8Array(a);
- this.pos = 0;
- this.size = a;
- this.isFull = !1;
- this.totalPos = this.writePos = 0;
- };
- a.prototype.putByte = function(a) {
- this.totalPos++;
- this.buf[this.pos++] = a;
- this.pos === this.size && (this.flush(), this.pos = 0, this.isFull = !0);
- };
- a.prototype.getByte = function(a) {
- return this.buf[a <= this.pos ? this.pos - a : this.size - a + this.pos];
- };
- a.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);
- };
- a.prototype.copyMatch = function(a, c) {
- for (var g = this.pos, d = this.size, f = this.buf, p = a <= g ? g - a : d - a + g, q = c;0 < q;) {
- for (var k = Math.min(Math.min(q, d - g), d - p), b = 0;b < k;b++) {
- var u = f[p++];
- f[g++] = u;
- }
- g === d && (this.pos = g, this.flush(), g = 0, this.isFull = !0);
- p === d && (p = 0);
- q -= k;
- }
- this.pos = g;
- this.totalPos += c;
- };
- a.prototype.checkDistance = function(a) {
- return a <= this.pos || this.isFull;
- };
- a.prototype.isEmpty = function() {
- return 0 === this.pos && !this.isFull;
- };
- return a;
- }(), a = function() {
- function a(c) {
- this.inStream = c;
- this.code = this.range = 0;
- this.corrupted = !1;
- }
- a.prototype.init = function() {
- 0 !== this.inStream.readByte() && (this.corrupted = !0);
- this.range = -1;
- for (var a = 0, c = 0;4 > c;c++) {
- a = a << 8 | this.inStream.readByte();
- }
- a === this.range && (this.corrupted = !0);
- this.code = a;
- };
- a.prototype.isFinishedOK = function() {
- return 0 === this.code;
- };
- a.prototype.decodeDirectBits = function(a) {
- var c = 0, g = this.range, d = this.code;
- do {
- var g = g >>> 1 | 0, d = d - g | 0, f = d >> 31, d = d + (g & f) | 0;
- d === g && (this.corrupted = !0);
- 0 <= g && 16777216 > g && (g <<= 8, d = d << 8 | this.inStream.readByte());
- c = (c << 1) + f + 1 | 0;
- } while (--a);
- this.range = g;
- this.code = d;
- return c;
- };
- a.prototype.decodeBit = function(a, c) {
- var g = this.range, d = this.code, f = a[c], p = (g >>> 11) * f;
- d >>> 0 < p ? (f = f + (2048 - f >> 5) | 0, g = p | 0, p = 0) : (f = f - (f >> 5) | 0, d = d - p | 0, g = g - p | 0, p = 1);
- a[c] = f & 65535;
- 0 <= g && 16777216 > g && (g <<= 8, d = d << 8 | this.inStream.readByte());
- this.range = g;
- this.code = d;
- return p;
- };
- return a;
- }(), c = function() {
- function a(c) {
- this.numBits = c;
- this.probs = h(1 << c);
- }
- a.prototype.decode = function(a) {
- for (var c = 1, g = 0;g < this.numBits;g++) {
- c = (c << 1) + a.decodeBit(this.probs, c);
- }
- return c - (1 << this.numBits);
- };
- a.prototype.reverseDecode = function(a) {
- return n(this.probs, 0, this.numBits, a);
- };
- return a;
- }(), f = function() {
- function a() {
- this.choice = h(2);
- this.lowCoder = e(3, 16);
- this.midCoder = e(3, 16);
- this.highCoder = new c(8);
- }
- a.prototype.decode = function(a, c) {
- return 0 === a.decodeBit(this.choice, 0) ? this.lowCoder[c].decode(a) : 0 === a.decodeBit(this.choice, 1) ? 8 + this.midCoder[c].decode(a) : 16 + this.highCoder.decode(a);
- };
- return a;
- }(), k = function() {
- function p(c, g) {
- this.rangeDec = new a(c);
- this.outWindow = new d(g);
- 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;
- }
- p.prototype.decodeProperties = function(a) {
- var c = a[0];
- if (225 <= c) {
- throw Error("Incorrect LZMA properties");
- }
- this.lc = c % 9;
- c = c / 9 | 0;
- this.pb = c / 5 | 0;
- this.lp = c % 5;
- for (c = this.dictSizeInProperties = 0;4 > c;c++) {
- this.dictSizeInProperties |= a[c + 1] << 8 * c;
- }
- this.dictSize = this.dictSizeInProperties;
- 4096 > this.dictSize && (this.dictSize = 4096);
- };
- p.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;
- };
- p.prototype.decodeLiteral = function(a, c) {
- var g = this.outWindow, d = this.rangeDec, f = 0;
- g.isEmpty() || (f = g.getByte(1));
- var p = 1, f = 768 * (((g.totalPos & (1 << this.lp) - 1) << this.lc) + (f >> 8 - this.lc));
- if (7 <= a) {
- g = g.getByte(c + 1);
- do {
- var q = g >> 7 & 1, g = g << 1, k = d.decodeBit(this.litProbs, f + ((1 + q << 8) + p)), p = p << 1 | k;
- if (q !== k) {
- break;
- }
- } while (256 > p);
- }
- for (;256 > p;) {
- p = p << 1 | d.decodeBit(this.litProbs, f + p);
- }
- return p - 256 & 255;
- };
- p.prototype.decodeDistance = function(a) {
- var c = a;
- 3 < c && (c = 3);
- a = this.rangeDec;
- c = this.posSlotDecoder[c].decode(a);
- if (4 > c) {
- return c;
- }
- var g = (c >> 1) - 1, d = (2 | c & 1) << g;
- 14 > c ? d = d + n(this.posDecoders, d - c, g, a) | 0 : (d = d + (a.decodeDirectBits(g - 4) << 4) | 0, d = d + this.alignDecoder.reverseDecode(a) | 0);
- return d;
- };
- p.prototype.init = function() {
- this.litProbs = h(768 << this.lc + this.lp);
- this.posSlotDecoder = e(6, 4);
- this.alignDecoder = new c(4);
- this.posDecoders = h(115);
- this.isMatch = h(192);
- this.isRep = h(12);
- this.isRepG0 = h(12);
- this.isRepG1 = h(12);
- this.isRepG2 = h(12);
- this.isRep0Long = h(192);
- this.lenDecoder = new f;
- this.repLenDecoder = new f;
- };
- p.prototype.decode = function(a) {
- for (var c = this.rangeDec, d = this.outWindow, f = this.pb, p = this.dictSize, k = this.markerIsMandatory, b = this.leftToUnpack, v = this.isMatch, l = this.isRep, n = this.isRepG0, h = this.isRepG1, m = this.isRepG2, e = this.isRep0Long, D = this.lenDecoder, H = this.repLenDecoder, t = this.reps[0], O = this.reps[1], S = this.reps[2], P = this.reps[3], N = this.state;;) {
- if (a && 48 > c.inStream.available) {
- this.outWindow.flush();
- break;
- }
- if (0 === b && !k && (this.outWindow.flush(), c.isFinishedOK())) {
- return q;
- }
- var Q = d.totalPos & (1 << f) - 1;
- if (0 === c.decodeBit(v, (N << 4) + Q)) {
- if (0 === b) {
- return r;
- }
- d.putByte(this.decodeLiteral(N, t));
- N = 4 > N ? 0 : 10 > N ? N - 3 : N - 6;
- b--;
- } else {
- if (0 !== c.decodeBit(l, N)) {
- if (0 === b || d.isEmpty()) {
- return r;
- }
- if (0 === c.decodeBit(n, N)) {
- if (0 === c.decodeBit(e, (N << 4) + Q)) {
- N = 7 > N ? 9 : 11;
- d.putByte(d.getByte(t + 1));
- b--;
- continue;
- }
- } else {
- var V;
- 0 === c.decodeBit(h, N) ? V = O : (0 === c.decodeBit(m, N) ? V = S : (V = P, P = S), S = O);
- O = t;
- t = V;
- }
- Q = H.decode(c, Q);
- N = 7 > N ? 8 : 11;
- } else {
- P = S;
- S = O;
- O = t;
- Q = D.decode(c, Q);
- N = 7 > N ? 7 : 10;
- t = this.decodeDistance(Q);
- if (-1 === t) {
- return this.outWindow.flush(), c.isFinishedOK() ? u : r;
- }
- if (0 === b || t >= p || !d.checkDistance(t)) {
- return r;
- }
- }
- Q += 2;
- V = !1;
- void 0 !== b && b < Q && (Q = b, V = !0);
- d.copyMatch(t + 1, Q);
- b -= Q;
- if (V) {
- return r;
- }
- }
- }
- this.state = N;
- this.reps[0] = t;
- this.reps[1] = O;
- this.reps[2] = S;
- this.reps[3] = P;
- this.leftToUnpack = b;
- return g;
- };
- p.prototype.flushOutput = function() {
- this.outWindow.flush();
- };
- return p;
- }(), r = 0, u = 1, q = 2, g = 3, p;
- (function(a) {
- a[a.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER";
- a[a.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER";
- a[a.PROCESS_DATA = 2] = "PROCESS_DATA";
- a[a.CLOSED = 3] = "CLOSED";
- a[a.ERROR = 4] = "ERROR";
- })(p || (p = {}));
- p = function() {
- function a(c) {
- void 0 === c && (c = !1);
- this._state = c ? 1 : 0;
- this.buffer = null;
- }
- a.prototype.push = function(a) {
- if (2 > this._state) {
- var c = this.buffer ? this.buffer.length : 0, d = (1 === this._state ? 17 : 13) + 5;
- if (c + a.length < d) {
- d = new Uint8Array(c + a.length);
- 0 < c && d.set(this.buffer);
- d.set(a, c);
- this.buffer = d;
- return;
- }
- var f = new Uint8Array(d);
- 0 < c && f.set(this.buffer);
- f.set(a.subarray(0, d - c), c);
- this._inStream = new m;
- this._inStream.append(f.subarray(d - 5));
- this._outStream = new l(function(a) {
- this.onData.call(null, a);
- }.bind(this));
- this._decoder = new k(this._inStream, this._outStream);
- if (1 === this._state) {
- this._decoder.decodeProperties(f.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((f[4] | f[5] << 8 | f[6] << 16 | f[7] << 24) >>> 0) - 8;
- } else {
- this._decoder.decodeProperties(f.subarray(0, 5));
- for (var c = 0, p = !1, q = 0;8 > q;q++) {
- var b = f[5 + q];
- 255 !== b && (p = !0);
- c |= b << 8 * q;
- }
- this._decoder.markerIsMandatory = !p;
- this._decoder.unpackSize = p ? c : void 0;
- }
- this._decoder.create();
- a = a.subarray(d);
- this._state = 2;
- } else {
- if (2 !== this._state) {
- return;
- }
- }
- try {
- this._inStream.append(a);
- var u = this._decoder.decode(!0);
- this._inStream.compact();
- u !== g && this._checkError(u);
- } catch (v) {
- this._decoder.flushOutput(), this._decoder = null, this._error(v);
- }
- };
- a.prototype.close = function() {
- if (2 === this._state) {
- this._state = 3;
- try {
- var a = this._decoder.decode(!1);
- this._checkError(a);
- } catch (c) {
- this._decoder.flushOutput(), this._error(c);
- }
- this._decoder = null;
- }
- };
- a.prototype._error = function(a) {
- this._state = 4;
- if (this.onError) {
- this.onError(a);
- }
- };
- a.prototype._checkError = function(a) {
- var c;
- a === r ? c = "LZMA decoding error" : a === g ? c = "Decoding is not complete" : a === u ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (c = "Finished with end marker before than specified size") : c = "Internal LZMA Error";
- c && this._error(c);
- };
- return a;
- }();
- b.LzmaDecoder = p;
- })(e.ArrayUtilities || (e.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a) {
- return "string" === typeof a ? a : void 0 == a ? null : a + "";
- }
- var n = e.Debug.notImplemented, t = e.StringUtilities.utf8decode, m = e.StringUtilities.utf8encode, l = e.NumberUtilities.clamp, d = function() {
- return function(a, c, d) {
- this.buffer = a;
- this.length = c;
- this.littleEndian = d;
- };
- }();
- b.PlainObjectDataBuffer = d;
- for (var a = new Uint32Array(33), c = 1, f = 0;32 >= c;c++) {
- a[c] = f = f << 1 | 1;
- }
- var k;
- (function(a) {
- a[a.U8 = 1] = "U8";
- a[a.I32 = 2] = "I32";
- a[a.F32 = 4] = "F32";
- })(k || (k = {}));
- c = function() {
- function c(a) {
- void 0 === a && (a = c.INITIAL_SIZE);
- this._buffer || (this._buffer = new ArrayBuffer(a), this._position = this._length = 0, this._resetViews(), this._littleEndian = c._nativeLittleEndian, this._bitLength = this._bitBuffer = 0);
- }
- c.FromArrayBuffer = function(a, d) {
- void 0 === d && (d = -1);
- var g = Object.create(c.prototype);
- g._buffer = a;
- g._length = -1 === d ? a.byteLength : d;
- g._position = 0;
- g._resetViews();
- g._littleEndian = c._nativeLittleEndian;
- g._bitBuffer = 0;
- g._bitLength = 0;
- return g;
- };
- c.FromPlainObject = function(a) {
- var d = c.FromArrayBuffer(a.buffer, a.length);
- d._littleEndian = a.littleEndian;
- return d;
- };
- c.prototype.toPlainObject = function() {
- return new d(this._buffer, this._length, this._littleEndian);
- };
- c.prototype._resetViews = function() {
- this._u8 = new Uint8Array(this._buffer);
- this._f32 = this._i32 = null;
- };
- c.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)));
- };
- c.prototype.getBytes = function() {
- return new Uint8Array(this._buffer, 0, this._length);
- };
- c.prototype._ensureCapacity = function(a) {
- var d = this._buffer;
- if (!(d.byteLength >= a)) {
- for (var g = Math.max(d.byteLength, 1);g < a;) {
- g *= 2;
- }
- 4294967295 < g && this.sec.throwError("RangeError", Errors.ParamRangeError);
- g = c._arrayBufferPool.acquire(g);
- a = this._u8;
- this._buffer = g;
- this._resetViews();
- this._u8.set(a);
- g = this._u8;
- for (a = a.length;a < g.length;a++) {
- g[a] = 0;
- }
- c._arrayBufferPool.release(d);
- }
- };
- c.prototype.clear = function() {
- this._position = this._length = 0;
- };
- c.prototype.readBoolean = function() {
- return 0 !== this.readUnsignedByte();
- };
- c.prototype.readByte = function() {
- return this.readUnsignedByte() << 24 >> 24;
- };
- c.prototype.readUnsignedByte = function() {
- this._position + 1 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- return this._u8[this._position++];
- };
- c.prototype.readBytes = function(a, c, g) {
- var d = this._position;
- c >>>= 0;
- g >>>= 0;
- 0 === g && (g = this._length - d);
- d + g > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- a.length < c + g && (a._ensureCapacity(c + g), a.length = c + g);
- a._u8.set(new Uint8Array(this._buffer, d, g), c);
- this._position += g;
- };
- c.prototype.readShort = function() {
- return this.readUnsignedShort() << 16 >> 16;
- };
- c.prototype.readUnsignedShort = function() {
- var a = this._u8, c = this._position;
- c + 2 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = a[c + 0], a = a[c + 1];
- this._position = c + 2;
- return this._littleEndian ? a << 8 | g : g << 8 | a;
- };
- c.prototype.readInt = function() {
- var a = this._u8, c = this._position;
- c + 4 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = a[c + 0], d = a[c + 1], f = a[c + 2], a = a[c + 3];
- this._position = c + 4;
- return this._littleEndian ? a << 24 | f << 16 | d << 8 | g : g << 24 | d << 16 | f << 8 | a;
- };
- c.prototype.readUnsignedInt = function() {
- return this.readInt() >>> 0;
- };
- c.prototype.readFloat = function() {
- var a = this._position;
- a + 4 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- this._position = a + 4;
- this._requestViews(4);
- if (this._littleEndian && 0 === (a & 3) && this._f32) {
- return this._f32[a >> 2];
- }
- var c = this._u8, g = e.IntegerUtilities.u8;
- this._littleEndian ? (g[0] = c[a + 0], g[1] = c[a + 1], g[2] = c[a + 2], g[3] = c[a + 3]) : (g[3] = c[a + 0], g[2] = c[a + 1], g[1] = c[a + 2], g[0] = c[a + 3]);
- return e.IntegerUtilities.f32[0];
- };
- c.prototype.readDouble = function() {
- var a = this._u8, c = this._position;
- c + 8 > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- var g = e.IntegerUtilities.u8;
- this._littleEndian ? (g[0] = a[c + 0], g[1] = a[c + 1], g[2] = a[c + 2], g[3] = a[c + 3], g[4] = a[c + 4], g[5] = a[c + 5], g[6] = a[c + 6], g[7] = a[c + 7]) : (g[0] = a[c + 7], g[1] = a[c + 6], g[2] = a[c + 5], g[3] = a[c + 4], g[4] = a[c + 3], g[5] = a[c + 2], g[6] = a[c + 1], g[7] = a[c + 0]);
- this._position = c + 8;
- return e.IntegerUtilities.f64[0];
- };
- c.prototype.writeBoolean = function(a) {
- this.writeByte(a ? 1 : 0);
- };
- c.prototype.writeByte = function(a) {
- var c = this._position + 1;
- this._ensureCapacity(c);
- this._u8[this._position++] = a;
- c > this._length && (this._length = c);
- };
- c.prototype.writeUnsignedByte = function(a) {
- var c = this._position + 1;
- this._ensureCapacity(c);
- this._u8[this._position++] = a;
- c > this._length && (this._length = c);
- };
- c.prototype.writeRawBytes = function(a) {
- var c = this._position + a.length;
- this._ensureCapacity(c);
- this._u8.set(a, this._position);
- this._position = c;
- c > this._length && (this._length = c);
- };
- c.prototype.writeBytes = function(a, c, g) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", Errors.NullPointerError, "bytes");
- c >>>= 0;
- g >>>= 0;
- 2 > arguments.length && (c = 0);
- 3 > arguments.length && (g = 0);
- c === l(c, 0, a.length) && c + g === l(c + g, 0, a.length) || this.sec.throwError("RangeError", Errors.ParamRangeError);
- 0 === g && (g = a.length - c);
- this.writeRawBytes(new Int8Array(a._buffer, c, g));
- };
- c.prototype.writeShort = function(a) {
- this.writeUnsignedShort(a);
- };
- c.prototype.writeUnsignedShort = function(a) {
- var c = this._position;
- this._ensureCapacity(c + 2);
- var g = this._u8;
- this._littleEndian ? (g[c + 0] = a, g[c + 1] = a >> 8) : (g[c + 0] = a >> 8, g[c + 1] = a);
- this._position = c += 2;
- c > this._length && (this._length = c);
- };
- c.prototype.writeInt = function(a) {
- this.writeUnsignedInt(a);
- };
- c.prototype.write2Ints = function(a, c) {
- this.write2UnsignedInts(a, c);
- };
- c.prototype.write4Ints = function(a, c, g, d) {
- this.write4UnsignedInts(a, c, g, d);
- };
- c.prototype.writeUnsignedInt = function(a) {
- var d = this._position;
- this._ensureCapacity(d + 4);
- this._requestViews(2);
- if (this._littleEndian === c._nativeLittleEndian && 0 === (d & 3) && this._i32) {
- this._i32[d >> 2] = a;
- } else {
- var g = this._u8;
- this._littleEndian ? (g[d + 0] = a, g[d + 1] = a >> 8, g[d + 2] = a >> 16, g[d + 3] = a >> 24) : (g[d + 0] = a >> 24, g[d + 1] = a >> 16, g[d + 2] = a >> 8, g[d + 3] = a);
- }
- this._position = d += 4;
- d > this._length && (this._length = d);
- };
- c.prototype.write2UnsignedInts = function(a, d) {
- var g = this._position;
- this._ensureCapacity(g + 8);
- this._requestViews(2);
- this._littleEndian === c._nativeLittleEndian && 0 === (g & 3) && this._i32 ? (this._i32[(g >> 2) + 0] = a, this._i32[(g >> 2) + 1] = d, this._position = g += 8, g > this._length && (this._length = g)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(d));
- };
- c.prototype.write4UnsignedInts = function(a, d, g, f) {
- var k = this._position;
- this._ensureCapacity(k + 16);
- this._requestViews(2);
- this._littleEndian === c._nativeLittleEndian && 0 === (k & 3) && this._i32 ? (this._i32[(k >> 2) + 0] = a, this._i32[(k >> 2) + 1] = d, this._i32[(k >> 2) + 2] = g, this._i32[(k >> 2) + 3] = f, this._position = k += 16, k > this._length && (this._length = k)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(d), this.writeUnsignedInt(g), this.writeUnsignedInt(f));
- };
- c.prototype.writeFloat = function(a) {
- var d = this._position;
- this._ensureCapacity(d + 4);
- this._requestViews(4);
- if (this._littleEndian === c._nativeLittleEndian && 0 === (d & 3) && this._f32) {
- this._f32[d >> 2] = a;
- } else {
- var g = this._u8;
- e.IntegerUtilities.f32[0] = a;
- a = e.IntegerUtilities.u8;
- this._littleEndian ? (g[d + 0] = a[0], g[d + 1] = a[1], g[d + 2] = a[2], g[d + 3] = a[3]) : (g[d + 0] = a[3], g[d + 1] = a[2], g[d + 2] = a[1], g[d + 3] = a[0]);
- }
- this._position = d += 4;
- d > this._length && (this._length = d);
- };
- c.prototype.write6Floats = function(a, d, g, f, k, b) {
- var l = this._position;
- this._ensureCapacity(l + 24);
- this._requestViews(4);
- this._littleEndian === c._nativeLittleEndian && 0 === (l & 3) && this._f32 ? (this._f32[(l >> 2) + 0] = a, this._f32[(l >> 2) + 1] = d, this._f32[(l >> 2) + 2] = g, this._f32[(l >> 2) + 3] = f, this._f32[(l >> 2) + 4] = k, this._f32[(l >> 2) + 5] = b, this._position = l += 24, l > this._length && (this._length = l)) : (this.writeFloat(a), this.writeFloat(d), this.writeFloat(g), this.writeFloat(f), this.writeFloat(k), this.writeFloat(b));
- };
- c.prototype.writeDouble = function(a) {
- var c = this._position;
- this._ensureCapacity(c + 8);
- var d = this._u8;
- e.IntegerUtilities.f64[0] = a;
- a = e.IntegerUtilities.u8;
- this._littleEndian ? (d[c + 0] = a[0], d[c + 1] = a[1], d[c + 2] = a[2], d[c + 3] = a[3], d[c + 4] = a[4], d[c + 5] = a[5], d[c + 6] = a[6], d[c + 7] = a[7]) : (d[c + 0] = a[7], d[c + 1] = a[6], d[c + 2] = a[5], d[c + 3] = a[4], d[c + 4] = a[3], d[c + 5] = a[2], d[c + 6] = a[1], d[c + 7] = a[0]);
- this._position = c += 8;
- c > this._length && (this._length = c);
- };
- c.prototype.readRawBytes = function() {
- return new Int8Array(this._buffer, 0, this._length);
- };
- c.prototype.writeUTF = function(a) {
- a = h(a);
- a = t(a);
- this.writeShort(a.length);
- this.writeRawBytes(a);
- };
- c.prototype.writeUTFBytes = function(a) {
- a = h(a);
- a = t(a);
- this.writeRawBytes(a);
- };
- c.prototype.readUTF = function() {
- return this.readUTFBytes(this.readShort());
- };
- c.prototype.readUTFBytes = function(a) {
- a >>>= 0;
- var c = this._position;
- c + a > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError);
- this._position += a;
- return m(new Int8Array(this._buffer, c, a));
- };
- Object.defineProperty(c.prototype, "length", {get:function() {
- return this._length;
- }, set:function(a) {
- a >>>= 0;
- a > this._buffer.byteLength && this._ensureCapacity(a);
- this._length = a;
- this._position = l(this._position, 0, this._length);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "bytesAvailable", {get:function() {
- return this._length - this._position;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "position", {get:function() {
- return this._position;
- }, set:function(a) {
- this._position = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "buffer", {get:function() {
- return this._buffer;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "bytes", {get:function() {
- return this._u8;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "ints", {get:function() {
- this._requestViews(2);
- return this._i32;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "objectEncoding", {get:function() {
- return this._objectEncoding;
- }, set:function(a) {
- this._objectEncoding = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "endian", {get:function() {
- return this._littleEndian ? "littleEndian" : "bigEndian";
- }, set:function(a) {
- a = h(a);
- this._littleEndian = "auto" === a ? c._nativeLittleEndian : "littleEndian" === a;
- }, enumerable:!0, configurable:!0});
- c.prototype.toString = function() {
- return m(new Int8Array(this._buffer, 0, this._length));
- };
- c.prototype.toBlob = function(a) {
- return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:a});
- };
- c.prototype.writeMultiByte = function(a, c) {
- h(a);
- h(c);
- n("packageInternal flash.utils.ObjectOutput::writeMultiByte");
- };
- c.prototype.readMultiByte = function(a, c) {
- h(c);
- n("packageInternal flash.utils.ObjectInput::readMultiByte");
- };
- c.prototype.getValue = function(a) {
- a |= 0;
- return a >= this._length ? void 0 : this._u8[a];
- };
- c.prototype.setValue = function(a, c) {
- a |= 0;
- var d = a + 1;
- this._ensureCapacity(d);
- this._u8[a] = c;
- d > this._length && (this._length = d);
- };
- c.prototype.readFixed = function() {
- return this.readInt() / 65536;
- };
- c.prototype.readFixed8 = function() {
- return this.readShort() / 256;
- };
- c.prototype.readFloat16 = function() {
- var a = this.readUnsignedShort(), c = a >> 15 ? -1 : 1, d = (a & 31744) >> 10, a = a & 1023;
- return d ? 31 === d ? a ? NaN : Infinity * c : c * Math.pow(2, d - 15) * (1 + a / 1024) : c * Math.pow(2, -14) * (a / 1024);
- };
- c.prototype.readEncodedU32 = function() {
- var a = this.readUnsignedByte();
- if (!(a & 128)) {
- return a;
- }
- a = a & 127 | this.readUnsignedByte() << 7;
- if (!(a & 16384)) {
- return a;
- }
- a = a & 16383 | this.readUnsignedByte() << 14;
- if (!(a & 2097152)) {
- return a;
- }
- a = a & 2097151 | this.readUnsignedByte() << 21;
- return a & 268435456 ? a & 268435455 | this.readUnsignedByte() << 28 : a;
- };
- c.prototype.readBits = function(a) {
- return this.readUnsignedBits(a) << 32 - a >> 32 - a;
- };
- c.prototype.readUnsignedBits = function(c) {
- for (var d = this._bitBuffer, g = this._bitLength;c > g;) {
- d = d << 8 | this.readUnsignedByte(), g += 8;
- }
- g -= c;
- c = d >>> g & a[c];
- this._bitBuffer = d;
- this._bitLength = g;
- return c;
- };
- c.prototype.readFixedBits = function(a) {
- return this.readBits(a) / 65536;
- };
- c.prototype.readString = function(a) {
- var c = this._position;
- if (a) {
- c + a > this._length && this.sec.throwError("flash.errors.EOFError", Errors.EOFError), this._position += a;
- } else {
- a = 0;
- for (var d = c;d < this._length && this._u8[d];d++) {
- a++;
- }
- this._position += a + 1;
- }
- return m(new Int8Array(this._buffer, c, a));
- };
- c.prototype.align = function() {
- this._bitLength = this._bitBuffer = 0;
- };
- c.prototype.deflate = function() {
- this.compress("deflate");
- };
- c.prototype.inflate = function() {
- this.uncompress("deflate");
- };
- c.prototype.compress = function(a) {
- a = 0 === arguments.length ? "zlib" : h(a);
- var d;
- switch(a) {
- case "zlib":
- d = new b.Deflate(!0);
- break;
- case "deflate":
- d = new b.Deflate(!1);
- break;
- default:
- return;
- }
- var g = new c;
- d.onData = g.writeRawBytes.bind(g);
- d.push(this._u8.subarray(0, this._length));
- d.close();
- this._ensureCapacity(g._u8.length);
- this._u8.set(g._u8);
- this.length = g.length;
- this._position = 0;
- };
- c.prototype.uncompress = function(a) {
- a = 0 === arguments.length ? "zlib" : h(a);
- var d;
- switch(a) {
- case "zlib":
- d = b.Inflate.create(!0);
- break;
- case "deflate":
- d = b.Inflate.create(!1);
- break;
- case "lzma":
- d = new b.LzmaDecoder(!1);
- break;
- default:
- return;
- }
- var g = new c, f;
- d.onData = g.writeRawBytes.bind(g);
- d.onError = function(a) {
- return f = a;
- };
- d.push(this._u8.subarray(0, this._length));
- f && this.sec.throwError("IOError", Errors.CompressedDataError);
- d.close();
- this._ensureCapacity(g._u8.length);
- this._u8.set(g._u8);
- this.length = g.length;
- this._position = 0;
- };
- c._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
- c.INITIAL_SIZE = 128;
- c._arrayBufferPool = new e.ArrayBufferPool;
- return c;
- }();
- b.DataBuffer = c;
- })(e.ArrayUtilities || (e.ArrayUtilities = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = e.ArrayUtilities.DataBuffer, h = e.ArrayUtilities.ensureTypedArrayCapacity;
- (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";
- })(e.PathCommand || (e.PathCommand = {}));
- (function(b) {
- b[b.Linear = 16] = "Linear";
- b[b.Radial = 18] = "Radial";
- })(e.GradientType || (e.GradientType = {}));
- (function(b) {
- b[b.Pad = 0] = "Pad";
- b[b.Reflect = 1] = "Reflect";
- b[b.Repeat = 2] = "Repeat";
- })(e.GradientSpreadMethod || (e.GradientSpreadMethod = {}));
- (function(b) {
- b[b.RGB = 0] = "RGB";
- b[b.LinearRGB = 1] = "LinearRGB";
- })(e.GradientInterpolationMethod || (e.GradientInterpolationMethod = {}));
- (function(b) {
- b[b.None = 0] = "None";
- b[b.Normal = 1] = "Normal";
- b[b.Vertical = 2] = "Vertical";
- b[b.Horizontal = 3] = "Horizontal";
- })(e.LineScaleMode || (e.LineScaleMode = {}));
- var n = function() {
- return function(b, l, d, a, c, f, k, r, u, q, g) {
- this.commands = b;
- this.commandsPosition = l;
- this.coordinates = d;
- this.morphCoordinates = a;
- this.coordinatesPosition = c;
- this.styles = f;
- this.stylesLength = k;
- this.morphStyles = r;
- this.morphStylesLength = u;
- this.hasFills = q;
- this.hasLines = g;
- };
- }();
- e.PlainObjectShapeData = n;
- var t;
- (function(b) {
- b[b.Commands = 32] = "Commands";
- b[b.Coordinates = 128] = "Coordinates";
- b[b.Styles = 16] = "Styles";
- })(t || (t = {}));
- t = function() {
- function m(b) {
- void 0 === b && (b = !0);
- b && this.clear();
- }
- m.FromPlainObject = function(l) {
- var d = new m(!1);
- d.commands = l.commands;
- d.coordinates = l.coordinates;
- d.morphCoordinates = l.morphCoordinates;
- d.commandsPosition = l.commandsPosition;
- d.coordinatesPosition = l.coordinatesPosition;
- d.styles = b.FromArrayBuffer(l.styles, l.stylesLength);
- d.styles.endian = "auto";
- l.morphStyles && (d.morphStyles = b.FromArrayBuffer(l.morphStyles, l.morphStylesLength), d.morphStyles.endian = "auto");
- d.hasFills = l.hasFills;
- d.hasLines = l.hasLines;
- return d;
- };
- m.prototype.moveTo = function(b, d) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = 9;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- };
- m.prototype.lineTo = function(b, d) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = 10;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- };
- m.prototype.curveTo = function(b, d, a, c) {
- this.ensurePathCapacities(1, 4);
- this.commands[this.commandsPosition++] = 11;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- this.coordinates[this.coordinatesPosition++] = a;
- this.coordinates[this.coordinatesPosition++] = c;
- };
- m.prototype.cubicCurveTo = function(b, d, a, c, f, k) {
- this.ensurePathCapacities(1, 6);
- this.commands[this.commandsPosition++] = 12;
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- this.coordinates[this.coordinatesPosition++] = a;
- this.coordinates[this.coordinatesPosition++] = c;
- this.coordinates[this.coordinatesPosition++] = f;
- this.coordinates[this.coordinatesPosition++] = k;
- };
- m.prototype.beginFill = function(b) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 1;
- this.styles.writeUnsignedInt(b);
- this.hasFills = !0;
- };
- m.prototype.writeMorphFill = function(b) {
- this.morphStyles.writeUnsignedInt(b);
- };
- m.prototype.endFill = function() {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 4;
- };
- m.prototype.endLine = function() {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = 8;
- };
- m.prototype.lineStyle = function(b, d, a, c, f, k, r) {
- this.ensurePathCapacities(2, 0);
- this.commands[this.commandsPosition++] = 5;
- this.coordinates[this.coordinatesPosition++] = b;
- b = this.styles;
- b.writeUnsignedInt(d);
- b.writeBoolean(a);
- b.writeUnsignedByte(c);
- b.writeUnsignedByte(f);
- b.writeUnsignedByte(k);
- b.writeUnsignedByte(r);
- this.hasLines = !0;
- };
- m.prototype.writeMorphLineStyle = function(b, d) {
- this.morphCoordinates[this.coordinatesPosition - 1] = b;
- this.morphStyles.writeUnsignedInt(d);
- };
- m.prototype.beginBitmap = function(b, d, a, c, f) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = b;
- b = this.styles;
- b.writeUnsignedInt(d);
- this._writeStyleMatrix(a, !1);
- b.writeBoolean(c);
- b.writeBoolean(f);
- this.hasFills = !0;
- };
- m.prototype.writeMorphBitmap = function(b) {
- this._writeStyleMatrix(b, !0);
- };
- m.prototype.beginGradient = function(b, d, a, c, f, k, r, u) {
- this.ensurePathCapacities(1, 0);
- this.commands[this.commandsPosition++] = b;
- b = this.styles;
- b.writeUnsignedByte(c);
- b.writeShort(u);
- this._writeStyleMatrix(f, !1);
- c = d.length;
- b.writeByte(c);
- for (f = 0;f < c;f++) {
- b.writeUnsignedByte(a[f]), b.writeUnsignedInt(d[f]);
- }
- b.writeUnsignedByte(k);
- b.writeUnsignedByte(r);
- this.hasFills = !0;
- };
- m.prototype.writeMorphGradient = function(b, d, a) {
- this._writeStyleMatrix(a, !0);
- a = this.morphStyles;
- for (var c = 0;c < b.length;c++) {
- a.writeUnsignedByte(d[c]), a.writeUnsignedInt(b[c]);
- }
- };
- m.prototype.writeCommandAndCoordinates = function(b, d, a) {
- this.ensurePathCapacities(1, 2);
- this.commands[this.commandsPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- this.coordinates[this.coordinatesPosition++] = a;
- };
- m.prototype.writeCoordinates = function(b, d) {
- this.ensurePathCapacities(0, 2);
- this.coordinates[this.coordinatesPosition++] = b;
- this.coordinates[this.coordinatesPosition++] = d;
- };
- m.prototype.writeMorphCoordinates = function(b, d) {
- this.morphCoordinates = h(this.morphCoordinates, this.coordinatesPosition);
- this.morphCoordinates[this.coordinatesPosition - 2] = b;
- this.morphCoordinates[this.coordinatesPosition - 1] = d;
- };
- m.prototype.clear = function() {
- this.commandsPosition = this.coordinatesPosition = 0;
- this.commands = new Uint8Array(32);
- this.coordinates = new Int32Array(128);
- this.styles = new b(16);
- this.styles.endian = "auto";
- this.hasFills = this.hasLines = !1;
- };
- m.prototype.isEmpty = function() {
- return 0 === this.commandsPosition;
- };
- m.prototype.clone = function() {
- var l = new m(!1);
- l.commands = new Uint8Array(this.commands);
- l.commandsPosition = this.commandsPosition;
- l.coordinates = new Int32Array(this.coordinates);
- l.coordinatesPosition = this.coordinatesPosition;
- l.styles = new b(this.styles.length);
- l.styles.writeRawBytes(this.styles.bytes.subarray(0, this.styles.length));
- this.morphStyles && (l.morphStyles = new b(this.morphStyles.length), l.morphStyles.writeRawBytes(this.morphStyles.bytes.subarray(0, this.morphStyles.length)));
- l.hasFills = this.hasFills;
- l.hasLines = this.hasLines;
- return l;
- };
- m.prototype.toPlainObject = function() {
- return new n(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(m.prototype, "buffers", {get:function() {
- var b = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer];
- this.morphCoordinates && b.push(this.morphCoordinates.buffer);
- this.morphStyles && b.push(this.morphStyles.buffer);
- return b;
- }, enumerable:!0, configurable:!0});
- m.prototype._writeStyleMatrix = function(b, d) {
- (d ? this.morphStyles : this.styles).write6Floats(b.a, b.b, b.c, b.d, b.tx, b.ty);
- };
- m.prototype.ensurePathCapacities = function(b, d) {
- this.commands = h(this.commands, this.commandsPosition + b);
- this.coordinates = h(this.coordinates, this.coordinatesPosition + d);
- };
- return m;
- }();
- e.ShapeData = t;
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- b[b.CODE_END = 0] = "CODE_END";
- b[b.CODE_SHOW_FRAME = 1] = "CODE_SHOW_FRAME";
- b[b.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
- b[b.CODE_FREE_CHARACTER = 3] = "CODE_FREE_CHARACTER";
- b[b.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
- b[b.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
- b[b.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- b[b.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
- b[b.CODE_JPEG_TABLES = 8] = "CODE_JPEG_TABLES";
- b[b.CODE_SET_BACKGROUND_COLOR = 9] = "CODE_SET_BACKGROUND_COLOR";
- b[b.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- b[b.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
- b[b.CODE_DO_ACTION = 12] = "CODE_DO_ACTION";
- b[b.CODE_DEFINE_FONT_INFO = 13] = "CODE_DEFINE_FONT_INFO";
- b[b.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
- b[b.CODE_START_SOUND = 15] = "CODE_START_SOUND";
- b[b.CODE_STOP_SOUND = 16] = "CODE_STOP_SOUND";
- b[b.CODE_DEFINE_BUTTON_SOUND = 17] = "CODE_DEFINE_BUTTON_SOUND";
- b[b.CODE_SOUND_STREAM_HEAD = 18] = "CODE_SOUND_STREAM_HEAD";
- b[b.CODE_SOUND_STREAM_BLOCK = 19] = "CODE_SOUND_STREAM_BLOCK";
- b[b.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
- b[b.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- b[b.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
- b[b.CODE_DEFINE_BUTTON_CXFORM = 23] = "CODE_DEFINE_BUTTON_CXFORM";
- b[b.CODE_PROTECT = 24] = "CODE_PROTECT";
- b[b.CODE_PATHS_ARE_POSTSCRIPT = 25] = "CODE_PATHS_ARE_POSTSCRIPT";
- b[b.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
- b[b.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
- b[b.CODE_SYNC_FRAME = 29] = "CODE_SYNC_FRAME";
- b[b.CODE_FREE_ALL = 31] = "CODE_FREE_ALL";
- b[b.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
- b[b.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
- b[b.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
- b[b.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- b[b.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
- b[b.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
- b[b.CODE_DEFINE_VIDEO = 38] = "CODE_DEFINE_VIDEO";
- b[b.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
- b[b.CODE_NAME_CHARACTER = 40] = "CODE_NAME_CHARACTER";
- b[b.CODE_PRODUCT_INFO = 41] = "CODE_PRODUCT_INFO";
- b[b.CODE_DEFINE_TEXT_FORMAT = 42] = "CODE_DEFINE_TEXT_FORMAT";
- b[b.CODE_FRAME_LABEL = 43] = "CODE_FRAME_LABEL";
- b[b.CODE_DEFINE_BEHAVIOUR = 44] = "CODE_DEFINE_BEHAVIOUR";
- b[b.CODE_SOUND_STREAM_HEAD2 = 45] = "CODE_SOUND_STREAM_HEAD2";
- b[b.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
- b[b.CODE_GENERATE_FRAME = 47] = "CODE_GENERATE_FRAME";
- b[b.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- b[b.CODE_GEN_COMMAND = 49] = "CODE_GEN_COMMAND";
- b[b.CODE_DEFINE_COMMAND_OBJECT = 50] = "CODE_DEFINE_COMMAND_OBJECT";
- b[b.CODE_CHARACTER_SET = 51] = "CODE_CHARACTER_SET";
- b[b.CODE_EXTERNAL_FONT = 52] = "CODE_EXTERNAL_FONT";
- b[b.CODE_DEFINE_FUNCTION = 53] = "CODE_DEFINE_FUNCTION";
- b[b.CODE_PLACE_FUNCTION = 54] = "CODE_PLACE_FUNCTION";
- b[b.CODE_GEN_TAG_OBJECTS = 55] = "CODE_GEN_TAG_OBJECTS";
- b[b.CODE_EXPORT_ASSETS = 56] = "CODE_EXPORT_ASSETS";
- b[b.CODE_IMPORT_ASSETS = 57] = "CODE_IMPORT_ASSETS";
- b[b.CODE_ENABLE_DEBUGGER = 58] = "CODE_ENABLE_DEBUGGER";
- b[b.CODE_DO_INIT_ACTION = 59] = "CODE_DO_INIT_ACTION";
- b[b.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
- b[b.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
- b[b.CODE_DEFINE_FONT_INFO2 = 62] = "CODE_DEFINE_FONT_INFO2";
- b[b.CODE_DEBUG_ID = 63] = "CODE_DEBUG_ID";
- b[b.CODE_ENABLE_DEBUGGER2 = 64] = "CODE_ENABLE_DEBUGGER2";
- b[b.CODE_SCRIPT_LIMITS = 65] = "CODE_SCRIPT_LIMITS";
- b[b.CODE_SET_TAB_INDEX = 66] = "CODE_SET_TAB_INDEX";
- b[b.CODE_FILE_ATTRIBUTES = 69] = "CODE_FILE_ATTRIBUTES";
- b[b.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
- b[b.CODE_IMPORT_ASSETS2 = 71] = "CODE_IMPORT_ASSETS2";
- b[b.CODE_DO_ABC_DEFINE = 72] = "CODE_DO_ABC_DEFINE";
- b[b.CODE_DEFINE_FONT_ALIGN_ZONES = 73] = "CODE_DEFINE_FONT_ALIGN_ZONES";
- b[b.CODE_CSM_TEXT_SETTINGS = 74] = "CODE_CSM_TEXT_SETTINGS";
- b[b.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- b[b.CODE_SYMBOL_CLASS = 76] = "CODE_SYMBOL_CLASS";
- b[b.CODE_METADATA = 77] = "CODE_METADATA";
- b[b.CODE_DEFINE_SCALING_GRID = 78] = "CODE_DEFINE_SCALING_GRID";
- b[b.CODE_DO_ABC = 82] = "CODE_DO_ABC";
- b[b.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
- b[b.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
- b[b.CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA = 86] = "CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA";
- b[b.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
- b[b.CODE_DEFINE_FONT_NAME = 88] = "CODE_DEFINE_FONT_NAME";
- b[b.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
- b[b.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- b[b.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- b[b.CODE_TELEMETRY = 93] = "CODE_TELEMETRY";
- })(b.SwfTagCode || (b.SwfTagCode = {}));
- (function(b) {
- b[b.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
- b[b.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- b[b.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
- b[b.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- b[b.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
- b[b.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
- b[b.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
- b[b.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- b[b.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
- b[b.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
- b[b.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
- b[b.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
- b[b.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- b[b.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
- b[b.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
- b[b.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
- b[b.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
- b[b.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- b[b.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
- b[b.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- b[b.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
- b[b.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
- b[b.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
- b[b.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- b[b.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- })(b.DefinitionTags || (b.DefinitionTags = {}));
- (function(b) {
- b[b.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
- b[b.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
- b[b.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
- b[b.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
- })(b.ImageDefinitionTags || (b.ImageDefinitionTags = {}));
- (function(b) {
- b[b.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
- b[b.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
- b[b.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
- b[b.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
- })(b.FontDefinitionTags || (b.FontDefinitionTags = {}));
- (function(b) {
- b[b.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
- b[b.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
- b[b.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
- b[b.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
- b[b.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
- b[b.CODE_START_SOUND = 15] = "CODE_START_SOUND";
- b[b.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
- b[b.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
- })(b.ControlTags || (b.ControlTags = {}));
- (function(b) {
- b[b.Move = 1] = "Move";
- b[b.HasCharacter = 2] = "HasCharacter";
- b[b.HasMatrix = 4] = "HasMatrix";
- b[b.HasColorTransform = 8] = "HasColorTransform";
- b[b.HasRatio = 16] = "HasRatio";
- b[b.HasName = 32] = "HasName";
- b[b.HasClipDepth = 64] = "HasClipDepth";
- b[b.HasClipActions = 128] = "HasClipActions";
- b[b.HasFilterList = 256] = "HasFilterList";
- b[b.HasBlendMode = 512] = "HasBlendMode";
- b[b.HasCacheAsBitmap = 1024] = "HasCacheAsBitmap";
- b[b.HasClassName = 2048] = "HasClassName";
- b[b.HasImage = 4096] = "HasImage";
- b[b.HasVisible = 8192] = "HasVisible";
- b[b.OpaqueBackground = 16384] = "OpaqueBackground";
- b[b.Reserved = 32768] = "Reserved";
- })(b.PlaceObjectFlags || (b.PlaceObjectFlags = {}));
- (function(b) {
- b[b.Load = 1] = "Load";
- b[b.EnterFrame = 2] = "EnterFrame";
- b[b.Unload = 4] = "Unload";
- b[b.MouseMove = 8] = "MouseMove";
- b[b.MouseDown = 16] = "MouseDown";
- b[b.MouseUp = 32] = "MouseUp";
- b[b.KeyDown = 64] = "KeyDown";
- b[b.KeyUp = 128] = "KeyUp";
- b[b.Data = 256] = "Data";
- b[b.Initialize = 512] = "Initialize";
- b[b.Press = 1024] = "Press";
- b[b.Release = 2048] = "Release";
- b[b.ReleaseOutside = 4096] = "ReleaseOutside";
- b[b.RollOver = 8192] = "RollOver";
- b[b.RollOut = 16384] = "RollOut";
- b[b.DragOver = 32768] = "DragOver";
- b[b.DragOut = 65536] = "DragOut";
- b[b.KeyPress = 131072] = "KeyPress";
- b[b.Construct = 262144] = "Construct";
- })(b.AVM1ClipEvents || (b.AVM1ClipEvents = {}));
- (function(b) {
- b[b.StateUp = 1] = "StateUp";
- b[b.StateOver = 2] = "StateOver";
- b[b.StateDown = 4] = "StateDown";
- b[b.StateHitTest = 8] = "StateHitTest";
- b[b.HasFilterList = 16] = "HasFilterList";
- b[b.HasBlendMode = 32] = "HasBlendMode";
- })(b.ButtonCharacterFlags || (b.ButtonCharacterFlags = {}));
- (function(b) {
- b[b.Bold = 1] = "Bold";
- b[b.Italic = 2] = "Italic";
- b[b.WideOrHasFontData = 4] = "WideOrHasFontData";
- b[b.WideOffset = 8] = "WideOffset";
- b[b.Ansi = 16] = "Ansi";
- b[b.SmallText = 32] = "SmallText";
- b[b.ShiftJis = 64] = "ShiftJis";
- b[b.HasLayout = 128] = "HasLayout";
- })(b.FontFlags || (b.FontFlags = {}));
- (function(b) {
- b[b.HasMoveX = 1] = "HasMoveX";
- b[b.HasMoveY = 2] = "HasMoveY";
- b[b.HasColor = 4] = "HasColor";
- b[b.HasFont = 8] = "HasFont";
- })(b.TextRecordFlags || (b.TextRecordFlags = {}));
- (function(b) {
- b[b.HasInPoint = 1] = "HasInPoint";
- b[b.HasOutPoint = 2] = "HasOutPoint";
- b[b.HasLoops = 4] = "HasLoops";
- b[b.HasEnvelope = 8] = "HasEnvelope";
- b[b.NoMultiple = 16] = "NoMultiple";
- b[b.Stop = 32] = "Stop";
- })(b.SoundInfoFlags || (b.SoundInfoFlags = {}));
- (function(b) {
- b[b.HasFont = 1] = "HasFont";
- b[b.HasMaxLength = 2] = "HasMaxLength";
- b[b.HasColor = 4] = "HasColor";
- b[b.ReadOnly = 8] = "ReadOnly";
- b[b.Password = 16] = "Password";
- b[b.Multiline = 32] = "Multiline";
- b[b.WordWrap = 64] = "WordWrap";
- b[b.HasText = 128] = "HasText";
- b[b.UseOutlines = 256] = "UseOutlines";
- b[b.Html = 512] = "Html";
- b[b.WasStatic = 1024] = "WasStatic";
- b[b.Border = 2048] = "Border";
- b[b.NoSelect = 4096] = "NoSelect";
- b[b.HasLayout = 8192] = "HasLayout";
- b[b.AutoSize = 16384] = "AutoSize";
- b[b.HasFontClass = 32768] = "HasFontClass";
- })(b.TextFlags || (b.TextFlags = {}));
- (function(b) {
- b[b.UsesScalingStrokes = 1] = "UsesScalingStrokes";
- b[b.UsesNonScalingStrokes = 2] = "UsesNonScalingStrokes";
- b[b.UsesFillWindingRule = 4] = "UsesFillWindingRule";
- b[b.IsMorph = 8] = "IsMorph";
- })(b.ShapeFlags || (b.ShapeFlags = {}));
- (function(b) {
- b[b.Move = 1] = "Move";
- b[b.HasFillStyle0 = 2] = "HasFillStyle0";
- b[b.HasFillStyle1 = 4] = "HasFillStyle1";
- b[b.HasLineStyle = 8] = "HasLineStyle";
- b[b.HasNewStyles = 16] = "HasNewStyles";
- b[b.IsStraight = 32] = "IsStraight";
- b[b.IsGeneral = 64] = "IsGeneral";
- b[b.IsVertical = 128] = "IsVertical";
- })(b.ShapeRecordFlags || (b.ShapeRecordFlags = {}));
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = e.Debug.unexpected, h = function() {
- function h(b, m, l, d) {
- this.url = b;
- this.method = m;
- this.mimeType = l;
- this.data = d;
- }
- h.prototype.readAll = function(h, m) {
- var l = this.url, d = this.xhr = new XMLHttpRequest({mozSystem:!0});
- d.open(this.method || "GET", this.url, !0);
- d.responseType = "arraybuffer";
- h && (d.onprogress = function(a) {
- h(d.response, a.loaded, a.total);
- });
- d.onreadystatechange = function(a) {
- 4 === d.readyState && (200 !== d.status && 0 !== d.status || null === d.response ? (b("Path: " + l + " not found."), m(null, d.statusText)) : m(d.response));
- };
- this.mimeType && d.setRequestHeader("Content-Type", this.mimeType);
- d.send(this.data || null);
- };
- h.prototype.readChunked = function(b, h, l, d, a, c) {
- if (0 >= b) {
- this.readAsync(h, l, d, a, c);
- } else {
- var f = 0, k = new Uint8Array(b), r = 0, u;
- this.readAsync(function(a, c) {
- u = c.total;
- for (var d = a.length, v = 0;f + d >= b;) {
- var l = b - f;
- k.set(a.subarray(v, v + l), f);
- v += l;
- d -= l;
- r += b;
- h(k, {loaded:r, total:u});
- f = 0;
- }
- k.set(a.subarray(v), f);
- f += d;
- }, l, d, function() {
- 0 < f && (r += f, h(k.subarray(0, f), {loaded:r, total:u}), f = 0);
- a && a();
- }, c);
- }
- };
- h.prototype.readAsync = function(b, h, l, d, a) {
- var c = this.xhr = new XMLHttpRequest({mozSystem:!0}), f = this.url, k = 0, r = 0;
- c.open(this.method || "GET", f, !0);
- c.responseType = "moz-chunked-arraybuffer";
- var u = "moz-chunked-arraybuffer" !== c.responseType;
- u && (c.responseType = "arraybuffer");
- c.onprogress = function(a) {
- u || (k = a.loaded, r = a.total, a = new Uint8Array(c.response), k = Math.max(k, a.byteLength), r = Math.max(r, a.byteLength), b(a, {loaded:k, total:r}));
- };
- c.onreadystatechange = function(d) {
- 2 === c.readyState && a && a(f, c.status, c.getAllResponseHeaders());
- 4 === c.readyState && (200 !== c.status && 0 !== c.status || null === c.response && (0 === r || k !== r) ? h(c.statusText) : u && (d = c.response, b(new Uint8Array(d), {loaded:d.byteLength, total:d.byteLength})));
- };
- c.onload = function() {
- d && d();
- };
- this.mimeType && c.setRequestHeader("Content-Type", this.mimeType);
- c.send(this.data || null);
- l && l();
- };
- h.prototype.abort = function() {
- this.xhr && (this.xhr.abort(), this.xhr = null);
- };
- return h;
- }();
- e.BinaryFileReader = h;
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = function() {
- function b() {
- this.isAS3TraceOn = !0;
- this._startTime = Date.now();
- }
- Object.defineProperty(b.prototype, "currentTimestamp", {get:function() {
- return Date.now() - this._startTime;
- }, enumerable:!0, configurable:!0});
- b.prototype._writeLine = function(b) {
- };
- b.prototype.writeAS3Trace = function(b) {
- };
- return b;
- }();
- e.FlashLog = b;
- e.flashlog = null;
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- b[b.Objects = 0] = "Objects";
- b[b.References = 1] = "References";
- })(b.RemotingPhase || (b.RemotingPhase = {}));
- (function(b) {
- b[b.HasMatrix = 1] = "HasMatrix";
- b[b.HasBounds = 2] = "HasBounds";
- b[b.HasChildren = 4] = "HasChildren";
- b[b.HasColorTransform = 8] = "HasColorTransform";
- b[b.HasClipRect = 16] = "HasClipRect";
- b[b.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties";
- b[b.HasMask = 64] = "HasMask";
- b[b.HasClip = 128] = "HasClip";
- })(b.MessageBits || (b.MessageBits = {}));
- (function(b) {
- b[b.None = 0] = "None";
- b[b.Asset = 134217728] = "Asset";
- })(b.IDMask || (b.IDMask = {}));
- (function(b) {
- b[b.EOF = 0] = "EOF";
- b[b.UpdateFrame = 100] = "UpdateFrame";
- b[b.UpdateGraphics = 101] = "UpdateGraphics";
- b[b.UpdateBitmapData = 102] = "UpdateBitmapData";
- b[b.UpdateTextContent = 103] = "UpdateTextContent";
- b[b.UpdateStage = 104] = "UpdateStage";
- b[b.UpdateNetStream = 105] = "UpdateNetStream";
- b[b.RequestBitmapData = 106] = "RequestBitmapData";
- b[b.DrawToBitmap = 200] = "DrawToBitmap";
- b[b.MouseEvent = 300] = "MouseEvent";
- b[b.KeyboardEvent = 301] = "KeyboardEvent";
- b[b.FocusEvent = 302] = "FocusEvent";
- })(b.MessageTag || (b.MessageTag = {}));
- (function(b) {
- b[b.Blur = 0] = "Blur";
- b[b.DropShadow = 1] = "DropShadow";
- b[b.ColorMatrix = 2] = "ColorMatrix";
- })(b.FilterType || (b.FilterType = {}));
- (function(b) {
- b[b.Identity = 0] = "Identity";
- b[b.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly";
- b[b.All = 2] = "All";
- })(b.ColorTransformEncoding || (b.ColorTransformEncoding = {}));
- (function(b) {
- b[b.Initialized = 0] = "Initialized";
- b[b.Metadata = 1] = "Metadata";
- b[b.PlayStart = 2] = "PlayStart";
- b[b.PlayStop = 3] = "PlayStop";
- b[b.BufferEmpty = 4] = "BufferEmpty";
- b[b.BufferFull = 5] = "BufferFull";
- b[b.Pause = 6] = "Pause";
- b[b.Unpause = 7] = "Unpause";
- b[b.Seeking = 8] = "Seeking";
- b[b.Seeked = 9] = "Seeked";
- b[b.Progress = 10] = "Progress";
- b[b.Error = 11] = "Error";
- })(b.VideoPlaybackEvent || (b.VideoPlaybackEvent = {}));
- (function(b) {
- b[b.Init = 1] = "Init";
- b[b.Pause = 2] = "Pause";
- b[b.Seek = 3] = "Seek";
- b[b.GetTime = 4] = "GetTime";
- b[b.GetBufferLength = 5] = "GetBufferLength";
- b[b.SetSoundLevels = 6] = "SetSoundLevels";
- b[b.GetBytesLoaded = 7] = "GetBytesLoaded";
- b[b.GetBytesTotal = 8] = "GetBytesTotal";
- b[b.EnsurePlaying = 9] = "EnsurePlaying";
- })(b.VideoControlEvent || (b.VideoControlEvent = {}));
- (function(b) {
- b[b.ShowAll = 0] = "ShowAll";
- b[b.ExactFit = 1] = "ExactFit";
- b[b.NoBorder = 2] = "NoBorder";
- b[b.NoScale = 4] = "NoScale";
- })(b.StageScaleMode || (b.StageScaleMode = {}));
- (function(b) {
- b[b.None = 0] = "None";
- b[b.Top = 1] = "Top";
- b[b.Bottom = 2] = "Bottom";
- b[b.Left = 4] = "Left";
- b[b.Right = 8] = "Right";
- b[b.TopLeft = b.Top | b.Left] = "TopLeft";
- b[b.BottomLeft = b.Bottom | b.Left] = "BottomLeft";
- b[b.BottomRight = b.Bottom | b.Right] = "BottomRight";
- b[b.TopRight = b.Top | b.Right] = "TopRight";
- })(b.StageAlignFlags || (b.StageAlignFlags = {}));
- b.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" ");
- b.KeyboardEventNames = ["keydown", "keypress", "keyup"];
- (function(b) {
- b[b.CtrlKey = 1] = "CtrlKey";
- b[b.AltKey = 2] = "AltKey";
- b[b.ShiftKey = 4] = "ShiftKey";
- })(b.KeyboardEventFlags || (b.KeyboardEventFlags = {}));
- (function(b) {
- b[b.DocumentHidden = 0] = "DocumentHidden";
- b[b.DocumentVisible = 1] = "DocumentVisible";
- b[b.WindowBlur = 2] = "WindowBlur";
- b[b.WindowFocus = 3] = "WindowFocus";
- })(b.FocusEventType || (b.FocusEventType = {}));
- var h = function() {
- function b(h, m) {
- this.window = h;
- this.target = m;
- }
- Object.defineProperty(b.prototype, "onAsyncMessage", {set:function(b) {
- this.window.addEventListener("message", function(h) {
- Promise.resolve(h.data).then(function(l) {
- b(l);
- });
- });
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onSyncMessage", {set:function(b) {
- this.window.addEventListener("syncmessage", function(h) {
- h = h.detail;
- h.result = b(h.msg);
- });
- }, enumerable:!0, configurable:!0});
- b.prototype.postAsyncMessage = function(b, h) {
- this.target.postMessage(b, "*", h);
- };
- b.prototype.sendSyncMessage = function(b, h) {
- var l = this.target.document.createEvent("CustomEvent"), d = {msg:b, result:void 0};
- l.initCustomEvent("syncmessage", !1, !1, d);
- this.target.dispatchEvent(l);
- return d.result;
- };
- return b;
- }();
- b.WindowTransportPeer = h;
- h = function() {
- function b() {
- }
- Object.defineProperty(b.prototype, "onAsyncMessage", {set:function(b) {
- ShumwayCom.setAsyncMessageCallback(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onSyncMessage", {set:function(b) {
- ShumwayCom.setSyncMessageCallback(b);
- }, enumerable:!0, configurable:!0});
- b.prototype.postAsyncMessage = function(b, h) {
- ShumwayCom.postAsyncMessage(b);
- };
- b.prototype.sendSyncMessage = function(b, h) {
- return ShumwayCom.sendSyncMessage(b);
- };
- return b;
- }();
- b.ShumwayComTransportPeer = h;
- })(e.Remoting || (e.Remoting = {}));
-})(Shumway || (Shumway = {}));
-var throwError, Errors;
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function() {
- function b() {
- }
- b.toRGBA = function(b, d, a, c) {
- void 0 === c && (c = 1);
- return "rgba(" + b + "," + d + "," + a + "," + c + ")";
- };
- return b;
- }();
- b.UI = e;
- var t = function() {
- function b() {
- }
- b.prototype.tabToolbar = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(37, 44, 51, b);
- };
- b.prototype.toolbars = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(52, 60, 69, b);
- };
- b.prototype.selectionBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(29, 79, 115, b);
- };
- b.prototype.selectionText = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(245, 247, 250, b);
- };
- b.prototype.splitters = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(0, 0, 0, b);
- };
- b.prototype.bodyBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(17, 19, 21, b);
- };
- b.prototype.sidebarBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(24, 29, 32, b);
- };
- b.prototype.attentionBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(161, 134, 80, b);
- };
- b.prototype.bodyText = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(143, 161, 178, b);
- };
- b.prototype.foregroundTextGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(182, 186, 191, b);
- };
- b.prototype.contentTextHighContrast = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(169, 186, 203, b);
- };
- b.prototype.contentTextGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(143, 161, 178, b);
- };
- b.prototype.contentTextDarkGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(95, 115, 135, b);
- };
- b.prototype.blueHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(70, 175, 227, b);
- };
- b.prototype.purpleHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(107, 122, 187, b);
- };
- b.prototype.pinkHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(223, 128, 255, b);
- };
- b.prototype.redHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(235, 83, 104, b);
- };
- b.prototype.orangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(217, 102, 41, b);
- };
- b.prototype.lightOrangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(217, 155, 40, b);
- };
- b.prototype.greenHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(112, 191, 83, b);
- };
- b.prototype.blueGreyHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(94, 136, 176, b);
- };
- return b;
- }();
- b.UIThemeDark = t;
- t = function() {
- function b() {
- }
- b.prototype.tabToolbar = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(235, 236, 237, b);
- };
- b.prototype.toolbars = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(240, 241, 242, b);
- };
- b.prototype.selectionBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(76, 158, 217, b);
- };
- b.prototype.selectionText = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(245, 247, 250, b);
- };
- b.prototype.splitters = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(170, 170, 170, b);
- };
- b.prototype.bodyBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(252, 252, 252, b);
- };
- b.prototype.sidebarBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(247, 247, 247, b);
- };
- b.prototype.attentionBackground = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(161, 134, 80, b);
- };
- b.prototype.bodyText = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(24, 25, 26, b);
- };
- b.prototype.foregroundTextGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(88, 89, 89, b);
- };
- b.prototype.contentTextHighContrast = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(41, 46, 51, b);
- };
- b.prototype.contentTextGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(143, 161, 178, b);
- };
- b.prototype.contentTextDarkGrey = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(102, 115, 128, b);
- };
- b.prototype.blueHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(0, 136, 204, b);
- };
- b.prototype.purpleHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(91, 95, 255, b);
- };
- b.prototype.pinkHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(184, 46, 229, b);
- };
- b.prototype.redHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(237, 38, 85, b);
- };
- b.prototype.orangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(241, 60, 0, b);
- };
- b.prototype.lightOrangeHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(217, 126, 0, b);
- };
- b.prototype.greenHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(44, 187, 15, b);
- };
- b.prototype.blueGreyHighlight = function(b) {
- void 0 === b && (b = 1);
- return e.toRGBA(95, 136, 176, b);
- };
- return b;
- }();
- b.UIThemeLight = t;
- })(b.Theme || (b.Theme = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function() {
- function b(h, l) {
- this._buffers = h || [];
- this._snapshots = [];
- this._windowStart = this._startTime = l;
- this._maxDepth = 0;
- }
- b.prototype.addBuffer = function(b) {
- this._buffers.push(b);
- };
- b.prototype.getSnapshotAt = function(b) {
- return this._snapshots[b];
- };
- Object.defineProperty(b.prototype, "hasSnapshots", {get:function() {
- return 0 < this.snapshotCount;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "snapshotCount", {get:function() {
- return this._snapshots.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "startTime", {get:function() {
- return this._startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "endTime", {get:function() {
- return this._endTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "totalTime", {get:function() {
- return this.endTime - this.startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "windowStart", {get:function() {
- return this._windowStart;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "windowEnd", {get:function() {
- return this._windowEnd;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "windowLength", {get:function() {
- return this.windowEnd - this.windowStart;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "maxDepth", {get:function() {
- return this._maxDepth;
- }, enumerable:!0, configurable:!0});
- b.prototype.forEachSnapshot = function(b) {
- for (var l = 0, d = this.snapshotCount;l < d;l++) {
- b(this._snapshots[l], l);
- }
- };
- b.prototype.createSnapshots = function() {
- var b = Number.MIN_VALUE, l = 0;
- for (this._snapshots = [];0 < this._buffers.length;) {
- var d = this._buffers.shift().createSnapshot();
- d && (b < d.endTime && (b = d.endTime), l < d.maxDepth && (l = d.maxDepth), this._snapshots.push(d));
- }
- this._windowEnd = this._endTime = b;
- this._maxDepth = l;
- };
- b.prototype.setWindow = function(b, l) {
- if (b > l) {
- var d = b;
- b = l;
- l = d;
- }
- d = Math.min(l - b, this.totalTime);
- b < this._startTime ? (b = this._startTime, l = this._startTime + d) : l > this._endTime && (b = this._endTime - d, l = this._endTime);
- this._windowStart = b;
- this._windowEnd = l;
- };
- b.prototype.moveWindowTo = function(b) {
- this.setWindow(b - this.windowLength / 2, b + this.windowLength / 2);
- };
- return b;
- }();
- b.Profile = e;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function() {
- return function(b) {
- this.kind = b;
- this.totalTime = this.selfTime = this.count = 0;
- };
- }();
- b.TimelineFrameStatistics = e;
- var t = function() {
- function b(l, d, a, c, f, k) {
- this.parent = l;
- this.kind = d;
- this.startData = a;
- this.endData = c;
- this.startTime = f;
- this.endTime = k;
- this.maxDepth = 0;
- }
- Object.defineProperty(b.prototype, "totalTime", {get:function() {
- return this.endTime - this.startTime;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "selfTime", {get:function() {
- var b = this.totalTime;
- if (this.children) {
- for (var d = 0, a = this.children.length;d < a;d++) {
- var c = this.children[d], b = b - (c.endTime - c.startTime)
- }
- }
- return b;
- }, enumerable:!0, configurable:!0});
- b.prototype.getChildIndex = function(b) {
- for (var d = this.children, a = 0;a < d.length;a++) {
- if (d[a].endTime > b) {
- return a;
- }
- }
- return 0;
- };
- b.prototype.getChildRange = function(b, d) {
- if (this.children && b <= this.endTime && d >= this.startTime && d >= b) {
- var a = this._getNearestChild(b), c = this._getNearestChildReverse(d);
- if (a <= c) {
- return b = this.children[a].startTime, d = this.children[c].endTime, {startIndex:a, endIndex:c, startTime:b, endTime:d, totalTime:d - b};
- }
- }
- return null;
- };
- b.prototype._getNearestChild = function(b) {
- var d = this.children;
- if (d && d.length) {
- if (b <= d[0].endTime) {
- return 0;
- }
- for (var a, c = 0, f = d.length - 1;f > c;) {
- a = (c + f) / 2 | 0;
- var k = d[a];
- if (b >= k.startTime && b <= k.endTime) {
- return a;
- }
- b > k.endTime ? c = a + 1 : f = a;
- }
- return Math.ceil((c + f) / 2);
- }
- return 0;
- };
- b.prototype._getNearestChildReverse = function(b) {
- var d = this.children;
- if (d && d.length) {
- var a = d.length - 1;
- if (b >= d[a].startTime) {
- return a;
- }
- for (var c, f = 0;a > f;) {
- c = Math.ceil((f + a) / 2);
- var k = d[c];
- if (b >= k.startTime && b <= k.endTime) {
- return c;
- }
- b > k.endTime ? f = c : a = c - 1;
- }
- return (f + a) / 2 | 0;
- }
- return 0;
- };
- b.prototype.query = function(b) {
- if (b < this.startTime || b > this.endTime) {
- return null;
- }
- var d = this.children;
- if (d && 0 < d.length) {
- for (var a, c = 0, f = d.length - 1;f > c;) {
- var k = (c + f) / 2 | 0;
- a = d[k];
- if (b >= a.startTime && b <= a.endTime) {
- return a.query(b);
- }
- b > a.endTime ? c = k + 1 : f = k;
- }
- a = d[f];
- if (b >= a.startTime && b <= a.endTime) {
- return a.query(b);
- }
- }
- return this;
- };
- b.prototype.queryNext = function(b) {
- for (var d = this;b > d.endTime;) {
- if (d.parent) {
- d = d.parent;
- } else {
- break;
- }
- }
- return d.query(b);
- };
- b.prototype.getDepth = function() {
- for (var b = 0, d = this;d;) {
- b++, d = d.parent;
- }
- return b;
- };
- b.prototype.calculateStatistics = function() {
- function b(a) {
- if (a.kind) {
- var c = d[a.kind.id] || (d[a.kind.id] = new e(a.kind));
- c.count++;
- c.selfTime += a.selfTime;
- c.totalTime += a.totalTime;
- }
- a.children && a.children.forEach(b);
- }
- var d = this.statistics = [];
- b(this);
- };
- b.prototype.trace = function(b) {
- var d = (this.kind ? this.kind.name + ": " : "Profile: ") + (this.endTime - this.startTime).toFixed(2);
- if (this.children && this.children.length) {
- b.enter(d);
- for (d = 0;d < this.children.length;d++) {
- this.children[d].trace(b);
- }
- b.outdent();
- } else {
- b.writeLn(d);
- }
- };
- return b;
- }();
- b.TimelineFrame = t;
- t = function(b) {
- function l(d) {
- b.call(this, null, null, null, null, NaN, NaN);
- this.name = d;
- }
- __extends(l, b);
- return l;
- }(t);
- b.TimelineBufferSnapshot = t;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = function() {
- function n(b, l) {
- void 0 === b && (b = "");
- this.name = b || "";
- this._startTime = e.isNullOrUndefined(l) ? jsGlobal.START_TIME : l;
- }
- n.prototype.getKind = function(b) {
- return this._kinds[b];
- };
- Object.defineProperty(n.prototype, "kinds", {get:function() {
- return this._kinds.concat();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(n.prototype, "depth", {get:function() {
- return this._depth;
- }, enumerable:!0, configurable:!0});
- n.prototype._initialize = function() {
- this._depth = 0;
- this._stack = [];
- this._data = [];
- this._kinds = [];
- this._kindNameMap = Object.create(null);
- this._marks = new e.CircularBuffer(Int32Array, 20);
- this._times = new e.CircularBuffer(Float64Array, 20);
- };
- n.prototype._getKindId = function(b) {
- var l = n.MAX_KINDID;
- if (void 0 === this._kindNameMap[b]) {
- if (l = this._kinds.length, l < n.MAX_KINDID) {
- var d = {id:l, name:b, visible:!0};
- this._kinds.push(d);
- this._kindNameMap[b] = d;
- } else {
- l = n.MAX_KINDID;
- }
- } else {
- l = this._kindNameMap[b].id;
- }
- return l;
- };
- n.prototype._getMark = function(b, l, d) {
- var a = n.MAX_DATAID;
- e.isNullOrUndefined(d) || l === n.MAX_KINDID || (a = this._data.length, a < n.MAX_DATAID ? this._data.push(d) : a = n.MAX_DATAID);
- return b | a << 16 | l;
- };
- n.prototype.enter = function(b, l, d) {
- d = (e.isNullOrUndefined(d) ? performance.now() : d) - this._startTime;
- this._marks || this._initialize();
- this._depth++;
- b = this._getKindId(b);
- this._marks.write(this._getMark(n.ENTER, b, l));
- this._times.write(d);
- this._stack.push(b);
- };
- n.prototype.leave = function(b, l, d) {
- d = (e.isNullOrUndefined(d) ? performance.now() : d) - this._startTime;
- var a = this._stack.pop();
- b && (a = this._getKindId(b));
- this._marks.write(this._getMark(n.LEAVE, a, l));
- this._times.write(d);
- this._depth--;
- };
- n.prototype.count = function(b, l, d) {
- };
- n.prototype.createSnapshot = function(m) {
- void 0 === m && (m = Number.MAX_VALUE);
- if (!this._marks) {
- return null;
- }
- var l = this._times, d = this._kinds, a = this._data, c = new b.TimelineBufferSnapshot(this.name), f = [c], k = 0;
- this._marks || this._initialize();
- this._marks.forEachInReverse(function(c, u) {
- var q = a[c >>> 16 & n.MAX_DATAID], g = d[c & n.MAX_KINDID];
- if (e.isNullOrUndefined(g) || g.visible) {
- var p = c & 2147483648, v = l.get(u), z = f.length;
- if (p === n.LEAVE) {
- if (1 === z && (k++, k > m)) {
- return !0;
- }
- f.push(new b.TimelineFrame(f[z - 1], g, null, q, NaN, v));
- } else {
- if (p === n.ENTER) {
- if (g = f.pop(), p = f[f.length - 1]) {
- for (p.children ? p.children.unshift(g) : p.children = [g], p = f.length, g.depth = p, g.startData = q, g.startTime = v;g;) {
- if (g.maxDepth < p) {
- g.maxDepth = p, g = g.parent;
- } else {
- break;
- }
- }
- } else {
- return !0;
- }
- }
- }
- }
- });
- c.children && c.children.length && (c.startTime = c.children[0].startTime, c.endTime = c.children[c.children.length - 1].endTime);
- return c;
- };
- n.prototype.reset = function(b) {
- this._startTime = e.isNullOrUndefined(b) ? performance.now() : b;
- this._marks ? (this._depth = 0, this._data = [], this._marks.reset(), this._times.reset()) : this._initialize();
- };
- n.FromFirefoxProfile = function(b, l) {
- for (var d = b.profile.threads[0].samples, a = new n(l, d[0].time), c = [], f, k = 0;k < d.length;k++) {
- f = d[k];
- var r = f.time, u = f.frames, q = 0;
- for (f = Math.min(u.length, c.length);q < f && u[q].location === c[q].location;) {
- q++;
- }
- for (var g = c.length - q, p = 0;p < g;p++) {
- f = c.pop(), a.leave(f.location, null, r);
- }
- for (;q < u.length;) {
- f = u[q++], a.enter(f.location, null, r);
- }
- c = u;
- }
- for (;f = c.pop();) {
- a.leave(f.location, null, r);
- }
- return a;
- };
- n.FromChromeProfile = function(b, l) {
- var d = b.timestamps, a = b.samples, c = new n(l, d[0] / 1E3), f = [], k = {}, r;
- n._resolveIds(b.head, k);
- for (var u = 0;u < d.length;u++) {
- var q = d[u] / 1E3, g = [];
- for (r = k[a[u]];r;) {
- g.unshift(r), r = r.parent;
- }
- var p = 0;
- for (r = Math.min(g.length, f.length);p < r && g[p] === f[p];) {
- p++;
- }
- for (var v = f.length - p, z = 0;z < v;z++) {
- r = f.pop(), c.leave(r.functionName, null, q);
- }
- for (;p < g.length;) {
- r = g[p++], c.enter(r.functionName, null, q);
- }
- f = g;
- }
- for (;r = f.pop();) {
- c.leave(r.functionName, null, q);
- }
- return c;
- };
- n._resolveIds = function(b, l) {
- l[b.id] = b;
- if (b.children) {
- for (var d = 0;d < b.children.length;d++) {
- b.children[d].parent = b, n._resolveIds(b.children[d], l);
- }
- }
- };
- n.ENTER = 0;
- n.LEAVE = -2147483648;
- n.MAX_KINDID = 65535;
- n.MAX_DATAID = 32767;
- return n;
- }();
- b.TimelineBuffer = n;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(b) {
- b[b.DARK = 0] = "DARK";
- b[b.LIGHT = 1] = "LIGHT";
- })(h.UIThemeType || (h.UIThemeType = {}));
- var n = function() {
- function n(b, l) {
- void 0 === l && (l = 0);
- this._container = b;
- this._headers = [];
- this._charts = [];
- this._profiles = [];
- this._activeProfile = null;
- this.themeType = l;
- this._tooltip = this._createTooltip();
- }
- n.prototype.createProfile = function(b, l) {
- var d = new h.Profile(b, l);
- d.createSnapshots();
- this._profiles.push(d);
- this.activateProfile(d);
- return d;
- };
- n.prototype.activateProfile = function(b) {
- this.deactivateProfile();
- this._activeProfile = b;
- this._createViews();
- this._initializeViews();
- };
- n.prototype.activateProfileAt = function(b) {
- this.activateProfile(this.getProfileAt(b));
- };
- n.prototype.deactivateProfile = function() {
- this._activeProfile && (this._destroyViews(), this._activeProfile = null);
- };
- n.prototype.resize = function() {
- this._onResize();
- };
- n.prototype.getProfileAt = function(b) {
- return this._profiles[b];
- };
- Object.defineProperty(n.prototype, "activeProfile", {get:function() {
- return this._activeProfile;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(n.prototype, "profileCount", {get:function() {
- return this._profiles.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(n.prototype, "container", {get:function() {
- return this._container;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(n.prototype, "themeType", {get:function() {
- return this._themeType;
- }, set:function(h) {
- switch(h) {
- case 0:
- this._theme = new b.Theme.UIThemeDark;
- break;
- case 1:
- this._theme = new b.Theme.UIThemeLight;
- }
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(n.prototype, "theme", {get:function() {
- return this._theme;
- }, enumerable:!0, configurable:!0});
- n.prototype.getSnapshotAt = function(b) {
- return this._activeProfile.getSnapshotAt(b);
- };
- n.prototype._createViews = function() {
- if (this._activeProfile) {
- var b = this;
- this._overviewHeader = new h.FlameChartHeader(this, 0);
- this._overview = new h.FlameChartOverview(this, 0);
- this._activeProfile.forEachSnapshot(function(l, d) {
- b._headers.push(new h.FlameChartHeader(b, 1));
- b._charts.push(new h.FlameChart(b, l));
- });
- window.addEventListener("resize", this._onResize.bind(this));
- }
- };
- n.prototype._destroyViews = function() {
- if (this._activeProfile) {
- this._overviewHeader.destroy();
- for (this._overview.destroy();this._headers.length;) {
- this._headers.pop().destroy();
- }
- for (;this._charts.length;) {
- this._charts.pop().destroy();
- }
- window.removeEventListener("resize", this._onResize.bind(this));
- }
- };
- n.prototype._initializeViews = function() {
- if (this._activeProfile) {
- var b = this, l = this._activeProfile.startTime, d = this._activeProfile.endTime;
- this._overviewHeader.initialize(l, d);
- this._overview.initialize(l, d);
- this._activeProfile.forEachSnapshot(function(a, c) {
- b._headers[c].initialize(l, d);
- b._charts[c].initialize(l, d);
- });
- }
- };
- n.prototype._onResize = function() {
- if (this._activeProfile) {
- var b = this, l = this._container.offsetWidth;
- this._overviewHeader.setSize(l);
- this._overview.setSize(l);
- this._activeProfile.forEachSnapshot(function(d, a) {
- b._headers[a].setSize(l);
- b._charts[a].setSize(l);
- });
- }
- };
- n.prototype._updateViews = function() {
- if (this._activeProfile) {
- var b = this, l = this._activeProfile.windowStart, d = this._activeProfile.windowEnd;
- this._overviewHeader.setWindow(l, d);
- this._overview.setWindow(l, d);
- this._activeProfile.forEachSnapshot(function(a, c) {
- b._headers[c].setWindow(l, d);
- b._charts[c].setWindow(l, d);
- });
- }
- };
- n.prototype._drawViews = function() {
- };
- n.prototype._createTooltip = function() {
- var b = document.createElement("div");
- b.classList.add("profiler-tooltip");
- b.style.display = "none";
- this._container.insertBefore(b, this._container.firstChild);
- return b;
- };
- n.prototype.setWindow = function(b, l) {
- this._activeProfile.setWindow(b, l);
- this._updateViews();
- };
- n.prototype.moveWindowTo = function(b) {
- this._activeProfile.moveWindowTo(b);
- this._updateViews();
- };
- n.prototype.showTooltip = function(b, l, d, a) {
- this.removeTooltipContent();
- this._tooltip.appendChild(this.createTooltipContent(b, l));
- this._tooltip.style.display = "block";
- var c = this._tooltip.firstChild;
- l = c.clientWidth;
- c = c.clientHeight;
- d += d + l >= b.canvas.clientWidth - 50 ? -(l + 20) : 25;
- a += b.canvas.offsetTop - c / 2;
- this._tooltip.style.left = d + "px";
- this._tooltip.style.top = a + "px";
- };
- n.prototype.hideTooltip = function() {
- this._tooltip.style.display = "none";
- };
- n.prototype.createTooltipContent = function(b, l) {
- var d = Math.round(1E5 * l.totalTime) / 1E5, a = Math.round(1E5 * l.selfTime) / 1E5, c = Math.round(1E4 * l.selfTime / l.totalTime) / 100, f = document.createElement("div"), k = document.createElement("h1");
- k.textContent = l.kind.name;
- f.appendChild(k);
- k = document.createElement("p");
- k.textContent = "Total: " + d + " ms";
- f.appendChild(k);
- d = document.createElement("p");
- d.textContent = "Self: " + a + " ms (" + c + "%)";
- f.appendChild(d);
- if (a = b.getStatistics(l.kind)) {
- c = document.createElement("p"), c.textContent = "Count: " + a.count, f.appendChild(c), c = Math.round(1E5 * a.totalTime) / 1E5, d = document.createElement("p"), d.textContent = "All Total: " + c + " ms", f.appendChild(d), a = Math.round(1E5 * a.selfTime) / 1E5, c = document.createElement("p"), c.textContent = "All Self: " + a + " ms", f.appendChild(c);
- }
- this.appendDataElements(f, l.startData);
- this.appendDataElements(f, l.endData);
- return f;
- };
- n.prototype.appendDataElements = function(b, l) {
- if (!e.isNullOrUndefined(l)) {
- b.appendChild(document.createElement("hr"));
- var d;
- if (e.isObject(l)) {
- for (var a in l) {
- d = document.createElement("p"), d.textContent = a + ": " + l[a], b.appendChild(d);
- }
- } else {
- d = document.createElement("p"), d.textContent = l.toString(), b.appendChild(d);
- }
- }
- };
- n.prototype.removeTooltipContent = function() {
- for (var b = this._tooltip;b.firstChild;) {
- b.removeChild(b.firstChild);
- }
- };
- return n;
- }();
- h.Controller = n;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.NumberUtilities.clamp, t = function() {
- function b(d) {
- this.value = d;
- }
- b.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;
- }();
- b.MouseCursor = t;
- var m = function() {
- function b(d, a) {
- this._target = d;
- this._eventTarget = a;
- this._wheelDisabled = !1;
- this._boundOnMouseDown = this._onMouseDown.bind(this);
- this._boundOnMouseUp = this._onMouseUp.bind(this);
- this._boundOnMouseOver = this._onMouseOver.bind(this);
- this._boundOnMouseOut = this._onMouseOut.bind(this);
- this._boundOnMouseMove = this._onMouseMove.bind(this);
- this._boundOnMouseWheel = this._onMouseWheel.bind(this);
- this._boundOnDrag = this._onDrag.bind(this);
- a.addEventListener("mousedown", this._boundOnMouseDown, !1);
- a.addEventListener("mouseover", this._boundOnMouseOver, !1);
- a.addEventListener("mouseout", this._boundOnMouseOut, !1);
- a.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1);
- }
- b.prototype.destroy = function() {
- var b = this._eventTarget;
- b.removeEventListener("mousedown", this._boundOnMouseDown);
- b.removeEventListener("mouseover", this._boundOnMouseOver);
- b.removeEventListener("mouseout", this._boundOnMouseOut);
- b.removeEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel);
- window.removeEventListener("mousemove", this._boundOnDrag);
- window.removeEventListener("mouseup", this._boundOnMouseUp);
- this._killHoverCheck();
- this._target = this._eventTarget = null;
- };
- b.prototype.updateCursor = function(d) {
- if (!b._cursorOwner || b._cursorOwner === this._target) {
- var a = this._eventTarget.parentElement;
- b._cursor !== d && (b._cursor = d, ["", "-moz-", "-webkit-"].forEach(function(c) {
- a.style.cursor = c + d;
- }));
- b._cursorOwner = b._cursor === t.DEFAULT ? null : this._target;
- }
- };
- b.prototype._onMouseDown = function(b) {
- this._killHoverCheck();
- if (0 === b.button) {
- var a = this._getTargetMousePos(b, b.target);
- this._dragInfo = {start:a, current:a, delta:{x:0, y:0}, hasMoved:!1, originalTarget:b.target};
- window.addEventListener("mousemove", this._boundOnDrag, !1);
- window.addEventListener("mouseup", this._boundOnMouseUp, !1);
- this._target.onMouseDown(a.x, a.y);
- }
- };
- b.prototype._onDrag = function(b) {
- var a = this._dragInfo;
- b = this._getTargetMousePos(b, a.originalTarget);
- var c = {x:b.x - a.start.x, y:b.y - a.start.y};
- a.current = b;
- a.delta = c;
- a.hasMoved = !0;
- this._target.onDrag(a.start.x, a.start.y, b.x, b.y, c.x, c.y);
- };
- b.prototype._onMouseUp = function(b) {
- window.removeEventListener("mousemove", this._boundOnDrag);
- window.removeEventListener("mouseup", this._boundOnMouseUp);
- var a = this;
- b = this._dragInfo;
- if (b.hasMoved) {
- this._target.onDragEnd(b.start.x, b.start.y, b.current.x, b.current.y, b.delta.x, b.delta.y);
- } else {
- this._target.onClick(b.current.x, b.current.y);
- }
- this._dragInfo = null;
- this._wheelDisabled = !0;
- setTimeout(function() {
- a._wheelDisabled = !1;
- }, 500);
- };
- b.prototype._onMouseOver = function(b) {
- b.target.addEventListener("mousemove", this._boundOnMouseMove, !1);
- if (!this._dragInfo) {
- var a = this._getTargetMousePos(b, b.target);
- this._target.onMouseOver(a.x, a.y);
- this._startHoverCheck(b);
- }
- };
- b.prototype._onMouseOut = function(b) {
- b.target.removeEventListener("mousemove", this._boundOnMouseMove, !1);
- if (!this._dragInfo) {
- this._target.onMouseOut();
- }
- this._killHoverCheck();
- };
- b.prototype._onMouseMove = function(b) {
- if (!this._dragInfo) {
- var a = this._getTargetMousePos(b, b.target);
- this._target.onMouseMove(a.x, a.y);
- this._killHoverCheck();
- this._startHoverCheck(b);
- }
- };
- b.prototype._onMouseWheel = function(b) {
- if (!(b.altKey || b.metaKey || b.ctrlKey || b.shiftKey || (b.preventDefault(), this._dragInfo || this._wheelDisabled))) {
- var a = this._getTargetMousePos(b, b.target);
- b = n("undefined" !== typeof b.deltaY ? b.deltaY / 16 : -b.wheelDelta / 40, -1, 1);
- b = Math.pow(1.2, b) - 1;
- this._target.onMouseWheel(a.x, a.y, b);
- }
- };
- b.prototype._startHoverCheck = function(d) {
- this._hoverInfo = {isHovering:!1, timeoutHandle:setTimeout(this._onMouseMoveIdleHandler.bind(this), b.HOVER_TIMEOUT), pos:this._getTargetMousePos(d, d.target)};
- };
- b.prototype._killHoverCheck = function() {
- if (this._hoverInfo) {
- clearTimeout(this._hoverInfo.timeoutHandle);
- if (this._hoverInfo.isHovering) {
- this._target.onHoverEnd();
- }
- this._hoverInfo = null;
- }
- };
- b.prototype._onMouseMoveIdleHandler = function() {
- var b = this._hoverInfo;
- b.isHovering = !0;
- this._target.onHoverStart(b.pos.x, b.pos.y);
- };
- b.prototype._getTargetMousePos = function(b, a) {
- var c = a.getBoundingClientRect();
- return {x:b.clientX - c.left, y:b.clientY - c.top};
- };
- b.HOVER_TIMEOUT = 500;
- b._cursor = t.DEFAULT;
- return b;
- }();
- b.MouseController = m;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- b[b.NONE = 0] = "NONE";
- b[b.WINDOW = 1] = "WINDOW";
- b[b.HANDLE_LEFT = 2] = "HANDLE_LEFT";
- b[b.HANDLE_RIGHT = 3] = "HANDLE_RIGHT";
- b[b.HANDLE_BOTH = 4] = "HANDLE_BOTH";
- })(b.FlameChartDragTarget || (b.FlameChartDragTarget = {}));
- var e = function() {
- function e(m) {
- this._controller = m;
- this._initialized = !1;
- this._canvas = document.createElement("canvas");
- this._context = this._canvas.getContext("2d");
- this._mouseController = new b.MouseController(this, this._canvas);
- m = m.container;
- m.appendChild(this._canvas);
- m = m.getBoundingClientRect();
- this.setSize(m.width);
- }
- Object.defineProperty(e.prototype, "canvas", {get:function() {
- return this._canvas;
- }, enumerable:!0, configurable:!0});
- e.prototype.setSize = function(b, l) {
- void 0 === l && (l = 20);
- this._width = b;
- this._height = l;
- this._resetCanvas();
- this.draw();
- };
- e.prototype.initialize = function(b, l) {
- this._initialized = !0;
- this.setRange(b, l, !1);
- this.setWindow(b, l, !1);
- this.draw();
- };
- e.prototype.setWindow = function(b, l, d) {
- void 0 === d && (d = !0);
- this._windowStart = b;
- this._windowEnd = l;
- !d || this.draw();
- };
- e.prototype.setRange = function(b, l, d) {
- void 0 === d && (d = !0);
- this._rangeStart = b;
- this._rangeEnd = l;
- !d || this.draw();
- };
- e.prototype.destroy = function() {
- this._mouseController.destroy();
- this._mouseController = null;
- this._controller.container.removeChild(this._canvas);
- this._controller = null;
- };
- e.prototype._resetCanvas = function() {
- var b = window.devicePixelRatio, l = this._canvas;
- l.width = this._width * b;
- l.height = this._height * b;
- l.style.width = this._width + "px";
- l.style.height = this._height + "px";
- };
- e.prototype.draw = function() {
- };
- e.prototype._almostEq = function(b, l, d) {
- void 0 === d && (d = 10);
- d = Math.pow(10, d);
- return Math.abs(b - l) < 1 / d;
- };
- e.prototype._windowEqRange = function() {
- return this._almostEq(this._windowStart, this._rangeStart) && this._almostEq(this._windowEnd, this._rangeEnd);
- };
- e.prototype._decimalPlaces = function(b) {
- return (+b).toFixed(10).replace(/^-?\d*\.?|0+$/g, "").length;
- };
- e.prototype._toPixelsRelative = function(b) {
- return 0;
- };
- e.prototype._toPixels = function(b) {
- return 0;
- };
- e.prototype._toTimeRelative = function(b) {
- return 0;
- };
- e.prototype._toTime = function(b) {
- return 0;
- };
- e.prototype.onMouseWheel = function(b, l, d) {
- b = this._toTime(b);
- l = this._windowStart;
- var a = this._windowEnd, c = a - l;
- d = Math.max((e.MIN_WINDOW_LEN - c) / c, d);
- this._controller.setWindow(l + (l - b) * d, a + (a - b) * d);
- this.onHoverEnd();
- };
- e.prototype.onMouseDown = function(b, l) {
- };
- e.prototype.onMouseMove = function(b, l) {
- };
- e.prototype.onMouseOver = function(b, l) {
- };
- e.prototype.onMouseOut = function() {
- };
- e.prototype.onDrag = function(b, l, d, a, c, f) {
- };
- e.prototype.onDragEnd = function(b, l, d, a, c, f) {
- };
- e.prototype.onClick = function(b, l) {
- };
- e.prototype.onHoverStart = function(b, l) {
- };
- e.prototype.onHoverEnd = function() {
- };
- e.DRAGHANDLE_WIDTH = 4;
- e.MIN_WINDOW_LEN = .1;
- return e;
- }();
- b.FlameChartBase = e;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.StringUtilities.trimMiddle, t = function(m) {
- function l(b, a) {
- m.call(this, b);
- this._textWidth = {};
- this._minFrameWidthInPixels = 1;
- this._snapshot = a;
- this._kindStyle = Object.create(null);
- }
- __extends(l, m);
- l.prototype.setSize = function(b, a) {
- m.prototype.setSize.call(this, b, a || this._initialized ? 12.5 * this._maxDepth : 100);
- };
- l.prototype.initialize = function(b, a) {
- this._initialized = !0;
- this._maxDepth = this._snapshot.maxDepth;
- this.setRange(b, a, !1);
- this.setWindow(b, a, !1);
- this.setSize(this._width, 12.5 * this._maxDepth);
- };
- l.prototype.destroy = function() {
- m.prototype.destroy.call(this);
- this._snapshot = null;
- };
- l.prototype.draw = function() {
- var b = this._context, a = window.devicePixelRatio;
- e.ColorStyle.reset();
- b.save();
- b.scale(a, a);
- b.fillStyle = this._controller.theme.bodyBackground(1);
- b.fillRect(0, 0, this._width, this._height);
- this._initialized && this._drawChildren(this._snapshot);
- b.restore();
- };
- l.prototype._drawChildren = function(b, a) {
- void 0 === a && (a = 0);
- var c = b.getChildRange(this._windowStart, this._windowEnd);
- if (c) {
- for (var f = c.startIndex;f <= c.endIndex;f++) {
- var k = b.children[f];
- this._drawFrame(k, a) && this._drawChildren(k, a + 1);
- }
- }
- };
- l.prototype._drawFrame = function(b, a) {
- var c = this._context, f = this._toPixels(b.startTime), k = this._toPixels(b.endTime), r = k - f;
- if (r <= this._minFrameWidthInPixels) {
- return c.fillStyle = this._controller.theme.tabToolbar(1), c.fillRect(f, 12.5 * a, this._minFrameWidthInPixels, 12 + 12.5 * (b.maxDepth - b.depth)), !1;
- }
- 0 > f && (k = r + f, f = 0);
- var k = k - f, u = this._kindStyle[b.kind.id];
- u || (u = e.ColorStyle.randomStyle(), u = this._kindStyle[b.kind.id] = {bgColor:u, textColor:e.ColorStyle.contrastStyle(u)});
- c.save();
- c.fillStyle = u.bgColor;
- c.fillRect(f, 12.5 * a, k, 12);
- 12 < r && (r = b.kind.name) && r.length && (r = this._prepareText(c, r, k - 4), r.length && (c.fillStyle = u.textColor, c.textBaseline = "bottom", c.fillText(r, f + 2, 12.5 * (a + 1) - 1)));
- c.restore();
- return !0;
- };
- l.prototype._prepareText = function(b, a, c) {
- var f = this._measureWidth(b, a);
- if (c > f) {
- return a;
- }
- for (var f = 3, k = a.length;f < k;) {
- var r = f + k >> 1;
- this._measureWidth(b, n(a, r)) < c ? f = r + 1 : k = r;
- }
- a = n(a, k - 1);
- f = this._measureWidth(b, a);
- return f <= c ? a : "";
- };
- l.prototype._measureWidth = function(b, a) {
- var c = this._textWidth[a];
- c || (c = b.measureText(a).width, this._textWidth[a] = c);
- return c;
- };
- l.prototype._toPixelsRelative = function(b) {
- return b * this._width / (this._windowEnd - this._windowStart);
- };
- l.prototype._toPixels = function(b) {
- return this._toPixelsRelative(b - this._windowStart);
- };
- l.prototype._toTimeRelative = function(b) {
- return b * (this._windowEnd - this._windowStart) / this._width;
- };
- l.prototype._toTime = function(b) {
- return this._toTimeRelative(b) + this._windowStart;
- };
- l.prototype._getFrameAtPosition = function(b, a) {
- var c = this._toTime(b), f = 1 + a / 12.5 | 0;
- if ((c = this._snapshot.query(c)) && c.depth >= f) {
- for (;c && c.depth > f;) {
- c = c.parent;
- }
- return c;
- }
- return null;
- };
- l.prototype.onMouseDown = function(d, a) {
- this._windowEqRange() || (this._mouseController.updateCursor(b.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1});
- };
- l.prototype.onMouseMove = function(b, a) {
- };
- l.prototype.onMouseOver = function(b, a) {
- };
- l.prototype.onMouseOut = function() {
- };
- l.prototype.onDrag = function(b, a, c, f, k, r) {
- if (b = this._dragInfo) {
- k = this._toTimeRelative(-k), this._controller.setWindow(b.windowStartInitial + k, b.windowEndInitial + k);
- }
- };
- l.prototype.onDragEnd = function(d, a, c, f, k, r) {
- this._dragInfo = null;
- this._mouseController.updateCursor(b.MouseCursor.DEFAULT);
- };
- l.prototype.onClick = function(d, a) {
- this._dragInfo = null;
- this._mouseController.updateCursor(b.MouseCursor.DEFAULT);
- };
- l.prototype.onHoverStart = function(b, a) {
- var c = this._getFrameAtPosition(b, a);
- c && (this._hoveredFrame = c, this._controller.showTooltip(this, c, b, a));
- };
- l.prototype.onHoverEnd = function() {
- this._hoveredFrame && (this._hoveredFrame = null, this._controller.hideTooltip());
- };
- l.prototype.getStatistics = function(b) {
- var a = this._snapshot;
- a.statistics || a.calculateStatistics();
- return a.statistics[b.id];
- };
- return l;
- }(b.FlameChartBase);
- b.FlameChart = t;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.NumberUtilities.clamp;
- (function(b) {
- b[b.OVERLAY = 0] = "OVERLAY";
- b[b.STACK = 1] = "STACK";
- b[b.UNION = 2] = "UNION";
- })(b.FlameChartOverviewMode || (b.FlameChartOverviewMode = {}));
- var t = function(e) {
- function l(b, a) {
- void 0 === a && (a = 1);
- this._mode = a;
- this._overviewCanvasDirty = !0;
- this._overviewCanvas = document.createElement("canvas");
- this._overviewContext = this._overviewCanvas.getContext("2d");
- e.call(this, b);
- }
- __extends(l, e);
- l.prototype.setSize = function(b, a) {
- e.prototype.setSize.call(this, b, a || 64);
- };
- Object.defineProperty(l.prototype, "mode", {set:function(b) {
- this._mode = b;
- this.draw();
- }, enumerable:!0, configurable:!0});
- l.prototype._resetCanvas = function() {
- e.prototype._resetCanvas.call(this);
- this._overviewCanvas.width = this._canvas.width;
- this._overviewCanvas.height = this._canvas.height;
- this._overviewCanvasDirty = !0;
- };
- l.prototype.draw = function() {
- var b = this._context, a = window.devicePixelRatio, c = this._width, f = this._height;
- b.save();
- b.scale(a, a);
- b.fillStyle = this._controller.theme.bodyBackground(1);
- b.fillRect(0, 0, c, f);
- b.restore();
- this._initialized && (this._overviewCanvasDirty && (this._drawChart(), this._overviewCanvasDirty = !1), b.drawImage(this._overviewCanvas, 0, 0), this._drawSelection());
- };
- l.prototype._drawSelection = function() {
- var b = this._context, a = this._height, c = window.devicePixelRatio, f = this._selection ? this._selection.left : this._toPixels(this._windowStart), k = this._selection ? this._selection.right : this._toPixels(this._windowEnd), r = this._controller.theme;
- b.save();
- b.scale(c, c);
- this._selection ? (b.fillStyle = r.selectionText(.15), b.fillRect(f, 1, k - f, a - 1), b.fillStyle = "rgba(133, 0, 0, 1)", b.fillRect(f + .5, 0, k - f - 1, 4), b.fillRect(f + .5, a - 4, k - f - 1, 4)) : (b.fillStyle = r.bodyBackground(.4), b.fillRect(0, 1, f, a - 1), b.fillRect(k, 1, this._width, a - 1));
- b.beginPath();
- b.moveTo(f, 0);
- b.lineTo(f, a);
- b.moveTo(k, 0);
- b.lineTo(k, a);
- b.lineWidth = .5;
- b.strokeStyle = r.foregroundTextGrey(1);
- b.stroke();
- a = this._selection ? this._toTime(this._selection.left) : this._windowStart;
- c = this._selection ? this._toTime(this._selection.right) : this._windowEnd;
- a = Math.abs(c - a);
- b.fillStyle = r.selectionText(.5);
- b.font = "8px sans-serif";
- b.textBaseline = "alphabetic";
- b.textAlign = "end";
- b.fillText(a.toFixed(2), Math.min(f, k) - 4, 10);
- b.fillText((a / 60).toFixed(2), Math.min(f, k) - 4, 20);
- b.restore();
- };
- l.prototype._drawChart = function() {
- var b = window.devicePixelRatio, a = this._height, c = this._controller.activeProfile, f = 4 * this._width, k = c.totalTime / f, r = this._overviewContext, u = this._controller.theme.blueHighlight(1);
- r.save();
- r.translate(0, b * a);
- var q = -b * a / (c.maxDepth - 1);
- r.scale(b / 4, q);
- r.clearRect(0, 0, f, c.maxDepth - 1);
- 1 == this._mode && r.scale(1, 1 / c.snapshotCount);
- for (var g = 0, p = c.snapshotCount;g < p;g++) {
- var v = c.getSnapshotAt(g);
- if (v) {
- var l = null, h = 0;
- r.beginPath();
- r.moveTo(0, 0);
- for (var e = 0;e < f;e++) {
- h = c.startTime + e * k, h = (l = l ? l.queryNext(h) : v.query(h)) ? l.getDepth() - 1 : 0, r.lineTo(e, h);
- }
- r.lineTo(e, 0);
- r.fillStyle = u;
- r.fill();
- 1 == this._mode && r.translate(0, -a * b / q);
- }
- }
- r.restore();
- };
- l.prototype._toPixelsRelative = function(b) {
- return b * this._width / (this._rangeEnd - this._rangeStart);
- };
- l.prototype._toPixels = function(b) {
- return this._toPixelsRelative(b - this._rangeStart);
- };
- l.prototype._toTimeRelative = function(b) {
- return b * (this._rangeEnd - this._rangeStart) / this._width;
- };
- l.prototype._toTime = function(b) {
- return this._toTimeRelative(b) + this._rangeStart;
- };
- l.prototype._getDragTargetUnderCursor = function(d, a) {
- if (0 <= a && a < this._height) {
- var c = this._toPixels(this._windowStart), f = this._toPixels(this._windowEnd), k = 2 + b.FlameChartBase.DRAGHANDLE_WIDTH / 2, r = d >= c - k && d <= c + k, u = d >= f - k && d <= f + k;
- if (r && u) {
- return 4;
- }
- if (r) {
- return 2;
- }
- if (u) {
- return 3;
- }
- if (!this._windowEqRange() && d > c + k && d < f - k) {
- return 1;
- }
- }
- return 0;
- };
- l.prototype.onMouseDown = function(d, a) {
- var c = this._getDragTargetUnderCursor(d, a);
- 0 === c ? (this._selection = {left:d, right:d}, this.draw()) : (1 === c && this._mouseController.updateCursor(b.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:c});
- };
- l.prototype.onMouseMove = function(d, a) {
- var c = b.MouseCursor.DEFAULT, f = this._getDragTargetUnderCursor(d, a);
- 0 === f || this._selection || (c = 1 === f ? b.MouseCursor.GRAB : b.MouseCursor.EW_RESIZE);
- this._mouseController.updateCursor(c);
- };
- l.prototype.onMouseOver = function(b, a) {
- this.onMouseMove(b, a);
- };
- l.prototype.onMouseOut = function() {
- this._mouseController.updateCursor(b.MouseCursor.DEFAULT);
- };
- l.prototype.onDrag = function(d, a, c, f, k, r) {
- if (this._selection) {
- this._selection = {left:d, right:n(c, 0, this._width - 1)}, this.draw();
- } else {
- d = this._dragInfo;
- if (4 === d.target) {
- if (0 !== k) {
- d.target = 0 > k ? 2 : 3;
- } else {
- return;
- }
- }
- a = this._windowStart;
- c = this._windowEnd;
- k = this._toTimeRelative(k);
- switch(d.target) {
- case 1:
- a = d.windowStartInitial + k;
- c = d.windowEndInitial + k;
- break;
- case 2:
- a = n(d.windowStartInitial + k, this._rangeStart, c - b.FlameChartBase.MIN_WINDOW_LEN);
- break;
- case 3:
- c = n(d.windowEndInitial + k, a + b.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
- break;
- default:
- return;
- }
- this._controller.setWindow(a, c);
- }
- };
- l.prototype.onDragEnd = function(b, a, c, f, k, r) {
- this._selection && (this._selection = null, this._controller.setWindow(this._toTime(b), this._toTime(c)));
- this._dragInfo = null;
- this.onMouseMove(c, f);
- };
- l.prototype.onClick = function(b, a) {
- this._selection = this._dragInfo = null;
- this._windowEqRange() || (0 === this._getDragTargetUnderCursor(b, a) && this._controller.moveWindowTo(this._toTime(b)), this.onMouseMove(b, a));
- this.draw();
- };
- l.prototype.onHoverStart = function(b, a) {
- };
- l.prototype.onHoverEnd = function() {
- };
- return l;
- }(b.FlameChartBase);
- b.FlameChartOverview = t;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.NumberUtilities.clamp;
- (function(b) {
- b[b.OVERVIEW = 0] = "OVERVIEW";
- b[b.CHART = 1] = "CHART";
- })(b.FlameChartHeaderType || (b.FlameChartHeaderType = {}));
- var t = function(e) {
- function l(b, a) {
- this._type = a;
- e.call(this, b);
- }
- __extends(l, e);
- l.prototype.draw = function() {
- var b = this._context, a = window.devicePixelRatio, c = this._width, f = this._height;
- b.save();
- b.scale(a, a);
- b.fillStyle = this._controller.theme.tabToolbar(1);
- b.fillRect(0, 0, c, f);
- this._initialized && (0 == this._type ? (a = this._toPixels(this._windowStart), c = this._toPixels(this._windowEnd), b.fillStyle = this._controller.theme.bodyBackground(1), b.fillRect(a, 0, c - a, f), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(a), this._drawDragHandle(c)) : this._drawLabels(this._windowStart, this._windowEnd));
- b.restore();
- };
- l.prototype._drawLabels = function(b, a) {
- var c = this._context, f = this._calculateTickInterval(b, a), k = Math.ceil(b / f) * f, r = 500 <= f, u = r ? 1E3 : 1, q = this._decimalPlaces(f / u), r = r ? "s" : "ms", g = this._toPixels(k), p = this._height / 2, v = this._controller.theme;
- c.lineWidth = 1;
- c.strokeStyle = v.contentTextDarkGrey(.5);
- c.fillStyle = v.contentTextDarkGrey(1);
- c.textAlign = "right";
- c.textBaseline = "middle";
- c.font = "11px sans-serif";
- for (v = this._width + l.TICK_MAX_WIDTH;g < v;) {
- var z = (k / u).toFixed(q) + " " + r;
- c.fillText(z, g - 7, p + 1);
- c.beginPath();
- c.moveTo(g, 0);
- c.lineTo(g, this._height + 1);
- c.closePath();
- c.stroke();
- k += f;
- g = this._toPixels(k);
- }
- };
- l.prototype._calculateTickInterval = function(b, a) {
- var c = (a - b) / (this._width / l.TICK_MAX_WIDTH), f = Math.pow(10, Math.floor(Math.log(c) / Math.LN10)), c = c / f;
- return 5 < c ? 10 * f : 2 < c ? 5 * f : 1 < c ? 2 * f : f;
- };
- l.prototype._drawDragHandle = function(d) {
- var a = this._context;
- a.lineWidth = 2;
- a.strokeStyle = this._controller.theme.bodyBackground(1);
- a.fillStyle = this._controller.theme.foregroundTextGrey(.7);
- this._drawRoundedRect(a, d - b.FlameChartBase.DRAGHANDLE_WIDTH / 2, 1, b.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2, 2, !0);
- };
- l.prototype._drawRoundedRect = function(b, a, c, f, k, r, u, q) {
- void 0 === u && (u = !0);
- void 0 === q && (q = !0);
- b.beginPath();
- b.moveTo(a + r, c);
- b.lineTo(a + f - r, c);
- b.quadraticCurveTo(a + f, c, a + f, c + r);
- b.lineTo(a + f, c + k - r);
- b.quadraticCurveTo(a + f, c + k, a + f - r, c + k);
- b.lineTo(a + r, c + k);
- b.quadraticCurveTo(a, c + k, a, c + k - r);
- b.lineTo(a, c + r);
- b.quadraticCurveTo(a, c, a + r, c);
- b.closePath();
- u && b.stroke();
- q && b.fill();
- };
- l.prototype._toPixelsRelative = function(b) {
- return b * this._width / (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart);
- };
- l.prototype._toPixels = function(b) {
- return this._toPixelsRelative(b - (0 === this._type ? this._rangeStart : this._windowStart));
- };
- l.prototype._toTimeRelative = function(b) {
- return b * (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart) / this._width;
- };
- l.prototype._toTime = function(b) {
- var a = 0 === this._type ? this._rangeStart : this._windowStart;
- return this._toTimeRelative(b) + a;
- };
- l.prototype._getDragTargetUnderCursor = function(d, a) {
- if (0 <= a && a < this._height) {
- if (0 === this._type) {
- var c = this._toPixels(this._windowStart), f = this._toPixels(this._windowEnd), k = 2 + b.FlameChartBase.DRAGHANDLE_WIDTH / 2, c = d >= c - k && d <= c + k, f = d >= f - k && d <= f + k;
- if (c && f) {
- return 4;
- }
- if (c) {
- return 2;
- }
- if (f) {
- return 3;
- }
- }
- if (!this._windowEqRange()) {
- return 1;
- }
- }
- return 0;
- };
- l.prototype.onMouseDown = function(d, a) {
- var c = this._getDragTargetUnderCursor(d, a);
- 1 === c && this._mouseController.updateCursor(b.MouseCursor.GRABBING);
- this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:c};
- };
- l.prototype.onMouseMove = function(d, a) {
- var c = b.MouseCursor.DEFAULT, f = this._getDragTargetUnderCursor(d, a);
- 0 !== f && (1 !== f ? c = b.MouseCursor.EW_RESIZE : 1 !== f || this._windowEqRange() || (c = b.MouseCursor.GRAB));
- this._mouseController.updateCursor(c);
- };
- l.prototype.onMouseOver = function(b, a) {
- this.onMouseMove(b, a);
- };
- l.prototype.onMouseOut = function() {
- this._mouseController.updateCursor(b.MouseCursor.DEFAULT);
- };
- l.prototype.onDrag = function(d, a, c, f, k, r) {
- d = this._dragInfo;
- if (4 === d.target) {
- if (0 !== k) {
- d.target = 0 > k ? 2 : 3;
- } else {
- return;
- }
- }
- a = this._windowStart;
- c = this._windowEnd;
- k = this._toTimeRelative(k);
- switch(d.target) {
- case 1:
- c = 0 === this._type ? 1 : -1;
- a = d.windowStartInitial + c * k;
- c = d.windowEndInitial + c * k;
- break;
- case 2:
- a = n(d.windowStartInitial + k, this._rangeStart, c - b.FlameChartBase.MIN_WINDOW_LEN);
- break;
- case 3:
- c = n(d.windowEndInitial + k, a + b.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
- break;
- default:
- return;
- }
- this._controller.setWindow(a, c);
- };
- l.prototype.onDragEnd = function(b, a, c, f, k, r) {
- this._dragInfo = null;
- this.onMouseMove(c, f);
- };
- l.prototype.onClick = function(d, a) {
- 1 === this._dragInfo.target && this._mouseController.updateCursor(b.MouseCursor.GRAB);
- };
- l.prototype.onHoverStart = function(b, a) {
- };
- l.prototype.onHoverEnd = function() {
- };
- l.TICK_MAX_WIDTH = 75;
- return l;
- }(b.FlameChartBase);
- b.FlameChartHeader = t;
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- var h = function() {
- function b(d, a, c, f, k) {
- this.pageLoaded = d;
- this.threadsTotal = a;
- this.threadsLoaded = c;
- this.threadFilesTotal = f;
- this.threadFilesLoaded = k;
- }
- b.prototype.toString = function() {
- return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(b, a, c) {
- return b + ":" + this[b];
- }, this).join(", ") + "]";
- };
- return b;
- }();
- b.TraceLoggerProgressInfo = h;
- var e = function() {
- function l(b) {
- this._baseUrl = b;
- this._threads = [];
- this._progressInfo = null;
- }
- l.prototype.loadPage = function(b, a, c) {
- this._threads = [];
- this._pageLoadCallback = a;
- this._pageLoadProgressCallback = c;
- this._progressInfo = new h(!1, 0, 0, 0, 0);
- this._loadData([b], this._onLoadPage.bind(this));
- };
- Object.defineProperty(l.prototype, "buffers", {get:function() {
- for (var b = [], a = 0, c = this._threads.length;a < c;a++) {
- b.push(this._threads[a].buffer);
- }
- return b;
- }, enumerable:!0, configurable:!0});
- l.prototype._onProgress = function() {
- this._pageLoadProgressCallback && this._pageLoadProgressCallback.call(this, this._progressInfo);
- };
- l.prototype._onLoadPage = function(d) {
- if (d && 1 == d.length) {
- var a = this, c = 0;
- d = d[0];
- var f = d.length;
- this._threads = Array(f);
- this._progressInfo.pageLoaded = !0;
- this._progressInfo.threadsTotal = f;
- for (var k = 0;k < d.length;k++) {
- var r = d[k], u = [r.dict, r.tree];
- r.corrections && u.push(r.corrections);
- this._progressInfo.threadFilesTotal += u.length;
- this._loadData(u, function(d) {
- return function(g) {
- g && (g = new b.Thread(g), g.buffer.name = "Thread " + d, a._threads[d] = g);
- c++;
- a._progressInfo.threadsLoaded++;
- a._onProgress();
- c === f && a._pageLoadCallback.call(a, null, a._threads);
- };
- }(k), function(b) {
- a._progressInfo.threadFilesLoaded++;
- a._onProgress();
- });
- }
- this._onProgress();
- } else {
- this._pageLoadCallback.call(this, "Error loading page.", null);
- }
- };
- l.prototype._loadData = function(b, a, c) {
- var f = 0, k = 0, r = b.length, u = [];
- u.length = r;
- for (var q = 0;q < r;q++) {
- var g = this._baseUrl + b[q], p = /\.tl$/i.test(g), v = new XMLHttpRequest, p = p ? "arraybuffer" : "json";
- v.open("GET", g, !0);
- v.responseType = p;
- v.onload = function(b, g) {
- return function(d) {
- if ("json" === g) {
- if (d = this.response, "string" === typeof d) {
- try {
- d = JSON.parse(d), u[b] = d;
- } catch (p) {
- k++;
- }
- } else {
- u[b] = d;
- }
- } else {
- u[b] = this.response;
- }
- ++f;
- c && c(f);
- f === r && a(u);
- };
- }(q, p);
- v.send();
- }
- };
- l.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 l;
- }();
- b.TraceLogger = e;
- })(b.TraceLogger || (b.TraceLogger = {}));
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- var t;
- (function(b) {
- b[b.START_HI = 0] = "START_HI";
- b[b.START_LO = 4] = "START_LO";
- b[b.STOP_HI = 8] = "STOP_HI";
- b[b.STOP_LO = 12] = "STOP_LO";
- b[b.TEXTID = 16] = "TEXTID";
- b[b.NEXTID = 20] = "NEXTID";
- })(t || (t = {}));
- t = function() {
- function e(l) {
- 2 <= l.length && (this._text = l[0], this._data = new DataView(l[1]), this._buffer = new b.TimelineBuffer, this._walkTree(0));
- }
- Object.defineProperty(e.prototype, "buffer", {get:function() {
- return this._buffer;
- }, enumerable:!0, configurable:!0});
- e.prototype._walkTree = function(b) {
- var d = this._data, a = this._buffer;
- do {
- var c = b * e.ITEM_SIZE, f = 4294967295 * d.getUint32(c + 0) + d.getUint32(c + 4), k = 4294967295 * d.getUint32(c + 8) + d.getUint32(c + 12), r = d.getUint32(c + 16), c = d.getUint32(c + 20), u = 1 === (r & 1), r = r >>> 1, r = this._text[r];
- a.enter(r, null, f / 1E6);
- u && this._walkTree(b + 1);
- a.leave(r, null, k / 1E6);
- b = c;
- } while (0 !== b);
- };
- e.ITEM_SIZE = 24;
- return e;
- }();
- e.Thread = t;
- })(b.TraceLogger || (b.TraceLogger = {}));
- })(b.Profiler || (b.Profiler = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.NumberUtilities.clamp, t = function() {
- function b() {
- this.length = 0;
- this.lines = [];
- this.format = [];
- this.time = [];
- this.repeat = [];
- this.length = 0;
- }
- b.prototype.append = function(b, a) {
- var c = this.lines;
- 0 < c.length && c[c.length - 1] === b ? this.repeat[c.length - 1]++ : (this.lines.push(b), this.repeat.push(1), this.format.push(a ? {backgroundFillStyle:a} : void 0), this.time.push(performance.now()), this.length++);
- };
- b.prototype.get = function(b) {
- return this.lines[b];
- };
- b.prototype.getFormat = function(b) {
- return this.format[b];
- };
- b.prototype.getTime = function(b) {
- return this.time[b];
- };
- b.prototype.getRepeat = function(b) {
- return this.repeat[b];
- };
- return b;
- }();
- b.Buffer = t;
- var m = function() {
- function b(d) {
- this.lineColor = "#2A2A2A";
- this.alternateLineColor = "#262626";
- this.textColor = "#FFFFFF";
- this.selectionColor = "#96C9F3";
- this.selectionTextColor = "#000000";
- this.ratio = 1;
- this.showLineNumbers = !0;
- this.showLineCounter = this.showLineTime = !1;
- this.canvas = d;
- this.canvas.focus();
- this.context = d.getContext("2d", {original:!0});
- this.context.fillStyle = "#FFFFFF";
- this.fontSize = 10;
- this.columnIndex = this.pageIndex = this.lineIndex = 0;
- this.selection = null;
- this.lineHeight = 15;
- this.hasFocus = !1;
- window.addEventListener("resize", this._resizeHandler.bind(this), !1);
- this._resizeHandler();
- this.textMarginBottom = this.textMarginLeft = 4;
- this.refreshFrequency = 0;
- this.buffer = new t;
- d.addEventListener("keydown", function(b) {
- var d = 0;
- switch(b.keyCode) {
- case e:
- this.printHelp();
- break;
- case l:
- this.showLineNumbers = !this.showLineNumbers;
- break;
- case h:
- this.showLineTime = !this.showLineTime;
- break;
- case r:
- d = -1;
- break;
- case u:
- d = 1;
- break;
- case a:
- d = -this.pageLineCount;
- break;
- case c:
- d = this.pageLineCount;
- break;
- case f:
- d = -this.lineIndex;
- break;
- case k:
- d = this.buffer.length - this.lineIndex;
- break;
- case q:
- this.columnIndex -= b.metaKey ? 10 : 1;
- 0 > this.columnIndex && (this.columnIndex = 0);
- b.preventDefault();
- break;
- case g:
- this.columnIndex += b.metaKey ? 10 : 1;
- b.preventDefault();
- break;
- case p:
- if (b.metaKey || b.ctrlKey) {
- this.selection = {start:0, end:this.buffer.length - 1}, b.preventDefault();
- }
- break;
- case v:
- ;
- case m:
- if (b.metaKey || b.ctrlKey) {
- var n = "";
- if (this.selection) {
- for (var t = this.selection.start;t <= this.selection.end;t++) {
- n += this.buffer.get(t) + "\n";
- }
- } else {
- n = this.buffer.get(this.lineIndex);
- }
- b.keyCode === v ? alert(n) : window.open(URL.createObjectURL(new Blob([n], {type:"text/plain"})), "_blank");
- }
- ;
- }
- b.metaKey && (d *= this.pageLineCount);
- d && (this.scroll(d), b.preventDefault());
- d && b.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < d ? this.selection = {start:this.lineIndex - d, end:this.lineIndex} : 0 > d && (this.selection = {start:this.lineIndex, end:this.lineIndex - d}) : d && (this.selection = null);
- this.paint();
- }.bind(this), !1);
- d.addEventListener("focus", function(a) {
- this.hasFocus = !0;
- }.bind(this), !1);
- d.addEventListener("blur", function(a) {
- this.hasFocus = !1;
- }.bind(this), !1);
- var a = 33, c = 34, f = 36, k = 35, r = 38, u = 40, q = 37, g = 39, p = 65, v = 67, l = 78, h = 84, e = 72, m = 83;
- }
- b.prototype.printHelp = function() {
- var b = this;
- "h - help;n - turn on/off line numbers;t - turn on/off line time;arrow_keys - navigation;cmd/ctrl+a - select all;cmd/ctrl+c - copy/alert selection;cmd/ctrl+s - open selection in new tab;shift+arrow_keys - selection".split(";").forEach(function(a) {
- return b.buffer.append(a, "#002000");
- });
- };
- b.prototype.resize = function() {
- this._resizeHandler();
- };
- b.prototype._resizeHandler = function() {
- var b = this.canvas.parentElement, a = b.clientWidth, b = b.clientHeight && b.clientHeight - 1, c = window.devicePixelRatio || 1;
- 1 !== c ? (this.ratio = c / 1, this.canvas.width = a * this.ratio, this.canvas.height = b * this.ratio, this.canvas.style.width = a + "px", this.canvas.style.height = b + "px") : (this.ratio = 1, this.canvas.width = a, this.canvas.height = b);
- this.pageLineCount = Math.floor(this.canvas.height / this.lineHeight);
- };
- b.prototype.gotoLine = function(b) {
- this.lineIndex = n(b, 0, this.buffer.length - 1);
- };
- b.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(b) {
- this.gotoLine(this.lineIndex + b);
- this.scrollIntoView();
- };
- b.prototype.paint = function() {
- var b = this.pageLineCount;
- this.pageIndex + b > this.buffer.length && (b = this.buffer.length - this.pageIndex);
- var a = this.textMarginLeft, c = a + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), f = c + (this.showLineTime ? 40 : 10), k = f + 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 r = this.canvas.width, u = this.lineHeight, q = 0;q < b;q++) {
- var g = q * this.lineHeight, p = this.pageIndex + q, v = this.buffer.get(p), l = this.buffer.getFormat(p), h = this.buffer.getRepeat(p), e = 1 < p ? this.buffer.getTime(p) - this.buffer.getTime(0) : 0;
- this.context.fillStyle = p % 2 ? this.lineColor : this.alternateLineColor;
- l && l.backgroundFillStyle && (this.context.fillStyle = l.backgroundFillStyle);
- this.context.fillRect(0, g, r, u);
- this.context.fillStyle = this.selectionTextColor;
- this.context.fillStyle = this.textColor;
- this.selection && p >= this.selection.start && p <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, g, r, u), this.context.fillStyle = this.selectionTextColor);
- this.hasFocus && p === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, g, r, u), this.context.fillStyle = this.selectionTextColor);
- 0 < this.columnIndex && (v = v.substring(this.columnIndex));
- g = (q + 1) * this.lineHeight - this.textMarginBottom;
- this.showLineNumbers && this.context.fillText(String(p), a, g);
- this.showLineTime && this.context.fillText(e.toFixed(1).padLeft(" ", 6), c, g);
- 1 < h && this.context.fillText(String(h).padLeft(" ", 3), f, g);
- this.context.fillText(v, k, g);
- }
- };
- b.prototype.refreshEvery = function(b) {
- function a() {
- c.paint();
- c.refreshFrequency && setTimeout(a, c.refreshFrequency);
- }
- var c = this;
- this.refreshFrequency = b;
- c.refreshFrequency && setTimeout(a, c.refreshFrequency);
- };
- b.prototype.isScrolledToBottom = function() {
- return this.lineIndex === this.buffer.length - 1;
- };
- return b;
- }();
- b.Terminal = m;
- })(b.Terminal || (b.Terminal = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function() {
- function b(h) {
- 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 = h;
- this._canvas = document.createElement("canvas");
- this._container.appendChild(this._canvas);
- this._context = this._canvas.getContext("2d");
- this._listenForContainerSizeChanges();
- }
- b.prototype._listenForContainerSizeChanges = function() {
- var b = this._containerWidth, l = this._containerHeight;
- this._onContainerSizeChanged();
- var d = this;
- setInterval(function() {
- if (b !== d._containerWidth || l !== d._containerHeight) {
- d._onContainerSizeChanged(), b = d._containerWidth, l = d._containerHeight;
- }
- }, 10);
- };
- b.prototype._onContainerSizeChanged = function() {
- var b = this._containerWidth, l = this._containerHeight, d = window.devicePixelRatio || 1;
- 1 !== d ? (this._ratio = d / 1, this._canvas.width = b * this._ratio, this._canvas.height = l * this._ratio, this._canvas.style.width = b + "px", this._canvas.style.height = l + "px") : (this._ratio = 1, this._canvas.width = b, this._canvas.height = l);
- };
- Object.defineProperty(b.prototype, "_containerWidth", {get:function() {
- return this._container.clientWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "_containerHeight", {get:function() {
- return this._container.clientHeight;
- }, enumerable:!0, configurable:!0});
- b.prototype.tickAndRender = function(b, l) {
- void 0 === b && (b = !1);
- void 0 === l && (l = 0);
- if (0 === this._lastTime) {
- this._lastTime = performance.now();
- } else {
- var d = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, a = this._context, c = 2 * this._ratio, f = 30 * this._ratio, k = performance;
- k.memory && (f += 30 * this._ratio);
- var r = (this._canvas.width - f) / (c + 1) | 0, u = this._index++;
- this._index > r && (this._index = 0);
- r = this._canvas.height;
- a.globalAlpha = 1;
- a.fillStyle = "black";
- a.fillRect(f + u * (c + 1), 0, 4 * c, this._canvas.height);
- var q = Math.min(1E3 / 60 / d, 1);
- a.fillStyle = "#00FF00";
- a.globalAlpha = b ? .5 : 1;
- q = r / 2 * q | 0;
- a.fillRect(f + u * (c + 1), r - q, c, q);
- l && (q = Math.min(1E3 / 240 / l, 1), a.fillStyle = "#FF6347", q = r / 2 * q | 0, a.fillRect(f + u * (c + 1), r / 2 - q, c, q));
- 0 === u % 16 && (a.globalAlpha = 1, a.fillStyle = "black", a.fillRect(0, 0, f, this._canvas.height), a.fillStyle = "white", a.font = 8 * this._ratio + "px Arial", a.textBaseline = "middle", c = (1E3 / d).toFixed(0), l && (c += " " + l.toFixed(0)), k.memory && (c += " " + (k.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), a.fillText(c, 2 * this._ratio, this._containerHeight / 2 * this._ratio));
- this._lastTime = performance.now();
- this._lastWeightedTime = d;
- }
- };
- return b;
- }();
- b.FPS = e;
- })(b.Mini || (b.Mini = {}));
- })(e.Tools || (e.Tools = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load Shared Dependencies");
-console.time("Load AVM2 Dependencies");
-"use strict";
-(function(e) {
- (function(b) {
- b.timelineBuffer = new e.Tools.Profiler.TimelineBuffer("AVM2");
- b.counter = new e.Metrics.Counter(!1);
- b.countTimeline = function(h, e) {
- void 0 === e && (e = 1);
- b.timelineBuffer && b.timelineBuffer.count(h, e);
- };
- b.enterTimeline = function(b, e) {
- };
- b.leaveTimeline = function(b) {
- };
- })(e.AVM2 || (e.AVM2 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- b.timelineBuffer = new e.Tools.Profiler.TimelineBuffer("AVX");
- b.counter = new e.Metrics.Counter(!1);
- b.countTimeline = function(h, e) {
- void 0 === e && (e = 1);
- b.timelineBuffer && b.timelineBuffer.count(h, e);
- };
- b.enterTimeline = function(b, e) {
- };
- b.leaveTimeline = function(b) {
- };
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(b) {
- for (var l = [], d = 1;d < arguments.length;d++) {
- l[d - 1] = arguments[d];
- }
- var a = b.message;
- l.forEach(function(b, d) {
- a = a.replace("%" + (d + 1), b);
- });
- return "Error #" + b.code + ": " + a;
- }
- b.Errors = {NotImplementedError:{code:1001, message:"The method %1 is not implemented."}, InvalidPrecisionError:{code:1002, message:"Number.toPrecision has a range of 1 to 21. Number.toFixed and Number.toExponential have a range of 0 to 20. Specified value is not within expected range."}, InvalidRadixError:{code:1003, message:"The radix argument must be between 2 and 36; got %1."}, InvokeOnIncompatibleObjectError:{code:1004, message:"Method %1 was invoked on an incompatible object."}, ArrayIndexNotIntegerError:{code:1005,
- message:"Array index is not a positive integer (%1)."}, CallOfNonFunctionError:{code:1006, message:"%1 is not a function."}, ConstructOfNonFunctionError:{code:1007, message:"Instantiation attempted on a non-constructor."}, 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."},
- DescendentsError:{code:1016, message:"Descendants operator (..) not supported on type %1."}, StackOverflowError:{code:1023, message:"Stack overflow occurred."}, CpoolIndexRangeError:{code:1032, message:"Cpool index %1 is out of range %2."}, CpoolEntryWrongTypeError:{code:1033, message:"Cpool entry %1 is wrong type."}, CheckTypeFailedError:{code:1034, message:"Type Coercion failed: cannot convert %1 to %2."}, CannotAssignToMethodError:{code:1037, message:"Cannot assign to a method %1 on %2."},
- CantUseInstanceofOnNonObjectError:{code:1040, message:"The right-hand side of instanceof must be a class or function."}, IsTypeMustBeClassError:{code:1041, message:"The right-hand side of operator must be a class."}, InvalidMagicError:{code:1042, message:"Not an ABC file. major_version=%1 minor_version=%2."}, UnsupportedTraitsKindError:{code:1045, message:"Unsupported traits kind=%1."}, PrototypeTypeError:{code:1049, message:"Prototype objects must be vanilla Objects."}, ConvertToPrimitiveError:{code:1050,
- message:"Cannot convert %1 to primitive."}, InvalidURIError:{code:1052, message:"Invalid URI passed to %1 function."}, WriteSealedError:{code:1056, message:"Cannot create property %1 on %2."}, WrongArgumentCountError:{code:1063, message:"Argument count mismatch on %1. Expected %2, got %3."}, UndefinedVarError:{code:1065, message:"Variable %1 is not defined."}, ReadSealedError:{code:1069, message:"Property %1 not found on %2 and there is no default value."}, ConstWriteError:{code:1074, message:"Illegal write to read-only property %1 on %2."},
- XMLPrefixNotBound:{code:1083, message:'The prefix "%1" for element "%2" is not bound.'}, XMLUnterminatedElementTag:{code:1085, message:'The element type "%1" must be terminated by the matching end-tag "%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."}, XMLMalformedElement:{code:1090, message:"XML parser failure: element is malformed."}, XMLUnterminatedCData:{code:1091, message:"XML parser failure: Unterminated CDATA section."}, XMLUnterminatedXMLDecl:{code:1092, message:"XML parser failure: Unterminated XML declaration."}, XMLUnterminatedDocTypeDecl:{code:1093, message:"XML parser failure: Unterminated DOCTYPE declaration."}, XMLUnterminatedComment:{code:1094,
- message:"XML parser failure: Unterminated comment."}, XMLUnterminatedElement:{code:1096, message:"XML parser failure: Unterminated element."}, XMLNamespaceWithPrefixAndNoURI:{code:1098, message:"Illegal prefix %1 for no namespace."}, RegExpFlagsArgumentError:{code:1100, message:"Cannot supply flags when constructing one RegExp from another."}, InvalidBaseClassError:{code:1108, message:"The OP_newclass opcode was used with the incorrect base class."}, XMLInvalidName:{code:1117, message:"Invalid XML name: %1."},
- XMLIllegalCyclicalLoop:{code:1118, message:"Illegal cyclical loop between nodes."}, FilterError:{code:1123, message:"Filter operator not supported on type %1."}, OutOfRangeError:{code:1125, message:"The index %1 is out of range %2."}, VectorFixedError:{code:1126, message:"Cannot change the length of a fixed Vector."}, TypeAppOfNonParamType:{code:1127, message:"Type application attempted on a non-parameterized type."}, WrongTypeArgCountError:{code:1128, message:"Incorrect number of type parameters for %1. Expected %2, got %3."},
- JSONCyclicStructure:{code:1129, message:"Cyclic structure cannot be converted to JSON string."}, JSONInvalidReplacer:{code:1131, message:"Replacer argument to JSON stringifier must be an array or a two parameter function."}, JSONInvalidParseInput:{code:1132, message:"Invalid JSON parse input."}, 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."},
- ArrayFilterNonNullObjectError:{code:1510, message:"When the callback argument is a method of a class, the optional this argument must be null."}, 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"}, CompressedDataError:{code:2058, message:"There was an error decompressing the data.", fqn:"flash.errors.IOError"}, EmptyStringError:{code:2085, message:"Parameter %1 must be non-empty string."}, ProxyGetPropertyError:{code:2088, message:"The Proxy class does not implement getProperty. It must be overridden by a subclass."}, ProxySetPropertyError:{code:2089,
- message:"The Proxy class does not implement setProperty. It must be overridden by a subclass."}, ProxyCallPropertyError:{code:2090, message:"The Proxy class does not implement callProperty. It must be overridden by a subclass."}, ProxyHasPropertyError:{code:2091, message:"The Proxy class does not implement hasProperty. It must be overridden by a subclass."}, ProxyDeletePropertyError:{code:2092, message:"The Proxy class does not implement deleteProperty. It must be overridden by a subclass."},
- ProxyGetDescendantsError:{code:2093, message:"The Proxy class does not implement getDescendants. It must be overridden by a subclass."}, ProxyNextNameIndexError:{code:2105, message:"The Proxy class does not implement nextNameIndex. It must be overridden by a subclass."}, ProxyNextNameError:{code:2106, message:"The Proxy class does not implement nextName. It must be overridden by a subclass."}, ProxyNextValueError:{code:2107, message:"The Proxy class does not implement nextValue. It must be overridden by a subclass."},
- TooFewArgumentsError:{code:2001, message:"Too few arguments were specified; got %1, %2 expected."}, ParamTypeError:{code:2005, message:"Parameter %1 is of the incorrect type. Should be type %2."}, SocketConnectError:{code:2011, message:"Socket connection failed to %1:%2."}, CantAddSelfError:{code:2024, message:"An object cannot be added as a child of itself."}, NotAChildError:{code:2025, message:"The supplied DisplayObject must be a child of the caller."}, UnhandledError:{code:2044, message:"Unhandled %1:."},
- AllowDomainArgumentError:{code:2052, message:"Only String arguments are permitted for allowDomain and allowInsecureDomain."}, DelayRangeError:{code:2066, 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."}, TimelineObjectNameSealedError:{code:2078, message:"The name property of a Timeline-placed object cannot be modified."}, AlreadyConnectedError:{code:2082, message:"Connect failed because the object is already connected."}, CloseNotConnectedError:{code:2083, message:"Close failed because the object is not connected."}, ArgumentSizeError:{code:2084, message:"The AMF encoding of the arguments cannot exceed 40K."},
- AsyncError:{code:2095, message:"%1 was unable to invoke callback %2."}, 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."}, SecuritySwfNotAllowedError:{code:2121, message:"Security sandbox violation: %1: %2 cannot access %3. This may be worked around by calling Security.allowDomain."}, UnknownFileTypeError:{code:2124, message:"Loaded file is an unknown type."}, 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."}, AllowCodeImportError:{code:3226, message:"Cannot import a SWF file when LoaderContext.allowCodeImport is false."}, PermissionDenied:{code:3315, message:"The current security context does not allow this operation."}, InternalErrorIV:{code:3343, message:"Internal Error."}};
- for (var n in b.Errors) {
- var t = b.Errors[n];
- t.typeName = n;
- b.Errors[t.code] = t;
- }
- b.getErrorMessage = function(h) {
- var l = "Error #" + h;
- if (!e.AVM2.Runtime.debuggerMode.value) {
- return l;
- }
- h = b.Errors[h];
- return l + ": " + (h && h.message || "(unknown)");
- };
- b.getErrorInfo = function(h) {
- return b.Errors[h];
- };
- b.formatErrorMessage = h;
- b.translateErrorMessage = function(m) {
- if (m.type) {
- switch(m.type) {
- case "undefined_method":
- return h(b.Errors.CallOfNonFunctionError, "value");
- default:
- throw e.Debug.notImplemented(m.type);;
- }
- } else {
- return 0 <= m.message.indexOf("is not a function") ? h(b.Errors.CallOfNonFunctionError, "value") : m.message;
- }
- };
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-Errors = Shumway.AVMX.Errors;
-var Shumway$$inline_490 = Shumway || (Shumway = {}), AVM2$$inline_491 = Shumway$$inline_490.AVM2 || (Shumway$$inline_490.AVM2 = {}), Option$$inline_492 = Shumway$$inline_490.Options.Option, OptionSet$$inline_493 = Shumway$$inline_490.Options.OptionSet, avm2Options$$inline_494 = Shumway$$inline_490.Settings.shumwayOptions.register(new OptionSet$$inline_493("AVM2")), Runtime$$inline_495 = AVM2$$inline_491.Runtime || (AVM2$$inline_491.Runtime = {}), options$$inline_496 = avm2Options$$inline_494.register(new OptionSet$$inline_493("Runtime"));
-Runtime$$inline_495.traceRuntime = options$$inline_496.register(new Option$$inline_492("tr", "traceRuntime", "boolean", !1, "trace runtime"));
-Runtime$$inline_495.traceExecution = options$$inline_496.register(new Option$$inline_492("tx", "traceExecution", "boolean", !1, "trace execution"));
-Runtime$$inline_495.traceInterpreter = options$$inline_496.register(new Option$$inline_492("ti", "traceInterpreter", "boolean", !1, "trace interpreter"));
-Runtime$$inline_495.debuggerMode = options$$inline_496.register(new Option$$inline_492("db", "debuggerMode", "boolean", !0, "enable debugger mode"));
-var ExecutionMode$$inline_497 = Runtime$$inline_495.ExecutionMode || (Runtime$$inline_495.ExecutionMode = {});
-ExecutionMode$$inline_497[ExecutionMode$$inline_497.INTERPRET = 1] = "INTERPRET";
-ExecutionMode$$inline_497[ExecutionMode$$inline_497.COMPILE = 2] = "COMPILE";
-var ExecutionMode$$inline_498 = Runtime$$inline_495.ExecutionMode;
-(function(e) {
- (function(b) {
- (function(b) {
- var n = null;
- "undefined" !== typeof TextDecoder && (n = new TextDecoder);
- var t = function() {
- function b(l) {
- this._bytes = l;
- this._view = new DataView(l.buffer, l.byteOffset);
- this._position = 0;
- }
- b._getResultBuffer = function(l) {
- if (!b._resultBuffer || b._resultBuffer.length < l) {
- b._resultBuffer = new Int32Array(2 * l);
- }
- return b._resultBuffer;
- };
- Object.defineProperty(b.prototype, "position", {get:function() {
- return this._position;
- }, enumerable:!0, configurable:!0});
- b.prototype.remaining = function() {
- return this._bytes.length - this._position;
- };
- b.prototype.seek = function(b) {
- this._position = b;
- };
- b.prototype.advance = function(b) {
- this._position += b;
- };
- b.prototype.readU8 = function() {
- return this._bytes[this._position++];
- };
- b.prototype.readU8s = function(b) {
- var d = new Uint8Array(b);
- d.set(this._bytes.subarray(this._position, this._position + b), 0);
- this._position += b;
- return d;
- };
- b.prototype.viewU8s = function(b) {
- var d = this._bytes.subarray(this._position, this._position + b);
- this._position += b;
- return d;
- };
- b.prototype.readS8 = function() {
- return this._bytes[this._position++] << 24 >> 24;
- };
- b.prototype.readU32 = function() {
- return this.readS32() >>> 0;
- };
- b.prototype.readU30 = function() {
- return this.readU32();
- };
- b.prototype.readU30Unsafe = function() {
- return this.readU32();
- };
- b.prototype.readS16 = function() {
- return this.readU30Unsafe() << 16 >> 16;
- };
- b.prototype.readS32 = function() {
- var b = this.readU8();
- b & 128 && (b = b & 127 | this.readU8() << 7, b & 16384 && (b = b & 16383 | this.readU8() << 14, b & 2097152 && (b = b & 2097151 | this.readU8() << 21, b & 268435456 && (b = b & 268435455 | this.readU8() << 28, b &= 4294967295))));
- return b;
- };
- b.prototype.readWord = function() {
- var b = this._view.getUint32(this._position, !0);
- this._position += 4;
- return b;
- };
- b.prototype.readS24 = function() {
- return (this.readU8() | this.readU8() << 8 | this.readU8() << 16) << 8 >> 8;
- };
- b.prototype.readDouble = function() {
- var b = this._view.getFloat64(this._position, !0);
- this._position += 8;
- return b;
- };
- b.prototype.readUTFString = function(l) {
- if (n) {
- var d = this._position;
- this._position += l;
- return n.decode(this._bytes.subarray(d, d + l));
- }
- var d = this._position, a = d + l, c = this._bytes, f = 0;
- for (l = b._getResultBuffer(2 * l);d < a;) {
- var k = c[d++];
- if (127 >= k) {
- l[f++] = k;
- } else {
- if (192 <= k) {
- var r = 0;
- 224 > k ? r = (k & 31) << 6 | c[d++] & 63 : 240 > k ? r = (k & 15) << 12 | (c[d++] & 63) << 6 | c[d++] & 63 : (r = ((k & 7) << 18 | (c[d++] & 63) << 12 | (c[d++] & 63) << 6 | c[d++] & 63) - 65536, l[f++] = ((r & 1047552) >>> 10) + 55296, r = (r & 1023) + 56320);
- l[f++] = r;
- }
- }
- }
- this._position = d;
- return e.StringUtilities.fromCharCodeArray(l.subarray(0, f));
- };
- b._resultBuffer = new Int32Array(256);
- return b;
- }();
- b.AbcStream = t;
- })(b.ABC || (b.ABC = {}));
- })(e.AVM2 || (e.AVM2 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a, c, d) {
- void 0 === d && (d = 0);
- b.BytecodeFlags[a] = d;
- b.BytecodeFormat[a] = c;
- }
- function n() {
- h(1, "");
- h(2, "");
- h(3, "");
- h(4, "e");
- h(5, "e");
- h(6, "e");
- h(7, "");
- h(8, "e");
- h(9, "");
- h(10, "");
- h(11, "");
- h(12, "d");
- h(13, "d");
- h(14, "d");
- h(15, "d");
- h(16, "d");
- h(17, "d");
- h(18, "d");
- h(19, "d");
- h(20, "d");
- h(21, "d");
- h(22, "d");
- h(23, "d");
- h(24, "d");
- h(25, "d");
- h(26, "d");
- h(27, "");
- h(28, "");
- h(29, "");
- h(30, "");
- h(31, "");
- h(32, "");
- h(33, "");
- h(35, "");
- h(36, "b");
- h(37, "c");
- h(38, "");
- h(39, "");
- h(40, "");
- h(41, "");
- h(42, "");
- h(43, "");
- h(44, "e");
- h(45, "e");
- h(46, "e");
- h(47, "e");
- h(48, "");
- h(49, "e");
- h(50, "ee");
- h(53, "");
- h(54, "");
- h(55, "");
- h(56, "");
- h(57, "");
- h(58, "");
- h(59, "");
- h(60, "");
- h(61, "");
- h(62, "");
- h(64, "e");
- h(65, "e");
- h(66, "e");
- h(67, "ee");
- h(68, "ee");
- h(69, "ee");
- h(70, "ee");
- h(71, "");
- h(72, "");
- h(73, "e");
- h(74, "ee");
- h(75, "");
- h(76, "ee");
- h(77, "");
- h(78, "ee");
- h(79, "ee");
- h(80, "");
- h(81, "");
- h(82, "");
- h(83, "e");
- h(84, "");
- h(85, "e");
- h(86, "e");
- h(87, "");
- h(88, "e");
- h(89, "e");
- h(90, "e");
- h(93, "e");
- h(94, "e");
- h(95, "");
- h(96, "e");
- h(97, "e");
- h(98, "e");
- h(99, "e");
- h(100, "");
- h(101, "e");
- h(102, "e");
- h(103, "");
- h(104, "e");
- h(106, "e");
- h(108, "e");
- h(109, "e");
- h(110, "e");
- h(111, "e");
- h(112, "");
- h(113, "");
- h(114, "");
- h(115, "");
- h(116, "");
- h(117, "");
- h(118, "");
- h(119, "");
- h(120, "");
- h(121, "");
- h(122, "");
- h(123, "");
- h(128, "e");
- h(129, "");
- h(130, "");
- h(131, "");
- h(132, "");
- h(133, "");
- h(134, "e");
- h(135, "");
- h(136, "");
- h(137, "");
- h(144, "");
- h(145, "");
- h(146, "e");
- h(147, "");
- h(148, "e");
- h(149, "");
- h(150, "");
- h(151, "");
- h(160, "");
- h(161, "");
- h(162, "");
- h(163, "");
- h(164, "");
- h(165, "");
- h(166, "");
- h(167, "");
- h(168, "");
- h(169, "");
- h(170, "");
- h(171, "");
- h(172, "");
- h(173, "");
- h(174, "");
- h(175, "");
- h(176, "");
- h(177, "");
- h(178, "e");
- h(179, "");
- h(180, "");
- h(192, "");
- h(193, "");
- h(194, "e");
- h(195, "e");
- h(196, "");
- h(197, "");
- h(198, "");
- h(199, "");
- h(208, "");
- h(209, "");
- h(210, "");
- h(211, "");
- h(212, "");
- h(213, "");
- h(214, "");
- h(215, "");
- h(237, "");
- h(239, "aeae");
- h(240, "e");
- h(241, "e");
- h(242, "e");
- h(243, "");
- }
- var t = e.Debug.assert;
- new e.IndentingWriter;
- (function(a) {
- a[a.BKPT = 1] = "BKPT";
- a[a.NOP = 2] = "NOP";
- a[a.THROW = 3] = "THROW";
- a[a.GETSUPER = 4] = "GETSUPER";
- a[a.SETSUPER = 5] = "SETSUPER";
- a[a.DXNS = 6] = "DXNS";
- a[a.DXNSLATE = 7] = "DXNSLATE";
- a[a.KILL = 8] = "KILL";
- a[a.LABEL = 9] = "LABEL";
- a[a.LF32X4 = 10] = "LF32X4";
- a[a.SF32X4 = 11] = "SF32X4";
- a[a.IFNLT = 12] = "IFNLT";
- a[a.IFNLE = 13] = "IFNLE";
- a[a.IFNGT = 14] = "IFNGT";
- a[a.IFNGE = 15] = "IFNGE";
- a[a.JUMP = 16] = "JUMP";
- a[a.IFTRUE = 17] = "IFTRUE";
- a[a.IFFALSE = 18] = "IFFALSE";
- a[a.IFEQ = 19] = "IFEQ";
- a[a.IFNE = 20] = "IFNE";
- a[a.IFLT = 21] = "IFLT";
- a[a.IFLE = 22] = "IFLE";
- a[a.IFGT = 23] = "IFGT";
- a[a.IFGE = 24] = "IFGE";
- a[a.IFSTRICTEQ = 25] = "IFSTRICTEQ";
- a[a.IFSTRICTNE = 26] = "IFSTRICTNE";
- a[a.LOOKUPSWITCH = 27] = "LOOKUPSWITCH";
- a[a.PUSHWITH = 28] = "PUSHWITH";
- a[a.POPSCOPE = 29] = "POPSCOPE";
- a[a.NEXTNAME = 30] = "NEXTNAME";
- a[a.HASNEXT = 31] = "HASNEXT";
- a[a.PUSHNULL = 32] = "PUSHNULL";
- a[a.PUSHUNDEFINED = 33] = "PUSHUNDEFINED";
- a[a.PUSHFLOAT = 34] = "PUSHFLOAT";
- a[a.NEXTVALUE = 35] = "NEXTVALUE";
- a[a.PUSHBYTE = 36] = "PUSHBYTE";
- a[a.PUSHSHORT = 37] = "PUSHSHORT";
- a[a.PUSHTRUE = 38] = "PUSHTRUE";
- a[a.PUSHFALSE = 39] = "PUSHFALSE";
- a[a.PUSHNAN = 40] = "PUSHNAN";
- a[a.POP = 41] = "POP";
- a[a.DUP = 42] = "DUP";
- a[a.SWAP = 43] = "SWAP";
- a[a.PUSHSTRING = 44] = "PUSHSTRING";
- a[a.PUSHINT = 45] = "PUSHINT";
- a[a.PUSHUINT = 46] = "PUSHUINT";
- a[a.PUSHDOUBLE = 47] = "PUSHDOUBLE";
- a[a.PUSHSCOPE = 48] = "PUSHSCOPE";
- a[a.PUSHNAMESPACE = 49] = "PUSHNAMESPACE";
- a[a.HASNEXT2 = 50] = "HASNEXT2";
- a[a.LI8 = 53] = "LI8";
- a[a.LI16 = 54] = "LI16";
- a[a.LI32 = 55] = "LI32";
- a[a.LF32 = 56] = "LF32";
- a[a.LF64 = 57] = "LF64";
- a[a.SI8 = 58] = "SI8";
- a[a.SI16 = 59] = "SI16";
- a[a.SI32 = 60] = "SI32";
- a[a.SF32 = 61] = "SF32";
- a[a.SF64 = 62] = "SF64";
- a[a.NEWFUNCTION = 64] = "NEWFUNCTION";
- a[a.CALL = 65] = "CALL";
- a[a.CONSTRUCT = 66] = "CONSTRUCT";
- a[a.CALLMETHOD = 67] = "CALLMETHOD";
- a[a.CALLSTATIC = 68] = "CALLSTATIC";
- a[a.CALLSUPER = 69] = "CALLSUPER";
- a[a.CALLPROPERTY = 70] = "CALLPROPERTY";
- a[a.RETURNVOID = 71] = "RETURNVOID";
- a[a.RETURNVALUE = 72] = "RETURNVALUE";
- a[a.CONSTRUCTSUPER = 73] = "CONSTRUCTSUPER";
- a[a.CONSTRUCTPROP = 74] = "CONSTRUCTPROP";
- a[a.CALLSUPERID = 75] = "CALLSUPERID";
- a[a.CALLPROPLEX = 76] = "CALLPROPLEX";
- a[a.CALLINTERFACE = 77] = "CALLINTERFACE";
- a[a.CALLSUPERVOID = 78] = "CALLSUPERVOID";
- a[a.CALLPROPVOID = 79] = "CALLPROPVOID";
- a[a.SXI1 = 80] = "SXI1";
- a[a.SXI8 = 81] = "SXI8";
- a[a.SXI16 = 82] = "SXI16";
- a[a.APPLYTYPE = 83] = "APPLYTYPE";
- a[a.PUSHFLOAT4 = 84] = "PUSHFLOAT4";
- a[a.NEWOBJECT = 85] = "NEWOBJECT";
- a[a.NEWARRAY = 86] = "NEWARRAY";
- a[a.NEWACTIVATION = 87] = "NEWACTIVATION";
- a[a.NEWCLASS = 88] = "NEWCLASS";
- a[a.GETDESCENDANTS = 89] = "GETDESCENDANTS";
- a[a.NEWCATCH = 90] = "NEWCATCH";
- a[a.FINDPROPSTRICT = 93] = "FINDPROPSTRICT";
- a[a.FINDPROPERTY = 94] = "FINDPROPERTY";
- a[a.FINDDEF = 95] = "FINDDEF";
- a[a.GETLEX = 96] = "GETLEX";
- a[a.SETPROPERTY = 97] = "SETPROPERTY";
- a[a.GETLOCAL = 98] = "GETLOCAL";
- a[a.SETLOCAL = 99] = "SETLOCAL";
- a[a.GETGLOBALSCOPE = 100] = "GETGLOBALSCOPE";
- a[a.GETSCOPEOBJECT = 101] = "GETSCOPEOBJECT";
- a[a.GETPROPERTY = 102] = "GETPROPERTY";
- a[a.GETOUTERSCOPE = 103] = "GETOUTERSCOPE";
- a[a.INITPROPERTY = 104] = "INITPROPERTY";
- a[a.UNUSED_69 = 105] = "UNUSED_69";
- a[a.DELETEPROPERTY = 106] = "DELETEPROPERTY";
- a[a.UNUSED_6B = 107] = "UNUSED_6B";
- a[a.GETSLOT = 108] = "GETSLOT";
- a[a.SETSLOT = 109] = "SETSLOT";
- a[a.GETGLOBALSLOT = 110] = "GETGLOBALSLOT";
- a[a.SETGLOBALSLOT = 111] = "SETGLOBALSLOT";
- a[a.CONVERT_S = 112] = "CONVERT_S";
- a[a.ESC_XELEM = 113] = "ESC_XELEM";
- a[a.ESC_XATTR = 114] = "ESC_XATTR";
- a[a.CONVERT_I = 115] = "CONVERT_I";
- a[a.CONVERT_U = 116] = "CONVERT_U";
- a[a.CONVERT_D = 117] = "CONVERT_D";
- a[a.CONVERT_B = 118] = "CONVERT_B";
- a[a.CONVERT_O = 119] = "CONVERT_O";
- a[a.CHECKFILTER = 120] = "CHECKFILTER";
- a[a.CONVERT_F = 121] = "CONVERT_F";
- a[a.UNPLUS = 122] = "UNPLUS";
- a[a.CONVERT_F4 = 123] = "CONVERT_F4";
- a[a.BC_7C = 124] = "BC_7C";
- a[a.BC_7D = 125] = "BC_7D";
- a[a.BC_7E = 126] = "BC_7E";
- a[a.BC_7F = 127] = "BC_7F";
- a[a.COERCE = 128] = "COERCE";
- a[a.COERCE_B = 129] = "COERCE_B";
- a[a.COERCE_A = 130] = "COERCE_A";
- a[a.COERCE_I = 131] = "COERCE_I";
- a[a.COERCE_D = 132] = "COERCE_D";
- a[a.COERCE_S = 133] = "COERCE_S";
- a[a.ASTYPE = 134] = "ASTYPE";
- a[a.ASTYPELATE = 135] = "ASTYPELATE";
- a[a.COERCE_U = 136] = "COERCE_U";
- a[a.COERCE_O = 137] = "COERCE_O";
- a[a.NEGATE = 144] = "NEGATE";
- a[a.INCREMENT = 145] = "INCREMENT";
- a[a.INCLOCAL = 146] = "INCLOCAL";
- a[a.DECREMENT = 147] = "DECREMENT";
- a[a.DECLOCAL = 148] = "DECLOCAL";
- a[a.TYPEOF = 149] = "TYPEOF";
- a[a.NOT = 150] = "NOT";
- a[a.BITNOT = 151] = "BITNOT";
- a[a.UNUSED_98 = 152] = "UNUSED_98";
- a[a.UNUSED_99 = 153] = "UNUSED_99";
- a[a.UNUSED_9A = 154] = "UNUSED_9A";
- a[a.UNUSED_9B = 155] = "UNUSED_9B";
- a[a.UNUSED_9C = 156] = "UNUSED_9C";
- a[a.UNUSED_9D = 157] = "UNUSED_9D";
- a[a.UNUSED_9E = 158] = "UNUSED_9E";
- a[a.UNUSED_9F = 159] = "UNUSED_9F";
- a[a.ADD = 160] = "ADD";
- a[a.SUBTRACT = 161] = "SUBTRACT";
- a[a.MULTIPLY = 162] = "MULTIPLY";
- a[a.DIVIDE = 163] = "DIVIDE";
- a[a.MODULO = 164] = "MODULO";
- a[a.LSHIFT = 165] = "LSHIFT";
- a[a.RSHIFT = 166] = "RSHIFT";
- a[a.URSHIFT = 167] = "URSHIFT";
- a[a.BITAND = 168] = "BITAND";
- a[a.BITOR = 169] = "BITOR";
- a[a.BITXOR = 170] = "BITXOR";
- a[a.EQUALS = 171] = "EQUALS";
- a[a.STRICTEQUALS = 172] = "STRICTEQUALS";
- a[a.LESSTHAN = 173] = "LESSTHAN";
- a[a.LESSEQUALS = 174] = "LESSEQUALS";
- a[a.GREATERTHAN = 175] = "GREATERTHAN";
- a[a.GREATEREQUALS = 176] = "GREATEREQUALS";
- a[a.INSTANCEOF = 177] = "INSTANCEOF";
- a[a.ISTYPE = 178] = "ISTYPE";
- a[a.ISTYPELATE = 179] = "ISTYPELATE";
- a[a.IN = 180] = "IN";
- a[a.UNUSED_B5 = 181] = "UNUSED_B5";
- a[a.UNUSED_B6 = 182] = "UNUSED_B6";
- a[a.UNUSED_B7 = 183] = "UNUSED_B7";
- a[a.UNUSED_B8 = 184] = "UNUSED_B8";
- a[a.UNUSED_B9 = 185] = "UNUSED_B9";
- a[a.UNUSED_BA = 186] = "UNUSED_BA";
- a[a.UNUSED_BB = 187] = "UNUSED_BB";
- a[a.UNUSED_BC = 188] = "UNUSED_BC";
- a[a.UNUSED_BD = 189] = "UNUSED_BD";
- a[a.UNUSED_BE = 190] = "UNUSED_BE";
- a[a.UNUSED_BF = 191] = "UNUSED_BF";
- a[a.INCREMENT_I = 192] = "INCREMENT_I";
- a[a.DECREMENT_I = 193] = "DECREMENT_I";
- a[a.INCLOCAL_I = 194] = "INCLOCAL_I";
- a[a.DECLOCAL_I = 195] = "DECLOCAL_I";
- a[a.NEGATE_I = 196] = "NEGATE_I";
- a[a.ADD_I = 197] = "ADD_I";
- a[a.SUBTRACT_I = 198] = "SUBTRACT_I";
- a[a.MULTIPLY_I = 199] = "MULTIPLY_I";
- a[a.UNUSED_C8 = 200] = "UNUSED_C8";
- a[a.UNUSED_C9 = 201] = "UNUSED_C9";
- a[a.UNUSED_CA = 202] = "UNUSED_CA";
- a[a.UNUSED_CB = 203] = "UNUSED_CB";
- a[a.UNUSED_CC = 204] = "UNUSED_CC";
- a[a.UNUSED_CD = 205] = "UNUSED_CD";
- a[a.UNUSED_CE = 206] = "UNUSED_CE";
- a[a.UNUSED_CF = 207] = "UNUSED_CF";
- a[a.GETLOCAL0 = 208] = "GETLOCAL0";
- a[a.GETLOCAL1 = 209] = "GETLOCAL1";
- a[a.GETLOCAL2 = 210] = "GETLOCAL2";
- a[a.GETLOCAL3 = 211] = "GETLOCAL3";
- a[a.SETLOCAL0 = 212] = "SETLOCAL0";
- a[a.SETLOCAL1 = 213] = "SETLOCAL1";
- a[a.SETLOCAL2 = 214] = "SETLOCAL2";
- a[a.SETLOCAL3 = 215] = "SETLOCAL3";
- a[a.UNUSED_D8 = 216] = "UNUSED_D8";
- a[a.UNUSED_D9 = 217] = "UNUSED_D9";
- a[a.UNUSED_DA = 218] = "UNUSED_DA";
- a[a.UNUSED_DB = 219] = "UNUSED_DB";
- a[a.UNUSED_DC = 220] = "UNUSED_DC";
- a[a.UNUSED_DD = 221] = "UNUSED_DD";
- a[a.UNUSED_DE = 222] = "UNUSED_DE";
- a[a.UNUSED_DF = 223] = "UNUSED_DF";
- a[a.UNUSED_E0 = 224] = "UNUSED_E0";
- a[a.UNUSED_E1 = 225] = "UNUSED_E1";
- a[a.UNUSED_E2 = 226] = "UNUSED_E2";
- a[a.UNUSED_E3 = 227] = "UNUSED_E3";
- a[a.UNUSED_E4 = 228] = "UNUSED_E4";
- a[a.UNUSED_E5 = 229] = "UNUSED_E5";
- a[a.UNUSED_E6 = 230] = "UNUSED_E6";
- a[a.UNUSED_E7 = 231] = "UNUSED_E7";
- a[a.UNUSED_E8 = 232] = "UNUSED_E8";
- a[a.UNUSED_E9 = 233] = "UNUSED_E9";
- a[a.UNUSED_EA = 234] = "UNUSED_EA";
- a[a.UNUSED_EB = 235] = "UNUSED_EB";
- a[a.UNUSED_EC = 236] = "UNUSED_EC";
- a[a.UNUSED_ED = 237] = "UNUSED_ED";
- a[a.UNUSED_EE = 238] = "UNUSED_EE";
- a[a.INVALID = 237] = "INVALID";
- a[a.DEBUG = 239] = "DEBUG";
- a[a.DEBUGLINE = 240] = "DEBUGLINE";
- a[a.DEBUGFILE = 241] = "DEBUGFILE";
- a[a.BKPTLINE = 242] = "BKPTLINE";
- a[a.TIMESTAMP = 243] = "TIMESTAMP";
- a[a.RESTARGC = 244] = "RESTARGC";
- a[a.RESTARG = 245] = "RESTARG";
- a[a.UNUSED_F6 = 246] = "UNUSED_F6";
- a[a.UNUSED_F7 = 247] = "UNUSED_F7";
- a[a.UNUSED_F8 = 248] = "UNUSED_F8";
- a[a.UNUSED_F9 = 249] = "UNUSED_F9";
- a[a.UNUSED_FA = 250] = "UNUSED_FA";
- a[a.UNUSED_FB = 251] = "UNUSED_FB";
- a[a.UNUSED_FC = 252] = "UNUSED_FC";
- a[a.UNUSED_FD = 253] = "UNUSED_FD";
- a[a.UNUSED_FE = 254] = "UNUSED_FE";
- a[a.END = 255] = "END";
- })(b.Bytecode || (b.Bytecode = {}));
- var m = b.Bytecode, l;
- (function(a) {
- a[a.NONE = 0] = "NONE";
- a[a.STOP = 1] = "STOP";
- a[a.FALL_THROUGH = 2] = "FALL_THROUGH";
- a[a.BRANCH = 4] = "BRANCH";
- a[a.CAN_THROW = 8] = "CAN_THROW";
- a[a.RETURN = 16] = "RETURN";
- })(l || (l = {}));
- b.BytecodeFlags = new Uint32Array(256);
- b.BytecodeFormat = Array(256);
- b.defineBytecodes = n;
- n();
- var d = function() {
- function a() {
- }
- a.u8 = function(a, b) {
- return a[b];
- };
- a.s32 = function(a, b) {
- var d = a[b];
- d & 128 && (d = d & 127 | a[b + 1] << 7, d & 16384 && (d = d & 16383 | a[b + 2] << 14, d & 2097152 && (d = d & 2097151 | a[b + 3] << 21, d & 268435456 && (d = d & 268435455 | a[b + 4] << 28, d &= 4294967295))));
- return d;
- };
- a.u32 = function(b, d) {
- return a.s32(b, d) >>> 0;
- };
- a.u30 = function(b, d) {
- return a.u32(b, d);
- };
- a.s32Length = function(a, b) {
- var d = a[b];
- return d & 128 ? (d = d & 127 | a[b + 1] << 7, d & 16384 ? (d = d & 16383 | a[b + 2] << 14, d & 2097152 ? (d = d & 2097151 | a[b + 3] << 21, d & 268435456 ? 5 : 4) : 3) : 2) : 1;
- };
- return a;
- }();
- b.Bytes = d;
- (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";
- })(b.Sizes || (b.Sizes = {}));
- l = function() {
- function a(a) {
- this._code = a;
- this.setBCI(0);
- }
- a.prototype.next = function() {
- this.setBCI(this._nextBCI);
- };
- a.prototype.endBCI = function() {
- return this._code.length;
- };
- Object.defineProperty(a.prototype, "nextBCI", {get:function() {
- return this._nextBCI;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "currentBCI", {get:function() {
- return this._currentBCI;
- }, enumerable:!0, configurable:!0});
- a.prototype.currentBytecode = function() {
- return this._bytecode;
- };
- a.prototype.nextBC = function() {
- return d.u8(this._code, this._nextBCI);
- };
- a.prototype.setBCI = function(a) {
- this._currentBCI = a;
- if (this._currentBCI < this._code.length) {
- this._bytecode = d.u8(this._code, a);
- var f = this._code, k = 1, r = f[a];
- if (27 === r) {
- var k = k + 3, u = d.u30(f, a + k) + 1, k = k + d.s32Length(f, a + k), k = k + 3 * u
- } else {
- if (u = b.BytecodeFormat[r], "" !== u) {
- for (t(u, "OP: " + m[r] + " " + r), r = 0;r < u.length;r++) {
- switch(u[r].charCodeAt(0) - 97) {
- case 0:
- ;
- case 1:
- k += 1;
- continue;
- case 3:
- k += 3;
- continue;
- case 2:
- ;
- case 4:
- ;
- case 5:
- k += d.s32Length(f, a + k);
- }
- }
- }
- }
- this._nextBCI = a + k;
- } else {
- this._bytecode = 255, this._nextBCI = this._currentBCI;
- }
- };
- return a;
- }();
- b.BytecodeStream = l;
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- function h(a, c) {
- if (a.method) {
- return a.method;
- }
- var g = a.getMethodInfo(), d;
- g.flags & 32 ? (d = g.getNativeMetadata()) || a.holder instanceof w ? (d ? d = b.AS.getNative(d.getValueAt(0)) : (d = a.getName(), d = b.AS.getNative(d.uri + "." + d.name)), d = n(d, c.object.sec)) : d = b.AS.getMethodOrAccessorNative(a) : d = function() {
- return b.interpret(this === jsGlobal ? c.global.object : this, g, c, arguments, null);
- };
- a.method = d;
- d.methodInfo = g;
- d.methodInfo = g;
- return d;
- }
- function n(a, b) {
- return function() {
- switch(arguments.length) {
- case 0:
- return a(b);
- case 1:
- return a(b, arguments[0]);
- case 2:
- return a(b, arguments[0], arguments[1]);
- case 3:
- return a(b, arguments[0], arguments[1], arguments[2]);
- default:
- for (var c = [b], g = 0;g < arguments.length;g++) {
- c.push(arguments[g]);
- }
- return a.apply(this, c);
- }
- };
- }
- function t(a, b) {
- var c = a + b;
- return D[c] || (D[c] = new F(a, b, ""));
- }
- function m(a, b, c) {
- var g = a + b + c, d = D[g];
- d || (d = D[g] = new F(a, b, c));
- return d;
- }
- var l = e.Debug.assert, d = e.HashUtilities.hashBytesTo32BitsAdler, a = e.AVM2.ABC.AbcStream;
- new e.IndentingWriter;
- (function(a) {
- a[a.Undefined = 0] = "Undefined";
- a[a.Utf8 = 1] = "Utf8";
- a[a.Float = 2] = "Float";
- a[a.Int = 3] = "Int";
- a[a.UInt = 4] = "UInt";
- a[a.PrivateNs = 5] = "PrivateNs";
- a[a.Double = 6] = "Double";
- a[a.QName = 7] = "QName";
- a[a.Namespace = 8] = "Namespace";
- a[a.Multiname = 9] = "Multiname";
- a[a.False = 10] = "False";
- a[a.True = 11] = "True";
- a[a.Null = 12] = "Null";
- a[a.QNameA = 13] = "QNameA";
- a[a.MultinameA = 14] = "MultinameA";
- a[a.RTQName = 15] = "RTQName";
- a[a.RTQNameA = 16] = "RTQNameA";
- a[a.RTQNameL = 17] = "RTQNameL";
- a[a.RTQNameLA = 18] = "RTQNameLA";
- a[a.NameL = 19] = "NameL";
- a[a.NameLA = 20] = "NameLA";
- a[a.NamespaceSet = 21] = "NamespaceSet";
- a[a.PackageNamespace = 22] = "PackageNamespace";
- a[a.PackageInternalNs = 23] = "PackageInternalNs";
- a[a.ProtectedNamespace = 24] = "ProtectedNamespace";
- a[a.ExplicitNamespace = 25] = "ExplicitNamespace";
- a[a.StaticProtectedNs = 26] = "StaticProtectedNs";
- a[a.MultinameL = 27] = "MultinameL";
- a[a.MultinameLA = 28] = "MultinameLA";
- a[a.TypeName = 29] = "TypeName";
- a[a.ClassSealed = 1] = "ClassSealed";
- a[a.ClassFinal = 2] = "ClassFinal";
- a[a.ClassInterface = 4] = "ClassInterface";
- a[a.ClassProtectedNs = 8] = "ClassProtectedNs";
- })(b.CONSTANT || (b.CONSTANT = {}));
- var c = b.CONSTANT;
- (function(a) {
- a[a.NeedArguments = 1] = "NeedArguments";
- a[a.Activation = 2] = "Activation";
- a[a.NeedRest = 4] = "NeedRest";
- a[a.HasOptional = 8] = "HasOptional";
- a[a.IgnoreRest = 16] = "IgnoreRest";
- a[a.Native = 32] = "Native";
- a[a.Setsdxns = 64] = "Setsdxns";
- a[a.HasParamNames = 128] = "HasParamNames";
- a[a.HasBody = 256] = "HasBody";
- a[a.InstanceInitializer = 512] = "InstanceInitializer";
- a[a.ClassInitializer = 1024] = "ClassInitializer";
- a[a.ScriptInitializer = 2048] = "ScriptInitializer";
- })(b.METHOD || (b.METHOD = {}));
- (function(a) {
- a[a.Slot = 0] = "Slot";
- a[a.Method = 1] = "Method";
- a[a.Getter = 2] = "Getter";
- a[a.Setter = 3] = "Setter";
- a[a.Class = 4] = "Class";
- a[a.Function = 5] = "Function";
- a[a.Const = 6] = "Const";
- a[a.GetterSetter = 7] = "GetterSetter";
- })(b.TRAIT || (b.TRAIT = {}));
- var f = b.TRAIT;
- (function(a) {
- a[a.Final = 1] = "Final";
- a[a.Override = 2] = "Override";
- a[a.Metadata = 4] = "Metadata";
- })(b.ATTR || (b.ATTR = {}));
- (function(a) {
- a[a.Public = 0] = "Public";
- a[a.Protected = 1] = "Protected";
- a[a.PackageInternal = 2] = "PackageInternal";
- a[a.Private = 3] = "Private";
- a[a.Explicit = 4] = "Explicit";
- a[a.StaticProtected = 5] = "StaticProtected";
- })(b.NamespaceType || (b.NamespaceType = {}));
- var k = b.NamespaceType;
- (function(a) {
- a[a.CASEINSENSITIVE = 1] = "CASEINSENSITIVE";
- a[a.DESCENDING = 2] = "DESCENDING";
- a[a.UNIQUESORT = 4] = "UNIQUESORT";
- a[a.RETURNINDEXEDARRAY = 8] = "RETURNINDEXEDARRAY";
- a[a.NUMERIC = 16] = "NUMERIC";
- })(b.SORT || (b.SORT = {}));
- var r = function() {
- function a(b, c, g, d) {
- this.abc = b;
- this.name = c;
- this.keys = g;
- this.values = d;
- }
- a.prototype.getName = function() {
- "number" === typeof this.name && (this.name = this.abc.getString(this.name));
- return this.name;
- };
- a.prototype.getKeyAt = function(a) {
- return this.abc.getString(this.keys[a]);
- };
- a.prototype.getValueAt = function(a) {
- return this.abc.getString(this.values[a]);
- };
- a.prototype.getValue = function(a) {
- for (var b = 0;b < this.keys.length;b++) {
- if (this.abc.getString(this.keys[b]) === a) {
- return this.abc.getString(this.values[b]);
- }
- }
- return null;
- };
- return a;
- }();
- b.MetadataInfo = r;
- var u = function() {
- function a(b) {
- this.traits = b;
- this._resolved = !1;
- }
- a.prototype.resolve = function() {
- if (!this._resolved) {
- for (var a = 0;a < this.traits.length;a++) {
- this.traits[a].resolve();
- }
- this._resolved = !0;
- }
- };
- a.prototype.attachHolder = function(a) {
- for (var b = 0;b < this.traits.length;b++) {
- this.traits[b].holder = a;
- }
- };
- a.prototype.trace = function(a) {
- void 0 === a && (a = new e.IndentingWriter);
- this.resolve();
- this.traits.forEach(function(b) {
- return a.writeLn(b.toString());
- });
- };
- a.prototype.indexOf = function(a) {
- var b = a.name;
- a = a.namespaces;
- for (var c = this.traits, g = 0;g < c.length;g++) {
- var d = c[g].name;
- if (d.name === b) {
- for (var d = d.namespaces[0], f = 0;f < a.length;f++) {
- if (d === a[f]) {
- return g;
- }
- }
- }
- }
- return -1;
- };
- a.prototype.getTrait = function(a) {
- a = this.indexOf(a);
- return 0 <= a ? this.traits[a] : null;
- };
- a.prototype.resolveRuntimeTraits = function(a, b, c) {
- this.resolve();
- var d = Object.create(a ? a.protectedNsMappings : null);
- a = new g(a, b, d);
- for (b = 0;b < this.traits.length;b++) {
- var f = this.traits[b], k = f.name, d = new p(k, f.kind, f.abc);
- 1 === k.namespaces[0].type && (a.protectedNsMappings[k.name] && (d.name = a.protectedNsMappings[k.name].name), a.protectedNsMappings[k.name] = d);
- k = a.addTrait(d);
- switch(f.kind) {
- case 1:
- f = h(f, c);
- d.value = f;
- break;
- case 2:
- d.get = h(f, c);
- k && k.set && (d.set = k.set, d.kind = 7);
- break;
- case 3:
- d.set = h(f, c);
- k && k.get && (d.get = k.get, d.kind = 7);
- break;
- case 0:
- ;
- case 6:
- ;
- case 4:
- d.writable = !0, d.slot = f.slot, d.value = f.getDefaultValue(), d.typeName = f.typeName, a.addSlotTrait(d);
- }
- }
- return a;
- };
- return a;
- }();
- b.Traits = u;
- var q = function() {
- function a(b, c, g) {
- this.abc = b;
- this.kind = c;
- this.name = g;
- this.holder = this.metadata = null;
- }
- a.prototype.getMetadata = function() {
- if (!this.metadata) {
- return null;
- }
- if (this.metadata instanceof Uint32Array) {
- for (var a = Array(this.metadata.length), b = 0;b < this.metadata.length;b++) {
- a[b] = this.abc.getMetadataInfo(this.metadata[b]);
- }
- this.metadata = a;
- }
- return this.metadata;
- };
- a.prototype.getName = function() {
- return this.name;
- };
- a.prototype.resolve = function() {
- "number" === typeof this.name && (this.name = this.abc.getMultiname(this.name));
- };
- a.prototype.toString = function() {
- return f[this.kind] + " " + this.name;
- };
- a.prototype.toFlashlogString = function() {
- this.resolve();
- return this.getName().toFlashlogString();
- };
- a.prototype.isConst = function() {
- return 6 === this.kind;
- };
- a.prototype.isSlot = function() {
- return 0 === this.kind;
- };
- a.prototype.isMethod = function() {
- return 1 === this.kind;
- };
- a.prototype.isGetter = function() {
- return 2 === this.kind;
- };
- a.prototype.isSetter = function() {
- return 3 === this.kind;
- };
- a.prototype.isAccessor = function() {
- return 2 === this.kind || 3 === this.kind;
- };
- a.prototype.isMethodOrAccessor = function() {
- return this.isAccessor() || 1 === this.kind;
- };
- return a;
- }();
- b.TraitInfo = q;
- var g = function() {
- function a(b, c, g) {
- this.superTraits = b;
- this.protectedNs = c;
- this.protectedNsMappings = g;
- this.slots = [];
- this._nextSlotID = 1;
- c = this._traits = Object.create(null);
- if (b) {
- b = b._traits;
- for (var d in b) {
- c[d] = Object.create(b[d]);
- }
- }
- }
- a.prototype.addTrait = function(a) {
- var b = a.name, c = this._traits[b.name];
- c || (c = this._traits[b.name] = Object.create(null));
- var b = b.namespaces[0].mangledName, g = c[b];
- c[b] = a;
- return g;
- };
- a.prototype.addSlotTrait = function(a) {
- var b = a.slot;
- b ? this._nextSlotID = b + 1 : b = a.slot = this._nextSlotID++;
- this.slots[b] = a;
- };
- a.prototype.getTrait = function(a, b) {
- var c = this._traits[b];
- if (!c) {
- return null;
- }
- for (var g, d = 0;d < a.length;d++) {
- var f = a[d];
- if (g = c[f.mangledName]) {
- return g;
- }
- if (1 === f.type) {
- for (var p = this;p;) {
- if (p.protectedNs === f && (g = p.protectedNsMappings[b])) {
- return g;
- }
- p = p.superTraits;
- }
- }
- }
- return null;
- };
- a.prototype.getTraitsList = function() {
- var a = [], b = this._traits, c;
- for (c in b) {
- var g = b[c], d;
- for (d in g) {
- a.push(g[d]);
- }
- }
- return a;
- };
- a.prototype.getSlotPublicTraitNames = function() {
- for (var a = this.slots, b = [], c = 1;c < a.length;c++) {
- var g = a[c];
- g.name.namespace.isPublic() && b.push(g.name.name);
- }
- return b;
- };
- a.prototype.getSlot = function(a) {
- return this.slots[a];
- };
- return a;
- }();
- b.RuntimeTraits = g;
- var p = function() {
- function a(b, c, g) {
- this.name = b;
- this.kind = c;
- this.abc = g;
- this.configurable = !0;
- this._type = void 0;
- this.typeName = null;
- }
- a.prototype.getType = function() {
- if (void 0 !== this._type) {
- return this._type;
- }
- if (null === this.typeName) {
- return this._type = null;
- }
- var a = this.abc.applicationDomain.getClass(this.typeName);
- return this._type = a && a.axCoerce ? a : null;
- };
- return a;
- }();
- b.RuntimeTraitInfo = p;
- var v = {__proto__:null, $BgNumber:NaN, $Bgint:0, $Bguint:0, $BgBoolean:!1}, z = function(a) {
- function b(c, g, d, f, p, k, q) {
- a.call(this, c, g, d);
- this.slot = f;
- this.typeName = p;
- this.defaultValueKind = k;
- this.defaultValueIndex = q;
- }
- __extends(b, a);
- b.prototype.resolve = function() {
- a.prototype.resolve.call(this);
- "number" === typeof this.typeName && (this.typeName = this.abc.getMultiname(this.typeName));
- };
- b.prototype.getTypeName = function() {
- this.resolve();
- return this.typeName;
- };
- b.prototype.getDefaultValue = function() {
- if (-1 === this.defaultValueKind) {
- if (null === this.typeName) {
- return;
- }
- var a = v[this.typeName.getMangledName()];
- return void 0 === a ? null : a;
- }
- return this.abc.getConstant(this.defaultValueKind, this.defaultValueIndex);
- };
- return b;
- }(q);
- b.SlotTraitInfo = z;
- var B = function(a) {
- function b(c, g, d, f) {
- a.call(this, c, g, d);
- this.methodInfo = f;
- this.method = null;
- }
- __extends(b, a);
- b.prototype.getMethodInfo = function() {
- return this.methodInfo;
- };
- b.prototype.resolve = function() {
- a.prototype.resolve.call(this);
- "number" === typeof this.methodInfo && (this.methodInfo = this.abc.getMethodInfo(this.methodInfo));
- };
- return b;
- }(q);
- b.MethodTraitInfo = B;
- var E = function(a) {
- function b(c, g, d, f, p) {
- a.call(this, c, g, d, f, 0, 0, -1);
- this.classInfo = p;
- }
- __extends(b, a);
- return b;
- }(z);
- b.ClassTraitInfo = E;
- var A = function() {
- function a(b, c, g, d, f) {
- this.abc = b;
- this.type = c;
- this.name = g;
- this.optionalValueKind = d;
- this.optionalValueIndex = f;
- }
- a.prototype.getName = function() {
- "number" === typeof this.name && (this.name = this.abc.getString(this.name));
- return this.name;
- };
- a.prototype.getType = function() {
- "number" === typeof this.type && (this.type = this.abc.getMultiname(this.type));
- return this.type;
- };
- a.prototype.hasOptionalValue = function() {
- return 0 <= this.optionalValueKind;
- };
- a.prototype.getOptionalValue = function() {
- return this.abc.getConstant(this.optionalValueKind, this.optionalValueIndex);
- };
- a.prototype.toString = function() {
- var a = "", a = this.name ? a + this.getName() : a + "?";
- this.type && (a += ": " + this.getType().name);
- 0 <= this.optionalValueKind && (a += " = " + this.abc.getConstant(this.optionalValueKind, this.optionalValueIndex));
- return a;
- };
- return a;
- }();
- b.ParameterInfo = A;
- q = function() {
- return function() {
- };
- }();
- b.Info = q;
- var G = function(a) {
- function b(c, g, d, f, p, k, q, v) {
- a.call(this);
- this.abc = c;
- this.name = g;
- this.superName = d;
- this.flags = f;
- this.protectedNs = p;
- this.interfaceNameIndices = k;
- this.initializer = q;
- this.traits = v;
- this._interfaces = this.runtimeTraits = this.classInfo = null;
- }
- __extends(b, a);
- b.prototype.getInitializer = function() {
- "number" === typeof this.initializer && (this.initializer = this.abc.getMethodInfo(this.initializer));
- return this.initializer;
- };
- b.prototype.getName = function() {
- "number" === typeof this.name && (this.name = this.abc.getMultiname(this.name));
- return this.name;
- };
- b.prototype.getClassName = function() {
- var a = this.getName();
- return a.namespaces[0].uri ? a.namespaces[0].uri + "." + a.name : a.name;
- };
- b.prototype.getSuperName = function() {
- "number" === typeof this.superName && (this.superName = this.abc.getMultiname(this.superName));
- return this.superName;
- };
- b.prototype.getInterfaces = function(a) {
- if (this._interfaces) {
- return this._interfaces;
- }
- var b;
- (a = a.superClass) && (b = a.classInfo.instanceInfo.getInterfaces(a));
- var c = this._interfaces = new Set(b);
- for (b = 0;b < this.interfaceNameIndices.length;b++) {
- a = this.abc.getMultiname(this.interfaceNameIndices[b]), a = this.abc.applicationDomain.getClass(a), c.add(a), a.classInfo.instanceInfo.getInterfaces(a).forEach(function(a) {
- return c.add(a);
- });
- }
- return c;
- };
- b.prototype.toString = function() {
- return "InstanceInfo " + this.getName().name;
- };
- b.prototype.toFlashlogString = function() {
- return this.getName().toFlashlogString();
- };
- b.prototype.trace = function(a) {
- a.enter("InstanceInfo: " + this.getName());
- this.superName && a.writeLn("Super: " + this.getSuperName());
- this.traits.trace(a);
- a.outdent();
- };
- b.prototype.isInterface = function() {
- return !!(this.flags & 4);
- };
- b.prototype.isSealed = function() {
- return !!(this.flags & 1);
- };
- b.prototype.isFinal = function() {
- return !!(this.flags & 2);
- };
- return b;
- }(q);
- b.InstanceInfo = G;
- var w = function(a) {
- function b(c, g, d) {
- a.call(this);
- this.abc = c;
- this.initializer = g;
- this.traits = d;
- this.global = null;
- this.state = 0;
- }
- __extends(b, a);
- b.prototype.getInitializer = function() {
- return this.abc.getMethodInfo(this.initializer);
- };
- b.prototype.trace = function(a) {
- a.enter("ScriptInfo");
- this.traits.trace(a);
- a.outdent();
- };
- return b;
- }(q);
- b.ScriptInfo = w;
- var y = function(a) {
- function b(c, g, d, f) {
- a.call(this);
- this.abc = c;
- this.instanceInfo = g;
- this.initializer = d;
- this.traits = f;
- this.runtimeTraits = this.trait = null;
- }
- __extends(b, a);
- b.prototype.getNativeMetadata = function() {
- if (!this.trait) {
- return null;
- }
- var a = this.trait.getMetadata();
- if (!a) {
- return null;
- }
- for (var b = 0;b < a.length;b++) {
- if ("native" === a[b].getName()) {
- return a[b];
- }
- }
- return null;
- };
- b.prototype.getInitializer = function() {
- return "number" === typeof this.initializer ? this.initializer = this.abc.getMethodInfo(this.initializer) : this.initializer;
- };
- b.prototype.toString = function() {
- return "ClassInfo " + this.instanceInfo.getName();
- };
- b.prototype.trace = function(a) {
- a.enter("ClassInfo");
- this.traits.trace(a);
- a.outdent();
- };
- return b;
- }(q);
- b.ClassInfo = y;
- var C = function() {
- function a(b, c, g, d, f, p) {
- this.abc = b;
- this.start = c;
- this.end = g;
- this.target = d;
- this.type = f;
- this.varName = p;
- this._traits = this.catchPrototype = null;
- }
- a.prototype.getType = function() {
- "number" === typeof this.type && (this.type = this.abc.getMultiname(this.type));
- return this.type;
- };
- a.prototype.getTraits = function() {
- if (!this._traits) {
- var a = [];
- this.varName && a.push(new z(this.abc, 0, this.varName, 1, this.type, 0, 0));
- this._traits = new u(a);
- this._traits.resolve();
- }
- return this._traits;
- };
- return a;
- }();
- b.ExceptionInfo = C;
- var x = function(a) {
- function c(b, g, d, f, p, k, q) {
- a.call(this);
- this.maxStack = b;
- this.localCount = g;
- this.initScopeDepth = d;
- this.maxScopeDepth = f;
- this.code = p;
- this.catchBlocks = k;
- this.traits = q;
- this.activationPrototype = null;
- }
- __extends(c, a);
- c.prototype.trace = function(a) {
- a.writeLn("Code: " + this.code.length);
- for (var c = new b.BytecodeStream(this.code);255 !== c._bytecode;) {
- a.writeLn(c.currentBCI + ": " + b.Bytecode[c._bytecode]), c.next();
- }
- };
- return c;
- }(q);
- b.MethodBodyInfo = x;
- var M = function() {
- function a(b, c, g, d, f, p, k) {
- this.abc = b;
- this._index = c;
- this.name = g;
- this.returnTypeNameIndex = d;
- this.parameters = f;
- this.optionalCount = p;
- this.flags = k;
- this._body = this.trait = null;
- this.minArgs = f.length - p;
- }
- a.prototype.getNativeMetadata = function() {
- if (!this.trait) {
- return null;
- }
- var a = this.trait.getMetadata();
- if (!a) {
- return null;
- }
- for (var b = 0;b < a.length;b++) {
- if ("native" === a[b].getName()) {
- return a[b];
- }
- }
- return null;
- };
- a.prototype.getBody = function() {
- return this._body || (this._body = this.abc.getMethodBodyInfo(this._index));
- };
- a.prototype.getType = function() {
- if (void 0 !== this._returnType) {
- return this._returnType;
- }
- if (0 === this.returnTypeNameIndex) {
- this._returnType = null;
- } else {
- var a = this.abc.getMultiname(this.returnTypeNameIndex);
- this._returnType = this.abc.applicationDomain.getClass(a);
- }
- return this._returnType;
- };
- a.prototype.getName = function() {
- return this.name ? this.abc.getString(this.name) : this.trait ? this.trait.getName().name : "anonymous";
- };
- a.prototype.toString = function() {
- var a = "anonymous";
- this.name && (a = this.abc.getString(this.name));
- a += " (" + this.parameters.join(", ") + ")";
- this.returnTypeNameIndex && (a += ": " + this.abc.getMultiname(this.returnTypeNameIndex).name);
- return a;
- };
- a.prototype.toFlashlogString = function() {
- var a = this.trait, b = 2 === a.kind ? "get " : 3 === a.kind ? "set " : "", c = a.toFlashlogString(), a = a.holder, g;
- a && a instanceof G && (g = a.toFlashlogString(), b = g + "/" + b);
- a && a instanceof y && a.trait && (g = a.trait.toFlashlogString(), b = g + "$/" + b);
- var d;
- g && 0 < (d = c.indexOf("::")) && 0 === g.indexOf(c.substring(0, d + 2)) && (c = c.substring(d + 2));
- return "MTHD " + b + c + " ()";
- };
- a.prototype.isNative = function() {
- return !!(this.flags & 32);
- };
- a.prototype.needsRest = function() {
- return !!(this.flags & 4);
- };
- a.prototype.needsArguments = function() {
- return !!(this.flags & 1);
- };
- return a;
- }();
- b.MethodInfo = M;
- var I = function() {
- function a(b, c, g, d, f, p) {
- void 0 === p && (p = null);
- this.abc = b;
- this.index = c;
- this.kind = g;
- this.namespaces = d;
- this.name = f;
- this.parameterType = p;
- this.id = a._nextID++;
- this._mangledName = null;
- }
- a.FromFQNString = function(b, c) {
- var g = b.lastIndexOf("."), d = -1 === g ? "" : b.substr(0, g), g = -1 === g ? b : b.substr(g + 1), d = t(c, d);
- return new a(null, 0, 15, [d], g);
- };
- a.prototype._nameToString = function() {
- return this.isAnyName() ? "*" : this.isRuntimeName() ? "[" + this.name + "]" : this.name;
- };
- a.prototype.isRuntime = function() {
- switch(this.kind) {
- case 7:
- ;
- case 13:
- ;
- case 9:
- ;
- case 14:
- return !1;
- }
- return !0;
- };
- a.prototype.isRuntimeName = function() {
- switch(this.kind) {
- case 17:
- ;
- case 18:
- ;
- case 27:
- ;
- case 28:
- return !0;
- }
- return !1;
- };
- a.prototype.isRuntimeNamespace = function() {
- switch(this.kind) {
- case 15:
- ;
- case 16:
- ;
- case 17:
- ;
- case 18:
- return !0;
- }
- return !1;
- };
- a.prototype.isAnyName = function() {
- return null === this.name;
- };
- a.prototype.isAnyNamespace = function() {
- return this.isRuntimeNamespace() || 1 < this.namespaces.length ? !1 : 0 === this.namespaces.length || "" === this.namespaces[0].uri;
- };
- a.prototype.isQName = function() {
- var a = this.kind;
- return 29 === a || 7 === a || 13 === a || 15 <= a && 18 >= a;
- };
- Object.defineProperty(a.prototype, "namespace", {get:function() {
- return this.namespaces[0];
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "uri", {get:function() {
- return this.namespaces[0].uri;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "prefix", {get:function() {
- return this.namespaces[0].prefix;
- }, set:function(a) {
- var b = this.namespaces[0];
- b.prefix !== a && (this.namespaces[0] = m(b.type, b.uri, a));
- }, enumerable:!0, configurable:!0});
- a.prototype.equalsQName = function(a) {
- return this.name === a.name && this.namespaces[0].uri === a.namespaces[0].uri;
- };
- a.prototype.matches = function(a) {
- var b = a.isAnyName();
- if (b && !a.isQName()) {
- return !0;
- }
- if (!b && this.name !== a.name) {
- return !1;
- }
- for (var b = this.namespaces[0].uri, c = a.namespaces.length;c--;) {
- if (a.namespaces[c].uri === b) {
- return !0;
- }
- }
- return !1;
- };
- a.prototype.isAttribute = function() {
- switch(this.kind) {
- case 13:
- ;
- case 16:
- ;
- case 18:
- ;
- case 14:
- ;
- case 28:
- return !0;
- }
- return !1;
- };
- a.prototype.getMangledName = function() {
- return this._mangledName || this._mangleName();
- };
- a.prototype._mangleName = function() {
- var a = "$" + this.namespaces[0].mangledName + b.axCoerceString(this.name);
- this.isRuntime() || (this._mangledName = a);
- return a;
- };
- a.prototype.getPublicMangledName = function() {
- return e.isNumeric(this.name) ? this.name : "$Bg" + b.axCoerceString(this.name);
- };
- a.isPublicQualifiedName = function(a) {
- return 0 === a.indexOf("$Bg");
- };
- a.getPublicMangledName = function(a) {
- return e.isNumeric(a) ? a : "$Bg" + a;
- };
- a.prototype.toFQNString = function(a) {
- var b = this.namespaces[0].uri;
- b.length && (b += a ? "::" : ".");
- return b + this.name;
- };
- a.prototype.toString = function() {
- var a = c[this.kind] + " ", a = a + (this.isAttribute() ? "@" : "");
- if (this.isRuntimeNamespace()) {
- var b = this.namespaces ? this.namespaces.map(function(a) {
- return String(a);
- }).join(", ") : null, a = a + ("[" + b + "]::" + this._nameToString())
- } else {
- this.isQName() ? (a += this.namespaces[0] + "::", a += this._nameToString()) : (a += "{" + this.namespaces.map(function(a) {
- return String(a);
- }).join(", ") + "}", a += "::" + this._nameToString());
- }
- this.parameterType && (a += "<" + this.parameterType + ">");
- return a;
- };
- a.prototype.toFlashlogString = function() {
- var a = this.uri;
- return a ? a + "::" + this.name : this.name;
- };
- a.stripPublicMangledName = function(a) {
- if (0 === a.indexOf("$Bg")) {
- return a.substring(3);
- }
- };
- a.FromSimpleName = function(b) {
- var c = b.lastIndexOf(".");
- 0 >= c && (c = b.lastIndexOf(" "));
- var g = "", d;
- 0 < c && c < b.length - 1 ? (d = b.substring(c + 1).trim(), g = b.substring(0, c).trim()) : d = b;
- b = t(0, g);
- return new a(null, 0, 15, [b], d);
- };
- a._nextID = 1;
- return a;
- }();
- b.Multiname = I;
- var J = new Int32Array(100), F = function() {
- function a(b, c, g) {
- this.type = b;
- this.uri = c;
- this.prefix = g;
- this.mangledName = null;
- l(void 0 !== b);
- this.mangleName();
- }
- a.prototype.toString = function() {
- return k[this.type] + ("" !== this.uri ? ":" + this.uri : "");
- };
- a._hashNamespace = function(b, c, g) {
- c += "";
- g += "";
- var d = a._knownNames.indexOf(c);
- if (0 <= d) {
- return b << 2 | d;
- }
- var d = 1 + c.length + g.length, d = 101 > d ? J : new Int32Array(d), f = 0;
- d[f++] = b;
- for (b = 0;b < c.length;b++) {
- d[f++] = c.charCodeAt(b);
- }
- for (b = 0;b < g.length;b++) {
- d[f++] = g.charCodeAt(b);
- }
- return e.HashUtilities.hashBytesTo32BitsMD5(d, 0, f);
- };
- a.prototype.mangleName = function() {
- if (0 === this.type && "" === this.uri) {
- this.mangledName = "Bg";
- } else {
- var b = a._hashNamespace(this.type, this.uri, this.prefix);
- this.mangledName = e.StringUtilities.variableLengthEncodeInt32(b);
- }
- };
- a.prototype.isPublic = function() {
- return 0 === this.type;
- };
- Object.defineProperty(a.prototype, "reflectedURI", {get:function() {
- return this.uri || (0 === this.type ? null : this.uri);
- }, enumerable:!0, configurable:!0});
- a._knownNames = [""];
- return a;
- }();
- b.Namespace = F;
- var D = {};
- b.internNamespace = t;
- b.internPrefixedNamespace = m;
- F.PUBLIC = t(0, "");
- var H = function() {
- function c(b, g) {
- this._buffer = g;
- this.env = b;
- this._stream = new a(g);
- this.hash = d(g, 0, g.length);
- this._checkMagic();
- this._parseConstantPool();
- this._parseNamespaces();
- this._parseNamespaceSets();
- this._parseMultinames();
- this._parseMethodInfos();
- this._parseMetaData();
- this._parseInstanceAndClassInfos();
- this._parseScriptInfos();
- this._parseMethodBodyInfos();
- }
- Object.defineProperty(c.prototype, "applicationDomain", {get:function() {
- return this.env.app;
- }, enumerable:!0, configurable:!0});
- c.prototype._parseConstantPool = function() {
- this._parseNumericConstants();
- this._parseStringConstants();
- };
- c.prototype._parseNumericConstants = function() {
- var a = 0, b = this._stream, a = b.readU30(), c = new Int32Array(a);
- c[0] = 0;
- for (var g = 1;g < a;g++) {
- c[g] = b.readS32();
- }
- this.ints = c;
- a = b.readU30();
- c = new Uint32Array(a);
- c[0] = 0;
- for (g = 1;g < a;g++) {
- c[g] = b.readS32();
- }
- this.uints = c;
- a = b.readU30();
- c = new Float64Array(a);
- c[0] = NaN;
- for (g = 1;g < a;g++) {
- c[g] = b.readDouble();
- }
- this.doubles = c;
- };
- c.prototype._parseStringConstants = function() {
- var a = 0, b = this._stream, a = b.readU30();
- this._strings = Array(a);
- this._strings[0] = null;
- var c = this._stringOffsets = new Uint32Array(a);
- c[0] = -1;
- for (var g = 1;g < a;g++) {
- c[g] = b.position, b.advance(b.readU30());
- }
- };
- c.prototype._parseNamespaces = function() {
- var a = this._stream, b = a.readU30();
- this._namespaces = Array(b);
- var c = this._namespaceOffsets = new Uint32Array(b);
- c[0] = -1;
- for (var g = 1;g < b;g++) {
- c[g] = a.position, a.readU8(), a.readU30();
- }
- };
- c.prototype._parseNamespaceSets = function() {
- var a = this._stream, b = a.readU30();
- this._namespaceSets = Array(b);
- var c = this._namespaceSetOffsets = new Uint32Array(b);
- c[0] = -1;
- for (var g = 1;g < b;g++) {
- c[g] = a.position;
- for (var d = a.readU30(), f = 0;f < d;f++) {
- a.readU30();
- }
- }
- };
- c.prototype._consumeMultiname = function() {
- var a = this._stream, b = a.readU8();
- switch(b) {
- case 7:
- ;
- case 13:
- a.readU30();
- a.readU30();
- break;
- case 15:
- ;
- case 16:
- a.readU30();
- break;
- case 17:
- ;
- case 18:
- break;
- case 9:
- ;
- case 14:
- a.readU30();
- a.readU30();
- break;
- case 27:
- ;
- case 28:
- a.readU30();
- break;
- case 29:
- a.readU32();
- a.readU32();
- a.readU32();
- break;
- default:
- e.Debug.unexpected(b);
- }
- };
- c.prototype._parseMultinames = function() {
- var a = this._stream, b = a.readU30();
- this._multinames = Array(b);
- var c = this._multinameOffsets = new Uint32Array(b);
- c[0] = -1;
- for (var g = 1;g < b;g++) {
- c[g] = a.position, this._consumeMultiname();
- }
- };
- c.prototype._parseMultiname = function(a) {
- var b = this._stream, c = !1, g, d = !0, f = 0, p = b.readU8();
- switch(p) {
- case 7:
- ;
- case 13:
- g = b.readU30();
- d = !1;
- f = b.readU30();
- break;
- case 15:
- ;
- case 16:
- c = !0;
- f = b.readU30();
- break;
- case 17:
- ;
- case 18:
- c = !0;
- break;
- case 9:
- ;
- case 14:
- f = b.readU30();
- g = b.readU30();
- break;
- case 27:
- ;
- case 28:
- g = b.readU30();
- break;
- case 29:
- return c = b.readU32(), b.readU32(), b = this.getMultiname(b.readU32()), c = this.getMultiname(c), new I(this, a, p, c.namespaces, c.name, b);
- default:
- e.Debug.unexpected();
- }
- b = 0 === f ? null : this.getString(f);
- c = c ? null : d ? this.getNamespaceSet(g) : [this.getNamespace(g)];
- return new I(this, a, p, c, b);
- };
- c.prototype._checkMagic = function() {
- var a = this._stream.readWord();
- 3014671 > a && this.env.app.sec.throwError("VerifierError", b.Errors.InvalidMagicError, a >> 16, a & 65535);
- };
- c.prototype._checkForDuplicateStrings = function() {
- for (var a = [], b = 0;b < this._strings.length;b++) {
- a.push(this.getString(b));
- }
- a.sort();
- for (b = 0;b < a.length - 1;b++) {
- if (a[b] === a[b + 1]) {
- return !0;
- }
- }
- return !1;
- };
- c.prototype.getString = function(a) {
- var b = this._strings[a];
- if (void 0 === b) {
- b = this._stream;
- b.seek(this._stringOffsets[a]);
- var c = b.readU30(), b = this._strings[a] = b.readUTFString(c);
- }
- return b;
- };
- c.prototype.getMultiname = function(a) {
- (0 > a || a >= this._multinameOffsets.length) && this.applicationDomain.sec.throwError("VerifierError", b.Errors.CpoolIndexRangeError, a, this._multinameOffsets.length);
- if (0 === a) {
- return null;
- }
- var c = this._multinames[a];
- void 0 === c && (this._stream.seek(this._multinameOffsets[a]), c = this._multinames[a] = this._parseMultiname(a));
- return c;
- };
- c.prototype.getNamespace = function(a) {
- (0 > a || a >= this._namespaceOffsets.length) && this.applicationDomain.sec.throwError("VerifierError", b.Errors.CpoolIndexRangeError, a, this._namespaceOffsets.length);
- if (0 === a) {
- return F.PUBLIC;
- }
- var c = this._namespaces[a];
- if (void 0 !== c) {
- return c;
- }
- var g = this._stream;
- g.seek(this._namespaceOffsets[a]);
- var c = g.readU8(), g = (g = g.readU30()) ? this.getString(g) : void 0, d;
- switch(c) {
- case 8:
- ;
- case 22:
- d = 0;
- break;
- case 23:
- d = 2;
- break;
- case 24:
- d = 1;
- break;
- case 25:
- d = 4;
- break;
- case 26:
- d = 5;
- break;
- case 5:
- d = 3;
- break;
- default:
- this.applicationDomain.sec.throwError("VerifierError", b.Errors.CpoolEntryWrongTypeError, a);
- }
- g && 3 !== d || void 0 === g && (g = "");
- return c = this._namespaces[a] = t(d, g);
- };
- c.prototype.getNamespaceSet = function(a) {
- (0 > a || a >= this._namespaceSets.length) && this.applicationDomain.sec.throwError("VerifierError", b.Errors.CpoolIndexRangeError, a, this._namespaceSets.length);
- if (0 === a) {
- return null;
- }
- var c = this._namespaceSets[a];
- if (void 0 === c) {
- var g = this._stream, d = this._namespaceSetOffsets[a];
- g.seek(d);
- var f = g.readU30(), c = this._namespaceSets[a] = Array(f), d = g.position;
- for (a = 0;a < f;a++) {
- g.seek(d);
- var p = g.readU30(), d = g.position;
- c[a] = this.getNamespace(p);
- }
- }
- return c;
- };
- c.prototype._parseMethodInfos = function() {
- var a = this._stream, b = a.readU30();
- this._methods = Array(b);
- this._methodInfoOffsets = new Uint32Array(b);
- for (var c = 0;c < b;++c) {
- this._methodInfoOffsets[c] = a.position, this._consumeMethodInfo();
- }
- };
- c.prototype._consumeMethodInfo = function() {
- var a = this._stream, b = a.readU30();
- a.readU30();
- for (var c = 0;c < b;c++) {
- a.readU30();
- }
- a.readU30();
- var g = a.readU8();
- if (g & 8) {
- for (c = a.readU30(), c = b - c;c < b;c++) {
- a.readU30(), a.readU8();
- }
- }
- if (g & 128) {
- for (c = 0;c < b;c++) {
- a.readU30();
- }
- }
- };
- c.prototype._parseMethodInfo = function(a) {
- for (var b = this._stream, c = b.readU30(), g = b.readU30(), d = Array(c), f = 0;f < c;f++) {
- d[f] = new A(this, b.readU30(), 0, -1, -1);
- }
- var p = b.readU30(), k = b.readU8(), q = 0;
- if (k & 8) {
- for (q = b.readU30(), f = c - q;f < c;f++) {
- d[f].optionalValueIndex = b.readU30(), d[f].optionalValueKind = b.readU8();
- }
- }
- if (k & 128) {
- for (f = 0;f < c;f++) {
- d[f].name = b.readU30();
- }
- }
- return new M(this, a, p, g, d, q, k);
- };
- c.prototype.getMethodInfo = function(a) {
- var b = this._methods[a];
- void 0 === b && (this._stream.seek(this._methodInfoOffsets[a]), b = this._methods[a] = this._parseMethodInfo(a));
- return b;
- };
- c.prototype.getMethodBodyInfo = function(a) {
- return this._methodBodies[a];
- };
- c.prototype._parseMetaData = function() {
- var a = this._stream, b = a.readU30();
- this._metadata = Array(b);
- for (var c = this._metadataInfoOffsets = new Uint32Array(b), g = 0;g < b;g++) {
- c[g] = a.position;
- a.readU30();
- for (var d = a.readU30(), f = 0;f < d;f++) {
- a.readU30(), a.readU30();
- }
- }
- };
- c.prototype.getMetadataInfo = function(a) {
- var b = this._metadata[a];
- if (void 0 === b) {
- b = this._stream;
- b.seek(this._metadataInfoOffsets[a]);
- for (var c = b.readU30(), g = b.readU30(), d = new Uint32Array(g), f = 0;f < g;f++) {
- d[f] = b.readU30();
- }
- for (var p = new Uint32Array(g), f = 0;f < g;f++) {
- p[f] = b.readU30();
- }
- b = this._metadata[a] = new r(this, c, d, p);
- }
- return b;
- };
- c.prototype._parseInstanceAndClassInfos = function() {
- for (var a = this._stream, b = a.readU30(), c = this.instances = Array(b), g = 0;g < b;g++) {
- c[g] = this._parseInstanceInfo();
- }
- this._parseClassInfos(b);
- for (var d = a.position, g = 0;g < b;g++) {
- c[g].classInfo = this.classes[g];
- }
- a.seek(d);
- };
- c.prototype._parseInstanceInfo = function() {
- var a = this._stream, b = a.readU30(), c = a.readU30(), g = a.readU8(), d = 0;
- g & 8 && (d = a.readU30());
- for (var f = a.readU30(), p = [], k = 0;k < f;k++) {
- p[k] = a.readU30();
- }
- f = a.readU30();
- a = this._parseTraits();
- b = new G(this, b, c, g, d, p, f, a);
- a.attachHolder(b);
- return b;
- };
- c.prototype._parseTraits = function() {
- for (var a = this._stream.readU30(), b = [], c = 0;c < a;c++) {
- b.push(this._parseTrait());
- }
- return new u(b);
- };
- c.prototype._parseTrait = function() {
- var a = this._stream, c = a.readU30(), g = a.readU8(), d = g & 15, g = g >> 4 & 15, f;
- switch(d) {
- case 0:
- ;
- case 6:
- f = a.readU30();
- var p = a.readU30(), k = a.readU30(), q = -1;
- 0 !== k && (q = a.readU8());
- f = new z(this, d, c, f, p, q, k);
- break;
- case 1:
- ;
- case 2:
- ;
- case 3:
- a.readU30();
- f = a.readU30();
- p = a.position;
- f = this.getMethodInfo(f);
- f = f.trait = new B(this, d, c, f);
- a.seek(p);
- break;
- case 4:
- f = a.readU30();
- p = this.classes[a.readU30()];
- f = p.trait = new E(this, d, c, f, p);
- break;
- default:
- this.applicationDomain.sec.throwError("VerifierError", b.Errors.UnsupportedTraitsKindError, d);
- }
- if (g & 4) {
- c = a.readU30();
- d = new Uint32Array(c);
- for (g = 0;g < c;g++) {
- d[g] = a.readU30();
- }
- f.metadata = d;
- }
- return f;
- };
- c.prototype._parseClassInfos = function(a) {
- for (var b = this.classes = Array(a), c = 0;c < a;c++) {
- b[c] = this._parseClassInfo(c);
- }
- };
- c.prototype._parseClassInfo = function(a) {
- var b = this._stream.readU30(), c = this._parseTraits();
- a = new y(this, this.instances[a], b, c);
- c.attachHolder(a);
- return a;
- };
- c.prototype._parseScriptInfos = function() {
- for (var a = this._stream.readU30(), b = this.scripts = Array(a), c = 0;c < a;c++) {
- b[c] = this._parseScriptInfo();
- }
- };
- c.prototype._parseScriptInfo = function() {
- var a = this._stream.readU30(), b = this._parseTraits(), a = new w(this, a, b);
- b.attachHolder(a);
- return a;
- };
- c.prototype._parseMethodBodyInfos = function() {
- for (var a = this._stream, b = this._methodBodies = Array(this._methods.length), c = a.readU30(), g = 0;g < c;g++) {
- for (var d = a.readU30(), f = a.readU30(), p = a.readU30(), k = a.readU30(), q = a.readU30(), v = a.viewU8s(a.readU30()), r = a.readU30(), u = Array(r), l = 0;l < r;++l) {
- u[l] = this._parseException();
- }
- r = this._parseTraits();
- b[d] = new x(f, p, k, q, v, u, r);
- r.attachHolder(b[d]);
- }
- };
- c.prototype._parseException = function() {
- var a = this._stream, b = a.readU30(), c = a.readU30(), g = a.readU30(), d = a.readU30(), a = a.readU30();
- return new C(this, b, c, g, d, a);
- };
- c.prototype.getConstant = function(a, b) {
- switch(a) {
- case 3:
- return this.ints[b];
- case 4:
- return this.uints[b];
- case 6:
- return this.doubles[b];
- case 1:
- return this.getString(b);
- case 11:
- return !0;
- case 10:
- return !1;
- case 12:
- return null;
- case 8:
- ;
- case 23:
- return this.getNamespace(b);
- case 7:
- ;
- case 14:
- ;
- case 15:
- ;
- case 16:
- ;
- case 17:
- ;
- case 18:
- ;
- case 19:
- ;
- case 20:
- return this.getMultiname(b);
- case 2:
- e.Debug.warning("TODO: CONSTANT.Float may be deprecated?");
- }
- };
- c.prototype.stress = function() {
- for (var a = 0;a < this._multinames.length;a++) {
- this.getMultiname(a);
- }
- for (a = 0;a < this._namespaceSets.length;a++) {
- this.getNamespaceSet(a);
- }
- for (a = 0;a < this._namespaces.length;a++) {
- this.getNamespace(a);
- }
- for (a = 0;a < this._strings.length;a++) {
- this.getString(a);
- }
- };
- c.prototype.trace = function(a) {
- a.writeLn("Multinames: " + this._multinames.length);
- a.indent();
- for (var b = 0;b < this._multinames.length;b++) {
- a.writeLn(b + " " + this.getMultiname(b));
- }
- a.outdent();
- a.writeLn("Namespace Sets: " + this._namespaceSets.length);
- a.indent();
- for (b = 0;b < this._namespaceSets.length;b++) {
- a.writeLn(b + " " + this.getNamespaceSet(b));
- }
- a.outdent();
- a.writeLn("Namespaces: " + this._namespaces.length);
- a.indent();
- for (b = 0;b < this._namespaces.length;b++) {
- a.writeLn(b + " " + this.getNamespace(b));
- }
- a.outdent();
- a.writeLn("Strings: " + this._strings.length);
- a.indent();
- for (b = 0;b < this._strings.length;b++) {
- a.writeLn(b + " " + this.getString(b));
- }
- a.outdent();
- a.writeLn("MethodInfos: " + this._methods.length);
- a.indent();
- for (b = 0;b < this._methods.length;b++) {
- a.writeLn(b + " " + this.getMethodInfo(b)), this._methodBodies[b] && this._methodBodies[b].trace(a);
- }
- a.outdent();
- a.writeLn("InstanceInfos: " + this.instances.length);
- a.indent();
- for (b = 0;b < this.instances.length;b++) {
- a.writeLn(b + " " + this.instances[b]), this.instances[b].trace(a);
- }
- a.outdent();
- a.writeLn("ClassInfos: " + this.classes.length);
- a.indent();
- for (b = 0;b < this.classes.length;b++) {
- this.classes[b].trace(a);
- }
- a.outdent();
- a.writeLn("ScriptInfos: " + this.scripts.length);
- a.indent();
- for (b = 0;b < this.scripts.length;b++) {
- this.scripts[b].trace(a);
- }
- a.outdent();
- };
- return c;
- }();
- b.ABCFile = H;
- q = function() {
- function a(b, c, g) {
- this.app = b;
- this.map = e.ObjectUtilities.createMap();
- this.abcs = c;
- this.scripts = e.ObjectUtilities.createMap();
- for (b = 0;b < g.length;b++) {
- c = g[b];
- this.scripts[c.name] = c;
- for (var d = 0;d < c.defs.length;d++) {
- var f = c.defs[d].split(":"), p = this.map[f[1]];
- p || (p = this.map[f[1]] = Object.create(null));
- p[f[0]] = c.name;
- }
- }
- }
- a.prototype.getABCByScriptName = function(a) {
- var b = this.scripts[a];
- return b ? new H({url:a, app:this.app}, this.abcs.subarray(b.offset, b.offset + b.length)) : null;
- };
- a.prototype.getABCByMultiname = function(a) {
- var b = this.map[a.name];
- if (!b) {
- return null;
- }
- a = a.namespaces;
- for (var c = 0;c < a.length;c++) {
- var g = b[a[c].uri];
- if (g) {
- return this.getABCByScriptName(g);
- }
- }
- return null;
- };
- return a;
- }();
- b.ABCCatalog = q;
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a, c, d) {
- d.id = c.id;
- d.kind = c.kind;
- if (c.isRuntimeName()) {
- var k = a.pop();
- if (k && k.axClass && k.axClass === k.sec.AXQName) {
- k = k.name;
- d.kind = c.isAttribute() ? 18 : 17;
- d.id = k.id;
- d.name = k.name;
- d.namespaces = k.namespaces;
- return;
- }
- d.name = k;
- d.id = -1;
- } else {
- d.name = c.name;
- }
- c.isRuntimeNamespace() ? (a = a.pop(), a._ns && (a = a._ns), d.namespaces = [a], d.id = -1) : d.namespaces = c.namespaces;
- b.interpreterWriter && b.interpreterWriter.greenLn("Name: " + d.name);
- }
- function n(a, c, d, k, r, u, q, g, p) {
- var v = c instanceof Error && "string" === typeof c.name && "string" === typeof c.message;
- if (v) {
- if (c instanceof RangeError || "InternalError" === c.name) {
- var l = Object.create(a.AXError.tPrototype);
- l._errorID = 1023;
- if ("allocation size overflow" === c.message) {
- return l.$Bgmessage = "allocation size overflow", l;
- }
- if (-1 < c.message.indexOf("recursion") || -1 < c.message.indexOf("call stack size exceeded")) {
- return l.$Bgmessage = "Stack overflow occurred", b.scopeStacks.length = p, l;
- }
- } else {
- if (c instanceof TypeError) {
- if (-1 < c.message.indexOf("convert") && (-1 < c.message.indexOf("to primitive") || -1 < c.message.indexOf("to string"))) {
- return a.createError("TypeError", b.Errors.ConvertToPrimitiveError, "value");
- }
- if ("Conversion to Array failed" === c.message) {
- return a.createError("TypeError", b.Errors.CheckTypeFailedError, "value", "Array");
- }
- }
- }
- }
- p = !1;
- switch(d) {
- case 65:
- if (!k || !k.axApply) {
- return a.createError("TypeError", b.Errors.CallOfNonFunctionError, "value");
- }
- break;
- case 66:
- if (!r || !r.axConstruct) {
- return a.createError("TypeError", b.Errors.ConstructOfNonFunctionError);
- }
- break;
- case 88:
- if (!k || !a.AXClass.axIsType(k)) {
- return a.createError("VerifyError", b.Errors.InvalidBaseClassError);
- }
- break;
- case 78:
- ;
- case 73:
- p = !0;
- case 70:
- ;
- case 79:
- ;
- case 76:
- ;
- case 74:
- ;
- case 69:
- if (null === r) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- if (void 0 === r) {
- return a.createError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- }
- if (!(r.axResolveMultiname(g) in r)) {
- return c = p ? r.axClass.superClass : r.axClass, c.classInfo.instanceInfo.isSealed() ? a.createError("ReferenceError", b.Errors.ReadSealedError, g.name, c.name.toFQNString(!1)) : a.createError("TypeError", p ? b.Errors.ConstructOfNonFunctionError : b.Errors.CallOfNonFunctionError, g.name);
- }
- if (v && "RangeError" === c.name && (-1 < c.message.indexOf("arguments array passed") || -1 < c.message.indexOf("call stack size"))) {
- return a.createError("RangeError", b.Errors.StackOverflowError);
- }
- break;
- case 4:
- ;
- case 102:
- if (null === r) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- if (void 0 === r) {
- return a.createError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- }
- break;
- case 104:
- ;
- case 97:
- if (null === r) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- if (void 0 === r) {
- return a.createError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- }
- g = r.axResolveMultiname(g);
- if (g in r && !1 === m(r, g).writable) {
- return a.createError("ReferenceError", b.Errors.ConstWriteError, g, r.axClass.name.name);
- }
- break;
- case 177:
- if (!r || !r.axIsInstanceOf) {
- return a.createError("TypeError", b.Errors.CantUseInstanceofOnNonObjectError);
- }
- break;
- case 134:
- ;
- case 135:
- if (r && !r.axAsType) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- ;
- case 178:
- ;
- case 179:
- if (null === r) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- if (void 0 === r) {
- return a.createError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- }
- if (!r.axIsType) {
- return a.createError("TypeError", b.Errors.IsTypeMustBeClassError);
- }
- break;
- case 128:
- if (!r) {
- return a.createError("ReferenceError", b.Errors.ClassNotFoundError, g.toFQNString(!1));
- }
- break;
- case 180:
- if (null === r) {
- return a.createError("TypeError", b.Errors.ConvertNullToObjectError);
- }
- if (void 0 === r) {
- return a.createError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- }
- break;
- case 19:
- ;
- case 20:
- ;
- case 171:
- if (typeof u !== typeof q && ("object" === typeof u && u && "object" !== typeof q || "object" === typeof q && q && "object" !== typeof u)) {
- return a.createError("TypeError", b.Errors.ConvertToPrimitiveError, "Object");
- }
- break;
- default:
- if (!c || "string" !== typeof c.message || "string" !== typeof c.stack || "string" !== typeof c.name) {
- break;
- }
- var h = c.stack.split("\n");
- r = 0 === h[0].indexOf("at ") ? h[0].substr(3) : h[0];
- switch(c.name) {
- case "TypeError":
- if (0 === r.indexOf("AXBasePrototype_valueOf") || 0 === r.indexOf("AXBasePrototype_toString")) {
- return a.createError("TypeError", b.Errors.CallOfNonFunctionError, "value");
- }
- ;
- }
- ;
- }
- d = "Uncaught VM-internal exception during op " + b.Bytecode[d] + ": ";
- try {
- d += c.toString(), h = c.stack;
- } catch (e) {
- d += "[Failed to stringify exception]";
- }
- console.error(d, "\n", h);
- return a.createError("Error", b.Errors.InternalErrorIV);
- }
- var t = e.ArrayUtilities.popManyInto, m = e.ObjectUtilities.getPropertyDescriptor, l = function() {
- function a(a) {
- this.parent = a;
- this.stack = [];
- this.isWith = [];
- }
- a.prototype.push = function(a, b) {
- this.stack.push(a);
- this.isWith.push(!!b);
- };
- a.prototype.get = function(a) {
- return this.stack[a];
- };
- a.prototype.clear = function() {
- this.stack.length = 0;
- this.isWith.length = 0;
- };
- a.prototype.pop = function() {
- this.isWith.pop();
- this.stack.pop();
- this.scopes && this.scopes.length > this.stack.length && this.scopes.length--;
- };
- a.prototype.topScope = function() {
- if (!this.scopes) {
- if (0 === this.stack.length) {
- return this.parent;
- }
- this.scopes = [];
- }
- for (var a = this.parent, d = 0;d < this.stack.length;d++) {
- var k = this.stack[d], r = this.isWith[d], u = this.scopes[d];
- u && u.parent === a && u.object === k && u.isWith === r || (u = this.scopes[d] = new b.Scope(a, k, r));
- a = u;
- }
- return a;
- };
- return a;
- }();
- b.ScopeStack = l;
- b.interpret = function(a, c, f, k, r) {
- b.executionWriter && b.executionWriter.enter("> " + c);
- try {
- var u;
- a: {
- var q = new d(a, c, f, k, r), g = q.stack, p = q.locals, v = q.scopes, l = q.sec, B = c.abc, m = new b.Multiname(B, 0, null, null, null), A, G, w, y, C, x, M, I;
- a = [];
- k = 0;
- var J = b.scopeStacks.length;
- b.scopeStacks.push(q.scopes);
- b: for (;;) {
- try {
- var F = q.bc();
- switch(F) {
- case 9:
- continue;
- case 3:
- throw g.pop();;
- case 8:
- p[q.u30()] = void 0;
- break;
- case 12:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y < C || (q.pc += x);
- continue;
- case 24:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y >= C && (q.pc += x);
- continue;
- case 13:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y <= C || (q.pc += x);
- continue;
- case 23:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y > C && (q.pc += x);
- continue;
- case 14:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y > C || (q.pc += x);
- continue;
- case 22:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y <= C && (q.pc += x);
- continue;
- case 15:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y >= C || (q.pc += x);
- continue;
- case 21:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y < C && (q.pc += x);
- continue;
- case 16:
- q.pc = q.s24() + q.pc;
- continue;
- case 17:
- x = q.s24();
- g.pop() && (q.pc += x);
- continue;
- case 18:
- x = q.s24();
- g.pop() || (q.pc += x);
- continue;
- case 19:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- b.axEquals(y, C, l) && (q.pc += x);
- continue;
- case 20:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- b.axEquals(y, C, l) || (q.pc += x);
- continue;
- case 25:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y === C && (q.pc += x);
- continue;
- case 26:
- C = g.pop();
- y = g.pop();
- x = q.s24();
- y !== C && (q.pc += x);
- continue;
- case 27:
- var D = q.pc - 1;
- x = q.s24();
- var H = q.u30();
- M = g.pop();
- M <= H && (q.pc += 3 * M, x = q.s24());
- q.pc = D + x;
- continue;
- case 29:
- v.pop();
- break;
- case 30:
- M = g.pop();
- w = l.box(q.peekStack());
- g[g.length - 1] = w.axNextName(M);
- break;
- case 35:
- M = g.pop();
- w = l.box(q.peekStack());
- g[g.length - 1] = w.axNextValue(M);
- break;
- case 50:
- var K = q.getHasNext2Info(), O = q.u30(), S = q.u30();
- K.next(l.box(p[O]), p[S]);
- p[O] = K.object;
- p[S] = K.index;
- g.push(!!K.index);
- break;
- case 32:
- g.push(null);
- break;
- case 33:
- g.push(void 0);
- break;
- case 36:
- g.push(q.code[q.pc++] << 24 >> 24);
- break;
- case 37:
- g.push(q.u30() << 16 >> 16);
- break;
- case 44:
- g.push(B.getString(q.u30()));
- break;
- case 45:
- g.push(B.ints[q.u30()]);
- break;
- case 46:
- g.push(B.uints[q.u30()]);
- break;
- case 47:
- g.push(B.doubles[q.u30()]);
- break;
- case 38:
- g.push(!0);
- break;
- case 39:
- g.push(!1);
- break;
- case 40:
- g.push(NaN);
- break;
- case 41:
- g.pop();
- break;
- case 42:
- g.push(g[g.length - 1]);
- break;
- case 43:
- A = g[g.length - 1];
- g[g.length - 1] = g[g.length - 2];
- g[g.length - 2] = A;
- break;
- case 48:
- v.push(l.box(g.pop()), !1);
- break;
- case 28:
- v.push(l.box(g.pop()), !0);
- break;
- case 49:
- g.push(l.AXNamespace.FromNamespace(B.getNamespace(q.u30())));
- break;
- case 64:
- g.push(l.createFunction(B.getMethodInfo(q.u30()), v.topScope(), !0));
- break;
- case 65:
- t(g, q.u30(), a);
- G = g.pop();
- A = g[g.length - 1];
- b.validateCall(l, A, a.length);
- g[g.length - 1] = A.axApply(G, a);
- break;
- case 66:
- t(g, q.u30(), a);
- w = l.box(q.peekStack());
- b.validateConstruct(l, w, a.length);
- g[g.length - 1] = w.axConstruct(a);
- break;
- case 71:
- b.scopeStacks.length--;
- u = void 0;
- break a;
- case 72:
- A = g.pop();
- c.returnTypeNameIndex && (w = c.getType()) && (A = w.axCoerce(A));
- b.scopeStacks.length--;
- u = A;
- break a;
- case 73:
- t(g, q.u30(), a);
- f.object.superClass.tPrototype.axInitializer.apply(g.pop(), a);
- break;
- case 74:
- M = q.u30();
- t(g, q.u30(), a);
- h(g, B.getMultiname(M), m);
- w = l.box(q.peekStack());
- g[g.length - 1] = w.axConstructProperty(m, a);
- break;
- case 76:
- ;
- case 70:
- ;
- case 79:
- M = q.u30();
- k = q.u30();
- t(g, k, a);
- h(g, B.getMultiname(M), m);
- w = l.box(g[g.length - 1]);
- I = w.axCallProperty(m, a, 76 === F);
- 79 === F ? g.length-- : g[g.length - 1] = I;
- break;
- case 69:
- ;
- case 78:
- M = q.u30();
- k = q.u30();
- t(g, k, a);
- h(g, B.getMultiname(M), m);
- w = l.box(g[g.length - 1]);
- I = w.axCallSuper(m, f, a);
- 78 === F ? g.length-- : g[g.length - 1] = I;
- break;
- case 83:
- t(g, q.u30(), a);
- g[g.length - 1] = l.applyType(g[g.length - 1], a);
- break;
- case 85:
- G = Object.create(l.AXObject.tPrototype);
- k = q.u30();
- for (var P = g.length - 2 * k;P < g.length;P += 2) {
- A = g[P + 1], G.axSetPublicProperty(g[P], A);
- }
- g.length -= 2 * k;
- g.push(G);
- break;
- case 86:
- G = [];
- k = q.u30();
- for (P = g.length - k;P < g.length;P++) {
- G.push(g[P]);
- }
- g.length -= k;
- g.push(l.AXArray.axBox(G));
- break;
- case 87:
- g.push(l.createActivation(c, v.topScope()));
- break;
- case 88:
- A = g[g.length - 1];
- g[g.length - 1] = l.createClass(B.classes[q.u30()], A, v.topScope());
- break;
- case 89:
- h(g, B.getMultiname(q.u30()), m);
- void 0 === m.name && (m.name = "*");
- I = b.axGetDescendants(g[g.length - 1], m, l);
- g[g.length - 1] = I;
- break;
- case 90:
- g.push(l.createCatch(q.body.catchBlocks[q.u30()], v.topScope()));
- break;
- case 94:
- ;
- case 93:
- h(g, B.getMultiname(q.u30()), m);
- g.push(v.topScope().findScopeProperty(m, 93 === F, !1));
- break;
- case 96:
- h(g, B.getMultiname(q.u30()), m);
- G = v.topScope().findScopeProperty(m, !0, !1);
- I = G.axGetProperty(m);
- g.push(I);
- break;
- case 104:
- ;
- case 97:
- A = g.pop();
- h(g, B.getMultiname(q.u30()), m);
- w = l.box(g.pop());
- w.axSetProperty(m, A, 104, c);
- break;
- case 102:
- h(g, B.getMultiname(q.u30()), m);
- w = l.box(q.peekStack());
- I = w.axGetProperty(m);
- g[g.length - 1] = I;
- break;
- case 106:
- h(g, B.getMultiname(q.u30()), m);
- w = l.box(q.peekStack());
- g[g.length - 1] = w.axDeleteProperty(m);
- break;
- case 4:
- h(g, B.getMultiname(q.u30()), m);
- w = l.box(q.peekStack());
- I = w.axGetSuper(m, f);
- g[g.length - 1] = I;
- break;
- case 5:
- A = g.pop();
- h(g, B.getMultiname(q.u30()), m);
- w = l.box(g.pop());
- w.axSetSuper(m, f, A);
- break;
- case 98:
- g.push(p[q.u30()]);
- break;
- case 99:
- p[q.u30()] = g.pop();
- break;
- case 100:
- g.push(f.global.object);
- break;
- case 101:
- g.push(v.get(q.code[q.pc++]));
- break;
- case 108:
- w = l.box(q.peekStack());
- I = w.axGetSlot(q.u30());
- g[g.length - 1] = I;
- break;
- case 109:
- A = g.pop();
- w = l.box(g.pop());
- w.axSetSlot(q.u30(), A);
- break;
- case 110:
- I = f.global.object.axGetSlot(q.u30());
- g[g.length - 1] = I;
- break;
- case 111:
- A = g.pop();
- f.global.object.axSetSlot(q.u30(), A);
- break;
- case 114:
- g[g.length - 1] = b.AS.escapeAttributeValue(g[g.length - 1]);
- break;
- case 113:
- g[g.length - 1] = b.AS.escapeElementValue(g[g.length - 1]);
- break;
- case 131:
- ;
- case 115:
- g[g.length - 1] |= 0;
- break;
- case 136:
- ;
- case 116:
- g[g.length - 1] >>>= 0;
- break;
- case 132:
- ;
- case 117:
- g[g.length - 1] = +g[g.length - 1];
- break;
- case 129:
- ;
- case 118:
- g[g.length - 1] = !!g[g.length - 1];
- break;
- case 133:
- g[g.length - 1] = b.axCoerceString(g[g.length - 1]);
- break;
- case 112:
- g[g.length - 1] = b.axConvertString(g[g.length - 1]);
- break;
- case 120:
- g[g.length - 1] = b.axCheckFilter(l, g[g.length - 1]);
- break;
- case 128:
- h(g, B.getMultiname(q.u30()), m);
- w = v.topScope().getScopeProperty(m, !0, !1);
- g[g.length - 1] = w.axCoerce(g[g.length - 1]);
- break;
- case 130:
- break;
- case 134:
- h(g, B.getMultiname(q.u30()), m);
- w = v.topScope().getScopeProperty(m, !0, !1);
- g[g.length - 2] = w.axAsType(g[g.length - 1]);
- break;
- case 135:
- w = g.pop();
- g[g.length - 1] = w.axAsType(g[g.length - 1]);
- break;
- case 137:
- G = g[g.length - 1];
- g[g.length - 1] = void 0 == G ? null : G;
- break;
- case 144:
- g[g.length - 1] = -g[g.length - 1];
- break;
- case 145:
- ++g[g.length - 1];
- break;
- case 146:
- ++p[q.u30()];
- break;
- case 147:
- --g[g.length - 1];
- break;
- case 148:
- --p[q.u30()];
- break;
- case 149:
- g[g.length - 1] = b.axTypeOf(g[g.length - 1], l);
- break;
- case 150:
- g[g.length - 1] = !g[g.length - 1];
- break;
- case 151:
- g[g.length - 1] = ~g[g.length - 1];
- break;
- case 160:
- C = g.pop();
- y = g[g.length - 1];
- g[g.length - 1] = "number" === typeof y && "number" === typeof C ? y + C : b.axAdd(y, C, l);
- break;
- case 161:
- g[g.length - 2] -= g.pop();
- break;
- case 162:
- g[g.length - 2] *= g.pop();
- break;
- case 163:
- g[g.length - 2] /= g.pop();
- break;
- case 164:
- g[g.length - 2] %= g.pop();
- break;
- case 165:
- g[g.length - 2] <<= g.pop();
- break;
- case 166:
- g[g.length - 2] >>= g.pop();
- break;
- case 167:
- g[g.length - 2] >>>= g.pop();
- break;
- case 168:
- g[g.length - 2] &= g.pop();
- break;
- case 169:
- g[g.length - 2] |= g.pop();
- break;
- case 170:
- g[g.length - 2] ^= g.pop();
- break;
- case 171:
- y = g[g.length - 2];
- C = g.pop();
- g[g.length - 1] = b.axEquals(y, C, l);
- break;
- case 172:
- g[g.length - 2] = g[g.length - 2] === g.pop();
- break;
- case 173:
- g[g.length - 2] = g[g.length - 2] < g.pop();
- break;
- case 174:
- g[g.length - 2] = g[g.length - 2] <= g.pop();
- break;
- case 175:
- g[g.length - 2] = g[g.length - 2] > g.pop();
- break;
- case 176:
- g[g.length - 2] = g[g.length - 2] >= g.pop();
- break;
- case 177:
- w = g.pop();
- g[g.length - 1] = w.axIsInstanceOf(g[g.length - 1]);
- break;
- case 178:
- h(g, B.getMultiname(q.u30()), m);
- w = v.topScope().findScopeProperty(m, !0, !1);
- g[g.length - 1] = w.axIsType(g[g.length - 1]);
- break;
- case 179:
- w = g.pop();
- g[g.length - 1] = w.axIsType(g[g.length - 1]);
- break;
- case 180:
- w = l.box(g.pop());
- var N = g[g.length - 1];
- g[g.length - 1] = N && N.axClass === l.AXQName ? w.axHasProperty(N.name) : w.axHasPublicProperty(N);
- break;
- case 192:
- g[g.length - 1] = (g[g.length - 1] | 0) + 1;
- break;
- case 193:
- g[g.length - 1] = (g[g.length - 1] | 0) - 1;
- break;
- case 194:
- M = q.u30();
- p[M] = (p[M] | 0) + 1;
- break;
- case 195:
- M = q.u30();
- p[M] = (p[M] | 0) - 1;
- break;
- case 196:
- g[g.length - 1] = -(g[g.length - 1] | 0);
- break;
- case 197:
- g[g.length - 2] = (g[g.length - 2] | 0) + (g.pop() | 0) | 0;
- break;
- case 198:
- g[g.length - 2] = (g[g.length - 2] | 0) - (g.pop() | 0) | 0;
- break;
- case 199:
- g[g.length - 2] = (g[g.length - 2] | 0) * (g.pop() | 0) | 0;
- break;
- case 208:
- ;
- case 209:
- ;
- case 210:
- ;
- case 211:
- g.push(p[F - 208]);
- break;
- case 212:
- ;
- case 213:
- ;
- case 214:
- ;
- case 215:
- p[F - 212] = g.pop();
- break;
- case 6:
- v.topScope().defaultNamespace = b.internNamespace(0, B.getString(q.u30()));
- break;
- case 7:
- v.topScope().defaultNamespace = b.internNamespace(0, g.pop());
- break;
- case 239:
- q.pc++;
- q.u30();
- q.pc++;
- q.u30();
- break;
- case 240:
- ;
- case 241:
- q.u30();
- break;
- case 2:
- ;
- case 1:
- break;
- default:
- e.Debug.notImplemented(b.Bytecode[F]);
- }
- } catch (Q) {
- b.isValidASValue(Q) || (Q = n(l, Q, F, A, w, y, C, m, J + 1));
- for (var V = q.body.catchBlocks, P = 0;P < V.length;P++) {
- var W = V[P];
- if (q.pc >= W.start && q.pc <= W.end) {
- var R = W.getType();
- if (!R || q.app.getClass(R).axIsType(Q)) {
- g.length = 0;
- g.push(Q);
- v.clear();
- q.pc = W.target;
- continue b;
- }
- }
- }
- b.scopeStacks.length--;
- throw Q;
- }
- }
- }
- b.executionWriter && b.executionWriter.leave("< " + c.trait);
- return u;
- } catch (L) {
- throw b.executionWriter && b.executionWriter.leave("< " + c.trait + ", Exception: " + L), L;
- }
- };
- var d = function() {
- function a(a, d, k, r, u) {
- this.pc = 0;
- this.stack = [];
- this.hasNext2Infos = null;
- this.code = (this.body = d.getBody()).code;
- this.scopes = new l(k);
- for (var q = this.locals = [a], g = this.sec = (this.app = d.abc.applicationDomain).sec, p = r.length, v, z = 0, h = d.parameters.length;z < h;z++) {
- var e = d.parameters[z];
- v = z < p ? r[z] : e.hasOptionalValue() ? e.getOptionalValue() : void 0;
- (e = e.getType()) && !e.isAnyName() && (v = k.getScopeProperty(e, !0, !1).axCoerce(v));
- q.push(v);
- }
- d.needsRest() ? q.push(g.createArrayUnsafe(b.sliceArguments(r, d.parameters.length))) : d.needsArguments() && (k = b.sliceArguments(r, 0), g = Object.create(g.argumentsPrototype), g.value = k, g.callee = u, g.receiver = a, g.methodInfo = d, q.push(g));
- }
- a.prototype.bc = function() {
- return this.code[this.pc++];
- };
- a.prototype.peekStack = function() {
- return this.stack[this.stack.length - 1];
- };
- a.prototype.u30 = function() {
- var a = this.code, b = this.pc, d = a[b++];
- d & 128 && (d = d & 127 | a[b++] << 7, d & 16384 && (d = d & 16383 | a[b++] << 14, d & 2097152 && (d = d & 2097151 | a[b++] << 21, d & 268435456 && (d = d & 268435455 | a[b++] << 28, d &= 4294967295))));
- this.pc = b;
- return d >>> 0;
- };
- a.prototype.s24 = function() {
- var a = this.code, b = this.pc, a = a[b] | a[b + 1] << 8 | a[b + 2] << 16;
- this.pc = b + 3;
- return a << 8 >> 8;
- };
- a.prototype.getHasNext2Info = function() {
- var a = this.pc, d = this.hasNext2Infos;
- d || (d = this.hasNext2Infos = []);
- d[a] || (d[a] = new b.HasNext2Info(null, 0));
- return d[a];
- };
- return a;
- }();
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a, b) {
- return Array.prototype.slice.call(a, b);
- }
- function n(a) {
- return a[0];
- }
- function t(a) {
- var b = Object.create(this.tPrototype);
- b.value = a;
- return b;
- }
- function m(a) {
- return null == a ? null : a;
- }
- function l(a, b) {
- var c = b[0];
- return null == c ? Object.create(this.tPrototype) : c;
- }
- function d(a) {
- a = a[0];
- return null == a ? Object.create(this.tPrototype) : a;
- }
- function a(a) {
- return a | 0;
- }
- function c(a) {
- return a >>> 0;
- }
- function f(a) {
- return as3Compatibility && ("string" === typeof a || a && "object" === typeof a && (a = a.valueOf(), "string" === typeof a)) ? b.AS.ASNumber.convertStringToDouble(a) : +a;
- }
- function k(a) {
- return !!a;
- }
- function r(a) {
- return "string" === typeof a ? a : void 0 == a ? null : a + "";
- }
- function u(a) {
- return "string" === typeof a ? a : a + "";
- }
- function q(a) {
- return "number" === typeof a;
- }
- function g(a) {
- return "number" === typeof a && (a | 0) === a;
- }
- function p(a) {
- return "number" === typeof a && a >>> 0 === a;
- }
- function v(a) {
- return "boolean" === typeof a;
- }
- function z(a) {
- return "string" === typeof a;
- }
- function B(a, b) {
- return b.AXXML.dPrototype.isPrototypeOf(a) || b.AXXMLList.dPrototype.isPrototypeOf(a);
- }
- function E() {
- return !1;
- }
- function A() {
- var a = this.callee;
- return a ? a : null === this.methodInfo.trait ? (console.error("arguments.callee used on trait-less methodInfo function. Probably a constructor"), null) : this.receiver.axGetProperty(this.methodInfo.trait.name);
- }
- function G(a) {
- return null === a || void 0 === a || "number" === typeof a || "string" === typeof a || "boolean" === typeof a;
- }
- function w(a) {
- if (e.isNullOrUndefined(a)) {
- return null;
- }
- this.axIsType(a) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, a, this.classInfo.instanceInfo.getClassName());
- return a;
- }
- function y(a) {
- return this.classInfo.instanceInfo.getInterfaces(this.axClass).has(a);
- }
- function C(a) {
- return this.dPrototype.isPrototypeOf(this.sec.box(a)) || a === this.dPrototype;
- }
- function x(a) {
- return a && "object" === typeof a ? a.axImplementsInterface(this) : !1;
- }
- function M(a) {
- return this.axIsType(a) ? a : null;
- }
- function I(a) {
- return this.dPrototype.isPrototypeOf(this.sec.box(a));
- }
- function J(a) {
- return !1;
- }
- function F(a, c) {
- U(a, "traits", c);
- for (var g = c.getTraitsList(), d = 0;d < g.length;d++) {
- var f = g[d], p = f;
- p.value instanceof b.Namespace && (p = {value:b.AS.ASNamespace.FromNamespace.call(a.sec.AXNamespace, p.value)});
- Object.defineProperty(a, f.name.getMangledName(), p);
- }
- }
- function D() {
- var a = this.hasOwnProperty("classInfo") ? "Object" : this.classInfo.instanceInfo.name.name;
- return e.StringUtilities.concat3("[object ", a, "]");
- }
- function H() {
- return this.$BgtoString.axCall(this);
- }
- function K() {
- return this;
- }
- function O() {
- return this.$BgvalueOf.axCall(this);
- }
- function S(a) {
- var b = a.axClass;
- if (!b || b === b.sec.AXObject) {
- return null;
- }
- var c = b.dPrototype;
- c === a && (c = b.superClass.dPrototype);
- return c;
- }
- function P(a) {
- var b = Object.create(this.tPrototype);
- b.axInitializer.apply(b, a);
- return b;
- }
- function N() {
- }
- function Q() {
- this.sec.throwError("VerifierError", b.Errors.NotImplementedError, this.name.name);
- }
- function V(a, b) {
- return this.axCoerce(b ? b[0] : void 0);
- }
- b.validateCall = function(a, c, g) {
- c && c.axApply || a.throwError("TypeError", b.Errors.CallOfNonFunctionError, c && c.methodInfo ? c.methodInfo.getName() : "value");
- c.methodInfo && g < c.methodInfo.minArgs && a.throwError("ArgumentError", b.Errors.WrongArgumentCountError, c.methodInfo.getName(), c.methodInfo.minArgs, g);
- };
- b.validateConstruct = function(a, c, g) {
- if (!c || !c.axConstruct) {
- var d = c && c.classInfo ? c.classInfo.instanceInfo.getName().name : "value";
- a.throwError("TypeError", b.Errors.ConstructOfNonFunctionError, d);
- }
- d = c.classInfo.getInitializer();
- g < d.minArgs && a.throwError("ArgumentError", b.Errors.WrongArgumentCountError, c.classInfo.instanceInfo.getName().name, d.minArgs, g);
- };
- b.checkNullParameter = function(a, c, g) {
- void 0 == a && g.throwError("TypeError", b.Errors.NullPointerError, c);
- };
- b.checkParameterType = function(a, c, g, d) {
- if (null == a) {
- if (d) {
- return;
- }
- g.sec.throwError("TypeError", b.Errors.NullPointerError, c);
- }
- g.axIsType(a) || g.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, a, g.classInfo.instanceInfo.getClassName());
- };
- b.forEachPublicProperty = function(a, b, c) {
- for (var g = a.axGetEnumerableKeys(), d = 0;d < g.length;d++) {
- var f = g[d], p = a.axGetPublicProperty(f);
- b.call(c, f, p);
- }
- };
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Runtime = 1] = "Runtime";
- a[a.Execution = 2] = "Execution";
- a[a.Interpreter = 4] = "Interpreter";
- })(b.WriterFlags || (b.WriterFlags = {}));
- var W = new e.IndentingWriter(!1, function(a) {
- });
- b.runtimeWriter = null;
- b.executionWriter = null;
- b.interpreterWriter = null;
- b.sliceArguments = h;
- b.setWriters = function(a) {
- b.runtimeWriter = a & 1 ? W : null;
- b.executionWriter = a & 6 ? W : null;
- b.interpreterWriter = a & 4 ? W : null;
- };
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Executing = 1] = "Executing";
- a[a.Executed = 2] = "Executed";
- })(b.ScriptInfoState || (b.ScriptInfoState = {}));
- var R = e.Debug.assert, L = e.ObjectUtilities.defineNonEnumerableProperty, U = e.ObjectUtilities.defineReadOnlyProperty;
- b.ensureBoxedReceiver = function(a, c, g) {
- if (c && "object" === typeof c) {
- return c;
- }
- a = a.box(c);
- a || (b.scopeStacks.length ? a = b.scopeStacks[b.scopeStacks.length - 1].topScope().global.object : g.receiver && (a = g.receiver.scope.global.object));
- return a;
- };
- b.axCoerceInt = a;
- b.axCoerceUint = c;
- b.axCoerceNumber = f;
- b.axCoerceBoolean = k;
- b.axCoerceString = r;
- b.axCoerceName = function(a) {
- return "string" === typeof a ? a : void 0 == a ? "null" : a.toString();
- };
- b.axConvertString = u;
- b.axIsTypeNumber = q;
- b.axIsTypeInt = g;
- b.axIsTypeUint = p;
- b.axIsTypeBoolean = v;
- b.axIsTypeString = z;
- b.axGetDescendants = function(a, c, g) {
- B(a, g) || g.throwError("TypeError", b.Errors.DescendentsError, a);
- return a.descendants(c);
- };
- b.axCheckFilter = function(a, c) {
- if (!c || !b.AS.isXMLCollection(c, a)) {
- var g = c && c.axClass ? c.axClass.name.toFQNString(!1) : "[unknown]";
- a.throwError("TypeError", b.Errors.FilterError, g);
- }
- return c;
- };
- b.axFalse = E;
- b.axDefaultCompareFunction = function(a, b) {
- return String(a).localeCompare(String(b));
- };
- b.axCompare = function(a, b, c, g, d) {
- var f = 0;
- c & 1 && (a = String(a).toLowerCase(), b = String(b).toLowerCase());
- c & 16 ? (a = +a, b = +b, f = a < b ? -1 : a > b ? 1 : 0) : f = d(a, b);
- return f * g;
- };
- b.axCompareFields = function(a, b, c, g) {
- var d = 0, f;
- for (f = 0;f < c.length && 0 === d;f++) {
- var p = c[f], d = a[p], p = b[p], k = g[f];
- k & 1 && (d = String(d).toLowerCase(), p = String(p).toLowerCase());
- k & 16 ? (d = +d, p = +p, d = d < p ? -1 : d > p ? 1 : 0) : d = String(d).localeCompare(String(p));
- }
- g[f - 1] & 2 && (d *= -1);
- return d;
- };
- b.axAdd = function(a, c, g) {
- return "string" === typeof a || "string" === typeof c ? String(a) + String(c) : b.AS.isXMLCollection(a, g) && b.AS.isXMLCollection(c, g) ? b.AS.ASXMLList.addXML(a, c) : a + c;
- };
- b.axEquals = function(a, c, g) {
- return b.AS.isXMLType(a, g) ? a.equals(c) : b.AS.isXMLType(c, g) ? c.equals(a) : a == c;
- };
- b.isValidASValue = function(a) {
- return b.AXBasePrototype.isPrototypeOf(a) || G(a);
- };
- b.checkValue = function(a) {
- };
- b.axTypeOf = function(a, b) {
- if (a) {
- if (a.value) {
- return typeof a.value;
- }
- if (B(a, b)) {
- return "xml";
- }
- }
- return typeof a;
- };
- b.axIsCallable = function(a) {
- return a && "function" === typeof a.axApply;
- };
- var aa = function() {
- function a(b, c, g) {
- void 0 === g && (g = !1);
- this.parent = b;
- this.object = c;
- this.global = b ? b.global : this;
- this.isWith = g;
- this.cache = [];
- this.defaultNamespace = null;
- }
- a.prototype.findDepth = function(a) {
- for (var b = this, c = 0;b;) {
- if (b.object === a) {
- return c;
- }
- c++;
- b = b.parent;
- }
- return -1;
- };
- a.prototype.getScopeObjects = function() {
- for (var a = [], b = this;b;) {
- a.unshift(b.object), b = b.parent;
- }
- return a;
- };
- a.prototype.getScopeProperty = function(a, b, c) {
- return this.findScopeProperty(a, b, c).axGetProperty(a);
- };
- a.prototype.findScopeProperty = function(a, c, g) {
- null === a.name && this.global.object.sec.throwError("ReferenceError", b.Errors.UndefinedVarError, "*");
- var d;
- if (!g && !a.isRuntime() && (d = this.cache[a.id])) {
- return d;
- }
- if (this.object && (this.isWith ? this.object.axHasPropertyInternal(a) : this.object.traits.getTrait(a.namespaces, a.name))) {
- return this.isWith || a.isRuntime() ? this.object : this.cache[a.id] = this.object;
- }
- if (this.parent) {
- return d = this.parent.findScopeProperty(a, c, g), 7 === a.kind && (this.cache[a.id] = d), d;
- }
- if (g) {
- return null;
- }
- a.isAttribute() && this.object.sec.throwError("ReferenceError", b.Errors.UndefinedVarError, a.name);
- g = this.global.object;
- if (d = g.applicationDomain.findProperty(a, c, !0)) {
- return d;
- }
- c && (a.getPublicMangledName() in g || this.global.object.sec.throwError("ReferenceError", b.Errors.UndefinedVarError, a.name));
- return g;
- };
- return a;
- }();
- b.Scope = aa;
- b.applyTraits = F;
- b.AXBasePrototype = null;
- Function.prototype.axApply = Function.prototype.apply;
- Function.prototype.axCall = Function.prototype.call;
- b.safeGetPrototypeOf = S;
- var X = function() {
- function a(b, c) {
- this.object = b;
- this.index = c;
- }
- a.prototype.next = function(a, b) {
- if (e.isNullOrUndefined(a)) {
- this.index = 0, this.object = null;
- } else {
- this.object = a;
- this.index = b;
- var c = a.axNextNameIndex(this.index);
- if (0 < c) {
- this.index = c;
- } else {
- for (;;) {
- a = S(a);
- if (!a) {
- this.index = 0;
- this.object = null;
- break;
- }
- c = a.axNextNameIndex(0);
- if (0 < c) {
- this.index = c;
- this.object = a;
- break;
- }
- }
- }
- }
- };
- return a;
- }();
- b.HasNext2Info = X;
- b.scopeStacks = [];
- b.getCurrentScope = function() {
- return 0 === b.scopeStacks.length ? null : b.scopeStacks[b.scopeStacks.length - 1].topScope();
- };
- b.getCurrentABC = function() {
- return 0 === b.scopeStacks.length ? null : b.scopeStacks[b.scopeStacks.length - 1].topScope().global.object.scriptInfo.abc;
- };
- X = function() {
- function e() {
- if (!b.AXBasePrototype) {
- var a = b.AS.ASObject.prototype;
- b.AXBasePrototype = Object.create(null);
- L(b.AXBasePrototype, "axHasPropertyInternal", a.axHasPropertyInternal);
- L(b.AXBasePrototype, "axHasProperty", a.axHasProperty);
- L(b.AXBasePrototype, "axSetProperty", a.axSetProperty);
- L(b.AXBasePrototype, "axHasProperty", a.axHasProperty);
- L(b.AXBasePrototype, "axHasPublicProperty", a.axHasPublicProperty);
- L(b.AXBasePrototype, "axSetPublicProperty", a.axSetPublicProperty);
- L(b.AXBasePrototype, "axGetPublicProperty", a.axGetPublicProperty);
- L(b.AXBasePrototype, "axCallPublicProperty", a.axCallPublicProperty);
- L(b.AXBasePrototype, "axDeletePublicProperty", a.axDeletePublicProperty);
- L(b.AXBasePrototype, "axGetProperty", a.axGetProperty);
- L(b.AXBasePrototype, "axDeleteProperty", a.axDeleteProperty);
- L(b.AXBasePrototype, "axGetSuper", a.axGetSuper);
- L(b.AXBasePrototype, "axSetSuper", a.axSetSuper);
- L(b.AXBasePrototype, "axSetSlot", a.axSetSlot);
- L(b.AXBasePrototype, "axGetSlot", a.axGetSlot);
- L(b.AXBasePrototype, "axCallProperty", a.axCallProperty);
- L(b.AXBasePrototype, "axCallSuper", a.axCallSuper);
- L(b.AXBasePrototype, "axConstructProperty", a.axConstructProperty);
- L(b.AXBasePrototype, "axResolveMultiname", a.axResolveMultiname);
- L(b.AXBasePrototype, "axNextNameIndex", a.axNextNameIndex);
- L(b.AXBasePrototype, "axNextName", a.axNextName);
- L(b.AXBasePrototype, "axNextValue", a.axNextValue);
- L(b.AXBasePrototype, "axGetEnumerableKeys", a.axGetEnumerableKeys);
- L(b.AXBasePrototype, "axImplementsInterface", y);
- L(b.AXBasePrototype, "traits", new b.RuntimeTraits(null, null, Object.create(null)));
- L(b.AXBasePrototype, "isPrototypeOf", Object.prototype.isPrototypeOf);
- L(b.AXBasePrototype, "hasOwnProperty", Object.prototype.hasOwnProperty);
- b.AXBasePrototype.$BgtoString = D;
- b.AXBasePrototype.toString = H;
- b.AXBasePrototype.$BgvalueOf = K;
- b.AXBasePrototype.valueOf = O;
- }
- this.system = new T(this, null);
- this.application = new T(this, this.system);
- this.classAliases = new b.ClassAliases;
- this.nativeClasses = Object.create(null);
- this.vectorClasses = new Map;
- this._catalogs = [];
- }
- Object.defineProperty(e.prototype, "xmlParser", {get:function() {
- return this._xmlParser || (this._xmlParser = new b.AS.XMLParser(this));
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(e.prototype, "AXFunctionUndefinedPrototype", {get:function() {
- return this._AXFunctionUndefinedPrototype || (this._AXFunctionUndefinedPrototype = this.createObject());
- }, enumerable:!0, configurable:!0});
- e.prototype.addCatalog = function(a) {
- this._catalogs.push(a);
- };
- e.prototype.findDefiningABC = function(a) {
- b.runtimeWriter && b.runtimeWriter.writeLn("findDefiningABC: " + a);
- for (var c = null, g = 0;g < this._catalogs.length;g++) {
- if (c = this._catalogs[g].getABCByMultiname(a)) {
- return c;
- }
- }
- return null;
- };
- e.prototype.throwError = function(a, b, c, g, d, f) {
- throw this.createError.apply(this, arguments);
- };
- e.prototype.createError = function(a, c, g, d, f, p) {
- var k = b.formatErrorMessage.apply(null, h(arguments, 1)), q = b.Multiname.FromFQNString(a, 0);
- return this.system.getProperty(q, !0, !0).axConstruct([k, c.code]);
- };
- e.prototype.applyType = function(a, c) {
- this.ObjectVector.axClass.superClass.dPrototype.isPrototypeOf(a.dPrototype) || this.throwError("TypeError", b.Errors.TypeAppOfNonParamType);
- 1 !== c.length && this.throwError("TypeError", b.Errors.WrongTypeArgCountError, "__AS3__.vec::Vector", 1, c.length);
- return this.getVectorClass(c[0] || this.AXObject);
- };
- e.prototype.getVectorClass = function(a) {
- var b = this.vectorClasses.get(a);
- if (b) {
- return b;
- }
- switch(a ? a.classInfo.instanceInfo.getName().getMangledName() : "$BgObject") {
- case "$BgNumber":
- ;
- case "$Bgdouble":
- b = this.Float64Vector.axClass;
- break;
- case "$Bgint":
- b = this.Int32Vector.axClass;
- break;
- case "$Bguint":
- b = this.Uint32Vector.axClass;
- break;
- default:
- b = this.createVectorClass(a);
- }
- this.vectorClasses.set(a, b);
- return b;
- };
- e.prototype.createVectorClass = function(a) {
- var b = this.ObjectVector.axClass, c = Object.create(b);
- c.tPrototype = Object.create(b.tPrototype);
- c.tPrototype.axClass = c;
- c.dPrototype = b.dPrototype;
- c.superClass = b;
- c.type = a;
- return c;
- };
- e.prototype.createObject = function() {
- return Object.create(this.AXObject.tPrototype);
- };
- e.prototype.createObjectFromJS = function(a, c) {
- void 0 === c && (c = !1);
- for (var g = Object.keys(a), d = this.createObject(), f = 0;f < g.length;f++) {
- var p = a[g[f]];
- c && (p = b.AS.transformJSValueToAS(this, p, !0));
- d.axSetPublicProperty(g[f], p);
- }
- return d;
- };
- e.prototype.createArrayUnsafe = function(a) {
- var b = Object.create(this.AXArray.tPrototype);
- b.value = a;
- return b;
- };
- e.prototype.createArray = function(a) {
- var b = this.createArrayUnsafe([]), c;
- for (c in a) {
- b.axSetPublicProperty(c, a[c]);
- }
- b.length = a.length;
- return b;
- };
- e.prototype.boxFunction = function(a) {
- var b = Object.create(this.AXFunction.tPrototype);
- b.value = a;
- return b;
- };
- e.prototype.createClass = function(a, c, g) {
- var d = a.instanceInfo, f = d.getName().toFQNString(!1), p = this.nativeClasses[f] || Object.create(this.AXClass.tPrototype), k = new aa(g, p);
- this.nativeClasses[f] ? p.tPrototype.axInitializer = this.createInitializerFunction(a, k) : d.isInterface() ? (p.dPrototype = Object.create(this.objectPrototype), p.tPrototype = Object.create(p.dPrototype), p.tPrototype.axInitializer = Q, p.axIsInstanceOf = J, p.axIsType = x) : (p.dPrototype = c === this.AXObject ? Object.create(this.objectPrototype) : Object.create(c.dPrototype), p.tPrototype = Object.create(p.dPrototype), p.tPrototype.axInitializer = this.createInitializerFunction(a, k));
- p.classInfo = p.dPrototype.classInfo = a;
- p.dPrototype.axClass = p;
- p.superClass = c;
- p.scope = g;
- "Object" !== f && "Class" !== f && this.initializeRuntimeTraits(p, c, k);
- L(p.dPrototype, "$Bgconstructor", p);
- b.AS.tryLinkNativeClass(p);
- a = a.getInitializer();
- c = a.getBody().code;
- 208 === c[0] && 48 === c[1] && 71 === c[2] || b.interpret(p, a, k, [p], null);
- return p;
- };
- e.prototype.initializeRuntimeTraits = function(a, b, c) {
- var g = a.classInfo, d = g.instanceInfo, f;
- f = a === this.AXClass ? d.traits.resolveRuntimeTraits(null, null, c) : g.traits.resolveRuntimeTraits(this.AXClass.classInfo.instanceInfo.runtimeTraits, null, c.parent);
- g.runtimeTraits = f;
- F(a, f);
- b = b ? b.classInfo.instanceInfo.runtimeTraits : null;
- g = g.abc.getNamespace(d.protectedNs);
- c = d.traits.resolveRuntimeTraits(b, g, c);
- d.runtimeTraits = c;
- F(a.tPrototype, c);
- };
- e.prototype.createFunction = function(a, c, g) {
- var d = this.boxFunction(function() {
- return b.interpret(this === jsGlobal ? c.global.object : this, a, c, arguments, d);
- });
- d.receiver = {scope:c};
- return d;
- };
- e.prototype.createInitializerFunction = function(a, c) {
- var g = a.instanceInfo.getInitializer(), d = b.AS.getNativeInitializer(a);
- d || (d = function() {
- return b.interpret(this, g, c, arguments, null);
- }, d.methodInfo = g);
- return d;
- };
- e.prototype.createActivation = function(a, b) {
- var c = a.getBody();
- c.activationPrototype || (c.traits.resolve(), c.activationPrototype = Object.create(this.AXActivationPrototype), U(c.activationPrototype, "traits", c.traits.resolveRuntimeTraits(null, null, b)));
- return Object.create(c.activationPrototype);
- };
- e.prototype.createCatch = function(a, b) {
- if (!a.catchPrototype) {
- var c = a.getTraits();
- a.catchPrototype = Object.create(this.AXCatchPrototype);
- U(a.catchPrototype, "traits", c.resolveRuntimeTraits(null, null, b));
- }
- return Object.create(a.catchPrototype);
- };
- e.prototype.box = function(a) {
- if (void 0 == a || b.AXBasePrototype.isPrototypeOf(a)) {
- return a;
- }
- if (a instanceof Array) {
- return this.AXArray.axBox(a);
- }
- if ("number" === typeof a) {
- return this.AXNumber.axBox(a);
- }
- if ("boolean" === typeof a) {
- return this.AXBoolean.axBox(a);
- }
- if ("string" === typeof a) {
- return this.AXString.axBox(a);
- }
- R(!1, "Cannot box: " + a);
- };
- e.prototype.isPrimitive = function(a) {
- return G(a) || this.AXPrimitiveBox.dPrototype.isPrototypeOf(a);
- };
- e.prototype.createAXGlobal = function(a, b) {
- var c = Object.create(this.AXGlobalPrototype);
- c.applicationDomain = a;
- c.scriptInfo = b;
- var g = c.scope = new aa(null, c, !1), g = b.traits.resolveRuntimeTraits(this.AXObject.classInfo.instanceInfo.runtimeTraits, null, g);
- F(c, g);
- return c;
- };
- e.prototype.prepareRootClassPrototype = function() {
- var a = Object.create(this.objectPrototype), a = Object.create(a);
- a.$BgtoString = function() {
- return "[class " + this.classInfo.instanceInfo.getName().name + "]";
- };
- L(a, "axBox", n);
- L(a, "axCoerce", w);
- L(a, "axIsType", C);
- L(a, "axAsType", M);
- L(a, "axIsInstanceOf", I);
- L(a, "axConstruct", P);
- L(a, "axApply", V);
- Object.defineProperty(a, "name", {get:function() {
- return this.classInfo.instanceInfo.name;
- }});
- this.rootClassPrototype = a;
- };
- e.prototype.initializeCoreNatives = function() {
- this.prepareRootClassPrototype();
- var a = this.prepareNativeClass("AXClass", "Class", !1);
- a.classInfo = this.system.findClassInfo("Class");
- a.defaultValue = null;
- this.prepareNativeClass("AXObject", "Object", !1).classInfo = this.system.findClassInfo("Object");
- var b = this.prepareNativeClass("AXFunction", "Function", !1);
- L(b, "axBox", t);
- var a = new aa(null, a, !1), b = this.AXObject.classInfo, c = b.instanceInfo, c = c.runtimeTraits = c.traits.resolveRuntimeTraits(null, null, a);
- F(this.AXObject.tPrototype, c);
- var g = this.AXClass.classInfo, d = g.instanceInfo;
- d.runtimeTraits = d.traits.resolveRuntimeTraits(c, null, a);
- F(this.AXClass.tPrototype, d.runtimeTraits);
- g.runtimeTraits = g.traits.resolveRuntimeTraits(c, null, a);
- F(this.AXClass, g.runtimeTraits);
- b.runtimeTraits = b.traits.resolveRuntimeTraits(d.runtimeTraits, null, a);
- F(this.AXObject, b.runtimeTraits);
- };
- e.prototype.prepareNativeClass = function(a, b, c) {
- var g = Object.create(this.rootClassPrototype);
- "Object" === b ? (g.dPrototype = Object.getPrototypeOf(this.objectPrototype), g.tPrototype = this.objectPrototype) : "Class" === b ? (g.dPrototype = Object.getPrototypeOf(this.rootClassPrototype), g.tPrototype = this.rootClassPrototype) : (g.dPrototype = Object.create(c ? this.AXPrimitiveBox.dPrototype : "AXMethodClosure" === a ? this.AXFunction.dPrototype : this.objectPrototype), g.tPrototype = Object.create(g.dPrototype));
- return this[a] = this.nativeClasses[b] = g;
- };
- e.prototype.preparePrimitiveClass = function(a, b, c, g, d, f, p) {
- a = this.prepareNativeClass(a, b, !0);
- L(a, "axBox", t);
- L(a, "axApply", function(a, b) {
- return c(b && b.length ? b[0] : g);
- });
- L(a, "axConstruct", function(a) {
- return c(a && a.length ? a[0] : g);
- });
- L(a, "axCoerce", d);
- L(a, "axIsType", f);
- L(a, "axIsInstanceOf", p);
- L(a.dPrototype, "value", g);
- return a;
- };
- e.prototype.initialize = function() {
- var h = Object.create(b.AXBasePrototype);
- h.sec = this;
- Object.defineProperty(this, "objectPrototype", {value:Object.create(h)});
- this.initializeCoreNatives();
- this.AXGlobalPrototype = Object.create(this.objectPrototype);
- this.AXGlobalPrototype.$BgtoString = function() {
- return "[object global]";
- };
- this.AXActivationPrototype = Object.create(this.objectPrototype);
- this.AXActivationPrototype.$BgtoString = function() {
- return "[Activation]";
- };
- this.AXCatchPrototype = Object.create(this.objectPrototype);
- this.AXCatchPrototype.$BgtoString = function() {
- return "[Catch]";
- };
- var e = this.AXObject, h = this.AXFunction;
- L(e, "axApply", l);
- L(e, "axConstruct", d);
- L(e.tPrototype, "axInitializer", N);
- L(e, "axCoerce", m);
- this.prepareNativeClass("AXMethodClosure", "builtin.as$0.MethodClosure", !1);
- this.prepareNativeClass("AXError", "Error", !1);
- this.prepareNativeClass("AXMath", "Math", !1);
- this.prepareNativeClass("AXDate", "Date", !1);
- this.prepareNativeClass("AXXML", "XML", !1);
- this.prepareNativeClass("AXXMLList", "XMLList", !1);
- this.prepareNativeClass("AXQName", "QName", !1);
- this.prepareNativeClass("AXNamespace", "Namespace", !1);
- e = this.prepareNativeClass("AXArray", "Array", !1);
- L(e, "axBox", t);
- e.tPrototype.$BgtoString = h.axBox(function() {
- return this.value.toString();
- });
- e.dPrototype.value = [];
- this.argumentsPrototype = Object.create(this.AXArray.tPrototype);
- Object.defineProperty(this.argumentsPrototype, "$Bgcallee", {get:A});
- this.prepareNativeClass("AXRegExp", "RegExp", !1).dPrototype.value = /(?:)/;
- e = this.prepareNativeClass("AXPrimitiveBox", "PrimitiveBox", !1);
- L(e.dPrototype, "$BgtoString", h.axBox(function() {
- return this.value.toString();
- }));
- this.preparePrimitiveClass("AXBoolean", "Boolean", k, !1, k, v, v);
- this.preparePrimitiveClass("AXString", "String", u, "", r, z, z);
- this.preparePrimitiveClass("AXNumber", "Number", f, 0, f, q, q);
- this.preparePrimitiveClass("AXInt", "int", a, 0, a, g, E);
- this.preparePrimitiveClass("AXUint", "uint", c, 0, c, p, E);
- b.AS.installClassLoaders(this.application, this);
- b.AS.installNativeFunctions(this);
- };
- return e;
- }();
- b.AXSecurityDomain = X;
- var T = function() {
- function a(b, c) {
- this.sec = b;
- this.system = (this.parent = c) ? c.system : this;
- this._abcs = [];
- }
- a.prototype.loadABC = function(a) {
- R(0 > this._abcs.indexOf(a));
- this._abcs.push(a);
- };
- a.prototype.loadAndExecuteABC = function(a) {
- this.loadABC(a);
- this.executeABC(a);
- };
- a.prototype.executeABC = function(a) {
- this.executeScript(a.scripts[a.scripts.length - 1]);
- };
- a.prototype.findClassInfo = function(a) {
- for (var b = 0;b < this._abcs.length;b++) {
- for (var c = this._abcs[b], g = 0;g < c.instances.length;g++) {
- var d = c.classes[g];
- if (d.instanceInfo.getName().name === a) {
- return d;
- }
- }
- }
- return null;
- };
- a.prototype.executeScript = function(a) {
- R(0 === a.state);
- b.runtimeWriter && b.runtimeWriter.writeLn("Running Script: " + a);
- var c = this.sec.createAXGlobal(this, a);
- a.global = c;
- a.state = 1;
- b.interpret(c, a.getInitializer(), c.scope, [], null);
- a.state = 2;
- };
- a.prototype.findProperty = function(a, b, c) {
- return (a = this.findDefiningScript(a, c)) ? a.global : null;
- };
- a.prototype.getClass = function(a) {
- return this.getProperty(a, !0, !0);
- };
- a.prototype.getProperty = function(a, b, c) {
- return (b = this.findProperty(a, b, c)) ? b.axGetProperty(a) : null;
- };
- a.prototype.findDefiningScript = function(a, b) {
- var c;
- if (this.parent && (c = this.parent.findDefiningScript(a, b))) {
- return c;
- }
- for (var g = 0;g < this._abcs.length;g++) {
- if (c = this._abcs[g], c = this._findDefiningScriptInABC(c, a, b)) {
- return c;
- }
- }
- return (c = this.system.sec.findDefiningABC(a)) ? (this.loadABC(c), c = this._findDefiningScriptInABC(c, a, b)) : null;
- };
- a.prototype._findDefiningScriptInABC = function(a, b, c) {
- a = a.scripts;
- for (var g = 0;g < a.length;g++) {
- var d = a[g], f = d.traits;
- f.resolve();
- if (f.getTrait(b)) {
- return c && 0 === d.state && this.executeScript(d), d;
- }
- }
- return null;
- };
- return a;
- }();
- b.AXApplicationDomain = T;
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function() {
- return function() {
- };
- }();
- b.ASObject = e;
- var t = function(b) {
- function l() {
- b.apply(this, arguments);
- }
- __extends(l, b);
- return l;
- }(e);
- b.ASNative = t;
- e = function(b) {
- function l() {
- b.apply(this, arguments);
- }
- __extends(l, b);
- return l;
- }(e);
- b.ASError = e;
- })(b.AS || (b.AS = {}));
- })(e.AVM2 || (e.AVM2 = {}));
-})(Shumway || (Shumway = {}));
-var as3Compatibility = !0;
-function as3ToLowerCase(e) {
- for (var b = null, h = 0;h < e.length;h++) {
- var n = e.charCodeAt(h);
- 4256 <= n && 4293 >= n && (b || (b = Array(e.length)), b[h] = String.fromCharCode(n + 48));
- }
- if (b) {
- for (h = 0;h < b.length;h++) {
- b[h] || (b[h] = e.charAt(h).toLocaleString());
- }
- return b.join("");
- }
- return e.toLowerCase();
-}
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b) {
- for (var c = 0, g = a.length;c < g;c++) {
- b[a[c]] || (b[a[c]] = Object.create(null)), b = b[a[c]];
- }
- return b;
- }
- function t(a) {
- return function(b) {
- for (var c = [], g = 1;g < arguments.length;g++) {
- c[g - 1] = arguments[g];
- }
- return a.apply(jsGlobal, c);
- };
- }
- function m(a, c) {
- var g = new J(null, 0, 17, [], null);
- g.namespaces = c ? [c] : [b.Namespace.PUBLIC];
- g.name = a;
- return g;
- }
- function l(a) {
- return e.isIndex(a) ? a : "$Bg" + a;
- }
- function d(a, b, c) {
- w(a, b, a.sec.AXFunction.axBox(c));
- }
- function a(a, c) {
- if (1 === c.length && "number" === typeof c[0]) {
- var g = c[0];
- try {
- return Array(g);
- } catch (d) {
- a.throwError("RangeError", b.Errors.ArrayIndexNotIntegerError, g);
- }
- }
- return Array.apply(Array, c);
- }
- function c(a) {
- if (!a || !a.sec) {
- throw new TypeError("Conversion to Array failed");
- }
- return a.sec.AXArray.axCoerce(a);
- }
- function f(a, b, c) {
- if ("object" !== typeof b || y(b)) {
- return b;
- }
- if (Array.isArray(b)) {
- for (var g = [], d = 0;d < b.length;d++) {
- var p = b[d], p = c ? f(a, p, !0) : p;
- g.push(p);
- }
- return a.createArray(g);
- }
- return a.createObjectFromJS(b, c);
- }
- function k(a, b, c) {
- if ("object" !== typeof b || y(b)) {
- return b;
- }
- if (a.AXArray.axIsType(b)) {
- var g = [];
- b = b.value;
- for (var d = 0;d < b.length;d++) {
- var f = b[d], f = c ? k(a, f, !0) : f;
- g.push(f);
- }
- return g;
- }
- g = Object.keys(b);
- f = {};
- for (d = 0;d < g.length;d++) {
- var p = g[d], q = p;
- e.isNumeric(p) || (q = p.substr(3));
- p = b[p];
- c && (p = k(a, p, !0));
- f[q] = p;
- }
- return f;
- }
- function r(a, b) {
- var c = a.createArray(b);
- c.axSetPublicProperty("index", b.index);
- c.axSetPublicProperty("input", b.input);
- return c;
- }
- function u(a, c, g, d) {
- var f = c[g];
- if (Array.isArray(f)) {
- for (var p = 0, k = f.length;p < k;p++) {
- var q = u(a, f, b.axCoerceString(p), d);
- void 0 === q ? delete f[p] : f[p] = q;
- }
- } else {
- if (null !== f && "boolean" !== typeof f && "number" !== typeof f && "string" !== typeof f) {
- for (p in f) {
- if (!f.hasOwnProperty(p) || !J.isPublicQualifiedName(p)) {
- break;
- }
- q = u(a, f, p, d);
- void 0 === q ? delete f[p] : f[p] = q;
- }
- }
- }
- return d.call(c, g, f);
- }
- function q(a, b, c, g) {
- void 0 === c && (c = a);
- void 0 === g && (g = 0);
- D[a] = b;
- na.push({name:a, alias:c, nsType:g});
- }
- function g(a, b) {
- H[a] = b;
- }
- function p(a) {
- return Date.now() - a.flash.display.Loader.axClass.runtimeStartTime;
- }
- function v(a, c, g) {
- null !== c && void 0 !== c || a.throwError("TypeError", b.Errors.NullPointerError, "request");
- a.flash.net.URLRequest.axClass.axIsType(c) || a.throwError("TypeError", b.Errors.CheckTypeFailedError, c, "flash.net.URLRequest");
- c = c.url;
- y(c) && a.throwError("TypeError", b.Errors.NullPointerError, "url");
- if (0 === c.toLowerCase().indexOf("fscommand:")) {
- var d = a.flash.system.fscommand.value;
- d(a, c.substring(10), g);
- } else {
- e.FileLoadingService.instance.navigateTo(c, g);
- }
- }
- function z(a) {
- var c = null, g;
- a.holder instanceof b.InstanceInfo ? (c = a.holder.getClassName(), a = Y[c] || D[c], g = [a.prototype], a.instanceNatives && x(g, a.instanceNatives)) : a.holder instanceof b.ClassInfo && (c = a.holder.instanceInfo.getClassName(), a = Y[c] || D[c], g = [a], a.classNatives && x(g, a.classNatives));
- return g;
- }
- function B(a, b, c) {
- for (var g = 0;g < b.traits.length;g++) {
- var d = b.traits[g], f;
- a: {
- f = a;
- for (var p = d.getName().name, k = 0;k < f.length;k++) {
- var q = f[k];
- if (0 <= q.indexOf(p)) {
- var v = "!" === q[q.length - 1];
- v && (q = q.slice(0, q.length - 1));
- if (p === q) {
- f = v;
- break a;
- }
- }
- }
- f = !1;
- }
- if (f) {
- if (d.isConst()) {
- C("Don't link against const traits.");
- break;
- }
- f = d.getName().name;
- p = d.getName().getMangledName();
- d.isSlot() ? Object.defineProperty(c, f, {get:new Function("", "return this." + p + "//# sourceURL=get-" + p + ".as"), set:new Function("v", "this." + p + " = v;//# sourceURL=set-" + p + ".as")}) : d.isGetter() ? Object.defineProperty(c, f, {get:new Function("", "return this." + p + "//# sourceURL=get-" + p + ".as")}) : C(d.toString());
- }
- }
- }
- function E(a) {
- return 0 !== a.indexOf("native_");
- }
- function A(a, c, g, d) {
- Object.defineProperty(c, d, {get:function() {
- function f() {
- return p.axConstruct(arguments);
- }
- b.runtimeWriter && b.runtimeWriter.writeLn("Running Memoizer: " + g.name);
- var p = a.getClass(g);
- f.axIsType = function(a) {
- return p.axIsType(a);
- };
- f.axClass = p;
- Object.defineProperty(c, d, {value:f, writable:!1});
- return f;
- }, configurable:!0});
- }
- var G = e.ObjectUtilities.hasOwnProperty, w = e.ObjectUtilities.defineNonEnumerableProperty, y = e.isNullOrUndefined, C = e.Debug.notImplemented, x = e.ArrayUtilities.pushMany, M = e.ObjectUtilities.copyOwnPropertyDescriptors, I = e.ObjectUtilities.copyPropertiesByList, J = e.AVMX.Multiname;
- new e.IndentingWriter;
- var F;
- (function(a) {
- function c(a, b) {
- switch(typeof b) {
- case "undefined":
- return "void";
- case "object":
- return null === b ? "null" : b.classInfo.instanceInfo.name.toFQNString(!0);
- case "number":
- return (b | 0) === b ? "int" : "Number";
- case "string":
- return "String";
- case "boolean":
- return "Boolean";
- }
- }
- a.print = function(a, b, c, g, d, f) {
- var p = Array.prototype.slice.call(arguments, 1);
- jsGlobal.print.apply(null, p);
- };
- a.debugBreak = function(a) {
- debugger;
- };
- a.bugzilla = function(a, b) {
- switch(b) {
- case 574600:
- return !0;
- }
- return !1;
- };
- a.decodeURI = function(a, c) {
- try {
- return jsGlobal.decodeURI(c);
- } catch (g) {
- a.throwError("URIError", b.Errors.InvalidURIError, "decodeURI");
- }
- };
- a.decodeURIComponent = function(a, c) {
- try {
- return jsGlobal.decodeURIComponent(c);
- } catch (g) {
- a.throwError("URIError", b.Errors.InvalidURIError, "decodeURIComponent");
- }
- };
- a.encodeURI = function(a, c) {
- try {
- return jsGlobal.encodeURI(c);
- } catch (g) {
- a.throwError("URIError", b.Errors.InvalidURIError, "encodeURI");
- }
- };
- a.encodeURIComponent = function(a, c) {
- try {
- return jsGlobal.encodeURIComponent(c);
- } catch (g) {
- a.throwError("URIError", b.Errors.InvalidURIError, "encodeURIComponent");
- }
- };
- a.isNaN = t(jsGlobal.isNaN);
- a.isFinite = t(jsGlobal.isFinite);
- a.parseInt = t(jsGlobal.parseInt);
- a.parseFloat = t(jsGlobal.parseFloat);
- a.escape = t(jsGlobal.escape);
- a.unescape = t(jsGlobal.unescape);
- a.isXMLName = function() {
- return !1;
- };
- a.notImplemented = t(jsGlobal.Shumway.Debug.notImplemented);
- a.getQualifiedClassName = c;
- a.getQualifiedSuperclassName = function(a, b) {
- if (y(b)) {
- return "null";
- }
- b = a.box(b);
- var g = b.sec.AXClass.axIsType(b) ? b.superClass : b.axClass.superClass;
- return c(a, g);
- };
- a.getDefinitionByName = function(a, c) {
- c = b.axCoerceString(c).replace("::", ".");
- var g = J.FromFQNString(c, 0);
- return b.getCurrentABC().env.app.getClass(g);
- };
- a.describeType = function(a, b, c) {
- return h.describeType(a, b, c);
- };
- a.describeTypeJSON = function(a, b, c) {
- return h.describeTypeJSON(a, b, c);
- };
- })(F = h.Natives || (h.Natives = {}));
- var D = e.ObjectUtilities.createMap(), H = e.ObjectUtilities.createMap();
- h.getNative = function(a) {
- for (var b = a.split("."), c = F, g = 0, d = b.length;g < d;g++) {
- c = c && c[b[g]];
- }
- c || (c = H[a]);
- return c;
- };
- var K = new J(null, 0, 17, [], null);
- h.makeMultiname = m;
- h.addPrototypeFunctionAlias = d;
- h.checkReceiverType = function(a, c, g) {
- c.dPrototype.isPrototypeOf(a) || a.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, g);
- };
- var O = function() {
- function a() {
- }
- a.classInitializer = function() {
- var b = this.dPrototype, c = a.prototype;
- d(b, "$BghasOwnProperty", c.native_hasOwnProperty);
- d(b, "$BgpropertyIsEnumerable", c.native_propertyIsEnumerable);
- d(b, "$BgsetPropertyIsEnumerable", c.native_setPropertyIsEnumerable);
- d(b, "$BgisPrototypeOf", c.native_isPrototypeOf);
- d(b, "$BgtoLocaleString", c.toString);
- };
- a._init = function() {
- };
- a.init = function() {
- };
- a.prototype.native_isPrototypeOf = function(a) {
- return this.isPrototypeOf(this.sec.box(a));
- };
- a.prototype.native_hasOwnProperty = function(a) {
- return this.axHasOwnProperty(m(a));
- };
- a.prototype.native_propertyIsEnumerable = function(a) {
- a = Object.getOwnPropertyDescriptor(this, l(b.axCoerceString(a)));
- return !!a && a.enumerable;
- };
- a.prototype.native_setPropertyIsEnumerable = function(a, c) {
- void 0 === c && (c = !0);
- var g = l(b.axCoerceString(a));
- c = !!c;
- var d = this.axClass.classInfo.instanceInfo;
- d.isSealed() && this !== this.axClass.dPrototype && this.sec.throwError("ReferenceError", b.Errors.WriteSealedError, a, d.name.name);
- d = Object.getOwnPropertyDescriptor(this.axClass.tPrototype, g);
- d && this !== this.axClass.dPrototype || (d = Object.getOwnPropertyDescriptor(this, g)) && d.enumerable !== c && (d.enumerable = c, Object.defineProperty(this, g, d));
- };
- a.prototype.axResolveMultiname = function(a) {
- var c = a.name;
- return "number" === typeof c || e.isNumeric(c = b.axCoerceName(c)) ? +c : (a = this.traits.getTrait(a.namespaces, c)) ? a.name.getMangledName() : "$Bg" + c;
- };
- a.prototype.axHasProperty = function(a) {
- return this.axHasPropertyInternal(a);
- };
- a.prototype.axHasPublicProperty = function(a) {
- K.name = a;
- return this.axHasProperty(K);
- };
- a.prototype.axSetProperty = function(a, c, g) {
- var d = a.name;
- if ("number" === typeof d || e.isNumeric(d = b.axCoerceName(d))) {
- this[+d] = c;
- } else {
- var f = !1, p = this.traits.getTrait(a.namespaces, d);
- if (p) {
- a = p.name.getMangledName();
- switch(p.kind) {
- case 1:
- this.sec.throwError("ReferenceError", b.Errors.CannotAssignToMethodError, d, this.axClass.name.name);
- case 2:
- this.sec.throwError("ReferenceError", b.Errors.ConstWriteError, d, this.axClass.name.name);
- case 4:
- ;
- case 6:
- 104 !== g && this.sec.throwError("ReferenceError", b.Errors.ConstWriteError, d, this.axClass.name.name), f = !0;
- }
- (g = p.getType()) && (c = g.axCoerce(c));
- } else {
- a = "$Bg" + d;
- }
- this[a] = c;
- f && Object.defineProperty(this, a, {__proto__:null, writable:!1});
- }
- };
- a.prototype.axGetProperty = function(a) {
- a = this.axResolveMultiname(a);
- var b = this[a];
- return "function" === typeof b ? this.axGetMethod(a) : b;
- };
- a.prototype.axGetMethod = function(a) {
- var b = this._methodClosureCache;
- b || (Object.defineProperty(this, "_methodClosureCache", {value:Object.create(null)}), b = this._methodClosureCache);
- var c = b[a];
- c || (c = b[a] = this.sec.AXMethodClosure.Create(this, this[a]));
- return c;
- };
- a.prototype.axGetSuper = function(a, c) {
- var g = b.axCoerceName(a.name), g = c.parent.object.tPrototype.traits.getTrait(a.namespaces, g);
- if (2 === g.kind || 7 === g.kind) {
- g = g.get.call(this);
- } else {
- var d = g.name.getMangledName(), g = this[d];
- if ("function" === typeof g) {
- return this.axGetMethod(d);
- }
- }
- return g;
- };
- a.prototype.axSetSuper = function(a, c, g) {
- var d = b.axCoerceName(a.name);
- a = c.parent.object.tPrototype.traits.getTrait(a.namespaces, d);
- (c = a.getType()) && (g = c.axCoerce(g));
- 3 === a.kind || 7 === a.kind ? a.set.call(this, g) : this[a.name.getMangledName()] = g;
- };
- a.prototype.axDeleteProperty = function(a) {
- var c = b.axCoerceName(a.name);
- return this.traits.getTrait(a.namespaces, c) ? !1 : delete this[a.getPublicMangledName()];
- };
- a.prototype.axCallProperty = function(a, c, g) {
- a = this[this.axResolveMultiname(a)];
- b.validateCall(this.sec, a, c.length);
- return a.axApply(g ? null : this, c);
- };
- a.prototype.axCallSuper = function(a, c, g) {
- a = this.axResolveMultiname(a);
- c = c.parent.object.tPrototype[a];
- b.validateCall(this.sec, c, g.length);
- return c.axApply(this, g);
- };
- a.prototype.axConstructProperty = function(a, c) {
- var g = this[this.axResolveMultiname(a)];
- b.validateConstruct(this.sec, g, c.length);
- return g.axConstruct(c);
- };
- a.prototype.axHasPropertyInternal = function(a) {
- return this.axResolveMultiname(a) in this;
- };
- a.prototype.axHasOwnProperty = function(a) {
- a = this.axResolveMultiname(a);
- return this.hasOwnProperty(a) || this.axClass.tPrototype.hasOwnProperty(a);
- };
- a.prototype.axGetEnumerableKeys = function() {
- if (this.sec.isPrimitive(this)) {
- return [];
- }
- for (var a = Object.getPrototypeOf(this), b = Object.keys(this), c = [], g = 0;g < b.length;g++) {
- var d = b[g];
- e.isNumeric(d) ? c.push(d) : a.hasOwnProperty(d) || (d = J.stripPublicMangledName(d), void 0 !== d && c.push(d));
- }
- return c;
- };
- a.prototype.axGetPublicProperty = function(a) {
- return this[J.getPublicMangledName(a)];
- };
- a.prototype.axSetPublicProperty = function(a, b) {
- this[J.getPublicMangledName(a)] = b;
- };
- a.prototype.axCallPublicProperty = function(a, b) {
- return this[J.getPublicMangledName(a)].axApply(this, b);
- };
- a.prototype.axDeletePublicProperty = function(a) {
- return delete this[J.getPublicMangledName(a)];
- };
- a.prototype.axGetSlot = function(a) {
- return this[this.traits.getSlot(a).name.getMangledName()];
- };
- a.prototype.axSetSlot = function(a, b) {
- var c = this.traits.getSlot(a), g = c.name.getMangledName(), c = c.getType();
- this[g] = c ? c.axCoerce(b) : b;
- };
- a.prototype.axNextNameIndex = function(a) {
- 0 === a && w(this, "axEnumerableKeys", this.axGetEnumerableKeys());
- for (var b = this.axEnumerableKeys;a < b.length;) {
- K.name = b[a];
- if (this.axHasPropertyInternal(K)) {
- return a + 1;
- }
- a++;
- }
- return 0;
- };
- a.prototype.axNextName = function(a) {
- return this.axEnumerableKeys[a - 1];
- };
- a.prototype.axNextValue = function(a) {
- return this.axGetPublicProperty(this.axNextName(a));
- };
- a.prototype.axSetNumericProperty = function(a, b) {
- this.axSetPublicProperty(a, b);
- };
- a.prototype.axGetNumericProperty = function(a) {
- return this.axGetPublicProperty(a);
- };
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }();
- h.ASObject = O;
- var S = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- b.prototype.axCoerce = function(a) {
- return a;
- };
- Object.defineProperty(b.prototype, "prototype", {get:function() {
- return this.dPrototype;
- }, enumerable:!0, configurable:!0});
- b.classInitializer = null;
- return b;
- }(O);
- h.ASClass = S;
- var P = function(g) {
- function f() {
- g.call(this);
- this.value = a(this.sec, arguments);
- }
- __extends(f, g);
- f.classInitializer = function() {
- var a = this.dPrototype, b = f.prototype;
- w(this, "$BgCASEINSENSITIVE", 1);
- w(this, "$BgDESCENDING", 2);
- w(this, "$BgUNIQUESORT", 4);
- w(this, "$BgRETURNINDEXEDARRAY", 8);
- w(this, "$BgNUMERIC", 16);
- d(a, "$Bgpush", b.generic_push);
- d(a, "$Bgpop", b.generic_pop);
- d(a, "$Bgshift", b.generic_shift);
- d(a, "$Bgunshift", b.generic_unshift);
- d(a, "$Bgreverse", b.generic_reverse);
- d(a, "$Bgconcat", b.generic_concat);
- d(a, "$Bgslice", b.generic_slice);
- d(a, "$Bgsplice", b.generic_splice);
- d(a, "$Bgjoin", b.generic_join);
- d(a, "$BgtoString", b.generic_toString);
- d(a, "$BgindexOf", b.generic_indexOf);
- d(a, "$BglastIndexOf", b.generic_lastIndexOf);
- d(a, "$Bgevery", b.generic_every);
- d(a, "$Bgsome", b.generic_some);
- d(a, "$BgforEach", b.generic_forEach);
- d(a, "$Bgmap", b.generic_map);
- d(a, "$Bgfilter", b.generic_filter);
- d(a, "$Bgsort", b.generic_sort);
- d(a, "$BgsortOn", b.generic_sortOn);
- d(a, "$BghasOwnProperty", b.native_hasOwnProperty);
- d(a, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable);
- d(a, "$BgtoLocaleString", b.generic_toString);
- };
- f.prototype.native_hasOwnProperty = function(a) {
- return this.axHasOwnProperty(m(a));
- };
- f.prototype.native_propertyIsEnumerable = function(a) {
- if ("number" === typeof a || e.isNumeric(a = b.axCoerceName(a))) {
- return a = Object.getOwnPropertyDescriptor(this.value, a), !!a && a.enumerable;
- }
- g.prototype.native_propertyIsEnumerable.call(this, a);
- };
- f.axApply = function(b, c) {
- return this.sec.createArrayUnsafe(a(this.sec, c));
- };
- f.axConstruct = function(b) {
- return this.sec.createArrayUnsafe(a(this.sec, b));
- };
- f.prototype.push = function() {
- if (4294967295 < this.value.length + arguments.length) {
- for (var a = 4294967295 - this.value.length, b = 0;b < a;b++) {
- this.value.push(arguments[b]);
- }
- return 4294967295;
- }
- return this.value.push.apply(this.value, arguments);
- };
- f.prototype.generic_push = function() {
- if (this && this.value instanceof Array) {
- return this.push.apply(this, arguments);
- }
- for (var a = this.axGetPublicProperty("length") >>> 0, b = 0;b < arguments.length;b++) {
- this.axSetNumericProperty(a++, arguments[b]);
- }
- this.axSetPublicProperty("length", a);
- return a;
- };
- f.prototype.pop = function() {
- return this.value.pop();
- };
- f.prototype.generic_pop = function() {
- if (this && this.value instanceof Array) {
- return this.value.pop();
- }
- var a = this.axGetPublicProperty("length") >>> 0;
- if (a) {
- var c = this.axGetNumericProperty(a - 1);
- K.name = a - 1;
- K.namespaces = [b.Namespace.PUBLIC];
- this.axDeleteProperty(K);
- this.axSetPublicProperty("length", a - 1);
- return c;
- }
- this.axSetPublicProperty("length", 0);
- };
- f.prototype.shift = function() {
- return this.value.shift();
- };
- f.prototype.generic_shift = function() {
- return c(this).shift();
- };
- f.prototype.unshift = function() {
- return this.value.unshift.apply(this.value, arguments);
- };
- f.prototype.generic_unshift = function() {
- var a = c(this);
- return a.value.unshift.apply(a.value, arguments);
- };
- f.prototype.reverse = function() {
- this.value.reverse();
- return this;
- };
- f.prototype.generic_reverse = function() {
- return c(this).reverse();
- };
- f.prototype.concat = function() {
- for (var a = this.value.slice(), b = 0;b < arguments.length;b++) {
- var c = arguments[b];
- "object" === typeof c && c && c.sec && Array.isArray(c.value) ? a.push.apply(a, c.value) : a.push(c);
- }
- return this.sec.createArrayUnsafe(a);
- };
- f.prototype.generic_concat = function() {
- return c(this).concat.apply(this, arguments);
- };
- f.prototype.slice = function(a, b) {
- return this.sec.createArray(this.value.slice(a, b));
- };
- f.prototype.generic_slice = function(a, b) {
- return c(this).slice(a, b);
- };
- f.prototype.splice = function() {
- var a = this.value;
- return 0 === arguments.length ? void 0 : this.sec.createArray(a.splice.apply(a, arguments));
- };
- f.prototype.generic_splice = function() {
- return c(this).splice.apply(this, arguments);
- };
- f.prototype.join = function(a) {
- return this.value.join(a);
- };
- f.prototype.generic_join = function(a) {
- return c(this).join(a);
- };
- f.prototype.toString = function() {
- return this.value.join(",");
- };
- f.prototype.generic_toString = function() {
- return c(this).join(",");
- };
- f.prototype.indexOf = function(a, b) {
- return this.value.indexOf(a, b | 0);
- };
- f.prototype.generic_indexOf = function(a, b) {
- return c(this).indexOf(a, b | 0);
- };
- f.prototype.lastIndexOf = function(a, b) {
- return this.value.lastIndexOf(a, 1 < arguments.length ? b : 2147483647);
- };
- f.prototype.generic_lastIndexOf = function(a, b) {
- return c(this).lastIndexOf(a, 1 < arguments.length ? b : 2147483647);
- };
- f.prototype.every = function(a, c) {
- if (!a || !a.value || "function" !== typeof a.value) {
- return !0;
- }
- c = b.ensureBoxedReceiver(this.sec, c, a);
- for (var g = this.value, d = 0;d < g.length;d++) {
- if (!0 !== a.value.call(c, g[d], d, this)) {
- return !1;
- }
- }
- return !0;
- };
- f.prototype.generic_every = function(a, b) {
- return c(this).every(a, b);
- };
- f.prototype.some = function(a, c) {
- if (!a || !a.value || "function" !== typeof a.value) {
- return !1;
- }
- c = b.ensureBoxedReceiver(this.sec, c, a);
- var g = this;
- return this.value.some(function(b, d, f) {
- return a.value.call(c, b, d, g);
- });
- };
- f.prototype.generic_some = function(a, b) {
- return c(this).some(a, b);
- };
- f.prototype.forEach = function(a, c) {
- if (a && a.value && "function" === typeof a.value) {
- c = b.ensureBoxedReceiver(this.sec, c, a);
- var g = this;
- this.value.forEach(function(b, d) {
- a.value.call(c, b, d, g);
- });
- }
- };
- f.prototype.generic_forEach = function(a, b) {
- return c(this).forEach(a, b);
- };
- f.prototype.map = function(a, c) {
- if (!a || !a.value || "function" !== typeof a.value) {
- return this.sec.createArrayUnsafe([]);
- }
- c = b.ensureBoxedReceiver(this.sec, c, a);
- var g = this;
- return this.sec.createArrayUnsafe(this.value.map(function(b, d) {
- return a.value.call(c, b, d, g);
- }));
- };
- f.prototype.generic_map = function(a, b) {
- return c(this).map(a, b);
- };
- f.prototype.filter = function(a, c) {
- if (!a || !a.value || "function" !== typeof a.value) {
- return this.sec.createArrayUnsafe([]);
- }
- c = b.ensureBoxedReceiver(this.sec, c, a);
- for (var g = [], d = this.value, f = 0;f < d.length;f++) {
- !0 === a.value.call(c, d[f], f, this) && g.push(d[f]);
- }
- return this.sec.createArrayUnsafe(g);
- };
- f.prototype.generic_filter = function(a, b) {
- return c(this).filter(a, b);
- };
- f.prototype.toLocaleString = function() {
- for (var a = this.sec.AXArray.axCoerce(this).value, b = "", c = 0, g = a.length;c < g;c++) {
- var d = a[c];
- null !== d && void 0 !== d && (b += d.toLocaleString());
- c + 1 < g && (b += ",");
- }
- return b;
- };
- f.prototype.sort = function() {
- var a = this.value;
- if (0 === arguments.length) {
- return a.sort(), this;
- }
- var c, g = 0;
- this.sec.AXFunction.axIsInstanceOf(arguments[0]) ? c = arguments[0].value : e.isNumber(arguments[0]) && (g = arguments[0]);
- e.isNumber(arguments[1]) && (g = arguments[1]);
- if (!g) {
- return a.sort(c), this;
- }
- c || (c = b.axDefaultCompareFunction);
- var d = g & 2 ? -1 : 1;
- a.sort(function(a, f) {
- return b.axCompare(a, f, g, d, c);
- });
- return this;
- };
- f.prototype.generic_sort = function() {
- return c(this).sort.apply(this, arguments);
- };
- f.prototype.sortOn = function(a, c) {
- 0 === arguments.length && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "Array/http://adobe.com/AS3/2006/builtin::sortOn()", "1", "0");
- var g = this.value, d = [];
- if (e.isString(a)) {
- a = [J.getPublicMangledName(a)], d = [c | 0];
- } else {
- if (a && Array.isArray(a.value)) {
- a = a.value;
- for (var f = 0;f < a.length;f++) {
- a[f] = J.getPublicMangledName(a[f]);
- }
- if (c && Array.isArray(c.value)) {
- if (c = c.value, c.length === a.length) {
- for (f = 0;f < c.length;f++) {
- d[f] = c[f] | 0;
- }
- } else {
- for (f = 0;f < a.length;f++) {
- d[f] = 0;
- }
- }
- } else {
- for (var p = c | 0, f = 0;f < a.length;f++) {
- d[f] = p;
- }
- }
- } else {
- return this;
- }
- }
- p = d[0];
- g.sort(function(c, g) {
- return b.axCompareFields(c, g, a, d);
- });
- return this;
- };
- f.prototype.generic_sortOn = function() {
- return c(this).sortOn.apply(this, arguments);
- };
- Object.defineProperty(f.prototype, "length", {get:function() {
- return this.value.length;
- }, set:function(a) {
- this.value.length = a >>> 0;
- }, enumerable:!0, configurable:!0});
- f.prototype.axGetEnumerableKeys = function() {
- return Object.keys(this.value).concat(g.prototype.axGetEnumerableKeys.call(this));
- };
- f.prototype.axHasPropertyInternal = function(a) {
- var c = a.name;
- return "number" === typeof c || e.isNumeric(c = b.axCoerceName(c)) ? c in this.value : this.traits.getTrait(a.namespaces, c) ? !0 : "$Bg" + c in this;
- };
- f.prototype.axHasOwnProperty = function(a) {
- var c = a.name;
- return "number" === typeof c || e.isNumeric(c = b.axCoerceName(c)) ? this.value.hasOwnProperty(c) : !!this.traits.getTrait(a.namespaces, c) || this.hasOwnProperty("$Bg" + c);
- };
- f.prototype.axGetProperty = function(a) {
- var c = a.name;
- return "number" === typeof c || e.isNumeric(c = b.axCoerceName(c)) ? this.value[c] : g.prototype.axGetProperty.call(this, a);
- };
- f.prototype.axSetProperty = function(a, c, d) {
- var f = a.name;
- "number" === typeof f || e.isNumeric(f = b.axCoerceName(f)) ? this.value[f] = c : g.prototype.axSetProperty.call(this, a, c, d);
- };
- f.prototype.axDeleteProperty = function(a) {
- var c = a.name;
- return "number" === typeof c || e.isNumeric(c = b.axCoerceName(c)) ? delete this.value[c] : this.traits.getTrait(a.namespaces, c) ? !1 : delete this["$Bg" + c];
- };
- f.prototype.axGetPublicProperty = function(a) {
- return "number" === typeof a || e.isNumeric(a = b.axCoerceName(a)) ? this.value[a] : this["$Bg" + a];
- };
- f.prototype.axSetPublicProperty = function(a, c) {
- "number" === typeof a || e.isNumeric(a = b.axCoerceName(a)) ? this.value[a] = c : this["$Bg" + a] = c;
- };
- return f;
- }(O);
- h.ASArray = P;
- var N = function(a) {
- function c() {
- a.apply(this, arguments);
- this._prototypeInitialzed = !1;
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgtoString", b.toString);
- d(a, "$Bgcall", b.call);
- d(a, "$Bgapply", b.apply);
- w(a, "value", b.native_functionValue);
- };
- c.prototype.axConstruct = function(a) {
- var b = this.prototype;
- y(b) && (b = this.sec.AXFunctionUndefinedPrototype);
- b = Object.create(b);
- b.__ctorFunction = this;
- this.value.apply(b, a);
- return b;
- };
- c.prototype.axIsInstanceOf = function(a) {
- return a && a.__ctorFunction === this;
- };
- c.prototype.native_functionValue = function() {
- };
- Object.defineProperty(c.prototype, "prototype", {get:function() {
- this._prototypeInitialzed || (this._prototype = Object.create(this.sec.AXObject.tPrototype), this._prototypeInitialzed = !0);
- return this._prototype;
- }, set:function(a) {
- y(a) ? a = void 0 : ("object" !== typeof a || this.sec.isPrimitive(a)) && this.sec.throwError("TypeError", b.Errors.PrototypeTypeError);
- this._prototypeInitialzed = !0;
- this._prototype = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "length", {get:function() {
- return this.value.length;
- }, enumerable:!0, configurable:!0});
- c.prototype.toString = function() {
- return "function Function() {}";
- };
- c.prototype.call = function(a) {
- a = b.ensureBoxedReceiver(this.sec, a, this);
- return this.value.apply(a, b.sliceArguments(arguments, 1));
- };
- c.prototype.apply = function(a, c) {
- a = b.ensureBoxedReceiver(this.sec, a, this);
- return this.value.apply(a, c ? c.value : void 0);
- };
- c.prototype.axCall = function(a) {
- return this.value.apply(a, b.sliceArguments(arguments, 1));
- };
- c.prototype.axApply = function(a, b) {
- return this.value.apply(a, b);
- };
- return c;
- }(O);
- h.ASFunction = N;
- var Q = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- w(a, "$Bgcall", b.call);
- w(a, "$Bgapply", b.apply);
- };
- c.Create = function(a, b) {
- var c = Object.create(this.sec.AXMethodClosure.tPrototype);
- c.receiver = a;
- c.value = b;
- c.methodInfo = b.methodInfo;
- return c;
- };
- Object.defineProperty(c.prototype, "prototype", {get:function() {
- return null;
- }, set:function(a) {
- this.sec.throwError("ReferenceError", b.Errors.ConstWriteError, "prototype", "MethodClosure");
- }, enumerable:!0, configurable:!0});
- c.prototype.axCall = function(a) {
- return this.value.apply(this.receiver, b.sliceArguments(arguments, 1));
- };
- c.prototype.axApply = function(a, b) {
- return this.value.apply(this.receiver, b);
- };
- c.prototype.call = function(a) {
- return this.value.apply(this.receiver, b.sliceArguments(arguments, 1));
- };
- c.prototype.apply = function(a, b) {
- return this.value.apply(this.receiver, b ? b.value : void 0);
- };
- return c;
- }(N);
- h.ASMethodClosure = Q;
- var V = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- b.classInitializer = function() {
- var a = this.dPrototype, c = b.prototype;
- d(a, "$BgtoString", c.toString);
- d(a, "$BgvalueOf", c.valueOf);
- };
- b.prototype.toString = function() {
- return this.value.toString();
- };
- b.prototype.valueOf = function() {
- return this.value.valueOf();
- };
- return b;
- }(O);
- h.ASBoolean = V;
- var W = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgindexOf", b.generic_indexOf);
- d(a, "$BglastIndexOf", b.generic_lastIndexOf);
- d(a, "$BgcharAt", b.generic_charAt);
- d(a, "$BgcharCodeAt", b.generic_charCodeAt);
- d(a, "$Bgconcat", b.generic_concat);
- d(a, "$BglocaleCompare", b.generic_localeCompare);
- d(a, "$Bgmatch", b.generic_match);
- d(a, "$Bgreplace", b.generic_replace);
- d(a, "$Bgsearch", b.generic_search);
- d(a, "$Bgslice", b.generic_slice);
- d(a, "$Bgsplit", b.generic_split);
- d(a, "$Bgsubstring", b.generic_substring);
- d(a, "$Bgsubstr", b.generic_substr);
- d(a, "$BgtoLowerCase", b.generic_toLowerCase);
- d(a, "$BgtoLocaleLowerCase", b.generic_toLowerCase);
- d(a, "$BgtoUpperCase", b.generic_toUpperCase);
- d(a, "$BgtoLocaleUpperCase", b.generic_toUpperCase);
- d(a, "$BgtoString", b.toString);
- d(a, "$BgtoString", b.public_toString);
- d(a, "$BgvalueOf", b.public_valueOf);
- d(this, "$BgfromCharCode", c.fromCharCode);
- };
- c.fromCharCode = function() {
- for (var a = [], b = 0;b < arguments.length;b++) {
- a[b - 0] = arguments[b];
- }
- return String.fromCharCode.apply(null, a);
- };
- c.prototype.indexOf = function(a, b) {
- return this.value.indexOf(a, b);
- };
- c.prototype.lastIndexOf = function(a, b) {
- return this.value.lastIndexOf(a, b);
- };
- c.prototype.charAt = function(a) {
- return this.value.charAt(a);
- };
- c.prototype.charCodeAt = function(a) {
- return this.value.charCodeAt(a);
- };
- c.prototype.concat = function() {
- return this.value.concat.apply(this.value, arguments);
- };
- c.prototype.localeCompare = function(a) {
- 1 < arguments.length && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "Function/()", 0, 2);
- var c = this.value;
- a = String(a);
- if (a === c) {
- return 0;
- }
- for (var g = Math.min(c.length, a.length), d = 0;d < g;d++) {
- if (c[d] !== a[d]) {
- return c.charCodeAt(d) - a.charCodeAt(d);
- }
- }
- return c.length > a.length ? 1 : -1;
- };
- c.prototype.match = function(a) {
- a = this.sec.AXRegExp.axIsType(a) ? a.value : b.axCoerceString(a);
- a = this.value.match(a);
- if (!a) {
- return null;
- }
- try {
- return r(this.sec, a);
- } catch (c) {
- return null;
- }
- };
- c.prototype.replace = function(a, c) {
- a = this.sec.AXRegExp.axIsType(a) ? a.value : b.axCoerceString(a);
- this.sec.AXFunction.axIsType(c) && (c = c.value);
- try {
- return this.value.replace(a, c);
- } catch (g) {
- return this.value;
- }
- };
- c.prototype.search = function(a) {
- a = this.sec.AXRegExp.axIsType(a) ? a.value : b.axCoerceString(a);
- try {
- return this.value.search(a);
- } catch (c) {
- return -1;
- }
- };
- c.prototype.slice = function(a, b) {
- a = 1 > arguments.length ? 0 : a | 0;
- b = 2 > arguments.length ? 4294967295 : b | 0;
- return this.value.slice(a, b);
- };
- c.prototype.split = function(a, c) {
- a = this.sec.AXRegExp.axIsType(a) ? a.value : b.axCoerceString(a);
- try {
- return this.sec.createArray(this.value.split(a, void 0 === c ? -1 : c | 0));
- } catch (g) {
- return this.sec.createArrayUnsafe([this.value]);
- }
- };
- c.prototype.substring = function(a, b) {
- return this.value.substring(a, b);
- };
- c.prototype.substr = function(a, b) {
- return this.value.substr(a, b);
- };
- c.prototype.toLocaleLowerCase = function() {
- return this.value.toLowerCase();
- };
- c.prototype.toLowerCase = function() {
- return as3Compatibility ? as3ToLowerCase(this.value) : this.value.toLowerCase();
- };
- c.prototype.toLocaleUpperCase = function() {
- return this.value.toUpperCase();
- };
- c.prototype.toUpperCase = function() {
- return this.value.toUpperCase();
- };
- c.prototype.generic_indexOf = function(a, b) {
- return String.prototype.indexOf.call(void 0 == this ? "" : this, a, b);
- };
- c.prototype.generic_lastIndexOf = function(a, b) {
- return String.prototype.lastIndexOf.call(void 0 == this ? "" : this, a, b);
- };
- c.prototype.generic_charAt = function(a) {
- return String.prototype.charAt.call(void 0 == this ? "" : this, a);
- };
- c.prototype.generic_charCodeAt = function(a) {
- return String.prototype.charCodeAt.call(void 0 == this ? "" : this, a);
- };
- c.prototype.generic_concat = function() {
- return String.prototype.concat.apply(void 0 == this ? "" : this, arguments);
- };
- c.prototype.generic_localeCompare = function(a) {
- var b = this.sec.AXString.axBox(String(this));
- return b.localeCompare.apply(b, arguments);
- };
- c.prototype.generic_match = function(a) {
- return this.sec.AXString.axBox(String(this)).match(a);
- };
- c.prototype.generic_replace = function(a, b) {
- return this.sec.AXString.axBox(String(this)).replace(a, b);
- };
- c.prototype.generic_search = function(a) {
- return this.sec.AXString.axBox(String(this)).search(a);
- };
- c.prototype.generic_slice = function(a, b) {
- return String.prototype.slice.call(void 0 == this ? "" : this, a, b);
- };
- c.prototype.generic_split = function(a, b) {
- b = 2 > arguments.length ? 4294967295 : b | 0;
- return this.sec.AXString.axBox(String(this)).split(a, b);
- };
- c.prototype.generic_substring = function(a, b) {
- return String.prototype.substring.call(void 0 == this ? "" : this, a, b);
- };
- c.prototype.generic_substr = function(a, b) {
- return String.prototype.substr.call(void 0 == this ? "" : this, a, b);
- };
- c.prototype.generic_toLowerCase = function() {
- var a = void 0 == this ? "" : this;
- if (as3Compatibility) {
- return as3ToLowerCase(String(a));
- }
- String.prototype.toLowerCase.call(a);
- };
- c.prototype.generic_toUpperCase = function() {
- return String.prototype.toUpperCase.call(void 0 == this ? "" : this);
- };
- c.prototype.toString = function() {
- return this.value.toString();
- };
- c.prototype.public_toString = function() {
- if (this === this.sec.AXString.dPrototype) {
- return "";
- }
- this.axClass !== this.sec.AXString && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "String.prototype.toString");
- return this.value.toString();
- };
- c.prototype.valueOf = function() {
- return this.value.valueOf();
- };
- c.prototype.public_valueOf = function() {
- if (this === this.sec.AXString.dPrototype) {
- return "";
- }
- this.axClass !== this.sec.AXString && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "String.prototype.valueOf");
- return this.value.valueOf();
- };
- Object.defineProperty(c.prototype, "length", {get:function() {
- return this.value.length;
- }, enumerable:!0, configurable:!0});
- c.classNatives = [String];
- return c;
- }(O);
- h.ASString = W;
- var R = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgtoString", b.toString);
- d(a, "$BgtoLocaleString", b.toString);
- d(a, "$BgvalueOf", b.valueOf);
- d(a, "$BgtoFixed", b.toFixed);
- d(a, "$BgtoExponential", b.toExponential);
- d(a, "$BgtoPrecision", b.toPrecision);
- w(this, "$BgNaN", Number.NaN);
- w(this, "$BgNEGATIVE_INFINITY", -1 / 0);
- w(this, "$BgPOSITIVE_INFINITY", 1 / 0);
- w(this, "$BgMAX_VALUE", Number.MAX_VALUE);
- w(this, "$BgMIN_VALUE", Number.MIN_VALUE);
- w(this, "$BgE", Math.E);
- w(this, "$BgLN10", Math.LN10);
- w(this, "$BgLN2", Math.LN2);
- w(this, "$BgLOG10E", Math.LOG10E);
- w(this, "$BgLOG2E", Math.LOG2E);
- w(this, "$BgPI", Math.PI);
- w(this, "$BgSQRT1_2", Math.SQRT2);
- w(this, "$BgSQRT2", Math.SQRT2);
- };
- c.prototype.toString = function(a) {
- 0 === arguments.length ? a = 10 : (a |= 0, (2 > a || 36 < a) && this.sec.throwError("RangeError", b.Errors.InvalidRadixError, a));
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.toString");
- return this.value.toString(a);
- };
- c.prototype.valueOf = function() {
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.valueOf");
- return this.value;
- };
- c.prototype.toExponential = function(a) {
- a |= 0;
- (0 > a || 20 < a) && this.sec.throwError("RangeError", b.Errors.InvalidPrecisionError);
- return this.axClass !== this.sec.AXNumber ? "NaN" : this.value.toExponential(a);
- };
- c.prototype.toPrecision = function(a) {
- a = a ? a | 0 : 1;
- (1 > a || 21 < a) && this.sec.throwError("RangeError", b.Errors.InvalidPrecisionError);
- return this.axClass !== this.sec.AXNumber ? "NaN" : this.value.toPrecision(a);
- };
- c.prototype.toFixed = function(a) {
- a |= 0;
- (0 > a || 20 < a) && this.sec.throwError("RangeError", b.Errors.InvalidPrecisionError);
- return this.axClass !== this.sec.AXNumber ? "NaN" : this.value.toFixed(a);
- };
- c._minValue = function() {
- return Number.MIN_VALUE;
- };
- c.convertStringToDouble = function(a) {
- var b = a.indexOf(String.fromCharCode(0));
- return 0 <= b ? +a.substring(0, b) : +a;
- };
- c.classNatives = [Math];
- return c;
- }(O);
- h.ASNumber = R;
- var L = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgtoString", b.toString);
- d(a, "$BgtoLocaleString", b.toString);
- d(a, "$BgvalueOf", b.valueOf);
- w(this, "$BgMAX_VALUE", 2147483647);
- w(this, "$BgMIN_VALUE", -2147483648);
- };
- c.prototype.toString = function(a) {
- 0 === arguments.length ? a = 10 : (a |= 0, (2 > a || 36 < a) && this.sec.throwError("RangeError", b.Errors.InvalidRadixError, a));
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.toString");
- return this.value.toString(a);
- };
- c.prototype.valueOf = function() {
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.valueOf");
- return this.value;
- };
- c.staticNatives = [Math];
- c.instanceNatives = [R.prototype];
- return c;
- }(R);
- h.ASInt = L;
- var U = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgtoString", b.toString);
- d(a, "$BgtoLocaleString", b.toString);
- d(a, "$BgvalueOf", b.valueOf);
- w(this, "$BgMAX_VALUE", 4294967295);
- w(this, "$BgMIN_VALUE", 0);
- };
- c.prototype.toString = function(a) {
- 0 === arguments.length ? a = 10 : (a |= 0, (2 > a || 36 < a) && this.sec.throwError("RangeError", b.Errors.InvalidRadixError, a));
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.toString");
- return this.value.toString(a);
- };
- c.prototype.valueOf = function() {
- this.axClass !== this.sec.AXNumber && this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "Number.prototype.valueOf");
- return this.value;
- };
- c.staticNatives = [Math];
- c.instanceNatives = [R.prototype];
- return c;
- }(R);
- h.ASUint = U;
- var aa = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- b.classNatives = [Math];
- b.classInitializer = function() {
- w(this, "$BgE", Math.E);
- w(this, "$BgLN10", Math.LN10);
- w(this, "$BgLN2", Math.LN2);
- w(this, "$BgLOG10E", Math.LOG10E);
- w(this, "$BgLOG2E", Math.LOG2E);
- w(this, "$BgPI", Math.PI);
- w(this, "$BgSQRT1_2", Math.SQRT2);
- w(this, "$BgSQRT2", Math.SQRT2);
- };
- return b;
- }(O);
- h.ASMath = aa;
- var X = function(a) {
- function c(g, d) {
- a.call(this);
- this._extended = this._dotall = !1;
- this._captureNames = [];
- var f;
- if (void 0 === g) {
- g = f = "";
- } else {
- if (this.sec.AXRegExp.axIsType(g)) {
- d && this.sec.throwError("TypeError", b.Errors.RegExpFlagsArgumentError), f = g.source, g = g.value;
- } else {
- g = String(g);
- f = g.replace(/(^|^[\/]|(?:\\\\)+)\//g, "$1\\/");
- if (d) {
- var p = d;
- d = "";
- for (var k = 0;k < p.length;k++) {
- var q = p[k];
- switch(q) {
- case "s":
- this._dotall = !0;
- break;
- case "x":
- this._extended = !0;
- break;
- case "g":
- ;
- case "i":
- ;
- case "m":
- d += q;
- }
- }
- }
- g = this._parse(f);
- }
- }
- try {
- this.value = new RegExp(g, d);
- } catch (v) {
- this.value = new RegExp(c.UNMATCHABLE_PATTERN, d);
- }
- this._source = f;
- }
- __extends(c, a);
- c.prototype._parse = function(a) {
- for (var b = "", g = this._captureNames, d = [], f = 0, p = 0;p < a.length;p++) {
- var k = a[p];
- switch(k) {
- case "(":
- b += k;
- d.push(1 < f ? f - 1 : f);
- f = 0;
- if ("?" === a[p + 1]) {
- switch(a[p + 2]) {
- case ":":
- ;
- case "=":
- ;
- case "!":
- b += "?" + a[p + 2];
- p += 2;
- break;
- default:
- if (/\(\?P<([\w$]+)>/.exec(a.substr(p))) {
- k = RegExp.$1, "length" !== k && g.push(k), g.indexOf(k), p += RegExp.lastMatch.length - 1;
- } else {
- return c.UNMATCHABLE_PATTERN;
- }
- ;
- }
- } else {
- g.push(null);
- }
- if (406 < g.length) {
- return c.UNMATCHABLE_PATTERN;
- }
- break;
- case ")":
- if (!d.length) {
- return c.UNMATCHABLE_PATTERN;
- }
- b += k;
- f = d.pop() + 1;
- break;
- case "|":
- b += k;
- break;
- case "\\":
- b += k;
- /\\|c[A-Z]|x[0-9,a-z,A-Z]{2}|u[0-9,a-z,A-Z]{4}|./.exec(a.substr(p + 1)) && (b += RegExp.lastMatch, p += RegExp.lastMatch.length);
- 1 >= f && f++;
- break;
- case "[":
- if (/\[[^\]]*\]/.exec(a.substr(p))) {
- b += RegExp.lastMatch, p += RegExp.lastMatch.length - 1, 1 >= f && f++;
- } else {
- return c.UNMATCHABLE_PATTERN;
- }
- break;
- case "{":
- if (/\{[^\{]*?(?:,[^\{]*?)?\}/.exec(a.substr(p))) {
- b += RegExp.lastMatch, p += RegExp.lastMatch.length - 1;
- } else {
- return c.UNMATCHABLE_PATTERN;
- }
- break;
- case ".":
- b = this._dotall ? b + "[\\s\\S]" : b + k;
- 1 >= f && f++;
- break;
- case "?":
- ;
- case "*":
- ;
- case "+":
- if (!f) {
- return c.UNMATCHABLE_PATTERN;
- }
- b += k;
- "?" === a[p + 1] && (p++, b += "?");
- break;
- case " ":
- if (this._extended) {
- break;
- }
- ;
- default:
- b += k, 1 >= f && f++;
- }
- if (32767 < b.length) {
- return c.UNMATCHABLE_PATTERN;
- }
- }
- return d.length ? c.UNMATCHABLE_PATTERN : b;
- };
- c.prototype.ecmaToString = function() {
- var a = "/" + this._source + "/";
- this.value.global && (a += "g");
- this.value.ignoreCase && (a += "i");
- this.value.multiline && (a += "m");
- this._dotall && (a += "s");
- this._extended && (a += "x");
- return a;
- };
- c.prototype.axCall = function(a) {
- return this.exec.apply(this, arguments);
- };
- c.prototype.axApply = function(a, b) {
- return this.exec.apply(this, b);
- };
- Object.defineProperty(c.prototype, "source", {get:function() {
- return this._source;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "global", {get:function() {
- return this.value.global;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "ignoreCase", {get:function() {
- return this.value.ignoreCase;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "multiline", {get:function() {
- return this.value.multiline;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "lastIndex", {get:function() {
- return this.value.lastIndex;
- }, set:function(a) {
- this.value.lastIndex = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "dotall", {get:function() {
- return this._dotall;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "extended", {get:function() {
- return this._extended;
- }, enumerable:!0, configurable:!0});
- c.prototype.exec = function(a) {
- void 0 === a && (a = "");
- a = this.value.exec(a);
- if (!a) {
- return null;
- }
- var b = r(this.sec, a), c = this._captureNames;
- if (c) {
- for (var g = 0;g < c.length;g++) {
- var d = c[g];
- if (null !== d) {
- var f = a[g + 1] || "";
- a[d] = f;
- b.axSetPublicProperty(d, f);
- }
- }
- return b;
- }
- };
- c.prototype.test = function(a) {
- void 0 === a && (a = "");
- return null !== this.exec(a);
- };
- c.UNMATCHABLE_PATTERN = "^(?!)$";
- c.classInitializer = function() {
- var a = this.dPrototype, b = c.prototype;
- d(a, "$BgtoString", b.ecmaToString);
- d(a, "$Bgexec", b.exec);
- d(a, "$Bgtest", b.test);
- };
- return c;
- }(O);
- h.ASRegExp = X;
- var T = function(a) {
- function c(b, g) {
- a.call(this);
- 1 > arguments.length && (b = "");
- this.$Bgmessage = String(b);
- this._errorID = g | 0;
- }
- __extends(c, a);
- c.throwError = function(a, c) {
- for (var g = [b.getErrorInfo(c)], d = 2;d < arguments.length;d++) {
- g.push(arguments[d]);
- }
- g = b.formatErrorMessage.apply(null, g);
- throw a.axConstruct([g, c]);
- };
- c.classInitializer = function(a) {
- w(this, "$Bglength", 1);
- w(this.dPrototype, "$Bgname", this.classInfo.instanceInfo.getName().name);
- a === c && (w(this.dPrototype, "$Bgmessage", "Error"), w(this.dPrototype, "$BgtoString", c.prototype.toString));
- };
- c.prototype.toString = function() {
- return "" !== this.$Bgmessage ? this.$Bgname + ": " + this.$Bgmessage : this.$Bgname;
- };
- Object.defineProperty(c.prototype, "errorID", {get:function() {
- return this._errorID;
- }, enumerable:!0, configurable:!0});
- c.prototype.getStackTrace = function() {
- return null;
- };
- c.getErrorMessage = e.AVMX.getErrorMessage;
- return c;
- }(O);
- h.ASError = T;
- var ca = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASDefinitionError = ca;
- var ba = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASEvalError = ba;
- var Z = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASRangeError = Z;
- var ea = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASReferenceError = ea;
- var da = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASSecurityError = da;
- var fa = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASSyntaxError = fa;
- var ha = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASTypeError = ha;
- var ka = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASURIError = ka;
- var ga = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASVerifyError = ga;
- var ia = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASUninitializedError = ia;
- var ja = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASArgumentError = ja;
- var la = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASIOError = la;
- var qa = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASEOFError = qa;
- var ra = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASMemoryError = ra;
- var sa = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(T);
- h.ASIllegalOperationError = sa;
- h.transformJSValueToAS = f;
- h.transformASValueToJS = k;
- var ta = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.parse = function(a, c) {
- void 0 === c && (c = null);
- a = b.axCoerceString(a);
- null === c || b.axIsCallable(c) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, c, "Function");
- null === a && this.sec.throwError("SyntaxError", b.Errors.JSONInvalidParseInput);
- try {
- var g = f(this.sec, JSON.parse(a), !0);
- } catch (d) {
- this.sec.throwError("SyntaxError", b.Errors.JSONInvalidParseInput);
- }
- return null === c ? g : u(this.sec, {"":g}, "", c.value);
- };
- c.stringify = function(a, c, g) {
- void 0 === c && (c = null);
- void 0 === g && (g = null);
- if (null !== c) {
- var d = "object" === typeof c ? c.sec : null;
- d && (d.AXFunction.axIsType(c) || d.AXArray.axIsType(c)) || this.sec.throwError("TypeError", b.Errors.JSONInvalidReplacer);
- }
- g = "string" === typeof g ? 10 < g.length ? g.substring(0, 10) : g : "number" === typeof g ? " ".substring(0, Math.min(10, g | 0)) : "";
- return null === c ? this.stringifySpecializedToString(a, null, null, g) : d.AXArray.axIsType(c) ? this.stringifySpecializedToString(a, this.computePropertyList(c.value), null, g) : this.stringifySpecializedToString(a, null, c.value, g);
- };
- c.computePropertyList = function(a) {
- for (var c = [], g = Object.create(null), d = 0, f = a.length;d < f;d++) {
- if (a.hasOwnProperty(d)) {
- var p = a[d], k = null;
- "string" === typeof p ? k = p : "number" === typeof p && (k = b.axCoerceString(p));
- null === k || g[k] || (g[k] = !0, c.push(k));
- }
- }
- return c;
- };
- c.stringifySpecializedToString = function(a, c, g, d) {
- try {
- return void 0 === a ? "null" : JSON.stringify(k(this.sec, a, !0), g, d);
- } catch (f) {
- this.sec.throwError("TypeError", b.Errors.JSONCyclicStructure);
- }
- };
- return c;
- }(O);
- h.ASJSON = ta;
- var Y = e.ObjectUtilities.createMap(), D = e.ObjectUtilities.createMap(), na = [];
- h.initializeBuiltins = function() {
- Y.Object = O;
- Y.Class = S;
- Y.Function = N;
- Y.Boolean = V;
- Y["builtin.as$0.MethodClosure"] = Q;
- Y.Namespace = h.ASNamespace;
- Y.Number = R;
- Y["int"] = L;
- Y.uint = U;
- Y.String = W;
- Y.Array = P;
- Y["__AS3__.vec.Vector"] = h.Vector;
- Y["__AS3__.vec.Vector$object"] = h.GenericVector;
- Y["__AS3__.vec.Vector$int"] = h.Int32Vector;
- Y["__AS3__.vec.Vector$uint"] = h.Uint32Vector;
- Y["__AS3__.vec.Vector$double"] = h.Float64Vector;
- Y.Namespace = h.ASNamespace;
- Y.QName = h.ASQName;
- Y.XML = h.ASXML;
- Y.XMLList = h.ASXMLList;
- Y["flash.xml.XMLNode"] = h.flash.xml.XMLNode;
- Y["flash.xml.XMLDocument"] = h.flash.xml.XMLDocument;
- Y["flash.xml.XMLParser"] = h.flash.xml.XMLParser;
- Y["flash.xml.XMLTag"] = h.flash.xml.XMLTag;
- Y["flash.xml.XMLNodeType"] = h.flash.xml.XMLNodeType;
- Y.Math = aa;
- Y.Date = h.ASDate;
- Y.RegExp = X;
- Y.JSON = ta;
- Y["flash.utils.Proxy"] = h.flash.utils.ASProxy;
- Y["flash.utils.Dictionary"] = h.flash.utils.Dictionary;
- Y["flash.utils.ByteArray"] = h.flash.utils.ByteArray;
- Y["avmplus.System"] = h.flash.system.OriginalSystem;
- Y.Error = T;
- Y.DefinitionError = ca;
- Y.EvalError = ba;
- Y.RangeError = Z;
- Y.ReferenceError = ea;
- Y.SecurityError = da;
- Y.SyntaxError = fa;
- Y.TypeError = ha;
- Y.URIError = ka;
- Y.VerifyError = ga;
- Y.UninitializedError = ia;
- Y.ArgumentError = ja;
- Y["flash.errors.IOError"] = la;
- Y["flash.errors.EOFError"] = qa;
- Y["flash.errors.MemoryError"] = ra;
- Y["flash.errors.IllegalOperationError"] = sa;
- };
- h.registerNativeClass = q;
- h.registerNativeFunction = g;
- q("__AS3__.vec.Vector$object", h.GenericVector, "ObjectVector", 2);
- q("__AS3__.vec.Vector$int", h.Int32Vector, "Int32Vector", 2);
- q("__AS3__.vec.Vector$uint", h.Uint32Vector, "Uint32Vector", 2);
- q("__AS3__.vec.Vector$double", h.Float64Vector, "Float64Vector", 2);
- h.FlashUtilScript_getTimer = p;
- h.FlashNetScript_navigateToURL = v;
- g("FlashUtilScript::getDefinitionByName", function(a, c) {
- var g = String(c).replace("::", ".");
- return b.getCurrentABC().env.app.getClass(J.FromSimpleName(g));
- });
- H["FlashUtilScript::getTimer"] = p;
- H["FlashUtilScript::navigateToURL"] = v;
- H["FlashNetScript::navigateToURL"] = v;
- g("FlashNetScript::sendToURL", function(a, c) {
- y(c) && a.throwError("TypeError", b.Errors.NullPointerError, "request");
- a.flash.net.URLRequest.axClass.axIsType(c) || a.throwError("TypeError", b.Errors.CheckTypeFailedError, c, "flash.net.URLRequest");
- var g = e.FileLoadingService.instance.createSession();
- g.onprogress = function() {
- };
- g.open(c);
- });
- g("FlashUtilScript::escapeMultiByte", t(jsGlobal.escape));
- g("FlashUtilScript::unescapeMultiByte", t(jsGlobal.unescape));
- g("Toplevel::registerClassAlias", function(a, c, g) {
- (c = b.axCoerceString(c)) || a.throwError("TypeError", b.Errors.NullPointerError, "aliasName");
- g || a.throwError("TypeError", b.Errors.NullPointerError, "classObject");
- a.classAliases.registerClassAlias(c, g);
- });
- g("Toplevel::getClassByAlias", function(a, c) {
- (c = b.axCoerceString(c)) || a.throwError("TypeError", b.Errors.NullPointerError, "aliasName");
- var g = a.classAliases.getClassByAlias(c);
- g || a.throwError("ReferenceError", b.Errors.ClassNotFoundError, c);
- return g;
- });
- h.getNativesForTrait = z;
- h.getNativeInitializer = function(a) {
- var b = a.instanceInfo.getInitializer();
- a = a.instanceInfo.getClassName();
- a = Y[a] || D[a];
- return b.isNative() ? a : null;
- };
- h.getMethodOrAccessorNative = function(a) {
- for (var b = z(a), c = a.getName().name, g = 0;g < b.length;g++) {
- var d = b[g], f = c;
- !G(d, c) && G(d, "native_" + c) && (f = "native_" + c);
- if (G(d, f)) {
- return a.isAccessor() ? (b = Object.getOwnPropertyDescriptor(d, f), a = a.isGetter() ? b.get : b.set) : a = d[f], a;
- }
- }
- e.Debug.warning("No native method for: " + a.holder + " " + a + ", make sure you've got the static keyword for static methods.");
- return null;
- };
- h.tryLinkNativeClass = function(a) {
- var c = a.classInfo.instanceInfo.getClassName();
- if (c = Y[c] || D[c]) {
- a.asClass = c;
- c.classSymbols && B(c.classSymbols, a.classInfo.traits, a);
- c.instanceSymbols && B(c.instanceSymbols, a.classInfo.instanceInfo.traits, a.tPrototype);
- if (c.classNatives) {
- for (var g = 0;g < c.classNatives.length;g++) {
- M(a, c.classNatives[g], E);
- }
- }
- M(a, c, E, !0, !0);
- if (c.instanceNatives) {
- for (g = 0;g < c.instanceNatives.length;g++) {
- M(a.dPrototype, c.instanceNatives[g], E);
- }
- }
- M(a.dPrototype, c.prototype, E);
- I(a.dPrototype, c.prototype, va);
- c.classInitializer && c.classInitializer.call(a, c);
- if (b.runtimeWriter) {
- b.runtimeWriter.enter("Class: " + a.classInfo);
- b.runtimeWriter.enter("Traps:");
- for (var d in c.prototype) {
- 0 === d.indexOf("ax") && (a = c.hasOwnProperty(d), b.runtimeWriter.writeLn((a ? "Own" : "Inherited") + " trap: " + d));
- }
- b.runtimeWriter.leave();
- b.runtimeWriter.leave();
- }
- }
- };
- var va = "axResolveMultiname axHasProperty axDeleteProperty axCallProperty axCallSuper axConstructProperty axHasPropertyInternal axHasOwnProperty axSetProperty axGetProperty axGetSuper axSetSuper axNextNameIndex axNextName axNextValue axGetEnumerableKeys axHasPublicProperty axSetPublicProperty axGetPublicProperty axCallPublicProperty axDeletePublicProperty axSetNumericProperty axGetNumericProperty axGetSlot axSetSlot".split(" ");
- h.installClassLoaders = function(a, c) {
- for (var g = 0;g < na.length;g++) {
- var d = a, f = c, p = na[g].name, k = na[g].alias, q = na[g].nsType;
- b.runtimeWriter && b.runtimeWriter.writeLn("Defining Memoizer: " + p);
- var v = k.split("."), k = v.pop(), f = n(v, f), p = J.FromFQNString(p, q);
- A(d, f, p, k);
- }
- };
- h.installNativeFunctions = function(a) {
- for (var b in H) {
- var c = b.split("."), g = c.pop();
- n(c, a)[g] = a.boxFunction(H[b]);
- }
- };
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.ObjectUtilities.defineNonEnumerableProperty, t = function(l) {
- function d() {
- l.apply(this, arguments);
- }
- __extends(d, l);
- d.prototype.axGetProperty = function(a) {
- var c = a.name, c = "number" === typeof c ? c : b.axCoerceName(c);
- return (c | 0) === c || e.isNumeric(c) ? this.axGetNumericProperty("number" === typeof c ? c : c | 0) : l.prototype.axGetProperty.call(this, a);
- };
- d.prototype.axSetProperty = function(a, c, d) {
- var k = a.name, k = "number" === typeof k ? k : b.axCoerceName(k);
- (k | 0) === k || e.isNumeric(k) ? this.axSetNumericProperty("number" === typeof k ? k : k | 0, c) : l.prototype.axSetProperty.call(this, a, c, d);
- };
- d.prototype.axGetPublicProperty = function(a) {
- a = "number" === typeof a ? a : b.axCoerceName(a);
- return (a | 0) === a || e.isNumeric(a) ? this.axGetNumericProperty("number" === typeof a ? a : a | 0) : this["$Bg" + a];
- };
- d.prototype.axSetPublicProperty = function(a, c) {
- a = "number" === typeof a ? a : b.axCoerceName(a);
- (a | 0) === a || e.isNumeric(a) ? this.axSetNumericProperty("number" === typeof a ? a : a | 0, c) : this["$Bg" + a] = c;
- };
- d.prototype.axNextName = function(a) {
- return a - 1;
- };
- d.prototype.checkVectorMethodArgs = function(a, c) {
- if (e.isNullOrUndefined(a)) {
- return !1;
- }
- var d = this.sec;
- b.axIsCallable(a) || d.throwError("TypeError", b.Errors.CheckTypeFailedError, a, "Function");
- a.axClass !== d.AXMethodClosure || e.isNullOrUndefined(c) || d.throwError("TypeError", b.Errors.ArrayFilterNonNullObjectError);
- return !0;
- };
- return d;
- }(h.ASObject);
- h.BaseVector = t;
- var m = function(b) {
- function d() {
- b.apply(this, arguments);
- }
- __extends(d, b);
- d.axIsType = function(a) {
- return this.dPrototype.isPrototypeOf(a) || this.sec.Int32Vector.axClass.dPrototype.isPrototypeOf(a) || this.sec.Uint32Vector.axClass.dPrototype.isPrototypeOf(a) || this.sec.Float64Vector.axClass.dPrototype.isPrototypeOf(a) || this.sec.ObjectVector.axClass.dPrototype.isPrototypeOf(a);
- };
- return d;
- }(h.ASObject);
- h.Vector = m;
- t = function(l) {
- function d(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = !1);
- l.call(this);
- a >>>= 0;
- this._fixed = !!b;
- this._buffer = Array(a);
- this._fill(0, a, this.axClass.defaultValue);
- }
- __extends(d, l);
- d.classInitializer = function() {
- var a = this.dPrototype, b = this.tPrototype;
- b.axGetProperty = a.axGetProperty;
- b.axGetNumericProperty = a.axGetNumericProperty;
- b.axSetProperty = a.axSetProperty;
- b.axSetNumericProperty = a.axSetNumericProperty;
- b.axHasPropertyInternal = a.axHasPropertyInternal;
- b.axNextName = a.axNextName;
- b.axNextNameIndex = a.axNextNameIndex;
- b.axNextValue = a.axNextValue;
- a.axGetProperty = h.ASObject.prototype.axGetProperty;
- a.axGetNumericProperty = h.ASObject.prototype.axGetNumericProperty;
- a.axSetProperty = h.ASObject.prototype.axSetProperty;
- a.axSetNumericProperty = h.ASObject.prototype.axSetNumericProperty;
- a.axHasPropertyInternal = h.ASObject.prototype.axHasPropertyInternal;
- a.axNextName = h.ASObject.prototype.axNextName;
- a.axNextNameIndex = h.ASObject.prototype.axNextNameIndex;
- a.axNextValue = h.ASObject.prototype.axNextValue;
- b = d.prototype;
- n(a, "$Bgjoin", b.join);
- n(a, "$BgtoString", b.join);
- n(a, "$BgtoLocaleString", b.toLocaleString);
- n(a, "$Bgpop", b.pop);
- n(a, "$Bgpush", b.push);
- n(a, "$Bgreverse", b.reverse);
- n(a, "$Bgconcat", b.concat);
- n(a, "$Bgsplice", b.splice);
- n(a, "$Bgslice", b.slice);
- n(a, "$Bgshift", b.shift);
- n(a, "$Bgunshift", b.unshift);
- n(a, "$BgindexOf", b.indexOf);
- n(a, "$BglastIndexOf", b.lastIndexOf);
- n(a, "$BgforEach", b.forEach);
- n(a, "$Bgmap", b.map);
- n(a, "$Bgfilter", b.filter);
- n(a, "$Bgsome", b.some);
- n(a, "$Bgevery", b.every);
- n(a, "$Bgsort", b.sort);
- n(a, "checkVectorMethodArgs", b.checkVectorMethodArgs);
- };
- d.axApply = function(a, b) {
- var d = b[0];
- if (this.axIsType(d)) {
- return d;
- }
- var k = d.axGetPublicProperty("length");
- if (void 0 !== k) {
- for (var r = this.axConstruct([k, !1]), u = 0;u < k;u++) {
- r.axSetNumericProperty(u, d.axGetPublicProperty(u));
- }
- return r;
- }
- e.Debug.unexpected();
- };
- d.defaultCompareFunction = function(a, b) {
- return String(a).localeCompare(String(b));
- };
- d.compare = function(a, b, f, k) {
- var r = 0;
- k || (k = d.defaultCompareFunction);
- f & d.NUMERIC ? (a = e.toNumber(a), b = e.toNumber(b), r = a < b ? -1 : a > b ? 1 : 0) : r = k(a, b);
- f & d.DESCENDING && (r *= -1);
- return r;
- };
- d.prototype._fill = function(a, b, d) {
- for (var k = 0;k < b;k++) {
- this._buffer[a + k] = d;
- }
- };
- d.prototype.toString = function() {
- for (var a = [], b = 0;b < this._buffer.length;b++) {
- var d = this._buffer[b];
- a.push(null === d ? "null" : d + "");
- }
- return a.join(",");
- };
- d.prototype.toLocaleString = function() {
- for (var a = [], b = 0;b < this._buffer.length;b++) {
- var d = this._buffer[b];
- d && "object" === typeof d ? a.push(d.$BgtoLocaleString()) : a.push(d + "");
- }
- return a.join(",");
- };
- d.prototype.sort = function(a) {
- if (0 === arguments.length) {
- return this._buffer.sort(), this;
- }
- if (this.sec.AXFunction.axIsType(a)) {
- return this._buffer.sort(a.value), this;
- }
- var c = a | 0;
- if (c & d.NUMERIC) {
- if (c & d.DESCENDING) {
- return this._buffer.sort(function(a, c) {
- return b.axCoerceNumber(c) - b.axCoerceNumber(a);
- }), this;
- }
- this._buffer.sort(function(a, c) {
- return b.axCoerceNumber(a) - b.axCoerceNumber(c);
- });
- return this;
- }
- if (c & d.CASEINSENSITIVE) {
- if (c & d.DESCENDING) {
- return this._buffer.sort(function(a, c) {
- return b.axCoerceString(c).toLowerCase() - b.axCoerceString(a).toLowerCase();
- }), this;
- }
- this._buffer.sort(function(a, c) {
- return b.axCoerceString(a).toLowerCase() - b.axCoerceString(c).toLowerCase();
- });
- return this;
- }
- if (c & d.DESCENDING) {
- return this._buffer.sort(function(a, b) {
- return b - a;
- }), this;
- }
- this._buffer.sort();
- return this;
- };
- d.prototype.every = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !0;
- }
- for (var d = 0;d < this._buffer.length;d++) {
- if (!a.axCall(b, this.axGetNumericProperty(d), d, this)) {
- return !1;
- }
- }
- return !0;
- };
- d.prototype.filter = function(a, b) {
- var d = this.axClass.axConstruct([0, !1]);
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._buffer.length;k++) {
- a.call(b, this.axGetNumericProperty(k), k, this) && d.push(this.axGetNumericProperty(k));
- }
- return d;
- };
- d.prototype.map = function(a, b) {
- var d = this.axClass.axConstruct([this.length, !1]);
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._buffer.length;k++) {
- d.push(this._coerce(a.call(b, this.axGetNumericProperty(k), k, this)));
- }
- return d;
- };
- d.prototype.some = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !1;
- }
- for (var d = 0;d < this._buffer.length;d++) {
- if (a.call(b, this.axGetNumericProperty(d), d, this)) {
- return !0;
- }
- }
- return !1;
- };
- d.prototype.forEach = function(a, b) {
- if (this.checkVectorMethodArgs(a, b)) {
- for (var d = 0;d < this._buffer.length;d++) {
- a.call(b, this.axGetNumericProperty(d), d, this);
- }
- }
- };
- d.prototype.join = function(a) {
- void 0 === a && (a = ",");
- for (var b = this._buffer, d = this._buffer.length, k = "", r = 0;r < d - 1;r++) {
- k += b[r] + a;
- }
- 0 < d && (k += b[d - 1]);
- return k;
- };
- d.prototype.indexOf = function(a, b) {
- void 0 === b && (b = 0);
- return this._buffer.indexOf(a, b);
- };
- d.prototype.lastIndexOf = function(a, b) {
- void 0 === b && (b = 2147483647);
- return this._buffer.lastIndexOf(a, b);
- };
- d.prototype.push = function(a, b, d, k, r, u, q, g) {
- this._checkFixed();
- for (var p = 0;p < arguments.length;p++) {
- this._buffer.push(this._coerce(arguments[p]));
- }
- };
- d.prototype.pop = function() {
- this._checkFixed();
- return 0 === this._buffer.length ? void 0 : this._buffer.pop();
- };
- d.prototype.concat = function() {
- for (var a = [], b = 0;b < arguments.length;b++) {
- a.push(this._coerce(arguments[b])._buffer);
- }
- a = this._buffer.concat.apply(this._buffer, a);
- b = this.axClass.axConstruct([]);
- b._buffer = a;
- return b;
- };
- d.prototype.reverse = function() {
- this._buffer.reverse();
- return this;
- };
- d.prototype._coerce = function(a) {
- return this.axClass.type.axCoerce(a);
- };
- d.prototype.shift = function() {
- this._checkFixed();
- return 0 === this._buffer.length ? void 0 : this._buffer.shift();
- };
- d.prototype.unshift = function() {
- if (arguments.length) {
- this._checkFixed();
- for (var a = 0;a < arguments.length;a++) {
- this._buffer.unshift(this._coerce(arguments[a]));
- }
- }
- };
- d.prototype.slice = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 2147483647);
- var d = this._buffer, k = d.length, r = Math.min(Math.max(a, 0), k), k = Math.min(Math.max(b, r), k), u = this.axClass.axConstruct([k - r, this.fixed]);
- u._buffer = d.slice(r, k);
- return u;
- };
- d.prototype.splice = function(a, b) {
- var d = this._buffer, k = d.length, r = Math.min(Math.max(a, 0), k), k = Math.min(Math.max(b, 0), k - r), u = arguments.length - 2;
- k !== u && this._checkFixed();
- for (var r = [r, k], q = 2;q < u + 2;q++) {
- r[q] = this._coerce(arguments[q]);
- }
- k = this.axClass.axConstruct([k, this.fixed]);
- k._buffer = d.splice.apply(d, r);
- return k;
- };
- Object.defineProperty(d.prototype, "length", {get:function() {
- return this._buffer.length;
- }, set:function(a) {
- a >>>= 0;
- if (a > this._buffer.length) {
- for (var b = this._buffer.length;b < a;b++) {
- this._buffer[b] = this.axClass.defaultValue;
- }
- } else {
- this._buffer.length = a;
- }
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "fixed", {get:function() {
- return this._fixed;
- }, set:function(a) {
- this._fixed = !!a;
- }, enumerable:!0, configurable:!0});
- d.prototype._checkFixed = function() {
- this._fixed && this.sec.throwError("RangeError", b.Errors.VectorFixedError);
- };
- d.prototype.axGetNumericProperty = function(a) {
- var c = a | 0;
- (0 > c || c >= this._buffer.length || c != a) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, this._buffer.length);
- return this._buffer[c];
- };
- d.prototype.axSetNumericProperty = function(a, c) {
- var d = this._buffer.length, k = a | 0;
- (0 > k || k > d || k != a || k === d && this._fixed) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, d);
- this._buffer[k] = this._coerce(c);
- };
- d.prototype.axHasPropertyInternal = function(a) {
- if ((a.name | 0) === a.name) {
- return 0 <= a.name && a.name < this._buffer.length;
- }
- var c = b.axCoerceName(a.name);
- return a.isRuntimeName() && e.isIndex(c) ? (a = c >>> 0, 0 <= a && a < this._buffer.length) : this.axResolveMultiname(a) in this;
- };
- d.prototype.axNextValue = function(a) {
- return this._buffer[a - 1];
- };
- d.prototype.axNextNameIndex = function(a) {
- a += 1;
- return a <= this._buffer.length ? a : 0;
- };
- d.CASEINSENSITIVE = 1;
- d.DESCENDING = 2;
- d.UNIQUESORT = 4;
- d.RETURNINDEXEDARRAY = 8;
- d.NUMERIC = 16;
- d.defaultValue = null;
- return d;
- }(t);
- h.GenericVector = t;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.assert, t = e.ObjectUtilities.defineNonEnumerableProperty, m = function(l) {
- function d(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = !1);
- l.call(this);
- a >>>= 0;
- this._fixed = !!b;
- this._buffer = new Int32Array(Math.max(d.INITIAL_CAPACITY, a + d.EXTRA_CAPACITY));
- this._offset = 0;
- this._length = a;
- }
- __extends(d, l);
- d.classInitializer = function() {
- var a = this.dPrototype, b = this.tPrototype;
- b.axGetProperty = a.axGetProperty;
- b.axGetNumericProperty = a.axGetNumericProperty;
- b.axSetProperty = a.axSetProperty;
- b.axSetNumericProperty = a.axSetNumericProperty;
- b.axHasPropertyInternal = a.axHasPropertyInternal;
- b.axNextName = a.axNextName;
- b.axNextNameIndex = a.axNextNameIndex;
- b.axNextValue = a.axNextValue;
- a.axGetProperty = h.ASObject.prototype.axGetProperty;
- a.axGetNumericProperty = h.ASObject.prototype.axGetNumericProperty;
- a.axSetProperty = h.ASObject.prototype.axSetProperty;
- a.axSetNumericProperty = h.ASObject.prototype.axSetNumericProperty;
- a.axHasPropertyInternal = h.ASObject.prototype.axHasPropertyInternal;
- a.axNextName = h.ASObject.prototype.axNextName;
- a.axNextNameIndex = h.ASObject.prototype.axNextNameIndex;
- a.axNextValue = h.ASObject.prototype.axNextValue;
- b = d.prototype;
- t(a, "$Bgjoin", b.join);
- t(a, "$BgtoString", b.join);
- t(a, "$BgtoLocaleString", b.toLocaleString);
- t(a, "$Bgpop", b.pop);
- t(a, "$Bgpush", b.push);
- t(a, "$Bgreverse", b.reverse);
- t(a, "$Bgconcat", b.concat);
- t(a, "$Bgsplice", b.splice);
- t(a, "$Bgslice", b.slice);
- t(a, "$Bgshift", b.shift);
- t(a, "$Bgunshift", b.unshift);
- t(a, "$BgindexOf", b.indexOf);
- t(a, "$BglastIndexOf", b.lastIndexOf);
- t(a, "$BgforEach", b.forEach);
- t(a, "$Bgmap", b.map);
- t(a, "$Bgfilter", b.filter);
- t(a, "$Bgsome", b.some);
- t(a, "$Bgevery", b.every);
- t(a, "$Bgsort", b.sort);
- t(a, "checkVectorMethodArgs", b.checkVectorMethodArgs);
- };
- d.axApply = function(a, b) {
- var d = b[0];
- if (this.axIsType(d)) {
- return d;
- }
- var k = d.axGetPublicProperty("length");
- if (void 0 !== k) {
- for (var r = this.axConstruct([k, !1]), u = 0;u < k;u++) {
- r.axSetNumericProperty(u, d.axGetPublicProperty(u));
- }
- return r;
- }
- e.Debug.unexpected();
- };
- d.prototype.internalToString = function() {
- for (var a = "", b = this._offset, d = b + this._length, k = 0;k < this._buffer.length;k++) {
- k === b && (a += "["), k === d && (a += "]"), a += this._buffer[k], k < 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;
- };
- d.prototype.toString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype.toLocaleString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype._view = function() {
- return this._buffer.subarray(this._offset, this._offset + this._length);
- };
- d.prototype._ensureCapacity = function(a) {
- var b = this._offset + a;
- b < this._buffer.length || (a <= this._buffer.length ? (b = this._buffer.length - a >> 2, this._buffer.set(this._view(), b), this._offset = b) : (a = (3 * this._buffer.length >> 1) + 1, a < b && (a = b), b = new Int32Array(a), b.set(this._buffer, 0), this._buffer = b));
- };
- d.prototype.concat = function() {
- for (var a = this._length, b = 0;b < arguments.length;b++) {
- var d = arguments[b];
- d._buffer instanceof Int32Array || n(!1);
- a += d._length;
- }
- var a = new this.sec.Int32Vector(a), k = a._buffer;
- k.set(this._buffer);
- for (var r = this._length, b = 0;b < arguments.length;b++) {
- d = arguments[b], r + d._buffer.length < d._buffer.length ? k.set(d._buffer, r) : k.set(d._buffer.subarray(0, d._length), r), r += d._length;
- }
- return a;
- };
- d.prototype.every = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !0;
- }
- for (var d = 0;d < this._length;d++) {
- if (!a.call(b, this._buffer[this._offset + d], d, this)) {
- return !1;
- }
- }
- return !0;
- };
- d.prototype.filter = function(a, b) {
- var d = new this.sec.Int32Vector;
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- a.call(b, this._buffer[this._offset + k], k, this) && d.push(this._buffer[this._offset + k]);
- }
- return d;
- };
- d.prototype.map = function(a, b) {
- var d = this.axClass.axConstruct([this.length, !1]);
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- d[k] = a.call(b, this._buffer[this._offset + k], k, this);
- }
- return d;
- };
- d.prototype.some = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !1;
- }
- for (var d = 0;d < this._length;d++) {
- if (a.call(b, this._buffer[this._offset + d], d, this)) {
- return !0;
- }
- }
- return !1;
- };
- d.prototype.forEach = function(a, b) {
- if (this.checkVectorMethodArgs(a, b)) {
- for (var d = 0;d < this._length;d++) {
- a.call(b, this._buffer[this._offset + d], d, this);
- }
- }
- };
- d.prototype.join = function(a) {
- void 0 === a && (a = ",");
- for (var b = this.length, d = this._buffer, k = this._offset, r = "", u = 0;u < b - 1;u++) {
- r += d[k + u] + a;
- }
- 0 < b && (r += d[k + b - 1]);
- return r;
- };
- d.prototype.indexOf = function(a, b) {
- void 0 === b && (b = 0);
- var d = this._length, k = b | 0;
- if (0 > k) {
- k += d, 0 > k && (k = 0);
- } else {
- if (k >= d) {
- return -1;
- }
- }
- for (var r = this._buffer, d = this._length, u = this._offset, d = u + d, k = k + u;k < d;k++) {
- if (r[k] === a) {
- return k - u;
- }
- }
- return -1;
- };
- d.prototype.lastIndexOf = function(a, b) {
- void 0 === b && (b = 2147483647);
- var d = this._length, k = b | 0;
- if (0 > k) {
- if (k += d, 0 > k) {
- return -1;
- }
- } else {
- k >= d && (k = d);
- }
- for (var d = this._buffer, r = this._offset, k = k + r;k-- > r;) {
- if (d[k] === a) {
- return k - r;
- }
- }
- return -1;
- };
- d.prototype.push = function(a, b, d, k, r, u, q, g) {
- this._checkFixed();
- this._ensureCapacity(this._length + arguments.length);
- for (var p = 0;p < arguments.length;p++) {
- this._buffer[this._offset + this._length++] = arguments[p];
- }
- };
- d.prototype.pop = function() {
- this._checkFixed();
- if (0 === this._length) {
- return d.DEFAULT_VALUE;
- }
- this._length--;
- return this._buffer[this._offset + this._length];
- };
- d.prototype.reverse = function() {
- for (var a = this._offset, b = this._offset + this._length - 1, d = this._buffer;a < b;) {
- var k = d[a];
- d[a] = d[b];
- d[b] = k;
- a++;
- b--;
- }
- return this;
- };
- d.prototype.sort = function(a) {
- if (0 === arguments.length) {
- return Array.prototype.sort.call(this._view()), this;
- }
- if (this.sec.AXFunction.axIsType(a)) {
- return Array.prototype.sort.call(this._view(), a.value), this;
- }
- (a | 0) & d.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, b) {
- return b - a;
- }) : Array.prototype.sort.call(this._view(), function(a, b) {
- return a - b;
- });
- return this;
- };
- d.prototype.shift = function() {
- this._checkFixed();
- if (0 === this._length) {
- return 0;
- }
- this._length--;
- return this._buffer[this._offset++];
- };
- d.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];
- }
- }
- };
- d.prototype.slice = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 2147483647);
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), k = Math.min(Math.max(b, r), k), u = new this.sec.Int32Vector(k - r, this.fixed);
- u._buffer.set(d.subarray(this._offset + r, this._offset + k), u._offset);
- return u;
- };
- d.prototype.splice = function(a, b) {
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), u = this._offset + r, q = Math.min(Math.max(b, 0), k - r), r = arguments.length - 2, g, p = new this.sec.Int32Vector(q, this.fixed);
- 0 < q && (g = d.subarray(u, u + q), p._buffer.set(g, p._offset));
- this._ensureCapacity(k - q + r);
- k = d.subarray(u + q, k);
- d.set(k, u + r);
- this._length += r - q;
- for (k = 0;k < r;k++) {
- d[u + k] = arguments[k + 2];
- }
- return p;
- };
- d.prototype._slide = function(a) {
- this._buffer.set(this._view(), this._offset + a);
- this._offset += a;
- };
- Object.defineProperty(d.prototype, "length", {get:function() {
- return this._length;
- }, set:function(a) {
- a >>>= 0;
- if (a > this._length) {
- this._ensureCapacity(a);
- for (var b = this._offset + this._length, f = this._offset + a;b < f;b++) {
- this._buffer[b] = d.DEFAULT_VALUE;
- }
- }
- this._length = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "fixed", {get:function() {
- return this._fixed;
- }, set:function(a) {
- this._fixed = !!a;
- }, enumerable:!0, configurable:!0});
- d.prototype._checkFixed = function() {
- this._fixed && this.sec.throwError("RangeError", b.Errors.VectorFixedError);
- };
- d.prototype.axGetNumericProperty = function(a) {
- var c = this._length, d = a | 0;
- (0 > d || d >= c || d != a) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, c);
- return this._buffer[this._offset + d];
- };
- d.prototype.axSetNumericProperty = function(a, c) {
- var d = this._length, k = a | 0;
- (0 > k || k > d || k != a || k === d && this._fixed) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, d);
- k === this._length && (this._ensureCapacity(this._length + 1), this._length++);
- this._buffer[this._offset + k] = c;
- };
- d.prototype.axHasPropertyInternal = function(a) {
- if ((a.name | 0) === a.name) {
- return 0 <= a.name && a.name < this._length;
- }
- var c = b.axCoerceName(a.name);
- return a.isRuntimeName() && e.isIndex(c) ? (a = c >>> 0, 0 <= a && a < this._length) : this.axResolveMultiname(a) in this;
- };
- d.prototype.axNextValue = function(a) {
- return this._buffer[this._offset + a - 1];
- };
- d.prototype.axNextNameIndex = function(a) {
- a += 1;
- return a <= this._length ? a : 0;
- };
- d.EXTRA_CAPACITY = 4;
- d.INITIAL_CAPACITY = 10;
- d.DEFAULT_VALUE = 0;
- d.DESCENDING = 2;
- d.UNIQUESORT = 4;
- d.RETURNINDEXEDARRAY = 8;
- return d;
- }(h.BaseVector);
- h.Int32Vector = m;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.assert, t = e.ObjectUtilities.defineNonEnumerableProperty, m = function(l) {
- function d(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = !1);
- l.call(this);
- a >>>= 0;
- this._fixed = !!b;
- this._buffer = new Uint32Array(Math.max(d.INITIAL_CAPACITY, a + d.EXTRA_CAPACITY));
- this._offset = 0;
- this._length = a;
- }
- __extends(d, l);
- d.classInitializer = function() {
- var a = this.dPrototype, b = this.tPrototype;
- b.axGetProperty = a.axGetProperty;
- b.axGetNumericProperty = a.axGetNumericProperty;
- b.axSetProperty = a.axSetProperty;
- b.axSetNumericProperty = a.axSetNumericProperty;
- b.axHasPropertyInternal = a.axHasPropertyInternal;
- b.axNextName = a.axNextName;
- b.axNextNameIndex = a.axNextNameIndex;
- b.axNextValue = a.axNextValue;
- a.axGetProperty = h.ASObject.prototype.axGetProperty;
- a.axGetNumericProperty = h.ASObject.prototype.axGetNumericProperty;
- a.axSetProperty = h.ASObject.prototype.axSetProperty;
- a.axSetNumericProperty = h.ASObject.prototype.axSetNumericProperty;
- a.axHasPropertyInternal = h.ASObject.prototype.axHasPropertyInternal;
- a.axNextName = h.ASObject.prototype.axNextName;
- a.axNextNameIndex = h.ASObject.prototype.axNextNameIndex;
- a.axNextValue = h.ASObject.prototype.axNextValue;
- b = d.prototype;
- t(a, "$Bgjoin", b.join);
- t(a, "$BgtoString", b.join);
- t(a, "$BgtoLocaleString", b.toLocaleString);
- t(a, "$Bgpop", b.pop);
- t(a, "$Bgpush", b.push);
- t(a, "$Bgreverse", b.reverse);
- t(a, "$Bgconcat", b.concat);
- t(a, "$Bgsplice", b.splice);
- t(a, "$Bgslice", b.slice);
- t(a, "$Bgshift", b.shift);
- t(a, "$Bgunshift", b.unshift);
- t(a, "$BgindexOf", b.indexOf);
- t(a, "$BglastIndexOf", b.lastIndexOf);
- t(a, "$BgforEach", b.forEach);
- t(a, "$Bgmap", b.map);
- t(a, "$Bgfilter", b.filter);
- t(a, "$Bgsome", b.some);
- t(a, "$Bgevery", b.every);
- t(a, "$Bgsort", b.sort);
- t(a, "checkVectorMethodArgs", b.checkVectorMethodArgs);
- };
- d.axApply = function(a, b) {
- var d = b[0];
- if (this.axIsType(d)) {
- return d;
- }
- var k = d.axGetPublicProperty("length");
- if (void 0 !== k) {
- for (var r = this.axConstruct([k, !1]), u = 0;u < k;u++) {
- r.axSetNumericProperty(u, d.axGetPublicProperty(u));
- }
- return r;
- }
- e.Debug.unexpected();
- };
- d.prototype.internalToString = function() {
- for (var a = "", b = this._offset, d = b + this._length, k = 0;k < this._buffer.length;k++) {
- k === b && (a += "["), k === d && (a += "]"), a += this._buffer[k], k < 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;
- };
- d.prototype.toString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype.toLocaleString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype._view = function() {
- return this._buffer.subarray(this._offset, this._offset + this._length);
- };
- d.prototype._ensureCapacity = function(a) {
- var b = this._offset + a;
- b < this._buffer.length || (a <= this._buffer.length ? (b = this._buffer.length - a >> 2, this._buffer.set(this._view(), b), this._offset = b) : (a = (3 * this._buffer.length >> 1) + 1, a < b && (a = b), b = new Uint32Array(a), b.set(this._buffer, 0), this._buffer = b));
- };
- d.prototype.concat = function() {
- for (var a = this._length, b = 0;b < arguments.length;b++) {
- var d = arguments[b];
- d._buffer instanceof Uint32Array || n(!1);
- a += d._length;
- }
- var a = new this.sec.Uint32Vector(a), k = a._buffer;
- k.set(this._buffer);
- for (var r = this._length, b = 0;b < arguments.length;b++) {
- d = arguments[b], r + d._buffer.length < d._buffer.length ? k.set(d._buffer, r) : k.set(d._buffer.subarray(0, d._length), r), r += d._length;
- }
- return a;
- };
- d.prototype.every = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !0;
- }
- for (var d = 0;d < this._length;d++) {
- if (!a.call(b, this._buffer[this._offset + d], d, this)) {
- return !1;
- }
- }
- return !0;
- };
- d.prototype.filter = function(a, b) {
- var d = new this.sec.Uint32Vector;
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- a.call(b, this._buffer[this._offset + k], k, this) && d.push(this._buffer[this._offset + k]);
- }
- return d;
- };
- d.prototype.map = function(a, b) {
- var d = this.axClass.axConstruct([this.length, !1]);
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- d[k] = a.call(b, this._buffer[this._offset + k], k, this);
- }
- return d;
- };
- d.prototype.some = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !1;
- }
- for (var d = 0;d < this._length;d++) {
- if (a.call(b, this._buffer[this._offset + d], d, this)) {
- return !0;
- }
- }
- return !1;
- };
- d.prototype.forEach = function(a, b) {
- if (this.checkVectorMethodArgs(a, b)) {
- for (var d = 0;d < this._length;d++) {
- a.call(b, this._buffer[this._offset + d], d, this);
- }
- }
- };
- d.prototype.join = function(a) {
- void 0 === a && (a = ",");
- for (var b = this.length, d = this._buffer, k = this._offset, r = "", u = 0;u < b - 1;u++) {
- r += d[k + u] + a;
- }
- 0 < b && (r += d[k + b - 1]);
- return r;
- };
- d.prototype.indexOf = function(a, b) {
- void 0 === b && (b = 0);
- var d = this._length, k = b | 0;
- if (0 > k) {
- k += d, 0 > k && (k = 0);
- } else {
- if (k >= d) {
- return -1;
- }
- }
- for (var r = this._buffer, d = this._length, u = this._offset, d = u + d, k = k + u;k < d;k++) {
- if (r[k] === a) {
- return k - u;
- }
- }
- return -1;
- };
- d.prototype.lastIndexOf = function(a, b) {
- void 0 === b && (b = 2147483647);
- var d = this._length, k = b | 0;
- if (0 > k) {
- if (k += d, 0 > k) {
- return -1;
- }
- } else {
- k >= d && (k = d);
- }
- for (var d = this._buffer, r = this._offset, k = k + r;k-- > r;) {
- if (d[k] === a) {
- return k - r;
- }
- }
- return -1;
- };
- d.prototype.push = function(a, b, d, k, r, u, q, g) {
- this._checkFixed();
- this._ensureCapacity(this._length + arguments.length);
- for (var p = 0;p < arguments.length;p++) {
- this._buffer[this._offset + this._length++] = arguments[p];
- }
- };
- d.prototype.pop = function() {
- this._checkFixed();
- if (0 === this._length) {
- return d.DEFAULT_VALUE;
- }
- this._length--;
- return this._buffer[this._offset + this._length];
- };
- d.prototype.reverse = function() {
- for (var a = this._offset, b = this._offset + this._length - 1, d = this._buffer;a < b;) {
- var k = d[a];
- d[a] = d[b];
- d[b] = k;
- a++;
- b--;
- }
- return this;
- };
- d.prototype.sort = function(a) {
- if (0 === arguments.length) {
- return Array.prototype.sort.call(this._view()), this;
- }
- if (this.sec.AXFunction.axIsType(a)) {
- return Array.prototype.sort.call(this._view(), a.value), this;
- }
- (a | 0) & d.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, b) {
- return b - a;
- }) : Array.prototype.sort.call(this._view(), function(a, b) {
- return a - b;
- });
- return this;
- };
- d.prototype.shift = function() {
- this._checkFixed();
- if (0 === this._length) {
- return 0;
- }
- this._length--;
- return this._buffer[this._offset++];
- };
- d.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];
- }
- }
- };
- d.prototype.slice = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 2147483647);
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), k = Math.min(Math.max(b, r), k), u = new this.sec.Uint32Vector(k - r, this.fixed);
- u._buffer.set(d.subarray(this._offset + r, this._offset + k), u._offset);
- return u;
- };
- d.prototype.splice = function(a, b) {
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), u = this._offset + r, q = Math.min(Math.max(b, 0), k - r), r = arguments.length - 2, g, p = new this.sec.Uint32Vector(q, this.fixed);
- 0 < q && (g = d.subarray(u, u + q), p._buffer.set(g, p._offset));
- this._ensureCapacity(k - q + r);
- k = d.subarray(u + q, k);
- d.set(k, u + r);
- this._length += r - q;
- for (k = 0;k < r;k++) {
- d[u + k] = arguments[k + 2];
- }
- return p;
- };
- d.prototype._slide = function(a) {
- this._buffer.set(this._view(), this._offset + a);
- this._offset += a;
- };
- Object.defineProperty(d.prototype, "length", {get:function() {
- return this._length;
- }, set:function(a) {
- a >>>= 0;
- if (a > this._length) {
- this._ensureCapacity(a);
- for (var b = this._offset + this._length, f = this._offset + a;b < f;b++) {
- this._buffer[b] = d.DEFAULT_VALUE;
- }
- }
- this._length = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "fixed", {get:function() {
- return this._fixed;
- }, set:function(a) {
- this._fixed = !!a;
- }, enumerable:!0, configurable:!0});
- d.prototype._checkFixed = function() {
- this._fixed && this.sec.throwError("RangeError", b.Errors.VectorFixedError);
- };
- d.prototype.axGetNumericProperty = function(a) {
- var c = this._length, d = a | 0;
- (0 > d || d >= c || d != a) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, c);
- return this._buffer[this._offset + d];
- };
- d.prototype.axSetNumericProperty = function(a, c) {
- var d = this._length, k = a | 0;
- (0 > k || k > d || k != a || k === d && this._fixed) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, d);
- k === this._length && (this._ensureCapacity(this._length + 1), this._length++);
- this._buffer[this._offset + k] = c;
- };
- d.prototype.axHasPropertyInternal = function(a) {
- if ((a.name | 0) === a.name) {
- return 0 <= a.name && a.name < this._length;
- }
- var c = b.axCoerceName(a.name);
- return a.isRuntimeName() && e.isIndex(c) ? (a = c >>> 0, 0 <= a && a < this._length) : this.axResolveMultiname(a) in this;
- };
- d.prototype.axNextValue = function(a) {
- return this._buffer[this._offset + a - 1];
- };
- d.prototype.axNextNameIndex = function(a) {
- a += 1;
- return a <= this._length ? a : 0;
- };
- d.EXTRA_CAPACITY = 4;
- d.INITIAL_CAPACITY = 10;
- d.DEFAULT_VALUE = 0;
- d.DESCENDING = 2;
- d.UNIQUESORT = 4;
- d.RETURNINDEXEDARRAY = 8;
- return d;
- }(h.BaseVector);
- h.Uint32Vector = m;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.assert, t = e.ObjectUtilities.defineNonEnumerableProperty, m = function(l) {
- function d(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = !1);
- l.call(this);
- a >>>= 0;
- this._fixed = !!b;
- this._buffer = new Float64Array(Math.max(d.INITIAL_CAPACITY, a + d.EXTRA_CAPACITY));
- this._offset = 0;
- this._length = a;
- }
- __extends(d, l);
- d.classInitializer = function() {
- var a = this.dPrototype, b = this.tPrototype;
- b.axGetProperty = a.axGetProperty;
- b.axGetNumericProperty = a.axGetNumericProperty;
- b.axSetProperty = a.axSetProperty;
- b.axSetNumericProperty = a.axSetNumericProperty;
- b.axHasPropertyInternal = a.axHasPropertyInternal;
- b.axNextName = a.axNextName;
- b.axNextNameIndex = a.axNextNameIndex;
- b.axNextValue = a.axNextValue;
- a.axGetProperty = h.ASObject.prototype.axGetProperty;
- a.axGetNumericProperty = h.ASObject.prototype.axGetNumericProperty;
- a.axSetProperty = h.ASObject.prototype.axSetProperty;
- a.axSetNumericProperty = h.ASObject.prototype.axSetNumericProperty;
- a.axHasPropertyInternal = h.ASObject.prototype.axHasPropertyInternal;
- a.axNextName = h.ASObject.prototype.axNextName;
- a.axNextNameIndex = h.ASObject.prototype.axNextNameIndex;
- a.axNextValue = h.ASObject.prototype.axNextValue;
- b = d.prototype;
- t(a, "$Bgjoin", b.join);
- t(a, "$BgtoString", b.join);
- t(a, "$BgtoLocaleString", b.toLocaleString);
- t(a, "$Bgpop", b.pop);
- t(a, "$Bgpush", b.push);
- t(a, "$Bgreverse", b.reverse);
- t(a, "$Bgconcat", b.concat);
- t(a, "$Bgsplice", b.splice);
- t(a, "$Bgslice", b.slice);
- t(a, "$Bgshift", b.shift);
- t(a, "$Bgunshift", b.unshift);
- t(a, "$BgindexOf", b.indexOf);
- t(a, "$BglastIndexOf", b.lastIndexOf);
- t(a, "$BgforEach", b.forEach);
- t(a, "$Bgmap", b.map);
- t(a, "$Bgfilter", b.filter);
- t(a, "$Bgsome", b.some);
- t(a, "$Bgevery", b.every);
- t(a, "$Bgsort", b.sort);
- t(a, "checkVectorMethodArgs", b.checkVectorMethodArgs);
- };
- d.axApply = function(a, b) {
- var d = b[0];
- if (this.axIsType(d)) {
- return d;
- }
- var k = d.axGetPublicProperty("length");
- if (void 0 !== k) {
- for (var r = this.axConstruct([k, !1]), u = 0;u < k;u++) {
- r.axSetNumericProperty(u, d.axGetPublicProperty(u));
- }
- return r;
- }
- e.Debug.unexpected();
- };
- d.prototype.internalToString = function() {
- for (var a = "", b = this._offset, d = b + this._length, k = 0;k < this._buffer.length;k++) {
- k === b && (a += "["), k === d && (a += "]"), a += this._buffer[k], k < 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;
- };
- d.prototype.toString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype.toLocaleString = function() {
- for (var a = "", b = 0;b < this._length;b++) {
- a += this._buffer[this._offset + b], b < this._length - 1 && (a += ",");
- }
- return a;
- };
- d.prototype._view = function() {
- return this._buffer.subarray(this._offset, this._offset + this._length);
- };
- d.prototype._ensureCapacity = function(a) {
- var b = this._offset + a;
- b < this._buffer.length || (a <= this._buffer.length ? (b = this._buffer.length - a >> 2, this._buffer.set(this._view(), b), this._offset = b) : (a = (3 * this._buffer.length >> 1) + 1, a < b && (a = b), b = new Float64Array(a), b.set(this._buffer, 0), this._buffer = b));
- };
- d.prototype.concat = function() {
- for (var a = this._length, b = 0;b < arguments.length;b++) {
- var d = arguments[b];
- d._buffer instanceof Float64Array || n(!1);
- a += d._length;
- }
- var a = new this.sec.Float64Vector(a), k = a._buffer;
- k.set(this._buffer);
- for (var r = this._length, b = 0;b < arguments.length;b++) {
- d = arguments[b], r + d._buffer.length < d._buffer.length ? k.set(d._buffer, r) : k.set(d._buffer.subarray(0, d._length), r), r += d._length;
- }
- return a;
- };
- d.prototype.every = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !0;
- }
- for (var d = 0;d < this._length;d++) {
- if (!a.call(b, this._buffer[this._offset + d], d, this)) {
- return !1;
- }
- }
- return !0;
- };
- d.prototype.filter = function(a, b) {
- var d = new this.sec.Float64Vector;
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- a.call(b, this._buffer[this._offset + k], k, this) && d.push(this._buffer[this._offset + k]);
- }
- return d;
- };
- d.prototype.map = function(a, b) {
- var d = this.axClass.axConstruct([this.length, !1]);
- if (!this.checkVectorMethodArgs(a, b)) {
- return d;
- }
- for (var k = 0;k < this._length;k++) {
- d[k] = a.call(b, this._buffer[this._offset + k], k, this);
- }
- return d;
- };
- d.prototype.some = function(a, b) {
- if (!this.checkVectorMethodArgs(a, b)) {
- return !1;
- }
- for (var d = 0;d < this._length;d++) {
- if (a.call(b, this._buffer[this._offset + d], d, this)) {
- return !0;
- }
- }
- return !1;
- };
- d.prototype.forEach = function(a, b) {
- if (this.checkVectorMethodArgs(a, b)) {
- for (var d = 0;d < this._length;d++) {
- a.call(b, this._buffer[this._offset + d], d, this);
- }
- }
- };
- d.prototype.join = function(a) {
- void 0 === a && (a = ",");
- for (var b = this.length, d = this._buffer, k = this._offset, r = "", u = 0;u < b - 1;u++) {
- r += d[k + u] + a;
- }
- 0 < b && (r += d[k + b - 1]);
- return r;
- };
- d.prototype.indexOf = function(a, b) {
- void 0 === b && (b = 0);
- var d = this._length, k = b | 0;
- if (0 > k) {
- k += d, 0 > k && (k = 0);
- } else {
- if (k >= d) {
- return -1;
- }
- }
- for (var r = this._buffer, d = this._length, u = this._offset, d = u + d, k = k + u;k < d;k++) {
- if (r[k] === a) {
- return k - u;
- }
- }
- return -1;
- };
- d.prototype.lastIndexOf = function(a, b) {
- void 0 === b && (b = 2147483647);
- var d = this._length, k = b | 0;
- if (0 > k) {
- if (k += d, 0 > k) {
- return -1;
- }
- } else {
- k >= d && (k = d);
- }
- for (var d = this._buffer, r = this._offset, k = k + r;k-- > r;) {
- if (d[k] === a) {
- return k - r;
- }
- }
- return -1;
- };
- d.prototype.push = function(a, b, d, k, r, u, q, g) {
- this._checkFixed();
- this._ensureCapacity(this._length + arguments.length);
- for (var p = 0;p < arguments.length;p++) {
- this._buffer[this._offset + this._length++] = arguments[p];
- }
- };
- d.prototype.pop = function() {
- this._checkFixed();
- if (0 === this._length) {
- return d.DEFAULT_VALUE;
- }
- this._length--;
- return this._buffer[this._offset + this._length];
- };
- d.prototype.reverse = function() {
- for (var a = this._offset, b = this._offset + this._length - 1, d = this._buffer;a < b;) {
- var k = d[a];
- d[a] = d[b];
- d[b] = k;
- a++;
- b--;
- }
- return this;
- };
- d.prototype.sort = function(a) {
- if (0 === arguments.length) {
- return Array.prototype.sort.call(this._view()), this;
- }
- if (this.sec.AXFunction.axIsType(a)) {
- return Array.prototype.sort.call(this._view(), a.value), this;
- }
- (a | 0) & d.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, b) {
- return b - a;
- }) : Array.prototype.sort.call(this._view(), function(a, b) {
- return a - b;
- });
- return this;
- };
- d.prototype.shift = function() {
- this._checkFixed();
- if (0 === this._length) {
- return 0;
- }
- this._length--;
- return this._buffer[this._offset++];
- };
- d.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];
- }
- }
- };
- d.prototype.slice = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 2147483647);
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), k = Math.min(Math.max(b, r), k), u = new this.sec.Float64Vector(k - r, this.fixed);
- u._buffer.set(d.subarray(this._offset + r, this._offset + k), u._offset);
- return u;
- };
- d.prototype.splice = function(a, b) {
- var d = this._buffer, k = this._length, r = Math.min(Math.max(a, 0), k), u = this._offset + r, q = Math.min(Math.max(b, 0), k - r), r = arguments.length - 2, g, p = new this.sec.Float64Vector(q, this.fixed);
- 0 < q && (g = d.subarray(u, u + q), p._buffer.set(g, p._offset));
- this._ensureCapacity(k - q + r);
- k = d.subarray(u + q, k);
- d.set(k, u + r);
- this._length += r - q;
- for (k = 0;k < r;k++) {
- d[u + k] = arguments[k + 2];
- }
- return p;
- };
- d.prototype._slide = function(a) {
- this._buffer.set(this._view(), this._offset + a);
- this._offset += a;
- };
- Object.defineProperty(d.prototype, "length", {get:function() {
- return this._length;
- }, set:function(a) {
- a >>>= 0;
- if (a > this._length) {
- this._ensureCapacity(a);
- for (var b = this._offset + this._length, f = this._offset + a;b < f;b++) {
- this._buffer[b] = d.DEFAULT_VALUE;
- }
- }
- this._length = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "fixed", {get:function() {
- return this._fixed;
- }, set:function(a) {
- this._fixed = !!a;
- }, enumerable:!0, configurable:!0});
- d.prototype._checkFixed = function() {
- this._fixed && this.sec.throwError("RangeError", b.Errors.VectorFixedError);
- };
- d.prototype.axGetNumericProperty = function(a) {
- var c = this._length, d = a | 0;
- (0 > d || d >= c || d != a) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, c);
- return this._buffer[this._offset + d];
- };
- d.prototype.axSetNumericProperty = function(a, c) {
- var d = this._length, k = a | 0;
- (0 > k || k > d || k != a || k === d && this._fixed) && this.sec.throwError("RangeError", b.Errors.OutOfRangeError, a, d);
- k === this._length && (this._ensureCapacity(this._length + 1), this._length++);
- this._buffer[this._offset + k] = c;
- };
- d.prototype.axHasPropertyInternal = function(a) {
- if ((a.name | 0) === a.name) {
- return 0 <= a.name && a.name < this._length;
- }
- var c = b.axCoerceName(a.name);
- return a.isRuntimeName() && e.isIndex(c) ? (a = c >>> 0, 0 <= a && a < this._length) : this.axResolveMultiname(a) in this;
- };
- d.prototype.axNextValue = function(a) {
- return this._buffer[this._offset + a - 1];
- };
- d.prototype.axNextNameIndex = function(a) {
- a += 1;
- return a <= this._length ? a : 0;
- };
- d.EXTRA_CAPACITY = 4;
- d.INITIAL_CAPACITY = 10;
- d.DEFAULT_VALUE = 0;
- d.DESCENDING = 2;
- d.UNIQUESORT = 4;
- d.RETURNINDEXEDARRAY = 8;
- return d;
- }(h.BaseVector);
- h.Float64Vector = m;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b) {
- return "object" === typeof a && a && (a.axClass === b.AXXML || a.axClass === b.AXXMLList || a.axClass === b.AXQName || a.axClass === b.AXNamespace);
- }
- function t(a, b) {
- if (!a || a.axClass !== b.AXXML) {
- return String(a);
- }
- switch(a._kind) {
- case 3:
- ;
- case 2:
- return a._value;
- default:
- if (a.hasSimpleContent()) {
- for (var c = "", d = 0;d < a._children.length;d++) {
- var g = a._children[d];
- 4 !== g._kind && 5 !== g._kind && (c += t(g, b));
- }
- return c;
- }
- return k(b, a);
- }
- }
- function m(a) {
- a = String(a);
- for (var b = 0, c;b < a.length && "&" !== (c = a[b]) && "<" !== c && ">" !== c;) {
- b++;
- }
- if (b >= a.length) {
- return a;
- }
- for (var d = a.substring(0, b);b < a.length;) {
- switch(c = a[b++], c) {
- case "&":
- d += "&";
- break;
- case "<":
- d += "<";
- break;
- case ">":
- d += ">";
- break;
- default:
- d += c;
- }
- }
- return d;
- }
- function l(a) {
- a = String(a);
- for (var b = 0, c;b < a.length && "&" !== (c = a[b]) && "<" !== c && '"' !== c && "\n" !== c && "\r" !== c && "\t" !== c;) {
- b++;
- }
- if (b >= a.length) {
- return a;
- }
- for (var d = a.substring(0, b);b < a.length;) {
- switch(c = a[b++], c) {
- case "&":
- d += "&";
- break;
- case "<":
- d += "<";
- break;
- case '"':
- d += """;
- break;
- case "\n":
- d += "
";
- break;
- case "\r":
- d += "
";
- break;
- case "\t":
- d += " ";
- break;
- default:
- d += c;
- }
- }
- return d;
- }
- function d(a, b) {
- var c = a[b];
- return " " === c || "\n" === c || "\r" === c || "\t" === c;
- }
- function a(a) {
- for (var b = 0;b < a.length && d(a, b);) {
- b++;
- }
- if (b >= a.length) {
- return "";
- }
- for (var c = a.length - 1;d(a, c);) {
- c--;
- }
- return 0 === b && c === a.length - 1 ? a : a.substring(b, c + 1);
- }
- function c(a) {
- if (0 < a) {
- if (void 0 !== w[a]) {
- return w[a];
- }
- for (var b = "", c = 0;c < a;c++) {
- b += " ";
- }
- return w[a] = b;
- }
- return "";
- }
- function f(a) {
- for (var b = 1, c;;) {
- c = "_ns" + b;
- if (!a.some(function(a) {
- return a.prefix === c;
- })) {
- return c;
- }
- b++;
- }
- }
- function k(a, b) {
- if (null === b || void 0 === b) {
- throw new TypeError;
- }
- return n(b, a) ? b.toXMLString() : m(String(b));
- }
- function r(a, c) {
- null === a && c.throwError("TypeError", b.Errors.ConvertNullToObjectError);
- void 0 === a && c.throwError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- if (a.axClass === c.AXXML) {
- return a;
- }
- if (a.axClass === c.AXXMLList) {
- return 1 !== a._children.length && c.throwError("TypeError", b.Errors.XMLMarkupMustBeWellFormed), a._children[0];
- }
- var d = c.xmlParser.parseFromString(b.axCoerceString(a)), g = d._children.length;
- if (0 === g) {
- return B(c, 3);
- }
- if (1 === g) {
- return d._children[0]._parent = null, d._children[0];
- }
- c.throwError("TypeError", b.Errors.XMLMarkupMustBeWellFormed);
- }
- function u(a, c) {
- null === a && c.sec.throwError("TypeError", b.Errors.ConvertNullToObjectError);
- void 0 === a && c.sec.throwError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- if (a.axClass === c.sec.AXXML) {
- c.append(a);
- } else {
- var d = p(c.sec), d = '' + a + "";
- if (d = r(d, c.sec)._children) {
- for (var g = 0;g < d.length;g++) {
- var f = d[g];
- f._parent = null;
- c.append(f);
- }
- }
- }
- }
- function q(a, c) {
- if (void 0 === a) {
- return C;
- }
- var d;
- if ("object" === typeof a && null !== a) {
- if (a instanceof b.Multiname) {
- return a;
- }
- if (a.axClass === c.AXQName) {
- return a.name;
- }
- d = String(a);
- } else {
- "number" === typeof a ? d = a + "" : "string" === typeof a ? d = "*" === a ? null : a : c.throwError("TypeError", b.Errors.XMLInvalidName, a);
- }
- return d && "@" === d[0] ? (d = d.substr(1), "*" === d && (d = null), new b.Multiname(null, 0, 13, [], d)) : new b.Multiname(null, 0, 7, [], d);
- }
- function g(a, b) {
- var c = y;
- c.kind = a.kind;
- a.name && a.name.axClass === b.AXQName && (a = a.name.name);
- if (a.isQName()) {
- c.name = a.name, c.namespaces = a.namespaces;
- } else {
- if (a.isAnyNamespace()) {
- c.namespaces = a.namespaces;
- } else {
- for (var d = p(b), g = a.namespaces, f = !1, k = 0;k < g.length;k++) {
- var q = g[k];
- if (q.uri === d.uri && q.prefix === d.prefix && q.type === d.type) {
- f = !0;
- break;
- }
- }
- c.namespaces = f ? a.namespaces : a.namespaces.concat(d);
- }
- }
- d = a.name;
- a.isAnyName() || "*" === d || null === d ? c.name = null : 1 < d.length && "@" === d[0] ? c.isAttribute() ? c.name = d : (c.name = "@*" === d ? null : d.substr(1), c.kind = 1 === c.namespaces.length ? 13 : 14) : c.name = d;
- return c;
- }
- function p(a) {
- for (var c = b.getCurrentScope();c;) {
- if (c.defaultNamespace) {
- return c.defaultNamespace;
- }
- c = c.parent;
- }
- return a.AXNamespace.defaultNamespace;
- }
- function v(a, b) {
- for (var c = a.uri, d = 0;b && d < b.length;d++) {
- if (c === b[d].uri) {
- return b[d];
- }
- }
- return a.namespaces[0];
- }
- function z(a, b) {
- try {
- b.AXQName.Create(a);
- } catch (c) {
- return !1;
- }
- return !0;
- }
- function B(a, c, d, g, f) {
- void 0 === c && (c = 3);
- void 0 === d && (d = "");
- void 0 === g && (g = "");
- a = a.AXXML.Create();
- d = b.internPrefixedNamespace(0, d, f || "");
- g = new b.Multiname(null, 0, 2 === c ? 13 : 7, [d], g, null);
- a.init(c, g);
- return a;
- }
- var E = e.Debug.assert, A = e.Debug.notImplemented, G = e.ObjectUtilities.defineNonEnumerableProperty;
- h.isXMLType = n;
- h.isXMLCollection = function(a, b) {
- return "object" === typeof a && a && (a.axClass === b.AXXML || a.axClass === b.AXXMLList);
- };
- h.escapeElementValue = m;
- h.escapeAttributeValue = l;
- var w = [];
- h.isXMLName = z;
- var y = new b.Multiname(null, 0, 7, [], null), C = new b.Multiname(null, 0, 7, [], null);
- (function(a) {
- a[a.NoError = 0] = "NoError";
- a[a.EndOfDocument = -1] = "EndOfDocument";
- a[a.UnterminatedCdat = -2] = "UnterminatedCdat";
- a[a.UnterminatedXmlDeclaration = -3] = "UnterminatedXmlDeclaration";
- a[a.UnterminatedDoctypeDeclaration = -4] = "UnterminatedDoctypeDeclaration";
- a[a.UnterminatedComment = -5] = "UnterminatedComment";
- a[a.MalformedElement = -6] = "MalformedElement";
- a[a.OutOfMemory = -7] = "OutOfMemory";
- a[a.UnterminatedAttributeValue = -8] = "UnterminatedAttributeValue";
- a[a.UnterminatedElement = -9] = "UnterminatedElement";
- a[a.ElementNeverBegun = -10] = "ElementNeverBegun";
- })(h.XMLParserErrorCode || (h.XMLParserErrorCode = {}));
- var x = function() {
- function a() {
- }
- a.prototype.resolveEntities = function(a) {
- return a.replace(/&([^;]+);/g, function(a, b) {
- if ("#x" === b.substring(0, 2)) {
- return String.fromCharCode(parseInt(b.substring(2), 16));
- }
- if ("#" === b.substring(0, 1)) {
- return String.fromCharCode(parseInt(b.substring(1), 10));
- }
- switch(b) {
- case "lt":
- return "<";
- case "gt":
- return ">";
- case "amp":
- return "&";
- case "quot":
- return '"';
- }
- return a;
- });
- };
- a.prototype.parseContent = function(a, b) {
- function c() {
- for (;g < a.length && d(a, g);) {
- ++g;
- }
- }
- for (var g = b, f, p = [];g < a.length && !d(a, g) && ">" !== a[g] && "/" !== a[g];) {
- ++g;
- }
- f = a.substring(b, g);
- for (c();g < a.length && ">" !== a[g] && "/" !== a[g] && "?" !== a[g];) {
- c();
- for (var k = "", q = "";g < a.length && !d(a, g) && "=" !== a[g];) {
- k += a[g], ++g;
- }
- c();
- if ("=" !== a[g]) {
- return null;
- }
- ++g;
- c();
- q = a[g];
- if ('"' !== q && "'" !== q) {
- return null;
- }
- var v = a.indexOf(q, ++g);
- if (0 > v) {
- return null;
- }
- q = a.substring(g, v);
- p.push({name:k, value:this.resolveEntities(q)});
- g = v + 1;
- c();
- }
- return {name:f, attributes:p, parsed:g - b};
- };
- a.prototype.parseProcessingInstruction = function(a, b) {
- for (var c = b, g, f;c < a.length && !d(a, c) && ">" !== a[c] && "/" !== a[c];) {
- ++c;
- }
- for (g = a.substring(b, c);c < a.length && d(a, c);) {
- ++c;
- }
- for (f = c;c < a.length && ("?" !== a[c] || ">" != a[c + 1]);) {
- ++c;
- }
- f = a.substring(f, c);
- return {name:g, value:f, parsed:c - b};
- };
- a.prototype.parseXml = function(a) {
- for (var b = 0;b < a.length;) {
- var c = b;
- if ("<" === a[b]) {
- switch(++c, a[c]) {
- case "/":
- ++c;
- b = a.indexOf(">", c);
- if (0 > b) {
- this.onError(-9);
- return;
- }
- this.onEndElement(a.substring(c, b));
- c = b + 1;
- break;
- case "?":
- ++c;
- b = this.parseProcessingInstruction(a, c);
- if ("?>" != a.substring(c + b.parsed, c + b.parsed + 2)) {
- this.onError(-3);
- return;
- }
- this.onPi(b.name, b.value);
- c += b.parsed + 2;
- break;
- case "!":
- if ("--" === a.substring(c + 1, c + 3)) {
- b = a.indexOf("--\x3e", c + 3);
- if (0 > b) {
- this.onError(-5);
- return;
- }
- this.onComment(a.substring(c + 3, b));
- c = b + 3;
- } else {
- if ("[CDATA[" === a.substring(c + 1, c + 8)) {
- b = a.indexOf("]]\x3e", c + 8);
- if (0 > b) {
- this.onError(-2);
- return;
- }
- this.onCdata(a.substring(c + 8, b));
- c = b + 3;
- } else {
- if ("DOCTYPE" === a.substring(c + 1, c + 8)) {
- var d = a.indexOf("[", c + 8), g = !1, b = a.indexOf(">", c + 8);
- if (0 > b) {
- this.onError(-4);
- return;
- }
- if (0 < d && b > d) {
- b = a.indexOf("]>", c + 8);
- if (0 > b) {
- this.onError(-4);
- return;
- }
- g = !0;
- }
- c = a.substring(c + 8, b + (g ? 1 : 0));
- this.onDoctype(c);
- c = b + (g ? 2 : 1);
- } else {
- this.onError(-6);
- return;
- }
- }
- }
- break;
- default:
- b = this.parseContent(a, c);
- if (null === b) {
- this.onError(-6);
- return;
- }
- g = !1;
- if ("/>" === a.substring(c + b.parsed, c + b.parsed + 2)) {
- g = !0;
- } else {
- if (">" !== a.substring(c + b.parsed, c + b.parsed + 1)) {
- this.onError(-9);
- return;
- }
- }
- this.onBeginElement(b.name, b.attributes, g);
- c += b.parsed + (g ? 2 : 1);
- }
- } else {
- for (;c++ < a.length && "<" !== a[c];) {
- }
- b = a.substring(b, c);
- this.onText(this.resolveEntities(b));
- }
- b = c;
- }
- };
- a.prototype.onPi = function(a, b) {
- };
- a.prototype.onComment = function(a) {
- };
- a.prototype.onCdata = function(a) {
- };
- a.prototype.onDoctype = function(a) {
- };
- a.prototype.onText = function(a) {
- };
- a.prototype.onBeginElement = function(a, b, c) {
- };
- a.prototype.onEndElement = function(a) {
- };
- a.prototype.onError = function(a) {
- };
- return a;
- }();
- h.XMLParserBase = x;
- x = function(c) {
- function d(a) {
- c.call(this);
- this.sec = a;
- this.scopes = [];
- }
- __extends(d, c);
- d.prototype.isWhitespacePreserved = function() {
- for (var a = this.scopes, b = a.length - 1;0 <= b;--b) {
- if ("preserve" === a[b].space) {
- return !0;
- }
- }
- return !1;
- };
- d.prototype.lookupDefaultNs = function() {
- for (var a = this.scopes, b = a.length - 1;0 <= b;--b) {
- if ("xmlns" in a[b]) {
- return a[b].xmlns;
- }
- }
- return "";
- };
- d.prototype.lookupNs = function(a) {
- for (var b = this.scopes, c = b.length - 1;0 <= c;--c) {
- if (a in b[c].lookup) {
- return b[c].lookup[a];
- }
- }
- };
- d.prototype.getName = function(a, c) {
- var d = a.indexOf(":");
- if (0 <= d) {
- var g = a.substring(0, d), d = a.substring(d + 1), f = this.lookupNs(g);
- void 0 === f && this.sec.throwError("TypeError", b.Errors.XMLPrefixNotBound, g, d);
- return {name:f + "::" + d, localName:d, prefix:g, namespace:f};
- }
- return c ? {name:a, localName:a, prefix:"", namespace:this.lookupDefaultNs()} : {name:a, localName:a, prefix:"", namespace:""};
- };
- d.prototype.onError = function(a) {
- switch(a) {
- case -6:
- this.sec.throwError("TypeError", b.Errors.XMLMalformedElement);
- break;
- case -9:
- this.sec.throwError("TypeError", b.Errors.XMLUnterminatedElement);
- break;
- case -4:
- this.sec.throwError("TypeError", b.Errors.XMLUnterminatedDocTypeDecl);
- break;
- case -2:
- this.sec.throwError("TypeError", b.Errors.XMLUnterminatedCData);
- break;
- case -5:
- this.sec.throwError("TypeError", b.Errors.XMLUnterminatedComment);
- break;
- case -3:
- this.sec.throwError("TypeError", b.Errors.XMLUnterminatedXMLDecl);
- }
- };
- d.prototype.onPi = function(a, b) {
- this.pi(a, b);
- };
- d.prototype.onComment = function(a) {
- this.comment(a);
- };
- d.prototype.onCdata = function(a) {
- this.cdata(a);
- };
- d.prototype.onDoctype = function(a) {
- this.doctype(a);
- };
- d.prototype.onText = function(a) {
- this.text(a, this.isWhitespacePreserved());
- };
- d.prototype.onBeginElement = function(c, d, g) {
- for (var f = this.scopes, p = {namespaces:[], lookup:Object.create(null), inScopes:null}, k = 0;k < d.length;++k) {
- var q = d[k], v = q.name;
- "xmlns:" === v.substring(0, 6) ? (v = v.substring(6), q = q.value, this.lookupNs(v) !== q && (p.lookup[v] = a(q), q = b.internPrefixedNamespace(0, q, v), p.namespaces.push(q)), d[k] = null) : "xmlns" === v ? (q = q.value, this.lookupDefaultNs() !== q && (p.xmlns = a(q), q = b.internNamespace(0, q), p.namespaces.push(q)), d[k] = null) : "xml:" === v.substring(0, 4) && (v = v.substring(4), p[v] = a(q.value));
- }
- var r = [];
- p.namespaces.forEach(function(a) {
- a.prefix && p.lookup[a.prefix] !== a.uri || r.push(a);
- });
- f[f.length - 1].inScopes.forEach(function(a) {
- (!a.prefix || a.prefix in p.lookup) && (a.prefix || "xmlns" in p) || r.push(a);
- });
- p.inScopes = r;
- f.push(p);
- v = [];
- for (k = 0;k < d.length;++k) {
- (q = d[k]) && v.push({name:this.getName(q.name, !1), value:q.value});
- }
- this.beginElement(this.getName(c, !0), v, r, g);
- g && f.pop();
- };
- d.prototype.onEndElement = function(a) {
- this.endElement(this.getName(a, !0));
- this.scopes.pop();
- };
- d.prototype.beginElement = function(a, b, c, d) {
- var g = this.currentElement;
- this.elementsStack.push(g);
- this.currentElement = B(this.sec, 1, a.namespace, a.localName, a.prefix);
- for (a = 0;a < b.length;++a) {
- var f = b[a], p = B(this.sec, 2, f.name.namespace, f.name.localName, f.name.prefix);
- p._value = f.value;
- p._parent = this.currentElement;
- this.currentElement._attributes.push(p);
- }
- for (a = 0;a < c.length;++a) {
- this.currentElement._inScopeNamespaces.push(c[a]);
- }
- g.insert(g._children.length, this.currentElement);
- d && (this.currentElement = this.elementsStack.pop());
- };
- d.prototype.endElement = function(a) {
- this.currentElement = this.elementsStack.pop();
- };
- d.prototype.text = function(b, c) {
- this.sec.AXXML.ignoreWhitespace && (b = a(b));
- if (!(0 === b.length || c && this.sec.AXXML.ignoreWhitespace)) {
- var d = B(this.sec);
- d._value = b;
- this.currentElement.insert(this.currentElement._children.length, d);
- }
- };
- d.prototype.cdata = function(a) {
- var b = B(this.sec);
- b._value = a;
- this.currentElement.insert(this.currentElement._children.length, b);
- };
- d.prototype.comment = function(a) {
- if (!this.sec.AXXML.ignoreComments) {
- var b = B(this.sec, 4, "", "");
- b._value = a;
- this.currentElement.insert(this.currentElement._children.length, b);
- }
- };
- d.prototype.pi = function(a, b) {
- if (!this.sec.AXXML.ignoreProcessingInstructions) {
- var c = B(this.sec, 5, "", a);
- c._value = b;
- this.currentElement.insert(this.currentElement._children.length, c);
- }
- };
- d.prototype.doctype = function(a) {
- };
- d.prototype.parseFromString = function(a, c) {
- var d = this.currentElement = B(this.sec, 1, "", "", "");
- this.elementsStack = [];
- var g = p(this.sec);
- this.scopes = [{namespaces:[], lookup:{xmlns:"http://www.w3.org/2000/xmlns/", xml:"http://www.w3.org/XML/1998/namespace"}, inScopes:[g], space:"default", xmlns:g.uri}];
- this.parseXml(a);
- this.currentElement = null;
- 0 < this.elementsStack.length && (g = this.elementsStack.pop()._name.name, this.sec.throwError("TypeError", b.Errors.XMLUnterminatedElementTag, g, g));
- this.elementsStack = null;
- return d;
- };
- return d;
- }(x);
- h.XMLParser = x;
- x = function(a) {
- function c(d, g) {
- a.call(this);
- var f = "", p = "";
- if (0 !== arguments.length) {
- if (1 === arguments.length) {
- var k = d;
- if (k instanceof b.Namespace) {
- this._ns = k;
- return;
- }
- k && "object" === typeof k ? k.axClass === this.sec.AXNamespace ? (f = k, p = f.prefix, f = f.uri) : k.axClass === this.sec.AXQName && null !== k.uri && (f = k.uri) : (f = t(k, this.sec), p = "" === f ? "" : void 0);
- } else {
- k = g, f = e.isObject(k) && k.axClass === this.sec.AXQName && null !== k.uri ? k.uri : t(k, this.sec), "" === f ? void 0 === d || "" === t(d, this.sec) ? p = "" : this.sec.throwError("TypeError", b.Errors.XMLNamespaceWithPrefixAndNoURI, d) : p = void 0 === d ? void 0 : !1 === z(d, this.sec) ? void 0 : t(d, this.sec);
- }
- }
- this._ns = b.internPrefixedNamespace(0, f, p);
- }
- __extends(c, a);
- c.classInitializer = function() {
- G(this, "$Bglength", 2);
- G(this.dPrototype, "$BgtoString", c.prototype.toString);
- };
- c.axApply = function(a, b) {
- var c = b[0], d = b[1];
- if (1 === b.length && e.isObject(c) && c.axClass === this.sec.AXNamespace) {
- return c;
- }
- switch(b.length) {
- case 0:
- return this.sec.AXNamespace.Create();
- case 1:
- return this.sec.AXNamespace.Create(c);
- default:
- return this.sec.AXNamespace.Create(c, d);
- }
- };
- c.Create = function(a, b) {
- var c = Object.create(this.sec.AXNamespace.tPrototype);
- c.axInitializer.apply(c, arguments);
- return c;
- };
- c.FromNamespace = function(a) {
- var b = Object.create(this.sec.AXNamespace.tPrototype);
- b._ns = a;
- return b;
- };
- c.prototype.equals = function(a) {
- return a && a.axClass === this.axClass && a._ns.uri === this._ns.uri || "string" === typeof a && this._ns.uri === a;
- };
- Object.defineProperty(c.prototype, "prefix", {get:function() {
- return this._ns.prefix;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "uri", {get:function() {
- return this._ns.uri;
- }, enumerable:!0, configurable:!0});
- c.prototype.toString = function() {
- return this === this.axClass.dPrototype ? "" : this._ns.uri;
- };
- c.prototype.valueOf = function() {
- return this === this.axClass.dPrototype ? "" : this._ns.uri;
- };
- c.instanceConstructor = c;
- c.defaultNamespace = b.Namespace.PUBLIC;
- return c;
- }(h.ASObject);
- h.ASNamespace = x;
- x = function(a) {
- function c(d, g) {
- a.call(this);
- var f, k;
- 0 === arguments.length ? f = "" : 1 === arguments.length ? f = d : (k = d, f = g);
- if (f && f.axClass === this.sec.AXQName) {
- if (2 > arguments.length) {
- this.name = f.name;
- return;
- }
- f = f.localName;
- }
- f = void 0 === f ? "" : t(f, this.sec);
- void 0 === k && (k = "*" === f ? null : p(this.sec));
- var q = null;
- null !== k && (k.axClass !== this.sec.AXNamespace && (k = this.sec.AXNamespace.Create(k)), q = k._ns);
- this.name = new b.Multiname(null, 0, 7, [q], f);
- }
- __extends(c, a);
- c.classInitializer = function() {
- G(this, "$Bglength", 2);
- G(this.dPrototype, "$BgtoString", c.prototype.ecmaToString);
- };
- c.Create = function(a, b, c) {
- var d = Object.create(this.sec.AXQName.tPrototype);
- d.axInitializer.apply(d, arguments);
- return d;
- };
- c.FromMultiname = function(a) {
- var b = Object.create(this.sec.AXQName.tPrototype);
- b.name = a;
- return b;
- };
- c.axApply = function(a, b) {
- var c = b[0], d = b[1];
- if (1 === b.length && c && c.axClass === this.sec.AXQName) {
- return c;
- }
- switch(b.length) {
- case 0:
- return this.sec.AXQName.Create();
- case 1:
- return this.sec.AXQName.Create(c);
- default:
- return this.sec.AXQName.Create(c, d);
- }
- };
- c.prototype.equals = function(a) {
- return a && a.axClass === this.sec.AXQName && a.uri === this.uri && a.name.name === this.name.name || "string" === typeof a && this.toString() === a;
- };
- Object.defineProperty(c.prototype, "localName", {get:function() {
- return this.name.name;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "uri", {get:function() {
- var a = this.name.namespaces;
- return 1 < a.length ? "" : a[0] ? a[0].uri : null;
- }, enumerable:!0, configurable:!0});
- c.prototype.ecmaToString = function() {
- if (this && this === this.sec.AXQName.dPrototype) {
- return "";
- }
- this && this.axClass === this.sec.AXQName || this.sec.throwError("TypeError", b.Errors.InvokeOnIncompatibleObjectError, "QName.prototype.toString");
- return this.toString();
- };
- c.prototype.toString = function() {
- var a = this.uri;
- if ("" === a) {
- return this.name.name;
- }
- if (null === a) {
- return "*::" + this.name.name;
- }
- var a = a + "", b = a.charCodeAt(a.length - 1), c = a;
- 57344 <= b && 63743 >= b && (c = a.substr(0, a.length - 1));
- return "" === c ? this.name.name : c + "::" + this.name.name;
- };
- c.prototype.valueOf = function() {
- return this;
- };
- Object.defineProperty(c.prototype, "prefix", {get:function() {
- return this.name.namespaces[0] ? this.name.namespaces[0].prefix : null;
- }, enumerable:!0, configurable:!0});
- return c;
- }(h.ASObject);
- h.ASQName = x;
- var M;
- (function(a) {
- a[a.FLAG_IGNORE_COMMENTS = 1] = "FLAG_IGNORE_COMMENTS";
- a[a.FLAG_IGNORE_PROCESSING_INSTRUCTIONS = 2] = "FLAG_IGNORE_PROCESSING_INSTRUCTIONS";
- a[a.FLAG_IGNORE_WHITESPACE = 4] = "FLAG_IGNORE_WHITESPACE";
- a[a.FLAG_PRETTY_PRINTING = 8] = "FLAG_PRETTY_PRINTING";
- a[a.ALL = a.FLAG_IGNORE_COMMENTS | a.FLAG_IGNORE_PROCESSING_INSTRUCTIONS | a.FLAG_IGNORE_WHITESPACE | a.FLAG_PRETTY_PRINTING] = "ALL";
- })(M || (M = {}));
- (function(a) {
- a[a.Unknown = 0] = "Unknown";
- a[a.Element = 1] = "Element";
- a[a.Attribute = 2] = "Attribute";
- a[a.Text = 3] = "Text";
- a[a.Comment = 4] = "Comment";
- a[a.ProcessingInstruction = 5] = "ProcessingInstruction";
- })(h.ASXMLKind || (h.ASXMLKind = {}));
- var I = [null, "element", "attribute", "text", "comment", "processing-instruction"], x = function(d) {
- function k(a) {
- d.call(this);
- this._parent = null;
- e.isNullOrUndefined(a) && (a = "");
- if ("string" === typeof a && 0 === a.length) {
- this._kind = 3, this._value = "";
- } else {
- var b = r(a, this.sec);
- n(a, this.sec) && (b = b._deepCopy());
- this._kind = b._kind;
- this._name = b._name;
- this._value = b._value;
- this._attributes = b._attributes;
- this._inScopeNamespaces = b._inScopeNamespaces;
- if (this._children = a = b._children) {
- for (b = 0;b < a.length;b++) {
- a[b]._parent = this;
- }
- }
- }
- }
- __extends(k, d);
- k.classInitializer = function() {
- G(this, "$Bglength", 1);
- var a = this.dPrototype, b = k.prototype;
- h.addPrototypeFunctionAlias(a, "$BgvalueOf", b.valueOf);
- G(a, "$BghasOwnProperty", b.native_hasOwnProperty);
- G(a, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable);
- h.addPrototypeFunctionAlias(this, "$Bgsettings", k.native_settings);
- h.addPrototypeFunctionAlias(this, "$BgsetSettings", k.native_setSettings);
- h.addPrototypeFunctionAlias(this, "$BgdefaultSettings", k.native_defaultSettings);
- h.addPrototypeFunctionAlias(a, "$BgtoString", b.toString);
- h.addPrototypeFunctionAlias(a, "$BgaddNamespace", b.addNamespace);
- h.addPrototypeFunctionAlias(a, "$BgappendChild", b.appendChild);
- h.addPrototypeFunctionAlias(a, "$Bgattribute", b.attribute);
- h.addPrototypeFunctionAlias(a, "$Bgattributes", b.attributes);
- h.addPrototypeFunctionAlias(a, "$Bgchild", b.child);
- h.addPrototypeFunctionAlias(a, "$BgchildIndex", b.childIndex);
- h.addPrototypeFunctionAlias(a, "$Bgchildren", b.children);
- h.addPrototypeFunctionAlias(a, "$Bgcomments", b.comments);
- h.addPrototypeFunctionAlias(a, "$Bgcontains", b.contains);
- h.addPrototypeFunctionAlias(a, "$Bgcopy", b.copy);
- h.addPrototypeFunctionAlias(a, "$Bgdescendants", b.descendants);
- h.addPrototypeFunctionAlias(a, "$Bgelements", b.elements);
- h.addPrototypeFunctionAlias(a, "$BghasComplexContent", b.hasComplexContent);
- h.addPrototypeFunctionAlias(a, "$BghasSimpleContent", b.hasSimpleContent);
- h.addPrototypeFunctionAlias(a, "$BginScopeNamespaces", b.inScopeNamespaces);
- h.addPrototypeFunctionAlias(a, "$BginsertChildAfter", b.insertChildAfter);
- h.addPrototypeFunctionAlias(a, "$BginsertChildBefore", b.insertChildBefore);
- h.addPrototypeFunctionAlias(a, "$Bglength", b.length);
- h.addPrototypeFunctionAlias(a, "$BglocalName", b.localName);
- h.addPrototypeFunctionAlias(a, "$Bgname", b.name);
- h.addPrototypeFunctionAlias(a, "$Bgnamespace", b.namespace);
- h.addPrototypeFunctionAlias(a, "$BgnamespaceDeclarations", b.namespaceDeclarations);
- h.addPrototypeFunctionAlias(a, "$BgnodeKind", b.nodeKind);
- h.addPrototypeFunctionAlias(a, "$Bgnormalize", b.normalize);
- h.addPrototypeFunctionAlias(a, "$Bgparent", b.parent);
- h.addPrototypeFunctionAlias(a, "$BgprocessingInstructions", b.processingInstructions);
- h.addPrototypeFunctionAlias(a, "$BgprependChild", b.prependChild);
- h.addPrototypeFunctionAlias(a, "$BgremoveNamespace", b.removeNamespace);
- h.addPrototypeFunctionAlias(a, "$Bgreplace", b.replace);
- h.addPrototypeFunctionAlias(a, "$BgsetChildren", b.setChildren);
- h.addPrototypeFunctionAlias(a, "$BgsetLocalName", b.setLocalName);
- h.addPrototypeFunctionAlias(a, "$BgsetName", b.setName);
- h.addPrototypeFunctionAlias(a, "$BgsetNamespace", b.setNamespace);
- h.addPrototypeFunctionAlias(a, "$Bgtext", b.text);
- h.addPrototypeFunctionAlias(a, "$BgtoXMLString", b.toXMLString);
- h.addPrototypeFunctionAlias(a, "$BgtoJSON", b.toJSON);
- };
- k.Create = function(a) {
- var b = Object.create(this.sec.AXXML.tPrototype);
- b.axInitializer(a);
- return b;
- };
- k.resetSettings = function() {
- this._flags = M.ALL;
- };
- k.native_settings = function() {
- var a = Object.create(this.sec.AXObject.tPrototype);
- a.$BgignoreComments = this.ignoreComments;
- a.$BgignoreProcessingInstructions = this.ignoreProcessingInstructions;
- a.$BgignoreWhitespace = this.ignoreWhitespace;
- a.$BgprettyPrinting = this.prettyPrinting;
- a.$BgprettyIndent = this.prettyIndent;
- return a;
- };
- k.native_setSettings = function(a) {
- e.isNullOrUndefined(a) ? (this.prettyPrinting = this.ignoreWhitespace = this.ignoreProcessingInstructions = this.ignoreComments = !0, this.prettyIndent = 2) : ("boolean" === typeof a.$BgignoreComments && (this.ignoreComments = a.$BgignoreComments), "boolean" === typeof a.$BgignoreProcessingInstructions && (this.ignoreProcessingInstructions = a.$BgignoreProcessingInstructions), "boolean" === typeof a.$BgignoreWhitespace && (this.ignoreWhitespace = a.$BgignoreWhitespace), "boolean" === a.$BgprettyPrinting &&
- (this.prettyPrinting = a.$BgprettyPrinting), "number" === a.$BgprettyIndent && (this.prettyIndent = a.$BgprettyIndent));
- };
- k.native_defaultSettings = function() {
- return {__proto__:this.sec.AXObject.tPrototype, $BgignoreComments:!0, $BgignoreProcessingInstructions:!0, $BgignoreWhitespace:!0, $BgprettyPrinting:!0, $BgprettyIndent:2};
- };
- k.axApply = function(a, b) {
- var c = b[0];
- e.isNullOrUndefined(c) && (c = "");
- return r(c, this.sec);
- };
- k.prototype.valueOf = function() {
- return this;
- };
- k.prototype.equals = function(a) {
- return a && a.axClass === this.sec.AXXMLList ? a.equals(this) : a && a.axClass === this.sec.AXXML ? (3 === this._kind || 2 === this._kind) && a.hasSimpleContent() || (3 === a._kind || 2 === a._kind) && this.hasSimpleContent() ? this.toString() === a.toString() : this._deepEquals(a) : this.hasSimpleContent() && this.toString() === b.axCoerceString(a);
- };
- k.prototype.init = function(a, b) {
- this._name = b;
- this._kind = a;
- this._parent = null;
- switch(a) {
- case 1:
- this._inScopeNamespaces = [];
- this._attributes = [];
- this._children = [];
- break;
- case 4:
- ;
- case 5:
- ;
- case 2:
- ;
- case 3:
- this._value = "";
- }
- return this;
- };
- k.prototype._deepEquals = function(a) {
- if (!a || a.axClass !== this.sec.AXXML || this._kind !== a._kind || !!this._name !== !!a._name || this._name && !this._name.equalsQName(a._name)) {
- return !1;
- }
- if (1 !== this._kind) {
- return this._value !== a._value ? !1 : !0;
- }
- var b = this._attributes, c = a._attributes;
- if (b.length !== c.length) {
- return !1;
- }
- var d = this._children;
- a = a._children;
- if (d.length !== a.length) {
- return !1;
- }
- var g = 0;
- a: for (;g < b.length;g++) {
- for (var f = b[g], p = 0;p < c.length;p++) {
- var k = c[p];
- if (k._name.equalsQName(f._name) && k._value === f._value) {
- continue a;
- }
- }
- return !1;
- }
- for (g = 0;g < d.length;g++) {
- if (!d[g].equals(a[g])) {
- return !1;
- }
- }
- return !0;
- };
- k.prototype._deepCopy = function() {
- var a = this._kind, b = this.sec.AXXML.Create();
- b._kind = a;
- b._name = this._name;
- switch(a) {
- case 1:
- b._inScopeNamespaces = this._inScopeNamespaces.slice();
- b._attributes = this._attributes.map(function(a) {
- a = a._deepCopy();
- a._parent = b;
- return a;
- });
- b._children = this._children.map(function(a) {
- a = a._deepCopy();
- a._parent = b;
- return a;
- });
- break;
- case 4:
- ;
- case 5:
- ;
- case 2:
- ;
- case 3:
- b._value = this._value;
- }
- return b;
- };
- k.prototype.resolveValue = function() {
- return this;
- };
- k.prototype._addInScopeNamespace = function(a) {
- this._inScopeNamespaces.some(function(b) {
- return b.uri === a.uri && b.prefix === a.prefix;
- }) || this._inScopeNamespaces.push(a);
- };
- Object.defineProperty(k, "ignoreComments", {get:function() {
- return !!(this._flags & 1);
- }, set:function(a) {
- this._flags = a ? this._flags | 1 : this._flags & -2;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k, "ignoreProcessingInstructions", {get:function() {
- return !!(this._flags & 2);
- }, set:function(a) {
- this._flags = a ? this._flags | 2 : this._flags & -3;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k, "ignoreWhitespace", {get:function() {
- return !!(this._flags & 4);
- }, set:function(a) {
- this._flags = a ? this._flags | 4 : this._flags & -5;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k, "prettyPrinting", {get:function() {
- return !!(this._flags & 8);
- }, set:function(a) {
- this._flags = a ? this._flags | 8 : this._flags & -9;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k, "prettyIndent", {get:function() {
- return this._prettyIndent;
- }, set:function(a) {
- this._prettyIndent = a | 0;
- }, enumerable:!0, configurable:!0});
- k.prototype.toString = function() {
- return this === this.axClass.dPrototype ? "" : this.hasComplexContent() ? this.toXMLString() : t(this, this.sec);
- };
- k.prototype.native_hasOwnProperty = function(a) {
- if (this === this.axClass.dPrototype) {
- return h.ASObject.prototype.native_hasOwnProperty.call(this, a);
- }
- a = q(a, this.sec);
- return this.hasProperty(a) ? !0 : this.axHasOwnProperty(a);
- };
- k.prototype.native_propertyIsEnumerable = function(a) {
- void 0 === a && (a = void 0);
- return "0" === String(a);
- };
- k.prototype.addNamespace = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- this._addInScopeNamespace(a);
- return this;
- };
- k.prototype.appendChild = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- if (a._parent) {
- var c = a._parent._children.indexOf(a);
- a._parent._children.splice(c, 1);
- }
- this._children.push(a);
- a._parent = this;
- return this;
- };
- k.prototype.attribute = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- e.isNullOrUndefined(a) && 0 < arguments.length && this.sec.throwError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- if (a && a.axClass === this.sec.AXQName) {
- return this.getProperty(a.name);
- }
- a = b.axCoerceString(a);
- if ("*" === a || 0 === arguments.length) {
- a = null;
- }
- y.name = a;
- y.namespaces = [b.Namespace.PUBLIC];
- y.kind = 13;
- return this.getProperty(y);
- };
- k.prototype.attributes = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- var a = this.sec.AXXMLList.CreateList(this, this._name);
- Array.prototype.push.apply(a._children, this._attributes);
- return a;
- };
- k.prototype.child = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- if (e.isIndex(a)) {
- var c = this.sec.AXXMLList.CreateList(null, null);
- this._children && a < this._children.length && c.append(this._children[a | 0]);
- return c;
- }
- a && a.axClass === this.sec.AXQName ? c = a.name : (c = y, c.kind = 7, c.name = t(a, this.sec));
- return this.getProperty(c);
- };
- k.prototype.childIndex = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this._parent && 2 !== this._kind ? this._parent._children.indexOf(this) : -1;
- };
- k.prototype.children = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- var a = this.sec.AXXMLList.CreateList(this, this._name);
- Array.prototype.push.apply(a._children, this._children);
- return a;
- };
- k.prototype.comments = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- var a = this.sec.AXXMLList.CreateList(this, this._name);
- this._children && this._children.forEach(function(b, c) {
- 4 === b._kind && a.append(b);
- });
- return a;
- };
- k.prototype.contains = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this === a;
- };
- k.prototype.copy = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this._deepCopy();
- };
- k.prototype.descendants = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- var c = this.sec.AXXMLList.CreateList(this, this._name);
- return this.descendantsInto(q(a, this.sec), c);
- };
- k.prototype.elements = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this.getProperty(q(a, this.sec));
- };
- k.prototype.hasComplexContent = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return 2 === this._kind || 4 === this._kind || 5 === this._kind || 3 === this._kind ? !1 : this._children.some(function(a) {
- return 1 === a._kind;
- });
- };
- k.prototype.hasSimpleContent = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.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(a) {
- return 1 !== a._kind;
- });
- };
- k.prototype.inScopeNamespaces = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- for (var a = this._inScopeNamespacesImpl(), c = [], d = 0;d < a.length;d++) {
- c[d] = this.sec.AXNamespace.FromNamespace(a[d]);
- }
- return this.sec.AXArray.axBox(c);
- };
- k.prototype._inScopeNamespacesImpl = function() {
- for (var a = this, b = [];null !== a;) {
- for (var c = a._inScopeNamespaces, d = 0;c && d < c.length;d++) {
- var g = c[d];
- b[g.prefix] || (b[g.prefix] = g, b.push(g));
- }
- a = a._parent;
- }
- return b;
- };
- k.prototype.insertChildAfter = function(a, c) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- if (!(1 < this._kind)) {
- if (null == a) {
- return this.insert(0, c), this;
- }
- a.axClass === this.sec.AXXMLList && 1 === a._children.length && (a = a._children[0]);
- if (a.axClass === this.sec.AXXML) {
- for (var d = 0;d < this._children.length;d++) {
- if (this._children[d] === a) {
- return this.insert(d + 1, c), this;
- }
- }
- }
- }
- };
- k.prototype.insertChildBefore = function(a, c) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- if (!(1 < this._kind)) {
- if (null == a) {
- return this.insert(this._children.length, c), this;
- }
- a.axClass === this.sec.AXXMLList && 1 === a._children.length && (a = a._children[0]);
- if (a.axClass === this.sec.AXXML) {
- for (var d = 0;d < this._children.length;d++) {
- if (this._children[d] === a) {
- return this.insert(d, c), this;
- }
- }
- }
- }
- };
- k.prototype.length = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this._children ? this._children.length : 0;
- };
- k.prototype.localName = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this._name.name;
- };
- k.prototype.name = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return this.sec.AXQName.FromMultiname(this._name);
- };
- k.prototype.namespace = function(a) {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- if (0 === arguments.length && 3 <= this._kind) {
- return null;
- }
- var c = this._inScopeNamespacesImpl();
- if (0 === arguments.length) {
- return this.sec.AXNamespace.FromNamespace(v(this._name, c));
- }
- a = b.axCoerceString(a);
- for (var d = 0;d < c.length;d++) {
- var g = c[d];
- if (g.prefix === a) {
- return this.sec.AXNamespace.FromNamespace(g);
- }
- }
- };
- k.prototype.namespaceDeclarations = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- A("public.XML::namespaceDeclarations");
- };
- k.prototype.nodeKind = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- return I[this._kind];
- };
- k.prototype.normalize = function() {
- this && this.axClass === this.sec.AXXML || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, this, "XML");
- for (var a = 0;a < this._children.length;) {
- var c = this._children[a];
- if (1 === c._kind) {
- c.normalize(), a++;
- } else {
- if (3 === c._kind) {
- for (a++;a < this._children.length;) {
- var d = this._children[a];
- if (3 !== d._kind) {
- break;
- }
- c._value += d._value;
- this.removeByIndex(a);
- }
- 0 === c._value.length ? this.removeByIndex(a) : a++;
- } else {
- a++;
- }
- }
- }
- return this;
- };
- k.prototype.removeByIndex = function(a) {
- this._children[a]._parent = null;
- this._children.splice(a, 1);
- };
- k.prototype.parent = function() {
- return this._parent || void 0;
- };
- k.prototype.processingInstructions = function(a) {
- var b = this.sec.AXXMLList.CreateList(this, this._name);
- b._targetObject = this;
- b._targetProperty = null;
- return this.processingInstructionsInto(q(a, this.sec), b);
- };
- k.prototype.processingInstructionsInto = function(a, b) {
- var c = a || "*", d = this._children;
- if (!d) {
- return b;
- }
- for (var g = 0;g < d.length;g++) {
- var f = d[g];
- 5 !== f._kind || "*" !== c && f._name.name !== c || b._children.push(f);
- }
- return b;
- };
- k.prototype.prependChild = function(a) {
- this.insert(0, a);
- return this;
- };
- k.prototype.removeNamespace = function(a) {
- A("public.XML::removeNamespace");
- };
- k.prototype.replace = function(a, b) {
- if (1 < this._kind) {
- return this;
- }
- if (1 === b._kind) {
- for (var c = this;c;) {
- if (c === b) {
- throw "Error in XML.prototype.replace()";
- }
- c = c._parent;
- }
- }
- var d;
- a && a.axClass === this.sec.AXQName && (d = a.name);
- d = q(a, this.sec);
- var c = d.name >>> 0, g = this._children;
- if (String(d.name) === String(c)) {
- c >= g.length && (c = g.length), g && g[c] && (g[c]._parent = null);
- } else {
- c = this.getProperty(d);
- if (0 === c._children.length) {
- return this;
- }
- c._children.forEach(function(a, b) {
- var c = g.indexOf(a);
- a._parent = null;
- 0 === b ? (d.name = String(c), g.splice(c, 1, void 0)) : g.splice(c, 1);
- });
- }
- 1 !== b._kind && 3 !== b._kind && 4 !== b._kind && 5 !== b._kind && (c = t(b, this.sec), b = B(this.sec), b._value = c);
- b._parent = this;
- g[d.name] = b;
- return this;
- };
- k.prototype.setChildren = function(a) {
- this.setProperty(C, a);
- return this;
- };
- k.prototype.setLocalName = function(a) {
- 3 !== this._kind && 4 !== this._kind && (a = a && a.axClass === this.sec.AXQName ? a.localName : b.axCoerceString(a), this._name.name = a);
- };
- k.prototype.setName = function(a) {
- if (3 !== this._kind && 4 !== this._kind) {
- a && a.axClass === this.sec.AXQName && null === a.uri && (a = a.localName);
- a = this.sec.AXQName.Create(a).name;
- 5 === this._kind && (a.namespaces[0] = b.Namespace.PUBLIC);
- this._name = a;
- var c = this;
- if (2 === this._kind) {
- if (null === this._parent) {
- return;
- }
- c = this._parent;
- }
- c.addInScopeNamespace(a.namespaces[0]);
- }
- };
- k.prototype.setNamespace = function(a) {
- 3 !== this._kind && 4 !== this._kind && 5 !== this._kind && (a = this.sec.AXNamespace.Create(a)._ns, this._name.namespaces = [a], 2 === this._kind ? this._parent && this._parent.addInScopeNamespace(a) : 1 === this._kind && this.addInScopeNamespace(a));
- };
- k.prototype.text = function() {
- var a = this.sec.AXXMLList.CreateList(this, this._name);
- this._children && this._children.forEach(function(b, c) {
- 3 === b._kind && a.append(b);
- });
- return a;
- };
- k.prototype.toXMLString = function() {
- return this.toXMLStringImpl();
- };
- k.prototype.toXMLStringImpl = function(d, g) {
- var p = this.sec, k = p.AXXML.prettyPrinting;
- g |= 0;
- var q = k ? c(g) : "";
- switch(this._kind) {
- case 3:
- return k ? q + m(a(this._value)) : m(this._value);
- case 2:
- return q + l(this._value);
- case 4:
- return q + "\x3c!--" + this._value + "--\x3e";
- case 5:
- return q + "" + this._name.name + " " + this._value + "?>";
- }
- d = d || [];
- for (var r = [], u = 0;this._inScopeNamespaces && u < this._inScopeNamespaces.length;u++) {
- var z = this._inScopeNamespaces[u];
- d.every(function(a) {
- return a.uri !== z.uri || a.prefix !== z.prefix;
- }) && r.push(z);
- }
- var h = d.concat(r), e = v(this._name, h);
- void 0 === e.prefix && (u = f(h), u = b.internPrefixedNamespace(0, e.uri, u), r.push(u), h.push(u));
- var B = (e.prefix ? e.prefix + ":" : "") + this._name.name, q = q + ("<" + B);
- this._attributes && this._attributes.forEach(function(a) {
- a = v(a._name, h);
- if (void 0 === a.prefix) {
- var c = f(h);
- a = b.internPrefixedNamespace(0, a.uri, c);
- r.push(a);
- h.push(a);
- }
- });
- for (u = 0;u < r.length;u++) {
- e = r[u], "" !== e.uri && (q += " " + (e.prefix ? "xmlns:" + e.prefix : "xmlns") + '="' + l(e.uri) + '"');
- }
- this._attributes && this._attributes.forEach(function(a) {
- var b = a._name, c = v(b, d);
- q += " " + (c.prefix ? c.prefix + ":" + b.name : b.name) + '="' + l(a._value) + '"';
- });
- if (0 === this._children.length) {
- return q += "/>";
- }
- var q = q + ">", n = 1 < this._children.length || 1 === this._children.length && 3 !== this._children[0]._kind, t = k && n ? g + p.AXXML._prettyIndent : 0;
- this._children.forEach(function(a, b) {
- k && n && (q += "\n");
- q += a.toXMLStringImpl(h, t);
- });
- k && n && (q += "\n" + c(g));
- return q += "" + B + ">";
- };
- k.prototype.toJSON = function(a) {
- return "XML";
- };
- k.prototype.axGetEnumerableKeys = function() {
- if (this === this.axClass.dPrototype) {
- return d.prototype.axGetEnumerableKeys.call(this);
- }
- for (var a = [], b = 0;b < this._children.length;b++) {
- a.push(this._children[b]._name.name);
- }
- return a;
- };
- k.prototype.setProperty = function(a, c) {
- var d = this.sec;
- a.isAnyName() || a.isAttribute() || a.name !== a.name >>> 0 || d.throwError("TypeError", b.Errors.XMLAssignmentToIndexedXMLNotAllowed);
- if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) {
- var g;
- g = n(c, d) && 3 !== c._kind && 2 !== c._kind ? c._deepCopy() : t(c, d);
- if (a.isAttribute()) {
- if (g && g.axClass === d.AXXMLList) {
- if (0 === g._children.length) {
- g = "";
- } else {
- for (var f = t(g._children[0], d), k = 1;k < g._children.length;k++) {
- f += " " + t(g._children[k], d);
- }
- g = f;
- }
- } else {
- g = b.axCoerceString(g);
- }
- for (var q = null, v = this._attributes, f = this._attributes = [], k = 0;v && k < v.length;k++) {
- var r = v[k];
- if (r._name.matches(a)) {
- if (q) {
- r._parent = null;
- continue;
- } else {
- q = r;
- }
- }
- f.push(r);
- }
- if (!q) {
- if (a.isAnyName()) {
- return;
- }
- v = "";
- 1 === a.namespaces.length && (v = a.namespaces[0].uri);
- q = B(d, 2, v, a.name);
- q._parent = this;
- f.push(q);
- }
- q._value = g;
- } else {
- for (var v = a.isAnyName(), f = !n(g, d) && !v && "*" !== a.name, r = a.isAnyNamespace(), u = this._children.length - 1;0 <= u;u--) {
- (v || 1 === this._children[u]._kind && this._children[u]._name.name === a.name) && (r || 1 === this._children[u]._kind && this._children[u]._name.matches(a)) && (void 0 !== k && this.deleteByIndex(k), k = u);
- }
- void 0 === k && (k = this._children.length, f && (r = a.namespaces[0], v = null, null !== r.uri && (v = r.uri, q = r.prefix), null === v && (q = p(d), v = q.uri, q = q.prefix), q = B(d, 1, v, a.name, q), q._parent = this, this.replace(String(k), q), r = q._name.namespace, q.addInScopeNamespace(r)));
- f ? (this._children[k]._children = [], f = t(g, d), "" !== f && this._children[k].replace("0", f)) : this.replace(String(k), g);
- }
- }
- };
- k.prototype.axSetProperty = function(a, b, c) {
- this === this.axClass.dPrototype ? this[this.axResolveMultiname(a)] = b : this.setProperty(g(a, this.sec), b);
- };
- k.prototype.getProperty = function(a) {
- var b = a.name;
- if (e.isIndex(b)) {
- return 0 === (b | 0) ? this : null;
- }
- var c = this.sec.AXXMLList.CreateList(this, a), d = 0, g = a.isAnyName(), f = a.isAnyNamespace();
- if (a.isAttribute()) {
- for (var p = 0;this._attributes && p < this._attributes.length;p++) {
- var k = this._attributes[p];
- !g && k._name.name !== b || !f && !k._name.matches(a) || (c._children[d++] = k, E(c._children[0]));
- }
- return c;
- }
- for (p = 0;this._children && p < this._children.length;p++) {
- k = this._children[p], (g || 1 === k._kind && k._name.name === b) && (f || k._name.matches(a)) && (c._children[d++] = k, E(c._children[0]));
- }
- return c;
- };
- k.prototype.axGetProperty = function(a) {
- return this === this.axClass.dPrototype ? this[this.axResolveMultiname(a)] : this.getProperty(g(a, this.sec));
- };
- k.prototype.hasProperty = function(a) {
- if (e.isIndex(a.name)) {
- return 0 === (a.name | 0);
- }
- var b = q(a, this.sec), c = b.isAnyName(), d = b.isAnyNamespace();
- if (a.isAttribute()) {
- for (a = 0;this._attributes && a < this._attributes.length;a++) {
- var g = this._attributes[a];
- if (c || g._name.matches(b)) {
- return !0;
- }
- }
- return !1;
- }
- for (a = 0;a < this._children.length;a++) {
- if (g = this._children[a], (c || 1 === g._kind && g._name.name === b.name) && (d || 1 === g._kind && g._name.matches(b))) {
- return !0;
- }
- }
- };
- k.prototype.deleteProperty = function(a) {
- if (e.isIndex(a.name)) {
- return !0;
- }
- var b = q(a, this.sec), c = b.name, d = a.isAnyName(), g = a.isAnyNamespace();
- if (a.isAttribute()) {
- if (a = this._attributes) {
- for (var f = this._attributes = [], p = 0;p < a.length;p++) {
- var k = a[p], v = k._name;
- !d && v.name !== c || !g && !v.matches(b) ? f.push(k) : k._parent = null;
- }
- }
- } else {
- if (this._children.some(function(a, c) {
- return (d || 1 === a._kind && a._name.name === b.name) && (g || 1 === a._kind && a._name.matches(b));
- })) {
- return !0;
- }
- }
- };
- k.prototype.axHasProperty = function(a) {
- return this === this.axClass.dPrototype ? d.prototype.axHasPropertyInternal.call(this, a) : this.axHasPropertyInternal(a);
- };
- k.prototype.axHasPropertyInternal = function(a) {
- return this.hasProperty(a) ? !0 : !!this[this.axResolveMultiname(a)];
- };
- k.prototype.axDeleteProperty = function(a) {
- return this.deleteProperty(a) ? !0 : delete this[this.axResolveMultiname(a)];
- };
- k.prototype.axCallProperty = function(a, c) {
- var d = this[this.axResolveMultiname(a)];
- d || (d = this["$Bg" + a.name]);
- if (d) {
- return b.validateCall(this.sec, d, c.length), d.axApply(this, c);
- }
- if (this.hasSimpleContent()) {
- return this.sec.box(t(this, this.sec)).axCallProperty(a, c);
- }
- this.sec.throwError("TypeError", b.Errors.CallOfNonFunctionError, "value");
- };
- k.prototype._delete = function(a, b) {
- A("XML.[[Delete]]");
- };
- k.prototype.deleteByIndex = function(a) {
- if (String(a >>> 0) !== String(a)) {
- throw "TypeError in XML.prototype.deleteByIndex(): invalid index " + a;
- }
- var b = this._children;
- a < b.length && b[a] && (b[a]._parent = null, b.splice(a, 1));
- };
- k.prototype.insert = function(a, c) {
- if (!(1 < this._kind)) {
- var d = a >>> 0;
- if (String(a) !== String(d)) {
- throw "TypeError in XML.prototype.insert(): invalid property name " + a;
- }
- if (c && c.axClass === this.axClass) {
- for (var g = this;g;) {
- g === c && this.sec.throwError("TypeError", b.Errors.XMLIllegalCyclicalLoop), g = g._parent;
- }
- }
- g = 1;
- if (c && c.axClass === this.sec.AXXMLList && (g = this._children.length, 0 === g)) {
- return;
- }
- for (var f = this._children.length - 1;f >= d;f--) {
- this._children[f + g] = this._children[f], E(this._children[0]);
- }
- if (c && c.axClass === this.sec.AXXMLList) {
- for (g = c._children.length, f = 0;f < g;f++) {
- c._children[f]._parent = this, this[d + f] = c[f];
- }
- } else {
- c && c.axClass === this.axClass || (c = this.sec.AXXML.Create(c)), c._parent = this, this._children || (this._children = []), this._children[d] = c, E(this._children[0]);
- }
- }
- };
- k.prototype.addInScopeNamespace = function(a) {
- if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) {
- var b = a.prefix;
- if (void 0 !== b && ("" !== b || "" !== this._name.uri)) {
- var c = null;
- this._inScopeNamespaces.forEach(function(a, d) {
- a.prefix === b && (c = a);
- });
- null !== c && c.uri !== a.uri && this._inScopeNamespaces.forEach(function(b, d) {
- b.prefix === c.prefix && (this._inScopeNamespaces[d] = a);
- });
- this._name.prefix === b && (this._name.prefix = void 0);
- this._attributes.forEach(function(a, c) {
- a._name.prefix === b && (a._name.prefix = void 0);
- });
- }
- }
- };
- k.prototype.descendantsInto = function(a, b) {
- if (1 !== this._kind) {
- return b;
- }
- var c = b._children.length, d = a.isAnyName();
- a.isAttribute() ? this._attributes.forEach(function(g, f) {
- if (d || g._name.matches(a)) {
- b._children[c++] = g, E(b._children[0]);
- }
- }) : this._children.forEach(function(g, f) {
- if (d || g._name.matches(a)) {
- b._children[c++] = g, E(b._children[0]);
- }
- });
- this._children.forEach(function(c, d) {
- c.descendantsInto(a, b);
- });
- return b;
- };
- k.instanceConstructor = k;
- k._flags = M.ALL;
- k._prettyIndent = 2;
- return k;
- }(h.ASObject);
- h.ASXML = x;
- x = function(a) {
- function c(b) {
- a.call(this);
- this._children = [];
- e.isNullOrUndefined(b) && (b = "");
- if (b) {
- if (b && b.axClass === this.sec.AXXMLList) {
- b = b._children;
- for (var d = 0;d < b.length;d++) {
- this._children[d] = b[d], E(this._children[0]);
- }
- } else {
- u(b, this);
- }
- }
- }
- __extends(c, a);
- c.classInitializer = function() {
- G(this, "$Bglength", 1);
- var a = this.dPrototype, b = c.prototype;
- G(a, "$BgvalueOf", Object.prototype.$BgvalueOf);
- G(a, "$BghasOwnProperty", b.native_hasOwnProperty);
- G(a, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable);
- h.addPrototypeFunctionAlias(a, "$BgtoString", b.toString);
- h.addPrototypeFunctionAlias(a, "$BgaddNamespace", b.addNamespace);
- h.addPrototypeFunctionAlias(a, "$BgappendChild", b.appendChild);
- h.addPrototypeFunctionAlias(a, "$Bgattribute", b.attribute);
- h.addPrototypeFunctionAlias(a, "$Bgattributes", b.attributes);
- h.addPrototypeFunctionAlias(a, "$Bgchild", b.child);
- h.addPrototypeFunctionAlias(a, "$BgchildIndex", b.childIndex);
- h.addPrototypeFunctionAlias(a, "$Bgchildren", b.children);
- h.addPrototypeFunctionAlias(a, "$Bgcomments", b.comments);
- h.addPrototypeFunctionAlias(a, "$Bgcontains", b.contains);
- h.addPrototypeFunctionAlias(a, "$Bgcopy", b.copy);
- h.addPrototypeFunctionAlias(a, "$Bgdescendants", b.descendants);
- h.addPrototypeFunctionAlias(a, "$Bgelements", b.elements);
- h.addPrototypeFunctionAlias(a, "$BghasComplexContent", b.hasComplexContent);
- h.addPrototypeFunctionAlias(a, "$BghasSimpleContent", b.hasSimpleContent);
- h.addPrototypeFunctionAlias(a, "$BginScopeNamespaces", b.inScopeNamespaces);
- h.addPrototypeFunctionAlias(a, "$BginsertChildAfter", b.insertChildAfter);
- h.addPrototypeFunctionAlias(a, "$BginsertChildBefore", b.insertChildBefore);
- h.addPrototypeFunctionAlias(a, "$Bglength", b.length);
- h.addPrototypeFunctionAlias(a, "$BglocalName", b.localName);
- h.addPrototypeFunctionAlias(a, "$Bgname", b.name);
- h.addPrototypeFunctionAlias(a, "$Bgnamespace", b.namespace);
- h.addPrototypeFunctionAlias(a, "$BgnamespaceDeclarations", b.namespaceDeclarations);
- h.addPrototypeFunctionAlias(a, "$BgnodeKind", b.nodeKind);
- h.addPrototypeFunctionAlias(a, "$Bgnormalize", b.normalize);
- h.addPrototypeFunctionAlias(a, "$Bgparent", b.parent);
- h.addPrototypeFunctionAlias(a, "$BgprocessingInstructions", b.processingInstructions);
- h.addPrototypeFunctionAlias(a, "$BgprependChild", b.prependChild);
- h.addPrototypeFunctionAlias(a, "$BgremoveNamespace", b.removeNamespace);
- h.addPrototypeFunctionAlias(a, "$Bgreplace", b.replace);
- h.addPrototypeFunctionAlias(a, "$BgsetChildren", b.setChildren);
- h.addPrototypeFunctionAlias(a, "$BgsetLocalName", b.setLocalName);
- h.addPrototypeFunctionAlias(a, "$BgsetName", b.setName);
- h.addPrototypeFunctionAlias(a, "$BgsetNamespace", b.setNamespace);
- h.addPrototypeFunctionAlias(a, "$Bgtext", b.text);
- h.addPrototypeFunctionAlias(a, "$BgtoXMLString", b.toXMLString);
- h.addPrototypeFunctionAlias(a, "$BgtoJSON", b.toJSON);
- };
- c.axApply = function(a, b) {
- var c = b[0];
- e.isNullOrUndefined(c) && (c = "");
- if (c && c.axClass === this.sec.AXXMLList) {
- return c;
- }
- var d = this.sec.AXXMLList.Create();
- u(c, d);
- return d;
- };
- c.addXML = function(a, b) {
- var c;
- a.axClass === a.sec.AXXML ? (c = a.sec.AXXMLList.Create(), c.append(a)) : c = a;
- c.append(b);
- return c;
- };
- c.Create = function(a) {
- var b = Object.create(this.sec.AXXMLList.tPrototype);
- b.axInitializer(a);
- return b;
- };
- c.CreateList = function(a, b) {
- var c = this.Create();
- c._targetObject = a;
- c._targetProperty = b;
- return c;
- };
- c.prototype.valueOf = function() {
- return this;
- };
- c.prototype.equals = function(a) {
- var b = this._children;
- if (void 0 === a && 0 === b.length) {
- return !0;
- }
- if (a && a.axClass === this.sec.AXXMLList) {
- a = a._children;
- if (a.length !== b.length) {
- return !1;
- }
- for (var c = 0;c < b.length;c++) {
- if (!b[c].equals(a[c])) {
- return !1;
- }
- }
- return !0;
- }
- return 1 === b.length && b[0].equals(a);
- };
- c.prototype.toString = function() {
- if (this.hasComplexContent()) {
- return this.toXMLString();
- }
- for (var a = "", b = 0;b < this._children.length;b++) {
- a += t(this._children[b], this.sec);
- }
- return a;
- };
- c.prototype._deepCopy = function() {
- for (var a = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty), b = this._children.length, c = 0;c < b;c++) {
- a._children[c] = this._children[c]._deepCopy(), E(a._children[0]);
- }
- return a;
- };
- c.prototype._shallowCopy = function() {
- for (var a = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty), b = this._children.length, c = 0;c < b;c++) {
- a._children[c] = this._children[c], E(a._children[0]);
- }
- return a;
- };
- c.prototype.native_hasOwnProperty = function(a) {
- a = b.axCoerceString(a);
- if (this === this.sec.AXXMLList.dPrototype) {
- return h.ASObject.prototype.native_hasOwnProperty.call(this, a);
- }
- if (e.isIndex(a)) {
- return (a | 0) < this._children.length;
- }
- a = q(a, this.sec);
- for (var c = this._children, d = 0;d < c.length;d++) {
- var g = c[d];
- if (1 === g._kind && g.hasProperty(a)) {
- return !0;
- }
- }
- return !1;
- };
- c.prototype.native_propertyIsEnumerable = function(a) {
- return e.isIndex(a) && (a | 0) < this._children.length;
- };
- c.prototype.attribute = function(a) {
- e.isNullOrUndefined(a) && 0 < arguments.length && this.sec.throwError("TypeError", b.Errors.ConvertUndefinedToObjectError);
- if (a && a.axClass === this.sec.AXQName) {
- return this.getProperty(a.name);
- }
- a = b.axCoerceString(a);
- if ("*" === a || 0 === arguments.length) {
- a = null;
- }
- y.name = a;
- y.namespaces = [b.Namespace.PUBLIC];
- y.kind = 13;
- return this.getProperty(y);
- };
- c.prototype.attributes = function() {
- y.name = null;
- y.namespaces = [];
- y.kind = 13;
- return this.getProperty(y);
- };
- c.prototype.child = function(a) {
- if (e.isIndex(a)) {
- var b = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty);
- (a | 0) < this._children.length && (b._children[0] = this._children[a | 0]._deepCopy(), E(b._children[0]));
- return b;
- }
- return this.getProperty(q(a, this.sec));
- };
- c.prototype.children = function() {
- return this.getProperty(C);
- };
- c.prototype.descendants = function(a) {
- a = q(a, this.sec);
- for (var b = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty), c = 0;c < this._children.length;c++) {
- var d = this._children[c];
- 1 === d._kind && d.descendantsInto(a, b);
- }
- return b;
- };
- c.prototype.comments = function() {
- var a = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty);
- this._children.forEach(function(b) {
- 1 === b._kind && (b = b.comments(), Array.prototype.push.apply(a._children, b._children));
- });
- return a;
- };
- c.prototype.contains = function(a) {
- for (var b = this._children, c = 0;c < b.length;c++) {
- if (b[c].equals(a)) {
- return !0;
- }
- }
- return !1;
- };
- c.prototype.copy = function() {
- return this._deepCopy();
- };
- c.prototype.elements = function(a) {
- var b = q(a, this.sec), c = this.sec.AXXMLList.CreateList(this._targetObject, b);
- this._children.forEach(function(a) {
- 1 === a._kind && (a = a.elements(b), Array.prototype.push.apply(c._children, a._children));
- });
- return c;
- };
- c.prototype.hasComplexContent = function() {
- switch(this._children.length) {
- case 0:
- return !1;
- case 1:
- return this._children[0].hasComplexContent();
- default:
- return this._children.some(function(a) {
- return 1 === a._kind;
- });
- }
- };
- c.prototype.hasSimpleContent = function() {
- switch(this._children.length) {
- case 0:
- return !0;
- case 1:
- return this._children[0].hasSimpleContent();
- default:
- return this._children.every(function(a) {
- return 1 !== a._kind;
- });
- }
- };
- c.prototype.length = function() {
- return this._children.length;
- };
- c.prototype.name = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "name");
- return this._children[0].name();
- };
- c.prototype.normalize = function() {
- for (var a = 0;a < this._children.length;) {
- var b = this._children[a];
- if (1 === b._kind) {
- b.normalize(), a++;
- } else {
- if (3 === b._kind) {
- for (a++;a < this._children.length;) {
- var c = this._children[a];
- if (3 !== c._kind) {
- break;
- }
- b._value += c._value;
- this.removeByIndex(a);
- }
- 0 === b._value.length ? this.removeByIndex(a) : a++;
- } else {
- a++;
- }
- }
- }
- return this;
- };
- c.prototype.parent = function() {
- var a = this._children;
- if (0 !== a.length) {
- for (var b = a[0]._parent, c = 1;c < a.length;c++) {
- if (a[c]._parent !== b) {
- return;
- }
- }
- return b;
- }
- };
- c.prototype.processingInstructions = function(a) {
- a = q(a, this.sec);
- var b = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty);
- b._targetObject = this;
- b._targetProperty = null;
- for (var c = this._children, d = 0;d < c.length;d++) {
- c[d].processingInstructionsInto(a, b);
- }
- return b;
- };
- c.prototype.text = function() {
- var a = this.sec.AXXMLList.CreateList(this._targetObject, this._targetProperty);
- this._children.forEach(function(b, c) {
- if (1 === b._kind) {
- var d = b.text();
- 0 < d._children.length && a._children.push(d);
- }
- });
- return a;
- };
- c.prototype.toXMLString = function() {
- var a = this.sec;
- return this._children.map(function(b) {
- return k(a, b);
- }).join(a.AXXML.prettyPrinting ? "\n" : "");
- };
- c.prototype.toJSON = function(a) {
- return "XMLList";
- };
- c.prototype.addNamespace = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "addNamespace");
- var c = this._children[0];
- c.addNamespace(a);
- return c;
- };
- c.prototype.appendChild = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "appendChild");
- var c = this._children[0];
- c.appendChild(a);
- return c;
- };
- c.prototype.append = function(a) {
- var b = this._children, c = b.length, d = 1;
- if (a && a.axClass === this.sec.AXXMLList) {
- if (this._targetObject = a._targetObject, this._targetProperty = a._targetProperty, a = a._children, d = a.length, 0 !== d) {
- for (d = 0;d < a.length;d++) {
- b[c + d] = a[d];
- }
- }
- } else {
- b[c] = a;
- }
- };
- c.prototype.childIndex = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "childIndex");
- return this._children[0].childIndex();
- };
- c.prototype.inScopeNamespaces = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "inScopeNamespaces");
- return this._children[0].inScopeNamespaces();
- };
- c.prototype.insertChildAfter = function(a, c) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "insertChildAfter");
- return this._children[0].insertChildAfter(a, c);
- };
- c.prototype.insertChildBefore = function(a, c) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "insertChildBefore");
- return this._children[0].insertChildBefore(a, c);
- };
- c.prototype.nodeKind = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "nodeKind");
- return this._children[0].nodeKind();
- };
- c.prototype.namespace = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "namespace");
- var c = this._children[0];
- return arguments.length ? c.namespace(a) : c.namespace();
- };
- c.prototype.localName = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "localName");
- return this._children[0].localName();
- };
- c.prototype.namespaceDeclarations = function() {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "namespaceDeclarations");
- return this._children[0].namespaceDeclarations();
- };
- c.prototype.prependChild = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "prependChild");
- return this._children[0].prependChild(a);
- };
- c.prototype.removeNamespace = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "removeNamespace");
- return this._children[0].removeNamespace(a);
- };
- c.prototype.replace = function(a, c) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "replace");
- return this._children[0].replace(a, c);
- };
- c.prototype.setChildren = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "setChildren");
- return this._children[0].setChildren(a);
- };
- c.prototype.setLocalName = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "setLocalName");
- return this._children[0].setLocalName(a);
- };
- c.prototype.setName = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "setName");
- return this._children[0].setName(a);
- };
- c.prototype.setNamespace = function(a) {
- 1 !== this._children.length && this.sec.throwError("TypeError", b.Errors.XMLOnlyWorksWithOneItemLists, "setNamespace");
- return this._children[0].setNamespace(a);
- };
- c.prototype.axGetEnumerableKeys = function() {
- return this === this.axClass.dPrototype ? a.prototype.axGetEnumerableKeys.call(this) : Object.keys(this._children);
- };
- c.prototype.getProperty = function(a) {
- var b = a.name;
- if (e.isIndex(b)) {
- return this._children[b | 0];
- }
- for (var c = null === b || "*" === b, d = a.isAnyNamespace(), g = a.isAttribute(), f = this.sec.AXXMLList.CreateList(this._targetObject, a), p = this._children, k = 0;k < p.length;k++) {
- var q = p[k];
- if (1 === q._kind) {
- if (g) {
- for (var v = q._attributes, r = 0;v && r < v.length;r++) {
- q = v[r], !c && q._name.name !== b || !d && !q._name.matches(a) || f._children.push(q);
- }
- } else {
- for (v = q._children, r = 0;v && r < v.length;r++) {
- q = v[r], (c || 1 === q._kind && q._name.name === b) && (d || q._name.matches(a)) && f._children.push(q);
- }
- }
- }
- }
- return f;
- };
- c.prototype.axGetProperty = function(a) {
- return this === this.axClass.dPrototype ? this[this.axResolveMultiname(a)] : this.getProperty(g(a, this.sec));
- };
- c.prototype.axGetPublicProperty = function(a) {
- if (this === this.axClass.dPrototype) {
- return this[b.Multiname.getPublicMangledName(a)];
- }
- if (e.isIndex(a)) {
- return this._children[a | 0];
- }
- y.name = a;
- y.namespaces = [b.Namespace.PUBLIC];
- y.kind = 7;
- return this.getProperty(y);
- };
- c.prototype.hasProperty = function(a) {
- return e.isIndex(a.name) ? Number(a.name) < this._children.length : !0;
- };
- c.prototype.axHasProperty = function(a) {
- return this.hasProperty(a);
- };
- c.prototype.axHasPropertyInternal = function(a) {
- return this.hasProperty(a);
- };
- c.prototype.resolveValue = function() {
- return this;
- };
- c.prototype.setProperty = function(a, c) {
- if (e.isIndex(a.name)) {
- var d = a.name | 0, g = null;
- if (this._targetObject && (g = this._targetObject.resolveValue(), null === g)) {
- return;
- }
- var f = this._children.length;
- if (d >= f) {
- if (g && g.axClass === this.sec.AXXMLList) {
- if (1 !== g._children.length) {
- return;
- }
- g = g._children[0];
- }
- if (g && 1 !== g._kind) {
- return;
- }
- var p = this.sec.AXXML.Create();
- p._parent = g;
- var d = this._targetProperty, k = 3;
- if (this._targetProperty && this._targetProperty.isAttribute()) {
- if (g.hasProperty(this._targetProperty)) {
- return;
- }
- k = 2;
- } else {
- this._targetProperty && null !== this._targetProperty.name ? k = 1 : (d = null, k = 3);
- }
- p.init(k, d);
- d = f;
- if (2 !== p._kind) {
- if (null !== g) {
- if (0 < d) {
- for (var q = this._children[d - 1], v = g._children.length - 1, k = 0;k < v && g._children[k] !== q;k++) {
- }
- } else {
- k = g._children.length - 1;
- }
- g._children[k + 1] = p;
- E(g._children[0]);
- p._parent = g;
- }
- c && c.axClass === this.sec.AXXML ? p._name = c._name : c && c.axClass === this.sec.AXXMLList && (p._name = c._targetProperty);
- this.append(p);
- }
- }
- n(c, this.sec) && 3 !== c._kind && 2 !== c._kind || (c += "");
- k = this._children[d];
- p = k._kind;
- g = k._parent;
- if (2 === p) {
- f = g._children.indexOf(k), g.setProperty(k._name, !1), this._children[d] = g._children[f], E(this._children[0]);
- } else {
- if (c && c.axClass === this.sec.AXXMLList) {
- p = c._shallowCopy();
- q = p._children.length;
- if (null !== g) {
- for (v = g._children.indexOf(k), g.replace(v, p), k = 0;k < q;k++) {
- p.setProperty(p._children[k]._name, g._children[v + k]);
- }
- }
- if (0 === q) {
- for (k = d + 1;k < f;k++) {
- this._children[k - 1] = this._children[k], E(this._children[0]);
- }
- this._children.length--;
- } else {
- for (k = f - 1;k > d;k--) {
- this._children[k + q - 1] = this._children[k], E(this._children[0]);
- }
- }
- for (k = 0;k < q;k++) {
- this._children[d + k] = p._children[k], E(this._children[0]);
- }
- } else {
- 3 <= p || c && c.axClass === this.sec.AXXML ? (null !== g && (v = g._children.indexOf(k), g.replace(v, c), c = g._children[v]), "string" === typeof c ? (f = this.sec.AXXML.Create(c), this._children[d] = f) : this._children[d] = c, E(this._children[0])) : k.setProperty(C, c);
- }
- }
- } else {
- if (0 === this._children.length) {
- g = this.resolveValue();
- if (null === g || 1 !== g._children.length) {
- return;
- }
- this.append(g._children[0]);
- }
- 1 === this._children.length ? this._children[0].setProperty(a, c) : this.sec.throwError("TypeError", b.Errors.XMLAssigmentOneItemLists);
- }
- };
- c.prototype.axSetProperty = function(a, b, c) {
- this === this.axClass.dPrototype ? this[this.axResolveMultiname(a)] = b : this.setProperty(g(a, this.sec), b);
- };
- c.prototype.axDeleteProperty = function(a) {
- var b = a.name;
- if (e.isIndex(b)) {
- b |= 0;
- if (b >= this._children.length) {
- return !0;
- }
- this.removeByIndex(b);
- return !0;
- }
- for (b = 0;b < this._children.length;b++) {
- var c = this._children[b];
- 1 === c._kind && c.deleteProperty(a);
- }
- return !0;
- };
- c.prototype.removeByIndex = function(a) {
- var b = this._children[a], c = b._parent;
- c && (b._parent = null, c._children.splice(c._children.indexOf(b), 1));
- this._children.splice(a, 1);
- };
- c.prototype.axCallProperty = function(a, c) {
- var d = this[this.axResolveMultiname(a)];
- if (d) {
- return b.validateCall(this.sec, d, c.length), d.axApply(this, c);
- }
- if (1 === this._children.length) {
- return this._children[0].axCallProperty(a, c);
- }
- this.sec.throwError("TypeError", b.Errors.CallOfNonFunctionError, "value");
- };
- return c.instanceConstructor = c;
- }(h.ASObject);
- h.ASXMLList = x;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l;
- (function(a) {
- a[a.APOS = 39] = "APOS";
- a[a.AMP = 38] = "AMP";
- a[a.QUOT = 34] = "QUOT";
- a[a.LT = 60] = "LT";
- a[a.GT = 62] = "GT";
- })(l || (l = {}));
- l = function(a) {
- function b(c, d) {
- m(d);
- a.call(this);
- }
- __extends(b, a);
- b.escapeXML = function(a) {
- a = m(a);
- for (var b = 0, c = a.length, d;b < c;) {
- d = a.charCodeAt(b);
- if (39 === d || 38 === d || 34 === d || 60 === d || 62 === d) {
- break;
- }
- b++;
- }
- if (b >= c) {
- return a;
- }
- for (var q = [a.substring(0, b)];b < c;) {
- switch(d) {
- case 39:
- q.push("'");
- break;
- case 38:
- q.push("&");
- break;
- case 34:
- q.push(""");
- break;
- case 60:
- q.push("<");
- break;
- case 62:
- q.push(">");
- }
- ++b;
- for (var g = b;b < c;) {
- d = a.charCodeAt(b);
- if (39 === d || 38 === d || 34 === d || 60 === d || 62 === d) {
- break;
- }
- b++;
- }
- g < b && q.push(a.substring(g, b));
- }
- return q.join("");
- };
- return b;
- }(b.ASObject);
- t.XMLNode = l;
- l = function(a) {
- function b(c) {
- void 0 === c && (c = null);
- m(c);
- a.call(this, 1, "");
- }
- __extends(b, a);
- return b;
- }(n.xml.XMLNode);
- t.XMLDocument = l;
- l = function(a) {
- function b() {
- a.call(this);
- this._type = 0;
- this._value = null;
- this._empty = !1;
- this._attrs = null;
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "type", {get:function() {
- return this._type;
- }, set:function(a) {
- this._type = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "empty", {get:function() {
- return this._empty;
- }, set:function(a) {
- this._empty = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "value", {get:function() {
- return this._value;
- }, set:function(a) {
- this._value = a = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "attrs", {get:function() {
- return this._attrs;
- }, set:function(a) {
- this._attrs = a;
- }, enumerable:!0, configurable:!0});
- return b;
- }(b.ASObject);
- t.XMLTag = l;
- l = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- return b;
- }(b.ASObject);
- t.XMLNodeType = l;
- var d = function(a) {
- function b(c) {
- a.call(this);
- this.sec = c;
- this.queue = [];
- this.ignoreWhitespace = !1;
- }
- __extends(b, a);
- b.prototype.onError = function(a) {
- this.queue.push(a);
- };
- b.prototype.onPi = function(a, b) {
- e.Debug.warning("Unhandled XMLParserForXMLDocument.onPi");
- };
- b.prototype.onComment = function(a) {
- e.Debug.warning("Unhandled XMLParserForXMLDocument.onComment");
- };
- b.prototype.onCdata = function(a) {
- this.queue.push({type:4, value:a});
- };
- b.prototype.onDoctype = function(a) {
- e.Debug.warning("Unhandled XMLParserForXMLDocument.onDoctype");
- };
- b.prototype.onBeginElement = function(a, b, c) {
- var d = this.sec.createObject();
- b.forEach(function(a) {
- d.axSetPublicProperty(a.name, a.value);
- });
- this.queue.push({type:1, value:a, empty:c, attrs:d});
- };
- b.prototype.onEndElement = function(a) {
- this.queue.push({type:1, value:"/" + a});
- };
- b.prototype.onText = function(a) {
- var b;
- if (b = this.ignoreWhitespace) {
- a: {
- for (b = 0;b < a.length;b++) {
- var c = a[b];
- if (" " !== c && "\n" !== c && "\r" !== c && "\t" !== c) {
- b = !1;
- break a;
- }
- }
- b = !0;
- }
- }
- b || this.queue.push({type:3, value:a});
- };
- return b;
- }(b.XMLParserBase);
- l = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- b.prototype.startParse = function(a, b) {
- a = m(a);
- b = !!b;
- var c = new d(this.sec);
- c.ignoreWhitespace = b;
- c.parseXml(a);
- this.queue = c.queue;
- };
- b.prototype.getNext = function(a) {
- if (0 === this.queue.length) {
- return -1;
- }
- var b = this.queue.shift();
- if ("number" === typeof b) {
- return b;
- }
- a.type = b.type;
- a.value = b.value;
- a.empty = b.empty || !1;
- a.attrs = b.attrs || null;
- return 0;
- };
- return b;
- }(b.ASObject);
- t.XMLParser = l;
- })(n.xml || (n.xml = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b, c) {
- var d = (b | 0) === b, k = e.isNullOrUndefined(b);
- if (c & 512 && (k || d)) {
- return null;
- }
- if (k) {
- return c = a, {__proto__:c.objectPrototype, $Bgname:void 0 === b ? "void" : "null", $BgisDynamic:!1, $BgisFinal:!0, $BgisStatic:!1, $Bgtraits:{__proto__:c.objectPrototype, $Bgvariables:null, $Bgaccessors:null, $Bgmetadata:c.createArray([]), $Bgconstructor:null, $Bginterfaces:c.createArray([]), $Bgmethods:null, $Bgbases:c.createArray([])}};
- }
- b.sec && (a = b.sec);
- b = a.box(b);
- if (a.AXFunction.axIsType(b)) {
- if (a.AXMethodClosure.axIsType(b)) {
- if (c & 512) {
- return null;
- }
- } else {
- if ("receiver" in b) {
- return null;
- }
- }
- }
- k = b.hasOwnProperty("classInfo") ? b : b.axClass;
- b = k === b && !(c & 512);
- var r = k.classInfo;
- a = a.createObject();
- a.$Bgname = d ? "int" : r.instanceInfo.getName().toFQNString(!0);
- a.$BgisDynamic = b || !(r.instanceInfo.flags & 1);
- a.$BgisFinal = b || !!(r.instanceInfo.flags & 2);
- a.$BgisStatic = b;
- c & 256 && (a.$Bgtraits = f(k, r, b, c));
- return a;
- }
- function t(a, b) {
- for (var c = 0, f = b.$Bgbases && b.$Bgbases.value, k = 0;f && k < f.length;k++) {
- var r = a.sec.AXXML.Create('');
- a.appendChild(r);
- c++;
- }
- f = b.$Bginterfaces && b.$Bginterfaces.value;
- for (k = 0;f && k < f.length;k++) {
- r = a.sec.AXXML.Create(''), a.appendChild(r), c++;
- }
- null !== b.$Bgconstructor && (r = a.sec.AXXML.Create(""), l(r, b.$Bgconstructor), a.appendChild(r), c++);
- f = b.$Bgvariables && b.$Bgvariables.value;
- for (k = 0;f && k < f.length;k++) {
- var u = f[k], r = a.sec.AXXML.Create("<" + ("readonly" === u.$Bgaccess ? "constant" : "variable") + ' name="' + h.escapeAttributeValue(u.$Bgname) + '" type="' + u.$Bgtype + '"/>');
- m(u, r, a);
- c++;
- }
- f = b.$Bgaccessors && b.$Bgaccessors.value;
- for (k = 0;f && k < f.length;k++) {
- u = f[k], r = a.sec.AXXML.Create(''), m(u, r, a), c++;
- }
- f = b.$Bgmethods && b.$Bgmethods.value;
- for (k = 0;f && k < f.length;k++) {
- u = f[k], r = a.sec.AXXML.Create(''), l(r, u.$Bgparameters.value), m(u, r, a), c++;
- }
- d(a, b.$Bgmetadata);
- return 0 < c;
- }
- function m(a, b, c) {
- null !== a.$Bguri && (u.name = "uri", b.setProperty(u, a.$Bguri));
- null !== a.$Bgmetadata && d(b, a.$Bgmetadata);
- c.appendChild(b);
- }
- function l(a, b) {
- if (b) {
- for (var c = 0;c < b.length;c++) {
- var d = b[c], d = a.sec.AXXML.Create('');
- a.appendChild(d);
- }
- }
- }
- function d(a, b) {
- if (b) {
- for (var c = b.value, d = 0;d < c.length;d++) {
- for (var f = c[d], k = a.sec.AXXML.Create(''), f = f.$Bgvalue.value, r = 0;r < f.length;r++) {
- var u = f[r], u = a.sec.AXXML.Create('');
- k.appendChild(u);
- }
- a.appendChild(k);
- }
- }
- }
- function a(a, b) {
- if (!b) {
- return null;
- }
- for (var d = a.createArray([]), f = 0;f < b.length;f++) {
- var k = b[f];
- "native" !== k.getName() && d.push(c(a, k));
- }
- return d;
- }
- function c(a, b) {
- var c = a.createObject();
- c.$Bgname = b.name;
- var d = [];
- c.$Bgvalue = a.createArray(d);
- for (var f = 0;f < b.keys.length;f++) {
- var k = a.createObject();
- k.$Bgvalue = b.getValueAt(f);
- k.$Bgkey = b.getKeyAt(f);
- d.push(k);
- }
- return c;
- }
- function f(b, c, d, f) {
- function k(b, c, g) {
- for (var q = 0;q < c.length;q++) {
- var r = c[q], u = r.getName(), z = u.namespace;
- if (g || !(!z.isPublic() && !z.uri || f & 1 && z.uri)) {
- var h = g ? u.name : u.toFQNString(!0);
- if (F[h] !== D[h]) {
- u = J[h], u.$Bgaccess = "readwrite", 2 === r.kind && (r = r.getMethodInfo().getType(), u.$Bgtype = r ? r.name.toFQNString(!0) : "*");
- } else {
- if (!J[h]) {
- u = b.createObject();
- J[h] = u;
- var B = r.getMetadata();
- switch(r.kind) {
- case 6:
- ;
- case 0:
- if (!(f & 8)) {
- continue;
- }
- u.$Bgname = h;
- u.$Bguri = z.reflectedURI;
- r = r.getTypeName();
- u.$Bgtype = r ? r.toFQNString(!0) : "*";
- u.$Bgaccess = "readwrite";
- u.$Bgmetadata = f & 64 ? a(b, B) : null;
- e.push(u);
- break;
- case 1:
- if (!l) {
- continue;
- }
- var n = r.getMethodInfo().getType();
- u.$BgreturnType = n ? n.name.toFQNString(!0) : "*";
- u.$Bgmetadata = f & 64 ? a(b, B) : null;
- u.$Bgname = h;
- u.$Bguri = z.reflectedURI;
- z = u.$Bgparameters = b.createArray([]);
- r = r.getMethodInfo().parameters;
- for (B = 0;B < r.length;B++) {
- h = r[B], n = b.createObject(), n.$Bgtype = h.type ? h.getType().toFQNString(!0) : "*", n.$Bgoptional = "value" in h, z.push(n);
- }
- u.$BgdeclaredBy = H;
- I.push(u);
- break;
- case 2:
- ;
- case 3:
- if (!(f & 16) || d) {
- continue;
- }
- u.$Bgname = h;
- 2 === r.kind ? (n = r.getMethodInfo().getType(), u.$Bgtype = n ? n.name.toFQNString(!0) : "*", F[h] = u) : (n = r.getMethodInfo().parameters[0].getType(), u.$Bgtype = n ? n.toFQNString(!0) : "*", D[h] = u);
- u.$Bgaccess = 2 === r.kind ? "readonly" : "writeonly";
- u.$Bgmetadata = f & 64 ? a(b, B) : null;
- u.$Bguri = z.reflectedURI;
- u.$BgdeclaredBy = H;
- m.push(u);
- }
- }
- }
- }
- }
- }
- var r = b.sec, u = f & 2, l = f & 32 && !d, h = r.createObject(), e = h.$Bgvariables = f & 8 ? r.createArray([]) : null, m = h.$Bgaccessors = f & 16 ? r.createArray([]) : null, n = null;
- if (f & 64 && !d) {
- var t = c.trait.getMetadata();
- t && (n = a(r, t));
- }
- h.$Bgmetadata = n || r.createArray([]);
- h.$Bgconstructor = null;
- if (f & 4) {
- if (h.$Bginterfaces = r.createArray([]), !d) {
- var M = h.$Bginterfaces.value;
- b.classInfo.instanceInfo.getInterfaces(b).forEach(function(a) {
- return M.push(a.name.toFQNString(!0));
- });
- }
- } else {
- h.$Bginterfaces = null;
- }
- var I = h.$Bgmethods = l ? r.createArray([]) : null, n = h.$Bgbases = u ? r.createArray([]) : null, J = Object.create(null), F = Object.create(null), D = Object.create(null), t = !1;
- for (c = c.instanceInfo.isInterface();b;) {
- var H = b.classInfo.instanceInfo.getName().toFQNString(!0);
- u && t && !d ? n.push(H) : t = !0;
- if (f & 1024 && b === r.AXObject) {
- break;
- }
- d ? k(r, b.classInfo.traits.traits, c) : k(r, b.classInfo.instanceInfo.traits.traits, c);
- b = b.superClass;
- }
- d && (f & 16 && (b = r.createObject(), b.$Bgname = "prototype", b.$Bgtype = "*", b.$Bgaccess = "readonly", b.$Bgmetadata = null, b.$Bguri = null, b.$BgdeclaredBy = "Class", m.push(b)), u && (n.pop(), n.push("Class", "Object"), b = r.AXClass));
- I && 0 !== I.value.length || (h.$Bgmethods = null);
- e && 0 !== e.value.length || (h.$Bgvariables = null);
- return h;
- }
- var k;
- (function(a) {
- a[a.HIDE_NSURI_METHODS = 1] = "HIDE_NSURI_METHODS";
- a[a.INCLUDE_BASES = 2] = "INCLUDE_BASES";
- a[a.INCLUDE_INTERFACES = 4] = "INCLUDE_INTERFACES";
- a[a.INCLUDE_VARIABLES = 8] = "INCLUDE_VARIABLES";
- a[a.INCLUDE_ACCESSORS = 16] = "INCLUDE_ACCESSORS";
- a[a.INCLUDE_METHODS = 32] = "INCLUDE_METHODS";
- a[a.INCLUDE_METADATA = 64] = "INCLUDE_METADATA";
- a[a.INCLUDE_CONSTRUCTOR = 128] = "INCLUDE_CONSTRUCTOR";
- a[a.INCLUDE_TRAITS = 256] = "INCLUDE_TRAITS";
- a[a.USE_ITRAITS = 512] = "USE_ITRAITS";
- a[a.HIDE_OBJECT = 1024] = "HIDE_OBJECT";
- })(k || (k = {}));
- h.describeTypeJSON = n;
- var r = new b.Multiname(null, 0, 7, [b.Namespace.PUBLIC], null), u = new b.Multiname(null, 0, 13, [b.Namespace.PUBLIC], null);
- h.describeType = function(a, b, c) {
- r.name = "XML";
- var d = a.application.getClass(r), f = n(a, b, c), k = d.Create("");
- u.name = "name";
- k.setProperty(u, f.$Bgname);
- var l = f.$Bgtraits.$Bgbases.value;
- l.length && (u.name = "base", k.setProperty(u, l[0]));
- u.name = "isDynamic";
- k.setProperty(u, f.$BgisDynamic.toString());
- u.name = "isFinal";
- k.setProperty(u, f.$BgisFinal.toString());
- u.name = "isStatic";
- k.setProperty(u, f.$BgisStatic.toString());
- t(k, f.$Bgtraits);
- if (a = n(a, b, c | 512)) {
- d = d.Create(""), u.name = "type", d.setProperty(u, a.$Bgname), t(d, a.$Bgtraits) && k.appendChild(d);
- }
- return k;
- };
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var m = function(l) {
- function d(a) {
- void 0 === a && (a = !1);
- l.call(this);
- this.map = new WeakMap;
- this.keys = null;
- this.weakKeys = !!a;
- a || (this.keys = []);
- this.primitiveMap = Object.create(null);
- }
- __extends(d, l);
- d.makePrimitiveKey = function(a) {
- if ("string" === typeof a || "number" === typeof a) {
- return a;
- }
- };
- d.prototype.toJSON = function() {
- return "Dictionary";
- };
- d.prototype.axGetProperty = function(a) {
- if (this === this.axClass.dPrototype) {
- return l.prototype.axGetProperty.call(this, a);
- }
- var b = d.makePrimitiveKey(a.name);
- return void 0 !== b ? this.primitiveMap[b] : this.map.get(Object(a.name));
- };
- d.prototype.axSetProperty = function(a, b, f) {
- this === this.axClass.dPrototype ? l.prototype.axSetProperty.call(this, a, b, f) : (f = d.makePrimitiveKey(a.name), void 0 !== f ? this.primitiveMap[f] = b : (this.map.set(Object(a.name), b), !this.weakKeys && 0 > this.keys.indexOf(a.name) && this.keys.push(a.name)));
- };
- d.prototype.axHasPropertyInternal = function(a) {
- if (this === this.axClass.dPrototype) {
- return l.prototype.axHasProperty.call(this, a);
- }
- var b = d.makePrimitiveKey(a.name);
- return void 0 !== b ? b in this.primitiveMap : this.map.has(Object(a.name));
- };
- d.prototype.axDeleteProperty = function(a) {
- if (this === this.axClass.dPrototype) {
- return l.prototype.axDeleteProperty.call(this, a);
- }
- var b = d.makePrimitiveKey(a.name);
- void 0 !== b && delete this.primitiveMap[b];
- this.map.delete(Object(a.name));
- var f;
- !this.weakKeys && 0 <= (f = this.keys.indexOf(a.name)) && this.keys.splice(f, 1);
- return !0;
- };
- d.prototype.axGetPublicProperty = function(a) {
- if (this === this.axClass.dPrototype) {
- return l.prototype.axGetPublicProperty.call(this, a);
- }
- var b = d.makePrimitiveKey(a);
- return void 0 !== b ? this.primitiveMap[b] : this.map.get(Object(a));
- };
- d.prototype.axGetEnumerableKeys = function() {
- if (this === this.axClass.dPrototype) {
- return l.prototype.axGetEnumerableKeys.call(this);
- }
- var a = [], b;
- for (b in this.primitiveMap) {
- a.push(b);
- }
- return this.weakKeys ? a : this.keys ? a.concat(this.keys) : a.slice();
- };
- d.classInitializer = function() {
- b.addPrototypeFunctionAlias(this.dPrototype, "$BgtoJSON", d.prototype.toJSON);
- };
- return d;
- }(b.ASObject);
- e.Dictionary = m;
- })(e.utils || (e.utils = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.ObjectUtilities.defineNonEnumerableProperty;
- (function(e) {
- (function(l) {
- var d = "$" + b.internNamespace(0, "http://www.adobe.com/2006/actionscript/flash/proxy").mangledName, a = function(a) {
- function f() {
- a.apply(this, arguments);
- }
- __extends(f, a);
- f.classInitializer = function() {
- var a = this.dPrototype, b = f.prototype;
- n(a, d + "getProperty", b.native_getProperty);
- n(a, d + "setProperty", b.native_setProperty);
- n(a, d + "callProperty", b.native_callProperty);
- n(a, d + "hasProperty", b.native_hasProperty);
- n(a, d + "deleteProperty", b.native_deleteProperty);
- n(a, d + "getDescendants", b.native_getDescendants);
- n(a, d + "nextNameIndex", b.native_nextNameIndex);
- n(a, d + "nextName", b.native_nextName);
- n(a, d + "nextValue", b.native_nextValue);
- };
- f.prototype.native_getProperty = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyGetPropertyError);
- };
- f.prototype.native_setProperty = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxySetPropertyError);
- };
- f.prototype.native_callProperty = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyCallPropertyError);
- };
- f.prototype.native_hasProperty = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyHasPropertyError);
- };
- f.prototype.native_deleteProperty = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyDeletePropertyError);
- };
- f.prototype.native_getDescendants = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyGetDescendantsError);
- };
- f.prototype.native_nextNameIndex = function() {
- this !== this.axClass.dPrototype && this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyNextNameIndexError);
- };
- f.prototype.native_nextName = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyNextNameError);
- };
- f.prototype.native_nextValue = function() {
- this.sec.throwError("flash.errors.IllegalOperationError", b.Errors.ProxyNextValueError);
- };
- f.prototype.axGetProperty = function(a) {
- var b = "string" === typeof a.name ? this.traits.getTrait(a.namespaces, a.name) : null;
- if (b) {
- if (b = b.name.getMangledName(), a = this[b], "function" === typeof a) {
- return this.axGetMethod(b);
- }
- } else {
- a = this[d + "getProperty"](this.sec.AXQName.FromMultiname(a));
- }
- return a;
- };
- f.prototype.axGetNumericProperty = function(a) {
- return this[d + "getProperty"](+a + "");
- };
- f.prototype.axSetNumericProperty = function(a, b) {
- this[d + "setProperty"](+a + "", b);
- };
- f.prototype.axSetProperty = function(b, f, u) {
- if ("string" === typeof b.name && this.traits.getTrait(b.namespaces, b.name)) {
- a.prototype.axSetProperty.call(this, b, f, u);
- } else {
- this[d + "setProperty"](this.sec.AXQName.FromMultiname(b), f);
- }
- };
- f.prototype.axCallProperty = function(b, f, u) {
- if ("string" === typeof b.name && this.traits.getTrait(b.namespaces, b.name)) {
- return a.prototype.axCallProperty.call(this, b, f, u);
- }
- b = [this.sec.AXQName.FromMultiname(b)].concat(f);
- return this[d + "callProperty"].apply(this, b);
- };
- f.prototype.axHasProperty = function(a) {
- return this.axHasOwnProperty(a);
- };
- f.prototype.axHasPublicProperty = function(a) {
- t.name = a;
- return this.axHasPropertyInternal(t) ? !0 : this[d + "hasProperty"](a);
- };
- f.prototype.axHasOwnProperty = function(a) {
- return "string" === typeof a.name && this.traits.getTrait(a.namespaces, a.name) ? !0 : this[d + "hasProperty"](this.sec.AXQName.FromMultiname(a));
- };
- f.prototype.axDeleteProperty = function(a) {
- var b = "string" === typeof a.name ? this.traits.getTrait(a.namespaces, a.name) : null;
- return b ? delete this[b.name.getMangledName()] : this[d + "deleteProperty"](this.sec.AXQName.FromMultiname(a));
- };
- f.prototype.axNextName = function(a) {
- return this[d + "nextName"](a);
- };
- f.prototype.axNextValue = function(a) {
- return this[d + "nextValue"](a);
- };
- f.prototype.axNextNameIndex = function(a) {
- return this[d + "nextNameIndex"](a);
- };
- return f;
- }(h.ASObject);
- l.ASProxy = a;
- })(e.utils || (e.utils = {}));
- })(h.flash || (h.flash = {}));
- var t = new b.Multiname(null, 0, 17, [], null);
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var e = function(e) {
- function m(b, d, a, c, f, k, r) {
- void 0 === a && (a = 1);
- void 0 === c && (c = 0);
- void 0 === f && (f = 0);
- void 0 === k && (k = 0);
- void 0 === r && (r = 0);
- e.call(this);
- switch(arguments.length) {
- case 0:
- this.value = new Date;
- break;
- case 1:
- this.value = new Date(b);
- break;
- case 2:
- this.value = new Date(b, d);
- break;
- case 3:
- this.value = new Date(b, d, a);
- break;
- case 4:
- this.value = new Date(b, d, a, c);
- break;
- case 5:
- this.value = new Date(b, d, a, c, f);
- break;
- case 6:
- this.value = new Date(b, d, a, c, f, k);
- break;
- default:
- this.value = new Date(b, d, a, c, f, k, r);
- }
- }
- __extends(m, e);
- m.parse = function(b) {
- return Date.parse(b);
- };
- m.UTC = function(b, d, a, c, f, k, r) {
- void 0 === a && (a = 1);
- void 0 === c && (c = 0);
- void 0 === f && (f = 0);
- void 0 === k && (k = 0);
- void 0 === r && (r = 0);
- return Date.parse.apply(null, arguments);
- };
- m.axCoerce = function(b) {
- return this.axConstruct([b]);
- };
- m.prototype.toString = function() {
- if (!(this.value instanceof Date)) {
- return "Invalid Date";
- }
- var b = this.value.toString().split(" ");
- if (4 > b.length) {
- return "Invalid Date";
- }
- b.length = 6;
- b.push(b.splice(3, 1)[0]);
- "0" === b[2][0] && (b[2] = b[2][1]);
- return b.join(" ");
- };
- m.prototype.toDateString = function() {
- if (!(this.value instanceof Date)) {
- return "Invalid Date";
- }
- var b = this.value.toDateString().split(" ");
- if (4 > b.length) {
- return "Invalid Date";
- }
- "0" === b[2][0] && (b[2] = b[2][1]);
- return b.join(" ");
- };
- m.prototype.toJSON = function() {
- return this.value instanceof Date ? this.value.toString() : "Invalid Date";
- };
- m.prototype.valueOf = function() {
- return this.value instanceof Date ? this.value.valueOf() : NaN;
- };
- m.prototype.setTime = function(b) {
- void 0 === b && (b = 0);
- return this.value instanceof Date ? this.value.setTime(b) : NaN;
- };
- m.prototype.toTimeString = function() {
- return this.value instanceof Date ? this.value.toTimeString() : "Invalid Date";
- };
- m.prototype.toLocaleString = function() {
- return this.value instanceof Date ? this.value.toLocaleString() : "Invalid Date";
- };
- m.prototype.toLocaleDateString = function() {
- return this.value instanceof Date ? this.value.toLocaleDateString() : "Invalid Date";
- };
- m.prototype.toLocaleTimeString = function() {
- return this.value instanceof Date ? this.value.toLocaleTimeString() : "Invalid Date";
- };
- m.prototype.toUTCString = function() {
- return this.value instanceof Date ? this.value.toUTCString() : "Invalid Date";
- };
- m.prototype.getUTCFullYear = function() {
- return this.value instanceof Date ? this.value.getUTCFullYear() : NaN;
- };
- m.prototype.getUTCMonth = function() {
- return this.value instanceof Date ? this.value.getUTCMonth() : NaN;
- };
- m.prototype.getUTCDate = function() {
- return this.value instanceof Date ? this.value.getUTCDate() : NaN;
- };
- m.prototype.getUTCDay = function() {
- return this.value instanceof Date ? this.value.getUTCDay() : NaN;
- };
- m.prototype.getUTCHours = function() {
- return this.value instanceof Date ? this.value.getUTCHours() : NaN;
- };
- m.prototype.getUTCMinutes = function() {
- return this.value instanceof Date ? this.value.getUTCMinutes() : NaN;
- };
- m.prototype.getUTCSeconds = function() {
- return this.value instanceof Date ? this.value.getUTCSeconds() : NaN;
- };
- m.prototype.getUTCMilliseconds = function() {
- return this.value instanceof Date ? this.value.getUTCMilliseconds() : NaN;
- };
- m.prototype.getFullYear = function() {
- return this.value instanceof Date ? this.value.getFullYear() : NaN;
- };
- m.prototype.getMonth = function() {
- return this.value instanceof Date ? this.value.getMonth() : NaN;
- };
- m.prototype.getDate = function() {
- return this.value instanceof Date ? this.value.getDate() : NaN;
- };
- m.prototype.getDay = function() {
- return this.value instanceof Date ? this.value.getDay() : NaN;
- };
- m.prototype.getHours = function() {
- return this.value instanceof Date ? this.value.getHours() : NaN;
- };
- m.prototype.getMinutes = function() {
- return this.value instanceof Date ? this.value.getMinutes() : NaN;
- };
- m.prototype.getSeconds = function() {
- return this.value instanceof Date ? this.value.getSeconds() : NaN;
- };
- m.prototype.getMilliseconds = function() {
- return this.value instanceof Date ? this.value.getMilliseconds() : NaN;
- };
- m.prototype.getTimezoneOffset = function() {
- return this.value instanceof Date ? this.value.getTimezoneOffset() : NaN;
- };
- m.prototype.getTime = function() {
- return this.value instanceof Date ? this.value.getTime() : NaN;
- };
- m.prototype.setFullYear = function(b, d, a) {
- return this.value instanceof Date ? this.value.setFullYear.apply(this.value, arguments) : NaN;
- };
- m.prototype.setMonth = function(b, d) {
- return this.value instanceof Date ? this.value.setMonth.apply(this.value, arguments) : NaN;
- };
- m.prototype.setDate = function(b) {
- return this.value instanceof Date ? this.value.setDate.apply(this.value, arguments) : NaN;
- };
- m.prototype.setHours = function(b, d, a, c) {
- return this.value instanceof Date ? this.value.setHours.apply(this.value, arguments) : NaN;
- };
- m.prototype.setMinutes = function(b, d, a) {
- return this.value instanceof Date ? this.value.setMinutes.apply(this.value, arguments) : NaN;
- };
- m.prototype.setSeconds = function(b, d) {
- return this.value instanceof Date ? this.value.setSeconds.apply(this.value, arguments) : NaN;
- };
- m.prototype.setMilliseconds = function(b) {
- return this.value instanceof Date ? this.value.setMilliseconds.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCFullYear = function(b, d, a) {
- return this.value instanceof Date ? this.value.setUTCFullYear.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCMonth = function(b, d) {
- return this.value instanceof Date ? this.value.setUTCMonth.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCDate = function(b) {
- return this.value instanceof Date ? this.value.setUTCDate.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCHours = function(b, d, a, c) {
- return this.value instanceof Date ? this.value.setUTCHours.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCMinutes = function(b, d, a) {
- return this.value instanceof Date ? this.value.setUTCMinutes.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCSeconds = function(b, d) {
- return this.value instanceof Date ? this.value.setUTCSeconds.apply(this.value, arguments) : NaN;
- };
- m.prototype.setUTCMilliseconds = function(b) {
- return this.value instanceof Date ? this.value.setUTCMilliseconds.apply(this.value, arguments) : NaN;
- };
- Object.defineProperty(m.prototype, "fullYear", {get:function() {
- return this.value.getFullYear();
- }, set:function(b) {
- this.value.setFullYear(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "month", {get:function() {
- return this.value.getMonth();
- }, set:function(b) {
- this.value.setMonth(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "date", {get:function() {
- return this.value.getDate();
- }, set:function(b) {
- this.value.setDate(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "hours", {get:function() {
- return this.value.getHours();
- }, set:function(b) {
- this.value.setHours(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "minutes", {get:function() {
- return this.value.getMinutes();
- }, set:function(b) {
- this.value.setMinutes(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "seconds", {get:function() {
- return this.value.getSeconds();
- }, set:function(b) {
- this.value.setSeconds(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "milliseconds", {get:function() {
- return this.value.getMilliseconds();
- }, set:function(b) {
- this.value.setMilliseconds(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "fullYearUTC", {get:function() {
- return this.value.getUTCFullYear();
- }, set:function(b) {
- this.value.setUTCFullYear(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "monthUTC", {get:function() {
- return this.value.getUTCMonth();
- }, set:function(b) {
- this.value.setUTCMonth(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "dateUTC", {get:function() {
- return this.value.getUTCDate();
- }, set:function(b) {
- this.value.setUTCDate(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "hoursUTC", {get:function() {
- return this.value.getUTCHours();
- }, set:function(b) {
- this.value.setUTCHours(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "minutesUTC", {get:function() {
- return this.value.getUTCMinutes();
- }, set:function(b) {
- this.value.setUTCMinutes(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "secondsUTC", {get:function() {
- return this.value.getUTCSeconds();
- }, set:function(b) {
- this.value.setUTCSeconds(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "millisecondsUTC", {get:function() {
- return this.value.getUTCMilliseconds();
- }, set:function(b) {
- this.value.setUTCMilliseconds(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "time", {get:function() {
- return this.value.getTime();
- }, set:function(b) {
- this.value.setTime(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "timezoneOffset", {get:function() {
- return this.value.getTimezoneOffset();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "day", {get:function() {
- return this.value.getDay();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(m.prototype, "dayUTC", {get:function() {
- return this.value.getUTCDay();
- }, enumerable:!0, configurable:!0});
- m.classInitializer = function() {
- var l = this.dPrototype, d = m.prototype;
- b.addPrototypeFunctionAlias(l, "$BgtoString", d.toString);
- b.addPrototypeFunctionAlias(l, "$BgtoLocaleString", d.toString);
- b.addPrototypeFunctionAlias(l, "$BgvalueOf", d.valueOf);
- b.addPrototypeFunctionAlias(l, "$BgtoDateString", d.toDateString);
- b.addPrototypeFunctionAlias(l, "$BgtoTimeString", d.toTimeString);
- b.addPrototypeFunctionAlias(l, "$BgtoLocaleString", d.toLocaleString);
- b.addPrototypeFunctionAlias(l, "$BgtoLocaleDateString", d.toLocaleDateString);
- b.addPrototypeFunctionAlias(l, "$BgtoLocaleTimeString", d.toLocaleTimeString);
- b.addPrototypeFunctionAlias(l, "$BgtoUTCString", d.toUTCString);
- b.addPrototypeFunctionAlias(l, "$BgtoJSON", d.toJSON);
- b.addPrototypeFunctionAlias(l, "$BggetUTCFullYear", d.getUTCFullYear);
- b.addPrototypeFunctionAlias(l, "$BggetUTCMonth", d.getUTCMonth);
- b.addPrototypeFunctionAlias(l, "$BggetUTCDate", d.getUTCDate);
- b.addPrototypeFunctionAlias(l, "$BggetUTCDay", d.getUTCDay);
- b.addPrototypeFunctionAlias(l, "$BggetUTCHours", d.getUTCHours);
- b.addPrototypeFunctionAlias(l, "$BggetUTCMinutes", d.getUTCMinutes);
- b.addPrototypeFunctionAlias(l, "$BggetUTCSeconds", d.getUTCSeconds);
- b.addPrototypeFunctionAlias(l, "$BggetUTCMilliseconds", d.getUTCMilliseconds);
- b.addPrototypeFunctionAlias(l, "$BggetFullYear", d.getFullYear);
- b.addPrototypeFunctionAlias(l, "$BggetMonth", d.getMonth);
- b.addPrototypeFunctionAlias(l, "$BggetDate", d.getDate);
- b.addPrototypeFunctionAlias(l, "$BggetDay", d.getDay);
- b.addPrototypeFunctionAlias(l, "$BggetHours", d.getHours);
- b.addPrototypeFunctionAlias(l, "$BggetMinutes", d.getMinutes);
- b.addPrototypeFunctionAlias(l, "$BggetSeconds", d.getSeconds);
- b.addPrototypeFunctionAlias(l, "$BggetMilliseconds", d.getMilliseconds);
- b.addPrototypeFunctionAlias(l, "$BggetTimezoneOffset", d.getTimezoneOffset);
- b.addPrototypeFunctionAlias(l, "$BggetTime", d.getTime);
- b.addPrototypeFunctionAlias(l, "$BgsetFullYear", d.setFullYear);
- b.addPrototypeFunctionAlias(l, "$BgsetMonth", d.setMonth);
- b.addPrototypeFunctionAlias(l, "$BgsetDate", d.setDate);
- b.addPrototypeFunctionAlias(l, "$BgsetHours", l.setHours);
- b.addPrototypeFunctionAlias(l, "$BgsetMinutes", d.setMinutes);
- b.addPrototypeFunctionAlias(l, "$BgsetSeconds", d.setSeconds);
- b.addPrototypeFunctionAlias(l, "$BgsetMilliseconds", d.setMilliseconds);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCFullYear", d.setUTCFullYear);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCMonth", d.setUTCMonth);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCDate", d.setUTCDate);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCHours", d.setUTCHours);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCMinutes", d.setUTCMinutes);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCSeconds", d.setUTCSeconds);
- b.addPrototypeFunctionAlias(l, "$BgsetUTCMilliseconds", d.setUTCMilliseconds);
- };
- return m;
- }(b.ASObject);
- b.ASDate = e;
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.notImplemented, t = e.Debug.unexpected, m = e.ArrayUtilities.DataBuffer;
- (function(b) {
- (function(b) {
- var a = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- Object.defineProperty(b, "dynamicPropertyWriter", {get:function() {
- n("public flash.net.ObjectEncoding::get dynamicPropertyWriter");
- return null;
- }, set:function(a) {
- n("public flash.net.ObjectEncoding::set dynamicPropertyWriter");
- }, enumerable:!0, configurable:!0});
- b.AMF0 = 0;
- b.AMF3 = 3;
- b.DEFAULT = b.AMF3;
- return b;
- }(h.ASObject);
- b.ObjectEncoding = a;
- })(b.net || (b.net = {}));
- })(h.flash || (h.flash = {}));
- (function(l) {
- (function(d) {
- var a = function(a) {
- function d(b) {
- a.call(this);
- this._symbol && (b = this._symbol);
- var r, u = 0;
- b ? (b instanceof ArrayBuffer ? r = b.slice() : Array.isArray(b) ? r = (new Uint8Array(b)).buffer : "buffer" in b ? b.buffer instanceof ArrayBuffer ? r = (new Uint8Array(b.buffer)).buffer : b.buffer instanceof Uint8Array ? (r = b.buffer.byteOffset, r = b.buffer.buffer.slice(r, r + b.buffer.length)) : r = b.buffer.slice() : e.Debug.unexpected("Source type."), u = r.byteLength) : r = new ArrayBuffer(d.INITIAL_SIZE);
- this._buffer = r;
- this._length = u;
- this._position = 0;
- this._resetViews();
- this._objectEncoding = d.defaultObjectEncoding;
- this._littleEndian = !1;
- this._bitLength = this._bitBuffer = 0;
- }
- __extends(d, a);
- d.classInitializer = function() {
- var a = m.prototype;
- e.ObjectUtilities.defineNonEnumerableProperty(a, "$BgtoJSON", a.toJSON);
- };
- Object.defineProperty(d, "defaultObjectEncoding", {get:function() {
- return this._defaultObjectEncoding;
- }, set:function(a) {
- this._defaultObjectEncoding = a >>> 0;
- }, enumerable:!0, configurable:!0});
- d.prototype.toJSON = function() {
- return "ByteArray";
- };
- d.prototype.readObject = function() {
- switch(this._objectEncoding) {
- case l.net.ObjectEncoding.AMF0:
- return b.AMF0.read(this);
- case l.net.ObjectEncoding.AMF3:
- return b.AMF3.read(this);
- default:
- t("Object Encoding");
- }
- };
- d.prototype.writeObject = function(a) {
- switch(this._objectEncoding) {
- case l.net.ObjectEncoding.AMF0:
- return b.AMF0.write(this, a);
- case l.net.ObjectEncoding.AMF3:
- return b.AMF3.write(this, a);
- default:
- t("Object Encoding");
- }
- };
- d.prototype.axGetPublicProperty = function(a) {
- return "number" === typeof a || e.isNumeric(a = b.axCoerceName(a)) ? this.axGetNumericProperty(a) : this["$Bg" + a];
- };
- d.prototype.axGetNumericProperty = function(a) {
- return this.getValue(a);
- };
- d.prototype.axSetPublicProperty = function(a, c) {
- "number" === typeof a || e.isNumeric(a = b.axCoerceName(a)) ? this.axSetNumericProperty(a, c) : this["$Bg" + a] = c;
- };
- d.prototype.axSetNumericProperty = function(a, b) {
- this.setValue(a, b);
- };
- d.prototype.axGetProperty = function(d) {
- var f = d.name;
- return "number" === typeof f || e.isNumeric(f = b.axCoerceName(f)) ? this.getValue(+f) : a.prototype.axGetProperty.call(this, d);
- };
- d.prototype.axSetProperty = function(d, f, u) {
- var q = d.name;
- "number" === typeof q || e.isNumeric(q = b.axCoerceName(q)) ? this.setValue(+q, f) : a.prototype.axSetProperty.call(this, d, f, u);
- };
- d.classNatives = [m];
- d.instanceNatives = [m.prototype];
- d.INITIAL_SIZE = 128;
- d._defaultObjectEncoding = l.net.ObjectEncoding.DEFAULT;
- return d;
- }(h.ASObject);
- d.ByteArray = a;
- })(l.utils || (l.utils = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.somewhatImplemented, t = e.ObjectUtilities.defineNonEnumerableProperty;
- (function(m) {
- (function(l) {
- var d = function(a) {
- function c() {
- a.call(this);
- }
- __extends(c, a);
- Object.defineProperty(c, "enabled", {get:function() {
- n("public flash.system.IME::static get enabled");
- return !1;
- }, set:function(a) {
- n("public flash.system.IME::static set enabled");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "conversionMode", {get:function() {
- n("public flash.system.IME::static get conversionMode");
- return "UNKNOWN";
- }, set:function(a) {
- b.axCoerceString(a);
- n("public flash.system.IME::static set conversionMode");
- }, enumerable:!0, configurable:!0});
- c.setCompositionString = function(a) {
- b.axCoerceString(a);
- n("public flash.system.IME::static setCompositionString");
- };
- c.doConversion = function() {
- n("public flash.system.IME::static doConversion");
- };
- c.compositionSelectionChanged = function(a, b) {
- n("public flash.system.IME::static compositionSelectionChanged");
- };
- c.compositionAbandoned = function() {
- n("public flash.system.IME::static compositionAbandoned");
- };
- Object.defineProperty(c, "isSupported", {get:function() {
- n("public flash.system.IME::static get isSupported");
- return !1;
- }, enumerable:!0, configurable:!0});
- return c;
- }(h.ASObject);
- l.IME = d;
- d = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- c.classInitializer = function() {
- t(this, "$Bgargv", this.sec.createArray([]));
- };
- Object.defineProperty(c, "ime", {get:function() {
- n("public flash.system.System::get ime");
- return null;
- }, enumerable:!0, configurable:!0});
- c.setClipboard = function(a) {
- a = b.axCoerceString(a);
- null === e.ClipboardService.instance ? e.Debug.warning("setClipboard is only available in the Firefox extension") : e.ClipboardService.instance.setClipboard(a);
- };
- Object.defineProperty(c, "totalMemoryNumber", {get:function() {
- n("public flash.system.System::get totalMemoryNumber");
- return 2097152;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "freeMemory", {get:function() {
- n("public flash.system.System::get freeMemory");
- return 1048576;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "privateMemory", {get:function() {
- n("public flash.system.System::get privateMemory");
- return 1048576;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "useCodePage", {get:function() {
- return this._useCodePage;
- }, set:function(a) {
- n("public flash.system.System::set useCodePage");
- this._useCodePage = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "vmVersion", {get:function() {
- return "1.0 Shumway - Mozilla Research";
- }, enumerable:!0, configurable:!0});
- c.pause = function() {
- };
- c.resume = function() {
- };
- c.exit = function(a) {
- };
- c.gc = function() {
- };
- c.pauseForGCIfCollectionImminent = function(a) {
- };
- c.disposeXML = function(a) {
- };
- Object.defineProperty(c, "swfVersion", {get:function() {
- return 19;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "apiVersion", {get:function() {
- return 26;
- }, enumerable:!0, configurable:!0});
- c.getArgv = function() {
- return [];
- };
- c.getRunmode = function() {
- return "mixed";
- };
- c._useCodePage = !1;
- return c;
- }(h.ASObject);
- l.System = d;
- l.OriginalSystem = d;
- })(m.system || (m.system = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-Shumway.AVMX.AS.initializeBuiltins();
-(function(e) {
- (function(b) {
- function h(a, b) {
- if (65535 < b.length) {
- throw "AMF short string exceeded";
- }
- if (b.length) {
- var c = e.StringUtilities.utf8decode(b);
- a.writeByte(c.length >> 8 & 255);
- a.writeByte(c.length & 255);
- for (var d = 0;d < c.length;d++) {
- a.writeByte(c[d]);
- }
- } else {
- a.writeByte(0), a.writeByte(0);
- }
- }
- function n(a) {
- var b = a.readByte() << 8 | a.readByte();
- if (!b) {
- return "";
- }
- for (var c = new Uint8Array(b), d = 0;d < b;d++) {
- c[d] = a.readByte();
- }
- return e.StringUtilities.utf8encode(c);
- }
- function t(a, b) {
- var c = new ArrayBuffer(8), d = new DataView(c);
- d.setFloat64(0, b, !1);
- for (var f = 0;f < c.byteLength;f++) {
- a.writeByte(d.getUint8(f));
- }
- }
- function m(a) {
- for (var b = new ArrayBuffer(8), c = new DataView(b), d = 0;d < b.byteLength;d++) {
- c.setUint8(d, a.readByte());
- }
- return c.getFloat64(0, !1);
- }
- function l(a) {
- var b = a.readByte();
- if (0 === (b & 128)) {
- return b;
- }
- var c = a.readByte();
- if (0 === (c & 128)) {
- return (b & 127) << 7 | c;
- }
- var d = a.readByte();
- if (0 === (d & 128)) {
- return (b & 127) << 14 | (c & 127) << 7 | d;
- }
- a = a.readByte();
- return (b & 127) << 22 | (c & 127) << 15 | (d & 127) << 8 | a;
- }
- function d(a, b) {
- if (0 === (b & 4294967168)) {
- a.writeByte(b & 127);
- } else {
- if (0 === (b & 4294950912)) {
- a.writeByte(128 | b >> 7 & 127), a.writeByte(b & 127);
- } else {
- if (0 === (b & 4292870144)) {
- a.writeByte(128 | b >> 14 & 127), a.writeByte(128 | b >> 7 & 127), a.writeByte(b & 127);
- } else {
- if (0 === (b & 3221225472)) {
- a.writeByte(128 | b >> 22 & 127), a.writeByte(128 | b >> 15 & 127), a.writeByte(128 | b >> 8 & 127), a.writeByte(b & 255);
- } else {
- throw "AMF3 U29 range";
- }
- }
- }
- }
- }
- function a(a, b) {
- var c = l(a);
- if (1 === c) {
- return "";
- }
- var d = b.strings;
- if (0 === (c & 1)) {
- return d[c >> 1];
- }
- for (var c = c >> 1, f = new Uint8Array(c), k = 0;k < c;k++) {
- f[k] = a.readByte();
- }
- c = e.StringUtilities.utf8encode(f);
- d.push(c);
- return c;
- }
- function c(a, b, c) {
- if ("" === b) {
- a.writeByte(1);
- } else {
- c = c.strings;
- var f = c.indexOf(b);
- if (0 <= f) {
- d(a, f << 1);
- } else {
- for (c.push(b), b = e.StringUtilities.utf8decode(b), d(a, 1 | b.length << 1), c = 0;c < b.length;c++) {
- a.writeByte(b[c]);
- }
- }
- }
- }
- function f(b, c) {
- var d = b.readByte();
- switch(d) {
- case 1:
- return null;
- case 0:
- break;
- case 2:
- return !1;
- case 3:
- return !0;
- case 4:
- return l(b);
- case 5:
- return m(b);
- case 6:
- return a(b, c);
- case 8:
- var k = l(b);
- return b.sec.AXDate.axConstruct([m(b)]);
- case 10:
- k = l(b);
- if (0 === (k & 1)) {
- return c.objects[k >> 1];
- }
- if (0 !== (k & 4)) {
- throw "AMF3 Traits-Ext is not supported";
- }
- var q, r, u = !0, h;
- if (0 === (k & 2)) {
- h = c.traitNames[k >> 2];
- } else {
- (d = a(b, c)) && (r = q = b.sec.classAliases.getClassByAlias(d));
- u = 0 !== (k & 8);
- h = [];
- d = 0;
- for (k >>= 4;d < k;d++) {
- h.push(a(b, c));
- }
- c.traits.push(r);
- c.traitNames.push(h);
- }
- r = q ? q.axConstruct([]) : b.sec.createObject();
- c.objects.push(r);
- for (d = 0;d < h.length;d++) {
- q = f(b, c), r.axSetPublicProperty(h[d], q);
- }
- if (u) {
- for (;;) {
- d = a(b, c);
- if ("" === d) {
- break;
- }
- q = f(b, c);
- r.axSetPublicProperty(d, q);
- }
- }
- return r;
- case 9:
- k = l(b);
- if (0 === (k & 1)) {
- return c.objects[k >> 1];
- }
- r = b.sec.createArray([]);
- c.objects.push(r);
- for (u = k >> 1;;) {
- d = a(b, c);
- if (!d.length) {
- break;
- }
- q = f(b, c);
- r.axSetPublicProperty(d, q);
- }
- for (d = 0;d < u;d++) {
- q = f(b, c), r.axSetPublicProperty(d, q);
- }
- return r;
- default:
- throw "AMF3 Unknown marker " + d;;
- }
- }
- function k(a, b, c) {
- c = c.objects;
- var f = c.indexOf(b);
- if (0 > f) {
- return c.push(b), !1;
- }
- d(a, f << 1);
- return !0;
- }
- function r(a, f, q) {
- switch(typeof f) {
- case "boolean":
- a.writeByte(f ? 3 : 2);
- break;
- case "number":
- var u = f === (f | 0);
- u && (268435455 < f || -268435456 > f) && (u = !1);
- u ? (a.writeByte(4), d(a, f)) : (a.writeByte(5), t(a, f));
- break;
- case "undefined":
- a.writeByte(0);
- break;
- case "string":
- a.writeByte(6);
- c(a, f, q);
- break;
- case "object":
- if (null === f) {
- a.writeByte(1);
- } else {
- if (a.sec.AXArray.axIsType(f)) {
- a.writeByte(9);
- if (k(a, f, q)) {
- break;
- }
- for (var l = 0;f.axHasPublicProperty(l);) {
- ++l;
- }
- d(a, l << 1 | 1);
- b.forEachPublicProperty(f, function(b, d) {
- e.isNumeric(b) && 0 <= b && b < l || (c(a, b, q), r(a, d, q));
- });
- c(a, "", q);
- for (u = 0;u < l;u++) {
- r(a, f.axGetPublicProperty(u), q);
- }
- } else {
- if (a.sec.AXDate.axIsType(f)) {
- a.writeByte(8);
- if (k(a, f, q)) {
- break;
- }
- d(a, 1);
- t(a, f.valueOf());
- } else {
- a.writeByte(10);
- if (k(a, f, q)) {
- break;
- }
- var u = !0, h = f.axClass;
- if (h) {
- var m = h.classInfo, u = !m.instanceInfo.isSealed(), n = a.sec.classAliases.getAliasByClass(h) || "", w = q.traits.indexOf(h), y = null;
- if (0 > w) {
- for (y = m.instanceInfo.runtimeTraits.getSlotPublicTraitNames(), q.traits.push(h), q.traitNames.push(y), d(a, (u ? 11 : 3) + (y.length << 4)), c(a, n, q), h = 0;h < y.length;h++) {
- c(a, y[h], q);
- }
- } else {
- y = q.traitNames[w], d(a, 1 + (w << 2));
- }
- for (h = 0;h < y.length;h++) {
- r(a, f.axGetPublicProperty(y[h]), q);
- }
- } else {
- d(a, 11), c(a, "", q);
- }
- u && (b.forEachPublicProperty(f, function(b, d) {
- c(a, b, q);
- r(a, d, q);
- }), c(a, "", q));
- }
- }
- }
- ;
- }
- }
- var u = function() {
- return function() {
- this.strings = [];
- this.objects = [];
- this.traits = [];
- this.traitNames = [];
- };
- }(), q = function() {
- function a() {
- this._classMap = new WeakMap;
- this._nameMap = Object.create(null);
- }
- a.prototype.getAliasByClass = function(a) {
- return this._classMap.get(a);
- };
- a.prototype.getClassByAlias = function(a) {
- return this._nameMap[a];
- };
- a.prototype.registerClassAlias = function(a, b) {
- this._classMap.set(b, a);
- this._nameMap[a] = b;
- };
- return a;
- }();
- b.ClassAliases = q;
- (function(a) {
- a[a.NUMBER = 0] = "NUMBER";
- a[a.BOOLEAN = 1] = "BOOLEAN";
- a[a.STRING = 2] = "STRING";
- a[a.OBJECT = 3] = "OBJECT";
- a[a.NULL = 5] = "NULL";
- a[a.UNDEFINED = 6] = "UNDEFINED";
- a[a.REFERENCE = 7] = "REFERENCE";
- a[a.ECMA_ARRAY = 8] = "ECMA_ARRAY";
- a[a.OBJECT_END = 9] = "OBJECT_END";
- a[a.STRICT_ARRAY = 10] = "STRICT_ARRAY";
- a[a.DATE = 11] = "DATE";
- a[a.LONG_STRING = 12] = "LONG_STRING";
- a[a.XML = 15] = "XML";
- a[a.TYPED_OBJECT = 16] = "TYPED_OBJECT";
- a[a.AVMPLUS = 17] = "AVMPLUS";
- })(b.AMF0Marker || (b.AMF0Marker = {}));
- q = function() {
- function a() {
- }
- a.write = function(a, c) {
- switch(typeof c) {
- case "boolean":
- a.writeByte(1);
- a.writeByte(c ? 1 : 0);
- break;
- case "number":
- a.writeByte(0);
- t(a, c);
- break;
- case "undefined":
- a.writeByte(6);
- break;
- case "string":
- a.writeByte(2);
- h(a, c);
- break;
- case "object":
- if (null === c) {
- a.writeByte(5);
- } else {
- if (a.sec.AXArray.axIsType(c)) {
- var d = c.value;
- a.writeByte(8);
- a.writeByte(d.length >>> 24 & 255);
- a.writeByte(d.length >> 16 & 255);
- a.writeByte(d.length >> 8 & 255);
- a.writeByte(d.length & 255);
- b.forEachPublicProperty(c, function(b, c) {
- h(a, b);
- this.write(a, c);
- }, this);
- } else {
- a.writeByte(3), b.forEachPublicProperty(c, function(b, c) {
- h(a, b);
- this.write(a, c);
- }, this);
- }
- a.writeByte(0);
- a.writeByte(0);
- a.writeByte(9);
- }
- ;
- }
- };
- a.read = function(a) {
- var b = a.readByte();
- switch(b) {
- case 0:
- return m(a);
- case 1:
- return !!a.readByte();
- case 2:
- return n(a);
- case 3:
- for (b = a.sec.createObject();;) {
- var c = n(a);
- if (!c.length) {
- break;
- }
- b.axSetPublicProperty(c, this.read(a));
- }
- if (9 !== a.readByte()) {
- throw "AMF0 End marker is not found";
- }
- return b;
- case 5:
- return null;
- case 6:
- break;
- case 8:
- b = a.sec.createArray([]);
- for (b.length = a.readByte() << 24 | a.readByte() << 16 | a.readByte() << 8 | a.readByte();;) {
- c = n(a);
- if (!c.length) {
- break;
- }
- b.axSetPublicProperty(c, this.read(a));
- }
- if (9 !== a.readByte()) {
- throw "AMF0 End marker is not found";
- }
- return b;
- case 10:
- for (var b = a.sec.createArray([]), c = b.length = a.readByte() << 24 | a.readByte() << 16 | a.readByte() << 8 | a.readByte(), d = 0;d < c;d++) {
- b.axSetPublicProperty(d, this.read(a));
- }
- return b;
- case 17:
- return f(a, new u);
- default:
- throw "AMF0 Unknown marker " + b;;
- }
- };
- return a;
- }();
- b.AMF0 = q;
- (function(a) {
- a[a.UNDEFINED = 0] = "UNDEFINED";
- a[a.NULL = 1] = "NULL";
- a[a.FALSE = 2] = "FALSE";
- a[a.TRUE = 3] = "TRUE";
- a[a.INTEGER = 4] = "INTEGER";
- a[a.DOUBLE = 5] = "DOUBLE";
- a[a.STRING = 6] = "STRING";
- a[a.XML_DOC = 7] = "XML_DOC";
- a[a.DATE = 8] = "DATE";
- a[a.ARRAY = 9] = "ARRAY";
- a[a.OBJECT = 10] = "OBJECT";
- a[a.XML = 11] = "XML";
- a[a.BYTEARRAY = 12] = "BYTEARRAY";
- a[a.VECTOR_INT = 13] = "VECTOR_INT";
- a[a.VECTOR_UINT = 14] = "VECTOR_UINT";
- a[a.VECTOR_DOUBLE = 15] = "VECTOR_DOUBLE";
- a[a.VECTOR_OBJECT = 16] = "VECTOR_OBJECT";
- a[a.DICTIONARY = 17] = "DICTIONARY";
- })(b.AMF3Marker || (b.AMF3Marker = {}));
- q = function() {
- function a() {
- }
- a.write = function(a, b) {
- r(a, b, new u);
- };
- a.read = function(a) {
- return f(a, new u);
- };
- return a;
- }();
- b.AMF3 = q;
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load AVM2 Dependencies");
-console.time("Load SWF Parser");
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- function h(a) {
- a.align();
- var b = a.readUb(5), c = a.readSb(b), d = a.readSb(b), g = a.readSb(b), b = a.readSb(b);
- a.align();
- return {xMin:c, xMax:d, yMin:g, yMax:b};
- }
- function m(a) {
- return (a.readUi8() << 24 | a.readUi8() << 16 | a.readUi8() << 8 | 255) >>> 0;
- }
- function l(a) {
- return a.readUi8() << 24 | a.readUi8() << 16 | a.readUi8() << 8 | a.readUi8();
- }
- function d(a) {
- var b = {a:1, b:0, c:0, d:1, tx:0, ty:0};
- a.align();
- if (a.readUb(1)) {
- var c = a.readUb(5);
- b.a = a.readFb(c);
- b.d = a.readFb(c);
- }
- a.readUb(1) && (c = a.readUb(5), b.b = a.readFb(c), b.c = a.readFb(c));
- c = a.readUb(5);
- b.tx = a.readSb(c);
- b.ty = a.readSb(c);
- a.align();
- return b;
- }
- function a(a, b) {
- var c = {redMultiplier:255, greenMultiplier:255, blueMultiplier:255, alphaMultiplier:255, redOffset:0, greenOffset:0, blueOffset:0, alphaOffset:0};
- a.align();
- var d = a.readUb(1), g = a.readUb(1), f = a.readUb(4);
- g && (c.redMultiplier = a.readSb(f), c.greenMultiplier = a.readSb(f), c.blueMultiplier = a.readSb(f), b && (c.alphaMultiplier = a.readSb(f)));
- d && (c.redOffset = a.readSb(f), c.greenOffset = a.readSb(f), c.blueOffset = a.readSb(f), b && (c.alphaOffset = a.readSb(f)));
- a.align();
- return c;
- }
- function c(b, c, g, p) {
- var q = {code:g};
- q.actionBlocksPrecedence = b.pos;
- if (4 === g) {
- return q.symbolId = b.readUi16(), q.depth = b.readUi16(), q.flags |= 4, q.matrix = d(b), b.pos < p && (q.flags |= 8, q.cxform = a(b, !1)), q;
- }
- g = q.flags = 26 < g ? b.readUi16() : b.readUi8();
- q.depth = b.readUi16();
- g & 2048 && (q.className = b.readString(-1));
- g & 2 && (q.symbolId = b.readUi16());
- g & 4 && (q.matrix = d(b));
- g & 8 && (q.cxform = a(b, !0));
- g & 16 && (q.ratio = b.readUi16());
- g & 32 && (q.name = b.readString(-1));
- g & 64 && (q.clipDepth = b.readUi16());
- if (g & 256) {
- for (var r = b.readUi8(), u = q.filters = [];r--;) {
- u.push(k(b));
- }
- }
- g & 512 && (q.blendMode = b.readUi8());
- g & 1024 && (q.bmpCache = b.readUi8());
- g & 8192 && (q.visibility = b.readBool());
- g & 16384 && (r = b.readUi8() | b.readUi8() << 24 | b.readUi8() << 16 | b.readUi8() << 8, q.backgroundColor = r);
- if (g & 128) {
- for (b.readUi16(), 6 <= c ? b.readUi32() : b.readUi16(), g = q.events = [];r = f(b, c);) {
- if (b.pos > p) {
- e.Debug.warning("PlaceObject handler attempted to read clip events beyond tag end");
- b.pos = p;
- break;
- }
- g.push(r);
- }
- }
- return q;
- }
- function f(a, b) {
- var c = 6 <= b ? a.readUi32() : a.readUi16();
- if (!c) {
- return null;
- }
- var d = {};
- 6 === b && (c &= -262145);
- d.flags = c;
- var g = a.readUi32();
- c & 131072 && (d.keyCode = a.readUi8(), g--);
- c = a.pos + g;
- d.actionsBlock = a.bytes.subarray(a.pos, c);
- a.pos = c;
- return d;
- }
- function k(a) {
- var b = {}, c = b.type = a.readUi8();
- switch(c) {
- case 0:
- ;
- case 2:
- ;
- case 3:
- ;
- case 4:
- ;
- case 7:
- var d;
- d = 4 === c || 7 === c ? a.readUi8() : 3 === c ? 2 : 1;
- for (var g = b.colors = [], f = d;f--;) {
- g.push(l(a));
- }
- if (4 === c || 7 === c) {
- for (g = b.ratios = [], f = d;f--;) {
- g.push(a.readUi8());
- }
- }
- b.blurX = a.readFixed();
- b.blurY = a.readFixed();
- 2 !== c && (b.angle = a.readFixed(), b.distance = a.readFixed());
- b.strength = a.readFixed8();
- b.inner = !!a.readUb(1);
- b.knockout = !!a.readUb(1);
- b.compositeSource = !!a.readUb(1);
- 3 === c || 4 === c || 7 === c ? (b.onTop = !!a.readUb(1), b.quality = a.readUb(4)) : b.quality = a.readUb(5);
- break;
- case 1:
- b.blurX = a.readFixed();
- b.blurY = a.readFixed();
- b.quality = a.readUb(5);
- a.readUb(3);
- break;
- case 5:
- f = b.matrixX = a.readUi8();
- d = b.matrixY = a.readUi8();
- b.divisor = a.readFloat();
- b.bias = a.readFloat();
- c = b.matrix = [];
- for (f *= d;f--;) {
- c.push(a.readFloat());
- }
- b.color = l(a);
- a.readUb(6);
- b.clamp = !!a.readUb(1);
- b.preserveAlpha = !!a.readUb(1);
- break;
- case 6:
- for (c = b.matrix = [], f = 20;f--;) {
- c.push(a.readFloat());
- }
- ;
- }
- return b;
- }
- function r(a, b, c) {
- b = {code:c};
- 5 === c ? (b.depth = a.readUi16(), b.symbolId = a.readUi16()) : b.depth = a.readUi16();
- return b;
- }
- function u(a, b, c, d, g) {
- b = {code:c};
- b.id = a.readUi16();
- var f;
- if (21 < c) {
- var p = a.readUi32();
- 90 === c && (b.deblock = a.readFixed8());
- p += a.pos;
- f = b.imgData = a.bytes.subarray(a.pos, p);
- b.alphaData = a.bytes.subarray(p, d);
- } else {
- f = b.imgData = a.bytes.subarray(a.pos, d);
- }
- a.pos = d;
- switch(f[0] << 8 | f[1]) {
- case 65496:
- ;
- case 65497:
- b.mimeType = "image/jpeg";
- break;
- case 35152:
- b.mimeType = "image/png";
- break;
- case 18249:
- b.mimeType = "image/gif";
- break;
- default:
- b.mimeType = "application/octet-stream";
- }
- 6 === c && (b.jpegTables = {data:g});
- return b;
- }
- function q(a, b, c, d) {
- var f = {code:c};
- f.id = a.readUi16();
- var p = f.characters = [], k;
- if (7 == c) {
- for (;k = g(a, b, c);) {
- p.push(k);
- }
- f.actionsData = a.bytes.subarray(a.pos, d);
- a.pos = d;
- } else {
- k = a.readUi8();
- f.trackAsMenu = !!(k >> 7 & 1);
- for (var q = a.readUi16();k = g(a, b, c);) {
- p.push(k);
- }
- if (q) {
- for (b = f.buttonActions = [];a.pos < d;) {
- c = a;
- k = d;
- p = c.pos;
- k = (q = c.readUi16()) ? p + q : k;
- q = c.readUi16();
- c.pos = k;
- c = {keyCode:(q & 65024) >> 9, stateTransitionFlags:q & 511, actionsData:c.bytes.subarray(p + 4, k)};
- if (a.pos > d) {
- break;
- }
- b.push(c);
- }
- a.pos = d;
- }
- }
- return f;
- }
- function g(b, c, g) {
- var f = b.readUi8();
- if (!f) {
- return null;
- }
- var p = {};
- 8 > c && (f &= -769);
- p.flags = f;
- p.symbolId = b.readUi16();
- p.depth = b.readUi16();
- p.matrix = d(b);
- 34 === g && (p.cxform = a(b, !0));
- if (p.flags & 16) {
- for (g = b.readUi8(), c = p.filters = [];g--;) {
- c.push(k(b));
- }
- }
- p.flags & 32 && (p.blendMode = b.readUi8());
- return p;
- }
- function p(a, b, c) {
- var d = {code:c};
- d.id = a.readUi16();
- for (var g = a.readUi16(), f = g / 2, p = [], k = f - 1;k--;) {
- p.push(a.readUi16());
- }
- d.offsets = [g].concat(p);
- g = d.glyphs = [];
- for (k = f;k--;) {
- g.push(v(a, b, c));
- }
- return d;
- }
- function v(a, b, c) {
- a.align();
- var d = a.readUb(4), g = a.readUb(4);
- return M(a, b, c, !1, d, g, !1);
- }
- function z(a, b, c) {
- var g = {code:c};
- g.id = a.readUi16();
- g.bbox = h(a);
- g.matrix = d(a);
- for (var f = a.readUi8(), p = a.readUi8(), k = g.records = [], q;q = B(a, b, c, f, p);) {
- k.push(q);
- }
- return g;
- }
- function B(a, b, c, d, g) {
- a.align();
- var f = a.readUb(8);
- if (!f) {
- return null;
- }
- b = {};
- b.flags = f;
- f & 8 && (b.fontId = a.readUi16());
- f & 4 && (b.color = 33 === c ? l(a) : m(a));
- f & 1 && (b.moveX = a.readSi16());
- f & 2 && (b.moveY = a.readSi16());
- f & 8 && (b.fontHeight = a.readUi16());
- f = a.readUi8();
- for (c = b.entries = [];f--;) {
- c.push({glyphIndex:a.readUb(d), advance:a.readSb(g)});
- }
- return b;
- }
- function E(a, b, c) {
- b = {code:c};
- 15 == c && (b.soundId = a.readUi16());
- 89 == c && (b.soundClassName = a.readString(-1));
- c = {};
- var d = c.flags = a.readUi8();
- d & 1 && (c.inPoint = a.readUi32());
- d & 2 && (c.outPoint = a.readUi32());
- d & 4 && (c.loopCount = a.readUi16());
- if (d & 8) {
- for (var g = a.readUi8(), d = c.envelopes = [];g--;) {
- d.push({pos44:a.readUi32(), volumeLeft:a.readUi16(), volumeRight:a.readUi16()});
- }
- }
- b.soundInfo = c;
- return b;
- }
- function A(a, b, c, d) {
- b = {code:c};
- b.id = a.readUi16();
- var g = b.format = a.readUi8();
- b.width = a.readUi16();
- b.height = a.readUi16();
- b.hasAlpha = 36 === c;
- 3 === g && (b.colorTableSize = a.readUi8());
- b.bmpData = a.bytes.subarray(a.pos, d);
- a.pos = d;
- return b;
- }
- function G(a, b, c, d) {
- var g = {code:c};
- g.id = a.readUi16();
- var f = g.flags = a.readUi8(), p = !!(f & 4);
- 5 < b ? g.language = a.readUi8() : (f = g.flags = f & -65, a.pos += 1, g.language = 0);
- var k = a.readUi8();
- g.name = a.readString(k);
- 75 === c && (g.resolution = 20);
- var q = a.readUi16();
- if (0 === q) {
- return g;
- }
- var r = a.pos, u = g.offsets = [], k = q;
- if (f & 8) {
- for (;k--;) {
- u.push(a.readUi32());
- }
- g.mapOffset = a.readUi32();
- } else {
- for (;k--;) {
- u.push(a.readUi16());
- }
- g.mapOffset = a.readUi16();
- }
- u = g.glyphs = [];
- for (k = q;k--;) {
- 1 === g.offsets[q - k] + r - a.pos ? (a.pos += 1, u.push([])) : u.push(v(a, b, c));
- }
- b = g.codes = [];
- for (k = q;k--;) {
- b.push(p ? a.readUi16() : a.readUi8());
- }
- if (f & 128) {
- g.ascent = a.readUi16();
- g.descent = a.readUi16();
- g.leading = a.readSi16();
- f = g.advance = [];
- for (k = q;k--;) {
- f.push(a.readSi16());
- }
- f = g.bbox = [];
- for (k = q;k--;) {
- f.push(h(a));
- }
- k = a.readUi16();
- for (q = g.kerning = [];k-- && d - a.pos >= (p ? 4 : 2) + 2;) {
- q.push(w(a, p));
- }
- }
- return g;
- }
- function w(a, b) {
- var c = {};
- b ? (c.code1 = a.readUi16(), c.code2 = a.readUi16()) : (c.code1 = a.readUi8(), c.code2 = a.readUi8());
- c.adjustment = a.readUi16();
- return c;
- }
- function y(a, b, c, d) {
- b = {code:c};
- b.id = a.readUi16();
- c = b.flags = a.readUi8();
- b.name = a.readString(-1);
- c & 4 && (b.data = a.bytes.subarray(a.pos, d), a.pos = d);
- return b;
- }
- function C(a, b) {
- for (var c = {code:b}, d = a.readEncodedU32(), g = c.scenes = [];d--;) {
- g.push({offset:a.readEncodedU32(), name:a.readString(-1)});
- }
- d = a.readEncodedU32();
- for (g = c.labels = [];d--;) {
- g.push({frame:a.readEncodedU32(), name:a.readString(-1)});
- }
- return c;
- }
- function x(a, b, c) {
- var d = {code:c};
- d.id = a.readUi16();
- d.lineBounds = h(a);
- var g = 0, f = 46 === c || 84 === c;
- f && (g |= 8, d.lineBoundsMorph = h(a));
- var p = 83 === c || 84 === c;
- p && (d.fillBounds = h(a), f && (d.fillBoundsMorph = h(a)), g |= a.readUi8() & 7);
- d.flags = g;
- f && (a.pos += 4);
- d.fillStyles = I(a, b, c, f);
- d.lineStyles = D(a, b, c, f, p);
- a.align();
- var g = a.readUb(4), k = a.readUb(4);
- d.records = M(a, b, c, f, g, k, p);
- f && (a.align(), g = a.readUb(4), k = a.readUb(4), d.recordsMorph = M(a, b, c, f, g, k, p));
- return d;
- }
- function M(a, b, c, d, g, f, p) {
- var k = [], q;
- do {
- var r = {};
- q = r.type = a.readUb(1);
- var u = a.readUb(5);
- if (!q && !u) {
- break;
- }
- q ? (q = (u & 15) + 2, u = (u & 240) << 1, u & 32 ? (r.isGeneral = a.readUb(1)) ? (u |= 64, r.deltaX = a.readSb(q), r.deltaY = a.readSb(q)) : (r.isVertical = a.readUb(1)) ? (u |= 128, r.deltaY = a.readSb(q)) : r.deltaX = a.readSb(q) : (r.controlDeltaX = a.readSb(q), r.controlDeltaY = a.readSb(q), r.anchorDeltaX = a.readSb(q), r.anchorDeltaY = a.readSb(q))) : (2 >= c && (u &= -17), u & 1 && (q = a.readUb(5), r.moveX = a.readSb(q), r.moveY = a.readSb(q)), u & 2 && (r.fillStyle0 = a.readUb(g)),
- u & 4 && (r.fillStyle1 = a.readUb(g)), u & 8 && (r.lineStyle = a.readUb(f)), u & 16 && (r.fillStyles = I(a, b, c, d), r.lineStyles = D(a, b, c, d, p), a.align(), g = a.readUb(4), f = a.readUb(4)));
- r.flags = u;
- k.push(r);
- } while (1);
- return k;
- }
- function I(a, b, c, d) {
- var g = a.readUi8();
- 2 < c && 255 === g && (g = a.readUi16());
- for (var f = [];g--;) {
- f.push(J(a, b, c, d));
- }
- return f;
- }
- function J(a, b, c, g) {
- b = {};
- var f = b.type = a.readUi8();
- switch(f) {
- case 0:
- b.color = 22 < c || g ? l(a) : m(a);
- g && (b.colorMorph = l(a));
- break;
- case 16:
- ;
- case 18:
- ;
- case 19:
- b.matrix = d(a);
- g && (b.matrixMorph = d(a));
- 83 === c ? (b.spreadMode = a.readUb(2), b.interpolationMode = a.readUb(2)) : a.readUb(4);
- for (var p = a.readUb(4), k = b.records = [];p--;) {
- k.push(F(a, c, g));
- }
- 19 === f && (b.focalPoint = a.readSi16(), g && (b.focalPointMorph = a.readSi16()));
- break;
- case 64:
- ;
- case 65:
- ;
- case 66:
- ;
- case 67:
- b.bitmapId = a.readUi16(), b.condition = 64 === f || 67 === f, b.matrix = d(a), g && (b.matrixMorph = d(a));
- }
- return b;
- }
- function F(a, b, c) {
- var d = {};
- d.ratio = a.readUi8();
- d.color = 22 < b ? l(a) : m(a);
- c && (d.ratioMorph = a.readUi8(), d.colorMorph = l(a));
- return d;
- }
- function D(a, b, c, d, g) {
- var f = a.readUi8();
- 2 < c && 255 === f && (f = a.readUi16());
- for (var p = [];f--;) {
- var k = {};
- k.width = a.readUi16();
- d && (k.widthMorph = a.readUi16());
- if (g) {
- a.align();
- k.startCapsStyle = a.readUb(2);
- var q = k.jointStyle = a.readUb(2), r = k.hasFill = a.readUb(1);
- k.noHscale = !!a.readUb(1);
- k.noVscale = !!a.readUb(1);
- k.pixelHinting = !!a.readUb(1);
- a.readUb(5);
- k.noClose = !!a.readUb(1);
- k.endCapsStyle = a.readUb(2);
- 2 === q && (k.miterLimitFactor = a.readFixed8());
- r ? k.fillStyle = J(a, b, c, d) : (k.color = l(a), d && (k.colorMorph = l(a)));
- } else {
- k.color = 22 < c ? l(a) : m(a), d && (k.colorMorph = l(a));
- }
- p.push(k);
- }
- return p;
- }
- b.parseRgb = m;
- b.parseDefineImageTag = u;
- b.parseDefineFontTag = p;
- b.parseSoundStreamHeadTag = function(a, b) {
- var c = {}, d = a.readUi8();
- c.playbackRate = d >> 2 & 3;
- c.playbackSize = d >> 1 & 1;
- c.playbackType = d & 1;
- var d = a.readUi8(), g = c.streamCompression = d >> 4 & 15;
- c.streamRate = d >> 2 & 3;
- c.streamSize = d >> 1 & 1;
- c.streamType = d & 1;
- c.samplesCount = a.readUi16();
- 2 == g && 2 <= b - a.pos && (c.latencySeek = a.readSi16());
- return c;
- };
- b.parseDefineBitmapTag = A;
- b.parseDefineFont2Tag = G;
- b.parseDefineFont4Tag = y;
- b.parseDefineSceneTag = C;
- b.tagHandlers = {0:void 0, 1:void 0, 2:x, 4:c, 5:r, 6:u, 7:q, 8:void 0, 9:void 0, 10:p, 11:z, 12:void 0, 13:void 0, 14:function(a, b, c, d) {
- b = {code:c};
- b.id = a.readUi16();
- c = a.readUi8();
- b.soundFormat = c >> 4 & 15;
- b.soundRate = c >> 2 & 3;
- b.soundSize = c >> 1 & 1;
- b.soundType = c & 1;
- b.samplesCount = a.readUi32();
- b.soundData = a.bytes.subarray(a.pos, d);
- a.pos = d;
- return b;
- }, 15:E, 17:void 0, 18:void 0, 19:void 0, 20:A, 21:u, 22:x, 23:void 0, 24:void 0, 26:c, 28:r, 32:x, 33:z, 34:q, 35:u, 36:A, 37:function(a, b, c) {
- b = {code:c};
- b.id = a.readUi16();
- b.bbox = h(a);
- c = b.flags = a.readUi16();
- c & 1 && (b.fontId = a.readUi16());
- c & 32768 && (b.fontClass = a.readString(-1));
- c & 1 && (b.fontHeight = a.readUi16());
- c & 4 && (b.color = l(a));
- c & 2 && (b.maxLength = a.readUi16());
- c & 8192 && (b.align = a.readUi8(), b.leftMargin = a.readUi16(), b.rightMargin = a.readUi16(), b.indent = a.readSi16(), b.leading = a.readSi16());
- b.variableName = a.readString(-1);
- c & 128 && (b.initialText = a.readString(-1));
- return b;
- }, 39:void 0, 43:void 0, 45:void 0, 46:x, 48:G, 56:void 0, 57:void 0, 58:void 0, 59:void 0, 60:function(a, b, c) {
- b = {code:c};
- b.id = a.readUi16();
- b.numFrames = a.readUi16();
- b.width = a.readUi16();
- b.height = a.readUi16();
- a.readUb(4);
- b.deblocking = a.readUb(3);
- b.smoothing = !!a.readUb(1);
- b.codecId = a.readUi8();
- return b;
- }, 61:function(a, b, c, d) {
- b = {code:c};
- b.streamId = a.readUi16();
- b.frameNum = a.readUi16();
- b.videoData = a.bytes.subarray(a.pos, d);
- a.pos = d;
- return b;
- }, 62:void 0, 64:void 0, 65:void 0, 66:void 0, 69:void 0, 70:c, 71:void 0, 72:void 0, 73:void 0, 74:void 0, 75:G, 76:void 0, 77:void 0, 78:function(a, b, c) {
- b = {code:c};
- b.symbolId = a.readUi16();
- b.splitter = h(a);
- return b;
- }, 82:void 0, 83:x, 84:x, 86:C, 87:function(a, b, c, d) {
- b = {code:c};
- b.id = a.readUi16();
- a.pos += 4;
- b.data = a.bytes.subarray(a.pos, d);
- a.pos = d;
- return b;
- }, 88:void 0, 89:E, 90:u, 91:y};
- b.parseHeader = function(a) {
- var b = a.readUb(5), c = a.readSb(b), d = a.readSb(b), g = a.readSb(b), b = a.readSb(b);
- a.align();
- var f = a.readUi8(), f = a.readUi8() + f / 256;
- a = a.readUi16();
- return {frameRate:f, frameCount:a, bounds:new e.Bounds(c, g, d, b)};
- };
- })(b.LowLevel || (b.LowLevel = {}));
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.IntegerUtilities.roundToMultipleOfFour, t = e.ArrayUtilities.Inflate;
- (function(b) {
- b[b.FORMAT_COLORMAPPED = 3] = "FORMAT_COLORMAPPED";
- b[b.FORMAT_15BPP = 4] = "FORMAT_15BPP";
- b[b.FORMAT_24BPP = 5] = "FORMAT_24BPP";
- })(h.BitmapFormat || (h.BitmapFormat = {}));
- h.defineBitmap = function(h) {
- b.enterTimeline("defineBitmap");
- var l, d = 0;
- switch(h.format) {
- case 3:
- l = h.width;
- var d = h.height, a = h.hasAlpha, c = n(l) - l, f = a ? 4 : 3, k = n((h.colorTableSize + 1) * f), r = t.inflate(h.bmpData, k + (l + c) * d, !0), u = new Uint32Array(l * d), q = 0, g = 0;
- if (a) {
- for (a = 0;a < d;a++) {
- for (var p = 0;p < l;p++) {
- var g = r[k++] << 2, v = r[g + 3], z = r[g + 0], B = r[g + 1], g = r[g + 2];
- u[q++] = g << 24 | B << 16 | z << 8 | v;
- }
- k += c;
- }
- } else {
- for (a = 0;a < d;a++) {
- for (p = 0;p < l;p++) {
- g = r[k++] * f, v = 255, z = r[g + 0], B = r[g + 1], g = r[g + 2], u[q++] = g << 24 | B << 16 | z << 8 | v;
- }
- k += c;
- }
- }
- l = new Uint8Array(u.buffer);
- d = 1;
- break;
- case 5:
- c = h.width;
- f = h.height;
- d = h.hasAlpha;
- l = t.inflate(h.bmpData, f * c * 4, !0);
- if (!d) {
- d = new Uint32Array(c * f);
- c *= f;
- for (r = f = 0;r < c;r++) {
- f++, u = l[f++], k = l[f++], q = l[f++], d[r] = q << 24 | k << 16 | u << 8 | 255;
- }
- l = new Uint8Array(d.buffer);
- }
- d = 1;
- break;
- case 4:
- e.Debug.notImplemented("parse15BPP"), l = null, d = 1;
- }
- b.leaveTimeline();
- return {definition:{type:"image", id:h.id, width:h.width, height:h.height, mimeType:"application/octet-stream", data:l, dataType:d, image:null}, type:"image"};
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- b.defineButton = function(b, h) {
- for (var e = b.characters, l = {up:[], over:[], down:[], hitTest:[]}, d = 0, a;a = e[d++];) {
- var c = h[a.symbolId];
- c && (c = {symbolId:c.id, code:4, depth:a.depth, flags:a.matrix ? 4 : 0, matrix:a.matrix}, a.flags & 1 && l.up.push(c), a.flags & 2 && l.over.push(c), a.flags & 4 && l.down.push(c), a.flags & 8 && l.hitTest.push(c));
- }
- return {type:"button", id:b.id, buttonActions:b.buttonActions, states:l};
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- function e(a) {
- for (var b = 0;2 <= a;) {
- a /= 2, ++b;
- }
- return d(2, b);
- }
- function t(a) {
- return k(a >> 8 & 255, a & 255);
- }
- function m(a) {
- return t(a >> 16) + t(a);
- }
- function l(a) {
- for (var b = 0, c = 0, d = 0, f = 0, k = 0;k < a.length;k++) {
- var l = a[k];
- if (l) {
- for (var h, e = 0, m = 0, n = 0;n < l.length;n++) {
- h = l[n], h.type ? h.flags & 32 ? (e += h.deltaX || 0, m += -(h.deltaY || 0)) : (e += h.controlDeltaX, m += -h.controlDeltaY, e += h.anchorDeltaX, m += -h.anchorDeltaY) : h.flags & 1 && (e = h.moveX, m = -h.moveY), b > e && (b = e), c > m && (c = m), d < e && (d = e), f < m && (f = m);
- }
- }
- }
- return 5E3 < Math.max(d - b, f - c);
- }
- var d = Math.pow, a = Math.min, c = Math.max, f = Math.log, k = String.fromCharCode;
- b.defineFont = function(b) {
- var d = "swf-font-" + b.id, k = b.name || d, g = {type:"font", id:b.id, name:k, bold:!!(b.flags & 1), italic:!!(b.flags & 2), codes:null, metrics:null, data:b.data, originalSize:!1}, p = b.glyphs, v = p ? p.length : 0;
- if (!v) {
- return g;
- }
- var h = {}, B = [], E = {}, A = [], G, w = !("advance" in b), y = 48 === b.code, C = 75 === b.code;
- w && (b.advance = []);
- G = Math.max.apply(null, b.codes) || 35;
- if (b.codes) {
- for (var x = 0;x < b.codes.length;x++) {
- var M = b.codes[x];
- if (32 > M || M in E) {
- G++, 8232 == G && (G = 8240), M = G;
- }
- B.push(M);
- E[M] = x;
- }
- G = B.concat();
- B.sort(function(a, b) {
- return a - b;
- });
- for (var x = 0, I;void 0 !== (M = B[x++]);) {
- var J = M, F = J;
- for (I = [x - 1];void 0 !== (M = B[x]) && F + 1 === M;) {
- ++F, I.push(x), ++x;
- }
- A.push([J, F, I]);
- }
- } else {
- I = [];
- for (x = 0;x < v;x++) {
- M = 57344 + x, B.push(M), E[M] = x, I.push(x);
- }
- A.push([57344, 57344 + v - 1, I]);
- G = B.concat();
- }
- var D = b.resolution || 1;
- y && l(p) && (D = 20, g.originalSize = !0);
- y = Math.ceil(b.ascent / D) || 1024;
- I = -Math.ceil(b.descent / D) || 0;
- for (var H = b.leading / D || 0, K = h["OS/2"] = "", O = "", S = "", P = "", x = 0, N;N = A[x++];) {
- J = N[0], F = N[1], M = N[2][0], K += t(J), O += t(F), S += t(M - J + 1 & 65535), P += t(0);
- }
- O += "\u00ff\u00ff";
- K += "\u00ff\u00ff";
- S += "\x00\u0001";
- P += "\x00\x00";
- A = A.length + 1;
- x = 2 * e(A);
- J = 2 * A - x;
- x = "\x00\x00" + t(2 * A) + t(x) + t(f(A) / f(2)) + t(J) + O + "\x00\x00" + K + S + P;
- h.cmap = "\x00\x00\x00\u0001\x00\u0003\x00\u0001\x00\x00\x00\f\x00\u0004" + t(x.length + 4) + x;
- var Q = "\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001\x00", K = "\x00\x00", A = 16, O = 0, P = [], J = [], F = [];
- N = [];
- for (var x = S = 0, V = {};void 0 !== (M = B[x++]);) {
- for (var W = p[E[M]], R = 0, L = 0, U = "", aa = "", X = 0, T = [], X = -1, ca = 0;ca < W.length;ca++) {
- U = W[ca];
- if (U.type) {
- 0 > X && (X = 0, T[X] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0});
- if (U.flags & 32) {
- T[X].commands.push(2);
- var ba = (U.deltaX || 0) / D, Z = -(U.deltaY || 0) / D;
- } else {
- T[X].commands.push(3), ba = U.controlDeltaX / D, Z = -U.controlDeltaY / D, R += ba, L += Z, T[X].data.push(R, L), ba = U.anchorDeltaX / D, Z = -U.anchorDeltaY / D;
- }
- R += ba;
- L += Z;
- T[X].data.push(R, L);
- } else {
- if (U.flags & 1) {
- X++;
- T[X] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0};
- T[X].commands.push(1);
- var ea = U.moveX / D, U = -U.moveY / D, ba = ea - R, Z = U - L, R = ea, L = U;
- T[X].data.push(R, L);
- }
- }
- -1 < X && (T[X].xMin > R && (T[X].xMin = R), T[X].yMin > L && (T[X].yMin = L), T[X].xMax < R && (T[X].xMax = R), T[X].yMax < L && (T[X].yMax = L));
- }
- C || T.sort(function(a, b) {
- return (b.xMax - b.xMin) * (b.yMax - b.yMin) - (a.xMax - a.xMin) * (a.yMax - a.yMin);
- });
- V[M] = T;
- }
- for (x = 0;void 0 !== (M = B[x++]);) {
- for (var W = p[E[M]], T = V[M], da = 1, X = 0, ba = L = U = R = "", M = L = R = 0, W = -1024, ea = 0, fa = -1024, aa = U = "", X = 0, X = -1, ha = [], ka = [], ca = 0;ca < T.length;ca++) {
- ha = ha.concat(T[ca].data), ka = ka.concat(T[ca].commands);
- }
- for (var ga = L = R = 0, ia = 0, ja = "", T = "", la = 0, X = 0, da = 1, aa = "", ca = 0;ca < ka.length;ca++) {
- ba = ka[ca], 1 === ba ? (X && (++da, aa += t(X - 1)), ga = ha[la++], ia = ha[la++], ba = ga - R, Z = ia - L, U += "\u0001", ja += t(ba), T += t(Z), R = ga, L = ia) : 2 === ba ? (ga = ha[la++], ia = ha[la++], ba = ga - R, Z = ia - L, U += "\u0001", ja += t(ba), T += t(Z), R = ga, L = ia) : 3 === ba && (ga = ha[la++], ia = ha[la++], ba = ga - R, Z = ia - L, U += "\x00", ja += t(ba), T += t(Z), R = ga, L = ia, X++, ga = ha[la++], ia = ha[la++], ba = ga - R, Z = ia - L, U += "\u0001", ja +=
- t(ba), T += t(Z), R = ga, L = ia), X++, X > O && (O = X), M > R && (M = R), ea > L && (ea = L), W < R && (W = R), fa < L && (fa = L);
- }
- R = aa += t((X || 1) - 1);
- L = ja;
- ba = T;
- ca || (M = W = ea = fa = 0, U += "1");
- ca = t(da) + t(M) + t(ea) + t(W) + t(fa) + R + "\x00\x00" + U + L + ba;
- ca.length & 1 && (ca += "\x00");
- Q += ca;
- K += t(A / 2);
- A += ca.length;
- P.push(M);
- J.push(W);
- F.push(ea);
- N.push(fa);
- da > S && (S = da);
- X > O && (O = X);
- w && b.advance.push((W - M) * D * 1.3);
- }
- K += t(A / 2);
- h.glyf = Q;
- C || (x = Math.min.apply(null, F), 0 > x && (I = I || x));
- h["OS/2"] = "\x00\u0001\x00\x00" + t(g.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 " + t((g.italic ? 1 : 0) | (g.bold ? 32 : 0)) + t(B[0]) + t(B[B.length - 1]) + t(y) + t(I) + t(H) + t(y) + t(-I) + "\x00\x00\x00\x00\x00\x00\x00\x00";
- h.head = "\x00\u0001\x00\x00\x00\u0001\x00\x00\x00\x00\x00\x00_\u000f<\u00f5\x00\x0B\u0004\x00\x00\x00\x00\x00" + m(Date.now()) + "\x00\x00\x00\x00" + m(Date.now()) + t(a.apply(null, P)) + t(a.apply(null, F)) + t(c.apply(null, J)) + t(c.apply(null, N)) + t((g.italic ? 2 : 0) | (g.bold ? 1 : 0)) + "\x00\b\x00\u0002\x00\x00\x00\x00";
- B = b.advance;
- h.hhea = "\x00\u0001\x00\x00" + t(y) + t(I) + t(H) + t(B ? c.apply(null, B) : 1024) + "\x00\x00\x00\x00\u0003\u00b8\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + t(v + 1);
- p = "\x00\x00\x00\x00";
- for (x = 0;x < v;++x) {
- p += t(B ? B[x] / D : 1024) + "\x00\x00";
- }
- h.hmtx = p;
- if (b.kerning && b.kerning.length) {
- B = b.kerning;
- D = B.length;
- x = 2 * e(D);
- D = "\x00\x00\x00\u0001\x00\x00" + t(14 + 6 * D) + "\x00\u0001" + t(D) + t(x) + t(f(D) / f(2)) + t(2 * D - x);
- for (x = 0;U = B[x++];) {
- D += t(E[U.code1]) + t(E[U.code2]) + t(U.adjustment);
- }
- h.kern = D;
- }
- h.loca = K;
- h.maxp = "\x00\u0001\x00\x00" + t(v + 1) + t(O) + t(S) + "\x00\x00\x00\x00\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
- x = k.replace(/ /g, "");
- d = [b.copyright || "Original licence", k, "Unknown", d, k, "1.0", x, "Unknown", "Unknown", "Unknown"];
- x = d.length;
- b = "\x00\x00" + t(x) + t(12 * x + 6);
- for (x = A = 0;k = d[x++];) {
- b += "\x00\u0001\x00\x00\x00\x00" + t(x - 1) + t(k.length) + t(A), A += k.length;
- }
- h.name = b + d.join("");
- h.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";
- d = Object.keys(h);
- x = d.length;
- k = "\x00\u0001\x00\x00" + t(x) + "\x00\u0080\x00\u0003\x00 ";
- v = "";
- A = 16 * x + k.length;
- for (x = 0;b = d[x++];) {
- E = h[b];
- B = E.length;
- for (k += b + "\x00\x00\x00\x00" + m(A) + m(B);B & 3;) {
- E += "\x00", ++B;
- }
- for (v += E;A & 3;) {
- ++A;
- }
- A += B;
- }
- h = k + v;
- y = {ascent:y / 1024, descent:-I / 1024, leading:H / 1024};
- I = new Uint8Array(h.length);
- for (x = 0;x < h.length;x++) {
- I[x] = h.charCodeAt(x) & 255;
- }
- g.codes = G;
- g.metrics = y;
- g.data = I;
- return g;
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b) {
- for (var c = 0, d = a.length;c < d && (255 !== a[c] || c + 1 < d && (0 === a[c + 1] || 255 === a[c + 1]));) {
- ++c;
- }
- if (!(c >= d)) {
- do {
- var q = c++, g = a[c++];
- if (192 <= g && 199 >= g || 201 <= g && 207 >= g || 218 <= g && 239 >= g || 254 === g) {
- c += a[c] << 8 | a[c + 1];
- }
- for (;c < d && (255 !== a[c] || c + 1 < d && (0 === a[c + 1] || 255 === a[c + 1]));) {
- ++c;
- }
- 216 !== g && 217 !== g && b.push(a.subarray(q, c));
- } while (c < d);
- }
- }
- function t(a, b) {
- if (73 === b[12] && 72 === b[13] && 68 === b[14] && 82 === b[15]) {
- a.width = b[16] << 24 | b[17] << 16 | b[18] << 8 | b[19];
- a.height = b[20] << 24 | b[21] << 16 | b[22] << 8 | b[23];
- var c = b[26];
- a.hasAlpha = 4 === c || 6 === c;
- }
- }
- function m(a) {
- for (var b = 0, c = 0;c < a.length;c++) {
- b += a[c].length;
- }
- for (var b = new Uint8Array(b), d = 0, c = 0;c < a.length;c++) {
- var q = a[c];
- b.set(q, d);
- d += q.length;
- }
- return b;
- }
- function l(a, b) {
- if (!b.parsedChunks) {
- var c = [];
- n(b.data, c);
- b.parsedChunks = c;
- }
- for (c = 0;c < a.length && !(192 <= a[c][1] && 192 >= a[c][1]);) {
- c++;
- }
- Array.prototype.splice.apply(a, Array.prototype.concat.call([c, 0], b.parsedChunks));
- }
- var d = e.ArrayUtilities.Inflate;
- h.parseJpegChunks = n;
- h.parsePngHeaders = t;
- var a = new Uint8Array([255, 216]), c = new Uint8Array([255, 217]);
- h.defineImage = function(f) {
- b.enterTimeline("defineImage");
- var k = {type:"image", id:f.id, mimeType:f.mimeType}, r = f.imgData;
- if ("image/jpeg" === f.mimeType) {
- var u = [];
- u.push(a);
- n(r, u);
- f.jpegTables && l(u, f.jpegTables);
- u.push(c);
- u.forEach(function(a) {
- var b = a[1];
- 192 <= b && 195 >= b && (k.height = a[5] << 8 | a[6], k.width = a[7] << 8 | a[8]);
- });
- k.data = m(u);
- k.dataType = 4;
- if (f = f.alphaData) {
- r = k.width * k.height;
- try {
- k.alphaData = d.inflate(f, r, !0);
- } catch (q) {
- k.alphaData = new Uint8Array(r);
- }
- }
- } else {
- t(k, r), k.data = r, k.dataType = 5;
- }
- b.leaveTimeline();
- return k;
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- b.defineLabel = function(b) {
- return {type:"label", id:b.id, fillBounds:b.bbox, matrix:b.matrix, tag:{hasText:!0, initialText:"", html:!0, readonly:!0}, records:b.records, coords:null, static:!0, require:null};
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- function n(a, b, c, d) {
- if (a) {
- if (b.fill0) {
- if (d = d[b.fill0 - 1], b.fill1 || b.line) {
- d.addSegment(a.toReversed());
- } else {
- a.isReversed = !0;
- return;
- }
- }
- b.line && b.fill1 && (d = c[b.line - 1], d.addSegment(a.clone()));
- }
- }
- function t(a, b, c, d) {
- c && (a.morph = m(a, b, d));
- if (b) {
- return a.miterLimit = 2 * (a.miterLimitFactor || 1.5), !a.color && a.hasFill ? (d = t(a.fillStyle, !1, !1, d), a.type = d.type, a.transform = d.transform, a.colors = d.colors, a.ratios = d.ratios, a.focalPoint = d.focalPoint, a.bitmapId = d.bitmapId, a.bitmapIndex = d.bitmapIndex, a.repeat = d.repeat, a.fillStyle = null) : a.type = 0, a;
- }
- if (void 0 === a.type || 0 === a.type) {
- return a;
- }
- var f;
- switch(a.type) {
- case 16:
- ;
- case 18:
- ;
- case 19:
- d = a.records;
- f = a.colors = [];
- b = a.ratios = [];
- for (c = 0;c < d.length;c++) {
- var p = d[c];
- f.push(p.color);
- b.push(p.ratio);
- }
- f = 819.2;
- break;
- case 64:
- ;
- case 65:
- ;
- case 66:
- ;
- case 67:
- a.smooth = 66 !== a.type && 67 !== a.type;
- a.repeat = 65 !== a.type && 67 !== a.type;
- f = d.indexOf(a.bitmapId);
- -1 === f && (f = d.length, d.push(a.bitmapId));
- a.bitmapIndex = f;
- f = .05;
- break;
- default:
- e.Debug.warning("shape parser encountered invalid fill style " + a.type);
- }
- if (!a.matrix) {
- return a.transform = g, a;
- }
- d = a.matrix;
- a.transform = {a:d.a * f, b:d.b * f, c:d.c * f, d:d.d * f, tx:d.tx / 20, ty:d.ty / 20};
- a.matrix = null;
- return a;
- }
- function m(a, b, c) {
- var d = Object.create(a);
- if (b) {
- return d.width = a.widthMorph, !a.color && a.hasFill ? (a = m(a.fillStyle, !1, c), d.transform = a.transform, d.colors = a.colors, d.ratios = a.ratios) : d.color = a.colorMorph, d;
- }
- if (void 0 === a.type) {
- return d;
- }
- if (0 === a.type) {
- return d.color = a.colorMorph, d;
- }
- var f;
- switch(a.type) {
- case 16:
- ;
- case 18:
- ;
- case 19:
- f = a.records;
- b = d.colors = [];
- c = d.ratios = [];
- for (var p = 0;p < f.length;p++) {
- var k = f[p];
- b.push(k.colorMorph);
- c.push(k.ratioMorph);
- }
- f = 819.2;
- break;
- case 64:
- ;
- case 65:
- ;
- case 66:
- ;
- case 67:
- f = .05;
- }
- if (!a.matrix) {
- return d.transform = g, d;
- }
- a = a.matrixMorph;
- d.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};
- return d;
- }
- function l(a, b, c, d) {
- for (var g = [], f = 0;f < a.length;f++) {
- var p = t(a[f], b, c, d);
- g[f] = b ? new v(null, p) : new v(p, null);
- }
- return g;
- }
- function d(a, b) {
- var c = a.noHscale ? a.noVscale ? 0 : 2 : a.noVscale ? 3 : 1, d = r(a.width, 0, 5100) | 0;
- b.lineStyle(d, a.color, a.pixelHinting, c, a.endCapsStyle, a.jointStyle, a.miterLimit);
- }
- function a(a, b) {
- var c = r(a.width, 0, 5100) | 0;
- b.writeMorphLineStyle(c, a.color);
- }
- function c(a, b, c) {
- c.beginGradient(a, b.colors, b.ratios, 16 === b.type ? 16 : 18, b.transform, b.spreadMethod, b.interpolationMode, b.focalPoint / 2 | 0);
- }
- var f = e.ArrayUtilities.DataBuffer, k = e.ShapeData, r = e.NumberUtilities.clamp, u = Array.prototype.push, q;
- (function(a) {
- a[a.Solid = 0] = "Solid";
- a[a.LinearGradient = 16] = "LinearGradient";
- a[a.RadialGradient = 18] = "RadialGradient";
- a[a.FocalRadialGradient = 19] = "FocalRadialGradient";
- a[a.RepeatingBitmap = 64] = "RepeatingBitmap";
- a[a.ClippedBitmap = 65] = "ClippedBitmap";
- a[a.NonsmoothedRepeatingBitmap = 66] = "NonsmoothedRepeatingBitmap";
- a[a.NonsmoothedClippedBitmap = 67] = "NonsmoothedClippedBitmap";
- })(q || (q = {}));
- var g = {a:1, b:0, c:0, d:1, tx:0, ty:0};
- b.defineShape = function(a) {
- for (var b = [], c = l(a.fillStyles, !1, !!a.recordsMorph, b), d = l(a.lineStyles, !0, !!a.recordsMorph, b), g = a.records, q = d, r = a.recordsMorph || null, d = null !== r, h = {fill0:0, fill1:0, line:0}, e = null, m, I, J = g.length, F = 0, D = 0, H = 0, K = 0, O, S = 0, P = 0;S < J;S++) {
- var N = g[S], Q;
- d && (Q = r[P++]);
- if (0 === N.type) {
- e && n(e, h, q, c), N.flags & 16 && (m || (m = []), u.apply(m, c), c = l(N.fillStyles, !1, d, b), u.apply(m, q), q = l(N.lineStyles, !0, d, b), I && (m.push(I), I = null), h = {fill0:0, fill1:0, line:0}), N.flags & 2 && (h.fill0 = N.fillStyle0), N.flags & 4 && (h.fill1 = N.fillStyle1), N.flags & 8 && (h.line = N.lineStyle), h.fill1 ? O = c[h.fill1 - 1] : h.line ? O = q[h.line - 1] : h.fill0 && (O = c[h.fill0 - 1]), N.flags & 1 && (F = N.moveX | 0, D = N.moveY | 0), O && (e = p.FromDefaults(d),
- O.addSegment(e), d ? (0 === Q.type ? (H = Q.moveX | 0, K = Q.moveY | 0) : (H = F, K = D, P--), e.morphMoveTo(F, D, H, K)) : e.moveTo(F, D));
- } else {
- e || (I || (I = new v(null, t({color:{red:0, green:0, blue:0, alpha:0}, width:20}, !0, d, b))), e = p.FromDefaults(d), I.addSegment(e), d ? e.morphMoveTo(F, D, H, K) : e.moveTo(F, D));
- if (d) {
- for (;Q && 0 === Q.type;) {
- Q = r[P++];
- }
- Q || (Q = N);
- }
- if (N.flags & 32 && (!d || Q.flags & 32)) {
- F += N.deltaX | 0, D += N.deltaY | 0, d ? (H += Q.deltaX | 0, K += Q.deltaY | 0, e.morphLineTo(F, D, H, K)) : e.lineTo(F, D);
- } else {
- var V, W, R;
- N.flags & 32 ? (R = N.deltaX | 0, N = N.deltaY | 0, V = F + (R >> 1), W = D + (N >> 1), F += R, D += N) : (V = F + N.controlDeltaX | 0, W = D + N.controlDeltaY | 0, F = V + N.anchorDeltaX | 0, D = W + N.anchorDeltaY | 0);
- if (d) {
- if (Q.flags & 32) {
- R = Q.deltaX | 0, N = Q.deltaY | 0, L = H + (R >> 1), U = K + (N >> 1), H += R, K += N;
- } else {
- var L = H + Q.controlDeltaX | 0, U = K + Q.controlDeltaY | 0, H = L + Q.anchorDeltaX | 0, K = U + Q.anchorDeltaY | 0
- }
- e.morphCurveTo(V, W, F, D, L, U, H, K);
- } else {
- e.curveTo(V, W, F, D);
- }
- }
- }
- }
- n(e, h, q, c);
- m ? u.apply(m, c) : m = c;
- u.apply(m, q);
- I && m.push(I);
- g = new k;
- d && (g.morphCoordinates = new Int32Array(g.coordinates.length), g.morphStyles = new f(16));
- for (S = 0;S < m.length;S++) {
- m[S].serialize(g);
- }
- return {type:a.flags & 8 ? "morphshape" : "shape", id:a.id, fillBounds:a.fillBounds, lineBounds:a.lineBounds, morphFillBounds:a.fillBoundsMorph || null, morphLineBounds:a.lineBoundsMorph || null, shape:g.toPlainObject(), transferables:g.buffers, require:b.length ? b : null};
- };
- var p = function() {
- function a(b, c, d, g, f, p) {
- this.commands = b;
- this.data = c;
- this.morphData = d;
- this.prev = g;
- this.next = f;
- this.isReversed = p;
- this.id = a._counter++;
- }
- a.FromDefaults = function(b) {
- var c = new f, d = new f;
- c.endian = d.endian = "auto";
- var g = null;
- b && (g = new f, g.endian = "auto");
- return new a(c, d, g, null, null, !1);
- };
- a.prototype.moveTo = function(a, b) {
- this.commands.writeUnsignedByte(9);
- this.data.write2Ints(a, b);
- };
- a.prototype.morphMoveTo = function(a, b, c, d) {
- this.moveTo(a, b);
- this.morphData.write2Ints(c, d);
- };
- a.prototype.lineTo = function(a, b) {
- this.commands.writeUnsignedByte(10);
- this.data.write2Ints(a, b);
- };
- a.prototype.morphLineTo = function(a, b, c, d) {
- this.lineTo(a, b);
- this.morphData.write2Ints(c, d);
- };
- a.prototype.curveTo = function(a, b, c, d) {
- this.commands.writeUnsignedByte(11);
- this.data.write4Ints(a, b, c, d);
- };
- a.prototype.morphCurveTo = function(a, b, c, d, g, f, p, k) {
- this.curveTo(a, b, c, d);
- this.morphData.write4Ints(g, f, p, k);
- };
- a.prototype.toReversed = function() {
- return new a(this.commands, this.data, this.morphData, null, null, !0);
- };
- a.prototype.clone = function() {
- return new a(this.commands, this.data, this.morphData, null, null, this.isReversed);
- };
- a.prototype.storeStartAndEnd = function() {
- var a = this.data.ints, b = a[0] + "," + a[1], c = (this.data.length >> 2) - 2, a = a[c] + "," + a[c + 1];
- this.isReversed ? (this.startPoint = a, this.endPoint = b) : (this.startPoint = b, this.endPoint = a);
- };
- a.prototype.connectsTo = function(a) {
- return this.endPoint === a.startPoint;
- };
- a.prototype.startConnectsTo = function(a) {
- return this.startPoint === a.startPoint;
- };
- a.prototype.flipDirection = function() {
- var a = "", a = this.startPoint;
- this.startPoint = this.endPoint;
- this.endPoint = a;
- this.isReversed = !this.isReversed;
- };
- a.prototype.serialize = function(a, b) {
- if (this.isReversed) {
- this._serializeReversed(a, b);
- } else {
- var c = this.commands.bytes, d = this.data.length >> 2, g = this.morphData ? this.morphData.ints : null, f = this.data.ints, p = 0;
- f[0] === b.x && f[1] === b.y && p++;
- for (var k = this.commands.length, q = 2 * p;p < k;p++) {
- q = this._writeCommand(c[p], q, f, g, a);
- }
- b.x = f[d - 2];
- b.y = f[d - 1];
- }
- };
- a.prototype._serializeReversed = function(a, b) {
- var c = this.commands.length, d = (this.data.length >> 2) - 2, g = this.commands.bytes, f = this.data.ints, p = this.morphData ? this.morphData.ints : null;
- f[d] === b.x && f[d + 1] === b.y || this._writeCommand(9, d, f, p, a);
- if (1 !== c) {
- for (;1 < c--;) {
- var d = d - 2, k = g[c];
- a.writeCommandAndCoordinates(k, f[d], f[d + 1]);
- p && a.writeMorphCoordinates(p[d], p[d + 1]);
- 11 === k && (d -= 2, a.writeCoordinates(f[d], f[d + 1]), p && a.writeMorphCoordinates(p[d], p[d + 1]));
- }
- }
- b.x = f[0];
- b.y = f[1];
- };
- a.prototype._writeCommand = function(a, b, c, d, g) {
- g.writeCommandAndCoordinates(a, c[b++], c[b++]);
- d && g.writeMorphCoordinates(d[b - 2], d[b - 1]);
- 11 === a && (g.writeCoordinates(c[b++], c[b++]), d && g.writeMorphCoordinates(d[b - 2], d[b - 1]));
- return b;
- };
- a._counter = 0;
- return a;
- }(), v = function() {
- function b(a, c) {
- this.fillStyle = a;
- this.lineStyle = c;
- this._head = null;
- }
- b.prototype.addSegment = function(a) {
- var b = this._head;
- b && (b.next = a, a.prev = b);
- this._head = a;
- };
- b.prototype.removeSegment = function(a) {
- a.prev && (a.prev.next = a.next);
- a.next && (a.next.prev = a.prev);
- };
- b.prototype.insertSegment = function(a, b) {
- var c = b.prev;
- a.prev = c;
- a.next = b;
- c && (c.next = a);
- b.prev = a;
- };
- b.prototype.head = function() {
- return this._head;
- };
- b.prototype.serialize = function(b) {
- var g = this.head();
- if (g) {
- for (;g;) {
- g.storeStartAndEnd(), g = g.prev;
- }
- for (var f = this.head(), p = f, k = g = null, q = f.prev;f;) {
- for (;q;) {
- q.startConnectsTo(f) && q.flipDirection(), q.connectsTo(f) ? (q.next !== f && (this.removeSegment(q), this.insertSegment(q, f)), f = q, q = f.prev) : (q.startConnectsTo(p) && q.flipDirection(), p.connectsTo(q) ? (this.removeSegment(q), p.next = q, q = q.prev, p.next.prev = p, p.next.next = null, p = p.next) : q = q.prev);
- }
- q = f.prev;
- g ? (k.next = f, f.prev = k, k = p, k.next = null) : (g = f, k = p);
- if (!q) {
- break;
- }
- f = p = q;
- q = f.prev;
- }
- if (this.fillStyle) {
- switch(q = this.fillStyle, f = q.morph, q.type) {
- case 0:
- b.beginFill(q.color);
- f && b.writeMorphFill(f.color);
- break;
- case 16:
- ;
- case 18:
- ;
- case 19:
- c(2, q, b);
- f && b.writeMorphGradient(f.colors, f.ratios, f.transform);
- break;
- case 65:
- ;
- case 64:
- ;
- case 67:
- ;
- case 66:
- b.beginBitmap(3, q.bitmapIndex, q.transform, q.repeat, q.smooth), f && b.writeMorphBitmap(f.transform);
- }
- } else {
- switch(q = this.lineStyle, f = q.morph, q.type) {
- case 0:
- d(q, b);
- f && a(f, b);
- break;
- case 16:
- ;
- case 18:
- ;
- case 19:
- d(q, b);
- c(6, q, b);
- f && (a(f, b), b.writeMorphGradient(f.colors, f.ratios, f.transform));
- break;
- case 65:
- ;
- case 64:
- ;
- case 67:
- ;
- case 66:
- d(q, b), b.beginBitmap(7, q.bitmapIndex, q.transform, q.repeat, q.smooth), f && (a(f, b), b.writeMorphBitmap(f.transform));
- }
- }
- f = {x:0, y:0};
- for (q = g;q;) {
- q.serialize(b, f), q = q.next;
- }
- this.fillStyle ? b.endFill() : b.endLine();
- return b;
- }
- };
- return b;
- }();
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- function n(a, b, c, d, k) {
- var q = d >> 3, r = c * b * q, q = c * q, u = a.length + (a.length & 1), l = new ArrayBuffer(f.length + u), h = new Uint8Array(l);
- h.set(f);
- if (k) {
- k = 0;
- for (var e = f.length;k < a.length;k += 2, e += 2) {
- h[e] = a[k + 1], h[e + 1] = a[k];
- }
- } else {
- h.set(a, f.length);
- }
- a = new DataView(l);
- a.setUint32(4, u + 36, !0);
- a.setUint16(22, c, !0);
- a.setUint32(24, b, !0);
- a.setUint32(28, r, !0);
- a.setUint16(32, q, !0);
- a.setUint16(34, d, !0);
- a.setUint32(40, u, !0);
- return {data:h, mimeType:"audio/wav"};
- }
- function t(a, b, c) {
- function d(b) {
- for (;u < b;) {
- q = q << 8 | a[f++], u += 8;
- }
- u -= b;
- return q >>> u & (1 << b) - 1;
- }
- for (var f = 0, q = 0, u = 0, l = 0, h = d(2), e = k[h];l < b.length;) {
- var m = b[l++] = d(16) << 16 >> 16, n, t = d(6), I;
- 1 < c && (n = b[l++] = d(16) << 16 >> 16, I = d(6));
- for (var J = 1 << h + 1, F = 0;4095 > F;F++) {
- for (var D = d(h + 2), H = r[t], K = 0, O = J >> 1;O;O >>= 1, H >>= 1) {
- D & O && (K += H);
- }
- m += (D & J ? -1 : 1) * (K + H);
- b[l++] = m = -32768 > m ? -32768 : 32767 < m ? 32767 : m;
- t += e[D & ~J];
- t = 0 > t ? 0 : 88 < t ? 88 : t;
- if (1 < c) {
- D = d(h + 2);
- H = r[I];
- K = 0;
- for (O = J >> 1;O;O >>= 1, H >>= 1) {
- D & O && (K += H);
- }
- n += (D & J ? -1 : 1) * (K + H);
- b[l++] = n = -32768 > n ? -32768 : 32767 < n ? 32767 : n;
- I += e[D & ~J];
- I = 0 > I ? 0 : 88 < I ? 88 : I;
- }
- }
- }
- }
- function m(a) {
- for (var b = new Float32Array(a.length), c = 0;c < b.length;c++) {
- b[c] = (a[c] - 128) / 128;
- }
- this.currentSample += b.length / this.channels;
- return {streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
- }
- function l(a) {
- for (var b = new Float32Array(a.length / 2), c = 0, d = 0;c < b.length;c++, d += 2) {
- b[c] = (a[d] << 24 | a[d + 1] << 16) / 2147483648;
- }
- this.currentSample += b.length / this.channels;
- return {streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
- }
- function d(a) {
- for (var b = new Float32Array(a.length / 2), c = 0, d = 0;c < b.length;c++, d += 2) {
- b[c] = (a[d + 1] << 24 | a[d] << 16) / 2147483648;
- }
- this.currentSample += b.length / this.channels;
- return {streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
- }
- function a(a) {
- var b = a[1] << 8 | a[0], c = a[3] << 8 | a[2];
- this.currentSample += b;
- return {streamId:this.streamId, samplesCount:b, data:new Uint8Array(a.subarray(4)), seek:c};
- }
- var c = [5512, 11250, 22500, 44100], f = 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]);
- b.defineSound = function(a) {
- var b = 1 == a.soundType ? 2 : 1, d = a.samplesCount, f = c[a.soundRate], k = a.soundData, q, r;
- switch(a.soundFormat) {
- case 0:
- q = new Float32Array(d * b);
- if (1 == a.soundSize) {
- for (r = d = 0;d < q.length;d++, r += 2) {
- q[d] = (k[r] << 24 | k[r + 1] << 16) / 2147483648;
- }
- r = n(k, f, b, 16, !0);
- } else {
- for (d = 0;d < q.length;d++) {
- q[d] = (k[d] - 128) / 128;
- }
- r = n(k, f, b, 8, !1);
- }
- break;
- case 3:
- q = new Float32Array(d * b);
- if (1 == a.soundSize) {
- for (r = d = 0;d < q.length;d++, r += 2) {
- q[d] = (k[r + 1] << 24 | k[r] << 16) / 2147483648;
- }
- r = n(k, f, b, 16, !1);
- } else {
- for (d = 0;d < q.length;d++) {
- q[d] = (k[d] - 128) / 128;
- }
- r = n(k, f, b, 8, !1);
- }
- break;
- case 2:
- r = {data:new Uint8Array(k.subarray(2)), mimeType:"audio/mpeg"};
- break;
- case 1:
- r = new Int16Array(d * b);
- t(k, r, b);
- q = new Float32Array(d * b);
- for (d = 0;d < q.length;d++) {
- q[d] = r[d] / 32768;
- }
- r = n(new Uint8Array(r.buffer), f, b, 16, !(new Uint8Array((new Uint16Array([1])).buffer))[0]);
- break;
- default:
- e.Debug.warning("Unsupported audio format: " + a.soundFormat);
- }
- a = {type:"sound", id:a.id, sampleRate:f, channels:b, pcm:q, packaged:null};
- r && (a.packaged = r);
- return a;
- };
- var k = [[-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]], r = [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], u = 0, q = function() {
- function b(a, c, d) {
- this.streamId = u++;
- this.samplesCount = a;
- this.sampleRate = c;
- this.channels = d;
- this.format = null;
- this.currentSample = 0;
- }
- b.FromTag = function(f) {
- var k = new b(f.samplesCount, c[f.streamRate], 1 == f.streamType ? 2 : 1);
- switch(f.streamCompression) {
- case 0:
- ;
- case 3:
- k.format = "wave";
- k.decode = 1 == f.soundSize ? 0 === f.streamCompression ? l : d : m;
- break;
- case 2:
- k.format = "mp3";
- k.decode = a;
- break;
- default:
- return e.Debug.warning("Unsupported audio stream format: " + f.streamCompression), null;
- }
- return k;
- };
- return b;
- }();
- b.SoundStream = q;
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- b.defineText = function(b) {
- return {type:"text", id:b.id, fillBounds:b.bbox, variableName:b.variableName, tag:b, bold:!1, italic:!1};
- };
- })(b.Parser || (b.Parser = {}));
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- b.timelineBuffer = new e.Tools.Profiler.TimelineBuffer("Parser");
- b.enterTimeline = function(b, e) {
- };
- b.leaveTimeline = function(b) {
- };
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-var Shumway$$inline_396 = Shumway || (Shumway = {}), SWF$$inline_397 = Shumway$$inline_396.SWF || (Shumway$$inline_396.SWF = {}), Option$$inline_398 = Shumway$$inline_396.Options.Option;
-SWF$$inline_397.parserOptions = Shumway$$inline_396.Settings.shumwayOptions.register(new Shumway$$inline_396.Options.OptionSet("Parser Options"));
-SWF$$inline_397.traceLevel = SWF$$inline_397.parserOptions.register(new Option$$inline_398("parsertracelevel", "Parser Trace Level", "number", 0, "Parser Trace Level"));
-(function(e) {
- (function(b) {
- b.StreamNoDataError = {};
- for (var h = new Uint32Array(33), n = 1, t = 0;32 >= n;++n) {
- h[n] = t = t << 1 | 1;
- }
- n = function() {
- function m(b, d, a, c) {
- void 0 === d && (d = 0);
- b.buffer instanceof ArrayBuffer && (d += b.byteOffset, b = b.buffer);
- void 0 === a && (a = b.byteLength - d);
- void 0 === c && (c = a);
- this.bytes = new Uint8Array(b, d, c);
- this.view = new DataView(b, d, c);
- this.pos = 0;
- this.end = a;
- this.bitLength = this.bitBuffer = 0;
- }
- m.prototype.align = function() {
- this.bitBuffer = this.bitLength = 0;
- };
- m.prototype.ensure = function(l) {
- if (this.pos + l > this.end) {
- throw b.StreamNoDataError;
- }
- };
- m.prototype.remaining = function() {
- return this.end - this.pos;
- };
- m.prototype.substream = function(b, d) {
- var a = new m(this.bytes);
- a.pos = b;
- a.end = d;
- return a;
- };
- m.prototype.push = function(b) {
- var d = this.bytes, a = this.end + b.length;
- if (a > d.length) {
- throw "stream buffer overfow";
- }
- d.set(b, this.end);
- this.end = a;
- };
- m.prototype.readSi8 = function() {
- return this.view.getInt8(this.pos++);
- };
- m.prototype.readSi16 = function() {
- var b = this.view.getInt16(this.pos, !0);
- this.pos += 2;
- return b;
- };
- m.prototype.readSi32 = function() {
- var b = this.view.getInt32(this.pos, !0);
- this.pos += 4;
- return b;
- };
- m.prototype.readUi8 = function() {
- return this.bytes[this.pos++];
- };
- m.prototype.readUi16 = function() {
- var b = this.view.getUint16(this.pos, !0);
- this.pos += 2;
- return b;
- };
- m.prototype.readUi32 = function() {
- var b = this.view.getUint32(this.pos, !0);
- this.pos += 4;
- return b;
- };
- m.prototype.readFixed = function() {
- var b = this.view.getInt32(this.pos, !0) / 65536;
- this.pos += 4;
- return b;
- };
- m.prototype.readFixed8 = function() {
- var b = this.view.getInt16(this.pos, !0) / 256;
- this.pos += 2;
- return b;
- };
- m.prototype.readFloat16 = function() {
- var b = this.view.getUint16(this.pos);
- this.pos += 2;
- var d = b >> 15 ? -1 : 1, a = (b & 31744) >> 10, b = b & 1023;
- return a ? 31 === a ? b ? NaN : Infinity * d : d * Math.pow(2, a - 15) * (1 + b / 1024) : d * Math.pow(2, -14) * (b / 1024);
- };
- m.prototype.readFloat = function() {
- var b = this.view.getFloat32(this.pos, !0);
- this.pos += 4;
- return b;
- };
- m.prototype.readDouble = function() {
- var b = this.view.getFloat64(this.pos, !0);
- this.pos += 8;
- return b;
- };
- m.prototype.readEncodedU32 = function() {
- var b = this.bytes, d = b[this.pos++];
- if (!(d & 128)) {
- return d;
- }
- d = d & 127 | b[this.pos++] << 7;
- if (!(d & 16384)) {
- return d;
- }
- d = d & 16383 | b[this.pos++] << 14;
- if (!(d & 2097152)) {
- return d;
- }
- d = d & 2097151 | b[this.pos++] << 21;
- return d & 268435456 ? d & 268435455 | b[this.pos++] << 28 : d;
- };
- m.prototype.readBool = function() {
- return !!this.bytes[this.pos++];
- };
- m.prototype.readSb = function(b) {
- return this.readUb(b) << 32 - b >> 32 - b;
- };
- m.prototype.readUb = function(b) {
- for (var d = this.bitBuffer, a = this.bitLength, c = 0;b > a;) {
- 24 < a && (b -= a, c = d << b, a = 0), d = d << 8 | this.bytes[this.pos++], a += 8;
- }
- a -= b;
- c |= d >>> a & h[b];
- this.bitBuffer = d;
- this.bitLength = a;
- return c;
- };
- m.prototype.readFb = function(b) {
- return this.readSb(b) / 65536;
- };
- m.prototype.readString = function(b) {
- var d = this.bytes, a = this.pos;
- if (-1 < b) {
- b = d.subarray(a, a += b);
- } else {
- b = 0;
- for (var c = a;d[c];c++) {
- b++;
- }
- b = d.subarray(a, a += b);
- a++;
- }
- this.pos = a;
- a = e.StringUtilities.utf8encode(b);
- 0 <= a.indexOf("\x00") && (a = a.split("\x00").join(""));
- return a;
- };
- return m;
- }();
- b.Stream = n;
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h() {
- n || (n = new Worker(b.MP3WORKER_PATH), n.addEventListener("message", function(b) {
- "console" === b.data.action && console[b.data.method].call(console, b.data.message);
- }));
- return n;
- }
- b.MP3WORKER_PATH = "../../lib/mp3/mp3worker.js";
- var n = null, t = 0, m = function() {
- function b() {
- this._sessionId = t++;
- this._onworkermessageBound = this.onworkermessage.bind(this);
- this._worker = h();
- this._worker.addEventListener("message", this._onworkermessageBound, !1);
- this._worker.postMessage({sessionId:this._sessionId, action:"create"});
- }
- b.prototype.onworkermessage = function(b) {
- if (b.data.sessionId === this._sessionId) {
- switch(b.data.action) {
- case "closed":
- if (this.onclosed) {
- this.onclosed();
- }
- this._worker.removeEventListener("message", this._onworkermessageBound, !1);
- this._worker = null;
- break;
- case "frame":
- this.onframedata(b.data.frameData, b.data.channels, b.data.sampleRate, b.data.bitRate);
- break;
- case "id3":
- if (this.onid3tag) {
- this.onid3tag(b.data.id3Data);
- }
- break;
- case "error":
- if (this.onerror) {
- this.onerror(b.data.message);
- }
- ;
- }
- }
- };
- b.prototype.pushAsync = function(b) {
- this._worker.postMessage({sessionId:this._sessionId, action:"decode", data:b});
- };
- b.prototype.close = function() {
- this._worker.postMessage({sessionId:this._sessionId, action:"close"});
- };
- b.processAll = function(d) {
- var a = 8E3, c = new Float32Array(a), f = 0, k = [], r = !1, u = new e.PromiseWrapper, q = new b;
- q.onframedata = function(b, d, k, q) {
- d = b.length + f;
- if (d > a) {
- do {
- a *= 2;
- } while (d > a);
- d = new Float32Array(a);
- d.set(c);
- c = d;
- }
- c.set(b, f);
- f += b.length;
- };
- q.onid3tag = function(a) {
- k.push(a);
- };
- q.onclosed = function() {
- r || u.resolve({data:c.subarray(0, f), id3Tags:k});
- };
- q.onerror = function(a) {
- r || (r = !0, u.reject(a));
- };
- q.pushAsync(d);
- q.close();
- return u.promise;
- };
- return b;
- }();
- b.MP3DecoderSession = m;
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- function h(a, b) {
- return a && b ? "boldItalic" : a ? "bold" : b ? "italic" : "regular";
- }
- function n(a, b) {
- switch(a.code) {
- case 6:
- ;
- case 21:
- ;
- case 35:
- ;
- case 90:
- return e.SWF.Parser.defineImage(a);
- case 20:
- ;
- case 36:
- return e.SWF.Parser.defineBitmap(a);
- case 7:
- ;
- case 34:
- return e.SWF.Parser.defineButton(a, b);
- case 37:
- return e.SWF.Parser.defineText(a);
- case 10:
- ;
- case 48:
- ;
- case 75:
- ;
- case 91:
- return e.SWF.Parser.defineFont(a);
- case 46:
- ;
- case 84:
- ;
- case 2:
- ;
- case 22:
- ;
- case 32:
- ;
- case 83:
- return e.SWF.Parser.defineShape(a);
- case 14:
- return e.SWF.Parser.defineSound(a);
- case 60:
- return {type:"video", id:a.id, width:a.width, height:a.height, deblocking:a.deblocking, smoothing:a.smoothing, codec:a.codecId};
- case 39:
- return a;
- case 87:
- return {type:"binary", id:a.id, data:a.data};
- case 11:
- ;
- case 33:
- return e.SWF.Parser.defineLabel(a);
- default:
- return a;
- }
- }
- var t = e.SWF.Parser, m = b.Stream, l = e.ArrayUtilities.Inflate, d = e.ArrayUtilities.LzmaDecoder, a = t.SwfTagCode, c = t.DefinitionTags, f = t.ImageDefinitionTags, k = t.FontDefinitionTags, r = t.ControlTags;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Deflate = 1] = "Deflate";
- a[a.LZMA = 2] = "LZMA";
- })(b.CompressionMethod || (b.CompressionMethod = {}));
- var u = function() {
- function u(a, b, c) {
- this.env = c;
- this.swfVersion = this.compression = 0;
- this.useAVM1 = !0;
- this.backgroundColor = 4294967295;
- this.bounds = null;
- this.frameCount = this.frameRate = 0;
- this.sceneAndFrameLabelData = this.attributes = null;
- this.bytesLoaded = 0;
- this.bytesTotal = b;
- this.framesLoaded = this.pendingUpdateDelays = 0;
- this.frames = [];
- this.abcBlocks = [];
- this.dictionary = [];
- this.fonts = [];
- this.symbolClassesMap = [];
- this.symbolClassesList = [];
- this.eagerlyParsedSymbolsMap = [];
- this.eagerlyParsedSymbolsList = [];
- this._currentExports = this._currentInitActionBlocks = this._currentActionBlocks = this._currentControlTags = this._currentSoundStreamBlock = this._currentSoundStreamHead = this._currentFrameLabel = this._jpegTables = null;
- this._endTagEncountered = !1;
- this.readHeaderAndInitialize(a);
- }
- u.prototype.appendLoadedData = function(a) {
- this.bytesLoaded += a.length;
- this._endTagEncountered || (0 !== this.compression ? this._decompressor.push(a) : this.processDecompressedData(a), this.scanLoadedData());
- };
- u.prototype.finishLoading = function() {
- 0 !== this.compression && (this._decompressor.close(), this._decompressor = null, this.scanLoadedData());
- };
- u.prototype.getSymbol = function(a) {
- if (this.eagerlyParsedSymbolsMap[a]) {
- return this.eagerlyParsedSymbolsMap[a];
- }
- var b = this.dictionary[a];
- if (!b) {
- return null;
- }
- b = 39 === b.tagCode ? this.parseSpriteTimeline(b) : this.getParsedTag(b);
- b.className = this.symbolClassesMap[a] || null;
- b.env = this.env;
- return b;
- };
- u.prototype.getParsedTag = function(c) {
- b.enterTimeline("Parse tag " + a[c.tagCode]);
- this._dataStream.align();
- this._dataStream.pos = c.byteOffset;
- var d = t.LowLevel.tagHandlers[c.tagCode], g = Math.min(c.byteOffset + c.byteLength, this._dataStream.end), d = d(this._dataStream, this.swfVersion, c.tagCode, g, this._jpegTables);
- this._dataStream.pos !== g && this.emitTagSlopWarning(c, g);
- c = n(d, this.dictionary);
- b.leaveTimeline();
- return c;
- };
- u.prototype.readHeaderAndInitialize = function(a) {
- b.enterTimeline("Initialize SWFFile");
- var c = 67 === a[0], g = 90 === a[0];
- c ? this.compression = 1 : g && (this.compression = 2);
- this.swfVersion = a[3];
- this._loadStarted = Date.now();
- this._uncompressedLength = (a[4] | a[5] << 8 | a[6] << 16 | a[7] << 24) >>> 0;
- this.bytesLoaded = a.length;
- this.data = new Uint8Array(0 === this.compression ? this.bytesTotal : this._uncompressedLength);
- this._dataStream = new m(this.data.buffer);
- this._dataStream.pos = 8;
- this._dataView = this._dataStream.view;
- c ? (this.data.set(a.subarray(0, 8)), this._uncompressedLoadedLength = 8, this._decompressor = l.create(!0), this._decompressor.onData = this.processFirstBatchOfDecompressedData.bind(this), this._decompressor.onError = function(a) {
- throw Error(a);
- }, this._decompressor.push(a.subarray(8))) : g ? (this.data.set(a.subarray(0, 8)), this._uncompressedLoadedLength = 8, this._decompressor = new d(!0), this._decompressor.onData = this.processFirstBatchOfDecompressedData.bind(this), this._decompressor.onError = function(a) {
- e.Debug.warning("Invalid LZMA stream: " + a);
- }, this._decompressor.push(a)) : (this.data.set(a), this._uncompressedLoadedLength = a.length, this._decompressor = null, this.parseHeaderContents());
- b.leaveTimeline();
- this._lastScanPosition = this._dataStream.pos;
- this.scanLoadedData();
- };
- u.prototype.parseHeaderContents = function() {
- var a = t.LowLevel.parseHeader(this._dataStream);
- this.bounds = a.bounds;
- this.frameRate = a.frameRate;
- this.frameCount = a.frameCount;
- };
- u.prototype.processFirstBatchOfDecompressedData = function(a) {
- this.processDecompressedData(a);
- this.parseHeaderContents();
- this._decompressor.onData = this.processDecompressedData.bind(this);
- };
- u.prototype.processDecompressedData = function(a) {
- var b = Math.min(a.length, this._uncompressedLength - this._uncompressedLoadedLength);
- e.ArrayUtilities.memCopy(this.data, a, this._uncompressedLoadedLength, 0, b);
- this._uncompressedLoadedLength += b;
- };
- u.prototype.scanLoadedData = function() {
- b.enterTimeline("Scan loaded SWF file tags");
- this._dataStream.pos = this._lastScanPosition;
- this.scanTagsToOffset(this._uncompressedLoadedLength, !0);
- this._lastScanPosition = this._dataStream.pos;
- b.leaveTimeline();
- };
- u.prototype.scanTagsToOffset = function(a, b) {
- for (var c = new v(0, 0, 0), d;(d = this._dataStream.pos) < a - 1 && this.parseNextTagHeader(c);) {
- if (0 === c.tagCode) {
- b && (this._endTagEncountered = !0);
- break;
- }
- var g = c.byteOffset + c.byteLength;
- if (g > a) {
- this._dataStream.pos = d;
- break;
- }
- this.scanTag(c, b);
- this._dataStream.pos !== g && this.emitTagSlopWarning(c, g);
- }
- };
- u.prototype.parseNextTagHeader = function(a) {
- var b = this._dataStream.pos, c = this._dataView.getUint16(b, !0), b = b + 2;
- a.tagCode = c >> 6;
- c &= 63;
- if (63 === c) {
- if (b + 4 > this._uncompressedLoadedLength) {
- return !1;
- }
- c = this._dataView.getUint32(b, !0);
- b += 4;
- }
- this._dataStream.pos = b;
- a.byteOffset = b;
- a.byteLength = c;
- return !0;
- };
- u.prototype.scanTag = function(b, d) {
- var q = this._dataStream, u = q.pos, v = b.tagCode, l = b.byteLength;
- if (39 === v) {
- this.addLazySymbol(v, u, l), l = u + l, q.pos += 4, this.scanTagsToOffset(l, !1), this._dataStream.pos !== l && this.emitTagSlopWarning(b, l);
- } else {
- if (f[v]) {
- q = this.addLazySymbol(v, u, l), this.decodeEmbeddedImage(q);
- } else {
- if (k[v]) {
- q = this.addLazySymbol(v, u, l), this.registerEmbeddedFont(q);
- } else {
- if (c[v]) {
- this.addLazySymbol(v, u, l), this.jumpToNextTag(l);
- } else {
- if (d || 76 === v || 56 === v) {
- if (r[v]) {
- this.addControlTag(v, u, l);
- } else {
- switch(v) {
- case 69:
- this.setFileAttributes(l);
- break;
- case 86:
- this.setSceneAndFrameLabelData(l);
- break;
- case 9:
- this.backgroundColor = t.LowLevel.parseRgb(this._dataStream);
- break;
- case 8:
- this._jpegTables || (this._jpegTables = 0 === l ? new Uint8Array(0) : this.data.subarray(q.pos, q.pos + l - 2));
- this.jumpToNextTag(l);
- break;
- case 82:
- ;
- case 72:
- this.useAVM1 ? this.jumpToNextTag(l) : (l = u + l, u = new g, 82 === v ? (u.flags = q.readUi32(), u.name = q.readString(-1)) : (u.flags = 0, u.name = ""), u.data = this.data.subarray(q.pos, l), this.abcBlocks.push(u), q.pos = l);
- break;
- case 76:
- l = u + l;
- for (v = q.readUi16();v--;) {
- var u = q.readUi16(), h = q.readString(-1);
- this.symbolClassesMap[u] = h;
- this.symbolClassesList.push({id:u, className:h});
- }
- q.pos = l;
- break;
- case 59:
- this.useAVM1 && (v = this._currentInitActionBlocks || (this._currentInitActionBlocks = []), q = this._dataView.getUint16(q.pos, !0), u = this.data.subarray(u + 2, u + l), v.push({spriteId:q, actionsData:u}));
- this.jumpToNextTag(l);
- break;
- case 12:
- this.useAVM1 && (v = this._currentActionBlocks || (this._currentActionBlocks = []), u = this.data.subarray(q.pos, q.pos + l), v.push({actionsData:u, precedence:q.pos}));
- this.jumpToNextTag(l);
- break;
- case 18:
- ;
- case 45:
- q = t.LowLevel.parseSoundStreamHeadTag(this._dataStream, u + l);
- this._currentSoundStreamHead = t.SoundStream.FromTag(q);
- break;
- case 19:
- this._currentSoundStreamBlock = this.data.subarray(q.pos, q.pos += l);
- break;
- case 43:
- l = q.pos + l;
- this._currentFrameLabel = q.readString(-1);
- q.pos = l;
- break;
- case 1:
- this.finishFrame();
- break;
- case 0:
- break;
- case 56:
- l = q.pos + l;
- v = q.readUi16();
- for (h = this._currentExports || (this._currentExports = []);v--;) {
- var u = q.readUi16(), z = q.readString(-1);
- if (q.pos > l) {
- q.pos = l;
- break;
- }
- h.push(new p(u, z));
- }
- q.pos = l;
- break;
- case 23:
- ;
- case 17:
- ;
- case 13:
- ;
- case 62:
- ;
- case 78:
- ;
- case 57:
- ;
- case 71:
- e.Debug.warning("Unsupported tag encountered " + v + ": " + a[v]);
- this.jumpToNextTag(l);
- break;
- case 74:
- ;
- case 73:
- ;
- case 65:
- ;
- case 66:
- ;
- case 58:
- ;
- case 64:
- ;
- case 63:
- ;
- case 88:
- ;
- case 40:
- ;
- case 41:
- ;
- case 77:
- ;
- case 24:
- ;
- case 25:
- ;
- case 93:
- ;
- case 55:
- ;
- case 49:
- this.jumpToNextTag(l);
- break;
- case 51:
- ;
- case 44:
- ;
- case 50:
- ;
- case 53:
- ;
- case 42:
- ;
- case 38:
- ;
- case 52:
- ;
- case 3:
- ;
- case 31:
- ;
- case 47:
- ;
- case 16:
- ;
- case 29:
- console.info("Ignored tag (these shouldn't occur) " + v + ": " + a[v]);
- this.jumpToNextTag(l);
- break;
- default:
- 100 < v ? e.Debug.warning("Encountered undefined tag " + v + ", probably used for AVM1 obfuscation. See http://ijs.mtasa.com/files/swfdecrypt.cpp.") : e.Debug.warning("Tag not handled by the parser: " + v + ": " + a[v]), this.jumpToNextTag(l);
- }
- }
- } else {
- this.jumpToNextTag(l);
- }
- }
- }
- }
- }
- };
- u.prototype.parseSpriteTimeline = function(a) {
- b.enterTimeline("parseSpriteTimeline");
- var c = this.data, d = this._dataStream, g = this._dataView, f = {id:a.id, type:"sprite", frames:[]}, p = a.byteOffset + a.byteLength, k = f.frames, u = null, r = [], l = null, h = null, z = null, m = null;
- d.pos = a.byteOffset + 2;
- f.frameCount = g.getUint16(d.pos, !0);
- d.pos += 2;
- for (a = new v(0, 0, 0);d.pos < p;) {
- this.parseNextTagHeader(a);
- var n = a.byteLength, B = a.tagCode;
- if (d.pos + n > p) {
- e.Debug.warning("DefineSprite child tags exceed DefineSprite tag length and are dropped");
- break;
- }
- if (t.ControlTags[B]) {
- r.push(new v(B, d.pos, n));
- } else {
- switch(B) {
- case 12:
- this.useAVM1 && (z || (z = []), B = c.subarray(d.pos, d.pos + n), z.push({actionsData:B, precedence:d.pos}));
- break;
- case 59:
- if (this.useAVM1) {
- m || (m = []);
- var E = g.getUint16(d.pos, !0);
- d.pos += 2;
- B = c.subarray(d.pos, d.pos + n);
- m.push({spriteId:E, actionsData:B});
- }
- break;
- case 43:
- n = d.pos + n;
- u = d.readString(-1);
- d.pos = n;
- n = 0;
- break;
- case 1:
- k.push(new q(r, u, l, h, z, m, null));
- u = null;
- r = [];
- m = z = h = l = null;
- break;
- case 0:
- d.pos = p, n = 0;
- }
- }
- d.pos += n;
- }
- b.leaveTimeline();
- return f;
- };
- u.prototype.jumpToNextTag = function(a) {
- this._dataStream.pos += a;
- };
- u.prototype.emitTagSlopWarning = function(b, c) {
- var d = this._dataStream.pos - b.byteOffset;
- e.Debug.warning("Scanning " + a[b.tagCode] + " at offset " + b.byteOffset + " consumed " + d + " of " + b.byteLength + " bytes. (" + (b.byteLength - d) + " left)");
- this._dataStream.pos = c;
- };
- u.prototype.finishFrame = function() {
- 0 === this.pendingUpdateDelays && this.framesLoaded++;
- this.frames.push(new q(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;
- };
- u.prototype.setFileAttributes = function(a) {
- this.attributes && this.jumpToNextTag(a);
- a = this.data[this._dataStream.pos];
- this._dataStream.pos += 4;
- this.attributes = {network:a & 1, relativeUrls:a & 2, noCrossDomainCaching:a & 4, doAbc:a & 8, hasMetadata:a & 16, useGpu:a & 32, useDirectBlit:a & 64};
- this.useAVM1 = !this.attributes.doAbc;
- };
- u.prototype.setSceneAndFrameLabelData = function(a) {
- this.sceneAndFrameLabelData ? this.jumpToNextTag(a) : this.sceneAndFrameLabelData = t.LowLevel.parseDefineSceneTag(this._dataStream, 86);
- };
- u.prototype.addControlTag = function(a, b, c) {
- (this._currentControlTags || (this._currentControlTags = [])).push(new v(a, b, c));
- this.jumpToNextTag(c);
- };
- u.prototype.addLazySymbol = function(a, b, c) {
- var d = this._dataView.getUint16(this._dataStream.pos, !0);
- a = new z(d, a, b, c);
- return this.dictionary[d] = a;
- };
- u.prototype.decodeEmbeddedFont = function(a) {
- var b = this.getParsedTag(a);
- a = new B(b.id, a, "font", b, this.env);
- this.eagerlyParsedSymbolsMap[a.id] = a;
- this.eagerlyParsedSymbolsList.push(a);
- a = h(b.bold, b.italic);
- this.fonts.push({name:b.name, id:b.id, style:a});
- };
- u.prototype.registerEmbeddedFont = function(a) {
- if (inFirefox) {
- var b = this._dataStream, c = this._dataView.getUint16(b.pos, !0), d, g;
- 10 === a.tagCode ? (g = "__autofont__" + a.byteOffset, d = "regular") : (d = this.data[b.pos + 2], d = h(!!(d & 1), !!(d & 2)), g = this.data[b.pos + 4], b.pos += 5, g = b.readString(g));
- this.fonts.push({name:g, id:c, style:d});
- b.pos = a.byteOffset + a.byteLength;
- } else {
- this.decodeEmbeddedFont(a);
- }
- };
- u.prototype.decodeEmbeddedImage = function(a) {
- var b = this.getParsedTag(a);
- a = new B(b.id, a, "image", b, this.env);
- this.eagerlyParsedSymbolsMap[a.id] = a;
- this.eagerlyParsedSymbolsList.push(a);
- };
- return u;
- }();
- b.SWFFile = u;
- var q = function() {
- return function(a, b, c, d, g, f, p) {
- this.controlTags = a;
- this.labelName = b;
- this.soundStreamHead = c;
- this.soundStreamBlock = d;
- this.actionBlocks = g;
- this.initActionBlocks = f;
- this.exports = p;
- };
- }();
- b.SWFFrame = q;
- var g = function() {
- return function() {
- };
- }();
- b.ABCBlock = g;
- u = function() {
- return function() {
- };
- }();
- b.ActionBlock = u;
- u = function() {
- return function() {
- };
- }();
- b.InitActionBlock = u;
- var p = function() {
- return function(a, b) {
- this.symbolId = a;
- this.className = b;
- };
- }();
- b.SymbolExport = p;
- var v = function() {
- return function(a, b, c) {
- this.tagCode = a;
- this.byteOffset = b;
- this.byteLength = c;
- };
- }();
- b.UnparsedTag = v;
- var z = function(a) {
- function b(c, d, g, f) {
- a.call(this, d, g, f);
- this.id = c;
- }
- __extends(b, a);
- return b;
- }(v);
- b.DictionaryEntry = z;
- var B = function(a) {
- function b(c, d, g, f, p) {
- a.call(this, c, d.tagCode, d.byteOffset, d.byteLength);
- this.type = g;
- this.definition = f;
- this.env = p;
- this.ready = !1;
- }
- __extends(b, a);
- return b;
- }(z);
- b.EagerlyParsedDictionaryEntry = B;
- })(e.SWF || (e.SWF = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b;
- (function(b) {
- b[b.JPG = 16767231] = "JPG";
- b[b.PNG = 8998990] = "PNG";
- b[b.GIF = 4671814] = "GIF";
- })(b || (b = {}));
- var h = {16767231:"image/jpeg", 8998990:"image/png", 4671814:"image/gif"};
- b = function() {
- function b(h, e, l) {
- this.type = 4;
- this.env = l;
- this.bytesLoaded = h.length;
- h.length === e ? this.data = h : (this.data = new Uint8Array(e), this.data.set(h));
- this.setMimetype();
- }
- Object.defineProperty(b.prototype, "bytesTotal", {get:function() {
- return this.data.length;
- }, enumerable:!0, configurable:!0});
- b.prototype.appendLoadedData = function(b) {
- this.data.set(b, this.bytesLoaded);
- this.bytesLoaded += b.length;
- };
- b.prototype.setMimetype = function() {
- this.mimeType = h[this.data[0] << 16 | this.data[1] << 8 | this.data[2]];
- };
- return b;
- }();
- e.ImageFile = b;
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = e.SWF.SWFFile, h = function() {
- return function(b, l) {
- this.bytesLoaded = b;
- this.framesLoaded = l;
- };
- }();
- e.LoadProgressUpdate = h;
- var n = function() {
- function m(b, d) {
- this._file = null;
- this._url = "";
- this._listener = b;
- this._env = d;
- this._delayedUpdatesPromise = this._loadingServiceSession = null;
- this._bytesLoaded = 0;
- }
- m.prototype.loadFile = function(b) {
- this._url = b.url;
- e.SWF.enterTimeline("Load file", b.url);
- this._bytesLoaded = 0;
- var d = this._loadingServiceSession = e.FileLoadingService.instance.createSession();
- d.onopen = this.processLoadOpen.bind(this);
- d.onprogress = this.processNewData.bind(this);
- d.onerror = this.processError.bind(this);
- d.onclose = this.processLoadClose.bind(this);
- d.open(b);
- };
- m.prototype.abortLoad = function() {
- this._loadingServiceSession && (this._loadingServiceSession.close(), e.SWF.leaveTimeline());
- this._file = null;
- };
- m.prototype.loadBytes = function(b) {
- e.SWF.enterTimeline("Load bytes");
- this.processNewData(b, {bytesLoaded:b.length, bytesTotal:b.length});
- this.processLoadClose();
- };
- m.prototype.processLoadOpen = function() {
- };
- m.prototype.processNewData = function(l, d) {
- this._bytesLoaded += l.length;
- var a = d.bytesLoaded < d.bytesTotal;
- if (8192 > this._bytesLoaded && a) {
- this._queuedInitialData || (this._queuedInitialData = new Uint8Array(Math.min(8192, d.bytesTotal))), this._queuedInitialData.set(l, this._bytesLoaded - l.length);
- } else {
- this._queuedInitialData && (a = new Uint8Array(this._bytesLoaded), a.set(this._queuedInitialData), a.set(l, this._bytesLoaded - l.length), l = a, this._queuedInitialData = null);
- var c = this._file, f = a = 0;
- if (c) {
- c instanceof b && (a = c.eagerlyParsedSymbolsList.length, f = c.framesLoaded), c.appendLoadedData(l);
- } else {
- var c = l, k = d.bytesTotal, r = this._env, u = c[0] << 16 | c[1] << 8 | c[2], c = 22355 === (u & 65535) ? new b(c, k, r) : 16767231 === u || 8998990 === u || 4671814 === u ? new e.ImageFile(c, k, r) : null;
- if (c = this._file = c) {
- this._listener.onLoadOpen(c);
- }
- }
- if (c instanceof b) {
- this.processSWFFileUpdate(c, a, f);
- } else {
- if (this._listener.onLoadProgress(new h(d.bytesLoaded, -1)), d.bytesLoaded === d.bytesTotal) {
- this._listener.onImageBytesLoaded();
- }
- }
- }
- };
- m.prototype.processError = function(b) {
- e.Debug.warning("Loading error encountered:", b);
- };
- m.prototype.processLoadClose = function() {
- var l = this._file;
- if (l) {
- if (l instanceof b) {
- var d = l.eagerlyParsedSymbolsList.length, a = l.framesLoaded;
- l.finishLoading();
- this.processSWFFileUpdate(l, d, a);
- }
- l.bytesLoaded !== l.bytesTotal ? (e.Debug.warning("Shouldn't have reached this: aborting a load should prevent this from being called."), e.Debug.warning(Error().stack)) : e.SWF.leaveTimeline();
- } else {
- this._listener.onLoadOpen(null);
- }
- };
- m.prototype.processSWFFileUpdate = function(b, d, a) {
- var c;
- if (d = b.eagerlyParsedSymbolsList.length - d) {
- c = this._listener.onNewEagerlyParsedSymbols(b.eagerlyParsedSymbolsList, d);
- this._delayedUpdatesPromise && (c = Promise.all([this._delayedUpdatesPromise, c]));
- this._delayedUpdatesPromise = c;
- this._lastDelayedUpdate = k = new h(b.bytesLoaded, b.frames.length);
- b.pendingUpdateDelays++;
- var f = this;
- b.framesLoaded = a;
- c.then(function() {
- b.pendingUpdateDelays--;
- b.framesLoaded = k.framesLoaded;
- f._listener.onLoadProgress(k);
- f._delayedUpdatesPromise === c && (f._delayedUpdatesPromise = null, f._lastDelayedUpdate = null);
- });
- } else {
- var k = this._lastDelayedUpdate;
- if (k) {
- k.bytesLoaded = b.bytesLoaded, k.framesLoaded = b.frames.length;
- } else {
- this._listener.onLoadProgress(new h(b.bytesLoaded, b.framesLoaded));
- }
- }
- };
- return m;
- }();
- e.FileLoader = n;
- var t;
- (function(b) {
- b[b.SWF = 22355] = "SWF";
- b[b.JPG = 16767231] = "JPG";
- b[b.PNG = 8998990] = "PNG";
- b[b.GIF = 4671814] = "GIF";
- })(t || (t = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load SWF Parser");
-console.time("Load Flash TS Dependencies");
-"use strict";
-(function(e) {
- function b(a) {
- var b = {};
- a = a.split(",");
- for (var c = 0;c < a.length;c++) {
- b[a[c]] = !0;
- }
- return b;
- }
- var h = /^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, n = /^<\/([-A-Za-z0-9_]+)[^>]*>/, t = /([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, m = b("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"), l = b("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"),
- d = b("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"), a = b("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), c = b("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), f = b("script,style");
- e.HTMLParser = function(b, r) {
- function u() {
- return e[e.length - 1];
- }
- function q(b, f, p, k) {
- f = f.toLowerCase();
- if (l[f]) {
- for (;u() && d[u()];) {
- g("", u());
- }
- }
- a[f] && u() == f && g("", f);
- (k = m[f] || !!k) || e.push(f);
- if (r.start) {
- var q = Object.create(null);
- p.replace(t, function(a, b, d, g, f) {
- b = b.toLowerCase();
- q[b] = d ? d : g ? g : f ? f : c[b] ? b : "";
- return a;
- });
- r.start && r.start(f, q, !!k);
- }
- }
- function g(a, b) {
- if (b) {
- for (c = e.length - 1;0 <= c && e[c] != b;c--) {
- }
- } else {
- var c = 0
- }
- if (0 <= c) {
- for (var d = e.length - 1;d >= c;d--) {
- r.end && r.end(e[d]);
- }
- e.length = c;
- }
- }
- for (var p, v, e = [], B = b;b;) {
- v = !0;
- if (u() && f[u()]) {
- b = b.replace(new RegExp("(.*)" + u() + "[^>]*>"), function(a, b) {
- b = b.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/ p ? b : b.substring(0, p), b = 0 > p ? "" : b.substring(p), r.chars && r.chars(v));
- }
- if (b == B) {
- throw "Parse Error: " + b;
- }
- B = b;
- }
- g();
- };
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = e.Debug.notImplemented, h = e.Debug.somewhatImplemented, n = e.Bounds, t = e.ArrayUtilities.DataBuffer, m = e.ColorUtilities, l = e.AVMX.AS.flash, d = e.NumberUtilities.altTieBreakRound;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.DirtyBounds = 1] = "DirtyBounds";
- a[a.DirtyContent = 2] = "DirtyContent";
- a[a.DirtyStyle = 4] = "DirtyStyle";
- a[a.DirtyFlow = 8] = "DirtyFlow";
- a[a.Dirty = a.DirtyBounds | a.DirtyContent | a.DirtyStyle | a.DirtyFlow] = "Dirty";
- })(e.TextContentFlags || (e.TextContentFlags = {}));
- var a = {lt:"<", gt:">", amp:"&", quot:'"', apos:"'", nbsp:"\u00a0"}, c = function() {
- function c(a, b) {
- this.sec = a;
- this._id = a.flash.display.DisplayObject.axClass.getNextSyncID();
- this._bounds = new n(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 = b || new a.flash.text.TextFormat;
- this.textRuns = [];
- this.textRunData = new t;
- this.coords = this.matrix = null;
- }
- c.prototype.parseHtml = function(c, d, f) {
- var q = this, g = "", p = this.textRuns, v = p.length = 0, z = 0, n = this.defaultTextFormat.clone(), t = null, A = [], G;
- e.HTMLParser(c, G = {chars:function(b) {
- for (var c = "", d = 0;d < b.length;d++) {
- var f = b.charAt(d);
- if ("&" !== f) {
- c += f;
- } else {
- if (f = e.StringUtilities.indexOfAny(b, ["&", ";"], d + 1), 0 < f) {
- d = b.substring(d + 1, f);
- if (1 < d.length && "#" === d.charAt(0)) {
- var k = 0, k = 2 < d.length && "x" === d.charAt(1) ? parseInt(d.substring(1)) : parseInt(d.substring(2), 16), c = c + String.fromCharCode(k)
- } else {
- void 0 !== a[d] ? c += a[d] : e.Debug.unexpected(d);
- }
- d = f;
- } else {
- for (var u in a) {
- if (b.indexOf(u, d + 1) === d + 1) {
- c += a[u];
- d += u.length;
- break;
- }
- }
- }
- }
- }
- b = c;
- g += b;
- z += b.length;
- z - v && (t && t.textFormat.equals(n) ? t.endIndex = z : (t = new q.sec.flash.text.TextRun(v, z, n), p.push(t)), v = z);
- }, start:function(a, c) {
- var p = !1;
- d && (p = d.hasStyle(a)) && (A.push(n), n = n.clone(), d.applyStyle(n, a));
- switch(a) {
- case "a":
- A.push(n);
- h("");
- var k = c.target || n.target, q = c.url || n.url;
- if (k !== n.target || q !== n.url) {
- p || (n = n.clone()), n.target = k, n.url = q;
- }
- break;
- case "b":
- A.push(n);
- n.bold || (p || (n = n.clone()), n.bold = !0);
- break;
- case "font":
- A.push(n);
- var k = m.isValidHexColor(c.color) ? m.hexToRGB(c.color) : n.color, q = c.face || n.font, v = isNaN(c.size) ? n.size : +c.size, e = isNaN(c.letterspacing) ? n.letterSpacing : +c.letterspacing, z = isNaN(c.kerning) ? n.kerning : +c.kerning;
- if (k !== n.color || q !== n.font || v !== n.size || e !== n.letterSpacing || z !== n.kerning) {
- p || (n = n.clone()), n.color = k, n.font = q, n.size = v, n.letterSpacing = e, n.kerning = z;
- }
- break;
- case "img":
- b("");
- break;
- case "i":
- A.push(n);
- n.italic || (p || (n = n.clone()), n.italic = !0);
- break;
- case "li":
- if (A.push(n), n.bullet || (p || (n = n.clone()), n.bullet = !0), "\r" === g[g.length - 1]) {
- break;
- }
- ;
- case "br":
- ;
- case "sbr":
- f && G.chars("\r");
- break;
- case "span":
- ;
- case "p":
- k = !1;
- A.push(n);
- d && c.class && (q = "." + c.class, k = d.hasStyle(q)) && (p || (n = n.clone()), d.applyStyle(n, q));
- if ("span" === a) {
- break;
- }
- q = c.align;
- -1 < l.text.TextFormatAlign.toNumber(q) && q !== n.align && (p || k || (n = n.clone()), n.align = q);
- break;
- case "textformat":
- A.push(n);
- k = isNaN(c.blockindent) ? n.blockIndent : +c.blockindent;
- q = isNaN(c.indent) ? n.indent : +c.indent;
- v = isNaN(c.leading) ? n.leading : +c.leading;
- e = isNaN(c.leftmargin) ? n.leftMargin : +c.leftmargin;
- z = isNaN(c.rightmargin) ? n.rightMargin : +c.rightmargin;
- if (k !== n.blockIndent || q !== n.indent || v !== n.leading || e !== n.leftMargin || z !== n.rightMargin) {
- p || (n = n.clone()), n.blockIndent = k, n.indent = q, n.leading = v, n.leftMargin = e, n.rightMargin = z;
- }
- break;
- case "u":
- A.push(n), n.underline || (p || (n = n.clone()), n.underline = !0);
- }
- }, end:function(a) {
- switch(a) {
- case "li":
- ;
- case "p":
- f && G.chars("\r");
- case "a":
- ;
- case "b":
- ;
- case "font":
- ;
- case "i":
- ;
- case "textformat":
- ;
- case "u":
- n = A.pop(), d && d.hasStyle(a) && (n = A.pop());
- }
- }});
- this._plainText = g;
- this._serializeTextRuns();
- };
- Object.defineProperty(c.prototype, "plainText", {get:function() {
- return this._plainText;
- }, set:function(a) {
- this._plainText = a.split("\n").join("\r");
- this.textRuns.length = 0;
- a && (a = new this.sec.flash.text.TextRun(0, a.length, this.defaultTextFormat), this.textRuns[0] = a);
- this._serializeTextRuns();
- }, enumerable:!0, configurable:!0});
- 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(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(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(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(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(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(c.prototype, "borderColor", {get:function() {
- return this._borderColor;
- }, set:function(a) {
- a !== this._borderColor && (this._borderColor = a, this.flags |= 4);
- }, enumerable:!0, configurable:!0});
- c.prototype._serializeTextRuns = function() {
- var a = this.textRuns;
- this.textRunData.clear();
- for (var b = 0;b < a.length;b++) {
- this._writeTextRun(a[b]);
- }
- this.flags |= 2;
- };
- c.prototype._writeTextRun = function(a) {
- var b = this.textRunData;
- b.writeInt(a.beginIndex);
- b.writeInt(a.endIndex);
- a = a.textFormat;
- var c = +a.size;
- b.writeInt(c);
- var f = this.sec.flash.text.Font.axClass, f = f.getByNameAndStyle(a.font, a.style) || f.getDefaultFont();
- f.fontType === l.text.FontType.EMBEDDED ? b.writeUTF("swffont" + f._id) : b.writeUTF(f._fontFamily);
- b.writeInt(d(f.ascent * c, !0));
- b.writeInt(d(f.descent * c, !1));
- b.writeInt(null === a.leading ? f.leading * c : +a.leading);
- var g = c = !1;
- f.fontType === l.text.FontType.DEVICE && (c = null === a.bold ? f.fontStyle === l.text.FontStyle.BOLD || f.fontType === l.text.FontStyle.BOLD_ITALIC : !!a.bold, g = null === a.italic ? f.fontStyle === l.text.FontStyle.ITALIC || f.fontType === l.text.FontStyle.BOLD_ITALIC : !!a.italic);
- b.writeBoolean(c);
- b.writeBoolean(g);
- b.writeInt(+a.color);
- b.writeInt(l.text.TextFormatAlign.toNumber(a.align));
- b.writeBoolean(!!a.bullet);
- b.writeInt(+a.indent);
- b.writeInt(+a.kerning);
- b.writeInt(+a.leftMargin);
- b.writeInt(+a.letterSpacing);
- b.writeInt(+a.rightMargin);
- b.writeBoolean(!!a.underline);
- };
- c.prototype.appendText = function(a, b) {
- b || (b = this.defaultTextFormat);
- var c = this._plainText, d = new this.sec.flash.text.TextRun(c.length, c.length + a.length, b);
- this._plainText = c + a;
- this.textRuns.push(d);
- this._writeTextRun(d);
- };
- c.prototype.prependText = function(a, b) {
- b || (b = this.defaultTextFormat);
- this._plainText = a + this._plainText;
- for (var c = this.textRuns, d = a.length, g = 0;g < c.length;g++) {
- var f = c[g];
- f.beginIndex += d;
- f.endIndex += d;
- }
- c.unshift(new this.sec.flash.text.TextRun(0, d, b));
- this._serializeTextRuns();
- };
- c.prototype.replaceText = function(a, b, c, d) {
- if (!(b < a) && c) {
- if (0 === b) {
- this.prependText(c, d);
- } else {
- var g = this._plainText;
- if (a >= g.length) {
- this.appendText(c, d);
- } else {
- var f = this.defaultTextFormat, v = f;
- d && (v = v.clone(), v.merge(d));
- if (0 >= a && b >= g.length) {
- d ? (this.defaultTextFormat = v, this.plainText = c, this.defaultTextFormat = f) : this.plainText = c;
- } else {
- for (var f = this.textRuns, l = [], h = a + c.length, e = h - b, m = 0;m < f.length;m++) {
- var n = f[m], t = m >= f.length - 1;
- if (a < n.endIndex) {
- if (!t && a <= n.beginIndex && h >= n.endIndex) {
- continue;
- }
- var y = n.containsIndex(a), t = n.containsIndex(b) || t && b >= n.endIndex;
- if (y && t) {
- if (d) {
- y = n.clone();
- y.endIndex = a;
- l.push(y);
- m--;
- n.beginIndex = a + 1;
- continue;
- }
- } else {
- y ? n.endIndex = a : t ? d ? (l.push(new this.sec.flash.text.TextRun(a, h, v)), n.beginIndex = h) : (n.beginIndex = a, n.endIndex += e) : (n.beginIndex += e, n.endIndex += e);
- }
- }
- n.endIndex > n.beginIndex && l.push(n);
- }
- this._plainText = g.substring(0, a) + c + g.substring(b);
- this.textRuns = l;
- this._serializeTextRuns();
- }
- }
- }
- }
- };
- return c;
- }();
- e.TextContent = c;
-})(Shumway || (Shumway = {}));
-var Shumway$$inline_486 = Shumway || (Shumway = {}), AVMX$$inline_487 = Shumway$$inline_486.AVMX || (Shumway$$inline_486.AVMX = {}), AS$$inline_488 = AVMX$$inline_487.AS || (AVMX$$inline_487.AS = {});
-AS$$inline_488.flashOptions = Shumway$$inline_486.Settings.shumwayOptions.register(new Shumway$$inline_486.Options.OptionSet("Flash Options"));
-AS$$inline_488.traceEventsOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option("te", "Trace Events", "boolean", !1, "Trace dispatching of events."));
-AS$$inline_488.traceLoaderOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option("tp", "Trace Loader", "boolean", !1, "Trace loader execution."));
-AS$$inline_488.disableAudioOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option("da", "Disable Audio", "boolean", !1, "Disables audio."));
-AS$$inline_488.webAudioOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option(null, "Use WebAudio for Sound", "boolean", !1, "Enables WebAudio API for MovieClip sound stream. (MP3 format is an exception)"));
-AS$$inline_488.webAudioMP3Option = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.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_488.mediaSourceOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option(null, "Use Media Source for Video", "boolean", !1, "Enables Media Source Extension API for NetStream."));
-AS$$inline_488.mediaSourceMP3Option = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option(null, "Use Media Source for MP3", "boolean", !0, "Enables Media Source Extension API for MP3 streams."));
-AS$$inline_488.flvOption = AS$$inline_488.flashOptions.register(new Shumway$$inline_486.Options.Option(null, "FLV support.", "string", "unsupported", "Defines how to deal with FLV streams."));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- var h = e.Debug.warning, n = e.Bounds, t = function() {
- function b(d, a) {
- this.data = d;
- if (d.className) {
- var c = d.env.app;
- try {
- var f = c.getClass(e.AVMX.Multiname.FromFQNString(d.className, 0));
- this.symbolClass = f;
- Object.defineProperty(f.tPrototype, "_symbol", {value:this});
- } catch (k) {
- h("Symbol " + d.id + " bound to non-existing class " + d.className), this.symbolClass = a;
- }
- } else {
- this.symbolClass = a;
- }
- this.isAVM1Object = !1;
- }
- Object.defineProperty(b.prototype, "id", {get:function() {
- return this.data.id;
- }, enumerable:!0, configurable:!0});
- return b;
- }();
- b.Symbol = t;
- var m = function(b) {
- function d(a, c, d) {
- b.call(this, a, c);
- this.dynamic = d;
- }
- __extends(d, b);
- d.prototype._setBoundsFromData = function(a) {
- this.fillBounds = a.fillBounds ? n.FromUntyped(a.fillBounds) : null;
- this.lineBounds = a.lineBounds ? n.FromUntyped(a.lineBounds) : null;
- !this.lineBounds && this.fillBounds && (this.lineBounds = this.fillBounds.clone());
- };
- return d;
- }(t);
- b.DisplaySymbol = m;
- t = function(b) {
- function d(a, c) {
- b.call(this, a, c.flash.utils.ByteArray.axClass);
- }
- __extends(d, b);
- d.FromData = function(a, b) {
- var f = new d(a, b.app.sec);
- f.buffer = a.data;
- f.byteLength = a.data.byteLength;
- return f;
- };
- return d;
- }(t);
- b.BinarySymbol = t;
- t = function() {
- return function(b, d) {
- this.soundId = b;
- this.soundInfo = d;
- };
- }();
- b.SoundStart = t;
- })(e.Timeline || (e.Timeline = {}));
-})(Shumway || (Shumway = {}));
-var RtmpJs;
-(function(e) {
- (function(b) {
- var h = function() {
- function b(h, e, l) {
- this._socket = ShumwayCom.createRtmpSocket({host:h, port:e, ssl:l.useSecureTransport});
- }
- Object.defineProperty(b, "isAvailable", {get:function() {
- return !("undefined" === typeof ShumwayCom || !ShumwayCom.createRtmpSocket);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onopen", {get:function() {
- return this._onopen;
- }, set:function(b) {
- this._socket.setOpenCallback(this._onopen = b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ondata", {get:function() {
- return this._ondata;
- }, set:function(b) {
- this._socket.setDataCallback(this._ondata = b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ondrain", {get:function() {
- return this._ondrain;
- }, set:function(b) {
- this._socket.setDrainCallback(this._ondrain = b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onerror", {get:function() {
- return this._onerror;
- }, set:function(b) {
- this._socket.setErrorCallback(this._onerror = b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onclose", {get:function() {
- return this._onclose;
- }, set:function(b) {
- this._socket.setCloseCallback(this._onclose = b);
- }, enumerable:!0, configurable:!0});
- b.prototype.send = function(b, h, l) {
- return this._socket.send(b, h, l);
- };
- b.prototype.close = function() {
- this._socket.close();
- };
- return b;
- }();
- b.ShumwayComRtmpSocket = h;
- h = function() {
- function b() {
- this._xhr = ShumwayCom.createRtmpXHR();
- }
- Object.defineProperty(b, "isAvailable", {get:function() {
- return !("undefined" === typeof ShumwayCom || !ShumwayCom.createRtmpXHR);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "status", {get:function() {
- return this._xhr.status;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "response", {get:function() {
- return this._xhr.response;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "responseType", {get:function() {
- return this._xhr.responseType;
- }, set:function(b) {
- this._xhr.responseType = b;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onload", {get:function() {
- return this._onload;
- }, set:function(b) {
- this._xhr.setLoadCallback(this._onload = b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "onerror", {get:function() {
- return this._onload;
- }, set:function(b) {
- this._xhr.setErrorCallback(this._onerror = b);
- }, enumerable:!0, configurable:!0});
- b.prototype.open = function(b, h, l) {
- void 0 === l && (l = !0);
- this._xhr.open(b, h, l);
- };
- b.prototype.setRequestHeader = function(b, h) {
- this._xhr.setRequestHeader(b, h);
- };
- b.prototype.send = function(b) {
- this._xhr.send(b);
- };
- return b;
- }();
- b.ShumwayComRtmpXHR = h;
- })(e.Browser || (e.Browser = {}));
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- var b = function() {
- function b(h) {
- this.onmessage = null;
- this.id = h;
- this.buffer = null;
- this.bufferLength = 0;
- this.lastStreamId = -1;
- this.lastTypeId = this.lastLength = this.lastTimestamp = 0;
- this.lastMessageComplete = !1;
- this.waitingForBytes = 0;
- this.sentStreamId = -1;
- this.sentTypeId = this.sentLength = this.sentTimestamp = 0;
- }
- b.prototype.setBuffer = function(b) {
- b && !this.buffer && (this.buffer = new Uint8Array(128), this.bufferLength = 0);
- !b && this.buffer && (this.buffer = null, this.bufferLength = 0);
- };
- b.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}));
- };
- b.prototype._push = function(b, h, l) {
- if (this.onmessage) {
- if (h && l || !this.buffer) {
- this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:b, firstChunk:h, lastChunk:l});
- } else {
- if (h && (this.bufferLength = 0, this.lastLength > this.buffer.length && (this.buffer = new Uint8Array(this.lastLength))), this.buffer.set(b, this.bufferLength), this.bufferLength += b.length, l) {
- 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});
- }
- }
- }
- };
- return b;
- }();
- e.ChunkedStream = b;
- var h = function() {
- function h() {
- this.onack = this.onusercontrolmessage = null;
- this.ondata = function(b) {
- };
- this.onclose = function() {
- };
- this.oncreated = null;
- this.state = "uninitialized";
- this.buffer = new Uint8Array(4092);
- this.bufferLength = 0;
- this.chunkSize = 128;
- this.chunkStreams = [];
- this.peerChunkSize = 128;
- this.lastAckSent = this.bytesReceived = this.windowAckSize = this.bandwidthLimitType = this.peerAckWindowSize = 0;
- }
- h.prototype.push = function(b) {
- var h = b.length + this.bufferLength;
- if (h > this.buffer.length) {
- for (var l = 2 * this.buffer.length;h > l;) {
- l *= 2;
- }
- 524288 < l && this._fail("Buffer overflow");
- l = new Uint8Array(l);
- l.set(this.buffer);
- this.buffer = l;
- }
- for (var l = 0, d = this.bufferLength;l < b.length;l++, d++) {
- this.buffer[d] = b[l];
- }
- this.bufferLength = h;
- this.bytesReceived += b.length;
- for (this.peerAckWindowSize && this.bytesReceived - this.lastAckSent >= this.peerAckWindowSize && this._sendAck();0 < this.bufferLength;) {
- b = 0;
- switch(this.state) {
- case "uninitialized":
- if (1 > this.bufferLength) {
- return;
- }
- this.serverVersion = this.buffer[0];
- b = 1;
- 3 !== this.serverVersion && this._fail("Unsupported protocol version: " + this.serverVersion);
- this.state = "version_received";
- break;
- case "version_received":
- if (1536 > this.bufferLength) {
- return;
- }
- b = 1536;
- h = Date.now() - this.epochStart | 0;
- this.buffer[4] = h >>> 24 & 255;
- this.buffer[5] = h >>> 16 & 255;
- this.buffer[6] = h >>> 8 & 255;
- this.buffer[7] = h & 255;
- this.ondata(this.buffer.subarray(0, 1536));
- this.state = "ack_sent";
- break;
- case "ack_sent":
- if (1536 > this.bufferLength) {
- return;
- }
- b = 1536;
- for (l = 8;1536 > l;l++) {
- this.buffer[l] !== this.randomData[l] && this._fail("Random data do not match @" + l);
- }
- this.state = "handshake_done";
- this.lastAckSent = this.bytesReceived;
- this._initialize();
- break;
- case "handshake_done":
- b = this._parseChunkedData();
- if (!b) {
- return;
- }
- break;
- default:
- return;
- }
- this.buffer.set(this.buffer.subarray(b, this.bufferLength), 0);
- this.bufferLength -= b;
- }
- };
- h.prototype._initialize = function() {
- var b = this._getChunkStream(2);
- b.setBuffer(!0);
- b.onmessage = function(b) {
- if (0 === b.streamId) {
- switch(b.typeId) {
- case 1:
- var h = b.data[0] << 24 | b.data[1] << 16 | b.data[2] << 8 | b.data[3];
- 1 <= h && 2147483647 >= h && (this.peerChunkSize = h);
- break;
- case 2:
- h = b.data[0] << 24 | b.data[1] << 16 | b.data[2] << 8 | b.data[3];
- 3 <= h && 65599 >= h && this._getChunkStream(h).abort();
- break;
- case 3:
- if (this.onack) {
- this.onack();
- }
- break;
- case 4:
- if (this.onusercontrolmessage) {
- this.onusercontrolmessage({type:b.data[0] << 8 | b.data[1], data:b.data.subarray(2)});
- }
- break;
- case 5:
- h = b.data[0] << 24 | b.data[1] << 16 | b.data[2] << 8 | b.data[3];
- if (0 > h) {
- break;
- }
- this.peerAckWindowSize = h;
- break;
- case 6:
- h = b.data[0] << 24 | b.data[1] << 16 | b.data[2] << 8 | b.data[3];
- b = b.data[4];
- if (0 > h || 2 < b) {
- break;
- }
- if (1 === b || 2 === b && 1 === this.bandwidthLimitType) {
- h = Math.min(this.windowAckSize, h);
- }
- h !== this.ackWindowSize && (this.ackWindowSize = h, h = new Uint8Array([h >>> 24 & 255, h >>> 16 & 255, h >>> 8 & 255, h & 255]), this._sendMessage(2, {typeId:5, streamId:0, data:h}), 2 !== b && (this.bandwidthLimitType = b));
- }
- }
- }.bind(this);
- if (this.oncreated) {
- this.oncreated();
- }
- };
- h.prototype.setChunkSize = function(b) {
- if (1 > b || 2147483647 < b) {
- throw Error("Invalid chunk size");
- }
- this._sendMessage(2, {streamId:0, typeId:1, data:new Uint8Array([b >>> 24 & 255, b >>> 16 & 255, b >>> 8 & 255, b & 255])});
- this.chunkSize = b;
- };
- h.prototype.send = function(b, h) {
- if (3 > b || 65599 < b) {
- throw Error("Invalid chunkStreamId");
- }
- return this._sendMessage(b, h);
- };
- h.prototype.sendUserControlMessage = function(b, h) {
- var l = new Uint8Array(2 + h.length);
- l[0] = b >> 8 & 255;
- l[1] = b & 255;
- l.set(h, 2);
- this._sendMessage(2, {typeId:4, streamId:0, data:l});
- };
- h.prototype._sendAck = function() {
- var b = 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:b});
- };
- h.prototype._sendMessage = function(b, h) {
- var l = h.data, d = l.length, a = this._getChunkStream(b), c = ("timestamp" in h ? h.timestamp : Date.now() - this.epochStart) | 0, f = c - a.sentTimestamp | 0, k = new Uint8Array(this.chunkSize + 18), r;
- 64 > b ? (r = 1, k[0] = b) : 320 > b ? (r = 2, k[0] = 0, k[1] = b - 64) : (r = 3, k[0] = 1, k[1] = b - 64 >> 8 & 255, k[2] = b - 64 & 255);
- var u = r, q = 0;
- h.streamId !== a.sentStreamId || 0 > f ? (0 !== (c & 4278190080) ? (q = c, k[u] = k[u + 1] = k[u + 2] = 255) : (k[u] = c >> 16 & 255, k[u + 1] = c >> 8 & 255, k[u + 2] = c & 255), u += 3, k[u++] = d >> 16 & 255, k[u++] = d >> 8 & 255, k[u++] = d & 255, k[u++] = h.typeId, k[u++] = h.streamId & 255, k[u++] = h.streamId >> 8 & 255, k[u++] = h.streamId >> 16 & 255, k[u++] = h.streamId >> 24 & 255) : d !== a.sentLength || h.typeId !== a.sentTypeId ? (k[0] |= 64, 0 !== (f & 4278190080) ? (q = f,
- k[u] = k[u + 1] = k[u + 2] = 255) : (k[u] = f >> 16 & 255, k[u + 1] = f >> 8 & 255, k[u + 2] = f & 255), u += 3, k[u++] = d >> 16 & 255, k[u++] = d >> 8 & 255, k[u++] = d & 255, k[u++] = h.typeId) : 0 !== f ? (k[0] |= 128, 0 !== (f & 4278190080) ? (q = f, k[u] = k[u + 1] = k[u + 2] = 255) : (k[u] = f >> 16 & 255, k[u + 1] = f >> 8 & 255, k[u + 2] = f & 255), u += 3) : k[0] |= 192;
- q && (k[u++] = q >>> 24 & 255, k[u++] = q >>> 16 & 255, k[u++] = q >>> 8 & 255, k[u++] = q & 255);
- a.sentTimestamp = c;
- a.sentStreamId = h.streamId;
- a.sentTypeId = h.typeId;
- a.sentLength = d;
- for (a = 0;a < d;) {
- f = Math.min(d - a, this.chunkSize), k.set(l.subarray(a, a + f), u), a += f, this.ondata(k.subarray(0, u + f)), k[0] |= 192, u = r;
- }
- return c;
- };
- h.prototype._getChunkStream = function(h) {
- var e = this.chunkStreams[h];
- e || (this.chunkStreams[h] = e = new b(h), e.setBuffer(!0), e.onmessage = function(b) {
- if (this.onmessage) {
- this.onmessage(b);
- }
- }.bind(this));
- return e;
- };
- h.prototype._parseChunkedData = function() {
- if (!(1 > this.bufferLength)) {
- var b = this.buffer[0] >> 6 & 3, h = 1, l = this.buffer[0] & 63;
- if (0 === l) {
- if (2 > this.bufferLength) {
- return;
- }
- l = this.buffer[1] + 64;
- h = 2;
- } else {
- if (1 === l) {
- if (2 > this.bufferLength) {
- return;
- }
- l = (this.buffer[1] << 8) + this.buffer[2] + 64;
- h = 3;
- }
- }
- var d = 0 === b ? 11 : 1 === b ? 7 : 2 === b ? 3 : 0;
- if (!(this.bufferLength < h + d)) {
- var a = 3 !== b && 255 === this.buffer[h] && 255 === this.buffer[h + 1] && 255 === this.buffer[h + 2] ? 4 : 0, c = h + d + a;
- if (!(this.bufferLength < c)) {
- var l = this._getChunkStream(l), f;
- f = 3 === b ? l.lastTimestamp : this.buffer[h] << 16 | this.buffer[h + 1] << 8 | this.buffer[h + 2];
- a && (f = h + d, f = this.buffer[f] << 24 | this.buffer[f + 1] << 16 | this.buffer[f + 2] << 8 | this.buffer[f + 3]);
- if (1 === b || 2 === b) {
- f = l.lastTimestamp + f | 0;
- }
- var d = l.lastLength, a = l.lastTypeId, k = l.lastStreamId;
- if (0 === b || 1 === b) {
- d = this.buffer[h + 3] << 16 | this.buffer[h + 4] << 8 | this.buffer[h + 5], a = this.buffer[h + 6];
- }
- 0 === b && (k = this.buffer[h + 10] << 24 | this.buffer[h + 9] << 16 | this.buffer[h + 8] << 8 | this.buffer[h + 7]);
- var r;
- 3 === b && l.waitingForBytes ? (r = !1, b = Math.min(l.waitingForBytes, this.peerChunkSize), h = l.waitingForBytes - b) : (r = !0, b = Math.min(d, this.peerChunkSize), h = d - b);
- if (!(this.bufferLength < c + b)) {
- return l.lastTimestamp = f, l.lastLength = d, l.lastTypeId = a, l.lastStreamId = k, l.lastMessageComplete = !h, l.waitingForBytes = h, l._push(this.buffer.subarray(c, c + b), r, !h), c + b;
- }
- }
- }
- }
- };
- h.prototype.start = function() {
- this.epochStart = Date.now();
- this.ondata(new Uint8Array([3]));
- this.randomData = new Uint8Array(1536);
- this.randomData[0] = 0;
- this.randomData[1] = 0;
- this.randomData[2] = 0;
- this.randomData[3] = 0;
- for (var b = 8;1536 > b;b++) {
- this.randomData[b] = 256 * Math.random() | 0;
- }
- this.ondata(this.randomData);
- console.log("## connected");
- };
- h.prototype.stop = function(b) {
- b && console.error("socket error!!!");
- console.log("## closed");
- };
- h.prototype._fail = function(b) {
- console.error("failed: " + b);
- this.state = "failed";
- this.onclose();
- throw Error(b);
- };
- return h;
- }();
- e.ChunkedChannel = h;
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- var b = Shumway.AVMX.AS.flash, h = function() {
- function h() {
- this._streams = [];
- }
- h.prototype.connect = function(b, h) {
- throw Error("Abstract BaseTransport.connect method");
- };
- h.prototype._initChannel = function(h, l) {
- var d = new e.ChunkedChannel, a = this;
- d.oncreated = function() {
- var a = new b.utils.ByteArray;
- a.objectEncoding = 0;
- a.writeObject("connect");
- a.writeObject(1);
- a.writeObject(h);
- a.writeObject(l || null);
- d.send(3, {streamId:0, typeId:20, data:new Uint8Array(a._buffer, 0, a.length)});
- };
- d.onmessage = function(c) {
- if (0 !== c.streamId) {
- a._streams[c.streamId]._push(c);
- } else {
- if (20 === c.typeId || 17 === c.typeId) {
- var d = new b.utils.ByteArray;
- d.writeRawBytes(c.data);
- d.position = 0;
- d.objectEncoding = 20 === c.typeId ? 0 : 3;
- c = d.readObject();
- void 0 === c && (d.objectEncoding = 0, c = d.readObject());
- var k = d.readObject();
- if ("_result" === c || "_error" === c) {
- if (c = "_error" === c, 1 === k) {
- if (k = d.readObject(), d = d.readObject(), a.onconnected) {
- a.onconnected({properties:k, information:d, isError:c});
- }
- } else {
- var r = d.readObject(), d = d.readObject();
- if (a.onstreamcreated) {
- var u = new n(a, d);
- a._streams[d] = u;
- a.onstreamcreated({transactionId:k, commandObject:r, streamId:d, stream:u, isError:c});
- }
- }
- } else {
- "onBWCheck" === c || "onBWDone" === c ? a.sendCommandOrResponse("_error", k, null, {code:"NetConnection.Call.Failed", level:"error"}) : (d.readObject(), d.position < d.length && d.readObject());
- }
- }
- }
- };
- d.onusercontrolmessage = function(a) {
- 6 === a.type && d.sendUserControlMessage(7, a.data);
- };
- return this.channel = d;
- };
- h.prototype.call = function(h, l, d, a) {
- var c = this.channel, f = new b.utils.ByteArray;
- f.objectEncoding = 0;
- f.writeObject(h);
- f.writeObject(l);
- f.writeObject(d);
- f.writeObject(a);
- c.send(3, {streamId:0, typeId:20, data:new Uint8Array(f._buffer, 0, f.length)});
- };
- h.prototype.createStream = function(b, h) {
- this.sendCommandOrResponse("createStream", b, h);
- };
- h.prototype.sendCommandOrResponse = function(h, l, d, a) {
- var c = this.channel, f = new b.utils.ByteArray;
- f.writeByte(0);
- f.objectEncoding = 0;
- f.writeObject(h);
- f.writeObject(l);
- f.writeObject(d || null);
- 3 < arguments.length && f.writeObject(a);
- c.send(3, {streamId:0, typeId:17, data:new Uint8Array(f._buffer, 0, f.length)});
- };
- h.prototype._setBuffer = function(b, h) {
- this.channel.sendUserControlMessage(3, new Uint8Array([b >> 24 & 255, b >> 16 & 255, b >> 8 & 255, b & 255, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, h & 255]));
- };
- h.prototype._sendCommand = function(b, h) {
- this.channel.send(8, {streamId:b, typeId:20, data:h});
- };
- return h;
- }();
- e.BaseTransport = h;
- var n = function() {
- function h(b, l) {
- this.transport = b;
- this.streamId = l;
- }
- h.prototype.play = function(h, l, d, a) {
- var c = new b.utils.ByteArray;
- c.objectEncoding = 0;
- c.writeObject("play");
- c.writeObject(0);
- c.writeObject(null);
- c.writeObject(h);
- 1 < arguments.length && c.writeObject(l);
- 2 < arguments.length && c.writeObject(d);
- 3 < arguments.length && c.writeObject(a);
- this.transport._sendCommand(this.streamId, new Uint8Array(c._buffer, 0, c.length));
- this.transport._setBuffer(this.streamId, 100);
- };
- h.prototype._push = function(h) {
- switch(h.typeId) {
- case 8:
- ;
- case 9:
- if (this.ondata) {
- this.ondata(h);
- }
- break;
- case 18:
- ;
- case 20:
- var l = [], d = new b.utils.ByteArray;
- d.writeRawBytes(h.data);
- d.position = 0;
- for (d.objectEncoding = 0;d.position < d.length;) {
- l.push(d.readObject());
- }
- 18 === h.typeId && this.onscriptdata && this.onscriptdata.apply(this, l);
- 20 === h.typeId && this.oncallback && this.oncallback.apply(this, l);
- }
- };
- return h;
- }();
- e.parseConnectionString = function(b) {
- var h = b.indexOf(":");
- if (0 > h || "/" !== b[h + 1]) {
- return null;
- }
- var l = b.substring(0, h).toLocaleLowerCase();
- if ("rtmp" !== l && "rtmpt" !== l && "rtmps" !== l && "rtmpe" !== l && "rtmpte" !== l && "rtmfp" !== l) {
- return null;
- }
- var d, a, c = h + 1;
- if ("/" === b[h + 2]) {
- c = b.indexOf("/", h + 3);
- if (0 > c) {
- return;
- }
- var f = b.indexOf(":", h + 1);
- 0 <= f && f < c ? (d = b.substring(h + 3, f), a = +b.substring(f + 1, c)) : d = b.substring(h + 3, c);
- }
- b = b.substring(c + 1);
- return {protocol:l, host:d, port:a, app:b};
- };
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- (function(b) {
- function h(h, l, d) {
- l || (l = t);
- var a = "undefined" !== typeof b.ShumwayComRtmpXHR && b.ShumwayComRtmpXHR.isAvailable ? new b.ShumwayComRtmpXHR : new XMLHttpRequest({mozSystem:!0});
- a.open("POST", h, !0);
- a.responseType = "arraybuffer";
- a.setRequestHeader("Content-Type", "application/x-fcs");
- a.onload = function(b) {
- d(new Uint8Array(a.response), a.status);
- };
- a.onerror = function(a) {
- console.log("error");
- throw Error("HTTP error");
- };
- a.send(l);
- }
- var n = function(h) {
- function l(b) {
- h.call(this);
- "string" === typeof b && (b = {host:b});
- this.host = b.host || "localhost";
- this.port = b.port || 1935;
- this.ssl = !!b.ssl || !1;
- }
- __extends(l, h);
- l.prototype.connect = function(d, a) {
- function c(a) {
- return q.send(a.buffer, a.byteOffset, a.byteLength);
- }
- var f = "undefined" !== typeof navigator && navigator.mozTCPSocket;
- if (!f) {
- throw Error("Your browser does not support socket communication.\nCurrenly only Firefox with enabled mozTCPSocket is allowed (see README.md).");
- }
- var k = this._initChannel(d, a), r = [], u = !1, q = "undefined" !== typeof b.ShumwayComRtmpSocket && b.ShumwayComRtmpSocket.isAvailable ? new b.ShumwayComRtmpSocket(this.host, this.port, {useSecureTransport:this.ssl, binaryType:"arraybuffer"}) : f.open(this.host, this.port, {useSecureTransport:this.ssl, binaryType:"arraybuffer"});
- q.onopen = function(a) {
- k.ondata = function(a) {
- a = new Uint8Array(a);
- r.push(a);
- 1 < r.length || c(a) && r.shift();
- };
- k.onclose = function() {
- q.close();
- };
- k.start();
- };
- q.ondrain = function(a) {
- for (r.shift();0 < r.length && c(r[0]);) {
- r.shift();
- }
- };
- q.onclose = function(a) {
- k.stop(u);
- };
- q.onerror = function(a) {
- u = !0;
- console.error("socket error: " + a.data);
- };
- q.ondata = function(a) {
- k.push(new Uint8Array(a.data));
- };
- };
- return l;
- }(e.BaseTransport);
- b.RtmpTransport = n;
- n = function(b) {
- function l(d) {
- b.call(this);
- var a = (d.ssl ? "https" : "http") + "://" + (d.host || "localhost");
- d.port && (a += ":" + d.port);
- this.baseUrl = a;
- this.stopped = !1;
- this.sessionId = null;
- this.requestId = 0;
- this.data = [];
- }
- __extends(l, b);
- l.prototype.connect = function(b, a) {
- var c = this._initChannel(b, a);
- c.ondata = function(a) {
- this.data.push(new Uint8Array(a));
- }.bind(this);
- c.onclose = function() {
- this.stopped = !0;
- }.bind(this);
- h(this.baseUrl + "/fcs/ident2", null, function(a, b) {
- if (404 !== b) {
- throw Error("Unexpected response: " + b);
- }
- h(this.baseUrl + "/open/1", null, function(a, b) {
- this.sessionId = String.fromCharCode.apply(null, a).slice(0, -1);
- console.log("session id: " + this.sessionId);
- this.tick();
- c.start();
- }.bind(this));
- }.bind(this));
- };
- l.prototype.tick = function() {
- var b = function(a, b) {
- if (200 !== b) {
- throw Error("Invalid HTTP status");
- }
- var c = a[0];
- 1 < a.length && this.channel.push(a.subarray(1));
- setTimeout(this.tick.bind(this), 16 * c);
- }.bind(this);
- if (this.stopped) {
- h(this.baseUrl + "/close/2", null, function() {
- });
- } else {
- if (0 < this.data.length) {
- var a, c = 0;
- this.data.forEach(function(a) {
- c += a.length;
- });
- var f = 0;
- a = new Uint8Array(c);
- this.data.forEach(function(b) {
- a.set(b, f);
- f += b.length;
- });
- this.data.length = 0;
- h(this.baseUrl + "/send/" + this.sessionId + "/" + this.requestId++, a, b);
- } else {
- h(this.baseUrl + "/idle/" + this.sessionId + "/" + this.requestId++, null, b);
- }
- }
- };
- return l;
- }(e.BaseTransport);
- b.RtmptTransport = n;
- var t = new Uint8Array([0]);
- })(e.Browser || (e.Browser = {}));
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- function e(a) {
- for (var b = [], c = 1;c < arguments.length;c++) {
- b[c - 1] = arguments[c];
- }
- return Array.prototype.concat.apply(a, b);
- }
- function t(a, b, c) {
- a[b] = c >> 24 & 255;
- a[b + 1] = c >> 16 & 255;
- a[b + 2] = c >> 8 & 255;
- a[b + 3] = c & 255;
- }
- function m(a) {
- return a.charCodeAt(0) << 24 | a.charCodeAt(1) << 16 | a.charCodeAt(2) << 8 | a.charCodeAt(3);
- }
- var l = Shumway.StringUtilities.utf8decode, d = [1, 0, 0, 0, 1, 0, 0, 0, 1], a = [0, 0, 0], c = function() {
- function a(b, c) {
- this.boxtype = b;
- "uuid" === b && (this.userType = c);
- }
- a.prototype.layout = function(a) {
- this.offset = a;
- a = 8;
- this.userType && (a += 16);
- return this.size = a;
- };
- a.prototype.write = function(a) {
- t(a, this.offset, this.size);
- t(a, this.offset + 4, m(this.boxtype));
- if (!this.userType) {
- return 8;
- }
- a.set(this.userType, this.offset + 8);
- return 24;
- };
- a.prototype.toUint8Array = function() {
- var a = this.layout(0), a = new Uint8Array(a);
- this.write(a);
- return a;
- };
- return a;
- }();
- b.Box = c;
- var f = function(a) {
- function b(c, d, f) {
- void 0 === d && (d = 0);
- void 0 === f && (f = 0);
- a.call(this, c);
- this.version = d;
- this.flags = f;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.version << 24 | this.flags);
- return c + 4;
- };
- return b;
- }(c);
- b.FullBox = f;
- var k = function(a) {
- function b(c, d, f) {
- a.call(this, "ftype");
- this.majorBrand = c;
- this.minorVersion = d;
- this.compatibleBrands = f;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 4 * (2 + this.compatibleBrands.length);
- };
- b.prototype.write = function(b) {
- var c = this, d = a.prototype.write.call(this, b);
- t(b, this.offset + d, m(this.majorBrand));
- t(b, this.offset + d + 4, this.minorVersion);
- d += 8;
- this.compatibleBrands.forEach(function(a) {
- t(b, c.offset + d, m(a));
- d += 4;
- }, this);
- return d;
- };
- return b;
- }(c);
- b.FileTypeBox = k;
- k = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.children = d;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b);
- this.children.forEach(function(a) {
- a && (c += a.layout(b + c));
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- this.children.forEach(function(a) {
- a && (c += a.write(b));
- });
- return c;
- };
- return b;
- }(c);
- b.BoxContainerBox = k;
- var r = function(a) {
- function b(c, d, f, k) {
- a.call(this, "moov", e([c], d, [f, k]));
- this.header = c;
- this.tracks = d;
- this.extendsBox = f;
- this.userData = k;
- }
- __extends(b, a);
- return b;
- }(k);
- b.MovieBox = r;
- r = function(a) {
- function b(c, f, k, q, r, h, l, e) {
- void 0 === q && (q = 1);
- void 0 === r && (r = 1);
- void 0 === h && (h = d);
- void 0 === l && (l = -20828448E5);
- void 0 === e && (e = -20828448E5);
- a.call(this, "mvhd", 0, 0);
- this.timescale = c;
- this.duration = f;
- this.nextTrackId = k;
- this.rate = q;
- this.volume = r;
- this.matrix = h;
- this.creationTime = l;
- this.modificationTime = e;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 16 + 4 + 2 + 2 + 8 + 36 + 24 + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, (this.creationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 8, this.timescale);
- t(b, this.offset + c + 12, this.duration);
- c += 16;
- t(b, this.offset + c, 65536 * this.rate | 0);
- t(b, this.offset + c + 4, (256 * this.volume | 0) << 16);
- t(b, this.offset + c + 8, 0);
- t(b, this.offset + c + 12, 0);
- c += 16;
- t(b, this.offset + c, 65536 * this.matrix[0] | 0);
- t(b, this.offset + c + 4, 65536 * this.matrix[1] | 0);
- t(b, this.offset + c + 8, 65536 * this.matrix[2] | 0);
- t(b, this.offset + c + 12, 65536 * this.matrix[3] | 0);
- t(b, this.offset + c + 16, 65536 * this.matrix[4] | 0);
- t(b, this.offset + c + 20, 65536 * this.matrix[5] | 0);
- t(b, this.offset + c + 24, 1073741824 * this.matrix[6] | 0);
- t(b, this.offset + c + 28, 1073741824 * this.matrix[7] | 0);
- t(b, this.offset + c + 32, 1073741824 * this.matrix[8] | 0);
- c += 36;
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, 0);
- t(b, this.offset + c + 8, 0);
- t(b, this.offset + c + 12, 0);
- t(b, this.offset + c + 16, 0);
- t(b, this.offset + c + 20, 0);
- c += 24;
- t(b, this.offset + c, this.nextTrackId);
- return c + 4;
- };
- return b;
- }(f);
- b.MovieHeaderBox = r;
- (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";
- })(b.TrackHeaderFlags || (b.TrackHeaderFlags = {}));
- r = function(a) {
- function b(c, f, k, q, r, h, l, e, n, m, t) {
- void 0 === l && (l = 0);
- void 0 === e && (e = 0);
- void 0 === n && (n = d);
- void 0 === m && (m = -20828448E5);
- void 0 === t && (t = -20828448E5);
- a.call(this, "tkhd", 0, c);
- this.trackId = f;
- this.duration = k;
- this.width = q;
- this.height = r;
- this.volume = h;
- this.alternateGroup = l;
- this.layer = e;
- this.matrix = n;
- this.creationTime = m;
- this.modificationTime = t;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 20 + 8 + 6 + 2 + 36 + 8;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, (this.creationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 8, this.trackId);
- t(b, this.offset + c + 12, 0);
- t(b, this.offset + c + 16, this.duration);
- c += 20;
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, 0);
- t(b, this.offset + c + 8, this.layer << 16 | this.alternateGroup);
- t(b, this.offset + c + 12, (256 * this.volume | 0) << 16);
- c += 16;
- t(b, this.offset + c, 65536 * this.matrix[0] | 0);
- t(b, this.offset + c + 4, 65536 * this.matrix[1] | 0);
- t(b, this.offset + c + 8, 65536 * this.matrix[2] | 0);
- t(b, this.offset + c + 12, 65536 * this.matrix[3] | 0);
- t(b, this.offset + c + 16, 65536 * this.matrix[4] | 0);
- t(b, this.offset + c + 20, 65536 * this.matrix[5] | 0);
- t(b, this.offset + c + 24, 1073741824 * this.matrix[6] | 0);
- t(b, this.offset + c + 28, 1073741824 * this.matrix[7] | 0);
- t(b, this.offset + c + 32, 1073741824 * this.matrix[8] | 0);
- c += 36;
- t(b, this.offset + c, 65536 * this.width | 0);
- t(b, this.offset + c + 4, 65536 * this.height | 0);
- return c + 8;
- };
- return b;
- }(f);
- b.TrackHeaderBox = r;
- r = function(a) {
- function b(c, d, f, k, q) {
- void 0 === f && (f = "unk");
- void 0 === k && (k = -20828448E5);
- void 0 === q && (q = -20828448E5);
- a.call(this, "mdhd", 0, 0);
- this.timescale = c;
- this.duration = d;
- this.language = f;
- this.creationTime = k;
- this.modificationTime = q;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 16 + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, (this.creationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
- t(b, this.offset + c + 8, this.timescale);
- t(b, this.offset + c + 12, this.duration);
- var d = this.offset + c + 16, f;
- f = this.language;
- f = (f.charCodeAt(0) & 31) << 10 | (f.charCodeAt(1) & 31) << 5 | f.charCodeAt(2) & 31;
- t(b, d, f << 16);
- return c + 20;
- };
- return b;
- }(f);
- b.MediaHeaderBox = r;
- r = function(a) {
- function b(c, d) {
- a.call(this, "hdlr", 0, 0);
- this.handlerType = c;
- this.name = d;
- this._encodedName = l(this.name);
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 8 + 12 + (this._encodedName.length + 1);
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, m(this.handlerType));
- t(b, this.offset + c + 8, 0);
- t(b, this.offset + c + 12, 0);
- t(b, this.offset + c + 16, 0);
- c += 20;
- b.set(this._encodedName, this.offset + c);
- b[this.offset + c + this._encodedName.length] = 0;
- return c += this._encodedName.length + 1;
- };
- return b;
- }(f);
- b.HandlerBox = r;
- r = function(a) {
- function b(c) {
- void 0 === c && (c = 0);
- a.call(this, "smhd", 0, 0);
- this.balance = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, (256 * this.balance | 0) << 16);
- return c + 4;
- };
- return b;
- }(f);
- b.SoundMediaHeaderBox = r;
- r = function(b) {
- function c(d, f) {
- void 0 === d && (d = 0);
- void 0 === f && (f = a);
- b.call(this, "vmhd", 0, 0);
- this.graphicsMode = d;
- this.opColor = f;
- }
- __extends(c, b);
- c.prototype.layout = function(a) {
- return this.size = b.prototype.layout.call(this, a) + 8;
- };
- c.prototype.write = function(a) {
- var c = b.prototype.write.call(this, a);
- t(a, this.offset + c, this.graphicsMode << 16 | this.opColor[0]);
- t(a, this.offset + c + 4, this.opColor[1] << 16 | this.opColor[2]);
- return c + 8;
- };
- return c;
- }(f);
- b.VideoMediaHeaderBox = r;
- b.SELF_CONTAINED_DATA_REFERENCE_FLAG = 1;
- r = function(a) {
- function c(d, f) {
- void 0 === f && (f = null);
- a.call(this, "url ", 0, d);
- this.location = f;
- d & b.SELF_CONTAINED_DATA_REFERENCE_FLAG || (this._encodedLocation = l(f));
- }
- __extends(c, a);
- c.prototype.layout = function(b) {
- b = a.prototype.layout.call(this, b);
- this._encodedLocation && (b += this._encodedLocation.length + 1);
- return this.size = b;
- };
- c.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- this._encodedLocation && (b.set(this._encodedLocation, this.offset + c), b[this.offset + c + this._encodedLocation.length] = 0, c += this._encodedLocation.length);
- return c;
- };
- return c;
- }(f);
- b.DataEntryUrlBox = r;
- r = function(a) {
- function b(c) {
- a.call(this, "dref", 0, 0);
- this.entries = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b) + 4;
- this.entries.forEach(function(a) {
- c += a.layout(b + c);
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.entries.length);
- this.entries.forEach(function(a) {
- c += a.write(b);
- });
- return c;
- };
- return b;
- }(f);
- b.DataReferenceBox = r;
- r = function(a) {
- function b(c) {
- a.call(this, "dinf", [c]);
- this.dataReference = c;
- }
- __extends(b, a);
- return b;
- }(k);
- b.DataInformationBox = r;
- r = function(a) {
- function b(c) {
- a.call(this, "stsd", 0, 0);
- this.entries = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b), c = c + 4;
- this.entries.forEach(function(a) {
- c += a.layout(b + c);
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.entries.length);
- c += 4;
- this.entries.forEach(function(a) {
- c += a.write(b);
- });
- return c;
- };
- return b;
- }(f);
- b.SampleDescriptionBox = r;
- r = function(a) {
- function b(c, d, f, k, q) {
- a.call(this, "stbl", [c, d, f, k, q]);
- this.sampleDescriptions = c;
- this.timeToSample = d;
- this.sampleToChunk = f;
- this.sampleSizes = k;
- this.chunkOffset = q;
- }
- __extends(b, a);
- return b;
- }(k);
- b.SampleTableBox = r;
- r = function(a) {
- function b(c, d, f) {
- a.call(this, "minf", [c, d, f]);
- this.header = c;
- this.info = d;
- this.sampleTable = f;
- }
- __extends(b, a);
- return b;
- }(k);
- b.MediaInformationBox = r;
- r = function(a) {
- function b(c, d, f) {
- a.call(this, "mdia", [c, d, f]);
- this.header = c;
- this.handler = d;
- this.info = f;
- }
- __extends(b, a);
- return b;
- }(k);
- b.MediaBox = r;
- r = function(a) {
- function b(c, d) {
- a.call(this, "trak", [c, d]);
- this.header = c;
- this.media = d;
- }
- __extends(b, a);
- return b;
- }(k);
- b.TrackBox = r;
- r = function(a) {
- function b(c, d, f, k, q) {
- a.call(this, "trex", 0, 0);
- this.trackId = c;
- this.defaultSampleDescriptionIndex = d;
- this.defaultSampleDuration = f;
- this.defaultSampleSize = k;
- this.defaultSampleFlags = q;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 20;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.trackId);
- t(b, this.offset + c + 4, this.defaultSampleDescriptionIndex);
- t(b, this.offset + c + 8, this.defaultSampleDuration);
- t(b, this.offset + c + 12, this.defaultSampleSize);
- t(b, this.offset + c + 16, this.defaultSampleFlags);
- return c + 20;
- };
- return b;
- }(f);
- b.TrackExtendsBox = r;
- r = function(a) {
- function b(c, d, f) {
- a.call(this, "mvex", e([c], d, [f]));
- this.header = c;
- this.tracDefaults = d;
- this.levels = f;
- }
- __extends(b, a);
- return b;
- }(k);
- b.MovieExtendsBox = r;
- r = function(a) {
- function b(c, d) {
- a.call(this, "meta", 0, 0);
- this.handler = c;
- this.otherBoxes = d;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b), c = c + this.handler.layout(b + c);
- this.otherBoxes.forEach(function(a) {
- c += a.layout(b + c);
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b), c = c + this.handler.write(b);
- this.otherBoxes.forEach(function(a) {
- c += a.write(b);
- });
- return c;
- };
- return b;
- }(f);
- b.MetaBox = r;
- r = function(a) {
- function b(c) {
- a.call(this, "mfhd", 0, 0);
- this.sequenceNumber = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.sequenceNumber);
- return c + 4;
- };
- return b;
- }(f);
- b.MovieFragmentHeaderBox = r;
- (function(a) {
- a[a.BASE_DATA_OFFSET_PRESENT = 1] = "BASE_DATA_OFFSET_PRESENT";
- a[a.SAMPLE_DESCRIPTION_INDEX_PRESENT = 2] = "SAMPLE_DESCRIPTION_INDEX_PRESENT";
- a[a.DEFAULT_SAMPLE_DURATION_PRESENT = 8] = "DEFAULT_SAMPLE_DURATION_PRESENT";
- a[a.DEFAULT_SAMPLE_SIZE_PRESENT = 16] = "DEFAULT_SAMPLE_SIZE_PRESENT";
- a[a.DEFAULT_SAMPLE_FLAGS_PRESENT = 32] = "DEFAULT_SAMPLE_FLAGS_PRESENT";
- })(b.TrackFragmentFlags || (b.TrackFragmentFlags = {}));
- r = function(a) {
- function b(c, d, f, k, q, r, h) {
- a.call(this, "tfhd", 0, c);
- this.trackId = d;
- this.baseDataOffset = f;
- this.sampleDescriptionIndex = k;
- this.defaultSampleDuration = q;
- this.defaultSampleSize = r;
- this.defaultSampleFlags = h;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- b = a.prototype.layout.call(this, b) + 4;
- var c = this.flags;
- c & 1 && (b += 8);
- c & 2 && (b += 4);
- c & 8 && (b += 4);
- c & 16 && (b += 4);
- c & 32 && (b += 4);
- return this.size = b;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b), d = this.flags;
- t(b, this.offset + c, this.trackId);
- c += 4;
- d & 1 && (t(b, this.offset + c, 0), t(b, this.offset + c + 4, this.baseDataOffset), c += 8);
- d & 2 && (t(b, this.offset + c, this.sampleDescriptionIndex), c += 4);
- d & 8 && (t(b, this.offset + c, this.defaultSampleDuration), c += 4);
- d & 16 && (t(b, this.offset + c, this.defaultSampleSize), c += 4);
- d & 32 && (t(b, this.offset + c, this.defaultSampleFlags), c += 4);
- return c;
- };
- return b;
- }(f);
- b.TrackFragmentHeaderBox = r;
- r = function(a) {
- function b(c) {
- a.call(this, "tfdt", 0, 0);
- this.baseMediaDecodeTime = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 4;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, this.baseMediaDecodeTime);
- return c + 4;
- };
- return b;
- }(f);
- b.TrackFragmentBaseMediaDecodeTimeBox = r;
- r = function(a) {
- function b(c, d, f) {
- a.call(this, "traf", [c, d, f]);
- this.header = c;
- this.decodeTime = d;
- this.run = f;
- }
- __extends(b, a);
- return b;
- }(k);
- b.TrackFragmentBox = r;
- (function(a) {
- a[a.IS_LEADING_MASK = 201326592] = "IS_LEADING_MASK";
- a[a.SAMPLE_DEPENDS_ON_MASK = 50331648] = "SAMPLE_DEPENDS_ON_MASK";
- a[a.SAMPLE_DEPENDS_ON_OTHER = 16777216] = "SAMPLE_DEPENDS_ON_OTHER";
- a[a.SAMPLE_DEPENDS_ON_NO_OTHERS = 33554432] = "SAMPLE_DEPENDS_ON_NO_OTHERS";
- a[a.SAMPLE_IS_DEPENDED_ON_MASK = 12582912] = "SAMPLE_IS_DEPENDED_ON_MASK";
- a[a.SAMPLE_HAS_REDUNDANCY_MASK = 3145728] = "SAMPLE_HAS_REDUNDANCY_MASK";
- a[a.SAMPLE_PADDING_VALUE_MASK = 917504] = "SAMPLE_PADDING_VALUE_MASK";
- a[a.SAMPLE_IS_NOT_SYNC = 65536] = "SAMPLE_IS_NOT_SYNC";
- a[a.SAMPLE_DEGRADATION_PRIORITY_MASK = 65535] = "SAMPLE_DEGRADATION_PRIORITY_MASK";
- })(b.SampleFlags || (b.SampleFlags = {}));
- (function(a) {
- a[a.DATA_OFFSET_PRESENT = 1] = "DATA_OFFSET_PRESENT";
- a[a.FIRST_SAMPLE_FLAGS_PRESENT = 4] = "FIRST_SAMPLE_FLAGS_PRESENT";
- a[a.SAMPLE_DURATION_PRESENT = 256] = "SAMPLE_DURATION_PRESENT";
- a[a.SAMPLE_SIZE_PRESENT = 512] = "SAMPLE_SIZE_PRESENT";
- a[a.SAMPLE_FLAGS_PRESENT = 1024] = "SAMPLE_FLAGS_PRESENT";
- a[a.SAMPLE_COMPOSITION_TIME_OFFSET = 2048] = "SAMPLE_COMPOSITION_TIME_OFFSET";
- })(b.TrackRunFlags || (b.TrackRunFlags = {}));
- f = function(a) {
- function b(c, d, f, k) {
- a.call(this, "trun", 1, c);
- this.samples = d;
- this.dataOffset = f;
- this.firstSampleFlags = k;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- b = a.prototype.layout.call(this, b) + 4;
- var c = this.samples.length, d = this.flags;
- d & 1 && (b += 4);
- d & 4 && (b += 4);
- d & 256 && (b += 4 * c);
- d & 512 && (b += 4 * c);
- d & 1024 && (b += 4 * c);
- d & 2048 && (b += 4 * c);
- return this.size = b;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b), d = this.samples.length, f = this.flags;
- t(b, this.offset + c, d);
- c += 4;
- f & 1 && (t(b, this.offset + c, this.dataOffset), c += 4);
- f & 4 && (t(b, this.offset + c, this.firstSampleFlags), c += 4);
- for (var k = 0;k < d;k++) {
- var q = this.samples[k];
- f & 256 && (t(b, this.offset + c, q.duration), c += 4);
- f & 512 && (t(b, this.offset + c, q.size), c += 4);
- f & 1024 && (t(b, this.offset + c, q.flags), c += 4);
- f & 2048 && (t(b, this.offset + c, q.compositionTimeOffset), c += 4);
- }
- return c;
- };
- return b;
- }(f);
- b.TrackRunBox = f;
- f = function(a) {
- function b(c, d) {
- a.call(this, "moof", e([c], d));
- this.header = c;
- this.trafs = d;
- }
- __extends(b, a);
- return b;
- }(k);
- b.MovieFragmentBox = f;
- f = function(a) {
- function b(c) {
- a.call(this, "mdat");
- this.chunks = c;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b);
- this.chunks.forEach(function(a) {
- c += a.length;
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = this, d = a.prototype.write.call(this, b);
- this.chunks.forEach(function(a) {
- b.set(a, c.offset + d);
- d += a.length;
- }, this);
- return d;
- };
- return b;
- }(c);
- b.MediaDataBox = f;
- f = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.dataReferenceIndex = d;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + 8;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, this.dataReferenceIndex);
- return c + 8;
- };
- return b;
- }(c);
- b.SampleEntry = f;
- k = function(a) {
- function b(c, d, f, k, q, r) {
- void 0 === f && (f = 2);
- void 0 === k && (k = 16);
- void 0 === q && (q = 44100);
- void 0 === r && (r = null);
- a.call(this, c, d);
- this.channelCount = f;
- this.sampleSize = k;
- this.sampleRate = q;
- this.otherBoxes = r;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b) + 20;
- this.otherBoxes && this.otherBoxes.forEach(function(a) {
- c += a.layout(b + c);
- });
- return this.size = c;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, 0);
- t(b, this.offset + c + 8, this.channelCount << 16 | this.sampleSize);
- t(b, this.offset + c + 12, 0);
- t(b, this.offset + c + 16, this.sampleRate << 16);
- c += 20;
- this.otherBoxes && this.otherBoxes.forEach(function(a) {
- c += a.write(b);
- });
- return c;
- };
- return b;
- }(f);
- b.AudioSampleEntry = k;
- b.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH = 24;
- f = function(a) {
- function c(d, f, k, q, r, l, e, n, m, t) {
- void 0 === r && (r = "");
- void 0 === l && (l = 72);
- void 0 === e && (e = 72);
- void 0 === n && (n = 1);
- void 0 === m && (m = b.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH);
- void 0 === t && (t = null);
- a.call(this, d, f);
- this.width = k;
- this.height = q;
- this.compressorName = r;
- this.horizResolution = l;
- this.vertResolution = e;
- this.frameCount = n;
- this.depth = m;
- this.otherBoxes = t;
- if (31 < r.length) {
- throw Error("invalid compressor name");
- }
- }
- __extends(c, a);
- c.prototype.layout = function(b) {
- var c = a.prototype.layout.call(this, b) + 16 + 12 + 4 + 2 + 32 + 2 + 2;
- this.otherBoxes && this.otherBoxes.forEach(function(a) {
- c += a.layout(b + c);
- });
- return this.size = c;
- };
- c.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, 0);
- t(b, this.offset + c + 8, 0);
- t(b, this.offset + c + 12, 0);
- c += 16;
- t(b, this.offset + c, this.width << 16 | this.height);
- t(b, this.offset + c + 4, 65536 * this.horizResolution | 0);
- t(b, this.offset + c + 8, 65536 * this.vertResolution | 0);
- c += 12;
- t(b, this.offset + c, 0);
- t(b, this.offset + c + 4, this.frameCount << 16);
- c += 6;
- b[this.offset + c] = this.compressorName.length;
- for (var d = 0;31 > d;d++) {
- b[this.offset + c + d + 1] = d < this.compressorName.length ? this.compressorName.charCodeAt(d) & 127 : 0;
- }
- c += 32;
- t(b, this.offset + c, this.depth << 16 | 65535);
- c += 4;
- this.otherBoxes && this.otherBoxes.forEach(function(a) {
- c += a.write(b);
- });
- return c;
- };
- return c;
- }(f);
- b.VideoSampleEntry = f;
- c = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.data = d;
- }
- __extends(b, a);
- b.prototype.layout = function(b) {
- return this.size = a.prototype.layout.call(this, b) + this.data.length;
- };
- b.prototype.write = function(b) {
- var c = a.prototype.write.call(this, b);
- b.set(this.data, this.offset + c);
- return c + this.data.length;
- };
- return b;
- }(c);
- b.RawTag = c;
- })(b.Iso || (b.Iso = {}));
- })(e.MP4 || (e.MP4 = {}));
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- (function(b) {
- function h(a) {
- for (var b = a.length >> 1, c = new Uint8Array(b), d = 0;d < b;d++) {
- c[d] = parseInt(a.substr(2 * d, 2), 16);
- }
- return c;
- }
- var e = [5500, 11025, 22050, 44100], t = ["PCM", "ADPCM", "MP3", "PCM le", "Nellymouser16", "Nellymouser8", "Nellymouser", "G.711 A-law", "G.711 mu-law", null, "AAC", "Speex", "MP3 8khz"], m;
- (function(a) {
- a[a.HEADER = 0] = "HEADER";
- a[a.RAW = 1] = "RAW";
- })(m || (m = {}));
- var l = [null, "JPEG", "Sorenson", "Screen", "VP6", "VP6 alpha", "Screen2", "AVC"], d;
- (function(a) {
- a[a.KEY = 1] = "KEY";
- a[a.INNER = 2] = "INNER";
- a[a.DISPOSABLE = 3] = "DISPOSABLE";
- a[a.GENERATED = 4] = "GENERATED";
- a[a.INFO = 5] = "INFO";
- })(d || (d = {}));
- var a;
- (function(a) {
- a[a.HEADER = 0] = "HEADER";
- a[a.NALU = 1] = "NALU";
- a[a.END = 2] = "END";
- })(a || (a = {}));
- var c;
- (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";
- })(c || (c = {}));
- m = function() {
- function a(b) {
- var c = this;
- this.oncodecinfo = function(a) {
- };
- this.ondata = function(a) {
- throw Error("MP4Mux.ondata is not set");
- };
- this.metadata = b;
- this.trackStates = this.metadata.tracks.map(function(a, b) {
- var d = {trackId:b + 1, trackInfo:a, cachedDuration:0, samplesProcessed:0, initializationData:[]};
- c.metadata.audioTrackId === b && (c.audioTrackState = d);
- c.metadata.videoTrackId === b && (c.videoTrackState = d);
- return d;
- }, this);
- this._checkIfNeedHeaderData();
- this.filePos = 0;
- this.cachedPackets = [];
- this.chunkIndex = 0;
- }
- a.prototype.pushPacket = function(a, b, c) {
- 0 === this.state && this._tryGenerateHeader();
- switch(a) {
- case 8:
- a = this.audioTrackState;
- var d = 0, g = 1, f = b[d], v = f >> 4, h = f >> 2 & 3, m = f & 2 ? 16 : 8, f = f & 1 ? 2 : 1, E;
- d++;
- switch(v) {
- case 10:
- g = b[d++];
- E = 1024;
- break;
- case 2:
- E = b[d + 1] >> 3 & 3;
- var A = b[d + 1] >> 1 & 3;
- E = 1 === A ? 3 === E ? 1152 : 576 : 3 === A ? 384 : 1152;
- }
- b = {codecDescription:t[v], codecId:v, data:b.subarray(d), rate:e[h], size:m, channels:f, samples:E, packetType:g};
- if (!a || a.trackInfo.codecId !== b.codecId) {
- throw Error("Unexpected audio packet codec: " + b.codecDescription);
- }
- switch(b.codecId) {
- default:
- throw Error("Unsupported audio codec: " + b.codecDescription);;
- case 2:
- break;
- case 10:
- if (0 === b.packetType) {
- a.initializationData.push(b.data);
- return;
- }
- ;
- }
- this.cachedPackets.push({packet:b, timestamp:c, trackId:a.trackId});
- break;
- case 9:
- a = this.videoTrackState;
- d = 0;
- v = b[d] >> 4;
- g = b[d] & 15;
- d++;
- v = {frameType:v, codecId:g, codecDescription:l[g]};
- switch(g) {
- case 7:
- g = b[d++];
- v.packetType = g;
- v.compositionTime = (b[d] << 24 | b[d + 1] << 16 | b[d + 2] << 8) >> 8;
- d += 3;
- break;
- case 4:
- v.packetType = 1, v.horizontalOffset = b[d] >> 4 & 15, v.verticalOffset = b[d] & 15, v.compositionTime = 0, d++;
- }
- v.data = b.subarray(d);
- if (!a || a.trackInfo.codecId !== v.codecId) {
- throw Error("Unexpected video packet codec: " + v.codecDescription);
- }
- switch(v.codecId) {
- default:
- throw Error("unsupported video codec: " + v.codecDescription);;
- case 4:
- break;
- case 7:
- if (0 === v.packetType) {
- a.initializationData.push(v.data);
- return;
- }
- ;
- }
- this.cachedPackets.push({packet:v, timestamp:c, trackId:a.trackId});
- break;
- default:
- throw Error("unknown packet type: " + a);;
- }
- 1 === this.state && this._tryGenerateHeader();
- 200 <= this.cachedPackets.length && 2 === this.state && this._chunk();
- };
- a.prototype.flush = function() {
- 0 < this.cachedPackets.length && this._chunk();
- };
- a.prototype._checkIfNeedHeaderData = function() {
- this.trackStates.some(function(a) {
- return 10 === a.trackInfo.codecId || 7 === a.trackInfo.codecId;
- }) ? this.state = 1 : this.state = 0;
- };
- a.prototype._tryGenerateHeader = function() {
- if (this.trackStates.every(function(a) {
- switch(a.trackInfo.codecId) {
- case 10:
- ;
- case 7:
- return 0 < a.initializationData.length;
- default:
- return !0;
- }
- })) {
- for (var a = ["isom"], c = [], d = 0;d < this.trackStates.length;d++) {
- var f = this.trackStates[d], g = f.trackInfo, p;
- switch(g.codecId) {
- case 10:
- var v = f.initializationData[0];
- p = new b.Iso.AudioSampleEntry("mp4a", 1, g.channels, g.samplesize, g.samplerate);
- var l = new Uint8Array(41 + v.length);
- l.set(h("0000000003808080"), 0);
- l[8] = 32 + v.length;
- l.set(h("00020004808080"), 9);
- l[16] = 18 + v.length;
- l.set(h("40150000000000FA000000000005808080"), 17);
- l[34] = v.length;
- l.set(v, 35);
- l.set(h("068080800102"), 35 + v.length);
- p.otherBoxes = [new b.Iso.RawTag("esds", l)];
- f.mimeTypeCodec = "mp4a.40." + (v[0] >> 3);
- break;
- case 2:
- p = new b.Iso.AudioSampleEntry(".mp3", 1, g.channels, g.samplesize, g.samplerate);
- f.mimeTypeCodec = "mp3";
- break;
- case 7:
- v = f.initializationData[0];
- p = new b.Iso.VideoSampleEntry("avc1", 1, g.width, g.height);
- p.otherBoxes = [new b.Iso.RawTag("avcC", v)];
- f.mimeTypeCodec = "avc1." + (16777216 | v[1] << 16 | v[2] << 8 | v[3]).toString(16).substr(1);
- a.push("iso2", "avc1", "mp41");
- break;
- case 4:
- p = new b.Iso.VideoSampleEntry("VP6F", 1, g.width, g.height);
- p.otherBoxes = [new b.Iso.RawTag("glbl", h("00"))];
- f.mimeTypeCodec = "avc1.42001E";
- break;
- default:
- throw Error("not supported track type");;
- }
- var e;
- f === this.audioTrackState ? e = new b.Iso.TrackBox(new b.Iso.TrackHeaderBox(3, f.trackId, -1, 0, 0, 1, d), new b.Iso.MediaBox(new b.Iso.MediaHeaderBox(g.timescale, -1, g.language), new b.Iso.HandlerBox("soun", "SoundHandler"), new b.Iso.MediaInformationBox(new b.Iso.SoundMediaHeaderBox, new b.Iso.DataInformationBox(new b.Iso.DataReferenceBox([new b.Iso.DataEntryUrlBox(b.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), new b.Iso.SampleTableBox(new b.Iso.SampleDescriptionBox([p]), new b.Iso.RawTag("stts",
- h("0000000000000000")), new b.Iso.RawTag("stsc", h("0000000000000000")), new b.Iso.RawTag("stsz", h("000000000000000000000000")), new b.Iso.RawTag("stco", h("0000000000000000")))))) : f === this.videoTrackState && (e = new b.Iso.TrackBox(new b.Iso.TrackHeaderBox(3, f.trackId, -1, g.width, g.height, 0, d), new b.Iso.MediaBox(new b.Iso.MediaHeaderBox(g.timescale, -1, g.language), new b.Iso.HandlerBox("vide", "VideoHandler"), new b.Iso.MediaInformationBox(new b.Iso.VideoMediaHeaderBox, new b.Iso.DataInformationBox(new b.Iso.DataReferenceBox([new b.Iso.DataEntryUrlBox(b.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])),
- new b.Iso.SampleTableBox(new b.Iso.SampleDescriptionBox([p]), new b.Iso.RawTag("stts", h("0000000000000000")), new b.Iso.RawTag("stsc", h("0000000000000000")), new b.Iso.RawTag("stsz", h("000000000000000000000000")), new b.Iso.RawTag("stco", h("0000000000000000")))))));
- c.push(e);
- }
- d = new b.Iso.MovieExtendsBox(null, [new b.Iso.TrackExtendsBox(1, 1, 0, 0, 0), new b.Iso.TrackExtendsBox(2, 1, 0, 0, 0)], null);
- f = new b.Iso.BoxContainerBox("udat", [new b.Iso.MetaBox(new b.Iso.RawTag("hdlr", h("00000000000000006D6469726170706C000000000000000000")), [new b.Iso.RawTag("ilst", h("00000025A9746F6F0000001D6461746100000001000000004C61766635342E36332E313034"))])]);
- g = new b.Iso.MovieHeaderBox(1E3, 0, this.trackStates.length + 1);
- c = new b.Iso.MovieBox(g, c, d, f);
- a = new b.Iso.FileTypeBox("isom", 512, a);
- d = a.layout(0);
- f = c.layout(d);
- d = new Uint8Array(d + f);
- a.write(d);
- c.write(d);
- this.oncodecinfo(this.trackStates.map(function(a) {
- return a.mimeTypeCodec;
- }));
- this.ondata(d);
- this.filePos += d.length;
- this.state = 2;
- }
- };
- a.prototype._chunk = function() {
- var a, c = this.cachedPackets;
- if (0 !== c.length) {
- for (var d = [], f = 0, g = [], p = [], v = 0;v < this.trackStates.length;v++) {
- var h = this.trackStates[v], l = h.trackInfo, e = h.trackId, n = c.filter(function(a) {
- return a.trackId === e;
- });
- if (0 !== n.length) {
- var m = new b.Iso.TrackFragmentBaseMediaDecodeTimeBox(h.cachedDuration), t;
- p.push(f);
- switch(l.codecId) {
- case 10:
- ;
- case 2:
- t = [];
- for (a = 0;a < n.length;a++) {
- var y = n[a].packet, C = Math.round(y.samples * l.timescale / l.samplerate);
- d.push(y.data);
- f += y.data.length;
- t.push({duration:C, size:y.data.length});
- h.samplesProcessed += y.samples;
- }
- a = 32;
- a = new b.Iso.TrackFragmentHeaderBox(a, e, 0, 0, 0, 0, 33554432);
- n = 769;
- t = new b.Iso.TrackRunBox(n, t, 0, 0);
- h.cachedDuration = Math.round(h.samplesProcessed * l.timescale / l.samplerate);
- break;
- case 7:
- ;
- case 4:
- t = [];
- y = h.samplesProcessed;
- C = Math.round(y * l.timescale / l.framerate);
- for (a = 0;a < n.length;a++) {
- var x = n[a].packet;
- y++;
- var M = Math.round(y * l.timescale / l.framerate), I = M - C, C = M, J = Math.round(y * l.timescale / l.framerate + x.compositionTime * l.timescale / 1E3);
- d.push(x.data);
- f += x.data.length;
- t.push({duration:I, size:x.data.length, flags:1 === x.frameType ? 33554432 : 16842752, compositionTimeOffset:J - M});
- }
- a = 32;
- a = new b.Iso.TrackFragmentHeaderBox(a, e, 0, 0, 0, 0, 33554432);
- n = 3841;
- t = new b.Iso.TrackRunBox(n, t, 0, 0);
- h.cachedDuration = C;
- h.samplesProcessed = y;
- break;
- default:
- throw Error("Un codec");;
- }
- h = new b.Iso.TrackFragmentBox(a, m, t);
- g.push(h);
- }
- }
- this.cachedPackets.splice(0, c.length);
- v = new b.Iso.MovieFragmentHeaderBox(++this.chunkIndex);
- c = new b.Iso.MovieFragmentBox(v, g);
- f = c.layout(0);
- d = new b.Iso.MediaDataBox(d);
- h = d.layout(f);
- l = f + 8;
- for (v = 0;v < g.length;v++) {
- g[v].run.dataOffset = l + p[v];
- }
- g = new Uint8Array(f + h);
- c.write(g);
- d.write(g);
- this.ondata(g);
- this.filePos += g.length;
- }
- };
- return a;
- }();
- b.MP4Mux = m;
- b.parseFLVMetadata = function(a) {
- var b = [], c = -1, d = -1, q = +a.axGetPublicProperty("duration"), g, p, v = a.axGetPublicProperty("audiocodecid");
- switch(v) {
- case 2:
- ;
- case "mp3":
- g = "mp3";
- p = 2;
- break;
- case 10:
- ;
- case "mp4a":
- g = "mp4a";
- p = 10;
- break;
- default:
- if (!isNaN(v)) {
- throw Error("Unsupported audio codec: " + v);
- }
- g = null;
- p = -1;
- }
- var h, l, e = a.axGetPublicProperty("videocodecid");
- switch(e) {
- case 4:
- ;
- case "vp6f":
- h = "vp6f";
- l = 4;
- break;
- case 7:
- ;
- case "avc1":
- h = "avc1";
- l = 7;
- break;
- default:
- if (!isNaN(e)) {
- throw Error("Unsupported video codec: " + e);
- }
- h = null;
- l = -1;
- }
- g = null === g ? null : {codecDescription:g, codecId:p, language:"und", timescale:+a.axGetPublicProperty("audiosamplerate") || 44100, samplerate:+a.axGetPublicProperty("audiosamplerate") || 44100, channels:+a.axGetPublicProperty("audiochannels") || 2, samplesize:16};
- h = null === h ? null : {codecDescription:h, codecId:l, language:"und", timescale:6E4, framerate:+a.axGetPublicProperty("videoframerate") || +a.axGetPublicProperty("framerate"), width:+a.axGetPublicProperty("width"), height:+a.axGetPublicProperty("height")};
- if (a = a.axGetPublicProperty("trackinfo")) {
- for (l = 0;l < a.length;l++) {
- p = a[l];
- var n = p.axGetPublicProperty("sampledescription")[0];
- n.axGetPublicProperty("sampletype") === v ? (g.language = p.axGetPublicProperty("language"), g.timescale = +p.axGetPublicProperty("timescale")) : n.axGetPublicProperty("sampletype") === e && (h.language = p.axGetPublicProperty("language"), h.timescale = +p.axGetPublicProperty("timescale"));
- }
- }
- h && (d = b.length, b.push(h));
- g && (c = b.length, b.push(g));
- return {tracks:b, duration:q, audioTrackId:c, videoTrackId:d};
- };
- })(e.MP4 || (e.MP4 = {}));
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- (function(b) {
- var h = function() {
- function b() {
- this.state = this.state = 0;
- this.buffer = new ArrayBuffer(1024);
- this.previousTagSize = this.bufferSize = 0;
- this.onClose = this.onTag = this.onHeader = this.onError = null;
- }
- b.prototype.push = function(b) {
- var h;
- if (0 < this.bufferSize) {
- h = this.bufferSize + b.length;
- if (this.buffer.byteLength < h) {
- var l = new Uint8Array(this.buffer, 0, this.bufferSize);
- this.buffer = new ArrayBuffer(h);
- h = new Uint8Array(this.buffer);
- h.set(l);
- } else {
- h = new Uint8Array(this.buffer, 0, h);
- }
- h.set(b, this.bufferSize);
- } else {
- h = b;
- }
- b = 0;
- for (l = h.length;b < l;) {
- var d = 0;
- switch(this.state) {
- case 0:
- if (b + 9 > l) {
- break;
- }
- var a = h[b + 5] << 24 | h[b + 6] << 16 | h[b + 7] << 8 | h[b + 8];
- if (9 > a) {
- this._error("Invalid header length");
- break;
- }
- if (b + a > l) {
- break;
- }
- if (70 !== h[b] || 76 !== h[b + 1] || 86 !== h[b + 2] || 1 !== h[b + 3] || 0 !== (h[b + 4] & 250)) {
- this._error("Invalid FLV header");
- break;
- }
- var c = h[b + 4], d = 9 < a ? h.subarray(b + 9, b + a) : null;
- this.onHeader && this.onHeader({hasAudio:!!(c & 4), hasVideo:!!(c & 1), extra:d});
- this.state = 2;
- d = a;
- break;
- case 2:
- if (b + 4 + 11 > l) {
- break;
- }
- if ((h[b + 0] << 24 | h[b + 1] << 16 | h[b + 2] << 8 | h[b + 3]) !== this.previousTagSize) {
- this._error("Invalid PreviousTagSize");
- break;
- }
- var a = h[b + 5] << 16 | h[b + 6] << 8 | h[b + 7], f = b + 4 + 11;
- if (f + a > l) {
- break;
- }
- c = h[b + 4];
- if (0 !== (h[b + 12] << 16 | h[b + 13] << 8 | h[b + 14]) || 0 !== (c & 192)) {
- this._error("Invalid FLV tag");
- break;
- }
- var k = c & 31;
- if (8 !== k && 9 !== k && 18 !== k) {
- this._error("Invalid FLV tag type");
- break;
- }
- var c = !!(c & 32), r = h[b + 8] << 16 | h[b + 9] << 8 | h[b + 10] | h[h + 11] << 24;
- this.onTag && this.onTag({type:k, needPreprocessing:c, timestamp:r, data:h.subarray(f, f + a)});
- d += 15 + a;
- this.previousTagSize = a + 11;
- this.state = 2;
- break;
- default:
- throw Error("invalid state");;
- }
- if (0 === d) {
- break;
- }
- b += d;
- }
- b < h.length ? (this.bufferSize = h.length - b, this.buffer.byteLength < this.bufferSize && (this.buffer = new ArrayBuffer(this.bufferSize)), (new Uint8Array(this.buffer)).set(h.subarray(b))) : this.bufferSize = 0;
- };
- b.prototype._error = function(b) {
- this.state = -1;
- this.onError && this.onError(b);
- };
- b.prototype.close = function() {
- this.onClose && this.onClose();
- };
- return b;
- }();
- b.FLVParser = h;
- })(e.FLV || (e.FLV = {}));
-})(RtmpJs || (RtmpJs = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- function n(b) {
- switch(b) {
- case a:
- ;
- case -c:
- return 0;
- case d:
- ;
- case -d:
- return -1;
- case c:
- ;
- case -a:
- return 0;
- default:
- return Math.cos(b);
- }
- }
- function l(b) {
- switch(b) {
- case a:
- ;
- case -c:
- return 1;
- case d:
- ;
- case -d:
- return 0;
- case c:
- ;
- case -a:
- return -1;
- default:
- return Math.sin(b);
- }
- }
- var d = Math.PI, a = d / 2, c = d + a, f = 2 * d, k = function(a) {
- function b(c, d, f, k, u, h) {
- void 0 === c && (c = 1);
- void 0 === d && (d = 0);
- void 0 === f && (f = 0);
- void 0 === k && (k = 1);
- void 0 === u && (u = 0);
- void 0 === h && (h = 0);
- a.call(this);
- var l = this._data = new Float64Array(6);
- l[0] = c;
- l[1] = d;
- l[2] = f;
- l[3] = k;
- l[4] = u;
- l[5] = h;
- }
- __extends(b, a);
- b.classInitializer = function() {
- this.FROZEN_IDENTITY_MATRIX = Object.freeze(this.axConstruct([]));
- this.TEMP_MATRIX = this.axConstruct([]);
- };
- b.FromUntyped = function(a) {
- return new this.sec.flash.geom.Matrix(a.a, a.b, a.c, a.d, a.tx, a.ty);
- };
- b.FromDataBuffer = function(a) {
- return new this.sec.flash.geom.Matrix(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat());
- };
- Object.defineProperty(b.prototype, "a", {get:function() {
- return this._data[0];
- }, set:function(a) {
- this._data[0] = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "b", {get:function() {
- return this._data[1];
- }, set:function(a) {
- this._data[1] = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "c", {get:function() {
- return this._data[2];
- }, set:function(a) {
- this._data[2] = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "d", {get:function() {
- return this._data[3];
- }, set:function(a) {
- this._data[3] = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "tx", {get:function() {
- return this._data[4];
- }, set:function(a) {
- this._data[4] = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ty", {get:function() {
- return this._data[5];
- }, set:function(a) {
- this._data[5] = a;
- }, enumerable:!0, configurable:!0});
- b.prototype.concat = function(a) {
- var b = this._data;
- a = a._data;
- var c = b[0] * a[0], d = 0, f = 0, k = b[3] * a[3], r = b[4] * a[0] + a[4], u = b[5] * a[3] + a[5];
- if (0 !== b[1] || 0 !== b[2] || 0 !== a[1] || 0 !== a[2]) {
- c += b[1] * a[2], k += b[2] * a[1], d += b[0] * a[1] + b[1] * a[3], f += b[2] * a[0] + b[3] * a[2], r += b[5] * a[2], u += b[4] * a[1];
- }
- b[0] = c;
- b[1] = d;
- b[2] = f;
- b[3] = k;
- b[4] = r;
- b[5] = u;
- };
- b.prototype.preMultiply = function(a) {
- this.preMultiplyInto(a, this);
- };
- b.prototype.preMultiplyInto = function(a, b) {
- var c = this._data, d = a._data, f = b._data, k = d[0] * c[0], r = 0, u = 0, h = d[3] * c[3], l = d[4] * c[0] + c[4], e = d[5] * c[3] + c[5];
- if (0 !== d[1] || 0 !== d[2] || 0 !== c[1] || 0 !== c[2]) {
- k += d[1] * c[2], h += d[2] * c[1], r += d[0] * c[1] + d[1] * c[3], u += d[2] * c[0] + d[3] * c[2], l += d[5] * c[2], e += d[4] * c[1];
- }
- f[0] = k;
- f[1] = r;
- f[2] = u;
- f[3] = h;
- f[4] = l;
- f[5] = e;
- };
- b.prototype.invert = function() {
- this.invertInto(this);
- };
- b.prototype.invertInto = function(a) {
- var b = this._data, c = a._data, d = b[1], f = b[2], k = b[4], r = b[5];
- if (0 === d && 0 === f) {
- var u = c[0] = 1 / b[0], b = c[3] = 1 / b[3];
- c[1] = c[2] = 0;
- c[4] = -u * k;
- c[5] = -b * r;
- } else {
- var u = b[0], b = b[3], h = u * b - d * f;
- 0 === h ? a.identity() : (h = 1 / h, a = 0, a = c[0] = b * h, d = c[1] = -d * h, f = c[2] = -f * h, b = c[3] = u * h, c[4] = -(a * k + f * r), c[5] = -(d * k + b * r));
- }
- };
- b.prototype.identity = function() {
- var a = this._data;
- a[0] = a[3] = 1;
- a[1] = a[2] = a[4] = a[5] = 0;
- };
- b.prototype.createBox = function(a, b, c, d, f) {
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- void 0 === f && (f = 0);
- var k = this._data;
- if (0 !== c) {
- var r = n(c);
- c = l(c);
- k[0] = r * a;
- k[1] = c * b;
- k[2] = -c * a;
- k[3] = r * b;
- } else {
- k[0] = a, k[1] = 0, k[2] = 0, k[3] = b;
- }
- k[4] = d;
- k[5] = f;
- };
- b.prototype.createGradientBox = function(a, b, c, d, f) {
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- void 0 === f && (f = 0);
- this.createBox(a / 1638.4, b / 1638.4, c, d + a / 2, f + b / 2);
- };
- b.prototype.rotate = function(a) {
- a = +a;
- if (0 !== a) {
- var b = this._data, c = n(a);
- a = l(a);
- var d = b[0], f = b[1], k = b[2], r = b[3], u = b[4], h = b[5];
- b[0] = d * c - f * a;
- b[1] = d * a + f * c;
- b[2] = k * c - r * a;
- b[3] = k * a + r * c;
- b[4] = u * c - h * a;
- b[5] = u * a + h * c;
- }
- };
- b.prototype.translate = function(a, b) {
- var c = this._data;
- c[4] += a;
- c[5] += b;
- };
- b.prototype.scale = function(a, b) {
- var c = this._data;
- 1 !== a && (c[0] *= a, c[2] *= a, c[4] *= a);
- 1 !== b && (c[1] *= b, c[3] *= b, c[5] *= b);
- };
- b.prototype.deltaTransformPoint = function(a) {
- return new this.sec.flash.geom.Point(this._data[0] * a.x + this._data[2] * a.y, this._data[1] * a.x + this._data[3] * a.y);
- };
- b.prototype.transformX = function(a, b) {
- var c = this._data;
- return c[0] * a + c[2] * b + c[4];
- };
- b.prototype.transformY = function(a, b) {
- var c = this._data;
- return c[1] * a + c[3] * b + c[5];
- };
- b.prototype.transformPoint = function(a) {
- var b = this._data;
- return new this.sec.flash.geom.Point(b[0] * a.x + b[2] * a.y + b[4], b[1] * a.x + b[3] * a.y + b[5]);
- };
- b.prototype.transformPointInPlace = function(a) {
- var b = this._data;
- a.setTo(b[0] * a.x + b[2] * a.y + b[4], b[1] * a.x + b[3] * a.y + b[5]);
- return a;
- };
- b.prototype.transformBounds = function(a) {
- var b = this._data, c = b[0], d = b[1], f = b[2], k = b[3], r = b[4], u = b[5], h = a.xMin, l = a.yMin, e = a.width, n = a.height, b = Math.round(c * h + f * l + r), m = Math.round(d * h + k * l + u), t = Math.round(c * (h + e) + f * l + r), I = Math.round(d * (h + e) + k * l + u), J = Math.round(c * (h + e) + f * (l + n) + r), e = Math.round(d * (h + e) + k * (l + n) + u), c = Math.round(c * h + f * (l + n) + r), d = Math.round(d * h + k * (l + n) + u), k = 0;
- b > t && (k = b, b = t, t = k);
- J > c && (k = J, J = c, c = k);
- a.xMin = b < J ? b : J;
- a.xMax = t > c ? t : c;
- m > I && (k = m, m = I, I = k);
- e > d && (k = e, e = d, d = k);
- a.yMin = m < e ? m : e;
- a.yMax = I > d ? I : d;
- };
- b.prototype.getDeterminant = function() {
- var a = this._data;
- return a[0] * a[3] - a[1] * a[2];
- };
- b.prototype.getScaleX = function() {
- var a = this._data;
- if (1 === a[0] && 0 === a[1]) {
- return 1;
- }
- a = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
- return 0 > this.getDeterminant() ? -a : a;
- };
- b.prototype.getScaleY = function() {
- var a = this._data;
- if (0 === a[2] && 1 === a[3]) {
- return 1;
- }
- a = Math.sqrt(a[2] * a[2] + a[3] * a[3]);
- return 0 > this.getDeterminant() ? -a : a;
- };
- b.prototype.getAbsoluteScaleX = function() {
- return Math.abs(this.getScaleX());
- };
- b.prototype.getAbsoluteScaleY = function() {
- return Math.abs(this.getScaleY());
- };
- b.prototype.getSkewX = function() {
- return Math.atan2(this._data[3], this._data[2]) - Math.PI / 2;
- };
- b.prototype.getSkewY = function() {
- return Math.atan2(this._data[1], this._data[0]);
- };
- b.prototype.copyFrom = function(a) {
- var b = this._data;
- a = a._data;
- b[0] = a[0];
- b[1] = a[1];
- b[2] = a[2];
- b[3] = a[3];
- b[4] = a[4];
- b[5] = a[5];
- };
- b.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;
- };
- b.prototype.setTo = function(a, b, c, d, f, k) {
- var r = this._data;
- r[0] = a;
- r[1] = b;
- r[2] = c;
- r[3] = d;
- r[4] = f;
- r[5] = k;
- };
- b.prototype.toTwipsInPlace = function() {
- var a = this._data;
- a[4] = 20 * a[4] | 0;
- a[5] = 20 * a[5] | 0;
- return this;
- };
- b.prototype.toPixelsInPlace = function() {
- var a = this._data;
- a[4] /= 20;
- a[5] /= 20;
- return this;
- };
- b.prototype.toSerializedScaleInPlace = function() {
- var a = this._data;
- a[0] *= 819.2;
- a[1] *= 819.2;
- a[2] *= 819.2;
- a[3] *= 819.2;
- return this;
- };
- b.prototype.copyRowTo = function(a, b) {
- var c = this._data;
- a >>>= 0;
- 0 === a ? (b.x = c[0], b.y = c[2], b.z = c[4]) : 1 === a ? (b.x = c[1], b.y = c[3], b.z = c[5]) : 2 === a && (b.x = 0, b.y = 0, b.z = 1);
- };
- b.prototype.copyColumnTo = function(a, b) {
- var c = this._data;
- a >>>= 0;
- 0 === a ? (b.x = c[0], b.y = c[1], b.z = 0) : 1 === a ? (b.x = c[2], b.y = c[3], b.z = 0) : 2 === a && (b.x = c[4], b.y = c[5], b.z = 1);
- };
- b.prototype.copyRowFrom = function(a, b) {
- var c = this._data;
- a >>>= 0;
- 0 === a ? (c[0] = b.x, c[2] = b.y, c[4] = b.z) : 1 === a && (c[1] = b.x, c[3] = b.y, c[5] = b.z);
- };
- b.prototype.copyColumnFrom = function(a, b) {
- var c = this._data;
- a >>>= 0;
- 0 === a ? (c[0] = b.x, c[2] = b.y, c[4] = b.z) : 1 === a && (c[1] = b.x, c[3] = b.y, c[5] = b.z);
- };
- b.prototype.updateScaleAndRotation = function(a, b, c, d) {
- var k = this._data;
- if (0 !== c && c !== f || 0 !== d && d !== f) {
- var r = n(c), u = l(c);
- c === d ? (k[0] = r * a, k[1] = u * a) : (k[0] = n(d) * a, k[1] = l(d) * a);
- k[2] = -u * b;
- k[3] = r * b;
- } else {
- k[0] = a, k[1] = k[2] = 0, k[3] = b;
- }
- };
- b.prototype.clone = function() {
- var a = this._data;
- return new this.sec.flash.geom.Matrix(a[0], a[1], a[2], a[3], a[4], a[5]);
- };
- b.prototype.equals = function(a) {
- var b = this._data;
- a = a._data;
- 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];
- };
- b.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] + ")";
- };
- b.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]);
- };
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.ASObject);
- e.Matrix = k;
- })(e.geom || (e.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- function m(a, b, c, d, q, g, p, v) {
- var h = b * b, l = c * c, e = d * d, n = h + l + e, m = Math.sqrt(n);
- b /= m;
- c /= m;
- d /= m;
- h /= n;
- l /= n;
- e /= n;
- n = Math.cos(a);
- a = Math.sin(a);
- return v.flash.geom.Matrix3D.axClass.FromArray([h + (l + e) * n, b * c * (1 - n) + d * a, b * d * (1 - n) - c * a, 0, b * c * (1 - n) - d * a, l + (h + e) * n, c * d * (1 - n) + b * a, 0, b * d * (1 - n) + c * a, c * d * (1 - n) - b * a, e + (h + l) * n, 0, (q * (l + e) - b * (g * c + p * d)) * (1 - n) + (g * d - p * c) * a, (g * (h + e) - c * (q * b + p * d)) * (1 - n) + (p * b - q * d) * a, (p * (h + l) - d * (q * b + g * c)) * (1 - n) + (q * c - g * b) * a, 1]);
- }
- var l = e.Debug.notImplemented, d = e.AVMX.axCoerceString, a = new Uint32Array([0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15]), c = function(b) {
- function c(a) {
- void 0 === a && (a = null);
- b.call(this);
- this._matrix = new Float32Array(16);
- a && 16 <= a.length ? this.copyRawDataFrom(a, 0, !1) : this.identity();
- }
- __extends(c, b);
- c.FromArray = function(a) {
- var b = Object.create(this.tPrototype);
- b._matrix = new Float32Array(a);
- return b;
- };
- c.interpolate = function(a, b, c) {
- l("public flash.geom.Matrix3D::static interpolate");
- };
- Object.defineProperty(c.prototype, "rawData", {get:function() {
- var a = new this.sec.Float64Vector;
- this.copyRawDataTo(a, 0, !1);
- return a;
- }, set:function(a) {
- this.copyRawDataFrom(a, 0, !1);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "position", {get:function() {
- var a = this._matrix;
- return new this.sec.flash.geom.Vector3D(a[12], a[13], a[14]);
- }, set:function(a) {
- var b = this._matrix;
- b[12] = a.x;
- b[13] = a.y;
- b[14] = a.z;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "determinant", {get:function() {
- var a = this._matrix, b = a[4], c = a[8], d = a[12], f = a[5], k = a[9], h = a[13], l = a[6], e = a[10], n = a[14], m = a[7], t = a[11], y = a[15];
- return a[0] * (f * (e * y - t * n) - l * (k * y - t * h) + m * (k * n - e * h)) - a[1] * (b * (e * y - t * n) - l * (c * y - t * d) + m * (c * n - e * d)) + a[2] * (b * (k * y - t * h) - f * (c * y - t * d) + m * (c * h - k * d)) - a[3] * (b * (k * n - e * h) - f * (c * n - e * d) + l * (c * h - k * d));
- }, enumerable:!0, configurable:!0});
- c.prototype.clone = function() {
- return this.sec.flash.geom.Matrix3D.axClass.FromArray(this._matrix);
- };
- c.prototype.copyToMatrix3D = function(a) {
- a._matrix.set(this._matrix);
- };
- c.prototype.append = function(a) {
- var b = a._matrix, c = this._matrix;
- a = this._matrix;
- var d = b[0], f = b[4], k = b[8], h = b[12], l = b[1], e = b[5], n = b[9], m = b[13], t = b[2], y = b[6], C = b[10], x = b[14], M = b[3], I = b[7], J = b[11], b = b[15], F = c[0], D = c[4], H = c[8], K = c[12], O = c[1], S = c[5], P = c[9], N = c[13], Q = c[2], V = c[6], W = c[10], R = c[14], L = c[3], U = c[7], aa = c[11], c = c[15];
- a[0] = d * F + f * O + k * Q + h * L;
- a[1] = l * F + e * O + n * Q + m * L;
- a[2] = t * F + y * O + C * Q + x * L;
- a[3] = M * F + I * O + J * Q + b * L;
- a[4] = d * D + f * S + k * V + h * U;
- a[5] = l * D + e * S + n * V + m * U;
- a[6] = t * D + y * S + C * V + x * U;
- a[7] = M * D + I * S + J * V + b * U;
- a[8] = d * H + f * P + k * W + h * aa;
- a[9] = l * H + e * P + n * W + m * aa;
- a[10] = t * H + y * P + C * W + x * aa;
- a[11] = M * H + I * P + J * W + b * aa;
- a[12] = d * K + f * N + k * R + h * c;
- a[13] = l * K + e * N + n * R + m * c;
- a[14] = t * K + y * N + C * R + x * c;
- a[15] = M * K + I * N + J * R + b * c;
- };
- c.prototype.prepend = function(a) {
- var b = this._matrix, c = a._matrix;
- a = this._matrix;
- var d = b[0], f = b[4], k = b[8], h = b[12], l = b[1], e = b[5], n = b[9], m = b[13], t = b[2], y = b[6], C = b[10], x = b[14], M = b[3], I = b[7], J = b[11], b = b[15], F = c[0], D = c[4], H = c[8], K = c[12], O = c[1], S = c[5], P = c[9], N = c[13], Q = c[2], V = c[6], W = c[10], R = c[14], L = c[3], U = c[7], aa = c[11], c = c[15];
- a[0] = d * F + f * O + k * Q + h * L;
- a[1] = l * F + e * O + n * Q + m * L;
- a[2] = t * F + y * O + C * Q + x * L;
- a[3] = M * F + I * O + J * Q + b * L;
- a[4] = d * D + f * S + k * V + h * U;
- a[5] = l * D + e * S + n * V + m * U;
- a[6] = t * D + y * S + C * V + x * U;
- a[7] = M * D + I * S + J * V + b * U;
- a[8] = d * H + f * P + k * W + h * aa;
- a[9] = l * H + e * P + n * W + m * aa;
- a[10] = t * H + y * P + C * W + x * aa;
- a[11] = M * H + I * P + J * W + b * aa;
- a[12] = d * K + f * N + k * R + h * c;
- a[13] = l * K + e * N + n * R + m * c;
- a[14] = t * K + y * N + C * R + x * c;
- a[15] = M * K + I * N + J * R + b * c;
- };
- c.prototype.invert = function() {
- var a = this.determinant;
- if (1E-7 > Math.abs(a)) {
- return !1;
- }
- var a = 1 / a, b = this._matrix, c = b[0], d = b[1], f = b[2], k = b[3], h = b[4], l = b[5], e = b[6], n = b[7], m = b[8], t = b[9], y = b[10], C = b[11], x = b[12], M = b[13], I = b[14], J = b[15];
- b[0] = a * (l * (y * J - I * C) - t * (e * J - I * n) + M * (e * C - y * n));
- b[1] = -a * (d * (y * J - I * C) - t * (f * J - I * k) + M * (f * C - y * k));
- b[2] = a * (d * (e * J - I * n) - l * (f * J - I * k) + M * (f * n - e * k));
- b[3] = -a * (d * (e * C - y * n) - l * (f * C - y * k) + t * (f * n - e * k));
- b[4] = -a * (h * (y * J - I * C) - m * (e * J - I * n) + x * (e * C - y * n));
- b[5] = a * (c * (y * J - I * C) - m * (f * J - I * k) + x * (f * C - y * k));
- b[6] = -a * (c * (e * J - I * n) - h * (f * J - I * k) + x * (f * n - e * k));
- b[7] = a * (c * (e * C - y * n) - h * (f * C - y * k) + m * (f * n - e * k));
- b[8] = a * (h * (t * J - M * C) - m * (l * J - M * n) + x * (l * C - t * n));
- b[9] = -a * (c * (t * J - M * C) - m * (d * J - M * k) + x * (d * C - t * k));
- b[10] = a * (c * (l * J - M * n) - h * (d * J - M * k) + x * (d * n - l * k));
- b[11] = -a * (c * (l * C - t * n) - h * (d * C - t * k) + m * (d * n - l * k));
- b[12] = -a * (h * (t * I - M * y) - m * (l * I - M * e) + x * (l * y - t * e));
- b[13] = a * (c * (t * I - M * y) - m * (d * I - M * f) + x * (d * y - t * f));
- b[14] = -a * (c * (l * I - M * e) - h * (d * I - M * f) + x * (d * e - l * f));
- b[15] = a * (c * (l * y - t * e) - h * (d * y - t * f) + m * (d * e - l * f));
- return !0;
- };
- c.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;
- };
- c.prototype.decompose = function(a) {
- void 0 === a && (a = "eulerAngles");
- d(a);
- l("public flash.geom.Matrix3D::decompose");
- };
- c.prototype.recompose = function(a, b) {
- void 0 === b && (b = "eulerAngles");
- d(b);
- l("public flash.geom.Matrix3D::recompose");
- };
- c.prototype.appendTranslation = function(a, b, c) {
- a = +a;
- b = +b;
- c = +c;
- var d = this._matrix, f = d[3], k = d[7], h = d[11], l = d[15];
- d[0] += a * f;
- d[1] += b * f;
- d[2] += c * f;
- d[4] += a * k;
- d[5] += b * k;
- d[6] += c * k;
- d[8] += a * h;
- d[9] += b * h;
- d[10] += c * h;
- d[12] += a * l;
- d[13] += b * l;
- d[14] += c * l;
- };
- c.prototype.appendRotation = function(a, b, c) {
- void 0 === c && (c = null);
- this.append(m(+a / 180 * Math.PI, b.x, b.y, b.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0, this.sec));
- };
- c.prototype.appendScale = function(a, b, c) {
- a = +a;
- b = +b;
- c = +c;
- var d = this._matrix;
- d[0] *= a;
- d[1] *= b;
- d[2] *= c;
- d[4] *= a;
- d[5] *= b;
- d[6] *= c;
- d[8] *= a;
- d[9] *= b;
- d[10] *= c;
- d[12] *= a;
- d[13] *= b;
- d[14] *= c;
- };
- c.prototype.prependTranslation = function(a, b, c) {
- a = +a;
- b = +b;
- c = +c;
- var d = this._matrix, f = d[1], k = d[5], h = d[9], l = d[2], e = d[6], n = d[10], m = d[3], t = d[7], y = d[11];
- d[12] += d[0] * a + d[4] * b + d[8] * c;
- d[13] += f * a + k * b + h * c;
- d[14] += l * a + e * b + n * c;
- d[15] += m * a + t * b + y * c;
- };
- c.prototype.prependRotation = function(a, b, c) {
- void 0 === c && (c = null);
- this.prepend(m(+a / 180 * Math.PI, b.x, b.y, b.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0, this.sec));
- };
- c.prototype.prependScale = function(a, b, c) {
- a = +a;
- b = +b;
- c = +c;
- var d = this._matrix;
- d[0] *= a;
- d[1] *= a;
- d[2] *= a;
- d[3] *= a;
- d[4] *= b;
- d[5] *= b;
- d[6] *= b;
- d[7] *= b;
- d[8] *= c;
- d[9] *= c;
- d[10] *= c;
- d[11] *= c;
- };
- c.prototype.transformVector = function(a) {
- var b = this._matrix, c = a.x, d = a.y;
- a = a.z;
- return new this.sec.flash.geom.Vector3D(b[0] * c + b[4] * d + b[8] * a + b[12], b[1] * c + b[5] * d + b[9] * a + b[13], b[2] * c + b[6] * d + b[10] * a + b[14]);
- };
- c.prototype.deltaTransformVector = function(a) {
- var b = this._matrix, c = a.x, d = a.y;
- a = a.z;
- return new this.sec.flash.geom.Vector3D(b[0] * c + b[4] * d + b[8] * a, b[1] * c + b[5] * d + b[9] * a, b[2] * c + b[6] * d + b[10] * a);
- };
- c.prototype.transformVectors = function(a, b) {
- for (var c = this._matrix, d = c[0], f = c[4], k = c[8], h = c[12], l = c[1], e = c[5], n = c[9], m = c[13], t = c[2], y = c[6], C = c[10], c = c[14], x = 0;x < a.length - 2;x += 3) {
- var M = a.axGetNumericProperty(x), I = a.axGetNumericProperty(x + 1), J = a.axGetNumericProperty(x + 2);
- b.push(d * M + f * I + k * J + h);
- b.push(l * M + e * I + n * J + m);
- b.push(t * M + y * I + C * J + c);
- }
- };
- c.prototype.transpose = function() {
- var a = this._matrix, b;
- b = a[1];
- a[1] = a[4];
- a[4] = b;
- b = a[2];
- a[2] = a[8];
- a[5] = b;
- b = a[3];
- a[3] = a[12];
- a[12] = b;
- b = a[6];
- a[6] = a[9];
- a[9] = b;
- b = a[7];
- a[7] = a[13];
- a[13] = b;
- b = a[11];
- a[11] = a[14];
- a[14] = b;
- };
- c.prototype.pointAt = function(a, b, c) {
- l("public flash.geom.Matrix3D::pointAt");
- };
- c.prototype.interpolateTo = function(a, b) {
- l("public flash.geom.Matrix3D::interpolateTo");
- };
- c.prototype.copyFrom = function(a) {
- this._matrix.set(a._matrix);
- };
- c.prototype.copyRawDataTo = function(b, c, d) {
- void 0 === c && (c = 0);
- void 0 === d && (d = !1);
- c >>>= 0;
- var f = this._matrix;
- if (d) {
- for (d = 0, c |= 0;16 > d;d++, c++) {
- b.axSetNumericProperty(c, f[a[d]]);
- }
- } else {
- for (d = 0, c |= 0;16 > d;d++, c++) {
- b.axSetNumericProperty(c, f[d]);
- }
- }
- };
- c.prototype.copyRawDataFrom = function(b, c, d) {
- void 0 === c && (c = 0);
- void 0 === d && (d = !1);
- c >>>= 0;
- var f = this._matrix;
- if (d) {
- for (d = 0, c |= 0;16 > d;d++, c++) {
- f[a[d]] = b.axGetNumericProperty(c) || 0;
- }
- } else {
- for (d = 0, c |= 0;16 > d;d++, c++) {
- f[d] = b.axGetNumericProperty(c) || 0;
- }
- }
- };
- c.prototype.copyRowTo = function(a, b) {
- var c = a >>> 0 | 0, d = this._matrix;
- b.x = d[c];
- b.y = d[c + 4];
- b.z = d[c + 8];
- b.w = d[c + 12];
- };
- c.prototype.copyColumnTo = function(a, b) {
- var c = a >>> 0 << 2, d = this._matrix;
- b.x = d[c];
- b.y = d[c + 1];
- b.z = d[c + 2];
- b.w = d[c + 3];
- };
- c.prototype.copyRowFrom = function(a, b) {
- var c = a >>> 0 | 0, d = this._matrix;
- d[c] = b.x;
- d[c + 4] = b.y;
- d[c + 8] = b.z;
- d[c + 12] = b.w;
- };
- c.prototype.copyColumnFrom = function(a, b) {
- var c = a >>> 0 << 2, d = this._matrix;
- d[c] = b.x;
- d[c + 1] = b.y;
- d[c + 2] = b.z;
- d[c + 3] = b.w;
- };
- c.classInitializer = null;
- return c;
- }(b.ASObject);
- n.Matrix3D = c;
- })(n.geom || (n.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.EULER_ANGLES = "eulerAngles";
- d.AXIS_ANGLE = "axisAngle";
- d.QUATERNION = "quaternion";
- return d;
- }(b.ASObject);
- e.Orientation3D = n;
- })(e.geom || (e.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "fieldOfView", {get:function() {
- m("public flash.geom.PerspectiveProjection::get fieldOfView");
- }, set:function(a) {
- m("public flash.geom.PerspectiveProjection::set fieldOfView");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "projectionCenter", {get:function() {
- m("public flash.geom.PerspectiveProjection::get projectionCenter");
- }, set:function(a) {
- m("public flash.geom.PerspectiveProjection::set projectionCenter");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "focalLength", {get:function() {
- m("public flash.geom.PerspectiveProjection::get focalLength");
- }, set:function(a) {
- m("public flash.geom.PerspectiveProjection::set focalLength");
- }, enumerable:!0, configurable:!0});
- a.prototype.toMatrix3D = function() {
- m("public flash.geom.PerspectiveProjection::toMatrix3D");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.PerspectiveProjection = l;
- })(n.geom || (n.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 0);
- b.call(this);
- this.x = +a;
- this.y = +c;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "native_x", {get:function() {
- return this.x;
- }, set:function(a) {
- this.x = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_y", {get:function() {
- return this.y;
- }, set:function(a) {
- this.y = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.Point = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 0);
- this.x = a;
- this.y = b;
- };
- Object.defineProperty(d.prototype, "length", {get:function() {
- return Math.sqrt(this.x * this.x + this.y * this.y);
- }, enumerable:!0, configurable:!0});
- d.interpolate = function(a, b, d) {
- var k = 1 - d;
- return new this.sec.flash.geom.Point(a.x * d + b.x * k, a.y * d + b.y * k);
- };
- d.distance = function(a, b) {
- var d = b.x - a.x, k = b.y - a.y;
- return 0 === d ? Math.abs(k) : 0 === k ? Math.abs(d) : Math.sqrt(d * d + k * k);
- };
- d.polar = function(a, b) {
- a = +a;
- b = +b;
- return new this.sec.flash.geom.Point(a * Math.cos(b), a * Math.sin(b));
- };
- d.prototype.clone = function() {
- return new this.sec.flash.geom.Point(this.x, this.y);
- };
- d.prototype.offset = function(a, b) {
- this.x += +a;
- this.y += +b;
- };
- d.prototype.equals = function(a) {
- return this.x === a.x && this.y === a.y;
- };
- d.prototype.subtract = function(a) {
- return new this.sec.flash.geom.Point(this.x - a.x, this.y - a.y);
- };
- d.prototype.add = function(a) {
- return new this.sec.flash.geom.Point(this.x + a.x, this.y + a.y);
- };
- d.prototype.normalize = function(a) {
- if (0 !== this.x || 0 !== this.y) {
- a = +a / this.length, this.x *= a, this.y *= a;
- }
- };
- d.prototype.copyFrom = function(a) {
- this.x = a.x;
- this.y = a.y;
- };
- d.prototype.setTo = function(a, b) {
- this.x = +a;
- this.y = +b;
- };
- d.prototype.toTwips = function() {
- this.x = 20 * this.x | 0;
- this.y = 20 * this.y | 0;
- return this;
- };
- d.prototype.toPixels = function() {
- this.x /= 20;
- this.y /= 20;
- return this;
- };
- d.prototype.round = function() {
- this.x = Math.round(this.x);
- this.y = Math.round(this.y);
- return this;
- };
- d.prototype.toString = function() {
- return "(x=" + this.x + ", y=" + this.y + ")";
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.Point = n;
- })(e.geom || (e.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d, k) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- void 0 === k && (k = 0);
- b.call(this);
- this.x = +a;
- this.y = +c;
- this.width = +d;
- this.height = +k;
- }
- __extends(d, b);
- d.FromBounds = function(a) {
- var b = a.xMin, d = a.yMin;
- return new this.sec.flash.geom.Rectangle(b / 20, d / 20, (a.xMax - b) / 20, (a.yMax - d) / 20);
- };
- Object.defineProperty(d.prototype, "native_x", {get:function() {
- return this.x;
- }, set:function(a) {
- this.x = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_y", {get:function() {
- return this.y;
- }, set:function(a) {
- this.y = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_width", {get:function() {
- return this.width;
- }, set:function(a) {
- this.width = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_height", {get:function() {
- return this.height;
- }, set:function(a) {
- this.height = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "left", {get:function() {
- return this.x;
- }, set:function(a) {
- a = +a;
- this.width += this.x - a;
- this.x = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "right", {get:function() {
- return this.x + this.width;
- }, set:function(a) {
- this.width = +a - this.x;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "top", {get:function() {
- return this.y;
- }, set:function(a) {
- a = +a;
- this.height += this.y - a;
- this.y = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "bottom", {get:function() {
- return this.y + this.height;
- }, set:function(a) {
- this.height = +a - this.y;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "topLeft", {get:function() {
- return new this.sec.flash.geom.Point(this.left, this.top);
- }, set:function(a) {
- this.top = a.y;
- this.left = a.x;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "bottomRight", {get:function() {
- return new this.sec.flash.geom.Point(this.right, this.bottom);
- }, set:function(a) {
- this.bottom = a.y;
- this.right = a.x;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "size", {get:function() {
- return new this.sec.flash.geom.Point(this.width, this.height);
- }, set:function(a) {
- this.width = a.x;
- this.height = a.y;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "area", {get:function() {
- return this.width * this.height;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.geom.Rectangle(this.x, this.y, this.width, this.height);
- };
- d.prototype.isEmpty = function() {
- return 0 >= this.width || 0 >= this.height;
- };
- d.prototype.setEmpty = function() {
- this.height = this.width = this.y = this.x = 0;
- return this;
- };
- d.prototype.inflate = function(a, b) {
- a = +a;
- b = +b;
- this.x -= a;
- this.y -= b;
- this.width += 2 * a;
- this.height += 2 * b;
- };
- d.prototype.inflatePoint = function(a) {
- this.inflate(a.x, a.y);
- };
- d.prototype.offset = function(a, b) {
- this.x += +a;
- this.y += +b;
- };
- d.prototype.offsetPoint = function(a) {
- this.offset(a.x, a.y);
- };
- d.prototype.contains = function(a, b) {
- a = +a;
- b = +b;
- return a >= this.x && a < this.right && b >= this.y && b < this.bottom;
- };
- d.prototype.containsPoint = function(a) {
- return this.contains(a.x, a.y);
- };
- d.prototype.containsRect = function(a) {
- var b = a.x + a.width, d = a.y + a.height, k = this.x + this.width, r = this.y + this.height;
- return a.x >= this.x && a.x < k && a.y >= this.y && a.y < r && b > this.x && b <= k && d > this.y && d <= r;
- };
- d.prototype.intersection = function(a) {
- return this.clone().intersectInPlace(a);
- };
- d.prototype.intersects = function(a) {
- 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);
- };
- d.prototype.intersectInPlace = function(a) {
- var b = this.x, d = this.y, k = a.x, r = a.y, h = Math.max(b, k), b = Math.min(b + this.width, k + a.width);
- if (h <= b && (k = Math.max(d, r), a = Math.min(d + this.height, r + a.height), k <= a)) {
- return this.setTo(h, k, b - h, a - k), this;
- }
- this.setEmpty();
- return this;
- };
- d.prototype.intersectInPlaceInt32 = function(a) {
- var b = this.x | 0, d = this.y | 0, k = this.width | 0, r = this.height | 0, h = a.x | 0, q = a.width | 0, g = Math.max(b, h) | 0, b = Math.min(b + k | 0, h + q | 0) | 0;
- if (g <= b && (k = a.y | 0, h = a.height | 0, a = Math.max(d, k) | 0, d = Math.min(d + r | 0, k + h | 0), a <= d)) {
- return this.setTo(g, a, b - g, d - a), this;
- }
- this.setEmpty();
- return this;
- };
- d.prototype.union = function(a) {
- return this.clone().unionInPlace(a);
- };
- d.prototype.unionInPlace = function(a) {
- if (a.isEmpty()) {
- return this;
- }
- if (this.isEmpty()) {
- return this.copyFrom(a), this;
- }
- var b = Math.min(this.x, a.x), d = Math.min(this.y, a.y);
- this.setTo(b, d, Math.max(this.right, a.right) - b, Math.max(this.bottom, a.bottom) - d);
- return this;
- };
- d.prototype.equals = function(a) {
- return this === a || this.x === a.x && this.y === a.y && this.width === a.width && this.height === a.height;
- };
- d.prototype.copyFrom = function(a) {
- this.x = a.x;
- this.y = a.y;
- this.width = a.width;
- this.height = a.height;
- };
- d.prototype.setTo = function(a, b, d, k) {
- this.x = +a;
- this.y = +b;
- this.width = +d;
- this.height = +k;
- };
- d.prototype.toTwips = function() {
- this.x = 20 * this.x | 0;
- this.y = 20 * this.y | 0;
- this.width = 20 * this.width | 0;
- this.height = 20 * this.height | 0;
- return this;
- };
- d.prototype.getBaseWidth = function(a) {
- var b = Math.abs(Math.cos(a));
- a = Math.abs(Math.sin(a));
- return b * this.width + a * this.height;
- };
- d.prototype.getBaseHeight = function(a) {
- var b = Math.abs(Math.cos(a));
- return Math.abs(Math.sin(a)) * this.width + b * this.height;
- };
- d.prototype.toPixels = function() {
- this.x /= 20;
- this.y /= 20;
- this.width /= 20;
- this.height /= 20;
- return this;
- };
- d.prototype.snapInPlace = function() {
- var a = Math.ceil(this.x + this.width), b = 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 = b - this.y;
- return this;
- };
- d.prototype.roundInPlace = function() {
- var a = Math.round(this.x + this.width), b = 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 = b - this.y;
- return this;
- };
- d.prototype.toString = function() {
- return "(x=" + this.x + ", y=" + this.y + ", w=" + this.width + ", h=" + this.height + ")";
- };
- d.prototype.hashCode = function() {
- var a;
- a = 0 + (20 * this.x | 0);
- a = 37 * a + (20 * this.y | 0);
- a *= 37;
- a += 20 * this.width | 0;
- a *= 37;
- return a += 20 * this.height | 0;
- };
- d.prototype.writeExternal = function(a) {
- a.writeFloat(this.x);
- a.writeFloat(this.y);
- a.writeFloat(this.width);
- a.writeFloat(this.height);
- };
- d.prototype.readExternal = function(a) {
- this.x = a.readFloat();
- this.y = a.readFloat();
- this.width = a.readFloat();
- this.height = a.readFloat();
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.Rectangle = n;
- })(e.geom || (e.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = function(a) {
- function c(c) {
- a.call(this);
- c || this.sec.throwError("ArgumentError", b.Errors.NullPointerError, "displayObject");
- this._displayObject = c;
- }
- __extends(c, a);
- Object.defineProperty(c.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() {
- return this._displayObject._colorTransform.clone();
- }, set:function(a) {
- this._displayObject._setColorTransform(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.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() {
- return this._displayObject._getConcatenatedColorTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "pixelBounds", {get:function() {
- m("public flash.geom.Transform::get pixelBounds");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "matrix3D", {get:function() {
- var a = this._displayObject._matrix3D;
- return a && a.clone();
- }, set:function(a) {
- this.sec.flash.geom.Matrix3D.axIsType(a) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, a, "flash.geom.Matrix3D");
- a = a.rawData;
- this.matrix = new this.sec.flash.geom.Matrix(a.axGetPublicProperty(0), a.axGetPublicProperty(1), a.axGetPublicProperty(4), a.axGetPublicProperty(5), a.axGetPublicProperty(12), a.axGetPublicProperty(13));
- l("public flash.geom.Transform::set matrix3D");
- }, enumerable:!0, configurable:!0});
- c.prototype.getRelativeMatrix3D = function(a) {
- m("public flash.geom.Transform::getRelativeMatrix3D");
- };
- Object.defineProperty(c.prototype, "perspectiveProjection", {get:function() {
- m("public flash.geom.Transform::get perspectiveProjection");
- }, set:function(a) {
- m("public flash.geom.Transform::set perspectiveProjection");
- }, enumerable:!0, configurable:!0});
- c.classInitializer = null;
- c.classSymbols = null;
- c.instanceSymbols = null;
- return c;
- }(h.ASObject);
- n.Transform = d;
- })(n.geom || (n.geom = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- a.projectVector = function(a, b) {
- m("public flash.geom.Utils3D::static projectVector");
- };
- a.projectVectors = function(a, b, d, r) {
- m("public flash.geom.Utils3D::static projectVectors");
- };
- a.pointTowards = function(a, b, d, r, h) {
- m("public flash.geom.Utils3D::static pointTowards");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.Utils3D = l;
- })(n.geom || (n.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d, k) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- void 0 === k && (k = 0);
- b.call(this);
- this.x = +a;
- this.y = +c;
- this.z = +d;
- this.w = +k;
- }
- __extends(d, b);
- d.classInitializer = function() {
- this.X_AXIS = Object.freeze(this.Create(1, 0, 0, 0));
- this.Y_AXIS = Object.freeze(this.Create(1, 0, 0, 0));
- this.Z_AXIS = Object.freeze(this.Create(1, 0, 0, 0));
- };
- d.Create = function(a, b, d, k) {
- var r = Object.create(this.tPrototype);
- r.x = a;
- r.y = b;
- r.z = d;
- r.w = k;
- return r;
- };
- Object.defineProperty(d.prototype, "native_x", {get:function() {
- return this.x;
- }, set:function(a) {
- this.x = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_y", {get:function() {
- return this.y;
- }, set:function(a) {
- this.y = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_z", {get:function() {
- return this.z;
- }, set:function(a) {
- this.z = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "native_w", {get:function() {
- return this.w;
- }, set:function(a) {
- this.w = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "length", {get:function() {
- return Math.sqrt(this.lengthSquared);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "lengthSquared", {get:function() {
- return this.x * this.x + this.y * this.y + this.z * this.z;
- }, enumerable:!0, configurable:!0});
- d.angleBetween = function(a, b) {
- return Math.acos(a.dotProduct(b) / (a.length * b.length));
- };
- d.distance = function(a, b) {
- return a.subtract(b).length;
- };
- d.prototype.dotProduct = function(a) {
- return this.x * a.x + this.y * a.y + this.z * a.z;
- };
- d.prototype.crossProduct = function(a) {
- return new this.sec.flash.geom.Vector3D(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.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;
- };
- d.prototype.scaleBy = function(a) {
- a = +a;
- this.x *= a;
- this.y *= a;
- this.z *= a;
- };
- d.prototype.incrementBy = function(a) {
- this.x += a.x;
- this.y += a.y;
- this.z += a.z;
- };
- d.prototype.decrementBy = function(a) {
- this.x -= a.x;
- this.y -= a.y;
- this.z -= a.z;
- };
- d.prototype.add = function(a) {
- return new this.sec.flash.geom.Vector3D(this.x + a.x, this.y + a.y, this.z + a.z);
- };
- d.prototype.subtract = function(a) {
- return new this.sec.flash.geom.Vector3D(this.x - a.x, this.y - a.y, this.z - a.z);
- };
- d.prototype.negate = function() {
- this.x = -this.x;
- this.y = -this.y;
- this.z = -this.z;
- };
- d.prototype.equals = function(a, b) {
- return this.x === a.x && this.y === a.y && this.z === a.z && (!b || this.w === a.w);
- };
- d.prototype.nearEquals = function(a, b, d) {
- return Math.abs(this.x - a.x) < b && Math.abs(this.y - a.y) < b && Math.abs(this.z - a.z) < b && (!d || Math.abs(this.w - a.w) < b);
- };
- d.prototype.project = function() {
- this.x /= this.w;
- this.y /= this.w;
- this.z /= this.w;
- };
- d.prototype.copyFrom = function(a) {
- this.x = a.x;
- this.y = a.y;
- this.z = a.z;
- };
- d.prototype.setTo = function(a, b, d) {
- this.x = +a;
- this.y = +b;
- this.z = +d;
- };
- d.prototype.clone = function() {
- return new this.sec.flash.geom.Vector3D(this.x, this.y, this.z, this.w);
- };
- d.prototype.toString = function() {
- return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
- };
- return d;
- }(b.ASObject);
- e.Vector3D = n;
- })(e.geom || (e.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "active", {get:function() {
- l("public flash.accessibility.Accessibility::get active");
- return b._active;
- }, enumerable:!0, configurable:!0});
- b.sendEvent = function(a, b, c, d) {
- m("public flash.accessibility.Accessibility::static sendEvent");
- };
- b.updateProperties = function() {
- m("public flash.accessibility.Accessibility::static updateProperties");
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- b._active = !1;
- return b;
- }(b.ASObject);
- n.Accessibility = d;
- })(n.accessibility || (n.accessibility = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.AccessibilityImplementation = n;
- })(e.accessibility || (e.accessibility = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.AccessibilityProperties = n;
- })(e.accessibility || (e.accessibility = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k) {
- b.call(this);
- this._type = m(a);
- this._bubbles = !!f;
- this._cancelable = !!k;
- this._currentTarget = this._target = null;
- this._eventPhase = n.EventPhase.AT_TARGET;
- this._isDefaultPrevented = this._stopImmediatePropagation = this._stopPropagation = !1;
- }
- __extends(a, b);
- a.getInstance = function(a, b, d) {
- void 0 === b && (b = !1);
- void 0 === d && (d = !1);
- var r = this._instances[a];
- r || (r = new this.sec.flash.events.Event(a, b, d), this._instances[a] = r);
- r._bubbles = b;
- r._cancelable = d;
- return r;
- };
- a.getBroadcastInstance = function(a, b, d) {
- void 0 === b && (b = !1);
- void 0 === d && (d = !1);
- var r = this._instances[a];
- r || (r = new this.sec.flash.events.Event(a, b, d), this._instances[a] = r);
- r._isBroadcastEvent = !0;
- r._bubbles = b;
- r._cancelable = d;
- return r;
- };
- a.isBroadcastEventType = function(b) {
- switch(b) {
- case a.ENTER_FRAME:
- ;
- case a.EXIT_FRAME:
- ;
- case a.FRAME_CONSTRUCTED:
- ;
- case a.RENDER:
- ;
- case a.ACTIVATE:
- ;
- case a.DEACTIVATE:
- return !0;
- }
- return !1;
- };
- Object.defineProperty(a.prototype, "type", {get:function() {
- return this._type;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "bubbles", {get:function() {
- return this._bubbles;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "cancelable", {get:function() {
- return this._cancelable;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "target", {get:function() {
- return this._target;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "currentTarget", {get:function() {
- return this._currentTarget;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "eventPhase", {get:function() {
- return this._eventPhase;
- }, enumerable:!0, configurable:!0});
- a.prototype.stopPropagation = function() {
- this._stopPropagation = !0;
- };
- a.prototype.stopImmediatePropagation = function() {
- this._stopImmediatePropagation = this._stopPropagation = !0;
- };
- a.prototype.preventDefault = function() {
- this._cancelable && (this._isDefaultPrevented = !0);
- };
- a.prototype.isDefaultPrevented = function() {
- return this._isDefaultPrevented;
- };
- a.prototype.isBroadcastEvent = function() {
- return !!this._isBroadcastEvent;
- };
- a.prototype.clone = function() {
- return new this.sec.flash.events.Event(this._type, this._bubbles, this._cancelable);
- };
- a.prototype.toString = function() {
- return this.formatToString("Event", "type", "bubbles", "cancelable", "eventPhase");
- };
- a.prototype.formatToString = function(a) {
- for (var b = [], d = 1;d < arguments.length;d++) {
- b[d - 1] = arguments[d];
- }
- for (var d = "[" + a, r = 0;r < b.length;r++) {
- var h = b[r], q = this.axGetPublicProperty(h);
- "string" === typeof q && (q = '"' + q + '"');
- d += " " + h + "=" + q;
- }
- return d + "]";
- };
- a.classInitializer = function() {
- this._instances = e.ObjectUtilities.createMap();
- };
- a.ACTIVATE = "activate";
- a.ADDED = "added";
- a.ADDED_TO_STAGE = "addedToStage";
- a.CANCEL = "cancel";
- a.CHANGE = "change";
- a.CLEAR = "clear";
- a.CLOSE = "close";
- a.COMPLETE = "complete";
- a.CONNECT = "connect";
- a.COPY = "copy";
- a.CUT = "cut";
- a.DEACTIVATE = "deactivate";
- a.ENTER_FRAME = "enterFrame";
- a.FRAME_CONSTRUCTED = "frameConstructed";
- a.EXIT_FRAME = "exitFrame";
- a.FRAME_LABEL = "frameLabel";
- a.ID3 = "id3";
- a.INIT = "init";
- a.MOUSE_LEAVE = "mouseLeave";
- a.OPEN = "open";
- a.PASTE = "paste";
- a.REMOVED = "removed";
- a.REMOVED_FROM_STAGE = "removedFromStage";
- a.RENDER = "render";
- a.RESIZE = "resize";
- a.SCROLL = "scroll";
- a.TEXT_INTERACTION_MODE_CHANGE = "textInteractionModeChange";
- a.SELECT = "select";
- a.SELECT_ALL = "selectAll";
- a.SOUND_COMPLETE = "soundComplete";
- a.TAB_CHILDREN_CHANGE = "tabChildrenChange";
- a.TAB_ENABLED_CHANGE = "tabEnabledChange";
- a.TAB_INDEX_CHANGE = "tabIndexChange";
- a.UNLOAD = "unload";
- a.FULLSCREEN = "fullScreen";
- a.CONTEXT3D_CREATE = "context3DCreate";
- a.TEXTURE_READY = "textureReady";
- a.VIDEO_FRAME = "videoFrame";
- a.SUSPEND = "suspend";
- a.AVM1_INIT = "initialize";
- a.AVM1_CONSTRUCT = "construct";
- a.AVM1_LOAD = "load";
- return a;
- }(b.ASObject);
- n.Event = l;
- })(n.events || (n.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = e.isNullOrUndefined, d = function() {
- return function(a, b, c) {
- this.listener = a;
- this.useCapture = b;
- this.priority = c;
- };
- }(), a = function() {
- function a() {
- this._aliasCount = 0;
- this._entries = [];
- }
- a.prototype.isEmpty = function() {
- return 0 === this._entries.length;
- };
- a.prototype.insert = function(a, b, c) {
- for (var f = this._entries, k = f.length, v = k - 1;0 <= v;v--) {
- var h = f[v];
- if (h.listener === a) {
- return;
- }
- if (c > h.priority) {
- k = v;
- } else {
- break;
- }
- }
- f = this.ensureNonAliasedEntries();
- f.splice(k, 0, new d(a, b, c));
- };
- a.prototype.ensureNonAliasedEntries = function() {
- var a = this._entries;
- 0 < this._aliasCount && (a = this._entries = a.slice(), this._aliasCount = 0);
- return a;
- };
- a.prototype.remove = function(a) {
- for (var b = this._entries, c = 0;c < b.length;c++) {
- if (b[c].listener === a) {
- this.ensureNonAliasedEntries().splice(c, 1);
- break;
- }
- }
- };
- a.prototype.snapshot = function() {
- this._aliasCount++;
- return this._entries;
- };
- a.prototype.releaseSnapshot = function(a) {
- this._entries === a && 0 < this._aliasCount && this._aliasCount--;
- };
- return a;
- }(), c = function() {
- function a() {
- this.reset();
- }
- a.prototype.reset = function() {
- this._queues = Object.create(null);
- };
- a.prototype.add = function(a, b) {
- var c = this._queues[a] || (this._queues[a] = []);
- 0 <= c.indexOf(b) || c.push(b);
- };
- a.prototype.remove = function(a, b) {
- var c = this._queues[a], d = c.indexOf(b);
- c[d] = null;
- };
- a.prototype.dispatchEvent = function(a) {
- var b = this._queues[a._type];
- if (b) {
- for (var c = 0, d = 0;d < b.length;d++) {
- var f = b[d];
- null === f ? c++ : f.dispatchEvent(a);
- }
- if (16 < c && c > b.length >> 1) {
- c = [];
- for (d = 0;d < b.length;d++) {
- b[d] && c.push(b[d]);
- }
- this._queues[a.type] = c;
- }
- }
- };
- a.prototype.getQueueLength = function(a) {
- return this._queues[a] ? this._queues[a].length : 0;
- };
- return a;
- }();
- n.BroadcastEventDispatchQueue = c;
- var f = function(d) {
- function f(a) {
- void 0 === a && (a = null);
- d.call(this);
- this._fieldsInitialized || this._initializeFields(a || this);
- }
- __extends(f, d);
- f.classInitializer = function() {
- this.broadcastEventDispatchQueue = new c;
- };
- f.prototype._initializeFields = function(a) {
- this._fieldsInitialized = !0;
- this._target = a;
- this._targetOrBubblingListeners = this._captureListeners = null;
- };
- f.prototype.toString = function() {
- return this.sec.AXObject.dPrototype.$BgtoString.axCall(this);
- };
- f.prototype._getListenersForType = function(a, b) {
- var c = a ? this._captureListeners : this._targetOrBubblingListeners;
- return c ? c[b] : null;
- };
- f.prototype._getListeners = function(a) {
- return a ? this._captureListeners || (this._captureListeners = Object.create(null)) : this._targetOrBubblingListeners || (this._targetOrBubblingListeners = Object.create(null));
- };
- f.prototype.addEventListener = function(c, d, f, k, v) {
- void 0 === f && (f = !1);
- void 0 === k && (k = 0);
- void 0 === v && (v = !1);
- (2 > arguments.length || 5 < arguments.length) && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/addEventListener()", 2, arguments.length);
- b.axIsCallable(d) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, d, "Function");
- l(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "type");
- c = m(c);
- f = !!f;
- k |= 0;
- v = !!v;
- var h = this._getListeners(f);
- (h[c] || (h[c] = new a)).insert(d, f, k);
- !f && n.Event.isBroadcastEventType(c) && this.sec.flash.events.EventDispatcher.axClass.broadcastEventDispatchQueue.add(c, this);
- };
- f.prototype.removeEventListener = function(a, c, d) {
- void 0 === d && (d = !1);
- (2 > arguments.length || 3 < arguments.length) && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/removeEventListener()", 2, arguments.length);
- b.axIsCallable(c) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, c, "Function");
- l(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "type");
- a = m(a);
- var f = this._getListeners(!!d), k = f[a];
- k && (k.remove(c), k.isEmpty() && (!d && n.Event.isBroadcastEventType(a) && this.sec.flash.events.EventDispatcher.axClass.broadcastEventDispatchQueue.remove(a, this), f[a] = null));
- };
- f.prototype._hasTargetOrBubblingEventListener = function(a) {
- return !(!this._targetOrBubblingListeners || !this._targetOrBubblingListeners[a]);
- };
- f.prototype._hasCaptureEventListener = function(a) {
- return !(!this._captureListeners || !this._captureListeners[a]);
- };
- f.prototype._hasEventListener = function(a) {
- return this._hasTargetOrBubblingEventListener(a) || this._hasCaptureEventListener(a);
- };
- f.prototype.hasEventListener = function(a) {
- 1 !== arguments.length && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length);
- l(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "type");
- a = m(a);
- return this._hasEventListener(a);
- };
- f.prototype.willTrigger = function(a) {
- 1 !== arguments.length && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length);
- l(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "type");
- a = m(a);
- if (this._hasEventListener(a)) {
- return !0;
- }
- if (this.sec.flash.display.DisplayObject.axIsType(this)) {
- var c = this._parent;
- do {
- if (c._hasEventListener(a)) {
- return !0;
- }
- } while (c = c._parent);
- }
- return !1;
- };
- f.prototype._skipDispatchEvent = function(a) {
- if (this._hasEventListener(a.type)) {
- return !1;
- }
- if (!a.isBroadcastEvent() && a._bubbles && this.sec.flash.display.DisplayObject.axIsType(this)) {
- for (var b = this._parent;b;b = b._parent) {
- if (b._hasEventListener(a.type)) {
- return !1;
- }
- }
- }
- return !0;
- };
- f.prototype.dispatchEvent = function(a) {
- 1 !== arguments.length && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/dispatchEvent()", 1, arguments.length);
- if (this._skipDispatchEvent(a)) {
- return !0;
- }
- var c = a._type, d = this._target, k = !0, v = [];
- if (!a.isBroadcastEvent() && this.sec.flash.display.DisplayObject.axIsType(this)) {
- for (var h = this._parent;h;) {
- h._hasEventListener(c) && v.push(h), h = h._parent;
- }
- for (h = v.length - 1;0 <= h && k;h--) {
- var l = v[h];
- if (l._hasCaptureEventListener(c)) {
- var e = l._getListenersForType(!0, c), k = f.callListeners(e, a, d, l, n.EventPhase.CAPTURING_PHASE)
- }
- }
- }
- k && (e = this._getListenersForType(!1, c)) && (k = f.callListeners(e, a, d, d, n.EventPhase.AT_TARGET));
- if (!a.isBroadcastEvent() && k && a.bubbles) {
- for (h = 0;h < v.length && k;h++) {
- l = v[h], l._hasTargetOrBubblingEventListener(c) && (e = l._getListenersForType(!1, c), k = f.callListeners(e, a, d, l, n.EventPhase.BUBBLING_PHASE));
- }
- }
- return !a._isDefaultPrevented;
- };
- f.callListeners = function(a, b, c, d, f) {
- if (a.isEmpty()) {
- return !0;
- }
- b._target && (b = b.axCallPublicProperty("clone", null));
- var k = a.snapshot();
- try {
- for (var h = 0;h < k.length;h++) {
- var r = k[h];
- b._target = c;
- b._currentTarget = d;
- b._eventPhase = f;
- "function" === typeof r.listener ? r.listener(b) : r.listener.call(r.listener, b);
- if (b._stopImmediatePropagation) {
- break;
- }
- }
- } catch (l) {
- e.Debug.warning("Uncaught error in handler for event " + b._type + ": ", l);
- }
- a.releaseSnapshot(k);
- return !b._stopPropagation;
- };
- return f;
- }(h.ASObject);
- n.EventDispatcher = f;
- })(n.events || (n.events = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.CAPTURING_PHASE = 1;
- d.AT_TARGET = 2;
- d.BUBBLING_PHASE = 3;
- return d;
- }(b.ASObject);
- e.EventPhase = n;
- })(e.events || (e.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a(a, f, k, h) {
- b.call(this, a, f, k);
- this._text = h;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "text", {get:function() {
- return this._text;
- }, set:function(a) {
- this._text = a;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.events.TextEvent(this.type, this.bubbles, this.cancelable, this.text);
- };
- a.prototype.toString = function() {
- return this.formatToString("TextEvent", "type", "bubbles", "cancelable", "text");
- };
- a.prototype.copyNativeData = function(a) {
- m("public flash.events.TextEvent::copyNativeData");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.LINK = "link";
- a.TEXT_INPUT = "textInput";
- return a;
- }(b.events.Event);
- h.TextEvent = l;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = "");
- void 0 === h && (h = 0);
- b.call(this, a, c, d, k);
- this.setID(h);
- }
- __extends(d, b);
- 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 this.sec.flash.events.ErrorEvent(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.classSymbols = null;
- d.instanceSymbols = null;
- d.ERROR = "error";
- return d;
- }(b.events.TextEvent);
- h.ErrorEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = "");
- void 0 === h && (h = null);
- b.call(this, a, c, d, k);
- this.$Bgerror = h;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "error", {get:function() {
- return this.$Bgerror;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.AsyncErrorEvent(this._type, this._bubbles, this._cancelable, this._text, this.$Bgerror);
- };
- d.prototype.toString = function() {
- return this.formatToString("AsyncErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text", "error");
- };
- d.ASYNC_ERROR = "asyncError";
- d.classInitializer = null;
- return d;
- }(b.events.ErrorEvent);
- h.AsyncErrorEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = null);
- b.call(this, a, c, d);
- this.device = k;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.DEVICE_ADDED = "deviceAdded";
- d.DEVICE_REMOVED = "deviceRemoved";
- return d;
- }(b.events.Event);
- h.GameInputEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.AVMX.axCoerceString, l = e.Debug.somewhatImplemented, d = function(a) {
- function b(c, d, h, e, q, g, p, v, l) {
- void 0 === d && (d = !0);
- void 0 === h && (h = !1);
- void 0 === e && (e = null);
- void 0 === q && (q = 0);
- void 0 === g && (g = 0);
- void 0 === p && (p = !1);
- void 0 === v && (v = !1);
- void 0 === l && (l = !1);
- a.call(this, c, d, h);
- this._phase = m(e);
- this._localX = +q;
- this._localY = +g;
- this._ctrlKey = !!p;
- this._altKey = !!v;
- this._shiftKey = !!l;
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "localX", {get:function() {
- return this._localX;
- }, set:function(a) {
- this._localX = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "localY", {get:function() {
- return this._localY;
- }, set:function(a) {
- this._localY = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "stageX", {get:function() {
- l("public flash.events.GestureEvent::stageX");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "stageY", {get:function() {
- l("public flash.events.GestureEvent::stageY");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ctrlKey", {get:function() {
- return this._ctrlKey;
- }, set:function(a) {
- this._ctrlKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "altKey", {get:function() {
- return this._altKey;
- }, set:function(a) {
- this._altKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "shiftKey", {get:function() {
- return this._shiftKey;
- }, set:function(a) {
- this._shiftKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "phase", {get:function() {
- return this._phase;
- }, set:function(a) {
- this._phase = m(a);
- }, enumerable:!0, configurable:!0});
- b.prototype.updateAfterEvent = function() {
- l("public flash.events.GestureEvent::updateAfterEvent");
- };
- b.prototype.NativeCtor = function(a, b, c, d, q, g) {
- this._phase = m(a);
- this._localX = +b;
- this._localY = +c;
- this._ctrlKey = !!d;
- this._altKey = !!q;
- this._shiftKey = !!g;
- };
- b.prototype.clone = function() {
- return new this.sec.flash.events.GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey);
- };
- b.prototype.toString = function() {
- return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "ctrlKey", "altKey", "shiftKey");
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- b.GESTURE_TWO_FINGER_TAP = "gestureTwoFingerTap";
- return b;
- }(b.events.Event);
- h.GestureEvent = d;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = 0);
- b.call(this, a, c, d);
- this._status = k | 0;
- }
- __extends(d, b);
- d.prototype._setStatus = function(a) {
- this._status = a;
- };
- Object.defineProperty(d.prototype, "status", {get:function() {
- return this._status;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status);
- };
- d.prototype.toString = function() {
- return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status");
- };
- d.classInitializer = null;
- d.HTTP_STATUS = "httpStatus";
- d.HTTP_RESPONSE_STATUS = "httpResponseStatus";
- return d;
- }(b.events.Event);
- h.HTTPStatusEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = "");
- void 0 === h && (h = 0);
- b.call(this, a, c, d, k, h);
- }
- __extends(d, b);
- d.prototype.clone = function() {
- return new this.sec.flash.events.IOErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID);
- };
- d.prototype.toString = function() {
- return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "text", "errorID");
- };
- d.classInitializer = 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;
- }(b.events.ErrorEvent);
- h.IOErrorEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h, e, q, g, p) {
- void 0 === c && (c = !0);
- void 0 === d && (d = !1);
- void 0 === k && (k = 0);
- void 0 === h && (h = 0);
- void 0 === e && (e = 0);
- void 0 === q && (q = !1);
- void 0 === g && (g = !1);
- void 0 === p && (p = !1);
- b.call(this, a, c, d);
- this._charCode = k >>> 0;
- this._keyCode = h >>> 0;
- this._keyLocation = e >>> 0;
- this._ctrlKey = !!q;
- this._altKey = !!g;
- this._shiftKey = !!p;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "charCode", {get:function() {
- return this._charCode;
- }, set:function(a) {
- this._charCode = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "keyCode", {get:function() {
- return this._keyCode;
- }, set:function(a) {
- this._keyCode = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "keyLocation", {get:function() {
- return this._keyLocation;
- }, set:function(a) {
- this._keyLocation = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "ctrlKey", {get:function() {
- return this._ctrlKey;
- }, set:function(a) {
- this._ctrlKey = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "altKey", {get:function() {
- return this._altKey;
- }, set:function(a) {
- this._altKey = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "shiftKey", {get:function() {
- return this._shiftKey;
- }, set:function(a) {
- this._shiftKey = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.KeyboardEvent(this.type, this.bubbles, this.cancelable, this.charCode, this.keyCode, this.keyLocation, this.ctrlKey, this.altKey, this.shiftKey);
- };
- d.prototype.toString = function() {
- return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey");
- };
- d.prototype.updateAfterEvent = function() {
- this.sec.player.requestRendering();
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.KEY_DOWN = "keyDown";
- d.KEY_UP = "keyUp";
- return d;
- }(b.events.Event);
- h.KeyboardEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a(a, f, k, h, e, q, g, p, v, l, n) {
- void 0 === f && (f = !0);
- void 0 === k && (k = !1);
- void 0 === h && (h = void 0);
- void 0 === e && (e = void 0);
- void 0 === q && (q = null);
- void 0 === g && (g = !1);
- void 0 === p && (p = !1);
- void 0 === v && (v = !1);
- void 0 === l && (l = !1);
- void 0 === n && (n = 0);
- b.call(this, a, f, k);
- this._localX = h;
- this._localY = e;
- this._relatedObject = q;
- this._ctrlKey = g;
- this._altKey = p;
- this._shiftKey = v;
- this._buttonDown = l;
- this._delta = n;
- }
- __extends(a, b);
- a.typeFromDOMType = function(b) {
- switch(b) {
- case "click":
- return a.CLICK;
- case "dblclick":
- return a.DOUBLE_CLICK;
- case "mousedown":
- return a.MOUSE_DOWN;
- case "mouseout":
- ;
- case "mouseover":
- ;
- case "mousemove":
- return a.MOUSE_MOVE;
- case "mouseup":
- return a.MOUSE_UP;
- default:
- m(b);
- }
- };
- Object.defineProperty(a.prototype, "localX", {get:function() {
- return this._localX / 20 | 0;
- }, set:function(a) {
- this._localX = 20 * a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "localY", {get:function() {
- return this._localY / 20 | 0;
- }, set:function(a) {
- this._localY = 20 * a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "stageX", {get:function() {
- return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().x / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "stageY", {get:function() {
- return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().y / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "movementX", {get:function() {
- return this._movementX || 0;
- }, set:function(a) {
- this._movementX = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "movementY", {get:function() {
- return this._movementY || 0;
- }, set:function(a) {
- this._movementY = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "delta", {get:function() {
- return this._delta;
- }, set:function(a) {
- this._delta = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ctrlKey", {get:function() {
- return this._ctrlKey;
- }, set:function(a) {
- this._ctrlKey = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "altKey", {get:function() {
- return this._altKey;
- }, set:function(a) {
- this._altKey = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "shiftKey", {get:function() {
- return this._shiftKey;
- }, set:function(a) {
- this._shiftKey = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "buttonDown", {get:function() {
- return this._buttonDown;
- }, set:function(a) {
- this._buttonDown = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "relatedObject", {get:function() {
- return this._relatedObject;
- }, set:function(a) {
- this._relatedObject = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "isRelatedObjectInaccessible", {get:function() {
- return this._isRelatedObjectInaccessible;
- }, set:function(a) {
- this._isRelatedObjectInaccessible = a;
- }, enumerable:!0, configurable:!0});
- a.prototype.updateAfterEvent = function() {
- this.sec.player.requestRendering();
- };
- a.prototype._getGlobalPoint = function() {
- var a = this._position;
- a || (a = this._position = new this.sec.flash.geom.Point);
- this.target ? (a.setTo(this._localX, this._localY), this._target._getConcatenatedMatrix().transformPointInPlace(a)) : a.setTo(0, 0);
- return a;
- };
- a.prototype.clone = function() {
- return new this.sec.flash.events.MouseEvent(this.type, this.bubbles, this.cancelable, this.localX, this.localY, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey, this.buttonDown, this.delta);
- };
- a.prototype.toString = function() {
- return this.formatToString("MouseEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.CLICK = "click";
- a.DOUBLE_CLICK = "doubleClick";
- a.MOUSE_DOWN = "mouseDown";
- a.MOUSE_MOVE = "mouseMove";
- a.MOUSE_OUT = "mouseOut";
- a.MOUSE_OVER = "mouseOver";
- a.MOUSE_UP = "mouseUp";
- a.RELEASE_OUTSIDE = "releaseOutside";
- a.MOUSE_WHEEL = "mouseWheel";
- a.ROLL_OUT = "rollOut";
- a.ROLL_OVER = "rollOver";
- a.MIDDLE_CLICK = "middleClick";
- a.MIDDLE_MOUSE_DOWN = "middleMouseDown";
- a.MIDDLE_MOUSE_UP = "middleMouseUp";
- a.RIGHT_CLICK = "rightClick";
- a.RIGHT_MOUSE_DOWN = "rightMouseDown";
- a.RIGHT_MOUSE_UP = "rightMouseUp";
- a.CONTEXT_MENU = "contextMenu";
- return a;
- }(b.events.Event);
- h.MouseEvent = l;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = null);
- b.call(this, a, c, d);
- this._info = k;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "info", {get:function() {
- return this._info;
- }, set:function(a) {
- this._info = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.NetStatusEvent(this.type, this.bubbles, this.cancelable, this.info);
- };
- d.prototype.toString = function() {
- return this.formatToString("NetStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "info");
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NET_STATUS = "netStatus";
- return d;
- }(b.events.Event);
- h.NetStatusEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = 0);
- void 0 === h && (h = 0);
- b.call(this, a, c, d);
- this._bytesLoaded = k;
- this._bytesTotal = h;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "bytesLoaded", {get:function() {
- return this._bytesLoaded;
- }, set:function(a) {
- this._bytesLoaded = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "bytesTotal", {get:function() {
- return this._bytesTotal;
- }, set:function(a) {
- this._bytesTotal = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.ProgressEvent(this._type, this._bubbles, this._cancelable, this._bytesLoaded, this._bytesTotal);
- };
- d.prototype.toString = function() {
- return this.formatToString("ProgressEvent", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal");
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.PROGRESS = "progress";
- d.SOCKET_DATA = "socketData";
- return d;
- }(b.events.Event);
- h.ProgressEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k, h) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = "");
- void 0 === h && (h = 0);
- b.call(this, a, c, d, k, h);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.SECURITY_ERROR = "securityError";
- return d;
- }(b.events.ErrorEvent);
- h.SecurityErrorEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(e) {
- var m = function(h) {
- function d(a, c, d, k, r) {
- void 0 === c && (c = !1);
- void 0 === d && (d = !1);
- void 0 === k && (k = "");
- void 0 === r && (r = "");
- h.call(this, a, c, d);
- this._code = b.axCoerceString(k);
- this._level = b.axCoerceString(r);
- }
- __extends(d, h);
- Object.defineProperty(d.prototype, "level", {get:function() {
- return this._level;
- }, set:function(a) {
- this._level = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "code", {get:function() {
- return this._code;
- }, set:function(a) {
- this._code = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.events.StatusEvent(this._type, this._bubbles, this._cancelable, this._code, this._level);
- };
- d.prototype.toString = function() {
- return this.formatToString("StatusEvent", "type", "bubbles", "cancelable", "eventPhase", "code", "level");
- };
- d.classInitializer = null;
- d.STATUS = "status";
- return d;
- }(h.events.Event);
- e.StatusEvent = m;
- })(h.events || (h.events = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d) {
- b.call(this, a, c, d);
- }
- __extends(d, b);
- d.prototype.clone = function() {
- return new this.sec.flash.events.TimerEvent(this.type, this.bubbles, this.cancelable);
- };
- d.prototype.toString = function() {
- return this.formatToString("TimerEvent", "type", "bubbles", "cancelable", "eventPhase");
- };
- d.prototype.updateAfterEvent = function() {
- this.sec.player.requestRendering();
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.TIMER = "timer";
- d.TIMER_COMPLETE = "timerComplete";
- return d;
- }(b.events.Event);
- h.TimerEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = function(b) {
- function a(a, f, k, h, e, q, g, p, v, l, n, m, t, G) {
- void 0 === f && (f = !0);
- void 0 === k && (k = !1);
- b.call(this, a, f, k);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "touchPointID", {get:function() {
- return this._touchPointID;
- }, set:function(a) {
- this._touchPointID = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "isPrimaryTouchPoint", {get:function() {
- return this._isPrimaryTouchPoint;
- }, set:function(a) {
- this._isPrimaryTouchPoint = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "localX", {get:function() {
- return this._localX;
- }, set:function(a) {
- this._localX = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "localY", {get:function() {
- return this._localY;
- }, set:function(a) {
- this._localY = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "sizeX", {get:function() {
- return this._sizeX;
- }, set:function(a) {
- this._sizeX = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "sizeY", {get:function() {
- return this._sizeY;
- }, set:function(a) {
- this._sizeY = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "pressure", {get:function() {
- return this._pressure;
- }, set:function(a) {
- this._pressure = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "relatedObject", {get:function() {
- return this._relatedObject;
- }, set:function(a) {
- this._relatedObject = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ctrlKey", {get:function() {
- return this._ctrlKey;
- }, set:function(a) {
- this._ctrlKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "altKey", {get:function() {
- return this._altKey;
- }, set:function(a) {
- this._altKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "shiftKey", {get:function() {
- return this._shiftKey;
- }, set:function(a) {
- this._shiftKey = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "stageX", {get:function() {
- m("TouchEvent::get stageX");
- return this._localX;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "stageY", {get:function() {
- m("TouchEvent::get stageY");
- return this._localY;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "isRelatedObjectInaccessible", {get:function() {
- return this._isRelatedObjectInaccessible;
- }, set:function(a) {
- this._isRelatedObjectInaccessible = a;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.events.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);
- };
- a.prototype.toString = function() {
- return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", "altKey", "shiftKey");
- };
- a.prototype.updateAfterEvent = function() {
- this.sec.player.requestRendering();
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.TOUCH_BEGIN = "touchBegin";
- a.TOUCH_END = "touchEnd";
- a.TOUCH_MOVE = "touchMove";
- a.TOUCH_OVER = "touchOver";
- a.TOUCH_OUT = "touchOut";
- a.TOUCH_ROLL_OVER = "touchRollOver";
- a.TOUCH_ROLL_OUT = "touchRollOut";
- a.TOUCH_TAP = "touchTap";
- a.PROXIMITY_BEGIN = "proximityBegin";
- a.PROXIMITY_END = "proximityEnd";
- a.PROXIMITY_MOVE = "proximityMove";
- a.PROXIMITY_OUT = "proximityOut";
- a.PROXIMITY_OVER = "proximityOver";
- a.PROXIMITY_ROLL_OUT = "proximityRollOut";
- a.PROXIMITY_ROLL_OVER = "proximityRollOver";
- return a;
- }(b.events.Event);
- h.TouchEvent = l;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k) {
- void 0 === a && (a = "uncaughtError");
- void 0 === c && (c = !0);
- void 0 === d && (d = !0);
- void 0 === k && (k = null);
- b.call(this, a, c, d, k);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.UNCAUGHT_ERROR = "uncaughtError";
- return d;
- }(b.events.ErrorEvent);
- h.UncaughtErrorEvent = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.events.EventDispatcher);
- h.UncaughtErrorEvents = e;
- })(b.events || (b.events = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.isNullOrUndefined, a = e.AVMX.axCoerceString, c = e.AVMX.checkNullParameter, f = e.Bounds, k = n.events;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Visible = 1] = "Visible";
- a[a.InvalidLineBounds = 2] = "InvalidLineBounds";
- a[a.InvalidFillBounds = 4] = "InvalidFillBounds";
- a[a.InvalidMatrix = 8] = "InvalidMatrix";
- a[a.InvalidInvertedMatrix = 16] = "InvalidInvertedMatrix";
- a[a.InvalidConcatenatedMatrix = 32] = "InvalidConcatenatedMatrix";
- a[a.InvalidInvertedConcatenatedMatrix = 64] = "InvalidInvertedConcatenatedMatrix";
- a[a.InvalidConcatenatedColorTransform = 128] = "InvalidConcatenatedColorTransform";
- a[a.Constructed = 256] = "Constructed";
- a[a.Destroyed = 512] = "Destroyed";
- a[a.NeedsLoadEvent = 1024] = "NeedsLoadEvent";
- a[a.OwnedByTimeline = 2048] = "OwnedByTimeline";
- a[a.AnimatedByTimeline = 4096] = "AnimatedByTimeline";
- a[a.HasFrameScriptPending = 8192] = "HasFrameScriptPending";
- a[a.ContainsFrameScriptPendingChildren = 16384] = "ContainsFrameScriptPendingChildren";
- a[a.ContainsMorph = 32768] = "ContainsMorph";
- a[a.CacheAsBitmap = 65536] = "CacheAsBitmap";
- a[a.HasPlaceObjectInitPending = 131072] = "HasPlaceObjectInitPending";
- a[a.DirtyMatrix = 1048576] = "DirtyMatrix";
- a[a.DirtyChildren = 2097152] = "DirtyChildren";
- a[a.DirtyGraphics = 4194304] = "DirtyGraphics";
- a[a.DirtyTextContent = 8388608] = "DirtyTextContent";
- a[a.DirtyBitmapData = 16777216] = "DirtyBitmapData";
- a[a.DirtyNetStream = 33554432] = "DirtyNetStream";
- a[a.DirtyColorTransform = 67108864] = "DirtyColorTransform";
- a[a.DirtyMask = 134217728] = "DirtyMask";
- a[a.DirtyClipDepth = 268435456] = "DirtyClipDepth";
- a[a.DirtyDescendents = 536870912] = "DirtyDescendents";
- a[a.DirtyMiscellaneousProperties = 1073741824] = "DirtyMiscellaneousProperties";
- 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";
- })(t.DisplayObjectFlags || (t.DisplayObjectFlags = {}));
- var r = t.DisplayObjectFlags;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Continue = 0] = "Continue";
- a[a.Stop = 1] = "Stop";
- a[a.Skip = 2] = "Skip";
- a[a.FrontToBack = 8] = "FrontToBack";
- a[a.Filter = 16] = "Filter";
- })(t.VisitorFlags || (t.VisitorFlags = {}));
- (function(a) {
- a[a.HitTestBounds = 0] = "HitTestBounds";
- a[a.HitTestBoundsAndMask = 1] = "HitTestBoundsAndMask";
- a[a.HitTestShape = 2] = "HitTestShape";
- a[a.Mouse = 3] = "Mouse";
- a[a.ObjectsUnderPoint = 4] = "ObjectsUnderPoint";
- a[a.Drop = 5] = "Drop";
- })(t.HitTestingType || (t.HitTestingType = {}));
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Bounds = 1] = "Bounds";
- a[a.Shape = 2] = "Shape";
- })(t.HitTestingResult || (t.HitTestingResult = {}));
- var u = 0, q = function(g) {
- function p() {
- g.call(this);
- this._fieldsInitialized || this._initializeFields();
- this._addReference();
- this._setFlags(256);
- }
- __extends(p, g);
- p.getNextSyncID = function() {
- return u++;
- };
- p.classInitializer = function() {
- this.reset();
- };
- p.reset = function() {
- this._advancableInstances = new e.WeakList;
- };
- p.prototype.createAnimatedDisplayObject = function(a, b, c) {
- var d = a.symbolClass, f = this.sec.flash.display.BitmapData.axClass;
- if (d === f || f.dPrototype.isPrototypeOf(d.dPrototype)) {
- d = this.sec.flash.display.Bitmap.axClass;
- }
- a = h.constructClassFromSymbol(a, d);
- b.flags & 32 && (a._name = b.name);
- a._setFlags(4096);
- a._animate(b);
- c && a.axInitializer();
- return a;
- };
- p.performFrameNavigation = function(a, c) {
- a ? this._runScripts = c : c = this._runScripts;
- b.enterTimeline("DisplayObject.InitFrame");
- this._advancableInstances.forEach(function(b) {
- b._initFrame(a);
- });
- b.leaveTimeline();
- b.enterTimeline("DisplayObject.EnterFrame");
- a && c && this._broadcastFrameEvent(k.Event.ENTER_FRAME);
- b.leaveTimeline();
- b.enterTimeline("DisplayObject.ConstructFrame");
- this._advancableInstances.forEach(function(a) {
- a._constructFrame();
- });
- b.leaveTimeline();
- if (c) {
- b.enterTimeline("DisplayObject.FrameConstructed");
- this._broadcastFrameEvent(k.Event.FRAME_CONSTRUCTED);
- b.leaveTimeline();
- b.enterTimeline("DisplayObject.EnqueueFrameScripts");
- var d = this.sec.flash.display.DisplayObjectContainer.axClass;
- this._advancableInstances.forEach(function(a) {
- d.axIsType(a) && !a.parent && a._enqueueFrameScripts();
- });
- this._stage._enqueueFrameScripts();
- b.leaveTimeline();
- b.enterTimeline("DisplayObject.RunFrameScript");
- var f = this.sec.flash.display.MovieClip.axClass;
- 1 === f.frameNavigationModel ? f.runAvm1FrameScripts() : f.runFrameScripts();
- b.leaveTimeline();
- b.enterTimeline("DisplayObject.ExitFrame");
- this._broadcastFrameEvent(k.Event.EXIT_FRAME);
- b.leaveTimeline();
- } else {
- t.MovieClip.reset();
- }
- a && (this._runScripts = !0);
- };
- p._broadcastFrameEvent = function(a) {
- var b = this.sec.flash.events;
- a = b.Event.axClass.getBroadcastInstance(a);
- b.EventDispatcher.axClass.broadcastEventDispatchQueue.dispatchEvent(a);
- };
- p.prototype._initializeFields = function() {
- g.prototype._initializeFields.call(this, this);
- this._id = this.sec.flash.display.DisplayObject.axClass.getNextSyncID();
- this._displayObjectFlags = 2085617767;
- this._stage = this._root = null;
- this._setInitialName();
- this._mask = this._parent = null;
- this._z = 0;
- this._scaleY = this._scaleX = 1;
- this._skewY = this._skewX = 0;
- this._scaleZ = 1;
- this._height = this._width = this._rotationZ = this._rotationY = this._rotationX = this._rotation = 0;
- this._filters = this._scrollRect = this._opaqueBackground = null;
- this._blendMode = t.BlendMode.NORMAL;
- this._scale9Grid = this._symbol ? this._symbol.scale9Grid : null;
- this._accessibilityProperties = this._loaderInfo = null;
- this._fillBounds = new f(0, 0, 0, 0);
- this._lineBounds = new f(0, 0, 0, 0);
- this._clipDepth = -1;
- var a = this.sec.flash.geom.Matrix;
- this._concatenatedMatrix = new a;
- this._invertedConcatenatedMatrix = new a;
- this._matrix = new a;
- this._invertedMatrix = new a;
- this._matrix3D = null;
- a = this.sec.flash.geom.ColorTransform;
- this._colorTransform = new a;
- this._concatenatedColorTransform = new a;
- this._depth = -1;
- this._ratio = 0;
- this._index = -1;
- this._maskedObject = null;
- this._mouseDown = this._mouseOver = !1;
- this._children = this._graphics = null;
- this._referenceCount = 0;
- };
- p.prototype._setInitialName = function() {
- this._name = "instance" + this.sec.flash.display.DisplayObject.axClass._instanceID++;
- };
- p.prototype._setParent = function(a, b) {
- var c = this._parent;
- this._parent = a;
- this._setDepth(b);
- if (a) {
- this._addReference();
- var d = 0;
- this._hasFlags(8192) && (d |= 16384);
- this._hasAnyFlags(r.Bubbling) && (d |= this._displayObjectFlags & r.Bubbling);
- d && a._propagateFlagsUp(d);
- }
- c && this._removeReference();
- };
- p.prototype._setDepth = function(a) {
- -1 < a ? this._setFlags(2048) : this._removeFlags(2048);
- this._depth = a;
- };
- p.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, b) {
- this._fillBounds.width = a;
- this._fillBounds.height = b;
- this._lineBounds.width = a;
- this._lineBounds.height = b;
- this._removeFlags(6);
- this._invalidateParentFillAndLineBounds(!0, !0);
- };
- p.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);
- };
- p.prototype._setFlags = function(a) {
- this._displayObjectFlags |= a;
- };
- p.prototype._setDirtyFlags = function(a) {
- this._displayObjectFlags |= a;
- this._parent && this._parent._propagateFlagsUp(536870912);
- };
- p.prototype._toggleFlags = function(a, b) {
- this._displayObjectFlags = b ? this._displayObjectFlags | a : this._displayObjectFlags & ~a;
- };
- p.prototype._removeFlags = function(a) {
- this._displayObjectFlags &= ~a;
- };
- p.prototype._hasFlags = function(a) {
- return (this._displayObjectFlags & a) === a;
- };
- p.prototype._hasAnyFlags = function(a) {
- return !!(this._displayObjectFlags & a);
- };
- p.prototype._propagateFlagsUp = function(a) {
- if (!this._hasFlags(a)) {
- this._setFlags(a);
- var b = this._parent;
- b && b._propagateFlagsUp(a);
- }
- };
- p.prototype._propagateFlagsDown = function(a) {
- this._setFlags(a);
- };
- p.prototype._findNearestAncestor = function(a, b) {
- for (var c = this;c;) {
- if (c._hasFlags(a) === b) {
- return c;
- }
- c = c._parent;
- }
- return null;
- };
- p.prototype._findFurthestAncestorOrSelf = function() {
- for (var a = this;a;) {
- if (!a._parent) {
- return a;
- }
- a = a._parent;
- }
- };
- p.prototype._isAncestor = function(a) {
- for (;a;) {
- if (a === this) {
- return !0;
- }
- a = a._parent;
- }
- return !1;
- };
- p._clampRotation = function(a) {
- a %= 360;
- 180 < a ? a -= 360 : -180 > a && (a += 360);
- return a;
- };
- p._getAncestors = function(a, b) {
- var c = p._path;
- for (c.length = 0;a && a !== b;) {
- c.push(a), a = a._parent;
- }
- return c;
- };
- p.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;
- };
- p.prototype._getInvertedConcatenatedMatrix = function() {
- this._hasFlags(64) && (this._getConcatenatedMatrix().invertInto(this._invertedConcatenatedMatrix), this._removeFlags(64));
- return this._invertedConcatenatedMatrix;
- };
- p.prototype._setMatrix = function(a, b) {
- if (b || !this._matrix.equals(a)) {
- var c = this._matrix;
- c.copyFrom(a);
- b && c.toTwipsInPlace();
- this._scaleX = c.getScaleX();
- this._scaleY = c.getScaleY();
- this._skewX = a.getSkewX();
- this._skewY = a.getSkewY();
- this._rotation = p._clampRotation(180 * this._skewY / Math.PI);
- this._removeFlags(8);
- this._setFlags(16);
- this._setDirtyFlags(1048576);
- this._invalidatePosition();
- }
- };
- p.prototype._getMatrix = function() {
- this._hasFlags(8) && (this._matrix.updateScaleAndRotation(this._scaleX, this._scaleY, this._skewX, this._skewY), this._removeFlags(8));
- return this._matrix;
- };
- p.prototype._getInvertedMatrix = function() {
- this._hasFlags(16) && (this._getMatrix().invertInto(this._invertedMatrix), this._removeFlags(16));
- return this._invertedMatrix;
- };
- p.prototype._getConcatenatedColorTransform = function() {
- if (!this.stage) {
- return this._colorTransform.clone();
- }
- if (this._hasFlags(128)) {
- var a = this._findNearestAncestor(128, !1), b = p._getAncestors(this, a), c = b.length - 1, d = this.sec.flash.display.Stage;
- d.axIsType(b[c]) && c--;
- for (d = a && !d.axIsType(a) ? a._concatenatedColorTransform.clone() : new this.sec.flash.geom.ColorTransform;0 <= c;) {
- a = b[c--], d.preMultiply(a._colorTransform), d.convertToFixedPoint(), a._concatenatedColorTransform.copyFrom(d), a._removeFlags(128);
- }
- }
- return this._concatenatedColorTransform;
- };
- p.prototype._setColorTransform = function(a) {
- this._colorTransform.copyFrom(a);
- this._colorTransform.convertToFixedPoint();
- this._propagateFlagsDown(128);
- this._setDirtyFlags(67108864);
- };
- p.prototype._invalidateFillAndLineBounds = function(a, b) {
- this._propagateFlagsUp((b ? 2 : 0) | (a ? 4 : 0));
- };
- p.prototype._invalidateParentFillAndLineBounds = function(a, b) {
- this._parent && this._parent._invalidateFillAndLineBounds(a, b);
- };
- p.prototype._getContentBounds = function(a) {
- void 0 === a && (a = !0);
- var b, c;
- a ? (b = 2, c = this._lineBounds) : (b = 4, c = this._fillBounds);
- if (this._hasFlags(b)) {
- var d = this._getGraphics();
- d ? c.copyFrom(d._getContentBounds(a)) : c.setToSentinels();
- this._getChildBounds(c, a);
- this._removeFlags(b);
- }
- return c;
- };
- p.prototype._getChildBounds = function(a, b) {
- };
- p.prototype._getTransformedBounds = function(a, b) {
- var c = this._getContentBounds(b).clone();
- if (a === this || c.isEmpty()) {
- return c;
- }
- var d;
- a ? (d = this.sec.flash.geom.Matrix.axClass.TEMP_MATRIX, a._getInvertedConcatenatedMatrix().preMultiplyInto(this._getConcatenatedMatrix(), d)) : d = this._getConcatenatedMatrix();
- d.transformBounds(c);
- return c;
- };
- p.prototype._stopTimelineAnimation = function() {
- this._removeFlags(4096);
- };
- p.prototype._invalidateMatrix = function() {
- this._setDirtyFlags(1048576);
- this._setFlags(24);
- this._invalidatePosition();
- };
- p.prototype._invalidatePosition = function() {
- this._propagateFlagsDown(96);
- this._invalidateParentFillAndLineBounds(!0, !0);
- };
- p.prototype._animate = function(a) {
- var b = !(a.flags & 1) && a.flags & 2, c = this.sec.flash.geom.Matrix.axClass;
- a.flags & 4 ? (c.TEMP_MATRIX.copyFromUntyped(a.matrix), this._setMatrix(c.TEMP_MATRIX, !1)) : b && this._setMatrix(c.FROZEN_IDENTITY_MATRIX, !1);
- c = this.sec.flash.geom.ColorTransform.axClass;
- a.flags & 8 ? (c.TEMP_COLOR_TRANSFORM.copyFromUntyped(a.cxform), this._setColorTransform(c.TEMP_COLOR_TRANSFORM)) : b && this._setColorTransform(c.FROZEN_IDENTITY_COLOR_TRANSFORM);
- if (a.flags & 16 || b) {
- c = a.ratio | 0, c !== this._ratio && (this._ratio = c, this._setDirtyFlags(1073741824));
- }
- if (a.flags & 64 || b) {
- c = void 0 === a.clipDepth ? -1 : a.clipDepth, c !== this._clipDepth && (this._clipDepth = c, this._setDirtyFlags(268435456));
- }
- if (a.flags & 256) {
- for (var c = this.sec.flash.filters, d = [], f = a.filters, g = 0;g < f.length;g++) {
- var k = f[g], p;
- switch(k.type) {
- case 0:
- p = c.DropShadowFilter.axClass.FromUntyped(k);
- break;
- case 1:
- p = c.BlurFilter.axClass.FromUntyped(k);
- break;
- case 2:
- p = c.GlowFilter.axClass.FromUntyped(k);
- break;
- case 3:
- p = c.BevelFilter.axClass.FromUntyped(k);
- break;
- case 4:
- p = c.GradientGlowFilter.axClass.FromUntyped(k);
- break;
- case 5:
- p = c.ConvolutionFilter.axClass.FromUntyped(k);
- break;
- case 6:
- p = c.ColorMatrixFilter.axClass.FromUntyped(k);
- break;
- case 7:
- p = c.GradientBevelFilter.axClass.FromUntyped(k);
- }
- d.push(p);
- }
- this._filters = d;
- this._setDirtyFlags(1073741824);
- } else {
- b && (this._filters = null, this._setDirtyFlags(1073741824));
- }
- if (a.flags & 512 || b) {
- p = n.display.BlendMode.fromNumber(void 0 === a.blendMode ? 1 : a.blendMode), p !== this._blendMode && (this._blendMode = p, this._setDirtyFlags(1073741824));
- }
- if (a.flags & 1024 || b) {
- p = 0 < a.bmpCache, p !== this._hasFlags(65536) && (this._toggleFlags(65536, p), this._setDirtyFlags(1073741824));
- }
- if (a.flags & 8192 || b) {
- a = void 0 === a.visibility || a.visibility, a !== this._hasFlags(1) && (this._toggleFlags(1, a), this._setDirtyFlags(1073741824));
- }
- };
- p.prototype._propagateEvent = function(a) {
- this.visit(function(b) {
- b.dispatchEvent(a);
- return 0;
- }, 0);
- };
- Object.defineProperty(p.prototype, "x", {get:function() {
- return this._getX();
- }, set:function(a) {
- a = 20 * a | 0;
- this._stopTimelineAnimation();
- if (this._canHaveTextContent()) {
- var b = this._getContentBounds();
- a -= b.xMin;
- }
- a !== this._matrix.tx && (this._matrix.tx = a, this._invertedMatrix.tx = -a, this._invalidatePosition(), this._setDirtyFlags(1048576));
- }, enumerable:!0, configurable:!0});
- p.prototype._getX = function() {
- var a = this._matrix.tx;
- if (this._canHaveTextContent()) {
- var b = this._getContentBounds(), a = a + b.xMin
- }
- return a / 20;
- };
- Object.defineProperty(p.prototype, "y", {get:function() {
- return this._getY();
- }, set:function(a) {
- a = 20 * a | 0;
- this._stopTimelineAnimation();
- if (this._canHaveTextContent()) {
- var b = this._getContentBounds();
- a -= b.yMin;
- }
- a !== this._matrix.ty && (this._matrix.ty = a, this._invertedMatrix.ty = -a, this._invalidatePosition(), this._setDirtyFlags(1048576));
- }, enumerable:!0, configurable:!0});
- p.prototype._getY = function() {
- var a = this._matrix.ty;
- if (this._canHaveTextContent()) {
- var b = this._getContentBounds(), a = a + b.yMin
- }
- return a / 20;
- };
- Object.defineProperty(p.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(p.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(p.prototype, "scaleZ", {get:function() {
- return this._scaleZ;
- }, set:function(a) {
- m("public DisplayObject::set scaleZ");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "rotation", {get:function() {
- return this._rotation;
- }, set:function(a) {
- a = +a;
- this._stopTimelineAnimation();
- a = p._clampRotation(a);
- if (a !== this._rotation) {
- var b = (a - this._rotation) / 180 * Math.PI;
- this._skewX += b;
- this._skewY += b;
- this._rotation = a;
- this._invalidateMatrix();
- }
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "rotationX", {get:function() {
- return this._rotationX;
- }, set:function(a) {
- m("public DisplayObject::set rotationX");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "rotationY", {get:function() {
- return this._rotationY;
- }, set:function(a) {
- m("public DisplayObject::set rotationY");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "rotationZ", {get:function() {
- return this._rotationZ;
- }, set:function(a) {
- m("public DisplayObject::set rotationZ");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "width", {get:function() {
- return this._getWidth();
- }, set:function(a) {
- this._setWidth(a);
- }, enumerable:!0, configurable:!0});
- p.prototype._getWidth = function() {
- return this._getTransformedBounds(this._parent, !0).width / 20;
- };
- p.prototype._setWidth = function(a) {
- a = 20 * a | 0;
- this._stopTimelineAnimation();
- if (!(0 > a)) {
- var b = this._getContentBounds(!0);
- if (this._canHaveTextContent()) {
- var c = this._getContentBounds();
- this._setFillAndLineBoundsFromWidthAndHeight(a, b.height);
- } else {
- var c = this._getTransformedBounds(this._parent, !0), d = this._rotation / 180 * Math.PI, f = b.getBaseWidth(d);
- f && (b = b.getBaseHeight(d), this._scaleY = c.height / b, this._scaleX = a / f, this._invalidateMatrix());
- }
- }
- };
- Object.defineProperty(p.prototype, "height", {get:function() {
- return this._getHeight();
- }, set:function(a) {
- this._setHeight(a);
- }, enumerable:!0, configurable:!0});
- p.prototype._getHeight = function() {
- return this._getTransformedBounds(this._parent, !0).height / 20;
- };
- p.prototype._setHeight = function(a) {
- a = 20 * a | 0;
- this._stopTimelineAnimation();
- if (!(0 > a)) {
- var b = this._getContentBounds(!0);
- if (this._canHaveTextContent()) {
- var c = this._getContentBounds();
- this._setFillAndLineBoundsFromWidthAndHeight(b.width, a);
- } else {
- var c = this._getTransformedBounds(this._parent, !0), d = this._rotation / 180 * Math.PI, f = b.getBaseHeight(d);
- f && (b = b.getBaseWidth(d), this._scaleY = a / f, this._scaleX = c.width / b, this._invalidateMatrix());
- }
- }
- };
- Object.defineProperty(p.prototype, "mask", {get:function() {
- return this._mask;
- }, set:function(a) {
- if (this._mask !== a && a !== this) {
- a && a._maskedObject && (a._maskedObject.mask = null);
- this._mask && (this._mask._maskedObject = null);
- if (this._mask = a) {
- a._maskedObject = this;
- }
- this._setDirtyFlags(134217728);
- }
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.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});
- p.prototype._getTransform = function() {
- return new this.sec.flash.geom.Transform(this);
- };
- p.prototype.destroy = function() {
- this._setFlags(512);
- };
- Object.defineProperty(p.prototype, "root", {get:function() {
- var a = this;
- do {
- if (a._root === a) {
- return a;
- }
- a = a._parent;
- } while (a);
- return null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "stage", {get:function() {
- var a = this;
- do {
- if (a._stage === a) {
- return a;
- }
- a = a._parent;
- } while (a);
- return null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "name", {get:function() {
- return this._name;
- }, set:function(d) {
- c(d, "name", this.sec);
- this._hasFlags(2048) ? this._symbol && !this._symbol.isAVM1Object && this.sec.throwError("IllegalOperationError", b.Errors.TimelineObjectNameSealedError) : this._name = a(d);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "parent", {get:function() {
- return this._parent;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.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(p.prototype, "blendMode", {get:function() {
- return this._blendMode;
- }, set:function(c) {
- this._stopTimelineAnimation();
- c = a(c);
- c !== this._blendMode && (0 > t.BlendMode.toNumber(c) && this.sec.throwError("ArgumentError", b.Errors.InvalidEnumError, "blendMode"), this._blendMode = c, this._setDirtyFlags(1073741824));
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "scale9Grid", {get:function() {
- return this._getScale9Grid();
- }, set:function(a) {
- this._stopTimelineAnimation();
- this._scale9Grid = f.FromRectangle(a);
- this._setDirtyFlags(1073741824);
- }, enumerable:!0, configurable:!0});
- p.prototype._getScale9Grid = function() {
- var a = this.sec.flash.geom.Rectangle.axClass;
- return this._scale9Grid ? a.FromBounds(this._scale9Grid) : null;
- };
- Object.defineProperty(p.prototype, "cacheAsBitmap", {get:function() {
- return this._getCacheAsBitmap();
- }, set:function(a) {
- this._hasFlags(65536) || (this._toggleFlags(65536, !!a), this._setDirtyFlags(1073741824));
- }, enumerable:!0, configurable:!0});
- p.prototype._getCacheAsBitmap = function() {
- return this._filters && 0 < this._filters.length || this._hasFlags(65536);
- };
- Object.defineProperty(p.prototype, "filters", {get:function() {
- return this._getFilters();
- }, set:function(a) {
- a = a ? a.value : null;
- this._filters || (this._filters = []);
- var c = !1;
- if (d(a)) {
- c = 0 < this._filters.length, this._filters.length = 0;
- } else {
- var f = this.sec.flash.filters.BitmapFilter.axClass;
- this._filters = a.map(function(a) {
- f.axIsType(a) || this.sec.throwError("TypeError", b.Errors.ParamTypeError, "0", "Filter");
- return a.clone();
- });
- c = !0;
- }
- c && this._setDirtyFlags(1073741824);
- }, enumerable:!0, configurable:!0});
- p.prototype._getFilters = function() {
- var a = this._filters ? this._filters.map(function(a) {
- return a.clone();
- }) : [];
- return this.sec.createArray(a);
- };
- Object.defineProperty(p.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(p.prototype, "z", {get:function() {
- return this._z;
- }, set:function(a) {
- this._z = +a;
- m("public DisplayObject::set z");
- }, enumerable:!0, configurable:!0});
- p.prototype.getBounds = function(a) {
- return this.sec.flash.geom.Rectangle.axClass.FromBounds(this._getTransformedBounds(a || this, !0));
- };
- p.prototype.getRect = function(a) {
- return this.sec.flash.geom.Rectangle.axClass.FromBounds(this._getTransformedBounds(a || this, !1));
- };
- p.prototype.globalToLocal = function(a) {
- return this._getInvertedConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels();
- };
- p.prototype.localToGlobal = function(a) {
- return this._getConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels();
- };
- p.prototype.globalToLocal3D = function(a) {
- m("public DisplayObject::globalToLocal3D");
- return null;
- };
- p.prototype.localToGlobal3D = function(a) {
- m("public DisplayObject::localToGlobal3D");
- return null;
- };
- p.prototype.local3DToGlobal = function(a) {
- m("public DisplayObject::local3DToGlobal");
- return null;
- };
- p.prototype.visit = function(a, b, c) {
- void 0 === c && (c = 0);
- var d, f, g = b & 8;
- for (d = [this];0 < d.length;) {
- f = d.pop();
- var k = 0, k = b & 16 && !f._hasAnyFlags(c) ? 2 : a(f);
- if (0 === k) {
- if (f = f._children) {
- for (var k = f.length, p = 0;p < k;p++) {
- d.push(f[g ? p : k - 1 - p]);
- }
- }
- } else {
- if (1 === k) {
- break;
- }
- }
- }
- };
- Object.defineProperty(p.prototype, "loaderInfo", {get:function() {
- var a = this.root;
- return a ? a._loaderInfo : null;
- }, enumerable:!0, configurable:!0});
- p.prototype._canHaveGraphics = function() {
- return !1;
- };
- p.prototype._getGraphics = function() {
- return null;
- };
- p.prototype._canHaveTextContent = function() {
- return !1;
- };
- p.prototype._getTextContent = function() {
- return null;
- };
- p.prototype._ensureGraphics = function() {
- if (this._graphics) {
- return this._graphics;
- }
- this._graphics = new this.sec.flash.display.Graphics;
- this._graphics._setParent(this);
- this._invalidateFillAndLineBounds(!0, !0);
- this._setDirtyFlags(4194304);
- return this._graphics;
- };
- p.prototype._setStaticContentFromSymbol = function(a) {
- this._canHaveGraphics() ? (this._graphics = a.graphics, this._setDirtyFlags(4194304)) : this.sec.flash.text.StaticText.axIsType(this) && (this._textContent = a.textContent, this._setDirtyFlags(8388608));
- this._symbol = a;
- this._setFillAndLineBoundsFromSymbol(a);
- };
- p.prototype.hitTestObject = function(a) {
- var b = this._getContentBounds(!1).clone(), c = a._getContentBounds(!1).clone();
- this._getConcatenatedMatrix().transformBounds(b);
- a._getConcatenatedMatrix().transformBounds(c);
- return b.intersects(c);
- };
- p.prototype.hitTestPoint = function(a, b, c) {
- return !!this._containsGlobalPoint(20 * +a | 0, 20 * +b | 0, c ? 2 : 0, null);
- };
- p.prototype._containsPoint = function(a, b, c, d, f, g) {
- var k = this._boundsAndMaskContainPoint(a, b, c, d, f);
- if (0 === k || 2 > f) {
- return k;
- }
- (a = this._containsPointDirectly(c, d, a, b)) && g && (5 === f ? g[0] = this : (4 === f || this.sec.flash.display.InteractiveObject.axIsType(this) && this._mouseEnabled) && g.push(this));
- return a ? 2 : k;
- };
- p.prototype._containsGlobalPoint = function(a, b, c, d) {
- var f = this._getInvertedConcatenatedMatrix(), g = f.transformX(a, b), f = f.transformY(a, b);
- return this._containsPoint(a, b, g, f, c, d);
- };
- p.prototype._boundsAndMaskContainPoint = function(a, b, c, d, f) {
- return 1 <= f && this._hasFlags(32768) ? 1 : 3 <= f && !this._hasFlags(1) || !this._getContentBounds().contains(c, d) ? 0 : 0 !== f && this._mask ? this._mask._containsGlobalPoint(a, b, 1, null) : 1;
- };
- p.prototype._containsPointDirectly = function(a, b, c, d) {
- return !1;
- };
- Object.defineProperty(p.prototype, "scrollRect", {get:function() {
- return this._getScrollRect();
- }, set:function(a) {
- this._scrollRect = a ? a.clone() : null;
- l("public DisplayObject::set scrollRect");
- }, enumerable:!0, configurable:!0});
- p.prototype._getScrollRect = function() {
- return this._scrollRect ? this._scrollRect.clone() : null;
- };
- Object.defineProperty(p.prototype, "opaqueBackground", {get:function() {
- return this._opaqueBackground;
- }, set:function(a) {
- this._opaqueBackground = a;
- }, enumerable:!0, configurable:!0});
- p.prototype._getDistance = function(a) {
- for (var b = 0, c = this;c && c !== a;) {
- b++, c = c._parent;
- }
- return b;
- };
- p.prototype.findNearestCommonAncestor = function(a) {
- if (!a) {
- return null;
- }
- for (var b = this, c = b._getDistance(null), d = a._getDistance(null);c > d;) {
- b = b._parent, c--;
- }
- for (;d > c;) {
- a = a._parent, d--;
- }
- for (;b !== a;) {
- b = b._parent, a = a._parent;
- }
- return b;
- };
- p.prototype._getLocalMousePosition = function() {
- return this.globalToLocal(this.sec.flash.ui.Mouse.axClass._currentPosition);
- };
- Object.defineProperty(p.prototype, "mouseX", {get:function() {
- return this._getLocalMousePosition().x;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "mouseY", {get:function() {
- return this._getLocalMousePosition().y;
- }, enumerable:!0, configurable:!0});
- p.prototype.debugName = function(a) {
- void 0 === a && (a = !1);
- var b = this._id + " [" + this._depth + "]: (" + this._referenceCount + ") " + this;
- if (a) {
- a = [];
- for (var c = 0;32 > c;c++) {
- this._hasFlags(1 << c) && a.push(r[1 << c]);
- }
- b += " " + a.join("|");
- }
- return b;
- };
- p.prototype.debugNameShort = function() {
- return "[" + this._depth + "]: (" + this._referenceCount + ") {" + this._displayObjectFlags + "} " + this;
- };
- p.prototype.hashCode = function() {
- return this.getBounds(null).hashCode();
- };
- p.prototype.getAncestorCount = function() {
- return 0;
- };
- p.prototype.debugTrace = function(a, b, c) {
- void 0 === a && (a = new e.IndentingWriter);
- void 0 === b && (b = 1024);
- void 0 === c && (c = "");
- var d = this;
- this.visit(function(f) {
- var g = f._getDistance(d);
- if (g > b) {
- return 2;
- }
- g = c + e.StringUtilities.multiple(" ", g);
- a.writeLn(g + f.debugNameShort() + ", bounds: " + f.getBounds(null).toString());
- return 0;
- }, 0);
- };
- p.prototype._addReference = function() {
- this._referenceCount++;
- };
- p.prototype._removeReference = function() {
- this._referenceCount--;
- if (0 === this._referenceCount && this._children) {
- for (var a = this._children, b = 0;b < a.length;b++) {
- a[b]._removeReference();
- }
- }
- };
- p.prototype._getScriptPrecedence = function() {
- if (!this._parent) {
- return [];
- }
- var a = this._parent._getScriptPrecedence();
- this._placeObjectTag && a.push(this._placeObjectTag.actionBlocksPrecedence);
- return a;
- };
- Object.defineProperty(p.prototype, "accessibilityProperties", {get:function() {
- return this._accessibilityProperties;
- }, set:function(a) {
- this._accessibilityProperties = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "blendShader", {set:function(a) {
- m("public DisplayObject::set blendShader");
- }, enumerable:!0, configurable:!0});
- p._instanceID = 1;
- p.classSymbols = null;
- p.instanceSymbols = null;
- p._runScripts = !0;
- p._path = [];
- return p;
- }(n.events.EventDispatcher);
- t.DisplayObject = q;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a, b, k) {
- void 0 === a && (a = null);
- void 0 === b && (b = "auto");
- void 0 === k && (k = !1);
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- d.call(this);
- this._symbol || (this.bitmapData = a, this._pixelSnapping = m(b), this._smoothing = !!k);
- }
- __extends(a, d);
- a.prototype.applySymbol = function() {
- this._initializeFields();
- var a = this._symbol, b = a.symbolClass;
- this.sec.flash.display.Bitmap.axClass.dPrototype.isPrototypeOf(b.dPrototype) && (b = this.sec.flash.display.BitmapData.axClass);
- this._bitmapData = h.constructClassFromSymbol(a, b);
- this._smoothing = this._pixelSnapping = null;
- this._setFillAndLineBoundsFromWidthAndHeight(20 * a.width | 0, 20 * a.height | 0);
- };
- Object.defineProperty(a.prototype, "pixelSnapping", {get:function() {
- return this._pixelSnapping;
- }, set:function(a) {
- 0 > t.PixelSnapping.toNumber(a) && this.sec.throwError("ArgumentError", b.Errors.InvalidEnumError, "pixelSnapping");
- this._pixelSnapping = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "smoothing", {get:function() {
- return this._smoothing;
- }, set:function(a) {
- this._smoothing = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "bitmapData", {get:function() {
- return this._bitmapData;
- }, set:function(a) {
- this._bitmapData !== a && (this._bitmapData && this._bitmapData._removeBitmapReferrer(this), a && a._addBitmapReferrer(this));
- (this._bitmapData = a) && this._setFillAndLineBoundsFromWidthAndHeight(20 * a.width | 0, 20 * a.height | 0);
- this._invalidateParentFillAndLineBounds(!0, !0);
- this._setDirtyFlags(16777216);
- }, enumerable:!0, configurable:!0});
- a.prototype._getContentBounds = function(a) {
- return this._bitmapData ? this._bitmapData._getContentBounds() : new e.Bounds(0, 0, 0, 0);
- };
- a.prototype._containsPointDirectly = function(a, b, d, h) {
- return !0;
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(n.display.DisplayObject);
- t.Bitmap = l;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.warning, l = function(b) {
- function a() {
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- b.call(this);
- this._fieldsInitialized || this._initializeFields();
- }
- __extends(a, b);
- a.prototype.applySymbol = function() {
- this._initializeFields();
- this._setStaticContentFromSymbol(this._symbol);
- };
- a.prototype._initializeFields = function() {
- b.prototype._initializeFields.call(this);
- this._graphics = null;
- };
- a.prototype._canHaveGraphics = function() {
- return !0;
- };
- a.prototype._getGraphics = function() {
- return this._graphics;
- };
- Object.defineProperty(a.prototype, "graphics", {get:function() {
- return this._ensureGraphics();
- }, enumerable:!0, configurable:!0});
- a.prototype._containsPointDirectly = function(a, b, d, h) {
- d = this._getGraphics();
- return !!d && d._containsPoint(a, b, !0, 0);
- };
- a.classInitializer = null;
- return a;
- }(b.display.DisplayObject);
- h.Shape = l;
- l = function(d) {
- function a(a, b) {
- d.call(this, a, b, !1);
- this.graphics = null;
- }
- __extends(a, d);
- a.FromData = function(c, d) {
- var k = new a(c, d.sec.flash.display.Shape.axClass);
- k._setBoundsFromData(c);
- k.graphics = b.display.Graphics.FromData(c, d);
- k.processRequires(c.require, d);
- return k;
- };
- a.prototype.processRequires = function(a, b) {
- if (a) {
- for (var d = this.graphics._textures, h = 0;h < a.length;h++) {
- var e = b.getSymbolById(a[h]);
- e ? d.push(e.getSharedInstance()) : (65535 !== a[h] && m("Bitmap symbol " + a[h] + " required by shape, but not defined."), d.push(null));
- }
- }
- };
- return a;
- }(e.Timeline.DisplaySymbol);
- h.ShapeSymbol = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = b.events, d = function(a) {
- function b() {
- a.call(this);
- this._fieldsInitialized || this._initializeFields();
- }
- __extends(b, a);
- b.prototype._initializeFields = function() {
- a.prototype._initializeFields.call(this);
- this._tabEnabled = !1;
- this._tabIndex = -1;
- this._focusRect = null;
- this._mouseEnabled = !0;
- this._doubleClickEnabled = !1;
- this._softKeyboardInputAreaOfInterest = this._accessibilityImplementation = null;
- this._needsSoftKeyboard = !1;
- this._contextMenu = null;
- };
- Object.defineProperty(b.prototype, "tabEnabled", {get:function() {
- return this._tabEnabled;
- }, set:function(a) {
- a = !!a;
- var b = this._tabEnabled;
- this._tabEnabled = a;
- b !== a && this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(l.Event.TAB_ENABLED_CHANGE, !0));
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "tabIndex", {get:function() {
- return this._tabIndex;
- }, set:function(a) {
- a |= 0;
- var b = this._tabIndex;
- this._tabIndex = a;
- b !== a && this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(l.Event.TAB_INDEX_CHANGE, !0));
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "focusRect", {get:function() {
- return this._focusRect;
- }, set:function(a) {
- m("public flash.display.InteractiveObject::set focusRect");
- this._focusRect = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "mouseEnabled", {get:function() {
- return this._mouseEnabled;
- }, set:function(a) {
- this._mouseEnabled = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "doubleClickEnabled", {get:function() {
- return this._doubleClickEnabled;
- }, set:function(a) {
- this._doubleClickEnabled = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "accessibilityImplementation", {get:function() {
- return this._accessibilityImplementation;
- }, set:function(a) {
- m("public flash.display.InteractiveObject::set accessibilityImplementation");
- this._accessibilityImplementation = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "softKeyboardInputAreaOfInterest", {get:function() {
- return this._softKeyboardInputAreaOfInterest;
- }, set:function(a) {
- m("public flash.display.InteractiveObject::set softKeyboardInputAreaOfInterest");
- this._softKeyboardInputAreaOfInterest = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "needsSoftKeyboard", {get:function() {
- return this._needsSoftKeyboard;
- }, set:function(a) {
- a = !!a;
- m("public flash.display.InteractiveObject::set needsSoftKeyboard");
- this._needsSoftKeyboard = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "contextMenu", {get:function() {
- return this._contextMenu;
- }, set:function(a) {
- m("public flash.display.InteractiveObject::set contextMenu");
- this._contextMenu = a;
- }, enumerable:!0, configurable:!0});
- b.prototype.requestSoftKeyboard = function() {
- m("public flash.display.InteractiveObject::requestSoftKeyboard");
- return !1;
- };
- b.classInitializer = null;
- return b;
- }(b.display.DisplayObject);
- h.InteractiveObject = d;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(a) {
- function b(c, d, h, e) {
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- a.call(this);
- this.sec.flash.display.DisplayObject.axClass._advancableInstances.push(this);
- this._fieldsInitialized || this._initializeFields();
- this._symbol || (c && (this.upState = c), d && (this.overState = d), h && (this.downState = h), e && (this.hitTestState = e), this._updateButton());
- }
- __extends(b, a);
- b.prototype.applySymbol = function() {
- this._initializeFields();
- var a = this._symbol;
- a.upState && (this._upState = this.createAnimatedDisplayObject(a.upState.symbol, a.upState.placeObjectTag, !0));
- a.overState && (this._overState = this.createAnimatedDisplayObject(a.overState.symbol, a.overState.placeObjectTag, !0));
- a.downState && (this._downState = this.createAnimatedDisplayObject(a.downState.symbol, a.downState.placeObjectTag, !0));
- a.hitTestState && (this._hitTestState = this.createAnimatedDisplayObject(a.hitTestState.symbol, a.hitTestState.placeObjectTag, !0));
- this._updateButton();
- };
- b.prototype._initializeFields = function() {
- a.prototype._initializeFields.call(this);
- this._enabled = this._useHandCursor = !0;
- this._trackAsMenu = !1;
- this._currentState = this._hitTestState = this._downState = this._overState = this._upState = null;
- this._children = [];
- };
- b.prototype._initFrame = function(a) {
- a && this._updateButton();
- };
- b.prototype._constructFrame = function() {
- };
- Object.defineProperty(b.prototype, "useHandCursor", {get:function() {
- return this._useHandCursor;
- }, set:function(a) {
- this._useHandCursor = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "enabled", {get:function() {
- return this._enabled;
- }, set:function(a) {
- this._enabled = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "trackAsMenu", {get:function() {
- return this._trackAsMenu;
- }, set:function(a) {
- m("public flash.display.SimpleButton::set trackAsMenu");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "upState", {get:function() {
- return this._upState;
- }, set:function(a) {
- var b = this._upState;
- a._parent && a._parent.removeChild(a);
- this._upState = a;
- this._currentState === b && this._updateButton();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "overState", {get:function() {
- return this._overState;
- }, set:function(a) {
- var b = this._overState;
- a._parent && a._parent.removeChild(a);
- this._overState = a;
- this._currentState === b && this._updateButton();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "downState", {get:function() {
- return this._downState;
- }, set:function(a) {
- var b = this._downState;
- a._parent && a._parent.removeChild(a);
- this._downState = a;
- this._currentState === b && this._updateButton();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "hitTestState", {get:function() {
- return this._hitTestState;
- }, set:function(a) {
- this._hitTestState = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "soundTransform", {get:function() {
- m("public flash.display.SimpleButton::get soundTransform");
- }, set:function(a) {
- m("public flash.display.SimpleButton::set soundTransform");
- }, enumerable:!0, configurable:!0});
- b.prototype._containsPoint = function(a, b, c, d, h, g) {
- c = 3 === h ? this._hitTestState : this._currentState;
- if (!c) {
- return 0;
- }
- c._parent = this;
- a = c._containsGlobalPoint(a, b, h, g);
- c._parent = null;
- 0 !== a && 3 === h && g && this._mouseEnabled && (g[0] = this);
- return a;
- };
- b.prototype._getChildBounds = function(a, b) {
- this._currentState && (this._currentState._parent = this, a.unionInPlace(this._currentState._getTransformedBounds(this, b)), this._currentState._parent = null);
- };
- b.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));
- };
- b.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));
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.display.InteractiveObject);
- h.SimpleButton = l;
- var d = function() {
- return function(a, b) {
- this.symbol = a;
- this.placeObjectTag = b;
- };
- }();
- h.ButtonState = d;
- l = function(a) {
- function c(b, c) {
- a.call(this, b, c.sec.flash.display.SimpleButton.axClass, !0);
- this.hitTestState = this.downState = this.overState = this.upState = null;
- this.loaderInfo = c;
- }
- __extends(c, a);
- c.FromData = function(a, k) {
- var r = new c(a, k);
- k.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (r.isAVM1Object = !0);
- var l = a.states, q = null, g, p;
- for (p in l) {
- var v = l[p];
- if (1 === v.length) {
- if (g = v[0], q = k.getSymbolById(g.symbolId), !q) {
- continue;
- }
- } else {
- g = {code:4, flags:1, depth:1}, q = new b.display.SpriteSymbol({id:-1, className:null, env:null}, k), q.frames.push(new e.SWF.SWFFrame(v));
- }
- r[p + "State"] = new d(q, g);
- }
- return r;
- };
- return c;
- }(e.Timeline.DisplaySymbol);
- h.ButtonSymbol = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.HashUtilities.mixHash, a = e.AVMX.checkParameterType, c = e.NumberUtilities.clamp, f = h.events;
- (function(a) {
- a[a.DEFAULT = 0] = "DEFAULT";
- a[a.IGNORE_CASE = 1] = "IGNORE_CASE";
- a[a.INCLUDE_NON_INITIALIZED = 2] = "INCLUDE_NON_INITIALIZED";
- })(t.LookupChildOptions || (t.LookupChildOptions = {}));
- var k = function(k) {
- function h() {
- k.call(this);
- this._fieldsInitialized || this._initializeFields();
- this._setDirtyFlags(2097152);
- }
- __extends(h, k);
- h.prototype._initializeFields = function() {
- k.prototype._initializeFields.call(this);
- this._mouseChildren = this._tabChildren = !0;
- this._children = this._children || [];
- };
- h.prototype._invalidateChildren = function() {
- this._setDirtyFlags(2097152);
- this._invalidateFillAndLineBounds(!0, !0);
- };
- h.prototype._propagateFlagsDown = function(a) {
- if (!this._hasFlags(a)) {
- this._setFlags(a);
- for (var b = this._children, c = 0;c < b.length;c++) {
- b[c]._propagateFlagsDown(a);
- }
- }
- };
- h.prototype._constructChildren = function() {
- for (var a = this._children, b = 0;b < a.length;b++) {
- var c = a[b];
- if (!c._hasFlags(256)) {
- c.axInitializer();
- c._removeReference();
- c._name && this.axSetPublicProperty(c._name, c);
- c._setFlags(256);
- var d = this.sec.flash.events.Event.axClass;
- if (c._hasFlags(131072)) {
- c._removeFlags(131072);
- e.AVM1.Lib.initializeAVM1Object(c, c._symbol.avm1Context, c._placeObjectTag);
- try {
- c.dispatchEvent(d.getInstance(f.Event.AVM1_INIT));
- } catch (k) {
- e.Debug.warning("caught error under DisplayObjectContainer AVM1_INIT event: ", k);
- }
- try {
- c.dispatchEvent(d.getInstance(f.Event.AVM1_CONSTRUCT));
- } catch (h) {
- e.Debug.warning("caught error under DisplayObjectContainer AVM1_CONSTRUCT event: ", h);
- }
- c.hasEventListener(f.Event.AVM1_LOAD) && (c._setFlags(1024), this._propagateFlagsUp(16384));
- }
- try {
- c.dispatchEvent(d.getInstance(f.Event.ADDED, !0));
- } catch (r) {
- e.Debug.warning("caught error under DisplayObject ADDED event: ", r);
- }
- if (c.stage) {
- try {
- c.dispatchEvent(d.getInstance(f.Event.ADDED_TO_STAGE));
- } catch (l) {
- e.Debug.warning("caught error under DisplayObject ADDED_TO_STAGE event: ", l);
- }
- }
- }
- }
- };
- h.prototype._enqueueFrameScripts = function() {
- if (this._hasFlags(16384)) {
- this._removeFlags(16384);
- for (var a = this._children, b = 0;b < a.length;b++) {
- var c = a[b];
- (this.sec.flash.display.DisplayObjectContainer.axIsType(c) || this.sec.flash.display.AVM1Movie.axIsType(c)) && c._enqueueFrameScripts();
- }
- }
- };
- Object.defineProperty(h.prototype, "numChildren", {get:function() {
- return this._children.length;
- }, enumerable:!0, configurable:!0});
- h.prototype._getNumChildren = function() {
- return this._children.length;
- };
- Object.defineProperty(h.prototype, "textSnapshot", {get:function() {
- m("public DisplayObjectContainer::get textSnapshot");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "tabChildren", {get:function() {
- return this._tabChildren;
- }, set:function(a) {
- this._setTabChildren(a);
- }, enumerable:!0, configurable:!0});
- h.prototype._getTabChildren = function() {
- return this._tabChildren;
- };
- h.prototype._setTabChildren = function(a) {
- a = !!a;
- var b = this._tabChildren;
- this._tabChildren = a;
- b !== a && this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(f.Event.TAB_CHILDREN_CHANGE, !0));
- };
- Object.defineProperty(h.prototype, "mouseChildren", {get:function() {
- return this._mouseChildren;
- }, set:function(a) {
- this._setMouseChildren(a);
- }, enumerable:!0, configurable:!0});
- h.prototype._getMouseChildren = function() {
- return this._mouseChildren;
- };
- h.prototype._setMouseChildren = function(a) {
- this._mouseChildren = !!a;
- };
- h.prototype.addChild = function(a) {
- return this.addChildAt(a, this._children.length);
- };
- h.prototype.addChildAt = function(d, g) {
- a(d, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- g |= 0;
- d === this && this.sec.throwError("ArgumentError", b.Errors.CantAddSelfError);
- this.sec.flash.display.DisplayObjectContainer.axIsType(d) && d.contains(this) && this.sec.throwError("ArgumentError", b.Errors.CantAddParentError);
- var k = this._children;
- (0 > g || g > k.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- if (d._parent === this) {
- return this.setChildIndex(d, c(g, 0, k.length - 1)), d;
- }
- d._parent && (h.prototype.removeChildAt.call(d._parent, d._parent.getChildIndex(d)), g = c(g, 0, k.length));
- for (var r = k.length - 1;r >= g;r--) {
- k[r]._index++;
- }
- k.splice(g, 0, d);
- d._setParent(this, -1);
- d._index = g;
- d._invalidatePosition();
- this._invalidateChildren();
- d._addReference();
- d.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(f.Event.ADDED, !0));
- d.stage && d._propagateEvent(this.sec.flash.events.Event.axClass.getInstance(f.Event.ADDED_TO_STAGE));
- return d;
- };
- h.prototype.addTimelineObjectAtDepth = function(a, b) {
- b |= 0;
- for (var c = this._children, d = c.length - 1, f = d + 1, k = d;0 <= k;k--) {
- var h = c[k];
- if (-1 < h._depth) {
- if (h._depth < b) {
- f = k + 1;
- break;
- }
- f = k;
- }
- }
- if (f > d) {
- c.push(a), a._index = f;
- } else {
- for (c.splice(f, 0, a), k = f;k < c.length;k++) {
- c[k]._index = k;
- }
- }
- a._setParent(this, b);
- a._invalidatePosition();
- this._invalidateChildren();
- };
- h.prototype.removeChild = function(b) {
- a(b, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- return this.removeChildAt(this.getChildIndex(b));
- };
- h.prototype.removeChildAt = function(a) {
- a |= 0;
- var c = this._children;
- (0 > a || a >= c.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- var d = c[a];
- d._hasFlags(256) && (d.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(f.Event.REMOVED, !0)), this.stage && d._propagateEvent(this.sec.flash.events.Event.axClass.getInstance(f.Event.REMOVED_FROM_STAGE)), a = this.getChildIndex(d));
- c.splice(a, 1);
- for (var k = c.length - 1;k >= a;k--) {
- c[k]._index--;
- }
- d._setParent(null, -1);
- d._index = -1;
- d._invalidatePosition();
- this._invalidateChildren();
- return d;
- };
- h.prototype.getChildIndex = function(c) {
- a(c, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- c._parent !== this && this.sec.throwError("ArgumentError", b.Errors.NotAChildError);
- return c._index;
- };
- h.prototype.setChildIndex = function(c, d) {
- d |= 0;
- a(c, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- var f = this._children;
- (0 > d || d >= f.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- c._parent !== this && this.sec.throwError("ArgumentError", b.Errors.NotAChildError);
- c._setDepth(-1);
- var k = this.getChildIndex(c);
- if (1 !== f.length && k !== d) {
- if (d === k + 1 || d === k - 1) {
- this._swapChildrenAt(k, d);
- } else {
- for (f.splice(k, 1), f.splice(d, 0, c), k = k < d ? k : d;k < f.length;) {
- f[k]._index = k++;
- }
- }
- this._invalidateChildren();
- }
- };
- h.prototype.getChildAt = function(a) {
- a |= 0;
- var c = this._children;
- (0 > a || a >= c.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- a = this._lookupChildByIndex(a, 0);
- if (!a) {
- return null;
- }
- a._addReference();
- return a;
- };
- h.prototype.getTimelineObjectAtDepth = function(a) {
- a |= 0;
- for (var b = this._children, c = 0;c < b.length;c++) {
- var d = b[c];
- if (d._depth > a) {
- break;
- }
- if (d._depth === a) {
- return d;
- }
- }
- return null;
- };
- h.prototype.getClipDepthIndex = function(a) {
- a |= 0;
- for (var b = this._children, c = this._children.length - 1, d = !0, f = c;0 <= f;f--) {
- var k = b[f];
- if (!(0 > k._depth)) {
- if (k._depth <= a) {
- return d ? c : f;
- }
- d = !1;
- }
- }
- return 0;
- };
- h.prototype.getChildByName = function(a) {
- a = l(a);
- return (a = this._lookupChildByName(a, 0)) ? (a._addReference(), a) : null;
- };
- h.prototype._lookupChildByIndex = function(a, b) {
- var c = this._children[a];
- return c && (c._hasFlags(256) || b & 2) ? c : null;
- };
- h.prototype._lookupChildByName = function(a, b) {
- var c = this._children;
- if (0 === c.length) {
- return null;
- }
- for (var d = 0;d < c.length;d++) {
- var f = c[d];
- if ((f._hasFlags(256) || b & 2) && f.name === a) {
- return f;
- }
- }
- if (!(b & 1)) {
- return null;
- }
- a = a.toLowerCase();
- for (d = 0;d < c.length;d++) {
- if (f = c[d], (f._hasFlags(256) || b & 2) && f.name.toLowerCase() === a) {
- return f;
- }
- }
- return null;
- };
- h.prototype._containsPoint = function(a, b, c, d, f, k) {
- return this._containsPointImpl(a, b, c, d, f, k, !1);
- };
- h.prototype._containsPointImpl = function(a, b, c, d, f, k, h) {
- var r;
- if (!h && (r = this._boundsAndMaskContainPoint(a, b, c, d, f), 0 === r || 2 > f)) {
- return r;
- }
- h = !1;
- for (var e = this._getUnclippedChildren(f, a, b), l = e ? e.length : 0;l--;) {
- if (r = e[l], !r._maskedObject && (r = r._containsGlobalPoint(a, b, f, k), 2 === r)) {
- if (3 > f) {
- return r;
- }
- h = !0;
- if (!(4 <= f)) {
- if (!this._mouseEnabled) {
- return k.length = 0, r;
- }
- this._mouseChildren || (k[0] = this);
- if (0 !== k.length) {
- return 2;
- }
- }
- }
- }
- if (h && 4 > f) {
- return 3 === f && 0 === k.length && (k[0] = this), 2;
- }
- (a = this._containsPointDirectly(c, d, a, b)) && (5 === f ? k[0] = this : (4 === f || k && this._mouseEnabled) && k.push(this));
- return h || a ? 2 : 0;
- };
- h.prototype._getUnclippedChildren = function(a, b, c) {
- var d = this._children;
- if (!d) {
- return null;
- }
- for (var f, k = 0;d && k < d.length;k++) {
- var h = d[k];
- -1 !== h._clipDepth ? (f || (f = d.slice(0, k)), 2 !== a && (h._containsGlobalPoint(b, c, 2, null) || (k = this.getClipDepthIndex(h._clipDepth)))) : f && f.push(h);
- }
- return f || d;
- };
- h.prototype._getChildBounds = function(a, b) {
- for (var c = this._children, d = 0;d < c.length;d++) {
- a.unionInPlace(c[d]._getTransformedBounds(this, b));
- }
- };
- h.prototype.getObjectsUnderPoint = function(a) {
- var b = [];
- this._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, 4, b);
- return this.sec.createArrayUnsafe(b.reverse());
- };
- h.prototype.areInaccessibleObjectsUnderPoint = function(a) {
- m("public DisplayObjectContainer::areInaccessibleObjectsUnderPoint");
- };
- h.prototype.contains = function(b) {
- a(b, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- return this._isAncestor(b);
- };
- h.prototype.swapChildrenAt = function(a, c) {
- a |= 0;
- c |= 0;
- var d = this._children;
- (0 > a || a >= d.length || 0 > c || c >= d.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- this._swapChildrenAt(a, c);
- a !== c && this._invalidateChildren();
- };
- h.prototype._swapChildrenAt = function(a, b) {
- var c = this._children, d = c[a], f = c[b];
- c[b] = d;
- d._setDepth(-1);
- d._index = b;
- c[a] = f;
- f._setDepth(-1);
- f._index = a;
- };
- h.prototype.swapChildren = function(b, c) {
- a(b, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- a(c, "child", this.sec.flash.display.DisplayObject.axClass, !1);
- this.swapChildrenAt(this.getChildIndex(b), this.getChildIndex(c));
- };
- h.prototype.removeChildren = function(a, c) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 2147483647);
- a |= 0;
- c |= 0;
- (0 > a || 0 > c || c < a || c >= this._children.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- var d = c - a + 1;
- if (0 < d) {
- for (;d--;) {
- this.removeChildAt(a);
- }
- }
- };
- h.prototype.hashCode = function() {
- for (var a = 0, b = 0;b < this.numChildren;b++) {
- this.getChildAt(b) && (a = d(a, this.getChildAt(b).hashCode()));
- }
- return d(a, this.getBounds(null).hashCode());
- };
- h.prototype.getAncestorCount = function() {
- for (var a = 0, b = 0;b < this.numChildren;b++) {
- this.getChildAt(b) && (a += 1 + this.getChildAt(b).getAncestorCount());
- }
- return a;
- };
- h.bindings = null;
- h.classSymbols = null;
- h.classInitializer = null;
- return h;
- }(h.display.InteractiveObject);
- t.DisplayObjectContainer = k;
- })(h.display || (h.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.ROUND;
- case 1:
- return d.BEVEL;
- case 2:
- return d.MITER;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.ROUND:
- return 0;
- case d.BEVEL:
- return 1;
- case d.MITER:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.ROUND = "round";
- d.BEVEL = "bevel";
- d.MITER = "miter";
- return d;
- }(b.ASObject);
- e.JointStyle = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.ROUND;
- case 1:
- return d.NONE;
- case 2:
- return d.SQUARE;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.ROUND:
- return 0;
- case d.NONE:
- return 1;
- case d.SQUARE:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.ROUND = "round";
- d.NONE = "none";
- d.SQUARE = "square";
- return d;
- }(b.ASObject);
- e.CapsStyle = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.NONE;
- case 1:
- return d.NORMAL;
- case 2:
- return d.VERTICAL;
- case 3:
- return d.HORIZONTAL;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NONE:
- return 0;
- case d.NORMAL:
- return 1;
- case d.VERTICAL:
- return 2;
- case d.HORIZONTAL:
- return 3;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NORMAL = "normal";
- d.VERTICAL = "vertical";
- d.HORIZONTAL = "horizontal";
- d.NONE = "none";
- return d;
- }(b.ASObject);
- e.LineScaleMode = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 16:
- return d.LINEAR;
- case 18:
- return d.RADIAL;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.LINEAR:
- return 16;
- case d.RADIAL:
- return 18;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.LINEAR = "linear";
- d.RADIAL = "radial";
- return d;
- }(b.ASObject);
- e.GradientType = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.PAD;
- case 1:
- return d.REFLECT;
- case 2:
- return d.REPEAT;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.PAD:
- return 0;
- case d.REFLECT:
- return 1;
- case d.REPEAT:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.PAD = "pad";
- d.REFLECT = "reflect";
- d.REPEAT = "repeat";
- return d;
- }(b.ASObject);
- e.SpreadMethod = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.RGB;
- case 1:
- return d.LINEAR_RGB;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.RGB:
- return 0;
- case d.LINEAR_RGB:
- return 1;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.RGB = "rgb";
- d.LINEAR_RGB = "linearRGB";
- return d;
- }(b.ASObject);
- e.InterpolationMethod = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d, k) {
- void 0 === a && (a = null);
- void 0 === c && (c = null);
- void 0 === d && (d = !0);
- void 0 === k && (k = !1);
- b.call(this);
- this.bitmapData = a;
- this.matrix = c;
- this.repeat = !!d;
- this.smooth = !!k;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.GraphicsBitmapFill = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.GraphicsEndFill = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k, h, e, q, g, p) {
- void 0 === a && (a = "linear");
- void 0 === f && (f = null);
- void 0 === k && (k = null);
- void 0 === h && (h = null);
- void 0 === e && (e = null);
- void 0 === q && (q = "pad");
- void 0 === g && (g = "rgb");
- void 0 === p && (p = 0);
- b.call(this);
- this.type = m(a);
- this.colors = f;
- this.alphas = k;
- this.ratios = h;
- this.matrix = e;
- this.spreadMethod = q;
- this.interpolationMethod = m(g);
- this.focalPointRatio = +p;
- }
- __extends(a, b);
- a.classInitializer = null;
- return a;
- }(b.ASObject);
- n.GraphicsGradientFill = l;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k) {
- void 0 === a && (a = null);
- void 0 === f && (f = null);
- void 0 === k && (k = "evenOdd");
- b.call(this);
- this.commands = a;
- this.data = f;
- this.winding = m(k);
- }
- __extends(a, b);
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.GraphicsPath = l;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NO_OP = void 0;
- d.MOVE_TO = 1;
- d.LINE_TO = 2;
- d.CURVE_TO = 3;
- d.WIDE_MOVE_TO = 4;
- d.WIDE_LINE_TO = 5;
- d.CUBIC_CURVE_TO = 6;
- return d;
- }(b.ASObject);
- e.GraphicsPathCommand = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.EVEN_ODD = "evenOdd";
- d.NON_ZERO = "nonZero";
- return d;
- }(b.ASObject);
- e.GraphicsPathWinding = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 1);
- b.call(this);
- this.color = a >>> 0;
- this.alpha = +c;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.GraphicsSolidFill = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k, h, e, q, g) {
- void 0 === a && (a = NaN);
- void 0 === f && (f = !1);
- void 0 === k && (k = "normal");
- void 0 === h && (h = "none");
- void 0 === e && (e = "round");
- void 0 === q && (q = 3);
- void 0 === g && (g = null);
- b.call(this);
- this.thickness = +a;
- this.pixelHinting = !!f;
- this.scaleMode = m(k);
- this.caps = m(h);
- this.joints = m(e);
- this.miterLimit = +q;
- this.fill = g;
- }
- __extends(a, b);
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.GraphicsStroke = l;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k, h) {
- void 0 === a && (a = null);
- void 0 === f && (f = null);
- void 0 === k && (k = null);
- void 0 === h && (h = "none");
- b.call(this);
- this.vertices = a;
- this.indices = f;
- this.uvtData = k;
- this.culling = m(h);
- }
- __extends(a, b);
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.GraphicsTrianglePath = l;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- function m(a, b, c, d) {
- a = c - a;
- b = d - b;
- return a * a + b * b;
- }
- function l(a, b, c, d) {
- var f = 1 - d;
- return a * f * f + 2 * b * f * d + c * d * d;
- }
- function d(a, b, c) {
- var d = (a - b) / (a - 2 * b + c);
- return 0 > d ? a : 1 < d ? c : l(a, b, c, d);
- }
- function a(a, b, c, d, f) {
- var g = f * f, k = 1 - f, p = k * k;
- return a * k * p + 3 * b * f * p + 3 * c * k * g + d * f * g;
- }
- function c(b, c, d, f) {
- var g = c - b, k;
- k = 2 * (d - c);
- var p = f - d;
- g + p === k && (p *= 1.0001);
- var h = 2 * g - k, e = k - 2 * g, e = Math.sqrt(e * e - 4 * g * (g - k + p));
- k = 2 * (g - k + p);
- g = (h + e) / k;
- h = (h - e) / k;
- e = [];
- 0 <= g && 1 >= g && e.push(Math.round(a(b, c, d, f, g)));
- 0 <= h && 1 >= h && e.push(Math.round(a(b, c, d, f, h)));
- return e;
- }
- function f(a, b, c, d, f, g, p, h, e) {
- function r(a) {
- return a * (v + a * (m + a * B)) + b - e;
- }
- function q(b) {
- 0 > b ? b = 0 : 1 < b && (b = 1);
- return a + b * (u + b * (n + b * z));
- }
- function l(a, b, c, d) {
- if (!(Math.abs(c - b) <= d)) {
- var f = .5 * (b + c);
- 0 >= a(b) * a(c) ? (t = b, E = c) : (l(a, b, f, d), l(a, f, c, d));
- }
- }
- var u = 3 * (c - a), v = 3 * (d - b), n = 3 * (f - c) - u, m = 3 * (g - d) - v, z = p - a - u - n, B = h - b - v - m, t = 0, E = 1;
- l(r, 0, 1, .05);
- g = k(t, E, r, 50, 1E-6);
- if (1E-5 < Math.abs(r(g))) {
- return [];
- }
- c = [];
- 1 >= g && c.push(q(g));
- d = B;
- f = g * d + m;
- p = f * f - 4 * d * (g * f + v);
- if (0 > p) {
- return c;
- }
- p = Math.sqrt(p);
- d = 1 / (d + d);
- g = (p - f) * d;
- d *= -f - p;
- 0 <= g && 1 >= g && c.push(q(g));
- 0 <= d && 1 >= d && c.push(q(d));
- return c;
- }
- function k(a, b, c, d, f) {
- var g, k, p, h, e, r, q = a;
- k = c(a);
- if (0 === k) {
- return a;
- }
- h = c(b);
- if (0 === h) {
- return b;
- }
- if (0 < h * k) {
- return a;
- }
- for (var l = 0, u = 0;u < d;++u) {
- l++;
- g = .5 * (b + a);
- p = c(g);
- if (0 === p) {
- break;
- }
- if (Math.abs(g - a) < f) {
- break;
- }
- 0 < p * k && (a = b, b = k, k = h, h = b);
- b = p - k;
- r = h - p;
- e = h - k;
- if (h * e < 2 * p * b) {
- b = g, h = p;
- } else {
- h = (g - a) / b;
- b = (b - r) / (r * e);
- b = a - h * k * (1 - b * p);
- h = c(b);
- if (0 === h || Math.abs(b - q) < f) {
- return b;
- }
- q = b;
- 0 > h * k || (a = b, k = h, b = g, h = p);
- }
- }
- return g;
- }
- function r(a, b, c, d, f, g) {
- return g > b !== d > b && a < (c - f) * (b - g) / (d - g) + f;
- }
- var u = e.Debug.notImplemented, q = e.AVMX.axCoerceString, g = e.NumberUtilities.clamp, p = e.Bounds, v = n.display.GradientType, z = n.display.SpreadMethod, B = n.display.InterpolationMethod, E = n.display.LineScaleMode, A = n.display.CapsStyle, G = n.display.JointStyle, w = e.ShapeData, y = function(k) {
- function h() {
- k.call(this);
- this._id = n.display.DisplayObject.getNextSyncID();
- this._graphicsData = new w;
- this._textures = [];
- this._fillBounds = new p(134217728, 134217728, 134217728, 134217728);
- this._lineBounds = new p(134217728, 134217728, 134217728, 134217728);
- this._lastX = this._lastY = 0;
- this._boundsIncludeLastCoordinates = !0;
- this._parent = null;
- this._topLeftStrokeWidth = this._bottomRightStrokeWidth = 0;
- this._isDirty = !0;
- }
- __extends(h, k);
- h.FromData = function(a, b) {
- var c = new b.sec.flash.display.Graphics;
- c._graphicsData = w.FromPlainObject(a.shape);
- a.lineBounds && (c._lineBounds.copyFrom(a.lineBounds), c._fillBounds.copyFrom(a.fillBounds || a.lineBounds));
- return c;
- };
- h.prototype.getGraphicsData = function() {
- return this._graphicsData;
- };
- h.prototype.getUsedTextures = function() {
- return this._textures;
- };
- h.prototype._setStrokeWidth = function(a) {
- switch(a) {
- case 1:
- this._topLeftStrokeWidth = 0;
- this._bottomRightStrokeWidth = 1;
- break;
- case 3:
- this._topLeftStrokeWidth = 1;
- this._bottomRightStrokeWidth = 2;
- break;
- default:
- this._bottomRightStrokeWidth = this._topLeftStrokeWidth = a = Math.ceil(.5 * a) | 0;
- }
- };
- h.prototype._setParent = function(a) {
- this._parent = a;
- };
- h.prototype._invalidate = function() {
- this._parent._invalidateFillAndLineBounds(!0, !0);
- this._parent._propagateFlagsUp(536870912);
- this._isDirty = !0;
- };
- h.prototype._getContentBounds = function(a) {
- void 0 === a && (a = !0);
- return a ? this._lineBounds : this._fillBounds;
- };
- h.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());
- };
- h.prototype.beginFill = function(a, b) {
- void 0 === b && (b = 1);
- a = a >>> 0 & 16777215;
- b = Math.round(255 * g(+b, -1, 1)) | 0;
- this._graphicsData.beginFill(a << 8 | b);
- };
- h.prototype.beginGradientFill = function(a, b, c, d, f, g, k, p) {
- void 0 === f && (f = null);
- void 0 === g && (g = "pad");
- void 0 === k && (k = "rgb");
- void 0 === p && (p = 0);
- this._writeGradientStyle(2, a, b, c, d, f, g, k, p, !1);
- };
- h.prototype.beginBitmapFill = function(a, b, c, d) {
- void 0 === b && (b = null);
- void 0 === c && (c = !0);
- void 0 === d && (d = !1);
- this._writeBitmapStyle(3, a, b, c, d, !1);
- };
- h.prototype.endFill = function() {
- this._graphicsData.endFill();
- };
- h.prototype.lineStyle = function(a, b, c, d, f, k, p, h) {
- void 0 === b && (b = 0);
- void 0 === c && (c = 1);
- void 0 === d && (d = !1);
- void 0 === f && (f = "normal");
- void 0 === k && (k = null);
- void 0 === p && (p = null);
- void 0 === h && (h = 3);
- a = +a;
- b = b >>> 0 & 16777215;
- c = Math.round(255 * g(+c, -1, 1));
- d = !!d;
- f = q(f);
- k = q(k);
- p = q(p);
- h = g(+h | 0, 0, 255);
- isNaN(a) ? (this._setStrokeWidth(0), this._graphicsData.endLine()) : (a = 20 * g(+a, 0, 255) | 0, this._setStrokeWidth(a), f = E.toNumber(q(f)), 0 > f && (f = E.toNumber(E.NORMAL)), k = A.toNumber(q(k)), 0 > k && (k = A.toNumber(A.ROUND)), p = G.toNumber(q(p)), 0 > p && (p = G.toNumber(G.ROUND)), this._graphicsData.lineStyle(a, b << 8 | c, d, f, k, p, h));
- };
- h.prototype.lineGradientStyle = function(a, b, c, d, f, g, k, p) {
- void 0 === f && (f = null);
- void 0 === g && (g = "pad");
- void 0 === k && (k = "rgb");
- void 0 === p && (p = 0);
- this._writeGradientStyle(6, a, b, c, d, f, g, k, p, !this._graphicsData.hasLines);
- };
- h.prototype.lineBitmapStyle = function(a, b, c, d) {
- void 0 === b && (b = null);
- void 0 === c && (c = !0);
- void 0 === d && (d = !1);
- this._writeBitmapStyle(7, a, b, c, d, !this._graphicsData.hasLines);
- };
- h.prototype.drawRect = function(a, b, c, d) {
- a = 20 * a | 0;
- b = 20 * b | 0;
- c = a + (20 * c | 0);
- d = b + (20 * d | 0);
- a === this._lastX && b === this._lastY || this._graphicsData.moveTo(a, b);
- this._graphicsData.lineTo(c, b);
- this._graphicsData.lineTo(c, d);
- this._graphicsData.lineTo(a, d);
- this._graphicsData.lineTo(a, b);
- this._extendBoundsByPoint(c, d);
- this._applyLastCoordinates(a, b);
- this._invalidate();
- };
- h.prototype.drawRoundRect = function(a, b, c, d, f, g) {
- a = +a;
- b = +b;
- c = +c;
- d = +d;
- f = +f;
- if ((g = +g) && f) {
- f = f / 2 | 0;
- g = g / 2 | 0;
- var k = c / 2, p = d / 2;
- f > k && (f = k);
- g > p && (g = p);
- k === f && p === g ? f === g ? this.drawCircle(a + f, b + g, f) : this.drawEllipse(a, b, 2 * f, 2 * g) : (c = a + c, d = b + d, k = a + f, f = c - f, p = b + g, g = d - g, this.moveTo(c, g), this.curveTo(c, d, f, d), this.lineTo(k, d), this.curveTo(a, d, a, g), this.lineTo(a, p), this.curveTo(a, b, k, b), this.lineTo(f, b), this.curveTo(c, b, c, p), this.lineTo(c, g));
- } else {
- this.drawRect(a, b, c, d);
- }
- };
- h.prototype.drawRoundRectComplex = function(a, b, c, d, f, g, k, p) {
- a = +a;
- b = +b;
- c = +c;
- d = +d;
- f = +f;
- g = +g;
- k = +k;
- p = +p;
- if (f | g | k | p) {
- c = a + c;
- d = b + d;
- var h = a + f;
- this.moveTo(c, d - p);
- this.curveTo(c, d, c - p, d);
- this.lineTo(a + k, d);
- this.curveTo(a, d, a, d - k);
- this.lineTo(a, b + f);
- this.curveTo(a, b, h, b);
- this.lineTo(c - g, b);
- this.curveTo(c, b, c, b + g);
- this.lineTo(c, d - p);
- } else {
- this.drawRect(a, b, c, d);
- }
- };
- h.prototype.drawCircle = function(a, b, c) {
- c = +c;
- this.drawEllipse(+a - c, +b - c, 2 * c, 2 * c);
- };
- h.prototype.drawEllipse = function(a, b, c, d) {
- c = +c / 2;
- d = +d / 2;
- a = +a + c;
- b = +b + d;
- var f = a + c, g = b;
- this.moveTo(f, g);
- for (var k = 0, p = 1, h = 0, e = 0;4 > e;e++) {
- var r = k + Math.PI / 2, k = 4 / 3 * Math.tan((r - k) / 4), q = f - h * k * c, l = g + p * k * d, p = Math.cos(r), h = Math.sin(r), f = a + p * c, g = b + h * d;
- this.cubicCurveTo(q, l, f + h * k * c, g - p * k * d, f, g);
- k = r;
- }
- };
- h.prototype.moveTo = function(a, b) {
- a = 20 * a | 0;
- b = 20 * b | 0;
- this._graphicsData.moveTo(a, b);
- this._lastX = a;
- this._lastY = b;
- this._boundsIncludeLastCoordinates = !1;
- };
- h.prototype.lineTo = function(a, b) {
- a = 20 * a | 0;
- b = 20 * b | 0;
- this._graphicsData.lineTo(a, b);
- this._applyLastCoordinates(a, b);
- this._invalidate();
- };
- h.prototype.curveTo = function(a, b, c, f) {
- a = 20 * a | 0;
- b = 20 * b | 0;
- c = 20 * c | 0;
- f = 20 * f | 0;
- this._graphicsData.curveTo(a, b, c, f);
- (a < this._lastX || a > c) && this._extendBoundsByX(d(this._lastX, a, c) | 0);
- (b < this._lastY || b > f) && this._extendBoundsByY(d(this._lastY, b, f) | 0);
- this._applyLastCoordinates(c, f);
- this._invalidate();
- };
- h.prototype.cubicCurveTo = function(a, b, d, f, g, k) {
- a = 20 * a | 0;
- b = 20 * b | 0;
- d = 20 * d | 0;
- f = 20 * f | 0;
- g = 20 * g | 0;
- k = 20 * k | 0;
- this._graphicsData.cubicCurveTo(a, b, d, f, g, k);
- var p = this._lastX, h = this._lastY;
- if (a < p || d < p || a > g || d > g) {
- for (a = c(p, a, d, g), d = a.length;d--;) {
- this._extendBoundsByX(a[d] | 0);
- }
- }
- if (b < h || f < h || b > k || f > k) {
- for (a = c(h, b, f, k), d = a.length;d--;) {
- this._extendBoundsByY(a[d] | 0);
- }
- }
- this._applyLastCoordinates(g, k);
- this._invalidate();
- };
- h.prototype.copyFrom = function(a) {
- this._graphicsData = a._graphicsData.clone();
- this._fillBounds = a._fillBounds.clone();
- this._lineBounds = a._lineBounds.clone();
- this._textures = a._textures.concat();
- this._lastX = a._lastX;
- this._lastY = a._lastY;
- this._boundsIncludeLastCoordinates = a._boundsIncludeLastCoordinates;
- this._invalidate();
- };
- h.prototype.drawPath = function(a, b, c) {
- void 0 === c && (c = "evenOdd");
- q(c);
- u("public flash.display.Graphics::drawPath");
- };
- h.prototype.drawTriangles = function(a, b, c, d) {
- void 0 === d && (d = "none");
- q(d);
- u("public flash.display.Graphics::drawTriangles");
- };
- h.prototype.drawGraphicsData = function(a) {
- u("public flash.display.Graphics::drawGraphicsData");
- };
- h.prototype._containsPoint = function(a, b, c, d) {
- var f = this._graphicsData.hasLines;
- if (!d && !(c && f ? this._lineBounds : this._fillBounds).contains(a, b)) {
- return !1;
- }
- f = !1;
- this._graphicsData.hasFills && (f = this._fillContainsPoint(a, b, d));
- !f && c && (f = this._linesContainsPoint(a, b, d));
- return f;
- };
- h.prototype._fillContainsPoint = function(a, b, c) {
- for (var d = this._graphicsData, g = d.commands, k = d.commandsPosition, p = d.coordinates, d = d.morphCoordinates, h = 0, e = 0, q = 0, u = 0, v = 0, n, m, z = !1, B = !1, t = 0, E = 0, A = !1, w = 0;w < k;w++) {
- m = g[w];
- switch(m) {
- case 9:
- z && B && r(a, b, e, q, t, E) && (A = !A);
- z = !0;
- e = t = p[h++];
- q = E = p[h++];
- c && (e = t += (d[h - 2] - t) * c, q = E += (d[h - 2] - E) * c);
- continue;
- case 10:
- u = p[h++];
- v = p[h++];
- c && (u += (d[h - 2] - u) * c, v += (d[h - 1] - v) * c);
- B && r(a, b, e, q, u, v) && (A = !A);
- break;
- case 11:
- n = p[h++];
- m = p[h++];
- u = p[h++];
- v = p[h++];
- c && (n += (d[h - 4] - n) * c, m += (d[h - 3] - m) * c, u += (d[h - 2] - u) * c, v += (d[h - 1] - v) * c);
- var G;
- if (G = B) {
- G = a;
- var y = u;
- if (m > b === q > b && v > b === q > b) {
- G = !1;
- } else {
- if (e >= G && n >= G && y >= G) {
- G = !0;
- } else {
- var C = q - 2 * m + v;
- m = 2 * (m - q);
- var x = m * m - 4 * C * (q - b);
- 0 > x ? G = !1 : (x = Math.sqrt(x), C = 1 / (C + C), q = (x - m) * C, m = (-m - x) * C, C = !1, 0 <= q && 1 >= q && l(e, n, y, q) > G && (C = !C), 0 <= m && 1 >= m && l(e, n, y, m) > G && (C = !C), G = C);
- }
- }
- }
- G && (A = !A);
- break;
- case 12:
- n = p[h++];
- m = p[h++];
- y = p[h++];
- C = p[h++];
- u = p[h++];
- v = p[h++];
- c && (n += (d[h - 6] - n) * c, m += (d[h - 5] - m) * c, y += (d[h - 4] - y) * c, C += (d[h - 3] - C) * c, u += (d[h - 2] - u) * c, v += (d[h - 1] - v) * c);
- if (G = B) {
- if (G = a, x = q > b, m > b === x && C > b === x && v > b === x) {
- G = !1;
- } else {
- if (e < G && n < G && y < G && u < G) {
- G = !1;
- } else {
- x = !1;
- q = f(e, q, n, m, y, C, u, v, b);
- for (m = q.length;m;m--) {
- q[m] >= G && (x = !x);
- }
- G = x;
- }
- }
- }
- G && (A = !A);
- break;
- case 1:
- ;
- case 2:
- ;
- case 3:
- ;
- case 4:
- z && B && r(a, b, e, q, t, E) && (A = !A);
- if (A) {
- return !0;
- }
- z = !1;
- B = 4 !== m;
- break;
- case 5:
- h++;
- }
- e = u;
- q = v;
- }
- z && B && r(a, b, e, q, t, E) && (A = !A);
- return A;
- };
- h.prototype._linesContainsPoint = function(b, f, g) {
- for (var k = this._graphicsData, p = k.commands, h = k.commandsPosition, e = k.coordinates, k = k.morphCoordinates, r = 0, q = 0, u = 0, v = 0, n = 0, z, B, t, E, A, w = 0, G = z = 0, y = 0, C = 0, x = 0, Z = 0, ea = 0;ea < h;ea++) {
- switch(p[ea]) {
- case 9:
- q = e[r++];
- u = e[r++];
- g && (q += (k[r - 2] - q) * g, u += (k[r - 1] - u) * g);
- continue;
- case 10:
- if (0 === w) {
- q = e[r++];
- u = e[r++];
- g && (q += (k[r - 2] - q) * g, u += (k[r - 1] - u) * g);
- continue;
- }
- v = e[r++];
- n = e[r++];
- g && (v += (k[r - 2] - v) * g, n += (k[r - 1] - n) * g);
- if (q === v && u === n) {
- break;
- }
- if (C < q && C < v || y > q && y > v || Z < u && Z < n || x > u && x > n) {
- break;
- }
- if (v === q || n === u) {
- return !0;
- }
- A = ((b - q) * (v - q) + (f - u) * (n - u)) / m(q, u, v, n);
- if (0 > A) {
- if (m(b, f, q, u) <= G) {
- return !0;
- }
- break;
- }
- if (1 < A) {
- if (m(b, f, v, n) <= G) {
- return !0;
- }
- break;
- }
- if (m(b, f, q + A * (v - q), u + A * (n - u)) <= G) {
- return !0;
- }
- break;
- case 11:
- if (0 === w) {
- r += 2;
- q = e[r++];
- u = e[r++];
- g && (q += (k[r - 2] - q) * g, u += (k[r - 1] - u) * g);
- continue;
- }
- z = e[r++];
- B = e[r++];
- v = e[r++];
- n = e[r++];
- g && (z += (k[r - 4] - z) * g, B += (k[r - 3] - B) * g, v += (k[r - 2] - v) * g, n += (k[r - 1] - n) * g);
- var da = d(q, z, v);
- if (C < q && C < da && C < v || y > q && y > da && y > v) {
- break;
- }
- da = d(u, B, n);
- if (Z < u && Z < da && Z < n || x > u && x > da && x > n) {
- break;
- }
- for (A = 0;1 > A;A += .02) {
- if (t = l(q, z, v, A), !(t < y || t > C) && (E = l(u, B, n, A), !(E < x || E > Z) && (b - t) * (b - t) + (f - E) * (f - E) < G)) {
- return !0;
- }
- }
- break;
- case 12:
- if (0 === w) {
- r += 4;
- r++;
- q = e[r++];
- g && (q += (k[r - 2] - q) * g, u += (k[r - 1] - u) * g);
- continue;
- }
- z = e[r++];
- B = e[r++];
- var da = e[r++], fa = e[r++], v = e[r++], n = e[r++];
- g && (z += (k[r - 6] - z) * g, B += (k[r - 5] - B) * g, da += (k[r - 4] - da) * g, fa += (k[r - 3] - fa) * g, v += (k[r - 2] - v) * g, n += (k[r - 1] - n) * g);
- for (t = c(q, z, da, v);2 > t.length;) {
- t.push(v);
- }
- if (C < q && C < v && C < t[0] && C < t[1] || y > q && y > v && y > t[0] && y > t[1]) {
- break;
- }
- for (t = c(u, B, fa, n);2 > t.length;) {
- t.push(n);
- }
- if (Z < u && Z < n && Z < t[0] && Z < t[1] || x > u && x > n && x > t[0] && x > t[1]) {
- break;
- }
- for (A = 0;1 > A;A += .02) {
- if (t = a(q, z, da, v, A), !(t < y || t > C) && (E = a(u, B, fa, n, A), !(E < x || E > Z) && (b - t) * (b - t) + (f - E) * (f - E) < G)) {
- return !0;
- }
- }
- break;
- case 5:
- w = e[r++], g && (w += (k[r - 1] - w) * g), z = w >> 2, G = z * z, y = b - z, C = b + z, x = f - z, Z = f + z;
- }
- q = v;
- u = n;
- }
- return !1;
- };
- h.prototype._writeBitmapStyle = function(a, c, d, f, g, k) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "bitmap");
- this.sec.flash.display.BitmapData.axIsType(c) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "bitmap", "flash.display.BitmapData");
- e.isNullOrUndefined(d) ? d = this.sec.flash.geom.Matrix.axClass.FROZEN_IDENTITY_MATRIX : this.sec.flash.geom.Matrix.axIsType(d) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix");
- f = !!f;
- g = !!g;
- k || (k = this._textures.length, this._textures.push(c), this._graphicsData.beginBitmap(a, k, d, f, g));
- };
- h.prototype._writeGradientStyle = function(a, c, d, f, k, p, h, r, l, u) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "type");
- c = v.toNumber(q(c));
- 0 > c && this.sec.throwError("ArgumentError", b.Errors.InvalidEnumError, "type");
- e.isNullOrUndefined(d) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "colors");
- var n = this.sec.AXArray;
- n.axIsInstanceOf(d) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "colors", "Array");
- d = d.value;
- e.isNullOrUndefined(f) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "alphas");
- n.axIsInstanceOf(f) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "alphas", "Array");
- var m = f.value;
- e.isNullOrUndefined(k) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "ratios");
- n.axIsInstanceOf(k) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "ratios", "Array");
- n = k.value;
- k = [];
- f = [];
- var t = d.length, E = t === m.length && t === n.length;
- if (E) {
- for (var A = 0;A < t;A++) {
- var w = +n[A];
- if (255 < w || 0 > w) {
- E = !1;
- break;
- }
- k[A] = d[A] << 8 & 4294967040 | 255 * g(+m[A], 0, 1);
- f[A] = w;
- }
- }
- E && (e.isNullOrUndefined(p) ? p = this.sec.flash.geom.Matrix.axClass.FROZEN_IDENTITY_MATRIX : this.sec.flash.geom.Matrix.axIsType(p) || this.sec.throwError("TypeError", b.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"), u || (h = z.toNumber(q(h)), 0 > h && (h = z.toNumber(z.PAD)), r = B.toNumber(q(r)), 0 > r && (r = B.toNumber(B.RGB)), p = {a:819.2 * p.a, b:819.2 * p.b, c:819.2 * p.c, d:819.2 * p.d, tx:p.tx, ty:p.ty}, l = g(+l, -1, 1) / 2 * 255 | 0, this._graphicsData.beginGradient(a,
- k, f, c, p, h, r, l)));
- };
- h.prototype._extendBoundsByPoint = function(a, b) {
- this._extendBoundsByX(a);
- this._extendBoundsByY(b);
- };
- h.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));
- };
- h.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));
- };
- h.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);
- };
- h.classInitializer = null;
- return h;
- }(h.ASObject);
- t.Graphics = y;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = e.Timeline, d = e.NumberUtilities.clamp, a;
- (function(a) {
- a[a.Inactive = 0] = "Inactive";
- a[a.LockToPointer = 1] = "LockToPointer";
- a[a.PreserveDistance = 2] = "PreserveDistance";
- })(a || (a = {}));
- a = function(a) {
- function b() {
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- a.call(this);
- this._fieldsInitialized || this._initializeFields();
- this._constructChildren();
- }
- __extends(b, a);
- b.prototype.applySymbol = function() {
- this._initializeFields();
- var a = this._symbol;
- a.isRoot && (this._root = this);
- this._children = [];
- a.numFrames && 0 < a.frames.length && this._initializeChildren(a.frames[0]);
- };
- b.prototype._initializeFields = function() {
- a.prototype._initializeFields.call(this);
- this._graphics = null;
- this._buttonMode = !1;
- this._hitArea = this._dropTarget = null;
- this._useHandCursor = !0;
- this._dragDeltaY = this._dragDeltaX = this._dragMode = 0;
- this._hitTarget = this._dragBounds = null;
- };
- b.prototype._addFrame = function(a) {
- var b = this._symbol.frames;
- b.push(a);
- 1 === b.length && this._initializeChildren(a);
- };
- b.prototype._initializeChildren = function(a) {
- a.controlTags && this._processControlTags(a.controlTags, !1);
- };
- b.prototype._processControlTags = function(a, b) {
- if (b) {
- for (var c = this._children.slice(), d = 0;d < c.length;d++) {
- var f = c[d];
- if (!(0 > f._depth || "_as2Object" in f && 16384 <= f._depth)) {
- for (var p = null, h = 0;h < a.length;h++) {
- if (a[h].depth === f._depth) {
- p = a[h];
- break;
- }
- }
- p && f._symbol.id === p.symbolId && f._ratio === (p.ratio | 0) || this._removeAnimatedChild(f);
- }
- }
- }
- c = this._symbol.loaderInfo;
- for (d = 0;d < a.length;d++) {
- switch(f = a[d], p = void 0 === f.tagCode ? f : c._file.getParsedTag(f), p.code) {
- case 5:
- ;
- case 28:
- (f = this.getTimelineObjectAtDepth(p.depth | 0)) && this._removeAnimatedChild(f);
- break;
- case 4:
- ;
- case 26:
- ;
- case 70:
- var h = p, l = h.depth, f = this.getTimelineObjectAtDepth(l), n = -1 < h.symbolId;
- if (h.flags & 1) {
- if (!f) {
- break;
- }
- } else {
- if (!n || f && (!b || !n)) {
- e.Debug.warning("Warning: Failed to place object at depth " + l + ".");
- break;
- }
- }
- var m = null;
- if (n && (m = c.getSymbolById(h.symbolId), !m)) {
- break;
- }
- f ? (m && !m.dynamic && f._setStaticContentFromSymbol(m), f._hasFlags(4096) && f._animate(p)) : (f = this.createAnimatedDisplayObject(m, h, !1), this.addTimelineObjectAtDepth(f, l), m.isAVM1Object && (f._placeObjectTag = h, f._setFlags(131072)));
- }
- }
- };
- b.prototype._removeAnimatedChild = function(a) {
- this.removeChild(a);
- a._name && this.axGetPublicProperty(a._name) === a && this.axSetPublicProperty(a._name, null);
- a._maskedObject && (a._maskedObject.mask = null);
- };
- b.prototype._canHaveGraphics = function() {
- return !0;
- };
- b.prototype._getGraphics = function() {
- return this._graphics;
- };
- Object.defineProperty(b.prototype, "graphics", {get:function() {
- return this._ensureGraphics();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "buttonMode", {get:function() {
- return this._buttonMode;
- }, set:function(a) {
- this._buttonMode = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "dropTarget", {get:function() {
- return this._dropTarget;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.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(b.prototype, "useHandCursor", {get:function() {
- return this._useHandCursor;
- }, set:function(a) {
- this._useHandCursor = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "soundTransform", {get:function() {
- m("public flash.display.Sprite::get soundTransform");
- }, set:function(a) {
- m("public flash.display.Sprite::set soundTransform");
- }, enumerable:!0, configurable:!0});
- b.prototype._getDragMousePosition = function() {
- var a = this.sec.flash.ui.Mouse.axClass._currentPosition;
- this._parent && (a = this._parent.globalToLocal(a));
- return a;
- };
- b.prototype.startDrag = function(a, b) {
- void 0 === a && (a = !1);
- void 0 === b && (b = null);
- if (a) {
- this._dragMode = 1;
- } else {
- this._dragMode = 2;
- var c = this._getDragMousePosition();
- this._dragDeltaX = this.x - c.x;
- this._dragDeltaY = this.y - c.y;
- }
- this._dragBounds = b;
- this.sec.flash.ui.Mouse.axClass.draggableObject = this;
- };
- b.prototype.stopDrag = function() {
- this.sec.flash.ui.Mouse.axClass.draggableObject === this && (this.sec.flash.ui.Mouse.axClass.draggableObject = null, this._dragDeltaY = this._dragDeltaX = this._dragMode = 0, this._dragBounds = null);
- };
- b.prototype._updateDragState = function(a) {
- void 0 === a && (a = null);
- var b = this._getDragMousePosition(), c = b.x, b = b.y;
- 2 === this._dragMode && (c += this._dragDeltaX, b += this._dragDeltaY);
- if (this._dragBounds) {
- var f = this._dragBounds, c = d(c, f.left, f.right), b = d(b, f.top, f.bottom)
- }
- this.x = c;
- this.y = b;
- this._dropTarget = a;
- };
- b.prototype.startTouchDrag = function(a, b, c) {
- m("public flash.display.Sprite::startTouchDrag");
- };
- b.prototype.stopTouchDrag = function(a) {
- m("public flash.display.Sprite::stopTouchDrag");
- };
- b.prototype._containsPoint = function(a, b, c, d, f, p) {
- if (!(5 === f && 0 < this._dragMode)) {
- var h = this._boundsAndMaskContainPoint(a, b, c, d, f);
- if (!h && 3 === f && this._hitArea && this._mouseEnabled) {
- var e = this._hitArea._getInvertedConcatenatedMatrix(), h = e.transformX(a, b), e = e.transformY(a, b), h = this._hitArea._boundsAndMaskContainPoint(a, b, h, e, f)
- }
- return 0 === h || 2 > f ? h : this._containsPointImpl(a, b, c, d, f, p, !0);
- }
- };
- b.prototype._containsPointDirectly = function(a, b, c, d) {
- if (this._hitArea) {
- return !!this._hitArea._containsGlobalPoint(c, d, 2, null);
- }
- c = this._getGraphics();
- return !!c && c._containsPoint(a, b, !0, 0);
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.display.DisplayObjectContainer);
- h.Sprite = a;
- l = function(a) {
- function b(d, f) {
- a.call(this, d, f.app.sec.flash.display.MovieClip.axClass, !0);
- this.numFrames = 1;
- this.frames = [];
- this.labels = [];
- this.loaderInfo = f;
- }
- __extends(b, a);
- b.FromData = function(a, c) {
- var d = new b(a, c);
- d.numFrames = a.frameCount;
- c.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (d.isAVM1Object = !0, d.avm1Context = c._avm1Context);
- for (var e = a.frames, g = c.app.sec.flash.display.FrameLabel, p = 0;p < e.length;p++) {
- var l = c.getFrame(a, p);
- l.labelName && d.labels.push(new g(l.labelName, p + 1));
- d.frames.push(l);
- }
- return d;
- };
- return b;
- }(l.DisplaySymbol);
- h.SpriteSymbol = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- function m(a, b) {
- if (!a.precedence) {
- return b.precedence ? -1 : 0;
- }
- if (!b.precedence) {
- return 1;
- }
- for (var c = 0;c < a.precedence.length && c < b.precedence.length && a.precedence[c] === b.precedence[c];) {
- c++;
- }
- return c >= a.precedence.length ? a.precedence.length === b.precedence.length ? 0 : -1 : c >= b.precedence.length ? 1 : a.precedence[c] - b.precedence[c];
- }
- var l = e.AVMX.axCoerceString, d = e.Telemetry, a = n.events;
- (function(a) {
- a[a.SWF1 = 1] = "SWF1";
- a[a.SWF9 = 9] = "SWF9";
- a[a.SWF10 = 10] = "SWF10";
- })(t.FrameNavigationModel || (t.FrameNavigationModel = {}));
- var c = function() {
- function a(b) {
- this._mc = b;
- this._soundStream = this._startSoundRegistrations = null;
- }
- a.prototype.registerStartSounds = function(a, b) {
- null === this._startSoundRegistrations && (this._startSoundRegistrations = {});
- this._startSoundRegistrations[a] = b;
- };
- a.prototype.initSoundStream = function(a) {
- this._soundStream = new t.MovieClipSoundStream(a, this._mc);
- };
- a.prototype.addSoundStreamBlock = function(a, b) {
- this._soundStream && this._soundStream.appendBlock(a, b);
- };
- a.prototype._startSounds = function(a) {
- if (a = this._startSoundRegistrations[a]) {
- for (var b = this._soundClips || (this._soundClips = {}), c = this._mc.loaderInfo, d = 0;d < a.length;d++) {
- var f = a[d], k = f.soundId, f = f.soundInfo, e = b[k];
- if (!e) {
- e = c.getSymbolById(k);
- if (!e) {
- continue;
- }
- e = h.constructClassFromSymbol(e, e.symbolClass);
- b[k] = e = {object:e};
- }
- k = f.flags & 32;
- e.channel && k && (e.channel.stop(), e.channel = null);
- k || e.channel && e.channel.playing || (e.channel = e.object.play(0, f.flags & 4 ? f.loopCount : 0));
- }
- }
- };
- a.prototype.syncSounds = function(a) {
- null !== this._startSoundRegistrations && this._startSounds(a);
- this._soundStream && this._soundStream.playFrame(a);
- };
- return a;
- }(), f = function(f) {
- function h() {
- f.call(this);
- this._fieldsInitialized || this._initializeFields();
- }
- __extends(h, f);
- h.classInitializer = function() {
- this.reset();
- };
- h.reset = function() {
- this.frameNavigationModel = 10;
- this._callQueue = [];
- };
- h.runFrameScripts = function() {
- b.enterTimeline("MovieClip.executeFrame");
- var a = this.sec.flash.display.MovieClip.axClass, c = this.sec.flash.display.DisplayObject.axClass, d = a._callQueue;
- a._callQueue = [];
- for (var f = 0;f < d.length;f++) {
- var k = d[f];
- k._allowFrameNavigation = !1;
- k.callFrame(k._currentFrame);
- k._allowFrameNavigation = !0;
- k._nextFrame !== k._currentFrame && (9 === a.frameNavigationModel ? (k._advanceFrame(), k._constructFrame(), k._removeFlags(8192), k.callFrame(k._currentFrame)) : c.performFrameNavigation(!1, !0));
- }
- b.leaveTimeline();
- };
- h.runAvm1FrameScripts = function() {
- b.enterTimeline("MovieClip.runAvm1FrameScripts");
- var a = this.sec.flash.display.MovieClip.axClass, c = this.sec.flash.display.DisplayObject.axClass, d = a._callQueue;
- a._callQueue = [];
- for (var a = [], f = 0;f < d.length;f++) {
- var k = d[f];
- k.queueAvm1FrameScripts(k._currentFrame, a);
- }
- if (a.length) {
- a.sort(m);
- for (f = 0;f < d.length;f++) {
- k = d[f], k._allowFrameNavigation = !1;
- }
- for (f = 0;f < a.length;f++) {
- k = a[f], k.call(k.context);
- }
- for (f = 0;f < d.length;f++) {
- k = d[f], k._allowFrameNavigation = !0, k._nextFrame !== k._currentFrame && c.performFrameNavigation(!1, !0);
- }
- }
- b.leaveTimeline();
- };
- h.prototype.applySymbol = function() {
- f.prototype.applySymbol.call(this);
- this.sec.flash.display.DisplayObject.axClass._advancableInstances.push(this);
- var a = this._symbol;
- this._totalFrames = a.numFrames;
- this._currentFrame = 1;
- a.isRoot || this.addScene("", a.labels, 0, a.numFrames);
- this._frames = a.frames;
- a.isAVM1Object && a.avm1Name && (this.name = a.avm1Name);
- };
- h.prototype._initAvm1Data = function() {
- var a = this._symbol.frames;
- if (a) {
- for (var b = 0;b < a.length;b++) {
- this._initAvm1FrameData(b, a[b]);
- }
- }
- };
- h.prototype._initAvm1FrameData = function(a, b) {
- var c = this._symbol.avm1Context;
- if (b.exports) {
- for (var d = b.exports, f = 0;f < d.length;f++) {
- var k = d[f];
- c.addAsset(k.className, k.symbolId, null);
- }
- }
- (c = b.initActionBlocks) && this._addAvm1InitActionBlocks(a, c);
- (c = b.actionBlocks) && this._addAvm1FrameScripts(a, c);
- };
- h.prototype._addAvm1FrameScripts = function(a, b) {
- for (var c = 0;c < b.length;c++) {
- var d = b[c], f = this._symbol, k = f.avm1Context, f = k.actionsDataFactory.createActionsData(d.actionsData, "s" + f.id + "f" + a + "i" + c), f = function(a) {
- var b = e.AVM1.Lib.getAVM1Object(this, k);
- k.executeActions(a, b);
- }.bind(this, f);
- f.precedence = this._getScriptPrecedence().concat(d.precedence);
- this.addFrameScript(a, f);
- }
- };
- h.prototype._addAvm1InitActionBlocks = function(a, b) {
- function c() {
- for (var f = d._symbol, g = f.avm1Context, k = e.AVM1.Lib.getAVM1Object(d, g), h = 0;h < b.length;h++) {
- var r = g.actionsDataFactory.createActionsData(b[h].actionsData, "s" + f.id + "f" + a + "i" + h);
- g.executeActions(r, k);
- }
- }
- var d = this;
- if (this.currentFrame === a + 1) {
- c();
- } else {
- var f = function() {
- d.currentFrame === a + 1 && (d.removeEventListener("enterFrame", f), c());
- };
- this.addEventListener("enterFrame", f);
- }
- };
- h.prototype._initializeFields = function() {
- f.prototype._initializeFields.call(this);
- this._currentFrame = 0;
- this._totalFrames = 1;
- this._trackAsMenu = !1;
- this._scenes = [];
- this._symbol || this.addScene("", [], 0, 1);
- this._enabled = !0;
- this._isPlaying = !1;
- this._frames = [];
- this._frameScripts = [];
- this._nextFrame = 1;
- this._stopped = !1;
- this._allowFrameNavigation = !0;
- this._sounds = null;
- this._buttonFrames = Object.create(null);
- this._currentButtonState = null;
- };
- h.prototype._addFrame = function(a) {
- var b = this._symbol, c = b.frames;
- c.push(a);
- a.labelName && this.addFrameLabel(a.labelName, c.length);
- a.soundStreamHead && this._initSoundStream(a.soundStreamHead);
- a.soundStreamBlock && this._addSoundStreamBlock(c.length, a.soundStreamBlock);
- b.isAVM1Object && this._hasFlags(256) && this._initAvm1FrameData(c.length - 1, a);
- 1 === c.length && this._initializeChildren(c[0]);
- };
- h.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();
- this._gotoFrame(a, null);
- this._currentButtonState = a;
- this._advanceFrame();
- return;
- }
- 1 < this._totalFrames && !this._stopped && this._hasFlags(256) && this._nextFrame++;
- }
- this._advanceFrame();
- this._symbol && this._symbol.isAVM1Object && !this._hasFlags(256) && this._initAvm1Data();
- };
- h.prototype._constructFrame = function() {
- this._constructChildren();
- };
- h.prototype._enqueueFrameScripts = function() {
- var a = !1;
- this._hasFlags(1024) && (a = !0);
- this._hasFlags(8192) && (this._removeFlags(8192), a = !0);
- a && this.sec.flash.display.MovieClip.axClass._callQueue.push(this);
- f.prototype._enqueueFrameScripts.call(this);
- };
- Object.defineProperty(h.prototype, "currentFrame", {get:function() {
- var a = this._currentFrame;
- this._allowFrameNavigation || 1 !== this.sec.flash.display.MovieClip.axClass.frameNavigationModel || (a = this._nextFrame);
- return a - this._sceneForFrameIndex(a).offset;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "framesLoaded", {get:function() {
- return this._frames.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "totalFrames", {get:function() {
- return this._totalFrames;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "trackAsMenu", {get:function() {
- return this._trackAsMenu;
- }, set:function(a) {
- this._trackAsMenu = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "scenes", {get:function() {
- var a = this._scenes ? this._scenes.map(function(a) {
- return a.clone();
- }) : [];
- return this.sec.createArrayUnsafe(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "currentScene", {get:function() {
- return this._sceneForFrameIndex(this._currentFrame).clone();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "currentLabel", {get:function() {
- var a = this._labelForFrame(this._currentFrame);
- return a ? a.name : null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "currentLabels", {get:function() {
- return this._sceneForFrameIndex(this._currentFrame).labels;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.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(h.prototype, "enabled", {get:function() {
- return this._enabled;
- }, set:function(a) {
- this._enabled = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(h.prototype, "isPlaying", {get:function() {
- return this._isPlaying;
- }, enumerable:!0, configurable:!0});
- h.prototype.play = function() {
- 1 < this._totalFrames && (this._isPlaying = !0);
- this._stopped = !1;
- };
- h.prototype.stop = function() {
- this._isPlaying = !1;
- this._stopped = !0;
- };
- h.prototype._getAbsFrameNumber = function(a, c) {
- var d = 10 !== this.sec.flash.display.MovieClip.axClass.frameNavigationModel, f;
- if (null !== c) {
- c = l(c);
- for (var k = this._scenes, h = 0;h < k.length && (f = k[h], f.name !== c);h++) {
- }
- if (h === k.length) {
- if (d) {
- return;
- }
- this.sec.throwError("ArgumentError", b.Errors.SceneNotFoundError, c);
- }
- } else {
- f = this._sceneForFrameIndex(this._currentFrame);
- }
- k = parseInt(a, 10);
- if (k != a) {
- k = f.getLabelByName(a, d);
- if (!k) {
- if (d) {
- return;
- }
- this.sec.throwError("ArgumentError", b.Errors.FrameLabelNotFoundError, a, c);
- }
- k = k.frame;
- }
- return f.offset + k;
- };
- h.prototype._gotoFrame = function(a, b) {
- var c = this._getAbsFrameNumber(a, b);
- void 0 !== c && this._gotoFrameAbs(c);
- };
- h.prototype._gotoFrameAbs = function(a) {
- 1 > a ? a = 1 : a > this._totalFrames && (a = this._totalFrames);
- a !== this._nextFrame && (this._nextFrame = a, this._allowFrameNavigation && (9 === this.sec.flash.display.MovieClip.axClass.frameNavigationModel ? (this._advanceFrame(), this._constructFrame()) : this.sec.flash.display.DisplayObject.axClass.performFrameNavigation(!1, !0)));
- };
- h.prototype._advanceFrame = function() {
- var a = this._currentFrame, b = this._nextFrame;
- b > this._totalFrames && (b = 1);
- if (a === b) {
- this._nextFrame = b;
- } else {
- if (b > this.framesLoaded) {
- this._nextFrame = b;
- } else {
- var c = this._frames[b - 1];
- if (c !== this._frames[a - 1] && (this._seekToFrame(b), c.controlTags)) {
- for (var a = c.controlTags, d, c = 0;c < a.length;c++) {
- var f = a[c];
- if (15 === f.tagCode || 61 === f.tagCode) {
- f = this._symbol.loaderInfo._file.getParsedTag(f);
- }
- 15 === f.code && (d || (d = []), d.push(new e.Timeline.SoundStart(f.soundId, f.soundInfo)));
- }
- d && this._registerStartSounds(b, d);
- }
- this._frameScripts[b] && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384));
- this._currentFrame = this._nextFrame = b;
- this._syncSounds(b);
- }
- }
- };
- h.prototype._seekToFrame = function(a) {
- var b = this._currentFrame, c = this._frames;
- if (a === b + 1) {
- c = c[a - 1], c.controlTags && this._processControlTags(c.controlTags, !1);
- } else {
- for (var d = c[b - 1], f = this._symbol.loaderInfo, k = a < b, h = [], e, b = k ? 0 : b;a-- > b;) {
- var r = c[a];
- if (r !== d && (d = r, r = r.controlTags)) {
- for (var l = r.length;l--;) {
- var n = r[l], n = void 0 === n.tagCode ? n : f._file.getParsedTag(n);
- switch(n.code) {
- case 5:
- ;
- case 28:
- e || (e = Object.create(null));
- e[n.depth] = !0;
- k || h.push(n);
- break;
- case 4:
- ;
- case 26:
- ;
- case 70:
- e && e[n.depth] || h.push(n);
- break;
- default:
- h.push(n);
- }
- }
- }
- }
- h.reverse();
- this._processControlTags(h, k);
- }
- };
- h.prototype._sceneForFrameIndex = function(a) {
- var b = this._scenes;
- if (0 === a) {
- return b[0];
- }
- for (var c = 0;c < b.length;c++) {
- var d = b[c];
- if (d.offset < a && d.offset + d.numFrames >= a) {
- return d;
- }
- }
- };
- h.prototype._labelForFrame = function(a) {
- for (var b = this._scenes, c = null, d = 0;d < b.length;d++) {
- var f = b[d];
- if (f.offset > a) {
- break;
- }
- for (var k = f.labels.value, h = 0;h < k.length;h++) {
- var e = k[h];
- if (e.frame > a - f.offset) {
- return c;
- }
- c = e;
- }
- }
- return c;
- };
- h.prototype.callFrame = function(a) {
- if (a = this._frameScripts[a | 0]) {
- for (var b = 0;b < a.length;b++) {
- var c = a[b];
- try {
- c.call(this);
- } catch (f) {
- throw d.instance.reportTelemetry({topic:"error", error:2}), this.stop(), f;
- }
- }
- }
- };
- h.prototype.queueAvm1FrameScripts = function(b, c) {
- if (this._hasFlags(1024)) {
- this._removeFlags(1024);
- var d = function() {
- this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(a.Event.AVM1_LOAD));
- }.bind(this);
- d.precedence = this._getScriptPrecedence();
- d.context = this;
- c.push(d);
- }
- if (d = this._frameScripts[b]) {
- for (var f = 0;f < d.length;f++) {
- var k = d[f];
- k.context = this;
- c.push(k);
- }
- }
- };
- h.prototype.nextFrame = function() {
- this.gotoAndStop(this._currentFrame + 1);
- };
- h.prototype.prevFrame = function() {
- this.gotoAndStop(this._currentFrame - 1);
- };
- h.prototype.gotoAndPlay = function(a, c) {
- void 0 === c && (c = null);
- (0 === arguments.length || 2 < arguments.length) && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length);
- c = l(c);
- a = l(a) + "";
- this.play();
- this._gotoFrame(a, c);
- };
- h.prototype.gotoAndStop = function(a, c) {
- void 0 === c && (c = null);
- (0 === arguments.length || 2 < arguments.length) && this.sec.throwError("ArgumentError", b.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length);
- c = l(c);
- a = l(a) + "";
- this.stop();
- this._gotoFrame(a, c);
- };
- h.prototype.addFrameScript = function(a, c) {
- if (this._currentFrame) {
- var d = arguments.length;
- d & 1 && this.sec.throwError("ArgumentError", b.Errors.TooFewArgumentsError, d, d + 1);
- for (var f = this._frameScripts, k = this._totalFrames, h = 0;h < d;h += 2) {
- var e = (arguments[h] | 0) + 1;
- if (!(1 > e || e > k)) {
- var r = arguments[h + 1], l = f[e];
- l ? r.precedence ? l.push(r) : l[0] = r : f[e] = [r];
- e === this._currentFrame && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384));
- }
- }
- }
- };
- Object.defineProperty(h.prototype, "_isFullyLoaded", {get:function() {
- return this.framesLoaded >= this.totalFrames;
- }, enumerable:!0, configurable:!0});
- h.prototype._registerStartSounds = function(a, b) {
- null === this._sounds && (this._sounds = new c(this));
- this._sounds.registerStartSounds(a, b);
- };
- h.prototype._initSoundStream = function(a) {
- null === this._sounds && (this._sounds = new c(this));
- this._sounds.initSoundStream(a);
- };
- h.prototype._addSoundStreamBlock = function(a, b) {
- null === this._sounds && (this._sounds = new c(this));
- this._sounds.addSoundStreamBlock(a, b);
- };
- h.prototype._syncSounds = function(a) {
- null !== this._sounds && this._sounds.syncSounds(a);
- };
- h.prototype.addScene = function(a, b, c, d) {
- b = this.sec.createArrayUnsafe(b);
- this._scenes.push(new this.sec.flash.display.Scene(a, b, c, d));
- };
- h.prototype.addFrameLabel = function(a, b) {
- var c = this._sceneForFrameIndex(b);
- c.getLabelByName(a, !1) || c.labels.value.push(new this.sec.flash.display.FrameLabel(a, b - c.offset));
- };
- h.prototype.prevScene = function() {
- var a = this._sceneForFrameIndex(this._currentFrame);
- 0 !== a.offset && this._gotoFrameAbs(this._sceneForFrameIndex(a.offset).offset + 1);
- };
- h.prototype.nextScene = function() {
- var a = this._sceneForFrameIndex(this._currentFrame);
- a.offset + a.numFrames !== this._totalFrames && this._gotoFrameAbs(a.offset + a.numFrames + 1);
- };
- h.prototype._containsPointImpl = function(a, b, c, d, h, e, r) {
- a = f.prototype._containsPointImpl.call(this, a, b, c, d, h, e, !0);
- 2 === a && 3 === h && "_as2Object" in this && !this.buttonMode && e[0] === this && (e.length = 0);
- return a;
- };
- h.classSymbols = null;
- h.instanceSymbols = null;
- return h;
- }(n.display.Sprite);
- t.MovieClip = f;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- function m(a, b) {
- var c = !1, d;
- a.addEventListener("timeupdate", function(a) {
- c ? performance.now() : (d = performance.now(), c = !0);
- });
- a.addEventListener("pause", function(a) {
- c = !1;
- });
- a.addEventListener("seeking", function(a) {
- c = !1;
- });
- }
- var l = e.SWF.MP3DecoderSession, d = function() {
- function a(b, c) {
- this._sec = b;
- this._element = c;
- }
- Object.defineProperty(a.prototype, "isReady", {get:function() {
- return !!this._channel;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "element", {get:function() {
- return this._element;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "currentTime", {get:function() {
- return this._element.currentTime;
- }, enumerable:!0, configurable:!0});
- a.prototype.playFrom = function(a) {
- var b = this._element;
- b.paused ? (b.play(), b.addEventListener("playing", function p(c) {
- b.removeEventListener("playing", p);
- b.currentTime = a;
- })) : b.currentTime = a;
- };
- Object.defineProperty(a.prototype, "paused", {get:function() {
- return this._element.paused;
- }, set:function(a) {
- var b = this._element;
- a ? b.paused || b.pause() : b.paused && b.play();
- }, enumerable:!0, configurable:!0});
- a.prototype.createChannel = function() {
- this._channel = n.media.SoundChannel.initializeFromAudioElement(this._sec, this._element);
- };
- a.prototype.queueData = function(a) {
- };
- a.prototype.finish = function() {
- };
- return a;
- }(), a = function(a) {
- function b(c, d) {
- a.call(this, c, d);
- this._mediaSource = new MediaSource;
- this._sourceBuffer = null;
- this._updating = !1;
- this._loading = !0;
- this._rawFrames = [];
- this._isReady = !1;
- this._mediaSource.addEventListener("sourceopen", this._openMediaSource.bind(this));
- this.element.src = URL.createObjectURL(this._mediaSource);
- }
- __extends(b, a);
- b.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());
- };
- b.prototype._openMediaSource = function() {
- var a = this._mediaSource.addSourceBuffer("audio/mpeg");
- a.addEventListener("update", function() {
- this._updating = !1;
- this._appendSoundData();
- }.bind(this));
- this._sourceBuffer = a;
- this._appendSoundData();
- };
- b.prototype.queueData = function(a) {
- this._rawFrames.push(a.data);
- this._appendSoundData();
- };
- b.prototype.finish = function() {
- this._loading = !1;
- this._appendSoundData();
- };
- return b;
- }(d), c = function(a) {
- function b(c, d) {
- a.call(this, c, d);
- this._rawFrames = [];
- }
- __extends(b, a);
- b.prototype.queueData = function(a) {
- this._rawFrames.push(a.data);
- };
- b.prototype.finish = function() {
- var a = new Blob(this._rawFrames);
- this.element.src = URL.createObjectURL(a);
- this.createChannel();
- };
- return b;
- }(d), f = function() {
- function a(b, c) {
- this._sec = b;
- this._sound = this._channel = null;
- this._data = c;
- this._position = 0;
- }
- Object.defineProperty(a.prototype, "currentTime", {get:function() {
- return NaN;
- }, enumerable:!0, configurable:!0});
- a.prototype.playFrom = function(a) {
- };
- Object.defineProperty(a.prototype, "paused", {get:function() {
- return !1;
- }, set:function(a) {
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "isReady", {get:function() {
- return !!this._channel;
- }, enumerable:!0, configurable:!0});
- a.prototype.queueData = function(a) {
- this._data.pcm.set(a.pcm, this._position);
- this._position += a.pcm.length;
- };
- a.prototype.finish = function() {
- var a = n.media.Sound.initializeFromPCMData(this._sec, this._data), b = a.play();
- this._sound = a;
- this._channel = b;
- };
- return a;
- }(), k = function(a) {
- function b(c, d) {
- a.call(this, c, d);
- this._decoderPosition = 0;
- this._decoderSession = new l;
- this._decoderSession.onframedata = function(a) {
- var b = this._decoderPosition;
- d.pcm.set(a, b);
- this._decoderPosition = b + a.length;
- }.bind(this);
- this._decoderSession.onclosed = function() {
- f.prototype.finish.call(this);
- }.bind(this);
- this._decoderSession.onerror = function(a) {
- e.Debug.warning("MP3DecoderSession error: " + a);
- };
- }
- __extends(b, a);
- b.prototype.queueData = function(a) {
- this._decoderSession.pushAsync(a.data);
- };
- b.prototype.finish = function() {
- this._decoderSession.close();
- };
- return b;
- }(f), d = function() {
- function d(r, l) {
- this.movieClip = l;
- this.decode = r.decode.bind(r);
- this.data = {sampleRate:r.sampleRate, channels:r.channels};
- this.seekIndex = [];
- this.position = 0;
- this.wasFullyLoaded = !1;
- this.waitFor = this.expectedFrame = 0;
- var g = l.sec, p = "mp3" === r.format;
- if (p && !b.webAudioMP3Option.value) {
- var v = document.createElement("audio");
- v.preload = "metadata";
- v.loop = !1;
- m(v, l);
- if (v.canPlayType("audio/mpeg")) {
- this.element = v;
- b.mediaSourceMP3Option.value ? "undefined" !== typeof MediaSource && MediaSource.isTypeSupported("audio/mpeg") ? this.soundStreamAdapter = new a(g, v) : (e.Debug.warning("MediaSource is not supported"), this.soundStreamAdapter = new c(g, v)) : this.soundStreamAdapter = new c(g, v);
- return;
- }
- }
- this.data.pcm = new Float32Array((r.samplesCount + 1) * this.movieClip.totalFrames * r.channels);
- this.soundStreamAdapter = p ? new k(g, this.data) : new f(g, this.data);
- }
- d.prototype.appendBlock = function(a, b) {
- var c = this.decode(b), d = this.position;
- this.seekIndex[a] = d + c.seek * this.data.channels;
- this.position = d + c.samplesCount * this.data.channels;
- this.soundStreamAdapter.queueData(c);
- };
- 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 b = this.data, b = this.seekIndex[a] / b.sampleRate / b.channels, c = this.soundStreamAdapter.currentTime;
- this.expectedFrame !== a ? this.soundStreamAdapter.playFrom(b) : 0 < this.waitFor ? this.waitFor <= b && (this.soundStreamAdapter.paused = !1, this.waitFor = 0) : 1 < c - b ? (e.Debug.warning("Sound is faster than frames by " + (c - b)), this.waitFor = c - .25, this.soundStreamAdapter.paused = !0) : 1 < b - c && (e.Debug.warning("Sound is slower than frames by " + (b - c)), this.soundStreamAdapter.playFrom(b + .25));
- this.expectedFrame = a + 1;
- }
- };
- return d;
- }();
- t.MovieClipSoundStream = d;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.AVMX.axCoerceString, a = function(a) {
- function f() {
- a.call(this);
- this._root = this;
- this._stage = this;
- this._frameRate = 24;
- this._scaleMode = t.StageScaleMode.SHOW_ALL;
- this._align = "";
- this._stageHeight = this._stageWidth = 0;
- this._showDefaultContextMenu = !0;
- this._focus = null;
- this._colorCorrection = t.ColorCorrection.DEFAULT;
- this._colorCorrectionSupport = t.ColorCorrectionSupport.DEFAULT_OFF;
- this._stageFocusRect = !0;
- this._quality = t.StageQuality.HIGH;
- this._fullScreenSourceRect = this._displayState = null;
- this._mouseLock = !1;
- var b = this.sec.getVectorClass(this.sec.AXObject);
- this._stageVideos = b.axConstruct([0, !0]);
- this._stage3Ds = b.axConstruct([0, !0]);
- this._colorARGB = 4294967295;
- this._fullScreenHeight = this._fullScreenWidth = 0;
- this._wmodeGPU = !1;
- this._softKeyboardRect = new this.sec.flash.geom.Rectangle;
- this._allowsFullScreenInteractive = this._allowsFullScreen = !1;
- this._contentsScaleFactor = 1;
- this._displayContextInfo = null;
- this._stageContainerHeight = this._stageContainerWidth = this._timeout = -1;
- this._invalidated = !1;
- }
- __extends(f, a);
- f.prototype.setRoot = function(a) {
- this.addTimelineObjectAtDepth(a, 0);
- };
- Object.defineProperty(f.prototype, "frameRate", {get:function() {
- return this._frameRate;
- }, set:function(a) {
- this._frameRate = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scaleMode", {get:function() {
- return this._scaleMode;
- }, set:function(a) {
- a = d(a);
- 0 > h.display.StageScaleMode.toNumber(a) && this.sec.throwError("ArgumentError", b.Errors.InvalidEnumError, "scaleMode");
- this._scaleMode = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "align", {get:function() {
- return this._align;
- }, set:function(a) {
- a = d(a);
- a = h.display.StageAlign.toNumber(a);
- this._align = h.display.StageAlign.fromNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "stageWidth", {get:function() {
- return this.scaleMode !== t.StageScaleMode.NO_SCALE ? this._stageWidth / 20 | 0 : this._stageContainerWidth;
- }, set:function(a) {
- }, enumerable:!0, configurable:!0});
- f.prototype._setInitialName = function() {
- this._name = null;
- };
- f.prototype.setStageWidth = function(a) {
- this._stageWidth = 20 * a | 0;
- };
- Object.defineProperty(f.prototype, "stageHeight", {get:function() {
- return this.scaleMode !== t.StageScaleMode.NO_SCALE ? this._stageHeight / 20 | 0 : this._stageContainerHeight;
- }, set:function(a) {
- }, enumerable:!0, configurable:!0});
- f.prototype.setStageHeight = function(a) {
- this._stageHeight = 20 * a | 0;
- };
- f.prototype.setStageColor = function(a) {
- this._colorARGB = a;
- };
- f.prototype.setStageContainerSize = function(a, b, c) {
- this._contentsScaleFactor = c;
- if (this._stageContainerWidth !== a || this._stageContainerHeight !== b) {
- this._stageContainerWidth = a, this._stageContainerHeight = b, this.scaleMode === t.StageScaleMode.NO_SCALE && this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(h.events.Event.RESIZE));
- }
- };
- Object.defineProperty(f.prototype, "showDefaultContextMenu", {get:function() {
- return this._showDefaultContextMenu;
- }, set:function(a) {
- this._showDefaultContextMenu = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "focus", {get:function() {
- return this._focus;
- }, set:function(a) {
- this._focus = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "colorCorrection", {get:function() {
- return this._colorCorrection;
- }, set:function(a) {
- m("public flash.display.Stage::set colorCorrection");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "colorCorrectionSupport", {get:function() {
- return this._colorCorrectionSupport;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "stageFocusRect", {get:function() {
- return this._stageFocusRect;
- }, set:function(a) {
- this._stageFocusRect = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "quality", {get:function() {
- return this._quality.toUpperCase();
- }, set:function(a) {
- a = (d(a) || "").toLowerCase();
- 0 > h.display.StageQuality.toNumber(a) && (a = h.display.StageQuality.HIGH);
- this._quality = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "displayState", {get:function() {
- return this._displayState;
- }, set:function(a) {
- a = d(a);
- 0 > h.display.StageDisplayState.toNumber(a) && (a = h.display.StageDisplayState.NORMAL);
- this._displayState = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "fullScreenSourceRect", {get:function() {
- return this._fullScreenSourceRect;
- }, set:function(a) {
- m("public flash.display.Stage::set fullScreenSourceRect");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "mouseLock", {get:function() {
- return this._mouseLock;
- }, set:function(a) {
- l("public flash.display.Stage::set mouseLock");
- this._mouseLock = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "stageVideos", {get:function() {
- l("public flash.display.Stage::get stageVideos");
- return this._stageVideos;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "stage3Ds", {get:function() {
- l("public flash.display.Stage::get stage3Ds");
- return this._stage3Ds;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "color", {get:function() {
- return this._colorARGB;
- }, set:function(a) {
- this._colorARGB = a | 4278190080;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "alpha", {get:function() {
- return this._colorTransform.alphaMultiplier;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "fullScreenWidth", {get:function() {
- return this._fullScreenWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "fullScreenHeight", {get:function() {
- return this._fullScreenHeight;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "wmodeGPU", {get:function() {
- return this._wmodeGPU;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "softKeyboardRect", {get:function() {
- return this._softKeyboardRect;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "allowsFullScreen", {get:function() {
- return this._allowsFullScreen;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "allowsFullScreenInteractive", {get:function() {
- return this._allowsFullScreenInteractive;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "contentsScaleFactor", {get:function() {
- return this._contentsScaleFactor;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "displayContextInfo", {get:function() {
- return this._displayContextInfo;
- }, enumerable:!0, configurable:!0});
- f.prototype.removeChildAt = function(b) {
- return a.prototype.removeChildAt.call(this, b);
- };
- f.prototype.swapChildrenAt = function(b, d) {
- a.prototype.swapChildrenAt.call(this, b, d);
- };
- Object.defineProperty(f.prototype, "width", {get:function() {
- return this._getWidth();
- }, set:function(a) {
- this._setWidth(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "height", {get:function() {
- return this._getHeight();
- }, set:function(a) {
- this._setHeight(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "mouseChildren", {get:function() {
- return this._mouseChildren;
- }, set:function(a) {
- this._setMouseChildren(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "numChildren", {get:function() {
- return this._children.length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "tabChildren", {get:function() {
- return this._tabChildren;
- }, set:function(a) {
- this._setTabChildren(a);
- }, enumerable:!0, configurable:!0});
- f.prototype.addChild = function(b) {
- return a.prototype.addChild.call(this, b);
- };
- f.prototype.addChildAt = function(b, d) {
- return a.prototype.addChildAt.call(this, b, d);
- };
- f.prototype.setChildIndex = function(b, d) {
- a.prototype.setChildIndex.call(this, b, d);
- };
- f.prototype.addEventListener = function(b, d, f, h, g) {
- a.prototype.addEventListener.call(this, b, d, f, h, g);
- };
- f.prototype.hasEventListener = function(b) {
- return a.prototype.hasEventListener.call(this, b);
- };
- f.prototype.willTrigger = function(b) {
- return a.prototype.willTrigger.call(this, b);
- };
- f.prototype.dispatchEvent = function(b) {
- return a.prototype.dispatchEvent.call(this, b);
- };
- f.prototype.invalidate = function() {
- this._invalidated = !0;
- };
- f.prototype.isFocusInaccessible = function() {
- m("public flash.display.Stage::isFocusInaccessible");
- };
- f.prototype.requireOwnerPermissions = function() {
- };
- f.prototype.render = function() {
- this._invalidated && (this.sec.flash.display.DisplayObject.axClass._broadcastFrameEvent(h.events.Event.RENDER), this._invalidated = !1);
- };
- Object.defineProperty(f.prototype, "name", {get:function() {
- return this._name;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "mask", {get:function() {
- return this._mask;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "visible", {get:function() {
- return this._hasFlags(1);
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "x", {get:function() {
- return this._getX();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "y", {get:function() {
- return this._getY();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "z", {get:function() {
- return this._z;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scaleX", {get:function() {
- return Math.abs(this._scaleX);
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scaleY", {get:function() {
- return this._scaleY;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scaleZ", {get:function() {
- return this._scaleZ;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "rotation", {get:function() {
- return this._rotation;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "rotationX", {get:function() {
- return this._rotationX;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "rotationY", {get:function() {
- return this._rotationX;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "rotationZ", {get:function() {
- return this._rotationX;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "cacheAsBitmap", {get:function() {
- return this._getCacheAsBitmap();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "opaqueBackground", {get:function() {
- return this._opaqueBackground;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scrollRect", {get:function() {
- return this._getScrollRect();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "filters", {get:function() {
- return this._getFilters();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "blendMode", {get:function() {
- return this._blendMode;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "transform", {get:function() {
- return this._getTransform();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "accessibilityProperties", {get:function() {
- return this._accessibilityProperties;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "scale9Grid", {get:function() {
- return this._getScale9Grid();
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "tabEnabled", {get:function() {
- return this._tabEnabled;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "tabIndex", {get:function() {
- return this._tabIndex;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "focusRect", {get:function() {
- return this._focusRect;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "mouseEnabled", {get:function() {
- return this._mouseEnabled;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "accessibilityImplementation", {get:function() {
- return this._accessibilityImplementation;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "textSnapshot", {get:function() {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- return null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "contextMenu", {get:function() {
- return this._contextMenu;
- }, set:function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidStageMethodError);
- }, enumerable:!0, configurable:!0});
- f.classInitializer = null;
- f.classSymbols = null;
- f.instanceSymbols = null;
- return f;
- }(h.display.DisplayObjectContainer);
- t.Stage = a;
- })(h.display || (h.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.ACTIONSCRIPT2 = 2;
- d.ACTIONSCRIPT3 = 3;
- return d;
- }(b.ASObject);
- e.ActionScriptVersion = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- ;
- case 1:
- return d.NORMAL;
- case 2:
- return d.LAYER;
- case 3:
- return d.MULTIPLY;
- case 4:
- return d.SCREEN;
- case 5:
- return d.LIGHTEN;
- case 6:
- return d.DARKEN;
- case 7:
- return d.DIFFERENCE;
- case 8:
- return d.ADD;
- case 9:
- return d.SUBTRACT;
- case 10:
- return d.INVERT;
- case 11:
- return d.ALPHA;
- case 12:
- return d.ERASE;
- case 13:
- return d.OVERLAY;
- case 14:
- return d.HARDLIGHT;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NORMAL:
- return 1;
- case d.LAYER:
- return 2;
- case d.MULTIPLY:
- return 3;
- case d.SCREEN:
- return 4;
- case d.LIGHTEN:
- return 5;
- case d.DARKEN:
- return 6;
- case d.DIFFERENCE:
- return 7;
- case d.ADD:
- return 8;
- case d.SUBTRACT:
- return 9;
- case d.INVERT:
- return 10;
- case d.ALPHA:
- return 11;
- case d.ERASE:
- return 12;
- case d.OVERLAY:
- return 13;
- case d.HARDLIGHT:
- return 14;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NORMAL = "normal";
- d.LAYER = "layer";
- d.MULTIPLY = "multiply";
- d.SCREEN = "screen";
- d.LIGHTEN = "lighten";
- d.DARKEN = "darken";
- d.ADD = "add";
- d.SUBTRACT = "subtract";
- d.DIFFERENCE = "difference";
- d.INVERT = "invert";
- d.OVERLAY = "overlay";
- d.HARDLIGHT = "hardlight";
- d.ALPHA = "alpha";
- d.ERASE = "erase";
- d.SHADER = "shader";
- return d;
- }(b.ASObject);
- e.BlendMode = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.DEFAULT;
- case 1:
- return d.ON;
- case 2:
- return d.OFF;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.DEFAULT:
- return 0;
- case d.ON:
- return 1;
- case d.OFF:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.DEFAULT = "default";
- d.ON = "on";
- d.OFF = "off";
- return d;
- }(b.ASObject);
- e.ColorCorrection = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.UNSUPPORTED;
- case 1:
- return d.DEFAULT_ON;
- case 2:
- return d.DEFAULT_OFF;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.UNSUPPORTED:
- return 0;
- case d.DEFAULT_ON:
- return 1;
- case d.DEFAULT_OFF:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.UNSUPPORTED = "unsupported";
- d.DEFAULT_ON = "defaultOn";
- d.DEFAULT_OFF = "defaultOff";
- return d;
- }(b.ASObject);
- e.ColorCorrectionSupport = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.TOP = "top";
- d.BOTTOM = "bottom";
- d.NONE = "none";
- return d;
- }(b.ASObject);
- e.FocusDirection = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f) {
- b.call(this);
- this._name = m(a);
- this._frame = f | 0;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "name", {get:function() {
- return this._name;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "frame", {get:function() {
- return this._frame;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.display.FrameLabel(this._name, this._frame);
- };
- a.classInitializer = null;
- return a;
- }(b.events.EventDispatcher);
- h.FrameLabel = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.ArrayUtilities.DataBuffer, a = e.AVMX.axCoerceString, c = e.IntegerUtilities.swap32, f = e.ColorUtilities.premultiplyARGB, k = e.ColorUtilities.unpremultiplyARGB, r = e.ColorUtilities.RGBAToARGB, u = e.ArrayUtilities.indexOf, q = function(g) {
- function p(a, c, d, f) {
- void 0 === d && (d = !0);
- void 0 === f && (f = 4294967295);
- a |= 0;
- c |= 0;
- d = !!d;
- f |= 0;
- g.call(this);
- this._symbol ? this.applySymbol() : ((a > p.MAXIMUM_WIDTH || 0 >= a || c > p.MAXIMUM_HEIGHT || 0 >= c || a * c > p.MAXIMUM_DIMENSION) && this.sec.throwError("ArgumentError", b.Errors.InvalidBitmapData), this._rect = new this.sec.flash.geom.Rectangle(0, 0, a, c), this._transparent = d, this._id = n.display.DisplayObject.getNextSyncID(), this._setData(new Uint8Array(a * c * 4), 1), 0 === f >> 24 && d ? this._solidFillColorPBGRA = 0 : this.fillRect(this._rect, f), this._bitmapReferrers =
- []);
- }
- __extends(p, g);
- p.classInitializer = function() {
- this._temporaryRectangle = new this.sec.flash.geom.Rectangle;
- };
- p.prototype.applySymbol = function() {
- var a = this._symbol;
- this._rect = new this.sec.flash.geom.Rectangle(0, 0, a.width, a.height);
- this._transparent = !0;
- this._id = a.syncId;
- 1 === a.type || 2 === a.type || 3 === a.type ? this._setData(a.data, a.type) : (this._isDirty = !1, this._isRemoteDirty = !0);
- this._solidFillColorPBGRA = null;
- this._bitmapReferrers = [];
- };
- p.prototype._setData = function(a, b) {
- a instanceof Uint8ClampedArray && (a = new Uint8Array(a.buffer));
- this._data = a;
- this._type = b;
- this._view = new Int32Array(a.buffer);
- this._dataBuffer = d.FromArrayBuffer(a.buffer);
- this._isDirty = !0;
- this._isRemoteDirty = !1;
- };
- p.prototype._addBitmapReferrer = function(a) {
- u(this._bitmapReferrers, a);
- this._bitmapReferrers.push(a);
- };
- p.prototype._removeBitmapReferrer = function(a) {
- a = u(this._bitmapReferrers, a);
- this._bitmapReferrers[a] = null;
- };
- p.prototype._invalidate = function() {
- if (!this._isDirty) {
- this._isDirty = !0;
- this._isRemoteDirty = !1;
- for (var a = 0;a < this._bitmapReferrers.length;a++) {
- var b = this._bitmapReferrers[a];
- b && b._setDirtyFlags(16777216);
- }
- }
- };
- p.prototype._getTemporaryRectangleFrom = function(a) {
- var b = this.sec.flash.display.BitmapData.axClass._temporaryRectangle;
- b.copyFrom(a);
- return b;
- };
- p.prototype.getDataBuffer = function() {
- return this._dataBuffer;
- };
- p.prototype._getContentBounds = function() {
- return e.Bounds.FromRectangle(this._rect);
- };
- p.prototype._getPixelData = function(a) {
- var b = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
- if (!b.isEmpty()) {
- a = b.x;
- var c = b.x + b.width, d = b.y, f = b.y + b.height;
- this._ensureBitmapData();
- for (var g = this._view, k = this._rect.width, b = new Int32Array(b.area), p = 0;d < f;d++) {
- for (var h = d * k, e = a;e < c;e++) {
- var r = g[h + e], l = r & 255, r = 255 * (r >>> 8) / l << 8 | l;
- b[p++] = r;
- }
- }
- return b;
- }
- };
- p.prototype._putPixelData = function(a, b) {
- var c = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
- if (!c.isEmpty()) {
- var d = c.x, f = c.x + c.width, g = c.y, k = c.y + c.height;
- this._ensureBitmapData();
- for (var p = this._view, h = this._rect.width, e = a.width * a.height - c.height + (d - a.x), c = a.width - c.width, r = this._transparent ? 0 : 255;g < k;g++) {
- for (var l = g * h, q = d;q < f;q++) {
- var u = b[e++], n = u & r;
- p[l + q] = (((u >>> 8) * n + 254) / 255 & 16777215) << 8 | n;
- }
- e += c;
- }
- this._invalidate();
- }
- };
- Object.defineProperty(p.prototype, "width", {get:function() {
- return this._rect.width;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "height", {get:function() {
- return this._rect.height;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "rect", {get:function() {
- return this._rect.clone();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "transparent", {get:function() {
- return this._transparent;
- }, enumerable:!0, configurable:!0});
- p.prototype.clone = function() {
- var a = Object.create(this.sec.flash.display.BitmapData.axClass.tPrototype);
- a._rect = this._rect.clone();
- a._transparent = this._transparent;
- a._solidFillColorPBGRA = this._solidFillColorPBGRA;
- a._bitmapReferrers = [];
- this._ensureBitmapData();
- a._id = n.display.DisplayObject.getNextSyncID();
- a._setData(new Uint8Array(this._data), this._type);
- return a;
- };
- p.prototype.getPixel = function(a, b) {
- return this.getPixel32(a | 0, b | 0) & 16777215;
- };
- p.prototype.getPixel32 = function(a, b) {
- a |= 0;
- b |= 0;
- if (!this._rect.contains(a, b)) {
- return 0;
- }
- this._ensureBitmapData();
- var d = this._view[b * this._rect.width + a];
- switch(this._type) {
- case 1:
- return d = c(d), k(d) >>> 0;
- case 3:
- return r(c(d));
- default:
- return e.Debug.notImplemented(e.ImageType[this._type]), 0;
- }
- };
- p.prototype.setPixel = function(a, b, d) {
- 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 = f(d), this._view[a] = c(d), this._invalidate(), this._solidFillColorPBGRA = null);
- };
- p.prototype.setPixel32 = function(a, b, d) {
- a |= 0;
- b |= 0;
- if (this._rect.contains(a, b)) {
- this._ensureBitmapData();
- var g = d >>> 24;
- d &= 16777215;
- g = this._transparent ? f(d | g << 24) : d | 4278190080;
- this._view[b * this._rect.width + a] = c(g);
- this._invalidate();
- this._solidFillColorPBGRA = null;
- }
- };
- p.prototype.applyFilter = function(a, b, c, d) {
- l("public flash.display.BitmapData::applyFilter " + d);
- };
- p.prototype.colorTransform = function(a, b) {
- l("public flash.display.BitmapData::colorTransform");
- };
- p.prototype.compare = function(a) {
- m("public flash.display.BitmapData::compare");
- };
- p.prototype.copyChannel = function(a, b, c, d, f) {
- l("public flash.display.BitmapData::copyChannel");
- };
- p.prototype.copyPixels = function(a, b, c, d, f, g) {
- void 0 === d && (d = null);
- void 0 === f && (f = null);
- g = !!g;
- if (d || f) {
- l("public flash.display.BitmapData::copyPixels - Alpha");
- } else {
- var k;
- k = b ? this._getTemporaryRectangleFrom(b).roundInPlace() : this.sec.flash.display.BitmapData.axClass._temporaryRectangle.setEmpty();
- b = this._rect;
- f = a._rect;
- var p = Math.max(k.x, 0);
- d = Math.max(k.y, 0);
- var h = Math.min(k.x + k.width, f.width), e = Math.min(k.y + k.height, f.height);
- f = (c.x | 0) + (p - k.x);
- k = (c.y | 0) + (d - k.y);
- 0 > f && (p -= f, f = 0);
- 0 > k && (d -= k, k = 0);
- c = Math.min(h - p, b.width - f);
- b = Math.min(e - d, b.height - k);
- if (!(0 >= c || 0 >= b)) {
- var h = p, e = d, r = f, q = k;
- d = a._rect.width;
- f = this._rect.width;
- this._ensureBitmapData();
- a._ensureBitmapData();
- p = a._view;
- k = this._view;
- a._type !== this._type && l("public flash.display.BitmapData::copyPixels - Color Format Conversion");
- if (g && 1 !== this._type) {
- l("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(p, h, e, d, k, r, q, f, c, b);
- } else {
- if (a = e * d + h | 0, g = q * f + r | 0, 0 === (c & 3)) {
- for (h = 0;h < b;h = h + 1 | 0) {
- for (e = 0;e < c;e = e + 4 | 0) {
- k[g + e + 0 | 0] = p[a + e + 0 | 0], k[g + e + 1 | 0] = p[a + e + 1 | 0], k[g + e + 2 | 0] = p[a + e + 2 | 0], k[g + e + 3 | 0] = p[a + e + 3 | 0];
- }
- a = a + d | 0;
- g = g + f | 0;
- }
- } else {
- for (h = 0;h < b;h = h + 1 | 0) {
- for (e = 0;e < c;e = e + 1 | 0) {
- k[g + e | 0] = p[a + e | 0];
- }
- a = a + d | 0;
- g = g + f | 0;
- }
- }
- }
- this._solidFillColorPBGRA = null;
- this._invalidate();
- }
- }
- }
- }
- };
- p.prototype._copyPixelsAndMergeAlpha = function(a, b, c, d, f, g, k, p, h, e) {
- b = c * d + b | 0;
- g = k * p + g | 0;
- for (k = 0;k < e;k = k + 1 | 0) {
- for (c = 0;c < h;c = c + 1 | 0) {
- var r = a[b + c | 0], l = r & 255;
- if (255 === l) {
- f[g + c | 0] = r;
- } else {
- if (0 !== l) {
- var q = r & 16711935, r = r >> 8 & 16711935, u = f[g + c | 0], n = u & 16711935, u = u >> 8 & 16711935, l = 256 - l, n = Math.imul(n, l) >> 8, u = Math.imul(u, l) >> 8;
- f[g + c | 0] = (r + u & 16711935) << 8 | q + n & 16711935;
- }
- }
- }
- b = b + d | 0;
- g = g + p | 0;
- }
- };
- p.prototype.dispose = function() {
- this._rect.setEmpty();
- this._view = null;
- this._invalidate();
- };
- p.prototype.draw = function(b, c, d, f, g, k) {
- void 0 === c && (c = null);
- void 0 === d && (d = null);
- void 0 === f && (f = null);
- void 0 === g && (g = null);
- void 0 === k && (k = !1);
- f = a(f);
- k = !!k;
- l("public flash.display.BitmapData::draw");
- var p = this.sec.player;
- c && (c = c.clone().toTwipsInPlace());
- p.drawToBitmap(this, b, c, d, f, g, k);
- this._isRemoteDirty = !0;
- };
- p.prototype.drawWithQuality = function(b, c, d, f, g, k, p) {
- void 0 === c && (c = null);
- void 0 === d && (d = null);
- void 0 === f && (f = null);
- void 0 === g && (g = null);
- void 0 === k && (k = !1);
- void 0 === p && (p = null);
- a(p);
- l("public flash.display.BitmapData::drawWithQuality");
- this.draw(b, c, d, f, g, k);
- };
- p.prototype.fillRect = function(a, b) {
- this._ensureBitmapData();
- var d = this._transparent ? f(b) : b | 4278190080, d = c(d), g = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
- if (!g.isEmpty() && this._solidFillColorPBGRA !== d) {
- var k = this._view;
- if (g.equals(this._rect)) {
- var p = k.length | 0;
- if (0 === (p & 3)) {
- for (var h = 0;h < p;h += 4) {
- k[h] = d, k[h + 1] = d, k[h + 2] = d, k[h + 3] = d;
- }
- } else {
- for (h = 0;h < p;h++) {
- k[h] = d;
- }
- }
- this._solidFillColorPBGRA = d;
- } else {
- for (var p = g.x | 0, h = g.x + g.width | 0, e = g.y + g.height | 0, r = this._rect.width | 0, g = g.y | 0;g < e;g++) {
- for (var l = g * r | 0, q = p;q < h;q++) {
- k[l + q] = d;
- }
- }
- this._solidFillColorPBGRA = null;
- }
- this._invalidate();
- }
- };
- p.prototype.floodFill = function(a, b, c) {
- l("public flash.display.BitmapData::floodFill");
- };
- p.prototype.generateFilterRect = function(a, b) {
- l("public flash.display.BitmapData::generateFilterRect");
- };
- p.prototype.getColorBoundsRect = function(a, b, c) {
- l("public flash.display.BitmapData::getColorBoundsRect");
- return new this.sec.flash.geom.Rectangle;
- };
- p.prototype.getPixels = function(a) {
- var b = new this.sec.flash.utils.ByteArray;
- this.copyPixelsToByteArray(a, b);
- return b;
- };
- p.prototype.copyPixelsToByteArray = function(a, b) {
- var c = this._getPixelData(a);
- c && b.writeRawBytes(new Uint8Array(c));
- };
- p.prototype.getVector = function(a) {
- var b = new this.sec.Uint32Vector(c.length), c = this._getPixelData(a);
- if (!c) {
- return b;
- }
- b.length = c.length;
- b._view().set(c);
- return b;
- };
- p.prototype.hitTest = function(a, b, c, d, f) {
- l("public flash.display.BitmapData::hitTest");
- return !0;
- };
- p.prototype.merge = function(a, b, c, d, f, g, k) {
- l("public flash.display.BitmapData::merge");
- };
- p.prototype.noise = function(a, b, c, d, f) {
- l("public flash.display.BitmapData::noise");
- };
- p.prototype.paletteMap = function(a, b, c, d, f, g, k) {
- l("public flash.display.BitmapData::paletteMap");
- };
- p.prototype.perlinNoise = function(a, b, c, d, f, g, k, p, h) {
- l("public flash.display.BitmapData::perlinNoise");
- };
- p.prototype.pixelDissolve = function(a, b, c, d, f, g) {
- l("public flash.display.BitmapData::pixelDissolve");
- };
- p.prototype.scroll = function(a, b) {
- l("public flash.display.BitmapData::scroll");
- };
- p.prototype.setPixels = function(a, b) {
- this._putPixelData(a, new Int32Array(b.readRawBytes()));
- };
- p.prototype.setVector = function(a, b) {
- this._putPixelData(a, b._view());
- };
- p.prototype.threshold = function(b, c, d, f, g, k, p, h) {
- a(f);
- l("public flash.display.BitmapData::threshold");
- };
- p.prototype.lock = function() {
- this._locked = !0;
- };
- p.prototype.unlock = function(a) {
- this._locked = !1;
- };
- p.prototype.histogram = function(a) {
- m("public flash.display.BitmapData::histogram");
- };
- p.prototype.encode = function(a, b, c) {
- m("public flash.display.BitmapData::encode");
- };
- p.prototype._ensureBitmapData = function() {
- if (this._isRemoteDirty) {
- var a = this.sec.player.requestBitmapData(this);
- this._setData(a.getBytes(), 3);
- this._isDirty = this._isRemoteDirty = !1;
- this._solidFillColorPBGRA = null;
- }
- 1 !== this._type && (e.ColorUtilities.convertImage(this._type, 1, this._view, this._view), this._type = 1, this._solidFillColorPBGRA = null);
- };
- p.MAXIMUM_WIDTH = 8191;
- p.MAXIMUM_HEIGHT = 8191;
- p.MAXIMUM_DIMENSION = 16777215;
- return p;
- }(h.ASObject);
- t.BitmapData = q;
- q = function(a) {
- function b(c, d) {
- a.call(this, c, d.flash.display.BitmapData.axClass, !1);
- this.ready = !1;
- }
- __extends(b, a);
- b.FromData = function(a, c) {
- var d = new b(a, c.sec);
- d.width = a.width || -1;
- d.height = a.height || -1;
- d.syncId = c.sec.flash.display.DisplayObject.axClass.getNextSyncID();
- d.data = a.data;
- switch(a.mimeType) {
- case "application/octet-stream":
- d.type = a.dataType;
- d.ready = !0;
- break;
- case "image/jpeg":
- d.type = 4;
- break;
- case "image/png":
- d.type = 5;
- break;
- case "image/gif":
- d.type = 6;
- break;
- default:
- m(a.mimeType);
- }
- return d;
- };
- b.prototype.getSharedInstance = function() {
- return this.sharedInstance || this.createSharedInstance();
- };
- b.prototype.createSharedInstance = function() {
- return this.sharedInstance = h.constructClassFromSymbol(this, this.symbolClass);
- };
- Object.defineProperty(b.prototype, "resolveAssetCallback", {get:function() {
- return this._unboundResolveAssetCallback.bind(this);
- }, enumerable:!0, configurable:!0});
- b.prototype._unboundResolveAssetCallback = function(a) {
- this.ready = !0;
- a && (this.width = a.width, this.height = a.height);
- };
- return b;
- }(e.Timeline.DisplaySymbol);
- t.BitmapSymbol = q;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.RED = 1;
- d.GREEN = 2;
- d.BLUE = 4;
- d.ALPHA = 8;
- return d;
- }(b.ASObject);
- e.BitmapDataChannel = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.COLORSPACE_AUTO = "auto";
- d.COLORSPACE_4_4_4 = "4:4:4";
- d.COLORSPACE_4_2_2 = "4:2:2";
- d.COLORSPACE_4_2_0 = "4:2:0";
- return d;
- }(b.ASObject);
- e.BitmapEncodingColorSpace = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a) {
- void 0 === a && (a = 80);
- b.call(this);
- this.quality = a >>> 0;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.JPEGEncoderOptions = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.Debug.assertUnreachable, l = e.Debug.somewhatImplemented, d = n.display.ActionScriptVersion, a = n.events, c = e.FileLoader, f = e.SWF.SWFFile, k = e.AVM2.enterTimeline, r = e.AVM2.leaveTimeline, u;
- (function(a) {
- a[a.Unloaded = 0] = "Unloaded";
- a[a.Opened = 1] = "Opened";
- a[a.Initialized = 2] = "Initialized";
- a[a.Complete = 3] = "Complete";
- })(u || (u = {}));
- var q;
- (function(a) {
- a[a.External = 0] = "External";
- a[a.Bytes = 1] = "Bytes";
- })(q || (q = {}));
- u = function(g) {
- function p() {
- g.call(this);
- var a = this.sec.flash.display.DisplayObject.axClass;
- a._advancableInstances.push(this);
- this._content = null;
- this.axClass._rootLoader ? this._contentID = a._instanceID++ : a._instanceID--;
- a = this.sec.flash.display.LoaderInfo;
- this._contentLoaderInfo = new a(a.axClass.CtorToken);
- this._contentLoaderInfo._loader = this;
- if (a = b.getCurrentABC()) {
- this._contentLoaderInfo._loaderUrl = a.env.url;
- }
- this._fileLoader = null;
- this._loadStatus = 0;
- }
- __extends(p, g);
- p.getRootLoader = function() {
- if (this._rootLoader) {
- return this._rootLoader;
- }
- var a = new this.sec.flash.display.Loader;
- a._contentLoaderInfo._loader = null;
- return this._rootLoader = a;
- };
- p.reset = function() {
- this.sec.flash.display.Loader.axClass._loadQueue.forEach(function(a) {
- return a.unload();
- });
- p.classInitializer();
- };
- p.classInitializer = function() {
- this._rootLoader = null;
- this._loadQueue = [];
- this._embeddedContentLoadCount = this.runtimeStartTime = 0;
- };
- p.processEvents = function() {
- var a = this.sec.flash.display.Loader.axClass;
- a.processEarlyEvents();
- a.processLateEvents();
- };
- p.processEarlyEvents = function() {
- for (var b = this.sec.flash.display.Loader.axClass._loadQueue, c = 0;c < b.length;c++) {
- var d = b[c], f = d._contentLoaderInfo, g = d._imageSymbol;
- if (f._file instanceof e.ImageFile) {
- if (!g || !g.ready || d._queuedLoadUpdate) {
- continue;
- }
- d._applyDecodedImage(g);
- }
- if (1 === d._loadStatus && d._content) {
- k("Loader.INIT");
- try {
- f.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(a.Event.INIT));
- } catch (p) {
- e.Debug.warning("caught error under loaderInfo INIT event:", p);
- }
- r();
- d._loadStatus = 2;
- if (d === this.sec.flash.display.Loader.axClass._rootLoader) {
- k("Loader.Progress", "rootLoader");
- try {
- f.dispatchEvent(new this.sec.flash.events.ProgressEvent(a.ProgressEvent.PROGRESS, !1, !1, f.bytesLoaded, f.bytesTotal));
- } catch (h) {
- e.Debug.warning("caught error under loaderInfo PROGRESS event:", h);
- }
- r();
- }
- }
- if (2 === d._loadStatus && f.bytesLoaded === f.bytesTotal) {
- b.splice(c--, 1);
- d._loadStatus = 3;
- k("Loader.Complete");
- try {
- f.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(a.Event.COMPLETE));
- } catch (l) {
- e.Debug.warning("caught error under loaderInfo COMPLETE event: ", l);
- }
- r();
- }
- }
- };
- p.processLateEvents = function() {
- for (var b = this.sec.flash.display.Loader.axClass._loadQueue, c = 0;c < b.length;c++) {
- var d = b[c], f = d._contentLoaderInfo, g = d._queuedLoadUpdate, p = f._bytesTotal;
- if (g && p || 1 === d._loadStatus) {
- d._queuedLoadUpdate = null;
- var h = this.sec.flash.events.ProgressEvent;
- if (0 === d._loadStatus) {
- if (0 === d._loadingType) {
- k("Loader.Open");
- try {
- f.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(a.Event.OPEN));
- } catch (l) {
- e.Debug.warning("caught error under loaderInfo OPEN event: ", l);
- }
- r();
- }
- k("Loader.Progress");
- try {
- f.dispatchEvent(new h(a.ProgressEvent.PROGRESS, !1, !1, 0, p));
- } catch (q) {
- e.Debug.warning("caught error under loaderInfo PROGRESS event: ", q);
- }
- r();
- d._loadStatus = 1;
- }
- if (g) {
- d._applyLoadUpdate(g);
- k("Loader.Progress");
- try {
- f.dispatchEvent(new h(a.ProgressEvent.PROGRESS, !1, !1, g.bytesLoaded, p));
- } catch (u) {
- e.Debug.warning("caught error under loaderInfo PROGRESS event: ", u);
- }
- r();
- }
- }
- }
- };
- p.prototype._setStage = function(a) {
- this._stage = a;
- };
- p.prototype._initFrame = function(a) {
- };
- p.prototype._constructFrame = function() {
- this === this.sec.flash.display.Loader.axClass.getRootLoader() && this._content ? (this.sec.flash.display.DisplayObject.axClass._advancableInstances.remove(this), this._children[0] = this._content, this._constructChildren(), this._children.length = 0) : this._constructChildren();
- };
- p.prototype.addChild = function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidLoaderMethodError);
- return null;
- };
- p.prototype.addChildAt = function(a, c) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidLoaderMethodError);
- return null;
- };
- p.prototype.removeChild = function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidLoaderMethodError);
- return null;
- };
- p.prototype.removeChildAt = function(a) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidLoaderMethodError);
- return null;
- };
- p.prototype.setChildIndex = function(a, c) {
- this.sec.throwError("IllegalOperationError", b.Errors.InvalidLoaderMethodError);
- };
- p.prototype._describeData = function(a) {
- var b = [], c;
- for (c in a) {
- b.push(c + ":" + e.StringUtilities.toSafeString(a[c]));
- }
- return "{" + b.join(", ") + "}";
- };
- Object.defineProperty(p.prototype, "content", {get:function() {
- return 0 === this._loadStatus ? null : this._content;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(p.prototype, "contentLoaderInfo", {get:function() {
- return this._contentLoaderInfo;
- }, enumerable:!0, configurable:!0});
- p.prototype._getJPEGLoaderContextdeblockingfilter = function(a) {
- return this.sec.flash.system.JPEGLoaderContext.axClass.axIsType(a) ? a.deblockingFilter : 0;
- };
- Object.defineProperty(p.prototype, "uncaughtErrorEvents", {get:function() {
- l("public flash.display.Loader::uncaughtErrorEvents");
- this._uncaughtErrorEvents || (this._uncaughtErrorEvents = new a.UncaughtErrorEvents);
- return this._uncaughtErrorEvents;
- }, enumerable:!0, configurable:!0});
- p.prototype._canLoadSWFFromDomain = function(a) {
- a = e.FileLoadingService.instance.resolveUrl(a);
- return this.sec.player.checkDomainForSWFLoading(a);
- };
- p.prototype.load = function(a, b) {
- this.close();
- var d = e.FileLoadingService.instance.resolveUrl(a.url);
- this._contentLoaderInfo._url = d;
- this._applyLoaderContext(b);
- this._loadingType = 0;
- (this._fileLoader = new c(this, this._contentLoaderInfo)).loadFile(a._toFileRequest());
- this._queuedLoadUpdate = null;
- this.sec.flash.display.Loader.axClass._loadQueue.push(this);
- };
- p.prototype.loadBytes = function(a, b) {
- this.close();
- var d = this.sec.flash.display.Loader.axClass;
- this._contentLoaderInfo._url = (this.loaderInfo ? this.loaderInfo._url : "") + "/[[DYNAMIC]]/" + ++d._embeddedContentLoadCount;
- this._applyLoaderContext(b);
- this._loadingType = 1;
- this._fileLoader = new c(this, this._contentLoaderInfo);
- this._queuedLoadUpdate = null;
- this._fileLoader.loadBytes(new Uint8Array(a.bytes, 0, a.length));
- d._loadQueue.push(this);
- };
- p.prototype.close = function() {
- var a = this.sec.flash.display.Loader.axClass._loadQueue.indexOf(this);
- -1 < a && this.sec.flash.display.Loader.axClass._loadQueue.splice(a, 1);
- this._contentLoaderInfo.reset();
- this._fileLoader && (this._fileLoader.abortLoad(), this._fileLoader = null);
- };
- p.prototype._unload = function(b, c) {
- 2 > this._loadStatus ? this._loadStatus = 0 : (this.close(), this._content = null, this._contentLoaderInfo._loader = null, this._loadStatus = 0, this.dispatchEvent(this.sec.flash.events.Event.axClass.getInstance(a.Event.UNLOAD)));
- };
- p.prototype.unload = function() {
- this._unload(!1, !1);
- };
- p.prototype.unloadAndStop = function(a) {
- this._unload(!0, !!a);
- };
- p.prototype._applyLoaderContext = function(a) {
- var b = a && a.parameters ? h.transformASValueToJS(this.sec, a.parameters, !1) : {};
- this._contentLoaderInfo._applicationDomain = a && a.applicationDomain ? a.applicationDomain : this._loaderInfo && this._loaderInfo._applicationDomain ? this._loaderInfo._applicationDomain : new this.sec.flash.system.ApplicationDomain;
- this._contentLoaderInfo._parameters = b;
- this._contentLoaderInfo._allowCodeImport = a ? a.allowCodeImport : !0;
- this._contentLoaderInfo._checkPolicyFile = a ? a.checkPolicyFile : !1;
- };
- p.prototype.onLoadOpen = function(c) {
- if (c) {
- if (c._file instanceof f) {
- var d = this._canLoadSWFFromDomain(this._fileLoader._url), g;
- switch(d) {
- case 0:
- g = 0;
- break;
- case 1:
- g = 1;
- break;
- case 2:
- g = 2;
- break;
- default:
- m("Invalid whitelistResult");
- }
- e.Telemetry.instance.reportTelemetry({topic:"loadResource", resultType:g});
- if (2 === d) {
- console.error("Loading of SWF file from " + this._fileLoader._url + " was rejected based on allowDomain heuristic.");
- this._fileLoader.abortLoad();
- c = "Security sandbox violation: SWF " + this._loaderInfo._url + " cannot load SWF " + this._fileLoader._url + ". This may be worked around by calling Security.allowDomain.";
- try {
- this._contentLoaderInfo.dispatchEvent(new this.sec.flash.events.IOErrorEvent(a.SecurityErrorEvent.SECURITY_ERROR, !1, !1, c, b.Errors.SecuritySwfNotAllowedError.code));
- } catch (k) {
- }
- return;
- }
- if (!this._contentLoaderInfo._allowCodeImport) {
- this._fileLoader.abortLoad();
- try {
- this._contentLoaderInfo.dispatchEvent(new this.sec.flash.events.IOErrorEvent(a.SecurityErrorEvent.SECURITY_ERROR, !1, !1, b.Errors.AllowCodeImportError.message, b.Errors.AllowCodeImportError.code));
- } catch (p) {
- }
- return;
- }
- }
- this._contentLoaderInfo.setFile(c);
- } else {
- this._contentLoaderInfo.dispatchEvent(new this.sec.flash.events.IOErrorEvent(a.IOErrorEvent.IO_ERROR, !1, !1, b.Errors.UnknownFileTypeError.message, b.Errors.UnknownFileTypeError.code));
- }
- };
- p.prototype.onLoadProgress = function(a) {
- this._queuedLoadUpdate = a;
- };
- p.prototype.onNewEagerlyParsedSymbols = function(a, b) {
- for (var c = [], d = a.length - b;d < a.length;d++) {
- var f = this._contentLoaderInfo.getSymbolById(a[d].id);
- f.ready || c.push(f.resolveAssetPromise.promise);
- }
- return Promise.all(c);
- };
- p.prototype.onImageBytesLoaded = function() {
- var a = this._contentLoaderInfo._file, b = t.BitmapSymbol.FromData({id:-1, data:a.data, mimeType:a.mimeType, dataType:a.type, type:"image"}, this._contentLoaderInfo);
- this._imageSymbol = b;
- this.sec.player.registerImage(b, a.type, a.data, null);
- };
- p.prototype._applyDecodedImage = function(a) {
- a = a.createSharedInstance();
- this._content = new this.sec.flash.display.Bitmap(a);
- this._contentLoaderInfo._width = 20 * this._content.width;
- this._contentLoaderInfo._height = 20 * this._content.height;
- this.addTimelineObjectAtDepth(this._content, 0);
- };
- p.prototype._applyLoadUpdate = function(a) {
- var c = this._contentLoaderInfo;
- c._bytesLoaded = a.bytesLoaded;
- var d = c._file;
- if (d instanceof f && 0 !== d.framesLoaded) {
- if (c._allowCodeExecution) {
- var g = c.app, k = d.abcBlocks.length;
- if (0 < k - c._abcBlocksLoaded) {
- for (a = c._abcBlocksLoaded;a < k;a++) {
- var p = d.abcBlocks[a], h = new b.ABCFile(c, p.data);
- p.flags ? g.loadABC(h) : g.loadAndExecuteABC(h);
- }
- c._abcBlocksLoaded = k;
- }
- k = d.symbolClassesList.length;
- if (0 < k - c._mappedSymbolsLoaded) {
- for (a = c._mappedSymbolsLoaded;a < k;a++) {
- p = d.symbolClassesList[a], h = g.getClass(b.Multiname.FromFQNString(p.className, 0)), Object.defineProperty(h.tPrototype, "_symbol", {get:c.getSymbolResolver(h, p.id), configurable:!0});
- }
- c._mappedSymbolsLoaded = k;
- }
- }
- if (inFirefox && (g = d.fonts.length, 0 < g - c._fontsLoaded)) {
- for (a = c._fontsLoaded;a < g;a++) {
- this.sec.flash.text.Font.axClass.registerFontSymbol(d.fonts[a], c);
- }
- c._fontsLoaded = g;
- }
- g = c.getRootSymbol();
- k = d.framesLoaded - g.frames.length;
- if (0 !== k) {
- for ((a = this._content) || (a = this.createContentRoot(g, d.sceneAndFrameLabelData)), d = a, a = 0;a < k;a++) {
- p = c.getFrame(null, g.frames.length), d._addFrame(p);
- }
- }
- }
- };
- p.prototype.onLoadComplete = function() {
- };
- p.prototype.onLoadError = function() {
- };
- p.prototype._addScenesToMovieClip = function(a, b, c) {
- if (b) {
- for (var d = [], f = b.scenes, g = 0;g < f.length;g++) {
- d.push({offset:f[g].offset, name:f[g].name});
- }
- d.sort(function(a, b) {
- return a.offset - b.offset;
- });
- var k = d.length, p, h;
- 0 < k && 0 < d[0].offset && (p = d[0].offset, h = Math.min(p, c), a.addScene("Scene 0", [], 0, h));
- g = 0;
- for (k = d.length;g < k;g++) {
- var e = d[g];
- p = e.offset;
- if (p >= c) {
- break;
- }
- h = g < k - 1 ? Math.min(f[g + 1].offset, c) : c;
- a.addScene(e.name, [], p, h - p);
- }
- b = b.labels;
- for (g = 0;g < b.length;g++) {
- c = b[g], a.addFrameLabel(c.name, c.frame + 1);
- }
- } else {
- a.addScene("Scene 1", [], 0, c);
- }
- };
- p.prototype.createContentRoot = function(a, b) {
- a.isAVM1Object && this._initAvm1(a);
- var c = h.constructClassFromSymbol(a, a.symbolClass);
- this.sec.flash.display.DisplayObject.axClass._instanceID--;
- var f = this.sec.flash.display.Loader.axClass;
- c._name = this === f._rootLoader ? "root1" : "instance" + this._contentID;
- this.sec.flash.display.MovieClip.axClass.axIsType(c) && this._addScenesToMovieClip(c, b, a.numFrames);
- var g = this._contentLoaderInfo;
- c._loaderInfo = g;
- var k = c;
- g.actionScriptVersion === d.ACTIONSCRIPT2 ? c = this._initAvm1Root(c) : this === f.getRootLoader() && (this.sec.flash.display.MovieClip.axClass.frameNavigationModel = 10 > g.swfVersion ? 9 : 10);
- this._content = c;
- this === f.getRootLoader() ? (this.sec.flash.display.Loader.runtimeStartTime = Date.now(), this._stage.setRoot(c)) : this.addTimelineObjectAtDepth(c, 0);
- return k;
- };
- p.prototype._initAvm1 = function(a) {
- var b = this._contentLoaderInfo, c;
- this.loaderInfo && this.loaderInfo._avm1Context ? c = b._avm1Context = this.loaderInfo._avm1Context : (c = e.AVM1.AVM1Context.create(b), b._avm1Context = c, b = this.sec.flash.display, this === b.Loader.axClass.getRootLoader() && (c.setStage(this._stage), b.MovieClip.axClass.frameNavigationModel = 1));
- a.avm1Context = c;
- };
- p.prototype._initAvm1Root = function(a) {
- if (this.loaderInfo && this.loaderInfo._avm1Context) {
- return a;
- }
- e.AVM1.Lib.getAVM1Object(a, this._contentLoaderInfo._avm1Context).setParameters(this._contentLoaderInfo._parameters);
- return new this.sec.flash.display.AVM1Movie(a);
- };
- p.classSymbols = null;
- p.instanceSymbols = null;
- return p;
- }(n.display.DisplayObjectContainer);
- t.Loader = u;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.SWF.SWFFile, a = function(a) {
- function f(d) {
- d !== f.CtorToken && this.sec.throwError("ArgumentError", b.Errors.CantInstantiateError, "LoaderInfo$");
- a.call(this);
- this._loader = null;
- this._loaderUrl = "";
- this.reset();
- }
- __extends(f, a);
- f.prototype.reset = function() {
- this._url = "";
- this._file = null;
- this._bytesTotal = this._bytesLoaded = 0;
- this._parameters = this._applicationDomain = null;
- this._allowCodeImport = !0;
- this._checkPolicyFile = !1;
- this._height = this._width = 0;
- this._uncaughtErrorEvents = this._bytes = this._content = this._childSandboxBridge = this._parentSandboxBridge = this._sharedEvents = null;
- this._allowCodeExecution = !0;
- this._dictionary = [];
- this._fontsLoaded = this._mappedSymbolsLoaded = this._abcBlocksLoaded = 0;
- this._avm1Context = null;
- };
- f.prototype.setFile = function(a) {
- this._file = a;
- this._bytesTotal = a.bytesTotal;
- a instanceof d && (a = a.bounds, this._width = a.xMax - a.xMin, this._height = a.yMax - a.yMin);
- };
- f.getLoaderInfoByDefinition = function(a) {
- m("public flash.display.LoaderInfo::static getLoaderInfoByDefinition");
- };
- Object.defineProperty(f.prototype, "loaderURL", {get:function() {
- if (!this._loader) {
- var a = this.sec.player;
- return this._url === a.swfUrl && a.loaderUrl || this._url;
- }
- return this._loaderUrl;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "url", {get:function() {
- return this._file ? this._url : null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "isURLInaccessible", {get:function() {
- l("public flash.display.LoaderInfo::get isURLInaccessible");
- return this._file ? !1 : !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesLoaded", {get:function() {
- return this._bytesLoaded;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesTotal", {get:function() {
- return this._bytesTotal;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "applicationDomain", {get:function() {
- l("public flash.display.LoaderInfo::get applicationDomain");
- return this._file ? this._applicationDomain : null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "app", {get:function() {
- return this._applicationDomain.axDomain;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "swfVersion", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- this._file instanceof d || this.sec.throwError("Error", b.Errors.LoadingObjectNotSWFError);
- return this._file.swfVersion;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "actionScriptVersion", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- this._file instanceof d || this.sec.throwError("Error", b.Errors.LoadingObjectNotSWFError);
- return this._file.useAVM1 ? t.ActionScriptVersion.ACTIONSCRIPT2 : t.ActionScriptVersion.ACTIONSCRIPT3;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "frameRate", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- this._file instanceof d || this.sec.throwError("Error", b.Errors.LoadingObjectNotSWFError);
- return this._file.frameRate;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "width", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- return this._width / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "height", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- return this._height / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "contentType", {get:function() {
- return this._file ? this._file instanceof e.ImageFile ? this._file.mimeType : "application/x-shockwave-flash" : null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "sharedEvents", {get:function() {
- l("public flash.display.LoaderInfo::get sharedEvents");
- this._sharedEvents || (this._sharedEvents = new this.sec.flash.events.EventDispatcher);
- return this._sharedEvents;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "parentSandboxBridge", {get:function() {
- l("public flash.display.LoaderInfo::get parentSandboxBridge");
- return this._parentSandboxBridge;
- }, set:function(a) {
- l("public flash.display.LoaderInfo::set parentSandboxBridge");
- this._parentSandboxBridge = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "childSandboxBridge", {get:function() {
- l("public flash.display.LoaderInfo::get childSandboxBridge");
- return this._childSandboxBridge;
- }, set:function(a) {
- l("public flash.display.LoaderInfo::set childSandboxBridge");
- this._childSandboxBridge = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "sameDomain", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- l("public flash.display.LoaderInfo::get sameDomain");
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "childAllowsParent", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- l("public flash.display.LoaderInfo::get childAllowsParent");
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "parentAllowsChild", {get:function() {
- this._file || this.sec.throwError("Error", b.Errors.LoadingObjectNotInitializedError);
- l("public flash.display.LoaderInfo::get parentAllowsChild");
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "loader", {get:function() {
- return this._loader;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "content", {get:function() {
- return this._loader && this._loader.content;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytes", {get:function() {
- if (!this._file) {
- return new this.sec.flash.utils.ByteArray;
- }
- m("public flash.display.LoaderInfo::get bytes");
- return null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "parameters", {get:function() {
- l("public flash.display.LoaderInfo::get parameters");
- return this._parameters ? h.transformJSValueToAS(this.sec, this._parameters, !1) : {};
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "uncaughtErrorEvents", {get:function() {
- l("public flash.display.LoaderInfo::_getUncaughtErrorEvents");
- this._uncaughtErrorEvents || (this._uncaughtErrorEvents = new this.sec.flash.events.UncaughtErrorEvents);
- return this._uncaughtErrorEvents;
- }, enumerable:!0, configurable:!0});
- f.prototype.getSymbolResolver = function(a, b) {
- return this.resolveClassSymbol.bind(this, a, b);
- };
- f.prototype.getSymbolById = function(a) {
- var b = this._dictionary[a];
- if (b) {
- return !1 === b.ready ? null : b;
- }
- var c = this._file.getSymbol(a);
- if (!c) {
- return 65535 !== a && e.Debug.warning("Unknown symbol requested: " + a), null;
- }
- switch(c.type) {
- case "shape":
- b = n.display.ShapeSymbol.FromData(c, this);
- break;
- case "morphshape":
- b = n.display.MorphShapeSymbol.FromData(c, this);
- break;
- case "image":
- c.definition && (c = c.definition);
- b = n.display.BitmapSymbol.FromData(c, this);
- !1 === b.ready && this.sec.player.registerImage(b, c.dataType, c.data, c.alphaData);
- break;
- case "label":
- b = n.text.TextSymbol.FromLabelData(c, this);
- break;
- case "text":
- b = n.text.TextSymbol.FromTextData(c, this);
- this._syncAVM1Attributes(b);
- break;
- case "button":
- b = n.display.ButtonSymbol.FromData(c, this);
- this._syncAVM1Attributes(b);
- break;
- case "sprite":
- b = n.display.SpriteSymbol.FromData(c, this);
- break;
- case "font":
- c.definition && (c = c.definition);
- b = n.text.FontSymbol.FromData(c, this);
- h.constructClassFromSymbol(b, b.symbolClass);
- !1 === b.ready && this.sec.player.registerFont(b, c.data);
- break;
- case "sound":
- b = n.media.SoundSymbol.FromData(c, this);
- break;
- case "video":
- b = n.media.VideoSymbol.FromData(c, this);
- break;
- case "binary":
- b = e.Timeline.BinarySymbol.FromData(c, this);
- }
- return this._dictionary[a] = b;
- };
- f.prototype.getRootSymbol = function() {
- var a = this._dictionary[0];
- a || (a = new n.display.SpriteSymbol({id:0, className:this._file.symbolClassesMap[0], env:this}, this), a.isRoot = !0, a.numFrames = this._file.frameCount, this._syncAVM1Attributes(a), this._dictionary[0] = a);
- return a;
- };
- f.prototype._syncAVM1Attributes = function(a) {
- this.actionScriptVersion === t.ActionScriptVersion.ACTIONSCRIPT2 && (a.isAVM1Object = !0, a.avm1Context = this._avm1Context);
- };
- f.prototype.getFrame = function(a, b) {
- var c = this._file;
- a || (a = c);
- return a.frames[b];
- };
- f.prototype.resolveClassSymbol = function(a, b) {
- var c = this.getSymbolById(b);
- if (c) {
- return Object.defineProperty(a.tPrototype, "_symbol", {value:c}), c;
- }
- e.Debug.warning("Attempt to resolve symbol for AVM2 class failed: Symbol " + b + " not found.");
- };
- f.classInitializer = null;
- f.CtorToken = {};
- return f;
- }(n.events.EventDispatcher);
- t.LoaderInfo = a;
- })(n.display || (n.display = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d() {
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- b.call(this);
- }
- __extends(d, b);
- d.prototype.applySymbol = function() {
- this._initializeFields();
- this._setStaticContentFromSymbol(this._symbol);
- this._setFlags(32768);
- };
- d.prototype._canHaveGraphics = function() {
- return !0;
- };
- d.prototype._getGraphics = function() {
- return this._graphics;
- };
- Object.defineProperty(d.prototype, "graphics", {get:function() {
- return this._ensureGraphics();
- }, enumerable:!0, configurable:!0});
- d.prototype._containsPointDirectly = function(a, b, d, k) {
- return (d = this._getGraphics()) && d._containsPoint(a, b, !0, this._ratio / 65535);
- };
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.classInitializer = null;
- return d;
- }(b.display.DisplayObject);
- h.MorphShape = e;
- e = function(h) {
- function d(a, b) {
- h.call(this, a, b.flash.display.MorphShape.axClass);
- }
- __extends(d, h);
- d.FromData = function(a, c) {
- var f = new d(a, c.sec);
- f._setBoundsFromData(a);
- f.graphics = b.display.Graphics.FromData(a, c);
- f.processRequires(a.require, c);
- f.morphFillBounds = a.morphFillBounds;
- f.morphLineBounds = a.morphLineBounds;
- return f;
- };
- return d;
- }(b.display.ShapeSymbol);
- h.MorphShapeSymbol = e;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.events.EventDispatcher);
- h.NativeMenu = e;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = function(b) {
- function a() {
- b.call(this);
- this._enabled = !0;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "enabled", {get:function() {
- m("public flash.display.NativeMenuItem::get enabled");
- return this._enabled;
- }, set:function(a) {
- a = !!a;
- m("public flash.display.NativeMenuItem::set enabled");
- this._enabled = a;
- }, enumerable:!0, configurable:!0});
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.NativeMenuItem = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a) {
- void 0 === a && (a = !1);
- b.call(this);
- this.fastCompression = !!a;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.PNGEncoderOptions = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.NEVER;
- case 1:
- return d.ALWAYS;
- case 2:
- return d.AUTO;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NEVER:
- return 0;
- case d.ALWAYS:
- return 1;
- case d.AUTO:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NEVER = "never";
- d.ALWAYS = "always";
- d.AUTO = "auto";
- return d;
- }(b.ASObject);
- e.PixelSnapping = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.FLASH1 = 1;
- d.FLASH2 = 2;
- d.FLASH3 = 3;
- d.FLASH4 = 4;
- d.FLASH5 = 5;
- d.FLASH6 = 6;
- d.FLASH7 = 7;
- d.FLASH8 = 8;
- d.FLASH9 = 9;
- d.FLASH10 = 10;
- d.FLASH11 = 11;
- d.FLASH12 = 12;
- return d;
- }(b.ASObject);
- e.SWFVersion = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k, h) {
- b.call(this);
- this._name = m(a);
- this._labels = f;
- this.offset = k;
- this._numFrames = h | 0;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "name", {get:function() {
- return this._name;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "labels", {get:function() {
- return this._labels;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "numFrames", {get:function() {
- return this._numFrames;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- var a = this._labels.value.map(function(a) {
- return a.clone();
- });
- return new this.sec.flash.display.Scene(this._name, this.sec.createArrayUnsafe(a), this.offset, this._numFrames);
- };
- a.prototype.getLabelByName = function(a, b) {
- b && (a = a.toLowerCase());
- for (var d = this._labels.value, h = 0;h < d.length;h++) {
- var e = d[h];
- if (b ? e.name.toLowerCase() === a : e.name === a) {
- return e;
- }
- }
- return null;
- };
- a.prototype.getLabelByFrame = function(a) {
- for (var b = this._labels.value, d = 0;d < b.length;d++) {
- var h = b[d];
- if (h.frame === a) {
- return h;
- }
- }
- return null;
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.Scene = l;
- })(n.display || (n.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- if (0 === a) {
- return "";
- }
- var b = "";
- a & 1 && (b += "T");
- a & 2 && (b += "B");
- a & 4 && (b += "L");
- a & 8 && (b += "R");
- return b;
- };
- d.toNumber = function(a) {
- var b = 0;
- a = a.toUpperCase();
- 0 <= a.indexOf("T") && (b |= 1);
- 0 <= a.indexOf("B") && (b |= 2);
- 0 <= a.indexOf("L") && (b |= 4);
- 0 <= a.indexOf("R") && (b |= 8);
- return b;
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.TOP = "T";
- d.LEFT = "L";
- d.BOTTOM = "B";
- d.RIGHT = "R";
- d.TOP_LEFT = "TL";
- d.TOP_RIGHT = "TR";
- d.BOTTOM_LEFT = "BL";
- d.BOTTOM_RIGHT = "BR";
- return d;
- }(b.ASObject);
- e.StageAlign = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.FULL_SCREEN;
- case 1:
- return d.FULL_SCREEN_INTERACTIVE;
- case 2:
- return d.NORMAL;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.FULL_SCREEN:
- return 0;
- case d.FULL_SCREEN_INTERACTIVE:
- return 1;
- case d.NORMAL:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.FULL_SCREEN = "fullScreen";
- d.FULL_SCREEN_INTERACTIVE = "fullScreenInteractive";
- d.NORMAL = "normal";
- return d;
- }(b.ASObject);
- e.StageDisplayState = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.LOW;
- case 1:
- return d.MEDIUM;
- case 2:
- return d.HIGH;
- case 3:
- return d.BEST;
- case 4:
- return d.HIGH_8X8;
- case 5:
- return d.HIGH_8X8_LINEAR;
- case 6:
- return d.HIGH_16X16;
- case 7:
- return d.HIGH_16X16_LINEAR;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.LOW:
- return 0;
- case d.MEDIUM:
- return 1;
- case d.HIGH:
- return 2;
- case d.BEST:
- return 3;
- case d.HIGH_8X8:
- return 4;
- case d.HIGH_8X8_LINEAR:
- return 5;
- case d.HIGH_16X16:
- return 6;
- case d.HIGH_16X16_LINEAR:
- return 7;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.LOW = "low";
- d.MEDIUM = "medium";
- d.HIGH = "high";
- d.BEST = "best";
- d.HIGH_8X8 = "8x8";
- d.HIGH_8X8_LINEAR = "8x8linear";
- d.HIGH_16X16 = "16x16";
- d.HIGH_16X16_LINEAR = "16x16linear";
- return d;
- }(b.ASObject);
- e.StageQuality = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.SHOW_ALL;
- case 1:
- return d.EXACT_FIT;
- case 2:
- return d.NO_BORDER;
- case 4:
- return d.NO_SCALE;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a.toLowerCase()) {
- case d.SHOW_ALL_LOWERCASE:
- return 0;
- case d.EXACT_FIT_LOWERCASE:
- return 1;
- case d.NO_BORDER_LOWERCASE:
- return 2;
- case d.NO_SCALE_LOWERCASE:
- return 4;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.SHOW_ALL = "showAll";
- d.EXACT_FIT = "exactFit";
- d.NO_BORDER = "noBorder";
- d.NO_SCALE = "noScale";
- d.SHOW_ALL_LOWERCASE = "showall";
- d.EXACT_FIT_LOWERCASE = "exactfit";
- d.NO_BORDER_LOWERCASE = "noborder";
- d.NO_SCALE_LOWERCASE = "noscale";
- return d;
- }(b.ASObject);
- e.StageScaleMode = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NONE = "none";
- d.POSITIVE = "positive";
- d.NEGATIVE = "negative";
- return d;
- }(b.ASObject);
- e.TriangleCulling = n;
- })(e.display || (e.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a(a) {
- b.call(this);
- this._children = [];
- this._children[0] = this._content = a;
- a._setParent(this, 0);
- this._setDirtyFlags(2097152);
- this._invalidateFillAndLineBounds(!0, !0);
- this.sec.flash.display.DisplayObject.axClass._advancableInstances.push(this);
- this._constructed = !1;
- }
- __extends(a, b);
- a.prototype.call = function(a) {
- m("AVM1Movie#call");
- };
- a.prototype.addCallback = function(a, b) {
- m("AVM1Movie#call");
- };
- a.prototype._addFrame = function(a) {
- this._content._addFrame(a);
- };
- a.prototype._initFrame = function(a) {
- };
- a.prototype._constructFrame = function() {
- this._constructed || (this._constructed = !0, h.DisplayObjectContainer.prototype._constructChildren.call(this));
- this._content._constructFrame();
- };
- a.prototype._enqueueFrameScripts = function() {
- this._removeFlags(16384);
- this._content._enqueueFrameScripts();
- };
- a.prototype._propagateFlagsDown = function(a) {
- this._hasFlags(a) || (this._setFlags(a), this._content._propagateFlagsDown(a));
- };
- a.prototype._containsPoint = function(a, b, d, h, e, q) {
- return 3 === e ? this._content._containsPoint(a, b, d, h, e, q) : 0 === e && this._getContentBounds().contains(d, h) ? 1 : 0;
- };
- a.prototype._getChildBounds = function(a, b) {
- var d = this._content._getContentBounds(b).clone();
- this._getConcatenatedMatrix().transformBounds(d);
- a.unionInPlace(d);
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.display.DisplayObject);
- h.AVM1Movie = l;
- })(b.display || (b.display = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c) {
- void 0 === a && (a = "");
- void 0 === c && (c = 0);
- b.call(this, a, c);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASError);
- e.IllegalOperationError = n;
- })(e.errors || (e.errors = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- function m(a) {
- for (var b = 0;b < a._attributes.length;b++) {
- var c = a._attributes[b];
- if ("id" === c._name.name) {
- return c._value;
- }
- }
- }
- var l = e.AVMX.axCoerceString, d = e.Telemetry, a = e.ExternalInterfaceService, c = function(c) {
- function k() {
- c.call(this);
- }
- __extends(k, c);
- k.ensureInitialized = function() {
- this.available || this.sec.throwError("Error", b.Errors.ExternalInterfaceNotAvailableError);
- this.initialized || (d.instance.reportTelemetry({topic:"feature", feature:1}), this.initialized = !0, a.instance.initJS(this._callIn));
- };
- k.call = function(a) {
- this.ensureInitialized();
- var b = "";
- if (1 < arguments.length) {
- for (var b = [], c = 1;c < arguments.length;c++) {
- b.push(this.convertToJSString(arguments[c]));
- }
- b = b.join(",");
- }
- b = this._evalJS("try {__flash__toXML(" + a + "(" + b + "));} catch (e) {" + (this.$BgmarshallExceptions ? '"" + e + "";' : '"";') + "}");
- return null == b ? null : this.convertFromXML(this.convertToXML(b));
- };
- k.addCallback = function(a, b) {
- this.ensureInitialized();
- if (b) {
- var c = this;
- this._addCallback(a, function(a, d) {
- var f = !0;
- if (d) {
- for (var k = [], h = 0;h < d.length;h++) {
- var e = d[h];
- "object" === typeof e && e ? k.push(c.sec.createObjectFromJS(e, !0)) : k.push(e);
- }
- d = k;
- } else {
- for (k = this.convertToXML(a), f = (f = k.attribute("returntype")) && "javascript" == f._value, d = [], h = 0;h < k._children.length;h++) {
- d.push(this.convertFromXML(k._children[h]));
- }
- }
- var r;
- try {
- r = b.axApply(null, d);
- } catch (l) {
- if (this.$BgmarshallExceptions) {
- r = l;
- } else {
- throw l;
- }
- }
- return f ? c.convertToJSString(r) : c.convertToXMLString(r);
- });
- } else {
- this._removeCallback(a);
- }
- };
- Object.defineProperty(k, "available", {get:function() {
- return a.instance.enabled;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k, "objectID", {get:function() {
- return a.instance.getId();
- }, enumerable:!0, configurable:!0});
- k._addCallback = function(b, c) {
- a.instance.registerCallback(b);
- k.registeredCallbacks[b] = c;
- };
- k._removeCallback = function(b) {
- a.instance.unregisterCallback(b);
- delete k.registeredCallbacks[b];
- };
- k._evalJS = function(b) {
- b = l(b);
- return a.instance.eval(b);
- };
- k._callIn = function(a, b) {
- var c = k.registeredCallbacks[a];
- if (c) {
- return c(a, b);
- }
- };
- k._callOut = function(b) {
- b = l(b);
- return a.instance.call(b);
- };
- k.convertToXML = function(a) {
- var c = this.sec.system.getClass(b.Multiname.FromSimpleName("XML")), d = c.ignoreWhitespace;
- c.ignoreWhitespace = !1;
- a = c.Create(a);
- c.ignoreWhitespace = d;
- return a;
- };
- k.convertToXMLString = function(a) {
- switch(typeof a) {
- case "boolean":
- return a ? "" : "";
- case "number":
- return "" + a + "";
- case "string":
- return "" + a.split("&").join("&").split("<").join("<").split(">").join(">") + "";
- case "object":
- if (null === a) {
- return "";
- }
- if (this.sec.AXDate.axIsInstanceOf(a)) {
- return "" + a.time + "";
- }
- if (this.sec.AXError.axIsInstanceOf(a)) {
- return this.$BgmarshallExceptions ? "" + a + "" : "";
- }
- var b = [];
- if (a.hasOwnProperty("$Bglength")) {
- for (var c = a.$Bglength, d = 0;d < c;d++) {
- var f = this.convertToXMLString(a.axGetNumericProperty(d));
- b.push('' + f + "");
- }
- return "" + b.join("") + "";
- }
- c = a.axGetEnumerableKeys();
- for (d = 0;d < c.length;d++) {
- var k = c[d], f = this.convertToXMLString(a.axGetPublicProperty(k));
- b.push('' + f + "");
- }
- return "";
- default:
- return "";
- }
- };
- k.convertFromXML = function(a) {
- switch(a._name.name) {
- case "true":
- return !0;
- case "false":
- return !1;
- case "number":
- return Number(String(a.children()));
- case "string":
- return String(a.children());
- case "null":
- return null;
- case "date":
- return this.sec.AXDate.axConstruct([Number(String(a.children()))]);
- case "exception":
- if (this.$BgmarshallExceptions) {
- throw this.sec.AXError.axConstruct([String(a.children())]);
- }
- break;
- case "array":
- ;
- case "object":
- for (var c = "object" === a._name.name ? this.sec.createObject() : this.sec.createArrayUnsafe([]), d = 0;d < a._children.length;d++) {
- var f = a._children[d];
- c.axSetPublicProperty(m(f), this.convertFromXML(f._children[0]));
- }
- return c;
- case "class":
- return a = b.Multiname.FromFQNString(String(a.children()), 0), this.sec.application.getClass(a);
- }
- };
- k.convertToJSString = function(a) {
- if ("string" == typeof a) {
- return '"' + a.split("\r").join("\\r").split("\n").join("\\n").split('"').join('\\"') + '"';
- }
- if (this.sec.AXArray.axIsInstanceOf(a)) {
- var b = [];
- a = a.value;
- for (var c = 0;c < a.length;c++) {
- b.push(this.convertToJSString(a[c]));
- }
- return "[" + b.join(",") + "]";
- }
- if (this.sec.AXDate.axIsInstanceOf(a)) {
- return "new Date(" + a.value + ")";
- }
- if (this.$BgmarshallExceptions && this.sec.AXError.axIsInstanceOf(a)) {
- return 'throw "' + a + '"';
- }
- if ("object" === typeof a && null !== a) {
- for (var b = [], d = a.axGetEnumerableKeys(), c = 0;c < d.length;c++) {
- var f = d[c];
- b.push(f + ":" + this.convertToJSString(a.axGetPublicProperty(f)));
- }
- return "({" + b.join(",") + "})";
- }
- return String(a);
- };
- k.classInitializer = null;
- k.initialized = !1;
- k.registeredCallbacks = Object.create(null);
- return k;
- }(h.ASObject);
- n.ExternalInterface = c;
- })(n.external || (n.external = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.LOW = 1;
- d.MEDIUM = 2;
- d.HIGH = 3;
- return d;
- }(b.ASObject);
- e.BitmapFilterQuality = n;
- })(e.filters || (e.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.INNER = "inner";
- d.OUTER = "outer";
- d.FULL = "full";
- return d;
- }(b.ASObject);
- e.BitmapFilterType = n;
- })(e.filters || (e.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d._updateBlurBounds = function(a, b, f, k, h) {
- void 0 === h && (h = !1);
- k = d.blurFilterStepWidths[k - 1];
- h && (h = k / 4, b -= h, f -= h);
- b = Math.ceil((1 > b ? 1 : b) * k);
- f = Math.ceil((1 > f ? 1 : f) * k);
- a.inflate(b, f);
- };
- d.prototype._updateFilterBounds = function(a) {
- };
- d.prototype._serialize = function(a) {
- a.writeInt(-1);
- };
- d.prototype.clone = function() {
- return null;
- };
- d.classInitializer = 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;
- }(b.ASObject);
- n.BitmapFilter = m;
- m = function() {
- function b() {
- }
- b.sanitize = function(b, a, c) {
- if (e.isNullOrUndefined(b) || 0 === b.length) {
- this.colors = [], this.alphas = [], this.ratios = [];
- } else {
- var f;
- e.isNullOrUndefined(c) ? (this.colors = this.sanitizeColors(b), f = this.colors.length, this.ratios = this.initArray(f), e.isNullOrUndefined(a) ? this.alphas = this.initArray(f) : this.alphas = this.sanitizeAlphas(a, f, f, 1)) : 0 === c.length ? (this.colors = [], this.alphas = [], this.ratios = []) : (f = Math.min(b.length, c.length, 16), this.colors = this.sanitizeColors(b, f), this.ratios = this.sanitizeRatios(c, f), e.isNullOrUndefined(a) ? this.alphas = this.initArray(f) : this.alphas =
- this.sanitizeAlphas(a, f, f, 1));
- }
- };
- b.sanitizeColors = function(b, a) {
- void 0 === a && (a = 16);
- for (var c = [], f = 0, k = Math.min(b.length, a);f < k;f++) {
- c[f] = b[f] >>> 0 & 16777215;
- }
- return c;
- };
- b.sanitizeAlphas = function(b, a, c, f) {
- void 0 === a && (a = 16);
- void 0 === c && (c = 0);
- void 0 === f && (f = 0);
- var k = [], h = 0;
- for (a = Math.min(b.length, a);h < a;h++) {
- k[h] = e.NumberUtilities.clamp(+b[h], 0, 1);
- }
- for (;h < c;) {
- k[h++] = f;
- }
- return k;
- };
- b.sanitizeRatios = function(b, a, c, f) {
- void 0 === a && (a = 16);
- void 0 === c && (c = 0);
- void 0 === f && (f = 0);
- var k = [], h = 0;
- for (a = Math.min(b.length, a);h < a;h++) {
- k[h] = e.NumberUtilities.clamp(+b[h], 0, 255);
- }
- for (;h < c;) {
- k[h++] = f;
- }
- return k;
- };
- b.initArray = function(b, a) {
- void 0 === a && (a = 0);
- for (var c = Array(b), f = 0;f < b;f++) {
- c[f] = a;
- }
- return c;
- };
- return b;
- }();
- n.GradientArrays = m;
- })(n.filters || (n.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a, b, k, h, e, l, g, p, n, m, t, E) {
- void 0 === a && (a = 4);
- void 0 === b && (b = 45);
- void 0 === k && (k = 16777215);
- void 0 === h && (h = 1);
- void 0 === e && (e = 0);
- void 0 === l && (l = 1);
- void 0 === g && (g = 4);
- void 0 === p && (p = 4);
- void 0 === n && (n = 1);
- void 0 === m && (m = 1);
- void 0 === t && (t = "inner");
- void 0 === E && (E = !1);
- d.call(this);
- this.distance = a;
- this.angle = b;
- this.highlightColor = k;
- this.highlightAlpha = h;
- this.shadowColor = e;
- this.shadowAlpha = l;
- this.blurX = g;
- this.blurY = p;
- this.strength = n;
- this.quality = m;
- this.type = t;
- this.knockout = E;
- }
- __extends(a, d);
- a.FromUntyped = function(a) {
- var b = a.colors[0] >>> 8, d = (a.colors[0] & 255) / 255, e = a.colors[1] >>> 8, l = (a.colors[1] & 255) / 255, q = h.filters.BitmapFilterType.OUTER;
- a.onTop ? q = h.filters.BitmapFilterType.FULL : a.inner && (q = h.filters.BitmapFilterType.INNER);
- return new this.sec.flash.filters.BevelFilter(a.distance, 180 * a.angle / Math.PI, b, d, e, l, a.blurX, a.blurY, a.strength, a.quality, q, a.knockout);
- };
- a.prototype._updateFilterBounds = function(a) {
- if (this.type !== t.BitmapFilterType.INNER && (t.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
- var b = this._angle * Math.PI / 180;
- a.x += Math.floor(Math.cos(b) * this._distance);
- a.y += Math.floor(Math.sin(b) * this._distance);
- 0 < a.left && (a.left = 0);
- 0 < a.top && (a.top = 0);
- }
- };
- Object.defineProperty(a.prototype, "distance", {get:function() {
- return this._distance;
- }, set:function(a) {
- this._distance = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "angle", {get:function() {
- return this._angle;
- }, set:function(a) {
- this._angle = +a % 360;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "highlightColor", {get:function() {
- return this._highlightColor;
- }, set:function(a) {
- this._highlightColor = a >>> 0 & 16777215;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "highlightAlpha", {get:function() {
- return this._highlightAlpha;
- }, set:function(a) {
- this._highlightAlpha = e.NumberUtilities.clamp(+a, 0, 1);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "shadowColor", {get:function() {
- return this._shadowColor;
- }, set:function(a) {
- this._shadowColor = a >>> 0 & 16777215;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "shadowAlpha", {get:function() {
- return this._shadowAlpha;
- }, set:function(a) {
- this._shadowAlpha = e.NumberUtilities.clamp(+a, 0, 1);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "knockout", {get:function() {
- return this._knockout;
- }, set:function(a) {
- this._knockout = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "strength", {get:function() {
- return this._strength;
- }, set:function(a) {
- this._strength = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "type", {get:function() {
- return this._type;
- }, set:function(a) {
- a = m(a);
- null === a ? this.sec.throwError("TypeError", b.Errors.NullPointerError, "type") : this._type = a === t.BitmapFilterType.INNER || a === t.BitmapFilterType.OUTER ? a : t.BitmapFilterType.FULL;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.filters.BevelFilter(this._distance, this._angle, this._highlightColor, this._highlightAlpha, this._shadowColor, this._shadowAlpha, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(h.filters.BitmapFilter);
- t.BevelFilter = l;
- })(h.filters || (h.filters = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = function(b) {
- function d(a, c, d) {
- void 0 === a && (a = 4);
- void 0 === c && (c = 4);
- void 0 === d && (d = 1);
- b.call(this);
- this.blurX = a;
- this.blurY = c;
- this.quality = d;
- }
- __extends(d, b);
- d.FromUntyped = function(a) {
- return new this.sec.flash.filters.BlurFilter(a.blurX, a.blurY, a.quality);
- };
- d.prototype._updateFilterBounds = function(a) {
- h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality, !0);
- };
- d.prototype._serialize = function(a) {
- a.ensureAdditionalCapacity(16);
- a.writeIntUnsafe(1);
- a.writeFloatUnsafe(this._blurX);
- a.writeFloatUnsafe(this._blurY);
- a.writeIntUnsafe(this._quality);
- };
- Object.defineProperty(d.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.filters.BlurFilter(this._blurX, this._blurY, this._quality);
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.filters.BitmapFilter);
- h.BlurFilter = m;
- })(b.filters || (b.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = function(h) {
- function d(a) {
- void 0 === a && (a = null);
- h.call(this);
- 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];
- }
- __extends(d, h);
- d.FromUntyped = function(a) {
- var b = Object.create(this.sec.flash.filters.ColorMatrixFilter.axClass.tPrototype);
- b._matrix = a.matrix;
- return b;
- };
- d.prototype._serialize = function(a) {
- var b = this._matrix;
- a.ensureAdditionalCapacity(4 * (b.length + 1));
- a.writeIntUnsafe(6);
- for (var d = 0;d < b.length;d++) {
- a.writeFloatUnsafe(b[d]);
- }
- };
- Object.defineProperty(d.prototype, "matrix", {get:function() {
- return this.sec.createArrayUnsafe(this._matrix.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "matrix");
- var c = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- a = a.value;
- for (var d = 0, k = Math.min(a.length, 20);d < k;d++) {
- c[d] = e.toNumber(a[d]);
- }
- this._matrix = c;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.filters.ColorMatrixFilter(this.matrix);
- };
- d.classInitializer = null;
- return d;
- }(h.filters.BitmapFilter);
- t.ColorMatrixFilter = m;
- })(h.filters || (h.filters = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = function(h) {
- function d(a, b, d, k, e, u, q, g, p) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 0);
- void 0 === d && (d = null);
- void 0 === k && (k = 1);
- void 0 === e && (e = 0);
- void 0 === u && (u = !0);
- void 0 === q && (q = !0);
- void 0 === g && (g = 0);
- void 0 === p && (p = 0);
- h.call(this);
- this.matrixX = a;
- this.matrixY = b;
- d ? this.matrix = d : this._matrix = this._expandArray([], this._matrixX * this._matrixY);
- this.divisor = k;
- this.bias = e;
- this.preserveAlpha = u;
- this.clamp = q;
- this.color = g;
- this.alpha = p;
- }
- __extends(d, h);
- d.FromUntyped = function(a) {
- return new this.sec.flash.filters.ConvolutionFilter(a.matrixX, a.matrixY, a.matrix, a.divisor, a.bias, a.preserveAlpha, a.clamp, a.color >>> 8, (a.color & 255) / 255);
- };
- d.prototype._expandArray = function(a, b, d) {
- if (a) {
- for (d = a.length;d < b;) {
- a[d++] = 0;
- }
- }
- return a;
- };
- Object.defineProperty(d.prototype, "matrix", {get:function() {
- return this.sec.createArrayUnsafe(this._matrix.slice(0, this._matrixX * this._matrixY));
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "matrix");
- a = a.value;
- for (var c = this._matrixX * this._matrixY, d = Math.min(a.length, c), k = Array(d), h = 0;h < d;h++) {
- k[h] = e.toNumber(a[h]);
- }
- this._expandArray(k, c);
- this._matrix = k;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "matrixX", {get:function() {
- return this._matrixX;
- }, set:function(a) {
- a = e.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(d.prototype, "matrixY", {get:function() {
- return this._matrixY;
- }, set:function(a) {
- a = e.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(d.prototype, "divisor", {get:function() {
- return this._divisor;
- }, set:function(a) {
- this._divisor = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "bias", {get:function() {
- return this._bias;
- }, set:function(a) {
- this._bias = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "preserveAlpha", {get:function() {
- return this._preserveAlpha;
- }, set:function(a) {
- this._preserveAlpha = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "clamp", {get:function() {
- return this._clamp;
- }, set:function(a) {
- this._clamp = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "color", {get:function() {
- return this._color;
- }, set:function(a) {
- this._color = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "alpha", {get:function() {
- return this._alpha;
- }, set:function(a) {
- this._alpha = e.NumberUtilities.clamp(+a, 0, 1);
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.filters.ConvolutionFilter(this._matrixX, this._matrixY, this.matrix, this._divisor, this._bias, this._preserveAlpha, this._clamp, this._color, this._alpha);
- };
- d.classInitializer = null;
- return d;
- }(h.filters.BitmapFilter);
- t.ConvolutionFilter = m;
- })(h.filters || (h.filters = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.WRAP = "wrap";
- d.CLAMP = "clamp";
- d.IGNORE = "ignore";
- d.COLOR = "color";
- return d;
- }(b.ASObject);
- e.DisplacementMapFilterMode = n;
- })(e.filters || (e.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = e.AVMX.axCoerceString, d = function(a) {
- function b(c, d, h, e, l, g, p, n, m) {
- void 0 === c && (c = null);
- void 0 === d && (d = null);
- void 0 === h && (h = 0);
- void 0 === e && (e = 0);
- void 0 === l && (l = 0);
- void 0 === g && (g = 0);
- void 0 === p && (p = "wrap");
- void 0 === n && (n = 0);
- void 0 === m && (m = 0);
- a.call(this);
- this.mapBitmap = c;
- this.mapPoint = d;
- this.componentX = h;
- this.componentY = e;
- this.scaleX = l;
- this.scaleY = g;
- this.mode = p;
- this.color = n;
- this.alpha = m;
- }
- __extends(b, a);
- b.FromUntyped = function(a) {
- return new this.sec.flash.filters.DisplacementMapFilter(a.mapBitmap, a.mapPoint, a.componentX, a.componentY, a.scaleX, a.scaleY, a.mode, a.color, a.alpha);
- };
- Object.defineProperty(b.prototype, "mapBitmap", {get:function() {
- m("public flash.filters.DisplacementMapFilter::get mapBitmap");
- return this._mapBitmap;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set mapBitmap");
- this._mapBitmap = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "mapPoint", {get:function() {
- m("public flash.filters.DisplacementMapFilter::get mapPoint");
- return this._mapPoint;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set mapPoint");
- this._mapPoint = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "componentX", {get:function() {
- return this._componentX;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set componentX");
- this._componentX = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "componentY", {get:function() {
- return this._componentY;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set componentY");
- this._componentY = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "scaleX", {get:function() {
- return this._scaleX;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set scaleX");
- this._scaleX = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "scaleY", {get:function() {
- return this._scaleY;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set scaleY");
- this._scaleY = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "mode", {get:function() {
- return this._mode;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set mode");
- this._mode = l(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "color", {get:function() {
- return this._color;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set color");
- this._color = a >>> 0 & 16777215;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "alpha", {get:function() {
- return this._alpha;
- }, set:function(a) {
- m("public flash.filters.DisplacementMapFilter::set alpha");
- this._alpha = +a;
- }, enumerable:!0, configurable:!0});
- b.prototype.clone = function() {
- return new this.sec.flash.filters.DisplacementMapFilter(this._mapBitmap, this._mapPoint, this._componentX, this._componentY, this._scaleX, this._scaleY, this._mode, this._color, this._alpha);
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.filters.BitmapFilter);
- h.DisplacementMapFilter = d;
- })(b.filters || (b.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = function(b) {
- function d(a, c, d, k, h, e, q, g, p, n, m) {
- void 0 === a && (a = 4);
- void 0 === c && (c = 45);
- void 0 === d && (d = 0);
- void 0 === k && (k = 1);
- void 0 === h && (h = 4);
- void 0 === e && (e = 4);
- void 0 === q && (q = 1);
- void 0 === g && (g = 1);
- void 0 === p && (p = !1);
- void 0 === n && (n = !1);
- void 0 === m && (m = !1);
- b.call(this);
- this.distance = a;
- this.angle = c;
- this.color = d;
- this.alpha = k;
- this.blurX = h;
- this.blurY = e;
- this.strength = q;
- this.quality = g;
- this.inner = p;
- this.knockout = n;
- this.hideObject = m;
- }
- __extends(d, b);
- d.FromUntyped = function(a) {
- return new this.sec.flash.filters.DropShadowFilter(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);
- };
- d.prototype._updateFilterBounds = function(a) {
- if (!this.inner && (h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
- var b = this._angle * Math.PI / 180;
- a.x += Math.floor(Math.cos(b) * this._distance);
- a.y += Math.floor(Math.sin(b) * this._distance);
- 0 < a.left && (a.left = 0);
- 0 < a.top && (a.top = 0);
- }
- };
- Object.defineProperty(d.prototype, "distance", {get:function() {
- return this._distance;
- }, set:function(a) {
- this._distance = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "angle", {get:function() {
- return this._angle;
- }, set:function(a) {
- this._angle = +a % 360;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "color", {get:function() {
- return this._color;
- }, set:function(a) {
- this._color = a >>> 0 & 16777215;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "alpha", {get:function() {
- return this._alpha;
- }, set:function(a) {
- this._alpha = e.NumberUtilities.clamp(+a, 0, 1);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "hideObject", {get:function() {
- return this._hideObject;
- }, set:function(a) {
- this._hideObject = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "inner", {get:function() {
- return this._inner;
- }, set:function(a) {
- this._inner = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "knockout", {get:function() {
- return this._knockout;
- }, set:function(a) {
- this._knockout = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "strength", {get:function() {
- return this._strength;
- }, set:function(a) {
- this._strength = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.filters.DropShadowFilter(this._distance, this._angle, this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout, this._hideObject);
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.filters.BitmapFilter);
- h.DropShadowFilter = m;
- })(b.filters || (b.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = function(b) {
- function d(a, c, d, k, h, e, q, g) {
- void 0 === a && (a = 16711680);
- void 0 === c && (c = 1);
- void 0 === d && (d = 6);
- void 0 === k && (k = 6);
- void 0 === h && (h = 2);
- void 0 === e && (e = 1);
- void 0 === q && (q = !1);
- void 0 === g && (g = !1);
- b.call(this);
- this.color = a;
- this.alpha = c;
- this.blurX = d;
- this.blurY = k;
- this.strength = h;
- this.quality = e;
- this.inner = q;
- this.knockout = g;
- }
- __extends(d, b);
- d.FromUntyped = function(a) {
- return new this.sec.flash.filters.GlowFilter(a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout);
- };
- d.prototype._updateFilterBounds = function(a) {
- h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality);
- };
- Object.defineProperty(d.prototype, "color", {get:function() {
- return this._color;
- }, set:function(a) {
- this._color = a >>> 0 & 16777215;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "alpha", {get:function() {
- return this._alpha;
- }, set:function(a) {
- this._alpha = e.NumberUtilities.clamp(+a, 0, 1);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "inner", {get:function() {
- return this._inner;
- }, set:function(a) {
- this._inner = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "knockout", {get:function() {
- return this._knockout;
- }, set:function(a) {
- this._knockout = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "strength", {get:function() {
- return this._strength;
- }, set:function(a) {
- this._strength = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.filters.GlowFilter(this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout);
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.filters.BitmapFilter);
- h.GlowFilter = m;
- })(b.filters || (b.filters = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a, b, k, h, e, l, g, p, n, m, B) {
- void 0 === a && (a = 4);
- void 0 === b && (b = 45);
- void 0 === k && (k = null);
- void 0 === h && (h = null);
- void 0 === e && (e = null);
- void 0 === l && (l = 4);
- void 0 === g && (g = 4);
- void 0 === p && (p = 1);
- void 0 === n && (n = 1);
- void 0 === m && (m = "inner");
- void 0 === B && (B = !1);
- d.call(this);
- this.distance = a;
- this.angle = b;
- t.GradientArrays.sanitize(k ? k.value : null, h ? h.value : null, e ? e.value : null);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- this.blurX = l;
- this.blurY = g;
- this.strength = p;
- this.quality = n;
- this.type = m;
- this.knockout = B;
- }
- __extends(a, d);
- a.FromUntyped = function(a) {
- for (var b = [], d = [], e = 0;e < a.colors.length;e++) {
- var l = a.colors[e];
- b.push(l >>> 8);
- d.push(l & 255) / 255;
- }
- e = h.filters.BitmapFilterType.OUTER;
- a.onTop ? e = h.filters.BitmapFilterType.FULL : a.inner && (e = h.filters.BitmapFilterType.INNER);
- return new this.sec.flash.filters.GradientBevelFilter(a.distance, 180 * a.angle / Math.PI, this.sec.createArrayUnsafe(b), this.sec.createArrayUnsafe(d), this.sec.createArrayUnsafe(a.ratios), a.blurX, a.blurY, a.strength, a.quality, e, a.knockout);
- };
- a.prototype._updateFilterBounds = function(a) {
- if (this.type !== t.BitmapFilterType.INNER && (t.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
- var b = this._angle * Math.PI / 180;
- a.x += Math.floor(Math.cos(b) * this._distance);
- a.y += Math.floor(Math.sin(b) * this._distance);
- 0 < a.left && (a.left = 0);
- 0 < a.top && (a.top = 0);
- }
- };
- Object.defineProperty(a.prototype, "distance", {get:function() {
- return this._distance;
- }, set:function(a) {
- this._distance = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "angle", {get:function() {
- return this._angle;
- }, set:function(a) {
- this._angle = +a % 360;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "colors", {get:function() {
- return this.sec.createArrayUnsafe(this._colors.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "colors");
- this._colors = t.GradientArrays.sanitizeColors(a.value);
- a = this._colors.length;
- this._alphas = t.GradientArrays.sanitizeAlphas(this._alphas, a, a);
- this._ratios = t.GradientArrays.sanitizeRatios(this._ratios, a, a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "alphas", {get:function() {
- return this.sec.createArrayUnsafe(this._alphas.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "alphas");
- t.GradientArrays.sanitize(this._colors, a.value, this._ratios);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ratios", {get:function() {
- return this.sec.createArrayUnsafe(this._ratios.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "ratios");
- t.GradientArrays.sanitize(this._colors, this._alphas, a.value);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "knockout", {get:function() {
- return this._knockout;
- }, set:function(a) {
- this._knockout = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "strength", {get:function() {
- return this._strength;
- }, set:function(a) {
- this._strength = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "type", {get:function() {
- return this._type;
- }, set:function(a) {
- a = m(a);
- null === a ? this.sec.throwError("TypeError", b.Errors.NullPointerError, "type") : this._type = a === t.BitmapFilterType.INNER || a === t.BitmapFilterType.OUTER ? a : t.BitmapFilterType.FULL;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.filters.GradientBevelFilter(this._distance, this._angle, this.colors, this.alphas, this.ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(h.filters.BitmapFilter);
- t.GradientBevelFilter = l;
- })(h.filters || (h.filters = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a, b, k, h, e, l, g, p, n, m, B) {
- void 0 === a && (a = 4);
- void 0 === b && (b = 45);
- void 0 === k && (k = null);
- void 0 === h && (h = null);
- void 0 === e && (e = null);
- void 0 === l && (l = 4);
- void 0 === g && (g = 4);
- void 0 === p && (p = 1);
- void 0 === n && (n = 1);
- void 0 === m && (m = "inner");
- void 0 === B && (B = !1);
- d.call(this);
- this.distance = a;
- this.angle = b;
- t.GradientArrays.sanitize(k ? k.value : null, h ? h.value : null, e ? e.value : null);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- this.blurX = l;
- this.blurY = g;
- this.strength = p;
- this.quality = n;
- this.type = m;
- this.knockout = B;
- }
- __extends(a, d);
- a.FromUntyped = function(a) {
- for (var b = [], d = [], e = 0;e < a.colors.length;e++) {
- var l = a.colors[e];
- b.push(l >>> 8);
- d.push(l & 255) / 255;
- }
- e = h.filters.BitmapFilterType.OUTER;
- a.onTop ? e = h.filters.BitmapFilterType.FULL : a.inner && (e = h.filters.BitmapFilterType.INNER);
- return new this.sec.flash.filters.GradientGlowFilter(a.distance, 180 * a.angle / Math.PI, this.sec.createArrayUnsafe(b), this.sec.createArrayUnsafe(d), this.sec.createArrayUnsafe(a.ratios), a.blurX, a.blurY, a.strength, a.quality, e, a.knockout);
- };
- a.prototype._updateFilterBounds = function(a) {
- if (this.type !== t.BitmapFilterType.INNER && (t.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
- var b = this._angle * Math.PI / 180;
- a.x += Math.floor(Math.cos(b) * this._distance);
- a.y += Math.floor(Math.sin(b) * this._distance);
- 0 < a.left && (a.left = 0);
- 0 < a.top && (a.top = 0);
- }
- };
- Object.defineProperty(a.prototype, "distance", {get:function() {
- return this._distance;
- }, set:function(a) {
- this._distance = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "angle", {get:function() {
- return this._angle;
- }, set:function(a) {
- this._angle = +a % 360;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "colors", {get:function() {
- return this.sec.createArrayUnsafe(this._colors.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "colors");
- this._colors = t.GradientArrays.sanitizeColors(a.value);
- a = this._colors.length;
- this._alphas = t.GradientArrays.sanitizeAlphas(this._alphas, a, a);
- this._ratios = t.GradientArrays.sanitizeRatios(this._ratios, a, a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "alphas", {get:function() {
- return this.sec.createArrayUnsafe(this._alphas.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "alphas");
- t.GradientArrays.sanitize(this._colors, a.value, this._ratios);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ratios", {get:function() {
- return this.sec.createArrayUnsafe(this._ratios.concat());
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "ratios");
- t.GradientArrays.sanitize(this._colors, this._alphas, a.value);
- this._colors = t.GradientArrays.colors;
- this._alphas = t.GradientArrays.alphas;
- this._ratios = t.GradientArrays.ratios;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurX", {get:function() {
- return this._blurX;
- }, set:function(a) {
- this._blurX = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blurY", {get:function() {
- return this._blurY;
- }, set:function(a) {
- this._blurY = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "knockout", {get:function() {
- return this._knockout;
- }, set:function(a) {
- this._knockout = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = e.NumberUtilities.clamp(a | 0, 0, 15);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "strength", {get:function() {
- return this._strength;
- }, set:function(a) {
- this._strength = e.NumberUtilities.clamp(+a, 0, 255);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "type", {get:function() {
- return this._type;
- }, set:function(a) {
- a = m(a);
- null === a ? this.sec.throwError("TypeError", b.Errors.NullPointerError, "type") : this._type = a === t.BitmapFilterType.INNER || a === t.BitmapFilterType.OUTER ? a : t.BitmapFilterType.FULL;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- return new this.sec.flash.filters.GradientGlowFilter(this._distance, this._angle, this.colors, this.alphas, this.ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
- };
- a.classInitializer = null;
- return a;
- }(h.filters.BitmapFilter);
- t.GradientGlowFilter = l;
- })(h.filters || (h.filters = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.IntegerUtilities.toS16, l = e.IntegerUtilities.clampS8U8, d = function(a) {
- function b(c, d, h, e, l, g, p, n) {
- void 0 === c && (c = 1);
- void 0 === d && (d = 1);
- void 0 === h && (h = 1);
- void 0 === e && (e = 1);
- void 0 === l && (l = 0);
- void 0 === g && (g = 0);
- void 0 === p && (p = 0);
- void 0 === n && (n = 0);
- a.call(this);
- this.redMultiplier = +c;
- this.greenMultiplier = +d;
- this.blueMultiplier = +h;
- this.alphaMultiplier = +e;
- this.redOffset = +l;
- this.greenOffset = +g;
- this.blueOffset = +p;
- this.alphaOffset = +n;
- }
- __extends(b, a);
- b.classInitializer = function() {
- this.FROZEN_IDENTITY_COLOR_TRANSFORM = Object.freeze(this.axConstruct([]));
- this.TEMP_COLOR_TRANSFORM = this.axConstruct([]);
- };
- Object.defineProperty(b.prototype, "native_redMultiplier", {get:function() {
- return this.redMultiplier;
- }, set:function(a) {
- this.redMultiplier = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_greenMultiplier", {get:function() {
- return this.greenMultiplier;
- }, set:function(a) {
- this.greenMultiplier = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_blueMultiplier", {get:function() {
- return this.blueMultiplier;
- }, set:function(a) {
- this.blueMultiplier = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_alphaMultiplier", {get:function() {
- return this.alphaMultiplier;
- }, set:function(a) {
- this.alphaMultiplier = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_redOffset", {get:function() {
- return this.redOffset;
- }, set:function(a) {
- this.redOffset = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_greenOffset", {get:function() {
- return this.greenOffset;
- }, set:function(a) {
- this.greenOffset = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_blueOffset", {get:function() {
- return this.blueOffset;
- }, set:function(a) {
- this.blueOffset = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "native_alphaOffset", {get:function() {
- return this.alphaOffset;
- }, set:function(a) {
- this.alphaOffset = +a;
- }, enumerable:!0, configurable:!0});
- b.prototype.ColorTransform = function(a, b, c, d, h, g, p, e) {
- void 0 === a && (a = 1);
- void 0 === b && (b = 1);
- void 0 === c && (c = 1);
- void 0 === d && (d = 1);
- void 0 === h && (h = 0);
- void 0 === g && (g = 0);
- void 0 === p && (p = 0);
- void 0 === e && (e = 0);
- this.redMultiplier = a;
- this.greenMultiplier = b;
- this.blueMultiplier = c;
- this.alphaMultiplier = d;
- this.redOffset = h;
- this.greenOffset = g;
- this.blueOffset = p;
- this.alphaOffset = e;
- };
- Object.defineProperty(b.prototype, "color", {get:function() {
- return this.redOffset << 16 | this.greenOffset << 8 | this.blueOffset;
- }, set:function(a) {
- this.redOffset = a >> 16 & 255;
- this.greenOffset = a >> 8 & 255;
- this.blueOffset = a & 255;
- this.redMultiplier = this.greenMultiplier = this.blueMultiplier = 1;
- }, enumerable:!0, configurable:!0});
- b.prototype.concat = function(a) {
- this.redMultiplier *= a.redMultiplier;
- this.greenMultiplier *= a.greenMultiplier;
- this.blueMultiplier *= a.blueMultiplier;
- this.alphaMultiplier *= a.alphaMultiplier;
- this.redOffset += a.redOffset;
- this.greenOffset += a.greenOffset;
- this.blueOffset += a.blueOffset;
- this.alphaOffset += a.alphaOffset;
- };
- b.prototype.preMultiply = function(a) {
- this.redOffset += a.redOffset * this.redMultiplier;
- this.greenOffset += a.greenOffset * this.greenMultiplier;
- this.blueOffset += a.blueOffset * this.blueMultiplier;
- this.alphaOffset += a.alphaOffset * this.alphaMultiplier;
- this.redMultiplier *= a.redMultiplier;
- this.greenMultiplier *= a.greenMultiplier;
- this.blueMultiplier *= a.blueMultiplier;
- this.alphaMultiplier *= a.alphaMultiplier;
- };
- b.prototype.copyFrom = function(a) {
- this.redMultiplier = a.redMultiplier;
- this.greenMultiplier = a.greenMultiplier;
- this.blueMultiplier = a.blueMultiplier;
- this.alphaMultiplier = a.alphaMultiplier;
- this.redOffset = a.redOffset;
- this.greenOffset = a.greenOffset;
- this.blueOffset = a.blueOffset;
- this.alphaOffset = a.alphaOffset;
- };
- b.prototype.copyFromUntyped = function(a) {
- this.redMultiplier = a.redMultiplier / 256;
- this.greenMultiplier = a.greenMultiplier / 256;
- this.blueMultiplier = a.blueMultiplier / 256;
- this.alphaMultiplier = a.alphaMultiplier / 256;
- this.redOffset = a.redOffset;
- this.greenOffset = a.greenOffset;
- this.blueOffset = a.blueOffset;
- this.alphaOffset = a.alphaOffset;
- };
- b.prototype.setTo = function(a, b, c, d, h, g, p, e) {
- this.redMultiplier = a;
- this.greenMultiplier = b;
- this.blueMultiplier = c;
- this.alphaMultiplier = d;
- this.redOffset = h;
- this.greenOffset = g;
- this.blueOffset = p;
- this.alphaOffset = e;
- };
- b.prototype.clone = function() {
- return new this.sec.flash.geom.ColorTransform(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset);
- };
- b.prototype.convertToFixedPoint = function() {
- this.redMultiplier = l(this.redMultiplier);
- this.greenMultiplier = l(this.greenMultiplier);
- this.blueMultiplier = l(this.blueMultiplier);
- this.alphaMultiplier = l(this.alphaMultiplier);
- this.redOffset = m(this.redOffset);
- this.greenOffset = m(this.greenOffset);
- this.blueOffset = m(this.blueOffset);
- this.alphaOffset = m(this.alphaOffset);
- };
- b.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 + ")";
- };
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.ASObject);
- n.ColorTransform = d;
- })(n.geom || (n.geom = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = e.AVMX.axCoerceString, d = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "names", {get:function() {
- m("public flash.media.Camera::get names");
- return this.sec.createArrayUnsafe([]);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "isSupported", {get:function() {
- return !1;
- }, enumerable:!0, configurable:!0});
- b.getCamera = function(a) {
- void 0 === a && (a = null);
- l(a);
- m("public flash.media.Camera::static getCamera");
- return null;
- };
- b._scanHardware = function() {
- m("public flash.media.Camera::static _scanHardware");
- };
- Object.defineProperty(b.prototype, "activityLevel", {get:function() {
- m("public flash.media.Camera::get activityLevel");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "bandwidth", {get:function() {
- m("public flash.media.Camera::get bandwidth");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "currentFPS", {get:function() {
- m("public flash.media.Camera::get currentFPS");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "fps", {get:function() {
- m("public flash.media.Camera::get fps");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "height", {get:function() {
- m("public flash.media.Camera::get height");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "index", {get:function() {
- m("public flash.media.Camera::get index");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "keyFrameInterval", {get:function() {
- m("public flash.media.Camera::get keyFrameInterval");
- return 1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "loopback", {get:function() {
- m("public flash.media.Camera::get loopback");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "motionLevel", {get:function() {
- m("public flash.media.Camera::get motionLevel");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "motionTimeout", {get:function() {
- m("public flash.media.Camera::get motionTimeout");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "muted", {get:function() {
- m("public flash.media.Camera::get muted");
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "name", {get:function() {
- m("public flash.media.Camera::get name");
- return "";
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "quality", {get:function() {
- m("public flash.media.Camera::get quality");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "width", {get:function() {
- m("public flash.media.Camera::get width");
- return 0;
- }, enumerable:!0, configurable:!0});
- b.prototype.setCursor = function(a) {
- m("public flash.media.Camera::setCursor");
- };
- b.prototype.setKeyFrameInterval = function(a) {
- m("public flash.media.Camera::setKeyFrameInterval");
- };
- b.prototype.setLoopback = function(a) {
- m("public flash.media.Camera::setLoopback");
- };
- b.prototype.setMode = function(a, b, c, d) {
- m("public flash.media.Camera::setMode");
- };
- b.prototype.setMotionLevel = function(a, b) {
- m("public flash.media.Camera::setMotionLevel");
- };
- b.prototype.setQuality = function(a, b) {
- m("public flash.media.Camera::setQuality");
- };
- b.prototype.drawToBitmapData = function(a) {
- m("public flash.media.Camera::drawToBitmapData");
- };
- b.prototype.copyToByteArray = function(a, b) {
- m("public flash.media.Camera::copyToByteArray");
- };
- b.prototype.copyToVector = function(a, b) {
- m("public flash.media.Camera::copyToVector");
- };
- b.classInitializer = null;
- return b;
- }(b.events.EventDispatcher);
- h.Camera = d;
- })(b.media || (b.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = "songName artist album year comment genre track".split(" ");
- return d;
- }(b.ASObject);
- e.ID3Info = n;
- })(e.media || (e.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.AVMX.axCoerceString, a = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "names", {get:function() {
- l("public flash.media.Microphone::get names");
- return this.sec.createArrayUnsafe([]);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "isSupported", {get:function() {
- l("public flash.media.Microphone::get isSupported");
- return !1;
- }, enumerable:!0, configurable:!0});
- b.getMicrophone = function(a) {
- m("public flash.media.Microphone::static getMicrophone");
- };
- b.getEnhancedMicrophone = function(a) {
- m("public flash.media.Microphone::static getEnhancedMicrophone");
- };
- Object.defineProperty(b.prototype, "rate", {get:function() {
- m("public flash.media.Microphone::get rate");
- }, set:function(a) {
- m("public flash.media.Microphone::set rate");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "codec", {get:function() {
- m("public flash.media.Microphone::get codec");
- }, set:function(a) {
- d(a);
- m("public flash.media.Microphone::set codec");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "framesPerPacket", {get:function() {
- m("public flash.media.Microphone::get framesPerPacket");
- }, set:function(a) {
- m("public flash.media.Microphone::set framesPerPacket");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "encodeQuality", {get:function() {
- m("public flash.media.Microphone::get encodeQuality");
- }, set:function(a) {
- m("public flash.media.Microphone::set encodeQuality");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "noiseSuppressionLevel", {get:function() {
- m("public flash.media.Microphone::get noiseSuppressionLevel");
- }, set:function(a) {
- m("public flash.media.Microphone::set noiseSuppressionLevel");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "enableVAD", {get:function() {
- m("public flash.media.Microphone::get enableVAD");
- }, set:function(a) {
- m("public flash.media.Microphone::set enableVAD");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "activityLevel", {get:function() {
- m("public flash.media.Microphone::get activityLevel");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "gain", {get:function() {
- m("public flash.media.Microphone::get gain");
- }, set:function(a) {
- m("public flash.media.Microphone::set gain");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "index", {get:function() {
- m("public flash.media.Microphone::get index");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "muted", {get:function() {
- m("public flash.media.Microphone::get muted");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "name", {get:function() {
- m("public flash.media.Microphone::get name");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "silenceLevel", {get:function() {
- m("public flash.media.Microphone::get silenceLevel");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "silenceTimeout", {get:function() {
- m("public flash.media.Microphone::get silenceTimeout");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "useEchoSuppression", {get:function() {
- m("public flash.media.Microphone::get useEchoSuppression");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "soundTransform", {get:function() {
- m("public flash.media.Microphone::get soundTransform");
- }, set:function(a) {
- m("public flash.media.Microphone::set soundTransform");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "enhancedOptions", {get:function() {
- m("public flash.media.Microphone::get enhancedOptions");
- }, set:function(a) {
- m("public flash.media.Microphone::set enhancedOptions");
- }, enumerable:!0, configurable:!0});
- b.prototype.setSilenceLevel = function(a, b) {
- m("public flash.media.Microphone::setSilenceLevel");
- };
- b.prototype.setUseEchoSuppression = function(a) {
- m("public flash.media.Microphone::setUseEchoSuppression");
- };
- b.prototype.setLoopBack = function(a) {
- m("public flash.media.Microphone::setLoopBack");
- };
- b.classInitializer = null;
- return b;
- }(b.events.EventDispatcher);
- h.Microphone = a;
- })(b.media || (b.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- function m(a, b) {
- var c = document.createElement("audio");
- if (c.canPlayType(a.mimeType)) {
- c.preload = "metadata";
- var d = new Blob([a.data], {type:a.mimeType});
- c.src = URL.createObjectURL(d);
- c.load();
- c.addEventListener("loadedmetadata", function() {
- b({duration:1E3 * this.duration});
- });
- } else {
- b({duration:0});
- }
- }
- var l = e.AVMX.axCoerceString, d = e.Debug.notImplemented, a = e.Debug.somewhatImplemented, c = e.Telemetry, f = function() {
- return function() {
- };
- }(), k = function(k) {
- function u(a, b) {
- this._symbol && this.applySymbol();
- k.call(this);
- c.instance.reportTelemetry({topic:"feature", feature:5});
- this._playQueue = [];
- this._url = null;
- this._bytesLoaded = this._bytesTotal = this._length = 0;
- this._id3 = new this.sec.flash.media.ID3Info;
- this._isBuffering = this._isURLInaccessible = !1;
- this.load(a, b);
- }
- __extends(u, k);
- u.prototype.applySymbol = function() {
- this._playQueue = [];
- this._url = null;
- this._bytesLoaded = this._bytesTotal = this._length = 0;
- this._id3 = new this.sec.flash.media.ID3Info;
- this._isBuffering = this._isURLInaccessible = !1;
- var a = this._symbol;
- if (a) {
- var b = new f;
- 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 c = this;
- m(b, function(a) {
- c._length = a.duration;
- });
- this._soundData = b;
- }
- };
- u.initializeFromPCMData = function(a, b) {
- var c = new a.flash.media.Sound;
- c._symbol = b;
- c.applySymbol();
- return c;
- };
- Object.defineProperty(u.prototype, "url", {get:function() {
- return this._url;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "isURLInaccessible", {get:function() {
- a("public flash.media.Sound::get isURLInaccessible");
- return this._isURLInaccessible;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "length", {get:function() {
- return this._length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "isBuffering", {get:function() {
- a("public flash.media.Sound::get isBuffering");
- return this._isBuffering;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "bytesLoaded", {get:function() {
- return this._bytesLoaded;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "bytesTotal", {get:function() {
- return this._bytesTotal;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(u.prototype, "id3", {get:function() {
- return this._id3;
- }, enumerable:!0, configurable:!0});
- u.prototype.loadCompressedDataFromByteArray = function(a, b) {
- d("public flash.media.Sound::loadCompressedDataFromByteArray");
- };
- u.prototype.loadPCMFromByteArray = function(a, b, c, f, k) {
- void 0 === c && (c = "float");
- l(c);
- d("public flash.media.Sound::loadPCMFromByteArray");
- };
- u.prototype.play = function(a, c, d) {
- void 0 === a && (a = 0);
- void 0 === c && (c = 0);
- void 0 === d && (d = null);
- a = +a;
- c |= 0;
- var f = new this.sec.flash.media.SoundChannel;
- f._sound = this;
- f._soundTransform = e.isNullOrUndefined(d) ? new this.sec.flash.media.SoundTransform : d;
- this._playQueue.push({channel:f, startTime:a});
- if (b.disableAudioOption.value) {
- return f;
- }
- this._soundData && (b.webAudioOption.value || b.webAudioMP3Option.value ? this._soundData.pcm ? f._playSoundDataViaChannel(this._soundData, a, c) : "audio/mpeg" === this._soundData.mimeType && b.webAudioMP3Option.value ? e.SWF.MP3DecoderSession.processAll(new Uint8Array(this._soundData.data)).then(function(b) {
- this._soundData.pcm = b.data;
- this._soundData.end = b.data.length;
- f._playSoundDataViaChannel(this._soundData, a, c);
- }.bind(this), function(a) {
- e.Debug.warning("Unable to decode MP3 data: " + a);
- }) : e.Debug.warning("Unable to decode packaged sound data of type: " + this._soundData.mimeType) : f._playSoundDataViaAudio(this._soundData, a, c));
- return f;
- };
- u.prototype.close = function() {
- a("public flash.media.Sound::close");
- };
- u.prototype.extract = function(a, b, c) {
- d("public flash.media.Sound::extract");
- };
- u.prototype.load = function(a, c) {
- if (a) {
- var d = this, k = this._stream = new this.sec.flash.net.URLStream, e = new this.sec.flash.utils.ByteArray, l = 0, r = b.webAudioOption.value, u = null, n = new f;
- n.completed = !1;
- k.addEventListener("progress", function(a) {
- d._bytesLoaded = a.axGetPublicProperty("bytesLoaded");
- d._bytesTotal = a.axGetPublicProperty("bytesTotal");
- r && !u && (u = decodeMP3(n, function(a, b) {
- 0 === d._length && (d._soundData = n, d._playQueue.forEach(function(a) {
- a.channel._playSoundDataViaChannel(n, a.startTime);
- }));
- d._length = b ? 1E3 * a : 1E3 * Math.max(a, u.estimateDuration(d._bytesTotal));
- }));
- var b = k.bytesAvailable;
- k.readBytes(e, l, b);
- u && u.pushData(new Uint8Array(e._buffer, l, b));
- l += b;
- d.dispatchEvent(a);
- });
- k.addEventListener("complete", function(a) {
- d.dispatchEvent(a);
- n.data = e._buffer;
- n.mimeType = "audio/mpeg";
- n.completed = !0;
- r || (d._soundData = n, m(n, function(a) {
- d._length = a.duration;
- }), d._playQueue.forEach(function(a) {
- a.channel._playSoundDataViaAudio(n, a.startTime);
- }));
- u && u.close();
- });
- k.load(a);
- }
- };
- u.classInitializer = null;
- u.classSymbols = null;
- u.instanceSymbols = null;
- return u;
- }(n.events.EventDispatcher);
- t.Sound = k;
- k = function(a) {
- function b(c, d) {
- a.call(this, c, d.flash.media.Sound.axClass);
- }
- __extends(b, a);
- b.FromData = function(a, c) {
- var d = new b(a, c.sec);
- d.channels = a.channels;
- d.sampleRate = a.sampleRate;
- d.pcm = a.pcm;
- d.packaged = a.packaged;
- return d;
- };
- return b;
- }(e.Timeline.Symbol);
- t.SoundSymbol = k;
- })(n.media || (n.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = e.Debug.error, d = function() {
- function a(b, c) {
- this._sourceRate = b;
- this._targetRate = c;
- this._tail = [];
- this._sourceOffset = 0;
- }
- a.prototype.getData = function(a, b) {
- for (var c = this._sourceRate / this._targetRate, d = this._sourceOffset, f = Math.ceil((b - 1) * c + d) + 1, h = [], e = 0;e < a.length;e++) {
- h.push(new Float32Array(f));
- }
- this.ondatarequested({data:h, count:f});
- for (e = 0;e < a.length;e++) {
- for (var l = a[e], n = h[e], m = 0;m < b;m++) {
- var t = m * c + d, G = t | 0, w = Math.ceil(t) | 0, y = 0 > G ? this._tail[e] : n[G];
- G === w ? l[m] = y : (t -= G, l[m] = y * (1 - t) + n[w] * t);
- }
- this._tail[e] = n[f - 1];
- }
- this._sourceOffset = (b - 1) * c + d - (f - 1);
- };
- return a;
- }(), a = function() {
- function a(b, c) {
- var h = a._cachedContext;
- h || (h = new AudioContext, a._cachedContext = h);
- this._context = h;
- this._contextSampleRate = h.sampleRate || 44100;
- this._channels = c;
- this._sampleRate = b;
- this._contextSampleRate !== b && (this._resampler = new d(b, 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), b = this;
- a.onaudioprocess = function(a) {
- for (var c = [], d = 0;d < b._channels;d++) {
- c.push(a.outputBuffer.getChannelData(d));
- }
- a = c[0].length;
- b._resampler ? b._resampler.getData(c, a) : b.requestData(c, a);
- };
- a.connect(this._context.destination);
- this._source = a;
- };
- a.prototype.stop = function() {
- this._source.disconnect(this._context.destination);
- };
- a.prototype.requestData = function(a, b) {
- var c = this._channels, d = new Float32Array(b * c);
- this.ondatarequested({data:d, count:d.length});
- for (var f = 0, h = 0;f < b;f++) {
- for (var e = 0;e < c;e++) {
- a[e][f] = d[h++];
- }
- }
- };
- a.isSupported = function() {
- return "undefined" !== typeof AudioContext;
- };
- return a;
- }(), c = function(b) {
- function c() {
- b.call(this);
- this._element = null;
- this._rightPeak = this._leftPeak = this._position = 0;
- this._pcmData = null;
- this._soundTransform = new this.sec.flash.media.SoundTransform;
- this._playing = !1;
- this._element = null;
- }
- __extends(c, b);
- c.initializeFromAudioElement = function(a, b) {
- var c = new a.flash.media.SoundChannel;
- c._element = b;
- h.SoundMixer._registerSoundSource(c);
- return c;
- };
- Object.defineProperty(c.prototype, "position", {get:function() {
- return this._position;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "soundTransform", {get:function() {
- return this._soundTransform;
- }, set:function(a) {
- m("public flash.media.SoundChannel::set soundTransform");
- this._soundTransform = e.isNullOrUndefined(a) ? new this.sec.flash.media.SoundTransform : a;
- h.SoundMixer._updateSoundSource(this);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "leftPeak", {get:function() {
- return this._leftPeak;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "rightPeak", {get:function() {
- return this._rightPeak;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "playing", {get:function() {
- return this._playing;
- }, enumerable:!0, configurable:!0});
- c.prototype.stop = function() {
- this._element && (h.SoundMixer._unregisterSoundSource(this), this._element.loop = !1, this._element.pause(), this._element.removeAttribute("src"), this._playing = !1);
- this._audioChannel && (h.SoundMixer._unregisterSoundSource(this), this._audioChannel.stop(), this._playing = !1);
- };
- c.prototype._playSoundDataViaAudio = function(a, b, c) {
- if (a.mimeType) {
- h.SoundMixer._registerSoundSource(this);
- this._position = b;
- var d = this, f = 0, k = document.createElement("audio");
- k.canPlayType(a.mimeType) ? (k.preload = "metadata", k.loop = 0 < c, a = new Blob([a.data], {type:a.mimeType}), k.src = URL.createObjectURL(a), k.addEventListener("loadeddata", function() {
- k.currentTime = b / 1E3;
- k.play();
- }), k.addEventListener("timeupdate", function() {
- var a = k.currentTime;
- c && f > a && (--c, c || (k.loop = !1), a < b / 1E3 && (k.currentTime = b / 1E3));
- d._position = 1E3 * (f = a);
- }), k.addEventListener("ended", function() {
- h.SoundMixer._unregisterSoundSource(d);
- d._element = null;
- d._playing = !1;
- d.dispatchEvent(new d.sec.flash.events.Event("soundComplete", !1, !1));
- }), this._element = k, this._playing = !0, h.SoundMixer._updateSoundSource(this)) : console.error('ERROR: "' + a.mimeType + '" type playback is not supported by the browser');
- }
- };
- c.prototype._playSoundDataViaChannel = function(b, c, d) {
- h.SoundMixer._registerSoundSource(this);
- var f = this, k = Math.round(c / 1E3 * b.sampleRate) * b.channels, e = k;
- this._position = c;
- a.isSupported ? c = new a(b.sampleRate, b.channels) : (l("PCM data playback is not supported by the browser"), c = void 0);
- this._audioChannel = c;
- this._audioChannel.ondatarequested = function(a) {
- var c = b.end;
- if (e >= c && b.completed) {
- h.SoundMixer._unregisterSoundSource(this), f._audioChannel.stop(), f._playing = !1, f.dispatchEvent(new f.sec.flash.events.Event("soundComplete", !1, !1));
- } else {
- var l = a.count;
- a = a.data;
- var u = b.pcm;
- do {
- for (var n = Math.min(c - e, l), m = 0;m < n;m++) {
- a[m] = u[e++];
- }
- l -= n;
- if (e >= c) {
- if (!d) {
- break;
- }
- d--;
- e = k;
- }
- } while (0 < l);
- f._position = e / b.sampleRate / b.channels * 1E3;
- }
- };
- this._audioChannel.start();
- this._playing = !0;
- h.SoundMixer._updateSoundSource(this);
- };
- c.prototype.stopSound = function() {
- this.stop();
- };
- c.prototype.updateSoundLevels = function(a) {
- this._element && (this._element.volume = 0 >= a ? 0 : 1 <= a ? 1 : a);
- this._audioChannel && this._audioChannel.setVolume(a);
- };
- c.classInitializer = null;
- return c;
- }(b.events.EventDispatcher);
- h.SoundChannel = c;
- })(b.media || (b.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c) {
- void 0 === a && (a = 1E3);
- void 0 === c && (c = !1);
- b.call(this);
- this.bufferTime = +a;
- this.checkPolicyFile = !!c;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.SoundLoaderContext = n;
- })(e.media || (e.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.Debug.somewhatImplemented, a = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "bufferTime", {get:function() {
- m("public flash.media.SoundMixer::get bufferTime");
- return b._bufferTime;
- }, set:function(a) {
- d("public flash.media.SoundMixer::set bufferTime");
- b._bufferTime = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "soundTransform", {get:function() {
- d("public flash.media.SoundMixer::get soundTransform");
- return e.isNullOrUndefined(b._soundTransform) ? new this.sec.flash.media.SoundTransform : new this.sec.flash.media.SoundTransform(b._soundTransform.volume, b._soundTransform.pan);
- }, set:function(a) {
- d("public flash.media.SoundMixer::set soundTransform");
- b._soundTransform = e.isNullOrUndefined(a) ? new this.sec.flash.media.SoundTransform : a;
- b._updateAllSoundSources();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "audioPlaybackMode", {get:function() {
- m("public flash.media.SoundMixer::get audioPlaybackMode");
- }, set:function(a) {
- l(a);
- m("public flash.media.SoundMixer::set audioPlaybackMode");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "useSpeakerphoneForVoice", {get:function() {
- m("public flash.media.SoundMixer::get useSpeakerphoneForVoice");
- }, set:function(a) {
- m("public flash.media.SoundMixer::set useSpeakerphoneForVoice");
- }, enumerable:!0, configurable:!0});
- b.stopAll = function() {
- b._registeredSoundSources.forEach(function(a) {
- a.stopSound();
- });
- b._registeredSoundSources = [];
- };
- b.computeSpectrum = function(a, b, c) {
- d("public flash.media.SoundMixer::static computeSpectrum");
- b = new Float32Array(1024);
- for (c = 0;1024 > c;c++) {
- b[c] = Math.random();
- }
- a.writeRawBytes(b);
- a.position = 0;
- };
- b.areSoundsInaccessible = function() {
- m("public flash.media.SoundMixer::static areSoundsInaccessible");
- };
- b._getMasterVolume = function() {
- return b._masterVolume;
- };
- b._setMasterVolume = function(a) {
- b._masterVolume = +a;
- b._updateAllSoundSources();
- };
- b._registerSoundSource = function(a) {
- b._registeredSoundSources.push(a);
- };
- b._unregisterSoundSource = function(a) {
- a = b._registeredSoundSources.indexOf(a);
- 0 <= a && b._registeredSoundSources.splice(a, 1);
- };
- b._updateSoundSource = function(a) {
- var c = a.soundTransform.volume;
- b._soundTransform && (c *= b._soundTransform.volume);
- c *= b._getMasterVolume();
- a.updateSoundLevels(c);
- };
- b._updateAllSoundSources = function() {
- b._registeredSoundSources.forEach(b._updateSoundSource);
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- b._masterVolume = 1;
- b._registeredSoundSources = [];
- b._bufferTime = 0;
- return b;
- }(b.ASObject);
- n.SoundMixer = a;
- })(n.media || (n.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.somewhatImplemented, l = function(b) {
- function a(a, f) {
- void 0 === a && (a = 1);
- void 0 === f && (f = 0);
- b.call(this);
- this.volume = +a;
- this.pan = +f;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "volume", {get:function() {
- return this._volume;
- }, set:function(a) {
- this._volume = +a;
- this._updateTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "leftToLeft", {get:function() {
- return this._leftToLeft;
- }, set:function(a) {
- this._leftToLeft = +a;
- this._updateTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "leftToRight", {get:function() {
- return this._leftToRight;
- }, set:function(a) {
- this._leftToRight = +a;
- this._updateTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "rightToRight", {get:function() {
- return this._rightToRight;
- }, set:function(a) {
- this._rightToRight = +a;
- this._updateTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "rightToLeft", {get:function() {
- return this._rightToLeft;
- }, set:function(a) {
- this._rightToLeft = +a;
- this._updateTransform();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.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);
- this.leftToRight = 0;
- this.rightToRight = Math.sqrt(1 + a);
- this.rightToLeft = 0;
- }, enumerable:!0, configurable:!0});
- a.prototype._updateTransform = function() {
- m("public flash.media.SoundTransform::_updateTransform");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.SoundTransform = l;
- })(n.media || (n.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "viewPort", {get:function() {
- m("public flash.media.StageVideo::get viewPort");
- }, set:function(a) {
- m("public flash.media.StageVideo::set viewPort");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "pan", {get:function() {
- m("public flash.media.StageVideo::get pan");
- }, set:function(a) {
- m("public flash.media.StageVideo::set pan");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "zoom", {get:function() {
- m("public flash.media.StageVideo::get zoom");
- }, set:function(a) {
- m("public flash.media.StageVideo::set zoom");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "depth", {get:function() {
- m("public flash.media.StageVideo::get depth");
- }, set:function(a) {
- m("public flash.media.StageVideo::set depth");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "videoWidth", {get:function() {
- m("public flash.media.StageVideo::get videoWidth");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "videoHeight", {get:function() {
- m("public flash.media.StageVideo::get videoHeight");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "colorSpaces", {get:function() {
- m("public flash.media.StageVideo::get colorSpaces");
- }, enumerable:!0, configurable:!0});
- a.prototype.attachNetStream = function(a) {
- m("public flash.media.StageVideo::attachNetStream");
- };
- a.prototype.attachCamera = function(a) {
- m("public flash.media.StageVideo::attachCamera");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.StageVideo = l;
- })(b.media || (b.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.AVAILABLE = "available";
- d.UNAVAILABLE = "unavailable";
- return d;
- }(b.ASObject);
- e.StageVideoAvailability = n;
- })(e.media || (e.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = function(a) {
- function b(c, d) {
- void 0 === c && (c = 320);
- void 0 === d && (d = 240);
- c |= 0;
- d |= 0;
- this._symbol && !this._fieldsInitialized && this.applySymbol();
- a.call(this);
- this._fieldsInitialized || this._initializeFields();
- this._symbol || this._setFillAndLineBoundsFromWidthAndHeight(20 * (c || 320), 20 * (d || 240));
- }
- __extends(b, a);
- b.prototype.applySymbol = function() {
- this._initializeFields();
- var a = this._symbol;
- this._deblocking = a.deblocking;
- this._smoothing = a.smoothing;
- this._setFillAndLineBoundsFromWidthAndHeight(20 * a.width, 20 * a.height);
- };
- b.prototype._initializeFields = function() {
- a.prototype._initializeFields.call(this);
- this._deblocking = 0;
- this._smoothing = !1;
- this._videoHeight = this._videoWidth = 0;
- };
- Object.defineProperty(b.prototype, "deblocking", {get:function() {
- return this._deblocking;
- }, set:function(a) {
- this._deblocking = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "smoothing", {get:function() {
- return this._smoothing;
- }, set:function(a) {
- this._smoothing = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "videoWidth", {get:function() {
- return this._videoWidth;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "videoHeight", {get:function() {
- return this._videoHeight;
- }, enumerable:!0, configurable:!0});
- b.prototype._containsPointDirectly = function(a, b, c, d) {
- return !0;
- };
- b.prototype.clear = function() {
- l("public flash.media.Video::clear");
- };
- b.prototype.attachNetStream = function(a) {
- if (this._netStream !== a) {
- this._netStream && (this._netStream._videoReferrer = null);
- if (this._netStream = a) {
- a._videoReferrer = this;
- }
- this._setDirtyFlags(33554432);
- }
- };
- b.prototype.attachCamera = function(a) {
- m("public flash.media.Video::attachCamera");
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.display.DisplayObject);
- h.Video = d;
- d = function(a) {
- function b(c, d) {
- a.call(this, c, d.flash.media.Video.axClass, !0);
- }
- __extends(b, a);
- b.FromData = function(a, d) {
- var h = new b(a, d.sec);
- h.width = a.width;
- h.height = a.height;
- h.deblocking = a.deblocking;
- h.smoothing = a.smoothing;
- h.codec = a.codec;
- return h;
- };
- return b;
- }(e.Timeline.DisplaySymbol);
- h.VideoSymbol = d;
- })(b.media || (b.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.VideoStreamSettings = n;
- })(e.media || (e.media = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k) {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "description", {get:function() {
- return this._description;
- }, set:function(a) {
- this._description = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "extension", {get:function() {
- return this._extension;
- }, set:function(a) {
- this._extension = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "macType", {get:function() {
- return this._macType;
- }, set:function(a) {
- this._macType = m(a);
- }, enumerable:!0, configurable:!0});
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.FileFilter = l;
- })(n.net || (n.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "creationDate", {get:function() {
- m("public flash.net.FileReference::get creationDate");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "creator", {get:function() {
- m("public flash.net.FileReference::get creator");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "modificationDate", {get:function() {
- m("public flash.net.FileReference::get modificationDate");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "name", {get:function() {
- m("public flash.net.FileReference::get name");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "size", {get:function() {
- m("public flash.net.FileReference::get size");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "type", {get:function() {
- m("public flash.net.FileReference::get type");
- }, enumerable:!0, configurable:!0});
- b.prototype.cancel = function() {
- m("public flash.net.FileReference::cancel");
- };
- b.prototype.download = function(a, b) {
- void 0 === b && (b = null);
- l(b);
- m("public flash.net.FileReference::download");
- };
- b.prototype.upload = function(a, b, c) {
- void 0 === b && (b = "Filedata");
- l(b);
- m("public flash.net.FileReference::upload");
- };
- Object.defineProperty(b.prototype, "data", {get:function() {
- m("public flash.net.FileReference::get data");
- }, enumerable:!0, configurable:!0});
- b.prototype.browse = function(a) {
- m("public flash.net.FileReference::browse");
- };
- b.classInitializer = null;
- return b;
- }(b.events.EventDispatcher);
- h.FileReference = d;
- })(b.net || (b.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "fileList", {get:function() {
- m("public flash.net.FileReferenceList::get fileList");
- }, enumerable:!0, configurable:!0});
- a.prototype.browse = function(a) {
- m("public flash.net.FileReferenceList::browse");
- };
- a.classInitializer = null;
- return a;
- }(b.events.EventDispatcher);
- h.FileReferenceList = l;
- })(b.net || (b.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.AVMX.axCoerceString, l = "send connect close allowDomain allowInsecureDomain client domain".split(" ");
- Object.freeze(l);
- var d = function(a) {
- function c() {
- a.call(this);
- this._client = this;
- this._connectionName = null;
- this._allowedInsecureDomains = [];
- this._allowedSecureDomains = [];
- var b = new URL(e.AVMX.getCurrentABC().env.url);
- this._domain = b.hostname;
- this._secure = "https:" === b.protocol;
- }
- __extends(c, a);
- Object.defineProperty(c, "isSupported", {get:function() {
- return !0;
- }, enumerable:!0, configurable:!0});
- c.prototype.close = function() {
- var a = this._connectionName;
- a || this.sec.throwError("ArgumentError", b.Errors.CloseNotConnectedError);
- this._connectionName = null;
- this._allowedInsecureDomains = [];
- this._allowedSecureDomains = [];
- e.LocalConnectionService.instance.closeConnection(a, this);
- };
- c.prototype.connect = function(a) {
- a = m(a);
- null === a && this.sec.throwError("TypeError", b.Errors.NullPointerError, "connectionName");
- "" === a && this.sec.throwError("TypeError", b.Errors.EmptyStringError, "connectionName");
- -1 < a.indexOf(":") && this.sec.throwError("ArgumentError", b.Errors.InvalidParamError);
- this._connectionName && this.sec.throwError("ArgumentError", b.Errors.AlreadyConnectedError);
- -2 === e.LocalConnectionService.instance.createConnection(a, this) && this.sec.throwError("ArgumentError", b.Errors.AlreadyConnectedError);
- this._connectionName = a;
- this._allowedInsecureDomains.length && e.LocalConnectionService.instance.allowDomains(a, this, this._allowedInsecureDomains, !1);
- this._allowedSecureDomains.length && e.LocalConnectionService.instance.allowDomains(a, this, this._allowedSecureDomains, !0);
- };
- c.prototype.send = function(a, c) {
- for (var d = [], h = 2;h < arguments.length;h++) {
- d[h - 2] = arguments[h];
- }
- a = m(a);
- c = m(c);
- null === a && this.sec.throwError("TypeError", b.Errors.NullPointerError, "connectionName");
- "" === a && this.sec.throwError("TypeError", b.Errors.EmptyStringError, "connectionName");
- null === c && this.sec.throwError("TypeError", b.Errors.NullPointerError, "methodName");
- "" === c && this.sec.throwError("TypeError", b.Errors.EmptyStringError, "methodName");
- -1 < l.indexOf(c) && this.sec.throwError("ArgumentError", b.Errors.InvalidParamError);
- h = new this.sec.flash.utils.ByteArray;
- h.writeObject(this.sec.createArrayUnsafe(d));
- 40960 < h.length && this.sec.throwError("ArgumentError", b.Errors.ArgumentSizeError);
- d = h.getBytes().buffer;
- try {
- e.LocalConnectionService.instance.send(a, c, d, this, this._domain, this._secure);
- } catch (q) {
- e.Debug.warning("Unknown error occurred in LocalConnection#send", q);
- }
- };
- Object.defineProperty(c.prototype, "client", {get:function() {
- return this._client;
- }, set:function(a) {
- this.sec.AXObject.axIsType(a) || this.sec.throwError("ArgumentError", b.Errors.InvalidParamError);
- this._client = a;
- }, enumerable:!0, configurable:!0});
- c.prototype.allowDomain = function() {
- for (var a = [], b = 0;b < arguments.length;b++) {
- a[b - 0] = arguments[b];
- }
- this._allowDomains(a, !0);
- };
- c.prototype.allowInsecureDomain = function() {
- for (var a = [], b = 0;b < arguments.length;b++) {
- a[b - 0] = arguments[b];
- }
- this._allowDomains(a, !0);
- this._allowDomains(a, !1);
- };
- c.prototype._allowDomains = function(a, c) {
- var d = [];
- this._connectionName || (d = c ? this._allowedSecureDomains : this._allowedInsecureDomains);
- for (var h = 0;h < a.length;h++) {
- var l = a[h];
- b.axIsTypeString(l) || this.sec.throwError("ArgumentError", b.Errors.AllowDomainArgumentError);
- -1 === d.indexOf(l) && d.push(l);
- }
- this._connectionName && e.LocalConnectionService.instance.allowDomains(this._connectionName, this, a, c);
- };
- c.prototype.handleMessage = function(a, c) {
- var d = this._client, h;
- if (!d.axHasPublicProperty(a) || -1 < l.indexOf(a)) {
- h = this.sec.createError("ReferenceError", b.Errors.ReadSealedError, a, d.axClass.name.name);
- } else {
- var e = d.axGetPublicProperty(a);
- if (!b.axIsCallable(e)) {
- return;
- }
- var g = (new this.sec.flash.utils.ByteArray(c)).readObject();
- if (this.sec.AXArray.axIsType(g)) {
- try {
- e.apply(d, g.value);
- } catch (p) {
- h = p;
- }
- } else {
- h = this.sec.createError("TypeError", b.Errors.CheckTypeFailedError, g, "Array");
- }
- }
- if (h) {
- if (d = new this.sec.flash.events.AsyncErrorEvent("asyncError", !1, !1, "Error #2095: flash.net.LocalConnection was unable to invoke callback " + a + ".", h), this.hasEventListener("asyncError")) {
- try {
- this.dispatchEvent(d);
- } catch (n) {
- console.warn("Exception encountered during asyncErrorEvent handling in LocalConnection sender.");
- }
- } else {
- console.warn("No handler for asyncError on LocalConnection sender, not sending event", d);
- }
- }
- };
- Object.defineProperty(c.prototype, "domain", {get:function() {
- return this._domain;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "isPerUser", {get:function() {
- return !0;
- }, set:function(a) {
- !!a;
- }, enumerable:!0, configurable:!0});
- c.classInitializer = null;
- return c;
- }(h.events.EventDispatcher);
- t.LocalConnection = d;
- })(h.net || (h.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.Telemetry, a = function(a) {
- function f() {
- a.call(this);
- this._uri = null;
- this._connected = !1;
- this._client = null;
- this._proxyType = "none";
- this._objectEncoding = f.defaultObjectEncoding;
- this._usingTLS = !1;
- this._protocol = null;
- d.instance.reportTelemetry({topic:"feature", feature:6});
- }
- __extends(f, a);
- f.prototype.close = function() {
- this.invoke(1);
- };
- f.prototype.addHeader = function(a, c, d) {
- void 0 === c && (c = !1);
- void 0 === d && (d = null);
- this._invoke(3, [b.axCoerceString(a), !!c, d]);
- };
- f.prototype.call = function(a, c) {
- arguments[0] = b.axCoerceString(a);
- this._invoke(2, arguments);
- };
- 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(a) {
- a = b.axCoerceString(a);
- l("public flash.net.NetConnection::connect");
- this._uri = a;
- var c = this.sec.flash.events.NetStatusEvent;
- if (a) {
- var d = RtmpJs.parseConnectionString(a);
- !d || !d.host || "rtmp" !== d.protocol && "rtmpt" !== d.protocol && "rtmps" !== d.protocol ? this.dispatchEvent(new c(h.events.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({level:"status", code:"NetConnection.Connect.Failed"}))) : (c = this.sec.player, a = this.sec.createObjectFromJS({app:d.app, flashver:h.system.Capabilities.version, swfUrl:c.swfUrl, tcUrl:a, fpad:!1, audioCodecs:4095, videoCodecs:255, videoFunction:1, pageUrl:c.pageUrl || c.swfUrl, objectEncoding:0}),
- this._protocol = d.protocol, this._usingTLS = c = "rtmps" === d.protocol || "rtmpt" === d.protocol && (443 === d.port || 8443 === d.port), this._rtmpConnection = d = "rtmp" === d.protocol || "rtmps" === d.protocol ? new RtmpJs.Browser.RtmpTransport({host:d.host, port:d.port || 1935, ssl:c}) : new RtmpJs.Browser.RtmptTransport({host:d.host, port:d.port || 80, ssl:c}), this._rtmpCreateStreamCallbacks = [null, null], d.onresponse = function(a) {
- }, d.onevent = function(a) {
- }, d.onconnected = function(a) {
- this._connected = !0;
- this.dispatchEvent(new this.sec.flash.events.NetStatusEvent(h.events.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({level:"status", code:"NetConnection.Connect.Success"})));
- }.bind(this), d.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), d.connect(a));
- } else {
- this._connected = !0, this.dispatchEvent(new c(h.events.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({level:"status", code:"NetConnection.Connect.Success"})));
- }
- };
- f.prototype._createRtmpStream = function(a) {
- var b = this._rtmpCreateStreamCallbacks.length;
- this._rtmpCreateStreamCallbacks[b] = a;
- this._rtmpConnection.createStream(b, null);
- };
- 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;
- l("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 = b.axCoerceString(a);
- l("public flash.net.NetConnection::set proxyType");
- this._proxyType = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "connectedProxyType", {get:function() {
- m("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() {
- m("public flash.net.NetConnection::get maxPeerConnections");
- }, set:function(a) {
- m("public flash.net.NetConnection::set maxPeerConnections");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "nearID", {get:function() {
- m("public flash.net.NetConnection::get nearID");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "farID", {get:function() {
- m("public flash.net.NetConnection::get farID");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "nearNonce", {get:function() {
- m("public flash.net.NetConnection::get nearNonce");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "farNonce", {get:function() {
- m("public flash.net.NetConnection::get farNonce");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "unconnectedPeerStreams", {get:function() {
- m("public flash.net.NetConnection::get unconnectedPeerStreams");
- }, enumerable:!0, configurable:!0});
- f.prototype.invoke = function(a) {
- return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1));
- };
- f.prototype._invoke = function(a, b) {
- var c = !1;
- switch(a) {
- case 1:
- ;
- case 2:
- c = !0;
- }
- (c ? l : m)("private flash.net.NetConnection::_invoke (" + a + ")");
- };
- f.classInitializer = null;
- f._defaultObjectEncoding = 3;
- return f;
- }(h.events.EventDispatcher);
- t.NetConnection = a;
- })(h.net || (h.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- function m(a, b) {
- var c = a;
- b && (c += ';codecs="' + b.join(",") + '"');
- return c;
- }
- var l = e.Debug.notImplemented, d = e.AVMX.axCoerceString, a = e.Debug.somewhatImplemented, c = e.AVMX.AS.flash.events, f = e.FileLoadingService, k = function(b) {
- function f(a, c) {
- void 0 === c && (c = "connectToFMS");
- b.call(this);
- this._connection = a;
- this._peerID = d(c);
- this._id = n.display.DisplayObject.getNextSyncID();
- this._isDirty = !0;
- this._soundTransform = new this.sec.flash.media.SoundTransform;
- this._contentTypeHint = null;
- this._checkPolicyFile = !0;
- this._videoStream = new u(this);
- this._videoStream._onEnsurePlay = function() {
- this._notifyVideoControl(9, null);
- }.bind(this);
- this._metaData = this._resourceName = null;
- }
- __extends(f, b);
- f.prototype.dispose = function() {
- l("public flash.net.NetStream::dispose");
- };
- f.prototype._getVideoStreamURL = function() {
- return this._videoStream.url;
- };
- f.prototype.play = function(a) {
- n.media.SoundMixer._registerSoundSource(this);
- a = d(a);
- this.sec.player.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});
- };
- f.prototype.play2 = function(a) {
- l("public flash.net.NetStream::play2");
- };
- Object.defineProperty(f.prototype, "info", {get:function() {
- a("public flash.net.NetStream::get info");
- var b = Math.ceil(this._invoke(304, null));
- return new this.sec.flash.net.NetStreamInfo(232, 233 * (1 + b), 232, 32, 32 * (1 + b), 200, 200 * (1 + b), 1, 1 * (1 + b), 233 * b, 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(f.prototype, "multicastInfo", {get:function() {
- l("public flash.net.NetStream::get multicastInfo");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "soundTransform", {get:function() {
- return this._soundTransform;
- }, set:function(a) {
- this._soundTransform = a;
- n.media.SoundMixer._updateSoundSource(this);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "checkPolicyFile", {get:function() {
- return this._checkPolicyFile;
- }, set:function(a) {
- this._checkPolicyFile = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "client", {get:function() {
- return this._client;
- }, set:function(b) {
- a("public flash.net.NetStream::set client");
- this._client = b;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "objectEncoding", {get:function() {
- l("public flash.net.NetStream::get objectEncoding");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastPushNeighborLimit", {get:function() {
- l("public flash.net.NetStream::get multicastPushNeighborLimit");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastPushNeighborLimit");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastWindowDuration", {get:function() {
- l("public flash.net.NetStream::get multicastWindowDuration");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastWindowDuration");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastRelayMarginDuration", {get:function() {
- l("public flash.net.NetStream::get multicastRelayMarginDuration");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastRelayMarginDuration");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastAvailabilityUpdatePeriod", {get:function() {
- l("public flash.net.NetStream::get multicastAvailabilityUpdatePeriod");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastAvailabilityUpdatePeriod");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastFetchPeriod", {get:function() {
- l("public flash.net.NetStream::get multicastFetchPeriod");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastFetchPeriod");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "multicastAvailabilitySendToAll", {get:function() {
- l("public flash.net.NetStream::get multicastAvailabilitySendToAll");
- }, set:function(a) {
- l("public flash.net.NetStream::set multicastAvailabilitySendToAll");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "farID", {get:function() {
- l("public flash.net.NetStream::get farID");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "nearNonce", {get:function() {
- l("public flash.net.NetStream::get nearNonce");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "farNonce", {get:function() {
- l("public flash.net.NetStream::get farNonce");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "peerStreams", {get:function() {
- l("public flash.net.NetStream::get peerStreams");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "audioReliable", {get:function() {
- l("public flash.net.NetStream::get audioReliable");
- }, set:function(a) {
- l("public flash.net.NetStream::set audioReliable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "videoReliable", {get:function() {
- l("public flash.net.NetStream::get videoReliable");
- }, set:function(a) {
- l("public flash.net.NetStream::set videoReliable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "dataReliable", {get:function() {
- l("public flash.net.NetStream::get dataReliable");
- }, set:function(a) {
- l("public flash.net.NetStream::set dataReliable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "audioSampleAccess", {get:function() {
- l("public flash.net.NetStream::get audioSampleAccess");
- }, set:function(a) {
- l("public flash.net.NetStream::set audioSampleAccess");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "videoSampleAccess", {get:function() {
- l("public flash.net.NetStream::get videoSampleAccess");
- }, set:function(a) {
- l("public flash.net.NetStream::set videoSampleAccess");
- }, enumerable:!0, configurable:!0});
- f.prototype.appendBytes = function(a) {
- a = new Uint8Array(a._buffer, 0, a.length);
- this._videoStream.appendBytes(a);
- };
- f.prototype.appendBytesAction = function(a) {
- this._videoStream.appendBytesAction(a);
- };
- Object.defineProperty(f.prototype, "useHardwareDecoder", {get:function() {
- l("public flash.net.NetStream::get useHardwareDecoder");
- }, set:function(a) {
- l("public flash.net.NetStream::set useHardwareDecoder");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "useJitterBuffer", {get:function() {
- l("public flash.net.NetStream::get useJitterBuffer");
- }, set:function(a) {
- l("public flash.net.NetStream::set useJitterBuffer");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "videoStreamSettings", {get:function() {
- l("public flash.net.NetStream::get videoStreamSettings");
- }, set:function(a) {
- l("public flash.net.NetStream::set videoStreamSettings");
- }, enumerable:!0, configurable:!0});
- f.prototype.invoke = function(a) {
- return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1));
- };
- f.prototype.invokeWithArgsArray = function(a, b) {
- return this._invoke.call(this, a >>> 0, b.value);
- };
- Object.defineProperty(f.prototype, "inBufferSeek", {get:function() {
- return this._inBufferSeek;
- }, set:function(a) {
- this._inBufferSeek = !!a;
- }, enumerable:!0, configurable:!0});
- f.prototype._invoke = function(b, c) {
- var d = !1, f;
- switch(b) {
- case 4:
- this._videoStream.bufferTime = c[0];
- d = !0;
- break;
- case 202:
- switch(c[1]) {
- case "pause":
- d = !0;
- this._notifyVideoControl(2, {paused:!!c[3], time:c[4] / 1E3});
- break;
- case "seek":
- d = !0, this._notifyVideoControl(3, {time:c[3] / 1E3});
- }
- break;
- case 300:
- f = this._notifyVideoControl(4, null);
- d = !0;
- break;
- case 302:
- f = this._videoStream.bufferTime;
- d = !0;
- break;
- case 303:
- f = this._notifyVideoControl(5, null);
- d = !0;
- break;
- case 305:
- f = this._notifyVideoControl(7, null);
- d = !0;
- break;
- case 306:
- f = this._notifyVideoControl(8, null), d = !0;
- }
- (d ? a : l)("NetStream._invoke (" + b + ")");
- return f;
- };
- f.prototype._notifyVideoControl = function(a, b) {
- return this.sec.player.notifyVideoControl(this._id, a, b);
- };
- f.prototype.processVideoEvent = function(a, b) {
- this._videoStream.processVideoPlaybackEvent(a, b);
- var d = this.sec.flash.events.NetStatusEvent;
- switch(a) {
- case 0:
- n.media.SoundMixer._updateSoundSource(this);
- break;
- case 2:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Play.Start", level:"status"})));
- break;
- case 3:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Buffer.Flush", level:"status"})));
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Play.Stop", level:"status"})));
- n.media.SoundMixer._unregisterSoundSource(this);
- break;
- case 5:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Buffer.Full", level:"status"})));
- break;
- case 4:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Buffer.Empty", level:"status"})));
- break;
- case 11:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:4 === b.code ? "NetStream.Play.NoSupportedTrackFound" : 3 === b.code ? "NetStream.Play.FileStructureInvalid" : "NetStream.Play.StreamNotFound", level:"error"})));
- break;
- case 6:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Pause.Notify", level:"status"})));
- break;
- case 7:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Unpause.Notify", level:"status"})));
- break;
- case 8:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Seek.Notify", level:"status"})));
- break;
- case 9:
- this.dispatchEvent(new d(c.NetStatusEvent.NET_STATUS, !1, !1, this.sec.createObjectFromJS({code:"NetStream.Seek.Complete", level:"status"})));
- break;
- case 1:
- this._client && (d = this.sec.createObject(), d.axSetPublicProperty("width", b.videoWidth), d.axSetPublicProperty("height", b.videoHeight), d.axSetPublicProperty("duration", b.duration), this._client.axCallPublicProperty("onMetaData", [d]));
- }
- };
- f.prototype.stopSound = function() {
- this.pause();
- };
- f.prototype.updateSoundLevels = function(a) {
- this._notifyVideoControl(6, {volume:a});
- };
- f.classInitializer = null;
- f.classSymbols = null;
- f.instanceSymbols = null;
- f.DIRECT_CONNECTIONS = "directConnections";
- f.CONNECT_TO_FMS = "connectToFMS";
- return f;
- }(n.events.EventDispatcher);
- t.NetStream = k;
- var r;
- (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";
- })(r || (r = {}));
- var u = function() {
- function b(a) {
- this.sec = a.sec;
- this._domReady = new e.PromiseWrapper;
- this._metadataReady = new e.PromiseWrapper;
- this._started = !1;
- this._buffer = "empty";
- this._bufferTime = .1;
- this._contentTypeHint = this._mediaSourceBufferLock = this._mediaSourceBuffer = this._mediaSource = this._url = null;
- this._state = 0;
- this._head = null;
- this._netStream = a;
- }
- Object.defineProperty(b.prototype, "state", {get:function() {
- return this._state;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "bufferTime", {get:function() {
- return this._bufferTime;
- }, set:function(a) {
- this._bufferTime = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "url", {get:function() {
- return this._url;
- }, enumerable:!0, configurable:!0});
- b.prototype.play = function(b, d) {
- var g = this, k = h.mediaSourceOption.value;
- k && "undefined" === typeof MediaSource && (e.Debug.warning("MediaSource API is not enabled, falling back to regular playback"), k = !1);
- var l = !1;
- if (/\.flv($|\?)/i.test(b)) {
- if ("supported" === h.flvOption.value) {
- l = !0;
- } else {
- if ("mock" === h.flvOption.value) {
- b = "resource://shumway/web/noflv.mp4";
- } else {
- setTimeout(function() {
- g._netStream.dispatchEvent(new g.sec.flash.events.NetStatusEvent(c.NetStatusEvent.NET_STATUS, !1, !1, g.sec.createObjectFromJS({code:"NetStream.Play.NoSupportedTrackFound", level:"error"})));
- });
- return;
- }
- }
- }
- if (l || k) {
- this.openInDataGenerationMode();
- var q = new this.sec.flash.net.URLRequest(b);
- q._checkPolicyFile = d;
- var r = new this.sec.flash.net.URLStream;
- r.addEventListener("httpStatus", function(a) {
- (a = a.axGetPublicProperty("responseHeaders").filter(function(a) {
- return "Content-Type" === a.axGetPublicProperty("name");
- })[0]) && a.axGetPublicProperty("value");
- }.bind(this));
- r.addEventListener("progress", function(a) {
- a = r.bytesAvailable;
- var b = new q.sec.flash.utils.ByteArray;
- r.readBytes(b, 0, a);
- a = new Uint8Array(b._buffer, 0, b.length);
- this.appendBytes(a);
- }.bind(this));
- r.addEventListener("complete", function(a) {
- this.appendBytesAction("endSequence");
- }.bind(this));
- r.load(q);
- } else {
- a("public flash.net.NetStream::play"), this._state = 1, this._url = f.instance.resolveUrl(b);
- }
- };
- b.prototype.playInConnection = function(a, b) {
- this.openInDataGenerationMode();
- var c = this, d, f = {packets:0, init:function(a) {
- if (a.axGetPublicProperty("audiocodecid") || a.axGetPublicProperty("videocodecid")) {
- a = RtmpJs.MP4.parseFLVMetadata(a), d = new RtmpJs.MP4.MP4Mux(a), d.oncodecinfo = function(a) {
- this._contentTypeHint = m("video/mp4", a);
- }, d.ondata = function(a) {
- c.appendBytes(new Uint8Array(a));
- }.bind(this);
- }
- }, packet:function(a, b, c) {
- d.pushPacket(a, new Uint8Array(b), c);
- }, generate:function() {
- d.flush();
- }};
- a._createRtmpStream(function(a, c) {
- a.ondata = function(a) {
- console.log("#packet (" + a.typeId + "): @" + 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 && f.init(b);
- };
- a.play(b);
- });
- };
- b.prototype.openInDataGenerationMode = function() {
- this._state = 3;
- var a = new MediaSource;
- 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) {
- if (this._decoder) {
- this._decoder.push(a);
- } else {
- var b, c;
- null !== this._head ? (b = this._head.length, c = new Uint8Array(b + a.length), c.set(a, b)) : (b = 0, c = a);
- if (!this._decoder) {
- var d = this._detectContentType(c);
- "video/x-flv" === d ? (d = new q(this.sec), d.onHeader = function(a) {
- this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(a);
- this._mediaSourceBufferLock = Promise.resolve(void 0);
- }.bind(this), d.onData = this._queueData.bind(this), this._decoder = d) : d && (this._decoder = {onData:this._queueData.bind(this), onError:function(a) {
- }, push:function(a) {
- this.onData(a);
- }, close:function() {
- }}, this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(d), this._mediaSourceBufferLock = Promise.resolve(void 0));
- }
- this._decoder ? (this._decoder.push(c), 0 < b && (this._head = null)) : this._head = 0 === b ? new Uint8Array(a) : c;
- }
- };
- 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 E() {
- b.removeEventListener("update", E);
- a();
- });
- });
- });
- };
- b.prototype.appendBytesAction = function(b) {
- b = d(b);
- if ("endSequence" === b) {
- if (!this._decoder) {
- throw Error("Internal appendBytes error");
- }
- this._decoder.close();
- this._mediaSourceBufferLock.then(function() {
- this._mediaSource && this._mediaSource.endOfStream();
- this.close();
- }.bind(this));
- }
- a("public flash.net.NetStream::appendBytesAction");
- };
- b.prototype.close = function() {
- this._state = 0;
- };
- b.prototype._ensurePlaying = function() {
- this._onEnsurePlay && this._onEnsurePlay();
- };
- b.prototype._detectContentType = function(a) {
- 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 2:
- if (this._started) {
- break;
- }
- this._started = !0;
- break;
- case 3:
- this._started = !1;
- break;
- case 5:
- this._buffer = "full";
- break;
- case 10:
- this._buffer = "progress";
- break;
- case 4:
- this._buffer = "empty";
- break;
- case 1:
- this._metadataReady.resolve({videoWidth:b.videoWidth, videoHeight:b.videoHeight});
- }
- };
- return b;
- }(), q = function() {
- function a(b) {
- this.sec = b;
- 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 c = new this.sec.flash.utils.ByteArray;
- c.writeRawBytes(a.data);
- c.position = 0;
- a = b.AMF0.read(c);
- c = b.AMF0.read(c);
- "onMetaData" === a && (c = RtmpJs.MP4.parseFLVMetadata(c), c = new RtmpJs.MP4.MP4Mux(c), c.oncodecinfo = function(a) {
- this.onHeader(m("video/mp4", a));
- }.bind(this), c.ondata = function(a) {
- this.onData.call(null, a);
- }.bind(this), this._mp4Mux = c);
- } 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;
- }();
- })(n.net || (n.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(e) {
- (function(e) {
- var n = function(h) {
- function d(a, c, d, k, e, n, q, g, p, m, z, t, E, A, G, w, y, C, x, M, I, J, F, D, H) {
- void 0 === I && (I = null);
- void 0 === J && (J = null);
- void 0 === F && (F = null);
- void 0 === D && (D = null);
- void 0 === H && (H = !0);
- h.call(this);
- this.currentBytesPerSecond = +a;
- this.byteCount = +c;
- this.maxBytesPerSecond = +d;
- this.audioBytesPerSecond = +k;
- this.audioByteCount = +e;
- this.videoBytesPerSecond = +n;
- this.videoByteCount = +q;
- this.dataBytesPerSecond = +g;
- this.dataByteCount = +p;
- this.playbackBytesPerSecond = +m;
- this.droppedFrames = +z;
- this.audioBufferByteLength = +t;
- this.videoBufferByteLength = +E;
- this.dataBufferByteLength = +A;
- this.audioBufferLength = +G;
- this.videoBufferLength = +w;
- this.dataBufferLength = +y;
- this._srtt = +C;
- this.audioLossRate = +x;
- this.videoLossRate = +M;
- this.metaData = I;
- this.xmpData = J;
- this.uri = b.axCoerceString(F);
- this.resourceName = b.axCoerceString(D);
- this.isLive = !!H;
- }
- __extends(d, h);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(h.ASObject);
- e.NetStreamInfo = n;
- })(e.net || (e.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d, k, h, e, q, g, p, n, m, t, E, A, G, w, y, C, x) {
- this.sendDataBytesPerSecond = +a;
- this.sendControlBytesPerSecond = +c;
- this.receiveDataBytesPerSecond = +d;
- this.receiveControlBytesPerSecond = +k;
- this.bytesPushedToPeers = +h;
- this.fragmentsPushedToPeers = +e;
- this.bytesRequestedByPeers = +q;
- this.fragmentsRequestedByPeers = +g;
- this.bytesPushedFromPeers = +p;
- this.fragmentsPushedFromPeers = +n;
- this.bytesRequestedFromPeers = +m;
- this.fragmentsRequestedFromPeers = +t;
- this.sendControlBytesPerSecondToServer = +E;
- this.receiveDataBytesPerSecondFromServer = +A;
- this.bytesReceivedFromServer = +G;
- this.fragmentsReceivedFromServer = +w;
- this.receiveDataBytesPerSecondFromIPMulticast = +y;
- this.bytesReceivedFromIPMulticast = +C;
- this.fragmentsReceivedFromIPMulticast = +x;
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.NetStreamMulticastInfo = n;
- })(e.net || (e.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d() {
- b.call(this, void 0);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.events.EventDispatcher);
- h.NetStreamPlayOptions = e;
- })(b.net || (b.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c) {
- b.call(this);
- }
- __extends(d, b);
- d.prototype.ctor = function(a, b) {
- this._result = a;
- this._status = b;
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.Responder = n;
- })(e.net || (e.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- function m() {
- c || (c = "undefined" !== typeof ShumwayCom && ShumwayCom.createSpecialStorage ? ShumwayCom.createSpecialStorage() : window.sessionStorage);
- return c;
- }
- var l = e.Debug.notImplemented, d = e.AVMX.axCoerceString, a = e.Debug.somewhatImplemented, c, f = function(c) {
- function f() {
- c.call(this);
- this._data = this.sec.createObject();
- }
- __extends(f, c);
- f.deleteAll = function(a) {
- d(a);
- l("public flash.net.SharedObject::static deleteAll");
- };
- f.getDiskUsage = function(a) {
- d(a);
- l("public flash.net.SharedObject::static getDiskUsage");
- };
- f._create = function(a, b) {
- var c = new this.sec.flash.net.SharedObject;
- c._path = a;
- c._data = b;
- c._objectEncoding = this._defaultObjectEncoding;
- e.Telemetry.instance.reportTelemetry({topic:"feature", feature:3});
- return c;
- };
- f.getLocal = function(a, c, f) {
- void 0 === c && (c = null);
- a = d(a);
- c = d(c);
- a = (c || "") + "/" + a;
- if (this._sharedObjects[a]) {
- return this._sharedObjects[a];
- }
- c = m().getItem(a);
- c = this._create(a, c ? b.transformJSValueToAS(this.sec, JSON.parse(c), !0) : this.sec.createObject());
- return this._sharedObjects[a] = c;
- };
- f.getRemote = function(a, b, c, f) {
- void 0 === b && (b = null);
- d(a);
- d(b);
- l("public flash.net.SharedObject::static getRemote");
- };
- Object.defineProperty(f, "defaultObjectEncoding", {get:function() {
- return this._defaultObjectEncoding;
- }, set:function(a) {
- this._defaultObjectEncoding = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "data", {get:function() {
- this.queueFlush();
- return this._data;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "objectEncoding", {get:function() {
- return this._objectEncoding;
- }, set:function(a) {
- this._objectEncoding = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "client", {get:function() {
- l("public flash.net.SharedObject::get client");
- }, set:function(a) {
- l("public flash.net.SharedObject::set client");
- }, enumerable:!0, configurable:!0});
- f.prototype.setDirty = function(a) {
- d(a);
- this.queueFlush();
- };
- f.prototype.connect = function(a, b) {
- l("public flash.net.SharedObject::connect");
- };
- f.prototype.send = function() {
- l("send");
- };
- f.prototype.close = function() {
- a("public flash.net.SharedObject::close");
- };
- f.prototype.flush = function(c) {
- a("public flash.net.SharedObject::flush");
- c = JSON.stringify(b.transformASValueToJS(this.sec, this._data, !0));
- m().setItem(this._path, c);
- return "flushed";
- };
- f.prototype.clear = function() {
- a("public flash.net.SharedObject::clear");
- this._data = this.sec.createObject();
- m().removeItem(this._path);
- };
- Object.defineProperty(f.prototype, "size", {get:function() {
- a("public flash.net.SharedObject::get size");
- return JSON.stringify(this._data).length - 2;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "fps", {set:function(b) {
- a("fps");
- this._fps = b;
- }, enumerable:!0, configurable:!0});
- f.prototype.setProperty = function(a, b) {
- void 0 === b && (b = null);
- a = "$Bg" + d(a);
- b !== this._data[a] && (this._data[a] = b, this.queueFlush());
- };
- f.prototype.queueFlush = function() {
- this._pendingFlushId && clearTimeout(this._pendingFlushId);
- this._pendingFlushId = setTimeout(this.flush.bind(this), 100);
- };
- f.classInitializer = null;
- f._sharedObjects = Object.create(null);
- f._defaultObjectEncoding = 3;
- return f;
- }(n.events.EventDispatcher);
- t.SharedObject = f;
- })(n.net || (n.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.Debug.somewhatImplemented, a = function(a) {
- function f(b, d) {
- void 0 === b && (b = null);
- a.call(this, void 0);
- l(b);
- }
- __extends(f, a);
- Object.defineProperty(f.prototype, "bytesAvailable", {get:function() {
- m("public flash.net.Socket::get bytesAvailable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "connected", {get:function() {
- m("public flash.net.Socket::get connected");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "objectEncoding", {get:function() {
- m("public flash.net.Socket::get objectEncoding");
- }, set:function(a) {
- m("public flash.net.Socket::set objectEncoding");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "endian", {get:function() {
- m("public flash.net.Socket::get endian");
- }, set:function(a) {
- l(a);
- m("public flash.net.Socket::set endian");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesPending", {get:function() {
- m("public flash.net.Socket::get bytesPending");
- }, enumerable:!0, configurable:!0});
- f.prototype.readBytes = function(a, b, c) {
- m("public flash.net.Socket::readBytes");
- };
- f.prototype.writeBytes = function(a, b, c) {
- m("public flash.net.Socket::writeBytes");
- };
- f.prototype.writeBoolean = function(a) {
- m("public flash.net.Socket::writeBoolean");
- };
- f.prototype.writeByte = function(a) {
- m("public flash.net.Socket::writeByte");
- };
- f.prototype.writeShort = function(a) {
- m("public flash.net.Socket::writeShort");
- };
- f.prototype.writeInt = function(a) {
- m("public flash.net.Socket::writeInt");
- };
- f.prototype.writeUnsignedInt = function(a) {
- m("public flash.net.Socket::writeUnsignedInt");
- };
- f.prototype.writeFloat = function(a) {
- m("public flash.net.Socket::writeFloat");
- };
- f.prototype.writeDouble = function(a) {
- m("public flash.net.Socket::writeDouble");
- };
- f.prototype.writeMultiByte = function(a, b) {
- l(a);
- l(b);
- m("public flash.net.Socket::writeMultiByte");
- };
- f.prototype.writeUTF = function(a) {
- l(a);
- m("public flash.net.Socket::writeUTF");
- };
- f.prototype.writeUTFBytes = function(a) {
- l(a);
- m("public flash.net.Socket::writeUTFBytes");
- };
- f.prototype.readBoolean = function() {
- m("public flash.net.Socket::readBoolean");
- };
- f.prototype.readByte = function() {
- m("public flash.net.Socket::readByte");
- };
- f.prototype.readUnsignedByte = function() {
- m("public flash.net.Socket::readUnsignedByte");
- };
- f.prototype.readShort = function() {
- m("public flash.net.Socket::readShort");
- };
- f.prototype.readUnsignedShort = function() {
- m("public flash.net.Socket::readUnsignedShort");
- };
- f.prototype.readInt = function() {
- m("public flash.net.Socket::readInt");
- };
- f.prototype.readUnsignedInt = function() {
- m("public flash.net.Socket::readUnsignedInt");
- };
- f.prototype.readFloat = function() {
- m("public flash.net.Socket::readFloat");
- };
- f.prototype.readDouble = function() {
- m("public flash.net.Socket::readDouble");
- };
- f.prototype.readMultiByte = function(a, b) {
- l(b);
- m("public flash.net.Socket::readMultiByte");
- };
- f.prototype.readUTF = function() {
- m("public flash.net.Socket::readUTF");
- };
- f.prototype.readUTFBytes = function(a) {
- m("public flash.net.Socket::readUTFBytes");
- };
- f.prototype.flush = function() {
- m("public flash.net.Socket::flush");
- };
- f.prototype.writeObject = function(a) {
- m("public flash.net.Socket::writeObject");
- };
- f.prototype.readObject = function() {
- m("public flash.net.Socket::readObject");
- };
- f.prototype.internalGetSecurityErrorMessage = function(a, b) {
- l(a);
- d("flash.net.Socket::internalGetSecurityErrorMessage");
- return "SecurityErrorEvent";
- };
- f.prototype.internalConnect = function(a, c) {
- a = l(a);
- c |= 0;
- d("flash.net.Socket::internalConnect");
- this.sec.throwError("SecurityError", b.Errors.SocketConnectError, a, c);
- };
- f.prototype.didFailureOccur = function() {
- d("flash.net.Socket::didFailureOccur");
- return !0;
- };
- f.classInitializer = null;
- f.classSymbols = null;
- f.instanceSymbols = null;
- return f;
- }(h.events.EventDispatcher);
- t.Socket = a;
- })(h.net || (h.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = b.events.Event, l = b.events.IOErrorEvent, d = b.events.ProgressEvent, a = b.events.HTTPStatusEvent, c = b.events.SecurityErrorEvent, f = function(b) {
- function f(h) {
- b.call(this);
- var q = this._stream = new this.sec.flash.net.URLStream;
- q.addEventListener(e.OPEN, this.onStreamOpen.bind(this));
- q.addEventListener(e.COMPLETE, this.onStreamComplete.bind(this));
- q.addEventListener(d.PROGRESS, this.onStreamProgress.bind(this));
- q.addEventListener(l.IO_ERROR, this.onStreamIOError.bind(this));
- q.addEventListener(a.HTTP_STATUS, this.onStreamHTTPStatus.bind(this));
- q.addEventListener(a.HTTP_RESPONSE_STATUS, this.onStreamHTTPResponseStatus.bind(this));
- q.addEventListener(c.SECURITY_ERROR, this.onStreamSecurityError.bind(this));
- this.$BgdataFormat = "text";
- h && this.load(h);
- }
- __extends(f, b);
- Object.defineProperty(f.prototype, "data", {get:function() {
- return this.$Bgdata;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "dataFormat", {get:function() {
- return this.$BgdataFormat;
- }, set:function(a) {
- this.$BgdataFormat = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesLoaded", {get:function() {
- return this.$BgbytesLoaded;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesTotal", {get:function() {
- return this.$BgbytesTotal;
- }, enumerable:!0, configurable:!0});
- f.prototype.load = function(a) {
- this._stream.load(a);
- };
- f.prototype.close = function() {
- this._stream.close();
- };
- f.prototype.complete = function() {
- var a = new this.sec.flash.utils.ByteArray;
- this._stream.readBytes(a);
- if ("binary" === this.$BgdataFormat) {
- this.$Bgdata = a;
- } else {
- var b = a.toString();
- 0 < a.length && "variables" === this.$BgdataFormat ? (a = new this.sec.flash.net.URLVariables, this._ignoreDecodeErrors && (a._ignoreDecodingErrors = !0), a.decode(String(b)), this.$Bgdata = a) : this.$Bgdata = b;
- }
- };
- f.prototype.addEventListener = function(c, d, f, h, e) {
- b.prototype.addEventListener.call(this, c, d, f, h, e);
- c === a.HTTP_RESPONSE_STATUS && (this._httpResponseEventBound = !0);
- };
- f.prototype.onStreamOpen = function(a) {
- this.dispatchEvent(a);
- };
- f.prototype.onStreamComplete = function(a) {
- this.complete();
- this.dispatchEvent(a);
- };
- f.prototype.onStreamProgress = function(a) {
- this.$BgbytesLoaded = a.bytesLoaded;
- this.$BgbytesTotal = a.bytesTotal;
- this.dispatchEvent(a);
- };
- f.prototype.onStreamIOError = function(a) {
- this.complete();
- this.dispatchEvent(a);
- };
- f.prototype.onStreamHTTPStatus = function(a) {
- this.dispatchEvent(a);
- };
- f.prototype.onStreamHTTPResponseStatus = function(a) {
- this._httpResponseEventBound && this.dispatchEvent(a);
- };
- f.prototype.onStreamSecurityError = function(a) {
- this.dispatchEvent(a);
- };
- f.classInitializer = null;
- f.classSymbols = null;
- f.instanceSymbols = null;
- return f;
- }(b.events.EventDispatcher);
- h.URLLoader = f;
- })(b.net || (b.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a) {
- void 0 === a && (a = null);
- d.call(this);
- this._url = m(a);
- this._method = "GET";
- this._digest = this._data = null;
- this._contentType = "application/x-www-form-urlencoded";
- this._requestHeaders = [];
- this._checkPolicyFile = !0;
- }
- __extends(a, d);
- Object.defineProperty(a.prototype, "url", {get:function() {
- return this._url;
- }, set:function(a) {
- this._url = a = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "data", {get:function() {
- return this._data;
- }, set:function(a) {
- this._data = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "method", {get:function() {
- return this._method;
- }, set:function(a) {
- a = m(a);
- "get" !== a && "GET" !== a && "post" !== a && "POST" !== a && this.sec.throwError("ArgumentError", b.Errors.InvalidArgumentError);
- this._method = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "contentType", {get:function() {
- return this._contentType;
- }, set:function(a) {
- this._contentType = a = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "requestHeaders", {get:function() {
- return this.sec.createArrayUnsafe(this._requestHeaders);
- }, set:function(a) {
- this.sec.AXArray.axIsType(a) || this.sec.throwError("ArgumentError", b.Errors.InvalidArgumentError, "value");
- this._requestHeaders = a.value;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "digest", {get:function() {
- return this._digest;
- }, set:function(a) {
- this._digest = a = m(a);
- }, enumerable:!0, configurable:!0});
- a.prototype._toFileRequest = function() {
- var a = {};
- a.url = this._url;
- a.method = this._method;
- a.checkPolicyFile = this._checkPolicyFile;
- var b = this._data;
- if (b) {
- if (a.mimeType = this._contentType, this.sec.flash.utils.ByteArray.axClass.axIsType(b)) {
- a.data = new Uint8Array(b._buffer, 0, b.length);
- } else {
- if (b = b.toString(), "GET" === this._method) {
- var d = a.url.lastIndexOf("?");
- a.url = (0 > d ? a.url : a.url.substring(0, d)) + "?" + b;
- } else {
- a.data = b;
- }
- }
- }
- return a;
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.bindings = null;
- return a;
- }(h.ASObject);
- n.URLRequest = l;
- })(n.net || (n.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f) {
- void 0 === a && (a = "");
- void 0 === f && (f = "");
- b.call(this);
- this.name = m(a);
- this.value = m(f);
- }
- __extends(a, b);
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = ["name!", "value!"];
- return a;
- }(b.ASObject);
- n.URLRequestHeader = l;
- })(n.net || (n.net = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.FileLoadingService, a = function(a) {
- function f() {
- a.call(this);
- this._buffer = new this.sec.flash.utils.ByteArray;
- this._writePosition = 0;
- this._connected = !1;
- }
- __extends(f, a);
- Object.defineProperty(f.prototype, "connected", {get:function() {
- return this._connected;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "bytesAvailable", {get:function() {
- return this._buffer.length - this._buffer.position;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "objectEncoding", {get:function() {
- return this._buffer.objectEncoding;
- }, set:function(a) {
- this._buffer.objectEncoding = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "endian", {get:function() {
- return this._buffer.endian;
- }, set:function(a) {
- a = l(a);
- this._buffer.endian = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "diskCacheEnabled", {get:function() {
- m("public flash.net.URLStream::get diskCacheEnabled");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "position", {get:function() {
- return this._buffer.position;
- }, set:function(a) {
- this._buffer.position = +a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "length", {get:function() {
- return this._buffer.length;
- }, enumerable:!0, configurable:!0});
- f.prototype.load = function(a) {
- var b = h.events.Event, c = h.events.IOErrorEvent, f = h.events.ProgressEvent, g = h.events.HTTPStatusEvent, p = d.instance.createSession(), l = this, m = this.sec.flash.events;
- p.onprogress = function(a, b) {
- var c = l._buffer.position;
- l._buffer.position = l._writePosition;
- l._buffer.writeRawBytes(a);
- l._writePosition = l._buffer.position;
- l._buffer.position = c;
- l.dispatchEvent(new m.ProgressEvent(f.PROGRESS, !1, !1, b.bytesLoaded, b.bytesTotal));
- };
- p.onerror = function(a) {
- l._connected = !1;
- l.dispatchEvent(new m.IOErrorEvent(c.IO_ERROR, !1, !1, a));
- a = "string" === typeof a && 0 <= a.indexOf("XDOMAIN");
- e.Telemetry.instance.reportTelemetry({topic:"loadResource", resultType:a ? 5 : 4});
- };
- p.onopen = function() {
- l._connected = !0;
- l.dispatchEvent(new m.Event(b.OPEN, !1, !1));
- e.Telemetry.instance.reportTelemetry({topic:"loadResource", resultType:3});
- };
- p.onhttpstatus = function(a, b, c) {
- b = new m.HTTPStatusEvent(g.HTTP_STATUS, !1, !1, b);
- var d = [];
- c.split(/(?:\n|\r?\n)/g).forEach(function(b) {
- if (b = /^([^:]+): (.*)$/.exec(b)) {
- d.push(new l.sec.flash.net.URLRequestHeader(b[1], b[2])), "Location" === b[1] && (a = b[2]);
- }
- });
- c = l.sec.createArray(d);
- b.axSetPublicProperty("responseHeaders", c);
- b.axSetPublicProperty("responseURL", a);
- l.dispatchEvent(b);
- };
- p.onclose = function() {
- l._connected = !1;
- l.dispatchEvent(new m.Event(b.COMPLETE, !1, !1));
- };
- p.open(a._toFileRequest());
- this._session = p;
- };
- f.prototype.readBytes = function(a, c, d) {
- void 0 === c && (c = 0);
- void 0 === d && (d = 0);
- c >>>= 0;
- d >>>= 0;
- 0 > d && this.sec.throwError("ArgumentError", b.Errors.InvalidArgumentError, "length");
- this._buffer.readBytes(a, c, d);
- };
- f.prototype.readBoolean = function() {
- m("public flash.net.URLStream::readBoolean");
- };
- f.prototype.readByte = function() {
- return this._buffer.readByte();
- };
- f.prototype.readUnsignedByte = function() {
- m("public flash.net.URLStream::readUnsignedByte");
- };
- f.prototype.readShort = function() {
- m("public flash.net.URLStream::readShort");
- };
- f.prototype.readUnsignedShort = function() {
- return this._buffer.readUnsignedShort();
- };
- f.prototype.readUnsignedInt = function() {
- m("public flash.net.URLStream::readUnsignedInt");
- };
- f.prototype.readInt = function() {
- m("public flash.net.URLStream::readInt");
- };
- f.prototype.readFloat = function() {
- m("public flash.net.URLStream::readFloat");
- };
- f.prototype.readDouble = function() {
- m("public flash.net.URLStream::readDouble");
- };
- f.prototype.readMultiByte = function(a, b) {
- l(b);
- m("public flash.net.URLStream::readMultiByte");
- };
- f.prototype.readUTF = function() {
- return this._buffer.readUTF();
- };
- f.prototype.readUTFBytes = function(a) {
- return this._buffer.readUTFBytes(a);
- };
- f.prototype.close = function() {
- this._session && this._session.close();
- };
- f.prototype.readObject = function() {
- m("public flash.net.URLStream::readObject");
- };
- f.prototype.stop = function() {
- m("public flash.net.URLStream::stop");
- };
- f.classInitializer = null;
- f.classSymbols = null;
- f.instanceSymbols = null;
- return f;
- }(h.events.EventDispatcher);
- t.URLStream = a;
- })(h.net || (h.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = function(d) {
- function a(a) {
- void 0 === a && (a = null);
- d.call(this);
- this._ignoreDecodingErrors = !1;
- a && this.decode(a);
- }
- __extends(a, d);
- a.prototype.decode = function(a) {
- a = m(a);
- a = a.split("&");
- for (var d = 0;d < a.length;d++) {
- var k = a[d], h = k.indexOf("=");
- 0 > h && (this._ignoreDecodingErrors ? h = k.length : this.sec.throwError("Error", b.Errors.DecodeParamError));
- var e = unescape(k.substring(0, h).split("+").join(" ")), k = unescape(k.substring(h + 1).split("+").join(" ")), h = this.axGetPublicProperty(e);
- "undefined" === typeof h ? this.axSetPublicProperty(e, k) : Array.isArray(h) ? h.push(k) : this.axSetPublicProperty(e, [h, k]);
- }
- };
- a.prototype.toString = function() {
- for (var a = [], b = this.axGetEnumerableKeys(), d = 0;d < b.length;d++) {
- var h = b[d].split(" ").join("+"), e = this.axGetPublicProperty(h), h = escape(h).split(" ").join("+");
- if (Array.isArray(e)) {
- for (var l = 0;l < e.length;l++) {
- a.push(h + "=" + escape(e[l]));
- }
- } else {
- a.push(h + "=" + escape(e));
- }
- }
- return a.join("&");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(h.ASObject);
- n.URLVariables = l;
- })(n.net || (n.net = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "isSupported", {get:function() {
- m("public flash.sensors.Accelerometer::get isSupported");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "muted", {get:function() {
- m("public flash.sensors.Accelerometer::get muted");
- }, enumerable:!0, configurable:!0});
- a.prototype.setRequestedUpdateInterval = function(a) {
- m("public flash.sensors.Accelerometer::setRequestedUpdateInterval");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.Accelerometer = l;
- })(b.sensors || (b.sensors = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "isSupported", {get:function() {
- m("public flash.sensors.Geolocation::get isSupported");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "muted", {get:function() {
- m("public flash.sensors.Geolocation::get muted");
- }, enumerable:!0, configurable:!0});
- a.prototype.setRequestedUpdateInterval = function(a) {
- m("public flash.sensors.Geolocation::setRequestedUpdateInterval");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.Geolocation = l;
- })(b.sensors || (b.sensors = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.AVMX.AXApplicationDomain, a = function(a) {
- function f(b) {
- void 0 === b && (b = null);
- a.call(this);
- if (b instanceof d) {
- this.axDomain = b;
- } else {
- var f = null, f = this.sec.flash.system.ApplicationDomain.axIsType(b) ? b.axDomain : this.sec.application;
- this.axDomain = new d(this.sec, f);
- }
- }
- __extends(f, a);
- Object.defineProperty(f, "currentDomain", {get:function() {
- var a = b.getCurrentABC();
- return new this.sec.flash.system.ApplicationDomain(a ? a.env.app : this.sec.application);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f, "MIN_DOMAIN_MEMORY_LENGTH", {get:function() {
- m("public flash.system.ApplicationDomain::get MIN_DOMAIN_MEMORY_LENGTH");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "parentDomain", {get:function() {
- var a = b.getCurrentABC();
- return new this.sec.flash.system.ApplicationDomain((a ? a.env.app : this.sec.application).parent);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(f.prototype, "domainMemory", {get:function() {
- m("public flash.system.ApplicationDomain::get domainMemory");
- }, set:function(a) {
- m("public flash.system.ApplicationDomain::set domainMemory");
- }, enumerable:!0, configurable:!0});
- f.prototype.getDefinition = function(a) {
- var c = this.getDefinitionImpl(a);
- c || this.sec.throwError("ReferenceError", b.Errors.UndefinedVarError, a);
- return c;
- };
- f.prototype.hasDefinition = function(a) {
- return !!this.getDefinitionImpl(a);
- };
- f.prototype.getDefinitionImpl = function(a) {
- (a = l(a)) || this.sec.throwError("TypeError", b.Errors.NullPointerError, "definitionName");
- a = a.replace("::", ".");
- a = b.Multiname.FromFQNString(a, 0);
- return this.axDomain.getProperty(a, !1, !1);
- };
- f.prototype.getQualifiedDefinitionNames = function() {
- m("public flash.system.ApplicationDomain::getQualifiedDefinitionNames");
- };
- return f;
- }(h.ASObject);
- n.ApplicationDomain = a;
- })(n.system || (n.system = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.ObjectUtilities.toKeyValueArray, a = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "isEmbeddedInAcrobat", {get:function() {
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasEmbeddedVideo", {get:function() {
- m("public flash.system.Capabilities::get hasEmbeddedVideo");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasAudio", {get:function() {
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "avHardwareDisable", {get:function() {
- l("public flash.system.Capabilities::get avHardwareDisable");
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasAccessibility", {get:function() {
- l("public flash.system.Capabilities::get hasAccessibility");
- return b._hasAccessibility;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasAudioEncoder", {get:function() {
- l("public flash.system.Capabilities::get hasAudioEncoder");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasMP3", {get:function() {
- m("public flash.system.Capabilities::get hasMP3");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasPrinting", {get:function() {
- l("public flash.system.Capabilities::get hasPrinting");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasScreenBroadcast", {get:function() {
- l("public flash.system.Capabilities::get hasScreenBroadcast");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasScreenPlayback", {get:function() {
- l("public flash.system.Capabilities::get hasScreenPlayback");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasStreamingAudio", {get:function() {
- m("public flash.system.Capabilities::get hasStreamingAudio");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasStreamingVideo", {get:function() {
- m("public flash.system.Capabilities::get hasStreamingVideo");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasVideoEncoder", {get:function() {
- l("public flash.system.Capabilities::get hasVideoEncoder");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "isDebugger", {get:function() {
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "localFileReadDisable", {get:function() {
- m("public flash.system.Capabilities::get localFileReadDisable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "language", {get:function() {
- l("public flash.system.Capabilities::get language");
- return b._language;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "manufacturer", {get:function() {
- l("public flash.system.Capabilities::get manufacturer");
- return b._manufacturer;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "os", {get:function() {
- if (null === b._os) {
- var a;
- a = window.navigator.userAgent;
- 0 < a.indexOf("Macintosh") ? -1 === a.indexOf("Mac OS X ") ? a = "Mac OS 10.6" : (a = a.split("Mac OS X ")[1], a = a.substr(0, a.indexOf(";"))) : 0 < a.indexOf("Windows") ? a = "Windows XP" : 0 < a.indexOf("Linux") ? a = "Linux" : /(iPad|iPhone|iPod|Android)/.test(a) ? a = "iPhone3,1" : (l("public flash.system.Capabilities::get os"), a = "Generic OS");
- b._os = a;
- }
- return b._os;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "cpuArchitecture", {get:function() {
- l("public flash.system.Capabilities::get cpuArchitecture");
- return "x86";
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "playerType", {get:function() {
- return b._playerType;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "serverString", {get:function() {
- var a = d({OS:b.os}).map(function(a) {
- return a[0] + "=" + encodeURIComponent(a[1]);
- }).join("&");
- l("Capabilities.serverString: " + a);
- return a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "version", {get:function() {
- l("public flash.system.Capabilities::get version");
- return b._version;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "screenColor", {get:function() {
- return "color";
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "pixelAspectRatio", {get:function() {
- l("public flash.system.Capabilities::get pixelAspectRatio");
- return 1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "screenDPI", {get:function() {
- l("public flash.system.Capabilities::get screenDPI");
- return b._screenDPI;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "screenResolutionX", {get:function() {
- l("public flash.system.Capabilities::get screenResolutionX");
- return window.screen.width;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "screenResolutionY", {get:function() {
- l("public flash.system.Capabilities::get screenResolutionY");
- return window.screen.height;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "touchscreenType", {get:function() {
- return n.TouchscreenType.NONE;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasIME", {get:function() {
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "hasTLS", {get:function() {
- m("public flash.system.Capabilities::get hasTLS");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "maxLevelIDC", {get:function() {
- m("public flash.system.Capabilities::get maxLevelIDC");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "supports32BitProcesses", {get:function() {
- m("public flash.system.Capabilities::get supports32BitProcesses");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "supports64BitProcesses", {get:function() {
- m("public flash.system.Capabilities::get supports64BitProcesses");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "_internal", {get:function() {
- m("public flash.system.Capabilities::get _internal");
- }, enumerable:!0, configurable:!0});
- b.hasMultiChannelAudio = function(a) {
- l("public flash.system.Capabilities::static hasMultiChannelAudio");
- return !1;
- };
- b.classInitializer = null;
- b._hasAccessibility = !1;
- b._language = "en";
- b._manufacturer = "Mozilla Research";
- b._os = null;
- b._playerType = "PlugIn";
- b._version = "SHUMWAY 10,0,0,0";
- b._screenDPI = 96;
- return b;
- }(b.ASObject);
- n.Capabilities = a;
- })(n.system || (n.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(b) {
- var h = e.AVMX.axCoerceString;
- b.fscommand = function(b, d, a) {
- d = h(d);
- a = h(a);
- console.log("FSCommand: " + d + "; " + a);
- d = d.toLowerCase();
- if ("debugger" === d) {
- debugger;
- } else {
- b.player.executeFSCommand(d, a);
- }
- };
- })(b.system || (b.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.ON_DEMAND = "onDemand";
- d.ON_LOAD = "onLoad";
- return d;
- }(b.ASObject);
- e.ImageDecodingPolicy = n;
- })(e.system || (e.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(t) {
- var m = function(b) {
- function d(a, c, d) {
- void 0 === a && (a = !1);
- void 0 === c && (c = null);
- void 0 === d && (d = null);
- b.call(this);
- this.$BgcheckPolicyFile = !!a;
- this.$BgapplicationDomain = c;
- this.$BgsecurityDomain = d;
- this.$BgimageDecodingPolicy = e.system.ImageDecodingPolicy.ON_DEMAND;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "imageDecodingPolicy", {get:function() {
- return this.$BgimageDecodingPolicy;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "parameters", {get:function() {
- return this.$Bgparameters;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "requestedContentParent", {get:function() {
- return this.$BgrequestedContentParent;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "allowCodeImport", {get:function() {
- return this.$BgallowCodeImport;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "securityDomain", {get:function() {
- return this.$BgsecurityDomain;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "applicationDomain", {get:function() {
- return this.$BgapplicationDomain;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "checkPolicyFile", {get:function() {
- return this.$BgcheckPolicyFile;
- }, enumerable:!0, configurable:!0});
- d.classInitializer = null;
- d.instanceSymbols = "checkPolicyFile! applicationDomain! sec! allowCodeImport! requestedContentParent! parameters! imageDecodingPolicy!".split(" ");
- return d;
- }(b.ASObject);
- t.LoaderContext = m;
- })(e.system || (e.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var e = function(b) {
- function d(a, c, d, k) {
- void 0 === a && (a = 0);
- void 0 === c && (c = !1);
- void 0 === d && (d = null);
- void 0 === k && (k = null);
- b.call(this, c, d, k);
- this.deblockingFilter = +a;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.system.LoaderContext);
- h.JPEGLoaderContext = e;
- })(b.system || (b.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "messageAvailable", {get:function() {
- m("public flash.system.MessageChannel::get messageAvailable");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "state", {get:function() {
- m("public flash.system.MessageChannel::get state");
- }, enumerable:!0, configurable:!0});
- a.prototype.send = function(a, b) {
- m("public flash.system.MessageChannel::send");
- };
- a.prototype.receive = function(a) {
- m("public flash.system.MessageChannel::receive");
- };
- a.prototype.close = function() {
- m("public flash.system.MessageChannel::close");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.MessageChannel = l;
- })(b.system || (b.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.OPEN = "open";
- d.CLOSING = "closing";
- d.CLOSED = "closed";
- return d;
- }(b.ASObject);
- e.MessageChannelState = n;
- })(e.system || (e.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = e.Debug.somewhatImplemented, a = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "exactSettings", {get:function() {
- return b._exactSettings;
- }, set:function(a) {
- b._exactSettings = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "disableAVM1Loading", {get:function() {
- m("public flash.system.Security::get disableAVM1Loading");
- }, set:function(a) {
- m("public flash.system.Security::set disableAVM1Loading");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "sandboxType", {get:function() {
- d("public flash.system.Security::get sandboxType");
- return b._sandboxType;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "pageDomain", {get:function() {
- d("public flash.system.Security::get pageDomain");
- var a = e.FileLoadingService.instance.resolveUrl("/").split("/");
- a.pop();
- return a.pop();
- }, enumerable:!0, configurable:!0});
- b.allowDomain = function() {
- d('public flash.system.Security::static allowDomain ["' + Array.prototype.join.call(arguments, '", "') + '"]');
- for (var a = this.sec.player, b = 0;b < arguments.length;b++) {
- a.addToSWFLoadingWhitelist(l(arguments[b]) || "", !1, !1);
- }
- };
- b.allowInsecureDomain = function() {
- d("public flash.system.Security::static allowInsecureDomain");
- for (var a = this.sec.player, b = 0;b < arguments.length;b++) {
- a.addToSWFLoadingWhitelist(l(arguments[b]) || "", !0, !1);
- }
- };
- b.loadPolicyFile = function(a) {
- l(a);
- d("public flash.system.Security::static loadPolicyFile");
- };
- b.showSettings = function(a) {
- void 0 === a && (a = "default");
- l(a);
- m("public flash.system.Security::static showSettings");
- };
- b.duplicateSandboxBridgeInputArguments = function(a, b) {
- m("public flash.system.Security::static duplicateSandboxBridgeInputArguments");
- };
- b.duplicateSandboxBridgeOutputArgument = function(a, b) {
- m("public flash.system.Security::static duplicateSandboxBridgeOutputArgument");
- };
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- b.REMOTE = "remote";
- b.LOCAL_WITH_FILE = "localWithFile";
- b.LOCAL_WITH_NETWORK = "localWithNetwork";
- b.LOCAL_TRUSTED = "localTrusted";
- b.APPLICATION = "application";
- b._exactSettings = !1;
- b._sandboxType = "remote";
- return b;
- }(b.ASObject);
- n.Security = a;
- (function(a) {
- a[a.OwnDomain = 0] = "OwnDomain";
- a[a.Remote = 1] = "Remote";
- a[a.Failed = 2] = "Failed";
- })(n.CrossDomainSWFLoadingWhitelistResult || (n.CrossDomainSWFLoadingWhitelistResult = {}));
- })(n.system || (n.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(e) {
- (function(e) {
- var n = function(h) {
- function d() {
- h.call(this);
- this.sec.throwError("ArgumentError", b.Errors.CantInstantiateError, "SecurityDomain");
- }
- __extends(d, h);
- Object.defineProperty(d, "currentDomain", {get:function() {
- var a = b.getCurrentABC();
- return Object.create((a ? a.env.app.sec : this.sec).flash.system.SecurityDomain.axClass.tPrototype);
- }, enumerable:!0, configurable:!0});
- d.classInitializer = null;
- return d;
- }(h.ASObject);
- e.SecurityDomain = n;
- })(e.system || (e.system = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.DEFAULT = "default";
- d.PRIVACY = "privacy";
- d.LOCAL_STORAGE = "localStorage";
- d.MICROPHONE = "microphone";
- d.CAMERA = "camera";
- d.DISPLAY = "display";
- d.SETTINGS_MANAGER = "settingsManager";
- return d;
- }(b.ASObject);
- e.SecurityPanel = n;
- })(e.system || (e.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.FINGER = "finger";
- d.STYLUS = "stylus";
- d.NONE = "none";
- return d;
- }(b.ASObject);
- e.TouchscreenType = n;
- })(e.system || (e.system = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 1:
- return d.NORMAL;
- case 2:
- return d.ADVANCED;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NORMAL:
- return 1;
- case d.ADVANCED:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NORMAL = "normal";
- d.ADVANCED = "advanced";
- return d;
- }(b.ASObject);
- e.AntiAliasType = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.REGULAR = "regular";
- d.BOLD = "bold";
- d.ITALIC = "italic";
- d.BOLD_ITALIC = "boldItalic";
- return d;
- }(b.ASObject);
- e.FontStyle = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.EMBEDDED = "embedded";
- d.EMBEDDED_CFF = "embeddedCFF";
- d.DEVICE = "device";
- return d;
- }(b.ASObject);
- e.FontType = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- var m = e.Debug.somewhatImplemented, l = e.AVMX.axCoerceString, d = n.text.FontStyle, a = n.text.FontType, c = function(b) {
- function c() {
- b.call(this);
- this._symbol || this._initializeFields();
- }
- __extends(c, b);
- c.prototype._initializeFields = function() {
- this._fontType = this._fontStyle = this._fontFamily = this._fontName = null;
- this.leading = this.descent = this.ascent = 0;
- this.advances = null;
- this._id = n.display.DisplayObject.getNextSyncID();
- };
- c._getFontMetrics = function(a, b) {
- return this._deviceFontMetrics[a + b] || this._deviceFontMetrics[a];
- };
- c.resolveFontName = function(a) {
- return "_sans" === a ? this.DEFAULT_FONT_SANS : "_serif" === a ? this.DEFAULT_FONT_SERIF : "_typewriter" === a ? this.DEFAULT_FONT_TYPEWRITER : a;
- };
- c.prototype.applySymbol = function() {
- var b = this._symbol;
- this._initializeFields();
- this._id = b.syncId;
- this._fontName = b.name;
- var c = this.sec.flash.text.Font.axClass;
- this._fontFamily = c.resolveFontName(b.name);
- this._fontStyle = b.bold ? b.italic ? d.BOLD_ITALIC : d.BOLD : b.italic ? d.ITALIC : d.REGULAR;
- var f = b.metrics;
- f && (this.ascent = f.ascent, this.descent = f.descent, this.leading = f.leading, this.advances = f.advances);
- this._fontType = f ? a.EMBEDDED : a.DEVICE;
- f = {value:this, configurable:!0};
- Object.defineProperty(c._fontsBySymbolId, b.id + "", f);
- Object.defineProperty(c._fontsByName, b.name.toLowerCase() + this._fontStyle, f);
- this._fontType === a.EMBEDDED && Object.defineProperty(c._fontsByName, "swffont" + b.syncId + this._fontStyle, f);
- };
- c.getBySymbolId = function(a) {
- return this._fontsBySymbolId[a];
- };
- c.getByNameAndStyle = function(b, c) {
- for (var d, f, k = b.split(","), h = 0;h < k.length && !f;h++) {
- d = k[h].toLowerCase() + c, f = this._fontsByName[d];
- }
- f || (f = new this.sec.flash.text.Font, f._fontName = k[0], f._fontFamily = this.resolveFontName(k[0].toLowerCase()), f._fontStyle = c, f._fontType = a.DEVICE, this._fontsByName[d] = f);
- f._fontType === a.DEVICE && (d = this._getFontMetrics(f._fontName, f._fontStyle), d || (e.Debug.warning('Font metrics for "' + f._fontName + '" unknown. Fallback to default.'), d = this._getFontMetrics(this.DEFAULT_FONT_SANS, f._fontStyle), f._fontFamily = this.DEFAULT_FONT_SANS), f.ascent = d[0], f.descent = d[1], f.leading = d[2]);
- return f;
- };
- c.getDefaultFont = function() {
- return this.getByNameAndStyle(this.DEFAULT_FONT_SANS, d.REGULAR);
- };
- c.enumerateFonts = function(a) {
- m("public flash.text.Font::static enumerateFonts");
- return this.sec.createArrayUnsafe(this._fonts.slice());
- };
- c.registerFont = function(a) {
- m("Font.registerFont");
- };
- c.registerFontSymbol = function(a, b) {
- var c = this.sec.flash.display.DisplayObject.axClass.getNextSyncID(), d = a.name.toLowerCase() + a.style, f = {get:this.resolveFontSymbol.bind(this, b, a.id, c, d), configurable:!0};
- Object.defineProperty(this._fontsByName, d, f);
- Object.defineProperty(this._fontsByName, "swffont" + c + a.style, f);
- Object.defineProperty(this._fontsBySymbolId, a.id + "", f);
- };
- c.resolveFontSymbol = function(a, b, c, d) {
- a.getSymbolById(b).syncId = c;
- return this._fontsByName[d];
- };
- Object.defineProperty(c.prototype, "fontName", {get:function() {
- return this._fontName;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "fontStyle", {get:function() {
- return this._fontStyle;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "fontType", {get:function() {
- return this._fontType;
- }, enumerable:!0, configurable:!0});
- c.prototype.hasGlyphs = function(a) {
- l(a);
- m("Font#hasGlyphs");
- return !0;
- };
- c.DEFAULT_FONT_SANS = "Arial";
- c.DEFAULT_FONT_SERIF = "Times New Roman";
- c.DEFAULT_FONT_TYPEWRITER = "Courier New";
- c.classInitializer = function() {
- this._fonts = [];
- this._fontsBySymbolId = e.ObjectUtilities.createMap();
- this._fontsByName = e.ObjectUtilities.createMap();
- this.DEVICE_FONT_METRICS_BUILTIN = {_sans:[.9, .22, .08], _serif:[.88, .26, .08], _typewriter:[.86, .24, .08]};
- this.DEVICE_FONT_METRICS_WIN = {__proto__:this.DEVICE_FONT_METRICS_BUILTIN, 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]};
- this.DEVICE_FONT_METRICS_MAC = {__proto__:this.DEVICE_FONT_METRICS_BUILTIN, "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, .25, 0], "Athelas Italic":[.9167, .25, 0], "Athelas Regular":[.9167, .25, 0], "Avenir Black":[1, .3333, 0], "Avenir Black Oblique":[1, .3333, 0], "Avenir Book":[1, .3333, 0], "Avenir Book Oblique":[1, .3333, 0], "Avenir Heavy":[1, .3333, 0], "Avenir Heavy Oblique":[1, .3333, 0], "Avenir Light":[1, .3333, 0], "Avenir Light Oblique":[1, .3333, 0], "Avenir Medium":[1, .3333, 0], "Avenir Medium Oblique":[1, .3333, 0],
- "Avenir Next Bold":[1, .3333, 0], "Avenir Next Bold Italic":[1, .3333, 0], "Avenir Next Condensed Bold":[1, .3333, 0], "Avenir Next Condensed Bold Italic":[1, .3333, 0], "Avenir Next Condensed Demi Bold":[1, .3333, 0], "Avenir Next Condensed Demi Bold Italic":[1, .3333, 0], "Avenir Next Condensed Heavy":[1, .3333, 0], "Avenir Next Condensed Heavy Italic":[1, .3333, 0], "Avenir Next Condensed Italic":[1, .3333, 0], "Avenir Next Condensed Medium":[1, .3333, 0], "Avenir Next Condensed Medium Italic":[1,
- .3333, 0], "Avenir Next Condensed Regular":[1, .3333, 0], "Avenir Next Condensed Ultra Light":[1, .3333, 0], "Avenir Next Condensed Ultra Light Italic":[1, .3333, 0], "Avenir Next Demi Bold":[1, .3333, 0], "Avenir Next Demi Bold Italic":[1, .3333, 0], "Avenir Next Heavy":[1, .3333, 0], "Avenir Next Heavy Italic":[1, .3333, 0], "Avenir Next Italic":[1, .3333, 0], "Avenir Next Medium":[1, .3333, 0], "Avenir Next Medium Italic":[1, .3333, 0], "Avenir Next Regular":[1, .3333, 0], "Avenir Next Ultra Light":[1,
- .3333, 0], "Avenir Next Ultra Light Italic":[1, .3333, 0], "Avenir Oblique":[1, .3333, 0], "Avenir Roman":[1, .3333, 0], Ayuthaya:[1.0833, .3333, 0], "Baghdad Regular":[.9167, .4167, 0], "Bangla MN":[1.0833, .75, 0], "Bangla MN Bold":[1.0833, .75, 0], "Bangla Sangam MN":[.9167, .4167, 0], "Bangla Sangam MN Bold":[.9167, .4167, 0], "Baoli SC Regular":[1.0833, .3333, 0], Baskerville:[.9167, .25, 0], "Baskerville Bold":[.9167, .25, 0], "Baskerville Bold Italic":[.9167, .25, 0], "Baskerville Italic":[.9167,
- .25, 0], "Baskerville SemiBold":[.9167, .25, 0], "Baskerville SemiBold Italic":[.9167, .25, 0], "Beirut Regular":[.75, .25, 0], "Big Caslon Medium":[.9167, .25, 0], "Bodoni 72 Bold":[.9167, .25, 0], "Bodoni 72 Book":[.9167, .25, 0], "Bodoni 72 Book Italic":[.9167, .3333, 0], "Bodoni 72 Oldstyle Bold":[.9167, .25, 0], "Bodoni 72 Oldstyle Book":[.9167, .25, 0], "Bodoni 72 Oldstyle Book Italic":[.9167, .3333, 0], "Bodoni 72 Smallcaps Book":[.9167, .25, 0], "Bodoni Ornaments":[.8333, .1667,
- 0], "Bradley Hand Bold":[.8333, .4167, 0], "Brush Script MT Italic":[.9167, .3333, 0], Chalkboard:[1, .25, 0], "Chalkboard Bold":[1, .25, 0], "Chalkboard SE Bold":[1.1667, .25, 0], "Chalkboard SE Light":[1.1667, .25, 0], "Chalkboard SE Regular":[1.1667, .25, 0], Chalkduster:[1, .25, 0], "Charter Black":[1, .25, 0], "Charter Black Italic":[1, .25, 0], "Charter Bold":[1, .25, 0], "Charter Bold Italic":[1, .25, 0], "Charter Italic":[1, .25, 0], "Charter Roman":[1, .25, 0], Cochin:[.9167,
- .25, 0], "Cochin Bold":[.9167, .25, 0], "Cochin Bold Italic":[.9167, .25, 0], "Cochin Italic":[.9167, .25, 0], "Comic Sans MS":[1.0833, .25, 0], "Comic Sans MS Bold":[1.0833, .25, 0], Copperplate:[.75, .25, 0], "Copperplate Bold":[.75, .25, 0], "Copperplate Light":[.75, .25, 0], "Corsiva Hebrew":[.6667, .3333, 0], "Corsiva Hebrew Bold":[.6667, .3333, 0], Courier:[.75, .25, 0], "Courier Bold":[.75, .25, 0], "Courier Bold Oblique":[.75, .25, 0], "Courier New":[.8333, .3333, 0], "Courier New Bold":[.8333,
- .3333, 0], "Courier New Bold Italic":[.8333, .3333, 0], "Courier New Italic":[.8333, .3333, 0], "Courier Oblique":[.75, .25, 0], "Damascus Bold":[.5833, .4167, 0], "Damascus Light":[.5833, .4167, 0], "Damascus Medium":[.5833, .4167, 0], "Damascus Regular":[.5833, .4167, 0], "Damascus Semi Bold":[.5833, .4167, 0], "DecoType Naskh Regular":[1.1667, .6667, 0], "Devanagari MT":[.9167, .6667, 0], "Devanagari MT Bold":[.9167, .6667, 0], "Devanagari Sangam MN":[.9167, .4167, 0], "Devanagari Sangam MN Bold":[.9167,
- .4167, 0], Didot:[.9167, .3333, 0], "Didot Bold":[1, .3333, 0], "Didot Italic":[.9167, .25, 0], "DIN Alternate Bold":[.9167, .25, 0], "DIN Condensed Bold":[.75, .25, 0], "Diwan Kufi Regular":[1.4167, .5, 0], "Diwan Thuluth Regular":[1, .6667, 0], "Euphemia UCAS":[1.0833, .25, 0], "Euphemia UCAS Bold":[1.0833, .25, 0], "Euphemia UCAS Italic":[1.0833, .25, 0], "Farah Regular":[.75, .25, 0], "Farisi Regular":[1.0833, 1, 0], "Futura Condensed ExtraBold":[1, .25, 0], "Futura Condensed Medium":[1,
- .25, 0], "Futura Medium":[1, .25, 0], "Futura Medium Italic":[1, .25, 0], "GB18030 Bitmap":[1.1667, .1667, 0], "Geeza Pro Bold":[.9167, .3333, 0], "Geeza Pro Regular":[.9167, .3333, 0], Geneva:[1, .25, 0], Georgia:[.9167, .25, 0], "Georgia Bold":[.9167, .25, 0], "Georgia Bold Italic":[.9167, .25, 0], "Georgia Italic":[.9167, .25, 0], "Gill Sans":[.9167, .25, 0], "Gill Sans Bold":[.9167, .25, 0], "Gill Sans Bold Italic":[.9167, .25, 0], "Gill Sans Italic":[.9167, .25, 0], "Gill Sans Light":[.9167,
- .25, 0], "Gill Sans Light Italic":[.9167, .25, 0], "Gill Sans SemiBold":[.9167, .25, 0], "Gill Sans SemiBold Italic":[.9167, .25, 0], "Gill Sans UltraBold":[1, .25, 0], "Gujarati MT":[.9167, .6667, 0], "Gujarati MT Bold":[.9167, .6667, 0], "Gujarati Sangam MN":[.8333, .4167, 0], "Gujarati Sangam MN Bold":[.8333, .4167, 0], "GungSeo Regular":[.8333, .25, 0], "Gurmukhi MN":[.9167, .25, 0], "Gurmukhi MN Bold":[.9167, .25, 0], "Gurmukhi MT":[.8333, .4167, 0], "Gurmukhi Sangam MN":[.9167,
- .3333, 0], "Gurmukhi Sangam MN Bold":[.9167, .3333, 0], "Hannotate SC Bold":[1.0833, .3333, 0], "Hannotate SC Regular":[1.0833, .3333, 0], "Hannotate TC Bold":[1.0833, .3333, 0], "Hannotate TC Regular":[1.0833, .3333, 0], "HanziPen SC Bold":[1.0833, .3333, 0], "HanziPen SC Regular":[1.0833, .3333, 0], "HanziPen TC Bold":[1.0833, .3333, 0], "HanziPen TC Regular":[1.0833, .3333, 0], "HeadLineA Regular":[.8333, .1667, 0], "Heiti SC Light":[.8333, .1667, 0], "Heiti SC Medium":[.8333, .1667,
- 0], "Heiti TC Light":[.8333, .1667, 0], "Heiti TC Medium":[.8333, .1667, 0], Helvetica:[.75, .25, 0], "Helvetica Bold":[.75, .25, 0], "Helvetica Bold Oblique":[.75, .25, 0], "Helvetica Light":[.75, .25, 0], "Helvetica Light Oblique":[.75, .25, 0], "Helvetica Neue":[.9167, .25, 0], "Helvetica Neue Bold":[1, .25, 0], "Helvetica Neue Bold Italic":[1, .25, 0], "Helvetica Neue Condensed Black":[1, .25, 0], "Helvetica Neue Condensed Bold":[1, .25, 0], "Helvetica Neue Italic":[.9167, .25,
- 0], "Helvetica Neue Light":[1, .25, 0], "Helvetica Neue Light Italic":[.9167, .25, 0], "Helvetica Neue Medium":[1, .25, 0], "Helvetica Neue Medium Italic":[1, .25, 0], "Helvetica Neue Thin":[1, .25, 0], "Helvetica Neue Thin Italic":[1, .25, 0], "Helvetica Neue UltraLight":[.9167, .25, 0], "Helvetica Neue UltraLight Italic":[.9167, .25, 0], "Helvetica Oblique":[.75, .25, 0], Herculanum:[.8333, .1667, 0], "Hiragino Kaku Gothic Pro W3":[.9167, .0833, 0], "Hiragino Kaku Gothic Pro W6":[.9167,
- .0833, 0], "Hiragino Kaku Gothic ProN W3":[.9167, .0833, 0], "Hiragino Kaku Gothic ProN W6":[.9167, .0833, 0], "Hiragino Kaku Gothic Std W8":[.9167, .0833, 0], "Hiragino Kaku Gothic StdN W8":[.9167, .0833, 0], "Hiragino Maru Gothic Pro W4":[.9167, .0833, 0], "Hiragino Maru Gothic ProN W4":[.9167, .0833, 0], "Hiragino Mincho Pro W3":[.9167, .0833, 0], "Hiragino Mincho Pro W6":[.9167, .0833, 0], "Hiragino Mincho ProN W3":[.9167, .0833, 0], "Hiragino Mincho ProN W6":[.9167, .0833, 0],
- "Hiragino Sans GB W3":[.9167, .0833, 0], "Hiragino Sans GB W6":[.9167, .0833, 0], "Hoefler Text":[.75, .25, 0], "Hoefler Text Black":[.75, .25, 0], "Hoefler Text Black Italic":[.75, .25, 0], "Hoefler Text Italic":[.75, .25, 0], "Hoefler Text Ornaments":[.8333, .1667, 0], Impact:[1, .25, 0], InaiMathi:[.8333, .4167, 0], "Iowan Old Style Black":[1, .3333, 0], "Iowan Old Style Black Italic":[1, .3333, 0], "Iowan Old Style Bold":[1, .3333, 0], "Iowan Old Style Bold Italic":[1, .3333, 0],
- "Iowan Old Style Italic":[1, .3333, 0], "Iowan Old Style Roman":[1, .3333, 0], "Iowan Old Style Titling":[1, .3333, 0], "ITF Devanagari Bold":[1.0833, .3333, 0], "ITF Devanagari Book":[1.0833, .3333, 0], "ITF Devanagari Demi":[1.0833, .3333, 0], "ITF Devanagari Light":[1.0833, .3333, 0], "ITF Devanagari Medium":[1.0833, .3333, 0], "Kailasa Regular":[1.0833, .5833, 0], "Kaiti SC Black":[1.0833, .3333, 0], "Kaiti SC Bold":[1.0833, .3333, 0], "Kaiti SC Regular":[1.0833, .3333, 0], "Kaiti TC Bold":[1.0833,
- .3333, 0], "Kaiti TC Regular":[1.0833, .3333, 0], "Kannada MN":[.9167, .25, 0], "Kannada MN Bold":[.9167, .25, 0], "Kannada Sangam MN":[1, .5833, 0], "Kannada Sangam MN Bold":[1, .5833, 0], "Kefa Bold":[.9167, .25, 0], "Kefa Regular":[.9167, .25, 0], "Khmer MN":[1, .8333, 0], "Khmer MN Bold":[1, .8333, 0], "Khmer Sangam MN":[1.0833, .8333, 0], "Kohinoor Devanagari Bold":[1.0833, .3333, 0], "Kohinoor Devanagari Book":[1.0833, .3333, 0], "Kohinoor Devanagari Demi":[1.0833, .3333, 0],
- "Kohinoor Devanagari Light":[1.0833, .3333, 0], "Kohinoor Devanagari Medium":[1.0833, .3333, 0], "Kokonor Regular":[1.0833, .5833, 0], Krungthep:[1, .25, 0], "KufiStandardGK Regular":[.9167, .5, 0], "Lantinghei SC Demibold":[1, .3333, 0], "Lantinghei SC Extralight":[1, .3333, 0], "Lantinghei SC Heavy":[1, .3333, 0], "Lantinghei TC Demibold":[1, .3333, 0], "Lantinghei TC Extralight":[1, .3333, 0], "Lantinghei TC Heavy":[1, .3333, 0], "Lao MN":[.9167, .4167, 0], "Lao MN Bold":[.9167,
- .4167, 0], "Lao Sangam MN":[1, .3333, 0], "Libian SC Regular":[1.0833, .3333, 0], "LiHei Pro":[.8333, .1667, 0], "LiSong Pro":[.8333, .1667, 0], "Lucida Grande":[1, .25, 0], "Lucida Grande Bold":[1, .25, 0], Luminari:[1, .3333, 0], "Malayalam MN":[1, .4167, 0], "Malayalam MN Bold":[1, .4167, 0], "Malayalam Sangam MN":[.8333, .4167, 0], "Malayalam Sangam MN Bold":[.8333, .4167, 0], "Marion Bold":[.6667, .3333, 0], "Marion Italic":[.6667, .3333, 0], "Marion Regular":[.6667, .3333, 0],
- "Marker Felt Thin":[.8333, .25, 0], "Marker Felt Wide":[.9167, .25, 0], "Menlo Bold":[.9167, .25, 0], "Menlo Bold Italic":[.9167, .25, 0], "Menlo Italic":[.9167, .25, 0], "Menlo Regular":[.9167, .25, 0], "Microsoft Sans Serif":[.9167, .25, 0], "Mishafi Gold Regular":[.75, .6667, 0], "Mishafi Regular":[.75, .6667, 0], Monaco:[1, .25, 0], Mshtakan:[.9167, .25, 0], "Mshtakan Bold":[.9167, .25, 0], "Mshtakan BoldOblique":[.9167, .25, 0], "Mshtakan Oblique":[.9167, .25, 0], "Muna Black":[.75,
- .3333, 0], "Muna Bold":[.75, .3333, 0], "Muna Regular":[.75, .3333, 0], "Myanmar MN":[1, .4167, 0], "Myanmar MN Bold":[1, .4167, 0], "Myanmar Sangam MN":[.9167, .4167, 0], "Nadeem Regular":[.9167, .4167, 0], "Nanum Brush Script":[.9167, .25, 0], "Nanum Pen Script":[.9167, .25, 0], NanumGothic:[.9167, .25, 0], "NanumGothic Bold":[.9167, .25, 0], "NanumGothic ExtraBold":[.9167, .25, 0], NanumMyeongjo:[.9167, .25, 0], "NanumMyeongjo Bold":[.9167, .25, 0], "NanumMyeongjo ExtraBold":[.9167,
- .25, 0], "New Peninim MT":[.75, .3333, 0], "New Peninim MT Bold":[.75, .3333, 0], "New Peninim MT Bold Inclined":[.75, .3333, 0], "New Peninim MT Inclined":[.75, .3333, 0], "Noteworthy Bold":[1.25, .3333, 0], "Noteworthy Light":[1.25, .3333, 0], "Optima Bold":[.9167, .25, 0], "Optima Bold Italic":[.9167, .25, 0], "Optima ExtraBlack":[1, .25, 0], "Optima Italic":[.9167, .25, 0], "Optima Regular":[.9167, .25, 0], "Oriya MN":[.9167, .25, 0], "Oriya MN Bold":[.9167, .25, 0], "Oriya Sangam MN":[.8333,
- .4167, 0], "Oriya Sangam MN Bold":[.8333, .4167, 0], Osaka:[1, .25, 0], "Osaka-Mono":[.8333, .1667, 0], Palatino:[.8333, .25, 0], "Palatino Bold":[.8333, .25, 0], "Palatino Bold Italic":[.8333, .25, 0], "Palatino Italic":[.8333, .25, 0], Papyrus:[.9167, .5833, 0], "Papyrus Condensed":[.9167, .5833, 0], "PCMyungjo Regular":[.8333, .25, 0], "Phosphate Inline":[.9167, .25, 0], "Phosphate Solid":[.9167, .25, 0], "PilGi Regular":[.8333, .25, 0], "Plantagenet Cherokee":[.6667, .25, 0], "PT Mono":[.9167,
- .25, 0], "PT Mono Bold":[.9167, .25, 0], "PT Sans":[.9167, .25, 0], "PT Sans Bold":[.9167, .25, 0], "PT Sans Bold Italic":[.9167, .25, 0], "PT Sans Caption":[.9167, .25, 0], "PT Sans Caption Bold":[.9167, .25, 0], "PT Sans Italic":[.9167, .25, 0], "PT Sans Narrow":[.9167, .25, 0], "PT Sans Narrow Bold":[.9167, .25, 0], "PT Serif":[1, .25, 0], "PT Serif Bold":[1, .25, 0], "PT Serif Bold Italic":[1, .25, 0], "PT Serif Caption":[1, .25, 0], "PT Serif Caption Italic":[1, .25, 0], "PT Serif Italic":[1,
- .25, 0], Raanana:[.75, .25, 0], "Raanana Bold":[.75, .25, 0], "Sana Regular":[.75, .25, 0], Sathu:[.9167, .3333, 0], "Savoye LET Plain CC.:1.0":[1.0833, .75, 0], "Savoye LET Plain:1.0":[.6667, .5, 0], Seravek:[.9167, .3333, 0], "Seravek Bold":[.9167, .3333, 0], "Seravek Bold Italic":[.9167, .3333, 0], "Seravek ExtraLight":[.9167, .3333, 0], "Seravek ExtraLight Italic":[.9167, .3333, 0], "Seravek Italic":[.9167, .3333, 0], "Seravek Light":[.9167, .3333, 0], "Seravek Light Italic":[.9167,
- .3333, 0], "Seravek Medium":[.9167, .3333, 0], "Seravek Medium Italic":[.9167, .3333, 0], "Shree Devanagari 714":[.9167, .4167, 0], "Shree Devanagari 714 Bold":[.9167, .4167, 0], "Shree Devanagari 714 Bold Italic":[.9167, .4167, 0], "Shree Devanagari 714 Italic":[.9167, .4167, 0], "SignPainter-HouseScript":[.6667, .1667, 0], Silom:[1, .3333, 0], "Sinhala MN":[.9167, .25, 0], "Sinhala MN Bold":[.9167, .25, 0], "Sinhala Sangam MN":[1.1667, .3333, 0], "Sinhala Sangam MN Bold":[1.1667,
- .3333, 0], "Skia Black":[.75, .25, 0], "Skia Black Condensed":[.75, .25, 0], "Skia Black Extended":[.75, .25, 0], "Skia Bold":[.75, .25, 0], "Skia Condensed":[.75, .25, 0], "Skia Extended":[.75, .25, 0], "Skia Light":[.75, .25, 0], "Skia Light Condensed":[.75, .25, 0], "Skia Light Extended":[.75, .25, 0], "Skia Regular":[.75, .25, 0], "Snell Roundhand":[.9167, .3333, 0], "Snell Roundhand Black":[.9167, .3333, 0], "Snell Roundhand Bold":[.9167, .3333, 0], "Songti SC Black":[1.0833, .3333,
- 0], "Songti SC Bold":[1.0833, .3333, 0], "Songti SC Light":[1.0833, .3333, 0], "Songti SC Regular":[1.0833, .3333, 0], "Songti TC Bold":[1.0833, .3333, 0], "Songti TC Light":[1.0833, .3333, 0], "Songti TC Regular":[1.0833, .3333, 0], STFangsong:[.8333, .1667, 0], STHeiti:[.8333, .1667, 0], "STIXGeneral-Bold":[1.0833, .4167, 0], "STIXGeneral-BoldItalic":[1.0833, .4167, 0], "STIXGeneral-Italic":[1.0833, .4167, 0], "STIXGeneral-Regular":[1.0833, .4167, 0], "STIXIntegralsD-Bold":[2.1667,
- .4167, 0], "STIXIntegralsD-Regular":[2.1667, .4167, 0], "STIXIntegralsSm-Bold":[1.0833, .4167, 0], "STIXIntegralsSm-Regular":[1.0833, .4167, 0], "STIXIntegralsUp-Bold":[1.0833, .4167, 0], "STIXIntegralsUp-Regular":[1.0833, .4167, 0], "STIXIntegralsUpD-Bold":[2.1667, .4167, 0], "STIXIntegralsUpD-Regular":[2.1667, .4167, 0], "STIXIntegralsUpSm-Bold":[1.0833, .4167, 0], "STIXIntegralsUpSm-Regular":[1.0833, .4167, 0], "STIXNonUnicode-Bold":[1.4167, .5833, 0], "STIXNonUnicode-BoldItalic":[1.4167,
- .5833, 0], "STIXNonUnicode-Italic":[1.4167, .5833, 0], "STIXNonUnicode-Regular":[1.4167, .5833, 0], "STIXSizeFiveSym-Regular":[1, .4167, 0], "STIXSizeFourSym-Bold":[2.5833, .5, 0], "STIXSizeFourSym-Regular":[2.5833, .5, 0], "STIXSizeOneSym-Bold":[1.5833, .3333, 0], "STIXSizeOneSym-Regular":[1.5833, .3333, 0], "STIXSizeThreeSym-Bold":[2.5833, .5, 0], "STIXSizeThreeSym-Regular":[2.5833, .5, 0], "STIXSizeTwoSym-Bold":[2.0833, .4167, 0], "STIXSizeTwoSym-Regular":[2.0833, .4167, 0], "STIXVariants-Bold":[1.0833,
- .4167, 0], "STIXVariants-Regular":[1.0833, .4167, 0], STKaiti:[.8333, .1667, 0], STSong:[.8333, .1667, 0], STXihei:[.8333, .1667, 0], "Sukhumvit Set Bold":[1.0833, .5, 0], "Sukhumvit Set Light":[1.0833, .5, 0], "Sukhumvit Set Medium":[1.0833, .5, 0], "Sukhumvit Set Semi Bold":[1.0833, .5, 0], "Sukhumvit Set Text":[1.0833, .5, 0], "Sukhumvit Set Thin":[1.0833, .5, 0], "Superclarendon Black":[1, .25, 0], "Superclarendon Black Italic":[1, .25, 0], "Superclarendon Bold":[1, .25, 0], "Superclarendon Bold Italic":[1,
- .25, 0], "Superclarendon Italic":[1, .25, 0], "Superclarendon Light":[1, .25, 0], "Superclarendon Light Italic":[1, .25, 0], "Superclarendon Regular":[1, .25, 0], Symbol:[.6667, .3333, 0], "System Font Bold":[1, .25, 0], "System Font Bold Italic":[1, .25, 0], "System Font Heavy":[1, .25, 0], "System Font Italic":[1, .25, 0], "System Font Light":[1, .25, 0], "System Font Medium Italic P4":[1, .25, 0], "System Font Medium P4":[1, .25, 0], "System Font Regular":[1, .25, 0], "System Font Thin":[1,
- .25, 0], "System Font UltraLight":[1, .25, 0], Tahoma:[1, .1667, 0], "Tahoma Negreta":[1, .1667, 0], "Tamil MN":[.9167, .25, 0], "Tamil MN Bold":[.9167, .25, 0], "Tamil Sangam MN":[.75, .25, 0], "Tamil Sangam MN Bold":[.75, .25, 0], "Telugu MN":[.9167, .25, 0], "Telugu MN Bold":[.9167, .25, 0], "Telugu Sangam MN":[1, .5833, 0], "Telugu Sangam MN Bold":[1, .5833, 0], Thonburi:[1.0833, .25, 0], "Thonburi Bold":[1.0833, .25, 0], "Thonburi Light":[1.0833, .25, 0], "Times Bold":[.75, .25,
- 0], "Times Bold Italic":[.75, .25, 0], "Times Italic":[.75, .25, 0], "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]};
- this.DEVICE_FONT_METRICS_LINUX = {__proto__:this.DEVICE_FONT_METRICS_BUILTIN, 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]};
- var a = self.navigator.userAgent;
- -1 < a.indexOf("Windows") ? this._deviceFontMetrics = this.DEVICE_FONT_METRICS_WIN : /(Macintosh|iPad|iPhone|iPod|Android)/.test(a) ? (this._deviceFontMetrics = this.DEVICE_FONT_METRICS_MAC, this.DEFAULT_FONT_SANS = "Helvetica", this.DEFAULT_FONT_SERIF = "Times Roman", this.DEFAULT_FONT_TYPEWRITER = "Courier") : (this._deviceFontMetrics = this.DEVICE_FONT_METRICS_LINUX, this.DEFAULT_FONT_SANS = "Sans", this.DEFAULT_FONT_SERIF = "Times", this.DEFAULT_FONT_TYPEWRITER = "Monospace");
- var a = this._deviceFontMetrics, b;
- for (b in a) {
- a[b.toLowerCase()] = a[b];
- }
- };
- c.classSymbols = null;
- c.instanceSymbols = null;
- return c;
- }(b.ASObject);
- t.Font = c;
- c = function(a) {
- function b(c, d) {
- a.call(this, c, d.flash.text.Font.axClass);
- }
- __extends(b, a);
- b.FromData = function(a, c) {
- var d = new b(a, c.sec);
- d.ready = !a.metrics;
- d.name = a.name;
- d.data = {id:a.id};
- d.bold = a.bold;
- d.italic = a.italic;
- d.originalSize = a.originalSize;
- d.codes = a.codes;
- d.metrics = a.metrics;
- d.syncId = n.display.DisplayObject.getNextSyncID();
- return d;
- };
- Object.defineProperty(b.prototype, "resolveAssetCallback", {get:function() {
- return this._unboundResolveAssetCallback.bind(this);
- }, enumerable:!0, configurable:!0});
- b.prototype._unboundResolveAssetCallback = function(a) {
- this.ready = !0;
- };
- return b;
- }(e.Timeline.Symbol);
- t.FontSymbol = c;
- })(n.text || (n.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.NONE;
- case 1:
- return d.PIXEL;
- case 2:
- return d.SUBPIXEL;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NONE:
- return 0;
- case d.PIXEL:
- return 1;
- case d.SUBPIXEL:
- return 2;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NONE = "none";
- d.PIXEL = "pixel";
- d.SUBPIXEL = "subpixel";
- return d;
- }(b.ASObject);
- e.GridFitType = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(e) {
- var h = function(b) {
- function d() {
- b.call(this);
- this._fieldsInitialized || this._initializeFields();
- }
- __extends(d, b);
- d.prototype.applySymbol = function() {
- this._initializeFields();
- this._setStaticContentFromSymbol(this._symbol);
- };
- d.prototype._canHaveTextContent = function() {
- return !0;
- };
- d.prototype._getTextContent = function() {
- return this._textContent;
- };
- Object.defineProperty(d.prototype, "text", {get:function() {
- return this._textContent.plainText;
- }, enumerable:!0, configurable:!0});
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.display.DisplayObject);
- e.StaticText = h;
- })(b.text || (b.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(t) {
- function m(a, b, d) {
- for (;b < d;) {
- switch(a[b]) {
- case " ":
- ;
- case "\n":
- ;
- case "\r":
- ;
- case "\t":
- b++;
- break;
- default:
- return b;
- }
- }
- return d;
- }
- var l = e.AVMX.axCoerceString, d = function(a) {
- function c() {
- a.call(this);
- this.clear();
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "styleNames", {get:function() {
- var a = this._rules, b = [], c;
- for (c in a) {
- a[c] && b.push(c);
- }
- return this.sec.createArrayUnsafe(b);
- }, enumerable:!0, configurable:!0});
- c.prototype.getStyle = function(a) {
- a = l(a);
- return (a = this._rules[a.toLowerCase()]) ? b.transformJSValueToAS(this.sec, a, !1) : this.sec.createObject();
- };
- c.prototype.applyStyle = function(a, b) {
- b = l(b);
- var c = this._rules[b.toLowerCase()];
- c && a.transform(c);
- };
- c.prototype.setStyle = function(a, c) {
- "object" === typeof c && (a = l(a), this._rules[a.toLowerCase()] = b.transformASValueToJS(this.sec, c, !1));
- };
- c.prototype.hasStyle = function(a) {
- return !!this._rules[a.toLowerCase()];
- };
- c.prototype.clear = function() {
- this._rules = Object.create(null);
- };
- c.prototype.transform = function(a) {
- if ("object" !== typeof a) {
- return null;
- }
- a = b.transformASValueToJS(this.sec, a, !1);
- var c = new this.sec.flash.text.TextFormat;
- c.transform(a);
- return c;
- };
- c.prototype.parseCSS = function(a) {
- a = l(a) + "";
- for (var b = a.length, c = m(a, 0, b), d = {}, e = [], g = !1, h = "";c < b;) {
- var n = a[c++];
- switch(n) {
- case "{":
- g = !1;
- e.push(h);
- a: {
- var h = a, n = b, z = d, t = {}, E = "", A = !1, G = !1, c = m(h, c, n);
- b: for (;c < n;) {
- var w = h[c++];
- switch(w) {
- case "}":
- if (0 < E.length) {
- c = -1;
- break a;
- }
- break b;
- case ":":
- var y = "", C = E, E = "", G = A = !1;
- for (;c < n;) {
- switch(w = h[c], w) {
- case ";":
- ;
- case "\r":
- ;
- case "\n":
- c++, c = m(h, c, n);
- case "}":
- t[C] = y;
- continue b;
- default:
- c++, y += w;
- }
- }
- c = -1;
- break a;
- case "-":
- ":" === h[c] ? E += w : G = !0;
- break;
- case " ":
- ;
- case "\n":
- ;
- case "\r":
- ;
- case "\t":
- A = !0;
- E += w;
- G = !1;
- break;
- default:
- if (A) {
- c = -1;
- break a;
- }
- G && (w = w.toUpperCase(), G = !1);
- E += w;
- }
- }
- if ("}" !== h[c - 1]) {
- c = -1;
- } else {
- for (h = 0;h < e.length;h++) {
- z[e[h]] = t;
- }
- }
- }
- if (-1 === c) {
- return;
- }
- e = [];
- h = "";
- c = m(a, c, b);
- break;
- case ",":
- g = !1;
- e.push(h);
- h = "";
- c = m(a, c, b);
- break;
- case " ":
- ;
- case "\n":
- ;
- case "\r":
- ;
- case "\t":
- g = !0;
- c = m(a, c, b);
- break;
- default:
- if (g) {
- return;
- }
- h += n;
- }
- }
- a = this._rules;
- for (h in d) {
- a[h.toLowerCase()] = d[h];
- }
- };
- c.classInitializer = null;
- c.classSymbols = null;
- c.instanceSymbols = null;
- return c;
- }(n.events.EventDispatcher);
- t.StyleSheet = d;
- })(n.text || (n.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.LCD = "lcd";
- d.CRT = "crt";
- d.DEFAULT = "default";
- return d;
- }(b.ASObject);
- e.TextDisplayMode = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.warning, d = e.Debug.somewhatImplemented, a = e.AVMX.axCoerceString, c = e.NumberUtilities.clamp, f = function(f) {
- function k() {
- f.call(this);
- this._fieldsInitialized || this._initializeFields();
- this._symbol || this._setFillAndLineBoundsFromWidthAndHeight(2E3, 2E3);
- }
- __extends(k, f);
- k.prototype.applySymbol = function() {
- this._initializeFields();
- var a = this._symbol;
- this._setFillAndLineBoundsFromSymbol(a);
- var b = this._textContent.defaultTextFormat;
- b.color = a.color;
- b.size = a.size / 20 | 0;
- b.font = a.face;
- b.bold = a.bold;
- b.italic = a.italic;
- b.align = a.align;
- b.leftMargin = a.leftMargin / 20 | 0;
- b.rightMargin = a.rightMargin / 20 | 0;
- b.indent = a.indent / 20 | 0;
- b.leading = a.leading / 20 | 0;
- this._multiline = a.multiline;
- this._embedFonts = a.embedFonts;
- this._selectable = a.selectable;
- this._displayAsPassword = a.displayAsPassword;
- this._type = a.type;
- this._maxChars = a.maxChars;
- a.border && (this.border = this.background = !0);
- a.html ? this.htmlText = a.initialText : this.text = a.initialText;
- this.wordWrap = a.wordWrap;
- this.autoSize = a.autoSize;
- };
- k.prototype._initializeFields = function() {
- f.prototype._initializeFields.call(this);
- this._alwaysShowSelection = !1;
- this._antiAliasType = t.AntiAliasType.NORMAL;
- this._autoSize = t.TextFieldAutoSize.NONE;
- this._background = !1;
- this._backgroundColor = 4294967295;
- this._border = !1;
- this._borderColor = 255;
- this._bottomScrollV = 1;
- this._caretIndex = 0;
- this._embedFonts = this._condenseWhite = !1;
- this._gridFitType = t.GridFitType.PIXEL;
- this._htmlText = "";
- this._length = 0;
- this._textInteractionMode = t.TextInteractionMode.NORMAL;
- this._maxScrollH = this._maxChars = 0;
- this._maxScrollV = 1;
- this._multiline = this._mouseWheelEnabled = !1;
- this._numLines = 1;
- this._displayAsPassword = !1;
- this._restrict = null;
- this._selectable = !0;
- this._selectedText = "";
- this._sharpness = this._selectionEndIndex = this._selectionBeginIndex = 0;
- this._textColor = this._styleSheet = null;
- this._thickness = this._textWidth = this._textHeight = 0;
- this._type = t.TextFieldType.DYNAMIC;
- this._useRichTextClipboard = !1;
- this._lineMetricsData = null;
- var a = new this.sec.flash.text.TextFormat(this.sec.flash.text.Font.axClass.DEFAULT_FONT_SERIF, 12, 0, !1, !1, !1, "", "", t.TextFormatAlign.LEFT);
- a.letterSpacing = 0;
- a.kerning = 0;
- this._textContent = new e.TextContent(this.sec, a);
- };
- k.prototype._setFillAndLineBoundsFromSymbol = function(a) {
- f.prototype._setFillAndLineBoundsFromSymbol.call(this, a);
- this._textContent.bounds = this._lineBounds;
- this._invalidateContent();
- };
- k.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, b) {
- f.prototype._setFillAndLineBoundsFromWidthAndHeight.call(this, a, b);
- this._textContent.bounds = this._lineBounds;
- this._invalidateContent();
- };
- k.prototype._canHaveTextContent = function() {
- return !0;
- };
- k.prototype._getTextContent = function() {
- return this._textContent;
- };
- k.prototype._getContentBounds = function(a) {
- void 0 === a && (a = !0);
- this._ensureLineMetrics();
- return f.prototype._getContentBounds.call(this, a);
- };
- k.prototype._containsPointDirectly = function(a, b, c, d) {
- return !0;
- };
- k.prototype._invalidateContent = function() {
- this._textContent.flags & e.TextContentFlags.Dirty && this._setFlags(8388608);
- };
- k.isFontCompatible = function(b, c) {
- b = a(b);
- c = a(c);
- var d = t.Font.getByNameAndStyle(b, c);
- return d ? d.fontStyle === c : !1;
- };
- Object.defineProperty(k.prototype, "alwaysShowSelection", {get:function() {
- return this._alwaysShowSelection;
- }, set:function(a) {
- this._alwaysShowSelection = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "antiAliasType", {get:function() {
- return this._antiAliasType;
- }, set:function(c) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "antiAliasType");
- c = a(c);
- 0 > t.AntiAliasType.toNumber(c) && this.sec.throwError("ArgumentError", b.Errors.InvalidParamError, "antiAliasType");
- this._antiAliasType = c;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "autoSize", {get:function() {
- return this._autoSize;
- }, set:function(c) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "autoSize");
- c = a(c);
- c !== this._autoSize && (0 > t.TextFieldAutoSize.toNumber(c) && this.sec.throwError("ArgumentError", b.Errors.InvalidParamError, "autoSize"), this._autoSize = c, this._textContent.autoSize = t.TextFieldAutoSize.toNumber(c), this._invalidateContent(), this._ensureLineMetrics());
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.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(k.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(k.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(k.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(k.prototype, "bottomScrollV", {get:function() {
- return this._bottomScrollV;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "caretIndex", {get:function() {
- m("public flash.text.TextField::get caretIndex");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "condenseWhite", {get:function() {
- return this._condenseWhite;
- }, set:function(a) {
- this._condenseWhite = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "defaultTextFormat", {get:function() {
- return this._textContent.defaultTextFormat.clone();
- }, set:function(a) {
- e.isNullOrUndefined(a) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "format");
- var c = this._textContent.defaultTextFormat;
- c.merge(a);
- null === c.color ? c.color = this._textColor : this._textColor = +c.color;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "embedFonts", {get:function() {
- return this._embedFonts;
- }, set:function(a) {
- this._embedFonts = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "gridFitType", {get:function() {
- return this._gridFitType;
- }, set:function(c) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "gridFitType");
- this._gridFitType = c = a(c);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "htmlText", {get:function() {
- return this._htmlText;
- }, set:function(c) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "value");
- c = a(c);
- this._symbol && (this._textContent.defaultTextFormat.bold = !1, this._textContent.defaultTextFormat.italic = !1);
- this._textContent.parseHtml(c, this._styleSheet, this._multiline);
- this._htmlText = c;
- this._invalidateContent();
- this._ensureLineMetrics();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "length", {get:function() {
- return this._length;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "textInteractionMode", {get:function() {
- m("public flash.text.TextField::get textInteractionMode");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "maxChars", {get:function() {
- return this._maxChars;
- }, set:function(a) {
- this._maxChars = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "maxScrollH", {get:function() {
- this._ensureLineMetrics();
- return this._maxScrollH;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "maxScrollV", {get:function() {
- this._ensureLineMetrics();
- return this._maxScrollV;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "mouseWheelEnabled", {get:function() {
- return this._mouseWheelEnabled;
- }, set:function(a) {
- d("public flash.text.TextField::set mouseWheelEnabled");
- this._mouseWheelEnabled = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "multiline", {get:function() {
- return this._multiline;
- }, set:function(a) {
- this._multiline = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "numLines", {get:function() {
- return this._numLines;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "displayAsPassword", {get:function() {
- return this._displayAsPassword;
- }, set:function(a) {
- d("public flash.text.TextField::set displayAsPassword");
- this._displayAsPassword = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "restrict", {get:function() {
- return this._restrict;
- }, set:function(b) {
- d("public flash.text.TextField::set restrict");
- this._restrict = a(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "scrollH", {get:function() {
- return this._textContent.scrollH;
- }, set:function(a) {
- a |= 0;
- this._ensureLineMetrics();
- this._textContent.scrollH = c(Math.abs(a), 0, this._maxScrollH);
- this._invalidateContent();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "scrollV", {get:function() {
- return this._textContent.scrollV;
- }, set:function(a) {
- a |= 0;
- this._ensureLineMetrics();
- this._textContent.scrollV = c(a, 1, this._maxScrollV);
- this._invalidateContent();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "selectable", {get:function() {
- return this._selectable;
- }, set:function(a) {
- this._selectable = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "selectedText", {get:function() {
- return this._textContent.plainText.substring(this._selectionBeginIndex, this._selectionEndIndex);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "selectionBeginIndex", {get:function() {
- return this._selectionBeginIndex;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "selectionEndIndex", {get:function() {
- return this._selectionEndIndex;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "sharpness", {get:function() {
- return this._sharpness;
- }, set:function(a) {
- this._sharpness = c(+a, -400, 400);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "styleSheet", {get:function() {
- return this._styleSheet;
- }, set:function(a) {
- this._styleSheet = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "text", {get:function() {
- return this._textContent.plainText;
- }, set:function(c) {
- e.isNullOrUndefined(c) && this.sec.throwError("TypeError", b.Errors.NullPointerError, "value");
- c = a(c) || "";
- c !== this._textContent.plainText && (this._textContent.plainText = c, this._invalidateContent(), this._ensureLineMetrics());
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "textColor", {get:function() {
- return null === this._textColor ? +this._textContent.defaultTextFormat.color : this._textColor;
- }, set:function(a) {
- this._textColor = this._textContent.defaultTextFormat.color = a >>> 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "textHeight", {get:function() {
- this._ensureLineMetrics();
- return this._textHeight / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "textWidth", {get:function() {
- this._ensureLineMetrics();
- return this._textWidth / 20 | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "thickness", {get:function() {
- return this._thickness;
- }, set:function(a) {
- this._thickness = c(+a, -200, 200);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.prototype, "type", {get:function() {
- return this._type;
- }, set:function(b) {
- this._type = a(b);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(k.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(k.prototype, "useRichTextClipboard", {get:function() {
- m("public flash.text.TextField::get useRichTextClipboard");
- }, set:function(a) {
- m("public flash.text.TextField::set useRichTextClipboard");
- }, enumerable:!0, configurable:!0});
- k.prototype.copyRichText = function() {
- m("public flash.text.TextField::copyRichText");
- };
- k.prototype.pasteRichText = function(b) {
- a(b);
- m("public flash.text.TextField::pasteRichText");
- };
- k.prototype.getXMLText = function(a, b) {
- m("public flash.text.TextField::getXMLText");
- return "";
- };
- k.prototype.insertXMLText = function(b, c, d, f) {
- a(d);
- m("public flash.text.TextField::insertXMLText");
- };
- k.prototype._ensureLineMetrics = function() {
- if (this._hasFlags(8388608)) {
- var a = this.sec.player.syncDisplayObject(this, !1), b = a.readInt(), c = a.readInt(), d = a.readInt(), f = this._lineBounds;
- this._autoSize !== t.TextFieldAutoSize.NONE && (f.xMin = f.xMin = d, f.xMax = f.xMax = d + b + 80, f.yMax = f.yMax = f.yMin + c + 80);
- this._textWidth = b;
- this._textHeight = c;
- this._numLines = a.readInt();
- this._lineMetricsData = a;
- if (this._textHeight > f.height) {
- c = b = 1;
- a.position = 16;
- for (var k = d = 0;k < this._numLines;k++) {
- a.position += 8;
- var h = a.readInt(), e = a.readInt(), l = a.readInt(), h = h + e + l;
- d > f.height / 20 ? b++ : c++;
- d += h;
- }
- this._maxScrollV = b;
- this._bottomScrollV = c;
- }
- this._maxScrollH = this._textWidth > f.width ? (this._textWidth + 80 - f.width) / 20 | 0 : 0;
- }
- };
- k.prototype.appendText = function(b) {
- this._textContent.appendText(a(b));
- };
- k.prototype.getCharBoundaries = function(a) {
- a |= 0;
- d("public flash.text.TextField::getCharBoundaries");
- var b = this.textHeight, c = .75 * b;
- return new this.sec.flash.geom.Rectangle(a * c, 0, c, b);
- };
- k.prototype.getCharIndexAtPoint = function(a, b) {
- m("public flash.text.TextField::getCharIndexAtPoint");
- };
- k.prototype.getFirstCharInParagraph = function(a) {
- m("public flash.text.TextField::getFirstCharInParagraph");
- };
- k.prototype.getLineIndexAtPoint = function(a, b) {
- m("public flash.text.TextField::getLineIndexAtPoint");
- };
- k.prototype.getLineIndexOfChar = function(a) {
- m("public flash.text.TextField::getLineIndexOfChar");
- };
- k.prototype.getLineLength = function(a) {
- m("public flash.text.TextField::getLineLength");
- };
- k.prototype.getLineMetrics = function(a) {
- a |= 0;
- (0 > a || a > this._numLines - 1) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- this._ensureLineMetrics();
- var c = this._lineMetricsData;
- c.position = 16 + 20 * a;
- a = c.readInt() + this._lineBounds.xMin + 2;
- var d = c.readInt(), f = c.readInt(), k = c.readInt(), c = c.readInt();
- return new this.sec.flash.text.TextLineMetrics(a, d, f + k + c, f, k, c);
- };
- k.prototype.getLineOffset = function(a) {
- a |= 0;
- var c = this._textContent.plainText.split("\r");
- (0 > a || a >= c.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- for (var d = 0, f = 0;f < a;f++) {
- d += c[f].length + 1;
- }
- return d;
- };
- k.prototype.getLineText = function(a) {
- a |= 0;
- var c = this._textContent.plainText.split("\r");
- (0 > a || a >= c.length) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- return c[a];
- };
- k.prototype.getParagraphLength = function(a) {
- m("public flash.text.TextField::getParagraphLength");
- };
- k.prototype.getTextFormat = function(a, c) {
- void 0 === a && (a = -1);
- void 0 === c && (c = -1);
- a |= 0;
- c |= 0;
- var d = this._textContent.plainText.length;
- 0 > a ? (a = 0, 0 > c && (c = d)) : 0 > c && (c = a + 1);
- (c <= a || c > d) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- for (var f, d = this._textContent.textRuns, k = 0;k < d.length;k++) {
- var h = d[k];
- h.intersects(a, c) && (f ? f.intersect(h.textFormat) : f = h.textFormat.clone());
- }
- return f;
- };
- k.prototype.getTextRuns = function(a, b) {
- void 0 === a && (a = 0);
- void 0 === b && (b = 2147483647);
- for (var c = this._textContent.textRuns, d = [], f = 0;f < c.length;f++) {
- var k = c[f];
- k.beginIndex >= a && k.endIndex <= b && d.push(k.clone());
- }
- return this.sec.createArrayUnsafe(d);
- };
- k.prototype.getRawText = function() {
- m("public flash.text.TextField::getRawText");
- };
- k.prototype.replaceSelectedText = function(a) {
- this.replaceText(this._selectionBeginIndex, this._selectionEndIndex, "" + a);
- };
- k.prototype.replaceText = function(a, b, c) {
- a |= 0;
- b |= 0;
- 0 > a || 0 > b || (this._textContent.replaceText(a, b, "" + c), this._invalidateContent(), this._ensureLineMetrics());
- };
- k.prototype.setSelection = function(a, b) {
- this._selectionBeginIndex = a | 0;
- this._selectionEndIndex = b | 0;
- };
- k.prototype.setTextFormat = function(a, c, d) {
- void 0 === c && (c = -1);
- void 0 === d && (d = -1);
- c |= 0;
- d |= 0;
- var f = this._textContent.plainText, k = f.length;
- 0 > c ? (c = 0, 0 > d && (d = k)) : 0 > d && (d = c + 1);
- (c > k || d > k) && this.sec.throwError("RangeError", b.Errors.ParamRangeError);
- d <= c || (f = f.substring(c, d), this._textContent.replaceText(c, d, f, a), this._invalidateContent(), this._ensureLineMetrics());
- };
- k.prototype.getImageReference = function(a) {
- m("public flash.text.TextField::getImageReference");
- };
- k.classSymbols = null;
- k.instanceSymbols = null;
- k.classInitializer = null;
- return k;
- }(h.display.InteractiveObject);
- t.TextField = f;
- f = function(a) {
- function b(c, d) {
- a.call(this, c, d.flash.text.TextField.axClass, !0);
- this.size = this.color = 0;
- this.face = "";
- this.italic = this.bold = !1;
- this.align = h.text.TextFormatAlign.LEFT;
- this.leading = this.indent = this.rightMargin = this.leftMargin = 0;
- this.embedFonts = this.wordWrap = this.multiline = !1;
- this.selectable = !0;
- this.border = !1;
- this.initialText = "";
- this.displayAsPassword = this.html = !1;
- this.type = h.text.TextFieldType.DYNAMIC;
- this.maxChars = 0;
- this.autoSize = h.text.TextFieldAutoSize.NONE;
- this.textContent = this.variableName = null;
- }
- __extends(b, a);
- b.FromTextData = function(a, c) {
- var d = c.sec, f = new b(a, d);
- f._setBoundsFromData(a);
- var k = a.tag;
- if (a.static && (f.dynamic = !1, f.symbolClass = d.flash.text.StaticText.axClass, k.initialText)) {
- var r = new e.TextContent(d);
- r.bounds = f.lineBounds;
- r.parseHtml(k.initialText, null, !1);
- r.matrix = new d.flash.geom.Matrix;
- r.matrix.copyFromUntyped(a.matrix);
- r.coords = a.coords;
- f.textContent = r;
- }
- k.flags & 4 && (f.color = k.color >>> 8);
- k.flags & 1 && (f.size = k.fontHeight, (d = c.getSymbolById(k.fontId)) ? (f.face = k.flags & 256 ? d.name : "swffont" + d.syncId, f.bold = d.bold, f.italic = d.italic) : l("Font " + k.fontId + " is not defined."));
- k.flags & 8192 && (f.align = h.text.TextFormatAlign.fromNumber(k.align), f.leftMargin = k.leftMargin, f.rightMargin = k.rightMargin, f.indent = k.indent, f.leading = k.leading);
- f.multiline = !!(k.flags & 32);
- f.wordWrap = !!(k.flags & 64);
- f.embedFonts = !!(k.flags & 256);
- f.selectable = !(k.flags & 4096);
- f.border = !!(k.flags & 2048);
- k.flags & 128 && (f.initialText = k.initialText);
- f.html = !!(k.flags & 512);
- f.displayAsPassword = !!(k.flags & 16);
- f.type = k.flags & 8 ? h.text.TextFieldType.DYNAMIC : h.text.TextFieldType.INPUT;
- k.flags & 2 && (f.maxChars = k.maxLength);
- f.autoSize = k.flags & 16384 ? h.text.TextFieldAutoSize.LEFT : h.text.TextFieldAutoSize.NONE;
- f.variableName = k.variableName;
- return f;
- };
- b.FromLabelData = function(a, c) {
- for (var d = a.fillBounds, f = a.records, h = a.coords = [], l = "", r = 12, n = "Times Roman", m = !1, t = !1, y = 0, C = 0, x = 0, M, I = 0;I < f.length;I++) {
- var J = f[I];
- if (J.flags & 8) {
- var F = c.getSymbolById(J.fontId);
- F ? (M = F.codes, r = J.fontHeight, F.originalSize || (r /= 20), n = F.metrics ? "swffont" + F.syncId : F.name, m = F.bold, t = F.italic) : e.Debug.warning("Label " + a.id + "refers to undefined font symbol " + J.fontId);
- }
- J.flags & 4 && (y = J.color >>> 8);
- J.flags & 1 && (C = J.moveX, C < d.xMin && (d.xMin = C));
- J.flags & 2 && (x = J.moveY, x < d.yMin && (d.yMin = x));
- for (var F = "", J = J.entries, D = 0, H;H = J[D++];) {
- var K = String.fromCharCode(M[H.glyphIndex]), F = F + (k[K] || K);
- h.push(C, x);
- C += H.advance;
- }
- t && (F = "" + F + "");
- m && (F = "" + F + "");
- l += '' + F + "";
- }
- a.tag.initialText = l;
- return b.FromTextData(a, c);
- };
- return b;
- }(e.Timeline.DisplaySymbol);
- t.TextSymbol = f;
- var k = {"<":"<", ">":">", "&":"&"};
- })(h.text || (h.text = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.NONE;
- case 1:
- return d.CENTER;
- case 2:
- return d.LEFT;
- case 3:
- return d.RIGHT;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.NONE:
- return 0;
- case d.CENTER:
- return 1;
- case d.LEFT:
- return 2;
- case d.RIGHT:
- return 3;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NONE = "none";
- d.LEFT = "left";
- d.CENTER = "center";
- d.RIGHT = "right";
- return d;
- }(b.ASObject);
- e.TextFieldAutoSize = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.INPUT = "input";
- d.DYNAMIC = "dynamic";
- return d;
- }(b.ASObject);
- e.TextFieldType = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(n) {
- var m = e.AVMX.axCoerceString, l = e.NumberUtilities.roundHalfEven, d = function(a) {
- function c(b, c, d, e, h, g, p, l, m, B, E, A, G) {
- void 0 === b && (b = null);
- void 0 === c && (c = null);
- void 0 === d && (d = null);
- void 0 === e && (e = null);
- void 0 === h && (h = null);
- void 0 === g && (g = null);
- void 0 === p && (p = null);
- void 0 === l && (l = null);
- void 0 === m && (m = null);
- void 0 === B && (B = null);
- void 0 === E && (E = null);
- void 0 === A && (A = null);
- void 0 === G && (G = null);
- a.call(this);
- this.font = b;
- this.size = c;
- this.color = d;
- this.bold = e;
- this.italic = h;
- this.underline = g;
- this.url = p;
- this.target = l;
- this.align = m;
- this.leftMargin = B;
- this.rightMargin = E;
- this.indent = A;
- this.leading = G;
- this._bullet = this._blockIndent = null;
- this._display = n.TextFormatDisplay.BLOCK;
- this._tabStops = this._letterSpacing = this._kerning = null;
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "align", {get:function() {
- return this._align;
- }, set:function(a) {
- this._align = a = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "blockIndent", {get:function() {
- return this._blockIndent;
- }, set:function(a) {
- this._blockIndent = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "bold", {get:function() {
- return this._bold;
- }, set:function(a) {
- this._bold = c.coerceBoolean(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "bullet", {get:function() {
- return this._bullet;
- }, set:function(a) {
- this._bullet = c.coerceBoolean(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "color", {get:function() {
- return this._color;
- }, set:function(a) {
- this._color = null != a ? +a | 0 : null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "display", {get:function() {
- return this._display;
- }, set:function(a) {
- this._display = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "font", {get:function() {
- return this._font;
- }, set:function(a) {
- this._font = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "style", {get:function() {
- return this._bold && this._italic ? n.FontStyle.BOLD_ITALIC : this._bold ? n.FontStyle.BOLD : this._italic ? n.FontStyle.ITALIC : n.FontStyle.REGULAR;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "indent", {get:function() {
- return this._indent;
- }, set:function(a) {
- this._indent = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "italic", {get:function() {
- return this._italic;
- }, set:function(a) {
- this._italic = c.coerceBoolean(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "kerning", {get:function() {
- return this._kerning;
- }, set:function(a) {
- this._kerning = c.coerceBoolean(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "leading", {get:function() {
- return this._leading;
- }, set:function(a) {
- this._leading = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "leftMargin", {get:function() {
- return this._leftMargin;
- }, set:function(a) {
- this._leftMargin = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "letterSpacing", {get:function() {
- return this._letterSpacing;
- }, set:function(a) {
- this._letterSpacing = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "rightMargin", {get:function() {
- return this._rightMargin;
- }, set:function(a) {
- this._rightMargin = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "size", {get:function() {
- return this._size;
- }, set:function(a) {
- this._size = c.coerceNumber(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "tabStops", {get:function() {
- return this.sec.createArrayUnsafe(this._tabStops);
- }, set:function(a) {
- this.sec.AXArray.axIsType(a) || this.sec.throwError("ArgumentError", b.Errors.CheckTypeFailedError, a, "Array");
- this._tabStops = a.value;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "target", {get:function() {
- return this._target;
- }, set:function(a) {
- this._target = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "underline", {get:function() {
- return this._underline;
- }, set:function(a) {
- this._underline = c.coerceBoolean(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "url", {get:function() {
- return this._url;
- }, set:function(a) {
- this._url = m(a);
- }, enumerable:!0, configurable:!0});
- c.coerceNumber = function(a) {
- return void 0 == a ? null : isNaN(a) || 268435455 < a ? -2147483648 : l(a);
- };
- c.coerceBoolean = function(a) {
- return void 0 == a ? null : !!a;
- };
- c.prototype.clone = function() {
- var a = new this.sec.flash.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);
- a._blockIndent = this._blockIndent;
- a._bullet = this._bullet;
- a._display = this._display;
- a._kerning = this._kerning;
- a._letterSpacing = this._letterSpacing;
- a._tabStops = this._tabStops;
- return 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;
- };
- 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);
- null !== a._bullet && (this._bullet = a._bullet);
- null !== a._color && (this._color = a._color);
- null !== a._display && (this._display = a._display);
- a._font && (this._font = a._font);
- null !== a._indent && (this._indent = a._indent);
- null !== a._italic && (this._italic = a._italic);
- null !== a._kerning && (this._kerning = a._kerning);
- null !== a._leading && (this._leading = a._leading);
- null !== a._leftMargin && (this._leftMargin = a._leftMargin);
- null !== a._letterSpacing && (this._letterSpacing = a._letterSpacing);
- null !== a._rightMargin && (this._rightMargin = a._rightMargin);
- null !== a._size && (this._size = a._size);
- null !== a._tabStops && (this._tabStops = a._tabStops);
- a._target && (this._target = a._target);
- null !== a._underline && (this._underline = a._underline);
- a._url && (this._url = a._url);
- };
- 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);
- a._bullet !== this._bullet && (this._bullet = null);
- a._color !== this._color && (this._color = null);
- a._display !== this._display && (this._display = null);
- a._font !== this._font && (this._font = null);
- a._indent !== this._indent && (this._indent = null);
- a._italic !== this._italic && (this._italic = null);
- a._kerning !== this._kerning && (this._kerning = null);
- a._leading !== this._leading && (this._leading = null);
- a._leftMargin !== this._leftMargin && (this._leftMargin = null);
- a._letterSpacing !== this._letterSpacing && (this._letterSpacing = null);
- a._rightMargin !== this._rightMargin && (this._rightMargin = null);
- a._size !== this._size && (this._size = null);
- a._tabStops !== this._tabStops && (this._tabStops = null);
- a._target !== this._target && (this._target = null);
- a._underline !== this._underline && (this._underline = null);
- a._url !== this._url && (this._url = null);
- };
- c.prototype.transform = function(a) {
- var b = a.textAlign;
- b && (this.align = b);
- b = a.fontWeight;
- "bold" === b ? this.bold = !0 : "normal" === b && (this.bold = !1);
- if (b = a.color) {
- if (b = m(b).trim().toLowerCase(), "#" === b[0]) {
- for (b = b.substr(1);"0" === b[0];) {
- b = b.substr(1);
- }
- var c = parseInt(b, 16);
- c.toString(16) === b && (this.color = c);
- }
- }
- if (b = a.display) {
- this.display = b;
- }
- if (b = a.fontFamily) {
- this.font = b.replace("sans-serif", "_sans").replace("serif", "_serif");
- }
- if (b = a.textIndent) {
- this.indent = parseInt(b);
- }
- b = a.fontStyle;
- "italic" === b ? this.italic = !0 : "normal" === b && (this.italic = !1);
- b = a.kerning;
- this.kerning = "true" === b ? 1 : "false" === b ? 0 : parseInt(b);
- if (b = a.leading) {
- this.leading = parseInt(b);
- }
- if (b = a.marginLeft) {
- this.leftMargin = parseInt(b);
- }
- if (b = a.letterSpacing) {
- this.letterSpacing = parseFloat(b);
- }
- if (b = a.marginRight) {
- this.rightMargin = parseInt(b);
- }
- if (b = a.fontSize) {
- b = parseInt(b), 0 < b && (this.size = b);
- }
- b = a.textDecoration;
- "none" === b ? this.underline = !1 : "underline" === b && (this.underline = !0);
- return this;
- };
- c.classInitializer = null;
- c.classSymbols = null;
- c.instanceSymbols = null;
- return c;
- }(h.ASObject);
- n.TextFormat = d;
- })(n.text || (n.text = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.LEFT;
- case 1:
- return d.RIGHT;
- case 2:
- return d.CENTER;
- case 3:
- return d.JUSTIFY;
- case 4:
- return d.START;
- case 5:
- return d.END;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.LEFT:
- return 0;
- case d.RIGHT:
- return 1;
- case d.CENTER:
- return 2;
- case d.JUSTIFY:
- return 3;
- case d.START:
- return 4;
- case d.END:
- return 5;
- default:
- return -1;
- }
- };
- d.classInitializer = 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;
- }(b.ASObject);
- e.TextFormatAlign = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.INLINE = "inline";
- d.BLOCK = "block";
- return d;
- }(b.ASObject);
- e.TextFormatDisplay = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NORMAL = "normal";
- d.SELECTION = "selection";
- return d;
- }(b.ASObject);
- e.TextInteractionMode = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d, k, e, h) {
- b.call(this);
- this.x = +a;
- this.width = +c;
- this.height = +d;
- this.ascent = +k;
- this.descent = +e;
- this.leading = +h;
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- return d;
- }(b.ASObject);
- e.TextLineMetrics = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d(a, c, d) {
- b.call(this);
- this._beginIndex = a | 0;
- this._endIndex = c | 0;
- this._textFormat = d;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "beginIndex", {get:function() {
- return this._beginIndex;
- }, set:function(a) {
- this._beginIndex = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "endIndex", {get:function() {
- return this._endIndex;
- }, set:function(a) {
- this._endIndex = a | 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "textFormat", {get:function() {
- return this._textFormat;
- }, set:function(a) {
- this._textFormat = a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- return new this.sec.flash.text.TextRun(this.beginIndex, this.endIndex, this.textFormat.clone());
- };
- d.prototype.containsIndex = function(a) {
- return a >= this._beginIndex && a < this._endIndex;
- };
- d.prototype.intersects = function(a, b) {
- return Math.max(this._beginIndex, a) < Math.min(this._endIndex, b);
- };
- d.classInitializer = null;
- return d;
- }(b.ASObject);
- e.TextRun = n;
- })(e.text || (e.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = e.AVMX.axCoerceString, d = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "charCount", {get:function() {
- m("public flash.text.TextSnapshot::get charCount");
- }, enumerable:!0, configurable:!0});
- b.prototype.findText = function(a, b, c) {
- l(b);
- m("public flash.text.TextSnapshot::findText");
- };
- b.prototype.getSelected = function(a, b) {
- m("public flash.text.TextSnapshot::getSelected");
- };
- b.prototype.getSelectedText = function(a) {
- m("public flash.text.TextSnapshot::getSelectedText");
- };
- b.prototype.getText = function(a, b, c) {
- m("public flash.text.TextSnapshot::getText");
- };
- b.prototype.getTextRunInfo = function(a, b) {
- m("public flash.text.TextSnapshot::getTextRunInfo");
- };
- b.prototype.hitTestTextNearPos = function(a, b, c) {
- m("public flash.text.TextSnapshot::hitTestTextNearPos");
- };
- b.prototype.setSelectColor = function(a) {
- m("public flash.text.TextSnapshot::setSelectColor");
- };
- b.prototype.setSelected = function(a, b, c) {
- m("public flash.text.TextSnapshot::setSelected");
- };
- b.classInitializer = null;
- return b;
- }(b.ASObject);
- n.TextSnapshot = d;
- })(n.text || (n.text = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- a.setLevel = function(a, b) {
- m("public flash.trace.Trace::static setLevel");
- };
- a.getLevel = function(a) {
- m("public flash.trace.Trace::static getLevel");
- };
- a.setListener = function(a) {
- m("public flash.trace.Trace::static setListener");
- };
- a.getListener = function() {
- m("public flash.trace.Trace::static getListener");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.OFF = void 0;
- a.METHODS = 1;
- a.METHODS_WITH_ARGS = 2;
- a.METHODS_AND_LINES = 3;
- a.METHODS_AND_LINES_WITH_ARGS = 4;
- a.FILE = 1;
- a.LISTENER = 2;
- return a;
- }(b.ASObject);
- n.Trace = l;
- })(n.trace || (n.trace = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.somewhatImplemented, l = function(b) {
- function a() {
- b.call(this);
- this._builtInItems = new this.sec.flash.ui.ContextMenuBuiltInItems;
- this._customItems = [];
- }
- __extends(a, b);
- Object.defineProperty(a, "isSupported", {get:function() {
- m("ContextMenu::isSupported");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "builtInItems", {get:function() {
- m("public flash.ui.ContextMenu::get builtInItems");
- return this._builtInItems;
- }, set:function(a) {
- m("public flash.ui.ContextMenu::set builtInItems");
- this._builtInItems = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "customItems", {get:function() {
- m("public flash.ui.ContextMenu::get customItems");
- return this.sec.createArrayUnsafe(this._customItems);
- }, set:function(a) {
- m("public flash.ui.ContextMenu::set customItems");
- this._customItems = a.value;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "link", {get:function() {
- m("public flash.ui.ContextMenu::get link");
- return this._link;
- }, set:function(a) {
- m("public flash.ui.ContextMenu::set link");
- this._link = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "clipboardMenu", {get:function() {
- m("public flash.ui.ContextMenu::get clipboardMenu");
- return this._clipboardMenu;
- }, set:function(a) {
- a = !!a;
- m("public flash.ui.ContextMenu::set clipboardMenu");
- this._clipboardMenu = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "clipboardItems", {get:function() {
- m("public flash.ui.ContextMenu::get clipboardItems");
- return this._clipboardItems;
- }, set:function(a) {
- m("public flash.ui.ContextMenu::set clipboardItems");
- this._clipboardItems = a;
- }, enumerable:!0, configurable:!0});
- a.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);
- };
- a.prototype.clone = function() {
- var a = new this.sec.flash.ui.ContextMenu;
- a._builtInItems = this._builtInItems.clone();
- this.cloneLinkAndClipboardProperties(a);
- for (var b = this._customItems, d = 0;d < b.length;d++) {
- a._customItems.push(b[d].clone());
- }
- return a;
- };
- a.prototype.cloneLinkAndClipboardProperties = function(a) {
- m("public flash.ui.ContextMenu::cloneLinkAndClipboardProperties");
- };
- a.classInitializer = null;
- return a;
- }(b.display.NativeMenu);
- h.ContextMenu = l;
- })(b.ui || (b.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- this._print = this._forwardAndBack = this._rewind = this._loop = this._play = this._quality = this._zoom = this._save = !0;
- }
- __extends(d, b);
- Object.defineProperty(d.prototype, "save", {get:function() {
- return this._save;
- }, set:function(a) {
- this._save = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "zoom", {get:function() {
- return this._zoom;
- }, set:function(a) {
- this._zoom = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "quality", {get:function() {
- return this._quality;
- }, set:function(a) {
- this._quality = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "play", {get:function() {
- return this._play;
- }, set:function(a) {
- this._play = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "loop", {get:function() {
- return this._loop;
- }, set:function(a) {
- this._loop = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "rewind", {get:function() {
- return this._rewind;
- }, set:function(a) {
- this._rewind = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "forwardAndBack", {get:function() {
- return this._forwardAndBack;
- }, set:function(a) {
- this._forwardAndBack = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "print", {get:function() {
- return this._print;
- }, set:function(a) {
- this._print = !!a;
- }, enumerable:!0, configurable:!0});
- d.prototype.clone = function() {
- var a = new this.sec.flash.ui.ContextMenuBuiltInItems;
- a._save = this._save;
- a._zoom = this._zoom;
- a._quality = this._quality;
- a._play = this._play;
- a._loop = this._loop;
- a._rewind = this._rewind;
- a._forwardAndBack = this._forwardAndBack;
- a._print = this._print;
- return a;
- };
- d.classInitializer = null;
- return d;
- }(b.ASObject);
- e.ContextMenuBuiltInItems = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.somewhatImplemented, l = function(b) {
- function a() {
- b.call(this);
- this._selectAll = this._clear = this._paste = this._copy = this._cut = !0;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "cut", {get:function() {
- m("cut");
- return this._cut;
- }, set:function(a) {
- m("cut");
- this._cut = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "copy", {get:function() {
- m("copy");
- return this._copy;
- }, set:function(a) {
- m("copy");
- this._copy = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "paste", {get:function() {
- m("paste");
- return this._paste;
- }, set:function(a) {
- m("paste");
- this._paste = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "clear", {get:function() {
- m("clear");
- return this._clear;
- }, set:function(a) {
- m("clear");
- this._clear = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "selectAll", {get:function() {
- m("selectAll");
- return this._selectAll;
- }, set:function(a) {
- m("selectAll");
- this._selectAll = !!a;
- }, enumerable:!0, configurable:!0});
- a.prototype.clone = function() {
- var a = new this.sec.flash.ui.ContextMenuClipboardItems;
- a._cut = this._cut;
- a._copy = this._copy;
- a._paste = this._paste;
- a._clear = this._clear;
- a._selectAll = this._selectAll;
- return a;
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.ContextMenuClipboardItems = l;
- })(n.ui || (n.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.AVMX.axCoerceString, l = function(b) {
- function a(a, f, k, e) {
- void 0 === f && (f = !1);
- void 0 === k && (k = !0);
- void 0 === e && (e = !0);
- b.call(this);
- this._caption = (a = m(a)) ? a : "";
- this._separatorBefore = !!f;
- this._enabled = !!k;
- this._visible = !!e;
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "caption", {get:function() {
- return this._caption;
- }, set:function(a) {
- this._caption = a = m(a);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "separatorBefore", {get:function() {
- return this._separatorBefore;
- }, set:function(a) {
- this._separatorBefore = !!a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "visible", {get:function() {
- return this._visible;
- }, set:function(a) {
- this._visible = !!a;
- }, enumerable:!0, configurable:!0});
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.display.NativeMenuItem);
- h.ContextMenuItem = l;
- })(b.ui || (b.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.Debug.somewhatImplemented, l = function(d) {
- function a() {
- d.call(this, void 0);
- }
- __extends(a, d);
- Object.defineProperty(a.prototype, "numDevices", {get:function() {
- m("public flash.ui.GameInput::get numDevices");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "isSupported", {get:function() {
- m("public flash.ui.GameInput::get isSupported");
- return !1;
- }, enumerable:!0, configurable:!0});
- a.getDeviceAt = function(a) {
- m("public flash.ui.GameInput::static getDeviceAt");
- this.sec.throwError("RangeError", b.Errors.ParamRangeError, "index");
- return null;
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(h.events.EventDispatcher);
- t.GameInput = l;
- })(h.ui || (h.ui = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "numValues", {get:function() {
- m("public flash.ui.GameInputControl::get numValues");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "index", {get:function() {
- m("public flash.ui.GameInputControl::get index");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "relative", {get:function() {
- m("public flash.ui.GameInputControl::get relative");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "type", {get:function() {
- m("public flash.ui.GameInputControl::get type");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "hand", {get:function() {
- m("public flash.ui.GameInputControl::get hand");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "finger", {get:function() {
- m("public flash.ui.GameInputControl::get finger");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "device", {get:function() {
- m("public flash.ui.GameInputControl::get device");
- }, enumerable:!0, configurable:!0});
- a.prototype.getValueAt = function(a) {
- m("public flash.ui.GameInputControl::getValueAt");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.events.EventDispatcher);
- h.GameInputControl = l;
- })(b.ui || (b.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.MOVEMENT = "movement";
- d.ROTATION = "rotation";
- d.DIRECTION = "direction";
- d.ACCELERATION = "acceleration";
- d.BUTTON = "button";
- d.TRIGGER = "trigger";
- return d;
- }(b.ASObject);
- e.GameInputControlType = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(h) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "numControls", {get:function() {
- m("public flash.ui.GameInputDevice::get numControls");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "sampleInterval", {get:function() {
- m("public flash.ui.GameInputDevice::get sampleInterval");
- }, set:function(a) {
- m("public flash.ui.GameInputDevice::set sampleInterval");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "enabled", {get:function() {
- m("public flash.ui.GameInputDevice::get enabled");
- }, set:function(a) {
- m("public flash.ui.GameInputDevice::set enabled");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "id", {get:function() {
- m("public flash.ui.GameInputDevice::get id");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "name", {get:function() {
- m("public flash.ui.GameInputDevice::get name");
- }, enumerable:!0, configurable:!0});
- a.prototype.getControlAt = function(a) {
- m("public flash.ui.GameInputDevice::getControlAt");
- };
- a.prototype.startCachingSamples = function(a, b) {
- m("public flash.ui.GameInputDevice::startCachingSamples");
- };
- a.prototype.stopCachingSamples = function() {
- m("public flash.ui.GameInputDevice::stopCachingSamples");
- };
- a.prototype.getCachedSamples = function(a, b) {
- m("public flash.ui.GameInputDevice::getCachedSamples");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.MAX_BUFFER_SIZE = 4800;
- return a;
- }(b.events.EventDispatcher);
- h.GameInputDevice = l;
- })(b.ui || (b.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.THUMB = "thumb";
- d.INDEX = "index";
- d.MIDDLE = "middle";
- d.UNKNOWN = "unknown";
- return d;
- }(b.ASObject);
- e.GameInputFinger = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.RIGHT = "right";
- d.LEFT = "left";
- d.UNKNOWN = "unknown";
- return d;
- }(b.ASObject);
- e.GameInputHand = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = function() {
- function b() {
- this._lastKeyCode = 0;
- this._captureKeyPress = !1;
- this._charCodeMap = [];
- }
- b.prototype.dispatchKeyboardEvent = function(a) {
- var b = a.keyCode;
- if ("keydown" === a.type) {
- this._lastKeyCode = b;
- if (this._captureKeyPress = 8 === b || 9 === b || 13 === b || 32 === b || 48 <= b && 90 >= b || 145 < b) {
- return;
- }
- this._charCodeMap[b] = 0;
- } else {
- if ("keypress" === a.type) {
- if (this._captureKeyPress) {
- b = this._lastKeyCode, this._charCodeMap[b] = a.charCode;
- } else {
- return;
- }
- }
- }
- if (this.target) {
- var d = "keyup" === a.type;
- this.target.dispatchEvent(new this.target.sec.flash.events.KeyboardEvent(d ? "keyUp" : "keyDown", !0, !1, d ? this._charCodeMap[b] : a.charCode, d ? a.keyCode : this._lastKeyCode, a.location, a.ctrlKey, a.altKey, a.shiftKey));
- }
- };
- return b;
- }();
- n.KeyboardEventDispatcher = l;
- l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a, "capsLock", {get:function() {
- m("public flash.ui.Keyboard::get capsLock");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a, "numLock", {get:function() {
- m("public flash.ui.Keyboard::get numLock");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a, "hasVirtualKeyboard", {get:function() {
- m("public flash.ui.Keyboard::get hasVirtualKeyboard");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a, "physicalKeyboardType", {get:function() {
- m("public flash.ui.Keyboard::get physicalKeyboardType");
- }, enumerable:!0, configurable:!0});
- a.isAccessible = function() {
- m("public flash.ui.Keyboard::static isAccessible");
- };
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- a.KEYNAME_UPARROW = "Up";
- a.KEYNAME_DOWNARROW = "Down";
- a.KEYNAME_LEFTARROW = "Left";
- a.KEYNAME_RIGHTARROW = "Right";
- a.KEYNAME_F1 = "F1";
- a.KEYNAME_F2 = "F2";
- a.KEYNAME_F3 = "F3";
- a.KEYNAME_F4 = "F4";
- a.KEYNAME_F5 = "F5";
- a.KEYNAME_F6 = "F6";
- a.KEYNAME_F7 = "F7";
- a.KEYNAME_F8 = "F8";
- a.KEYNAME_F9 = "F9";
- a.KEYNAME_F10 = "F10";
- a.KEYNAME_F11 = "F11";
- a.KEYNAME_F12 = "F12";
- a.KEYNAME_F13 = "F13";
- a.KEYNAME_F14 = "F14";
- a.KEYNAME_F15 = "F15";
- a.KEYNAME_F16 = "F16";
- a.KEYNAME_F17 = "F17";
- a.KEYNAME_F18 = "F18";
- a.KEYNAME_F19 = "F19";
- a.KEYNAME_F20 = "F20";
- a.KEYNAME_F21 = "F21";
- a.KEYNAME_F22 = "F22";
- a.KEYNAME_F23 = "F23";
- a.KEYNAME_F24 = "F24";
- a.KEYNAME_F25 = "F25";
- a.KEYNAME_F26 = "F26";
- a.KEYNAME_F27 = "F27";
- a.KEYNAME_F28 = "F28";
- a.KEYNAME_F29 = "F29";
- a.KEYNAME_F30 = "F30";
- a.KEYNAME_F31 = "F31";
- a.KEYNAME_F32 = "F32";
- a.KEYNAME_F33 = "F33";
- a.KEYNAME_F34 = "F34";
- a.KEYNAME_F35 = "F35";
- a.KEYNAME_INSERT = "Insert";
- a.KEYNAME_DELETE = "Delete";
- a.KEYNAME_HOME = "Home";
- a.KEYNAME_BEGIN = "Begin";
- a.KEYNAME_END = "End";
- a.KEYNAME_PAGEUP = "PgUp";
- a.KEYNAME_PAGEDOWN = "PgDn";
- a.KEYNAME_PRINTSCREEN = "PrntScrn";
- a.KEYNAME_SCROLLLOCK = "ScrlLck";
- a.KEYNAME_PAUSE = "Pause";
- a.KEYNAME_SYSREQ = "SysReq";
- a.KEYNAME_BREAK = "Break";
- a.KEYNAME_RESET = "Reset";
- a.KEYNAME_STOP = "Stop";
- a.KEYNAME_MENU = "Menu";
- a.KEYNAME_USER = "User";
- a.KEYNAME_SYSTEM = "Sys";
- a.KEYNAME_PRINT = "Print";
- a.KEYNAME_CLEARLINE = "ClrLn";
- a.KEYNAME_CLEARDISPLAY = "ClrDsp";
- a.KEYNAME_INSERTLINE = "InsLn";
- a.KEYNAME_DELETELINE = "DelLn";
- a.KEYNAME_INSERTCHAR = "InsChr";
- a.KEYNAME_DELETECHAR = "DelChr";
- a.KEYNAME_PREV = "Prev";
- a.KEYNAME_NEXT = "Next";
- a.KEYNAME_SELECT = "Select";
- a.KEYNAME_EXECUTE = "Exec";
- a.KEYNAME_UNDO = "Undo";
- a.KEYNAME_REDO = "Redo";
- a.KEYNAME_FIND = "Find";
- a.KEYNAME_HELP = "Help";
- a.KEYNAME_MODESWITCH = "ModeSw";
- a.STRING_UPARROW = "\uf700";
- a.STRING_DOWNARROW = "\uf701";
- a.STRING_LEFTARROW = "\uf702";
- a.STRING_RIGHTARROW = "\uf703";
- a.STRING_F1 = "\uf704";
- a.STRING_F2 = "\uf705";
- a.STRING_F3 = "\uf706";
- a.STRING_F4 = "\uf707";
- a.STRING_F5 = "\uf708";
- a.STRING_F6 = "\uf709";
- a.STRING_F7 = "\uf70a";
- a.STRING_F8 = "\uf70b";
- a.STRING_F9 = "\uf70c";
- a.STRING_F10 = "\uf70d";
- a.STRING_F11 = "\uf70e";
- a.STRING_F12 = "\uf70f";
- a.STRING_F13 = "\uf710";
- a.STRING_F14 = "\uf711";
- a.STRING_F15 = "\uf712";
- a.STRING_F16 = "\uf713";
- a.STRING_F17 = "\uf714";
- a.STRING_F18 = "\uf715";
- a.STRING_F19 = "\uf716";
- a.STRING_F20 = "\uf717";
- a.STRING_F21 = "\uf718";
- a.STRING_F22 = "\uf719";
- a.STRING_F23 = "\uf71a";
- a.STRING_F24 = "\uf71b";
- a.STRING_F25 = "\uf71c";
- a.STRING_F26 = "\uf71d";
- a.STRING_F27 = "\uf71e";
- a.STRING_F28 = "\uf71f";
- a.STRING_F29 = "\uf720";
- a.STRING_F30 = "\uf721";
- a.STRING_F31 = "\uf722";
- a.STRING_F32 = "\uf723";
- a.STRING_F33 = "\uf724";
- a.STRING_F34 = "\uf725";
- a.STRING_F35 = "\uf726";
- a.STRING_INSERT = "\uf727";
- a.STRING_DELETE = "\uf728";
- a.STRING_HOME = "\uf729";
- a.STRING_BEGIN = "\uf72a";
- a.STRING_END = "\uf72b";
- a.STRING_PAGEUP = "\uf72c";
- a.STRING_PAGEDOWN = "\uf72d";
- a.STRING_PRINTSCREEN = "\uf72e";
- a.STRING_SCROLLLOCK = "\uf72f";
- a.STRING_PAUSE = "\uf730";
- a.STRING_SYSREQ = "\uf731";
- a.STRING_BREAK = "\uf732";
- a.STRING_RESET = "\uf733";
- a.STRING_STOP = "\uf734";
- a.STRING_MENU = "\uf735";
- a.STRING_USER = "\uf736";
- a.STRING_SYSTEM = "\uf737";
- a.STRING_PRINT = "\uf738";
- a.STRING_CLEARLINE = "\uf739";
- a.STRING_CLEARDISPLAY = "\uf73a";
- a.STRING_INSERTLINE = "\uf73b";
- a.STRING_DELETELINE = "\uf73c";
- a.STRING_INSERTCHAR = "\uf73d";
- a.STRING_DELETECHAR = "\uf73e";
- a.STRING_PREV = "\uf73f";
- a.STRING_NEXT = "\uf740";
- a.STRING_SELECT = "\uf741";
- a.STRING_EXECUTE = "\uf742";
- a.STRING_UNDO = "\uf743";
- a.STRING_REDO = "\uf744";
- a.STRING_FIND = "\uf745";
- a.STRING_HELP = "\uf746";
- a.STRING_MODESWITCH = "\uf747";
- a.CharCodeStrings = void 0;
- a.NUMBER_0 = 48;
- a.NUMBER_1 = 49;
- a.NUMBER_2 = 50;
- a.NUMBER_3 = 51;
- a.NUMBER_4 = 52;
- a.NUMBER_5 = 53;
- a.NUMBER_6 = 54;
- a.NUMBER_7 = 55;
- a.NUMBER_8 = 56;
- a.NUMBER_9 = 57;
- a.A = 65;
- a.B = 66;
- a.C = 67;
- a.D = 68;
- a.E = 69;
- a.F = 70;
- a.G = 71;
- a.H = 72;
- a.I = 73;
- a.J = 74;
- a.K = 75;
- a.L = 76;
- a.M = 77;
- a.N = 78;
- a.O = 79;
- a.P = 80;
- a.Q = 81;
- a.R = 82;
- a.S = 83;
- a.T = 84;
- a.U = 85;
- a.V = 86;
- a.W = 87;
- a.X = 88;
- a.Y = 89;
- a.Z = 90;
- a.SEMICOLON = 186;
- a.EQUAL = 187;
- a.COMMA = 188;
- a.MINUS = 189;
- a.PERIOD = 190;
- a.SLASH = 191;
- a.BACKQUOTE = 192;
- a.LEFTBRACKET = 219;
- a.BACKSLASH = 220;
- a.RIGHTBRACKET = 221;
- a.QUOTE = 222;
- a.ALTERNATE = 18;
- a.BACKSPACE = 8;
- a.CAPS_LOCK = 20;
- a.COMMAND = 15;
- a.CONTROL = 17;
- a.DELETE = 46;
- a.DOWN = 40;
- a.END = 35;
- a.ENTER = 13;
- a.ESCAPE = 27;
- a.F1 = 112;
- a.F2 = 113;
- a.F3 = 114;
- a.F4 = 115;
- a.F5 = 116;
- a.F6 = 117;
- a.F7 = 118;
- a.F8 = 119;
- a.F9 = 120;
- a.F10 = 121;
- a.F11 = 122;
- a.F12 = 123;
- a.F13 = 124;
- a.F14 = 125;
- a.F15 = 126;
- a.HOME = 36;
- a.INSERT = 45;
- a.LEFT = 37;
- a.NUMPAD = 21;
- a.NUMPAD_0 = 96;
- a.NUMPAD_1 = 97;
- a.NUMPAD_2 = 98;
- a.NUMPAD_3 = 99;
- a.NUMPAD_4 = 100;
- a.NUMPAD_5 = 101;
- a.NUMPAD_6 = 102;
- a.NUMPAD_7 = 103;
- a.NUMPAD_8 = 104;
- a.NUMPAD_9 = 105;
- a.NUMPAD_ADD = 107;
- a.NUMPAD_DECIMAL = 110;
- a.NUMPAD_DIVIDE = 111;
- a.NUMPAD_ENTER = 108;
- a.NUMPAD_MULTIPLY = 106;
- a.NUMPAD_SUBTRACT = 109;
- a.PAGE_DOWN = 34;
- a.PAGE_UP = 33;
- a.RIGHT = 39;
- a.SHIFT = 16;
- a.SPACE = 32;
- a.TAB = 9;
- a.UP = 38;
- a.RED = 16777216;
- a.GREEN = 16777217;
- a.YELLOW = 16777218;
- a.BLUE = 16777219;
- a.CHANNEL_UP = 16777220;
- a.CHANNEL_DOWN = 16777221;
- a.RECORD = 16777222;
- a.PLAY = 16777223;
- a.PAUSE = 16777224;
- a.STOP = 16777225;
- a.FAST_FORWARD = 16777226;
- a.REWIND = 16777227;
- a.SKIP_FORWARD = 16777228;
- a.SKIP_BACKWARD = 16777229;
- a.NEXT = 16777230;
- a.PREVIOUS = 16777231;
- a.LIVE = 16777232;
- a.LAST = 16777233;
- a.MENU = 16777234;
- a.INFO = 16777235;
- a.GUIDE = 16777236;
- a.EXIT = 16777237;
- a.BACK = 16777238;
- a.AUDIO = 16777239;
- a.SUBTITLE = 16777240;
- a.DVR = 16777241;
- a.VOD = 16777242;
- a.INPUT = 16777243;
- a.SETUP = 16777244;
- a.HELP = 16777245;
- a.MASTER_SHELL = 16777246;
- a.SEARCH = 16777247;
- return a;
- }(b.ASObject);
- n.Keyboard = l;
- })(n.ui || (n.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(n) {
- (function(t) {
- var m = e.Debug.notImplemented, l = e.Debug.somewhatImplemented, d = e.AVMX.axCoerceString, a = n.events, c = function() {
- function b() {
- this.currentTarget = this.stage = null;
- }
- b.prototype._findTarget = function(a, b) {
- var c = [];
- this.stage._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, b, c);
- return c.length ? c[0] : c.length ? c[0] : null;
- };
- b.prototype._dispatchMouseEvent = function(b, c, d, f) {
- void 0 === f && (f = null);
- var g = b.globalToLocal(d.point);
- c = new this.stage.sec.flash.events.MouseEvent(c, c !== a.MouseEvent.ROLL_OVER && c !== a.MouseEvent.ROLL_OUT && c !== a.MouseEvent.MOUSE_LEAVE, !1, g.x, g.y, f, d.ctrlKey, d.altKey, d.shiftKey, !!d.buttons);
- b.dispatchEvent(c);
- };
- b.prototype.handleMouseEvent = function(b) {
- var c = this.stage;
- if (!c) {
- return c;
- }
- var d = b.point, f = this.stage.sec.flash.ui.Mouse.axClass;
- f.updateCurrentPosition(d);
- var g = this.currentTarget, e = null, h = n.events.MouseEvent.typeFromDOMType(b.type);
- if (0 <= d.x && d.x < c.stageWidth && 0 <= d.y && d.y < c.stageHeight) {
- e = this._findTarget(d, 3) || this.stage;
- } else {
- if (!g) {
- return c;
- }
- this._dispatchMouseEvent(c, a.MouseEvent.MOUSE_LEAVE, b);
- if (h !== a.MouseEvent.MOUSE_MOVE) {
- return c;
- }
- }
- f.draggableObject && (d = this._findTarget(d, 5), f.draggableObject._updateDragState(d));
- switch(h) {
- case a.MouseEvent.MOUSE_DOWN:
- b.buttons & 1 ? b.buttons = 1 : b.buttons & 2 ? (h = a.MouseEvent.MIDDLE_MOUSE_DOWN, b.buttons = 2) : b.buttons & 4 && (h = a.MouseEvent.RIGHT_MOUSE_DOWN, b.buttons = 4);
- e._mouseDown = !0;
- break;
- case a.MouseEvent.MOUSE_UP:
- b.buttons & 1 ? b.buttons = 1 : b.buttons & 2 ? (h = a.MouseEvent.MIDDLE_MOUSE_UP, b.buttons = 2) : b.buttons & 4 && (h = a.MouseEvent.RIGHT_MOUSE_UP, b.buttons = 4);
- e._mouseDown = !1;
- break;
- case a.MouseEvent.CLICK:
- b.buttons & 1 || (b.buttons & 2 ? h = a.MouseEvent.MIDDLE_CLICK : b.buttons & 4 && (h = a.MouseEvent.RIGHT_CLICK));
- b.buttons = 0;
- break;
- case a.MouseEvent.DOUBLE_CLICK:
- if (!e.doubleClickEnabled) {
- return;
- }
- b.buttons = 0;
- break;
- case a.MouseEvent.MOUSE_MOVE:
- this.currentTarget = e;
- b.buttons &= 1;
- if (e === g) {
- break;
- }
- f = e ? e.findNearestCommonAncestor(g) : c;
- if (g && g !== c) {
- for (g._mouseOver = !1, g._mouseDown = !1, this._dispatchMouseEvent(g, a.MouseEvent.MOUSE_OUT, b, e), d = g;d && d !== f;) {
- this._dispatchMouseEvent(d, a.MouseEvent.ROLL_OUT, b, e), d = d.parent;
- }
- }
- if (!e) {
- return c;
- }
- if (e === c) {
- break;
- }
- for (c = e;c && c !== f;) {
- this._dispatchMouseEvent(c, a.MouseEvent.ROLL_OVER, b, g), c = c.parent;
- }
- e._mouseOver = !0;
- this._dispatchMouseEvent(e, a.MouseEvent.MOUSE_OVER, b, g);
- return e;
- }
- this._dispatchMouseEvent(e, h, b);
- return e;
- };
- return b;
- }();
- t.MouseEventDispatcher = c;
- (function(a) {
- a[a.Left = 1] = "Left";
- a[a.Middle = 2] = "Middle";
- a[a.Right = 4] = "Right";
- })(t.MouseButtonFlags || (t.MouseButtonFlags = {}));
- c = function(a) {
- function c() {
- a.call(this);
- }
- __extends(c, a);
- c.classInitializer = function() {
- this._currentPosition = new this.sec.flash.geom.Point;
- this._cursor = t.MouseCursor.AUTO;
- this.draggableObject = null;
- };
- Object.defineProperty(c, "supportsCursor", {get:function() {
- return !0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c, "cursor", {get:function() {
- return this._cursor;
- }, set:function(a) {
- a = d(a);
- 0 > t.MouseCursor.toNumber(a) && this.sec.throwError("ArgumentError", b.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() {
- l("public flash.ui.Mouse::static hide");
- };
- c.show = function() {
- l("public flash.ui.Mouse::static show");
- };
- c.registerCursor = function(a, b) {
- d(a);
- m("public flash.ui.Mouse::static registerCursor");
- };
- c.unregisterCursor = function(a) {
- d(a);
- m("public flash.ui.Mouse::static unregisterCursor");
- };
- c.updateCurrentPosition = function(a) {
- this._currentPosition.copyFrom(a);
- };
- return c;
- }(h.ASObject);
- t.Mouse = c;
- })(n.ui || (n.ui = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.fromNumber = function(a) {
- switch(a) {
- case 0:
- return d.AUTO;
- case 1:
- return d.ARROW;
- case 2:
- return d.BUTTON;
- case 3:
- return d.HAND;
- case 4:
- return d.IBEAM;
- default:
- return null;
- }
- };
- d.toNumber = function(a) {
- switch(a) {
- case d.AUTO:
- return 0;
- case d.ARROW:
- return 1;
- case d.BUTTON:
- return 2;
- case d.HAND:
- return 3;
- case d.IBEAM:
- return 4;
- default:
- return -1;
- }
- };
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.AUTO = "auto";
- d.ARROW = "arrow";
- d.BUTTON = "button";
- d.HAND = "hand";
- d.IBEAM = "ibeam";
- return d;
- }(b.ASObject);
- e.MouseCursor = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.notImplemented, l = function(b) {
- function a() {
- b.call(this);
- }
- __extends(a, b);
- Object.defineProperty(a.prototype, "data", {get:function() {
- m("public flash.ui.MouseCursorData::get data");
- }, set:function(a) {
- m("public flash.ui.MouseCursorData::set data");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "hotSpot", {get:function() {
- m("public flash.ui.MouseCursorData::get hotSpot");
- }, set:function(a) {
- m("public flash.ui.MouseCursorData::set hotSpot");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "frameRate", {get:function() {
- m("public flash.ui.MouseCursorData::get frameRate");
- }, set:function(a) {
- m("public flash.ui.MouseCursorData::set frameRate");
- }, enumerable:!0, configurable:!0});
- a.classInitializer = null;
- a.classSymbols = null;
- a.instanceSymbols = null;
- return a;
- }(b.ASObject);
- n.MouseCursorData = l;
- })(n.ui || (n.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(n) {
- (function(n) {
- var m = e.Debug.somewhatImplemented, l = e.Debug.notImplemented, d = e.AVMX.axCoerceString, a = function(a) {
- function b() {
- a.call(this);
- }
- __extends(b, a);
- Object.defineProperty(b, "inputMode", {get:function() {
- l("public flash.ui.Multitouch::get inputMode");
- }, set:function(a) {
- d(a);
- l("public flash.ui.Multitouch::set inputMode");
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "supportsTouchEvents", {get:function() {
- m("public flash.ui.Multitouch::get supportsTouchEvents");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "supportsGestureEvents", {get:function() {
- m("public flash.ui.Multitouch::get supportsGestureEvents");
- return !1;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "supportedGestures", {get:function() {
- m("public flash.ui.Multitouch::get supportedGestures");
- return null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "maxTouchPoints", {get:function() {
- m("public flash.ui.Multitouch::get maxTouchPoints");
- return 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b, "mapTouchToMouse", {get:function() {
- m("public flash.ui.Multitouch::get mapTouchToMouse");
- return !0;
- }, set:function(a) {
- l("public flash.ui.Multitouch::set mapTouchToMouse");
- }, enumerable:!0, configurable:!0});
- b.classInitializer = null;
- b.classSymbols = null;
- b.instanceSymbols = null;
- return b;
- }(b.ASObject);
- n.Multitouch = a;
- })(n.ui || (n.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.NONE = "none";
- d.GESTURE = "gesture";
- d.TOUCH_POINT = "touchPoint";
- return d;
- }(b.ASObject);
- e.MultitouchInputMode = n;
- })(e.ui || (e.ui = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(e) {
- (function(e) {
- var n = function(b) {
- function d() {
- b.call(this);
- }
- __extends(d, b);
- d.classInitializer = null;
- d.classSymbols = null;
- d.instanceSymbols = null;
- d.BIG_ENDIAN = "bigEndian";
- d.LITTLE_ENDIAN = "littleEndian";
- return d;
- }(b.ASObject);
- e.Endian = n;
- })(e.utils || (e.utils = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- (function(h) {
- (function(t) {
- var m = e.AVM2.enterTimeline, l = e.AVM2.leaveTimeline, d = function(a) {
- function c(b, c) {
- a.call(this);
- this._delay = +b;
- this._repeatCount = c | 0;
- this._iteration = 0;
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "running", {get:function() {
- return this._running;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "delay", {get:function() {
- return this._delay;
- }, set:function(a) {
- a = +a;
- (0 > a || !isFinite(a)) && this.sec.throwError("RangeError", b.Errors.DelayRangeError);
- this._delay = a;
- this._running && (this.stop(), this.start());
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "repeatCount", {get:function() {
- return this._repeatCount;
- }, set:function(a) {
- (this._repeatCount = a | 0) && this._running && this._iteration >= this._repeatCount && this.stop();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "currentCount", {get:function() {
- return this._iteration;
- }, enumerable:!0, configurable:!0});
- c.prototype.reset = function() {
- this._running && this.stop();
- this._iteration = 0;
- };
- c.prototype.stop = function() {
- this._running = !1;
- clearInterval(this._interval);
- };
- c.prototype.start = function() {
- this._running || (this._running = !0, this._interval = setInterval(this._tick.bind(this), this._delay));
- };
- c.prototype._tick = function() {
- this._iteration++;
- if (this._running) {
- if (h.utils.Timer.dispatchingEnabled) {
- m("Timer.Timer");
- try {
- this.dispatchEvent(new this.sec.flash.events.TimerEvent("timer", !0, !1));
- } catch (a) {
- e.Debug.warning("caught error under Timer TIMER event: ", a);
- }
- l();
- }
- if (0 !== this._repeatCount && this._iteration >= this._repeatCount) {
- this.stop();
- m("Timer.TimerComplete");
- try {
- this.dispatchEvent(new this.sec.flash.events.TimerEvent(h.events.TimerEvent.TIMER_COMPLETE, !1, !1));
- } catch (b) {
- e.Debug.warning("caught error under Timer COMPLETE event: ", b);
- }
- l();
- }
- }
- };
- c.classInitializer = null;
- c.classSymbols = null;
- c.instanceSymbols = null;
- c.dispatchingEnabled = !0;
- return c;
- }(h.events.EventDispatcher);
- t.Timer = d;
- })(h.utils || (h.utils = {}));
- })(h.flash || (h.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- (function(b) {
- (function(e) {
- var h = function(b) {
- function d(a, c, d, k) {
- b.call(this, +c, d ? 0 : 1);
- }
- __extends(d, b);
- d.classInitializer = null;
- return d;
- }(b.utils.Timer);
- e.SetIntervalTimer = h;
- })(b.utils || (b.utils = {}));
- })(b.flash || (b.flash = {}));
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-var flashPackage = Shumway.AVMX.AS.flash;
-(function(e) {
- (function(b) {
- (function(b) {
- function e(n, m) {
- b.registerNativeClass(n, m);
- }
- e("flash.display.DisplayObject", b.flash.display.DisplayObject);
- e("flash.display.InteractiveObject", b.flash.display.InteractiveObject);
- e("flash.display.DisplayObjectContainer", b.flash.display.DisplayObjectContainer);
- e("flash.display.Sprite", b.flash.display.Sprite);
- e("flash.display.MovieClip", b.flash.display.MovieClip);
- e("flash.display.Shape", b.flash.display.Shape);
- e("flash.display.Bitmap", b.flash.display.Bitmap);
- e("flash.display.BitmapData", b.flash.display.BitmapData);
- e("flash.display.Stage", b.flash.display.Stage);
- e("flash.display.Loader", b.flash.display.Loader);
- e("flash.display.LoaderInfo", b.flash.display.LoaderInfo);
- e("flash.display.Graphics", b.flash.display.Graphics);
- e("flash.display.SimpleButton", b.flash.display.SimpleButton);
- e("flash.display.MorphShape", b.flash.display.MorphShape);
- e("flash.display.NativeMenu", b.flash.display.NativeMenu);
- e("flash.display.NativeMenuItem", b.flash.display.NativeMenuItem);
- e("flash.display.FrameLabel", b.flash.display.FrameLabel);
- e("flash.display.Scene", b.flash.display.Scene);
- e("flash.display.AVM1Movie", b.flash.display.AVM1Movie);
- e("flash.display.GradientType", b.flash.display.GradientType);
- e("flash.display.SpreadMethod", b.flash.display.SpreadMethod);
- e("flash.display.InterpolationMethod", b.flash.display.InterpolationMethod);
- e("flash.display.LineScaleMode", b.flash.display.LineScaleMode);
- e("flash.display.CapsStyle", b.flash.display.CapsStyle);
- e("flash.display.JointStyle", b.flash.display.JointStyle);
- e("flash.filters.BevelFilter", b.flash.filters.BevelFilter);
- e("flash.filters.BitmapFilter", b.flash.filters.BitmapFilter);
- e("flash.filters.BlurFilter", b.flash.filters.BlurFilter);
- e("flash.filters.ColorMatrixFilter", b.flash.filters.ColorMatrixFilter);
- e("flash.filters.ConvolutionFilter", b.flash.filters.ConvolutionFilter);
- e("flash.filters.DisplacementMapFilter", b.flash.filters.DisplacementMapFilter);
- e("flash.filters.DropShadowFilter", b.flash.filters.DropShadowFilter);
- e("flash.filters.GlowFilter", b.flash.filters.GlowFilter);
- e("flash.filters.GradientBevelFilter", b.flash.filters.GradientBevelFilter);
- e("flash.filters.GradientGlowFilter", b.flash.filters.GradientGlowFilter);
- e("flash.geom.Point", b.flash.geom.Point);
- e("flash.geom.Rectangle", b.flash.geom.Rectangle);
- e("flash.geom.Matrix", b.flash.geom.Matrix);
- e("flash.geom.Matrix3D", b.flash.geom.Matrix3D);
- e("flash.geom.Vector3D", b.flash.geom.Vector3D);
- e("flash.geom.Transform", b.flash.geom.Transform);
- e("flash.geom.ColorTransform", b.flash.geom.ColorTransform);
- e("flash.events.EventDispatcher", b.flash.events.EventDispatcher);
- e("flash.events.Event", b.flash.events.Event);
- e("flash.events.ErrorEvent", b.flash.events.ErrorEvent);
- e("flash.events.IOErrorEvent", b.flash.events.IOErrorEvent);
- e("flash.events.KeyboardEvent", b.flash.events.KeyboardEvent);
- e("flash.events.MouseEvent", b.flash.events.MouseEvent);
- e("flash.events.GestureEvent", b.flash.events.GestureEvent);
- e("flash.events.TextEvent", b.flash.events.TextEvent);
- e("flash.events.TimerEvent", b.flash.events.TimerEvent);
- e("flash.events.ProgressEvent", b.flash.events.ProgressEvent);
- e("flash.events.StatusEvent", b.flash.events.StatusEvent);
- e("flash.events.NetStatusEvent", b.flash.events.NetStatusEvent);
- e("flash.events.HTTPStatusEvent", b.flash.events.HTTPStatusEvent);
- e("flash.events.AsyncErrorEvent", b.flash.events.AsyncErrorEvent);
- e("flash.events.UncaughtErrorEvents", b.flash.events.UncaughtErrorEvents);
- e("flash.external.ExternalInterface", b.flash.external.ExternalInterface);
- e("flash.ui.ContextMenu", b.flash.ui.ContextMenu);
- e("flash.ui.ContextMenuItem", b.flash.ui.ContextMenuItem);
- e("flash.ui.ContextMenuBuiltInItems", b.flash.ui.ContextMenuBuiltInItems);
- e("flash.ui.ContextMenuClipboardItems", b.flash.ui.ContextMenuClipboardItems);
- e("flash.ui.Keyboard", b.flash.ui.Keyboard);
- e("flash.ui.Mouse", b.flash.ui.Mouse);
- e("flash.ui.MouseCursorData", b.flash.ui.MouseCursorData);
- e("flash.ui.GameInput", b.flash.ui.GameInput);
- e("flash.events.GameInputEvent", b.flash.events.GameInputEvent);
- e("flash.ui.GameInputControl", b.flash.ui.GameInputControl);
- e("flash.ui.GameInputControlType", b.flash.ui.GameInputControlType);
- e("flash.ui.GameInputDevice", b.flash.ui.GameInputDevice);
- e("flash.ui.GameInputFinger", b.flash.ui.GameInputFinger);
- e("flash.ui.GameInputHand", b.flash.ui.GameInputHand);
- e("flash.ui.Multitouch", b.flash.ui.Multitouch);
- e("flash.ui.MultitouchInputMode", b.flash.ui.MultitouchInputMode);
- e("flash.events.TouchEvent", b.flash.events.TouchEvent);
- e("flash.text.Font", b.flash.text.Font);
- e("flash.text.TextField", b.flash.text.TextField);
- e("flash.text.StaticText", b.flash.text.StaticText);
- e("flash.text.StyleSheet", b.flash.text.StyleSheet);
- e("flash.text.TextFormat", b.flash.text.TextFormat);
- e("flash.text.TextRun", b.flash.text.TextRun);
- e("flash.text.TextSnapshot", b.flash.text.TextSnapshot);
- e("flash.text.TextLineMetrics", b.flash.text.TextLineMetrics);
- e("flash.media.Sound", b.flash.media.Sound);
- e("flash.media.SoundChannel", b.flash.media.SoundChannel);
- e("flash.media.SoundMixer", b.flash.media.SoundMixer);
- e("flash.media.SoundTransform", b.flash.media.SoundTransform);
- e("flash.media.Video", b.flash.media.Video);
- e("flash.media.StageVideo", b.flash.media.StageVideo);
- e("flash.media.ID3Info", b.flash.media.ID3Info);
- e("flash.media.Microphone", b.flash.media.Microphone);
- e("flash.media.Camera", b.flash.media.Camera);
- e("flash.net.FileFilter", b.flash.net.FileFilter);
- e("flash.net.FileReference", b.flash.net.FileReference);
- e("flash.net.FileReferenceList", b.flash.net.FileReferenceList);
- e("flash.net.NetConnection", b.flash.net.NetConnection);
- e("flash.net.NetStream", b.flash.net.NetStream);
- e("flash.net.NetStreamInfo", b.flash.net.NetStreamInfo);
- e("flash.net.Responder", b.flash.net.Responder);
- e("flash.net.URLRequest", b.flash.net.URLRequest);
- e("flash.net.URLRequestHeader", b.flash.net.URLRequestHeader);
- e("flash.net.URLStream", b.flash.net.URLStream);
- e("flash.net.URLLoader", b.flash.net.URLLoader);
- e("flash.net.SharedObject", b.flash.net.SharedObject);
- e("flash.net.ObjectEncoding", b.flash.net.ObjectEncoding);
- e("flash.net.LocalConnection", b.flash.net.LocalConnection);
- e("flash.net.Socket", b.flash.net.Socket);
- e("flash.net.URLVariables", b.flash.net.URLVariables);
- e("flash.system.Capabilities", b.flash.system.Capabilities);
- e("flash.system.Security", b.flash.system.Security);
- e("flash.system.System", b.flash.system.System);
- e("flash.system.SecurityDomain", b.flash.system.SecurityDomain);
- e("flash.system.ApplicationDomain", b.flash.system.ApplicationDomain);
- e("flash.system.JPEGLoaderContext", b.flash.system.JPEGLoaderContext);
- e("flash.system.LoaderContext", b.flash.system.LoaderContext);
- e("flash.accessibility.Accessibility", b.flash.accessibility.Accessibility);
- e("flash.accessibility.AccessibilityProperties", b.flash.accessibility.AccessibilityProperties);
- e("flash.utils.Timer", b.flash.utils.Timer);
- e("flash.utils.ByteArray", b.flash.utils.ByteArray);
- e("flash.xml.XMLNode", b.flash.xml.XMLNode);
- e("flash.xml.XMLDocument", b.flash.xml.XMLDocument);
- b.registerNativeFunction("flash.system.fscommand", b.flash.system.fscommand);
- b.constructClassFromSymbol = function(b, e) {
- var h = Object.create(e.tPrototype);
- h._symbol || (h._symbol = b);
- h.applySymbol();
- return h;
- };
- })(b.AS || (b.AS = {}));
- })(e.AVMX || (e.AVMX = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load Flash TS Dependencies");
-console.time("Load AVM1 Dependencies");
-var Shumway$$inline_403 = Shumway || (Shumway = {}), AVM1$$inline_404 = Shumway$$inline_403.AVM1 || (Shumway$$inline_403.AVM1 = {}), Option$$inline_405 = Shumway$$inline_403.Options.Option, avm1Options$$inline_406 = Shumway$$inline_403.Settings.shumwayOptions.register(new Shumway$$inline_403.Options.OptionSet("AVM1"));
-AVM1$$inline_404.avm1TraceEnabled = avm1Options$$inline_406.register(new Option$$inline_405("t1", "traceAvm1", "boolean", !1, "trace AVM1 execution"));
-AVM1$$inline_404.avm1ErrorsEnabled = avm1Options$$inline_406.register(new Option$$inline_405("e1", "errorsAvm1", "boolean", !1, "fail on AVM1 warnings and errors"));
-AVM1$$inline_404.avm1TimeoutDisabled = avm1Options$$inline_406.register(new Option$$inline_405("ha1", "nohangAvm1", "boolean", !1, "disable fail on AVM1 hang"));
-AVM1$$inline_404.avm1CompilerEnabled = avm1Options$$inline_406.register(new Option$$inline_405("ca1", "compileAvm1", "boolean", !0, "compiles AVM1 code"));
-AVM1$$inline_404.avm1DebuggerEnabled = avm1Options$$inline_406.register(new Option$$inline_405("da1", "debugAvm1", "boolean", !1, "allows AVM1 code debugging"));
-AVM1$$inline_404.avm1WellknownActionsCompilationsEnabled = avm1Options$$inline_406.register(new Option$$inline_405("cw1", "wellknownAvm1", "boolean", !0, "Replaces well-known actions patterns instead of compilation"));
-(function(e) {
- (function(b) {
- var e = function() {
- function b(e, h) {
- this.array = e;
- this.position = 0;
- this.end = e.length;
- this.readANSI = 6 > h;
- var l = new ArrayBuffer(4);
- (new Int32Array(l))[0] = 1;
- if (!(new Uint8Array(l))[0]) {
- throw Error("big-endian platform");
- }
- }
- b.prototype.readUI8 = function() {
- return this.array[this.position++];
- };
- b.prototype.readUI16 = function() {
- var b = this.position, e = this.array, e = e[b + 1] << 8 | e[b];
- this.position = b + 2;
- return e;
- };
- b.prototype.readSI16 = function() {
- var b = this.position, e = this.array, e = e[b + 1] << 8 | e[b];
- this.position = b + 2;
- return 32768 > e ? e : e - 65536;
- };
- b.prototype.readInteger = function() {
- var b = this.position, e = this.array, e = e[b] | e[b + 1] << 8 | e[b + 2] << 16 | e[b + 3] << 24;
- this.position = b + 4;
- return e;
- };
- b.prototype.readFloat = function() {
- var b = this.position, e = this.array, h = new ArrayBuffer(4), d = new Uint8Array(h);
- d[0] = e[b];
- d[1] = e[b + 1];
- d[2] = e[b + 2];
- d[3] = e[b + 3];
- this.position = b + 4;
- return (new Float32Array(h))[0];
- };
- b.prototype.readDouble = function() {
- var b = this.position, e = this.array, h = new ArrayBuffer(8), d = new Uint8Array(h);
- d[4] = e[b];
- d[5] = e[b + 1];
- d[6] = e[b + 2];
- d[7] = e[b + 3];
- d[0] = e[b + 4];
- d[1] = e[b + 5];
- d[2] = e[b + 6];
- d[3] = e[b + 7];
- this.position = b + 8;
- return (new Float64Array(h))[0];
- };
- b.prototype.readBoolean = function() {
- return !!this.readUI8();
- };
- b.prototype.readANSIString = function() {
- for (var b = "", e;e = this.readUI8();) {
- b += String.fromCharCode(e);
- }
- return b;
- };
- b.prototype.readUTF8String = function() {
- for (var b = "", e;e = this.readUI8();) {
- if (128 > e) {
- b += String.fromCharCode(e);
- } else {
- if (128 === (e & 192)) {
- b += String.fromCharCode(e);
- } else {
- var h = this.position - 1, d = 192, a = 5;
- do {
- var c = d >> 1 | 128;
- if ((e & c) === d) {
- break;
- }
- d = c;
- --a;
- } while (0 <= a);
- d = e & (1 << a) - 1;
- for (c = 5;c >= a;--c) {
- if (e = this.readUI8(), 128 !== (e & 192)) {
- for (e = this.position - 1, this.position = h;this.position < e;) {
- b += String.fromCharCode(this.readUI8());
- }
- } else {
- d = d << 6 | e & 63;
- }
- }
- b = 65536 <= d ? b + String.fromCharCode(d - 65536 >> 10 & 1023 | 55296, d & 1023 | 56320) : b + String.fromCharCode(d);
- }
- }
- }
- return b;
- };
- b.prototype.readString = function() {
- return this.readANSI ? this.readANSIString() : this.readUTF8String();
- };
- b.prototype.readBytes = function(b) {
- var e = this.position, h = Math.max(this.end - e, 0);
- h < b && (b = h);
- h = this.array.subarray(e, e + b);
- this.position = e + b;
- return h;
- };
- return b;
- }();
- b.ActionsDataStream = e;
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var h = e.AVM1.ActionsDataStream;
- (function(b) {
- b[b.None = 0] = "None";
- b[b.ActionGotoFrame = 129] = "ActionGotoFrame";
- b[b.ActionGetURL = 131] = "ActionGetURL";
- b[b.ActionNextFrame = 4] = "ActionNextFrame";
- b[b.ActionPreviousFrame = 5] = "ActionPreviousFrame";
- b[b.ActionPlay = 6] = "ActionPlay";
- b[b.ActionStop = 7] = "ActionStop";
- b[b.ActionToggleQuality = 8] = "ActionToggleQuality";
- b[b.ActionStopSounds = 9] = "ActionStopSounds";
- b[b.ActionWaitForFrame = 138] = "ActionWaitForFrame";
- b[b.ActionSetTarget = 139] = "ActionSetTarget";
- b[b.ActionGoToLabel = 140] = "ActionGoToLabel";
- b[b.ActionPush = 150] = "ActionPush";
- b[b.ActionPop = 23] = "ActionPop";
- b[b.ActionAdd = 10] = "ActionAdd";
- b[b.ActionSubtract = 11] = "ActionSubtract";
- b[b.ActionMultiply = 12] = "ActionMultiply";
- b[b.ActionDivide = 13] = "ActionDivide";
- b[b.ActionEquals = 14] = "ActionEquals";
- b[b.ActionLess = 15] = "ActionLess";
- b[b.ActionAnd = 16] = "ActionAnd";
- b[b.ActionOr = 17] = "ActionOr";
- b[b.ActionNot = 18] = "ActionNot";
- b[b.ActionStringEquals = 19] = "ActionStringEquals";
- b[b.ActionStringLength = 20] = "ActionStringLength";
- b[b.ActionMBStringLength = 49] = "ActionMBStringLength";
- b[b.ActionStringAdd = 33] = "ActionStringAdd";
- b[b.ActionStringExtract = 21] = "ActionStringExtract";
- b[b.ActionMBStringExtract = 53] = "ActionMBStringExtract";
- b[b.ActionStringLess = 41] = "ActionStringLess";
- b[b.ActionToInteger = 24] = "ActionToInteger";
- b[b.ActionCharToAscii = 50] = "ActionCharToAscii";
- b[b.ActionMBCharToAscii = 54] = "ActionMBCharToAscii";
- b[b.ActionAsciiToChar = 51] = "ActionAsciiToChar";
- b[b.ActionMBAsciiToChar = 55] = "ActionMBAsciiToChar";
- b[b.ActionJump = 153] = "ActionJump";
- b[b.ActionIf = 157] = "ActionIf";
- b[b.ActionCall = 158] = "ActionCall";
- b[b.ActionGetVariable = 28] = "ActionGetVariable";
- b[b.ActionSetVariable = 29] = "ActionSetVariable";
- b[b.ActionGetURL2 = 154] = "ActionGetURL2";
- b[b.ActionGotoFrame2 = 159] = "ActionGotoFrame2";
- b[b.ActionSetTarget2 = 32] = "ActionSetTarget2";
- b[b.ActionGetProperty = 34] = "ActionGetProperty";
- b[b.ActionSetProperty = 35] = "ActionSetProperty";
- b[b.ActionCloneSprite = 36] = "ActionCloneSprite";
- b[b.ActionRemoveSprite = 37] = "ActionRemoveSprite";
- b[b.ActionStartDrag = 39] = "ActionStartDrag";
- b[b.ActionEndDrag = 40] = "ActionEndDrag";
- b[b.ActionWaitForFrame2 = 141] = "ActionWaitForFrame2";
- b[b.ActionTrace = 38] = "ActionTrace";
- b[b.ActionGetTime = 52] = "ActionGetTime";
- b[b.ActionRandomNumber = 48] = "ActionRandomNumber";
- b[b.ActionCallFunction = 61] = "ActionCallFunction";
- b[b.ActionCallMethod = 82] = "ActionCallMethod";
- b[b.ActionConstantPool = 136] = "ActionConstantPool";
- b[b.ActionDefineFunction = 155] = "ActionDefineFunction";
- b[b.ActionDefineLocal = 60] = "ActionDefineLocal";
- b[b.ActionDefineLocal2 = 65] = "ActionDefineLocal2";
- b[b.ActionDelete = 58] = "ActionDelete";
- b[b.ActionDelete2 = 59] = "ActionDelete2";
- b[b.ActionEnumerate = 70] = "ActionEnumerate";
- b[b.ActionEquals2 = 73] = "ActionEquals2";
- b[b.ActionGetMember = 78] = "ActionGetMember";
- b[b.ActionInitArray = 66] = "ActionInitArray";
- b[b.ActionInitObject = 67] = "ActionInitObject";
- b[b.ActionNewMethod = 83] = "ActionNewMethod";
- b[b.ActionNewObject = 64] = "ActionNewObject";
- b[b.ActionSetMember = 79] = "ActionSetMember";
- b[b.ActionTargetPath = 69] = "ActionTargetPath";
- b[b.ActionWith = 148] = "ActionWith";
- b[b.ActionToNumber = 74] = "ActionToNumber";
- b[b.ActionToString = 75] = "ActionToString";
- b[b.ActionTypeOf = 68] = "ActionTypeOf";
- b[b.ActionAdd2 = 71] = "ActionAdd2";
- b[b.ActionLess2 = 72] = "ActionLess2";
- b[b.ActionModulo = 63] = "ActionModulo";
- b[b.ActionBitAnd = 96] = "ActionBitAnd";
- b[b.ActionBitLShift = 99] = "ActionBitLShift";
- b[b.ActionBitOr = 97] = "ActionBitOr";
- b[b.ActionBitRShift = 100] = "ActionBitRShift";
- b[b.ActionBitURShift = 101] = "ActionBitURShift";
- b[b.ActionBitXor = 98] = "ActionBitXor";
- b[b.ActionDecrement = 81] = "ActionDecrement";
- b[b.ActionIncrement = 80] = "ActionIncrement";
- b[b.ActionPushDuplicate = 76] = "ActionPushDuplicate";
- b[b.ActionReturn = 62] = "ActionReturn";
- b[b.ActionStackSwap = 77] = "ActionStackSwap";
- b[b.ActionStoreRegister = 135] = "ActionStoreRegister";
- b[b.ActionInstanceOf = 84] = "ActionInstanceOf";
- b[b.ActionEnumerate2 = 85] = "ActionEnumerate2";
- b[b.ActionStrictEquals = 102] = "ActionStrictEquals";
- b[b.ActionGreater = 103] = "ActionGreater";
- b[b.ActionStringGreater = 104] = "ActionStringGreater";
- b[b.ActionDefineFunction2 = 142] = "ActionDefineFunction2";
- b[b.ActionExtends = 105] = "ActionExtends";
- b[b.ActionCastOp = 43] = "ActionCastOp";
- b[b.ActionImplementsOp = 44] = "ActionImplementsOp";
- b[b.ActionTry = 143] = "ActionTry";
- b[b.ActionThrow = 42] = "ActionThrow";
- b[b.ActionFSCommand2 = 45] = "ActionFSCommand2";
- b[b.ActionStrictMode = 137] = "ActionStrictMode";
- })(b.ActionCode || (b.ActionCode = {}));
- var n = function() {
- return function(b) {
- this.registerNumber = b;
- };
- }();
- b.ParsedPushRegisterAction = n;
- var t = function() {
- return function(b) {
- this.constantIndex = b;
- };
- }();
- b.ParsedPushConstantAction = t;
- (function(b) {
- b[b.None = 0] = "None";
- b[b.Argument = 1] = "Argument";
- b[b.This = 2] = "This";
- b[b.Arguments = 4] = "Arguments";
- b[b.Super = 8] = "Super";
- b[b.Global = 16] = "Global";
- b[b.Parent = 32] = "Parent";
- b[b.Root = 64] = "Root";
- })(b.ArgumentAssignmentType || (b.ArgumentAssignmentType = {}));
- var m = function() {
- function d(a, b) {
- this._actionsData = a;
- this.dataId = a.id;
- this._stream = new h(a.bytes, b);
- }
- Object.defineProperty(d.prototype, "position", {get:function() {
- return this._stream.position;
- }, set:function(a) {
- this._stream.position = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "eof", {get:function() {
- return this._stream.position >= this._stream.end;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(d.prototype, "length", {get:function() {
- return this._stream.end;
- }, enumerable:!0, configurable:!0});
- d.prototype.readNext = function() {
- var a = this._stream, c = a.position, d = a.readUI8(), e = 128 <= d ? a.readUI16() : 0, e = a.position + e, h = null;
- switch(d | 0) {
- case 129:
- var m = a.readUI16(), h = a.readUI8(), q = !1;
- 6 !== h && 7 !== h ? a.position-- : (e++, q = 6 === h);
- h = [m, q];
- break;
- case 131:
- m = a.readString();
- h = a.readString();
- h = [m, h];
- break;
- case 138:
- var m = a.readUI16(), g = a.readUI8(), h = [m, g];
- break;
- case 139:
- h = [a.readString()];
- break;
- case 140:
- m = a.readString();
- h = a.readUI8();
- q = !1;
- 6 !== h && 7 !== h ? a.position-- : (e++, q = 6 === h);
- h = [m, q];
- break;
- case 150:
- for (h = [];a.position < e;) {
- m = a.readUI8();
- switch(m | 0) {
- case 0:
- m = a.readString();
- break;
- case 1:
- m = a.readFloat();
- break;
- case 2:
- m = null;
- break;
- case 3:
- m = void 0;
- break;
- case 4:
- m = new n(a.readUI8());
- break;
- case 5:
- m = a.readBoolean();
- break;
- case 6:
- m = a.readDouble();
- break;
- case 7:
- m = a.readInteger();
- break;
- case 8:
- m = new t(a.readUI8());
- break;
- case 9:
- m = new t(a.readUI16());
- break;
- default:
- console.error("Unknown value type: " + m);
- a.position = e;
- continue;
- }
- h.push(m);
- }
- break;
- case 153:
- m = a.readSI16();
- h = [m];
- break;
- case 157:
- m = a.readSI16();
- h = [m];
- break;
- case 154:
- m = a.readUI8();
- h = [m];
- break;
- case 159:
- m = a.readUI8();
- h = [m];
- m & 2 && h.push(a.readUI16());
- break;
- case 141:
- g = a.readUI8();
- h = [g];
- break;
- case 136:
- for (var g = a.readUI16(), m = [], p = 0;p < g;p++) {
- m.push(a.readString());
- }
- h = [m];
- break;
- case 155:
- h = a.readString();
- g = a.readUI16();
- q = [];
- for (p = 0;p < g;p++) {
- q.push(a.readString());
- }
- m = a.readUI16();
- e += m;
- m = new b.AVM1ActionsData(a.readBytes(m), this.dataId + "_f" + a.position, this._actionsData);
- h = [m, h, q];
- break;
- case 148:
- m = a.readUI16();
- e += m;
- h = [new b.AVM1ActionsData(a.readBytes(m), this.dataId + "_w" + a.position, this._actionsData)];
- break;
- case 135:
- var v = a.readUI8(), h = [v];
- break;
- case 142:
- for (var h = a.readString(), g = a.readUI16(), z = a.readUI8(), m = a.readUI16(), B = [], q = [], p = 0;p < g;p++) {
- var v = a.readUI8(), E = a.readString();
- q.push(E);
- v && (B[v] = {type:1, name:E, index:p});
- }
- g = 1;
- m & 1 && (B[g++] = {type:2});
- m & 4 && (B[g++] = {type:4});
- m & 16 && (B[g++] = {type:8});
- m & 64 && (B[g++] = {type:64});
- m & 128 && (B[g++] = {type:32});
- m & 256 && (B[g++] = {type:16});
- g = 0;
- m & 2 && (g |= 2);
- m & 8 && (g |= 4);
- m & 32 && (g |= 8);
- m = a.readUI16();
- e += m;
- m = new b.AVM1ActionsData(a.readBytes(m), this.dataId + "_f" + a.position, this._actionsData);
- h = [m, h, q, z, B, g];
- break;
- case 143:
- m = a.readUI8();
- h = !!(m & 4);
- q = !!(m & 2);
- m = !!(m & 1);
- g = a.readUI16();
- p = a.readUI16();
- B = a.readUI16();
- z = h ? a.readUI8() : a.readString();
- e += g + p + B;
- g = new b.AVM1ActionsData(a.readBytes(g), this.dataId + "_t" + a.position, this._actionsData);
- p = new b.AVM1ActionsData(a.readBytes(p), this.dataId + "_c" + a.position, this._actionsData);
- B = new b.AVM1ActionsData(a.readBytes(B), this.dataId + "_z" + a.position, this._actionsData);
- h = [h, z, g, m, p, q, B];
- break;
- case 137:
- h = [a.readUI8()];
- }
- a.position = e;
- return {position:c, actionCode:d, actionName:l[d], args:h};
- };
- d.prototype.skip = function(a) {
- for (var b = this._stream;0 < a && b.position < b.end;) {
- var d = 128 <= b.readUI8() ? b.readUI16() : 0;
- b.position += d;
- a--;
- }
- };
- return d;
- }();
- b.ActionsDataParser = m;
- var l = {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"};
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var e = function() {
- function b() {
- this.parentResults = null;
- this.registersLimit = 0;
- }
- b.prototype.analyze = function(b) {
- for (var e = [], h = [0], d = [!0], a = !1, c = null, f = [0];0 < f.length;) {
- var k = f.shift();
- if (!e[k]) {
- for (b.position = k;!b.eof && !e[k];) {
- var r = b.readNext();
- if (0 === r.actionCode) {
- break;
- }
- var n = b.position, q = {action:r, next:n, conditionalJumpTo:-1}, g = 0, p = !1, v = !1;
- switch(r.actionCode) {
- case 138:
- ;
- case 141:
- p = !0;
- b.skip(138 === r.actionCode ? r.args[1] : r.args[0]);
- g = b.position;
- b.position = n;
- break;
- case 153:
- p = v = !0;
- g = n + r.args[0];
- break;
- case 157:
- p = !0;
- g = n + r.args[0];
- break;
- case 42:
- ;
- case 62:
- ;
- case 0:
- p = v = !0;
- g = b.length;
- break;
- case 136:
- if (a) {
- c = null;
- break;
- }
- a = !0;
- 0 === k && (c = r.args[0]);
- }
- if (p) {
- if (0 > g || g > b.length) {
- console.error("jump outside the action block;"), g = b.length;
- }
- v ? q.next = g : q.conditionalJumpTo = g;
- d[g] || (h.push(g), f.push(g), d[g] = !0);
- }
- e[k] = q;
- if (v) {
- break;
- }
- k = n;
- }
- }
- }
- var z = [];
- h.forEach(function(a) {
- if (e[a]) {
- var b = [], c = a;
- do {
- c = e[c], b.push(c), c = c.next;
- } while (!d[c] && e[c]);
- z.push({label:a, items:b, jump:c});
- }
- });
- h = null;
- a ? h = c : this.parentResults && (h = this.parentResults.singleConstantPool);
- return {actions:e, blocks:z, dataId:b.dataId, singleConstantPool:h, registersLimit:this.registersLimit};
- };
- return b;
- }();
- b.ActionsDataAnalyzer = e;
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- function h(a) {
- }
- function n(a, b, c) {
- return b instanceof k ? void 0 !== c ? b.alDefaultValue(c) : b.alDefaultValue() : b;
- }
- function t(a, b) {
- "object" === typeof b && null !== b && (b = n(a, b, 0));
- switch(typeof b) {
- case "undefined":
- return 7 <= a.swfVersion ? NaN : 0;
- case "object":
- return null === b ? 7 <= a.swfVersion ? NaN : 0 : 5 <= a.swfVersion ? NaN : 0;
- case "boolean":
- return b ? 1 : 0;
- case "number":
- return b;
- case "string":
- return "" === b && 5 > a.swfVersion ? 0 : +b;
- }
- }
- function m(a, b) {
- var c = t(a, b);
- return isNaN(c) ? 0 : 0 === c || c === Number.POSITIVE_INFINITY || c === Number.NEGATIVE_INFINITY ? c : 0 > c ? Math.ceil(c) : Math.floor(c);
- }
- function l(a, b) {
- "object" === typeof b && null !== b && (b = n(a, b, 1));
- switch(typeof b) {
- case "undefined":
- return 7 <= a.swfVersion ? "undefined" : "";
- case "object":
- return null === b ? "null" : "[type " + d(b) + "]";
- case "boolean":
- return b ? "true" : "false";
- case "number":
- return b + "";
- case "string":
- return b;
- }
- }
- function d(a) {
- return a instanceof r ? "Function" : "Object";
- }
- function a(a) {
- return a instanceof r;
- }
- function c(a, b, c) {
- if (!(b instanceof k && c instanceof k)) {
- return !1;
- }
- for (a = c.alGetPrototypeProperty();b;b = b.alPrototype) {
- if (b === a) {
- return !0;
- }
- }
- return !1;
- }
- var f = function() {
- return function() {
- };
- }();
- b.NullPrototypeObject = f;
- f.prototype = Object.create(null);
- (function(a) {
- a[a.DONT_ENUM = 1] = "DONT_ENUM";
- a[a.DONT_DELETE = 2] = "DONT_DELETE";
- a[a.READ_ONLY = 4] = "READ_ONLY";
- a[a.DATA = 64] = "DATA";
- a[a.ACCESSOR = 128] = "ACCESSOR";
- a[a.ASSETPROP_MASK = a.DONT_DELETE | a.DONT_ENUM | a.READ_ONLY] = "ASSETPROP_MASK";
- })(b.AVM1PropertyFlags || (b.AVM1PropertyFlags = {}));
- (function(a) {
- a[a.NUMBER = 0] = "NUMBER";
- a[a.STRING = 1] = "STRING";
- })(b.AVM1DefaultValueHint || (b.AVM1DefaultValueHint = {}));
- var k = function(b) {
- function c(a) {
- b.call(this);
- this._avm1Context = a;
- this._ownProperties = Object.create(null);
- this._prototype = null;
- var d = this;
- this.alSetOwnProperty("__proto__", {flags:131, get:{alCall:function(a, b) {
- return d.alPrototype;
- }}, set:{alCall:function(a, b) {
- d.alPrototype = b[0];
- }}});
- }
- __extends(c, b);
- Object.defineProperty(c.prototype, "context", {get:function() {
- return this._avm1Context;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "alPrototype", {get:function() {
- return this._prototype;
- }, set:function(a) {
- for (var b = a;b;) {
- if (b === this) {
- return;
- }
- b = b.alPrototype;
- }
- this._prototype = a;
- }, enumerable:!0, configurable:!0});
- c.prototype.alGetPrototypeProperty = function() {
- return this.alGet("prototype");
- };
- c.prototype.alSetOwnPrototypeProperty = function(a) {
- this.alSetOwnProperty("prototype", {flags:65, value:a});
- };
- c.prototype.alGetConstructorProperty = function() {
- return this.alGet("__constructor__");
- };
- c.prototype.alSetOwnConstructorProperty = function(a) {
- this.alSetOwnProperty("__constructor__", {flags:65, value:a});
- };
- c.prototype._escapeProperty = function(a) {
- var b = this.context;
- a = l(b, a);
- b.isPropertyCaseSensitive || (a = a.toLowerCase());
- "_" === a[0] && (a = "__avm1" + a);
- return a;
- };
- c.prototype._unescapeProperty = function(a) {
- "_" === a[0] && 0 === a.indexOf("__avm1") && (a = a.substring(6));
- return a;
- };
- c.prototype._debugEscapeProperty = function(a) {
- var b = this.context;
- a = l(b, a);
- b.isPropertyCaseSensitive || (a = a.toLowerCase());
- return "$Bg" + a;
- };
- c.prototype.alGetOwnProperty = function(a) {
- a = this._escapeProperty(a);
- return this._ownProperties[a];
- };
- c.prototype.alSetOwnProperty = function(a, b) {
- var c = this._escapeProperty(a);
- this._ownProperties[c] = b;
- };
- c.prototype.alHasOwnProperty = function(a) {
- a = this._escapeProperty(a);
- return !!this._ownProperties[a];
- };
- c.prototype.alDeleteOwnProperty = function(a) {
- a = this._escapeProperty(a);
- delete this._ownProperties[a];
- };
- c.prototype.alGetOwnPropertiesKeys = function() {
- var a = [], b;
- for (b in this._ownProperties) {
- if (!(this._ownProperties[b].flags & 1)) {
- var c = this._unescapeProperty(b);
- a.push(c);
- }
- }
- return a;
- };
- c.prototype.alGetProperty = function(a) {
- var b = this.alGetOwnProperty(a);
- return b ? b : this._prototype ? this._prototype.alGetProperty(a) : void 0;
- };
- c.prototype.alGet = function(a) {
- if (a = this.alGetProperty(a)) {
- return a.flags & 64 ? a.value : (a = a.get) ? a.alCall(this) : void 0;
- }
- };
- c.prototype.alCanPut = function(a) {
- var b = this.alGetOwnProperty(a);
- return b ? b.flags & 128 ? !!b.set : !(b.flags & 4) : (b = this._prototype) ? b.alCanPut(a) : !0;
- };
- c.prototype.alPut = function(a, b) {
- if (this.alCanPut(a)) {
- var c = this.alGetOwnProperty(a);
- if (c && c.flags & 64) {
- c.watcher && (b = c.watcher.callback.alCall(this, [c.watcher.name, c.value, b, c.watcher.userData])), c = {flags:c.flags, value:b}, this.alSetOwnProperty(a, c);
- } else {
- if ((c = this.alGetProperty(a)) && c.flags & 128) {
- if (c.watcher) {
- var d = c.get ? c.get.alCall(this) : void 0;
- b = c.watcher.callback.alCall(this, [c.watcher.name, d, b, c.watcher.userData]);
- }
- c.set.alCall(this, [b]);
- } else {
- c && c.watcher && (b = c.watcher.callback.alCall(this, [c.watcher.name, c.value, b, c.watcher.userData])), c = {flags:c ? c.flags : 64, value:b}, this.alSetOwnProperty(a, c);
- }
- }
- }
- };
- c.prototype.alHasProperty = function(a) {
- return !!this.alGetProperty(a);
- };
- c.prototype.alDeleteProperty = function(a) {
- var b = this.alGetOwnProperty(a);
- if (!b) {
- return !0;
- }
- if (b.flags & 2) {
- return !1;
- }
- this.alDeleteOwnProperty(a);
- return !0;
- };
- c.prototype.alAddPropertyWatcher = function(a, b, c) {
- var d = this.alGetProperty(a);
- if (!d) {
- return !1;
- }
- d.watcher = {name:a, callback:b, userData:c};
- return !0;
- };
- c.prototype.alRemotePropertyWatcher = function(a) {
- a = this.alGetProperty(a);
- if (!a || !a.watcher) {
- return !1;
- }
- a.watcher = void 0;
- return !0;
- };
- c.prototype.alDefaultValue = function(b) {
- void 0 === b && (b = 0);
- if (1 === b) {
- b = this.alGet("toString");
- if (a(b)) {
- return b = b.alCall(this);
- }
- b = this.alGet("valueOf");
- } else {
- b = this.alGet("valueOf");
- if (a(b)) {
- return b = b.alCall(this);
- }
- b = this.alGet("toString");
- }
- return a(b) ? b = b.alCall(this) : this;
- };
- c.prototype.alGetKeys = function() {
- var a = this.alGetOwnPropertiesKeys(), b = this._prototype;
- if (!b) {
- return a;
- }
- b = b.alGetKeys();
- if (0 === a.length) {
- return b;
- }
- for (var c = Object.create(null), d = 0;d < a.length;d++) {
- c[a[d]] = !0;
- }
- for (d = 0;d < b.length;d++) {
- c[b[d]] = !0;
- }
- return Object.getOwnPropertyNames(c);
- };
- return c;
- }(f);
- b.AVM1Object = k;
- var r = function(a) {
- function b(c) {
- a.call(this, c);
- this.alPrototype = c.builtins.Function.alGetPrototypeProperty();
- }
- __extends(b, a);
- b.prototype.alConstruct = function(a) {
- throw Error("not implemented AVM1Function.alConstruct");
- };
- b.prototype.alCall = function(a, b) {
- throw Error("not implemented AVM1Function.alCall");
- };
- b.prototype.toJSFunction = function(a) {
- void 0 === a && (a = null);
- var b = this, c = this.context;
- return function() {
- var d = Array.prototype.slice.call(arguments, 0);
- return c.executeFunction(b, a, d);
- };
- };
- return b;
- }(k);
- b.AVM1Function = r;
- var u = function(a) {
- function b(c, d, f) {
- a.call(this, c);
- this._fn = d;
- f && (this._ctor = f);
- }
- __extends(b, a);
- b.prototype.alConstruct = function(a) {
- if (!this._ctor) {
- throw Error("not a constructor");
- }
- return this._ctor.apply(this, a);
- };
- b.prototype.alCall = function(a, b) {
- if (!this._fn) {
- throw Error("not callable");
- }
- return this._fn.apply(a, b);
- };
- return b;
- }(r);
- b.AVM1NativeFunction = u;
- f = function(a) {
- function b(c) {
- a.call(this, c);
- var d = new k(c);
- d.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- d.alSetOwnProperty("constructor", {flags:67});
- this.alSetOwnPrototypeProperty(d);
- }
- __extends(b, a);
- b.prototype.alConstruct = function(a) {
- var b = new k(this.context), c = this.alGetPrototypeProperty();
- c instanceof k || (c = this.context.builtins.Object.alGetPrototypeProperty());
- b.alPrototype = c;
- b.alSetOwnConstructorProperty(this);
- a = this.alCall(b, a);
- return a instanceof k ? a : b;
- };
- return b;
- }(r);
- b.AVM1EvalFunction = f;
- h.prototype = Object.create(Error.prototype);
- b.alToPrimitive = n;
- b.alToBoolean = function(a, b) {
- switch(typeof b) {
- case "undefined":
- return !1;
- case "object":
- return null !== b;
- case "boolean":
- return b;
- case "string":
- ;
- case "number":
- return !!b;
- }
- };
- b.alToNumber = t;
- b.alToInteger = m;
- b.alToInt32 = function(a, b) {
- return t(a, b) | 0;
- };
- b.alToString = l;
- b.alToObject = function(a, c) {
- switch(typeof c) {
- case "undefined":
- throw new h;;
- case "object":
- if (null === c) {
- throw new h;
- }
- return Array.isArray(c) ? new b.Natives.AVM1ArrayNative(a, c) : c;
- case "boolean":
- return new b.Natives.AVM1BooleanNative(a, c);
- case "number":
- return new b.Natives.AVM1NumberNative(a, c);
- case "string":
- return new b.Natives.AVM1StringNative(a, c);
- }
- };
- b.alNewObject = function(a) {
- var b = new k(a);
- b.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- b.alSetOwnConstructorProperty(a.builtins.Object);
- return b;
- };
- b.alGetObjectClass = d;
- b.alCoerceString = function(a, b) {
- return b instanceof k ? l(a, b) : e.AVMX.axCoerceString(b);
- };
- b.alCoerceNumber = function(a, b) {
- return e.isNullOrUndefined(b) ? void 0 : t(a, b);
- };
- b.alIsIndex = function(a, b) {
- return b instanceof k ? e.isIndex(l(a, b)) : e.isIndex(b);
- };
- b.alForEachProperty = function(a, b, c) {
- a.alGetKeys().forEach(b, c);
- };
- b.alIsFunction = a;
- b.alCallProperty = function(a, b, c) {
- a.alGet(b).alCall(a, c);
- };
- b.alInstanceOf = c;
- b.alIsArray = function(a, b) {
- return c(a, b, a.builtins.Array);
- };
- b.alIsArrayLike = function(a, b) {
- if (!(b instanceof k)) {
- return !1;
- }
- var c = m(a, b.alGet("length"));
- return isNaN(c) || 0 > c || 4294967296 <= c ? !1 : !0;
- };
- b.alIterateArray = function(a, b, c, d) {
- void 0 === d && (d = null);
- a = m(a, b.alGet("length"));
- if (!(isNaN(a) || 4294967296 <= a)) {
- for (var f = 0;f < a;f++) {
- c.call(d, b.alGet(f), f);
- }
- }
- };
- b.alIsString = function(a, b) {
- return "string" === typeof b;
- };
- b.alDefineObjectProperties = function(a, b) {
- var c = a.context;
- Object.getOwnPropertyNames(b).forEach(function(d) {
- var f = b[d], e, k, h, l = 0;
- "object" === typeof f ? (f.get || f.set ? (k = f.get ? new u(c, f.get) : void 0, h = f.set ? new u(c, f.set) : void 0, l |= 128) : (e = f.value, "function" === typeof e && (e = new u(c, e)), l |= 64, f.writable || (l |= 4)), f.enumerable || (l |= 1), f.configurable || (l |= 2)) : (e = f, "function" === typeof e && (e = new u(c, e)), l |= 71);
- a.alSetOwnProperty(d, k || h ? {flags:l, get:k, set:h} : {flags:l, value:e});
- });
- };
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b) {
- if (a instanceof b) {
- return a;
- }
- throw Error("Invalid type");
- }
- var t = function(a) {
- function c(b) {
- a.call(this, b);
- }
- __extends(c, a);
- c.prototype._initializePrototype = function() {
- b.alDefineObjectProperties(this, {constructor:{value:this.context.builtins.Object, writable:!0}, valueOf:{value:this._valueOf, writable:!0}, toString:{value:this._toString, writable:!0}, addProperty:{value:this.addProperty}, hasOwnProperty:{value:this.hasOwnProperty}, isPropertyEnumerable:{value:this.isPropertyEnumerable}, isPrototypeOf:{value:this.isPrototypeOf}, unwatch:{value:this.unwatch}, watch:{value:this.watch}});
- };
- c.prototype._valueOf = function() {
- return this;
- };
- c.prototype._toString = function() {
- return b.alIsFunction(this) ? "[type " + b.alGetObjectClass(this) + "]" : "[object " + b.alGetObjectClass(this) + "]";
- };
- c.prototype.addProperty = function(a, c, d) {
- if ("string" !== typeof a || "" === a || !b.alIsFunction(c) || !b.alIsFunction(d) && null !== d) {
- return !1;
- }
- var f = this.alGetOwnProperty(a);
- if (f && f.flags & 2) {
- return !1;
- }
- this.alSetOwnProperty(a, {flags:128, get:c, set:d || void 0});
- return !0;
- };
- c.prototype.hasOwnProperty = function(a) {
- return this.alHasOwnProperty(a);
- };
- c.prototype.isPropertyEnumerable = function(a) {
- return !(this.alGetProperty(a).flags & 1);
- };
- c.prototype.isPrototypeOf = function(a) {
- return b.alInstanceOf(this.context, this, a);
- };
- c.prototype.unwatch = function(a) {
- a = b.alCoerceString(this.context, a);
- return this.alRemotePropertyWatcher(a);
- };
- c.prototype.watch = function(a, c, d) {
- a = b.alCoerceString(this.context, a);
- return b.alIsFunction(c) ? this.alAddPropertyWatcher(a, c, d) : !1;
- };
- return c;
- }(b.AVM1Object), m = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {prototype:{value:d}, registerClass:{value:this.registerClass}});
- }
- __extends(c, a);
- c.prototype.registerClass = function(a, b) {
- this.context.registerClass(a, b);
- };
- c.prototype.alConstruct = function(a) {
- if (a) {
- a = a[0];
- if (a instanceof b.AVM1Object) {
- return a;
- }
- switch(typeof a) {
- case "string":
- ;
- case "boolean":
- ;
- case "number":
- return b.alToObject(this.context, a);
- }
- }
- return b.alNewObject(this.context);
- };
- c.prototype.alCall = function(a, c) {
- return c && null !== c[0] && void 0 !== c[0] ? b.alToObject(this.context, c[0]) : b.alNewObject(this.context);
- };
- return c;
- }(b.AVM1Function);
- h.AVM1ObjectFunction = m;
- var l = function(a) {
- function c(b) {
- a.call(this, b);
- }
- __extends(c, a);
- c.prototype._initializePrototype = function() {
- var a = this.context;
- this.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:a.builtins.Function, writable:!0}, call:this.call, apply:this.apply});
- };
- c.prototype.call = function(a) {
- for (var c = [], d = 1;d < arguments.length;d++) {
- c[d - 1] = arguments[d];
- }
- return n(this, b.AVM1Function).alCall(a, c);
- };
- c.prototype.apply = function(a, c) {
- var d = n(this, b.AVM1Function), f = c ? n(c, z).value : void 0;
- return d.alCall(a, f);
- };
- return c;
- }(b.AVM1Object), d = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = d.builtins.Function.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {prototype:{value:d}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- return a ? a[0] : void 0;
- };
- c.prototype.alCall = function(a, b) {
- return b ? b[0] : void 0;
- };
- return c;
- }(b.AVM1Function);
- h.AVM1FunctionFunction = d;
- var a = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Boolean.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(c.builtins.Boolean);
- this.value = d;
- }
- __extends(b, a);
- b.prototype.valueOf = function() {
- return this.value;
- };
- return b;
- }(b.AVM1Object);
- h.AVM1BooleanNative = a;
- var c = function(c) {
- function d(a) {
- c.call(this, a);
- this.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:a.builtins.Boolean, writable:!0}, valueOf:{value:this._valueOf, writable:!0}, toString:{value:this._toString, writable:!0}});
- }
- __extends(d, c);
- d.prototype._valueOf = function() {
- return n(this, a).value;
- };
- d.prototype._toString = function() {
- return n(this, a).value ? "true" : "false";
- };
- return d;
- }(b.AVM1Object);
- h.AVM1BooleanPrototype = c;
- var f = function(d) {
- function f(a) {
- d.call(this, a);
- this.alPrototype = a.builtins.Function.alGetPrototypeProperty();
- a = new c(a);
- b.alDefineObjectProperties(this, {prototype:{value:a}});
- }
- __extends(f, d);
- f.prototype.alConstruct = function(c) {
- c = c ? b.alToBoolean(this.context, c[0]) : !1;
- return new a(this.context, c);
- };
- f.prototype.alCall = function(a, c) {
- return c ? b.alToBoolean(this.context, c[0]) : !1;
- };
- return f;
- }(b.AVM1Function);
- h.AVM1BooleanFunction = f;
- var k = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Number.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(c.builtins.Number);
- this.value = d;
- }
- __extends(b, a);
- b.prototype.valueOf = function() {
- return this.value;
- };
- return b;
- }(b.AVM1Object);
- h.AVM1NumberNative = k;
- var r = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d.builtins.Number, writable:!0}, valueOf:{value:this._valueOf, writable:!0}, toString:{value:this._toString, writable:!0}});
- }
- __extends(c, a);
- c.prototype._valueOf = function() {
- return n(this, k).value;
- };
- c.prototype._toString = function(a) {
- return n(this, k).value.toString(a || 10);
- };
- return c;
- }(b.AVM1Object);
- h.AVM1NumberPrototype = r;
- var u = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = new r(d);
- b.alDefineObjectProperties(this, {prototype:{value:d}, MAX_VALUE:Number.MAX_VALUE, MIN_VALUE:Number.MIN_VALUE, NaN:Number.NaN, NEGATIVE_INFINITY:Number.NEGATIVE_INFINITY, POSITIVE_INFINITY:Number.POSITIVE_INFINITY});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- a = a ? b.alToNumber(this.context, a[0]) : 0;
- return new k(this.context, a);
- };
- c.prototype.alCall = function(a, c) {
- return c ? b.alToNumber(this.context, c[0]) : 0;
- };
- return c;
- }(b.AVM1Function);
- h.AVM1NumberFunction = u;
- var q = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.String.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(c.builtins.String);
- this.value = d;
- }
- __extends(b, a);
- b.prototype.toString = function() {
- return this.value;
- };
- return b;
- }(b.AVM1Object);
- h.AVM1StringNative = q;
- var g = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d.builtins.String, writable:!0}, valueOf:{value:this._valueOf, writable:!0}, toString:{value:this._toString, writable:!0}, length:{get:this.getLength}, charAt:{value:this.charAt, writable:!0}, charCodeAt:{value:this.charCodeAt, writable:!0}, concat:{value:this.concat, writable:!0}, indexOf:{value:this.indexOf, writable:!0}, lastIndexOf:{value:this.lastIndexOf, writable:!0}, slice:{value:this.slice, writable:!0}, split:{value:this.split,
- writable:!0}, substr:{value:this.substr, writable:!0}, substring:{value:this.substring, writable:!0}, toLowerCase:{value:this.toLowerCase, writable:!0}, toUpperCase:{value:this.toUpperCase, writable:!0}});
- }
- __extends(c, a);
- c.prototype._valueOf = function() {
- return n(this, q).value;
- };
- c.prototype._toString = function() {
- return n(this, q).value;
- };
- c.prototype.getLength = function() {
- return n(this, q).value.length;
- };
- c.prototype.charAt = function(a) {
- return b.alToString(this.context, this).charAt(b.alToInteger(this.context, a));
- };
- c.prototype.charCodeAt = function(a) {
- return b.alToString(this.context, this).charCodeAt(b.alToInteger(this.context, a));
- };
- c.prototype.concat = function() {
- for (var a = [], c = 0;c < arguments.length;c++) {
- a[c - 0] = arguments[c];
- }
- for (var c = [b.alToString(this.context, this)], d = 0;d < a.length;++d) {
- c.push(b.alToString(this.context, a[d]));
- }
- return c.join("");
- };
- c.prototype.indexOf = function(a, c) {
- var d = b.alToString(this.context, this);
- a = b.alToString(this.context, a);
- c = b.alToInteger(this.context, c);
- return d.indexOf(a, c);
- };
- c.prototype.lastIndexOf = function(a, c) {
- var d = b.alToString(this.context, this);
- a = b.alToString(this.context, a);
- c = 2 > arguments.length ? NaN : b.alToNumber(this.context, c);
- return 0 > c ? -1 : d.lastIndexOf(a, isNaN(c) ? void 0 : c);
- };
- c.prototype.slice = function(a, c) {
- if (0 !== arguments.length) {
- var d = b.alToString(this.context, this);
- a = b.alToInteger(this.context, a);
- c = void 0 === c ? void 0 : b.alToInteger(this.context, c);
- return d.slice(a, c);
- }
- };
- c.prototype.split = function(a, c) {
- var d = b.alToString(this.context, this);
- a = b.alToString(this.context, a);
- c = (void 0 === c ? -1 : b.alToInt32(this.context, c)) >>> 0;
- return new z(this.context, d.split(a, c));
- };
- c.prototype.substr = function(a, c) {
- var d = b.alToString(this.context, this), f = d.length;
- a = b.alToInteger(this.context, a);
- c = void 0 === c ? f : b.alToInteger(this.context, c);
- 0 > a && (a = Math.max(0, f + a));
- if (0 > c) {
- if (-c <= a) {
- return "";
- }
- c = Math.max(0, f + c);
- }
- return d.substr(a, c);
- };
- c.prototype.substring = function(a, c) {
- var d = b.alToString(this.context, this);
- a = b.alToInteger(this.context, a);
- if (a >= d.length) {
- return "";
- }
- c = void 0 === c ? void 0 : b.alToInteger(this.context, c);
- return d.substring(a, c);
- };
- c.prototype.toLowerCase = function() {
- return b.alToString(this.context, this).toLowerCase();
- };
- c.prototype.toUpperCase = function() {
- return b.alToString(this.context, this).toUpperCase();
- };
- return c;
- }(b.AVM1Object);
- h.AVM1StringPrototype = g;
- var p = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = new g(d);
- b.alDefineObjectProperties(this, {prototype:{value:d}, fromCharCode:{value:this.fromCharCode}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- a = a ? b.alToString(this.context, a[0]) : "";
- return new q(this.context, a);
- };
- c.prototype.alCall = function(a, c) {
- return c ? b.alToString(this.context, c[0]) : "";
- };
- c.prototype.fromCharCode = function() {
- for (var a = this, c = [], d = 0;d < arguments.length;d++) {
- c[d - 0] = arguments[d];
- }
- c = c.map(function(c) {
- return b.alToInt32(a.context, c) & 65535;
- });
- return String.fromCharCode.apply(String, c);
- };
- return c;
- }(b.AVM1Function);
- h.AVM1StringFunction = p;
- var v = {flags:64, value:void 0}, z = function(a) {
- function c(b, d) {
- a.call(this, b);
- this.alPrototype = b.builtins.Array.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(b.builtins.Array);
- this.value = d;
- }
- __extends(c, a);
- c.prototype.alGetOwnProperty = function(c) {
- if (b.alIsIndex(this.context, c)) {
- var d = b.alToInt32(this.context, c);
- if (Object.getOwnPropertyDescriptor(this.value, d)) {
- return v.value = this.value[d], v;
- }
- }
- return a.prototype.alGetOwnProperty.call(this, c);
- };
- c.prototype.alSetOwnProperty = function(c, d) {
- if (b.alIsIndex(this.context, c)) {
- var f = b.alToInt32(this.context, c);
- if (!(d.flags & 64) || d.flags & 1 || d.flags & 2) {
- throw Error("Special property is non-supported for array");
- }
- this.value[f] = d.value;
- } else {
- a.prototype.alSetOwnProperty.call(this, c, d);
- }
- };
- c.prototype.alDeleteOwnProperty = function(c) {
- b.alIsIndex(this.context, c) ? (c = b.alToInt32(this.context, c), delete this.value[c]) : a.prototype.alDeleteOwnProperty.call(this, c);
- };
- c.prototype.alGetOwnPropertiesKeys = function() {
- var b = a.prototype.alGetOwnPropertiesKeys.call(this), c = [], d;
- for (d in this.value) {
- c.push(d);
- }
- return c.concat(b);
- };
- c.mapToJSArray = function(a, d, f) {
- if (a instanceof c) {
- return a.value.map(d, f);
- }
- if (!b.alIsArrayLike(a.context, a)) {
- throw Error("Invalid type");
- }
- var g = [];
- b.alIterateArray(a.context, a, function(a, b) {
- g.push(d.call(f, a, b));
- });
- return g;
- };
- return c;
- }(b.AVM1Object);
- h.AVM1ArrayNative = z;
- var B;
- (function(a) {
- a[a.CASEINSENSITIVE = 1] = "CASEINSENSITIVE";
- a[a.DESCENDING = 2] = "DESCENDING";
- a[a.UNIQUESORT = 4] = "UNIQUESORT";
- a[a.RETURNINDEXEDARRAY = 8] = "RETURNINDEXEDARRAY";
- a[a.NUMERIC = 16] = "NUMERIC";
- })(B || (B = {}));
- var E = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d.builtins.Array, writable:!0}, join:{value:this.join, writable:!0}, length:{get:this.getLength, set:this.setLength}, concat:{value:this.concat, writable:!0}, pop:{value:this.pop, writable:!0}, push:{value:this.push, writable:!0}, shift:{value:this.shift, writable:!0}, slice:{value:this.slice, writable:!0}, splice:{value:this.splice, writable:!0}, sort:{value:this.sort, writable:!0}, sortOn:{value:this.sortOn, writable:!0}, toString:{value:this._toString,
- writable:!0}, unshift:{value:this.unshift, writable:!0}});
- }
- __extends(c, a);
- c.prototype._toString = function() {
- return this.context.builtins.Array.alGetPrototypeProperty().alGet("join").alCall(this);
- };
- c.prototype.getLength = function() {
- return n(this, z).value.length;
- };
- c.prototype.setLength = function(a) {
- e.isIndex(a) && (a = b.alToInt32(this.context, a) >>> 0, n(this, z).value.length = a);
- };
- c.prototype.concat = function() {
- for (var a = [], c = 0;c < arguments.length;c++) {
- a[c - 0] = arguments[c];
- }
- if (this instanceof z) {
- for (var d = n(this, z).value, c = 0;c < d.length;c++) {
- a[c] instanceof z && (a[c] = n(a[c], z).value);
- }
- return new z(this.context, Array.prototype.concat.apply(d, a));
- }
- for (var f = [], d = this, g = b.alIsArrayLike(this.context, this), c = 0;;) {
- g ? b.alIterateArray(this.context, d, function(a) {
- return f.push(a);
- }) : f.push(b.alToString(this.context, d));
- if (c >= a.length) {
- break;
- }
- d = a[c++];
- g = b.alIsArray(this.context, d);
- }
- return new z(this.context, f);
- };
- c.prototype.join = function(a) {
- a = void 0 === a ? "," : b.alCoerceString(this.context, a);
- if (this instanceof z) {
- var c = n(this, z).value;
- if (0 === c.length) {
- return "";
- }
- if (c.every(function(a) {
- return !(a instanceof b.AVM1Object);
- })) {
- return c.join(a);
- }
- }
- var c = this.context, d = b.alToInt32(c, this.alGet("length")) >>> 0;
- if (0 === d) {
- return "";
- }
- for (var f = [], g = 0;g < d;g++) {
- var e = this.alGet(g);
- f[g] = null === e || void 0 === e ? "" : b.alCoerceString(c, e);
- }
- return f.join(a);
- };
- c.prototype.pop = function() {
- if (this instanceof z) {
- return n(this, z).value.pop();
- }
- var a = b.alToInt32(this.context, this.alGet("length")) >>> 0;
- if (0 !== a) {
- var a = a - 1, c = this.alGet(a);
- this.alDeleteProperty(a);
- this.alPut("length", a);
- return c;
- }
- };
- c.prototype.push = function() {
- for (var a = [], c = 0;c < arguments.length;c++) {
- a[c - 0] = arguments[c];
- }
- if (this instanceof z) {
- return c = n(this, z).value, Array.prototype.push.apply(c, a);
- }
- for (var c = b.alToInt32(this.context, this.alGet("length")) >>> 0, d = 0;d < a.length;d++) {
- this.alPut(c, a[d]), c++;
- }
- this.alPut("length", c);
- return c;
- };
- c.prototype.shift = function() {
- if (this instanceof z) {
- return n(this, z).value.shift();
- }
- var a = b.alToInt32(this.context, this.alGet("length")) >>> 0;
- if (0 !== a) {
- for (var c = this.alGet(0), d = 1;d < a;d++) {
- this.alHasProperty(d) ? this.alPut(d - 1, this.alGet(d)) : this.alDeleteProperty(d - 1);
- }
- this.alDeleteProperty(a - 1);
- this.alPut("length", a - 1);
- return c;
- }
- };
- c.prototype.slice = function(a, c) {
- a = b.alToInteger(this.context, a);
- c = void 0 !== c ? b.alToInteger(this.context, c) : void 0;
- if (this instanceof z) {
- var d = n(this, z).value;
- return new z(this.context, d.slice(a, c));
- }
- var d = [], f = b.alToInt32(this.context, this.alGet("length")) >>> 0;
- a = 0 > a ? Math.max(f + a, 0) : Math.min(f, a);
- c = void 0 === c ? f : 0 > c ? Math.max(f + c, 0) : Math.min(f, c);
- for (var f = a, g = 0;f < c;f++, g++) {
- this.alHasProperty(f) && (d[g] = this.alGet(f));
- }
- return new z(this.context, d);
- };
- c.prototype.splice = function(a, c) {
- for (var d = [], f = 2;f < arguments.length;f++) {
- d[f - 2] = arguments[f];
- }
- a = b.alToInteger(this.context, a);
- c = b.alToInteger(this.context, c);
- if (this instanceof z) {
- return f = n(this, z).value, new z(this.context, Array.prototype.splice.apply(f, [a, c].concat(d)));
- }
- var f = [], g = b.alToInt32(this.context, this.alGet("length")) >>> 0;
- a = 0 > a ? Math.max(g + a, 0) : Math.min(g, a);
- c = Math.min(Math.max(c, 0), g - a);
- for (var e = 0;e < c;e++) {
- this.alHasProperty(a + e) && (f[e] = this.alGet(a + e));
- }
- var k = d.length - c;
- if (0 > k) {
- for (e = a - k;e < g;e++) {
- this.alHasProperty(e) ? this.alPut(e + k, this.alGet(e)) : this.alDeleteProperty(e + k);
- }
- for (e = k;0 > e;e++) {
- this.alDeleteProperty(g + e);
- }
- } else {
- if (0 < k) {
- for (e = g - 1;e >= a + k;e--) {
- this.alHasProperty(e) ? this.alPut(e + k, this.alGet(e)) : this.alDeleteProperty(e + k);
- }
- }
- }
- for (e = 0;e < d.length;e++) {
- this.alPut(a + e, d[e]);
- }
- this.alPut("length", g + k);
- return new z(this.context, f);
- };
- c.prototype.sort = function(a) {
- var c = n(this, z).value;
- if (b.alIsFunction(a)) {
- var d = [void 0, void 0];
- c.sort(function(b, c) {
- d[0] = b;
- d[1] = c;
- return a.alCall(null, d);
- });
- } else {
- c.sort();
- }
- return this;
- };
- c.prototype.sortOn = function(a, c) {
- var d = this.context, f = [], g = [];
- if (b.alIsString(d, a)) {
- f = [b.alToString(d, a)], g = [b.alToInt32(d, c)];
- } else {
- if (b.alIsArray(d, a)) {
- var f = [], g = [], e = b.alIsArray(d, c) ? c : null, k = b.alToInteger(d, a.alGet("length"));
- if (e) {
- var h = b.alToInteger(d, e.alGet("length"));
- k !== h && (e = null);
- }
- for (h = 0;h < k;h++) {
- f.push(b.alToString(d, a.alGet(h))), g.push(e ? b.alToInt32(d, e.alGet(h)) : 0);
- }
- } else {
- return;
- }
- }
- n(this, z).value.sort(function(a, c) {
- var e = b.alToObject(d, a), k = b.alToObject(d, c);
- if (!a || !c) {
- return a ? 1 : c ? -1 : 0;
- }
- for (var h = 0;h < f.length;h++) {
- var p = e.alGet(f[h]), l = k.alGet(f[h]);
- g[h] & 16 ? (p = b.alToNumber(d, p), l = b.alToNumber(d, l)) : (p = b.alToString(d, p), l = b.alToString(d, l), g[h] & 1 && (p = p.toLowerCase(), l = l.toLowerCase()));
- l = p < l ? -1 : p > l ? 1 : 0;
- if (0 !== l) {
- return g[h] & 2 ? -l : l;
- }
- }
- return 0;
- });
- return this;
- };
- c.prototype.unshift = function() {
- for (var a = [], c = 0;c < arguments.length;c++) {
- a[c - 0] = arguments[c];
- }
- if (this instanceof z) {
- return c = n(this, z).value, Array.prototype.unshift.apply(c, a);
- }
- for (var c = b.alToInt32(this.context, this.alGet("length")) >>> 0, d = a.length, f = c - 1;0 <= f;f--) {
- this.alHasProperty(f) ? this.alPut(f + d, this.alGet(f)) : this.alDeleteProperty(f + d);
- }
- for (f = 0;f < a.length;f++) {
- this.alPut(f, a[f]);
- }
- c += d;
- this.alPut("length", c);
- return c;
- };
- return c;
- }(b.AVM1Object);
- h.AVM1ArrayPrototype = E;
- var A = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = new E(d);
- b.alDefineObjectProperties(this, {prototype:{value:d}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- if (!a) {
- return new z(this.context, []);
- }
- if (1 === a.length && "number" === typeof a[0]) {
- a = a[0];
- if (a >>> 0 !== a) {
- throw Error("Range error");
- }
- return new z(this.context, Array(a));
- }
- return new z(this.context, a);
- };
- c.prototype.alCall = function(a, b) {
- return this.alConstruct.apply(this, b);
- };
- return c;
- }(b.AVM1Function);
- h.AVM1ArrayFunction = A;
- var G = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {E:Math.E, LN10:Math.LN10, LN2:Math.LN2, LOG10E:Math.LOG10E, LOG2E:Math.LOG2E, PI:Math.PI, SQRT1_2:Math.SQRT1_2, SQRT2:Math.SQRT2, abs:this.abs, acos:this.acos, asin:this.asin, atan:this.atan, atan2:this.atan2, ceil:this.ceil, cos:this.cos, exp:this.exp, floor:this.floor, log:this.log, max:this.max, min:this.min, pow:this.pow, random:this.random, round:this.round, sin:this.sin, sqrt:this.sqrt, tan:this.tan});
- }
- __extends(c, a);
- c.prototype.abs = function(a) {
- return Math.abs(b.alToNumber(this.context, a));
- };
- c.prototype.acos = function(a) {
- return Math.acos(b.alToNumber(this.context, a));
- };
- c.prototype.asin = function(a) {
- return Math.asin(b.alToNumber(this.context, a));
- };
- c.prototype.atan = function(a) {
- return Math.atan(b.alToNumber(this.context, a));
- };
- c.prototype.atan2 = function(a, c) {
- return Math.atan2(b.alToNumber(this.context, a), b.alToNumber(this.context, c));
- };
- c.prototype.ceil = function(a) {
- return Math.ceil(b.alToNumber(this.context, a));
- };
- c.prototype.cos = function(a) {
- return Math.cos(b.alToNumber(this.context, a));
- };
- c.prototype.exp = function(a) {
- return Math.exp(b.alToNumber(this.context, a));
- };
- c.prototype.floor = function(a) {
- return Math.floor(b.alToNumber(this.context, a));
- };
- c.prototype.log = function(a) {
- return Math.log(b.alToNumber(this.context, a));
- };
- c.prototype.max = function() {
- for (var a = this, c = [], d = 0;d < arguments.length;d++) {
- c[d - 0] = arguments[d];
- }
- c = c.map(function(c) {
- return b.alToNumber(a.context, c);
- });
- return Math.max.apply(null, c);
- };
- c.prototype.min = function() {
- for (var a = this, c = [], d = 0;d < arguments.length;d++) {
- c[d - 0] = arguments[d];
- }
- c = c.map(function(c) {
- return b.alToNumber(a.context, c);
- });
- return Math.min.apply(null, c);
- };
- c.prototype.pow = function(a, c) {
- return Math.pow(b.alToNumber(this.context, a), b.alToNumber(this.context, c));
- };
- c.prototype.random = function() {
- return Math.random();
- };
- c.prototype.round = function(a) {
- return Math.round(b.alToNumber(this.context, a));
- };
- c.prototype.sin = function(a) {
- return Math.sin(b.alToNumber(this.context, a));
- };
- c.prototype.sqrt = function(a) {
- return Math.sqrt(b.alToNumber(this.context, a));
- };
- c.prototype.tan = function(a) {
- return Math.tan(b.alToNumber(this.context, a));
- };
- return c;
- }(b.AVM1Object), w = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Date.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(c.builtins.Date);
- this.value = d;
- }
- __extends(b, a);
- b.prototype.alDefaultValue = function(b) {
- return void 0 !== b ? a.prototype.alDefaultValue.call(this, b) : 6 <= this.context.swfVersion ? a.prototype.alDefaultValue.call(this, 1) : a.prototype.alDefaultValue.call(this, 0);
- };
- return b;
- }(b.AVM1Object), y = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d.builtins.Date, writable:!0}, valueOf:{value:this._valueOf, writable:!0}, toString:{value:this._toString, writable:!0}, toLocaleString:{value:this._toLocaleString, writable:!0}, toDateString:{value:this.toDateString, writable:!0}, toTimeString:{value:this.toTimeString, writable:!0}, toLocaleDateString:{value:this.toLocaleDateString, writable:!0}, toLocaleTimeString:{value:this.toLocaleTimeString, writable:!0}, getTime:{value:this.getTime,
- writable:!0}, getFullYear:{value:this.getFullYear, writable:!0}, getUTCFullYear:{value:this.getUTCFullYear, writable:!0}, getMonth:{value:this.getMonth, writable:!0}, getUTCMonth:{value:this.getUTCMonth, writable:!0}, getDate:{value:this.getDate, writable:!0}, getUTCDate:{value:this.getUTCDate, writable:!0}, getDay:{value:this.getDay, writable:!0}, getUTCDay:{value:this.getUTCDay, writable:!0}, getHours:{value:this.getHours, writable:!0}, getUTCHours:{value:this.getUTCHours, writable:!0},
- getMinutes:{value:this.getMinutes, writable:!0}, getUTCMinutes:{value:this.getUTCMinutes, writable:!0}, getSeconds:{value:this.getSeconds, writable:!0}, getUTCSeconds:{value:this.getUTCSeconds, writable:!0}, getMilliseconds:{value:this.getMilliseconds, writable:!0}, getUTCMilliseconds:{value:this.getUTCMilliseconds, writable:!0}, getTimezoneOffset:{value:this.getTimezoneOffset, writable:!0}, setTime:{value:this.setTime, writable:!0}, setMilliseconds:{value:this.setMilliseconds, writable:!0},
- setUTCMilliseconds:{value:this.setUTCMilliseconds, writable:!0}, setSeconds:{value:this.setSeconds, writable:!0}, setUTCSeconds:{value:this.setUTCSeconds, writable:!0}, setMinutes:{value:this.setMinutes, writable:!0}, setUTCMinutes:{value:this.setUTCMinutes, writable:!0}, setHours:{value:this.setHours, writable:!0}, setUTCHours:{value:this.setUTCHours, writable:!0}, setDate:{value:this.setDate, writable:!0}, setUTCDate:{value:this.setUTCDate, writable:!0}, setMonth:{value:this.setMonth,
- writable:!0}, setUTCMonth:{value:this.setUTCMonth, writable:!0}, setFullYear:{value:this.setFullYear, writable:!0}, setUTCFullYear:{value:this.setUTCFullYear, writable:!0}, toUTCString:{value:this.toUTCString, writable:!0}});
- }
- __extends(c, a);
- c.prototype._valueOf = function() {
- return n(this, w).value.valueOf();
- };
- c.prototype._toString = function() {
- return n(this, w).value.toString();
- };
- c.prototype._toLocaleString = function() {
- return n(this, w).value.toLocaleString();
- };
- c.prototype.toDateString = function() {
- return n(this, w).value.toDateString();
- };
- c.prototype.toTimeString = function() {
- return n(this, w).value.toTimeString();
- };
- c.prototype.toLocaleDateString = function() {
- return n(this, w).value.toLocaleDateString();
- };
- c.prototype.toLocaleTimeString = function() {
- return n(this, w).value.toLocaleTimeString();
- };
- c.prototype.getTime = function() {
- return n(this, w).value.getTime();
- };
- c.prototype.getFullYear = function() {
- return n(this, w).value.getFullYear();
- };
- c.prototype.getUTCFullYear = function() {
- return n(this, w).value.getUTCFullYear();
- };
- c.prototype.getMonth = function() {
- return n(this, w).value.getMonth();
- };
- c.prototype.getUTCMonth = function() {
- return n(this, w).value.getUTCMonth();
- };
- c.prototype.getDate = function() {
- return n(this, w).value.getDate();
- };
- c.prototype.getUTCDate = function() {
- return n(this, w).value.getUTCDate();
- };
- c.prototype.getDay = function() {
- return n(this, w).value.getDay();
- };
- c.prototype.getUTCDay = function() {
- return n(this, w).value.getUTCDay();
- };
- c.prototype.getHours = function() {
- return n(this, w).value.getHours();
- };
- c.prototype.getUTCHours = function() {
- return n(this, w).value.getUTCHours();
- };
- c.prototype.getMinutes = function() {
- return n(this, w).value.getMinutes();
- };
- c.prototype.getUTCMinutes = function() {
- return n(this, w).value.getUTCMinutes();
- };
- c.prototype.getSeconds = function() {
- return n(this, w).value.getSeconds();
- };
- c.prototype.getUTCSeconds = function() {
- return n(this, w).value.getUTCSeconds();
- };
- c.prototype.getMilliseconds = function() {
- return n(this, w).value.getMilliseconds();
- };
- c.prototype.getUTCMilliseconds = function() {
- return n(this, w).value.getUTCMilliseconds();
- };
- c.prototype.getTimezoneOffset = function() {
- return n(this, w).value.getTimezoneOffset();
- };
- c.prototype.setTime = function(a) {
- a = b.alToNumber(this.context, a);
- return n(this, w).value.setTime(a);
- };
- c.prototype.setMilliseconds = function(a) {
- a = b.alToNumber(this.context, a);
- return n(this, w).value.setMilliseconds(a);
- };
- c.prototype.setUTCMilliseconds = function(a) {
- a = b.alToNumber(this.context, a);
- return n(this, w).value.setUTCMilliseconds(a);
- };
- c.prototype.setSeconds = function(a, c) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setSeconds(a);
- }
- c = b.alToNumber(this.context, c);
- return n(this, w).value.setSeconds(a, c);
- };
- c.prototype.setUTCSeconds = function(a, c) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setUTCSeconds(a);
- }
- c = b.alToNumber(this.context, c);
- return n(this, w).value.setUTCSeconds(a, c);
- };
- c.prototype.setMinutes = function(a, c, d) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setMinutes(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setMinutes(a, c);
- }
- d = b.alToNumber(this.context, d);
- return n(this, w).value.setMinutes(a, c, d);
- };
- c.prototype.setUTCMinutes = function(a, c, d) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setUTCMinutes(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setUTCMinutes(a, c);
- }
- d = b.alToNumber(this.context, d);
- return n(this, w).value.setUTCMinutes(a, c, d);
- };
- c.prototype.setHours = function(a, c, d, f) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setHours(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setHours(a, c);
- }
- d = b.alToNumber(this.context, d);
- if (3 >= arguments.length) {
- return n(this, w).value.setHours(a, c, d);
- }
- f = b.alToNumber(this.context, f);
- return n(this, w).value.setHours(a, c, d, f);
- };
- c.prototype.setUTCHours = function(a, c, d, f) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setUTCHours(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setUTCHours(a, c);
- }
- d = b.alToNumber(this.context, d);
- if (3 >= arguments.length) {
- return n(this, w).value.setUTCHours(a, c, d);
- }
- f = b.alToNumber(this.context, f);
- return n(this, w).value.setUTCHours(a, c, d, f);
- };
- c.prototype.setDate = function(a) {
- a = b.alToNumber(this.context, a);
- return n(this, w).value.setDate(a);
- };
- c.prototype.setUTCDate = function(a) {
- a = b.alToNumber(this.context, a);
- return n(this, w).value.setUTCDate(a);
- };
- c.prototype.setMonth = function(a, c) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setMonth(a);
- }
- c = b.alToNumber(this.context, c);
- return n(this, w).value.setMonth(a, c);
- };
- c.prototype.setUTCMonth = function(a, c) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setUTCMonth(a);
- }
- c = b.alToNumber(this.context, c);
- return n(this, w).value.setUTCMonth(a, c);
- };
- c.prototype.setFullYear = function(a, c, d) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setFullYear(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setFullYear(a, c);
- }
- d = b.alToNumber(this.context, d);
- return n(this, w).value.setFullYear(a, c, d);
- };
- c.prototype.setUTCFullYear = function(a, c, d) {
- a = b.alToNumber(this.context, a);
- if (1 >= arguments.length) {
- return n(this, w).value.setUTCFullYear(a);
- }
- c = b.alToNumber(this.context, c);
- if (2 >= arguments.length) {
- return n(this, w).value.setUTCFullYear(a, c);
- }
- d = b.alToNumber(this.context, d);
- return n(this, w).value.setUTCFullYear(a, c, d);
- };
- c.prototype.toUTCString = function() {
- return n(this, w).value.toUTCString();
- };
- return c;
- }(b.AVM1Object), C = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = new y(d);
- b.alDefineObjectProperties(this, {prototype:{value:d}, UTC:{value:this._UTC, writable:!0}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- var c = this.context;
- switch(a.length) {
- case 0:
- a = new Date;
- break;
- case 1:
- a = new Date(b.alToPrimitive(c, a[0]));
- break;
- default:
- for (var d = [], f = 0;f < a.length;f++) {
- d.push(b.alToNumber(c, a[f]));
- }
- a = new Date(b.alToNumber(c, a[0]), b.alToNumber(c, a[1]), 2 < a.length ? b.alToNumber(c, a[2]) : 1, 3 < a.length ? b.alToNumber(c, a[3]) : 0, 4 < a.length ? b.alToNumber(c, a[4]) : 0, 5 < a.length ? b.alToNumber(c, a[5]) : 0, 6 < a.length ? b.alToNumber(c, a[6]) : 0);
- }
- return new w(c, a);
- };
- c.prototype.alCall = function(a, c) {
- return b.alCallProperty(this.alConstruct.apply(this, c), "toString");
- };
- c.prototype._UTC = function(a, c, d, f, g, e) {
- var k = this.context;
- return Date.UTC(b.alToNumber(k, arguments[0]), b.alToNumber(k, arguments[1]), 2 < arguments.length ? b.alToNumber(k, arguments[2]) : 1, 3 < arguments.length ? b.alToNumber(k, arguments[3]) : 0, 4 < arguments.length ? b.alToNumber(k, arguments[4]) : 0, 5 < arguments.length ? b.alToNumber(k, arguments[5]) : 0, 6 < arguments.length ? b.alToNumber(k, arguments[6]) : 0);
- };
- return c;
- }(b.AVM1Function), x = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Error.alGetPrototypeProperty();
- this.alSetOwnConstructorProperty(c.builtins.Error);
- void 0 !== d && this.alPut("message", d);
- }
- __extends(b, a);
- return b;
- }(b.AVM1Object);
- h.AVM1ErrorNative = x;
- var M = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d.builtins.Error, writable:!0}, name:{value:"Error", writable:!0}, message:{value:"Error", writable:!0}, toString:{value:this._toString, writable:!0}});
- }
- __extends(c, a);
- c.prototype._toString = function() {
- return this.alGet("message");
- };
- return c;
- }(b.AVM1Object);
- h.AVM1ErrorPrototype = M;
- var I = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPrototype = d.builtins.Function.alGetPrototypeProperty();
- d = new M(d);
- b.alDefineObjectProperties(this, {prototype:{value:d}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- a = a && void 0 !== a[0] ? b.alCoerceString(this.context, a[0]) : void 0;
- return new x(this.context, a);
- };
- c.prototype.alCall = function(a, c) {
- var d = c && void 0 !== c[0] ? b.alCoerceString(this.context, c[0]) : void 0;
- return new x(this.context, d);
- };
- return c;
- }(b.AVM1Function);
- h.AVM1ErrorFunction = I;
- h.installBuiltins = function(a) {
- var c = a.builtins, g = new t(a), e = new b.AVM1Object(a);
- e.alSetOwnPrototypeProperty(g);
- c.Object = e;
- var e = new l(a), k = new b.AVM1Object(a);
- k.alSetOwnPrototypeProperty(e);
- c.Function = k;
- g._initializePrototype();
- e._initializePrototype();
- c.Object = new m(a);
- c.Function = new d(a);
- c.Boolean = new f(a);
- c.Number = new u(a);
- c.String = new p(a);
- c.Array = new A(a);
- c.Date = new C(a);
- c.Math = new G(a);
- c.Error = new I(a);
- };
- })(b.Natives || (b.Natives = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var h = function() {
- return function(b, e, d) {
- void 0 === d && (d = null);
- this.bytes = b;
- this.id = e;
- this.parent = d;
- this.compiled = this.ir = null;
- };
- }();
- b.AVM1ActionsData = h;
- var n = function() {
- function b() {
- this._cache = new WeakMap;
- }
- b.prototype.createActionsData = function(b, d, a) {
- void 0 === a && (a = null);
- var c = this._cache.get(b);
- c || (c = new h(b, d, a), this._cache.set(b, c));
- return c;
- };
- return b;
- }();
- b.ActionsDataFactory = n;
- var t = function() {
- function h(b) {
- this.swfVersion = b;
- this.globals = null;
- this.actionsDataFactory = new n;
- this.isPropertyCaseSensitive = 6 < b;
- this.builtins = {};
- e.AVM1.Natives.installBuiltins(this);
- this.eventObservers = Object.create(null);
- this.assets = {};
- this.assetsSymbols = [];
- this.assetsClasses = [];
- this.staticStates = new WeakMap;
- }
- h.prototype.resolveTarget = function(b) {
- };
- h.prototype.resolveRoot = function() {
- };
- h.prototype.checkTimeout = function() {
- };
- h.prototype.executeActions = function(b, d) {
- };
- h.prototype.executeFunction = function(b, d, a) {
- };
- h.prototype._getEventPropertyObservers = function(b, d) {
- this.isPropertyCaseSensitive || (b = b.toLowerCase());
- var a = this.eventObservers[b];
- return a ? a : d ? (a = [], this.eventObservers[b] = a) : null;
- };
- h.prototype.registerEventPropertyObserver = function(b, d) {
- this._getEventPropertyObservers(b, !0).push(d);
- };
- h.prototype.unregisterEventPropertyObserver = function(b, d) {
- var a = this._getEventPropertyObservers(b, !1);
- if (a) {
- var c = a.indexOf(d);
- 0 > c || a.splice(c, 1);
- }
- };
- h.prototype.broadcastEventPropertyChange = function(b) {
- var d = this._getEventPropertyObservers(b, !1);
- d && d.forEach(function(a) {
- return a.onEventPropertyModified(b);
- });
- };
- h.prototype.addAsset = function(b, d, a) {
- this.assets[b.toLowerCase()] = d;
- this.assetsSymbols[d] = a;
- };
- h.prototype.registerClass = function(e, d) {
- e = b.alCoerceString(this, e);
- if (null === e) {
- return this.utils.warn("Cannot register class for symbol: className is missing"), null;
- }
- var a = this.assets[e.toLowerCase()];
- void 0 === a ? this.utils.warn("Cannot register " + e + " class for symbol") : this.assetsClasses[a] = d;
- };
- h.prototype.getSymbolClass = function(b) {
- return this.assetsClasses[b] || null;
- };
- h.prototype.getAsset = function(h) {
- h = b.alCoerceString(this, h);
- if (null !== h && (h = this.assets[h.toLowerCase()], void 0 !== h)) {
- var d = this.assetsSymbols[h];
- if (!d) {
- d = this.loaderInfo.getSymbolById(h);
- if (!d) {
- e.Debug.warning("Symbol " + h + " is not defined.");
- return;
- }
- this.assetsSymbols[h] = d;
- }
- return {symbolId:h, symbolProps:d};
- }
- };
- h.prototype.setStage = function(e) {
- b.Lib.AVM1Key.bindStage(this, this.globals.Key, e);
- b.Lib.AVM1Mouse.bindStage(this, this.globals.Mouse, e);
- b.Lib.AVM1Stage.bindStage(this, this.globals.Stage, e);
- };
- h.prototype.getStaticState = function(b) {
- var d = this.staticStates.get(b);
- if (!d) {
- var d = Object.create(null), a = b.alInitStatic;
- a && a.call(d, this);
- this.staticStates.set(b, d);
- }
- return d;
- };
- h.prototype.resolveLevel = function(e) {
- var d = this.globals.Stage._as3Stage._lookupChildByIndex(e, 2);
- if (d) {
- return b.Lib.getAVM1Object(d._content, this);
- }
- this.utils.warn("Unable to resolve level " + e + " root");
- };
- return h;
- }();
- b.AVM1Context = t;
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a, c, d, f, g) {
- if (b.avm1ErrorsEnabled.value) {
- try {
- throw Error(a);
- } catch (k) {
- }
- }
- e.Debug.warning.apply(console, arguments);
- }
- function n(a) {
- if (null === a) {
- return "null";
- }
- if ("object" === typeof a) {
- if (a instanceof b.Lib.AVM1MovieClip) {
- return "movieclip";
- }
- if (a instanceof b.AVM1Function) {
- return "function";
- }
- }
- return typeof a;
- }
- function t(a, c, d) {
- c = b.alToPrimitive(a, c);
- d = b.alToPrimitive(a, d);
- if ("string" === typeof c && "string" === typeof d) {
- return c = b.alToString(a, c), a = b.alToString(a, d), c < a;
- }
- c = b.alToNumber(a, c);
- a = b.alToNumber(a, d);
- return isNaN(c) || isNaN(a) ? void 0 : c < a;
- }
- function m(a, b) {
- if (e.isNullOrUndefined(a) || e.isNullOrUndefined(b)) {
- return !1;
- }
- if (b === e.AVMX.AS.ASString) {
- return "string" === typeof a;
- }
- if (b === e.AVMX.AS.ASNumber) {
- return "number" === typeof a;
- }
- if (b === e.AVMX.AS.ASBoolean) {
- return "boolean" === typeof a;
- }
- if (b === e.AVMX.AS.ASArray) {
- return Array.isArray(a);
- }
- if (b === e.AVMX.AS.ASFunction) {
- return "function" === typeof a;
- }
- if (b === e.AVMX.AS.ASObject) {
- return "object" === typeof a;
- }
- var c = b.alGetPrototypeProperty();
- if (!c) {
- return !1;
- }
- for (var d = a;d;) {
- if (d === c) {
- return !0;
- }
- d = d.alPrototype;
- }
- return !1;
- }
- function l(a, c, d) {
- return b.alToObject(a, c).alGet(d);
- }
- function d(c, d, f) {
- d = b.alToObject(c, d).alDeleteProperty(f);
- a(c, f);
- return d;
- }
- function a(a, c) {
- c = b.alCoerceString(a, c);
- "o" === c[0] && "n" === c[1] && a.broadcastEventPropertyChange(c);
- }
- function c(a) {
- return "undefined" !== typeof InternalError && a instanceof InternalError && "too much recursion" === a.message ? new ma("long running script -- AVM1 recursion limit is reached") : a;
- }
- function f(a, c) {
- var d;
- if (b.alIsFunction(a)) {
- return d = a.alConstruct(c);
- }
- }
- function k(a, c, d) {
- var f = Object.create(null);
- b.alForEachProperty(a, function(a) {
- f[a] || (c.call(d, a), f[a] = !0);
- }, d);
- }
- function r(a, b, c) {
- if (6 > a.swfVersion) {
- return null;
- }
- a = b.inSequence && b.previousFrame.calleeSuper;
- if (!a) {
- for (a = b.currentThis;a && !a.alHasOwnProperty(c);) {
- a = a.alPrototype;
- }
- if (!a) {
- return null;
- }
- }
- return a = a.alPrototype;
- }
- function u(a, b) {
- if (isNaN(a) || 0 > a) {
- return h("Invalid amount of arguments: " + a), 0;
- }
- a |= 0;
- return a > b ? (h("Truncating amount of arguments: from " + a + " to " + b), b) : a;
- }
- function q(a) {
- for (var b = +a.pop(), b = u(b, a.length), c = [], d = 0;d < b;d++) {
- c.push(a.pop());
- }
- return c;
- }
- function g(a, b) {
- var c = null;
- if (b) {
- try {
- c = E(a, b, !1), p(c) || (h("Invalid AVM1 target object: " + b), c = void 0);
- } catch (d) {
- h("Unable to set target: " + d);
- }
- }
- c ? (a.scopeList.flags |= 2, a.scopeList.replaceTargetBy = c) : (a.scopeList.flags &= -3, a.scopeList.replaceTargetBy = null);
- }
- function p(a) {
- return a instanceof b.AVM1Object && a.isAVM1Instance;
- }
- function v(a, b, c) {
- for (var d, f = Ia;a;a = a.previousScopeItem) {
- !(a.flags & 2) || c & 64 || d || (d = a.replaceTargetBy);
- if (a.flags & 1) {
- if (c & 2) {
- return f.scope = d || a.scope, f.propertyName = b, f.value = c & 32 ? f.scope.alGet(b) : void 0, f;
- }
- if (c & 1 && d) {
- if (d.alHasProperty(b)) {
- return f.scope = d, f.propertyName = b, f.value = c & 32 ? d.alGet(b) : void 0, f;
- }
- continue;
- }
- }
- if (a.scope.alHasProperty(b)) {
- return f.scope = a.scope, f.propertyName = b, f.value = c & 32 ? a.scope.alGet(b) : void 0, f;
- }
- }
- }
- function z(a, c, d) {
- if (!c || !(0 <= c.indexOf(".") || 0 <= c.indexOf(":") || 0 <= c.indexOf("/"))) {
- return v(a.scopeList, c, d);
- }
- var f = 0, g = c.length, e = !0, k, p, l, r = null, q = null, m = void 0;
- if ("/" === c[0]) {
- if (k = v(a.scopeList, "_root", 33)) {
- r = k.propertyName, q = k.scope, m = k.value;
- }
- f++;
- l = !1;
- } else {
- k = null, l = !0;
- }
- if (f >= g) {
- return k;
- }
- for (var n = f;f < g;) {
- if (!(l || m instanceof b.AVM1Object)) {
- return h("Unable to resolve variable on invalid object " + c.substring(n, f - 1) + " (expr " + c + ")"), null;
- }
- n = f;
- if ("." === c[f] && "." === c[f + 1]) {
- f += 2, r = "_parent";
- } else {
- for (;f < g && "/" !== (p = c[f]) && "." !== p && ":" !== p;) {
- f++;
- }
- r = c.substring(n, f);
- }
- if ("" === r && f < g) {
- f++;
- } else {
- var q = m, u = !1;
- e && (e = m instanceof b.Lib.AVM1MovieClip ? m._lookupChildByName(r) : void 0) && (u = !0, m = e);
- if (!u) {
- if (l) {
- if (k = v(a.scopeList, r, d)) {
- u = !0, r = k.propertyName, q = k.scope, m = k.value;
- }
- l = !1;
- } else {
- m.alHasProperty(r) && (m = m.alGet(r), u = !0);
- }
- }
- u || "_" !== r[0] || ("_level0" === r ? (m = a.context.resolveLevel(0), u = !0) : "_root" === r && (m = B(a, !0).get_root(), u = !0));
- if (!u) {
- return h("Unable to resolve " + r + " on " + c.substring(n, f - 1) + " (expr " + c + ")"), null;
- }
- if (f >= g) {
- break;
- }
- u = c[f++];
- "/" !== u || ":" !== (p = c[f]) && "." !== p || (u = c[f++]);
- e = "/" === u;
- }
- }
- k = Ia;
- k.scope = q;
- k.propertyName = r;
- k.value = d & 32 ? m : void 0;
- return k;
- }
- function B(a, b) {
- for (var c = a.scopeList;c.previousScopeItem;c = c.previousScopeItem) {
- if (c.flags & 2 && b) {
- return c.replaceTargetBy;
- }
- if (c.flags & 1) {
- return c.scope;
- }
- }
- }
- function E(a, c, d) {
- p(c) ? a = c : (c = e.isNullOrUndefined(c) ? "" : b.alToString(this, c)) ? (c = b.alToString(a.context, c), (a = z(a, c, 161 | (d ? 0 : 64))) && p(a.value) ? a = a.value : (h("Invalid AVM1 target object: " + c), a = void 0)) : a = B(a, !0);
- return a;
- }
- function A(a, b) {
- var c = b[0];
- b[1] ? a.actions.gotoAndPlay(c + 1) : a.actions.gotoAndStop(c + 1);
- }
- function G(a, b) {
- a.actions.getURL(b[0], b[1]);
- }
- function w(a) {
- a.actions.nextFrame();
- }
- function y(a) {
- a.actions.prevFrame();
- }
- function C(a) {
- a.actions.play();
- }
- function x(a) {
- a.actions.stop();
- }
- function M(a) {
- a.actions.toggleHighQuality();
- }
- function I(a) {
- a.actions.stopAllSounds();
- }
- function J(a, b) {
- return !a.actions.ifFrameLoaded(b[0]);
- }
- function F(a, b) {
- g(a, b[0]);
- }
- function D(a, b) {
- var c = b[0];
- b[1] ? a.actions.gotoAndPlay(c) : a.actions.gotoAndStop(c);
- }
- function H(a, c) {
- var d = a.registers, f = a.constantPool, g = a.stack;
- c.forEach(function(a) {
- a instanceof b.ParsedPushConstantAction ? g.push(f[a.constantIndex]) : a instanceof b.ParsedPushRegisterAction ? (a = a.registerNumber, 0 > a || a >= d.length ? g.push(void 0) : g.push(d[a])) : g.push(a);
- });
- }
- function K(a) {
- a.stack.pop();
- }
- function O(a) {
- var c = a.stack, d = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop());
- c.push(d + a);
- }
- function S(a) {
- var c = a.stack, d = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop());
- c.push(a - d);
- }
- function P(a) {
- var c = a.stack, d = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop());
- c.push(d * a);
- }
- function N(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop()) / f;
- c.push(d ? a : isFinite(a) ? a : "#ERROR#");
- }
- function Q(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop());
- f = f == a;
- c.push(d ? f : f ? 1 : 0);
- }
- function V(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop()) < f;
- c.push(d ? a : a ? 1 : 0);
- }
- function W(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToBoolean(a.context, c.pop());
- a = b.alToBoolean(a.context, c.pop());
- f = f && a;
- c.push(d ? f : f ? 1 : 0);
- }
- function R(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToBoolean(a.context, c.pop());
- a = b.alToBoolean(a.context, c.pop());
- f = f || a;
- c.push(d ? f : f ? 1 : 0);
- }
- function L(a) {
- var c = a.stack, d = a.isSwfVersion5;
- a = !b.alToBoolean(a.context, c.pop());
- c.push(d ? a : a ? 1 : 0);
- }
- function U(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToString(a.context, c.pop());
- a = b.alToString(a.context, c.pop());
- f = f == a;
- c.push(d ? f : f ? 1 : 0);
- }
- function aa(a) {
- var c = a.stack, d = b.alToString(a.context, c.pop());
- c.push(a.actions.length_(d));
- }
- function X(a) {
- var c = a.stack, d = b.alToString(a.context, c.pop());
- c.push(a.actions.length_(d));
- }
- function T(a) {
- var c = a.stack, d = b.alToString(a.context, c.pop());
- a = b.alToString(a.context, c.pop());
- c.push(a + d);
- }
- function ca(a) {
- var c = a.stack, d = c.pop(), f = c.pop(), g = b.alToString(a.context, c.pop());
- c.push(a.actions.substring(g, f, d));
- }
- function ba(a) {
- var c = a.stack, d = c.pop(), f = c.pop(), g = b.alToString(a.context, c.pop());
- c.push(a.actions.mbsubstring(g, f, d));
- }
- function Z(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToString(a.context, c.pop());
- a = b.alToString(a.context, c.pop()) < f;
- c.push(d ? a : a ? 1 : 0);
- }
- function ea(a) {
- var c = a.stack;
- a = b.alToInt32(a.context, c.pop());
- c.push(a);
- }
- function da(a) {
- var b = a.stack, c = b.pop();
- a = a.actions.ord(c);
- b.push(a);
- }
- function fa(a) {
- var b = a.stack, c = b.pop();
- a = a.actions.mbord(c);
- b.push(a);
- }
- function ha(a) {
- var b = a.stack, c = +b.pop();
- a = a.actions.chr(c);
- b.push(a);
- }
- function ka(a) {
- var b = a.stack, c = +b.pop();
- a = a.actions.mbchr(c);
- b.push(a);
- }
- function ga(a, b) {
- }
- function ia(a, b) {
- return !!a.stack.pop();
- }
- function ja(a) {
- var b = a.stack.pop();
- a.actions.call(b);
- }
- function la(a) {
- var b = a.stack, c = "" + b.pop(), d = b.length;
- b.push(void 0);
- a = z(a, c, 33);
- e.isNullOrUndefined(a) ? h("AVM1 warning: cannot look up variable '" + c + "'") : b[d] = a.value;
- }
- function qa(b) {
- var c = b.stack, d = c.pop(), c = "" + c.pop(), f = z(b, c, 2);
- e.isNullOrUndefined(f) ? h("AVM1 warning: cannot look up variable '" + c + "'") : (f.scope.alPut(c, d), a(b.context, c));
- }
- function ra(a, b) {
- var c = a.stack, d = b[0], f = c.pop(), c = c.pop(), g;
- d & 1 ? g = "GET" : d & 2 && (g = "POST");
- var e = d & 64;
- d & 128 ? a.actions.loadVariables(c, f, g) : e ? a.actions.loadMovie(c, f, g) : a.actions.getURL(c, f, g);
- }
- function sa(a, b) {
- var c = b[0], d = [a.stack.pop()];
- c & 2 && d.push(b[1]);
- (c & 1 ? a.actions.gotoAndPlay : a.actions.gotoAndStop).apply(a.actions, d);
- }
- function ta(a) {
- var c = b.alToString(a.context, a.stack.pop());
- g(a, c);
- }
- function Y(a) {
- var c = a.stack, d = c.pop(), f = c.pop(), g = c.length;
- c.push(void 0);
- a = E(a, f, !0);
- d = b.PropertiesIndexMap[d];
- a && d && (c[g] = a.alGet(d));
- }
- function na(a) {
- var c = a.stack, d = c.pop(), f = c.pop(), c = c.pop();
- a = E(a, c, !0);
- f = b.PropertiesIndexMap[f];
- a && f && a.alPut(f, d);
- }
- function va(a) {
- var b = a.stack, c = b.pop(), d = b.pop(), b = b.pop();
- a.actions.duplicateMovieClip(b, d, c);
- }
- function ya(a) {
- var b = a.stack.pop();
- a.actions.removeMovieClip(b);
- }
- function za(a) {
- var b = a.stack, c = b.pop(), d = b.pop(), b = b.pop() ? {y2:b.pop(), x2:b.pop(), y1:b.pop(), x1:b.pop()} : null, c = [c, d];
- b && (c = c.concat(b.x1, b.y1, b.x2, b.y2));
- a.actions.startDrag.apply(a.actions, c);
- }
- function Aa(a) {
- a.actions.stopDrag();
- }
- function Ba(a, b) {
- var c = a.stack.pop();
- return !a.actions.ifFrameLoaded(c);
- }
- function Ca(a) {
- var b = a.stack.pop();
- a.actions.trace(b);
- }
- function Da(a) {
- a.stack.push(a.actions.getTimer());
- }
- function Ea(a) {
- var b = a.stack;
- b.push(a.actions.random(b.pop()));
- }
- function Fa(a) {
- var c = a.stack, d = c.pop(), f = q(c), g = c.length;
- c.push(void 0);
- a = z(a, d, 33);
- if (e.isNullOrUndefined(a)) {
- h("AVM1 warning: cannot look up function '" + d + "'");
- } else {
- var k = a.value;
- b.alIsFunction(k) ? c[g] = k.alCall(a.scope || null, f) : h("AVM1 warning: function '" + d + (k ? "' is not callable" : "' is undefined"));
- }
- }
- function Ga(a) {
- var c = a.stack, d = c.pop(), f = c.pop(), g = q(c), k, p = c.length;
- c.push(void 0);
- if (e.isNullOrUndefined(f)) {
- h("AVM1 warning: method '" + d + "' can't be called on undefined object");
- } else {
- var m = a.context.frame, n, u;
- if (e.isNullOrUndefined(d) || "" === d) {
- if (f instanceof oa) {
- var v = f.callFrame;
- if (n = r(a.context, v, "__constructor__")) {
- u = n.alGet("__constructor__"), k = v.currentThis;
- }
- } else {
- k = u = f;
- }
- b.alIsFunction(u) ? (m.setCallee(k, n, u, g), c[p] = u.alCall(k, g), m.resetCallee()) : h("AVM1 warning: obj '" + f + (f ? "' is not callable" : "' is undefined"));
- } else {
- if (f instanceof oa) {
- if (v = f.callFrame, n = r(a.context, v, d)) {
- u = n.alGet(d), k = v.currentThis;
- }
- } else {
- u = l(a.context, f, d), k = b.alToObject(a.context, f);
- }
- b.alIsFunction(u) ? (m.setCallee(k, n, u, g), c[p] = u.alCall(k, g), m.resetCallee()) : h("AVM1 warning: method '" + d + "' on object", f, e.isNullOrUndefined(u) ? "is undefined" : "is not callable");
- }
- }
- }
- function Ha(a, b) {
- a.constantPool = b[0];
- }
- function Ja(b, c) {
- var d = b.stack, f = c[1], g = new Ka(b.context, b, c[0], f, c[2], 4, null, 0);
- f ? (b.scopeList.scope.alPut(f, g), a(b.context, f)) : d.push(g);
- }
- function La(a) {
- var b = a.stack;
- a = a.scopeList.scope;
- var c = b.pop(), b = b.pop();
- a.alPut(b, c);
- }
- function Ma(a) {
- var b = a.scopeList.scope;
- a = a.stack.pop();
- b.alPut(a, void 0);
- }
- function Na(b) {
- var c = b.stack, f = c.pop(), g = c.pop();
- e.isNullOrUndefined(g) ? h("AVM1 warning: cannot delete member '" + f + "' on undefined object") : (c.push(d(b.context, g, f)), a(b.context, f));
- }
- function Oa(b) {
- var c = b.stack, f = c.pop(), g = z(b, f, xa.DELETE);
- e.isNullOrUndefined(g) ? h("AVM1 warning: cannot look up variable '" + f + "'") : (c.push(d(b.context, g.scope, f)), a(b.context, f));
- }
- function Pa(a) {
- var b = a.stack, c = b.pop();
- b.push(null);
- a = z(a, c, 33);
- e.isNullOrUndefined(a) ? h("AVM1 warning: cannot look up variable '" + c + "'") : k(a.value, function(a) {
- b.push(a);
- }, null);
- }
- function Qa(a) {
- a = a.stack;
- var b = a.pop(), c = a.pop();
- a.push(b == c);
- }
- function Ra(a) {
- var b = a.stack, c = b.pop(), d = b.pop();
- b.push(void 0);
- e.isNullOrUndefined(d) ? h("AVM1 warning: cannot get member '" + c + "' on undefined object") : d instanceof oa ? (a = r(a.context, d.callFrame, c)) && (b[b.length - 1] = a.alGet(c)) : b[b.length - 1] = l(a.context, d, c);
- }
- function Sa(a) {
- var c = a.stack;
- a = new b.Natives.AVM1ArrayNative(a.context, q(c));
- c.push(a);
- }
- function Ta(a) {
- var c = a.stack, d = +c.pop(), d = u(d, c.length >> 1);
- a = b.alNewObject(a.context);
- for (var f = 0;f < d;f++) {
- var g = c.pop(), e = c.pop();
- a.alPut(e, g);
- }
- c.push(a);
- }
- function Ua(a) {
- var b = a.stack, c = b.pop(), d = b.pop(), g = q(b), k = b.length;
- b.push(void 0);
- e.isNullOrUndefined(d) ? h("AVM1 warning: method '" + c + "' can't be constructed on undefined object") : (a = e.isNullOrUndefined(c) || "" === c ? d : l(a.context, d, c), g = f(a, g), void 0 === g && h("AVM1 warning: method '" + c + "' on object", d, "is not constructible"), b[k] = g);
- }
- function Va(a) {
- var c = a.stack, d = c.pop(), g = q(c), k = c.length;
- c.push(void 0);
- var p = z(a, d, 33);
- if (e.isNullOrUndefined(p)) {
- h("AVM1 warning: cannot look up object '" + d + "'");
- } else {
- p = p.value;
- a = a.context.builtins;
- var l = void 0;
- if (p === a.Array || p === a.Object || p === a.Date || p === a.String || p === a.Function) {
- l = p.alConstruct(g);
- }
- if (p === a.Boolean || p === a.Number) {
- l = p.alConstruct(g).value;
- }
- l instanceof b.AVM1Object && l.alSetOwnProperty("__constructor__", {flags:65, value:p});
- a = l;
- void 0 === a && (a = f(p, g), void 0 === a && h("AVM1 warning: object '" + d + (p ? "' is not constructible" : "' is undefined")));
- c[k] = a;
- }
- }
- function Wa(c) {
- var d = c.stack, f = d.pop(), g = d.pop(), d = d.pop();
- e.isNullOrUndefined(d) ? h("AVM1 warning: cannot set member '" + g + "' on undefined object") : d instanceof oa ? h("AVM1 warning: cannot set member '" + g + "' on super") : (c = c.context, b.alToObject(c, d).alPut(g, f), a(c, g));
- }
- function Xa(a) {
- a = a.stack;
- var c = a.pop();
- a.push("object" === typeof c && c && c instanceof b.Lib.AVM1MovieClip ? c._target : void 0);
- }
- function Ya(a, c) {
- var d = c[0];
- var f = a.stack.pop();
- if (e.isNullOrUndefined(f)) {
- h("The with statement object cannot be undefined.");
- } else {
- var g = a.scopeList, f = new ua(b.alToObject(a.context, f), g), f = a.pushScope(f);
- pa(f, d);
- }
- }
- function Za(a) {
- var c = a.stack;
- c.push(b.alToNumber(a.context, c.pop()));
- }
- function $a(a) {
- var c = a.stack;
- c.push(b.alToString(a.context, c.pop()));
- }
- function ab(a) {
- a = a.stack;
- var b = a.pop(), b = n(b);
- a.push(b);
- }
- function bb(a) {
- var c = a.stack, d;
- d = c.pop();
- d = b.alToPrimitive(a.context, d);
- var f;
- f = c.pop();
- f = b.alToPrimitive(a.context, f);
- "string" === typeof d || "string" === typeof f ? c.push(b.alToString(a.context, f) + b.alToString(a.context, d)) : c.push(b.alToNumber(a.context, f) + b.alToNumber(a.context, d));
- }
- function cb(a) {
- var b = a.stack, c = b.pop(), d = b.pop();
- b.push(t(a.context, d, c));
- }
- function db(a) {
- var c = a.stack, d = b.alToNumber(a.context, c.pop());
- a = b.alToNumber(a.context, c.pop());
- c.push(a % d);
- }
- function eb(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a & d);
- }
- function fb(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a << d);
- }
- function gb(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a | d);
- }
- function hb(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a >> d);
- }
- function ib(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a >>> d);
- }
- function jb(a) {
- var c = a.stack, d = b.alToInt32(a.context, c.pop());
- a = b.alToInt32(a.context, c.pop());
- c.push(a ^ d);
- }
- function kb(a) {
- var c = a.stack;
- a = b.alToNumber(a.context, c.pop());
- a--;
- c.push(a);
- }
- function lb(a) {
- var c = a.stack;
- a = b.alToNumber(a.context, c.pop());
- a++;
- c.push(a);
- }
- function mb(a) {
- a = a.stack;
- a.push(a[a.length - 1]);
- }
- function nb(a) {
- a.isEndOfActions = !0;
- }
- function ob(a) {
- a = a.stack;
- a.push(a.pop(), a.pop());
- }
- function pb(a, b) {
- var c = a.stack, d = a.registers, f = b[0];
- 0 > f || f >= d.length || (d[f] = c[c.length - 1]);
- }
- function qb(a) {
- a = a.stack;
- var b = a.pop(), c = a.pop();
- a.push(m(c, b));
- }
- function rb(a) {
- var b = a.stack;
- a = b.pop();
- b.push(null);
- e.isNullOrUndefined(a) ? h("AVM1 warning: cannot iterate over undefined object") : k(a, function(a) {
- b.push(a);
- }, null);
- }
- function sb(a) {
- a = a.stack;
- var b = a.pop(), c = a.pop();
- a.push(c === b);
- }
- function tb(a) {
- var b = a.stack, c = b.pop(), d = b.pop();
- b.push(t(a.context, c, d));
- }
- function ub(a) {
- var c = a.stack, d = a.isSwfVersion5, f = b.alToString(a.context, c.pop());
- a = b.alToString(a.context, c.pop()) > f;
- c.push(d ? a : a ? 1 : 0);
- }
- function vb(b, c) {
- var d = b.stack, f = b.scopeList.scope, g = c[1], e = new Ka(b.context, b, c[0], g, c[2], c[3], c[4], c[5]);
- g ? (f.alPut(g, e), a(b.context, g)) : d.push(e);
- }
- function wb(a) {
- var c = a.stack, d = a.context;
- a = b.alToObject(d, c.pop());
- c = b.alToObject(d, c.pop()).alGetPrototypeProperty();
- d = a.alGetPrototypeProperty();
- c.alPrototype = d;
- c.alSetOwnProperty("__constructor__", {flags:65, value:a});
- }
- function xb(a) {
- a = a.stack;
- var b = a.pop(), c = a.pop();
- a.push(m(b, c) ? b : null);
- }
- function yb(a) {
- a = a.stack;
- var b = a.pop(), c = +a.pop();
- u(c, a.length);
- for (var d = [], f = 0;f < c;f++) {
- d.push(a.pop());
- }
- b._as2Interfaces = d;
- }
- function zb(a, b) {
- var c = b[5], d = b[3], f = b[1], g = b[2], e = b[4], k = b[6], h = a.context, p = a.scopeList, l = a.registers, r = h.isTryCatchListening, q;
- try {
- h.isTryCatchListening = !0, pa(a.pushScope(), g);
- } catch (m) {
- h.isTryCatchListening = r, d && m instanceof wa ? ("string" === typeof f ? p.scope.alPut(f, m.error) : l[f] = m.error, pa(a.pushScope(), e)) : q = m;
- }
- h.isTryCatchListening = r;
- c && pa(a.pushScope(), k);
- if (q) {
- throw q;
- }
- }
- function Ab(a) {
- a = a.stack.pop();
- throw new wa(a);
- }
- function Bb(a) {
- var b = a.stack, c = q(b), d = b.length;
- b.push(void 0);
- a = a.actions.fscommand.apply(a.actions, c);
- b[d] = a;
- }
- function Cb(a, b) {
- }
- function Hb(a) {
- return function(b, d) {
- var f;
- try {
- a(b, d), b.recoveringFromError = !1;
- } catch (g) {
- f = b.context;
- g = c(g);
- if (g instanceof ma) {
- throw g;
- }
- if (g instanceof wa) {
- throw g;
- }
- Db.instance.reportTelemetry({topic:"error", error:1});
- if (!b.recoveringFromError) {
- if (1E3 <= f.errorsIgnored++) {
- throw new ma("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);
- }
- }
- };
- }
- function pa(a, d) {
- if (!d.ir && !d.compiled) {
- a: {
- var f = a.context, g;
- if (b.avm1WellknownActionsCompilationsEnabled.value && (g = b.findWellknowCompilation(d, f))) {
- d.compiled = g;
- break a;
- }
- var f = new b.ActionsDataParser(d, f.swfVersion), e = new b.ActionsDataAnalyzer;
- e.registersLimit = a.registers.length;
- e.parentResults = d.parent && d.parent.ir;
- f = e.analyze(f);
- d.ir = f;
- if (b.avm1CompilerEnabled.value) {
- try {
- g = (new b.ActionsDataCompiler).generate(f), d.compiled = g;
- } catch (k) {
- console.error("Unable to compile AVM1 function: " + k);
- }
- }
- }
- }
- f = a.context;
- (g = a.scopeList.scope._as3Object) && g._deferScriptExecution && (f.deferScriptExecution = !0);
- if (g = d.compiled) {
- return g(a);
- }
- g = 0;
- f = f.abortExecutionAt;
- if (b.avm1DebuggerEnabled.value && (b.Debugger.pause || b.Debugger.breakpoints[h.dataId])) {
- debugger;
- }
- for (var h = d.ir, e = h.actions[0];e && !a.isEndOfActions;) {
- if (0 === g++ % b.CHECK_AVM1_HANG_EVERY && Date.now() >= f) {
- throw new ma("long running script -- AVM1 instruction hang timeout");
- }
- var p = a, l = void 0, r = void 0;
- try {
- var l = p, q = e.action, m = q.actionCode, n = q.args, u = !1;
- switch(m | 0) {
- case 129:
- A(l, n);
- break;
- case 131:
- G(l, n);
- break;
- case 4:
- w(l);
- break;
- case 5:
- y(l);
- break;
- case 6:
- C(l);
- break;
- case 7:
- x(l);
- break;
- case 8:
- M(l);
- break;
- case 9:
- I(l);
- break;
- case 138:
- u = J(l, n);
- break;
- case 139:
- F(l, n);
- break;
- case 140:
- D(l, n);
- break;
- case 150:
- H(l, n);
- break;
- case 23:
- K(l);
- break;
- case 10:
- O(l);
- break;
- case 11:
- S(l);
- break;
- case 12:
- P(l);
- break;
- case 13:
- N(l);
- break;
- case 14:
- Q(l);
- break;
- case 15:
- V(l);
- break;
- case 16:
- W(l);
- break;
- case 17:
- R(l);
- break;
- case 18:
- L(l);
- break;
- case 19:
- U(l);
- break;
- case 20:
- aa(l);
- break;
- case 49:
- X(l);
- break;
- case 33:
- T(l);
- break;
- case 21:
- ca(l);
- break;
- case 53:
- ba(l);
- break;
- case 41:
- Z(l);
- break;
- case 24:
- ea(l);
- break;
- case 50:
- da(l);
- break;
- case 54:
- fa(l);
- break;
- case 51:
- ha(l);
- break;
- case 55:
- ka(l);
- break;
- case 153:
- break;
- case 157:
- u = ia(l, n);
- break;
- case 158:
- ja(l);
- break;
- case 28:
- la(l);
- break;
- case 29:
- qa(l);
- break;
- case 154:
- ra(l, n);
- break;
- case 159:
- sa(l, n);
- break;
- case 32:
- ta(l);
- break;
- case 34:
- Y(l);
- break;
- case 35:
- na(l);
- break;
- case 36:
- va(l);
- break;
- case 37:
- ya(l);
- break;
- case 39:
- za(l);
- break;
- case 40:
- Aa(l);
- break;
- case 141:
- u = Ba(l, n);
- break;
- case 38:
- Ca(l);
- break;
- case 52:
- Da(l);
- break;
- case 48:
- Ea(l);
- break;
- case 61:
- Fa(l);
- break;
- case 82:
- Ga(l);
- break;
- case 136:
- Ha(l, n);
- break;
- case 155:
- Ja(l, n);
- break;
- case 60:
- La(l);
- break;
- case 65:
- Ma(l);
- break;
- case 58:
- Na(l);
- break;
- case 59:
- Oa(l);
- break;
- case 70:
- Pa(l);
- break;
- case 73:
- Qa(l);
- break;
- case 78:
- Ra(l);
- break;
- case 66:
- Sa(l);
- break;
- case 67:
- Ta(l);
- break;
- case 83:
- Ua(l);
- break;
- case 64:
- Va(l);
- break;
- case 79:
- Wa(l);
- break;
- case 69:
- Xa(l);
- break;
- case 148:
- Ya(l, n);
- break;
- case 74:
- Za(l);
- break;
- case 75:
- $a(l);
- break;
- case 68:
- ab(l);
- break;
- case 71:
- bb(l);
- break;
- case 72:
- cb(l);
- break;
- case 63:
- db(l);
- break;
- case 96:
- eb(l);
- break;
- case 99:
- fb(l);
- break;
- case 97:
- gb(l);
- break;
- case 100:
- hb(l);
- break;
- case 101:
- ib(l);
- break;
- case 98:
- jb(l);
- break;
- case 81:
- kb(l);
- break;
- case 80:
- lb(l);
- break;
- case 76:
- mb(l);
- break;
- case 62:
- nb(l);
- break;
- case 77:
- ob(l);
- break;
- case 135:
- pb(l, n);
- break;
- case 84:
- qb(l);
- break;
- case 85:
- rb(l);
- break;
- case 102:
- sb(l);
- break;
- case 103:
- tb(l);
- break;
- case 104:
- ub(l);
- break;
- case 142:
- vb(l, n);
- break;
- case 105:
- wb(l);
- break;
- case 43:
- xb(l);
- break;
- case 44:
- yb(l);
- break;
- case 143:
- zb(l, n);
- break;
- case 42:
- Ab(l);
- break;
- case 45:
- Bb(l);
- break;
- case 137:
- Cb(l, n);
- break;
- case 0:
- l.isEndOfActions = !0;
- break;
- default:
- throw Error("Unknown action code: " + m);;
- }
- r = u;
- p.recoveringFromError = !1;
- } catch (v) {
- l = p.context;
- v = c(v);
- if (b.avm1ErrorsEnabled.value && !l.isTryCatchListening || v instanceof ma) {
- throw v;
- }
- if (v instanceof wa) {
- throw v;
- }
- Db.instance.reportTelemetry({topic:"error", error:1});
- if (!p.recoveringFromError) {
- if (1E3 <= l.errorsIgnored++) {
- throw new ma("long running script -- AVM1 errors limit is reached");
- }
- console.error("AVM1 error: " + v);
- p.recoveringFromError = !0;
- }
- }
- e = r ? e.conditionalJumpTo : e.next;
- e = h.actions[e];
- }
- return a.stack.pop();
- }
- var Db = e.Telemetry;
- b.Debugger = {pause:!1, breakpoints:{}};
- b.MAX_AVM1_HANG_TIMEOUT = 1E3;
- b.CHECK_AVM1_HANG_EVERY = 1E3;
- var Eb;
- (function(a) {
- a[a.DEFAULT = 0] = "DEFAULT";
- a[a.TARGET = 1] = "TARGET";
- a[a.REPLACE_TARGET = 2] = "REPLACE_TARGET";
- })(Eb || (Eb = {}));
- var ua = function() {
- return function(a, b) {
- this.scope = a;
- this.previousScopeItem = b;
- this.flags = 0;
- };
- }(), Ib = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.alSetOwnProperty("this", {flags:71, value:d});
- this.alSetOwnProperty("_global", {flags:71, value:c.globals});
- }
- __extends(b, a);
- return b;
- }(b.AVM1Object), Jb = function() {
- function a(b, c, d, f, g) {
- this.previousFrame = b;
- this.currentThis = c;
- this.fn = d;
- this.args = f;
- this.ectx = g;
- this.inSequence = b ? b.calleeThis === c && b.calleeFn === d : !1;
- this.resetCallee();
- }
- a.prototype.setCallee = function(a, b, c, d) {
- this.calleeThis = a;
- this.calleeSuper = b;
- this.calleeFn = c;
- };
- a.prototype.resetCallee = function() {
- this.calleeFn = this.calleeSuper = this.calleeThis = null;
- };
- return a;
- }(), Kb = function() {
- function c(a) {
- this._context = a;
- }
- c.prototype.hasProperty = function(a, c) {
- return b.alToObject(this._context, a).alHasProperty(c);
- };
- c.prototype.getProperty = function(a, b) {
- return l(this._context, a, b);
- };
- c.prototype.setProperty = function(c, d, f) {
- var g = this._context;
- b.alToObject(g, c).alPut(d, f);
- a(g, d);
- };
- c.prototype.warn = function(a) {
- h.apply(null, arguments);
- };
- return c;
- }(), Nb = function(a) {
- function d(c) {
- a.call(this, c.swfVersion);
- this.loaderInfo = c;
- this.sec = c.sec;
- this.globals = b.Lib.AVM1Globals.createGlobalsObject(this);
- this.actions = new b.Lib.AVM1NativeActions(this);
- this.initialScope = new ua(this.globals, null);
- this.utils = new Kb(this);
- this.executionProhibited = this.isActive = !1;
- this.actionTracer = b.avm1TraceEnabled.value ? new Lb : null;
- this.stackDepth = this.abortExecutionAt = 0;
- this.frame = null;
- this.isTryCatchListening = !1;
- this.errorsIgnored = 0;
- this.deferScriptExecution = !0;
- }
- __extends(d, a);
- d.prototype._getExecutionContext = function() {
- return this.frame.ectx;
- };
- d.prototype.resolveTarget = function(a) {
- return E(this.frame.ectx, a, !0);
- };
- d.prototype.resolveRoot = function() {
- return B(this.frame.ectx, !0).get_root();
- };
- d.prototype.checkTimeout = function() {
- if (Date.now() >= this.abortExecutionAt) {
- throw new ma("long running script -- AVM1 instruction hang timeout");
- }
- };
- d.prototype.pushCallFrame = function(a, b, c, d) {
- return this.frame = a = new Jb(this.frame, a, b, c, d);
- };
- d.prototype.popCallFrame = function() {
- this.frame = this.frame.previousFrame;
- };
- d.prototype.executeActions = function(a, d) {
- if (!this.executionProhibited) {
- var f = this.isActive;
- f || (this.isActive = !0, this.abortExecutionAt = b.avm1TimeoutDisabled.value ? Number.MAX_VALUE : Date.now() + b.MAX_AVM1_HANG_TIMEOUT, this.errorsIgnored = 0);
- var g;
- try {
- var e = new ua(new Ib(this, d), this.initialScope), k = new ua(d, e);
- k.flags |= 1;
- var h, p = Fb.create(this, k, [], Mb);
- this.pushCallFrame(d, null, null, p);
- try {
- pa(p, a);
- } catch (l) {
- h = c(l);
- }
- p.dispose();
- h instanceof ma && (this.executionProhibited = !0, console.error("Disabling AVM1 execution"));
- this.popCallFrame();
- if (h) {
- throw h;
- }
- } catch (r) {
- g = r;
- }
- this.isActive = f;
- if (g) {
- throw g;
- }
- }
- };
- d.prototype.executeFunction = function(a, c, d) {
- if (!this.executionProhibited) {
- var f = this.isActive;
- f || (this.isActive = !0, this.abortExecutionAt = b.avm1TimeoutDisabled.value ? Number.MAX_VALUE : Date.now() + b.MAX_AVM1_HANG_TIMEOUT, this.errorsIgnored = 0);
- var g, e;
- try {
- e = a.alCall(c, d);
- } catch (k) {
- g = k;
- }
- this.isActive = f;
- if (g) {
- throw g;
- }
- return e;
- }
- };
- return d;
- }(b.AVM1Context);
- b.AVM1Context.create = function(a) {
- return new Nb(a);
- };
- var wa = function() {
- return function(a) {
- this.error = a;
- };
- }(), ma = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.error = d;
- }
- __extends(b, a);
- return b;
- }(Error), Mb = 4, oa = function(a) {
- function b(c, d) {
- a.call(this, c);
- this.callFrame = d;
- this.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- }
- __extends(b, a);
- return b;
- }(b.AVM1Object), Gb = function(a) {
- function c(d, f, g, e) {
- a.call(this, d, f);
- b.alDefineObjectProperties(this, {callee:{value:g}, caller:{value:e}});
- }
- __extends(c, a);
- return c;
- }(b.Natives.AVM1ArrayNative), Fb = function() {
- function a(b, c, d, f) {
- this.context = b;
- this.actions = b.actions;
- this.isSwfVersion5 = 5 <= b.swfVersion;
- this.registers = [];
- this.stack = [];
- this.frame = null;
- this.isEndOfActions = this.recoveringFromError = !1;
- this.reset(c, d, f);
- }
- a.alInitStatic = function() {
- this.cache = [];
- };
- a.prototype.reset = function(a, b, c) {
- this.scopeList = a;
- this.constantPool = b;
- this.registers.length = c;
- };
- a.prototype.clean = function() {
- this.constantPool = this.scopeList = null;
- this.registers.length = 0;
- this.stack.length = 0;
- this.frame = null;
- this.isEndOfActions = this.recoveringFromError = !1;
- };
- a.prototype.pushScope = function(a) {
- var b = Object.create(this);
- b.stack = [];
- e.isNullOrUndefined(a) || (b.scopeList = a);
- return b;
- };
- a.prototype.dispose = function() {
- this.clean();
- var b = this.context.getStaticState(a);
- b.cache.length < a.MAX_CACHED_EXECUTIONCONTEXTS && b.cache.push(this);
- };
- a.create = function(b, c, d, f) {
- var g = b.getStaticState(a);
- 0 < g.cache.length ? (b = g.cache.pop(), b.reset(c, d, f)) : b = new a(b, c, d, f);
- return b;
- };
- a.MAX_CACHED_EXECUTIONCONTEXTS = 20;
- return a;
- }(), Ob = function(a) {
- function c(d) {
- a.call(this, d);
- this.alPut("toString", new b.AVM1NativeFunction(d, this._toString));
- }
- __extends(c, a);
- c.prototype._toString = function() {
- return this;
- };
- return c;
- }(b.AVM1Object), Ka = function(a) {
- function b(c, d, f, g, e, k, h, p) {
- a.call(this, c);
- this.functionName = g;
- this.actionsData = f;
- this.parametersNames = e;
- this.registersAllocation = h;
- this.suppressArguments = p;
- this.scopeList = d.scopeList;
- this.constantPool = d.constantPool;
- d = null;
- c = h ? h.length : 0;
- for (f = 0;f < c;f++) {
- (g = h[f]) && 1 === g.type && (d || (d = []), d[h[f].index] = !0);
- }
- this.skipArguments = d;
- k = Math.min(k, 255);
- this.registersLength = k = Math.max(k, c + 1);
- }
- __extends(b, a);
- b.prototype.alCall = function(a, b) {
- var c = this.context;
- if (!c.executionProhibited) {
- var d = new Ob(c), f = new ua(d, this.scopeList), g = this.scopeList.scope;
- a = a || g;
- b = b || [];
- var f = Fb.create(c, f, this.constantPool, this.registersLength), e = c.frame ? c.frame.fn : void 0, k = c.pushCallFrame(a, this, b, f), h, p = this.suppressArguments;
- p & 4 || d.alPut("arguments", new Gb(c, b, this, e));
- p & 2 || d.alPut("this", a);
- p & 8 || (h = new oa(c, k), d.alPut("super", h));
- for (var l = f.registers, r = this.registersAllocation, q = r ? r.length : 0, p = 0;p < q;p++) {
- var m = r[p];
- if (m) {
- switch(m.type) {
- case 1:
- l[p] = b[m.index];
- break;
- case 2:
- l[p] = a;
- break;
- case 4:
- l[p] = new Gb(c, b, this, e);
- break;
- case 8:
- h = h || new oa(c, k);
- l[p] = h;
- break;
- case 16:
- l[p] = c.globals;
- break;
- case 32:
- l[p] = g.alGet("_parent");
- break;
- case 64:
- l[p] = B(f, !0).get_root();
- }
- }
- }
- g = this.parametersNames;
- h = this.skipArguments;
- for (p = 0;p < b.length || p < g.length;p++) {
- h && h[p] || d.alPut(g[p], b[p]);
- }
- var n, u, d = this.actionsData;
- if (256 <= ++c.stackDepth) {
- throw new ma("long running script -- AVM1 recursion limit is reached");
- }
- try {
- n = pa(f, d);
- } catch (v) {
- u = v;
- }
- c.stackDepth--;
- c.popCallFrame();
- f.dispose();
- if (u) {
- throw u;
- }
- return n;
- }
- };
- return b;
- }(b.AVM1EvalFunction), xa;
- (function(a) {
- a[a.READ = 1] = "READ";
- a[a.WRITE = 2] = "WRITE";
- a[a.DELETE = a.READ] = "DELETE";
- a[a.GET_VALUE = 32] = "GET_VALUE";
- a[a.DISALLOW_TARGET_OVERRIDE = 64] = "DISALLOW_TARGET_OVERRIDE";
- a[a.ONLY_TARGETS = 128] = "ONLY_TARGETS";
- })(xa || (xa = {}));
- var Ia = {scope:null, propertyName:null, value:void 0};
- b.generateActionCalls = function() {
- var a;
- a = b.avm1ErrorsEnabled.value ? function(a) {
- return a;
- } : Hb;
- return {ActionGotoFrame:a(A), ActionGetURL:a(G), ActionNextFrame:a(w), ActionPreviousFrame:a(y), ActionPlay:a(C), ActionStop:a(x), ActionToggleQuality:a(M), ActionStopSounds:a(I), ActionWaitForFrame:a(J), ActionSetTarget:a(F), ActionGoToLabel:a(D), ActionPush:a(H), ActionPop:a(K), ActionAdd:a(O), ActionSubtract:a(S), ActionMultiply:a(P), ActionDivide:a(N), ActionEquals:a(Q), ActionLess:a(V), ActionAnd:a(W), ActionOr:a(R), ActionNot:a(L), ActionStringEquals:a(U), ActionStringLength:a(aa), ActionMBStringLength:a(X),
- ActionStringAdd:a(T), ActionStringExtract:a(ca), ActionMBStringExtract:a(ba), ActionStringLess:a(Z), ActionToInteger:a(ea), ActionCharToAscii:a(da), ActionMBCharToAscii:a(fa), ActionAsciiToChar:a(ha), ActionMBAsciiToChar:a(ka), ActionJump:a(ga), ActionIf:a(ia), ActionCall:a(ja), ActionGetVariable:a(la), ActionSetVariable:a(qa), ActionGetURL2:a(ra), ActionGotoFrame2:a(sa), ActionSetTarget2:a(ta), ActionGetProperty:a(Y), ActionSetProperty:a(na), ActionCloneSprite:a(va), ActionRemoveSprite:a(ya),
- ActionStartDrag:a(za), ActionEndDrag:a(Aa), ActionWaitForFrame2:a(Ba), ActionTrace:a(Ca), ActionGetTime:a(Da), ActionRandomNumber:a(Ea), ActionCallFunction:a(Fa), ActionCallMethod:a(Ga), ActionConstantPool:a(Ha), ActionDefineFunction:a(Ja), ActionDefineLocal:a(La), ActionDefineLocal2:a(Ma), ActionDelete:a(Na), ActionDelete2:a(Oa), ActionEnumerate:a(Pa), ActionEquals2:a(Qa), ActionGetMember:a(Ra), ActionInitArray:a(Sa), ActionInitObject:a(Ta), ActionNewMethod:a(Ua), ActionNewObject:a(Va), ActionSetMember:a(Wa),
- ActionTargetPath:a(Xa), ActionWith:a(Ya), ActionToNumber:a(Za), ActionToString:a($a), ActionTypeOf:a(ab), ActionAdd2:a(bb), ActionLess2:a(cb), ActionModulo:a(db), ActionBitAnd:a(eb), ActionBitLShift:a(fb), ActionBitOr:a(gb), ActionBitRShift:a(hb), ActionBitURShift:a(ib), ActionBitXor:a(jb), ActionDecrement:a(kb), ActionIncrement:a(lb), ActionPushDuplicate:a(mb), ActionReturn:a(nb), ActionStackSwap:a(ob), ActionStoreRegister:a(pb), ActionInstanceOf:a(qb), ActionEnumerate2:a(rb), ActionStrictEquals:a(sb),
- ActionGreater:a(tb), ActionStringGreater:a(ub), ActionDefineFunction2:a(vb), ActionExtends:a(wb), ActionCastOp:a(xb), ActionImplementsOp:a(yb), ActionTry:a(zb), ActionThrow:a(Ab), ActionFSCommand2:a(Bb), ActionStrictMode:a(Cb)};
- };
- var Lb = function() {
- function a() {
- this._indentation = 0;
- this._indentStringCache = [];
- }
- a.prototype._getIndentString = function() {
- return this._indentStringCache[this._indentation] || (this._indentStringCache[this._indentation] = Array(this._indentation + 1).join(".."));
- };
- a.prototype.print = function(a, b) {
- for (var c = a.position, d = a.actionCode, f = a.actionName, g = [], e = 0;e < b.length;e++) {
- var k = b[e];
- k && "object" === typeof k ? (k = k.alGetConstructorProperty(), g.push("[" + (k ? k.name : "Object") + "]")) : g.push(k);
- }
- console.log("AVM1 trace: " + this._getIndentString() + c + ": " + f + "(" + d.toString(16) + "), stack=" + g);
- };
- a.prototype.indent = function() {
- this._indentation++;
- };
- a.prototype.unindent = function() {
- this._indentation--;
- };
- a.prototype.message = function(a) {
- console.log("AVM1 trace: ------- " + a);
- };
- return a;
- }();
- b.PropertiesIndexMap = "_x _y _xscale _yscale _currentframe _totalframes _alpha _visible _width _height _rotation _target _framesloaded _name _droptarget _url _highquality _focusrect _soundbuftime _quality _xmouse _ymouse".split(" ");
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h() {
- f || (f = b.generateActionCalls());
- return f;
- }
- function n(a) {
- }
- function t(a) {
- h().ActionPlay(a);
- }
- function m(a) {
- h().ActionStop(a);
- }
- function l(a) {
- h().ActionStopSounds(a);
- }
- function d(a, b) {
- h().ActionGotoFrame(b, a);
- }
- function a(a, b) {
- h().ActionGoToLabel(b, a);
- }
- var c = e.Debug.notImplemented, f = null, k = function() {
- function a() {
- }
- a.prototype.convertArgs = function(a, d, f, e) {
- for (var k = [], h = 0;h < a.length;h++) {
- var l = a[h];
- if ("object" !== typeof l || null === l || Array.isArray(l)) {
- void 0 === l ? k.push("undefined") : k.push(JSON.stringify(l));
- } else {
- if (l instanceof b.ParsedPushConstantAction) {
- if (e.singleConstantPool) {
- var r = e.singleConstantPool[l.constantIndex];
- k.push(void 0 === r ? "undefined" : JSON.stringify(r));
- } else {
- var r = "", m = f.constantPool;
- m && (r = m[l.constantIndex], r = void 0 === r ? "undefined" : JSON.stringify(r), r = 0 <= r.indexOf("*/") ? "" : " /* " + r + " */");
- k.push("constantPool[" + l.constantIndex + "]" + r);
- }
- } else {
- l instanceof b.ParsedPushRegisterAction ? (l = l.registerNumber, 0 > l || l >= e.registersLimit ? k.push("undefined") : k.push("registers[" + l + "]")) : l instanceof b.AVM1ActionsData ? (r = "code_" + d + "_" + h, f[r] = l, k.push("res." + r)) : c("Unknown AVM1 action argument type");
- }
- }
- }
- return k.join(",");
- };
- a.prototype.convertAction = function(a, b, c, d, f) {
- switch(a.action.actionCode) {
- case 153:
- ;
- case 62:
- return "";
- case 136:
- return c.constantPool = a.action.args[0], " constantPool = [" + this.convertArgs(a.action.args[0], b, c, f) + "];\n ectx.constantPool = constantPool;\n";
- case 150:
- return " stack.push(" + this.convertArgs(a.action.args, b, c, f) + ");\n";
- case 135:
- return a = a.action.args[0], 0 > a || a >= f.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, c, f) + "])) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (d + 1) + "; break; }\n";
- case 157:
- return " if (!!stack.pop()) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (d + 1) + "; break; }\n";
- default:
- return " calls." + a.action.actionName + "(ectx" + (a.action.args ? ",[" + this.convertArgs(a.action.args, b, c, f) + "]" : "") + ");\n";
- }
- };
- a.prototype.generate = function(a) {
- var c = this, d = a.blocks, f = {}, e = 0, k = a.dataId, l = "return function avm1gen_" + k + "(ectx) {\nvar position = 0;\nvar checkTimeAfter = 0;\nvar constantPool = ectx.constantPool, registers = ectx.registers, stack = ectx.stack;\n";
- b.avm1DebuggerEnabled.value && (l += "/* Running " + k + " */ if (Shumway.AVM1.Debugger.pause || Shumway.AVM1.Debugger.breakpoints." + k + ") { debugger; }\n");
- l += "while (!ectx.isEndOfActions) {\nif (checkTimeAfter <= 0) { checkTimeAfter = " + b.CHECK_AVM1_HANG_EVERY + "; ectx.context.checkTimeout(); }\nswitch(position) {\n";
- d.forEach(function(b) {
- l += " case " + b.label + ":\n";
- b.items.forEach(function(b, d) {
- l += c.convertAction(b, e++, f, d, a);
- });
- l += " position = " + b.jump + ";\n checkTimeAfter -= " + b.items.length + ";\n break;\n";
- });
- l += " default: ectx.isEndOfActions = true; break;\n}\n}\nreturn stack.pop();};";
- l += "//# sourceURL=avm1gen-" + k;
- return (new Function("calls", "res", l))(h(), f);
- };
- return a;
- }();
- b.ActionsDataCompiler = k;
- b.findWellknowCompilation = function(c, f) {
- var e = c.bytes, g = null;
- if (0 === e.length || 0 === e[0]) {
- g = n;
- } else {
- if (2 <= e.length && 0 === e[1]) {
- switch(e[0]) {
- case 6:
- g = t;
- break;
- case 7:
- g = m;
- break;
- case 9:
- g = l;
- }
- } else {
- 7 <= e.length && 0 === e[6] && 129 === e[0] && 2 === e[1] && 0 === e[2] && 6 === e[5] ? g = d.bind(null, [e[3] | e[4] << 8, !0]) : 6 <= e.length && 140 === e[0] && 0 === e[2] && e.length >= e[1] + 5 && 0 === e[e[1] + 4] && 6 === e[e[1] + 3] && (e = (new b.ActionsDataStream(e.subarray(3, 3 + e[1]), f.swfVersion)).readString(), g = a.bind(null, [e, !0]));
- }
- }
- return g;
- };
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b) {
- return a.isPropertyCaseSensitive ? b : b.toLowerCase();
- }
- function t(a, c, d) {
- if (c.alHasProperty(d) && c.alGet(d) instanceof b.AVM1Function) {
- return !0;
- }
- a = c.alGet("_listeners");
- return a instanceof b.Natives.AVM1ArrayNative ? a.value.some(function(a) {
- return a instanceof b.AVM1Object && a.alHasProperty(d);
- }) : !1;
- }
- function m(a, c, d, f) {
- void 0 === f && (f = null);
- var e = c.alGet(d);
- e instanceof b.AVM1Function && a.executeFunction(e, c, f);
- e = c.alGet("_listeners");
- e instanceof b.Natives.AVM1ArrayNative && e.value.forEach(function(e) {
- e instanceof b.AVM1Object && (e = e.alGet(d), e instanceof b.AVM1Function && a.executeFunction(e, c, f));
- });
- }
- function l(a, b, c) {
- for (var d, f = a.alGetPrototypeProperty();f && !f.initAVM1SymbolInstance;) {
- f._as3ObjectTemplate && !d && (d = f._as3ObjectTemplate), f = f.alPrototype;
- }
- var e = Object.create(f);
- f.initAVM1SymbolInstance.call(e, c, b);
- e.alPrototype = a.alGetPrototypeProperty();
- e.alSetOwnConstructorProperty(a);
- b._as2Object = e;
- a.alCall(e);
- if (d) {
- for (var k in d) {
- b[k] = d[k];
- }
- }
- return e;
- }
- function d(a, b) {
- if (!a) {
- return null;
- }
- if (a._as2Object) {
- return a._as2Object;
- }
- var c = b.sec;
- return c.flash.display.MovieClip.axClass.axIsType(a) ? (c = a._symbol && b.getSymbolClass(a._symbol.data.id)) ? l(c, a, b) : l(b.globals.MovieClip, a, b) : c.flash.display.SimpleButton.axClass.axIsType(a) ? l(b.globals.Button, a, b) : c.flash.text.TextField.axClass.axIsType(a) ? l(b.globals.TextField, a, b) : c.flash.display.BitmapData.axClass.axIsType(a) ? new a : null;
- }
- function a(a, c, d, f, k) {
- function h(c) {
- if (!e.isNullOrUndefined(c)) {
- return k ? new b.AVM1NativeFunction(a, function() {
- var b = Array.prototype.slice.call(arguments, 0);
- b.unshift(a);
- return c.apply(this, b);
- }) : new b.AVM1NativeFunction(a, c);
- }
- }
- void 0 === k && (k = !1);
- f && f.forEach(function(a) {
- if ("#" === a[a.length - 1]) {
- var b = "get" + a[0].toUpperCase() + a.slice(1, -1), b = d[b], f = "set" + a[0].toUpperCase() + a.slice(1, -1), f = d[f];
- c.alSetOwnProperty(a.slice(0, -1), {flags:131, get:h(b), set:h(f)});
- } else {
- a: {
- for (f = d;f;f = Object.getPrototypeOf(f)) {
- if (b = Object.getOwnPropertyDescriptor(f, a)) {
- break a;
- }
- }
- b = null;
- }
- !b || b.get || b.set || (b = b.value, "function" === typeof b && (b = h(b)), c.alSetOwnProperty(a, {flags:67, value:b}));
- }
- });
- }
- function c(a, b) {
- return b.context.executeActions(a, b);
- }
- h.DEPTH_OFFSET = 16384;
- var f = function() {
- function a(b, c, d) {
- void 0 === d && (d = null);
- this.propertyName = b;
- this.eventName = c;
- this.argsConverter = d;
- }
- a.prototype.onBind = function(a) {
- };
- a.prototype.onUnbind = function(a) {
- };
- return a;
- }();
- h.AVM1EventHandler = f;
- f = function(a) {
- function c() {
- a.apply(this, arguments);
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "isAVM1Instance", {get:function() {
- return !!this._as3Object;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "as3Object", {get:function() {
- return this._as3Object;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "as3ObjectOrTemplate", {get:function() {
- return this._as3Object || this._getAS3ObjectTemplate();
- }, enumerable:!0, configurable:!0});
- c.prototype.initAVM1SymbolInstance = function(a, c) {
- b.AVM1Object.call(this, a);
- this._as3Object = c;
- };
- c.prototype._getAS3ObjectTemplate = function() {
- if (!this._as3ObjectTemplate) {
- for (var a, b = this.alPrototype;b && !b.initAVM1SymbolInstance && !(a = b._as3ObjectTemplate);) {
- b = b.alPrototype;
- }
- this._as3ObjectTemplate = Object.create(a || null);
- }
- return this._as3ObjectTemplate;
- };
- c.prototype.bindEvents = function(a, b) {
- void 0 === b && (b = !0);
- this._events = a;
- var c = Object.create(null);
- this._eventsMap = c;
- this._eventsListeners = Object.create(null);
- var d = this, f = this.context;
- a.forEach(function(a) {
- var b = n(f, a.propertyName);
- c[b] = a;
- f.registerEventPropertyObserver(b, d);
- d._updateEvent(a);
- });
- b && d.as3Object.addEventListener("removedFromStage", function A() {
- d.as3Object.removeEventListener("removedFromStage", A);
- d.unbindEvents();
- });
- };
- c.prototype.unbindEvents = function() {
- var a = this, b = this.context;
- this._events.forEach(function(c) {
- b.unregisterEventPropertyObserver(c.propertyName, a);
- a._removeEventListener(c);
- });
- this._eventsListeners = this._eventsMap = this._events = null;
- };
- c.prototype.updateAllEvents = function() {
- this._events.forEach(function(a) {
- this._updateEvent(a);
- }, this);
- };
- c.prototype._updateEvent = function(a) {
- t(this.context, this, a.propertyName) ? this._addEventListener(a) : this._removeEventListener(a);
- };
- c.prototype._addEventListener = function(a) {
- var b = n(this.context, a.propertyName), c = this._eventsListeners[b];
- c || (c = function() {
- var c = a.argsConverter ? a.argsConverter.apply(null, arguments) : null;
- m(this.context, this, b, c);
- }.bind(this), this.as3Object.addEventListener(a.eventName, c), a.onBind(this), this._eventsListeners[b] = c);
- };
- c.prototype._removeEventListener = function(a) {
- var b = n(this.context, a.propertyName), c = this._eventsListeners[b];
- c && (this.as3Object.removeEventListener(a.eventName, c), this._eventsListeners[b] = null);
- };
- c.prototype.onEventPropertyModified = function(a) {
- a = n(this.context, a);
- this._updateEvent(this._eventsMap[a]);
- };
- c.prototype.get_alpha = function() {
- return 100 * this.as3Object.alpha;
- };
- c.prototype.set_alpha = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.alpha = a / 100);
- };
- c.prototype.getBlendMode = function() {
- return this.as3Object.blendMode;
- };
- c.prototype.setBlendMode = function(a) {
- a = "number" === typeof a ? h.BlendModesMap[a] : b.alCoerceString(this.context, a);
- this.as3Object.blendMode = a || null;
- };
- c.prototype.getCacheAsBitmap = function() {
- return this.as3Object.cacheAsBitmap;
- };
- c.prototype.setCacheAsBitmap = function(a) {
- a = b.alToBoolean(this.context, a);
- this.as3Object.cacheAsBitmap = a;
- };
- c.prototype.getFilters = function() {
- return h.convertFromAS3Filters(this.context, this.as3Object.filters);
- };
- c.prototype.setFilters = function(a) {
- this.as3Object.filters = h.convertToAS3Filters(this.context, a);
- };
- c.prototype.get_focusrect = function() {
- return this.as3Object.focusRect || !1;
- };
- c.prototype.set_focusrect = function(a) {
- a = b.alToBoolean(this.context, a);
- this.as3Object.focusRect = a;
- };
- c.prototype.get_height = function() {
- return this.as3Object.height;
- };
- c.prototype.set_height = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.height = a);
- };
- c.prototype.get_highquality = function() {
- switch(this.get_quality()) {
- case "BEST":
- return 2;
- case "HIGH":
- return 1;
- default:
- return 0;
- }
- };
- c.prototype.set_highquality = function(a) {
- switch(b.alToInteger(this.context, a)) {
- case 2:
- a = "BEST";
- break;
- case 1:
- a = "HIGH";
- break;
- default:
- a = "LOW";
- }
- this.set_quality(a);
- };
- c.prototype.getMenu = function() {
- e.Debug.somewhatImplemented("AVM1SymbolBase.getMenu");
- };
- c.prototype.setMenu = function(a) {
- e.Debug.somewhatImplemented("AVM1SymbolBase.setMenu");
- };
- c.prototype.get_name = function() {
- return this.as3Object.name;
- };
- c.prototype.set_name = function(a) {
- a = b.alCoerceString(this.context, a);
- this.as3Object.name = a;
- };
- c.prototype.get_parent = function() {
- return d(this.as3Object.parent, this.context) || void 0;
- };
- c.prototype.set_parent = function(a) {
- e.Debug.notImplemented("AVM1SymbolBase.set_parent");
- };
- c.prototype.getOpaqueBackground = function() {
- return this.as3Object.opaqueBackground;
- };
- c.prototype.setOpaqueBackground = function(a) {
- e.isNullOrUndefined(a) ? this.as3Object.opaqueBackground = null : this.as3Object.opaqueBackground = b.alToInt32(this.context, a);
- };
- c.prototype.get_quality = function() {
- e.Debug.somewhatImplemented("AVM1SymbolBase.get_quality");
- return "HIGH";
- };
- c.prototype.set_quality = function(a) {
- e.Debug.somewhatImplemented("AVM1SymbolBase.set_quality");
- };
- c.prototype.get_root = function() {
- for (var a = this.as3Object;a && a !== a.root;) {
- var b = d(a, this.context);
- if (b._lockroot) {
- return b;
- }
- a = a.parent;
- }
- return a ? d(a, this.context) : void 0;
- };
- c.prototype.get_rotation = function() {
- return this.as3Object.rotation;
- };
- c.prototype.set_rotation = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.rotation = a);
- };
- c.prototype.getScale9Grid = function() {
- return h.AVM1Rectangle.fromAS3Rectangle(this.context, this.as3Object.scale9Grid);
- };
- c.prototype.setScale9Grid = function(a) {
- this.as3Object.scale9Grid = e.isNullOrUndefined(a) ? null : h.toAS3Rectangle(a);
- };
- c.prototype.getScrollRect = function() {
- return h.AVM1Rectangle.fromAS3Rectangle(this.context, this.as3Object.scrollRect);
- };
- c.prototype.setScrollRect = function(a) {
- this.as3Object.scrollRect = e.isNullOrUndefined(a) ? null : h.toAS3Rectangle(a);
- };
- c.prototype.get_soundbuftime = function() {
- e.Debug.somewhatImplemented("AVM1SymbolBase.get_soundbuftime");
- return 0;
- };
- c.prototype.set_soundbuftime = function(a) {
- e.Debug.somewhatImplemented("AVM1SymbolBase.set_soundbuftime");
- };
- c.prototype.getTabEnabled = function() {
- return this.as3ObjectOrTemplate.tabEnabled;
- };
- c.prototype.setTabEnabled = function(a) {
- a = b.alToBoolean(this.context, a);
- this.as3ObjectOrTemplate.tabEnabled = a;
- };
- c.prototype.getTabIndex = function() {
- var a = this.as3Object.tabIndex;
- return 0 > a ? void 0 : a;
- };
- c.prototype.setTabIndex = function(a) {
- e.isNullOrUndefined(a) ? this.as3Object.tabIndex = -1 : this.as3Object.tabIndex = b.alToInteger(this.context, a);
- };
- c.prototype.get_target = function() {
- var a = this.as3Object;
- if (a === a.root) {
- return "/";
- }
- var b = "";
- do {
- if (e.isNullOrUndefined(a)) {
- return;
- }
- b = "/" + a.name + b;
- a = a.parent;
- } while (a !== a.root);
- return b;
- };
- c.prototype.getTransform = function() {
- return this.context.globals.Transform.alConstruct([this]);
- };
- c.prototype.setTransform = function(a) {
- a instanceof h.AVM1Transform && (this.as3Object.transform = a.as3Transform);
- };
- c.prototype.get_visible = function() {
- return this.as3Object.visible;
- };
- c.prototype.set_visible = function(a) {
- a = b.alToBoolean(this.context, a);
- this.as3Object.visible = a;
- };
- c.prototype.get_url = function() {
- return this.as3Object.loaderInfo.url;
- };
- c.prototype.get_width = function() {
- return this.as3Object.width;
- };
- c.prototype.set_width = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.width = a);
- };
- c.prototype.get_x = function() {
- return this.as3Object.x;
- };
- c.prototype.set_x = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.x = a);
- };
- c.prototype.get_xmouse = function() {
- return this.as3Object.mouseX;
- };
- c.prototype.get_xscale = function() {
- return 100 * this.as3Object.scaleX;
- };
- c.prototype.set_xscale = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.scaleX = a / 100);
- };
- c.prototype.get_y = function() {
- return this.as3Object.y;
- };
- c.prototype.set_y = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.y = a);
- };
- c.prototype.get_ymouse = function() {
- return this.as3Object.mouseY;
- };
- c.prototype.get_yscale = function() {
- return 100 * this.as3Object.scaleY;
- };
- c.prototype.set_yscale = function(a) {
- a = b.alToNumber(this.context, a);
- isNaN(a) || (this.as3Object.scaleY = a / 100);
- };
- c.prototype.getDepth = function() {
- return this.as3Object._depth - h.DEPTH_OFFSET;
- };
- return c;
- }(b.AVM1Object);
- h.AVM1SymbolBase = f;
- h.BlendModesMap = [void 0, "normal", "layer", "multiply", "screen", "lighten", "darken", "difference", "add", "subtract", "invert", "alpha", "erase", "overlay", "hardlight"];
- h.avm1HasEventProperty = t;
- h.avm1BroadcastEvent = function(a, c, d, f) {
- void 0 === f && (f = null);
- a = c.alGet(d);
- a instanceof b.AVM1Function && a.alCall(c, f);
- a = c.alGet("_listeners");
- a instanceof b.Natives.AVM1ArrayNative && a.value.forEach(function(a) {
- a instanceof b.AVM1Object && (a = a.alGet(d), a instanceof b.AVM1Function && a.alCall(c, f));
- });
- };
- f = function() {
- function a() {
- }
- a.resolveTarget = function(a, b) {
- void 0 === b && (b = void 0);
- return a.resolveTarget(b);
- };
- a.resolveMovieClip = function(a, b) {
- void 0 === b && (b = void 0);
- return b ? a.resolveTarget(b) : void 0;
- };
- a.resolveLevel = function(a, b) {
- return a.resolveLevel(+b);
- };
- a.resolveLevelOrTarget = function(a, b) {
- return "number" === typeof b ? a.resolveLevel(b) : a.resolveTarget(b);
- };
- return a;
- }();
- h.AVM1Utils = f;
- h.getAVM1Object = d;
- h.wrapAVM1NativeMembers = a;
- h.wrapAVM1NativeClass = function(c, d, f, e, k, h, l) {
- var r = d ? new b.AVM1NativeFunction(c, h || function() {
- }, function() {
- var a = new f(c);
- a.alPrototype = m;
- a.alSetOwnConstructorProperty(r);
- l && l.apply(a, arguments);
- return a;
- }) : new b.AVM1Object(c);
- a(c, r, f, e, !0);
- var m = new f(c);
- m.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- a(c, m, f.prototype, k, !1);
- b.alDefineObjectProperties(r, {prototype:{value:m}});
- b.alDefineObjectProperties(m, {constructor:{value:r, writable:!0}});
- return r;
- };
- h.initializeAVM1Object = function(a, b, f) {
- var h = d(a, b);
- f.variableName && h.alPut("variable", f.variableName);
- var l = f.events;
- if (l) {
- for (var m = [], n = b.globals.Stage._as3Stage, t = 0;t < l.length;t++) {
- var A = l[t], G;
- A.actionsBlock ? (G = b.actionsDataFactory.createActionsData(A.actionsBlock, "s" + f.symbolId + "d" + f.depth + "e" + t), A.actionsBlock = null, A.compiled = G) : G = A.compiled;
- G = c.bind(null, G, h);
- var A = A.flags, w;
- for (w in r) {
- if (w |= 0, A & (w | 0)) {
- var y = r[w], C = y.name;
- C ? (y.isButtonEvent && (a.buttonMode = !0), y.isStageEvent ? (m.push({eventName:C, handler:G}), n.addEventListener(C, G)) : a.addEventListener(C, G)) : e.Debug.warning(k[w] + " ClipEvent not implemented");
- }
- }
- }
- 0 < m.length && a.addEventListener("removedFromStage", function() {
- for (var a = 0;a < m.length;a++) {
- n.removeEventListener(m[a].eventName, m[a].fn, !1);
- }
- }, !1);
- }
- };
- var k = e.SWF.Parser.AVM1ClipEvents, r;
- r = Object.create(null);
- r[1] = {name:"load", isStageEvent:!1, isButtonEvent:!1};
- r[2] = {name:"frameConstructed", isStageEvent:!1, isButtonEvent:!1};
- r[4] = {name:"unload", isStageEvent:!1, isButtonEvent:!1};
- r[8] = {name:"mouseMove", isStageEvent:!0, isButtonEvent:!1};
- r[16] = {name:"mouseDown", isStageEvent:!0, isButtonEvent:!1};
- r[32] = {name:"mouseUp", isStageEvent:!0, isButtonEvent:!1};
- r[64] = {name:"keyDown", isStageEvent:!0, isButtonEvent:!1};
- r[128] = {name:"keyUp", isStageEvent:!0, isButtonEvent:!1};
- r[256] = {name:null, isStageEvent:!1, isButtonEvent:!1};
- r[512] = {name:"initialize", isStageEvent:!1, isButtonEvent:!1};
- r[1024] = {name:"mouseDown", isStageEvent:!0, isButtonEvent:!0};
- r[2048] = {name:"click", isStageEvent:!1, isButtonEvent:!0};
- r[4096] = {name:"releaseOutside", isStageEvent:!1, isButtonEvent:!0};
- r[8192] = {name:"mouseOver", isStageEvent:!0, isButtonEvent:!0};
- r[16384] = {name:"mouseOut", isStageEvent:!0, isButtonEvent:!0};
- r[32768] = {name:null, isStageEvent:!1, isButtonEvent:!1};
- r[65536] = {name:null, isStageEvent:!1, isButtonEvent:!1};
- r[131072] = {name:null, isStageEvent:!0, isButtonEvent:!1};
- r[262144] = {name:"construct", isStageEvent:!1, isButtonEvent:!1};
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.notImplemented, t = e.AVMX.AS.flash, m = jsGlobal.escape, l = [], d = function(a) {
- function c(b) {
- a.call(this, b);
- this.NaN = Number.NaN;
- this.Infinity = Number.POSITIVE_INFINITY;
- this.undefined = void 0;
- this._initBuiltins(b);
- 8 <= b.loaderInfo.swfVersion && this._initializeFlashObject(b);
- }
- __extends(c, a);
- c.createGlobalsObject = function(a) {
- var b = new c(a);
- h.wrapAVM1NativeMembers(a, b, b, "flash ASSetPropFlags clearInterval clearTimeout escape unescape setInterval setTimeout showRedrawRegions trace updateAfterEvent NaN Infinity isFinite isNaN parseFloat parseInt undefined Object Function Array Number Math Boolean Date String Error MovieClip AsBroadcaster System Stage Button TextField Color Key Mouse MovieClipLoader XML XMLNode LoadVars Sound SharedObject ContextMenu ContextMenuItem TextFormat".split(" "), !1);
- return b;
- };
- c.prototype.ASSetPropFlags = function(a, b, c, d) {
- };
- c.prototype.clearInterval = function(a) {
- var b = l[a - 1];
- b && (clearInterval(b), delete l[a - 1]);
- };
- c.prototype.clearTimeout = function(a) {
- var b = l[a - 1];
- b && (clearTimeout(b), delete l[a - 1]);
- };
- c.prototype.escape = function(a) {
- return encodeURIComponent(a).replace(/!|'|\(|\)|\*|-|\.|_|~/g, function(a) {
- switch(a) {
- case "*":
- return "%2A";
- case "-":
- return "%2D";
- case ".":
- return "%2E";
- case "_":
- return "%5F";
- default:
- return m(a);
- }
- });
- };
- c.prototype.unescape = function(a) {
- return decodeURIComponent(a);
- };
- c.prototype.setInterval = function() {
- if (!(2 > arguments.length)) {
- var a = this.context, c = [];
- if (b.alIsFunction(arguments[0])) {
- c.push(arguments[0].toJSFunction(), arguments[1]);
- } else {
- if (3 > arguments.length) {
- return;
- }
- var d = arguments[0], e = arguments[1];
- if (!(d instanceof b.AVM1Object) || "string" !== typeof e) {
- return;
- }
- c.push(function() {
- var c = d.alGet(e);
- if (b.alIsFunction(c)) {
- var k = Array.prototype.slice.call(arguments, 0);
- a.executeFunction(c, d, k);
- }
- });
- }
- for (var h = 2;h < arguments.length;h++) {
- c.push(arguments[h]);
- }
- c[1] = b.alToInteger(a, c[1]);
- c = setInterval.apply(null, c);
- return l.push(c);
- }
- };
- c.prototype.setTimeout = function() {
- if (!(2 > arguments.length) && b.alIsFunction(arguments[0])) {
- var a = [];
- a.push(arguments[0].toJSFunction());
- a.push(b.alToInteger(this.context, arguments[1]));
- for (var c = 2;c < arguments.length;c++) {
- a.push(arguments[c]);
- }
- a = setTimeout.apply(null, a);
- return l.push(a);
- }
- };
- c.prototype.showRedrawRegions = function(a, b) {
- n("AVM1Globals.showRedrawRegions");
- };
- c.prototype.trace = function(a) {
- this.context.actions.trace(a);
- };
- c.prototype.updateAfterEvent = function() {
- this.context.sec.player.requestRendering();
- };
- c.prototype.isFinite = function(a) {
- return isFinite(b.alToNumber(this.context, a));
- };
- c.prototype.isNaN = function(a) {
- return isNaN(b.alToNumber(this.context, a));
- };
- c.prototype.parseFloat = function(a) {
- return parseFloat(b.alToString(this.context, a));
- };
- c.prototype.parseInt = function(a, c) {
- return parseInt(b.alToString(this.context, a), b.alToInt32(this.context, c));
- };
- c.prototype._initBuiltins = function(a) {
- var b = a.builtins;
- this.Object = b.Object;
- this.Function = b.Function;
- this.Array = b.Array;
- this.Number = b.Number;
- this.Math = b.Math;
- this.Boolean = b.Boolean;
- this.Date = b.Date;
- this.String = b.String;
- this.Error = b.Error;
- this.MovieClip = h.AVM1MovieClip.createAVM1Class(a);
- this.AsBroadcaster = h.AVM1Broadcaster.createAVM1Class(a);
- this.System = h.AVM1System.createAVM1Class(a);
- this.Stage = h.AVM1Stage.createAVM1Class(a);
- this.Button = h.AVM1Button.createAVM1Class(a);
- this.TextField = h.AVM1TextField.createAVM1Class(a);
- this.Color = h.AVM1Color.createAVM1Class(a);
- this.Key = h.AVM1Key.createAVM1Class(a);
- this.Mouse = h.AVM1Mouse.createAVM1Class(a);
- this.MovieClipLoader = h.AVM1MovieClipLoader.createAVM1Class(a);
- this.LoadVars = new h.AVM1LoadVarsFunction(a);
- this.Sound = h.AVM1Sound.createAVM1Class(a);
- this.SharedObject = new h.AVM1SharedObjectFunction(a);
- this.ContextMenuItem = this.ContextMenu = void 0;
- this.TextFormat = h.AVM1TextFormat.createAVM1Class(a);
- this.XMLNode = new h.AVM1XMLNodeFunction(a);
- this.XML = new h.AVM1XMLFunction(a, this.XMLNode);
- this.BitmapData = h.AVM1BitmapData.createAVM1Class(a);
- this.Matrix = new h.AVM1MatrixFunction(a);
- this.Point = new h.AVM1PointFunction(a);
- this.Rectangle = new h.AVM1RectangleFunction(a);
- this.Transform = h.AVM1Transform.createAVM1Class(a);
- this.ColorTransform = new h.AVM1ColorTransformFunction(a);
- h.AVM1Broadcaster.initialize(a, this.Stage);
- h.AVM1Broadcaster.initialize(a, this.Key);
- h.AVM1Broadcaster.initialize(a, this.Mouse);
- };
- c.prototype._initializeFlashObject = function(a) {
- this.flash = b.alNewObject(a);
- var c = b.alNewObject(a);
- c.alPut("BitmapData", this.BitmapData);
- this.flash.alPut("display", c);
- c = b.alNewObject(a);
- c.alPut("ExternalInterface", h.AVM1ExternalInterface.createAVM1Class(a));
- this.flash.alPut("external", c);
- c = h.createFiltersClasses(a);
- this.flash.alPut("filters", c);
- this.filters = c;
- c = b.alNewObject(a);
- c.alPut("ColorTransform", this.ColorTransform);
- c.alPut("Matrix", this.Matrix);
- c.alPut("Point", this.Point);
- c.alPut("Rectangle", this.Rectangle);
- c.alPut("Transform", this.Transform);
- this.flash.alPut("geom", c);
- a = b.alNewObject(a);
- this.flash.alPut("text", a);
- };
- return c;
- }(b.AVM1Object);
- h.AVM1Globals = d;
- d = function() {
- function a(a) {
- this.context = a;
- }
- a.prototype.asfunction = function(a) {
- n("AVM1Globals.$asfunction");
- };
- a.prototype.call = function(a) {
- var b = h.AVM1Utils.resolveTarget(this.context).as3Object;
- a = b._getAbsFrameNumber(a, null);
- void 0 !== a && b.callFrame(a);
- };
- a.prototype.chr = function(a) {
- a = b.alToInteger(this.context, a);
- 5 >= this.context.swfVersion && (a &= 255);
- return a ? String.fromCharCode(a) : "";
- };
- a.prototype.duplicateMovieClip = function(a, d, e) {
- e = b.alCoerceNumber(this.context, e) - h.DEPTH_OFFSET;
- h.AVM1Utils.resolveTarget(this.context, a).duplicateMovieClip(d, e, null);
- };
- a.prototype.fscommand = function(a, b) {
- return this.context.sec.flash.system.fscommand.axCall(null, this.context.sec, a, b);
- };
- a.prototype.getTimer = function() {
- return e.AVMX.AS.FlashUtilScript_getTimer(this.context.sec);
- };
- a.prototype.getURL = function(a, b, d) {
- var h = this.context.sec, l = new h.flash.net.URLRequest(String(a));
- d && (l.method = d);
- "string" === typeof b && 0 === b.indexOf("_level") ? this.loadMovieNum(a, +b.substr(6), d) : e.AVMX.AS.FlashNetScript_navigateToURL(h, l, b);
- };
- a.prototype.gotoAndPlay = function(a, b) {
- var d = h.AVM1Utils.resolveTarget(this.context).as3Object;
- 2 > arguments.length ? d.gotoAndPlay(arguments[0]) : d.gotoAndPlay(arguments[1], arguments[0]);
- };
- a.prototype.gotoAndStop = function(a, b) {
- var d = h.AVM1Utils.resolveTarget(this.context).as3Object;
- 2 > arguments.length ? d.gotoAndStop(arguments[0]) : d.gotoAndStop(arguments[1], arguments[0]);
- };
- a.prototype.ifFrameLoaded = function(a, b) {
- var d = h.AVM1Utils.resolveTarget(this.context), e = 2 > arguments.length ? arguments[0] : arguments[1], l = d.alGet("_framesloaded"), d = d.alGet("_totalframes");
- return Math.min(e + 1, d) <= l;
- };
- a.prototype.length_ = function(a) {
- return ("" + a).length;
- };
- a.prototype.loadMovie = function(a, b, d) {
- if (a && 0 === a.toLowerCase().indexOf("fscommand:")) {
- this.fscommand(a.substring(10), b);
- } else {
- var e = "string" === typeof b && 0 === b.indexOf("_level"), l;
- e && (e = b.charAt(6), l = parseInt(e, 10), e = l.toString() === e);
- l = new this.context.sec.flash.display.Loader;
- e ? (a = new this.context.sec.flash.net.URLRequest(a), d && (a.method = d), l.load(a)) : h.AVM1Utils.resolveTarget(this.context, b).loadMovie(a, d);
- }
- };
- a.prototype._setLevel = function(a, b) {
- };
- a.prototype.loadMovieNum = function(a, b, d) {
- a && 0 === a.toLowerCase().indexOf("fscommand:") ? this.fscommand(a.substring(10)) : (b = new this.context.sec.flash.display.Loader, a = new this.context.sec.flash.net.URLRequest(a), d && (a.method = d), b.load(a));
- };
- a.prototype.loadVariables = function(a, b, d) {
- void 0 === d && (d = "");
- b = h.AVM1Utils.resolveTarget(this.context, b);
- this._loadVariables(b, a, d);
- };
- a.prototype.loadVariablesNum = function(a, b, d) {
- void 0 === d && (d = "");
- b = h.AVM1Utils.resolveLevel(this.context, b);
- this._loadVariables(b, a, d);
- };
- a.prototype._loadVariables = function(a, b, d) {
- var l = this.context;
- b = new l.sec.flash.net.URLRequest(b);
- d && (b.method = d);
- var m = new l.sec.flash.net.URLLoader(b);
- m._ignoreDecodeErrors = !0;
- m.dataFormat = "variables";
- var n = l.sec.boxFunction(function(b) {
- m.removeEventListener(t.events.Event.COMPLETE, n);
- e.AVMX.forEachPublicProperty(m.data, function(b, d) {
- l.utils.setProperty(a, b, d);
- });
- a instanceof h.AVM1MovieClip && h.avm1BroadcastEvent(l, a, "onData");
- });
- m.addEventListener(t.events.Event.COMPLETE, n);
- };
- a.prototype.mbchr = function(a) {
- return (a = b.alToInteger(this.context, a)) ? String.fromCharCode(a) : "";
- };
- a.prototype.mblength = function(a) {
- return ("" + a).length;
- };
- a.prototype.mbord = function(a) {
- return ("" + a).charCodeAt(0);
- };
- a.prototype.mbsubstring = function(a, b, d) {
- return b !== (0 | b) || d !== (0 | d) ? "" : ("" + a).substr(b, d);
- };
- a.prototype.nextFrame = function() {
- h.AVM1Utils.resolveTarget(this.context).as3Object.nextFrame();
- };
- a.prototype.nextScene = function() {
- h.AVM1Utils.resolveTarget(this.context).as3Object.nextScene();
- };
- a.prototype.ord = function(a) {
- return ("" + a).charCodeAt(0);
- };
- a.prototype.play = function() {
- h.AVM1Utils.resolveTarget(this.context).play();
- };
- a.prototype.prevFrame = function() {
- h.AVM1Utils.resolveTarget(this.context).as3Object.prevFrame();
- };
- a.prototype.prevScene = function() {
- h.AVM1Utils.resolveTarget(this.context).as3Object.prevScene();
- };
- a.prototype.print = function(a, b) {
- n("AVM1Globals.print");
- };
- a.prototype.printAsBitmap = function(a, b) {
- n("AVM1Globals.printAsBitmap");
- };
- a.prototype.printAsBitmapNum = function(a, b) {
- n("AVM1Globals.printAsBitmapNum");
- };
- a.prototype.printNum = function(a, b) {
- n("AVM1Globals.printNum");
- };
- a.prototype.random = function(a) {
- return 0 | Math.random() * (0 | a);
- };
- a.prototype.removeMovieClip = function(a) {
- (a = h.AVM1Utils.resolveTarget(this.context, a)) && a.removeMovieClip();
- };
- a.prototype.startDrag = function(a) {
- for (var b = [], d = 1;d < arguments.length;d++) {
- b[d - 1] = arguments[d];
- }
- d = h.AVM1Utils.resolveTarget(this.context, a);
- d.startDrag.apply(d, b);
- };
- a.prototype.stop = function() {
- h.AVM1Utils.resolveTarget(this.context).stop();
- };
- a.prototype.stopAllSounds = function() {
- this.context.sec.flash.media.SoundMixer.axClass.stopAll();
- };
- a.prototype.stopDrag = function() {
- var a = this.context.sec.flash.ui.Mouse.axClass.draggableObject;
- a && h.getAVM1Object(a, this.context).stopDrag();
- };
- a.prototype.substring = function(a, b, d) {
- return this.mbsubstring(a, b, d);
- };
- a.prototype.targetPath = function(a) {
- return h.AVM1Utils.resolveTarget(this.context, a)._target;
- };
- a.prototype.toggleHighQuality = function() {
- n("AVM1Globals.toggleHighQuality");
- };
- a.prototype.trace = function(a) {
- switch(typeof a) {
- case "undefined":
- a = "undefined";
- break;
- case "string":
- break;
- default:
- a = b.alToString(this.context, a);
- }
- e.AVMX.AS.Natives.print(this.context.sec, a);
- };
- a.prototype.unloadMovie = function(a) {
- h.AVM1Utils.resolveTarget(this.context, a).unloadMovie();
- };
- a.prototype.unloadMovieNum = function(a) {
- h.AVM1Utils.resolveLevel(this.context, a).unloadMovie();
- };
- return a;
- }();
- h.AVM1NativeActions = d;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !0, m, ["initialize"], []);
- };
- m.initialize = function(l, d) {
- d.alSetOwnProperty("_listeners", {flags:65, value:new b.Natives.AVM1ArrayNative(l, [])});
- d.alSetOwnProperty("broadcastMessage", {flags:65, value:new b.AVM1NativeFunction(l, function(a) {
- for (var c = [], d = 1;d < arguments.length;d++) {
- c[d - 1] = arguments[d];
- }
- this.alGet("_listeners") instanceof b.Natives.AVM1ArrayNative && e.avm1BroadcastEvent(l, this, a, c);
- })});
- d.alSetOwnProperty("addListener", {flags:65, value:new b.AVM1NativeFunction(l, function(a) {
- var c = this.alGet("_listeners");
- if (!(c instanceof b.Natives.AVM1ArrayNative)) {
- return !1;
- }
- c.value.push(a);
- this.isAVM1Instance && this.updateAllEvents();
- return !0;
- })});
- d.alSetOwnProperty("removeListener", {flags:65, value:new b.AVM1NativeFunction(l, function(a) {
- var c = this.alGet("_listeners");
- if (!(c instanceof b.Natives.AVM1ArrayNative)) {
- return !1;
- }
- c = c.value;
- a = c.indexOf(a);
- if (0 > a) {
- return !1;
- }
- c.splice(a, 1);
- this.isAVM1Instance && this.updateAllEvents();
- return !0;
- })});
- };
- return m;
- }(b.AVM1Object);
- e.AVM1Broadcaster = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !1, m, "DOWN LEFT RIGHT UP isDown getCode".split(" "), []);
- };
- m.alInitStatic = function(b) {
- this._keyStates = [];
- this._lastKeyCode = 0;
- };
- m.bindStage = function(e, d, a) {
- a.addEventListener("keyDown", function(a) {
- a = a.axGetPublicProperty("keyCode");
- var f = e.getStaticState(m);
- f._lastKeyCode = a;
- f._keyStates[a] = 1;
- b.alCallProperty(d, "broadcastMessage", ["onKeyDown"]);
- }, !1);
- a.addEventListener("keyUp", function(a) {
- a = a.axGetPublicProperty("keyCode");
- var f = e.getStaticState(m);
- f._lastKeyCode = a;
- delete f._keyStates[a];
- b.alCallProperty(d, "broadcastMessage", ["onKeyUp"]);
- }, !1);
- };
- m.isDown = function(b, d) {
- return !!b.getStaticState(m)._keyStates[d];
- };
- m.getCode = function(b) {
- return b.getStaticState(m)._lastKeyCode;
- };
- m.DOWN = 40;
- m.LEFT = 37;
- m.RIGHT = 39;
- m.UP = 38;
- return m;
- }(b.AVM1Object);
- e.AVM1Key = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !1, m, ["show", "hide"], []);
- };
- m.bindStage = function(e, d, a) {
- a.addEventListener("mouseDown", function(a) {
- b.alCallProperty(d, "broadcastMessage", ["onMouseDown"]);
- }, !1);
- a.addEventListener("mouseMove", function(a) {
- b.alCallProperty(d, "broadcastMessage", ["onMouseMove"]);
- }, !1);
- a.addEventListener("mouseOut", function(a) {
- b.alCallProperty(d, "broadcastMessage", ["onMouseMove"]);
- }, !1);
- a.addEventListener("mouseUp", function(a) {
- b.alCallProperty(d, "broadcastMessage", ["onMouseUp"]);
- }, !1);
- };
- m.hide = function() {
- };
- m.show = function() {
- };
- return m;
- }(b.AVM1Object);
- e.AVM1Mouse = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(b) {
- function m() {
- b.apply(this, arguments);
- }
- __extends(m, b);
- m.createAVM1Class = function(b) {
- var d = new m(b);
- e.wrapAVM1NativeMembers(b, d, m.prototype, "align# displayState# fullScreenSourceRect# height# scaleMode# showMenu# width#".split(" "), !1);
- return d;
- };
- m.bindStage = function(b, d, a) {
- d._as3Stage = a;
- };
- m.prototype.getAlign = function() {
- return this._as3Stage.align;
- };
- m.prototype.setAlign = function(b) {
- this._as3Stage.align = b;
- };
- m.prototype.getDisplayState = function() {
- return this._as3Stage.displayState;
- };
- m.prototype.setDisplayState = function(b) {
- this._as3Stage.displayState = b;
- };
- m.prototype.getFullScreenSourceRect = function() {
- return this._as3Stage.fullScreenSourceRect;
- };
- m.prototype.setFullScreenSourceRect = function(b) {
- this._as3Stage.fullScreenSourceRect = b;
- };
- m.prototype.getHeight = function() {
- return this._as3Stage.stageHeight;
- };
- m.prototype.getScaleMode = function() {
- return this._as3Stage.scaleMode;
- };
- m.prototype.setScaleMode = function(b) {
- this._as3Stage.scaleMode = b;
- };
- m.prototype.getShowMenu = function() {
- return this._as3Stage.showDefaultContextMenu;
- };
- m.prototype.setShowMenu = function(b) {
- this._as3Stage.showDefaultContextMenu = b;
- };
- m.prototype.getWidth = function() {
- return this._as3Stage.stageWidth;
- };
- return m;
- }(b.AVM1Object);
- e.AVM1Stage = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(d) {
- var a = b.alNewObject(this.context);
- a.alPut("xMin", d.axGetPublicProperty("left"));
- a.alPut("yMin", d.axGetPublicProperty("top"));
- a.alPut("xMax", d.axGetPublicProperty("right"));
- a.alPut("yMax", d.axGetPublicProperty("bottom"));
- return a;
- }
- var t = e.AVMX.AS.flash, m = function(b) {
- function a(a, f, e) {
- void 0 === e && (e = null);
- b.call(this, a, f, e);
- this.propertyName = a;
- this.eventName = f;
- this.argsConverter = e;
- }
- __extends(a, b);
- a.prototype.onBind = function(a) {
- a.as3Object.buttonMode = !0;
- };
- return a;
- }(h.AVM1EventHandler), l = function(d) {
- function a() {
- d.apply(this, arguments);
- }
- __extends(a, d);
- a.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, a, [], "$version# _alpha# attachAudio attachBitmap attachMovie beginFill beginBitmapFill beginGradientFill blendMode# cacheAsBitmap# _callFrame clear createEmptyMovieClip createTextField _currentframe# curveTo _droptarget# duplicateMovieClip enabled# endFill filters# _framesloaded# _focusrect# forceSmoothing# getBounds getBytesLoaded getBytesTotal getDepth getInstanceAtDepth getNextHighestDepth getRect getSWFVersion getTextSnapshot getURL globalToLocal gotoAndPlay gotoAndStop _height# _highquality# hitArea# hitTest lineGradientStyle lineStyle 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(a.prototype, "graphics", {get:function() {
- return this.as3Object.graphics;
- }, enumerable:!0, configurable:!0});
- a.prototype.initAVM1SymbolInstance = function(a, b) {
- d.prototype.initAVM1SymbolInstance.call(this, a, b);
- this._initEventsHandlers();
- };
- a.prototype._lookupChildByName = function(a) {
- a = b.alToString(this.context, a);
- var d = 2;
- this.context.isPropertyCaseSensitive || (d |= 1);
- a = this.as3Object._lookupChildByName(a, d);
- return h.getAVM1Object(a, this.context);
- };
- Object.defineProperty(a.prototype, "__targetPath", {get:function() {
- var a = this.get_target();
- return "/" != a ? "_level0" + a.replace(/\//g, ".") : "_level0";
- }, enumerable:!0, configurable:!0});
- a.prototype.attachAudio = function(a) {
- e.isNullOrUndefined(a) || !1 !== a && e.Debug.notImplemented("AVM1MovieClip.attachAudio");
- };
- a.prototype.attachBitmap = function(a, d, e, h) {
- void 0 === e && (e = "auto");
- void 0 === h && (h = !1);
- e = b.alCoerceString(this.context, e);
- h = b.alToBoolean(this.context, h);
- a = this.context.sec.flash.display.Bitmap.axClass.axConstruct([a.as3BitmapData, e, h]);
- this._insertChildAtDepth(a, d);
- };
- a.prototype._constructMovieClipSymbol = function(a, d) {
- a = b.alToString(this.context, a);
- d = b.alToString(this.context, d);
- var k = this.context.getAsset(a);
- if (k) {
- return k = Object.create(k.symbolProps), k.avm1Name = d, e.AVMX.AS.constructClassFromSymbol(k, this.context.sec.flash.display.MovieClip.axClass);
- }
- };
- a.prototype.get$version = function() {
- return this.context.sec.flash.system.Capabilities.version;
- };
- a.prototype.attachMovie = function(a, b, d, e) {
- if (a = this._constructMovieClipSymbol(a, b)) {
- return d = this._insertChildAtDepth(a, d), e && d._init(e), d;
- }
- };
- a.prototype.beginFill = function(a, d) {
- void 0 === d && (d = 100);
- a = b.alToInt32(this.context, a);
- d = b.alToNumber(this.context, d);
- this.graphics.beginFill(a, d / 100);
- };
- a.prototype.beginBitmapFill = function(a, d, k, l) {
- void 0 === d && (d = null);
- void 0 === k && (k = !1);
- void 0 === l && (l = !1);
- b.alInstanceOf(this.context, a, this.context.globals.BitmapData) && (a = h.toAS3BitmapData(a), d = e.isNullOrUndefined(d) ? null : h.toAS3Matrix(d), k = b.alToBoolean(this.context, k), l = b.alToBoolean(this.context, l), this.graphics.beginBitmapFill(a, d, k, l));
- };
- a.prototype.beginGradientFill = function(a, d, k, h, l, m, g, p) {
- var n = this;
- void 0 === m && (m = "pad");
- void 0 === g && (g = "rgb");
- void 0 === p && (p = 0);
- var z = this.context.sec;
- a = b.alToString(this.context, a);
- d = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(d, function(a) {
- return b.alToInt32(n.context, a);
- }));
- k = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(k, function(a) {
- return b.alToNumber(n.context, a) / 100;
- }));
- h = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(h, function(a) {
- return b.alToNumber(n.context, a);
- }));
- e.isNullOrUndefined(l) && e.Debug.somewhatImplemented("AVM1MovieClip.beginGradientFill");
- m = b.alToString(this.context, m);
- g = b.alToString(this.context, g);
- p = b.alToNumber(this.context, p);
- this.graphics.beginGradientFill(a, d, k, h, null, m, g, p);
- };
- a.prototype._callFrame = function(a) {
- this.as3Object._callFrame(a);
- };
- a.prototype.clear = function() {
- this.graphics.clear();
- };
- a.prototype._insertChildAtDepth = function(a, d) {
- var e = this.getInstanceAtDepth(d);
- e && (e = e.as3Object, e.parent.removeChild(e));
- e = b.alCoerceNumber(this.context, d) + h.DEPTH_OFFSET;
- this.as3Object.addTimelineObjectAtDepth(a, e);
- return this.context.sec.flash.display.Bitmap.axIsType(a) ? null : h.getAVM1Object(a, this.context);
- };
- a.prototype.createEmptyMovieClip = function(a, d) {
- a = b.alToString(this.context, a);
- var e = new this.context.sec.flash.display.MovieClip;
- e.name = a;
- return this._insertChildAtDepth(e, d);
- };
- a.prototype.createTextField = function(a, d, e, h, l, m) {
- a = b.alToString(this.context, a);
- var g = new this.context.sec.flash.text.TextField;
- g.name = a;
- g.x = e;
- g.y = h;
- g.width = l;
- g.height = m;
- return this._insertChildAtDepth(g, d);
- };
- a.prototype.get_currentframe = function() {
- return this.as3Object.currentFrame;
- };
- a.prototype.curveTo = function(a, d, e, h) {
- a = b.alToNumber(this.context, a);
- d = b.alToNumber(this.context, d);
- e = b.alToNumber(this.context, e);
- h = b.alToNumber(this.context, h);
- this.graphics.curveTo(a, d, e, h);
- };
- a.prototype.get_droptarget = function() {
- return this.as3Object.dropTarget;
- };
- a.prototype.duplicateMovieClip = function(a, d, k) {
- a = b.alToString(this.context, a);
- var h = this.context.resolveTarget(null), l = this.as3Object, m;
- m = l._symbol ? e.AVMX.AS.constructClassFromSymbol(l._symbol, l.axClass) : new this.context.sec.flash.display.MovieClip;
- m.name = a;
- m.x = l.x;
- m.scaleX = l.scaleX;
- m.y = l.y;
- m.scaleY = l.scaleY;
- m.rotation = l.rotation;
- m.alpha = l.alpha;
- m.blendMode = l.blendMode;
- m.cacheAsBitmap = l.cacheAsBitmap;
- m.opaqueBackground = l.opaqueBackground;
- m.tabChildren = l.tabChildren;
- m.graphics.copyFrom(l.graphics);
- a = h._insertChildAtDepth(m, d);
- k && a._init(k);
- return a;
- };
- a.prototype.getEnabled = function() {
- return this.as3ObjectOrTemplate.enabled;
- };
- a.prototype.setEnabled = function(a) {
- this.as3ObjectOrTemplate.enabled = a;
- };
- a.prototype.endFill = function() {
- this.graphics.endFill();
- };
- a.prototype.getForceSmoothing = function() {
- e.Debug.somewhatImplemented("AVM1MovieClip.getForceSmoothing");
- return !1;
- };
- a.prototype.setForceSmoothing = function(a) {
- b.alToBoolean(this.context, a);
- e.Debug.somewhatImplemented("AVM1MovieClip.setForceSmoothing");
- };
- a.prototype.get_framesloaded = function() {
- return this.as3Object.framesLoaded;
- };
- a.prototype.getBounds = function(a) {
- a = a.as3Object;
- if (!a) {
- throw Error("Unsupported object type for AVM1MovieClip.getBounds");
- }
- return n(this.as3Object.getBounds(a));
- };
- a.prototype.getBytesLoaded = function() {
- return this.as3Object.loaderInfo.bytesLoaded;
- };
- a.prototype.getBytesTotal = function() {
- return this.as3Object.loaderInfo.bytesTotal;
- };
- a.prototype.getInstanceAtDepth = function(a) {
- a = b.alCoerceNumber(this.context, a) + h.DEPTH_OFFSET;
- for (var d = this.as3Object, e = 0, l = d.numChildren;e < l;e++) {
- var m = d._lookupChildByIndex(e, 2);
- if (m && m._depth === a) {
- return this.context.sec.flash.display.Bitmap.axIsType(m) ? this : h.getAVM1Object(m, this.context);
- }
- }
- };
- a.prototype.getNextHighestDepth = function() {
- for (var a = this.as3Object, b = h.DEPTH_OFFSET, d = 0, e = a.numChildren;d < e;d++) {
- var l = a._lookupChildByIndex(d, 2);
- l._depth >= b && (b = l._depth + 1);
- }
- return b - h.DEPTH_OFFSET;
- };
- a.prototype.getRect = function(a) {
- a = a.as3Object;
- if (!a) {
- throw Error("Unsupported object type for AVM1MovieClip.getRect");
- }
- return n(this.as3Object.getRect(a));
- };
- a.prototype.getSWFVersion = function() {
- return this.as3Object.loaderInfo.swfVersion;
- };
- a.prototype.getTextSnapshot = function() {
- e.Debug.notImplemented("AVM1MovieClip.getTextSnapshot");
- };
- a.prototype.getURL = function(a, b, d) {
- a = new this.context.sec.flash.net.URLRequest(a);
- d && (a.method = d);
- e.AVMX.AS.FlashNetScript_navigateToURL(a, b);
- };
- a.prototype.globalToLocal = function(a) {
- var b = this.as3Object.globalToLocal(h.toAS3Point(a));
- h.copyAS3PointTo(b, a);
- };
- a.prototype.gotoAndPlay = function(a) {
- this.as3Object.gotoAndPlay(a);
- };
- a.prototype.gotoAndStop = function(a) {
- this.as3Object.gotoAndStop(a);
- };
- a.prototype.getHitArea = function() {
- return this._hitArea;
- };
- a.prototype.setHitArea = function(a) {
- a = (this._hitArea = a) ? a.as3Object : null;
- this.context.sec.flash.display.MovieClip.axIsType(a) || (a = null);
- this.as3Object.hitArea = a;
- };
- a.prototype.hitTest = function(a, d, k) {
- if (1 >= arguments.length) {
- var h = arguments[0];
- return e.isNullOrUndefined(h) || !h.isAVM1Instance ? !1 : this.as3Object.hitTestObject(h.as3Object);
- }
- a = b.alToNumber(this.context, a);
- d = b.alToNumber(this.context, d);
- k = b.alToBoolean(this.context, k);
- return this.as3Object.hitTestPoint(a, d, k);
- };
- a.prototype.lineGradientStyle = function(a, d, k, h, l, m, g, p) {
- var n = this;
- void 0 === m && (m = "pad");
- void 0 === g && (g = "rgb");
- void 0 === p && (p = 0);
- var z = this.context.sec;
- a = b.alToString(this.context, a);
- d = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(d, function(a) {
- return b.alToInt32(n.context, a);
- }));
- k = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(k, function(a) {
- return b.alToNumber(n.context, a) / 100;
- }));
- h = z.createArray(b.Natives.AVM1ArrayNative.mapToJSArray(h, function(a) {
- return b.alToNumber(n.context, a);
- }));
- e.isNullOrUndefined(l) && e.Debug.somewhatImplemented("AVM1MovieClip.lineGradientStyle");
- m = b.alToString(this.context, m);
- g = b.alToString(this.context, g);
- p = b.alToNumber(this.context, p);
- this.graphics.lineGradientStyle(a, d, k, h, null, m, g, p);
- };
- a.prototype.lineStyle = function(a, d, e, h, l, m, g, p) {
- void 0 === a && (a = NaN);
- void 0 === d && (d = 0);
- void 0 === e && (e = 100);
- void 0 === h && (h = !1);
- void 0 === l && (l = "normal");
- void 0 === m && (m = "round");
- void 0 === g && (g = "round");
- void 0 === p && (p = 3);
- a = b.alToNumber(this.context, a);
- d = b.alToInt32(this.context, d);
- h = b.alToBoolean(this.context, h);
- l = b.alToString(this.context, l);
- m = b.alToString(this.context, m);
- g = b.alToString(this.context, g);
- p = b.alToNumber(this.context, p);
- this.graphics.lineStyle(a, d, e / 100, h, l, m, g, p);
- };
- a.prototype.lineTo = function(a, d) {
- a = b.alToNumber(this.context, a);
- d = b.alToNumber(this.context, d);
- this.graphics.lineTo(a, d);
- };
- a.prototype.loadMovie = function(a, b) {
- function d(a) {
- e.removeEventListener(t.events.Event.COMPLETE, d);
- a = this.as3Object.parent;
- var b = a.getChildIndex(this.as3Object);
- a.removeChild(this.as3Object);
- a.addChildAt(e.content, b);
- }
- var e = new this.context.sec.flash.display.Loader, h = new this.context.sec.flash.net.URLRequest(a);
- b && (h.method = b);
- e.load(h);
- e.addEventListener(t.events.Event.COMPLETE, d);
- };
- a.prototype.loadVariables = function(a, b) {
- this.context.actions._loadVariables(this, a, b);
- };
- a.prototype.localToGlobal = function(a) {
- var b = this.as3Object.localToGlobal(h.toAS3Point(a));
- h.copyAS3PointTo(b, a);
- };
- a.prototype.get_lockroot = function() {
- return this._lockroot;
- };
- a.prototype.set_lockroot = function(a) {
- e.Debug.somewhatImplemented("AVM1MovieClip._lockroot");
- this._lockroot = b.alToBoolean(this.context, a);
- };
- a.prototype.moveTo = function(a, d) {
- a = b.alToNumber(this.context, a);
- d = b.alToNumber(this.context, d);
- this.graphics.moveTo(a, d);
- };
- a.prototype.nextFrame = function() {
- this.as3Object.nextFrame();
- };
- a.prototype.nextScene = function() {
- this.as3Object.nextScene();
- };
- a.prototype.play = function() {
- this.as3Object.play();
- };
- a.prototype.prevFrame = function() {
- this.as3Object.prevFrame();
- };
- a.prototype.prevScene = function() {
- this.as3Object.prevScene();
- };
- a.prototype.removeMovieClip = function() {
- var a = this.get_parent();
- a && a.as3Object.removeChild(this.as3Object);
- };
- a.prototype.setMask = function(a) {
- var b = this.as3Object;
- if (a = h.AVM1Utils.resolveMovieClip(this.context, a)) {
- b.mask = a.as3Object;
- }
- };
- a.prototype.startDrag = function(a, d, e, h, l) {
- a = b.alToBoolean(this.context, a);
- var m = null;
- 1 < arguments.length && (d = b.alToNumber(this.context, d), e = b.alToNumber(this.context, e), h = b.alToNumber(this.context, h), l = b.alToNumber(this.context, l), m = new this.context.sec.flash.geom.Rectangle(d, e, h - d, l - e));
- this.as3Object.startDrag(a, m);
- };
- a.prototype.stop = function() {
- return this.as3Object.stop();
- };
- a.prototype.stopDrag = function() {
- return this.as3Object.stopDrag();
- };
- a.prototype.swapDepths = function(a) {
- var b = h.AVM1Utils.resolveLevelOrTarget(this.context, a);
- b && (a = this.as3Object, b = b.as3Object, a.parent === b.parent && a.parent.swapChildren(a, b));
- };
- a.prototype.getTabChildren = function() {
- return this.as3ObjectOrTemplate.tabChildren;
- };
- a.prototype.setTabChildren = function(a) {
- this.as3ObjectOrTemplate.tabChildren = b.alToBoolean(this.context, a);
- };
- a.prototype.get_totalframes = function() {
- return this.as3Object.totalFrames;
- };
- a.prototype.getTrackAsMenu = function() {
- return this.as3ObjectOrTemplate.trackAsMenu;
- };
- a.prototype.setTrackAsMenu = function(a) {
- this.as3ObjectOrTemplate.trackAsMenu = b.alToBoolean(this.context, a);
- };
- a.prototype.toString = function() {
- return this.__targetPath;
- };
- a.prototype.unloadMovie = function() {
- var a = this.as3Object, b = a.loaderInfo.loader;
- b.parent && b.parent.removeChild(b);
- a.stop();
- };
- a.prototype.getUseHandCursor = function() {
- return this.as3Object.useHandCursor;
- };
- a.prototype.setUseHandCursor = function(a) {
- this.as3Object.useHandCursor = a;
- };
- a.prototype.setParameters = function(a) {
- for (var b in a) {
- this.alHasProperty(b) || this.alPut(b, a[b]);
- }
- };
- a.prototype._resolveLevelNProperty = function(a) {
- a = b.alToString(this.context, a);
- this.context.isPropertyCaseSensitive || (a = a.toLowerCase());
- if ("_level0" === a) {
- return this.context.resolveLevel(0);
- }
- if ("_root" === a) {
- return this.context.resolveRoot();
- }
- if (0 === a.indexOf("_level")) {
- a = a.substring(6);
- var d = a | 0;
- if (0 < d && a == d) {
- return this.context.resolveLevel(d);
- }
- }
- return null;
- };
- a.prototype._getCachedPropertyResult = function(a) {
- this._cachedPropertyResult ? this._cachedPropertyResult.value = a : this._cachedPropertyResult = {flags:65, value:a};
- return this._cachedPropertyResult;
- };
- a.prototype.alGetOwnProperty = function(a) {
- var f = d.prototype.alGetOwnProperty.call(this, a);
- if (f) {
- return f;
- }
- a = b.alToString(this.context, a);
- if ("_" === a[0]) {
- if (f = this._resolveLevelNProperty(a)) {
- return this._getCachedPropertyResult(f);
- }
- if (0 <= b.PropertiesIndexMap.indexOf(a.toLowerCase())) {
- return d.prototype.alGetOwnProperty.call(this, a.toLowerCase());
- }
- }
- if (this.isAVM1Instance && (a = this._lookupChildByName(a))) {
- return this._getCachedPropertyResult(a);
- }
- };
- a.prototype.alGetOwnPropertiesKeys = function() {
- var a = d.prototype.alGetOwnPropertiesKeys.call(this);
- if (!this.isAVM1Instance) {
- return a;
- }
- var b = this.as3Object;
- if (0 === b._children.length) {
- return a;
- }
- for (var e = Object.create(null), h = 0;h < a.length;h++) {
- e[a[h]] = !0;
- }
- h = 0;
- for (a = b._children.length;h < a;h++) {
- e[b._children[h].name] = !0;
- }
- return Object.getOwnPropertyNames(e);
- };
- a.prototype._init = function(a) {
- var d = this;
- a instanceof b.AVM1Object && b.alForEachProperty(a, function(b) {
- d.alPut(b, a.alGet(b));
- }, null);
- };
- a.prototype._initEventsHandlers = function() {
- this.bindEvents([new h.AVM1EventHandler("onData", "data"), new h.AVM1EventHandler("onDragOut", "dragOut"), new h.AVM1EventHandler("onDragOver", "dragOver"), new h.AVM1EventHandler("onEnterFrame", "enterFrame"), new h.AVM1EventHandler("onKeyDown", "keyDown"), new h.AVM1EventHandler("onKeyUp", "keyUp"), new h.AVM1EventHandler("onKillFocus", "focusOut", function(a) {
- return [a.relatedObject];
- }), new h.AVM1EventHandler("onLoad", "load"), new h.AVM1EventHandler("onMouseDown", "mouseDown"), new h.AVM1EventHandler("onMouseUp", "mouseUp"), new h.AVM1EventHandler("onMouseMove", "mouseMove"), new m("onPress", "mouseDown"), new m("onRelease", "mouseUp"), new m("onReleaseOutside", "releaseOutside"), new m("onRollOut", "mouseOut"), new m("onRollOver", "mouseOver"), new h.AVM1EventHandler("onSetFocus", "focusIn", function(a) {
- return [a.relatedObject];
- }), new h.AVM1EventHandler("onUnload", "unload")]);
- };
- return a;
- }(h.AVM1SymbolBase);
- h.AVM1MovieClip = l;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.Debug.somewhatImplemented, t;
- (function(b) {
- b[b.IdleToOverUp = 1] = "IdleToOverUp";
- b[b.OverUpToIdle = 2] = "OverUpToIdle";
- b[b.OverUpToOverDown = 4] = "OverUpToOverDown";
- b[b.OverDownToOverUp = 8] = "OverDownToOverUp";
- b[b.OverDownToOutDown = 16] = "OverDownToOutDown";
- b[b.OutDownToOverDown = 32] = "OutDownToOverDown";
- b[b.OutDownToIdle = 64] = "OutDownToIdle";
- b[b.IdleToOverDown = 128] = "IdleToOverDown";
- b[b.OverDownToIdle = 256] = "OverDownToIdle";
- })(t || (t = {}));
- var m = [-1, 37, 39, 36, 35, 45, 46, -1, 8, -1, -1, -1, -1, 13, 38, 40, 33, 34, 9, 27];
- t = function(e) {
- function d() {
- e.apply(this, arguments);
- }
- __extends(d, e);
- d.createAVM1Class = function(a) {
- return h.wrapAVM1NativeClass(a, !0, d, [], "_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(" "));
- };
- d.prototype.initAVM1SymbolInstance = function(a, b) {
- e.prototype.initAVM1SymbolInstance.call(this, a, b);
- var d = this._as3Object;
- if (d._symbol && d._symbol.data.buttonActions) {
- d.buttonMode = !0;
- d.addEventListener("addedToStage", this._addListeners.bind(this));
- d.addEventListener("removedFromStage", this._removeListeners.bind(this));
- for (var k = this._requiredListeners = Object.create(null), h = this._actions = d._symbol.data.buttonActions, m = 0;m < h.length;m++) {
- var q = h[m];
- q.actionsBlock || (q.actionsBlock = a.actionsDataFactory.createActionsData(q.actionsData, "s" + d._symbol.id + "e" + m));
- if (q.keyCode) {
- k.keyDown = this._keyDownHandler.bind(this);
- } else {
- var g;
- switch(q.stateTransitionFlags) {
- case 64:
- g = "releaseOutside";
- break;
- case 1:
- g = "rollOver";
- break;
- case 2:
- g = "rollOut";
- break;
- case 4:
- g = "mouseDown";
- break;
- case 8:
- g = "mouseUp";
- break;
- case 16:
- ;
- case 32:
- n("AVM1 drag over/out button actions");
- break;
- case 128:
- ;
- case 256:
- n("AVM1 drag trackAsMenu over/out button actions");
- break;
- default:
- a.utils.warn("Unknown AVM1 button action type: " + q.stateTransitionFlags);
- continue;
- }
- k[g] = this._mouseEventHandler.bind(this, q.stateTransitionFlags);
- }
- }
- }
- this._initEventsHandlers();
- };
- d.prototype.getEnabled = function() {
- return this._as3Object.enabled;
- };
- d.prototype.setEnabled = function(a) {
- this._as3Object.enabled = b.alToBoolean(this.context, a);
- };
- d.prototype.getTrackAsMenu = function() {
- return this.as3ObjectOrTemplate.trackAsMenu;
- };
- d.prototype.setTrackAsMenu = function(a) {
- this.as3ObjectOrTemplate.trackAsMenu = b.alToBoolean(this.context, a);
- };
- d.prototype.getUseHandCursor = function() {
- return this._as3Object.useHandCursor;
- };
- d.prototype.setUseHandCursor = function(a) {
- this._as3Object.useHandCursor = b.alToBoolean(this.context, a);
- };
- d.prototype._addListeners = function() {
- for (var a in this._requiredListeners) {
- ("keyDown" === a ? this._as3Object.stage : this._as3Object).addEventListener(a, this._requiredListeners[a]);
- }
- };
- d.prototype._removeListeners = function() {
- for (var a in this._requiredListeners) {
- ("keyDown" === a ? this._as3Object.stage : this._as3Object).removeEventListener(a, this._requiredListeners[a]);
- }
- };
- d.prototype._keyDownHandler = function(a) {
- for (var b = this._actions, d = 0;d < b.length;d++) {
- var e = b[d];
- e.keyCode && (32 > e.keyCode && m[e.keyCode] === a.axGetPublicProperty("keyCode") || e.keyCode === a.axGetPublicProperty("charCode")) && this._runAction(e);
- }
- };
- d.prototype._mouseEventHandler = function(a) {
- for (var b = this._actions, d = 0;d < b.length;d++) {
- var e = b[d];
- e.stateTransitionFlags === a && this._runAction(e);
- }
- };
- d.prototype._runAction = function(a) {
- this._as3Object.loaderInfo._avm1Context.executeActions(a.actionsBlock, h.getAVM1Object(this._as3Object._parent, this.context));
- };
- d.prototype._initEventsHandlers = function() {
- this.bindEvents([new h.AVM1EventHandler("onDragOut", "dragOut"), new h.AVM1EventHandler("onDragOver", "dragOver"), new h.AVM1EventHandler("onKeyDown", "keyDown"), new h.AVM1EventHandler("onKeyUp", "keyUp"), new h.AVM1EventHandler("onKillFocus", "focusOut", function(a) {
- return [a.relatedObject];
- }), new h.AVM1EventHandler("onLoad", "load"), new h.AVM1EventHandler("onMouseDown", "mouseDown"), new h.AVM1EventHandler("onMouseUp", "mouseUp"), new h.AVM1EventHandler("onPress", "mouseDown"), new h.AVM1EventHandler("onRelease", "mouseUp"), new h.AVM1EventHandler("onReleaseOutside", "releaseOutside"), new h.AVM1EventHandler("onRollOut", "mouseOut"), new h.AVM1EventHandler("onRollOver", "mouseOver"), new h.AVM1EventHandler("onSetFocus", "focusIn", function(a) {
- return [a.relatedObject];
- })]);
- };
- return d;
- }(h.AVM1SymbolBase);
- h.AVM1Button = t;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, m, [], "_alpha# antiAliasType# autoSize# background# backgroundColor# border# borderColor# bottomScroll# condenseWhite# embedFonts# filters# getNewTextFormat getTextFormat gridFitType# getDepth _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# variable# _visible# _width# wordWrap# _x# _xmouse# _xscale# _y# _ymouse# _yscale#".split(" "));
- };
- m.prototype.initAVM1SymbolInstance = function(b, d) {
- n.prototype.initAVM1SymbolInstance.call(this, b, d);
- this._variable = "";
- this._html = !1;
- this._exitFrameHandler = null;
- d._symbol && (this.setVariable(d._symbol.variableName || ""), this._html = d._symbol.html);
- this._initEventsHandlers();
- };
- m.prototype.getAntiAliasType = function() {
- return this._as3Object.antiAliasType;
- };
- m.prototype.setAntiAliasType = function(e) {
- e = b.alCoerceString(this.context, e);
- this._as3Object.antiAliasType = e;
- };
- m.prototype.getAutoSize = function() {
- return this._as3Object.autoSize;
- };
- m.prototype.setAutoSize = function(e) {
- !0 === e ? e = "left" : !1 === e && (e = "none");
- e = b.alCoerceString(this.context, e);
- this._as3Object.autoSize = e;
- };
- m.prototype.getBackground = function() {
- return this._as3Object.background;
- };
- m.prototype.setBackground = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.background = e;
- };
- m.prototype.getBackgroundColor = function() {
- return this._as3Object.backgroundColor;
- };
- m.prototype.setBackgroundColor = function(e) {
- e = b.alToInt32(this.context, e);
- this._as3Object.backgroundColor = e;
- };
- m.prototype.getBorder = function() {
- return this._as3Object.border;
- };
- m.prototype.setBorder = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.border = e;
- };
- m.prototype.getBorderColor = function() {
- return this._as3Object.borderColor;
- };
- m.prototype.setBorderColor = function(e) {
- e = b.alToInt32(this.context, e);
- this._as3Object.borderColor = e;
- };
- m.prototype.getBottomScroll = function() {
- return this._as3Object.bottomScrollV;
- };
- m.prototype.getCondenseWhite = function() {
- return this._as3Object.condenseWhite;
- };
- m.prototype.setCondenseWhite = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.condenseWhite = e;
- };
- m.prototype.getEmbedFonts = function() {
- return this._as3Object.embedFonts;
- };
- m.prototype.setEmbedFonts = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.embedFonts = e;
- };
- m.prototype.getNewTextFormat = function() {
- return h.AVM1TextFormat.createFromNative(this.context, this._as3Object.defaultTextFormat);
- };
- m.prototype.getTextFormat = function(e, d) {
- void 0 === e && (e = -1);
- void 0 === d && (d = -1);
- e = b.alToInteger(this.context, e);
- d = b.alToInteger(this.context, d);
- var a = this._as3Object.getTextFormat(e, d);
- return h.AVM1TextFormat.createFromNative(this.context, a);
- };
- m.prototype.getGridFitType = function() {
- return this._as3Object.gridFitType;
- };
- m.prototype.setGridFitType = function(e) {
- e = b.alCoerceString(this.context, e);
- this._as3Object.gridFitType = e;
- };
- m.prototype.getHscroll = function() {
- return this._as3Object.scrollH;
- };
- m.prototype.setHscroll = function(e) {
- e = b.alCoerceNumber(this.context, e);
- this._as3Object.scrollH = e;
- };
- m.prototype.getHtml = function() {
- return this._html;
- };
- m.prototype.setHtml = function(b) {
- this._html = !!b;
- };
- m.prototype.getHtmlText = function() {
- return this._html ? this._as3Object.htmlText : this._as3Object.text;
- };
- m.prototype.setHtmlText = function(e) {
- e = void 0 === e ? "undefined" : b.alToString(this.context, e);
- this._html ? this._as3Object.htmlText = e : this._as3Object.text = e;
- };
- m.prototype.getLength = function() {
- return this._as3Object.length;
- };
- m.prototype.getMaxChars = function() {
- return this._as3Object.maxChars;
- };
- m.prototype.setMaxChars = function(e) {
- e = b.alCoerceNumber(this.context, e);
- this._as3Object.maxChars = e;
- };
- m.prototype.getMaxhscroll = function() {
- return this._as3Object.maxScrollH;
- };
- m.prototype.getMaxscroll = function() {
- return this._as3Object.maxScrollV;
- };
- m.prototype.getMultiline = function() {
- return this._as3Object.multiline;
- };
- m.prototype.setMultiline = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.multiline = e;
- };
- m.prototype.getPassword = function() {
- return this._as3Object.displayAsPassword;
- };
- m.prototype.setPassword = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.displayAsPassword = e;
- };
- m.prototype.getScroll = function() {
- return this._as3Object.scrollV;
- };
- m.prototype.setScroll = function(e) {
- e = b.alCoerceNumber(this.context, e);
- this._as3Object.scrollV = e;
- };
- m.prototype.getSelectable = function() {
- return this._as3Object.selectable;
- };
- m.prototype.setSelectable = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.selectable = e;
- };
- m.prototype.setNewTextFormat = function(b) {
- var d;
- b instanceof h.AVM1TextFormat && (d = b._as3Object);
- this._as3Object.defaultTextFormat = d;
- };
- m.prototype.setTextFormat = function() {
- var e = -1, d = -1, a;
- switch(arguments.length) {
- case 0:
- return;
- case 1:
- a = arguments[0];
- break;
- case 2:
- e = b.alToNumber(this.context, arguments[0]);
- a = arguments[1];
- break;
- default:
- e = b.alToNumber(this.context, arguments[0]), d = b.alToNumber(this.context, arguments[1]), a = arguments[2];
- }
- var c;
- a instanceof h.AVM1TextFormat && (c = a._as3Object);
- this._as3Object.setTextFormat(c, e, d);
- };
- m.prototype.getText = function() {
- return this._as3Object.text;
- };
- m.prototype.setText = function(e) {
- e = void 0 === e ? "undefined" : b.alToString(this.context, e);
- this._as3Object.text = e;
- };
- m.prototype.getTextColor = function() {
- return this._as3Object.textColor;
- };
- m.prototype.setTextColor = function(e) {
- e = b.alToInt32(this.context, e);
- this._as3Object.textColor = e;
- };
- m.prototype.getTextHeight = function() {
- return this._as3Object.textHeight;
- };
- m.prototype.setTextHeight = function(b) {
- e.Debug.notImplemented("AVM1TextField.setTextHeight");
- };
- m.prototype.getTextWidth = function() {
- return this._as3Object.textWidth;
- };
- m.prototype.setTextWidth = function(b) {
- e.Debug.notImplemented("AVM1TextField.setTextWidth");
- };
- m.prototype.getType = function() {
- return this._as3Object.type;
- };
- m.prototype.setType = function(e) {
- e = b.alCoerceString(this.context, e);
- this._as3Object.type = e;
- };
- m.prototype.getVariable = function() {
- return this._variable;
- };
- m.prototype.setVariable = function(e) {
- e = b.alCoerceString(this.context, e);
- if (e !== this._variable) {
- var d = this.as3Object;
- this._exitFrameHandler && !e && (d.removeEventListener("exitFrame", this._exitFrameHandler), this._exitFrameHandler = null);
- this._variable = e;
- !this._exitFrameHandler && e && (this._exitFrameHandler = this._onAS3ObjectExitFrame.bind(this), d.addEventListener("exitFrame", this._exitFrameHandler));
- }
- };
- m.prototype._onAS3ObjectExitFrame = function() {
- this._syncTextFieldValue(this.as3Object, this._variable);
- };
- m.prototype._syncTextFieldValue = function(b, d) {
- var a;
- a = 0 <= d.indexOf(".") || 0 <= d.indexOf(":");
- var c = this.context.utils;
- if (a) {
- var f = d.split(/[.:\/]/g);
- d = f.pop();
- if ("_root" == f[0] || "" === f[0]) {
- if (null === b.root) {
- return;
- }
- a = h.getAVM1Object(b.root, this.context);
- f.shift();
- "" === f[0] && f.shift();
- } else {
- a = h.getAVM1Object(b._parent, this.context);
- }
- for (;0 < f.length;) {
- var e = f.shift();
- a = c.getProperty(a, e);
- if (!a) {
- return;
- }
- }
- } else {
- a = h.getAVM1Object(b._parent, this.context);
- }
- a ? (c.hasProperty(a, d) || c.setProperty(a, d, b.text), b.text = "" + c.getProperty(a, d)) : c.warn("Clip " + d + " was not found");
- };
- m.prototype.getWordWrap = function() {
- return this._as3Object.wordWrap;
- };
- m.prototype.setWordWrap = function(e) {
- e = b.alToBoolean(this.context, e);
- this._as3Object.wordWrap = e;
- };
- m.prototype._initEventsHandlers = function() {
- this.bindEvents([new h.AVM1EventHandler("onDragOut", "dragOut"), new h.AVM1EventHandler("onDragOver", "dragOver"), new h.AVM1EventHandler("onKeyDown", "keyDown"), new h.AVM1EventHandler("onKeyUp", "keyUp"), new h.AVM1EventHandler("onKillFocus", "focusOut", function(b) {
- return [b.relatedObject];
- }), new h.AVM1EventHandler("onLoad", "load"), new h.AVM1EventHandler("onMouseDown", "mouseDown"), new h.AVM1EventHandler("onMouseUp", "mouseUp"), new h.AVM1EventHandler("onPress", "mouseDown"), new h.AVM1EventHandler("onRelease", "mouseUp"), new h.AVM1EventHandler("onReleaseOutside", "releaseOutside"), new h.AVM1EventHandler("onRollOut", "mouseOut"), new h.AVM1EventHandler("onRollOver", "mouseOver"), new h.AVM1EventHandler("onSetFocus", "focusIn", function(b) {
- return [b.relatedObject];
- })]);
- };
- return m;
- }(h.AVM1SymbolBase);
- h.AVM1TextField = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(b) {
- function m() {
- b.apply(this, arguments);
- }
- __extends(m, b);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !0, m, [], ["getRGB", "getTransform", "setRGB", "setTransform"], null, m.prototype.avm1Constructor);
- };
- m.prototype.avm1Constructor = function(b) {
- this._target = e.AVM1Utils.resolveTarget(this.context, b);
- };
- m.prototype.getRGB = function() {
- return m.prototype.getTransform.call(this).alGet("rgb");
- };
- m.prototype.getTransform = function() {
- return e.AVM1ColorTransform.fromAS3ColorTransform(this.context, this._target.as3Object.transform.colorTransform);
- };
- m.prototype.setRGB = function(b) {
- var d = m.prototype.getTransform.call(this);
- d.alPut("rgb", b);
- m.prototype.setTransform.call(this, d);
- };
- m.prototype.setTransform = function(b) {
- this._target.as3Object.transform.colorTransform = e.toAS3ColorTransform(b);
- };
- return m;
- }(b.AVM1Object);
- e.AVM1Color = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- function n(a, b) {
- return void 0 === a ? b : a;
- }
- function t(a) {
- var d = a.context;
- return a instanceof b.AVM1Object ? new d.sec.flash.geom.ColorTransform(b.alCoerceNumber(d, n(a.alGet("redMultiplier"), 1)), b.alCoerceNumber(d, n(a.alGet("greenMultiplier"), 1)), b.alCoerceNumber(d, n(a.alGet("blueMultiplier"), 1)), b.alCoerceNumber(d, n(a.alGet("alphaMultiplier"), 1)), b.alCoerceNumber(d, n(a.alGet("redOffset"), 0)), b.alCoerceNumber(d, n(a.alGet("greenOffset"), 0)), b.alCoerceNumber(d, n(a.alGet("blueOffset"), 0)), b.alCoerceNumber(d, n(a.alGet("alphaOffset"), 0))) : new d.sec.flash.geom.ColorTransform(1,
- 1, 1, 1, 0, 0, 0, 0);
- }
- function m(a, b) {
- b.alPut("redMultiplier", a.redMultiplier);
- b.alPut("greenMultiplier", a.greenMultiplier);
- b.alPut("blueMultiplier", a.blueMultiplier);
- b.alPut("alphaMultiplier", a.alphaMultiplier);
- b.alPut("redOffset", a.redOffset);
- b.alPut("greenOffset", a.greenOffset);
- b.alPut("blueOffset", a.blueOffset);
- b.alPut("alphaOffset", a.alphaOffset);
- }
- e.toAS3ColorTransform = t;
- e.copyAS3ColorTransform = m;
- var l = function(a) {
- function b(d, f, e, h, g, p, l, m, n) {
- void 0 === f && (f = 1);
- void 0 === e && (e = 1);
- void 0 === h && (h = 1);
- void 0 === g && (g = 1);
- void 0 === p && (p = 0);
- void 0 === l && (l = 0);
- void 0 === m && (m = 0);
- void 0 === n && (n = 0);
- a.call(this, d);
- this.alPrototype = d.globals.ColorTransform.alGetPrototypeProperty();
- this.alPut("redMultiplier", f);
- this.alPut("greenMultiplier", e);
- this.alPut("blueMultiplier", h);
- this.alPut("alphaMultiplier", g);
- this.alPut("redOffset", p);
- this.alPut("greenOffset", l);
- this.alPut("blueOffset", m);
- this.alPut("alphaOffset", n);
- }
- __extends(b, a);
- b.fromAS3ColorTransform = function(a, c) {
- return new b(a, c.redMultiplier, c.greenMultiplier, c.blueMultiplier, c.alphaMultiplier, c.redOffset, c.greenOffset, c.blueOffset, c.alphaOffset);
- };
- return b;
- }(b.AVM1Object);
- e.AVM1ColorTransform = l;
- var d = function(c) {
- function d(f) {
- c.call(this, f);
- b.alDefineObjectProperties(this, {prototype:{value:new a(f, this)}});
- }
- __extends(d, c);
- d.prototype.alConstruct = function(a) {
- var b = Object.create(l.prototype);
- a = a || [];
- l.apply(b, [this.context].concat(a));
- return b;
- };
- return d;
- }(b.AVM1Function);
- e.AVM1ColorTransformFunction = d;
- var a = function(a) {
- function d(f, e) {
- a.call(this, f);
- this.alPrototype = f.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:e, writable:!0}, rgb:{get:this.getRgb, set:this.setRgb}, concat:{value:this.concat, writable:!0}, toString:{value:this._toString, writable:!0}});
- }
- __extends(d, a);
- d.prototype.getRgb = function() {
- return t(this).color;
- };
- d.prototype.setRgb = function(a) {
- var c = t(this);
- c.color = b.alToInt32(this.context, a);
- m(c, this);
- };
- d.prototype.concat = function(a) {
- var b = t(this);
- b.concat(t(a));
- m(b, this);
- };
- d.prototype._toString = function() {
- return t(this).toString();
- };
- return d;
- }(b.AVM1Object);
- e.AVM1ColorTransformPrototype = a;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- function n(a) {
- var c = a.context, d, e, h, l, m, g;
- a instanceof b.AVM1Object && (d = b.alCoerceNumber(c, a.alGet("a")), e = b.alCoerceNumber(c, a.alGet("b")), h = b.alCoerceNumber(c, a.alGet("c")), l = b.alCoerceNumber(c, a.alGet("d")), m = b.alCoerceNumber(c, a.alGet("tx")), g = b.alCoerceNumber(c, a.alGet("ty")));
- return new c.sec.flash.geom.Matrix(d, e, h, l, m, g);
- }
- function t(a, b) {
- b.alPut("a", a.a);
- b.alPut("b", a.b);
- b.alPut("c", a.c);
- b.alPut("d", a.d);
- b.alPut("tx", a.tx);
- b.alPut("ty", a.ty);
- }
- e.toAS3Matrix = n;
- e.copyAS3MatrixTo = t;
- var m = function(a) {
- function b(c, d, e, h, l, g, p) {
- void 0 === d && (d = 1);
- void 0 === e && (e = 0);
- void 0 === h && (h = 0);
- void 0 === l && (l = 1);
- void 0 === g && (g = 0);
- void 0 === p && (p = 0);
- a.call(this, c);
- this.alPrototype = c.globals.Matrix.alGetPrototypeProperty();
- this.alPut("a", d);
- this.alPut("b", e);
- this.alPut("c", h);
- this.alPut("d", l);
- this.alPut("tx", g);
- this.alPut("ty", p);
- }
- __extends(b, a);
- b.fromAS3Matrix = function(a, d) {
- return new b(a, d.a, d.b, d.c, d.d, d.tx, d.ty);
- };
- return b;
- }(b.AVM1Object);
- e.AVM1Matrix = m;
- var l = function(a) {
- function c(c) {
- a.call(this, c);
- b.alDefineObjectProperties(this, {prototype:{value:new d(c, this)}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- return a && 0 < a.length ? new m(this.context, a[0], a[1], a[2], a[3], a[4], a[5]) : new m(this.context);
- };
- return c;
- }(b.AVM1Function);
- e.AVM1MatrixFunction = l;
- var d = function(a) {
- function c(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d, writable:!0}, clone:{value:this.clone, writable:!0}, concat:{value:this.concat, writable:!0}, createBox:{value:this.createBox, writable:!0}, createGradientBox:{value:this.createGradientBox, writable:!0}, deltaTransformPoint:{value:this.deltaTransformPoint, writable:!0}, identity:{value:this.identity, writable:!0}, invert:{value:this.invert, writable:!0}, rotate:{value:this.rotate, writable:!0}, scale:{value:this.scale, writable:!0},
- toString:{value:this._toString, writable:!0}, transformPoint:{value:this.transformPoint, writable:!0}, translate:{value:this.translate, writable:!0}});
- }
- __extends(c, a);
- c.prototype.clone = function() {
- var a = new m(this.context);
- this instanceof b.AVM1Object && (a.alPut("a", this.alGet("a")), a.alPut("b", this.alGet("b")), a.alPut("c", this.alGet("c")), a.alPut("d", this.alGet("d")), a.alPut("tx", this.alGet("tx")), a.alPut("ty", this.alGet("ty")));
- return a;
- };
- c.prototype.concat = function(a) {
- var b = n(this);
- a = n(a);
- b.concat(a);
- t(b, this);
- };
- c.prototype.createBox = function(a, c, d, e, h) {
- void 0 === d && (d = 0);
- void 0 === e && (e = 0);
- void 0 === h && (h = 0);
- a = b.alCoerceNumber(this.context, a);
- c = b.alCoerceNumber(this.context, c);
- d = b.alCoerceNumber(this.context, d);
- e = b.alCoerceNumber(this.context, e);
- h = b.alCoerceNumber(this.context, h);
- var g = n(this);
- g.createBox(a, c, d, e, h);
- t(g, this);
- };
- c.prototype.createGradientBox = function(a, c, d, e, h) {
- void 0 === d && (d = 0);
- void 0 === e && (e = 0);
- void 0 === h && (h = 0);
- a = b.alCoerceNumber(this.context, a);
- c = b.alCoerceNumber(this.context, c);
- d = b.alCoerceNumber(this.context, d);
- e = b.alCoerceNumber(this.context, e);
- h = b.alCoerceNumber(this.context, h);
- var g = n(this);
- g.createGradientBox(a, c, d, e, h);
- t(g, this);
- };
- c.prototype.deltaTransformPoint = function(a) {
- a = e.toAS3Point(a);
- var b = n(this);
- return e.AVM1Point.fromAS3Point(this.context, b.deltaTransformPoint(a));
- };
- c.prototype.identity = function() {
- this.alPut("a", 1);
- this.alPut("b", 0);
- this.alPut("c", 0);
- this.alPut("d", 1);
- this.alPut("tx", 0);
- this.alPut("ty", 0);
- };
- c.prototype.invert = function() {
- var a = n(this);
- a.invert();
- t(a, this);
- };
- c.prototype.rotate = function(a) {
- a = b.alCoerceNumber(this.context, a);
- var c = n(this);
- c.rotate(a);
- t(c, this);
- };
- c.prototype.scale = function(a, c) {
- a = b.alCoerceNumber(this.context, a);
- c = b.alCoerceNumber(this.context, c);
- var d = n(this);
- d.scale(a, c);
- t(d, this);
- };
- c.prototype._toString = function() {
- return n(this).toString();
- };
- c.prototype.transformPoint = function(a) {
- a = e.toAS3Point(a);
- var b = n(this);
- return e.AVM1Point.fromAS3Point(this.context, b.transformPoint(a));
- };
- c.prototype.translate = function(a, c) {
- a = b.alCoerceNumber(this.context, a);
- c = b.alCoerceNumber(this.context, c);
- var d = n(this);
- d.translate(a, c);
- t(d, this);
- };
- return c;
- }(b.AVM1Object);
- e.AVM1MatrixPrototype = d;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- function n(a) {
- var c = a.context, d, e;
- a instanceof b.AVM1Object && (d = b.alCoerceNumber(c, a.alGet("x")), e = b.alCoerceNumber(c, a.alGet("y")));
- return new c.sec.flash.geom.Point(d, e);
- }
- function t(a, b) {
- b.alPut("x", a.x);
- b.alPut("y", a.y);
- }
- e.toAS3Point = n;
- e.copyAS3PointTo = t;
- var m = function(a) {
- function b(c, d, e) {
- a.call(this, c);
- this.alPrototype = c.globals.Point.alGetPrototypeProperty();
- this.alPut("x", d);
- this.alPut("y", e);
- }
- __extends(b, a);
- b.fromAS3Point = function(a, d) {
- return new b(a, d.x, d.y);
- };
- return b;
- }(b.AVM1Object);
- e.AVM1Point = m;
- var l = function(a) {
- function c(c) {
- a.call(this, c);
- b.alDefineObjectProperties(this, {prototype:{value:new d(c, this)}, distance:{value:this.distance, writable:!0}, interpolate:{value:this.interpolate, writable:!0}, polar:{value:this.polar, writable:!0}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- return a && 0 < a.length ? new m(this.context, a[0], a[1]) : new m(this.context, 0, 0);
- };
- c.prototype.distance = function(a, b) {
- return this.context.sec.flash.geom.Point.axClass.distance(n(a), n(b));
- };
- c.prototype.interpolate = function(a, c, d) {
- d = b.alToNumber(this.context, d);
- a = this.context.sec.flash.geom.Point.axClass.interpolate(n(a), n(c), d);
- return m.fromAS3Point(this.context, a);
- };
- c.prototype.polar = function(a, c) {
- a = b.alToNumber(this.context, a);
- c = b.alToNumber(this.context, c);
- return m.fromAS3Point(this.context, this.context.sec.flash.geom.Point.axClass.polar(a, c));
- };
- return c;
- }(b.AVM1Function);
- e.AVM1PointFunction = l;
- var d = function(a) {
- function c(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d, writable:!0}, length:{get:this.getLength}, add:{value:this.add, writable:!0}, clone:{value:this.clone, writable:!0}, equals:{value:this.equals, writable:!0}, normalize:{value:this.normalize, writable:!0}, offset:{value:this.offset, writable:!0}, subtract:{value:this.subtract, writable:!0}, toString:{value:this._toString, writable:!0}});
- }
- __extends(c, a);
- c.prototype.getLength = function() {
- return n(this).length;
- };
- c.prototype.add = function(a) {
- return m.fromAS3Point(this.context, n(this).add(n(a)));
- };
- c.prototype.clone = function() {
- var a = new m(this.context);
- this instanceof b.AVM1Object && (a.alPut("x", this.alGet("x")), a.alPut("y", this.alGet("y")));
- return a;
- };
- c.prototype.equals = function(a) {
- return n(this).equals(n(a));
- };
- c.prototype.normalize = function(a) {
- a = b.alToNumber(this.context, a);
- var c = n(this);
- c.normalize(a);
- t(c, this);
- };
- c.prototype.offset = function(a, c) {
- a = b.alToNumber(this.context, a);
- c = b.alToNumber(this.context, c);
- var d = n(this);
- d.offset(a, c);
- t(d, this);
- };
- c.prototype.subtract = function(a) {
- return m.fromAS3Point(this.context, n(this).subtract(n(a)));
- };
- c.prototype._toString = function() {
- return "(x=" + this.alGet("x") + ", y=" + this.alGet("y") + ")";
- };
- return c;
- }(b.AVM1Object);
- e.AVM1PointPrototype = d;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- function n(a) {
- var c = a.context, d, e, h, l;
- a instanceof b.AVM1Object && (d = b.alCoerceNumber(c, a.alGet("x")), e = b.alCoerceNumber(c, a.alGet("y")), h = b.alCoerceNumber(c, a.alGet("width")), l = b.alCoerceNumber(c, a.alGet("height")));
- return new c.sec.flash.geom.Rectangle(d, e, h, l);
- }
- function t(a, b) {
- b.alPut("x", a.x);
- b.alPut("y", a.y);
- b.alPut("width", a.width);
- b.alPut("height", a.height);
- }
- e.toAS3Rectangle = n;
- e.copyAS3RectangleTo = t;
- var m = function(a) {
- function b(c, d, e, h, l) {
- a.call(this, c);
- this.alPrototype = c.globals.Rectangle.alGetPrototypeProperty();
- this.alPut("x", d);
- this.alPut("y", e);
- this.alPut("width", h);
- this.alPut("height", l);
- }
- __extends(b, a);
- b.fromAS3Rectangle = function(a, d) {
- return new b(a, d.x, d.y, d.width, d.height);
- };
- return b;
- }(b.AVM1Object);
- e.AVM1Rectangle = m;
- var l = function(a) {
- function c(c) {
- a.call(this, c);
- b.alDefineObjectProperties(this, {prototype:{value:new d(c, this)}});
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- return a && 0 < a.length ? new m(this.context, a[0], a[1], a[2], a[3]) : new m(this.context, 0, 0, 0, 0);
- };
- return c;
- }(b.AVM1Function);
- e.AVM1RectangleFunction = l;
- var d = function(a) {
- function c(c, d) {
- a.call(this, c);
- this.alPrototype = c.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:d, writable:!0}, bottom:{get:this.getBottom, set:this.setBottom}, bottomRight:{get:this.getBottomRight, set:this.setBottomRight}, left:{get:this.getLeft, set:this.setLeft}, right:{get:this.getRight, set:this.setRight}, size:{get:this.getSize, set:this.setSize}, top:{get:this.getTop, set:this.setTop}, topLeft:{get:this.getTopLeft, set:this.setTopLeft}, clone:{value:this.clone, writable:!0}, contains:{value:this.contains, writable:!0},
- containsPoint:{value:this.containsPoint, writable:!0}, containsRectangle:{value:this.containsRectangle, writable:!0}, equals:{value:this.equals, writable:!0}, inflate:{value:this.inflate, writable:!0}, inflatePoint:{value:this.inflatePoint, writable:!0}, intersection:{value:this.intersection, writable:!0}, intersects:{value:this.intersects, writable:!0}, isEmpty:{value:this.isEmpty, writable:!0}, offset:{value:this.offset, writable:!0}, offsetPoint:{value:this.offsetPoint, writable:!0},
- setEmpty:{value:this.setEmpty, writable:!0}, toString:{value:this._toString, writable:!0}, union:{value:this.union, writable:!0}});
- }
- __extends(c, a);
- c.prototype.getBottom = function() {
- return b.alToNumber(this.context, this.alGet("y")) + b.alToNumber(this.context, this.alGet("height"));
- };
- c.prototype.setBottom = function(a) {
- this.alPut("height", b.alToNumber(this.context, a) - b.alToNumber(this.context, this.alGet("y")));
- };
- c.prototype.getBottomRight = function() {
- return new e.AVM1Point(this.context, c.prototype.getRight.call(this), c.prototype.getBottom.call(this));
- };
- c.prototype.setBottomRight = function(a) {
- c.prototype.setRight.call(this, a.alGet("x"));
- c.prototype.setBottom.call(this, a.alGet("y"));
- };
- c.prototype.getLeft = function() {
- return b.alToNumber(this.context, this.alGet("x"));
- };
- c.prototype.setLeft = function(a) {
- this.alPut("x", b.alToNumber(this.context, a));
- };
- c.prototype.getSize = function() {
- return new e.AVM1Point(this.context, this.alGet("width"), this.alGet("height"));
- };
- c.prototype.setSize = function(a) {
- this.alPut("width", a.alGet("x"));
- this.alPut("height", a.alGet("y"));
- };
- c.prototype.getRight = function() {
- return b.alToNumber(this.context, this.alGet("x")) + b.alToNumber(this.context, this.alGet("width"));
- };
- c.prototype.setRight = function(a) {
- this.alPut("width", b.alToNumber(this.context, a) - b.alToNumber(this.context, this.alGet("x")));
- };
- c.prototype.getTop = function() {
- return b.alToNumber(this.context, this.alGet("y"));
- };
- c.prototype.setTop = function(a) {
- this.alPut("y", b.alToNumber(this.context, a));
- };
- c.prototype.getTopLeft = function() {
- return new e.AVM1Point(this.context, c.prototype.getLeft.call(this), c.prototype.getTop.call(this));
- };
- c.prototype.setTopLeft = function(a) {
- c.prototype.setLeft.call(this, a.alGet("x"));
- c.prototype.setTop.call(this, a.alGet("y"));
- };
- c.prototype.clone = function() {
- var a = new m(this.context);
- this instanceof b.AVM1Object && (a.alPut("x", this.alGet("x")), a.alPut("y", this.alGet("y")), a.alPut("width", this.alGet("width")), a.alPut("height", this.alGet("height")));
- return a;
- };
- c.prototype.contains = function(a, c) {
- a = b.alToNumber(this.context, a);
- c = b.alToNumber(this.context, c);
- return n(this).contains(a, c);
- };
- c.prototype.containsPoint = function(a) {
- var b = n(this);
- a = e.toAS3Point(a);
- return b.containsPoint(a);
- };
- c.prototype.containsRectangle = function(a) {
- var b = n(this);
- a = n(a);
- return b.containsRect(a);
- };
- c.prototype.equals = function(a) {
- var b = n(this);
- a = n(a);
- return b.equals(a);
- };
- c.prototype.inflate = function(a, c) {
- a = b.alToNumber(this.context, a);
- c = b.alToNumber(this.context, c);
- var d = n(this);
- d.inflate(a, c);
- t(d, this);
- };
- c.prototype.inflatePoint = function(a) {
- var b = n(this);
- a = e.toAS3Point(a);
- b.inflatePoint(a);
- t(b, this);
- };
- c.prototype.intersection = function(a) {
- var b = n(this);
- a = n(a);
- return m.fromAS3Rectangle(this.context, b.intersection(a));
- };
- c.prototype.intersects = function(a) {
- var b = n(this);
- a = n(a);
- return b.intersects(a);
- };
- c.prototype.isEmpty = function() {
- return n(this).isEmpty();
- };
- c.prototype.offset = function(a, c) {
- a = b.alToNumber(this.context, a);
- c = b.alToNumber(this.context, c);
- var d = n(this);
- d.offset(a, c);
- t(d, this);
- };
- c.prototype.offsetPoint = function(a) {
- var b = n(this);
- a = e.toAS3Point(a);
- b.offsetPoint(a);
- t(b, this);
- };
- c.prototype.setEmpty = function() {
- this.alPut("x", 0);
- this.alPut("y", 0);
- this.alPut("width", 0);
- this.alPut("height", 0);
- };
- c.prototype._toString = function() {
- return "(x=" + this.alGet("x") + ", y=" + this.alGet("y") + ", w=" + this.alGet("width") + ", h=" + this.alGet("height") + ")";
- };
- c.prototype.union = function(a) {
- var b = n(this);
- a = n(a);
- return m.fromAS3Rectangle(this.context, b.union(a));
- };
- return c;
- }(b.AVM1Object);
- e.AVM1RectanglePrototype = d;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(b) {
- function m() {
- b.apply(this, arguments);
- }
- __extends(m, b);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !0, m, [], ["matrix#", "concatenatedMatrix#", "colorTransform#", "pixelBounds#"], null, m.prototype.avm1Constructor);
- };
- Object.defineProperty(m.prototype, "as3Transform", {get:function() {
- return this._target.as3Object.transform;
- }, enumerable:!0, configurable:!0});
- m.prototype.avm1Constructor = function(b) {
- this._target = e.AVM1Utils.resolveTarget(this.context, b);
- };
- m.prototype.getMatrix = function() {
- return e.AVM1Matrix.fromAS3Matrix(this.context, this._target.as3Object.transform.matrix);
- };
- m.prototype.setMatrix = function(b) {
- this._target.as3Object.transform.matrix = e.toAS3Matrix(b);
- };
- m.prototype.getConcatenatedMatrix = function() {
- return e.AVM1Matrix.fromAS3Matrix(this.context, this._target.as3Object.transform.concatenatedMatrix);
- };
- m.prototype.getColorTransform = function() {
- return e.AVM1ColorTransform.fromAS3ColorTransform(this.context, this._target.as3Object.transform.colorTransform);
- };
- m.prototype.setColorTransform = function(b) {
- this._target.as3Object.transform.colorTransform = e.toAS3ColorTransform(b);
- };
- m.prototype.getPixelBounds = function() {
- return e.AVM1Rectangle.fromAS3Rectangle(this.context, this._target.as3Object.transform.pixelBounds);
- };
- return m;
- }(b.AVM1Object);
- e.AVM1Transform = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, m, [], "align# blockIndent# bold# bullet# color# font# getTextExtent indent# italic# kerning# leading# leftMargin# letterSpacing# rightMargin# size# tabStops# target# underline# url#".split(" "), null, m.prototype.avm1Constructor);
- };
- m.createFromNative = function(b, d) {
- var a = b.globals.TextFormat, c = new m(b);
- c.alPrototype = a.alGetPrototypeProperty();
- c._as3Object = d;
- return c;
- };
- m.prototype.avm1Constructor = function(h, d, a, c, f, k, m, n, q, g, p, v, z) {
- var t = this.context;
- h = e.isNullOrUndefined(h) ? null : b.alToString(t, h);
- d = e.isNullOrUndefined(d) ? null : b.alToNumber(t, d);
- a = e.isNullOrUndefined(a) ? null : b.alToNumber(t, a);
- c = e.isNullOrUndefined(c) ? null : b.alToBoolean(t, c);
- f = e.isNullOrUndefined(f) ? null : b.alToBoolean(t, f);
- k = e.isNullOrUndefined(k) ? null : b.alToBoolean(t, k);
- m = e.isNullOrUndefined(m) ? null : b.alToString(t, m);
- n = e.isNullOrUndefined(n) ? null : b.alToString(t, n);
- q = e.isNullOrUndefined(q) ? null : b.alToString(t, q);
- g = e.isNullOrUndefined(g) ? null : b.alToNumber(t, g);
- p = e.isNullOrUndefined(p) ? null : b.alToNumber(t, p);
- v = e.isNullOrUndefined(v) ? null : b.alToNumber(t, v);
- z = e.isNullOrUndefined(z) ? null : b.alToNumber(t, z);
- this._as3Object = new this.context.sec.flash.text.TextFormat(h, d, a, c, f, k, m, n, q, g, p, v, z);
- };
- m.alInitStatic = function(b) {
- b = new b.sec.flash.text.TextField;
- b.multiline = !0;
- this._measureTextField = b;
- };
- m.prototype.getAlign = function() {
- return this._as3Object.align;
- };
- m.prototype.setAlign = function(e) {
- this._as3Object.align = b.alToString(this.context, e);
- };
- m.prototype.getBlockIndent = function() {
- return this._as3Object.blockIndent;
- };
- m.prototype.setBlockIndent = function(e) {
- this._as3Object.blockIndent = b.alToNumber(this.context, e);
- };
- m.prototype.getBold = function() {
- return this._as3Object.bold;
- };
- m.prototype.setBold = function(e) {
- this._as3Object.bold = b.alToBoolean(this.context, e);
- };
- m.prototype.getBullet = function() {
- return this._as3Object.bullet;
- };
- m.prototype.setBullet = function(e) {
- this._as3Object.bullet = b.alToBoolean(this.context, e);
- };
- m.prototype.getColor = function() {
- return this._as3Object.color;
- };
- m.prototype.setColor = function(e) {
- this._as3Object.color = b.alToNumber(this.context, e);
- };
- m.prototype.getFont = function() {
- return this._as3Object.font;
- };
- m.prototype.setFont = function(e) {
- this._as3Object.font = b.alToString(this.context, e);
- };
- m.prototype.getIndent = function() {
- return this._as3Object.indent;
- };
- m.prototype.setIndent = function(e) {
- this._as3Object.indent = b.alToNumber(this.context, e);
- };
- m.prototype.getItalic = function() {
- return this._as3Object.italic;
- };
- m.prototype.setItalic = function(e) {
- this._as3Object.italic = b.alToBoolean(this.context, e);
- };
- m.prototype.getKerning = function() {
- return this._as3Object.kerning;
- };
- m.prototype.setKerning = function(e) {
- this._as3Object.kerning = b.alToBoolean(this.context, e);
- };
- m.prototype.getLeading = function() {
- return this._as3Object.leading;
- };
- m.prototype.setLeading = function(e) {
- this._as3Object.leading = b.alToNumber(this.context, e);
- };
- m.prototype.getLeftMargin = function() {
- return this._as3Object.leftMargin;
- };
- m.prototype.setLeftMargin = function(e) {
- this._as3Object.leftMargin = b.alToNumber(this.context, e);
- };
- m.prototype.getLetterSpacing = function() {
- return this._as3Object.letterSpacing;
- };
- m.prototype.setLetterSpacing = function(e) {
- this._as3Object.letterSpacing = b.alToNumber(this.context, e);
- };
- m.prototype.getRightMargin = function() {
- return this._as3Object.rightMargin;
- };
- m.prototype.setRightMargin = function(e) {
- this._as3Object.rightMargin = b.alToNumber(this.context, e);
- };
- m.prototype.getSize = function() {
- return this._as3Object.size;
- };
- m.prototype.setSize = function(e) {
- this._as3Object.size = b.alToNumber(this.context, e);
- };
- m.prototype.getTabStops = function() {
- var b = this._as3Object.tabStops;
- return b ? b.value : null;
- };
- m.prototype.setTabStops = function(h) {
- if (h instanceof b.Natives.AVM1ArrayNative || e.isNullOrUndefined(h)) {
- h = h && this.context.sec.createArray(h), this._as3Object.tabStops = h;
- }
- };
- m.prototype.getTarget = function() {
- return this._as3Object.target;
- };
- m.prototype.setTarget = function(e) {
- this._as3Object.target = b.alToString(this.context, e);
- };
- m.prototype.getTextExtent = function(e, d) {
- e = b.alCoerceString(this.context, e);
- d = +d;
- var a = this.context.getStaticState(m)._measureTextField;
- !isNaN(d) && 0 < d ? (a.width = d + 4, a.wordWrap = !0) : a.wordWrap = !1;
- a.defaultTextFormat = this._as3Object;
- a.text = e;
- var c = b.alNewObject(this.context), f = a.textWidth, h = a.textHeight;
- c.alPut("width", f);
- c.alPut("height", h);
- c.alPut("textFieldWidth", f + 4);
- c.alPut("textFieldHeight", h + 4);
- a = a.getLineMetrics(0);
- c.alPut("ascent", a.axGetPublicProperty("ascent"));
- c.alPut("descent", a.axGetPublicProperty("descent"));
- return c;
- };
- m.prototype.getUnderline = function() {
- return this._as3Object.underline;
- };
- m.prototype.setUnderline = function(e) {
- this._as3Object.underline = b.alToBoolean(this.context, e);
- };
- m.prototype.getUrl = function() {
- return this._as3Object.url;
- };
- m.prototype.setUrl = function(e) {
- this._as3Object.url = b.alToString(this.context, e);
- };
- return m;
- }(b.AVM1Object);
- h.AVM1TextFormat = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- h.toAS3BitmapData = function(b) {
- return b instanceof n ? b.as3BitmapData : null;
- };
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, m, ["loadBitmap"], "height# rectangle# transparent# width# applyFilter clone colorTransform compare copyChannel copyPixels dispose draw fillRect floodFill generateFilterRect getColorBoundsRect getPixel getPixel32 hitTest merge noise paletteMap perlinNoise pixelDissolve scroll setPixel setPixel32 threshold".split(" "), null, m.prototype.avm1Constructor);
- };
- Object.defineProperty(m.prototype, "as3BitmapData", {get:function() {
- return this._as3Object;
- }, enumerable:!0, configurable:!0});
- m.prototype.avm1Constructor = function(e, d, a, c) {
- e = b.alToNumber(this.context, e);
- d = b.alToNumber(this.context, d);
- a = 3 > arguments.length ? !0 : b.alToBoolean(this.context, a);
- c = 4 > arguments.length ? 4294967295 : b.alToInt32(this.context, c);
- this._as3Object = new this.context.sec.flash.display.BitmapData(e, d, a, c);
- };
- m.fromAS3BitmapData = function(b, d) {
- var a = new m(b);
- a.alPrototype = b.globals.BitmapData.alGetPrototypeProperty();
- a._as3Object = d;
- return a;
- };
- m.loadBitmap = function(h, d) {
- d = b.alToString(h, d);
- var a = h.getAsset(d), c = a.symbolProps.symbolClass, f = h.sec.flash.display.BitmapData.axClass;
- return a && (f === c || f.dPrototype.isPrototypeOf(c.dPrototype)) ? (a = e.AVMX.AS.constructClassFromSymbol(a.symbolProps, f), c = new m(h), c.alPrototype = h.globals.BitmapData.alGetPrototypeProperty(), c._as3Object = a, c) : null;
- };
- m.prototype.getHeight = function() {
- return this._as3Object.height;
- };
- m.prototype.getRectangle = function() {
- var b = this.as3BitmapData;
- return new h.AVM1Rectangle(this.context, 0, 0, b.width, b.height);
- };
- m.prototype.getTransparent = function() {
- return this._as3Object.transparent;
- };
- m.prototype.getWidth = function() {
- return this._as3Object.width;
- };
- m.prototype.applyFilter = function(b, d, a, c) {
- b = b.as3BitmapData;
- d = h.toAS3Rectangle(d);
- a = h.toAS3Point(a);
- c = h.convertToAS3Filter(this.context, c);
- this.as3BitmapData.applyFilter(b, d, a, c);
- return 0;
- };
- m.prototype.clone = function() {
- var b = new m(this.context);
- b.alPrototype = this.context.globals.BitmapData.alGetPrototypeProperty();
- b._as3Object = this._as3Object.clone();
- return b;
- };
- m.prototype.colorTransform = function(b, d) {
- var a = h.toAS3Rectangle(b), c = h.toAS3ColorTransform(d);
- this._as3Object.colorTransform(a, c);
- };
- m.prototype.compare = function(b) {
- return b instanceof m ? this._as3Object.compare(b._as3Object) : !1;
- };
- m.prototype.copyChannel = function(e, d, a, c, f) {
- e = e.as3BitmapData;
- d = h.toAS3Rectangle(d);
- a = h.toAS3Point(a);
- c = b.alCoerceNumber(this.context, c);
- f = b.alCoerceNumber(this.context, f);
- this.as3BitmapData.copyChannel(e, d, a, c, f);
- };
- m.prototype.copyPixels = function(e, d, a, c, f, k) {
- e = e.as3BitmapData;
- d = h.toAS3Rectangle(d);
- a = h.toAS3Point(a);
- c = c ? c.as3BitmapData : null;
- f = f ? h.toAS3Point(f) : null;
- k = b.alToBoolean(this.context, k);
- this.as3BitmapData.copyPixels(e, d, a, c, f, k);
- };
- m.prototype.dispose = function() {
- this.as3BitmapData.dispose();
- };
- m.prototype.draw = function(e, d, a, c, f, k) {
- e = e._as3Object;
- d = d ? h.toAS3Matrix(d) : null;
- a = a ? h.toAS3ColorTransform(a) : null;
- f = f ? h.toAS3Rectangle(f) : null;
- c = (c = "number" === typeof c ? h.BlendModesMap[c] : b.alCoerceString(this.context, c)) || null;
- k = b.alToBoolean(this.context, k);
- this.as3BitmapData.draw(e, d, a, c, f, k);
- };
- m.prototype.fillRect = function(e, d) {
- var a = h.toAS3Rectangle(e);
- d = b.alToInt32(this.context, d);
- this.as3BitmapData.fillRect(a, d);
- };
- m.prototype.floodFill = function(e, d, a) {
- e = b.alCoerceNumber(this.context, e);
- d = b.alCoerceNumber(this.context, d);
- a = b.alToInt32(this.context, a);
- this._as3Object.floodFill(e, d, a);
- };
- m.prototype.generateFilterRect = function(b, d) {
- e.Debug.notImplemented("AVM1BitmapData.generateFilterRect");
- };
- m.prototype.getColorBoundsRect = function(e, d, a) {
- e = b.alToInt32(this.context, e);
- d = b.alToInt32(this.context, d);
- a = b.alToBoolean(this.context, a);
- e = this._as3Object.getColorBoundsRect(e, d, a);
- return new h.AVM1Rectangle(this.context, e.x, e.y, e.width, e.height);
- };
- m.prototype.getPixel = function(b, d) {
- return this._as3Object.getPixel(b, d);
- };
- m.prototype.getPixel32 = function(b, d) {
- return this._as3Object.getPixel32(b, d);
- };
- m.prototype.hitTest = function(l, d, a, c, f) {
- e.Debug.somewhatImplemented("AVM1BitmapData.hitTest");
- var k = h.toAS3Point(l);
- d = b.alToInt32(this.context, d);
- var m = a._as3Object;
- if (4 > arguments.length) {
- return this._as3Object.hitTest(k, d, m);
- }
- var n = null != c ? h.toAS3Point(c) : null;
- if (4 > arguments.length) {
- return this._as3Object.hitTest(k, d, m, n);
- }
- f = b.alToInt32(this.context, f);
- return this._as3Object.hitTest(k, d, m, n, f);
- };
- m.prototype.merge = function(e, d, a, c, f, k, m) {
- e = e.as3BitmapData;
- d = h.toAS3Rectangle(d);
- a = h.toAS3Point(a);
- c = b.alToInt32(this.context, c);
- f = b.alToInt32(this.context, f);
- k = b.alToInt32(this.context, k);
- m = b.alToInt32(this.context, m);
- this.as3BitmapData.merge(e, d, a, c, f, k, m);
- };
- m.prototype.noise = function(e, d, a, c, f) {
- e = b.alToInt32(this.context, e);
- d = 2 > arguments.length ? 0 : b.alToInt32(this.context, d);
- a = 3 > arguments.length ? 255 : b.alToInt32(this.context, a);
- c = 4 > arguments.length ? 7 : b.alToInt32(this.context, c);
- f = 5 > arguments.length ? !1 : b.alToBoolean(this.context, f);
- this._as3Object.noise(e, d, a, c, f);
- };
- m.prototype.paletteMap = function(b, d, a, c, f, h, m) {
- e.Debug.notImplemented("AVM1BitmapData.paletteMap");
- };
- m.prototype.perlinNoise = function(h, d, a, c, f, k, m, n, q) {
- h = b.alCoerceNumber(this.context, h);
- d = b.alCoerceNumber(this.context, d);
- a = b.alCoerceNumber(this.context, a);
- c = b.alCoerceNumber(this.context, c);
- f = b.alToBoolean(this.context, f);
- k = b.alToBoolean(this.context, k);
- m = void 0 === m ? 7 : b.alCoerceNumber(this.context, m);
- n = b.alToBoolean(this.context, n);
- if (!e.isNullOrUndefined(q)) {
- for (var g = 0, p = q.alGet("length");g < p;g++) {
- null.push(b.alCoerceNumber(this.context, q.alGet(g)));
- }
- }
- this.perlinNoise(h, d, a, c, f, k, m, n, null);
- };
- m.prototype.pixelDissolve = function(e, d, a, c, f, k) {
- var m = e.as3BitmapData, n = h.toAS3Rectangle(d), q = h.toAS3Point(a);
- c = 4 > arguments.length ? 0 : b.alToInt32(this.context, c);
- f = 5 > arguments.length ? n.width * n.height / 30 : b.alToInt32(this.context, f);
- k = 6 > arguments.length ? 0 : b.alToInt32(this.context, k);
- return this.as3BitmapData.pixelDissolve(m, n, q, c, f, k);
- };
- m.prototype.scroll = function(e, d) {
- e = b.alCoerceNumber(this.context, e);
- d = b.alCoerceNumber(this.context, d);
- this._as3Object.scroll(e, d);
- };
- m.prototype.setPixel = function(e, d, a) {
- e = b.alCoerceNumber(this.context, e);
- d = b.alCoerceNumber(this.context, d);
- a = b.alToInt32(this.context, a);
- this._as3Object.setPixel(e, d, a);
- };
- m.prototype.setPixel32 = function(e, d, a) {
- e = b.alCoerceNumber(this.context, e);
- d = b.alCoerceNumber(this.context, d);
- a = b.alToInt32(this.context, a);
- this._as3Object.setPixel32(e, d, a);
- };
- m.prototype.threshold = function(e, d, a, c, f, k, m, n) {
- var q = e.as3BitmapData, g = h.toAS3Rectangle(d), p = h.toAS3Point(a);
- c = b.alCoerceString(this.context, c);
- f = b.alToInt32(this.context, f);
- k = 6 > arguments.length ? 0 : b.alToInt32(this.context, k);
- m = 7 > arguments.length ? 4294967295 : b.alToInt32(this.context, m);
- n = 8 > arguments.length ? !1 : b.alToBoolean(this.context, n);
- return this._as3Object.threshold(q, g, p, c, f, k, m, n);
- };
- return m;
- }(b.AVM1Object);
- h.AVM1BitmapData = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = function(n) {
- function m() {
- n.apply(this, arguments);
- }
- __extends(m, n);
- m.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !0, m, ["available#", "addCallback", "call"], []);
- };
- m.getAvailable = function(b) {
- return b.sec.flash.external.ExternalInterface.axClass.available;
- };
- m.addCallback = function(e, d, a, c) {
- d = b.alCoerceString(e, d);
- if (!b.alIsFunction(c)) {
- return !1;
- }
- try {
- return e.sec.flash.external.ExternalInterface.axClass.addCallback(d, function() {
- var b = Array.prototype.slice.call(arguments, 0);
- return e.executeFunction(c, a, b);
- }), !0;
- } catch (f) {
- }
- return !1;
- };
- m.call = function(e, d) {
- for (var a = [], c = 2;c < arguments.length;c++) {
- a[c - 2] = arguments[c];
- }
- for (var c = [b.alCoerceString(e, d)], f = 0;f < a.length;f++) {
- c.push(a[f]);
- }
- return e.sec.flash.external.ExternalInterface.axClass.call.apply(e.sec.flash.external.ExternalInterface.axClass, c);
- };
- return m;
- }(b.AVM1Object);
- e.AVM1ExternalInterface = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = function(b) {
- function m() {
- b.apply(this, arguments);
- }
- __extends(m, b);
- m.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, m, [], "attachSound duration# getBytesLoaded getBytesTotal getPan setPan getTransform setTransform getVolume setVolume start stop".split(" "), null, m.prototype.avm1Constructor);
- };
- m.prototype.avm1Constructor = function(b) {
- this._target = h.AVM1Utils.resolveTarget(this.context, b);
- this._linkageID = this._channel = this._sound = null;
- };
- m.prototype.attachSound = function(b) {
- var d = this.context.getAsset(b);
- d && (d = Object.create(d.symbolProps), d = e.AVMX.AS.constructClassFromSymbol(d, this.context.sec.flash.media.Sound.axClass), this._linkageID = b, this._sound = d);
- };
- m.prototype.loadSound = function(b, d) {
- };
- m.prototype.getBytesLoaded = function() {
- return 0;
- };
- m.prototype.getBytesTotal = function() {
- return 0;
- };
- m.prototype.getDuration = function() {
- return 0;
- };
- m.prototype.getPan = function() {
- var b = this._channel && this._channel.soundTransform;
- return b ? 100 * b.axGetPublicProperty("pan") : 0;
- };
- m.prototype.setPan = function(b) {
- var d = this._channel && this._channel.soundTransform;
- d && (d.axSetPublicProperty("pan", b / 100), this._channel.soundTransform = d);
- };
- m.prototype.getTransform = function() {
- return null;
- };
- m.prototype.setTransform = function(b) {
- };
- m.prototype.getVolume = function() {
- var b = this._channel && this._channel.soundTransform;
- return b ? 100 * b.axGetPublicProperty("volume") : 0;
- };
- m.prototype.setVolume = function(b) {
- var d = this._channel && this._channel.soundTransform;
- d && (d.axSetPublicProperty("volume", b / 100), this._channel.soundTransform = d);
- };
- m.prototype.start = function(b, d) {
- this._sound && (b = isNaN(b) || 0 > b ? 0 : +b, d = isNaN(d) || 1 > d ? 1 : Math.floor(d), this._stopSoundChannel(), this._channel = this._sound.play(b, d - 1));
- };
- m.prototype._stopSoundChannel = function() {
- this._channel && (this._channel.stop(), this._channel = null);
- };
- m.prototype.stop = function(b) {
- b && b !== this._linkageID || this._stopSoundChannel();
- };
- return m;
- }(b.AVM1Object);
- h.AVM1Sound = n;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- var n = "avHardwareDisable hasAccessibility hasAudio hasAudioEncoder hasEmbeddedVideo hasIME hasMP3 hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo hasVideoEncoder isDebugger language localFileReadDisable manufacturer os pixelAspectRatio playerType screenColor screenDPI screenResolutionX screenResolutionY serverString version".split(" "), t = function(b) {
- function a(a) {
- var e = this;
- b.call(this, a);
- this.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- var h = a.sec.flash.system.Capabilities.axClass;
- n.forEach(function(a) {
- e.alSetOwnProperty(a, {flags:131, get:{alCall:function() {
- return h.axGetPublicProperty(a);
- }}});
- }, this);
- }
- __extends(a, b);
- return a;
- }(b.AVM1Object), m = function(d) {
- function a(a) {
- d.call(this, a);
- this.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {sandboxType:{get:this.getSandboxType}, allowDomain:{value:this.allowDomain}, allowInsecureDomain:{value:this.allowInsecureDomain}, loadPolicyFile:{value:this.loadPolicyFile}});
- }
- __extends(a, d);
- a.prototype.getSandboxType = function() {
- return this.context.sec.flash.system.Security.axClass.sandboxType;
- };
- a.prototype.allowDomain = function(a) {
- a = b.alCoerceString(this.context, a);
- this.context.sec.flash.system.Security.axClass.allowDomain(a);
- };
- a.prototype.allowInsecureDomain = function(a) {
- a = b.alCoerceString(this.context, a);
- this.context.sec.flash.system.Security.axClass.allowInsecureDomain(a);
- };
- a.prototype.loadPolicyFile = function(a) {
- a = b.alCoerceString(this.context, a);
- this.context.sec.flash.system.Security.axClass.loadPolicyFile(a);
- };
- return a;
- }(b.AVM1Object), l = function(b) {
- function a() {
- b.apply(this, arguments);
- }
- __extends(a, b);
- a.alInitStatic = function(a) {
- this._capabilities = new t(a);
- this._security = new m(a);
- };
- a.createAVM1Class = function(b) {
- return e.wrapAVM1NativeClass(b, !1, a, ["capabilities#", "security#"], []);
- };
- a.getCapabilities = function(b) {
- return b.getStaticState(a)._capabilities;
- };
- a.getSecurity = function(b) {
- return b.getStaticState(a)._security;
- };
- return a;
- }(b.AVM1Object);
- e.AVM1System = l;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = function(b) {
- function d(a, c) {
- b.call(this, a);
- this.alPrototype = a.globals.SharedObject.alGetPrototypeProperty();
- this._as3SharedObject = c;
- }
- __extends(d, b);
- return d;
- }(b.AVM1Object);
- h.AVM1SharedObject = n;
- var t = function(e) {
- function d(a) {
- e.call(this, a);
- b.alDefineObjectProperties(this, {prototype:{value:new m(a, this)}, getLocal:{value:this.getLocal, writable:!0}});
- }
- __extends(d, e);
- d.prototype.getLocal = function(a, c, d) {
- a = b.alCoerceString(this.context, a);
- c = b.alCoerceString(this.context, c);
- d = b.alToBoolean(this.context, d);
- a = this.context.sec.flash.net.SharedObject.axClass.getLocal(a, c, d);
- return new n(this.context, a);
- };
- return d;
- }(b.AVM1Function);
- h.AVM1SharedObjectFunction = t;
- var m = function(h) {
- function d(a, c) {
- h.call(this, a);
- this.alPrototype = a.builtins.Object.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:c, writable:!0}, rgb:{get:this.getData, set:this.setData}, clear:{value:this.clear, writable:!0}, flush:{value:this.flush, writable:!0}});
- }
- __extends(d, h);
- d.prototype.getData = function() {
- e.Debug.somewhatImplemented("AVM1SharedObject.getData");
- return this.__data || (this.__data = b.alNewObject(this.context));
- };
- d.prototype.setData = function(a) {
- e.Debug.somewhatImplemented("AVM1SharedObject.setData");
- this.__data = a;
- };
- d.prototype.clear = function() {
- this._as3SharedObject.clear();
- };
- d.prototype.flush = function(a) {
- a = b.alCoerceNumber(this.context, a);
- this._as3SharedObject.flush(b.alCoerceNumber(this.context, a));
- e.Debug.somewhatImplemented("AVM1SharedObject.flush");
- return !1;
- };
- d.prototype.getSize = function() {
- e.Debug.somewhatImplemented("AVM1SharedObject.getSize");
- return this.__data ? 10 : 0;
- };
- d.prototype.setFps = function(a) {
- a = b.alCoerceNumber(this.context, a) || 0;
- this._as3SharedObject.fps = a;
- return this._as3SharedObject.fps === a;
- };
- return d;
- }(b.AVM1Object);
- h.AVM1SharedObjectPrototype = m;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.AVMX.AS.flash, t = function(b) {
- function e() {
- b.apply(this, arguments);
- }
- __extends(e, b);
- e.createAVM1Class = function(b) {
- return h.wrapAVM1NativeClass(b, !0, e, [], ["loadClip", "unloadClip", "getProgress"], null, e.prototype.avm1Constructor);
- };
- e.prototype.avm1Constructor = function() {
- this._loader = new this.context.sec.flash.display.Loader;
- h.AVM1Broadcaster.initialize(this.context, this);
- };
- e.prototype.loadClip = function(b, a) {
- this._target = h.AVM1Utils.resolveLevelOrTarget(this.context, a);
- if (!this._target) {
- return !1;
- }
- this._target.as3Object.addChild(this._loader);
- this._loader.contentLoaderInfo.addEventListener(n.events.Event.OPEN, this.openHandler.bind(this));
- this._loader.contentLoaderInfo.addEventListener(n.events.ProgressEvent.PROGRESS, this.progressHandler.bind(this));
- this._loader.contentLoaderInfo.addEventListener(n.events.IOErrorEvent.IO_ERROR, this.ioErrorHandler.bind(this));
- this._loader.contentLoaderInfo.addEventListener(n.events.Event.COMPLETE, this.completeHandler.bind(this));
- this._loader.contentLoaderInfo.addEventListener(n.events.Event.INIT, this.initHandler.bind(this));
- this._loader.load(new this.context.sec.flash.net.URLRequest(b));
- return !0;
- };
- e.prototype.unloadClip = function(b) {
- b = h.AVM1Utils.resolveLevelOrTarget(this.context, b);
- if (!b) {
- return !1;
- }
- b.as3Object.removeChild(this._loader);
- return !0;
- };
- e.prototype.getProgress = function(b) {
- return this._loader.contentLoaderInfo.bytesLoaded;
- };
- e.prototype._broadcastMessage = function(b, a) {
- void 0 === a && (a = null);
- h.avm1BroadcastEvent(this._target.context, this, b, a);
- };
- e.prototype.openHandler = function(b) {
- this._broadcastMessage("onLoadStart", [this._target]);
- };
- e.prototype.progressHandler = function(b) {
- this._broadcastMessage("onLoadProgress", [this._target, b.bytesLoaded, b.bytesTotal]);
- };
- e.prototype.ioErrorHandler = function(b) {
- this._broadcastMessage("onLoadError", [this._target, b.errorID, 501]);
- };
- e.prototype.completeHandler = function(b) {
- this._broadcastMessage("onLoadComplete", [this._target]);
- };
- e.prototype.initHandler = function(b) {
- var a = function() {
- this._target.as3Object.removeEventListener(n.events.Event.EXIT_FRAME, a);
- this._broadcastMessage("onLoadInit", [this._target]);
- }.bind(this);
- this._target.as3Object.addEventListener(n.events.Event.EXIT_FRAME, a);
- };
- return e;
- }(b.AVM1Object);
- h.AVM1MovieClipLoader = t;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(e) {
- function n(c, e, h, l, n) {
- function g() {
- return c.sec.flash.filters[l].axClass;
- }
- h = h.alGetPrototypeProperty();
- var p = Object.create(a.prototype);
- b.AVM1Object.call(p, c);
- p.alPrototype = h;
- h = Object.create(d.prototype);
- b.AVM1Function.call(h, c);
- h.alSetOwnPrototypeProperty(p);
- h.alConstruct = function(a) {
- var d = new b.AVM1Object(c);
- d.alPrototype = p;
- if (a) {
- for (var e = 0;e < a.length;e++) {
- d.alPut(n[e << 1], a[e]);
- }
- }
- return d;
- };
- b.alDefineObjectProperties(p, {constructor:{value:h, writable:!0}, clone:{value:function() {
- var a = new b.AVM1Object(c);
- a.alPrototype = p;
- for (var d = 0;d < n.length;d += 2) {
- a.alPut(n[d], this.alGet(n[d]));
- }
- return a;
- }, writable:!0}});
- p.asFilterConverter = {toAS3Filter:function(a) {
- for (var b = g().axConstruct([]), d = 0;d < n.length;d += 2) {
- var e = a.alGet(n[d]);
- void 0 !== e && b.axSetPublicProperty(n[d], t(c, e, n[d + 1]));
- }
- return b;
- }, fromAS3Filter:function(a) {
- var d = new b.AVM1Object(c);
- d.alPrototype = p;
- for (var e = 0;e < n.length;e += 2) {
- d.alPut(n[e], m(c, a.axGetPublicProperty(n[e]), n[e + 1]));
- }
- return d;
- }, getAS3Class:g};
- e.alPut(l, h);
- }
- function t(a, c, d) {
- switch(d) {
- case "String":
- return b.alToString(a, c);
- case "Boolean":
- return b.alToBoolean(a, c);
- case "Number":
- return b.alToNumber(a, c);
- case "Numbers":
- d = [];
- if (c) {
- for (var l = 0, m = c.alGet("length");l < m;l++) {
- d[l] = b.alToNumber(a, c.alGet(l));
- }
- }
- return a.sec.createArray(d);
- case "BitmapData":
- return e.toAS3BitmapData(c);
- case "Point":
- return e.toAS3Point(c);
- }
- }
- function m(a, c, d) {
- switch(d) {
- case "String":
- ;
- case "Boolean":
- ;
- case "Number":
- return c;
- case "Numbers":
- d = [];
- if (c) {
- for (var l = 0, m = c.value.length;l < m;l++) {
- d[l] = +c.value[l];
- }
- }
- return new b.Natives.AVM1ArrayNative(a, d);
- case "BitmapData":
- return e.AVM1BitmapData.fromAS3BitmapData(a, c);
- case "Point":
- return e.AVM1Point.fromAS3Point(a, c);
- }
- }
- function l(a, b) {
- for (var c = b.alPrototype;c && !c.asFilterConverter;) {
- c = c.alPrototype;
- }
- if (c) {
- return c.asFilterConverter.toAS3Filter(b);
- }
- }
- var d = function(c) {
- function d(b) {
- c.call(this, b);
- this.alSetOwnPrototypeProperty(new a(b, this));
- }
- __extends(d, c);
- d.prototype.alConstruct = function(a) {
- a = new b.AVM1Object(this.context);
- a.alPrototype = this.alGetPrototypeProperty();
- return a;
- };
- return d;
- }(b.AVM1Function), a = function(a) {
- function c(d, e) {
- a.call(this, d);
- b.alDefineObjectProperties(this, {constructor:{value:e, writable:!0}, clone:{value:this.clone, writable:!0}});
- }
- __extends(c, a);
- c.prototype.clone = function() {
- var a = new b.AVM1Object(this.context);
- a.alPrototype = this.alGetPrototypeProperty();
- return a;
- };
- return c;
- }(b.AVM1Object);
- e.createFiltersClasses = function(a) {
- var c = b.alNewObject(a), e = new d(a);
- c.alPut("BitmapFilter", e);
- n(a, c, e, "BevelFilter", "distance Number angle Number highlightColor Number highlightAlpha Number shadowColor Number shadowAlpha Number blurX Number blurY Number strength Number quality Number type String knockout Boolean".split(" "));
- n(a, c, e, "BlurFilter", "blurX Number blurY Number quality Number".split(" "));
- n(a, c, e, "ColorMatrixFilter", ["matrix", "Numbers"]);
- n(a, c, e, "ConvolutionFilter", "matrixX Number matrixY Number matrix Numbers divisor Number bias Number preserveAlpha Boolean clamp Boolean color Number alpha Number".split(" "));
- n(a, c, e, "DisplacementMapFilter", "mapBitmap BitmapData mapPoint Point componentX Number componentY Number scaleX Number scaleY Number mode String color Number alpha Number".split(" "));
- n(a, c, e, "DropShadowFilter", "distance Number angle Number color Number alpha Number blurX Number blurY Number strength Number quality Number inner Boolean knockout Boolean hideObject Boolean".split(" "));
- n(a, c, e, "GlowFilter", "color Number alpha Number blurX Number blurY Number strength Number quality Number inner Boolean knockout Boolean".split(" "));
- n(a, c, e, "GradientBevelFilter", "distance Number angle Number colors Numbers alphas Numbers ratios Numbers blurX Number blurY Number strength Number quality Number type String knockout Boolean".split(" "));
- n(a, c, e, "GradientGlowFilter", "distance Number angle Number colors Numbers alphas Numbers ratios Numbers blurX Number blurY Number strength Number quality Number type String knockout Boolean".split(" "));
- return c;
- };
- var c = "BevelFilter BlurFilter ColorMatrixFilter ConvolutionFilter DisplacementMapFilter DropShadowFilter GlowFilter GradientBevelFilter GradientGlowFilter".split(" ");
- e.convertToAS3Filter = l;
- e.convertToAS3Filters = function(a, b) {
- var c = [];
- if (b) {
- for (var d = 0, e = b.alGet("length");d < e;d++) {
- var g = l(a, b.alGet(d));
- g && c.push(g);
- }
- }
- return a.sec.createArray(c);
- };
- e.convertFromAS3Filters = function(a, d) {
- var e = [];
- if (d) {
- for (var h = a.globals.filters, l = 0, g = d.axGetPublicProperty("length");l < g;l++) {
- var p = d.axGetPublicProperty(l);
- c.forEach(function(a) {
- a = h.alGet(a).alGetPrototypeProperty();
- a.asFilterConverter && a.asFilterConverter.getAS3Class().axIsType(p) && e.push(a.asFilterConverter.fromAS3Filter(p));
- });
- }
- }
- return new b.Natives.AVM1ArrayNative(a, e);
- };
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(b, a, c, e, k, l) {
- a = new b.sec.flash.net.URLRequest(a);
- c && (a.method = c);
- e && (a.contentType = e);
- k && (a.data = k);
- var m = new b.sec.flash.net.URLLoader(a);
- m.dataFormat = "text";
- var n = b.sec.boxFunction(function(a) {
- m.removeEventListener(t.events.Event.COMPLETE, n);
- h.avm1BroadcastEvent(b, l, "onData", [m.data]);
- });
- m.addEventListener(t.events.Event.COMPLETE, n);
- l._as3Loader = m;
- }
- var t = e.AVMX.AS.flash;
- h.loadAVM1DataObject = n;
- var m = function(d) {
- function a(a) {
- d.call(this, a);
- this.alSetOwnPrototypeProperty(new l(a, this));
- }
- __extends(a, d);
- a.prototype.alConstruct = function(a) {
- a = new b.AVM1Object(this.context);
- a.alPrototype = this.alGetPrototypeProperty();
- a.isAVM1DataObject = !0;
- return a;
- };
- a.prototype.alCall = function(a, b) {
- return this.alConstruct(b);
- };
- return a;
- }(b.AVM1Function);
- h.AVM1LoadVarsFunction = m;
- var l = function(d) {
- function a(a, e) {
- d.call(this, a);
- b.alDefineObjectProperties(this, {constructor:{value:e, writable:!0}, toString:{value:this._toString}, load:{value:this.load}, onData:{value:this.defaultOnData}, decode:{value:this.decode}, send:{value:this.load}, sendAndload:{value:this.load}});
- }
- __extends(a, d);
- a.prototype.getBytesLoaded = function() {
- return this._as3Loader ? this._as3Loader.bytesLoaded : void 0;
- };
- a.prototype.getBytesTotal = function() {
- return this._as3Loader ? this._as3Loader.bytesTotal : void 0;
- };
- a.prototype.load = function(a) {
- a = b.alCoerceString(this.context, a);
- if (!a) {
- return !1;
- }
- n(this.context, a, null, null, null, this);
- return !0;
- };
- a.prototype.defaultOnData = function(b) {
- e.isNullOrUndefined(b) ? h.avm1BroadcastEvent(this.context, this, "onLoad", [!1]) : (a.prototype.decode.call(this, b), this.alPut("loaded", !0), h.avm1BroadcastEvent(this.context, this, "onLoad", [!0]));
- };
- a.prototype.decode = function(a) {
- a = b.alCoerceString(this.context, a);
- var d = new this.context.sec.flash.net.URLVariables;
- d._ignoreDecodingErrors = !0;
- d.decode(a);
- e.AVMX.forEachPublicProperty(d, function(a, b) {
- "string" === typeof b && this.alPut(a, b);
- }, this);
- };
- a.prototype._toString = function() {
- var a = this.context, d = new a.sec.flash.net.URLVariables;
- b.alForEachProperty(this, function(e) {
- this.alHasOwnProperty(e) && d.axSetPublicProperty(e, b.alToString(a, this.alGet(e)));
- }, this);
- return d.axCallPublicProperty("toString", null);
- };
- a.prototype.send = function(a, d, h) {
- b.alCoerceString(this.context, a);
- e.isNullOrUndefined(h) || b.alCoerceString(this.context, h);
- e.Debug.notImplemented("AVM1LoadVarsPrototype.send");
- return !1;
- };
- a.prototype.sendAndLoad = function(a, d, h) {
- a = b.alCoerceString(this.context, a);
- h = e.isNullOrUndefined(h) ? "POST" : b.alCoerceString(this.context, h);
- if (!(a && d instanceof b.AVM1Object && d.isAVM1DataObject)) {
- return !1;
- }
- var l = this.alGet("contentType"), l = e.isNullOrUndefined(l) ? "application/x-www-form-urlencoded" : b.alCoerceString(this.context, l), m = b.alToString(this.context, this);
- n(this.context, a, h, l, m, d);
- return !0;
- };
- return a;
- }(b.AVM1Object);
- h.AVM1LoadVarsPrototype = l;
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a) {
- if (!(a instanceof b.AVM1Object)) {
- return null;
- }
- var c = a.context;
- return b.alInstanceOf(c, a, c.globals.XMLNode) ? a.as3XMLNode : null;
- }
- function t(a, d) {
- if (!e.isNullOrUndefined(d)) {
- var f = d._as2Node;
- f || (f = new b.AVM1Object(a), f.alPrototype = a.globals.XMLNode.alGetPrototypeProperty(), c.prototype.initializeFromAS3Node.call(f, d));
- return f;
- }
- }
- var m = e.AVMX.axCoerceString, l;
- (function(a) {
- a[a.ELEMENT_NODE = 1] = "ELEMENT_NODE";
- a[a.TEXT_NODE = 3] = "TEXT_NODE";
- })(l || (l = {}));
- l = function(a) {
- function d(b) {
- a.call(this, b);
- this.alSetOwnPrototypeProperty(new c(b, this));
- }
- __extends(d, a);
- d.prototype.alConstruct = function(a) {
- if (!a && 2 > a.length) {
- e.Debug.notImplemented("Unsupported amount of parameters for AVM1XMLNode constructor");
- } else {
- var d = b.alCoerceNumber(this.context, a[0]);
- a = b.alCoerceString(this.context, a[1]);
- if (1 !== d && 3 !== d) {
- e.Debug.notImplemented("Unsupported AVM1XMLNode type: " + d);
- } else {
- var f = new b.AVM1Object(this.context);
- f.alPrototype = this.alGetPrototypeProperty();
- c.prototype.initializeNode.call(f, d, a);
- return f;
- }
- }
- };
- d.prototype.alCall = function(a, b) {
- return this.alConstruct(b);
- };
- return d;
- }(b.AVM1Function);
- h.AVM1XMLNodeFunction = l;
- var d = function(a) {
- function c(d, e) {
- a.call(this, d);
- this._as3XMLNode = e;
- this._cachedNodePropertyDescriptor = {flags:70, value:void 0};
- b.alDefineObjectProperties(this, {length:{get:this.getLength}});
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "as3ChildNodes", {get:function() {
- return this._as3XMLNode.axGetPublicProperty("childNodes").value;
- }, enumerable:!0, configurable:!0});
- c.prototype.getLength = function() {
- return this.as3ChildNodes.length;
- };
- c.prototype.alGetOwnProperty = function(c) {
- if (b.alIsIndex(this.context, c)) {
- var d = b.alToInteger(this.context, c);
- if (0 <= d && d < this.as3ChildNodes.length) {
- return this._cachedNodePropertyDescriptor.value = t(this.context, this.as3ChildNodes[d]), this._cachedNodePropertyDescriptor;
- }
- }
- return a.prototype.alGetOwnProperty.call(this, c);
- };
- return c;
- }(b.AVM1Object), a = function(a) {
- function c(b, d) {
- a.call(this, b);
- this.alPrototype = b.builtins.Object.alGetPrototypeProperty();
- this._as3Attributes = d;
- this._cachedNodePropertyDescriptor = {flags:64, value:void 0};
- }
- __extends(c, a);
- c.prototype.alGetOwnProperty = function(a) {
- a = b.alCoerceString(this.context, a);
- if (this._as3Attributes.axHasPublicProperty(a)) {
- return this._cachedNodePropertyDescriptor.value = this._as3Attributes.axGetPublicProperty(a), this._cachedNodePropertyDescriptor;
- }
- };
- c.prototype.alSetOwnProperty = function(a, c) {
- var d = b.alCoerceString(this.context, a);
- if (c.flags & 64) {
- var e = b.alCoerceString(this.context, c.value);
- this._as3Attributes.axSetPublicProperty(d, e);
- }
- };
- c.prototype.alHasOwnProperty = function(a) {
- a = b.alCoerceString(this.context, a);
- return this._as3Attributes.axHasPublicProperty(a);
- };
- c.prototype.alDeleteOwnProperty = function(a) {
- a = b.alCoerceString(this.context, a);
- this._as3Attributes.axDeletePublicProperty(a);
- };
- c.prototype.alGetOwnPropertiesKeys = function() {
- return this._as3Attributes.axGetEnumerableKeys().map(function(a) {
- return m(a);
- });
- };
- return c;
- }(b.AVM1Object), c = function(c) {
- function f(a, d) {
- c.call(this, a);
- b.alDefineObjectProperties(this, {constructor:{value:d, writable:!0}, attributes:{get:this.getAttributes, set:this.setAttributes}, childNodes:{get:this.getChildNodes}, firstChild:{get:this.getFirstChild}, lastChild:{get:this.getLastChild}, localName:{get:this.getLocalName}, namespaceURI:{get:this.getNamespaceURI}, nextSibling:{get:this.getNextSibling}, nodeName:{get:this.getNodeName, set:this.setNodeName}, nodeType:{get:this.getNodeType}, nodeValue:{get:this.getNodeValue, set:this.setNodeValue},
- parentNode:{get:this.getParentNode}, prefix:{get:this.getPrefix}, previousSibling:{get:this.getPreviousSibling}, appendChild:{value:this.appendChild}, cloneNode:{value:this.cloneNode}, getNamespaceForPrefix:{value:this.getNamespaceForPrefix}, getPrefixForNamespace:{value:this.getPrefixForNamespace}, hasChildNodes:{value:this.hasChildNodes}, insertBefore:{value:this.insertBefore}, removeNode:{value:this.removeNode}, toString:{value:this._toString}});
- }
- __extends(f, c);
- f.prototype.initializeNode = function(a, b) {
- this.as3XMLNode = new this.context.sec.flash.xml.XMLNode(a, b);
- this._childNodes = this._attributes = void 0;
- f.addMap(this.as3XMLNode, this);
- };
- f.prototype.initializeFromAS3Node = function(a) {
- this.as3XMLNode = a;
- this._childNodes = this._attributes = void 0;
- f.addMap(this.as3XMLNode, this);
- };
- f.prototype._toString = function() {
- return this.as3XMLNode.axCallPublicProperty("toString", null);
- };
- f.prototype.appendChild = function(a) {
- this.as3XMLNode.axCallPublicProperty("appendChild", [n(a)]);
- };
- f.prototype.getAttributes = function() {
- var b = this.as3XMLNode.axGetPublicProperty("attributes");
- if (!e.isNullOrUndefined(b)) {
- return this._attributes || (this._attributes = new a(this.context, b)), this._attributes;
- }
- };
- f.prototype.setAttributes = function(c) {
- var d = this;
- if (e.isNullOrUndefined(c)) {
- this._attributes = void 0;
- } else {
- if (c instanceof a) {
- this._attributes = c;
- } else {
- var f = this.context, h = f.sec.createObject();
- b.alForEachProperty(c, function(a) {
- var c = b.alCoerceString(f, a);
- a = b.alCoerceString(f, d.alGet(a));
- h.axSetPublicProperty(c, a);
- }, this);
- this._attributes = new a(f, h);
- }
- }
- };
- f.prototype.getChildNodes = function() {
- this._childNodes || (this._childNodes = new d(this.context, this.as3XMLNode));
- return this._childNodes;
- };
- f.prototype.cloneNode = function(a) {
- a = b.alToBoolean(this.context, a);
- a = this.as3XMLNode.axCallPublicProperty("cloneNode", [a]);
- return t(this.context, a);
- };
- f.prototype.getFirstChild = function() {
- return t(this.context, this.as3XMLNode.axGetPublicProperty("firstChild"));
- };
- f.prototype.getNamespaceForPrefix = function(a) {
- return this.as3XMLNode.axCallPublicProperty("getNamespaceForPrefix", [a]);
- };
- f.prototype.getPrefixForNamespace = function(a) {
- return this.as3XMLNode.axCallPublicProperty("getNamespaceForPrefix", [a]);
- };
- f.prototype.hasChildNodes = function() {
- return this.as3XMLNode.axCallPublicProperty("hasChildNodes", null);
- };
- f.prototype.insertBefore = function(a, b) {
- this.as3XMLNode.axCallPublicProperty("insertBefore", [n(a), n(b)]);
- };
- f.prototype.getLastChild = function() {
- return t(this.context, this.as3XMLNode.axGetPublicProperty("lastChild"));
- };
- f.prototype.getLocalName = function() {
- return this.as3XMLNode.axGetPublicProperty("localName");
- };
- f.prototype.getNamespaceURI = function() {
- return this.as3XMLNode.axGetPublicProperty("namespaceURI");
- };
- f.prototype.getNextSibling = function() {
- return t(this.context, this.as3XMLNode.axGetPublicProperty("nextSibling"));
- };
- f.prototype.getNodeName = function() {
- return this.as3XMLNode.axGetPublicProperty("nodeName");
- };
- f.prototype.setNodeName = function(a) {
- a = b.alCoerceString(this.context, a);
- this.as3XMLNode.axSetPublicProperty("nodeName", a);
- };
- f.prototype.getNodeType = function() {
- return this.as3XMLNode.axGetPublicProperty("nodeType");
- };
- f.prototype.getNodeValue = function() {
- return this.as3XMLNode.axGetPublicProperty("nodeValue");
- };
- f.prototype.setNodeValue = function(a) {
- a = b.alCoerceString(this.context, a);
- this.as3XMLNode.axSetPublicProperty("nodeValue", a);
- };
- f.prototype.getParentNode = function() {
- return t(this.context, this.as3XMLNode.axGetPublicProperty("parentNode"));
- };
- f.prototype.getPrefix = function() {
- return this.as3XMLNode.axGetPublicProperty("prefix");
- };
- f.prototype.getPreviousSibling = function() {
- return t(this.context, this.as3XMLNode.axGetPublicProperty("previousSibling"));
- };
- f.prototype.removeNode = function() {
- this.as3XMLNode.axCallPublicProperty("removeNode", null);
- };
- f.addMap = function(a, b) {
- a._as2Node = b;
- };
- return f;
- }(b.AVM1Object);
- l = function(a) {
- function c(b, d) {
- a.call(this, b);
- this.alSetOwnPrototypeProperty(new f(b, this, d));
- }
- __extends(c, a);
- c.prototype.alConstruct = function(a) {
- a = a && b.alCoerceString(this.context, a[0]);
- var c = new b.AVM1Object(this.context);
- c.alPrototype = this.alGetPrototypeProperty();
- c.isAVM1DataObject = !0;
- f.prototype.initializeDocument.call(c, a);
- return c;
- };
- c.prototype.alCall = function(a, b) {
- return this.alConstruct(b);
- };
- return c;
- }(b.AVM1Function);
- h.AVM1XMLFunction = l;
- var f = function(a) {
- function d(c, e, f) {
- a.call(this, c);
- this.alPrototype = f.alGetPrototypeProperty();
- b.alDefineObjectProperties(this, {constructor:{value:e, writable:!0}, addRequestHeader:{value:this.addRequestHeader}, createElement:{value:this.createElement}, createTextNode:{value:this.createTextNode}, getBytesLoaded:{value:this.getBytesLoaded}, getBytesTotal:{value:this.getBytesTotal}, ignoreWhite:{value:!1, writable:!0}, load:{value:this.load}, parseXML:{value:this.parseXML}, send:{value:this.send}, sendAndLoad:{value:this.sendAndLoad}, onData:{value:this.defaultOnData, writable:!0}});
- }
- __extends(d, a);
- d.prototype.initializeDocument = function(a) {
- a = b.alCoerceString(this.context, a) || null;
- a = new this.context.sec.flash.xml.XMLDocument(a);
- c.prototype.initializeFromAS3Node.call(this, a);
- this.as3XMLDocument = a;
- };
- d.prototype.addRequestHeader = function(a, b) {
- e.Debug.notImplemented("AVM1XMLPrototype.addRequestHeader");
- };
- d.prototype.createElement = function(a) {
- a = b.alCoerceString(this.context, a);
- a = this.as3XMLDocument.axCallPublicProperty("createElement", [a]);
- return t(this.context, a);
- };
- d.prototype.createTextNode = function(a) {
- a = b.alCoerceString(this.context, a);
- a = this.as3XMLDocument.axCallPublicProperty("createTextNode", [a]);
- return t(this.context, a);
- };
- d.prototype.getBytesLoaded = function() {
- return this._as3Loader ? this._as3Loader.bytesLoaded : void 0;
- };
- d.prototype.getBytesTotal = function() {
- return this._as3Loader ? this._as3Loader.bytesTotal : void 0;
- };
- d.prototype.load = function(a) {
- a = b.alCoerceString(this.context, a);
- if (!a) {
- return !1;
- }
- h.loadAVM1DataObject(this.context, a, null, null, null, this);
- return !0;
- };
- d.prototype.defaultOnData = function(a) {
- e.isNullOrUndefined(a) ? h.avm1BroadcastEvent(this.context, this, "onLoad", [!1]) : (d.prototype.parseXML.call(this, a), this.alPut("loaded", !0), h.avm1BroadcastEvent(this.context, this, "onLoad", [!0]));
- };
- d.prototype.parseXML = function(a) {
- a = b.alCoerceString(this.context, a);
- this.as3XMLDocument.axSetPublicProperty("ignoreWhite", b.alToBoolean(this.context, this.alGet("ignoreWhite")));
- this.as3XMLDocument.axCallPublicProperty("parseXML", [a]);
- };
- d.prototype.send = function(a, c, d) {
- b.alCoerceString(this.context, a);
- e.isNullOrUndefined(c) || b.alCoerceString(this.context, c);
- e.isNullOrUndefined(d) || b.alCoerceString(this.context, d);
- e.Debug.notImplemented("AVM1XMLPrototype.send");
- return !1;
- };
- d.prototype.sendAndLoad = function(a, c) {
- if ((a = b.alCoerceString(this.context, a)) && c.isAVM1DataObject) {
- e.Debug.somewhatImplemented("AVM1XMLPrototype.send");
- var d = this.alGet("contentType"), d = e.isNullOrUndefined(d) ? void 0 : b.alCoerceString(this.context, d), f = b.alToString(this.context, this);
- h.loadAVM1DataObject(this.context, a, "POST", d, f, c);
- }
- };
- return d;
- }(b.AVM1Object);
- })(b.Lib || (b.Lib = {}));
- })(e.AVM1 || (e.AVM1 = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load AVM1 Dependencies");
-(function(e) {
- (function(b) {
- function h(b, c, d) {
- return a && d ? "string" === typeof c ? (b = e.ColorUtilities.cssStyleToRGBA(c), e.ColorUtilities.rgbaToCSSStyle(d.transformRGBA(b))) : c instanceof CanvasGradient && c._template ? c._template.createCanvasGradient(b, d) : c : c;
- }
- var n = e.NumberUtilities.clamp;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.Brief = 1] = "Brief";
- a[a.Verbose = 2] = "Verbose";
- })(b.TraceLevel || (b.TraceLevel = {}));
- var t = e.Metrics.Counter.instance;
- b.frameCounter = new e.Metrics.Counter(!0);
- b.traceLevel = 2;
- b.writer = null;
- b.frameCount = function(a) {
- t.count(a);
- b.frameCounter.count(a);
- };
- b.timelineBuffer = new e.Tools.Profiler.TimelineBuffer("GFX");
- b.enterTimeline = function(a, b) {
- };
- b.leaveTimeline = function(a, b) {
- };
- var m = null, l = null, d = null, a = !0;
- a && "undefined" !== typeof CanvasRenderingContext2D && (m = CanvasGradient.prototype.addColorStop, l = CanvasRenderingContext2D.prototype.createLinearGradient, d = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(a, b, c, d) {
- return (new f(a, b, c, d)).createCanvasGradient(this, null);
- }, CanvasRenderingContext2D.prototype.createRadialGradient = function(a, b, c, d, e, f) {
- return (new k(a, b, c, d, e, f)).createCanvasGradient(this, null);
- }, CanvasGradient.prototype.addColorStop = function(a, b) {
- m.call(this, a, b);
- this._template.addColorStop(a, b);
- });
- var c = function() {
- return function(a, b) {
- this.offset = a;
- this.color = b;
- };
- }(), f = function() {
- function a(b, c, d, e) {
- this.x0 = b;
- this.y0 = c;
- this.x1 = d;
- this.y1 = e;
- this.colorStops = [];
- }
- a.prototype.addColorStop = function(a, b) {
- this.colorStops.push(new c(a, b));
- };
- a.prototype.createCanvasGradient = function(a, b) {
- for (var c = l.call(a, this.x0, this.y0, this.x1, this.y1), d = this.colorStops, e = 0;e < d.length;e++) {
- var f = d[e], g = f.offset, f = f.color, f = b ? h(a, f, b) : f;
- m.call(c, g, f);
- }
- c._template = this;
- c._transform = this._transform;
- return c;
- };
- return a;
- }(), k = function() {
- function a(b, c, d, e, f, g) {
- this.x0 = b;
- this.y0 = c;
- this.r0 = d;
- this.x1 = e;
- this.y1 = f;
- this.r1 = g;
- this.colorStops = [];
- }
- a.prototype.addColorStop = function(a, b) {
- this.colorStops.push(new c(a, b));
- };
- a.prototype.createCanvasGradient = function(a, b) {
- for (var c = d.call(a, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), e = this.colorStops, f = 0;f < e.length;f++) {
- var g = e[f], k = g.offset, g = g.color, g = b ? h(a, g, b) : g;
- m.call(c, k, g);
- }
- c._template = this;
- c._transform = this._transform;
- return c;
- };
- return a;
- }(), r;
- (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";
- })(r || (r = {}));
- var u = function() {
- function a(b) {
- this._commands = new Uint8Array(a._arrayBufferPool.acquire(8), 0, 8);
- this._commandPosition = 0;
- this._data = new Float64Array(a._arrayBufferPool.acquire(8 * Float64Array.BYTES_PER_ELEMENT), 0, 8);
- this._dataPosition = 0;
- b instanceof a && this.addPath(b);
- }
- a._apply = function(a, b) {
- var c = a._commands, d = a._data, e = 0, f = 0;
- b.beginPath();
- for (var g = a._commandPosition;e < g;) {
- switch(c[e++]) {
- case 1:
- b.closePath();
- break;
- case 2:
- b.moveTo(d[f++], d[f++]);
- break;
- case 3:
- b.lineTo(d[f++], d[f++]);
- break;
- case 4:
- b.quadraticCurveTo(d[f++], d[f++], d[f++], d[f++]);
- break;
- case 5:
- b.bezierCurveTo(d[f++], d[f++], d[f++], d[f++], d[f++], d[f++]);
- break;
- case 6:
- b.arcTo(d[f++], d[f++], d[f++], d[f++], d[f++]);
- break;
- case 7:
- b.rect(d[f++], d[f++], d[f++], d[f++]);
- break;
- case 8:
- b.arc(d[f++], d[f++], d[f++], d[f++], d[f++], !!d[f++]);
- break;
- case 9:
- b.save();
- break;
- case 10:
- b.restore();
- break;
- case 11:
- b.transform(d[f++], d[f++], d[f++], d[f++], d[f++], d[f++]);
- }
- }
- };
- a.prototype._ensureCommandCapacity = function(b) {
- this._commands = a._arrayBufferPool.ensureUint8ArrayLength(this._commands, b);
- };
- a.prototype._ensureDataCapacity = function(b) {
- this._data = a._arrayBufferPool.ensureFloat64ArrayLength(this._data, b);
- };
- a.prototype._writeCommand = function(a) {
- this._commandPosition >= this._commands.length && this._ensureCommandCapacity(this._commandPosition + 1);
- this._commands[this._commandPosition++] = a;
- };
- a.prototype._writeData = function(a, b, c, d, e, f) {
- var g = arguments.length;
- this._dataPosition + g >= this._data.length && this._ensureDataCapacity(this._dataPosition + g);
- var h = this._data, k = this._dataPosition;
- h[k] = a;
- h[k + 1] = b;
- 2 < g && (h[k + 2] = c, h[k + 3] = d, 4 < g && (h[k + 4] = e, 6 === g && (h[k + 5] = f)));
- this._dataPosition += g;
- };
- a.prototype.closePath = function() {
- this._writeCommand(1);
- };
- a.prototype.moveTo = function(a, b) {
- this._writeCommand(2);
- this._writeData(a, b);
- };
- a.prototype.lineTo = function(a, b) {
- this._writeCommand(3);
- this._writeData(a, b);
- };
- a.prototype.quadraticCurveTo = function(a, b, c, d) {
- this._writeCommand(4);
- this._writeData(a, b, c, d);
- };
- a.prototype.bezierCurveTo = function(a, b, c, d, e, f) {
- this._writeCommand(5);
- this._writeData(a, b, c, d, e, f);
- };
- a.prototype.arcTo = function(a, b, c, d, e) {
- this._writeCommand(6);
- this._writeData(a, b, c, d, e);
- };
- a.prototype.rect = function(a, b, c, d) {
- this._writeCommand(7);
- this._writeData(a, b, c, d);
- };
- a.prototype.arc = function(a, b, c, d, e, f) {
- this._writeCommand(8);
- this._writeData(a, b, c, d, e, +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, f = this._commandPosition, g = 0;f < c;f++) {
- d[f] = e[g++];
- }
- this._commandPosition = c;
- c = this._dataPosition + a._dataPosition;
- c >= this._data.length && this._ensureDataCapacity(c);
- d = this._data;
- e = a._data;
- f = this._dataPosition;
- for (g = 0;f < c;f++) {
- d[f] = e[g++];
- }
- this._dataPosition = c;
- b && this._writeCommand(10);
- };
- a._arrayBufferPool = new e.ArrayBufferPool;
- return a;
- }();
- b.Path = u;
- if ("undefined" !== typeof CanvasRenderingContext2D && ("undefined" === typeof Path2D || !Path2D.prototype.addPath)) {
- var q = CanvasRenderingContext2D.prototype.fill;
- CanvasRenderingContext2D.prototype.fill = function(a, b) {
- arguments.length && (a instanceof u ? u._apply(a, this) : b = a);
- b ? q.call(this, b) : q.call(this);
- };
- var g = CanvasRenderingContext2D.prototype.stroke;
- CanvasRenderingContext2D.prototype.stroke = function(a, b) {
- arguments.length && (a instanceof u ? u._apply(a, this) : b = a);
- b ? g.call(this, b) : g.call(this);
- };
- var p = CanvasRenderingContext2D.prototype.clip;
- CanvasRenderingContext2D.prototype.clip = function(a, b) {
- arguments.length && (a instanceof u ? u._apply(a, this) : b = a);
- b ? p.call(this, b) : p.call(this);
- };
- window.Path2D = u;
- }
- if ("undefined" !== typeof CanvasPattern && Path2D.prototype.addPath) {
- r = function(a) {
- this._transform = a;
- this._template && (this._template._transform = a);
- };
- CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = r);
- CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = r);
- var v = CanvasRenderingContext2D.prototype.fill, z = CanvasRenderingContext2D.prototype.stroke;
- CanvasRenderingContext2D.prototype.fill = function(a, c) {
- var d = !!this.fillStyle._transform;
- if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && d && a instanceof Path2D) {
- var d = this.fillStyle._transform, e;
- try {
- e = d.inverse();
- } catch (f) {
- e = d = b.Geometry.Matrix.createIdentitySVGMatrix();
- }
- this.transform(d.a, d.b, d.c, d.d, d.e, d.f);
- d = new Path2D;
- d.addPath(a, e);
- v.call(this, d, c);
- this.transform(e.a, e.b, e.c, e.d, e.e, e.f);
- } else {
- 0 === arguments.length ? v.call(this) : 1 === arguments.length ? v.call(this, a) : 2 === arguments.length && v.call(this, a, c);
- }
- };
- 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;
- this.lineWidth *= (b.a + b.d) / 2;
- z.call(this, c);
- this.transform(b.a, b.b, b.c, b.d, b.e, b.f);
- this.lineWidth = d;
- } else {
- 0 === arguments.length ? z.call(this) : 1 === arguments.length && z.call(this, a);
- }
- };
- }
- "undefined" !== typeof CanvasRenderingContext2D && function() {
- function a() {
- return b.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform);
- }
- var c = "currentTransform" in CanvasRenderingContext2D.prototype;
- CanvasRenderingContext2D.prototype.flashStroke = function(a, b) {
- if (c) {
- var d = this.currentTransform, e = new Path2D;
- e.addPath(a, d);
- var f = this.lineWidth;
- this.setTransform(1, 0, 0, 1, 0, 0);
- switch(b) {
- case 1:
- var g = Math.sqrt((d.a + d.c) * (d.a + d.c) + (d.d + d.b) * (d.d + d.b)) * Math.SQRT1_2;
- this.lineWidth = n(f * g, 1, 1024);
- break;
- case 2:
- this.lineWidth = n(f * (d.d + d.b), 1, 1024);
- break;
- case 3:
- this.lineWidth = n(f * (d.a + d.c), 1, 1024);
- }
- this.stroke(e);
- this.setTransform(d.a, d.b, d.c, d.d, d.e, d.f);
- this.lineWidth = f;
- } else {
- this.stroke(a);
- }
- };
- if (!c) {
- if ("mozCurrentTransform" in CanvasRenderingContext2D.prototype) {
- Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:a}), c = !0;
- } else {
- var d = CanvasRenderingContext2D.prototype.setTransform;
- CanvasRenderingContext2D.prototype.setTransform = function(a, b, c, e, f, g) {
- var h = this.currentTransform;
- h.a = a;
- h.b = b;
- h.c = c;
- h.d = e;
- h.e = f;
- h.f = g;
- d.call(this, a, b, c, e, f, g);
- };
- Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:function() {
- return this._currentTransform || (this._currentTransform = b.Geometry.Matrix.createIdentitySVGMatrix());
- }});
- }
- }
- }();
- if ("undefined" !== typeof CanvasRenderingContext2D && void 0 === CanvasRenderingContext2D.prototype.globalColorMatrix) {
- var B = CanvasRenderingContext2D.prototype.fill, E = CanvasRenderingContext2D.prototype.stroke, A = CanvasRenderingContext2D.prototype.fillText, G = 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(a, b) {
- var c = null;
- this._globalColorMatrix && (c = this.fillStyle, this.fillStyle = h(this, this.fillStyle, this._globalColorMatrix));
- 0 === arguments.length ? B.call(this) : 1 === arguments.length ? B.call(this, a) : 2 === arguments.length && B.call(this, a, b);
- c && (this.fillStyle = c);
- };
- CanvasRenderingContext2D.prototype.stroke = function(a, b) {
- var c = null;
- this._globalColorMatrix && (c = this.strokeStyle, this.strokeStyle = h(this, this.strokeStyle, this._globalColorMatrix));
- 0 === arguments.length ? E.call(this) : 1 === arguments.length && E.call(this, a);
- c && (this.strokeStyle = c);
- };
- CanvasRenderingContext2D.prototype.fillText = function(a, b, c, d) {
- var f = null;
- this._globalColorMatrix && (f = this.fillStyle, this.fillStyle = h(this, this.fillStyle, this._globalColorMatrix));
- 3 === arguments.length ? A.call(this, a, b, c) : 4 === arguments.length ? A.call(this, a, b, c, d) : e.Debug.unexpected();
- f && (this.fillStyle = f);
- };
- CanvasRenderingContext2D.prototype.strokeText = function(a, b, c, d) {
- var f = null;
- this._globalColorMatrix && (f = this.strokeStyle, this.strokeStyle = h(this, this.strokeStyle, this._globalColorMatrix));
- 3 === arguments.length ? G.call(this, a, b, c) : 4 === arguments.length ? G.call(this, a, b, c, d) : e.Debug.unexpected();
- f && (this.strokeStyle = f);
- };
- }
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var e = function() {
- return function(b, e, h, l) {
- this.dataURL = b;
- this.w = e;
- this.h = h;
- this.pixelRatio = l;
- };
- }();
- b.ScreenShot = e;
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- var b = function() {
- function b() {
- this._count = 0;
- this._head = this._tail = null;
- }
- Object.defineProperty(b.prototype, "count", {get:function() {
- return this._count;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "head", {get:function() {
- return this._head;
- }, enumerable:!0, configurable:!0});
- b.prototype._unshift = function(b) {
- 0 === this._count ? this._head = this._tail = b : (b.next = this._head, this._head = b.next.previous = b);
- this._count++;
- };
- b.prototype._remove = function(b) {
- b === this._head && b === this._tail ? this._head = this._tail = null : b === this._head ? (this._head = b.next, this._head.previous = null) : b == this._tail ? (this._tail = b.previous, this._tail.next = null) : (b.previous.next = b.next, b.next.previous = b.previous);
- b.previous = b.next = null;
- this._count--;
- };
- b.prototype.use = function(b) {
- this._head !== b && ((b.next || b.previous || this._tail === b) && this._remove(b), this._unshift(b));
- };
- b.prototype.pop = function() {
- if (!this._tail) {
- return null;
- }
- var b = this._tail;
- this._remove(b);
- return b;
- };
- b.prototype.visit = function(b, e) {
- void 0 === e && (e = !0);
- for (var h = e ? this._head : this._tail;h && b(h);) {
- h = e ? h.next : h.previous;
- }
- };
- return b;
- }();
- e.LRUList = b;
-})(Shumway || (Shumway = {}));
-var Shumway$$inline_420 = Shumway || (Shumway = {}), GFX$$inline_421 = Shumway$$inline_420.GFX || (Shumway$$inline_420.GFX = {}), Option$$inline_422 = Shumway$$inline_420.Options.Option, OptionSet$$inline_423 = Shumway$$inline_420.Options.OptionSet, shumwayOptions$$inline_424 = Shumway$$inline_420.Settings.shumwayOptions, rendererOptions$$inline_425 = shumwayOptions$$inline_424.register(new OptionSet$$inline_423("Renderer Options"));
-GFX$$inline_421.imageUpdateOption = rendererOptions$$inline_425.register(new Option$$inline_422("", "imageUpdate", "boolean", !0, "Enable image updating."));
-GFX$$inline_421.imageConvertOption = rendererOptions$$inline_425.register(new Option$$inline_422("", "imageConvert", "boolean", !0, "Enable image conversion."));
-GFX$$inline_421.stageOptions = shumwayOptions$$inline_424.register(new OptionSet$$inline_423("Stage Renderer Options"));
-GFX$$inline_421.forcePaint = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "forcePaint", "boolean", !1, "Force repainting."));
-GFX$$inline_421.ignoreViewport = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport."));
-GFX$$inline_421.viewportLoupeDiameter = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}}));
-GFX$$inline_421.disableClipping = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "disableClipping", "boolean", !1, "Disable clipping."));
-GFX$$inline_421.debugClipping = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "debugClipping", "boolean", !1, "Disable clipping."));
-GFX$$inline_421.hud = GFX$$inline_421.stageOptions.register(new Option$$inline_422("", "hud", "boolean", !1, "Enable HUD."));
-var webGLOptions$$inline_426 = GFX$$inline_421.stageOptions.register(new OptionSet$$inline_423("WebGL Options"));
-GFX$$inline_421.perspectiveCamera = webGLOptions$$inline_426.register(new Option$$inline_422("", "pc", "boolean", !1, "Use perspective camera."));
-GFX$$inline_421.perspectiveCameraFOV = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcFOV", "number", 60, "Perspective Camera FOV."));
-GFX$$inline_421.perspectiveCameraDistance = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcDistance", "number", 2, "Perspective Camera Distance."));
-GFX$$inline_421.perspectiveCameraAngle = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcAngle", "number", 0, "Perspective Camera Angle."));
-GFX$$inline_421.perspectiveCameraAngleRotate = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcRotate", "boolean", !1, "Rotate Use perspective camera."));
-GFX$$inline_421.perspectiveCameraSpacing = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcSpacing", "number", .01, "Element Spacing."));
-GFX$$inline_421.perspectiveCameraSpacingInflate = webGLOptions$$inline_426.register(new Option$$inline_422("", "pcInflate", "boolean", !1, "Rotate Use perspective camera."));
-GFX$$inline_421.drawTiles = webGLOptions$$inline_426.register(new Option$$inline_422("", "drawTiles", "boolean", !1, "Draw WebGL Tiles"));
-GFX$$inline_421.drawSurfaces = webGLOptions$$inline_426.register(new Option$$inline_422("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces."));
-GFX$$inline_421.drawSurface = webGLOptions$$inline_426.register(new Option$$inline_422("", "drawSurface", "number", -1, "Draw WebGL Surface #"));
-GFX$$inline_421.drawElements = webGLOptions$$inline_426.register(new Option$$inline_422("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck."));
-GFX$$inline_421.disableSurfaceUploads = webGLOptions$$inline_426.register(new Option$$inline_422("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads."));
-GFX$$inline_421.premultipliedAlpha = webGLOptions$$inline_426.register(new Option$$inline_422("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext()."));
-GFX$$inline_421.unpackPremultiplyAlpha = webGLOptions$$inline_426.register(new Option$$inline_422("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei."));
-var factorChoices$$inline_427 = {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_421.sourceBlendFactor = webGLOptions$$inline_426.register(new Option$$inline_422("", "sourceBlendFactor", "number", factorChoices$$inline_427.ONE, "", {choices:factorChoices$$inline_427}));
-GFX$$inline_421.destinationBlendFactor = webGLOptions$$inline_426.register(new Option$$inline_422("", "destinationBlendFactor", "number", factorChoices$$inline_427.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_427}));
-var canvas2DOptions$$inline_428 = GFX$$inline_421.stageOptions.register(new OptionSet$$inline_423("Canvas2D Options"));
-GFX$$inline_421.clipDirtyRegions = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions."));
-GFX$$inline_421.clipCanvas = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "clipCanvas", "boolean", !1, "Clip Regions."));
-GFX$$inline_421.cull = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "cull", "boolean", !1, "Enable culling."));
-GFX$$inline_421.snapToDevicePixels = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "snapToDevicePixels", "boolean", !1, ""));
-GFX$$inline_421.imageSmoothing = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "imageSmoothing", "boolean", !1, ""));
-GFX$$inline_421.masking = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "masking", "boolean", !0, "Composite Mask."));
-GFX$$inline_421.blending = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "blending", "boolean", !0, ""));
-GFX$$inline_421.debugLayers = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "debugLayers", "boolean", !1, ""));
-GFX$$inline_421.filters = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "filters", "boolean", !0, ""));
-GFX$$inline_421.cacheShapes = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "cacheShapes", "boolean", !0, ""));
-GFX$$inline_421.cacheShapesMaxSize = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}}));
-GFX$$inline_421.cacheShapesThreshold = canvas2DOptions$$inline_428.register(new Option$$inline_422("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}}));
-(function(e) {
- (function(b) {
- (function(h) {
- function n(a, b, c, d) {
- var e = 1 - d;
- return a * e * e + 2 * b * e * d + c * d * d;
- }
- function t(a, b, c, d, e) {
- var f = e * e, h = 1 - e, k = h * h;
- return a * h * k + 3 * b * e * k + 3 * c * h * f + d * e * f;
- }
- var m = e.NumberUtilities.clamp, l = e.NumberUtilities.pow2, d = e.NumberUtilities.epsilonEquals;
- h.radianToDegrees = function(a) {
- return 180 * a / Math.PI;
- };
- h.degreesToRadian = function(a) {
- return a * Math.PI / 180;
- };
- h.quadraticBezier = n;
- h.quadraticBezierExtreme = function(a, b, c) {
- var d = (a - b) / (a - 2 * b + c);
- return 0 > d ? a : 1 < d ? c : n(a, b, c, d);
- };
- h.cubicBezier = t;
- h.cubicBezierExtremes = function(a, b, c, d) {
- var e = b - a, f;
- f = 2 * (c - b);
- var h = d - c;
- e + h === f && (h *= 1.0001);
- var k = 2 * e - f, l = f - 2 * e, l = Math.sqrt(l * l - 4 * e * (e - f + h));
- f = 2 * (e - f + h);
- e = (k + l) / f;
- k = (k - l) / f;
- l = [];
- 0 <= e && 1 >= e && l.push(t(a, b, c, d, e));
- 0 <= k && 1 >= k && l.push(t(a, b, c, d, k));
- return l;
- };
- var a = function() {
- function a(b, c) {
- this.x = b;
- this.y = c;
- }
- a.prototype.setElements = function(a, b) {
- this.x = a;
- this.y = b;
- return this;
- };
- a.prototype.set = function(a) {
- this.x = a.x;
- this.y = a.y;
- return this;
- };
- a.prototype.dot = function(a) {
- return this.x * a.x + this.y * a.y;
- };
- a.prototype.squaredLength = function() {
- return this.dot(this);
- };
- a.prototype.distanceTo = function(a) {
- return Math.sqrt(this.dot(a));
- };
- a.prototype.sub = function(a) {
- this.x -= a.x;
- this.y -= a.y;
- return this;
- };
- a.prototype.mul = function(a) {
- this.x *= a;
- this.y *= a;
- 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.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) {
- 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;
- };
- a.createEmpty = function() {
- return new a(0, 0);
- };
- a.createEmptyPoints = function(b) {
- for (var c = [], d = 0;d < b;d++) {
- c.push(new a(0, 0));
- }
- return c;
- };
- return a;
- }();
- h.Point = a;
- var c = function() {
- function a(b, c, d) {
- this.x = b;
- this.y = c;
- this.z = d;
- }
- a.prototype.setElements = function(a, b, c) {
- this.x = a;
- this.y = b;
- this.z = c;
- return this;
- };
- a.prototype.set = function(a) {
- this.x = a.x;
- this.y = a.y;
- this.z = a.z;
- return this;
- };
- a.prototype.dot = function(a) {
- return this.x * a.x + this.y * a.y + this.z * a.z;
- };
- a.prototype.cross = function(a) {
- var b = this.z * a.x - this.x * a.z, c = this.x * a.y - this.y * a.x;
- this.x = this.y * a.z - this.z * a.y;
- this.y = b;
- this.z = c;
- 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;
- return this;
- };
- a.prototype.mul = function(a) {
- this.x *= a;
- this.y *= a;
- this.z *= a;
- return this;
- };
- a.prototype.normalize = function() {
- var a = Math.sqrt(this.squaredLength());
- 1E-5 < a ? this.mul(1 / a) : 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.createEmpty = function() {
- return new a(0, 0, 0);
- };
- a.createEmptyPoints = function(b) {
- for (var c = [], d = 0;d < b;d++) {
- c.push(new a(0, 0, 0));
- }
- return c;
- };
- return a;
- }();
- h.Point3D = c;
- var f = function() {
- function b(a, c, d, e) {
- this.setElements(a, c, d, e);
- b.allocationCount++;
- }
- b.prototype.setElements = function(a, b, c, d) {
- this.x = a;
- this.y = b;
- this.w = c;
- this.h = d;
- };
- b.prototype.set = function(a) {
- this.x = a.x;
- this.y = a.y;
- this.w = a.w;
- this.h = a.h;
- };
- b.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;
- };
- b.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;
- };
- b.prototype.isContained = function(a) {
- for (var b = 0;b < a.length;b++) {
- if (a[b].contains(this)) {
- return !0;
- }
- }
- return !1;
- };
- b.prototype.isSmallerThan = function(a) {
- return this.w < a.w && this.h < a.h;
- };
- b.prototype.isLargerThan = function(a) {
- return this.w > a.w && this.h > a.h;
- };
- b.prototype.union = function(a) {
- if (this.isEmpty()) {
- this.set(a);
- } else {
- if (!a.isEmpty()) {
- var b = this.x, c = this.y;
- this.x > a.x && (b = a.x);
- 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);
- this.x = b;
- this.y = c;
- this.w = d - b;
- this.h = e - c;
- }
- }
- };
- b.prototype.isEmpty = function() {
- return 0 >= this.w || 0 >= this.h;
- };
- b.prototype.setEmpty = function() {
- this.h = this.w = this.y = this.x = 0;
- };
- b.prototype.intersect = function(a) {
- var c = b.createEmpty();
- if (this.isEmpty() || a.isEmpty()) {
- return c.setEmpty(), c;
- }
- c.x = Math.max(this.x, a.x);
- c.y = Math.max(this.y, a.y);
- c.w = Math.min(this.x + this.w, a.x + a.w) - c.x;
- c.h = Math.min(this.y + this.h, a.y + a.h) - c.y;
- c.isEmpty() && c.setEmpty();
- this.set(c);
- };
- b.prototype.intersects = function(a) {
- if (this.isEmpty() || a.isEmpty()) {
- return !1;
- }
- var b = Math.max(this.x, a.x), c = Math.max(this.y, a.y), b = Math.min(this.x + this.w, a.x + a.w) - b;
- a = Math.min(this.y + this.h, a.y + a.h) - c;
- return !(0 >= b || 0 >= a);
- };
- b.prototype.intersectsTransformedAABB = function(a, c) {
- var d = b._temporary;
- d.set(a);
- c.transformRectangleAABB(d);
- return this.intersects(d);
- };
- b.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);
- 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;
- return !(0 >= b || 0 >= a);
- };
- b.prototype.area = function() {
- return this.w * this.h;
- };
- b.prototype.clone = function() {
- var a = b.allocate();
- a.set(this);
- return a;
- };
- b.allocate = function() {
- var a = b._dirtyStack;
- return a.length ? a.pop() : new b(12345, 67890, 12345, 67890);
- };
- b.prototype.free = function() {
- b._dirtyStack.push(this);
- };
- b.prototype.snap = function() {
- var a = Math.ceil(this.x + this.w), b = 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 = b - this.y;
- return this;
- };
- b.prototype.scale = function(a, b) {
- this.x *= a;
- this.y *= b;
- this.w *= a;
- this.h *= b;
- return this;
- };
- b.prototype.offset = function(a, b) {
- this.x += a;
- this.y += b;
- return this;
- };
- b.prototype.resize = function(a, b) {
- this.w += a;
- this.h += b;
- return this;
- };
- b.prototype.expand = function(a, b) {
- this.offset(-a, -b).resize(2 * a, 2 * b);
- return this;
- };
- b.prototype.getCenter = function() {
- return new a(this.x + this.w / 2, this.y + this.h / 2);
- };
- b.prototype.getAbsoluteBounds = function() {
- return new b(0, 0, this.w, this.h);
- };
- b.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) + "}";
- };
- b.createEmpty = function() {
- var a = b.allocate();
- a.setEmpty();
- return a;
- };
- b.createSquare = function(a) {
- return new b(-a / 2, -a / 2, a, a);
- };
- b.createMaxI16 = function() {
- return new b(-32768, -32768, 65535, 65535);
- };
- b.prototype.setMaxI16 = function() {
- this.setElements(-32768, -32768, 65535, 65535);
- };
- b.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;
- };
- b.allocationCount = 0;
- b._temporary = new b(0, 0, 0, 0);
- b._dirtyStack = [];
- return b;
- }();
- h.Rectangle = f;
- var k = function() {
- function b(a) {
- this.corners = a.map(function(a) {
- return a.clone();
- });
- this.axes = [a[1].clone().sub(a[0]), a[3].clone().sub(a[0])];
- this.origins = [];
- for (var c = 0;2 > c;c++) {
- this.axes[c].mul(1 / this.axes[c].squaredLength()), this.origins.push(a[0].dot(this.axes[c]));
- }
- }
- b.prototype.getBounds = function() {
- return b.getBounds(this.corners);
- };
- b.getBounds = function(b) {
- for (var c = new a(Number.MAX_VALUE, Number.MAX_VALUE), d = new a(Number.MIN_VALUE, Number.MIN_VALUE), e = 0;4 > e;e++) {
- var g = b[e].x, h = b[e].y;
- c.x = Math.min(c.x, g);
- c.y = Math.min(c.y, h);
- d.x = Math.max(d.x, g);
- d.y = Math.max(d.y, h);
- }
- return new f(c.x, c.y, d.x - c.x, d.y - c.y);
- };
- b.prototype.intersects = function(a) {
- return this.intersectsOneWay(a) && a.intersectsOneWay(this);
- };
- b.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);
- }
- if (e > 1 + this.origins[b] || f < this.origins[b]) {
- return !1;
- }
- }
- return !0;
- };
- return b;
- }();
- h.OBB = k;
- (function(a) {
- a[a.Unknown = 0] = "Unknown";
- a[a.Identity = 1] = "Identity";
- a[a.Translation = 2] = "Translation";
- })(h.MatrixType || (h.MatrixType = {}));
- var r = function() {
- function a(b, c, d, e, f, h) {
- this._data = new Float64Array(6);
- this._type = 0;
- this.setElements(b, c, d, e, f, h);
- a.allocationCount++;
- }
- Object.defineProperty(a.prototype, "a", {get:function() {
- return this._data[0];
- }, set:function(a) {
- this._data[0] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "b", {get:function() {
- return this._data[1];
- }, set:function(a) {
- this._data[1] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "c", {get:function() {
- return this._data[2];
- }, set:function(a) {
- this._data[2] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "d", {get:function() {
- return this._data[3];
- }, set:function(a) {
- this._data[3] = a;
- this._type = 0;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "tx", {get:function() {
- return this._data[4];
- }, set:function(a) {
- this._data[4] = a;
- 1 === this._type && (this._type = 2);
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "ty", {get:function() {
- return this._data[5];
- }, set:function(a) {
- this._data[5] = a;
- 1 === this._type && (this._type = 2);
- }, enumerable:!0, configurable:!0});
- a._createSVGMatrix = function() {
- a._svg || (a._svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"));
- return a._svg.createSVGMatrix();
- };
- a.prototype.setElements = function(a, b, c, d, e, f) {
- var g = this._data;
- g[0] = a;
- g[1] = b;
- g[2] = c;
- g[3] = d;
- g[4] = e;
- g[5] = f;
- this._type = 0;
- };
- a.prototype.set = function(a) {
- var b = this._data, c = a._data;
- b[0] = c[0];
- b[1] = c[1];
- b[2] = c[2];
- b[3] = c[3];
- b[4] = c[4];
- b[5] = c[5];
- this._type = a._type;
- };
- a.prototype.emptyArea = function(a) {
- a = this._data;
- return 0 === a[0] || 0 === a[3] ? !0 : !1;
- };
- a.prototype.infiniteArea = function(a) {
- a = this._data;
- return Infinity === Math.abs(a[0]) || Infinity === Math.abs(a[3]) ? !0 : !1;
- };
- a.prototype.isEqual = function(a) {
- if (1 === this._type && 1 === a._type) {
- return !0;
- }
- var b = this._data;
- a = a._data;
- 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];
- };
- a.prototype.clone = function() {
- var b = a.allocate();
- b.set(this);
- return b;
- };
- a.allocate = function() {
- var b = a._dirtyStack;
- return b.length ? b.pop() : new a(12345, 12345, 12345, 12345, 12345, 12345);
- };
- a.prototype.free = function() {
- a._dirtyStack.push(this);
- };
- a.prototype.transform = function(a, b, c, d, e, f) {
- var g = this._data, h = g[0], k = g[1], l = g[2], m = g[3], n = g[4], r = g[5];
- g[0] = h * a + l * b;
- g[1] = k * a + m * b;
- g[2] = h * c + l * d;
- g[3] = k * c + m * d;
- g[4] = h * e + l * f + n;
- g[5] = k * e + m * f + r;
- this._type = 0;
- return this;
- };
- a.prototype.transformRectangle = function(a, b) {
- var c = this._data, d = c[0], e = c[1], f = c[2], g = c[3], h = c[4], c = c[5], k = a.x, l = a.y, m = a.w, n = a.h;
- b[0].x = d * k + f * l + h;
- b[0].y = e * k + g * l + c;
- b[1].x = d * (k + m) + f * l + h;
- b[1].y = e * (k + m) + g * l + c;
- b[2].x = d * (k + m) + f * (l + n) + h;
- b[2].y = e * (k + m) + g * (l + n) + c;
- b[3].x = d * k + f * (l + n) + h;
- b[3].y = e * k + g * (l + n) + c;
- };
- a.prototype.isTranslationOnly = function() {
- if (2 === this._type) {
- return !0;
- }
- var a = this._data;
- return 1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3] || d(a[0], 1) && d(a[1], 0) && d(a[2], 0) && d(a[3], 1) ? (this._type = 2, !0) : !1;
- };
- a.prototype.transformRectangleAABB = function(a) {
- var b = this._data;
- if (1 !== this._type) {
- 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], g = b[4], h = b[5], k = a.x, l = a.y, m = a.w, n = a.h, b = c * k + e * l + g, r = d * k + f * l + h, q = c * (k + m) + e * l + g, u = d * (k + m) + f * l + h, t = c * (k + m) + e * (l + n) + g, m = d * (k + m) + f * (l + n) + h, c = c * k + e * (l + n) + g, d = d * k + f * (l + n) + h, f = 0;
- b > q && (f = b, b = q, q = f);
- t > c && (f = t, t = c, c = f);
- a.x = b < t ? b : t;
- a.w = (q > c ? q : c) - a.x;
- r > u && (f = r, r = u, u = f);
- m > d && (f = m, m = d, d = f);
- a.y = r < m ? r : m;
- a.h = (u > d ? u : d) - a.y;
- }
- }
- };
- a.prototype.scale = function(a, b) {
- var c = this._data;
- c[0] *= a;
- c[1] *= b;
- c[2] *= a;
- c[3] *= b;
- c[4] *= a;
- c[5] *= b;
- this._type = 0;
- return this;
- };
- a.prototype.scaleClone = function(a, b) {
- 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], g = b[4], h = b[5], k = Math.cos(a);
- a = Math.sin(a);
- b[0] = k * c - a * d;
- b[1] = a * c + k * d;
- b[2] = k * e - a * f;
- b[3] = a * e + k * f;
- b[4] = k * g - a * h;
- b[5] = a * g + k * h;
- this._type = 0;
- return this;
- };
- a.prototype.concat = function(a) {
- if (1 === a._type) {
- return this;
- }
- var b = this._data;
- a = a._data;
- var c = b[0] * a[0], d = 0, e = 0, f = b[3] * a[3], g = 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], g += b[5] * a[2], h += b[4] * a[1];
- }
- b[0] = c;
- b[1] = d;
- b[2] = e;
- b[3] = f;
- b[4] = g;
- b[5] = h;
- this._type = 0;
- return this;
- };
- a.prototype.concatClone = function(a) {
- return this.clone().concat(a);
- };
- a.prototype.preMultiply = function(a) {
- var b = this._data, c = a._data;
- if (2 === a._type && this._type & 3) {
- b[4] += c[4], b[5] += c[5], this._type = 2;
- } else {
- if (1 !== a._type) {
- a = c[0] * b[0];
- var d = 0, e = 0, f = c[3] * b[3], g = 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], g += c[5] * b[2], h += c[4] * b[1];
- }
- b[0] = a;
- b[1] = d;
- b[2] = e;
- b[3] = f;
- b[4] = g;
- b[5] = h;
- this._type = 0;
- }
- }
- };
- a.prototype.translate = function(a, b) {
- var c = this._data;
- c[4] += a;
- c[5] += b;
- 1 === this._type && (this._type = 2);
- return this;
- };
- a.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;
- this._type = 1;
- };
- 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];
- };
- a.prototype.transformPoint = function(a) {
- if (1 !== this._type) {
- var b = this._data, c = a.x, d = a.y;
- a.x = b[0] * c + b[2] * d + b[4];
- a.y = b[1] * c + b[3] * d + b[5];
- }
- };
- a.prototype.transformPoints = function(a) {
- if (1 !== this._type) {
- for (var b = 0;b < a.length;b++) {
- this.transformPoint(a[b]);
- }
- }
- };
- a.prototype.deltaTransformPoint = function(a) {
- if (1 !== this._type) {
- var b = this._data, c = a.x, d = a.y;
- a.x = b[0] * c + b[2] * d;
- a.y = b[1] * c + b[3] * d;
- }
- };
- a.prototype.inverse = function(a) {
- var b = this._data, c = a._data;
- if (1 === this._type) {
- a.setIdentity();
- } else {
- 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], g = b[5];
- if (0 === d && 0 === e) {
- var h = c[0] = 1 / b[0], b = c[3] = 1 / b[3];
- c[1] = 0;
- c[2] = 0;
- c[4] = -h * f;
- c[5] = -b * g;
- } else {
- var h = b[0], b = b[3], k = h * b - d * e;
- if (0 === k) {
- a.setIdentity();
- return;
- }
- k = 1 / k;
- c[0] = b * k;
- d = c[1] = -d * k;
- e = c[2] = -e * k;
- b = c[3] = h * k;
- c[4] = -(c[0] * f + e * g);
- c[5] = -(d * f + b * g);
- }
- a._type = 0;
- }
- }
- };
- a.prototype.getTranslateX = function() {
- return this._data[4];
- };
- a.prototype.getTranslateY = function() {
- return this._data[4];
- };
- a.prototype.getScaleX = function() {
- var a = this._data;
- if (1 === a[0] && 0 === a[1]) {
- return 1;
- }
- var b = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
- return 0 < a[0] ? b : -b;
- };
- a.prototype.getScaleY = function() {
- var a = this._data;
- if (0 === a[2] && 1 === a[3]) {
- return 1;
- }
- var b = Math.sqrt(a[2] * a[2] + a[3] * a[3]);
- return 0 < a[3] ? b : -b;
- };
- a.prototype.getScale = function() {
- return (this.getScaleX() + this.getScaleY()) / 2;
- };
- a.prototype.getAbsoluteScaleX = function() {
- return Math.abs(this.getScaleX());
- };
- a.prototype.getAbsoluteScaleY = function() {
- return Math.abs(this.getScaleY());
- };
- a.prototype.getRotation = function() {
- var a = this._data;
- return 180 * Math.atan(a[1] / a[0]) / Math.PI;
- };
- a.prototype.isScaleOrRotation = function() {
- var a = this._data;
- return .01 > Math.abs(a[0] * a[2] + a[1] * a[3]);
- };
- a.prototype.toString = function(a) {
- void 0 === a && (a = 2);
- var b = this._data;
- return "{" + b[0].toFixed(a) + ", " + b[1].toFixed(a) + ", " + b[2].toFixed(a) + ", " + b[3].toFixed(a) + ", " + b[4].toFixed(a) + ", " + b[5].toFixed(a) + "}";
- };
- a.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.prototype.toCSSTransform = function() {
- var a = this._data;
- return "matrix(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
- };
- a.createIdentity = function() {
- var b = a.allocate();
- b.setIdentity();
- return b;
- };
- a.prototype.toSVGMatrix = function() {
- var b = this._data, c = a._createSVGMatrix();
- try {
- c.a = b[0], c.b = b[1], c.c = b[2], c.d = b[3], c.e = b[4], c.f = b[5];
- } catch (d) {
- return a._createSVGMatrix();
- }
- return c;
- };
- a.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.createIdentitySVGMatrix = function() {
- return a._createSVGMatrix();
- };
- a.createSVGMatrixFromArray = function(b) {
- var c = a._createSVGMatrix();
- c.a = b[0];
- c.b = b[1];
- c.c = b[2];
- c.d = b[3];
- c.e = b[4];
- c.f = b[5];
- return c;
- };
- a.allocationCount = 0;
- a._dirtyStack = [];
- a.multiply = function(a, b) {
- var c = b._data;
- a.transform(c[0], c[1], c[2], c[3], c[4], c[5]);
- };
- return a;
- }();
- h.Matrix = r;
- r = function() {
- function a(b) {
- this._m = new Float32Array(b);
- }
- a.prototype.asWebGLMatrix = function() {
- return this._m;
- };
- a.createCameraLookAt = function(b, c, d) {
- c = b.clone().sub(c).normalize();
- d = d.clone().cross(c).normalize();
- var e = c.clone().cross(d);
- return new a([d.x, d.y, d.z, 0, e.x, e.y, e.z, 0, c.x, c.y, c.z, 0, b.x, b.y, b.z, 1]);
- };
- a.createLookAt = function(b, c, d) {
- c = b.clone().sub(c).normalize();
- d = d.clone().cross(c).normalize();
- var e = c.clone().cross(d);
- return new a([d.x, e.x, c.x, 0, e.x, e.y, c.y, 0, c.x, e.z, c.z, 0, -d.dot(b), -e.dot(b), -c.dot(b), 1]);
- };
- a.prototype.mul = function(a) {
- a = [a.x, a.y, a.z, 0];
- for (var b = this._m, d = [], e = 0;4 > e;e++) {
- d[e] = 0;
- for (var f = 4 * e, g = 0;4 > g;g++) {
- d[e] += b[f + g] * a[g];
- }
- }
- return new c(d[0], d[1], d[2]);
- };
- a.create2DProjection = function(b, c, d) {
- return new a([2 / b, 0, 0, 0, 0, -2 / c, 0, 0, 0, 0, 2 / d, 0, -1, 1, 0, 1]);
- };
- a.createPerspective = function(b, c, d, e) {
- b = Math.tan(.5 * Math.PI - .5 * b);
- var f = 1 / (d - e);
- return new a([b / c, 0, 0, 0, 0, b, 0, 0, 0, 0, (d + e) * f, -1, 0, 0, d * e * f * 2, 0]);
- };
- a.createIdentity = function() {
- return a.createTranslation(0, 0, 0);
- };
- a.createTranslation = function(b, c, d) {
- return new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, c, d, 1]);
- };
- a.createXRotation = function(b) {
- var c = Math.cos(b);
- b = Math.sin(b);
- return new a([1, 0, 0, 0, 0, c, b, 0, 0, -b, c, 0, 0, 0, 0, 1]);
- };
- a.createYRotation = function(b) {
- var c = Math.cos(b);
- b = Math.sin(b);
- return new a([c, 0, -b, 0, 0, 1, 0, 0, b, 0, c, 0, 0, 0, 0, 1]);
- };
- a.createZRotation = function(b) {
- var c = Math.cos(b);
- b = Math.sin(b);
- return new a([c, b, 0, 0, -b, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
- };
- a.createScale = function(b, c, d) {
- return new a([b, 0, 0, 0, 0, c, 0, 0, 0, 0, d, 0, 0, 0, 0, 1]);
- };
- a.createMultiply = function(b, c) {
- var d = b._m, e = c._m, f = d[0], h = d[1], k = d[2], l = d[3], m = d[4], n = d[5], r = d[6], q = d[7], u = d[8], t = d[9], F = d[10], D = d[11], H = d[12], K = d[13], O = d[14], d = d[15], S = e[0], P = e[1], N = e[2], Q = e[3], V = e[4], W = e[5], R = e[6], L = e[7], U = e[8], aa = e[9], X = e[10], T = e[11], ca = e[12], ba = e[13], Z = e[14], e = e[15];
- return new a([f * S + h * V + k * U + l * ca, f * P + h * W + k * aa + l * ba, f * N + h * R + k * X + l * Z, f * Q + h * L + k * T + l * e, m * S + n * V + r * U + q * ca, m * P + n * W + r * aa + q * ba, m * N + n * R + r * X + q * Z, m * Q + n * L + r * T + q * e, u * S + t * V + F * U + D * ca, u * P + t * W + F * aa + D * ba, u * N + t * R + F * X + D * Z, u * Q + t * L + F * T + D * e, H * S + K * V + O * U + d * ca, H * P + K * W + O * aa + d * ba, H * N + K * R + O * X + d * Z,
- H * Q + K * L + O * T + d * e]);
- };
- a.createInverse = function(b) {
- var c = b._m;
- b = c[0];
- var d = c[1], e = c[2], f = c[3], h = c[4], k = c[5], l = c[6], m = c[7], n = c[8], r = c[9], q = c[10], u = c[11], t = c[12], F = c[13], D = c[14], c = c[15], H = q * c, K = D * u, O = l * c, S = D * m, P = l * u, N = q * m, Q = e * c, V = D * f, W = e * u, R = q * f, L = e * m, U = l * f, aa = n * F, X = t * r, T = h * F, ca = t * k, ba = h * r, Z = n * k, ea = b * F, da = t * d, fa = b * r, ha = n * d, ka = b * k, ga = h * d, ia = H * k + S * r + P * F - (K * k + O * r + N * F), ja =
- K * d + Q * r + R * F - (H * d + V * r + W * F), F = O * d + V * k + L * F - (S * d + Q * k + U * F), d = N * d + W * k + U * r - (P * d + R * k + L * r), k = 1 / (b * ia + h * ja + n * F + t * d);
- return new a([k * ia, k * ja, k * F, k * d, k * (K * h + O * n + N * t - (H * h + S * n + P * t)), k * (H * b + V * n + W * t - (K * b + Q * n + R * t)), k * (S * b + Q * h + U * t - (O * b + V * h + L * t)), k * (P * b + R * h + L * n - (N * b + W * h + U * n)), k * (aa * m + ca * u + ba * c - (X * m + T * u + Z * c)), k * (X * f + ea * u + ha * c - (aa * f + da * u + fa * c)), k * (T * f + da * m + ka * c - (ca * f + ea * m + ga * c)), k * (Z * f + fa * m + ga * u - (ba * f + ha * m +
- ka * u)), k * (T * q + Z * D + X * l - (ba * D + aa * l + ca * q)), k * (fa * D + aa * e + da * q - (ea * q + ha * D + X * e)), k * (ea * l + ga * D + ca * e - (ka * D + T * e + da * l)), k * (ka * q + ba * e + ha * l - (fa * l + ga * q + Z * e))]);
- };
- return a;
- }();
- h.Matrix3D = r;
- r = function() {
- function a(b, c, d) {
- void 0 === d && (d = 7);
- var e = this.size = 1 << d;
- this.sizeInBits = d;
- this.w = b;
- this.h = c;
- this.c = Math.ceil(b / e);
- this.r = Math.ceil(c / e);
- this.grid = [];
- for (b = 0;b < this.r;b++) {
- for (this.grid.push([]), c = 0;c < this.c;c++) {
- this.grid[b][c] = new a.Cell(new f(c * e, b * e, e, e));
- }
- }
- }
- 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();
- }
- }
- };
- a.prototype.getBounds = function() {
- return new f(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);
- 0 > c && (c = 0);
- var d = this.grid[c][b];
- a = a.clone();
- a.snap();
- 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, g = 0;g < e;g++) {
- for (var h = 0;h < f;h++) {
- d = this.grid[c + h][b + g], d = d.region.clone(), d.intersect(a), d.isEmpty() || this.addDirtyRectangle(d);
- }
- }
- }
- }
- };
- a.prototype.gatherRegions = function(a) {
- for (var b = 0;b < this.r;b++) {
- for (var c = 0;c < this.c;c++) {
- this.grid[b][c].bounds.isEmpty() || a.push(this.grid[b][c].bounds);
- }
- }
- };
- a.prototype.gatherOptimizedRegions = function(a) {
- this.gatherRegions(a);
- };
- a.prototype.getDirtyRatio = function() {
- var a = this.w * this.h;
- if (0 === a) {
- return 0;
- }
- for (var b = 0, c = 0;c < this.r;c++) {
- for (var d = 0;d < this.c;d++) {
- b += this.grid[c][d].region.area();
- }
- }
- return b / a;
- };
- a.prototype.render = function(a, b) {
- function c(b) {
- a.rect(b.x, b.y, b.w, b.h);
- }
- 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];
- a.beginPath();
- c(f.region);
- a.closePath();
- a.stroke();
- }
- }
- }
- 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();
- }
- }
- };
- a.tmpRectangle = f.createEmpty();
- return a;
- }();
- h.DirtyRegion = r;
- (function(a) {
- var b = function() {
- function a(b) {
- this.region = b;
- this.bounds = f.createEmpty();
- }
- a.prototype.clear = function() {
- this.bounds.setEmpty();
- };
- return a;
- }();
- a.Cell = b;
- })(r = h.DirtyRegion || (h.DirtyRegion = {}));
- var u = function() {
- function b(a, c, d, e, g, h) {
- this.index = a;
- this.x = c;
- this.y = d;
- this.scale = h;
- this.bounds = new f(c * e, d * g, e, g);
- }
- b.prototype.getOBB = function() {
- if (this._obb) {
- return this._obb;
- }
- this.bounds.getCorners(b.corners);
- return this._obb = new k(b.corners);
- };
- b.corners = a.createEmptyPoints(4);
- return b;
- }();
- h.Tile = u;
- var q = function() {
- function b(a, c, d, e, f) {
- this.tileW = d;
- this.tileH = e;
- this.scale = f;
- this.w = a;
- this.h = c;
- this.rows = Math.ceil(c / e);
- this.columns = Math.ceil(a / d);
- this.tiles = [];
- for (c = a = 0;c < this.rows;c++) {
- for (var g = 0;g < this.columns;g++) {
- this.tiles.push(new u(a++, g, c, d, e, f));
- }
- }
- }
- b.prototype.getTiles = function(a, b) {
- if (b.emptyArea(a)) {
- return [];
- }
- if (b.infiniteArea(a)) {
- return this.tiles;
- }
- var c = this.columns * this.rows;
- return 40 > c && b.isScaleOrRotation() ? this.getFewTiles(a, b, 10 < c) : this.getManyTiles(a, b);
- };
- b.prototype.getFewTiles = function(a, c, d) {
- void 0 === d && (d = !0);
- if (c.isTranslationOnly() && 1 === this.tiles.length) {
- return this.tiles[0].bounds.intersectsTranslated(a, c.tx, c.ty) ? [this.tiles[0]] : [];
- }
- c.transformRectangle(a, b._points);
- var e;
- a = new f(0, 0, this.w, this.h);
- d && (e = new k(b._points));
- a.intersect(k.getBounds(b._points));
- if (a.isEmpty()) {
- return [];
- }
- var h = a.x / this.tileW | 0;
- c = a.y / this.tileH | 0;
- var l = Math.ceil((a.x + a.w) / this.tileW) | 0, n = Math.ceil((a.y + a.h) / this.tileH) | 0, h = m(h, 0, this.columns), l = m(l, 0, this.columns);
- c = m(c, 0, this.rows);
- for (var n = m(n, 0, this.rows), r = [];h < l;h++) {
- for (var q = c;q < n;q++) {
- var u = this.tiles[q * this.columns + h];
- u.bounds.intersects(a) && (d ? u.getOBB().intersects(e) : 1) && r.push(u);
- }
- }
- return r;
- };
- b.prototype.getManyTiles = function(a, c) {
- function d(a, b, c) {
- return (a - b.x) * (c.y - b.y) / (c.x - b.x) + b.y;
- }
- function e(a, b, c, d, f) {
- if (!(0 > c || c >= b.columns)) {
- for (d = m(d, 0, b.rows), f = m(f + 1, 0, b.rows);d < f;d++) {
- a.push(b.tiles[d * b.columns + c]);
- }
- }
- }
- var f = b._points;
- c.transformRectangle(a, f);
- for (var h = f[0].x < f[1].x ? 0 : 1, k = f[2].x < f[3].x ? 2 : 3, k = f[h].x < f[k].x ? h : k, h = [], l = 0;5 > l;l++, k++) {
- h.push(f[k % 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) && (f = h[1], h[1] = h[3], h[3] = f);
- var f = [], n, r, k = Math.floor(h[0].x / this.tileW), l = (k + 1) * this.tileW;
- if (h[2].x < l) {
- n = 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 q = Math.floor(n / this.tileH), u = Math.floor(r / this.tileH);
- e(f, this, k, q, u);
- return f;
- }
- var t = 0, J = 4, F = !1;
- if (h[0].x === h[1].x || h[0].x === h[3].x) {
- h[0].x === h[1].x ? (F = !0, t++) : J--, n = d(l, h[t], h[t + 1]), r = d(l, h[J], h[J - 1]), q = Math.floor(h[t].y / this.tileH), u = Math.floor(h[J].y / this.tileH), e(f, this, k, q, u), k++;
- }
- do {
- var D, H, K, O;
- h[t + 1].x < l ? (D = h[t + 1].y, K = !0) : (D = d(l, h[t], h[t + 1]), K = !1);
- h[J - 1].x < l ? (H = h[J - 1].y, O = !0) : (H = d(l, h[J], h[J - 1]), O = !1);
- q = Math.floor((h[t].y < h[t + 1].y ? n : D) / this.tileH);
- u = Math.floor((h[J].y > h[J - 1].y ? r : H) / this.tileH);
- e(f, this, k, q, u);
- if (K && F) {
- break;
- }
- K ? (F = !0, t++, n = d(l, h[t], h[t + 1])) : n = D;
- O ? (J--, r = d(l, h[J], h[J - 1])) : r = H;
- k++;
- l = (k + 1) * this.tileW;
- } while (t < J);
- return f;
- };
- b._points = a.createEmptyPoints(4);
- return b;
- }();
- h.TileCache = q;
- r = function() {
- function a(b, c, d) {
- this._cacheLevels = [];
- this._source = b;
- this._tileSize = c;
- this._minUntiledSize = d;
- }
- a.prototype._getTilesAtScale = function(a, b, c) {
- var d = Math.max(b.getAbsoluteScaleX(), b.getAbsoluteScaleY()), e = 0;
- 1 !== d && (e = m(Math.round(Math.log(1 / d) / Math.LN2), -5, 3));
- d = l(e);
- if (this._source.hasFlags(1048576)) {
- for (;;) {
- d = l(e);
- if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(d, d))) {
- break;
- }
- e--;
- }
- }
- this._source.hasFlags(2097152) || (e = m(e, -5, 0));
- d = l(e);
- c = 5 + e;
- e = this._cacheLevels[c];
- if (!e) {
- var e = this._source.getBounds().getAbsoluteBounds().clone().scale(d, d), f, g;
- this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(e.w, e.h) <= this._minUntiledSize ? (f = e.w, g = e.h) : f = g = this._tileSize;
- e = this._cacheLevels[c] = new q(e.w, e.h, f, g, d);
- }
- return e.getTiles(a, b.scaleClone(d, d));
- };
- a.prototype.fetchTiles = function(a, b, c, d) {
- var e = new f(0, 0, c.canvas.width, c.canvas.height);
- a = this._getTilesAtScale(a, b, e);
- var g;
- b = this._source;
- 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));
- }
- g && this._cacheTiles(c, g, d, e);
- b.removeFlags(16);
- return a;
- };
- a.prototype._getTileBounds = function(a) {
- for (var b = f.createEmpty(), c = 0;c < a.length;c++) {
- b.union(a[c].bounds);
- }
- return b;
- };
- a.prototype._cacheTiles = function(a, c, d, e, f) {
- void 0 === f && (f = 4);
- var g = this._getTileBounds(c);
- a.save();
- a.setTransform(1, 0, 0, 1, 0, 0);
- a.clearRect(0, 0, e.w, e.h);
- a.translate(-g.x, -g.y);
- a.scale(c[0].scale, c[0].scale);
- var h = this._source.getBounds();
- a.translate(-h.x, -h.y);
- 2 <= b.traceLevel && b.writer && b.writer.writeLn("Rendering Tiles: " + g);
- this._source.render(a, 0);
- a.restore();
- for (var h = null, k = 0;k < c.length;k++) {
- var l = c[k], m = l.bounds.clone();
- m.x -= g.x;
- m.y -= g.y;
- e.contains(m) || (h || (h = []), h.push(l));
- l.cachedSurfaceRegion = d(l.cachedSurfaceRegion, a, m);
- }
- h && (2 <= h.length ? (c = h.slice(0, h.length / 2 | 0), g = h.slice(c.length), this._cacheTiles(a, c, d, e, f - 1), this._cacheTiles(a, g, d, e, f - 1)) : this._cacheTiles(a, h, d, e, f - 1));
- };
- return a;
- }();
- h.RenderableTileCache = r;
- })(b.Geometry || (b.Geometry = {}));
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- var h = e.IntegerUtilities.roundToMultipleOfPowerOfTwo, n = b.Geometry.Rectangle;
- (function(e) {
- var m = function(a) {
- function b() {
- a.apply(this, arguments);
- }
- __extends(b, a);
- return b;
- }(b.Geometry.Rectangle);
- e.Region = m;
- var l = function() {
- function a(b, c) {
- this._root = new d(0, 0, b | 0, c | 0, !1);
- }
- a.prototype.allocate = function(a, b) {
- a = Math.ceil(a);
- b = Math.ceil(b);
- var c = this._root.insert(a, b);
- c && (c.allocator = this, c.allocated = !0);
- return c;
- };
- a.prototype.free = function(a) {
- a.clear();
- a.allocated = !1;
- };
- a.RANDOM_ORIENTATION = !0;
- a.MAX_DEPTH = 256;
- return a;
- }();
- e.CompactAllocator = l;
- var d = function(a) {
- function b(c, d, e, f, h) {
- a.call(this, c, d, e, f);
- this._children = null;
- this._horizontal = h;
- this.allocated = !1;
- }
- __extends(b, a);
- b.prototype.clear = function() {
- this._children = null;
- this.allocated = !1;
- };
- b.prototype.insert = function(a, b) {
- return this._insert(a, b, 0);
- };
- b.prototype._insert = function(a, c, d) {
- if (!(d > l.MAX_DEPTH || this.allocated || this.w < a || this.h < c)) {
- if (this._children) {
- var e;
- if ((e = this._children[0]._insert(a, c, d + 1)) || (e = this._children[1]._insert(a, c, d + 1))) {
- return e;
- }
- } else {
- return e = !this._horizontal, l.RANDOM_ORIENTATION && (e = .5 <= Math.random()), this._children = this._horizontal ? [new b(this.x, this.y, this.w, c, !1), new b(this.x, this.y + c, this.w, this.h - c, e)] : [new b(this.x, this.y, a, this.h, !0), new b(this.x + a, this.y, this.w - a, this.h, e)], e = this._children[0], e.w === a && e.h === c ? (e.allocated = !0, e) : this._insert(a, c, d + 1);
- }
- }
- };
- return b;
- }(e.Region), a = function() {
- function a(b, c, d, e) {
- this._columns = b / d | 0;
- this._rows = c / e | 0;
- this._sizeW = d;
- this._sizeH = e;
- this._freeList = [];
- this._index = 0;
- this._total = this._columns * this._rows;
- }
- a.prototype.allocate = function(a, b) {
- a = Math.ceil(a);
- b = Math.ceil(b);
- var d = this._sizeW, e = this._sizeH;
- if (a > d || b > e) {
- return null;
- }
- var f = this._freeList, h = this._index;
- return 0 < f.length ? (d = f.pop(), d.w = a, d.h = b, d.allocated = !0, d) : h < this._total ? (f = h / this._columns | 0, d = new c((h - f * this._columns) * d, f * e, a, b), d.index = h, d.allocator = this, d.allocated = !0, this._index++, d) : null;
- };
- a.prototype.free = function(a) {
- a.allocated = !1;
- this._freeList.push(a);
- };
- return a;
- }();
- e.GridAllocator = a;
- var c = function(a) {
- function b(c, d, e, f) {
- a.call(this, c, d, e, f);
- this.index = -1;
- }
- __extends(b, a);
- return b;
- }(e.Region);
- e.GridCell = c;
- var f = function() {
- return function(a, b, c) {
- this.size = a;
- this.region = b;
- this.allocator = c;
- };
- }(), k = function(a) {
- function b(c, d, e, f, h) {
- a.call(this, c, d, e, f);
- this.region = h;
- }
- __extends(b, a);
- return b;
- }(e.Region);
- e.BucketCell = k;
- m = function() {
- function b(a, c) {
- this._buckets = [];
- this._w = a | 0;
- this._h = c | 0;
- this._filled = 0;
- }
- b.prototype.allocate = function(b, c) {
- b = Math.ceil(b);
- c = Math.ceil(c);
- var d = Math.max(b, c);
- if (b > this._w || c > this._h) {
- return null;
- }
- var e = null, l, m = this._buckets;
- do {
- for (var r = 0;r < m.length && !(m[r].size >= d && (l = m[r], e = l.allocator.allocate(b, c)));r++) {
- }
- if (!e) {
- var t = this._h - this._filled;
- if (t < c) {
- return null;
- }
- var r = h(d, 8), A = 2 * r;
- A > t && (A = t);
- if (A < r) {
- return null;
- }
- t = new n(0, this._filled, this._w, A);
- this._buckets.push(new f(r, t, new a(t.w, t.h, r, r)));
- this._filled += A;
- }
- } while (!e);
- return new k(l.region.x + e.x, l.region.y + e.y, e.w, e.h, e);
- };
- b.prototype.free = function(a) {
- a.region.allocator.free(a.region);
- };
- return b;
- }();
- e.BucketAllocator = m;
- })(b.RegionAllocator || (b.RegionAllocator = {}));
- (function(b) {
- var e = function() {
- function b(d) {
- this._createSurface = d;
- this._surfaces = [];
- }
- Object.defineProperty(b.prototype, "surfaces", {get:function() {
- return this._surfaces;
- }, enumerable:!0, configurable:!0});
- b.prototype._createNewSurface = function(b, a) {
- var c = this._createSurface(b, a);
- this._surfaces.push(c);
- return c;
- };
- b.prototype.addSurface = function(b) {
- this._surfaces.push(b);
- };
- b.prototype.allocate = function(b, a, c) {
- for (var e = 0;e < this._surfaces.length;e++) {
- var h = this._surfaces[e];
- if (h !== c && (h = h.allocate(b, a))) {
- return h;
- }
- }
- return this._createNewSurface(b, a).allocate(b, a);
- };
- b.prototype.free = function(b) {
- };
- return b;
- }();
- b.SimpleAllocator = e;
- })(b.SurfaceRegionAllocator || (b.SurfaceRegionAllocator = {}));
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var h = b.Geometry.Rectangle, n = b.Geometry.Matrix, t = b.Geometry.DirtyRegion;
- (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";
- })(b.BlendMode || (b.BlendMode = {}));
- var m = b.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";
- })(b.NodeFlags || (b.NodeFlags = {}));
- var l = b.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";
- })(b.NodeType || (b.NodeType = {}));
- var d = b.NodeType;
- (function(a) {
- a[a.None = 0] = "None";
- a[a.OnStageBoundsChanged = 1] = "OnStageBoundsChanged";
- a[a.RemovedFromStage = 2] = "RemovedFromStage";
- })(b.NodeEventType || (b.NodeEventType = {}));
- var a = function() {
- function a() {
- }
- a.prototype.visitNode = function(a, b) {
- };
- a.prototype.visitShape = function(a, b) {
- this.visitNode(a, b);
- };
- a.prototype.visitGroup = function(a, b) {
- this.visitNode(a, b);
- for (var c = a.getChildren(), d = 0;d < c.length;d++) {
- c[d].visit(this, b);
- }
- };
- a.prototype.visitStage = function(a, b) {
- this.visitGroup(a, b);
- };
- a.prototype.visitRenderable = function(a, b) {
- this.visitNode(a, b);
- };
- return a;
- }();
- b.NodeVisitor = a;
- var c = function() {
- return function() {
- };
- }();
- b.State = c;
- var f = function(a) {
- function b() {
- a.call(this);
- this.matrix = n.createIdentity();
- this.depth = 0;
- }
- __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);
- return a;
- };
- b.prototype.set = function(a) {
- this.matrix.set(a.matrix);
- };
- b.prototype.free = function() {
- b._dirtyStack.push(this);
- };
- b._dirtyStack = [];
- return b;
- }(c);
- b.PreRenderState = f;
- var k = function(a) {
- function b() {
- a.apply(this, arguments);
- this.isDirty = !0;
- }
- __extends(b, a);
- b.prototype.start = function(a, b) {
- this._dirtyRegion = b;
- var c = new f;
- c.matrix.setIdentity();
- a.visit(this, c);
- c.free();
- };
- b.prototype.visitGroup = function(a, b) {
- var c = a.getChildren();
- this.visitNode(a, b);
- for (var d = 0;d < c.length;d++) {
- var e = c[d], f = b.transform(e.getTransform());
- e.visit(this, f);
- f.free();
- }
- };
- b.prototype.visitNode = function(a, b) {
- a.hasFlags(16) && (this.isDirty = !0);
- a.toggleFlags(16, !1);
- a.depth = b.depth++;
- };
- return b;
- }(a);
- b.PreRenderVisitor = k;
- c = function(a) {
- function b(c) {
- a.call(this);
- this.writer = c;
- }
- __extends(b, a);
- b.prototype.visitNode = function(a, b) {
- };
- b.prototype.visitShape = function(a, b) {
- this.writer.writeLn(a.toString());
- this.visitNode(a, b);
- };
- b.prototype.visitGroup = function(a, b) {
- this.visitNode(a, b);
- var c = a.getChildren();
- this.writer.enter(a.toString() + " " + c.length);
- for (var d = 0;d < c.length;d++) {
- c[d].visit(this, b);
- }
- this.writer.outdent();
- };
- b.prototype.visitStage = function(a, b) {
- this.visitGroup(a, b);
- };
- return b;
- }(a);
- b.TracingNodeVisitor = c;
- var r = function() {
- function a() {
- this._clip = -1;
- this._eventListeners = null;
- this._id = a._nextId++;
- this._type = 1;
- this._index = -1;
- this._parent = null;
- this.reset();
- }
- Object.defineProperty(a.prototype, "id", {get:function() {
- return this._id;
- }, enumerable:!0, configurable:!0});
- a.prototype._dispatchEvent = function(a) {
- if (this._eventListeners) {
- for (var b = this._eventListeners, c = 0;c < b.length;c++) {
- var d = b[c];
- d.type === a && d.listener(this, a);
- }
- }
- };
- a.prototype.addEventListener = function(a, b) {
- this._eventListeners || (this._eventListeners = []);
- this._eventListeners.push({type:a, listener:b});
- };
- a.prototype.removeEventListener = function(a, b) {
- for (var c = this._eventListeners, d = 0;d < c.length;d++) {
- var e = c[d];
- if (e.type === a && e.listener === b) {
- c.splice(d, 1);
- break;
- }
- }
- };
- Object.defineProperty(a.prototype, "properties", {get:function() {
- return this._properties || (this._properties = {});
- }, enumerable:!0, configurable:!0});
- a.prototype.reset = function() {
- this._flags = l.Default;
- this._properties = this._transform = this._layer = this._bounds = null;
- this.depth = -1;
- };
- Object.defineProperty(a.prototype, "clip", {get:function() {
- return this._clip;
- }, set:function(a) {
- this._clip = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "parent", {get:function() {
- return this._parent;
- }, enumerable:!0, configurable:!0});
- a.prototype.getTransformedBounds = function(a) {
- var b = this.getBounds(!0);
- if (a !== this && !b.isEmpty()) {
- var c = this.getTransform().getConcatenatedMatrix();
- a ? (a = a.getTransform().getInvertedConcatenatedMatrix(!0), a.preMultiply(c), a.transformRectangleAABB(b), a.free()) : c.transformRectangleAABB(b);
- }
- return b;
- };
- a.prototype._markCurrentBoundsAsDirtyRegion = function() {
- };
- a.prototype.getStage = function(a) {
- void 0 === a && (a = !0);
- for (var b = this._parent;b;) {
- if (b.isType(13)) {
- var c = b;
- if (a) {
- if (c.dirtyRegion) {
- return c;
- }
- } else {
- return c;
- }
- }
- b = b._parent;
- }
- return null;
- };
- a.prototype.getChildren = function(a) {
- throw void 0;
- };
- a.prototype.getBounds = function(a) {
- throw void 0;
- };
- a.prototype.setBounds = function(a) {
- (this._bounds || (this._bounds = h.createEmpty())).set(a);
- this.removeFlags(256);
- };
- a.prototype.clone = function() {
- throw void 0;
- };
- a.prototype.setFlags = function(a) {
- this._flags |= a;
- };
- a.prototype.hasFlags = function(a) {
- return (this._flags & a) === a;
- };
- a.prototype.hasAnyFlags = function(a) {
- return !!(this._flags & a);
- };
- a.prototype.removeFlags = function(a) {
- this._flags &= ~a;
- };
- a.prototype.toggleFlags = function(a, b) {
- this._flags = b ? this._flags | a : this._flags & ~a;
- };
- a.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);
- }
- };
- a.prototype._propagateFlagsDown = function(a) {
- throw void 0;
- };
- a.prototype.isAncestor = function(a) {
- for (;a;) {
- if (a === this) {
- return !0;
- }
- a = a._parent;
- }
- return !1;
- };
- a._getAncestors = function(b, c) {
- var d = a._path;
- for (d.length = 0;b && b !== c;) {
- d.push(b), b = b._parent;
- }
- return d;
- };
- a.prototype._findClosestAncestor = function(a, b) {
- for (var c = this;c;) {
- if (c.hasFlags(a) === b) {
- return c;
- }
- c = c._parent;
- }
- return null;
- };
- a.prototype.isType = function(a) {
- return this._type === a;
- };
- a.prototype.isTypeOf = function(a) {
- return (this._type & a) === a;
- };
- a.prototype.isLeaf = function() {
- return this.isType(33) || this.isType(3);
- };
- a.prototype.isLinear = function() {
- if (this.isLeaf()) {
- return !0;
- }
- if (this.isType(5)) {
- var a = this._children;
- if (1 === a.length && a[0].isLinear()) {
- return !0;
- }
- }
- return !1;
- };
- a.prototype.getTransformMatrix = function(a) {
- void 0 === a && (a = !1);
- return this.getTransform().getMatrix(a);
- };
- a.prototype.getTransform = function() {
- null === this._transform && (this._transform = new q(this));
- return this._transform;
- };
- a.prototype.getLayer = function() {
- null === this._layer && (this._layer = new g(this));
- return this._layer;
- };
- a.prototype.getLayerBounds = function(a) {
- var b = this.getBounds();
- a && this._layer && this._layer.expandBounds(b);
- return b;
- };
- a.prototype.visit = function(a, b) {
- switch(this._type) {
- case 1:
- a.visitNode(this, b);
- break;
- case 5:
- a.visitGroup(this, b);
- break;
- case 13:
- a.visitStage(this, b);
- break;
- case 3:
- a.visitShape(this, b);
- break;
- case 33:
- a.visitRenderable(this, b);
- break;
- default:
- e.Debug.unexpectedCase();
- }
- };
- a.prototype.invalidate = function() {
- this._propagateFlagsUp(l.UpOnInvalidate);
- };
- a.prototype.toString = function(a) {
- void 0 === a && (a = !1);
- var b = d[this._type] + " " + this._id;
- a && (b += " " + this._bounds.toString());
- return b;
- };
- a._path = [];
- a._nextId = 0;
- return a;
- }();
- b.Node = r;
- var u = function(a) {
- function b() {
- a.call(this);
- this._type = 5;
- this._children = [];
- }
- __extends(b, a);
- b.prototype.getChildren = function(a) {
- void 0 === a && (a = !1);
- return a ? this._children.slice(0) : this._children;
- };
- b.prototype.childAt = function(a) {
- return this._children[a];
- };
- Object.defineProperty(b.prototype, "child", {get:function() {
- return this._children[0];
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "groupChild", {get:function() {
- return this._children[0];
- }, enumerable:!0, configurable:!0});
- b.prototype.addChild = function(a) {
- 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);
- };
- b.prototype.removeChildAt = function(a) {
- var b = this._children[a];
- this._children.splice(a, 1);
- b._index = -1;
- b._parent = null;
- this._propagateFlagsUp(l.UpOnAddedOrRemoved);
- b._propagateFlagsDown(l.DownOnAddedOrRemoved);
- };
- b.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));
- }
- this._children.length = 0;
- this._propagateFlagsUp(l.UpOnAddedOrRemoved);
- };
- b.prototype._propagateFlagsDown = function(a) {
- if (!this.hasFlags(a)) {
- this.setFlags(a);
- for (var b = this._children, c = 0;c < b.length;c++) {
- b[c]._propagateFlagsDown(a);
- }
- }
- };
- b.prototype.getBounds = function(a) {
- void 0 === a && (a = !1);
- var b = this._bounds || (this._bounds = h.createEmpty());
- if (this.hasFlags(256)) {
- b.setEmpty();
- for (var c = this._children, d = h.allocate(), e = 0;e < c.length;e++) {
- var f = c[e];
- d.set(f.getBounds());
- f.getTransformMatrix().transformRectangleAABB(d);
- b.union(d);
- }
- d.free();
- this.removeFlags(256);
- }
- return a ? b.clone() : b;
- };
- b.prototype.getLayerBounds = function(a) {
- if (!a) {
- return this.getBounds();
- }
- for (var b = h.createEmpty(), c = this._children, d = h.allocate(), e = 0;e < c.length;e++) {
- var f = c[e];
- d.set(f.getLayerBounds(a));
- f.getTransformMatrix().transformRectangleAABB(d);
- b.union(d);
- }
- d.free();
- a && this._layer && this._layer.expandBounds(b);
- return b;
- };
- return b;
- }(r);
- b.Group = u;
- var q = function() {
- function a(c) {
- this._node = c;
- this._matrix = n.createIdentity();
- this._colorMatrix = b.ColorMatrix.createIdentity();
- this._concatenatedMatrix = n.createIdentity();
- this._invertedConcatenatedMatrix = n.createIdentity();
- this._concatenatedColorMatrix = b.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));
- };
- a.prototype.setColorMatrix = function(a) {
- this._colorMatrix.set(a);
- this._node._propagateFlagsUp(l.UpOnColorMatrixChanged);
- this._node._propagateFlagsDown(l.DownOnColorMatrixChanged);
- };
- a.prototype.getMatrix = function(a) {
- void 0 === a && (a = !1);
- return a ? this._matrix.clone() : this._matrix;
- };
- a.prototype.hasColorMatrix = function() {
- return null !== this._colorMatrix;
- };
- a.prototype.getColorMatrix = function(a) {
- void 0 === a && (a = !1);
- null === this._colorMatrix && (this._colorMatrix = b.ColorMatrix.createIdentity());
- return a ? this._colorMatrix.clone() : this._colorMatrix;
- };
- a.prototype.getConcatenatedMatrix = function(a) {
- void 0 === a && (a = !1);
- if (this._node.hasFlags(512)) {
- for (var b = this._node._findClosestAncestor(512, !1), c = r._getAncestors(this._node, b), d = b ? b.getTransform()._concatenatedMatrix.clone() : n.createIdentity(), e = c.length - 1;0 <= e;e--) {
- var b = c[e], f = b.getTransform();
- d.preMultiply(f._matrix);
- f._concatenatedMatrix.set(d);
- b.removeFlags(512);
- }
- }
- return a ? this._concatenatedMatrix.clone() : this._concatenatedMatrix;
- };
- a.prototype.getInvertedConcatenatedMatrix = function(a) {
- void 0 === a && (a = !1);
- this._node.hasFlags(1024) && (this.getConcatenatedMatrix().inverse(this._invertedConcatenatedMatrix), this._node.removeFlags(1024));
- return a ? this._invertedConcatenatedMatrix.clone() : this._invertedConcatenatedMatrix;
- };
- a.prototype.toString = function() {
- return this._matrix.toString();
- };
- return a;
- }();
- b.Transform = q;
- var g = function() {
- function a(b) {
- this._node = b;
- this._mask = null;
- this._blendMode = 1;
- }
- Object.defineProperty(a.prototype, "filters", {get:function() {
- return this._filters;
- }, set:function(a) {
- this._filters = a;
- a.length && this._node.invalidate();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "blendMode", {get:function() {
- return this._blendMode;
- }, set:function(a) {
- this._blendMode = a;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "mask", {get:function() {
- return this._mask;
- }, set:function(a) {
- this._mask !== a && (this._node.invalidate(), this._mask && this._mask.removeFlags(4));
- (this._mask = a) && this._mask.setFlags(4);
- }, enumerable:!0, configurable:!0});
- a.prototype.toString = function() {
- return m[this._blendMode];
- };
- a.prototype.expandBounds = function(a) {
- var b = this._filters;
- if (b) {
- for (var c = 0;c < b.length;c++) {
- b[c].expandBounds(a);
- }
- }
- };
- return a;
- }();
- b.Layer = g;
- c = function(a) {
- function b(c) {
- a.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 = h.createEmpty());
- this.hasFlags(256) && (b.set(this._source.getBounds()), this.removeFlags(256));
- return a ? b.clone() : b;
- };
- Object.defineProperty(b.prototype, "source", {get:function() {
- return this._source;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "ratio", {get:function() {
- return this._ratio;
- }, set:function(a) {
- a !== this._ratio && (this.invalidate(), this._ratio = a);
- }, enumerable:!0, configurable:!0});
- b.prototype._propagateFlagsDown = function(a) {
- this.setFlags(a);
- };
- b.prototype.getChildren = function(a) {
- return [this._source];
- };
- return b;
- }(r);
- b.Shape = c;
- c = function() {
- return function() {
- this.debug = !1;
- this.paintRenderable = !0;
- this.paintViewport = this.paintFlashing = this.paintDirtyRegion = this.paintBounds = !1;
- this.clear = !0;
- };
- }();
- b.RendererOptions = c;
- (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";
- })(b.Backend || (b.Backend = {}));
- a = function(a) {
- function b(c, d, e) {
- a.call(this);
- this._container = c;
- this._stage = d;
- this._options = e;
- this._viewport = h.createSquare(1024);
- this._devicePixelRatio = 1;
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "viewport", {set:function(a) {
- this._viewport.set(a);
- }, enumerable:!0, configurable:!0});
- b.prototype.render = function() {
- throw void 0;
- };
- b.prototype.resize = function() {
- throw void 0;
- };
- b.prototype.screenShot = function(a, b, c) {
- throw void 0;
- };
- return b;
- }(a);
- b.Renderer = a;
- a = function(a) {
- function b(c, d, e) {
- void 0 === e && (e = !1);
- a.call(this);
- this._preVisitor = new k;
- this._flags &= -3;
- this._type = 13;
- this._scaleMode = b.DEFAULT_SCALE;
- this._align = b.DEFAULT_ALIGN;
- this._content = new u;
- this._content._flags &= -3;
- this.addChild(this._content);
- this.setFlags(16);
- this.setBounds(new h(0, 0, c, d));
- e ? (this._dirtyRegion = new t(c, d), this._dirtyRegion.addDirtyRectangle(new h(0, 0, c, d))) : this._dirtyRegion = null;
- this._updateContentMatrix();
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "dirtyRegion", {get:function() {
- return this._dirtyRegion;
- }, enumerable:!0, configurable:!0});
- b.prototype.setBounds = function(b) {
- a.prototype.setBounds.call(this, b);
- this._updateContentMatrix();
- this._dispatchEvent(1);
- this._dirtyRegion && (this._dirtyRegion = new t(b.w, b.h), this._dirtyRegion.addDirtyRectangle(b));
- };
- Object.defineProperty(b.prototype, "content", {get:function() {
- return this._content;
- }, enumerable:!0, configurable:!0});
- b.prototype.readyToRender = function() {
- this._preVisitor.isDirty = !1;
- this._preVisitor.start(this, this._dirtyRegion);
- return this._preVisitor.isDirty ? !0 : !1;
- };
- Object.defineProperty(b.prototype, "align", {get:function() {
- return this._align;
- }, set:function(a) {
- this._align = a;
- this._updateContentMatrix();
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "scaleMode", {get:function() {
- return this._scaleMode;
- }, set:function(a) {
- this._scaleMode = a;
- this._updateContentMatrix();
- }, enumerable:!0, configurable:!0});
- b.prototype._updateContentMatrix = function() {
- if (this._scaleMode === b.DEFAULT_SCALE && this._align === b.DEFAULT_ALIGN) {
- this._content.getTransform().setMatrix(new n(1, 0, 0, 1, 0, 0));
- } else {
- var a = this.getBounds(), c = this._content.getBounds(), d = a.w / c.w, e = a.h / c.h;
- switch(this._scaleMode) {
- case 2:
- d = e = Math.max(d, e);
- break;
- case 4:
- d = e = 1;
- break;
- case 1:
- break;
- default:
- d = e = Math.min(d, e);
- }
- var f;
- f = this._align & 4 ? 0 : this._align & 8 ? a.w - c.w * d : (a.w - c.w * d) / 2;
- a = this._align & 1 ? 0 : this._align & 2 ? a.h - c.h * e : (a.h - c.h * e) / 2;
- this._content.getTransform().setMatrix(new n(d, 0, 0, e, f, a));
- }
- };
- b.DEFAULT_SCALE = 4;
- b.DEFAULT_ALIGN = 5;
- return b;
- }(u);
- b.Stage = a;
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(a, b, c) {
- return a + (b - a) * c;
- }
- function n(a, b, c) {
- return h(a >> 24 & 255, b >> 24 & 255, c) << 24 | h(a >> 16 & 255, b >> 16 & 255, c) << 16 | h(a >> 8 & 255, b >> 8 & 255, c) << 8 | h(a & 255, b & 255, c);
- }
- function t(a, b, c) {
- a = a.measureText(b).width | 0;
- 0 < c && (a += b.length * c);
- return a;
- }
- var m = b.Geometry.Point, l = b.Geometry.Rectangle, d = b.Geometry.Matrix, a = e.ArrayUtilities.indexOf, c = function(c) {
- function d() {
- c.call(this);
- this._parents = [];
- this._renderableParents = [];
- this._invalidateEventListeners = null;
- this._flags &= -3;
- this._type = 33;
- }
- __extends(d, c);
- Object.defineProperty(d.prototype, "parents", {get:function() {
- return this._parents;
- }, enumerable:!0, configurable:!0});
- d.prototype.addParent = function(b) {
- a(this._parents, b);
- this._parents.push(b);
- };
- d.prototype.willRender = function() {
- for (var a = this._parents, b = 0;b < a.length;b++) {
- for (var c = a[b];c;) {
- if (c.isType(13)) {
- return !0;
- }
- if (!c.hasFlags(65536)) {
- break;
- }
- c = c._parent;
- }
- }
- return !1;
- };
- d.prototype.addRenderableParent = function(a) {
- this._renderableParents.push(a);
- };
- d.prototype.wrap = function() {
- for (var a, c = this._parents, d = 0;d < c.length;d++) {
- if (a = c[d], !a._parent) {
- return a;
- }
- }
- a = new b.Shape(this);
- this.addParent(a);
- return a;
- };
- d.prototype.invalidate = function() {
- this.setFlags(16);
- for (var a = this._parents, b = 0;b < a.length;b++) {
- a[b].invalidate();
- }
- a = this._renderableParents;
- for (b = 0;b < a.length;b++) {
- a[b].invalidate();
- }
- if (a = this._invalidateEventListeners) {
- for (b = 0;b < a.length;b++) {
- a[b](this);
- }
- }
- };
- d.prototype.addInvalidateEventListener = function(b) {
- this._invalidateEventListeners || (this._invalidateEventListeners = []);
- a(this._invalidateEventListeners, b);
- this._invalidateEventListeners.push(b);
- };
- d.prototype.getBounds = function(a) {
- void 0 === a && (a = !1);
- return a ? this._bounds.clone() : this._bounds;
- };
- d.prototype.getChildren = function(a) {
- return null;
- };
- d.prototype._propagateFlagsUp = function(a) {
- if (0 !== a && !this.hasFlags(a)) {
- for (var b = 0;b < this._parents.length;b++) {
- this._parents[b]._propagateFlagsUp(a);
- }
- }
- };
- d.prototype.render = function(a, b, c, d, e) {
- };
- return d;
- }(b.Node);
- b.Renderable = c;
- var f = function(a) {
- function b(c, d) {
- a.call(this);
- this.setBounds(c);
- this.render = d;
- }
- __extends(b, a);
- return b;
- }(c);
- b.CustomRenderable = f;
- (function(a) {
- a[a.Idle = 1] = "Idle";
- a[a.Playing = 2] = "Playing";
- a[a.Paused = 3] = "Paused";
- a[a.Ended = 4] = "Ended";
- })(b.RenderableVideoState || (b.RenderableVideoState = {}));
- f = function(a) {
- function c(b, d) {
- a.call(this);
- this._flags = 1048592;
- this._lastPausedTime = this._lastTimeInvalidated = 0;
- this._pauseHappening = this._seekHappening = !1;
- this._isDOMElement = !0;
- this.setBounds(new l(0, 0, 1, 1));
- this._assetId = b;
- this._eventSerializer = d;
- var e = document.createElement("video"), f = this._handleVideoEvent.bind(this);
- e.preload = "metadata";
- e.addEventListener("play", f);
- e.addEventListener("pause", f);
- e.addEventListener("ended", f);
- e.addEventListener("loadeddata", f);
- e.addEventListener("progress", f);
- e.addEventListener("suspend", f);
- e.addEventListener("loadedmetadata", f);
- e.addEventListener("error", f);
- e.addEventListener("seeking", f);
- e.addEventListener("seeked", f);
- e.addEventListener("canplay", f);
- e.style.position = "absolute";
- this._video = e;
- this._videoEventHandler = f;
- c._renderableVideos.push(this);
- "undefined" !== typeof registerInspectorAsset && registerInspectorAsset(-1, -1, this);
- this._state = 1;
- }
- __extends(c, a);
- Object.defineProperty(c.prototype, "video", {get:function() {
- return this._video;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(c.prototype, "state", {get:function() {
- return this._state;
- }, enumerable:!0, configurable:!0});
- c.prototype.play = function() {
- this._state = 2;
- this._video.play();
- };
- c.prototype.pause = function() {
- this._state = 3;
- this._video.pause();
- };
- c.prototype._handleVideoEvent = function(a) {
- var b = null, c = this._video;
- switch(a.type) {
- case "play":
- if (!this._pauseHappening) {
- return;
- }
- a = 7;
- break;
- case "pause":
- if (2 === this._state) {
- c.play();
- return;
- }
- a = 6;
- this._pauseHappening = !0;
- break;
- case "ended":
- this._state = 4;
- this._notifyNetStream(3, b);
- a = 4;
- break;
- 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 = 1;
- b = {videoWidth:c.videoWidth, videoHeight:c.videoHeight, duration:c.duration};
- break;
- case "error":
- a = 11;
- b = {code:c.error.code};
- break;
- case "seeking":
- if (!this._seekHappening) {
- return;
- }
- a = 8;
- break;
- case "seeked":
- if (!this._seekHappening) {
- return;
- }
- a = 9;
- this._seekHappening = !1;
- break;
- default:
- return;
- }
- this._notifyNetStream(a, b);
- };
- c.prototype._notifyNetStream = function(a, b) {
- this._eventSerializer.sendVideoPlaybackEvent(this._assetId, a, b);
- };
- c.prototype.processControlRequest = function(a, b) {
- var c = this._video;
- switch(a) {
- case 1:
- c.src = b.url;
- this.play();
- this._notifyNetStream(0, null);
- break;
- case 9:
- c.paused && c.play();
- break;
- case 2:
- 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 && 0 !== c.seekable.length && (this._seekHappening = !0, c.currentTime = b.time);
- break;
- case 4:
- return c ? c.currentTime : 0;
- case 5:
- return c ? c.duration : 0;
- case 6:
- c && (c.volume = b.volume);
- break;
- case 7:
- if (!c) {
- return 0;
- }
- var d = -1;
- if (c.buffered) {
- for (var e = 0;e < c.buffered.length;e++) {
- d = Math.max(d, c.buffered.end(e));
- }
- } else {
- d = c.duration;
- }
- return Math.round(500 * d);
- case 8:
- return c ? Math.round(500 * c.duration) : 0;
- }
- };
- c.prototype.checkForUpdate = function() {
- this._lastTimeInvalidated !== this._video.currentTime && (this._isDOMElement || this.invalidate());
- this._lastTimeInvalidated = this._video.currentTime;
- };
- c.checkForVideoUpdates = function() {
- for (var a = c._renderableVideos, b = 0;b < a.length;b++) {
- var d = a[b];
- d.willRender() ? (d._video.parentElement || d.invalidate(), d._video.style.zIndex = d.parents[0].depth + "") : d._video.parentElement && d._dispatchEvent(2);
- a[b].checkForUpdate();
- }
- };
- c.prototype.render = function(a, c, d) {
- b.enterTimeline("RenderableVideo.render");
- (c = this._video) && 0 < c.videoWidth && a.drawImage(c, 0, 0, c.videoWidth, c.videoHeight, 0, 0, this._bounds.w, this._bounds.h);
- b.leaveTimeline("RenderableVideo.render");
- };
- c._renderableVideos = [];
- return c;
- }(c);
- b.RenderableVideo = f;
- f = function(a) {
- function c(b, d) {
- a.call(this);
- this._flags = 1048592;
- this.properties = {};
- this.setBounds(d);
- b instanceof HTMLCanvasElement ? this._initializeSourceCanvas(b) : this._sourceImage = b;
- }
- __extends(c, a);
- c.FromDataBuffer = function(a, d, e) {
- b.enterTimeline("RenderableBitmap.FromDataBuffer");
- var f = document.createElement("canvas");
- f.width = e.w;
- f.height = e.h;
- e = new c(f, e);
- e.updateFromDataBuffer(a, d);
- b.leaveTimeline("RenderableBitmap.FromDataBuffer");
- return e;
- };
- c.FromNode = function(a, d, e, f, g) {
- b.enterTimeline("RenderableBitmap.FromFrame");
- var h = document.createElement("canvas"), k = a.getBounds();
- h.width = k.w;
- h.height = k.h;
- h = new c(h, k);
- h.drawNode(a, d, e, f, g);
- b.leaveTimeline("RenderableBitmap.FromFrame");
- return h;
- };
- c.FromImage = function(a, b, d) {
- return new c(a, new l(0, 0, b, d));
- };
- c.prototype.updateFromDataBuffer = function(a, c) {
- if (b.imageUpdateOption.value) {
- var d = c.buffer;
- b.enterTimeline("RenderableBitmap.updateFromDataBuffer", {length:c.length});
- if (4 !== a && 5 !== a && 6 !== a) {
- var f = this._bounds, g = this._imageData;
- g && g.width === f.w && g.height === f.h || (g = this._imageData = this._context.createImageData(f.w, f.h));
- b.imageConvertOption.value && (b.enterTimeline("ColorUtilities.convertImage"), d = new Int32Array(d), f = new Int32Array(g.data.buffer), e.ColorUtilities.convertImage(a, 3, d, f), b.leaveTimeline("ColorUtilities.convertImage"));
- b.enterTimeline("putImageData");
- this._ensureSourceCanvas();
- this._context.putImageData(g, 0, 0);
- b.leaveTimeline("putImageData");
- }
- this.invalidate();
- b.leaveTimeline("RenderableBitmap.updateFromDataBuffer");
- }
- };
- c.prototype.readImageData = function(a) {
- a.writeRawBytes(this.imageData.data);
- };
- c.prototype.render = function(a, c, d) {
- b.enterTimeline("RenderableBitmap.render");
- this.renderSource ? a.drawImage(this.renderSource, 0, 0) : this._renderFallback(a);
- b.leaveTimeline("RenderableBitmap.render");
- };
- c.prototype.drawNode = function(a, c, d, e, f) {
- b.enterTimeline("RenderableBitmap.drawFrame");
- d = b.Canvas2D;
- e = this.getBounds();
- (new d.Canvas2DRenderer(this._canvas, null)).renderNode(a, f || e, c);
- b.leaveTimeline("RenderableBitmap.drawFrame");
- };
- c.prototype.mask = function(a) {
- for (var b = this.imageData, c = new Int32Array(b.data.buffer), d = e.ColorUtilities.getUnpremultiplyTable(), f = 0;f < a.length;f++) {
- var g = a[f];
- if (0 === g) {
- c[f] = 0;
- } else {
- if (255 !== g) {
- var h = c[f], k = h >> 0 & 255, l = h >> 8 & 255, h = h >> 16 & 255, m = g << 8, k = d[m + Math.min(k, g)], l = d[m + Math.min(l, g)], h = d[m + Math.min(h, g)];
- c[f] = g << 24 | h << 16 | l << 8 | k;
- }
- }
- }
- this._context.putImageData(b, 0, 0);
- };
- c.prototype._initializeSourceCanvas = function(a) {
- this._canvas = a;
- this._context = this._canvas.getContext("2d");
- };
- c.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);
- }
- };
- 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(c.prototype, "renderSource", {get:function() {
- return this._canvas || this._sourceImage;
- }, enumerable:!0, configurable:!0});
- c.prototype._renderFallback = function(a) {
- };
- return c;
- }(c);
- b.RenderableBitmap = f;
- (function(a) {
- a[a.Fill = 0] = "Fill";
- a[a.Stroke = 1] = "Stroke";
- a[a.StrokeFill = 2] = "StrokeFill";
- })(b.PathType || (b.PathType = {}));
- var k = function() {
- return function(a, b, c, d) {
- this.type = a;
- this.style = b;
- this.smoothImage = c;
- this.strokeProperties = d;
- this.path = new Path2D;
- };
- }();
- b.StyledPath = k;
- var r = function() {
- return function(a, b, c, d, e) {
- this.thickness = a;
- this.scaleMode = b;
- this.capsStyle = c;
- this.jointsStyle = d;
- this.miterLimit = e;
- };
- }();
- b.StrokeProperties = r;
- var u = function(a) {
- function c(b, d, e, f) {
- a.call(this);
- this._flags = 6291472;
- this.properties = {};
- this.setBounds(f);
- this._id = b;
- this._pathData = d;
- this._textures = e;
- e.length && this.setFlags(1048576);
- }
- __extends(c, a);
- c.prototype.update = function(a, b, c) {
- this.setBounds(c);
- this._pathData = a;
- this._paths = null;
- this._textures = b;
- this.setFlags(1048576);
- this.invalidate();
- };
- c.prototype.render = function(a, c, d, e, f) {
- void 0 === e && (e = null);
- void 0 === f && (f = !1);
- a.fillStyle = a.strokeStyle = "transparent";
- c = this._deserializePaths(this._pathData, a, c);
- b.enterTimeline("RenderableShape.render", this);
- for (d = 0;d < c.length;d++) {
- var g = c[d];
- a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = g.smoothImage;
- if (0 === g.type) {
- e ? e.addPath(g.path, a.currentTransform) : (a.fillStyle = f ? "#000000" : g.style, a.fill(g.path, "evenodd"), a.fillStyle = "transparent");
- } else {
- if (!e && !f) {
- a.strokeStyle = g.style;
- var h = 1;
- g.strokeProperties && (h = g.strokeProperties.scaleMode, a.lineWidth = g.strokeProperties.thickness, a.lineCap = g.strokeProperties.capsStyle, a.lineJoin = g.strokeProperties.jointsStyle, a.miterLimit = g.strokeProperties.miterLimit);
- var k = a.lineWidth;
- (k = 1 === k || 3 === k) && a.translate(.5, .5);
- a.flashStroke(g.path, h);
- k && a.translate(-.5, -.5);
- a.strokeStyle = "transparent";
- }
- }
- }
- b.leaveTimeline("RenderableShape.render");
- };
- c.prototype._deserializePaths = function(a, d, f) {
- b.enterTimeline("RenderableShape.deserializePaths");
- if (this._paths) {
- return this._paths;
- }
- f = this._paths = [];
- var g = null, h = null, k = 0, l = 0, m, n, p = !1, q = 0, u = 0, t = a.commands, D = a.coordinates, H = a.styles, K = H.position = 0;
- a = a.commandsPosition;
- for (var O = 0;O < a;O++) {
- switch(t[O]) {
- case 9:
- p && g && (g.lineTo(q, u), h && h.lineTo(q, u));
- p = !0;
- k = q = D[K++] / 20;
- l = u = D[K++] / 20;
- g && g.moveTo(k, l);
- h && h.moveTo(k, l);
- break;
- case 10:
- k = D[K++] / 20;
- l = D[K++] / 20;
- g && g.lineTo(k, l);
- h && h.lineTo(k, l);
- break;
- case 11:
- m = D[K++] / 20;
- n = D[K++] / 20;
- k = D[K++] / 20;
- l = D[K++] / 20;
- g && g.quadraticCurveTo(m, n, k, l);
- h && h.quadraticCurveTo(m, n, k, l);
- break;
- case 12:
- m = D[K++] / 20;
- n = D[K++] / 20;
- var S = D[K++] / 20, P = D[K++] / 20, k = D[K++] / 20, l = D[K++] / 20;
- g && g.bezierCurveTo(m, n, S, P, k, l);
- h && h.bezierCurveTo(m, n, S, P, k, l);
- break;
- case 1:
- g = this._createPath(0, e.ColorUtilities.rgbaToCSSStyle(H.readUnsignedInt()), !1, null, k, l);
- break;
- case 3:
- m = this._readBitmap(H, d);
- g = this._createPath(0, m.style, m.smoothImage, null, k, l);
- break;
- case 2:
- g = this._createPath(0, this._readGradient(H, d), !1, null, k, l);
- break;
- case 4:
- g = null;
- break;
- case 5:
- h = e.ColorUtilities.rgbaToCSSStyle(H.readUnsignedInt());
- H.position += 1;
- m = H.readByte();
- n = c.LINE_CAPS_STYLES[H.readByte()];
- S = c.LINE_JOINTS_STYLES[H.readByte()];
- m = new r(D[K++] / 20, m, n, S, H.readByte());
- h = this._createPath(1, h, !1, m, k, l);
- break;
- case 6:
- h = this._createPath(2, this._readGradient(H, d), !1, null, k, l);
- break;
- case 7:
- m = this._readBitmap(H, d);
- h = this._createPath(2, m.style, m.smoothImage, null, k, l);
- break;
- case 8:
- h = null;
- }
- }
- p && g && (g.lineTo(q, u), h && h.lineTo(q, u));
- this._pathData = null;
- b.leaveTimeline("RenderableShape.deserializePaths");
- return f;
- };
- c.prototype._createPath = function(a, b, c, d, e, f) {
- a = new k(a, b, c, d);
- this._paths.push(a);
- a.path.moveTo(e, f);
- return a.path;
- };
- c.prototype._readMatrix = function(a) {
- return new d(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat());
- };
- c.prototype._readGradient = function(a, b) {
- var c = a.readUnsignedByte(), d = 2 * a.readShort() / 255, f = this._readMatrix(a), c = 16 === c ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(d, 0, 0, 0, 0, 1);
- c.setTransform && c.setTransform(f.toSVGMatrix());
- f = a.readUnsignedByte();
- for (d = 0;d < f;d++) {
- var g = a.readUnsignedByte() / 255, h = e.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt());
- c.addColorStop(g, h);
- }
- a.position += 2;
- return c;
- };
- 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};
- };
- c.prototype._renderFallback = function(a) {
- this.fillStyle || (this.fillStyle = e.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.LINE_CAPS_STYLES = ["round", "butt", "square"];
- c.LINE_JOINTS_STYLES = ["round", "bevel", "miter"];
- return c;
- }(c);
- b.RenderableShape = u;
- f = function(a) {
- function c() {
- a.apply(this, arguments);
- this._flags = 7340048;
- this._morphPaths = Object.create(null);
- }
- __extends(c, a);
- c.prototype._deserializePaths = function(a, c, d) {
- b.enterTimeline("RenderableMorphShape.deserializePaths");
- if (this._morphPaths[d]) {
- return this._morphPaths[d];
- }
- var f = this._morphPaths[d] = [], g = null, k = null, l = 0, m = 0, p, q, t = !1, v = 0, F = 0, D = a.commands, H = a.coordinates, K = a.morphCoordinates, O = a.styles, S = a.morphStyles;
- O.position = 0;
- var P = S.position = 0;
- a = a.commandsPosition;
- for (var N = 0;N < a;N++) {
- switch(D[N]) {
- case 9:
- t && g && (g.lineTo(v, F), k && k.lineTo(v, F));
- t = !0;
- l = v = h(H[P], K[P++], d) / 20;
- m = F = h(H[P], K[P++], d) / 20;
- g && g.moveTo(l, m);
- k && k.moveTo(l, m);
- break;
- case 10:
- l = h(H[P], K[P++], d) / 20;
- m = h(H[P], K[P++], d) / 20;
- g && g.lineTo(l, m);
- k && k.lineTo(l, m);
- break;
- case 11:
- p = h(H[P], K[P++], d) / 20;
- q = h(H[P], K[P++], d) / 20;
- l = h(H[P], K[P++], d) / 20;
- m = h(H[P], K[P++], d) / 20;
- g && g.quadraticCurveTo(p, q, l, m);
- k && k.quadraticCurveTo(p, q, l, m);
- break;
- case 12:
- p = h(H[P], K[P++], d) / 20;
- q = h(H[P], K[P++], d) / 20;
- var Q = h(H[P], K[P++], d) / 20, V = h(H[P], K[P++], d) / 20, l = h(H[P], K[P++], d) / 20, m = h(H[P], K[P++], d) / 20;
- g && g.bezierCurveTo(p, q, Q, V, l, m);
- k && k.bezierCurveTo(p, q, Q, V, l, m);
- break;
- case 1:
- g = this._createMorphPath(0, d, e.ColorUtilities.rgbaToCSSStyle(n(O.readUnsignedInt(), S.readUnsignedInt(), d)), !1, null, l, m);
- break;
- case 3:
- p = this._readMorphBitmap(O, S, d, c);
- g = this._createMorphPath(0, d, p.style, p.smoothImage, null, l, m);
- break;
- case 2:
- p = this._readMorphGradient(O, S, d, c);
- g = this._createMorphPath(0, d, p, !1, null, l, m);
- break;
- case 4:
- g = null;
- break;
- case 5:
- p = h(H[P], K[P++], d) / 20;
- k = e.ColorUtilities.rgbaToCSSStyle(n(O.readUnsignedInt(), S.readUnsignedInt(), d));
- O.position += 1;
- q = O.readByte();
- Q = u.LINE_CAPS_STYLES[O.readByte()];
- V = u.LINE_JOINTS_STYLES[O.readByte()];
- p = new r(p, q, Q, V, O.readByte());
- k = this._createMorphPath(1, d, k, !1, p, l, m);
- break;
- case 6:
- p = this._readMorphGradient(O, S, d, c);
- k = this._createMorphPath(2, d, p, !1, null, l, m);
- break;
- case 7:
- p = this._readMorphBitmap(O, S, d, c);
- k = this._createMorphPath(2, d, p.style, p.smoothImage, null, l, m);
- break;
- case 8:
- k = null;
- }
- }
- t && g && (g.lineTo(v, F), k && k.lineTo(v, F));
- b.leaveTimeline("RenderableMorphShape.deserializPaths");
- return f;
- };
- c.prototype._createMorphPath = function(a, b, c, d, e, f, g) {
- a = new k(a, c, d, e);
- this._morphPaths[b].push(a);
- a.path.moveTo(f, g);
- return a.path;
- };
- c.prototype._readMorphMatrix = function(a, b, c) {
- return new d(h(a.readFloat(), b.readFloat(), c), h(a.readFloat(), b.readFloat(), c), h(a.readFloat(), b.readFloat(), c), h(a.readFloat(), b.readFloat(), c), h(a.readFloat(), b.readFloat(), c), h(a.readFloat(), b.readFloat(), c));
- };
- c.prototype._readMorphGradient = function(a, b, c, d) {
- var f = a.readUnsignedByte(), g = 2 * a.readShort() / 255, k = this._readMorphMatrix(a, b, c);
- d = 16 === f ? d.createLinearGradient(-1, 0, 1, 0) : d.createRadialGradient(g, 0, 0, 0, 0, 1);
- d.setTransform && d.setTransform(k.toSVGMatrix());
- k = a.readUnsignedByte();
- for (f = 0;f < k;f++) {
- var g = h(a.readUnsignedByte() / 255, b.readUnsignedByte() / 255, c), l = n(a.readUnsignedInt(), b.readUnsignedInt(), c), l = e.ColorUtilities.rgbaToCSSStyle(l);
- d.addColorStop(g, l);
- }
- a.position += 2;
- return d;
- };
- 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();
- d = d.createPattern(this._textures[e]._canvas, c);
- d.setTransform(b.toSVGMatrix());
- return {style:d, smoothImage:a};
- };
- return c;
- }(u);
- b.RenderableMorphShape = f;
- var q = function() {
- function a() {
- this.align = this.leading = this.descent = this.ascent = this.width = this.y = this.x = 0;
- this.runs = [];
- }
- a._getMeasureContext = function() {
- a._measureContext || (a._measureContext = document.createElement("canvas").getContext("2d"));
- return a._measureContext;
- };
- a.prototype.addRun = function(b, c, d, e, f) {
- if (d) {
- var h = a._getMeasureContext();
- h.font = b;
- h = t(h, d, e);
- this.runs.push(new g(b, c, d, h, e, f));
- this.width += h;
- }
- };
- a.prototype.wrap = function(b) {
- var c = [this], d = this.runs, e = this;
- e.width = 0;
- e.runs = [];
- for (var f = a._getMeasureContext(), h = 0;h < d.length;h++) {
- var k = d[h], l = k.text;
- k.text = "";
- k.width = 0;
- f.font = k.font;
- for (var m = b, n = l.split(/[\s.-]/), r = 0, q = 0;q < n.length;q++) {
- var u = n[q], F = l.substr(r, u.length + 1), D = k.letterSpacing, H = t(f, F, D);
- if (H > m) {
- do {
- if (k.text && (e.runs.push(k), e.width += k.width, k = new g(k.font, k.fillStyle, "", 0, k.letterSpacing, k.underline), m = new a, m.y = e.y + e.descent + e.leading + e.ascent | 0, m.ascent = e.ascent, m.descent = e.descent, m.leading = e.leading, m.align = e.align, c.push(m), e = m), m = b - H, 0 > m) {
- for (var K = F.length, O = F;1 < K && !(K--, O = F.substr(0, K), H = t(f, O, D), H <= b);) {
- }
- k.text = O;
- k.width = H;
- F = F.substr(K);
- H = t(f, F, D);
- }
- } while (F && 0 > m);
- } else {
- m -= H;
- }
- k.text += F;
- k.width += H;
- r += u.length + 1;
- }
- e.runs.push(k);
- e.width += k.width;
- }
- return c;
- };
- a.prototype.toString = function() {
- return "TextLine {x: " + this.x + ", y: " + this.y + ", width: " + this.width + ", height: " + (this.ascent + this.descent + this.leading) + "}";
- };
- return a;
- }();
- b.TextLine = q;
- var g = function() {
- return function(a, b, c, d, e, f) {
- void 0 === a && (a = "");
- void 0 === b && (b = "");
- void 0 === c && (c = "");
- void 0 === d && (d = 0);
- void 0 === e && (e = 0);
- void 0 === f && (f = !1);
- this.font = a;
- this.fillStyle = b;
- this.text = c;
- this.width = d;
- this.letterSpacing = e;
- this.underline = f;
- };
- }();
- b.TextRun = g;
- f = function(a) {
- function c(b) {
- a.call(this);
- this._flags = 1048592;
- this.properties = {};
- this._textBounds = b.clone();
- this._textRunData = null;
- this._plainText = "";
- this._borderColor = this._backgroundColor = 0;
- this._matrix = d.createIdentity();
- this._coords = null;
- this._scrollV = 1;
- this._scrollH = 0;
- this.textRect = b.clone();
- this.lines = [];
- this.setBounds(b);
- }
- __extends(c, a);
- c.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);
- };
- c.prototype.setContent = function(a, b, c, d) {
- this._textRunData = b;
- this._plainText = a;
- this._matrix.set(c);
- this._coords = d;
- this.lines = [];
- };
- c.prototype.setStyle = function(a, b, c, d) {
- this._backgroundColor = a;
- this._borderColor = b;
- this._scrollV = c;
- this._scrollH = d;
- };
- c.prototype.reflow = function(a, c) {
- var d = this._textRunData;
- if (d) {
- var f = this._bounds, g = f.w - 4, h = this._plainText, k = this.lines, l = new q, m = 0, n = 0, p = 0, r = 0, u = -4294967295, t = -1;
- for (b.enterTimeline("RenderableText.reflow");d.position < d.length;) {
- var v = d.readInt(), K = d.readInt(), O = d.readInt(), S = d.readUTF(), P = d.readInt(), N = d.readInt(), Q = d.readInt();
- P > p && (p = P);
- N > r && (r = N);
- Q > u && (u = Q);
- P = d.readBoolean();
- N = "";
- d.readBoolean() && (N += "italic ");
- P && (N += "bold ");
- O = N + O + "px " + S + ", AdobeBlank";
- S = d.readInt();
- S = e.ColorUtilities.rgbToHex(S);
- P = d.readInt();
- -1 === t && (t = P);
- d.readBoolean();
- d.readInt();
- d.readInt();
- d.readInt();
- P = d.readInt();
- d.readInt();
- for (var N = d.readBoolean(), V = "", Q = !1;!Q;v++) {
- var Q = v >= K - 1, W = h[v];
- if ("\r" !== W && "\n" !== W && (V += W, v < h.length - 1)) {
- continue;
- }
- l.addRun(O, S, V, P, N);
- if (l.runs.length) {
- k.length && (m += u);
- m += p;
- l.y = m | 0;
- m += r;
- l.ascent = p;
- l.descent = r;
- l.leading = u;
- l.align = t;
- if (c && l.width > g) {
- for (l = l.wrap(g), V = 0;V < l.length;V++) {
- var R = l[V], m = R.y + R.descent + R.leading;
- k.push(R);
- R.width > n && (n = R.width);
- }
- } else {
- k.push(l), l.width > n && (n = l.width);
- }
- l = new q;
- } else {
- m += p + r + u;
- }
- V = "";
- if (Q) {
- r = p = 0;
- u = -4294967295;
- t = -1;
- break;
- }
- "\r" === W && "\n" === h[v + 1] && v++;
- }
- l.addRun(O, S, V, P, N);
- }
- d = h[h.length - 1];
- "\r" !== d && "\n" !== d || k.push(l);
- d = this.textRect;
- d.w = n;
- d.h = m;
- if (a) {
- if (!c) {
- g = n;
- n = f.w;
- switch(a) {
- case 1:
- d.x = n - (g + 4) >> 1;
- break;
- case 3:
- d.x = n - (g + 4);
- }
- this._textBounds.setElements(d.x - 2, d.y - 2, d.w + 4, d.h + 4);
- f.w = g + 4;
- }
- f.x = d.x - 2;
- f.h = m + 4;
- } else {
- this._textBounds = f;
- }
- for (v = 0;v < k.length;v++) {
- if (f = k[v], f.width < g) {
- switch(f.align) {
- case 1:
- f.x = g - f.width | 0;
- break;
- case 2:
- f.x = (g - f.width) / 2 | 0;
- }
- }
- }
- this.invalidate();
- b.leaveTimeline("RenderableText.reflow");
- }
- };
- 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;
- }
- };
- c.prototype.render = function(a) {
- b.enterTimeline("RenderableText.render");
- a.save();
- var f = this._textBounds;
- this._backgroundColor && (a.fillStyle = e.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(f.x, f.y, f.w, f.h));
- if (this._borderColor) {
- a.strokeStyle = e.ColorUtilities.rgbaToCSSStyle(this._borderColor);
- a.lineCap = "square";
- a.lineWidth = 1;
- var g = c.absoluteBoundPoints, h = a.currentTransform;
- h ? (f = f.clone(), (new d(h.a, h.b, h.c, h.d, h.e, h.f)).transformRectangle(f, g), a.setTransform(1, 0, 0, 1, 0, 0)) : (g[0].x = f.x, g[0].y = f.y, g[1].x = f.x + f.w, g[1].y = f.y, g[2].x = f.x + f.w, g[2].y = f.y + f.h, g[3].x = f.x, g[3].y = f.y + f.h);
- c.roundBoundPoints(g);
- f = new Path2D;
- f.moveTo(g[0].x, g[0].y);
- f.lineTo(g[1].x, g[1].y);
- f.lineTo(g[2].x, g[2].y);
- f.lineTo(g[3].x, g[3].y);
- f.lineTo(g[0].x, g[0].y);
- a.stroke(f);
- h && a.setTransform(h.a, h.b, h.c, h.d, h.e, h.f);
- }
- this._coords ? this._renderChars(a) : this._renderLines(a);
- a.restore();
- b.leaveTimeline("RenderableText.render");
- };
- 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);
- }
- var b = this.lines, c = this._coords;
- c.position = 0;
- for (var d = "", e = "", f = 0;f < b.length;f++) {
- for (var g = b[f].runs, h = 0;h < g.length;h++) {
- var k = g[h];
- k.font !== d && (a.font = d = k.font);
- k.fillStyle !== e && (a.fillStyle = e = k.fillStyle);
- for (var k = k.text, l = 0;l < k.length;l++) {
- var m = c.readInt() / 20, n = c.readInt() / 20;
- a.fillText(k[l], m, n);
- }
- }
- }
- };
- 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);
- var c = this.lines, d = this._scrollV, e = 0, f = "", g = "";
- a.textAlign = "left";
- a.textBaseline = "alphabetic";
- for (var h = 0;h < c.length;h++) {
- var k = c[h], l = k.x, m = k.y;
- if (h + 1 < d) {
- e = m + k.descent + k.leading;
- } else {
- m -= e;
- if (h + 1 - d && m > b.h) {
- break;
- }
- for (var n = k.runs, p = 0;p < n.length;p++) {
- var r = n[p];
- r.font !== f && (a.font = f = r.font);
- r.fillStyle !== g && (a.fillStyle = g = r.fillStyle);
- r.underline && a.fillRect(l, m + k.descent / 2 | 0, r.width, 1);
- a.textAlign = "left";
- a.textBaseline = "alphabetic";
- if (0 < r.letterSpacing) {
- for (var q = r.text, u = 0;u < q.length;u++) {
- a.fillText(q[u], l, m), l += t(a, q[u], r.letterSpacing);
- }
- } else {
- a.fillText(r.text, l, m), l += r.width;
- }
- }
- }
- }
- };
- c.absoluteBoundPoints = [new m(0, 0), new m(0, 0), new m(0, 0), new m(0, 0)];
- return c;
- }(c);
- b.RenderableText = f;
- c = function(a) {
- function b(c, d) {
- a.call(this);
- this._flags = 3145728;
- this.properties = {};
- this.setBounds(new l(0, 0, c, d));
- }
- __extends(b, a);
- Object.defineProperty(b.prototype, "text", {get:function() {
- return this._text;
- }, set:function(a) {
- this._text = a;
- }, enumerable:!0, configurable:!0});
- b.prototype.render = function(a, b, c) {
- a.save();
- a.textBaseline = "top";
- a.fillStyle = "white";
- a.fillText(this.text, 0, 0);
- a.restore();
- };
- return b;
- }(c);
- b.Label = c;
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- function h(b, a, c, e, h) {
- a = m[a - 1];
- h && (h = a / 4, c -= h, e -= h);
- h = Math.ceil((1 > c ? 1 : c) / (a - 1E-9));
- a = Math.ceil((1 > e ? 1 : e) / (a - 1E-9));
- b.x -= h;
- b.w += 2 * h;
- b.y -= a;
- b.h += 2 * a;
- }
- var n = e.ColorUtilities.clampByte, t = function() {
- function b() {
- }
- b.prototype.expandBounds = function(a) {
- };
- return b;
- }();
- b.Filter = t;
- var m = [2, 1 / 1.05, 1 / 1.35, 1 / 1.55, 1 / 1.75, 1 / 1.9, .5, 1 / 2.1, 1 / 2.2, 1 / 2.3, .4, 1 / 3, 1 / 3, 1 / 3.5, 1 / 3.5], l = function(b) {
- function a(a, e, h) {
- b.call(this);
- this.blurX = a;
- this.blurY = e;
- this.quality = h;
- }
- __extends(a, b);
- a.prototype.expandBounds = function(a) {
- h(a, this.quality, this.blurX, this.blurY, !0);
- };
- return a;
- }(t);
- b.BlurFilter = l;
- l = function(b) {
- function a(a, e, h, l, m, n, g, p, t, z, B) {
- b.call(this);
- this.alpha = a;
- this.angle = e;
- this.blurX = h;
- this.blurY = l;
- this.color = m;
- this.distance = n;
- this.hideObject = g;
- this.inner = p;
- this.knockout = t;
- this.quality = z;
- this.strength = B;
- }
- __extends(a, b);
- a.prototype.expandBounds = function(a) {
- if (!this.inner && (h(a, this.quality, this.blurX, this.blurY, !1), this.distance)) {
- var b = this.angle * Math.PI / 180, d = Math.cos(b) * this.distance, e = Math.sin(b) * this.distance, b = a.x + (0 <= d ? 0 : Math.floor(d)), d = a.x + a.w + Math.ceil(Math.abs(d)), l = a.y + (0 <= e ? 0 : Math.floor(e)), e = a.y + a.h + Math.ceil(Math.abs(e));
- a.x = b;
- a.w = d - b;
- a.y = l;
- a.h = e - l;
- }
- };
- return a;
- }(t);
- b.DropshadowFilter = l;
- l = function(b) {
- function a(a, e, h, l, m, n, g, p) {
- b.call(this);
- this.alpha = a;
- this.blurX = e;
- this.blurY = h;
- this.color = l;
- this.inner = m;
- this.knockout = n;
- this.quality = g;
- this.strength = p;
- }
- __extends(a, b);
- a.prototype.expandBounds = function(a) {
- this.inner || h(a, this.quality, this.blurX, this.blurY, !1);
- };
- return a;
- }(t);
- b.GlowFilter = l;
- (function(b) {
- b[b.Unknown = 0] = "Unknown";
- b[b.Identity = 1] = "Identity";
- })(b.ColorMatrixType || (b.ColorMatrixType = {}));
- t = function(b) {
- function a(a) {
- b.call(this);
- this._data = new Float32Array(a);
- this._type = 0;
- }
- __extends(a, b);
- a.prototype.clone = function() {
- var b = new a(this._data);
- b._type = this._type;
- return b;
- };
- a.prototype.set = function(a) {
- this._data.set(a._data);
- this._type = a._type;
- };
- a.prototype.toWebGLMatrix = function() {
- return new Float32Array(this._data);
- };
- a.prototype.asWebGLMatrix = function() {
- return this._data.subarray(0, 16);
- };
- a.prototype.asWebGLVector = function() {
- return this._data.subarray(16, 20);
- };
- a.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];
- };
- a.createIdentity = function() {
- var b = new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]);
- b._type = 1;
- return b;
- };
- a.prototype.setMultipliersAndOffsets = function(a, b, d, e, h, l, g, m) {
- for (var n = this._data, t = 0;t < n.length;t++) {
- n[t] = 0;
- }
- n[0] = a;
- n[5] = b;
- n[10] = d;
- n[15] = e;
- n[16] = h / 255;
- n[17] = l / 255;
- n[18] = g / 255;
- n[19] = m / 255;
- this._type = 0;
- };
- a.prototype.transformRGBA = function(a) {
- var b = a >> 24 & 255, d = a >> 16 & 255, e = a >> 8 & 255, h = a & 255, l = this._data;
- a = n(b * l[0] + d * l[1] + e * l[2] + h * l[3] + 255 * l[16]);
- var g = n(b * l[4] + d * l[5] + e * l[6] + h * l[7] + 255 * l[17]), m = n(b * l[8] + d * l[9] + e * l[10] + h * l[11] + 255 * l[18]), b = n(b * l[12] + d * l[13] + e * l[14] + h * l[15] + 255 * l[19]);
- return a << 24 | g << 16 | m << 8 | b;
- };
- a.prototype.multiply = function(a) {
- if (!(a._type & 1)) {
- var b = this._data, d = a._data;
- a = b[0];
- var e = b[1], h = b[2], l = b[3], g = b[4], m = b[5], n = b[6], t = b[7], B = b[8], E = b[9], A = b[10], G = b[11], w = b[12], y = b[13], C = b[14], x = b[15], M = b[16], I = b[17], J = b[18], F = b[19], D = d[0], H = d[1], K = d[2], O = d[3], S = d[4], P = d[5], N = d[6], Q = d[7], V = d[8], W = d[9], R = d[10], L = d[11], U = d[12], aa = d[13], X = d[14], T = d[15], ca = d[16], ba = d[17], Z = d[18], d = d[19];
- b[0] = a * D + g * H + B * K + w * O;
- b[1] = e * D + m * H + E * K + y * O;
- b[2] = h * D + n * H + A * K + C * O;
- b[3] = l * D + t * H + G * K + x * O;
- b[4] = a * S + g * P + B * N + w * Q;
- b[5] = e * S + m * P + E * N + y * Q;
- b[6] = h * S + n * P + A * N + C * Q;
- b[7] = l * S + t * P + G * N + x * Q;
- b[8] = a * V + g * W + B * R + w * L;
- b[9] = e * V + m * W + E * R + y * L;
- b[10] = h * V + n * W + A * R + C * L;
- b[11] = l * V + t * W + G * R + x * L;
- b[12] = a * U + g * aa + B * X + w * T;
- b[13] = e * U + m * aa + E * X + y * T;
- b[14] = h * U + n * aa + A * X + C * T;
- b[15] = l * U + t * aa + G * X + x * T;
- b[16] = a * ca + g * ba + B * Z + w * d + M;
- b[17] = e * ca + m * ba + E * Z + y * d + I;
- b[18] = h * ca + n * ba + A * Z + C * d + J;
- b[19] = l * ca + t * ba + G * Z + x * d + F;
- this._type = 0;
- }
- };
- Object.defineProperty(a.prototype, "alphaMultiplier", {get:function() {
- return this._data[15];
- }, enumerable:!0, configurable:!0});
- a.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];
- };
- a.prototype.equals = function(a) {
- if (!a) {
- return !1;
- }
- if (this._type === a._type && 1 === this._type) {
- return !0;
- }
- var b = this._data;
- a = a._data;
- for (var d = 0;20 > d;d++) {
- if (.001 < Math.abs(b[d] - a[d])) {
- return !1;
- }
- }
- return !0;
- };
- a.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 a;
- }(t);
- b.ColorMatrix = t;
- })(e.GFX || (e.GFX = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- b.timelineBuffer = new e.Tools.Profiler.TimelineBuffer("Player");
- b.counter = new e.Metrics.Counter(!1);
- b.writer = null;
- b.enterTimeline = function(e, n) {
- b.writer && b.writer.enter(e);
- };
- b.leaveTimeline = function(e, n) {
- b.writer && b.writer.leave(e);
- };
- })(e.Player || (e.Player = {}));
-})(Shumway || (Shumway = {}));
-var Shumway$$inline_370 = Shumway || (Shumway = {});
-Shumway$$inline_370.playerOptions = Shumway$$inline_370.Settings.shumwayOptions.register(new Shumway$$inline_370.Options.OptionSet("Player Options"));
-Shumway$$inline_370.frameEnabledOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("enableFrames", "Enable Frame Execution", "boolean", !0, "Enable frame execution."));
-Shumway$$inline_370.timerEnabledOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("enableTimers", "Enable Timers", "boolean", !0, "Enable timer events."));
-Shumway$$inline_370.pumpEnabledOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("enablePump", "Enable Pump", "boolean", !0, "Enable display tree serialization."));
-Shumway$$inline_370.pumpRateOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.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_370.frameRateOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("frameRate", "Frame Rate", "number", -1, "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_370.tracePlayerOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("tp", "Trace Player", "number", 0, "Trace player every n frames.", {range:{min:0, max:512, step:1}}));
-Shumway$$inline_370.traceMouseEventOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("tme", "Trace Mouse Events", "boolean", !1, "Trace mouse events."));
-Shumway$$inline_370.frameRateMultiplierOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("", "Frame Rate Multiplier", "number", 1, "Play frames at a faster rate.", {range:{min:1, max:16, step:1}}));
-Shumway$$inline_370.dontSkipFramesOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("", "Disables Frame Skipping", "boolean", !1, "Play all frames, e.g. no skipping frame during throttle."));
-Shumway$$inline_370.playAllSymbolsOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("", "Play Symbols", "boolean", !1, "Plays all SWF symbols automatically."));
-Shumway$$inline_370.playSymbolOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("", "Play Symbol Number", "number", 0, "Select symbol by Id.", {range:{min:0, max:2E4, step:1}}));
-Shumway$$inline_370.playSymbolFrameDurationOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.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_370.playSymbolCountOption = Shumway$$inline_370.playerOptions.register(new Shumway$$inline_370.Options.Option("", "Play Symbol Count", "number", -1, "Select symbol count.", {range:{min:-1, max:2E4, step:1}}));
-(function(e) {
- var b = function() {
- function b() {
- this._expectedNextFrameAt = performance.now();
- this._drawStats = [];
- this._drawsSkipped = this._drawStarted = this._drawStatsSum = 0;
- this._expectedNextFrameAt = performance.now();
- this._onTime = !0;
- this._trackDelta = !1;
- this._onTimeDelta = this._delta = 0;
- }
- Object.defineProperty(b.prototype, "shallSkipDraw", {get:function() {
- if (this._drawsSkipped >= b.MAX_DRAWS_TO_SKIP) {
- return !1;
- }
- var e = this._drawStats.length < b.STATS_TO_REMEMBER ? 0 : this._drawStatsSum / this._drawStats.length;
- return performance.now() + e + b.INTERVAL_PADDING_MS > this._expectedNextFrameAt;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "nextFrameIn", {get:function() {
- return Math.max(0, this._expectedNextFrameAt - performance.now());
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(b.prototype, "isOnTime", {get:function() {
- return this._onTime;
- }, enumerable:!0, configurable:!0});
- b.prototype.startFrame = function(e) {
- var t = e = 1E3 / e, m = this._onTimeDelta + this._delta;
- 0 !== m && (0 > m ? t *= b.SPEED_ADJUST_RATE : 0 < m && (t /= b.SPEED_ADJUST_RATE), this._onTimeDelta += e - t);
- this._expectedNextFrameAt += t;
- this._onTime = !0;
- };
- b.prototype.endFrame = function() {
- var e = performance.now() + b.INTERVAL_PADDING_MS;
- e > this._expectedNextFrameAt && (this._trackDelta && (this._onTimeDelta += this._expectedNextFrameAt - e, console.log(this._onTimeDelta)), this._expectedNextFrameAt = e, this._onTime = !1);
- };
- b.prototype.startDraw = function() {
- this._drawsSkipped = 0;
- this._drawStarted = performance.now();
- };
- b.prototype.endDraw = function() {
- var e = performance.now() - this._drawStarted;
- this._drawStats.push(e);
- for (this._drawStatsSum += e;this._drawStats.length > b.STATS_TO_REMEMBER;) {
- this._drawStatsSum -= this._drawStats.shift();
- }
- };
- b.prototype.skipDraw = function() {
- this._drawsSkipped++;
- };
- b.prototype.setDelta = function(b) {
- this._trackDelta && (this._delta = b);
- };
- b.prototype.startTrackDelta = function() {
- this._trackDelta = !0;
- };
- b.prototype.endTrackDelta = function() {
- this._trackDelta && (this._trackDelta = !1, this._onTimeDelta = this._delta = 0);
- };
- b.STATS_TO_REMEMBER = 50;
- b.MAX_DRAWS_TO_SKIP = 2;
- b.INTERVAL_PADDING_MS = 4;
- b.SPEED_ADJUST_RATE = .9;
- return b;
- }();
- e.FrameScheduler = b;
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(b) {
- var n = e.AVMX.AS.flash, t = n.display.DisplayObjectFlags, m = n.display.BlendMode, l = n.display.PixelSnapping, d = e.Bounds, a = n.ui.MouseCursor, c = e.Player.writer, f = function() {
- function b() {
- this.phase = 0;
- this.roots = null;
- }
- b.prototype.begin = function(a) {
- this.roots = [a];
- };
- b.prototype.remoteObjects = function() {
- this.phase = 0;
- for (var a = this.roots, b = 0;b < a.length;b++) {
- e.Player.enterTimeline("remoting objects"), this.writeDirtyDisplayObjects(a[b]), e.Player.leaveTimeline("remoting objects");
- }
- };
- b.prototype.remoteReferences = function() {
- this.phase = 1;
- for (var a = this.roots, b = 0;b < a.length;b++) {
- e.Player.enterTimeline("remoting references"), this.writeDirtyDisplayObjects(a[b], !0), e.Player.leaveTimeline("remoting references");
- }
- };
- b.prototype.writeDirtyDisplayObjects = function(a, b) {
- void 0 === b && (b = !1);
- var c = this, d = this.roots;
- a.visit(function(a) {
- if (a._hasAnyFlags(t.Dirty) && (c.writeUpdateFrame(a), d && a.mask)) {
- var f = a.mask._findFurthestAncestorOrSelf();
- e.ArrayUtilities.pushUnique(d, f);
- }
- c.writeDirtyAssets(a);
- if (a._hasFlags(536870912)) {
- return 0;
- }
- b && a._removeFlags(536870912);
- return 2;
- }, 0);
- };
- b.prototype.writeStage = function(b, e) {
- c && c.writeLn("Sending Stage");
- this.output.writeInt(104);
- this.output.writeInt(b._id);
- this.output.writeInt(b.color);
- this._writeRectangle(new d(0, 0, 20 * b.stageWidth, 20 * b.stageHeight));
- this.output.writeInt(n.display.StageAlign.toNumber(b.align));
- this.output.writeInt(n.display.StageScaleMode.toNumber(b.scaleMode));
- this.output.writeInt(n.display.StageDisplayState.toNumber(b.displayState));
- var f = b.sec.flash.ui.Mouse.axClass.cursor;
- if (e) {
- if (this.output.writeInt(e._id), f === a.AUTO) {
- var g = e;
- do {
- if (b.sec.flash.display.SimpleButton.axClass.axIsType(g) || b.sec.flash.display.Sprite.axClass.axIsType(g) && g.buttonMode && e.useHandCursor) {
- f = a.BUTTON;
- break;
- }
- g = g._parent;
- } while (g && g !== b);
- }
- } else {
- this.output.writeInt(-1);
- }
- this.output.writeInt(a.toNumber(f));
- };
- b.prototype.writeGraphics = function(a) {
- if (a._isDirty) {
- c && c.writeLn("Sending Graphics: " + a._id);
- for (var b = a._textures, d = b.length, e = 0;e < d;e++) {
- b[e] && this.writeBitmapData(b[e]);
- }
- this.output.writeInt(101);
- this.output.writeInt(a._id);
- this.output.writeInt(-1);
- this._writeRectangle(a._getContentBounds());
- this._writeAsset(a._graphicsData.toPlainObject());
- this.output.writeInt(d);
- for (e = 0;e < d;e++) {
- this.output.writeInt(b[e] ? b[e]._id : -1);
- }
- a._isDirty = !1;
- }
- };
- b.prototype.writeNetStream = function(a, b) {
- a._isDirty && (c && c.writeLn("Sending NetStream: " + a._id), this.output.writeInt(105), this.output.writeInt(a._id), this._writeRectangle(b), a._isDirty = !1);
- };
- b.prototype.writeBitmapData = function(a) {
- a._isDirty && (c && c.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);
- };
- b.prototype.writeTextContent = function(a) {
- if (a.flags & e.TextContentFlags.Dirty) {
- c && c.writeLn("Sending TextContent: " + a._id);
- this.output.writeInt(103);
- this.output.writeInt(a._id);
- this.output.writeInt(-1);
- this._writeRectangle(a.bounds);
- var b = a.sec.flash.geom.Matrix.axClass.FROZEN_IDENTITY_MATRIX;
- this._writeMatrix(a.matrix || b);
- this.output.writeInt(a.backgroundColor);
- this.output.writeInt(a.borderColor);
- this.output.writeInt(a.autoSize);
- this.output.writeBoolean(a.wordWrap);
- this.output.writeInt(a.scrollV);
- this.output.writeInt(a.scrollH);
- this._writeAsset(a.plainText);
- this._writeAsset(a.textRunData.toPlainObject());
- if (b = a.coords) {
- var d = b.length;
- this.output.writeInt(d);
- for (var f = 0;f < d;f++) {
- this.output.writeInt(b[f]);
- }
- } else {
- this.output.writeInt(0);
- }
- a.flags &= ~e.TextContentFlags.Dirty;
- }
- };
- b.prototype.writeClippedObjectsCount = function(a) {
- if (0 <= a._clipDepth && a._parent) {
- var b = a._parent.getChildIndex(a);
- a = a._parent.getClipDepthIndex(a._clipDepth);
- if (0 > a - b) {
- this.output.writeInt(-1);
- } else {
- for (var c = b + 1;c <= b;c++) {
- }
- this.output.writeInt(a - b);
- }
- } else {
- this.output.writeInt(-1);
- }
- };
- b.prototype.writeUpdateFrame = function(a) {
- this.output.writeInt(100);
- this.output.writeInt(a._id);
- c && c.writeLn("Sending UpdateFrame: " + a.debugName(!0));
- var b = !1, d = a._hasFlags(1048576), e = a._hasFlags(67108864), f = a._hasFlags(1073741824), h = null;
- a.sec.flash.media.Video.axClass.axIsType(a) && (h = a);
- var k = !1;
- 1 === this.phase && (k = a._hasAnyFlags(65011712), b = a._hasFlags(134217728));
- var n = null;
- a.sec.flash.display.Bitmap.axClass.axIsType(a) && (n = a);
- var E = a._hasFlags(268435456), A;
- A = 0 | (d ? 1 : 0) | (e ? 8 : 0);
- A |= b ? 64 : 0;
- A |= E ? 128 : 0;
- A |= f ? 32 : 0;
- A |= k ? 4 : 0;
- this.output.writeInt(A);
- d && this._writeMatrix(a._getMatrix());
- e && this._writeColorTransform(a._colorTransform);
- b && this.output.writeInt(a.mask ? a.mask._id : -1);
- E && this.writeClippedObjectsCount(a);
- f && (this.output.writeInt(a._ratio), this.output.writeInt(m.toNumber(a._blendMode)), this._writeFilters(a._filters), this.output.writeBoolean(a._hasFlags(1)), this.output.writeBoolean(a.cacheAsBitmap), n ? (this.output.writeInt(l.toNumber(n.pixelSnapping)), this.output.writeInt(n.smoothing ? 1 : 0)) : (this.output.writeInt(l.toNumber(l.AUTO)), this.output.writeInt(1)));
- b = a._getGraphics();
- d = a._getTextContent();
- if (k) {
- c && c.enter("Children: {");
- if (n) {
- n.bitmapData ? (this.output.writeInt(1), this.output.writeInt(134217728 | n.bitmapData._id)) : this.output.writeInt(0);
- } else {
- if (h) {
- h._netStream ? (this.output.writeInt(1), this.output.writeInt(134217728 | h._netStream._id)) : this.output.writeInt(0);
- } else {
- if (k = b || d ? 1 : 0, (h = a._children) && (k += h.length), this.output.writeInt(k), b ? (c && c.writeLn("Reference Graphics: " + b._id), this.output.writeInt(134217728 | b._id)) : d && (c && c.writeLn("Reference TextContent: " + d._id), this.output.writeInt(134217728 | d._id)), h) {
- for (k = 0;k < h.length;k++) {
- c && c.writeLn("Reference DisplayObject: " + h[k].debugName()), this.output.writeInt(h[k]._id), 0 <= h[k]._clipDepth && h[k]._setFlags(268435456);
- }
- }
- }
- }
- c && c.leave("}");
- }
- 1 === this.phase && a._removeFlags(t.Dirty);
- };
- b.prototype.writeDirtyAssets = function(a) {
- var b = a._getGraphics();
- b ? this.writeGraphics(b) : (b = a._getTextContent()) ? this.writeTextContent(b) : (b = null, a.sec.flash.display.Bitmap.axClass.axIsType(a) ? (b = a, b.bitmapData && this.writeBitmapData(b.bitmapData)) : (b = null, a.sec.flash.media.Video.axClass.axIsType(a) && (b = a, b._netStream && this.writeNetStream(b._netStream, b._getContentBounds()))));
- };
- b.prototype.writeDrawToBitmap = function(a, b, c, e, f, h, k) {
- void 0 === c && (c = null);
- void 0 === e && (e = null);
- void 0 === f && (f = null);
- void 0 === h && (h = null);
- void 0 === k && (k = !1);
- this.output.writeInt(200);
- this.output.writeInt(a._id);
- a.sec.flash.display.BitmapData.axClass.axIsType(b) ? this.output.writeInt(134217728 | b._id) : this.output.writeInt(b._id);
- a = 0 | (c ? 1 : 0) | (e ? 8 : 0);
- a |= h ? 16 : 0;
- this.output.writeInt(a);
- c && this._writeMatrix(c);
- e && this._writeColorTransform(e);
- h && this._writeRectangle(d.FromRectangle(h));
- this.output.writeInt(m.toNumber(f));
- this.output.writeBoolean(k);
- };
- b.prototype._writeMatrix = function(a) {
- this.output.write6Floats(a.a, a.b, a.c, a.d, a.tx, a.ty);
- };
- b.prototype._writeRectangle = function(a) {
- this.output.write4Ints(a.xMin, a.yMin, a.width, a.height);
- };
- b.prototype._writeAsset = function(a) {
- this.output.writeInt(this.outputAssets.length);
- this.outputAssets.push(a);
- };
- b.prototype._writeFilters = function(a) {
- if (a && 0 !== a.length) {
- for (var b = a[0].sec, c = 0, d = b.flash.filters.BlurFilter.axClass, f = b.flash.filters.DropShadowFilter.axClass, h = b.flash.filters.GlowFilter.axClass, b = b.flash.filters.ColorMatrixFilter.axClass, k = 0;k < a.length;k++) {
- d.axIsType(a[k]) || f.axIsType(a[k]) || h.axIsType(a[k]) || b.axIsType(a[k]) ? c++ : e.Debug.somewhatImplemented(a[k].toString());
- }
- this.output.writeInt(c);
- for (k = 0;k < a.length;k++) {
- if (c = a[k], d.axIsType(c)) {
- this.output.writeInt(0), this.output.writeFloat(c.blurX), this.output.writeFloat(c.blurY), this.output.writeInt(c.quality);
- } else {
- if (f.axIsType(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);
- } else {
- if (h.axIsType(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);
- } else {
- if (b.axIsType(c)) {
- c = c.matrix.value;
- this.output.writeInt(2);
- for (var l = 0;20 > l;l++) {
- this.output.writeFloat(c[l]);
- }
- }
- }
- }
- }
- }
- } else {
- this.output.writeInt(0);
- }
- };
- b.prototype._writeColorTransform = function(a) {
- var b = this.output, c = a.redMultiplier, d = a.greenMultiplier, e = a.blueMultiplier, f = a.alphaMultiplier, h = a.redOffset, k = a.greenOffset, l = a.blueOffset;
- a = a.alphaOffset;
- h === k && k === l && l === a && 0 === a && c === d && d === e && 1 === e ? 1 === f ? b.writeInt(0) : (b.writeInt(1), b.writeFloat(f)) : (b.writeInt(2), b.writeFloat(c), b.writeFloat(d), b.writeFloat(e), b.writeFloat(f), b.writeInt(h), b.writeInt(k), b.writeInt(l), b.writeInt(a));
- };
- b.prototype.writeRequestBitmapData = function(a) {
- c && c.writeLn("Sending BitmapData Request");
- this.output.writeInt(106);
- this.output.writeInt(a._id);
- };
- return b;
- }();
- b.PlayerChannelSerializer = f;
- f = function() {
- function a(b, c, d) {
- this.sec = b;
- this.input = c;
- this.inputAssets = d;
- }
- a.prototype.read = function() {
- switch(this.input.readInt()) {
- case 300:
- return this._readMouseEvent();
- case 301:
- return this._readKeyboardEvent();
- case 302:
- return this._readFocusEvent();
- }
- };
- a.prototype._readFocusEvent = function() {
- return {tag:302, type:this.input.readInt()};
- };
- a.prototype._readMouseEvent = function() {
- var a = this.input, b = a.readInt(), b = e.Remoting.MouseEventNames[b], c = a.readFloat(), d = a.readFloat(), f = a.readInt(), a = a.readInt();
- return {tag:300, type:b, point:new this.sec.flash.geom.Point(c, d), ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4), buttons:f};
- };
- a.prototype._readKeyboardEvent = function() {
- var a = this.input, b = a.readInt(), b = e.Remoting.KeyboardEventNames[b], c = a.readInt(), d = a.readInt(), f = a.readInt(), a = a.readInt();
- return {tag:301, type:b, keyCode:c, charCode:d, location:f, ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4)};
- };
- return a;
- }();
- b.PlayerChannelDeserializer = f;
- })(b.Player || (b.Player = {}));
- })(e.Remoting || (e.Remoting = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- var h = e.Debug.somewhatImplemented, n = e.AVMX.AS.flash, t = e.ArrayUtilities.DataBuffer, m = n.events.Event, l = n.ui.MouseEventDispatcher, d = n.ui.KeyboardEventDispatcher, a = function() {
- function a(b) {
- this._observers = [];
- this.sec = b;
- }
- a.prototype.addObserver = function(a) {
- this._observers.push(a);
- };
- a.prototype.removeObserver = function(a) {
- a = this._observers.indexOf(a);
- 0 <= a && this._observers.splice(a, 1);
- };
- a.prototype.update = function(a, b) {
- throw Error("This method is abstract");
- };
- a.prototype.updateAndGet = function(a, b) {
- throw Error("This method is abstract");
- };
- a.prototype.frame = function() {
- throw Error("This method is abstract");
- };
- a.prototype.videoControl = function(a, b, c) {
- throw Error("This method is abstract");
- };
- a.prototype.registerFont = function(a, b) {
- throw Error("This method is abstract");
- };
- a.prototype.registerImage = function(a, b, c, d, e) {
- throw Error("This method is abstract");
- };
- a.prototype.fscommand = function(a, b) {
- throw Error("This method is abstract");
- };
- a.prototype.processUpdates = function(a, b) {
- var c = (new e.Remoting.Player.PlayerChannelDeserializer(this.sec, a, b)).read();
- switch(c.tag) {
- case 301:
- this._observers.forEach(function(a) {
- a.keyboardEvent(c);
- });
- break;
- case 300:
- this._observers.forEach(function(a) {
- a.mouseEvent(c);
- });
- break;
- case 302:
- this._observers.forEach(function(a) {
- a.focusEvent(c);
- });
- }
- };
- a.prototype.processDisplayParameters = function(a) {
- this._observers.forEach(function(b) {
- b.displayParameters(a);
- });
- };
- a.prototype.processVideoEvent = function(a, b, c) {
- this._observers.forEach(function(d) {
- d.videoEvent(a, b, c);
- });
- };
- return a;
- }();
- b.GFXServiceBase = a;
- var c = function() {
- function a(b) {
- this._videoEventListeners = [];
- this._player = b;
- this._keyboardEventDispatcher = new d;
- this._mouseEventDispatcher = new l;
- this._writer = new e.IndentingWriter;
- }
- a.prototype.videoEvent = function(a, b, c) {
- a = this._videoEventListeners[a];
- e.Debug.assert(a, "Video event listener is not found");
- a(b, c);
- };
- a.prototype.displayParameters = function(a) {
- this._player._stage.setStageContainerSize(a.stageWidth, a.stageHeight, a.pixelRatio);
- };
- a.prototype.focusEvent = function(a) {
- switch(a.type) {
- case 0:
- this._player._isPageVisible = !1;
- break;
- case 1:
- this._player._isPageVisible = !0;
- break;
- case 2:
- this._player._hasFocus = !1;
- break;
- case 3:
- this._player.sec.flash.events.EventDispatcher.axClass.broadcastEventDispatchQueue.dispatchEvent(this._player.sec.flash.events.Event.axClass.getBroadcastInstance(m.ACTIVATE)), this._player._hasFocus = !0;
- }
- };
- a.prototype.keyboardEvent = function(a) {
- this._keyboardEventDispatcher.target = this._player._stage.focus ? this._player._stage.focus : this._player._stage;
- this._keyboardEventDispatcher.dispatchKeyboardEvent(a);
- };
- a.prototype.mouseEvent = function(a) {
- this._mouseEventDispatcher.stage = this._player._stage;
- var b = this._mouseEventDispatcher.handleMouseEvent(a);
- e.traceMouseEventOption.value && (this._writer.writeLn("Mouse Event: type: " + a.type + ", point: " + a.point + ", target: " + b + (b ? ", name: " + b._name : "")), "click" === a.type && b && b.debugTrace());
- this._player._currentMouseTarget = this._mouseEventDispatcher.currentTarget;
- };
- a.prototype.registerEventListener = function(a, b) {
- this._videoEventListeners[a] = b;
- };
- return a;
- }(), a = function() {
- function a(b, d) {
- this._lastPumpTime = this._framesPlayed = 0;
- this._hasFocus = this._isPageVisible = !0;
- this._loaderUrl = this._swfUrl = this._pageUrl = this._currentMouseTarget = null;
- this._crossDomainSWFLoadingWhitelist = [];
- this.sec = b;
- b.player = this;
- this._writer = new e.IndentingWriter;
- this._gfxService = d;
- this._gfxServiceObserver = new c(this);
- this._gfxService.addObserver(this._gfxServiceObserver);
- }
- Object.defineProperty(a.prototype, "framesPlayed", {get:function() {
- return this._framesPlayed;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "stage", {get:function() {
- return this._stage;
- }, enumerable:!0, configurable:!0});
- a.prototype._shouldThrottleDownRendering = function() {
- return !this._isPageVisible;
- };
- a.prototype._shouldThrottleDownFrameExecution = function() {
- return !this._isPageVisible;
- };
- Object.defineProperty(a.prototype, "pageUrl", {get:function() {
- return this._pageUrl;
- }, set:function(a) {
- this._pageUrl = a || null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "loaderUrl", {get:function() {
- return this._loaderUrl;
- }, set:function(a) {
- this._loaderUrl = a || null;
- }, enumerable:!0, configurable:!0});
- Object.defineProperty(a.prototype, "swfUrl", {get:function() {
- return this._swfUrl;
- }, enumerable:!0, configurable:!0});
- a.prototype.load = function(a, b) {
- this._swfUrl = this._loaderUrl = a;
- this._stage = new this.sec.flash.display.Stage;
- var c = this._loaderInfo = (this._loader = this.sec.flash.display.Loader.axClass.getRootLoader()).contentLoaderInfo;
- e.playAllSymbolsOption.value ? (this._playAllSymbols(), c._allowCodeExecution = !1) : this._enterRootLoadingLoop();
- c = e.FileLoadingService.instance.resolveUrl(a);
- this.addToSWFLoadingWhitelist(c, !1, !0);
- var d = this.createLoaderContext();
- if (b) {
- var f = new this.sec.flash.utils.ByteArray(b);
- this._loader.loadBytes(f, d);
- this._loader.contentLoaderInfo._url = c;
- } else {
- this._loader.load(new this.sec.flash.net.URLRequest(a), d);
- }
- };
- a.prototype.createLoaderContext = function() {
- var a = new this.sec.flash.system.LoaderContext;
- if (this.movieParams) {
- var b = this.sec.createObject(), c;
- for (c in this.movieParams) {
- b.axSetPublicProperty(c, this.movieParams[c]);
- }
- a.parameters = b;
- }
- return a;
- };
- a.prototype._pumpDisplayListUpdates = function() {
- this.syncDisplayObject(this._stage, !0);
- };
- a.prototype.syncDisplayObject = function(a, c) {
- var d = new t, f = [], g = new e.Remoting.Player.PlayerChannelSerializer;
- g.output = d;
- g.outputAssets = f;
- this.sec.flash.display.Stage.axClass.axIsType(a) && g.writeStage(a, this._currentMouseTarget);
- g.begin(a);
- g.remoteObjects();
- g.remoteReferences();
- d.writeInt(0);
- b.enterTimeline("remoting assets");
- var h;
- c ? this._gfxService.update(d, f) : h = this._gfxService.updateAndGet(d, f);
- b.leaveTimeline("remoting assets");
- return h;
- };
- a.prototype.requestBitmapData = function(a) {
- var b = new t, c = [], d = new e.Remoting.Player.PlayerChannelSerializer;
- d.output = b;
- d.outputAssets = c;
- d.writeRequestBitmapData(a);
- b.writeInt(0);
- return this._gfxService.updateAndGet(b, c);
- };
- a.prototype.drawToBitmap = function(a, c, d, f, g, h, l) {
- void 0 === d && (d = null);
- void 0 === f && (f = null);
- void 0 === g && (g = null);
- void 0 === h && (h = null);
- void 0 === l && (l = !1);
- var m = new t, n = [], E = new e.Remoting.Player.PlayerChannelSerializer;
- E.output = m;
- E.outputAssets = n;
- E.writeBitmapData(a);
- this.sec.flash.display.BitmapData.axClass.axIsType(c) ? E.writeBitmapData(c) : (E.begin(c), E.remoteObjects(), E.remoteReferences());
- E.writeDrawToBitmap(a, c, d, f, g, h, l);
- m.writeInt(0);
- b.enterTimeline("sendUpdates");
- this._gfxService.updateAndGet(m, n);
- b.leaveTimeline("sendUpdates");
- };
- a.prototype.registerEventListener = function(a, b) {
- this._gfxServiceObserver.registerEventListener(a, b);
- };
- a.prototype.notifyVideoControl = function(a, b, c) {
- return this._gfxService.videoControl(a, b, c);
- };
- a.prototype.executeFSCommand = function(a, b) {
- switch(a) {
- case "quit":
- this._leaveEventLoop();
- break;
- default:
- h("FSCommand " + a);
- }
- this._gfxService.fscommand(a, b);
- };
- a.prototype.requestRendering = function() {
- this._pumpDisplayListUpdates();
- };
- a.prototype._pumpUpdates = function() {
- if (e.dontSkipFramesOption.value || !(this._shouldThrottleDownRendering() || performance.now() - this._lastPumpTime < 1E3 / e.pumpRateOption.value)) {
- b.enterTimeline("pump"), e.pumpEnabledOption.value && (this._pumpDisplayListUpdates(), this._lastPumpTime = performance.now()), b.leaveTimeline("pump");
- }
- };
- a.prototype._leaveSyncLoop = function() {
- clearInterval(this._frameTimeout);
- };
- a.prototype._getFrameInterval = function() {
- var a = e.frameRateOption.value;
- 0 > a && (a = this._stage.frameRate);
- return Math.floor(1E3 / a);
- };
- a.prototype._enterEventLoop = function() {
- function a() {
- b._frameTimeout = setTimeout(a, b._getFrameInterval());
- b._eventLoopTick();
- }
- this._eventLoopIsRunning = !0;
- var b = this;
- isNaN(this.initStartTime) || console.info("Time from init start to main event loop start: " + (Date.now() - this.initStartTime));
- a();
- };
- a.prototype._leaveEventLoop = function() {
- clearTimeout(this._frameTimeout);
- this._eventLoopIsRunning = !1;
- };
- a.prototype._enterRootLoadingLoop = function() {
- function a() {
- var d = c.contentLoaderInfo;
- if (d._file) {
- var f = b._stage, h = void 0 !== b.defaultStageColor ? b.defaultStageColor : d._file.backgroundColor;
- f._loaderInfo = d;
- f.align = b.stageAlign || "";
- !b.stageScale || 0 > n.display.StageScaleMode.toNumber(b.stageScale) ? f.scaleMode = n.display.StageScaleMode.SHOW_ALL : f.scaleMode = b.stageScale;
- f.frameRate = d.frameRate;
- f.setStageWidth(d.width);
- f.setStageHeight(d.height);
- f.setStageColor(e.ColorUtilities.RGBAToARGB(h));
- b.displayParameters && b._gfxServiceObserver.displayParameters(b.displayParameters);
- b._enterEventLoop();
- } else {
- setTimeout(a, b._getFrameInterval());
- }
- }
- var b = this, c = this.sec.flash.display.Loader.axClass.getRootLoader();
- c._setStage(this._stage);
- a();
- };
- a.prototype._eventLoopTick = function() {
- var a = !e.playAllSymbolsOption.value;
- if (e.dontSkipFramesOption.value || !(!e.frameEnabledOption.value && a || this._shouldThrottleDownFrameExecution())) {
- var c = this.sec.flash.display.DisplayObject.axClass;
- c._stage = this._stage;
- var d = this.sec.flash.display.Loader.axClass;
- if (!d.getRootLoader().content && (d.processEvents(), !d.getRootLoader().content)) {
- return;
- }
- for (var f = 0;f < e.frameRateMultiplierOption.value;f++) {
- b.enterTimeline("eventLoop");
- var g = performance.now();
- c.performFrameNavigation(!0, a);
- b.counter.count("performFrameNavigation", 1, performance.now() - g);
- d.processEvents();
- b.leaveTimeline("eventLoop");
- }
- this._framesPlayed++;
- 0 < e.tracePlayerOption.value && 0 === this._framesPlayed % e.tracePlayerOption.value && this._tracePlayer();
- this._stage.render();
- this._pumpUpdates();
- this._gfxService.frame();
- }
- };
- a.prototype._tracePlayer = function() {
- this._writer.writeLn("Frame: " + String(this._framesPlayed).padLeft(" ", 4) + ": " + e.IntegerUtilities.toHEX(this._stage.hashCode()) + " " + String(this._stage.getAncestorCount()).padLeft(" ", 4));
- };
- a.prototype._playAllSymbols = function() {
- var a = this._stage, b = this._loader, c = this._loaderInfo, d = this;
- c.addEventListener(n.events.ProgressEvent.PROGRESS, function p() {
- b.content && (c.removeEventListener(n.events.ProgressEvent.PROGRESS, p), d._enterEventLoop());
- });
- c.addEventListener(n.events.Event.COMPLETE, function() {
- function b(c) {
- n.display.DisplayObject.reset();
- n.display.MovieClip.reset();
- var d = c.symbolClass.initializeFrom(c);
- c.symbolClass.instanceConstructorNoInitialize.call(d);
- for (c instanceof n.display.BitmapSymbol && (d = new this.sec.flash.display.Bitmap(d));0 < a.numChildren;) {
- a.removeChildAt(0);
- }
- a.addChild(d);
- }
- function f() {
- var a;
- 0 < e.playSymbolOption.value ? (a = c.getSymbolById(e.playSymbolOption.value), a instanceof e.Timeline.DisplaySymbol || (a = null)) : (a = h[l++], l === h.length && (l = 0), 0 <= e.playSymbolCountOption.value && l > e.playSymbolCountOption.value && (l = 0));
- var k = 1;
- a && 0 < a.id && (b(a), a instanceof n.display.SpriteSymbol && (k = a.numFrames));
- 0 < e.playSymbolFrameDurationOption.value && (k = e.playSymbolFrameDurationOption.value);
- setTimeout(f, d._getFrameInterval() * k);
- }
- a.setStageWidth(1024);
- a.setStageHeight(1024);
- var h = [];
- c._dictionary.forEach(function(a, b) {
- a instanceof e.Timeline.DisplaySymbol && h.push(a);
- });
- var l = 0;
- setTimeout(f, d._getFrameInterval());
- });
- };
- a.prototype.registerFont = function(a, b) {
- a.resolveAssetPromise = new e.PromiseWrapper;
- this._gfxService.registerFont(a.syncId, b).then(function(b) {
- a.resolveAssetPromise.resolve(b);
- });
- inFirefox ? a.ready = !0 : a.resolveAssetPromise.then(a.resolveAssetCallback, null);
- };
- a.prototype.registerImage = function(a, b, c, d) {
- a.resolveAssetPromise = new e.PromiseWrapper;
- this._gfxService.registerImage(a.syncId, a.id, b, c, d).then(function(b) {
- a.resolveAssetPromise.resolve(b);
- });
- a.resolveAssetPromise.then(a.resolveAssetCallback, null);
- };
- a.prototype.addToSWFLoadingWhitelist = function(a, b, c) {
- if (0 > a.indexOf("/")) {
- this._crossDomainSWFLoadingWhitelist.push({protocol:"http:", hostname:a, insecure:b, ownDomain:c});
- } else {
- try {
- var d = new window.URL(a);
- this._crossDomainSWFLoadingWhitelist.push({protocol:d.protocol, hostname:d.hostname, insecure:b, ownDomain:c});
- } catch (e) {
- }
- }
- };
- a.prototype.checkDomainForSWFLoading = function(a) {
- try {
- var b = new window.URL(a);
- } catch (c) {
- return 2;
- }
- var d = 2;
- this._crossDomainSWFLoadingWhitelist.some(function(a) {
- return (b.hostname !== a.hostname && "*" !== a.hostname ? 0 : a.insecure || "https:" === b.protocol || "https:" !== a.protocol) ? (d = a.ownDomain ? 0 : 1, !0) : !1;
- }, this);
- return d;
- };
- return a;
- }();
- b.Player = a;
- })(e.Player || (e.Player = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- b[b.Builtin = 1] = "Builtin";
- b[b.Playerglobal = 2] = "Playerglobal";
- b[b.Shell = 4] = "Shell";
- })(e.AVM2LoadLibrariesFlags || (e.AVM2LoadLibrariesFlags = {}));
- e.createSecurityDomain = function(b) {
- var h = new e.PromiseWrapper;
- e.SWF.enterTimeline("Load builton.abc file");
- e.SystemResourcesLoadingService.instance.load(0).then(function(n) {
- var t = new e.AVMX.AXSecurityDomain;
- n = new e.AVMX.ABCFile({url:"builtin.abc", app:t.system}, new Uint8Array(n));
- t.system.loadABC(n);
- t.initialize();
- t.system.executeABC(n);
- e.SWF.leaveTimeline();
- if (b & 2) {
- return e.SWF.enterTimeline("Load playerglobal files"), Promise.all([e.SystemResourcesLoadingService.instance.load(1), e.SystemResourcesLoadingService.instance.load(2)]).then(function(b) {
- b = new e.AVMX.ABCCatalog(t.system, new Uint8Array(b[0]), b[1]);
- t.addCatalog(b);
- e.SWF.leaveTimeline();
- h.resolve(t);
- }, h.reject);
- }
- h.resolve(t);
- }, h.reject);
- return h.promise;
- };
-})(Shumway || (Shumway = {}));
-__extends = this.__extends || function(e, b) {
- function h() {
- this.constructor = e;
- }
- for (var n in b) {
- b.hasOwnProperty(n) && (e[n] = b[n]);
- }
- h.prototype = b.prototype;
- e.prototype = new h;
-};
-(function(e) {
- (function(b) {
- function h(b, h) {
- "_" !== b[0] && -1 === b.indexOf(":") && (b = (new jsGlobal.URL(e.AVMX.getCurrentABC().env.url)).hostname + ":" + b);
- return b;
- }
- var n = function() {
- function b() {
- }
- Object.defineProperty(b.prototype, "enabled", {get:function() {
- return !0;
- }, enumerable:!0, configurable:!0});
- b.prototype.initJS = function(b) {
- ShumwayCom.externalCom({action:"init"});
- ShumwayCom.setExternalCallback(function(d) {
- return b(d.functionName, d.args);
- });
- this._externalCallback = b;
- };
- b.prototype.registerCallback = function(b) {
- ShumwayCom.externalCom({action:"register", functionName:b, remove:!1});
- };
- b.prototype.unregisterCallback = function(b) {
- ShumwayCom.externalCom({action:"register", functionName:b, remove:!0});
- };
- b.prototype.eval = function(b) {
- return ShumwayCom.externalCom({action:"eval", expression:b});
- };
- b.prototype.call = function(b) {
- return ShumwayCom.externalCom({action:"call", request:b});
- };
- b.prototype.getId = function() {
- return ShumwayCom.externalCom({action:"getId"});
- };
- return b;
- }();
- b.ShumwayComExternalInterface = n;
- n = function() {
- function b() {
- this._baseUrl = null;
- this._nextSessionId = 1;
- this._sessions = [];
- }
- b.prototype.init = function(b) {
- this._baseUrl = b;
- var d = this;
- ShumwayCom.setLoadFileCallback(function(a) {
- var b = d._sessions[a.sessionId];
- b && d._notifySession(b, a);
- });
- };
- b.prototype._notifySession = function(b, d) {
- var a = d.sessionId;
- switch(d.topic) {
- case "open":
- b.onopen();
- break;
- case "close":
- b.onclose();
- this._sessions[a] = null;
- console.log("Session #" + a + ": closed");
- break;
- case "error":
- b.onerror && b.onerror(d.error);
- break;
- case "progress":
- console.log("Session #" + a + ": loaded " + d.loaded + "/" + d.total), a = d.array, a instanceof Uint8Array || (a = new Uint8Array(a)), b.onprogress && b.onprogress(a, {bytesLoaded:d.loaded, bytesTotal:d.total});
- }
- };
- b.prototype.createSession = function() {
- var b = this._nextSessionId++, d = this;
- return this._sessions[b] = {open:function(a) {
- var c = d.resolveUrl(a.url);
- console.log("Session #" + b + ": loading " + c);
- ShumwayCom.loadFile({url:c, method:a.method, mimeType:a.mimeType, postData:a.data, checkPolicyFile:a.checkPolicyFile, sessionId:b});
- }, close:function() {
- d._sessions[b] && ShumwayCom.abortLoad(b);
- }};
- };
- b.prototype.resolveUrl = function(b) {
- return (new window.URL(b, this._baseUrl)).href;
- };
- b.prototype.navigateTo = function(b, d) {
- ShumwayCom.navigateTo({url:this.resolveUrl(b), target:d});
- };
- return b;
- }();
- b.ShumwayComFileLoadingService = n;
- n = function() {
- function b() {
- }
- b.prototype.setClipboard = function(b) {
- ShumwayCom.setClipboard(b);
- };
- return b;
- }();
- b.ShumwayComClipboardService = n;
- n = function() {
- function b() {
- }
- b.prototype.reportTelemetry = function(b) {
- ShumwayCom.reportTelemetry(b);
- };
- return b;
- }();
- b.ShumwayComTelemetryService = n;
- n = function() {
- function b() {
- }
- b.prototype.createSession = function() {
- var b = this, d;
- return {open:function(a) {
- var c = this, f = b.resolveUrl(a.url);
- console.log("FileLoadingService: loading " + f + ", data: " + a.data);
- d = new e.BinaryFileReader(f, a.method, a.mimeType, a.data);
- d.readChunked(b._fileReadChunkSize, function(a, b) {
- c.onprogress(a, {bytesLoaded:b.loaded, bytesTotal:b.total});
- }, function(a) {
- c.onerror(a);
- }, c.onopen, c.onclose, c.onhttpstatus);
- }, close:function() {
- d.abort();
- d = null;
- }};
- };
- b.prototype.init = function(b, d) {
- void 0 === d && (d = 0);
- this._baseUrl = b;
- this._fileReadChunkSize = d;
- };
- b.prototype.resolveUrl = function(b) {
- return (new window.URL(b, this._baseUrl)).href;
- };
- b.prototype.navigateTo = function(b, d) {
- window.open(this.resolveUrl(b), d || "_blank");
- };
- return b;
- }();
- b.BrowserFileLoadingService = n;
- n = function() {
- function b(e) {
- this._pendingPromises = [];
- e && (this.load(0), this.load(1), this.load(2));
- ShumwayCom.setSystemResourceCallback(this._onSystemResourceCallback.bind(this));
- }
- b.prototype._onSystemResourceCallback = function(b, d) {
- this._pendingPromises[b].resolve(d);
- };
- b.prototype.load = function(b) {
- var d = this._pendingPromises[b];
- d || (d = new e.PromiseWrapper, this._pendingPromises[b] = d, ShumwayCom.loadSystemResource(b));
- return d.promise;
- };
- return b;
- }();
- b.ShumwayComResourcesLoadingService = n;
- n = function() {
- function b(e, d, a) {
- this.builtinPath = e;
- this.viewerPlayerglobalInfo = d;
- this.shellPath = a;
- }
- b.prototype.load = function(b) {
- switch(b) {
- case 0:
- return this._promiseFile(this.builtinPath, "arraybuffer");
- case 1:
- return this._promiseFile(this.viewerPlayerglobalInfo.abcs, "arraybuffer");
- case 2:
- return this._promiseFile(this.viewerPlayerglobalInfo.catalog, "json");
- case 3:
- return this._promiseFile(this.shellPath, "arraybuffer");
- default:
- return Promise.reject(Error("Unsupported system resource id: " + b));
- }
- };
- b.prototype._promiseFile = function(b, d) {
- return new Promise(function(a, c) {
- e.SWF.enterTimeline("Load file", b);
- var f = new XMLHttpRequest;
- f.open("GET", b);
- f.responseType = d;
- f.onload = function() {
- e.SWF.leaveTimeline();
- var h = f.response;
- h ? ("json" === d && "json" !== f.responseType && (h = JSON.parse(h)), a(h)) : c("Unable to load " + b + ": " + f.statusText);
- };
- f.onerror = function() {
- e.SWF.leaveTimeline();
- c("Unable to load: xhr error");
- };
- f.send();
- });
- };
- return b;
- }();
- b.BrowserSystemResourcesLoadingService = n;
- n = function() {
- function b() {
- this._localConnections = Object.create(null);
- }
- b.prototype.createConnection = function(b, d) {
- };
- b.prototype.closeConnection = function(b, d) {
- };
- b.prototype.hasConnection = function(b) {
- return !1;
- };
- b.prototype._sendMessage = function(b, d, a, c, e, h) {
- };
- b.prototype.send = function(b, d, a, c, e, k) {
- b = h(b, !1);
- var m = this;
- Promise.resolve(!0).then(function() {
- var h = m.hasConnection(b) ? "status" : "error", n = new c.sec.flash.events.StatusEvent("status", !1, !1, null, h);
- try {
- c.dispatchEvent(n);
- } catch (g) {
- console.warn("Exception encountered during statusEvent handling in LocalConnection sender.", g);
- }
- "error" !== h && m._sendMessage(b, d, a, c, e, k);
- });
- };
- b.prototype.allowDomains = function(b, d, a, c) {
- e.Debug.somewhatImplemented("LocalConnection#allowDomain");
- };
- return b;
- }();
- b.BaseLocalConnectionService = n;
- var t = function(b) {
- function e() {
- b.apply(this, arguments);
- }
- __extends(e, b);
- e.prototype.createConnection = function(b, a) {
- b = h(b, !0);
- if (this.hasConnection(b)) {
- return -2;
- }
- var c = ShumwayCom.getLocalConnectionService().createLocalConnection(b, function(b, c) {
- try {
- return a.handleMessage(b, c), null;
- } catch (d) {
- return console.log("error under handleMessage: ", d), d;
- }
- });
- if (0 !== c) {
- return c;
- }
- this._localConnections[b] = a;
- return 0;
- };
- e.prototype.closeConnection = function(b, a) {
- b = h(b, !0);
- if (this._localConnections[b] !== a) {
- return -1;
- }
- ShumwayCom.getLocalConnectionService().closeLocalConnection(b);
- delete this._localConnections[b];
- return 0;
- };
- e.prototype.hasConnection = function(b) {
- return ShumwayCom.getLocalConnectionService().hasLocalConnection(b);
- };
- e.prototype._sendMessage = function(b, a, c, e, h, l) {
- ShumwayCom.getLocalConnectionService().sendLocalConnectionMessage(b, a, c, e, h, l);
- };
- e.prototype.allowDomains = function(b, a, c, e) {
- b = h(b, !0);
- this._localConnections[b] !== a ? console.warn("Trying to allow domains for invalid connection " + b) : ShumwayCom.getLocalConnectionService().allowDomainsForLocalConnection(b, c, e);
- };
- return e;
- }(n);
- b.ShumwayComLocalConnectionService = t;
- n = function(b) {
- function l() {
- b.apply(this, arguments);
- }
- __extends(l, b);
- l.prototype.createConnection = function(b, a) {
- b = h(b, !0);
- if (this._localConnections[b]) {
- return -2;
- }
- this._localConnections[b] = a;
- return 0;
- };
- l.prototype.closeConnection = function(b, a) {
- b = h(b, !0);
- if (this._localConnections[b] !== a) {
- return -1;
- }
- delete this._localConnections[b];
- return 0;
- };
- l.prototype.hasConnection = function(b) {
- return b in this._localConnections;
- };
- l.prototype._sendMessage = function(b, a, c, f, h) {
- b = this._localConnections[b];
- try {
- b.handleMessage(a, c);
- } catch (l) {
- e.Debug.warning("Unexpected error encountered while sending LocalConnection message.");
- }
- };
- return l;
- }(n);
- b.PlayerInternalLocalConnectionService = n;
- })(e.Player || (e.Player = {}));
-})(Shumway || (Shumway = {}));
-(function(e) {
- (function(b) {
- (function(h) {
- var n = e.ArrayUtilities.DataBuffer, t = function(b) {
- function h(d, a) {
- b.call(this, d);
- this._peer = a;
- this._peer.onAsyncMessage = function(a) {
- this.onWindowMessage(a);
- }.bind(this);
- this._assetDecodingRequests = [];
- }
- __extends(h, b);
- h.prototype.update = function(b, a) {
- var c = b.getBytes();
- this._peer.postAsyncMessage({type:"player", updates:c, assets:a, result:void 0}, [c.buffer]);
- };
- h.prototype.updateAndGet = function(b, a) {
- var c = {type:"player", updates:b.getBytes(), assets:a, result:void 0}, c = this._peer.sendSyncMessage(c);
- return n.FromPlainObject(c);
- };
- h.prototype.frame = function() {
- this._peer.postAsyncMessage({type:"frame"});
- };
- h.prototype.videoControl = function(b, a, c) {
- return this._peer.sendSyncMessage({type:"videoControl", id:b, eventType:a, data:c, result:void 0});
- };
- h.prototype.registerFont = function(b, a) {
- var c = this._assetDecodingRequests.length, f = new e.PromiseWrapper;
- this._assetDecodingRequests[c] = f;
- this._peer.sendSyncMessage({type:"registerFont", syncId:b, data:a, requestId:c});
- return f.promise;
- };
- h.prototype.registerImage = function(b, a, c, f, h) {
- var l = this._assetDecodingRequests.length, m = new e.PromiseWrapper;
- this._assetDecodingRequests[l] = m;
- this._peer.postAsyncMessage({type:"registerImage", syncId:b, symbolId:a, imageType:c, data:f, alphaData:h, requestId:l});
- return m.promise;
- };
- h.prototype.fscommand = function(b, a) {
- this._peer.postAsyncMessage({type:"fscommand", command:b, args:a});
- };
- h.prototype.onWindowMessage = function(b) {
- if ("object" === typeof b && null !== b) {
- switch(b.type) {
- case "gfx":
- var a = e.ArrayUtilities.DataBuffer.FromArrayBuffer(b.updates.buffer);
- this.processUpdates(a, b.assets);
- break;
- case "videoPlayback":
- this.processVideoEvent(b.id, b.eventType, b.data);
- break;
- case "displayParameters":
- this.processDisplayParameters(b.params);
- break;
- case "registerFontResponse":
- ;
- case "registerImageResponse":
- a = this._assetDecodingRequests[b.requestId];
- delete this._assetDecodingRequests[b.requestId];
- a.resolve(b.result);
- break;
- case "options":
- e.Settings.setSettings(b.settings);
- }
- }
- };
- return h;
- }(b.GFXServiceBase);
- h.WindowGFXService = t;
- })(b.Window || (b.Window = {}));
- })(e.Player || (e.Player = {}));
-})(Shumway || (Shumway = {}));
-console.timeEnd("Load Player Dependencies");
-
diff --git a/browser/extensions/shumway/content/version.txt b/browser/extensions/shumway/content/version.txt
deleted file mode 100644
index 2f1388739c86..000000000000
--- a/browser/extensions/shumway/content/version.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-0.11.422
-137ba70
diff --git a/browser/extensions/shumway/content/web/noflv.mp4 b/browser/extensions/shumway/content/web/noflv.mp4
deleted file mode 100644
index 89635ae21812..000000000000
Binary files a/browser/extensions/shumway/content/web/noflv.mp4 and /dev/null differ
diff --git a/browser/extensions/shumway/content/web/viewer.gfx.html b/browser/extensions/shumway/content/web/viewer.gfx.html
deleted file mode 100644
index 63ee4208174a..000000000000
--- a/browser/extensions/shumway/content/web/viewer.gfx.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/browser/extensions/shumway/content/web/viewer.html b/browser/extensions/shumway/content/web/viewer.html
deleted file mode 100644
index 5a4355dbceef..000000000000
--- a/browser/extensions/shumway/content/web/viewer.html
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-