{"version":3,"sources":["webpack:///platforms/browser/platform_www/cordova.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iEAAiE;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa,uGAAuG;AACpI,uBAAuB;AACvB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6DAA6D,iBAAiB;AAC9E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G;AAC7G;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,QAAQ;AAC3B,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;;;AAIA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA,0DAA0D,2EAA2E,IAAI;AACzI;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,CAAC;;AAED,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,CAAC;;AAED,CAAC;;AAED;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB,OAAO;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB,OAAO;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;AACjC;AACA,KAAK;AACL;AACA,yCAAyC;AACzC;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,2BAA2B,wBAAwB,OAAO;AAC1D;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;;AAEA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,wBAAwB,OAAO;AAC1D;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;;AAEA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B,sCAAsC;;AAEpE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uHAAuH;AACvH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;AAEA,CAAC,I","file":"cordova.js","sourcesContent":["// Platform: browser\n// 9e8e1b716252c4a08abcd31a13013b868d6f4141\n/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the License.\n*/\n;(function() {\nvar PLATFORM_VERSION_BUILD_LABEL = '5.0.4';\n// file: src/scripts/require.js\n\n/* jshint -W079 */\n/* jshint -W020 */\n\nvar require;\nvar define;\n\n(function () {\n var modules = {};\n // Stack of moduleIds currently being built.\n var requireStack = [];\n // Map of module ID -> index into requireStack of modules currently being built.\n var inProgressModules = {};\n var SEPARATOR = '.';\n\n function build (module) {\n var factory = module.factory;\n var localRequire = function (id) {\n var resultantId = id;\n // Its a relative path, so lop off the last portion and add the id (minus \"./\")\n if (id.charAt(0) === '.') {\n resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);\n }\n return require(resultantId);\n };\n module.exports = {};\n delete module.factory;\n factory(localRequire, module.exports, module);\n return module.exports;\n }\n\n require = function (id) {\n if (!modules[id]) {\n throw 'module ' + id + ' not found';\n } else if (id in inProgressModules) {\n var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;\n throw 'Cycle in require graph: ' + cycle;\n }\n if (modules[id].factory) {\n try {\n inProgressModules[id] = requireStack.length;\n requireStack.push(id);\n return build(modules[id]);\n } finally {\n delete inProgressModules[id];\n requireStack.pop();\n }\n }\n return modules[id].exports;\n };\n\n define = function (id, factory) {\n if (modules[id]) {\n throw 'module ' + id + ' already defined';\n }\n\n modules[id] = {\n id: id,\n factory: factory\n };\n };\n\n define.remove = function (id) {\n delete modules[id];\n };\n\n define.moduleMap = modules;\n})();\n\n// Export for use in node\nif (typeof module === 'object' && typeof require === 'function') {\n module.exports.require = require;\n module.exports.define = define;\n}\n\n// file: src/cordova.js\ndefine(\"cordova\", function(require, exports, module) {\n\n// Workaround for Windows 10 in hosted environment case\n// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object\nif (window.cordova && !(window.cordova instanceof HTMLElement)) { // eslint-disable-line no-undef\n throw new Error('cordova already defined');\n}\n\nvar channel = require('cordova/channel');\nvar platform = require('cordova/platform');\n\n/**\n * Intercept calls to addEventListener + removeEventListener and handle deviceready,\n * resume, and pause events.\n */\nvar m_document_addEventListener = document.addEventListener;\nvar m_document_removeEventListener = document.removeEventListener;\nvar m_window_addEventListener = window.addEventListener;\nvar m_window_removeEventListener = window.removeEventListener;\n\n/**\n * Houses custom event handlers to intercept on document + window event listeners.\n */\nvar documentEventHandlers = {};\nvar windowEventHandlers = {};\n\ndocument.addEventListener = function (evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof documentEventHandlers[e] !== 'undefined') {\n documentEventHandlers[e].subscribe(handler);\n } else {\n m_document_addEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.addEventListener = function (evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof windowEventHandlers[e] !== 'undefined') {\n windowEventHandlers[e].subscribe(handler);\n } else {\n m_window_addEventListener.call(window, evt, handler, capture);\n }\n};\n\ndocument.removeEventListener = function (evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof documentEventHandlers[e] !== 'undefined') {\n documentEventHandlers[e].unsubscribe(handler);\n } else {\n m_document_removeEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.removeEventListener = function (evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof windowEventHandlers[e] !== 'undefined') {\n windowEventHandlers[e].unsubscribe(handler);\n } else {\n m_window_removeEventListener.call(window, evt, handler, capture);\n }\n};\n\nfunction createEvent (type, data) {\n var event = document.createEvent('Events');\n event.initEvent(type, false, false);\n if (data) {\n for (var i in data) {\n if (data.hasOwnProperty(i)) {\n event[i] = data[i];\n }\n }\n }\n return event;\n}\n\n/* eslint-disable no-undef */\nvar cordova = {\n define: define,\n require: require,\n version: PLATFORM_VERSION_BUILD_LABEL,\n platformVersion: PLATFORM_VERSION_BUILD_LABEL,\n platformId: platform.id,\n\n /* eslint-enable no-undef */\n\n /**\n * Methods to add/remove your own addEventListener hijacking on document + window.\n */\n addWindowEventHandler: function (event) {\n return (windowEventHandlers[event] = channel.create(event));\n },\n addStickyDocumentEventHandler: function (event) {\n return (documentEventHandlers[event] = channel.createSticky(event));\n },\n addDocumentEventHandler: function (event) {\n return (documentEventHandlers[event] = channel.create(event));\n },\n removeWindowEventHandler: function (event) {\n delete windowEventHandlers[event];\n },\n removeDocumentEventHandler: function (event) {\n delete documentEventHandlers[event];\n },\n /**\n * Retrieve original event handlers that were replaced by Cordova\n *\n * @return object\n */\n getOriginalHandlers: function () {\n return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},\n 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};\n },\n /**\n * Method to fire event from native code\n * bNoDetach is required for events which cause an exception which needs to be caught in native code\n */\n fireDocumentEvent: function (type, data, bNoDetach) {\n var evt = createEvent(type, data);\n if (typeof documentEventHandlers[type] !== 'undefined') {\n if (bNoDetach) {\n documentEventHandlers[type].fire(evt);\n } else {\n setTimeout(function () {\n // Fire deviceready on listeners that were registered before cordova.js was loaded.\n if (type === 'deviceready') {\n document.dispatchEvent(evt);\n }\n documentEventHandlers[type].fire(evt);\n }, 0);\n }\n } else {\n document.dispatchEvent(evt);\n }\n },\n fireWindowEvent: function (type, data) {\n var evt = createEvent(type, data);\n if (typeof windowEventHandlers[type] !== 'undefined') {\n setTimeout(function () {\n windowEventHandlers[type].fire(evt);\n }, 0);\n } else {\n window.dispatchEvent(evt);\n }\n },\n\n /**\n * Plugin callback mechanism.\n */\n // Randomize the starting callbackId to avoid collisions after refreshing or navigating.\n // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.\n callbackId: Math.floor(Math.random() * 2000000000),\n callbacks: {},\n callbackStatus: {\n NO_RESULT: 0,\n OK: 1,\n CLASS_NOT_FOUND_EXCEPTION: 2,\n ILLEGAL_ACCESS_EXCEPTION: 3,\n INSTANTIATION_EXCEPTION: 4,\n MALFORMED_URL_EXCEPTION: 5,\n IO_EXCEPTION: 6,\n INVALID_ACTION: 7,\n JSON_EXCEPTION: 8,\n ERROR: 9\n },\n\n /**\n * Called by native code when returning successful result from an action.\n */\n callbackSuccess: function (callbackId, args) {\n cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);\n },\n\n /**\n * Called by native code when returning error result from an action.\n */\n callbackError: function (callbackId, args) {\n // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.\n // Derive success from status.\n cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);\n },\n\n /**\n * Called by native code when returning the result from an action.\n */\n callbackFromNative: function (callbackId, isSuccess, status, args, keepCallback) {\n try {\n var callback = cordova.callbacks[callbackId];\n if (callback) {\n if (isSuccess && status === cordova.callbackStatus.OK) {\n callback.success && callback.success.apply(null, args);\n } else if (!isSuccess) {\n callback.fail && callback.fail.apply(null, args);\n }\n /*\n else\n Note, this case is intentionally not caught.\n this can happen if isSuccess is true, but callbackStatus is NO_RESULT\n which is used to remove a callback from the list without calling the callbacks\n typically keepCallback is false in this case\n */\n // Clear callback if not expecting any more results\n if (!keepCallback) {\n delete cordova.callbacks[callbackId];\n }\n }\n } catch (err) {\n var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err;\n console && console.log && console.log(msg);\n console && console.log && err.stack && console.log(err.stack);\n cordova.fireWindowEvent('cordovacallbackerror', { 'message': msg });\n throw err;\n }\n },\n addConstructor: function (func) {\n channel.onCordovaReady.subscribe(function () {\n try {\n func();\n } catch (e) {\n console.log('Failed to run constructor: ' + e);\n }\n });\n }\n};\n\nmodule.exports = cordova;\n\n});\n\n// file: src/common/argscheck.js\ndefine(\"cordova/argscheck\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\n\nvar moduleExports = module.exports;\n\nvar typeMap = {\n 'A': 'Array',\n 'D': 'Date',\n 'N': 'Number',\n 'S': 'String',\n 'F': 'Function',\n 'O': 'Object'\n};\n\nfunction extractParamName (callee, argIndex) {\n return (/.*?\\((.*?)\\)/).exec(callee)[1].split(', ')[argIndex];\n}\n\nfunction checkArgs (spec, functionName, args, opt_callee) {\n if (!moduleExports.enableChecks) {\n return;\n }\n var errMsg = null;\n var typeName;\n for (var i = 0; i < spec.length; ++i) {\n var c = spec.charAt(i);\n var cUpper = c.toUpperCase();\n var arg = args[i];\n // Asterix means allow anything.\n if (c === '*') {\n continue;\n }\n typeName = utils.typeName(arg);\n if ((arg === null || arg === undefined) && c === cUpper) {\n continue;\n }\n if (typeName !== typeMap[cUpper]) {\n errMsg = 'Expected ' + typeMap[cUpper];\n break;\n }\n }\n if (errMsg) {\n errMsg += ', but got ' + typeName + '.';\n errMsg = 'Wrong type for parameter \"' + extractParamName(opt_callee || args.callee, i) + '\" of ' + functionName + ': ' + errMsg;\n // Don't log when running unit tests.\n if (typeof jasmine === 'undefined') {\n console.error(errMsg);\n }\n throw TypeError(errMsg);\n }\n}\n\nfunction getValue (value, defaultValue) {\n return value === undefined ? defaultValue : value;\n}\n\nmoduleExports.checkArgs = checkArgs;\nmoduleExports.getValue = getValue;\nmoduleExports.enableChecks = true;\n\n});\n\n// file: src/common/base64.js\ndefine(\"cordova/base64\", function(require, exports, module) {\n\nvar base64 = exports;\n\nbase64.fromArrayBuffer = function (arrayBuffer) {\n var array = new Uint8Array(arrayBuffer);\n return uint8ToBase64(array);\n};\n\nbase64.toArrayBuffer = function (str) {\n var decodedStr = typeof atob !== 'undefined' ? atob(str) : Buffer.from(str, 'base64').toString('binary'); // eslint-disable-line no-undef\n var arrayBuffer = new ArrayBuffer(decodedStr.length);\n var array = new Uint8Array(arrayBuffer);\n for (var i = 0, len = decodedStr.length; i < len; i++) {\n array[i] = decodedStr.charCodeAt(i);\n }\n return arrayBuffer;\n};\n\n// ------------------------------------------------------------------------------\n\n/* This code is based on the performance tests at http://jsperf.com/b64tests\n * This 12-bit-at-a-time algorithm was the best performing version on all\n * platforms tested.\n */\n\nvar b64_6bit = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nvar b64_12bit;\n\nvar b64_12bitTable = function () {\n b64_12bit = [];\n for (var i = 0; i < 64; i++) {\n for (var j = 0; j < 64; j++) {\n b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j];\n }\n }\n b64_12bitTable = function () { return b64_12bit; };\n return b64_12bit;\n};\n\nfunction uint8ToBase64 (rawData) {\n var numBytes = rawData.byteLength;\n var output = '';\n var segment;\n var table = b64_12bitTable();\n for (var i = 0; i < numBytes - 2; i += 3) {\n segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2];\n output += table[segment >> 12];\n output += table[segment & 0xfff];\n }\n if (numBytes - i === 2) {\n segment = (rawData[i] << 16) + (rawData[i + 1] << 8);\n output += table[segment >> 12];\n output += b64_6bit[(segment & 0xfff) >> 6];\n output += '=';\n } else if (numBytes - i === 1) {\n segment = (rawData[i] << 16);\n output += table[segment >> 12];\n output += '==';\n }\n return output;\n}\n\n});\n\n// file: src/common/builder.js\ndefine(\"cordova/builder\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\n\nfunction each (objects, func, context) {\n for (var prop in objects) {\n if (objects.hasOwnProperty(prop)) {\n func.apply(context, [objects[prop], prop]);\n }\n }\n}\n\nfunction clobber (obj, key, value) {\n exports.replaceHookForTesting(obj, key);\n var needsProperty = false;\n try {\n obj[key] = value;\n } catch (e) {\n needsProperty = true;\n }\n // Getters can only be overridden by getters.\n if (needsProperty || obj[key] !== value) {\n utils.defineGetter(obj, key, function () {\n return value;\n });\n }\n}\n\nfunction assignOrWrapInDeprecateGetter (obj, key, value, message) {\n if (message) {\n utils.defineGetter(obj, key, function () {\n console.log(message);\n delete obj[key];\n clobber(obj, key, value);\n return value;\n });\n } else {\n clobber(obj, key, value);\n }\n}\n\nfunction include (parent, objects, clobber, merge) {\n each(objects, function (obj, key) {\n try {\n var result = obj.path ? require(obj.path) : {};\n\n if (clobber) {\n // Clobber if it doesn't exist.\n if (typeof parent[key] === 'undefined') {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n } else if (typeof obj.path !== 'undefined') {\n // If merging, merge properties onto parent, otherwise, clobber.\n if (merge) {\n recursiveMerge(parent[key], result);\n } else {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n }\n }\n result = parent[key];\n } else {\n // Overwrite if not currently defined.\n if (typeof parent[key] === 'undefined') {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n } else {\n // Set result to what already exists, so we can build children into it if they exist.\n result = parent[key];\n }\n }\n\n if (obj.children) {\n include(result, obj.children, clobber, merge);\n }\n } catch (e) {\n utils.alert('Exception building Cordova JS globals: ' + e + ' for key \"' + key + '\"');\n }\n });\n}\n\n/**\n * Merge properties from one object onto another recursively. Properties from\n * the src object will overwrite existing target property.\n *\n * @param target Object to merge properties into.\n * @param src Object to merge properties from.\n */\nfunction recursiveMerge (target, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop)) {\n if (target.prototype && target.prototype.constructor === target) {\n // If the target object is a constructor override off prototype.\n clobber(target.prototype, prop, src[prop]);\n } else {\n if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n recursiveMerge(target[prop], src[prop]);\n } else {\n clobber(target, prop, src[prop]);\n }\n }\n }\n }\n}\n\nexports.buildIntoButDoNotClobber = function (objects, target) {\n include(target, objects, false, false);\n};\nexports.buildIntoAndClobber = function (objects, target) {\n include(target, objects, true, false);\n};\nexports.buildIntoAndMerge = function (objects, target) {\n include(target, objects, true, true);\n};\nexports.recursiveMerge = recursiveMerge;\nexports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;\nexports.replaceHookForTesting = function () {};\n\n});\n\n// file: src/common/channel.js\ndefine(\"cordova/channel\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\nvar nextGuid = 1;\n\n/**\n * Custom pub-sub \"channel\" that can have functions subscribed to it\n * This object is used to define and control firing of events for\n * cordova initialization, as well as for custom events thereafter.\n *\n * The order of events during page load and Cordova startup is as follows:\n *\n * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed.\n * onNativeReady* Internal event that indicates the Cordova native side is ready.\n * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created.\n * onDeviceReady* User event fired to indicate that Cordova is ready\n * onResume User event fired to indicate a start/resume lifecycle event\n * onPause User event fired to indicate a pause lifecycle event\n *\n * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.\n * All listeners that subscribe after the event is fired will be executed right away.\n *\n * The only Cordova events that user code should register for are:\n * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript\n * pause App has moved to background\n * resume App has returned to foreground\n *\n * Listeners can be registered as:\n * document.addEventListener(\"deviceready\", myDeviceReadyListener, false);\n * document.addEventListener(\"resume\", myResumeListener, false);\n * document.addEventListener(\"pause\", myPauseListener, false);\n *\n * The DOM lifecycle events should be used for saving and restoring state\n * window.onload\n * window.onunload\n *\n */\n\n/**\n * Channel\n * @constructor\n * @param type String the channel name\n */\nvar Channel = function (type, sticky) {\n this.type = type;\n // Map of guid -> function.\n this.handlers = {};\n // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.\n this.state = sticky ? 1 : 0;\n // Used in sticky mode to remember args passed to fire().\n this.fireArgs = null;\n // Used by onHasSubscribersChange to know if there are any listeners.\n this.numHandlers = 0;\n // Function that is called when the first listener is subscribed, or when\n // the last listener is unsubscribed.\n this.onHasSubscribersChange = null;\n};\nvar channel = {\n /**\n * Calls the provided function only after all of the channels specified\n * have been fired. All channels must be sticky channels.\n */\n join: function (h, c) {\n var len = c.length;\n var i = len;\n var f = function () {\n if (!(--i)) h();\n };\n for (var j = 0; j < len; j++) {\n if (c[j].state === 0) {\n throw Error('Can only use join with sticky channels.');\n }\n c[j].subscribe(f);\n }\n if (!len) h();\n },\n /* eslint-disable no-return-assign */\n create: function (type) {\n return channel[type] = new Channel(type, false);\n },\n createSticky: function (type) {\n return channel[type] = new Channel(type, true);\n },\n /* eslint-enable no-return-assign */\n /**\n * cordova Channels that must fire before \"deviceready\" is fired.\n */\n deviceReadyChannelsArray: [],\n deviceReadyChannelsMap: {},\n\n /**\n * Indicate that a feature needs to be initialized before it is ready to be used.\n * This holds up Cordova's \"deviceready\" event until the feature has been initialized\n * and Cordova.initComplete(feature) is called.\n *\n * @param feature {String} The unique feature name\n */\n waitForInitialization: function (feature) {\n if (feature) {\n var c = channel[feature] || this.createSticky(feature);\n this.deviceReadyChannelsMap[feature] = c;\n this.deviceReadyChannelsArray.push(c);\n }\n },\n\n /**\n * Indicate that initialization code has completed and the feature is ready to be used.\n *\n * @param feature {String} The unique feature name\n */\n initializationComplete: function (feature) {\n var c = this.deviceReadyChannelsMap[feature];\n if (c) {\n c.fire();\n }\n }\n};\n\nfunction checkSubscriptionArgument (argument) {\n if (typeof argument !== 'function' && typeof argument.handleEvent !== 'function') {\n throw new Error(\n 'Must provide a function or an EventListener object ' +\n 'implementing the handleEvent interface.'\n );\n }\n}\n\n/**\n * Subscribes the given function to the channel. Any time that\n * Channel.fire is called so too will the function.\n * Optionally specify an execution context for the function\n * and a guid that can be used to stop subscribing to the channel.\n * Returns the guid.\n */\nChannel.prototype.subscribe = function (eventListenerOrFunction, eventListener) {\n checkSubscriptionArgument(eventListenerOrFunction);\n var handleEvent, guid;\n\n if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') {\n // Received an EventListener object implementing the handleEvent interface\n handleEvent = eventListenerOrFunction.handleEvent;\n eventListener = eventListenerOrFunction;\n } else {\n // Received a function to handle event\n handleEvent = eventListenerOrFunction;\n }\n\n if (this.state === 2) {\n handleEvent.apply(eventListener || this, this.fireArgs);\n return;\n }\n\n guid = eventListenerOrFunction.observer_guid;\n if (typeof eventListener === 'object') {\n handleEvent = utils.close(eventListener, handleEvent);\n }\n\n if (!guid) {\n // First time any channel has seen this subscriber\n guid = '' + nextGuid++;\n }\n handleEvent.observer_guid = guid;\n eventListenerOrFunction.observer_guid = guid;\n\n // Don't add the same handler more than once.\n if (!this.handlers[guid]) {\n this.handlers[guid] = handleEvent;\n this.numHandlers++;\n if (this.numHandlers === 1) {\n this.onHasSubscribersChange && this.onHasSubscribersChange();\n }\n }\n};\n\n/**\n * Unsubscribes the function with the given guid from the channel.\n */\nChannel.prototype.unsubscribe = function (eventListenerOrFunction) {\n checkSubscriptionArgument(eventListenerOrFunction);\n var handleEvent, guid, handler;\n\n if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') {\n // Received an EventListener object implementing the handleEvent interface\n handleEvent = eventListenerOrFunction.handleEvent;\n } else {\n // Received a function to handle event\n handleEvent = eventListenerOrFunction;\n }\n\n guid = handleEvent.observer_guid;\n handler = this.handlers[guid];\n if (handler) {\n delete this.handlers[guid];\n this.numHandlers--;\n if (this.numHandlers === 0) {\n this.onHasSubscribersChange && this.onHasSubscribersChange();\n }\n }\n};\n\n/**\n * Calls all functions subscribed to this channel.\n */\nChannel.prototype.fire = function (e) {\n var fail = false; // eslint-disable-line no-unused-vars\n var fireArgs = Array.prototype.slice.call(arguments);\n // Apply stickiness.\n if (this.state === 1) {\n this.state = 2;\n this.fireArgs = fireArgs;\n }\n if (this.numHandlers) {\n // Copy the values first so that it is safe to modify it from within\n // callbacks.\n var toCall = [];\n for (var item in this.handlers) {\n toCall.push(this.handlers[item]);\n }\n for (var i = 0; i < toCall.length; ++i) {\n toCall[i].apply(this, fireArgs);\n }\n if (this.state === 2 && this.numHandlers) {\n this.numHandlers = 0;\n this.handlers = {};\n this.onHasSubscribersChange && this.onHasSubscribersChange();\n }\n }\n};\n\n// defining them here so they are ready super fast!\n// DOM event that is received when the web page is loaded and parsed.\nchannel.createSticky('onDOMContentLoaded');\n\n// Event to indicate the Cordova native side is ready.\nchannel.createSticky('onNativeReady');\n\n// Event to indicate that all Cordova JavaScript objects have been created\n// and it's time to run plugin constructors.\nchannel.createSticky('onCordovaReady');\n\n// Event to indicate that all automatically loaded JS plugins are loaded and ready.\n// FIXME remove this\nchannel.createSticky('onPluginsReady');\n\n// Event to indicate that Cordova is ready\nchannel.createSticky('onDeviceReady');\n\n// Event to indicate a resume lifecycle event\nchannel.create('onResume');\n\n// Event to indicate a pause lifecycle event\nchannel.create('onPause');\n\n// Channels that must fire before \"deviceready\" is fired.\nchannel.waitForInitialization('onCordovaReady');\nchannel.waitForInitialization('onDOMContentLoaded');\n\nmodule.exports = channel;\n\n});\n\n// file: /Users/brodybits/Documents/cordova/cordova-browser/cordova-js-src/confighelper.js\ndefine(\"cordova/confighelper\", function(require, exports, module) {\n\nvar config;\n\nfunction Config(xhr) {\n function loadPreferences(xhr) {\n var parser = new DOMParser();\n var doc = parser.parseFromString(xhr.responseText, \"application/xml\");\n\n var preferences = doc.getElementsByTagName(\"preference\");\n return Array.prototype.slice.call(preferences);\n }\n\n this.xhr = xhr;\n this.preferences = loadPreferences(this.xhr);\n}\n\nfunction readConfig(success, error) {\n var xhr;\n\n if(typeof config != 'undefined') {\n success(config);\n }\n\n function fail(msg) {\n console.error(msg);\n\n if(error) {\n error(msg);\n }\n }\n\n var xhrStatusChangeHandler = function() {\n if (xhr.readyState == 4) {\n if (xhr.status == 200 || xhr.status == 304 || xhr.status === 0 /* file:// */) {\n config = new Config(xhr);\n success(config);\n }\n else {\n fail('[Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: ' + xhr.statusText);\n }\n }\n };\n\n xhr = new XMLHttpRequest();\n xhr.addEventListener(\"load\", xhrStatusChangeHandler);\n\n\n try {\n xhr.open(\"get\", \"/config.xml\", true);\n xhr.send();\n } catch(e) {\n fail('[Browser][cordova.js][readConfig] Could not XHR config.xml: ' + JSON.stringify(e));\n }\n}\n\n/**\n * Reads a preference value from config.xml.\n * Returns preference value or undefined if it does not exist.\n * @param {String} preferenceName Preference name to read */\nConfig.prototype.getPreferenceValue = function getPreferenceValue(preferenceName) {\n var preferenceItem = this.preferences && this.preferences.filter(function(item) {\n return item.attributes.name && item.attributes.name.value === preferenceName;\n });\n\n if(preferenceItem && preferenceItem[0] && preferenceItem[0].attributes && preferenceItem[0].attributes.value) {\n return preferenceItem[0].attributes.value.value;\n }\n};\n\nexports.readConfig = readConfig;\n\n});\n\n// file: /Users/brodybits/Documents/cordova/cordova-browser/cordova-js-src/exec.js\ndefine(\"cordova/exec\", function(require, exports, module) {\n\n/*jslint sloppy:true, plusplus:true*/\n/*global require, module, console */\n\nvar cordova = require('cordova');\nvar execProxy = require('cordova/exec/proxy');\n\n/**\n * Execute a cordova command. It is up to the native side whether this action\n * is synchronous or asynchronous. The native side can return:\n * Synchronous: PluginResult object as a JSON string\n * Asynchronous: Empty string \"\"\n * If async, the native side will cordova.callbackSuccess or cordova.callbackError,\n * depending upon the result of the action.\n *\n * @param {Function} success The success callback\n * @param {Function} fail The fail callback\n * @param {String} service The name of the service to use\n * @param {String} action Action to be run in cordova\n * @param {String[]} [args] Zero or more arguments to pass to the method\n */\nmodule.exports = function (success, fail, service, action, args) {\n\n var proxy = execProxy.get(service, action);\n\n args = args || [];\n\n if (proxy) {\n \n var callbackId = service + cordova.callbackId++;\n \n if (typeof success === \"function\" || typeof fail === \"function\") {\n cordova.callbacks[callbackId] = {success: success, fail: fail};\n }\n try {\n\n \n\n // callbackOptions param represents additional optional parameters command could pass back, like keepCallback or\n // custom callbackId, for example {callbackId: id, keepCallback: true, status: cordova.callbackStatus.JSON_EXCEPTION }\n var onSuccess = function (result, callbackOptions) {\n callbackOptions = callbackOptions || {};\n var callbackStatus;\n // covering both undefined and null.\n // strict null comparison was causing callbackStatus to be undefined\n // and then no callback was called because of the check in cordova.callbackFromNative\n // see CB-8996 Mobilespec app hang on windows\n if (callbackOptions.status !== undefined && callbackOptions.status !== null) {\n callbackStatus = callbackOptions.status;\n }\n else {\n callbackStatus = cordova.callbackStatus.OK;\n }\n cordova.callbackSuccess(callbackOptions.callbackId || callbackId,\n {\n status: callbackStatus,\n message: result,\n keepCallback: callbackOptions.keepCallback || false\n });\n };\n var onError = function (err, callbackOptions) {\n callbackOptions = callbackOptions || {};\n var callbackStatus;\n // covering both undefined and null.\n // strict null comparison was causing callbackStatus to be undefined\n // and then no callback was called because of the check in cordova.callbackFromNative\n // note: status can be 0\n if (callbackOptions.status !== undefined && callbackOptions.status !== null) {\n callbackStatus = callbackOptions.status;\n }\n else {\n callbackStatus = cordova.callbackStatus.OK;\n }\n cordova.callbackError(callbackOptions.callbackId || callbackId,\n {\n status: callbackStatus,\n message: err,\n keepCallback: callbackOptions.keepCallback || false\n });\n };\n proxy(onSuccess, onError, args);\n\n } catch (e) {\n console.log(\"Exception calling native with command :: \" + service + \" :: \" + action + \" ::exception=\" + e);\n }\n } else {\n\n console.log(\"Error: exec proxy not found for :: \" + service + \" :: \" + action);\n \n if(typeof fail === \"function\" ) {\n fail(\"Missing Command Error\");\n }\n }\n};\n\n});\n\n// file: src/common/exec/proxy.js\ndefine(\"cordova/exec/proxy\", function(require, exports, module) {\n\n// internal map of proxy function\nvar CommandProxyMap = {};\n\nmodule.exports = {\n\n // example: cordova.commandProxy.add(\"Accelerometer\",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);\n add: function (id, proxyObj) {\n console.log('adding proxy for ' + id);\n CommandProxyMap[id] = proxyObj;\n return proxyObj;\n },\n\n // cordova.commandProxy.remove(\"Accelerometer\");\n remove: function (id) {\n var proxy = CommandProxyMap[id];\n delete CommandProxyMap[id];\n CommandProxyMap[id] = null;\n return proxy;\n },\n\n get: function (service, action) {\n return (CommandProxyMap[service] ? CommandProxyMap[service][action] : null);\n }\n};\n\n});\n\n// file: src/common/init.js\ndefine(\"cordova/init\", function(require, exports, module) {\n\nvar channel = require('cordova/channel');\nvar cordova = require('cordova');\nvar modulemapper = require('cordova/modulemapper');\nvar platform = require('cordova/platform');\nvar pluginloader = require('cordova/pluginloader');\nvar utils = require('cordova/utils');\n\nvar platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];\n\nfunction logUnfiredChannels (arr) {\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i].state !== 2) {\n console.log('Channel not fired: ' + arr[i].type);\n }\n }\n}\n\nwindow.setTimeout(function () {\n if (channel.onDeviceReady.state !== 2) {\n console.log('deviceready has not fired after 5 seconds.');\n logUnfiredChannels(platformInitChannelsArray);\n logUnfiredChannels(channel.deviceReadyChannelsArray);\n }\n}, 5000);\n\n// Replace navigator before any modules are required(), to ensure it happens as soon as possible.\n// We replace it so that properties that can't be clobbered can instead be overridden.\nfunction replaceNavigator (origNavigator) {\n var CordovaNavigator = function () {};\n CordovaNavigator.prototype = origNavigator;\n var newNavigator = new CordovaNavigator();\n // This work-around really only applies to new APIs that are newer than Function.bind.\n // Without it, APIs such as getGamepads() break.\n if (CordovaNavigator.bind) {\n for (var key in origNavigator) {\n if (typeof origNavigator[key] === 'function') {\n newNavigator[key] = origNavigator[key].bind(origNavigator);\n } else {\n (function (k) {\n utils.defineGetterSetter(newNavigator, key, function () {\n return origNavigator[k];\n });\n })(key);\n }\n }\n }\n return newNavigator;\n}\n\nif (window.navigator) {\n window.navigator = replaceNavigator(window.navigator);\n}\n\nif (!window.console) {\n window.console = {\n log: function () {}\n };\n}\nif (!window.console.warn) {\n window.console.warn = function (msg) {\n this.log('warn: ' + msg);\n };\n}\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onActivated = cordova.addDocumentEventHandler('activated');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\n// Listen for DOMContentLoaded and notify our channel subscribers.\nif (document.readyState === 'complete' || document.readyState === 'interactive') {\n channel.onDOMContentLoaded.fire();\n} else {\n document.addEventListener('DOMContentLoaded', function () {\n channel.onDOMContentLoaded.fire();\n }, false);\n}\n\n// _nativeReady is global variable that the native side can set\n// to signify that the native code is ready. It is a global since\n// it may be called before any cordova JS is ready.\nif (window._nativeReady) {\n channel.onNativeReady.fire();\n}\n\nmodulemapper.clobbers('cordova', 'cordova');\nmodulemapper.clobbers('cordova/exec', 'cordova.exec');\nmodulemapper.clobbers('cordova/exec', 'Cordova.exec');\n\n// Call the platform-specific initialization.\nplatform.bootstrap && platform.bootstrap();\n\n// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.\n// The delay allows the attached modules to be defined before the plugin loader looks for them.\nsetTimeout(function () {\n pluginloader.load(function () {\n channel.onPluginsReady.fire();\n });\n}, 0);\n\n/**\n * Create all cordova objects once native side is ready.\n */\nchannel.join(function () {\n modulemapper.mapModules(window);\n\n platform.initialize && platform.initialize();\n\n // Fire event to notify that all objects are created\n channel.onCordovaReady.fire();\n\n // Fire onDeviceReady event once page has fully loaded, all\n // constructors have run and cordova info has been received from native\n // side.\n channel.join(function () {\n require('cordova').fireDocumentEvent('deviceready');\n }, channel.deviceReadyChannelsArray);\n\n}, platformInitChannelsArray);\n\n});\n\n// file: src/common/init_b.js\ndefine(\"cordova/init_b\", function(require, exports, module) {\n\nvar channel = require('cordova/channel');\nvar cordova = require('cordova');\nvar modulemapper = require('cordova/modulemapper');\nvar platform = require('cordova/platform');\nvar pluginloader = require('cordova/pluginloader');\nvar utils = require('cordova/utils');\n\nvar platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady];\n\n// setting exec\ncordova.exec = require('cordova/exec');\n\nfunction logUnfiredChannels (arr) {\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i].state !== 2) {\n console.log('Channel not fired: ' + arr[i].type);\n }\n }\n}\n\nwindow.setTimeout(function () {\n if (channel.onDeviceReady.state !== 2) {\n console.log('deviceready has not fired after 5 seconds.');\n logUnfiredChannels(platformInitChannelsArray);\n logUnfiredChannels(channel.deviceReadyChannelsArray);\n }\n}, 5000);\n\n// Replace navigator before any modules are required(), to ensure it happens as soon as possible.\n// We replace it so that properties that can't be clobbered can instead be overridden.\nfunction replaceNavigator (origNavigator) {\n var CordovaNavigator = function () {};\n CordovaNavigator.prototype = origNavigator;\n var newNavigator = new CordovaNavigator();\n // This work-around really only applies to new APIs that are newer than Function.bind.\n // Without it, APIs such as getGamepads() break.\n if (CordovaNavigator.bind) {\n for (var key in origNavigator) {\n if (typeof origNavigator[key] === 'function') {\n newNavigator[key] = origNavigator[key].bind(origNavigator);\n } else {\n (function (k) {\n utils.defineGetterSetter(newNavigator, key, function () {\n return origNavigator[k];\n });\n })(key);\n }\n }\n }\n return newNavigator;\n}\nif (window.navigator) {\n window.navigator = replaceNavigator(window.navigator);\n}\n\nif (!window.console) {\n window.console = {\n log: function () {}\n };\n}\nif (!window.console.warn) {\n window.console.warn = function (msg) {\n this.log('warn: ' + msg);\n };\n}\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onActivated = cordova.addDocumentEventHandler('activated');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\n// Listen for DOMContentLoaded and notify our channel subscribers.\nif (document.readyState === 'complete' || document.readyState === 'interactive') {\n channel.onDOMContentLoaded.fire();\n} else {\n document.addEventListener('DOMContentLoaded', function () {\n channel.onDOMContentLoaded.fire();\n }, false);\n}\n\n// _nativeReady is global variable that the native side can set\n// to signify that the native code is ready. It is a global since\n// it may be called before any cordova JS is ready.\nif (window._nativeReady) {\n channel.onNativeReady.fire();\n}\n\n// Call the platform-specific initialization.\nplatform.bootstrap && platform.bootstrap();\n\n// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.\n// The delay allows the attached modules to be defined before the plugin loader looks for them.\nsetTimeout(function () {\n pluginloader.load(function () {\n channel.onPluginsReady.fire();\n });\n}, 0);\n\n/**\n * Create all cordova objects once native side is ready.\n */\nchannel.join(function () {\n modulemapper.mapModules(window);\n\n platform.initialize && platform.initialize();\n\n // Fire event to notify that all objects are created\n channel.onCordovaReady.fire();\n\n // Fire onDeviceReady event once page has fully loaded, all\n // constructors have run and cordova info has been received from native\n // side.\n channel.join(function () {\n require('cordova').fireDocumentEvent('deviceready');\n }, channel.deviceReadyChannelsArray);\n\n}, platformInitChannelsArray);\n\n});\n\n// file: src/common/modulemapper.js\ndefine(\"cordova/modulemapper\", function(require, exports, module) {\n\nvar builder = require('cordova/builder');\nvar moduleMap = define.moduleMap; // eslint-disable-line no-undef\nvar symbolList;\nvar deprecationMap;\n\nexports.reset = function () {\n symbolList = [];\n deprecationMap = {};\n};\n\nfunction addEntry (strategy, moduleName, symbolPath, opt_deprecationMessage) {\n if (!(moduleName in moduleMap)) {\n throw new Error('Module ' + moduleName + ' does not exist.');\n }\n symbolList.push(strategy, moduleName, symbolPath);\n if (opt_deprecationMessage) {\n deprecationMap[symbolPath] = opt_deprecationMessage;\n }\n}\n\n// Note: Android 2.3 does have Function.bind().\nexports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('c', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.merges = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('m', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('d', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.runs = function (moduleName) {\n addEntry('r', moduleName, null);\n};\n\nfunction prepareNamespace (symbolPath, context) {\n if (!symbolPath) {\n return context;\n }\n var parts = symbolPath.split('.');\n var cur = context;\n for (var i = 0, part; part = parts[i]; ++i) { // eslint-disable-line no-cond-assign\n cur = cur[part] = cur[part] || {};\n }\n return cur;\n}\n\nexports.mapModules = function (context) {\n var origSymbols = {};\n context.CDV_origSymbols = origSymbols;\n for (var i = 0, len = symbolList.length; i < len; i += 3) {\n var strategy = symbolList[i];\n var moduleName = symbolList[i + 1];\n var module = require(moduleName);\n // \n if (strategy === 'r') {\n continue;\n }\n var symbolPath = symbolList[i + 2];\n var lastDot = symbolPath.lastIndexOf('.');\n var namespace = symbolPath.substr(0, lastDot);\n var lastName = symbolPath.substr(lastDot + 1);\n\n var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;\n var parentObj = prepareNamespace(namespace, context);\n var target = parentObj[lastName];\n\n if (strategy === 'm' && target) {\n builder.recursiveMerge(target, module);\n } else if ((strategy === 'd' && !target) || (strategy !== 'd')) {\n if (!(symbolPath in origSymbols)) {\n origSymbols[symbolPath] = target;\n }\n builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);\n }\n }\n};\n\nexports.getOriginalSymbol = function (context, symbolPath) {\n var origSymbols = context.CDV_origSymbols;\n if (origSymbols && (symbolPath in origSymbols)) {\n return origSymbols[symbolPath];\n }\n var parts = symbolPath.split('.');\n var obj = context;\n for (var i = 0; i < parts.length; ++i) {\n obj = obj && obj[parts[i]];\n }\n return obj;\n};\n\nexports.reset();\n\n});\n\n// file: src/common/modulemapper_b.js\ndefine(\"cordova/modulemapper_b\", function(require, exports, module) {\n\nvar builder = require('cordova/builder');\nvar symbolList = [];\nvar deprecationMap;\n\nexports.reset = function () {\n symbolList = [];\n deprecationMap = {};\n};\n\nfunction addEntry (strategy, moduleName, symbolPath, opt_deprecationMessage) {\n symbolList.push(strategy, moduleName, symbolPath);\n if (opt_deprecationMessage) {\n deprecationMap[symbolPath] = opt_deprecationMessage;\n }\n}\n\n// Note: Android 2.3 does have Function.bind().\nexports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('c', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.merges = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('m', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) {\n addEntry('d', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.runs = function (moduleName) {\n addEntry('r', moduleName, null);\n};\n\nfunction prepareNamespace (symbolPath, context) {\n if (!symbolPath) {\n return context;\n }\n var parts = symbolPath.split('.');\n var cur = context;\n for (var i = 0, part; part = parts[i]; ++i) { // eslint-disable-line no-cond-assign\n cur = cur[part] = cur[part] || {};\n }\n return cur;\n}\n\nexports.mapModules = function (context) {\n var origSymbols = {};\n context.CDV_origSymbols = origSymbols;\n for (var i = 0, len = symbolList.length; i < len; i += 3) {\n var strategy = symbolList[i];\n var moduleName = symbolList[i + 1];\n var module = require(moduleName);\n // \n if (strategy === 'r') {\n continue;\n }\n var symbolPath = symbolList[i + 2];\n var lastDot = symbolPath.lastIndexOf('.');\n var namespace = symbolPath.substr(0, lastDot);\n var lastName = symbolPath.substr(lastDot + 1);\n\n var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;\n var parentObj = prepareNamespace(namespace, context);\n var target = parentObj[lastName];\n\n if (strategy === 'm' && target) {\n builder.recursiveMerge(target, module);\n } else if ((strategy === 'd' && !target) || (strategy !== 'd')) {\n if (!(symbolPath in origSymbols)) {\n origSymbols[symbolPath] = target;\n }\n builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);\n }\n }\n};\n\nexports.getOriginalSymbol = function (context, symbolPath) {\n var origSymbols = context.CDV_origSymbols;\n if (origSymbols && (symbolPath in origSymbols)) {\n return origSymbols[symbolPath];\n }\n var parts = symbolPath.split('.');\n var obj = context;\n for (var i = 0; i < parts.length; ++i) {\n obj = obj && obj[parts[i]];\n }\n return obj;\n};\n\nexports.reset();\n\n});\n\n// file: /Users/brodybits/Documents/cordova/cordova-browser/cordova-js-src/platform.js\ndefine(\"cordova/platform\", function(require, exports, module) {\n\nmodule.exports = {\n id: 'browser',\n cordovaVersion: '4.2.0', // cordova-js\n\n bootstrap: function() {\n\n var modulemapper = require('cordova/modulemapper');\n var channel = require('cordova/channel');\n\n modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');\n\n channel.onNativeReady.fire();\n\n document.addEventListener(\"visibilitychange\", function(){\n if(document.hidden) {\n channel.onPause.fire();\n }\n else {\n channel.onResume.fire();\n }\n });\n\n // End of bootstrap\n }\n};\n\n});\n\n// file: src/common/pluginloader.js\ndefine(\"cordova/pluginloader\", function(require, exports, module) {\n\nvar modulemapper = require('cordova/modulemapper');\n\n// Helper function to inject a