From 0c090055c5e725fb4d336d756b064eeef7f8bb89 Mon Sep 17 00:00:00 2001 From: David Dan Date: Fri, 3 Oct 2014 22:03:09 -0400 Subject: [PATCH] Initial Commit --- .gitignore | 2 + Gruntfile.js | 161 ++++++++++++++ README.md | 135 ++++++++++++ bower.json | 29 +++ package.json | 56 +++++ release/angular-wamp.js | 407 ++++++++++++++++++++++++++++++++++++ release/angular-wamp.min.js | 4 + src/angular-wamp.js | 133 ++++++++++++ src/autobahn.min.js | 271 ++++++++++++++++++++++++ 9 files changed, 1198 insertions(+) create mode 100644 .gitignore create mode 100644 Gruntfile.js create mode 100644 README.md create mode 100644 bower.json create mode 100644 package.json create mode 100644 release/angular-wamp.js create mode 100644 release/angular-wamp.min.js create mode 100644 src/angular-wamp.js create mode 100644 src/autobahn.min.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7aa4a0b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.tmp diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..c107291 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,161 @@ +/* global module */ +module.exports = function (grunt) { + 'use strict'; + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + meta: { + banner: 'Angular WAMP v2' + }, + + // merge files from src/ into angular-wamp.js + concat: { + app: { + //options: {banner: '<%= meta.banner %>'}, + src: [ + 'src/autobahn.min.js', + 'src/angular-wamp.js' + ], + dest: 'release/angular-wamp.js' + } + }, + + // Run shell commands + shell: { + options: { + stdout: true + }, + protractor_install: { + command: 'node ./node_modules/protractor/bin/webdriver-manager update' + }, + npm_install: { + command: 'npm install' + }, + bower_install: { + command: 'bower install' + } + }, + + // Create local server + connect: { + testserver: { + options: { + hostname: 'localhost', + port: 3030 + } + } + }, + + // Add Angular Annotations + ngAnnotate: { + options: { + preserveComments: 'none' + }, + app: { + files: { + 'release/angular-wamp.js': ['release/angular-wamp.js'] + } + } + }, + + // Minify JavaScript + uglify: { + options: { + preserveComments: 'some' + }, + app: { + files: { + 'release/angular-wamp.min.js': ['release/angular-wamp.js'] + } + } + }, + + // Auto-run tasks on file changes + watch: { + scripts: { + files: ['src/*.js', 'tests/unit/**/*.spec.js', 'tests/lib/**/*.js', 'tests/mocks/**/*.js'], + tasks: ['test:unit', 'notify:watch'], + options: { + interrupt: true, + atBegin: true + } + } + }, + + // Unit tests + karma: { + options: { + configFile: 'tests/automatic_karma.conf.js' + }, + manual: { + configFile: 'tests/manual_karma.conf.js' + }, + singlerun: {}, + watch: { + autowatch: true, + singleRun: false + }, + saucelabs: { + configFile: 'tests/sauce_karma.conf.js' + } + }, + + // End to end (e2e) tests + protractor: { + options: { + configFile: "tests/local_protractor.conf.js" + }, + singlerun: {}, + saucelabs: { + options: { + configFile: "tests/sauce_protractor.conf.js", + args: { + sauceUser: process.env.SAUCE_USERNAME, + sauceKey: process.env.SAUCE_ACCESS_KEY + } + } + } + }, + + // Desktop notificaitons + notify: { + watch: { + options: { + title: 'Grunt Watch', + message: 'Build Finished' + } + } + } + }); + + require('load-grunt-tasks')(grunt); + + // Installation + grunt.registerTask('install', ['shell:protractor_install']); + grunt.registerTask('update', ['shell:npm_install', 'shell:bower_install']); + + // Single run tests + grunt.registerTask('test', ['test:unit', 'test:e2e']); + grunt.registerTask('test:unit', ['karma:singlerun']); + grunt.registerTask('test:e2e', ['connect:testserver', 'protractor:singlerun']); + grunt.registerTask('test:manual', ['karma:manual']); + + // Travis CI testing + grunt.registerTask('test:travis', ['build', 'test:unit']); + + // Sauce tasks + grunt.registerTask('sauce:unit', ['karma:saucelabs']); + grunt.registerTask('sauce:e2e', ['connect:testserver', 'protractor:saucelabs']); + + // Watch tests + grunt.registerTask('test:watch', ['karma:watch']); + grunt.registerTask('test:watch:unit', ['karma:watch']); + + // Build tasks + grunt.registerTask('build', ['concat', 'ngAnnotate', 'uglify']); + + // Default task + grunt.registerTask('default', ['build', 'test']); + + grunt.loadNpmTasks('grunt-ng-annotate'); +}; \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ae03af --- /dev/null +++ b/README.md @@ -0,0 +1,135 @@ + +# AngularWAMP + +AngularWAMP is an AngularJS wrapper for [AutobahnJS](https://github.com/tavendo/AutobahnJS) (v 0.9.5) for WAMP v2 (Web Application Messaging Protocol). + +It simplifies getting WAMP v2 integrated into your AngularJS application. For the most part, it's works just like AutobahnJS, with a couple of angular related changes, which are noted below. + + + +## Installing AngularWAMP + +You can [download](https://github.com/voryx/angular-wamp/archive/master.zip) the zip file or install AngularWAMP via [Bower](http://bower.io/#install-bower): + +```bash +$ bower install angular-wamp --save +``` + +To use AngularWAMP in your project, you need to include the following files in your HTML: + +```html + + + + + +``` +The angular-wamp.min.js file includes a copy of AutobahnJS, so you don't need to include that separately. + +## Documentation + +### Configuration + +Before you can use AngularWAMP, you have to inject the 'vxWamp' module into your application. + +```Javascript +var app = angular.module("myApp", ["vxWamp"]); +``` + +Then configure the connection settings, by passing an options object to ``$wampProvider.init()``. + +```Javascript +app.config(function ($wampProvider) { + $wampProvider.init({ + url: 'ws://127.0.0.1:9000/', + realm: 'realm1' + //Any other AutobahnJS options + }); + }) +``` + +Now the $wamp service is available to be injected into any controller, service or factory. + +```Javascript +app.controller("MyCtrl", function($scope, $wamp) { + + // 1) subscribe to a topic + function onevent(args) { + $scope.hello = args[0]; + } + $wamp.subscribe('com.myapp.hello', onevent); + + // 2) publish an event + $wamp.publish('com.myapp.hello', ['Hello, world!']); + + // 3) register a procedure for remoting + function add2(args) { + return args[0] + args[1]; + } + $wamp.register('com.myapp.add2', add2); + + // 4) call a remote procedure + $wamp.call('com.myapp.add2', [2, 3]).then( + function (res) { + $scope.add2 = res; + }); +}); +``` + +You'll notice that we did not need to wait for the connection to be established before making WAMP calls. That's because, all requests are queued until a connection is established. + +### Events +One area that AngularWAMP differs from AutobahnJS, is in how ``onclose`` and ``onopen`` are handled. In AngularWAMP, they're events that are emitted globally. This has the added benefit of allowing the entire app be aware of the connection state. + +```Javascript +app.controller("MainCtrl", function($scope, $wamp) { + $scope.$on("$wamp.open", function (event, session) { + console.log('We're connected to the WAMP Router!'); + }); + + $scope.$on("$wamp.close", function (event, data) { + $scope.reason = data.reason; + $scope.details = data.details; + }); + +}); +``` + +###Authentication +The other major change from AutobahnJS is authentication. The auth methods can be added to the connection options through the ``$wampProvider`` within ``.config()``. + +```Javascript +app.config(function ($wampProvider) { + $wampProvider.init({ + url: 'ws://127.0.0.1:9000/', + realm: 'realm1' + authmethods: ["myauth"] + }); + }) +``` + +If the router sends a Challenge Message, it gets emitted with the event ``$wamp.onchallange`` that has to return a promise. + +note: This will probably change in the future, if I can figure out a better way to do this. + +```Javascript +$scope.$on("$wamp.onchallenge", function (event, data) { + if (data.method === "myauth"){ + return data.promise.resolve("some_sercet"); + } + //You can also access the following objects: + // data.session + //data.extra +}); +``` + +###Other Properties + +You can also access the ``connection`` and ``session`` through the ``$wamp`` service: + +```Javascript +$thruway.session; +$thruway.connection; +``` + +For more information, you can reference the AutobahnJS [documentation](http://autobahn.ws/js/reference.html). \ No newline at end of file diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..fd00ea9 --- /dev/null +++ b/bower.json @@ -0,0 +1,29 @@ +{ + "name": "angular-wamp", + "version": "0.0.1", + "main": "./release/angular-wamp.min.js", + "authors": [ + "David Dan " + ], + "description": "Angular library for Autobahn.js (WAMP v2)", + "keywords": [ + "WAMP", + "websockets", + "AutobahnJS", + "Thruway", + "Ratchet" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "app/bower_components", + "test", + "tests" + ], + "dependencies": { + "angular": ">= 1.2.0", + "autobahnjs": "./include/autobahn.min.js" + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..75df555 --- /dev/null +++ b/package.json @@ -0,0 +1,56 @@ +{ + "name": "angular-wamp", + "description": "Angular library for Autobahn.js (WAMP v2)", + "version": "0.0.1", + "author": "David Dan ", + "homepage": "https://github.com/voryx/angular-wamp", + "repository": { + "type": "git", + "url": "https://github.com/voryx/angular-wamp.git" + }, + "licenses": [ + { + "type": "MIT" + } + ], + "keywords": [ + "WAMP", + "websockets", + "Autobahn", + "Thruway", + "Ratchet" + ], + "main": "dist/angular-wamp.min.js", + "files": [ + "dist/**", + "LICENSE", + "README.md", + "package.json" + ], + "devDependencies": { + "grunt": "^0.4.1", + "grunt-autoprefixer": "^0.7.3", + "grunt-concurrent": "^0.5.0", + "grunt-contrib-clean": "^0.5.0", + "grunt-contrib-concat": "^0.4.0", + "grunt-contrib-connect": "^0.7.1", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-cssmin": "^0.9.0", + "grunt-contrib-htmlmin": "^0.3.0", + "grunt-contrib-imagemin": "^0.7.0", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-uglify": "^0.4.0", + "grunt-contrib-watch": "^0.6.1", + "grunt-filerev": "^0.2.1", + "grunt-google-cdn": "^0.4.0", + "grunt-newer": "^0.7.0", + "grunt-ng-annotate": "^0.4.0", + "grunt-svgmin": "^0.4.0", + "grunt-usemin": "^2.1.1", + "grunt-wiredep": "^1.7.0", + "jshint-stylish": "^0.2.0", + "load-grunt-tasks": "^0.4.0", + "time-grunt": "^0.3.1" + } +} + diff --git a/release/angular-wamp.js b/release/angular-wamp.js new file mode 100644 index 0000000..1001bb9 --- /dev/null +++ b/release/angular-wamp.js @@ -0,0 +1,407 @@ +/* + + Counter block mode compatible with Dr Brian Gladman fileenc.c + derived from CryptoJS.mode.CTR + Jan Hruby jhruby.web@gmail.com + + (c) 2012 by C?dric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + MIT License (c) copyright 2013-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors */ +!function(la){if("object"==typeof exports)module.exports=la();else if("function"==typeof define&&define.amd)define(la);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.autobahn=la()}}(function(){return function h(p,k,b){function a(d,e){if(!k[d]){if(!p[d]){var q="function"==typeof require&&require;if(!e&&q)return q(d,!0);if(c)return c(d,!0);throw Error("Cannot find module '"+d+"'");}q=k[d]={exports:{}};p[d][0].call(q.exports,function(c){var n= + p[d][1][c];return a(n?n:c)},q,q.exports,h,p,k,b)}return k[d].exports}for(var c="function"==typeof require&&require,e=0;ethis._max_retry_delay&&(this._retry_delay= + this._max_retry_delay);this._retry_count+=1;var a;a=this._retry&&this._retry_count<=this._max_retries?{count:this._retry_count,delay:this._retry_delay,will_retry:!0}:{count:null,delay:null,will_retry:!1};this._retry_delay_growth&&(this._retry_delay*=this._retry_delay_growth);return a};q.prototype.open=function(){function a(){b._transport=b._create_transport();if(b._transport)b._session=new c.Session(b._transport,b._defer,b._options.onchallenge),b._session_close_reason=null,b._session_close_message= + null,b._transport.onopen=function(){b._autoreconnect_reset();b._connect_successes+=1;b._session.join(b._options.realm,b._options.authmethods,b._options.authid)},b._session.onjoin=function(a){if(b.onopen)try{b.onopen(b._session,a)}catch(c){d.debug("Exception raised from app code while firing Connection.onopen()",c)}},b._session.onleave=function(a,c){b._session_close_reason=a;b._session_close_message=c.message||"";b._retry=!1;b._transport.close(1E3)},b._transport.onclose=function(c){b._autoreconnect_reset_timer(); + var e=b._transport=null;0===b._connect_successes?(e="unreachable",b._retry_if_unreachable||(b._retry=!1)):e=c.wasClean?"closed":"lost";c=b._autoreconnect_advance();if(b.onclose){var m={reason:b._session_close_reason,message:b._session_close_message,retry_delay:c.delay,retry_count:c.count,will_retry:c.will_retry};try{var q=b.onclose(e,m)}catch(v){d.debug("Exception raised from app code while firing Connection.onclose()",v)}}b._session&&(b._session._id=null,b._session=null,b._session_close_reason=null, + b._session_close_message=null);b._retry&&!q&&(c.will_retry?(b._is_retrying=!0,d.debug("retrying in "+c.delay+" s"),b._retry_timer=setTimeout(a,1E3*c.delay)):d.debug("giving up trying to reconnect"))};else if(b._retry=!1,b.onclose)b.onclose("unsupported",{reason:null,message:null,retry_delay:null,retry_count:null,will_retry:!1})}var b=this;if(b._transport)throw"connection already open (or opening)";b._autoreconnect_reset();b._retry=!0;a()};q.prototype.close=function(a,c){if(!this._transport&&!this._is_retrying)throw"connection already closed"; + this._retry=!1;this._session&&this._session.isOpen?this._session.leave(a,c):this._transport&&this._transport.close(1E3)};Object.defineProperty(q.prototype,"defer",{get:function(){return this._defer}});Object.defineProperty(q.prototype,"session",{get:function(){return this._session}});Object.defineProperty(q.prototype,"isOpen",{get:function(){return this._session&&this._session.isOpen?!0:!1}});Object.defineProperty(q.prototype,"isConnected",{get:function(){return this._transport?!0:!1}});Object.defineProperty(q.prototype, + "transport",{get:function(){return this._transport?this._transport:{info:{type:"none",url:null,protocol:null}}}});Object.defineProperty(q.prototype,"isRetrying",{get:function(){return this._is_retrying}});k.Connection=q}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./autobahn.js":4,"./log.js":7,"./session.js":16,"./util.js":19,when:77}],7:[function(h,p,k){(function(b){var a=function(){};"AUTOBAHN_DEBUG"in b&&AUTOBAHN_DEBUG&&"console"in b&&(a=function(){console.log.apply(console, + arguments)});k.debug=a}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],8:[function(h,p,k){h("./polyfill/object");h("./polyfill/array");h("./polyfill/string");h("./polyfill/function");h("./polyfill/console");h("./polyfill/typedarray");h("./polyfill/json")},{"./polyfill/array":9,"./polyfill/console":10,"./polyfill/function":11,"./polyfill/json":12,"./polyfill/object":13,"./polyfill/string":14,"./polyfill/typedarray":15}],9:[function(h,p,k){"function"!==typeof Array.prototype.reduce&& +(Array.prototype.reduce=function(b){var a,c,e,d;if(null===this||"undefined"===typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!==typeof b)throw new TypeError(b+" is not a function");c=Object(this);a=c.length>>>0;d=0;if(2<=arguments.length)e=arguments[1];else{for(;d=a)throw new TypeError("Reduce of empty array with no initial value");e=c[d++]}for(;da&&(a+=this.length);0>a&&(a=0);for(var c=this.length;aa&&(a+=this.length);a>this.length-1&&(a=this.length-1);for(a++;0>>0)-1,e;if(2<=arguments.length)e=arguments[1];else{for(;0<= + c&&!c in a;)c--;if(0>c)throw new TypeError("Reduce of empty array with no initial value");e=a[c--]}for(;0<=c;c--)c in a&&(e=b(e,a[c],c,a));return e})},{}],10:[function(h,p,k){(function(b){(function(a){a||(a=window.console={log:function(a,b,d,m,q){},info:function(a,b,d,m,q){},warn:function(a,b,d,m,q){},error:function(a,b,d,m,q){},assert:function(a,b){}});"object"===typeof a.log&&(a.log=Function.prototype.call.bind(a.log,a),a.info=Function.prototype.call.bind(a.info,a),a.warn=Function.prototype.call.bind(a.warn, + a),a.error=Function.prototype.call.bind(a.error,a),a.debug=Function.prototype.call.bind(a.info,a));"group"in a||(a.group=function(b){a.info("\n--- "+b+" ---\n")});"groupEnd"in a||(a.groupEnd=function(){a.log("\n")});"assert"in a||(a.assert=function(a,b){if(!a)try{throw Error("assertion failed: "+b);}catch(d){setTimeout(function(){throw d;},0)}});"time"in a||function(){var b={};a.time=function(a){b[a]=(new Date).getTime()};a.timeEnd=function(e){var d=(new Date).getTime();a.info(e+": "+(e in b?d-b[e]: + 0)+"ms")}}()})(b.console)}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],11:[function(h,p,k){Function.prototype.bind||(Function.prototype.bind=function(b){var a=this,c=Array.prototype.slice.call(arguments,1);return function(){return a.apply(b,Array.prototype.concat.apply(c,arguments))}})},{}],12:[function(h,p,k){"object"!==typeof JSON&&(JSON={});(function(){function b(a){return 10>a?"0"+a:a}function a(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b= + g[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,g){var d,e,v,y,H=m,f,x=g[b];x&&"object"===typeof x&&"function"===typeof x.toJSON&&(x=x.toJSON(b));"function"===typeof n&&(x=n.call(g,b,x));switch(typeof x){case "string":return a(x);case "number":return isFinite(x)?String(x):"null";case "boolean":case "null":return String(x);case "object":if(!x)return"null";m+=q;f=[];if("[object Array]"===Object.prototype.toString.apply(x)){y=x.length; + for(d=0;dt)throw RangeError("Array too large for polyfill"); + var f;for(f=0;f>f}function l(a,b){var f=32-b;return a<>>f}function z(a){return[a&255]}function h(a){return n(a[0],8)}function w(a){return[a&255]}function v(a){return l(a[0],8)}function y(a){a=aa(Number(a));return[0>a?0:255>8&255,a&255]}function f(a){return n(a[0]<<8|a[1],16)}function x(a){return[a>>8&255,a&255]}function J(a){return l(a[0]<<8|a[1],16)}function A(a){return[a>>24&255,a>>16&255,a>>8&255, + a&255]}function k(a){return n(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function p(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}function B(a){return l(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function E(a,b,f){function c(a){var b=V(a);a-=b;return 0.5>a?b:0.5a?1:0):0===a?(e=l=0,d=-Infinity===1/a?1:0):(d=0>a,a=u(a),a>=O(2,1-g)?(l=R(V(S(a)/r),1023),e=c(a/O(2,l)*O(2,f)),2<=e/O(2,f)&&(l+=1,e=1), + l>g?(l=(1<>=1;c.reverse();d=c.join("");a=(1<c?-0:0}function Q(a){return I(a,11,52)}function N(a){return E(a,11,52)}function F(a){return I(a,8,23)}function G(a){return E(a,8,23)}var s=void 0,t=1E5,r=Math.LN2,u=Math.abs,V=Math.floor,S=Math.log,M=Math.max,R=Math.min,O=Math.pow,aa=Math.round;(function(){var a=Object.defineProperty,b;try{b=Object.defineProperty({},"x",{})}catch(f){b=!1}a&&b||(Object.defineProperty=function(b,f,c){if(a)try{return a(b, + f,c)}catch(g){}if(b!==Object(b))throw TypeError("Object.defineProperty called on non-object");Object.prototype.__defineGetter__&&"get"in c&&Object.prototype.__defineGetter__.call(b,f,c.get);Object.prototype.__defineSetter__&&"set"in c&&Object.prototype.__defineSetter__.call(b,f,c.set);"value"in c&&(b[f]=c.value);return b})})();(function(){function l(a){a>>=0;if(0>a)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:a});Object.defineProperty(this, + "_bytes",{value:Array(a)});for(var b=0;b>=0;if(0>a)throw RangeError("length is not a small enough positive integer.");Object.defineProperty(this,"length",{value:a});Object.defineProperty(this,"byteLength",{value:a*this.BYTES_PER_ELEMENT});Object.defineProperty(this,"buffer",{value:new l(this.byteLength)});Object.defineProperty(this,"byteOffset",{value:0})}.apply(this,arguments);if(1<=arguments.length&& + "object"===e(arguments[0])&&arguments[0]instanceof n)return function(a){if(this.constructor!==a.constructor)throw TypeError();var b=a.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new l(b)});Object.defineProperty(this,"byteLength",{value:b});Object.defineProperty(this,"byteOffset",{value:0});Object.defineProperty(this,"length",{value:a.length});for(b=0;b>>=0;if(b>a.byteLength)throw RangeError("byteOffset out of range");if(b%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(f===s){var c=a.byteLength-b;if(c%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");f=c/this.BYTES_PER_ELEMENT}else f>>>=0,c=f*this.BYTES_PER_ELEMENT;if(b+c>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer"); + Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this,"byteLength",{value:c});Object.defineProperty(this,"byteOffset",{value:b});Object.defineProperty(this,"length",{value:f})}.apply(this,arguments);throw TypeError();}function r(a,b,f){var c=function(){Object.defineProperty(this,"constructor",{value:c});n.apply(this,arguments);g(this)};"__proto__"in c?c.__proto__=n:(c.from=n.from,c.of=n.of);c.BYTES_PER_ELEMENT=a;var d=function(){};d.prototype=t;c.prototype=new d;Object.defineProperty(c.prototype, + "BYTES_PER_ELEMENT",{value:a});Object.defineProperty(c.prototype,"_pack",{value:b});Object.defineProperty(c.prototype,"_unpack",{value:f});return c}a.ArrayBuffer=a.ArrayBuffer||l;Object.defineProperty(n,"from",{value:function(a){return new this(a)}});Object.defineProperty(n,"of",{value:function(){return new this(arguments)}});var t={};n.prototype=t;Object.defineProperty(n.prototype,"_getter",{value:function(a){if(1>arguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(a>=this.length)return s; + var b=[],f,c;f=0;for(c=this.byteOffset+a*this.BYTES_PER_ELEMENT;farguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(!(a>=this.length)){var f=this._pack(b),c,d;c=0;for(d=this.byteOffset+a*this.BYTES_PER_ELEMENT;c>>0,d=M(d,0);a>>=0;a=0>a?M(d+a,0):R(a,d);b>>=0;b=0>b?M(d+b,0):R(b,d);f=f===s?d:f>>0;f=0>f?M(d+f,0):R(f,d);d=R(f-b,d-a);from>>0;if(!m(a))throw TypeError();for(var d=0;d>>0,d=M(d,0);b>>=0;b=0>b?M(d+b,0):R(b,d);f=f===s?d:f>>0;for(d=0>f?M(d+f,0):R(f,d);b>>0;if(!m(a))throw TypeError(); + for(var d=[],g=0;g>>0;if(!m(a))throw TypeError();for(var c=1>>0;if(!m(a))throw TypeError();for(var c=1>>0;if(!m(a))throw TypeError();for(var d=0;d>>0;if(0===f)return-1;var c=0,d;0=f)return-1;for(c=0<=c?c:M(f-u(c),0);c>>0,c=Array(f),d=0;d>>0;if(0===f)return-1;var c=f;1>>0;if(!m(a))throw TypeError();var d=[];d.length=c;for(var g=0;g>>0;if(!m(a))throw TypeError();if(0===f&&1===arguments.length)throw TypeError();var c=0,d;for(d=2<=arguments.length?arguments[1]:b._getter(c++);c>>0;if(!m(a))throw TypeError(); + if(0===f&&1===arguments.length)throw TypeError();var f=f-1,c;for(c=2<=arguments.length?arguments[1]:b._getter(f--);0<=f;)c=a.call(s,c,b._getter(f),f,b),f--;return c}});Object.defineProperty(n.prototype,"reverse",{value:function(){if(this===s||null===this)throw TypeError();for(var a=Object(this),b=a.length>>>0,f=V(b/2),c=0,b=b-1;carguments.length)throw SyntaxError("Not enough arguments"); + var f,c,d,g,l,n;if("object"===typeof arguments[0]&&arguments[0].constructor===this.constructor){f=arguments[0];c=arguments[1]>>>0;if(c+f.length>this.length)throw RangeError("Offset plus length of array is out of range");n=this.byteOffset+c*this.BYTES_PER_ELEMENT;c=f.length*this.BYTES_PER_ELEMENT;if(f.buffer===this.buffer){d=[];g=0;for(l=f.byteOffset;g>>0;c=arguments[1]>>>0;if(c+d>this.length)throw RangeError("Offset plus length of array is out of range");for(g=0;g>>0,d=a>>0,d=0>d?M(c+d,0):R(d,c),g=b===s?c:b>>0,c=0>g?M(c+g,0):R(g,c), + g=new f.constructor(c-d),l=0;d>>0;if(!m(a))throw TypeError();for(var d=0;d>>0,c=Array(f),d=0;d>=0;b>>=0;1>arguments.length&&(a=0);2>arguments.length&&(b=this.length);0>a&&(a=this.length+a);0>b&&(b=this.length+b);var f=this.length;a=0>a?0:a>f?f:a;f=this.length;f=(0>b?0:b>f?f:b)-a;0>f&&(f=0);return new this.constructor(this.buffer,this.byteOffset+a*this.BYTES_PER_ELEMENT,f)}});var E=r(1,z,h),S=r(1,w,v),I=r(1,y,v),O=r(2,H,f),aa=r(2,x,J),ha=r(4,A,k),da=r(4,p,B), + U=r(4,G,F),$=r(8,N,Q);a.Int8Array=b.Int8Array=a.Int8Array||E;a.Uint8Array=b.Uint8Array=a.Uint8Array||S;a.Uint8ClampedArray=b.Uint8ClampedArray=a.Uint8ClampedArray||I;a.Int16Array=b.Int16Array=a.Int16Array||O;a.Uint16Array=b.Uint16Array=a.Uint16Array||aa;a.Int32Array=b.Int32Array=a.Int32Array||ha;a.Uint32Array=b.Uint32Array=a.Uint32Array||da;a.Float32Array=b.Float32Array=a.Float32Array||U;a.Float64Array=b.Float64Array=a.Float64Array||$})();(function(){function b(a,f){return m(a.get)?a.get(f):a[f]} + function f(a,b,c){if(!(a instanceof ArrayBuffer||"ArrayBuffer"===d(a)))throw TypeError();b>>>=0;if(b>a.byteLength)throw RangeError("byteOffset out of range");c=c===s?a.byteLength-b:c>>>0;if(b+c>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this,"byteLength",{value:c});Object.defineProperty(this,"byteOffset",{value:b})}function c(f){return function(c,d){c>>>=0;if(c+f.BYTES_PER_ELEMENT> + this.byteLength)throw RangeError("Array index out of range");c+=this.byteOffset;for(var g=new a.Uint8Array(this.buffer,c,f.BYTES_PER_ELEMENT),n=[],e=0;e>>=0;if(c+f.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");d=new f([d]);d=new a.Uint8Array(d.buffer);var n=[],e;for(e=0;e must be a string");d.assert(!b||Array.isArray(b),"Session.join: must be an array []");d.assert(!c|| + "string"===typeof c,"Session.join: must be a string");if(this.isOpen)throw"session already open";this._goodbye_sent=!1;this._realm=a;var f={};f.roles=WAMP_FEATURES;b&&(f.authmethods=b);c&&(f.authid=c);this._send_wamp([1,a,f])};w.prototype.leave=function(a,b){d.assert(!a||"string"===typeof a,"Session.leave: must be a string");d.assert(!b||"string"===typeof b,"Session.leave: must be a string");if(!this.isOpen)throw"session not open";a||(a="wamp.close.normal");var c={};b&& + (c.message=b);this._send_wamp([6,c,a]);this._goodbye_sent=!0};w.prototype.call=function(b,c,g,f){d.assert("string"===typeof b,"Session.call: must be a string");d.assert(!c||Array.isArray(c),"Session.call: must be an array []");d.assert(!g||g instanceof Object,"Session.call: must be an object {}");d.assert(!f||f instanceof Object,"Session.call: must be an object {}");if(!this.isOpen)throw"session not open";var l=a(),n=this._defer();this._call_reqs[l]=[n,f];b=[48, + l,f||{},this.resolve(b)];c&&(b.push(c),g&&b.push(g));this._send_wamp(b);return n.promise.then?n.promise:n};w.prototype.publish=function(b,c,g,f){d.assert("string"===typeof b,"Session.publish: must be a string");d.assert(!c||Array.isArray(c),"Session.publish: must be an array []");d.assert(!g||g instanceof Object,"Session.publish: must be an object {}");d.assert(!f||f instanceof Object,"Session.publish: must be an object {}");if(!this.isOpen)throw"session not open"; + var l=f&&f.acknowledge,n=null,e=a();l&&(n=this._defer(),this._publish_reqs[e]=[n,f]);b=[16,e,f||{},this.resolve(b)];c&&(b.push(c),g&&b.push(g));this._send_wamp(b);if(n)return n.promise.then?n.promise:n};w.prototype.subscribe=function(b,c,g){d.assert("string"===typeof b,"Session.subscribe: must be a string");d.assert("function"===typeof c,"Session.subscribe: must be a function");d.assert(!g||g instanceof Object,"Session.subscribe: must be an object {}");if(!this.isOpen)throw"session not open"; + var f=a(),l=this._defer();this._subscribe_reqs[f]=[l,b,c,g];c=[32,f];g?c.push(g):c.push({});c.push(this.resolve(b));this._send_wamp(c);return l.promise.then?l.promise:l};w.prototype.register=function(b,c,g){d.assert("string"===typeof b,"Session.register: must be a string");d.assert("function"===typeof c,"Session.register: must be a function");d.assert(!g||g instanceof Object,"Session.register: must be an object {}");if(!this.isOpen)throw"session not open";var f=a(), + l=this._defer();this._register_reqs[f]=[l,b,c,g];c=[64,f];g?c.push(g):c.push({});c.push(this.resolve(b));this._send_wamp(c);return l.promise.then?l.promise:l};w.prototype.unsubscribe=function(b){d.assert(b instanceof l,"Session.unsubscribe: must be an instance of class autobahn.Subscription");if(!this.isOpen)throw"session not open";if(!(b.active&&b.id in this._subscriptions))throw"subscription not active";var c=this._subscriptions[b.id],g=c.indexOf(b);if(-1===g)throw"subscription not active"; + c.splice(g,1);b.active=!1;g=this._defer();c.length?g.resolve(!1):(c=a(),this._unsubscribe_reqs[c]=[g,b.id],this._send_wamp([34,c,b.id]));return g.promise.then?g.promise:g};w.prototype.unregister=function(b){d.assert(b instanceof z,"Session.unregister: must be an instance of class autobahn.Registration");if(!this.isOpen)throw"session not open";if(!(b.active&&b.id in this._registrations))throw"registration not active";var c=a(),g=this._defer();this._unregister_reqs[c]=[g,b];this._send_wamp([66, + c,b.id]);return g.promise.then?g.promise:g};w.prototype.prefix=function(a,b){d.assert("string"===typeof a,"Session.prefix: must be a string");d.assert(!b||"string"===typeof b,"Session.prefix: must be a string or falsy");b?this._prefixes[a]=b:a in this._prefixes&&delete this._prefixes[a]};w.prototype.resolve=function(a){d.assert("string"===typeof a,"Session.resolve: must be a string");var b=a.indexOf(":");if(0<=b){var c=a.substring(0,b);if(c in this._prefixes)return this._prefixes[c]+ + "."+a.substring(b+1);throw"cannot resolve CURIE prefix '"+c+"'";}return a};k.Session=w;k.Invocation=m;k.Event=q;k.Result=g;k.Error=n;k.Subscription=l;k.Registration=z;k.Publication=P}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./log.js":7,"./util.js":19,when:77,"when/function":54}],17:[function(h,p,k){function b(b){a.assert(void 0!==b.url,"options.url missing");a.assert("string"===typeof b.url,"options.url must be a string");this._options=b}var a=h("../util.js"), + c=h("../log.js");h("when");b.prototype.type="longpoll";b.prototype.create=function(){var b=this;c.debug("longpoll.Factory.create");var d={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"longpoll",url:null,protocol:"wamp.2.json"},_run:function(){var m=null,q=!1,g=b._options.request_timeout||2E3;a.http_post(b._options.url+"/open",JSON.stringify({protocols:["wamp.2.json"]}),g).then(function(n){function l(){c.debug("longpoll.Transport: polling for message ..."); + a.http_post(z+"/receive",null,g).then(function(a){a&&(a=JSON.parse(a),c.debug("longpoll.Transport: message received",a),d.onmessage(a));q||l()},function(a){c.debug("longpoll.Transport: could not receive message",a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport receive failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}m=JSON.parse(n);var z=b._options.url+"/"+m.transport;d.info.url=z;c.debug("longpoll.Transport: open",m);d.close=function(b,l){if(q)throw"transport is already closing"; + q=!0;a.http_post(z+"/close",null,g).then(function(){c.debug("longpoll.Transport: transport closed");d.onclose({code:1E3,reason:"transport closed",wasClean:!0})},function(a){c.debug("longpoll.Transport: could not close transport",a.code,a.text)})};d.send=function(b){if(q)throw"transport is closing or closed already";c.debug("longpoll.Transport: sending message ...",b);b=JSON.stringify(b);a.http_post(z+"/send",b,g).then(function(){c.debug("longpoll.Transport: message sent")},function(a){c.debug("longpoll.Transport: could not send message", + a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport send failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})};l();d.onopen()},function(a){c.debug("longpoll.Transport: could not open transport",a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport open failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}};d._run();return d};k.Factory=b},{"../log.js":7,"../util.js":19,when:77}],18:[function(h,p,k){(function(b){function a(a){c.assert(void 0!==a.url,"options.url missing"); + c.assert("string"===typeof a.url,"options.url must be a string");a.protocols?c.assert(Array.isArray(a.protocols),"options.protocols must be an array"):a.protocols=["wamp.2.json"];this._options=a}var c=h("../util.js"),e=h("../log.js");a.prototype.type="websocket";a.prototype.create=function(){var a=this,c={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"websocket",url:null,protocol:"wamp.2.json"}};"window"in b?function(){var b;if("WebSocket"in + window)b=a._options.protocols?new window.WebSocket(a._options.url,a._options.protocols):new window.WebSocket(a._options.url);else if("MozWebSocket"in window)b=a._options.protocols?new window.MozWebSocket(a._options.url,a._options.protocols):new window.MozWebSocket(a._options.url);else throw"browser does not support WebSocket";b.onmessage=function(a){e.debug("WebSocket transport receive",a.data);a=JSON.parse(a.data);c.onmessage(a)};b.onopen=function(){c.info.url=a._options.url;c.onopen()};b.onclose= + function(a){c.onclose({code:a.code,reason:a.message,wasClean:a.wasClean})};c.send=function(a){a=JSON.stringify(a);e.debug("WebSocket transport send",a);b.send(a)};c.close=function(a,c){b.close(a,c)}}():function(){var b=h("ws"),g,n;a._options.protocols?(n=a._options.protocols,Array.isArray(n)&&(n=n.join(",")),g=new b(a._options.url,{protocol:n})):g=new b(a._options.url);c.send=function(a){a=JSON.stringify(a);g.send(a,{binary:!1})};c.close=function(a,b){g.close()};g.on("open",function(){c.onopen()}); + g.on("message",function(a,b){if(!b.binary){var d=JSON.parse(a);c.onmessage(d)}});g.on("close",function(a,b){c.onclose({code:a,reason:b,wasClean:1E3===a})});g.on("error",function(a){c.onclose({code:1006,reason:"",wasClean:!1})})}();return c};k.Factory=a}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../log.js":7,"../util.js":19,ws:78}],19:[function(h,p,k){(function(b){var a=h("./log.js"),c=h("when"),e=function(a,c){if(!a){if(e.useDebugger||"AUTOBAHN_DEBUG"in b&& + AUTOBAHN_DEBUG)debugger;throw Error(c||"Assertion failed!");}};k.rand_normal=function(a,b){var c,g;do c=2*Math.random()-1,g=2*Math.random()-1,g=c*c+g*g;while(1<=g||0==g);g=Math.sqrt(-2*Math.log(g)/g);return(a||0)+c*g*(b||1)};k.assert=e;k.http_post=function(b,e,q){a.debug("new http_post request",b,e,q);var g=c.defer(),n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var a=1223===n.status?204:n.status;200===a&&g.resolve(n.responseText);if(204===a)g.resolve();else{var b=null; + try{b=n.statusText}catch(c){}g.reject({code:a,text:b})}}};n.open("POST",b,!0);n.setRequestHeader("Content-type","application/json; charset=utf-8");0b;b++)a[b]=128>b?b<<1:b<<1^283;for(var c=0,v=0,b=0;256>b;b++){var k=v^v<<1^v<<2^v<<3^v<<4,k=k>>>8^k&255^99;e[c]=k;d[k]=c;var A=a[c],p=a[A],C=a[p],B=257*a[k]^16843008*k;m[c]=B<<24|B>>>8;q[c]=B<<16|B>>>16;g[c]=B<<8|B>>>24;n[c]=B;B=16843009*C^65537*p^257*A^16843008*c;l[k]=B<<24|B>>>8;z[k]=B<<16|B>>>16;h[k]=B<< +8|B>>>24;w[k]=B;c?(c=A^a[a[a[C^A]]],v^=a[a[v]]):c=v=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],c=c.AES=a.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,a=4*((this._nRounds=c+6)+1),d=this._keySchedule=[],g=0;g>>24]<<24|e[n>>>16&255]<<16|e[n>>>8&255]<<8|e[n&255]):(n=n<<8|n>>>24,n=e[n>>>24]<<24|e[n>>>16&255]<<16|e[n>>>8&255]<<8|e[n&255],n^=v[g/c|0]<<24);d[g]=d[g-c]^n}b=this._invKeySchedule=[];for(c=0;cc||4>=g?n:l[e[n>>>24]]^z[e[n>>>16&255]]^h[e[n>>>8&255]]^w[e[n&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,m,q,g,n,e)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3];a[b+3]=c;this._doCryptBlock(a,b,this._invKeySchedule,l,z,h,w,d);c=a[b+1];a[b+1]=a[b+3];a[b+3]=c},_doCryptBlock:function(a,b,c,d,g,l,n,e){for(var m=this._nRounds,z=a[b]^c[0],q=a[b+1]^c[1],v=a[b+2]^c[2],h=a[b+3]^c[3],w=4,P=1;P>>24]^g[q>>>16&255]^l[v>>>8& + 255]^n[h&255]^c[w++],p=d[q>>>24]^g[v>>>16&255]^l[h>>>8&255]^n[z&255]^c[w++],r=d[v>>>24]^g[h>>>16&255]^l[z>>>8&255]^n[q&255]^c[w++],h=d[h>>>24]^g[z>>>16&255]^l[q>>>8&255]^n[v&255]^c[w++],z=k,q=p,v=r;k=(e[z>>>24]<<24|e[q>>>16&255]<<16|e[v>>>8&255]<<8|e[h&255])^c[w++];p=(e[q>>>24]<<24|e[v>>>16&255]<<16|e[h>>>8&255]<<8|e[z&255])^c[w++];r=(e[v>>>24]<<24|e[h>>>16&255]<<16|e[z>>>8&255]<<8|e[q&255])^c[w++];h=(e[h>>>24]<<24|e[z>>>16&255]<<16|e[q>>>8&255]<<8|e[v&255])^c[w++];a[b]=k;a[b+1]=p;a[b+2]=r;a[b+3]= + h},keySize:8});b.AES=a._createHelper(c)})();return b.AES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],21:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){b.lib.Cipher||function(a){var c=b.lib,e=c.Base,d=c.WordArray,m=c.BufferedBlockAlgorithm,q=b.enc.Base64,g=b.algo.EvpKDF,n=c.Cipher=m.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a, + b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){m.reset.call(this);this._doReset()},process:function(a){this._append(a);return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(a){return{encrypt:function(b,c,d){return("string"==typeof c?y:v).encrypt(a,b,c,d)}, + decrypt:function(b,c,d){return("string"==typeof c?y:v).decrypt(a,b,c,d)}}}}()});c.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=b.mode={},z=c.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a;this._iv=b}}),l=l.CBC=function(){function b(c,d,f){var g=this._iv;g?this._iv=a:g=this._prevBlock;for(var l=0;l>>2]&255}};c.BlockCipher=n.extend({cfg:n.cfg.extend({mode:l,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b= + this._process(!0),a.unpad(b);return b},blockSize:4});var w=c.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),l=(b.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?d.create([1398893684,1701076831]).concat(a).concat(b):b).toString(q)},parse:function(a){a=q.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=d.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a, + salt:c})}},v=c.SerializableCipher=e.extend({cfg:e.extend({format:l}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var g=a.createEncryptor(c,d);b=g.finalize(b);g=g.cfg;return w.create({ciphertext:b,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),e=(b.kdf= +{}).OpenSSL={execute:function(a,b,c,l){l||(l=d.random(8));a=g.create({keySize:b+c}).compute(a,l);c=d.create(a.words.slice(b),4*c);a.sigBytes=4*b;return w.create({key:a,iv:c,salt:l})}},y=c.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:e}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize, + b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}()})},{"./core":22}],22:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a():b.CryptoJS=a()})(this,function(){var b=b||function(a,b){var e={},d=e.lib={},m=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;b&&c.mixIn(b);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a, + arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),q=d.WordArray=m.extend({init:function(a,d){a=this.words=a||[];this.sigBytes=d!=b?d:4*a.length},toString:function(a){return(a||n).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var g=0;g>>2]|= + (c[g>>>2]>>>24-g%4*8&255)<<24-(d+g)%4*8;else if(65535>>2]=c[g>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8;b.length=a.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((g>>>4).toString(16));c.push((g&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new q.init(c,b/2)}},l=g.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<< + 24-d%4*8;return new q.init(c,b)}},z=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(l.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return l.parse(unescape(encodeURIComponent(a)))}},h=d.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,g=c.sigBytes,l= + this.blockSize,n=g/(4*l),n=b?a.ceil(n):a.max((n|0)-this._minBufferSize,0);b=n*l;g=a.min(4*b,g);if(b){for(var e=0;e>>2]>>>24-q%4*8&255)<<16|(b[q+1>>>2]>>>24-(q+1)%4*8&255)<<8|b[q+2>>>2]>>>24-(q+2)%4*8&255,n=0;4>n&&q+0.75*n>>6*(3-n)&63));if(b=m.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(b){var e=b.length,d=this._map,m=d.charAt(64);m&&(m=b.indexOf(m),-1!=m&&(e=m));for(var m=[],q=0,g=0;g>>6-g%4*2;m[q>>>2]|=(n| +l)<<24-q%4*8;q++}return a.create(m,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();return b.enc.Base64})},{"./core":22}],24:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(){function a(a){return a<<8&4278255360|a>>>8&16711935}var c=b.lib.WordArray,e=b.enc;e.Utf16=e.Utf16BE={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],g=0;g>>2]>>>16-g% +4*8&65535));return c.join("")},parse:function(a){for(var b=a.length,e=[],g=0;g>>1]|=a.charCodeAt(g)<<16-g%2*16;return c.create(e,2*b)}};e.Utf16LE={stringify:function(b){var c=b.words;b=b.sigBytes;for(var e=[],g=0;g>>2]>>>16-g%4*8&65535);e.push(String.fromCharCode(n))}return e.join("")},parse:function(b){for(var e=b.length,q=[],g=0;g>>1]|=a(b.charCodeAt(g)<<16-g%2*16);return c.create(q,2*e)}}})();return b.enc.Utf16})},{"./core":22}],25:[function(h,p,k){(function(b, + a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha1"),h("./hmac")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.Base,e=a.WordArray,a=b.algo,d=a.EvpKDF=c.extend({cfg:c.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),l=e.create(),z=l.words,h=c.keySize,c=c.iterations;z.lengthm&&(e=b.finalize(e));e.clamp();for(var q=this._oKey=e.clone(),g=this._iKey=e.clone(),n=q.words,l=g.words,z=0;z>>2]|=a[q]<<24-q%4*8;c.call(this,m,b)}else c.apply(this,arguments)}).prototype=a}})();return b.lib.WordArray})},{"./core":22}],30:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){function c(a,b,c,d,g,l,f){a=a+(b&c|~b&d)+g+f;return(a<>>32-l)+b}function e(a,b,c,d,g,l,f){a=a+(b&d|c&~d)+g+f;return(a<>>32-l)+b}function d(a,b,c,d,g,l,f){a=a+(b^c^d)+g+f;return(a<>>32-l)+b}function m(a,b,c,d,g,l,f){a= + a+(c^(b|~d))+g+f;return(a<>>32-l)+b}var q=b.lib,g=q.WordArray,n=q.Hasher,q=b.algo,l=[];(function(){for(var b=0;64>b;b++)l[b]=4294967296*a.abs(a.sin(b+1))|0})();q=q.MD5=n.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var n=b+g,q=a[n];a[n]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}var g=this._hash.words,n=a[b+0],q=a[b+1],h=a[b+2],f=a[b+3],k=a[b+4],p=a[b+5],A=a[b+6],L=a[b+7],C=a[b+8],B=a[b+ + 9],E=a[b+10],I=a[b+11],Q=a[b+12],N=a[b+13],F=a[b+14],G=a[b+15],s=g[0],t=g[1],r=g[2],u=g[3],s=c(s,t,r,u,n,7,l[0]),u=c(u,s,t,r,q,12,l[1]),r=c(r,u,s,t,h,17,l[2]),t=c(t,r,u,s,f,22,l[3]),s=c(s,t,r,u,k,7,l[4]),u=c(u,s,t,r,p,12,l[5]),r=c(r,u,s,t,A,17,l[6]),t=c(t,r,u,s,L,22,l[7]),s=c(s,t,r,u,C,7,l[8]),u=c(u,s,t,r,B,12,l[9]),r=c(r,u,s,t,E,17,l[10]),t=c(t,r,u,s,I,22,l[11]),s=c(s,t,r,u,Q,7,l[12]),u=c(u,s,t,r,N,12,l[13]),r=c(r,u,s,t,F,17,l[14]),t=c(t,r,u,s,G,22,l[15]),s=e(s,t,r,u,q,5,l[16]),u=e(u,s,t,r,A,9,l[17]), + r=e(r,u,s,t,I,14,l[18]),t=e(t,r,u,s,n,20,l[19]),s=e(s,t,r,u,p,5,l[20]),u=e(u,s,t,r,E,9,l[21]),r=e(r,u,s,t,G,14,l[22]),t=e(t,r,u,s,k,20,l[23]),s=e(s,t,r,u,B,5,l[24]),u=e(u,s,t,r,F,9,l[25]),r=e(r,u,s,t,f,14,l[26]),t=e(t,r,u,s,C,20,l[27]),s=e(s,t,r,u,N,5,l[28]),u=e(u,s,t,r,h,9,l[29]),r=e(r,u,s,t,L,14,l[30]),t=e(t,r,u,s,Q,20,l[31]),s=d(s,t,r,u,p,4,l[32]),u=d(u,s,t,r,C,11,l[33]),r=d(r,u,s,t,I,16,l[34]),t=d(t,r,u,s,F,23,l[35]),s=d(s,t,r,u,q,4,l[36]),u=d(u,s,t,r,k,11,l[37]),r=d(r,u,s,t,L,16,l[38]),t=d(t, + r,u,s,E,23,l[39]),s=d(s,t,r,u,N,4,l[40]),u=d(u,s,t,r,n,11,l[41]),r=d(r,u,s,t,f,16,l[42]),t=d(t,r,u,s,A,23,l[43]),s=d(s,t,r,u,B,4,l[44]),u=d(u,s,t,r,Q,11,l[45]),r=d(r,u,s,t,G,16,l[46]),t=d(t,r,u,s,h,23,l[47]),s=m(s,t,r,u,n,6,l[48]),u=m(u,s,t,r,L,10,l[49]),r=m(r,u,s,t,F,15,l[50]),t=m(t,r,u,s,p,21,l[51]),s=m(s,t,r,u,Q,6,l[52]),u=m(u,s,t,r,f,10,l[53]),r=m(r,u,s,t,E,15,l[54]),t=m(t,r,u,s,q,21,l[55]),s=m(s,t,r,u,C,6,l[56]),u=m(u,s,t,r,G,10,l[57]),r=m(r,u,s,t,A,15,l[58]),t=m(t,r,u,s,N,21,l[59]),s=m(s,t, + r,u,k,6,l[60]),u=m(u,s,t,r,I,10,l[61]),r=m(r,u,s,t,h,15,l[62]),t=m(t,r,u,s,B,21,l[63]);g[0]=g[0]+s|0;g[1]=g[1]+t|0;g[2]=g[2]+r|0;g[3]=g[3]+u|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,g=8*b.sigBytes;c[g>>>5]|=128<<24-g%32;var l=a.floor(d/4294967296);c[(g+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;c[(g+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;b.sigBytes=4*(c.length+1);this._process();b=this._hash;c=b.words;for(d=0;4>d;d++)g=c[d], + c[d]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;return b},clone:function(){var a=n.clone.call(this);a._hash=this._hash.clone();return a}});b.MD5=n._createHelper(q);b.HmacMD5=n._createHmacHelper(q)})(Math);return b.MD5})},{"./core":22}],31:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.mode.CFB=function(){function a(a,b,c,q){var g=this._iv;g?(g=g.slice(0),this._iv=void 0):g=this._prevBlock;q.encryptBlock(g, + 0);for(q=0;q>24&255)){var b=a>>16&255,c=a>>8&255,g=a&255;255===b?(b=0,255===c?(c=0,255===g?g=0:++g):++c):++b;a=0+(b<<16)+(c<<8);a+=g}else a+=16777216;return a}var c=b.lib.BlockCipherMode.extend(),e=c.Encryptor=c.extend({processBlock:function(b,c){var e=this._cipher,g=e.blockSize,n=this._iv,l=this._counter;n&&(l=this._counter=n.slice(0),this._iv=void 0);n=l;0===(n[0]=a(n[0]))&&(n[1]=a(n[1]));l=l.slice(0);e.encryptBlock(l,0); + for(e=0;e>>2]|=d<<24-e%4*8;a.sigBytes+=d},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};return b.pad.Ansix923})},{"./cipher-core":21,"./core":22}],37:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){b.pad.Iso10126={pad:function(a,c){var e=4*c,e=e-a.sigBytes%e;a.concat(b.lib.WordArray.random(e-1)).concat(b.lib.WordArray.create([e<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};return b.pad.Iso10126})},{"./cipher-core":21,"./core":22}],38:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.pad.Iso97971={pad:function(a,c){a.concat(b.lib.WordArray.create([2147483648], + 1));b.pad.ZeroPadding.pad(a,c)},unpad:function(a){b.pad.ZeroPadding.unpad(a);a.sigBytes--}};return b.pad.Iso97971})},{"./cipher-core":21,"./core":22}],39:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.pad.NoPadding={pad:function(){},unpad:function(){}};return b.pad.NoPadding})},{"./cipher-core":21,"./core":22}],40:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){b.pad.ZeroPadding={pad:function(a,b){var e=4*b;a.clamp();a.sigBytes+=e-(a.sigBytes%e||e)},unpad:function(a){for(var b=a.words,e=a.sigBytes-1;!(b[e>>>2]>>>24-e%4*8&255);)e--;a.sigBytes=e+1}};return b.pad.ZeroPadding})},{"./cipher-core":21,"./core":22}],41:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha1"),h("./hmac")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.Base,e=a.WordArray,a=b.algo,d=a.HMAC,m=a.PBKDF2= + c.extend({cfg:c.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,l=d.create(c.hasher,a),m=e.create(),h=e.create([1]),w=m.words,k=h.words,y=c.keySize,c=c.iterations;w.lengthc;c++)d[c]=b[c];b[0]=b[0]+1295307597+this._b|0;b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0;b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0;b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0;b[4]=b[4]+ +3545052371+(b[3]>>>0>>0?1:0)|0;b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0;b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0;b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0;this._b=b[7]>>>0>>0?1:0;for(c=0;8>c;c++){var e=a[c]+b[c],h=e&65535,q=e>>>16;m[c]=((h*h>>>17)+h*q>>>15)+q*q^((e&4294901760)*e|0)+((e&65535)*e|0)}a[0]=m[0]+(m[7]<<16|m[7]>>>16)+(m[6]<<16|m[6]>>>16)|0;a[1]=m[1]+(m[0]<<8|m[0]>>>24)+m[7]|0;a[2]=m[2]+(m[1]<<16|m[1]>>>16)+(m[0]<<16|m[0]>>>16)|0;a[3]=m[3]+(m[2]<<8|m[2]>>>24)+ +m[1]|0;a[4]=m[4]+(m[3]<<16|m[3]>>>16)+(m[2]<<16|m[2]>>>16)|0;a[5]=m[5]+(m[4]<<8|m[4]>>>24)+m[3]|0;a[6]=m[6]+(m[5]<<16|m[5]>>>16)+(m[4]<<16|m[4]>>>16)|0;a[7]=m[7]+(m[6]<<8|m[6]>>>24)+m[5]|0}var c=b.lib.StreamCipher,e=[],d=[],m=[],h=b.algo.RabbitLegacy=c.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,d=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>> +16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],e=this._b=0;4>e;e++)a.call(this);for(e=0;8>e;e++)b[e]^=d[e+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,e=c>>>16|d&4294901760,m=d<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=d;b[3]^=m;b[4]^=c;b[5]^=e;b[6]^=d;b[7]^=m;for(e=0;4>e;e++)a.call(this)}},_doProcessBlock:function(b,c){var d=this._X;a.call(this); + e[0]=d[0]^d[5]>>>16^d[3]<<16;e[1]=d[2]^d[7]>>>16^d[5]<<16;e[2]=d[4]^d[1]>>>16^d[7]<<16;e[3]=d[6]^d[3]>>>16^d[1]<<16;for(d=0;4>d;d++)e[d]=(e[d]<<8|e[d]>>>24)&16711935|(e[d]<<24|e[d]>>>8)&4278255360,b[c+d]^=e[d]},blockSize:4,ivSize:2});b.RabbitLegacy=c._createHelper(h)})();return b.RabbitLegacy})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],43:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){(function(){function a(){for(var a=this._X,b=this._C,c=0;8>c;c++)d[c]=b[c];b[0]=b[0]+1295307597+this._b|0;b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0;b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0;b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0;b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0;b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0;b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0;b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0;this._b=b[7]>>>0>>0?1:0;for(c= + 0;8>c;c++){var e=a[c]+b[c],h=e&65535,q=e>>>16;m[c]=((h*h>>>17)+h*q>>>15)+q*q^((e&4294901760)*e|0)+((e&65535)*e|0)}a[0]=m[0]+(m[7]<<16|m[7]>>>16)+(m[6]<<16|m[6]>>>16)|0;a[1]=m[1]+(m[0]<<8|m[0]>>>24)+m[7]|0;a[2]=m[2]+(m[1]<<16|m[1]>>>16)+(m[0]<<16|m[0]>>>16)|0;a[3]=m[3]+(m[2]<<8|m[2]>>>24)+m[1]|0;a[4]=m[4]+(m[3]<<16|m[3]>>>16)+(m[2]<<16|m[2]>>>16)|0;a[5]=m[5]+(m[4]<<8|m[4]>>>24)+m[3]|0;a[6]=m[6]+(m[5]<<16|m[5]>>>16)+(m[4]<<16|m[4]>>>16)|0;a[7]=m[7]+(m[6]<<8|m[6]>>>24)+m[5]|0}var c=b.lib.StreamCipher, + e=[],d=[],m=[],h=b.algo.Rabbit=c.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,d=0;4>d;d++)b[d]=(b[d]<<8|b[d]>>>24)&16711935|(b[d]<<24|b[d]>>>8)&4278255360;for(var e=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],d=this._b=0;4> + d;d++)a.call(this);for(d=0;8>d;d++)b[d]^=e[d+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,e=c>>>16|d&4294901760,m=d<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=d;b[3]^=m;b[4]^=c;b[5]^=e;b[6]^=d;b[7]^=m;for(d=0;4>d;d++)a.call(this)}},_doProcessBlock:function(b,c){var d=this._X;a.call(this);e[0]=d[0]^d[5]>>>16^d[3]<<16;e[1]=d[2]^d[7]>>>16^d[5]<<16;e[2]=d[4]^d[1]>>>16^d[7]<<16;e[3]=d[6]^d[3]>>>16^d[1]<<16;for(d=0;4>d;d++)e[d]= + (e[d]<<8|e[d]>>>24)&16711935|(e[d]<<24|e[d]>>>8)&4278255360,b[c+d]^=e[d]},blockSize:4,ivSize:2});b.Rabbit=c._createHelper(h)})();return b.Rabbit})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],44:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){var b=(b+1)%256,c= + (c+a[b])%256,h=a[b];a[b]=a[c];a[c]=h;d|=a[(a[b]+a[c])%256]<<24-8*e}this._i=b;this._j=c;return d}var c=b.lib.StreamCipher,e=b.algo,d=e.RC4=c.extend({_doReset:function(){for(var a=this._key,b=a.words,a=a.sigBytes,c=this._S=[],d=0;256>d;d++)c[d]=d;for(var e=d=0;256>d;d++){var h=d%a,e=(e+c[d]+(b[h>>>2]>>>24-h%4*8&255))%256,h=c[d];c[d]=c[e];c[e]=h}this._i=this._j=0},_doProcessBlock:function(b,c){b[c]^=a.call(this)},keySize:8,ivSize:0});b.RC4=c._createHelper(d);e=e.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}), + _doReset:function(){d._doReset.call(this);for(var b=this.cfg.drop;0>>32-b}a=b.lib;var e=a.WordArray,d=a.Hasher;a=b.algo;var h=e.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12, + 0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),q=e.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=e.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8, + 6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),n=e.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=e.create([0,1518500249,1859775393,2400959708,2840853838]),z=e.create([1352829926,1548603684,1836072691,2053994217,0]);a=a.RIPEMD160=d.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])}, + _doProcessBlock:function(a,b){for(var d=0;16>d;d++){var e=b+d,k=a[e];a[e]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var e=this._hash.words,k=l.words,f=z.words,p=h.words,J=q.words,A=g.words,L=n.words,C,B,E,I,Q,N,F,G,s,t;N=C=e[0];F=B=e[1];G=E=e[2];s=I=e[3];t=Q=e[4];for(var r,d=0;80>d;d+=1)r=C+a[b+p[d]]|0,r=16>d?r+((B^E^I)+k[0]):32>d?r+((B&E|~B&I)+k[1]):48>d?r+(((B|~E)^I)+k[2]):64>d?r+((B&I|E&~I)+k[3]):r+((B^(E|~I))+k[4]),r|=0,r=c(r,A[d]),r=r+Q|0,C=Q,Q=I,I=c(E,10),E=B,B=r,r=N+a[b+J[d]]|0,r=16> + d?r+((F^(G|~s))+f[0]):32>d?r+((F&s|G&~s)+f[1]):48>d?r+(((F|~G)^s)+f[2]):64>d?r+((F&G|~F&s)+f[3]):r+((F^G^s)+f[4]),r|=0,r=c(r,L[d]),r=r+t|0,N=t,t=s,s=c(G,10),G=F,F=r;r=e[1]+E+s|0;e[1]=e[2]+I+t|0;e[2]=e[3]+Q+N|0;e[3]=e[4]+C+F|0;e[4]=e[0]+B+G|0;e[0]=r},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;5> + c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.RIPEMD160=d._createHelper(a);b.HmacRIPEMD160=d._createHmacHelper(a)})(Math);return b.RIPEMD160})},{"./core":22}],46:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.WordArray,e=a.Hasher,d=[],a=b.algo.SHA1=e.extend({_doReset:function(){this._hash=new c.init([1732584193, + 4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,e=c[0],l=c[1],h=c[2],k=c[3],w=c[4],p=0;80>p;p++){if(16>p)d[p]=a[b+p]|0;else{var y=d[p-3]^d[p-8]^d[p-14]^d[p-16];d[p]=y<<1|y>>>31}y=(e<<5|e>>>27)+w+d[p];y=20>p?y+((l&h|~l&k)+1518500249):40>p?y+((l^h^k)+1859775393):60>p?y+((l&h|l&k|h&k)-1894007588):y+((l^h^k)-899497514);w=k;k=h;h=l<<30|l>>>2;l=e;e=y}c[0]=c[0]+e|0;c[1]=c[1]+l|0;c[2]=c[2]+h|0;c[3]=c[3]+k|0;c[4]=c[4]+w|0},_doFinalize:function(){var a= + this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296);b[(d+64>>>9<<4)+15]=c;a.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var a=e.clone.call(this);a._hash=this._hash.clone();return a}});b.SHA1=e._createHelper(a);b.HmacSHA1=e._createHmacHelper(a)})();return b.SHA1})},{"./core":22}],47:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha256")):a(b.CryptoJS)})(this,function(b){(function(){var a= + b.lib.WordArray,c=b.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=e._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=e._createHelper(c);b.HmacSHA224=e._createHmacHelper(c)})();return b.SHA224})},{"./core":22,"./sha256":48}],48:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){var c= + b.lib,e=c.WordArray,d=c.Hasher,c=b.algo,h=[],q=[];(function(){function b(c){for(var d=a.sqrt(c),g=2;g<=d;g++)if(!(c%g))return!1;return!0}function c(a){return 4294967296*(a-(a|0))|0}for(var d=2,g=0;64>g;)b(d)&&(8>g&&(h[g]=c(a.pow(d,0.5))),q[g]=c(a.pow(d,1/3)),g++),d++})();var g=[],c=c.SHA256=d.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],h=c[2],m=c[3],k=c[4],f=c[5],p=c[6],J=c[7],A=0;64>A;A++){if(16>A)g[A]=a[b+ +A]|0;else{var L=g[A-15],C=g[A-2];g[A]=((L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3)+g[A-7]+((C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10)+g[A-16]}L=J+((k<<26|k>>>6)^(k<<21|k>>>11)^(k<<7|k>>>25))+(k&f^~k&p)+q[A]+g[A];C=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&h^e&h);J=p;p=f;f=k;k=m+L|0;m=h;h=e;e=d;d=L+C|0}c[0]=c[0]+d|0;c[1]=c[1]+e|0;c[2]=c[2]+h|0;c[3]=c[3]+m|0;c[4]=c[4]+k|0;c[5]=c[5]+f|0;c[6]=c[6]+p|0;c[7]=c[7]+J|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,g=8*b.sigBytes;c[g>>> +5]|=128<<24-g%32;c[(g+64>>>9<<4)+14]=a.floor(d/4294967296);c[(g+64>>>9<<4)+15]=d;b.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.SHA256=d._createHelper(c);b.HmacSHA256=d._createHmacHelper(c)})(Math);return b.SHA256})},{"./core":22}],49:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core")):a(b.CryptoJS)})(this,function(b){(function(a){var c=b.lib,e=c.WordArray,d=c.Hasher, + h=b.x64.Word,c=b.algo,q=[],g=[],n=[];(function(){for(var a=1,b=0,c=0;24>c;c++){q[a+5*b]=(c+1)*(c+2)/2%64;var d=(2*a+3*b)%5,a=b%5,b=d}for(a=0;5>a;a++)for(b=0;5>b;b++)g[a+5*b]=b+(2*a+3*b)%5*5;a=1;for(b=0;24>b;b++){for(var e=d=c=0;7>e;e++){if(a&1){var l=(1<l?d^=1<a;a++)l[a]=h.create()})();c=c.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]= + new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;e>>24)&16711935|(h<<24|h>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,m=c[e];m.high^=f;m.low^=h}for(d=0;24>d;d++){for(e=0;5>e;e++){for(var k=h=0,p=0;5>p;p++)m=c[e+5*p],h^=m.high,k^=m.low;m=l[e];m.high=h;m.low=k}for(e=0;5>e;e++)for(m=l[(e+4)%5],h=l[(e+1)%5],f=h.high,p=h.low,h=m.high^(f<<1|p>>>31),k= + m.low^(p<<1|f>>>31),p=0;5>p;p++)m=c[e+5*p],m.high^=h,m.low^=k;for(f=1;25>f;f++)m=c[f],e=m.high,m=m.low,p=q[f],32>p?(h=e<>>32-p,k=m<>>32-p):(h=m<>>64-p,k=e<>>64-p),m=l[g[f]],m.high=h,m.low=k;m=l[0];e=c[0];m.high=e.high;m.low=e.low;for(e=0;5>e;e++)for(p=0;5>p;p++)f=e+5*p,m=c[f],h=l[f],f=l[(e+1)%5+5*p],k=l[(e+2)%5+5*p],m.high=h.high^~f.high&k.high,m.low=h.low^~f.low&k.low;m=c[0];e=n[d];m.high^=e.high;m.low^=e.low}},_doFinalize:function(){var b=this._data,c=b.words,d=8*b.sigBytes, + g=32*this.blockSize;c[d>>>5]|=1<<24-d%32;c[(a.ceil((d+1)/g)*g>>>5)-1]|=128;b.sigBytes=4*c.length;this._process();for(var b=this._state,c=this.cfg.outputLength/8,d=c/8,g=[],l=0;l>>24)&16711935|(f<<24|f>>>8)&4278255360,h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;g.push(h);g.push(f)}return new e.init(g,c)},clone:function(){for(var a=d.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});b.SHA3=d._createHelper(c); + b.HmacSHA3=d._createHmacHelper(c)})(Math);return b.SHA3})},{"./core":22,"./x64-core":53}],50:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core"),h("./sha512")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.x64,c=a.Word,e=a.WordArray,a=b.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697), + new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});b.SHA384=d._createHelper(a);b.HmacSHA384=d._createHmacHelper(a)})();return b.SHA384})},{"./core":22,"./sha512":51,"./x64-core":53}],51:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(){return d.create.apply(d, + arguments)}var c=b.lib.Hasher,e=b.x64,d=e.Word,h=e.WordArray,e=b.algo,q=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774, + 944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480), + a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452, + 2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316, + 1246189591)],g=[];(function(){for(var b=0;80>b;b++)g[b]=a()})();e=e.SHA512=c.extend({_doReset:function(){this._hash=new h.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],h=c[2],m=c[3],k=c[4],f=c[5],p= + c[6],c=c[7],J=d.high,A=d.low,L=e.high,C=e.low,B=h.high,E=h.low,I=m.high,Q=m.low,N=k.high,F=k.low,G=f.high,s=f.low,t=p.high,r=p.low,u=c.high,V=c.low,S=J,M=A,R=L,O=C,aa=B,ea=E,ma=I,fa=Q,X=N,T=F,ja=G,ia=s,ka=t,ga=r,ha=u,da=V,U=0;80>U;U++){var $=g[U];if(16>U)var W=$.high=a[b+2*U]|0,D=$.low=a[b+2*U+1]|0;else{var W=g[U-15],D=W.high,Y=W.low,W=(D>>>1|Y<<31)^(D>>>8|Y<<24)^D>>>7,Y=(Y>>>1|D<<31)^(Y>>>8|D<<24)^(Y>>>7|D<<25),ca=g[U-2],D=ca.high,K=ca.low,ca=(D>>>19|K<<13)^(D<<3|K>>>29)^D>>>6,K=(K>>>19|D<<13)^(K<< + 3|D>>>29)^(K>>>6|D<<26),D=g[U-7],na=D.high,ba=g[U-16],Z=ba.high,ba=ba.low,D=Y+D.low,W=W+na+(D>>>0>>0?1:0),D=D+K,W=W+ca+(D>>>0>>0?1:0),D=D+ba,W=W+Z+(D>>>0>>0?1:0);$.high=W;$.low=D}var na=X&ja^~X&ka,ba=T&ia^~T&ga,$=S&R^S&aa^R&aa,pa=M&O^M&ea^O&ea,Y=(S>>>28|M<<4)^(S<<30|M>>>2)^(S<<25|M>>>7),ca=(M>>>28|S<<4)^(M<<30|S>>>2)^(M<<25|S>>>7),K=q[U],qa=K.high,oa=K.low,K=da+((T>>>14|X<<18)^(T>>>18|X<<14)^(T<<23|X>>>9)),Z=ha+((X>>>14|T<<18)^(X>>>18|T<<14)^(X<<23|T>>>9))+(K>>>0>>0?1:0),K=K+ba,Z=Z+ + na+(K>>>0>>0?1:0),K=K+oa,Z=Z+qa+(K>>>0>>0?1:0),K=K+D,Z=Z+W+(K>>>0>>0?1:0),D=ca+pa,$=Y+$+(D>>>0>>0?1:0),ha=ka,da=ga,ka=ja,ga=ia,ja=X,ia=T,T=fa+K|0,X=ma+Z+(T>>>0>>0?1:0)|0,ma=aa,fa=ea,aa=R,ea=O,R=S,O=M,M=K+D|0,S=Z+$+(M>>>0>>0?1:0)|0}A=d.low=A+M;d.high=J+S+(A>>>0>>0?1:0);C=e.low=C+O;e.high=L+R+(C>>>0>>0?1:0);E=h.low=E+ea;h.high=B+aa+(E>>>0>>0?1:0);Q=m.low=Q+fa;m.high=I+ma+(Q>>>0>>0?1:0);F=k.low=F+T;k.high=N+X+(F>>>0>>0?1:0);s=f.low=s+ia;f.high=G+ja+(s>>>0>> +0?1:0);r=p.low=r+ga;p.high=t+ka+(r>>>0>>0?1:0);V=c.low=V+da;c.high=u+ha+(V>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296);b[(d+128>>>10<<5)+31]=c;a.sigBytes=4*b.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});b.SHA512=c._createHelper(e);b.HmacSHA512=c._createHmacHelper(e)})(); + return b.SHA512})},{"./core":22,"./x64-core":53}],52:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c;this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c;this._rBlock^=c<c;c++){var d=k[c]-1;b[c]=a[d>>>5]>>> +31-d%32&1}a=this._subKeys=[];for(d=0;16>d;d++){for(var f=a[d]=[],e=n[d],c=0;24>c;c++)f[c/6|0]|=b[(g[c]-1+e)%28]<<31-c%6,f[4+(c/6|0)]|=b[28+(g[c+24]-1+e)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>=4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}b=this._invSubKeys=[];for(c=0;16>c;c++)b[c]=a[15-c]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(b,d,e){this._lBlock=b[d];this._rBlock=b[d+1]; + a.call(this,4,252645135);a.call(this,16,65535);c.call(this,2,858993459);c.call(this,8,16711935);a.call(this,1,1431655765);for(var g=0;16>g;g++){for(var f=e[g],h=this._lBlock,m=this._rBlock,n=0,k=0;8>k;k++)n|=l[k][((m^f[k])&p[k])>>>0];this._lBlock=m;this._rBlock=h^n}e=this._lBlock;this._lBlock=this._rBlock;this._rBlock=e;a.call(this,1,1431655765);c.call(this,8,16711935);c.call(this,2,858993459);a.call(this,16,65535);a.call(this,4,252645135);b[d]=this._lBlock;b[d+1]=this._rBlock},keySize:2,ivSize:2, + blockSize:2});b.DES=e._createHelper(P);h=h.TripleDES=e.extend({_doReset:function(){var a=this._key.words;this._des1=P.createEncryptor(d.create(a.slice(0,2)));this._des2=P.createEncryptor(d.create(a.slice(2,4)));this._des3=P.createEncryptor(d.create(a.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b);this._des2.decryptBlock(a,b);this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b);this._des2.encryptBlock(a,b);this._des1.decryptBlock(a,b)},keySize:6, + ivSize:2,blockSize:2});b.TripleDES=e._createHelper(h)})();return b.TripleDES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],53:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){var c=b.lib,e=c.Base,d=c.WordArray,c=b.x64={};c.Word=e.extend({init:function(a,b){this.high=a;this.low=b}});c.WordArray=e.extend({init:function(b,c){b=this.words=b||[];this.sigBytes=c!=a?c:8*b.length},toX32:function(){for(var a= + this.words,b=a.length,c=[],e=0;e>>0,h=Array(f),l,m,p;for(l=0;larguments.length?e:3= 2.8.0",ws:">= 0.4.31","crypto-js":">= 3.1.2-2"},devDependencies:{browserify:">= 3.28.1",nodeunit:">= 0.8.6"},repository:{type:"git",url:"git://github.com/tavendo/AutobahnJS.git"},keywords:["WAMP","WebSocket","RPC","PubSub"],author:"Tavendo GmbH",license:"MIT"}},{}]},{},[4])(4)}); +/** + * @ngdoc service + * @name vxWamp.$wamp + * @description + */ +angular.module('vxWamp', []) + .provider('$wamp', function () { + 'use strict'; + var options; + + return { + /** + * $wampProvider + * @param i + */ + init: function (i) { + options = i || {}; + }, + $get: ["$rootScope", "$q", function ($rootScope, $q) { + var callbackQueue = [], connection; + var onChallengeDeferred = $q.defer(); + + var onchallenge = function (session, method, extra) { + + $rootScope.$broadcast("$wamp.onchallenge", { + promise: onChallengeDeferred, + session: session, + method: method, + extra: extra + }); + + return onChallengeDeferred.promise; + }; + + options = angular.extend({onchallenge: onchallenge}, options); + + connection = new autobahn.Connection(options); + connection.onopen = function (session) { + //Call any callbacks that were queued up before the connection was established + var call; + while (callbackQueue.length > 0) { + call = callbackQueue.shift(); + call.method.apply(call.object, call.args); + } + + console.log("Congrats! You're connected to the WAMP server!"); + $rootScope.$broadcast("$wamp.open", session); + + }; + + connection.onclose = function (reason, details) { + console.log("Connection Closed: ", reason); + $rootScope.$broadcast("$wamp.close", {reason: reason, details: details}); + + }; + + + return { + connection: connection, + session: connection.session, + open: function () { + connection.open(); + }, + close: function () { + connection.close(); + }, + subscribe: function (topic, handler, options) { + + if (!connection.isOpen) { + callbackQueue.push({object: this, method: this.subscribe, args: [topic, handler, options]}); + } else { + return $q.when(connection.session.subscribe(topic, handler, options)); + } + + return $q.defer().promise; + }, + unsubscribe: function (subscription) { + + if (!connection.isOpen) { + callbackQueue.push({object: this, method: this.unsubscribe, args: [subscription]}); + } else { + return $q.when(connection.session.unsubscribe(subscription)); + } + + return $q.defer().promise; + }, + publish: function (topic, args, kwargs, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.publish, + args: [topic, args, kwargs, options] + }); + } else { + return $q.when(connection.session.publish(topic, args, kwargs, options)); + } + + return $q.defer().promise; + }, + register: function (procedure, endpoint, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.register, + args: [procedure, endpoint, options] + }); + } else { + return $q.when(connection.session.register(procedure, endpoint, options)); + } + + return $q.defer().promise; + }, + call: function (procedure, args, kwargs, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.call, + args: [procedure, args, kwargs, options] + }); + } else { + return $q.when(connection.session.call(procedure, args, kwargs, options)); + } + + return $q.defer().promise; + } + }; + }] + }; + + }); + + + diff --git a/release/angular-wamp.min.js b/release/angular-wamp.min.js new file mode 100644 index 0000000..5719461 --- /dev/null +++ b/release/angular-wamp.min.js @@ -0,0 +1,4 @@ +!function(a){if("object"==typeof exports)module.exports=a();else if("function"==typeof define&&define.amd)define(a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.autobahn=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw Error("Cannot find module '"+g+"'")}i=c[g]={exports:{}},b[g][0].call(i.exports,function(a){var c=b[g][1][a];return e(c?c:a)},i,i.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gthis._max_retry_delay&&(this._retry_delay=this._max_retry_delay),this._retry_count+=1;var a;return a=this._retry&&this._retry_count<=this._max_retries?{count:this._retry_count,delay:this._retry_delay,will_retry:!0}:{count:null,delay:null,will_retry:!1},this._retry_delay_growth&&(this._retry_delay*=this._retry_delay_growth),a},i.prototype.open=function(){function a(){b._transport=b._create_transport(),b._transport?(b._session=new e.Session(b._transport,b._defer,b._options.onchallenge),b._session_close_reason=null,b._session_close_message=null,b._transport.onopen=function(){b._autoreconnect_reset(),b._connect_successes+=1,b._session.join(b._options.realm,b._options.authmethods,b._options.authid)},b._session.onjoin=function(a){if(b.onopen)try{b.onopen(b._session,a)}catch(c){g.debug("Exception raised from app code while firing Connection.onopen()",c)}},b._session.onleave=function(a,c){b._session_close_reason=a,b._session_close_message=c.message||"",b._retry=!1,b._transport.close(1e3)},b._transport.onclose=function(c){b._autoreconnect_reset_timer();var d=b._transport=null;if(0===b._connect_successes?(d="unreachable",b._retry_if_unreachable||(b._retry=!1)):d=c.wasClean?"closed":"lost",c=b._autoreconnect_advance(),b.onclose){var e={reason:b._session_close_reason,message:b._session_close_message,retry_delay:c.delay,retry_count:c.count,will_retry:c.will_retry};try{var f=b.onclose(d,e)}catch(h){g.debug("Exception raised from app code while firing Connection.onclose()",h)}}b._session&&(b._session._id=null,b._session=null,b._session_close_reason=null,b._session_close_message=null),b._retry&&!f&&(c.will_retry?(b._is_retrying=!0,g.debug("retrying in "+c.delay+" s"),b._retry_timer=setTimeout(a,1e3*c.delay)):g.debug("giving up trying to reconnect"))}):(b._retry=!1,b.onclose&&b.onclose("unsupported",{reason:null,message:null,retry_delay:null,retry_count:null,will_retry:!1}))}var b=this;if(b._transport)throw"connection already open (or opening)";b._autoreconnect_reset(),b._retry=!0,a()},i.prototype.close=function(a,b){if(!this._transport&&!this._is_retrying)throw"connection already closed";this._retry=!1,this._session&&this._session.isOpen?this._session.leave(a,b):this._transport&&this._transport.close(1e3)},Object.defineProperty(i.prototype,"defer",{get:function(){return this._defer}}),Object.defineProperty(i.prototype,"session",{get:function(){return this._session}}),Object.defineProperty(i.prototype,"isOpen",{get:function(){return this._session&&this._session.isOpen?!0:!1}}),Object.defineProperty(i.prototype,"isConnected",{get:function(){return this._transport?!0:!1}}),Object.defineProperty(i.prototype,"transport",{get:function(){return this._transport?this._transport:{info:{type:"none",url:null,protocol:null}}}}),Object.defineProperty(i.prototype,"isRetrying",{get:function(){return this._is_retrying}}),c.Connection=i}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./autobahn.js":4,"./log.js":7,"./session.js":16,"./util.js":19,when:77}],7:[function(a,b,c){(function(a){var b=function(){};"AUTOBAHN_DEBUG"in a&&AUTOBAHN_DEBUG&&"console"in a&&(b=function(){console.log.apply(console,arguments)}),c.debug=b}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(a){a("./polyfill/object"),a("./polyfill/array"),a("./polyfill/string"),a("./polyfill/function"),a("./polyfill/console"),a("./polyfill/typedarray"),a("./polyfill/json")},{"./polyfill/array":9,"./polyfill/console":10,"./polyfill/function":11,"./polyfill/json":12,"./polyfill/object":13,"./polyfill/string":14,"./polyfill/typedarray":15}],9:[function(){"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a){var b,c,d,e;if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");if(c=Object(this),b=c.length>>>0,e=0,2<=arguments.length)d=arguments[1];else{for(;b>e&&!e in c;)e++;if(e>=b)throw new TypeError("Reduce of empty array with no initial value");d=c[e++]}for(;b>e;e++)e in c&&(d=a(d,c[e],e,c));return d}),"indexOf"in Array.prototype||(Array.prototype.indexOf=function(a,b){void 0===b&&(b=0),0>b&&(b+=this.length),0>b&&(b=0);for(var c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1}),"lastIndexOf"in Array.prototype||(Array.prototype.lastIndexOf=function(a,b){for(void 0===b&&(b=this.length-1),0>b&&(b+=this.length),b>this.length-1&&(b=this.length-1),b++;0c;c++)c in this&&a.call(b,this[c],c,this)}),"map"in Array.prototype||(Array.prototype.map=function(a,b){for(var c=Array(this.length),d=0,e=this.length;e>d;d++)d in this&&(c[d]=a.call(b,this[d],d,this));return c}),"filter"in Array.prototype||(Array.prototype.filter=function(a,b){for(var c,d=[],e=0,f=this.length;f>e;e++)e in this&&a.call(b,c=this[e],e,this)&&d.push(c);return d}),"every"in Array.prototype||(Array.prototype.every=function(a,b){for(var c=0,d=this.length;d>c;c++)if(c in this&&!a.call(b,this[c],c,this))return!1;return!0}),"some"in Array.prototype||(Array.prototype.some=function(a,b){for(var c=0,d=this.length;d>c;c++)if(c in this&&a.call(b,this[c],c,this))return!0;return!1}),"function"!=typeof Array.prototype.reduceRight&&(Array.prototype.reduceRight=function(a){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var b,c=Object(this),d=(c.length>>>0)-1;if(2<=arguments.length)b=arguments[1];else{for(;d>=0&&!d in c;)d--;if(0>d)throw new TypeError("Reduce of empty array with no initial value");b=c[d--]}for(;d>=0;d--)d in c&&(b=a(b,c[d],d,c));return b})},{}],10:[function(){(function(a){!function(a){a||(a=window.console={log:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){}}),"object"==typeof a.log&&(a.log=Function.prototype.call.bind(a.log,a),a.info=Function.prototype.call.bind(a.info,a),a.warn=Function.prototype.call.bind(a.warn,a),a.error=Function.prototype.call.bind(a.error,a),a.debug=Function.prototype.call.bind(a.info,a)),"group"in a||(a.group=function(b){a.info("\n--- "+b+" ---\n")}),"groupEnd"in a||(a.groupEnd=function(){a.log("\n")}),"assert"in a||(a.assert=function(a,b){if(!a)try{throw Error("assertion failed: "+b)}catch(c){setTimeout(function(){throw c},0)}}),"time"in a||function(){var b={};a.time=function(a){b[a]=(new Date).getTime()},a.timeEnd=function(c){var d=(new Date).getTime();a.info(c+": "+(c in b?d-b[c]:0)+"ms")}}()}(a.console)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(){Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){return b.apply(a,Array.prototype.concat.apply(c,arguments))}})},{}],12:[function(h,p,k){"object"!=typeof JSON&&(JSON={}),function(){function b(a){return 10>a?"0"+a:a}function a(a){return d.lastIndex=0,d.test(a)?'"'+a.replace(d,function(a){var b=g[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,d){var e,f,g,h,i,j=m,k=d[b];switch(k&&"object"==typeof k&&"function"==typeof k.toJSON&&(k=k.toJSON(b)),"function"==typeof n&&(k=n.call(d,b,k)),typeof k){case"string":return a(k);case"number":return isFinite(k)?String(k):"null";case"boolean":case"null":return String(k);case"object":if(!k)return"null";if(m+=q,i=[],"[object Array]"===Object.prototype.toString.apply(k)){for(h=k.length,e=0;h>e;e+=1)i[e]=c(e,k)||"null";return g=0===i.length?"[]":m?"[\n"+m+i.join(",\n"+m)+"\n"+j+"]":"["+i.join(",")+"]",m=j,g}if(n&&"object"==typeof n)for(h=n.length,e=0;h>e;e+=1)"string"==typeof n[e]&&(f=n[e],(g=c(f,k))&&i.push(a(f)+(m?": ":":")+g));else for(f in k)Object.prototype.hasOwnProperty.call(k,f)&&(g=c(f,k))&&i.push(a(f)+(m?": ":":")+g);return g=0===i.length?"{}":m?"{\n"+m+i.join(",\n"+m)+"\n"+j+"}":"{"+i.join(",")+"}",m=j,g}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e,d,m,q,g,n;"function"!=typeof JSON.stringify&&(d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,d){var e;if(q=m="","number"==typeof d)for(e=0;d>e;e+=1)q+=" ";else"string"==typeof d&&(q=d);if((n=b)&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw Error("JSON.stringify");return c("",{"":a})}),"function"!=typeof JSON.parse&&(e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"==typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var g;if(a=String(a),e.lastIndex=0,e.test(a)&&(a=a.replace(e,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return g=eval("("+a+")"),"function"==typeof b?c({"":g},""):g;throw new SyntaxError("JSON.parse")})}(),k.JSON=JSON},{}],13:[function(){Object.create||(Object.create=function(){function a(){}return function(b){if(1!=arguments.length)throw Error("Object.create implementation only accepts one parameter.");return a.prototype=b,new a}}()),Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g=[];for(f in e)a.call(e,f)&&g.push(f);if(b)for(f=0;d>f;f++)a.call(e,c[f])&&g.push(c[f]);return g}}())},{}],14:[function(){"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")})},{}],15:[function(a,b,c){(function(a){"undefined"==typeof a.Uint8Array&&function(a,b){function c(a){switch(typeof a){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return null===a?"null":"object"}}function d(a){return Object.prototype.toString.call(a).replace(/^\[object *|\]$/g,"")}function e(a){return"function"==typeof a}function f(a){if(null===a||a===C)throw TypeError();return Object(a)}function g(a){function b(b){Object.defineProperty(a,b,{get:function(){return a._getter(b)},set:function(c){a._setter(b,c)},enumerable:!0,configurable:!1})}if(a.length>D)throw RangeError("Array too large for polyfill");var c;for(c=0;c>c}function i(a,b){var c=32-b;return a<>>c}function j(a){return[255&a]}function k(a){return h(a[0],8)}function l(a){return[255&a]}function m(a){return i(a[0],8)}function n(a){return a=L(Number(a)),[0>a?0:a>255?255:255&a]}function o(a){return[a>>8&255,255&a]}function p(a){return h(a[0]<<8|a[1],16)}function q(a){return[a>>8&255,255&a]}function r(a){return i(a[0]<<8|a[1],16)}function s(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}function t(a){return h(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function u(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}function v(a){return i(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function w(a,b,c){function d(a){var b=G(a);return a-=b,.5>a?b:a>.5?b+1:b%2?b+1:b}var e,f,g,h=(1<a?1:0):0===a?(g=f=0,e=-1/0===1/a?1:0):(e=0>a,a=F(a),a>=K(2,1-h)?(f=J(G(H(a)/E),1023),g=d(a/K(2,f)*K(2,c)),2<=g/K(2,c)&&(f+=1,g=1),f>h?(f=(1<>=1;return g.reverse(),e=g.join(""),a=(1<0?g*K(2,d-a)*(1+e/K(2,c)):0!==e?g*K(2,-(a-1))*(e/K(2,c)):0>g?-0:0}function y(a){return x(a,11,52)}function z(a){return w(a,11,52)}function A(a){return x(a,8,23)}function B(a){return w(a,8,23)}var C=void 0,D=1e5,E=Math.LN2,F=Math.abs,G=Math.floor,H=Math.log,I=Math.max,J=Math.min,K=Math.pow,L=Math.round;!function(){var a,b=Object.defineProperty;try{a=Object.defineProperty({},"x",{})}catch(c){a=!1}b&&a||(Object.defineProperty=function(a,c,d){if(b)try{return b(a,c,d)}catch(e){}if(a!==Object(a))throw TypeError("Object.defineProperty called on non-object");return Object.prototype.__defineGetter__&&"get"in d&&Object.prototype.__defineGetter__.call(a,c,d.get),Object.prototype.__defineSetter__&&"set"in d&&Object.prototype.__defineSetter__.call(a,c,d.set),"value"in d&&(a[c]=d.value),a})}(),function(){function h(a){if(a>>=0,0>a)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:a}),Object.defineProperty(this,"_bytes",{value:Array(a)});for(var b=0;a>b;b+=1)this._bytes[b]=0}function i(){if(!arguments.length||"object"!=typeof arguments[0])return function(a){if(a>>=0,0>a)throw RangeError("length is not a small enough positive integer.");Object.defineProperty(this,"length",{value:a}),Object.defineProperty(this,"byteLength",{value:a*this.BYTES_PER_ELEMENT}),Object.defineProperty(this,"buffer",{value:new h(this.byteLength)}),Object.defineProperty(this,"byteOffset",{value:0})}.apply(this,arguments);if(1<=arguments.length&&"object"===c(arguments[0])&&arguments[0]instanceof i)return function(a){if(this.constructor!==a.constructor)throw TypeError();var b=a.length*this.BYTES_PER_ELEMENT;for(Object.defineProperty(this,"buffer",{value:new h(b)}),Object.defineProperty(this,"byteLength",{value:b}),Object.defineProperty(this,"byteOffset",{value:0}),Object.defineProperty(this,"length",{value:a.length}),b=0;b>>=0,b>a.byteLength)throw RangeError("byteOffset out of range");if(b%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(c===C){var d=a.byteLength-b;if(d%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");c=d/this.BYTES_PER_ELEMENT}else c>>>=0,d=c*this.BYTES_PER_ELEMENT;if(b+d>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a}),Object.defineProperty(this,"byteLength",{value:d}),Object.defineProperty(this,"byteOffset",{value:b}),Object.defineProperty(this,"length",{value:c})}.apply(this,arguments);throw TypeError()}function w(a,b,c){var d=function(){Object.defineProperty(this,"constructor",{value:d}),i.apply(this,arguments),g(this)};"__proto__"in d?d.__proto__=i:(d.from=i.from,d.of=i.of),d.BYTES_PER_ELEMENT=a;var e=function(){};return e.prototype=x,d.prototype=new e,Object.defineProperty(d.prototype,"BYTES_PER_ELEMENT",{value:a}),Object.defineProperty(d.prototype,"_pack",{value:b}),Object.defineProperty(d.prototype,"_unpack",{value:c}),d}a.ArrayBuffer=a.ArrayBuffer||h,Object.defineProperty(i,"from",{value:function(a){return new this(a)}}),Object.defineProperty(i,"of",{value:function(){return new this(arguments)}});var x={};i.prototype=x,Object.defineProperty(i.prototype,"_getter",{value:function(a){if(1>arguments.length)throw SyntaxError("Not enough arguments");if(a>>>=0,a>=this.length)return C;var b,c,d=[];for(b=0,c=this.byteOffset+a*this.BYTES_PER_ELEMENT;barguments.length)throw SyntaxError("Not enough arguments");if(a>>>=0,!(a>=this.length)){var c,d,e=this._pack(b);for(c=0,d=this.byteOffset+a*this.BYTES_PER_ELEMENT;c>>0,e=I(e,0);for(a>>=0,a=0>a?I(e+a,0):J(a,e),b>>=0,b=0>b?I(e+b,0):J(b,e),c=c===C?e:c>>0,c=0>c?I(e+c,0):J(c,e),e=J(c-b,e-a),a>from&&b+e>a?(c=-1,b=b+e-1,a=a+e-1):c=1;count>0;)d._setter(a,d._getter(b)),b+=c,a+=c,e-=1;return d}}),Object.defineProperty(i.prototype,"every",{value:function(a,b){if(this===C||null===this)throw TypeError();var c=Object(this),d=c.length>>>0;if(!e(a))throw TypeError();for(var f=0;d>f;f++)if(!a.call(b,c._getter(f),f,c))return!1;return!0}}),Object.defineProperty(i.prototype,"fill",{value:function(a,b,c){var d=f(this),e=d.length>>>0,e=I(e,0);for(b>>=0,b=0>b?I(e+b,0):J(b,e),c=c===C?e:c>>0,e=0>c?I(e+c,0):J(c,e);e>b;)d._setter(b,a),b+=1;return d}}),Object.defineProperty(i.prototype,"filter",{value:function(a,b){if(this===C||null===this)throw TypeError();var c=Object(this),d=c.length>>>0;if(!e(a))throw TypeError();for(var f=[],g=0;d>g;g++){var h=c._getter(g);a.call(b,h,g,c)&&f.push(h)}return new this.constructor(f)}}),Object.defineProperty(i.prototype,"find",{value:function(a){var b=f(this),c=b.length>>>0;if(!e(a))throw TypeError();for(var d=1g;){var h=b._getter(g),i=a.call(d,h,g,b);if(Boolean(i))return h;++g}return C}}),Object.defineProperty(i.prototype,"findIndex",{value:function(a){var b=f(this),c=b.length>>>0;if(!e(a))throw TypeError();for(var d=1g;){var h=b._getter(g),h=a.call(d,h,g,b);if(Boolean(h))return g;++g}return-1}}),Object.defineProperty(i.prototype,"forEach",{value:function(a,b){if(this===C||null===this)throw TypeError();var c=Object(this),d=c.length>>>0;if(!e(a))throw TypeError();for(var f=0;d>f;f++)a.call(b,c._getter(f),f,c)}}),Object.defineProperty(i.prototype,"indexOf",{value:function(a){if(this===C||null===this)throw TypeError();var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d,e=0;if(00||-1)*G(F(d)))),e>=c)return-1;for(e=e>=0?e:I(c-F(e),0);c>e;e++)if(b._getter(e)===a)return e;return-1}}),Object.defineProperty(i.prototype,"join",{value:function(a){if(this===C||null===this)throw TypeError();for(var b=Object(this),c=b.length>>>0,d=Array(c),e=0;c>e;++e)d[e]=b._getter(e);return d.join(a===C?",":a)}}),Object.defineProperty(i.prototype,"lastIndexOf",{value:function(a){if(this===C||null===this)throw TypeError();var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;for(10||-1)*G(F(d)))),c=d>=0?J(d,c-1):c-F(d);c>=0;c--)if(b._getter(c)===a)return c;return-1}}),Object.defineProperty(i.prototype,"map",{value:function(a,b){if(this===C||null===this)throw TypeError();var c=Object(this),d=c.length>>>0;if(!e(a))throw TypeError();var f=[];f.length=d;for(var g=0;d>g;g++)f[g]=a.call(b,c._getter(g),g,c);return new this.constructor(f)}}),Object.defineProperty(i.prototype,"reduce",{value:function(a){if(this===C||null===this)throw TypeError();var b=Object(this),c=b.length>>>0;if(!e(a))throw TypeError();if(0===c&&1===arguments.length)throw TypeError();var d,f=0;for(d=2<=arguments.length?arguments[1]:b._getter(f++);c>f;)d=a.call(C,d,b._getter(f),f,b),f++;return d}}),Object.defineProperty(i.prototype,"reduceRight",{value:function(a){if(this===C||null===this)throw TypeError();var b=Object(this),c=b.length>>>0;if(!e(a))throw TypeError();if(0===c&&1===arguments.length)throw TypeError();var d,c=c-1;for(d=2<=arguments.length?arguments[1]:b._getter(c--);c>=0;)d=a.call(C,d,b._getter(c),c,b),c--;return d}}),Object.defineProperty(i.prototype,"reverse",{value:function(){if(this===C||null===this)throw TypeError();for(var a=Object(this),b=a.length>>>0,c=G(b/2),d=0,b=b-1;c>d;++d,--b){var e=a._getter(d);a._setter(d,a._getter(b)),a._setter(b,e)}return a}}),Object.defineProperty(i.prototype,"set",{value:function(){if(1>arguments.length)throw SyntaxError("Not enough arguments");var a,b,c,d,e,f;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(a=arguments[0],b=arguments[1]>>>0,b+a.length>this.length)throw RangeError("Offset plus length of array is out of range");if(f=this.byteOffset+b*this.BYTES_PER_ELEMENT,b=a.length*this.BYTES_PER_ELEMENT,a.buffer===this.buffer){for(c=[],d=0,e=a.byteOffset;b>d;d+=1,e+=1)c[d]=a.buffer._bytes[e];for(d=0;b>d;d+=1,f+=1)this.buffer._bytes[f]=c[d]}else for(d=0,e=a.byteOffset;b>d;d+=1,e+=1,f+=1)this.buffer._bytes[f]=a.buffer._bytes[e]}else{if("object"!=typeof arguments[0]||"undefined"==typeof arguments[0].length)throw TypeError("Unexpected argument type(s)");if(a=arguments[0],c=a.length>>>0,b=arguments[1]>>>0,b+c>this.length)throw RangeError("Offset plus length of array is out of range");for(d=0;c>d;d+=1)e=a[d],this._setter(b+d,Number(e))}}}),Object.defineProperty(i.prototype,"slice",{value:function(a,b){for(var c=f(this),d=c.length>>>0,e=a>>0,e=0>e?I(d+e,0):J(e,d),g=b===C?d:b>>0,d=0>g?I(d+g,0):J(g,d),g=new c.constructor(d-e),h=0;d>e;){var i=c._getter(e);g._setter(h,i),++e,++h}return g}}),Object.defineProperty(i.prototype,"some",{value:function(a,b){if(this===C||null===this)throw TypeError();var c=Object(this),d=c.length>>>0;if(!e(a))throw TypeError();for(var f=0;d>f;f++)if(a.call(b,c._getter(f),f,c))return!0;return!1}}),Object.defineProperty(i.prototype,"sort",{value:function(a){if(this===C||null===this)throw TypeError();for(var b=Object(this),c=b.length>>>0,d=Array(c),e=0;c>e;++e)d[e]=b._getter(e);for(a?d.sort(a):d.sort(),e=0;c>e;++e)b._setter(e,d[e]);return b}}),Object.defineProperty(i.prototype,"subarray",{value:function(a,b){a>>=0,b>>=0,1>arguments.length&&(a=0),2>arguments.length&&(b=this.length),0>a&&(a=this.length+a),0>b&&(b=this.length+b);var c=this.length;return a=0>a?0:a>c?c:a,c=this.length,c=(0>b?0:b>c?c:b)-a,0>c&&(c=0),new this.constructor(this.buffer,this.byteOffset+a*this.BYTES_PER_ELEMENT,c)}});var D=w(1,j,k),E=w(1,l,m),H=w(1,n,m),K=w(2,o,p),L=w(2,q,r),M=w(4,s,t),N=w(4,u,v),O=w(4,B,A),P=w(8,z,y);a.Int8Array=b.Int8Array=a.Int8Array||D,a.Uint8Array=b.Uint8Array=a.Uint8Array||E,a.Uint8ClampedArray=b.Uint8ClampedArray=a.Uint8ClampedArray||H,a.Int16Array=b.Int16Array=a.Int16Array||K,a.Uint16Array=b.Uint16Array=a.Uint16Array||L,a.Int32Array=b.Int32Array=a.Int32Array||M,a.Uint32Array=b.Uint32Array=a.Uint32Array||N,a.Float32Array=b.Float32Array=a.Float32Array||O,a.Float64Array=b.Float64Array=a.Float64Array||P}(),function(){function b(a,b){return e(a.get)?a.get(b):a[b]}function c(a,b,c){if(!(a instanceof ArrayBuffer||"ArrayBuffer"===d(a)))throw TypeError();if(b>>>=0,b>a.byteLength)throw RangeError("byteOffset out of range");if(c=c===C?a.byteLength-b:c>>>0,b+c>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a}),Object.defineProperty(this,"byteLength",{value:c}),Object.defineProperty(this,"byteOffset",{value:b})}function f(c){return function(d,e){if(d>>>=0,d+c.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");d+=this.byteOffset;for(var f=new a.Uint8Array(this.buffer,d,c.BYTES_PER_ELEMENT),g=[],i=0;i>>=0,d+c.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");e=new c([e]),e=new a.Uint8Array(e.buffer);var g,i=[];for(g=0;g must be a string"),g.assert(!b||Array.isArray(b),"Session.join: must be an array []"),g.assert(!c||"string"==typeof c,"Session.join: must be a string"),this.isOpen)throw"session already open";this._goodbye_sent=!1,this._realm=a;var d={};d.roles=WAMP_FEATURES,b&&(d.authmethods=b),c&&(d.authid=c),this._send_wamp([1,a,d])},o.prototype.leave=function(a,b){if(g.assert(!a||"string"==typeof a,"Session.leave: must be a string"),g.assert(!b||"string"==typeof b,"Session.leave: must be a string"),!this.isOpen)throw"session not open";a||(a="wamp.close.normal");var c={};b&&(c.message=b),this._send_wamp([6,c,a]),this._goodbye_sent=!0},o.prototype.call=function(a,b,c,e){if(g.assert("string"==typeof a,"Session.call: must be a string"),g.assert(!b||Array.isArray(b),"Session.call: must be an array []"),g.assert(!c||c instanceof Object,"Session.call: must be an object {}"),g.assert(!e||e instanceof Object,"Session.call: must be an object {}"),!this.isOpen)throw"session not open";var f=d(),h=this._defer();return this._call_reqs[f]=[h,e],a=[48,f,e||{},this.resolve(a)],b&&(a.push(b),c&&a.push(c)),this._send_wamp(a),h.promise.then?h.promise:h},o.prototype.publish=function(a,b,c,e){if(g.assert("string"==typeof a,"Session.publish: must be a string"),g.assert(!b||Array.isArray(b),"Session.publish: must be an array []"),g.assert(!c||c instanceof Object,"Session.publish: must be an object {}"),g.assert(!e||e instanceof Object,"Session.publish: must be an object {}"),!this.isOpen)throw"session not open";var f=e&&e.acknowledge,h=null,i=d();return f&&(h=this._defer(),this._publish_reqs[i]=[h,e]),a=[16,i,e||{},this.resolve(a)],b&&(a.push(b),c&&a.push(c)),this._send_wamp(a),h?h.promise.then?h.promise:h:void 0},o.prototype.subscribe=function(a,b,c){if(g.assert("string"==typeof a,"Session.subscribe: must be a string"),g.assert("function"==typeof b,"Session.subscribe: must be a function"),g.assert(!c||c instanceof Object,"Session.subscribe: must be an object {}"),!this.isOpen)throw"session not open";var e=d(),f=this._defer();return this._subscribe_reqs[e]=[f,a,b,c],b=[32,e],b.push(c?c:{}),b.push(this.resolve(a)),this._send_wamp(b),f.promise.then?f.promise:f},o.prototype.register=function(a,b,c){if(g.assert("string"==typeof a,"Session.register: must be a string"),g.assert("function"==typeof b,"Session.register: must be a function"),g.assert(!c||c instanceof Object,"Session.register: must be an object {}"),!this.isOpen)throw"session not open";var e=d(),f=this._defer();return this._register_reqs[e]=[f,a,b,c],b=[64,e],b.push(c?c:{}),b.push(this.resolve(a)),this._send_wamp(b),f.promise.then?f.promise:f},o.prototype.unsubscribe=function(a){if(g.assert(a instanceof l,"Session.unsubscribe: must be an instance of class autobahn.Subscription"),!this.isOpen)throw"session not open";if(!(a.active&&a.id in this._subscriptions))throw"subscription not active";var b=this._subscriptions[a.id],c=b.indexOf(a);if(-1===c)throw"subscription not active";return b.splice(c,1),a.active=!1,c=this._defer(),b.length?c.resolve(!1):(b=d(),this._unsubscribe_reqs[b]=[c,a.id],this._send_wamp([34,b,a.id])),c.promise.then?c.promise:c},o.prototype.unregister=function(a){if(g.assert(a instanceof m,"Session.unregister: must be an instance of class autobahn.Registration"),!this.isOpen)throw"session not open";if(!(a.active&&a.id in this._registrations))throw"registration not active";var b=d(),c=this._defer();return this._unregister_reqs[b]=[c,a],this._send_wamp([66,b,a.id]),c.promise.then?c.promise:c},o.prototype.prefix=function(a,b){g.assert("string"==typeof a,"Session.prefix: must be a string"),g.assert(!b||"string"==typeof b,"Session.prefix: must be a string or falsy"),b?this._prefixes[a]=b:a in this._prefixes&&delete this._prefixes[a]},o.prototype.resolve=function(a){g.assert("string"==typeof a,"Session.resolve: must be a string");var b=a.indexOf(":");if(b>=0){var c=a.substring(0,b);if(c in this._prefixes)return this._prefixes[c]+"."+a.substring(b+1);throw"cannot resolve CURIE prefix '"+c+"'"}return a},c.Session=o,c.Invocation=h,c.Event=i,c.Result=j,c.Error=k,c.Subscription=l,c.Registration=m,c.Publication=n}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./log.js":7,"./util.js":19,when:77,"when/function":54}],17:[function(a,b,c){function d(a){e.assert(void 0!==a.url,"options.url missing"),e.assert("string"==typeof a.url,"options.url must be a string"),this._options=a}var e=a("../util.js"),f=a("../log.js");a("when"),d.prototype.type="longpoll",d.prototype.create=function(){var a=this;f.debug("longpoll.Factory.create");var b={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"longpoll",url:null,protocol:"wamp.2.json"},_run:function(){var c=null,d=!1,g=a._options.request_timeout||2e3;e.http_post(a._options.url+"/open",JSON.stringify({protocols:["wamp.2.json"]}),g).then(function(h){function i(){f.debug("longpoll.Transport: polling for message ..."),e.http_post(j+"/receive",null,g).then(function(a){a&&(a=JSON.parse(a),f.debug("longpoll.Transport: message received",a),b.onmessage(a)),d||i()},function(a){f.debug("longpoll.Transport: could not receive message",a.code,a.text),d=!0,b.onclose({code:1001,reason:"transport receive failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}c=JSON.parse(h);var j=a._options.url+"/"+c.transport;b.info.url=j,f.debug("longpoll.Transport: open",c),b.close=function(){if(d)throw"transport is already closing";d=!0,e.http_post(j+"/close",null,g).then(function(){f.debug("longpoll.Transport: transport closed"),b.onclose({code:1e3,reason:"transport closed",wasClean:!0})},function(a){f.debug("longpoll.Transport: could not close transport",a.code,a.text)})},b.send=function(a){if(d)throw"transport is closing or closed already";f.debug("longpoll.Transport: sending message ...",a),a=JSON.stringify(a),e.http_post(j+"/send",a,g).then(function(){f.debug("longpoll.Transport: message sent")},function(a){f.debug("longpoll.Transport: could not send message",a.code,a.text),d=!0,b.onclose({code:1001,reason:"transport send failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})},i(),b.onopen()},function(a){f.debug("longpoll.Transport: could not open transport",a.code,a.text),d=!0,b.onclose({code:1001,reason:"transport open failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}};return b._run(),b},c.Factory=d},{"../log.js":7,"../util.js":19,when:77}],18:[function(a,b,c){(function(b){function d(a){e.assert(void 0!==a.url,"options.url missing"),e.assert("string"==typeof a.url,"options.url must be a string"),a.protocols?e.assert(Array.isArray(a.protocols),"options.protocols must be an array"):a.protocols=["wamp.2.json"],this._options=a}var e=a("../util.js"),f=a("../log.js");d.prototype.type="websocket",d.prototype.create=function(){var c=this,d={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"websocket",url:null,protocol:"wamp.2.json"}};return"window"in b?function(){var a;if("WebSocket"in window)a=c._options.protocols?new window.WebSocket(c._options.url,c._options.protocols):new window.WebSocket(c._options.url);else{if(!("MozWebSocket"in window))throw"browser does not support WebSocket";a=c._options.protocols?new window.MozWebSocket(c._options.url,c._options.protocols):new window.MozWebSocket(c._options.url)}a.onmessage=function(a){f.debug("WebSocket transport receive",a.data),a=JSON.parse(a.data),d.onmessage(a)},a.onopen=function(){d.info.url=c._options.url,d.onopen()},a.onclose=function(a){d.onclose({code:a.code,reason:a.message,wasClean:a.wasClean})},d.send=function(b){b=JSON.stringify(b),f.debug("WebSocket transport send",b),a.send(b)},d.close=function(b,c){a.close(b,c)}}():function(){var b,e,f=a("ws");c._options.protocols?(e=c._options.protocols,Array.isArray(e)&&(e=e.join(",")),b=new f(c._options.url,{protocol:e})):b=new f(c._options.url),d.send=function(a){a=JSON.stringify(a),b.send(a,{binary:!1})},d.close=function(){b.close()},b.on("open",function(){d.onopen()}),b.on("message",function(a,b){if(!b.binary){var c=JSON.parse(a);d.onmessage(c)}}),b.on("close",function(a,b){d.onclose({code:a,reason:b,wasClean:1e3===a})}),b.on("error",function(){d.onclose({code:1006,reason:"",wasClean:!1})})}(),d},c.Factory=d}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../log.js":7,"../util.js":19,ws:78}],19:[function(a,b,c){(function(b){var d=a("./log.js"),e=a("when"),f=function(a,c){if(!a)throw f.useDebugger||"AUTOBAHN_DEBUG"in b&&AUTOBAHN_DEBUG,Error(c||"Assertion failed!")};c.rand_normal=function(a,b){var c,d;do c=2*Math.random()-1,d=2*Math.random()-1,d=c*c+d*d;while(d>=1||0==d);return d=Math.sqrt(-2*Math.log(d)/d),(a||0)+c*d*(b||1)},c.assert=f,c.http_post=function(a,b,c){d.debug("new http_post request",a,b,c);var f=e.defer(),g=new XMLHttpRequest;return g.onreadystatechange=function(){if(4===g.readyState){var a=1223===g.status?204:g.status;if(200===a&&f.resolve(g.responseText),204===a)f.resolve();else{var b=null;try{b=g.statusText}catch(c){}f.reject({code:a,text:b})}}},g.open("POST",a,!0),g.setRequestHeader("Content-type","application/json; charset=utf-8"),c>0&&(g.timeout=c,g.ontimeout=function(){f.reject({code:501,text:"request timeout"})}),b?g.send(b):g.send(),f.promise.then?f.promise:f}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./log.js":7,when:77}],20:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib.BlockCipher,c=a.algo,d=[],e=[],f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[];!function(){for(var a=[],b=0;256>b;b++)a[b]=128>b?b<<1:b<<1^283;for(var c=0,n=0,b=0;256>b;b++){var o=n^n<<1^n<<2^n<<3^n<<4,o=o>>>8^255&o^99;d[c]=o,e[o]=c;var p=a[c],q=a[p],r=a[q],s=257*a[o]^16843008*o;f[c]=s<<24|s>>>8,g[c]=s<<16|s>>>16,h[c]=s<<8|s>>>24,i[c]=s,s=16843009*r^65537*q^257*p^16843008*c,j[o]=s<<24|s>>>8,k[o]=s<<16|s>>>16,l[o]=s<<8|s>>>24,m[o]=s,c?(c=p^a[a[a[r^p]]],n^=a[a[n]]):c=n=1}}();var n=[0,1,2,4,8,16,32,64,128,27,54],c=c.AES=b.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,a=4*((this._nRounds=c+6)+1),e=this._keySchedule=[],f=0;a>f;f++)if(c>f)e[f]=b[f];else{var g=e[f-1];f%c?c>6&&4==f%c&&(g=d[g>>>24]<<24|d[g>>>16&255]<<16|d[g>>>8&255]<<8|d[255&g]):(g=g<<8|g>>>24,g=d[g>>>24]<<24|d[g>>>16&255]<<16|d[g>>>8&255]<<8|d[255&g],g^=n[f/c|0]<<24),e[f]=e[f-c]^g}for(b=this._invKeySchedule=[],c=0;a>c;c++)f=a-c,g=c%4?e[f]:e[f-4],b[c]=4>c||4>=f?g:j[d[g>>>24]]^k[d[g>>>16&255]]^l[d[g>>>8&255]]^m[d[255&g]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,f,g,h,i,d)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,j,k,l,m,e),c=a[b+1],a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++)var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],m=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++],j=p,k=q,l=r;p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],m=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++],a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=m},keySize:8});a.AES=b._createHelper(c)}(),a.AES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],21:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){a.lib.Cipher||function(b){var c=a.lib,d=c.Base,e=c.WordArray,f=c.BufferedBlockAlgorithm,g=a.enc.Base64,h=a.algo.EvpKDF,i=c.Cipher=f.extend({cfg:d.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){return a&&this._append(a),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(a){return{encrypt:function(b,c,d){return("string"==typeof c?o:n).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?o:n).decrypt(a,b,c,d)}}}}()});c.StreamCipher=i.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var j=a.mode={},k=c.BlockCipherMode=d.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),j=j.CBC=function(){function a(a,c,d){var e=this._iv;e?this._iv=b:e=this._prevBlock;for(var f=0;d>f;f++)a[c+f]^=e[f]}var c=k.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),l=(a.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,c=c-a.sigBytes%c,d=c<<24|c<<16|c<<8|c,f=[],g=0;c>g;g+=4)f.push(d);c=e.create(f,c),a.concat(c)},unpad:function(a){a.sigBytes-=255&a.words[a.sigBytes-1>>>2]}};c.BlockCipher=i.extend({cfg:i.cfg.extend({mode:j,padding:l}),reset:function(){i.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var m=c.CipherParams=d.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),j=(a.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;return a=a.salt,(a?e.create([1398893684,1701076831]).concat(a).concat(b):b).toString(g)},parse:function(a){a=g.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=e.create(b.slice(2,4));b.splice(0,4),a.sigBytes-=16}return m.create({ciphertext:a,salt:c})}},n=c.SerializableCipher=d.extend({cfg:d.extend({format:j}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);return b=e.finalize(b),e=e.cfg,m.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){return d=this.cfg.extend(d),b=this._parse(b,d.format),a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),d=(a.kdf={}).OpenSSL={execute:function(a,b,c,d){return d||(d=e.random(8)),a=h.create({keySize:b+c}).compute(a,d),c=e.create(a.words.slice(b),4*c),a.sigBytes=4*b,m.create({key:a,iv:c,salt:d})}},o=c.PasswordBasedCipher=n.extend({cfg:n.cfg.extend({kdf:d}),encrypt:function(a,b,c,d){return d=this.cfg.extend(d),c=d.kdf.execute(c,a.keySize,a.ivSize),d.iv=c.iv,a=n.encrypt.call(this,a,b,c.key,d),a.mixIn(c),a},decrypt:function(a,b,c,d){return d=this.cfg.extend(d),b=this._parse(b,d.format),c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt),d.iv=c.iv,n.decrypt.call(this,a,b,c.key,d)}})}()})},{"./core":22}],22:[function(a,b,c){!function(a,d){"object"==typeof c?b.exports=c=d():a.CryptoJS=d()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new f.init(c,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=e/(4*g),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*g,e=a.min(4*b,e),b){for(var i=0;b>i;i+=g)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new f.init(i,e)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}});var l=c.algo={};return c}(Math);return a})},{}],23:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib.WordArray;a.enc.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp(),a=[];for(var e=0;c>e;e+=3)for(var f=(b[e>>>2]>>>24-e%4*8&255)<<16|(b[e+1>>>2]>>>24-(e+1)%4*8&255)<<8|b[e+2>>>2]>>>24-(e+2)%4*8&255,g=0;4>g&&c>e+.75*g;g++)a.push(d.charAt(f>>>6*(3-g)&63));if(b=d.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(a){var c=a.length,d=this._map,e=d.charAt(64);e&&(e=a.indexOf(e),-1!=e&&(c=e));for(var e=[],f=0,g=0;c>g;g++)if(g%4){var h=d.indexOf(a.charAt(g-1))<>>6-g%4*2;e[f>>>2]|=(h|i)<<24-f%4*8,f++}return b.create(e,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),a.enc.Base64})},{"./core":22}],24:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a.lib.WordArray,d=a.enc;d.Utf16=d.Utf16BE={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d+=2)c.push(String.fromCharCode(b[d>>>2]>>>16-d%4*8&65535));return c.join("")},parse:function(a){for(var b=a.length,d=[],e=0;b>e;e++)d[e>>>1]|=a.charCodeAt(e)<<16-e%2*16;return c.create(d,2*b)}},d.Utf16LE={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],e=0;a>e;e+=2){var f=b(c[e>>>2]>>>16-e%4*8&65535);d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var d=a.length,e=[],f=0;d>f;f++)e[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return c.create(e,2*d)}}}(),a.enc.Utf16})},{"./core":22}],25:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib,c=b.Base,d=b.WordArray,b=a.algo,e=b.EvpKDF=c.extend({cfg:c.extend({keySize:4,hasher:b.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,e=c.hasher.create(),f=d.create(),g=f.words,h=c.keySize,c=c.iterations;g.lengthj;j++)i=e.finalize(i),e.reset();f.concat(i)}return f.sigBytes=4*h,f}});a.EvpKDF=function(a,b,c){return e.create(c).compute(a,b)}}(),a.EvpKDF})},{"./core":22,"./hmac":27,"./sha1":46}],26:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib.CipherParams,c=a.enc.Hex; +a.format.Hex={stringify:function(a){return a.ciphertext.toString(c)},parse:function(a){return a=c.parse(a),b.create({ciphertext:a})}}}(),a.format.Hex})},{"./cipher-core":21,"./core":22}],27:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){!function(){var b=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,c){a=this._hasher=new a.init,"string"==typeof c&&(c=b.parse(c));var d=a.blockSize,e=4*d;c.sigBytes>e&&(c=a.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),g=this._iKey=c.clone(),h=f.words,i=g.words,j=0;d>j;j++)h[j]^=1549556828,i[j]^=909522486;f.sigBytes=g.sigBytes=e,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher;return a=b.finalize(a),b.reset(),b.finalize(this._oKey.clone().concat(a))}})}()})},{"./core":22}],28:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./lib-typedarrays"),a("./enc-utf16"),a("./enc-base64"),a("./md5"),a("./sha1"),a("./sha256"),a("./sha224"),a("./sha512"),a("./sha384"),a("./sha3"),a("./ripemd160"),a("./hmac"),a("./pbkdf2"),a("./evpkdf"),a("./cipher-core"),a("./mode-cfb"),a("./mode-ctr"),a("./mode-ctr-gladman"),a("./mode-ofb"),a("./mode-ecb"),a("./pad-ansix923"),a("./pad-iso10126"),a("./pad-iso97971"),a("./pad-zeropadding"),a("./pad-nopadding"),a("./format-hex"),a("./aes"),a("./tripledes"),a("./rc4"),a("./rabbit"),a("./rabbit-legacy")):e(d.CryptoJS)}(this,function(a){return a})},{"./aes":20,"./cipher-core":21,"./core":22,"./enc-base64":23,"./enc-utf16":24,"./evpkdf":25,"./format-hex":26,"./hmac":27,"./lib-typedarrays":29,"./md5":30,"./mode-cfb":31,"./mode-ctr":33,"./mode-ctr-gladman":32,"./mode-ecb":34,"./mode-ofb":35,"./pad-ansix923":36,"./pad-iso10126":37,"./pad-iso97971":38,"./pad-nopadding":39,"./pad-zeropadding":40,"./pbkdf2":41,"./rabbit":43,"./rabbit-legacy":42,"./rc4":44,"./ripemd160":45,"./sha1":46,"./sha224":47,"./sha256":48,"./sha3":49,"./sha384":50,"./sha512":51,"./tripledes":52,"./x64-core":53}],29:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(){if("function"==typeof ArrayBuffer){var b=a.lib.WordArray,c=b.init;(b.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,d=[],e=0;b>e;e++)d[e>>>2]|=a[e]<<24-e%4*8;c.call(this,d,b)}else c.apply(this,arguments)}).prototype=b}}(),a.lib.WordArray})},{"./core":22}],30:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function f(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}var g=a.lib,h=g.WordArray,i=g.Hasher,g=a.algo,j=[];!function(){for(var a=0;64>a;a++)j[a]=4294967296*b.abs(b.sin(a+1))|0}(),g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[b+0],i=a[b+1],k=a[b+2],l=a[b+3],m=a[b+4],n=a[b+5],o=a[b+6],p=a[b+7],q=a[b+8],r=a[b+9],s=a[b+10],t=a[b+11],u=a[b+12],v=a[b+13],w=a[b+14],x=a[b+15],y=g[0],z=g[1],A=g[2],B=g[3],y=c(y,z,A,B,h,7,j[0]),B=c(B,y,z,A,i,12,j[1]),A=c(A,B,y,z,k,17,j[2]),z=c(z,A,B,y,l,22,j[3]),y=c(y,z,A,B,m,7,j[4]),B=c(B,y,z,A,n,12,j[5]),A=c(A,B,y,z,o,17,j[6]),z=c(z,A,B,y,p,22,j[7]),y=c(y,z,A,B,q,7,j[8]),B=c(B,y,z,A,r,12,j[9]),A=c(A,B,y,z,s,17,j[10]),z=c(z,A,B,y,t,22,j[11]),y=c(y,z,A,B,u,7,j[12]),B=c(B,y,z,A,v,12,j[13]),A=c(A,B,y,z,w,17,j[14]),z=c(z,A,B,y,x,22,j[15]),y=d(y,z,A,B,i,5,j[16]),B=d(B,y,z,A,o,9,j[17]),A=d(A,B,y,z,t,14,j[18]),z=d(z,A,B,y,h,20,j[19]),y=d(y,z,A,B,n,5,j[20]),B=d(B,y,z,A,s,9,j[21]),A=d(A,B,y,z,x,14,j[22]),z=d(z,A,B,y,m,20,j[23]),y=d(y,z,A,B,r,5,j[24]),B=d(B,y,z,A,w,9,j[25]),A=d(A,B,y,z,l,14,j[26]),z=d(z,A,B,y,q,20,j[27]),y=d(y,z,A,B,v,5,j[28]),B=d(B,y,z,A,k,9,j[29]),A=d(A,B,y,z,p,14,j[30]),z=d(z,A,B,y,u,20,j[31]),y=e(y,z,A,B,n,4,j[32]),B=e(B,y,z,A,q,11,j[33]),A=e(A,B,y,z,t,16,j[34]),z=e(z,A,B,y,w,23,j[35]),y=e(y,z,A,B,i,4,j[36]),B=e(B,y,z,A,m,11,j[37]),A=e(A,B,y,z,p,16,j[38]),z=e(z,A,B,y,s,23,j[39]),y=e(y,z,A,B,v,4,j[40]),B=e(B,y,z,A,h,11,j[41]),A=e(A,B,y,z,l,16,j[42]),z=e(z,A,B,y,o,23,j[43]),y=e(y,z,A,B,r,4,j[44]),B=e(B,y,z,A,u,11,j[45]),A=e(A,B,y,z,x,16,j[46]),z=e(z,A,B,y,k,23,j[47]),y=f(y,z,A,B,h,6,j[48]),B=f(B,y,z,A,p,10,j[49]),A=f(A,B,y,z,w,15,j[50]),z=f(z,A,B,y,n,21,j[51]),y=f(y,z,A,B,u,6,j[52]),B=f(B,y,z,A,l,10,j[53]),A=f(A,B,y,z,s,15,j[54]),z=f(z,A,B,y,i,21,j[55]),y=f(y,z,A,B,q,6,j[56]),B=f(B,y,z,A,x,10,j[57]),A=f(A,B,y,z,o,15,j[58]),z=f(z,A,B,y,v,21,j[59]),y=f(y,z,A,B,m,6,j[60]),B=f(B,y,z,A,t,10,j[61]),A=f(A,B,y,z,k,15,j[62]),z=f(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),a.sigBytes=4*(c.length+1),this._process(),a=this._hash,c=a.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return a},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),a.MD5=i._createHelper(g),a.HmacMD5=i._createHmacHelper(g)}(Math),a.MD5})},{"./core":22}],31:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;for(e?(e=e.slice(0),this._iv=void 0):e=this._prevBlock,d.encryptBlock(e,0),d=0;c>d;d++)a[b+d]^=e[d]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.CFB})},{"./cipher-core":21,"./core":22}],32:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0+(b<<16)+(c<<8),a+=d}else a+=16777216;return a}var c=a.lib.BlockCipherMode.extend(),d=c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;for(f&&(g=this._counter=f.slice(0),this._iv=void 0),f=g,0===(f[0]=b(f[0]))&&(f[1]=b(f[1])),g=g.slice(0),d.encryptBlock(g,0),d=0;e>d;d++)a[c+d]^=g[d]}});return c.Decryptor=d,c}(),a.mode.CTRGladman})},{"./cipher-core":21,"./core":22}],33:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;for(e&&(f=this._counter=e.slice(0),this._iv=void 0),e=f.slice(0),c.encryptBlock(e,0),f[d-1]=f[d-1]+1|0,c=0;d>c;c++)a[b+c]^=e[c]}});return b.Decryptor=c,b}(),a.mode.CTR})},{"./cipher-core":21,"./core":22}],34:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.mode.ECB})},{"./cipher-core":21,"./core":22}],35:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;for(e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0),c=0;d>c;c++)a[b+c]^=f[c]}});return b.Decryptor=c,b}(),a.mode.OFB})},{"./cipher-core":21,"./core":22}],36:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,d=d-c%d,c=c+d-1;a.clamp(),a.words[c>>>2]|=d<<24-c%4*8,a.sigBytes+=d},unpad:function(a){a.sigBytes-=255&a.words[a.sigBytes-1>>>2]}},a.pad.Ansix923})},{"./cipher-core":21,"./core":22}],37:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.pad.Iso10126={pad:function(b,c){var d=4*c,d=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(d-1)).concat(a.lib.WordArray.create([d<<24],1))},unpad:function(a){a.sigBytes-=255&a.words[a.sigBytes-1>>>2]}},a.pad.Iso10126})},{"./cipher-core":21,"./core":22}],38:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.pad.Iso97971})},{"./cipher-core":21,"./core":22}],39:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})},{"./cipher-core":21,"./core":22}],40:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a.pad.ZeroPadding})},{"./cipher-core":21,"./core":22}],41:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib,c=b.Base,d=b.WordArray,b=a.algo,e=b.HMAC,f=b.PBKDF2=c.extend({cfg:c.extend({keySize:4,hasher:b.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,f=e.create(c.hasher,a),g=d.create(),h=d.create([1]),i=g.words,j=h.words,k=c.keySize,c=c.iterations;i.lengthp;p++){o=f.finalize(o),f.reset();for(var q=o.words,r=0;n>r;r++)m[r]^=q[r]}g.concat(l),j[0]++}return g.sigBytes=4*k,g}});a.PBKDF2=function(a,b,c){return f.create(c).compute(a,b)}}(),a.PBKDF2})},{"./core":22,"./hmac":27,"./sha1":46}],42:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)e[c]=b[c];for(b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0,c=0;8>c;c++){var d=a[c]+b[c],g=65535&d,h=d>>>16;f[c]=((g*g>>>17)+g*h>>>15)+h*h^((4294901760&d)*d|0)+((65535&d)*d|0)}a[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,a[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,a[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,a[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,a[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,a[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,a[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,a[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var c=a.lib.StreamCipher,d=[],e=[],f=[],g=a.algo.RabbitLegacy=c.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]],e=this._b=0;4>e;e++)b.call(this);for(e=0;8>e;e++)a[e]^=d[e+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),e=c>>>16|4294901760&d,f=d<<16|65535&c;for(a[0]^=c,a[1]^=e,a[2]^=d,a[3]^=f,a[4]^=c,a[5]^=e,a[6]^=d,a[7]^=f,e=0;4>e;e++)b.call(this)}},_doProcessBlock:function(a,c){var e=this._X;for(b.call(this),d[0]=e[0]^e[5]>>>16^e[3]<<16,d[1]=e[2]^e[7]>>>16^e[5]<<16,d[2]=e[4]^e[1]>>>16^e[7]<<16,d[3]=e[6]^e[3]>>>16^e[1]<<16,e=0;4>e;e++)d[e]=16711935&(d[e]<<8|d[e]>>>24)|4278255360&(d[e]<<24|d[e]>>>8),a[c+e]^=d[e]},blockSize:4,ivSize:2});a.RabbitLegacy=c._createHelper(g)}(),a.RabbitLegacy})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],43:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)e[c]=b[c];for(b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0,c=0;8>c;c++){var d=a[c]+b[c],g=65535&d,h=d>>>16;f[c]=((g*g>>>17)+g*h>>>15)+h*h^((4294901760&d)*d|0)+((65535&d)*d|0)}a[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,a[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,a[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,a[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,a[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,a[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,a[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,a[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var c=a.lib.StreamCipher,d=[],e=[],f=[],g=a.algo.Rabbit=c.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);for(var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]],d=this._b=0;4>d;d++)b.call(this);for(d=0;8>d;d++)a[d]^=e[d+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),e=c>>>16|4294901760&d,f=d<<16|65535&c;for(a[0]^=c,a[1]^=e,a[2]^=d,a[3]^=f,a[4]^=c,a[5]^=e,a[6]^=d,a[7]^=f,d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var e=this._X;for(b.call(this),d[0]=e[0]^e[5]>>>16^e[3]<<16,d[1]=e[2]^e[7]>>>16^e[5]<<16,d[2]=e[4]^e[1]>>>16^e[7]<<16,d[3]=e[6]^e[3]>>>16^e[1]<<16,e=0;4>e;e++)d[e]=16711935&(d[e]<<8|d[e]>>>24)|4278255360&(d[e]<<24|d[e]>>>8),a[c+e]^=d[e]},blockSize:4,ivSize:2});a.Rabbit=c._createHelper(g)}(),a.Rabbit})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],44:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){var b=(b+1)%256,c=(c+a[b])%256,f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a.lib.StreamCipher,d=a.algo,e=d.RC4=c.extend({_doReset:function(){for(var a=this._key,b=a.words,a=a.sigBytes,c=this._S=[],d=0;256>d;d++)c[d]=d;for(var e=d=0;256>d;d++){var f=d%a,e=(e+c[d]+(b[f>>>2]>>>24-f%4*8&255))%256,f=c[d];c[d]=c[e],c[e]=f}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});a.RC4=c._createHelper(e),d=d.RC4Drop=e.extend({cfg:e.cfg.extend({drop:192}),_doReset:function(){e._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}}),a.RC4Drop=c._createHelper(d)}(),a.RC4})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],45:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b){return a<>>32-b}b=a.lib;var d=b.WordArray,e=b.Hasher;b=a.algo;var f=d.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),g=d.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=d.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),i=d.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),j=d.create([0,1518500249,1859775393,2400959708,2840853838]),k=d.create([1352829926,1548603684,1836072691,2053994217,0]);b=b.RIPEMD160=e.extend({_doReset:function(){this._hash=d.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var d=0;16>d;d++){var e=b+d,l=a[e];a[e]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var m,n,o,p,q,r,s,t,u,v,e=this._hash.words,l=j.words,w=k.words,x=f.words,y=g.words,z=h.words,A=i.words;r=m=e[0],s=n=e[1],t=o=e[2],u=p=e[3],v=q=e[4];for(var B,d=0;80>d;d+=1)B=m+a[b+x[d]]|0,B=16>d?B+((n^o^p)+l[0]):32>d?B+((n&o|~n&p)+l[1]):48>d?B+(((n|~o)^p)+l[2]):64>d?B+((n&p|o&~p)+l[3]):B+((n^(o|~p))+l[4]),B|=0,B=c(B,z[d]),B=B+q|0,m=q,q=p,p=c(o,10),o=n,n=B,B=r+a[b+y[d]]|0,B=16>d?B+((s^(t|~u))+w[0]):32>d?B+((s&u|t&~u)+w[1]):48>d?B+(((s|~t)^u)+w[2]):64>d?B+((s&t|~s&u)+w[3]):B+((s^t^u)+w[4]),B|=0,B=c(B,A[d]),B=B+v|0,r=v,v=u,u=c(t,10),t=s,s=B;B=e[1]+o+u|0,e[1]=e[2]+p+v|0,e[2]=e[3]+q+r|0,e[3]=e[4]+m+s|0,e[4]=e[0]+n+t|0,e[0]=B},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;for(b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process(),a=this._hash,b=a.words,c=0;5>c;c++)d=b[c],b[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8);return a},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}}),a.RIPEMD160=e._createHelper(b),a.HmacRIPEMD160=e._createHmacHelper(b)}(Math),a.RIPEMD160})},{"./core":22}],46:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),a.SHA1})},{"./core":22}],47:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha256")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.lib.WordArray,c=a.algo,d=c.SHA256,c=c.SHA224=d.extend({_doReset:function(){this._hash=new b.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=d._doFinalize.call(this);return a.sigBytes-=4,a}});a.SHA224=d._createHelper(c),a.HmacSHA224=d._createHmacHelper(c)}(),a.SHA224})},{"./core":22,"./sha256":48}],48:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(b){var c=a.lib,d=c.WordArray,e=c.Hasher,c=a.algo,f=[],g=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(f[e]=c(b.pow(d,.5))),g[e]=c(b.pow(d,1/3)),e++),d++}();var h=[],c=c.SHA256=e.extend({_doReset:function(){this._hash=new d.init(f.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],i=c[3],j=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)h[n]=0|a[b+n];else{var o=h[n-15],p=h[n-2];h[n]=((o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3)+h[n-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+h[n-16]}o=m+((j<<26|j>>>6)^(j<<21|j>>>11)^(j<<7|j>>>25))+(j&k^~j&l)+g[n]+h[n],p=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&f^e&f),m=l,l=k,k=j,j=i+o|0,i=f,f=e,e=d,d=o+p|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+i|0,c[4]=c[4]+j|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA256=e._createHelper(c),a.HmacSHA256=e._createHmacHelper(c)}(Math),a.SHA256})},{"./core":22}],49:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):e(d.CryptoJS)}(this,function(a){return function(b){var c=a.lib,d=c.WordArray,e=c.Hasher,f=a.x64.Word,c=a.algo,g=[],h=[],i=[];!function(){for(var a=1,b=0,c=0;24>c;c++){g[a+5*b]=(c+1)*(c+2)/2%64;var d=(2*a+3*b)%5,a=b%5,b=d}for(a=0;5>a;a++)for(b=0;5>b;b++)h[a+5*b]=b+(2*a+3*b)%5*5;for(a=1,b=0;24>b;b++){for(var e=d=c=0;7>e;e++){if(1&a){var j=(1<j?d^=1<a;a++)j[a]=f.create()}(),c=c.SHA3=e.extend({cfg:e.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],k=a[b+2*e+1],f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),k=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8),l=c[e];l.high^=k,l.low^=f}for(d=0;24>d;d++){for(e=0;5>e;e++){for(var m=f=0,n=0;5>n;n++)l=c[e+5*n],f^=l.high,m^=l.low;l=j[e],l.high=f,l.low=m}for(e=0;5>e;e++)for(l=j[(e+4)%5],f=j[(e+1)%5],k=f.high,n=f.low,f=l.high^(k<<1|n>>>31),m=l.low^(n<<1|k>>>31),n=0;5>n;n++)l=c[e+5*n],l.high^=f,l.low^=m;for(k=1;25>k;k++)l=c[k],e=l.high,l=l.low,n=g[k],32>n?(f=e<>>32-n,m=l<>>32-n):(f=l<>>64-n,m=e<>>64-n),l=j[h[k]],l.high=f,l.low=m;for(l=j[0],e=c[0],l.high=e.high,l.low=e.low,e=0;5>e;e++)for(n=0;5>n;n++)k=e+5*n,l=c[k],f=j[k],k=j[(e+1)%5+5*n],m=j[(e+2)%5+5*n],l.high=f.high^~k.high&m.high,l.low=f.low^~k.low&m.low;l=c[0],e=i[d],l.high^=e.high,l.low^=e.low}},_doFinalize:function(){var a=this._data,c=a.words,e=8*a.sigBytes,f=32*this.blockSize;c[e>>>5]|=1<<24-e%32,c[(b.ceil((e+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var a=this._state,c=this.cfg.outputLength/8,e=c/8,f=[],g=0;e>g;g++){var h=a[g],i=h.high,h=h.low,i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8);f.push(h),f.push(i)}return new d.init(f,c)},clone:function(){for(var a=e.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}),a.SHA3=e._createHelper(c),a.HmacSHA3=e._createHmacHelper(c)}(Math),a.SHA3})},{"./core":22,"./x64-core":53}],50:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./sha512")):e(d.CryptoJS)}(this,function(a){return function(){var b=a.x64,c=b.Word,d=b.WordArray,b=a.algo,e=b.SHA512,b=b.SHA384=e.extend({_doReset:function(){this._hash=new d.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var a=e._doFinalize.call(this);return a.sigBytes-=16,a}});a.SHA384=e._createHelper(b),a.HmacSHA384=e._createHmacHelper(b)}(),a.SHA384})},{"./core":22,"./sha512":51,"./x64-core":53}],51:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):e(d.CryptoJS)}(this,function(a){return function(){function b(){return e.create.apply(e,arguments)}var c=a.lib.Hasher,d=a.x64,e=d.Word,f=d.WordArray,d=a.algo,g=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],h=[];!function(){for(var a=0;80>a;a++)h[a]=b()}(),d=d.SHA512=c.extend({_doReset:function(){this._hash=new f.init([new e.init(1779033703,4089235720),new e.init(3144134277,2227873595),new e.init(1013904242,4271175723),new e.init(2773480762,1595750129),new e.init(1359893119,2917565137),new e.init(2600822924,725511199),new e.init(528734635,4215389547),new e.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],i=c[3],j=c[4],k=c[5],l=c[6],c=c[7],m=d.high,n=d.low,o=e.high,p=e.low,q=f.high,r=f.low,s=i.high,t=i.low,u=j.high,v=j.low,w=k.high,x=k.low,y=l.high,z=l.low,A=c.high,B=c.low,C=m,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=0;80>S;S++){var T=h[S];if(16>S)var U=T.high=0|a[b+2*S],V=T.low=0|a[b+2*S+1];else{var U=h[S-15],V=U.high,W=U.low,U=(V>>>1|W<<31)^(V>>>8|W<<24)^V>>>7,W=(W>>>1|V<<31)^(W>>>8|V<<24)^(W>>>7|V<<25),X=h[S-2],V=X.high,Y=X.low,X=(V>>>19|Y<<13)^(V<<3|Y>>>29)^V>>>6,Y=(Y>>>19|V<<13)^(Y<<3|V>>>29)^(Y>>>6|V<<26),V=h[S-7],Z=V.high,$=h[S-16],_=$.high,$=$.low,V=W+V.low,U=U+Z+(W>>>0>V>>>0?1:0),V=V+Y,U=U+X+(Y>>>0>V>>>0?1:0),V=V+$,U=U+_+($>>>0>V>>>0?1:0);T.high=U,T.low=V}var Z=K&M^~K&O,$=L&N^~L&P,T=C&E^C&G^E&G,ab=D&F^D&H^F&H,W=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),X=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),Y=g[S],bb=Y.high,cb=Y.low,Y=R+((L>>>14|K<<18)^(L>>>18|K<<14)^(L<<23|K>>>9)),_=Q+((K>>>14|L<<18)^(K>>>18|L<<14)^(K<<23|L>>>9))+(R>>>0>Y>>>0?1:0),Y=Y+$,_=_+Z+($>>>0>Y>>>0?1:0),Y=Y+cb,_=_+bb+(cb>>>0>Y>>>0?1:0),Y=Y+V,_=_+U+(V>>>0>Y>>>0?1:0),V=X+ab,T=W+T+(X>>>0>V>>>0?1:0),Q=O,R=P,O=M,P=N,M=K,N=L,L=J+Y|0,K=I+_+(J>>>0>L>>>0?1:0)|0,I=G,J=H,G=E,H=F,E=C,F=D,D=Y+V|0,C=_+T+(Y>>>0>D>>>0?1:0)|0}n=d.low=n+D,d.high=m+C+(D>>>0>n>>>0?1:0),p=e.low=p+F,e.high=o+E+(F>>>0>p>>>0?1:0),r=f.low=r+H,f.high=q+G+(H>>>0>r>>>0?1:0),t=i.low=t+J,i.high=s+I+(J>>>0>t>>>0?1:0),v=j.low=v+L,j.high=u+K+(L>>>0>v>>>0?1:0),x=k.low=x+N,k.high=w+M+(N>>>0>x>>>0?1:0),z=l.low=z+P,l.high=y+O+(P>>>0>z>>>0?1:0),B=c.low=B+R,c.high=A+Q+(R>>>0>B>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process(),this._hash.toX32()},clone:function(){var a=c.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32}),a.SHA512=c._createHelper(d),a.HmacSHA512=c._createHmacHelper(d)}(),a.SHA512})},{"./core":22,"./x64-core":53}],52:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):e(d.CryptoJS)}(this,function(a){return function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<c;c++){var d=g[c]-1; +b[c]=a[d>>>5]>>>31-d%32&1}for(a=this._subKeys=[],d=0;16>d;d++){for(var e=a[d]=[],f=i[d],c=0;24>c;c++)e[c/6|0]|=b[(h[c]-1+f)%28]<<31-c%6,e[4+(c/6|0)]|=b[28+(h[c+24]-1+f)%28]<<31-c%6;for(e[0]=e[0]<<1|e[0]>>>31,c=1;7>c;c++)e[c]>>>=4*(c-1)+3;e[7]=e[7]<<5|e[7]>>>27}for(b=this._invSubKeys=[],c=0;16>c;c++)b[c]=a[15-c]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,l=0,m=0;8>m;m++)l|=j[m][((i^g[m])&k[m])>>>0];this._lBlock=i,this._rBlock=h^l}e=this._lBlock,this._lBlock=this._rBlock,this._rBlock=e,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});a.DES=d._createHelper(l),f=f.TripleDES=d.extend({_doReset:function(){var a=this._key.words;this._des1=l.createEncryptor(e.create(a.slice(0,2))),this._des2=l.createEncryptor(e.create(a.slice(2,4))),this._des3=l.createEncryptor(e.create(a.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2}),a.TripleDES=d._createHelper(f)}(),a.TripleDES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],53:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):e(d.CryptoJS)}(this,function(a){return function(b){var c=a.lib,d=c.Base,e=c.WordArray,c=a.x64={};c.Word=d.extend({init:function(a,b){this.high=a,this.low=b}}),c.WordArray=d.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var f=a[d];c.push(f.high),c.push(f.low)}return e.create(c,this.sigBytes)},clone:function(){for(var a=d.clone.call(this),b=a.words=this.words.slice(0),c=b.length,e=0;c>e;e++)b[e]=b[e].clone();return a}})}(),a})},{"./core":22}],54:[function(a,b){!function(a){a(function(a){function b(a){var b=1f;++f)e[f]=d[f];else{for(a=d.length,b=this.tail;a>c;++f,++c)e[f]=d[c];for(c=0;b>c;++f,++c)e[f]=d[c]}this.buffer=e,this.head=0,this.tail=this.length},a})}(function(a){b.exports=a()})},{}],57:[function(a,b){!function(a){a(function(){function a(b){Error.call(this),this.message=b,this.name=a.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,a)}return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a})}(function(a){b.exports=a()})},{}],58:[function(a,b){(function(c){!function(a){a(function(a){var b;return"undefined"!=typeof c&&null!==c&&"function"==typeof c.nextTick?function(a){c.nextTick(a)}:(b="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)?function(a,b){var c,d=a.createElement("div");return new b(function(){var a=c;c=void 0,a()}).observe(d,{attributes:!0}),function(a){c=a,d.setAttribute("class","x")}}(document,b):function(a){try{return a("vertx").runOnLoop||a("vertx").runOnContext}catch(b){}var c=setTimeout;return function(a){c(a,0)}}(a)})}(function(c){b.exports=c(a)})}).call(this,a("c:\\Users\\oberstet\\AppData\\Roaming\\npm\\node_modules\\browserify\\node_modules\\insert-module-globals\\node_modules\\process\\browser.js"))},{"c:\\Users\\oberstet\\AppData\\Roaming\\npm\\node_modules\\browserify\\node_modules\\insert-module-globals\\node_modules\\process\\browser.js":1}],59:[function(a,b){!function(a){a(function(){return function(a){var b=Array.prototype.map,c=Array.prototype.reduce,d=Array.prototype.reduceRight,e=Array.prototype.forEach,f=a.resolve,g=a.all;return a.any=function(b){return new a(function(a,c){function d(a){h.push(a),0===--g&&c(h)}var g=0,h=[];e.call(b,function(b){++g,f(b).then(a,d)}),0===g&&a()})},a.some=function(b,c){return new a(function(a,d,g){function h(b){k>0&&(--k,l.push(b),0===k&&a(l))}function i(a){j>0&&(--j,m.push(a),0===j&&d(m))}var j,k=0,l=[],m=[];e.call(b,function(a){++k,f(a).then(h,i,g)}),c=Math.max(c,0),j=k-c+1,k=Math.min(c,k),0===k&&a(l)})},a.settle=function(a){return g(b.call(a,function(a){function b(){return a.inspect()}return a=f(a),a.then(b,b)}))},a.map=function(a,c,d){return g(b.call(a,function(a){return f(a).then(c,d)}))},a.reduce=function(a,b){function d(a,c,d){return f(a).then(function(a){return f(c).then(function(c){return b(a,c,d)})})}return 2=0&&(m.splice(c,1),k("Handled previous rejection ["+a.id+"] "+b(a.value)))}function h(a,b){l.push(a,b),n||(n=!0,n=e.set(i,0))}function i(){for(n=!1;0>>0,l=Array(k);for(d=0;d0)){j.become(e);break}l[d]=e.value,--k}else l[d]=e,--k;else--k;return 0===k&&j.become(new m(l)),new b(g,j)},b.race=function(a){if(Object(a)===a&&0===a.length)return E;var c,d,f=new h;for(c=0;c=0&&(c=this._traces[d],c.handler!==a);--d);d>=0?c.extraContext=b:this._traces.push({handler:a,extraContext:b}),this.logTraces()},b.prototype.removeTrace=function(){this.logTraces()},b.prototype.fatal=function(a,b){var c=Error();c.stack=this._createLongTrace(a.value,a.context,b).join("\n"),g(function(){throw c},0)},b.prototype.logTraces=function(){this._traceTask||(this._traceTask=g(this._doLogTraces,this.logDelay))},b.prototype._logTraces=function(){this._traceTask=void 0,this._traces=this._traces.filter(d),this._reporter.log(this.formatTraces(this._traces))},b.prototype.formatTraces=function(a){return a.map(function(a){return this._createLongTrace(a.handler.value,a.handler.context,a.extraContext)},this)},b.prototype._createLongTrace=function(a,b,d){return a=h.parse(a)||[String(a)+" (WARNING: non-Error used)"],a=c(this.stackFilter,a,0),this._appendContext(a,b),this._appendContext(a,d),this.filterDuplicateFrames?this._removeDuplicates(a):a},b.prototype._removeDuplicates=function(a){var b={},c=this.stackJumpSeparator,d=0;return a.reduceRight(function(a,e,f){return 0===f?a.unshift(e):e===c?d>0&&(a.unshift(e),d=0):b[e]||(b[e]=!0,a.unshift(e),++d),a},[])},b.prototype._appendContext=function(a,b){a.push.apply(a,this._createTrace(b))},b.prototype._createTrace=function(a){for(var b,d=[];a;){if(b=h.parse(a)){b=c(this.stackFilter,b);var e=d;1arguments.length?d:3= 2.8.0",ws:">= 0.4.31","crypto-js":">= 3.1.2-2"},devDependencies:{browserify:">= 3.28.1",nodeunit:">= 0.8.6"},repository:{type:"git",url:"git://github.com/tavendo/AutobahnJS.git"},keywords:["WAMP","WebSocket","RPC","PubSub"],author:"Tavendo GmbH",license:"MIT"}},{}]},{},[4])(4)}),angular.module("vxWamp",[]).provider("$wamp",function(){"use strict";var a;return{init:function(b){a=b||{}},$get:["$rootScope","$q",function(b,c){var d,e=[],f=c.defer(),g=function(a,c,d){return b.$broadcast("$wamp.onchallenge",{promise:f,session:a,method:c,extra:d}),f.promise};return a=angular.extend({onchallenge:g},a),d=new autobahn.Connection(a),d.onopen=function(a){for(var c;e.length>0;)c=e.shift(),c.method.apply(c.object,c.args);console.log("Congrats! You're connected to the WAMP server!"),b.$broadcast("$wamp.open",a)},d.onclose=function(a,c){console.log("Connection Closed: ",a),b.$broadcast("$wamp.close",{reason:a,details:c})},{connection:d,session:d.session,open:function(){d.open()},close:function(){d.close()},subscribe:function(a,b,f){return d.isOpen?c.when(d.session.subscribe(a,b,f)):(e.push({object:this,method:this.subscribe,args:[a,b,f]}),c.defer().promise)},unsubscribe:function(a){return d.isOpen?c.when(d.session.unsubscribe(a)):(e.push({object:this,method:this.unsubscribe,args:[a]}),c.defer().promise)},publish:function(a,b,f,g){return d.isOpen?c.when(d.session.publish(a,b,f,g)):(e.push({object:this,method:this.publish,args:[a,b,f,g]}),c.defer().promise)},register:function(a,b,f){return d.isOpen?c.when(d.session.register(a,b,f)):(e.push({object:this,method:this.register,args:[a,b,f]}),c.defer().promise)},call:function(a,b,f,g){return d.isOpen?c.when(d.session.call(a,b,f,g)):(e.push({object:this,method:this.call,args:[a,b,f,g]}),c.defer().promise)}}}]}}); \ No newline at end of file diff --git a/src/angular-wamp.js b/src/angular-wamp.js new file mode 100644 index 0000000..2935d2f --- /dev/null +++ b/src/angular-wamp.js @@ -0,0 +1,133 @@ +/** + * @ngdoc service + * @name vxWamp.$wamp + * @description + */ +angular.module('vxWamp', []) + .provider('$wamp', function () { + 'use strict'; + var options; + + return { + /** + * $wampProvider + * @param i + */ + init: function (i) { + options = i || {}; + }, + $get: function ($rootScope, $q) { + var callbackQueue = [], connection; + var onChallengeDeferred = $q.defer(); + + var onchallenge = function (session, method, extra) { + + $rootScope.$broadcast("$wamp.onchallenge", { + promise: onChallengeDeferred, + session: session, + method: method, + extra: extra + }); + + return onChallengeDeferred.promise; + }; + + options = angular.extend({onchallenge: onchallenge}, options); + + connection = new autobahn.Connection(options); + connection.onopen = function (session) { + //Call any callbacks that were queued up before the connection was established + var call; + while (callbackQueue.length > 0) { + call = callbackQueue.shift(); + call.method.apply(call.object, call.args); + } + + console.log("Congrats! You're connected to the WAMP server!"); + $rootScope.$broadcast("$wamp.open", session); + + }; + + connection.onclose = function (reason, details) { + console.log("Connection Closed: ", reason); + $rootScope.$broadcast("$wamp.close", {reason: reason, details: details}); + + }; + + + return { + connection: connection, + session: connection.session, + open: function () { + connection.open(); + }, + close: function () { + connection.close(); + }, + subscribe: function (topic, handler, options) { + + if (!connection.isOpen) { + callbackQueue.push({object: this, method: this.subscribe, args: [topic, handler, options]}); + } else { + return $q.when(connection.session.subscribe(topic, handler, options)); + } + + return $q.defer().promise; + }, + unsubscribe: function (subscription) { + + if (!connection.isOpen) { + callbackQueue.push({object: this, method: this.unsubscribe, args: [subscription]}); + } else { + return $q.when(connection.session.unsubscribe(subscription)); + } + + return $q.defer().promise; + }, + publish: function (topic, args, kwargs, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.publish, + args: [topic, args, kwargs, options] + }); + } else { + return $q.when(connection.session.publish(topic, args, kwargs, options)); + } + + return $q.defer().promise; + }, + register: function (procedure, endpoint, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.register, + args: [procedure, endpoint, options] + }); + } else { + return $q.when(connection.session.register(procedure, endpoint, options)); + } + + return $q.defer().promise; + }, + call: function (procedure, args, kwargs, options) { + + if (!connection.isOpen) { + callbackQueue.push({ + object: this, + method: this.call, + args: [procedure, args, kwargs, options] + }); + } else { + return $q.when(connection.session.call(procedure, args, kwargs, options)); + } + + return $q.defer().promise; + } + }; + } + }; + + }); \ No newline at end of file diff --git a/src/autobahn.min.js b/src/autobahn.min.js new file mode 100644 index 0000000..b4785cd --- /dev/null +++ b/src/autobahn.min.js @@ -0,0 +1,271 @@ +/* + + Counter block mode compatible with Dr Brian Gladman fileenc.c + derived from CryptoJS.mode.CTR + Jan Hruby jhruby.web@gmail.com + + (c) 2012 by C?dric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + MIT License (c) copyright 2013-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors */ +!function(la){if("object"==typeof exports)module.exports=la();else if("function"==typeof define&&define.amd)define(la);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.autobahn=la()}}(function(){return function h(p,k,b){function a(d,e){if(!k[d]){if(!p[d]){var q="function"==typeof require&&require;if(!e&&q)return q(d,!0);if(c)return c(d,!0);throw Error("Cannot find module '"+d+"'");}q=k[d]={exports:{}};p[d][0].call(q.exports,function(c){var n= + p[d][1][c];return a(n?n:c)},q,q.exports,h,p,k,b)}return k[d].exports}for(var c="function"==typeof require&&require,e=0;ethis._max_retry_delay&&(this._retry_delay= + this._max_retry_delay);this._retry_count+=1;var a;a=this._retry&&this._retry_count<=this._max_retries?{count:this._retry_count,delay:this._retry_delay,will_retry:!0}:{count:null,delay:null,will_retry:!1};this._retry_delay_growth&&(this._retry_delay*=this._retry_delay_growth);return a};q.prototype.open=function(){function a(){b._transport=b._create_transport();if(b._transport)b._session=new c.Session(b._transport,b._defer,b._options.onchallenge),b._session_close_reason=null,b._session_close_message= + null,b._transport.onopen=function(){b._autoreconnect_reset();b._connect_successes+=1;b._session.join(b._options.realm,b._options.authmethods,b._options.authid)},b._session.onjoin=function(a){if(b.onopen)try{b.onopen(b._session,a)}catch(c){d.debug("Exception raised from app code while firing Connection.onopen()",c)}},b._session.onleave=function(a,c){b._session_close_reason=a;b._session_close_message=c.message||"";b._retry=!1;b._transport.close(1E3)},b._transport.onclose=function(c){b._autoreconnect_reset_timer(); + var e=b._transport=null;0===b._connect_successes?(e="unreachable",b._retry_if_unreachable||(b._retry=!1)):e=c.wasClean?"closed":"lost";c=b._autoreconnect_advance();if(b.onclose){var m={reason:b._session_close_reason,message:b._session_close_message,retry_delay:c.delay,retry_count:c.count,will_retry:c.will_retry};try{var q=b.onclose(e,m)}catch(v){d.debug("Exception raised from app code while firing Connection.onclose()",v)}}b._session&&(b._session._id=null,b._session=null,b._session_close_reason=null, + b._session_close_message=null);b._retry&&!q&&(c.will_retry?(b._is_retrying=!0,d.debug("retrying in "+c.delay+" s"),b._retry_timer=setTimeout(a,1E3*c.delay)):d.debug("giving up trying to reconnect"))};else if(b._retry=!1,b.onclose)b.onclose("unsupported",{reason:null,message:null,retry_delay:null,retry_count:null,will_retry:!1})}var b=this;if(b._transport)throw"connection already open (or opening)";b._autoreconnect_reset();b._retry=!0;a()};q.prototype.close=function(a,c){if(!this._transport&&!this._is_retrying)throw"connection already closed"; + this._retry=!1;this._session&&this._session.isOpen?this._session.leave(a,c):this._transport&&this._transport.close(1E3)};Object.defineProperty(q.prototype,"defer",{get:function(){return this._defer}});Object.defineProperty(q.prototype,"session",{get:function(){return this._session}});Object.defineProperty(q.prototype,"isOpen",{get:function(){return this._session&&this._session.isOpen?!0:!1}});Object.defineProperty(q.prototype,"isConnected",{get:function(){return this._transport?!0:!1}});Object.defineProperty(q.prototype, + "transport",{get:function(){return this._transport?this._transport:{info:{type:"none",url:null,protocol:null}}}});Object.defineProperty(q.prototype,"isRetrying",{get:function(){return this._is_retrying}});k.Connection=q}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./autobahn.js":4,"./log.js":7,"./session.js":16,"./util.js":19,when:77}],7:[function(h,p,k){(function(b){var a=function(){};"AUTOBAHN_DEBUG"in b&&AUTOBAHN_DEBUG&&"console"in b&&(a=function(){console.log.apply(console, + arguments)});k.debug=a}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],8:[function(h,p,k){h("./polyfill/object");h("./polyfill/array");h("./polyfill/string");h("./polyfill/function");h("./polyfill/console");h("./polyfill/typedarray");h("./polyfill/json")},{"./polyfill/array":9,"./polyfill/console":10,"./polyfill/function":11,"./polyfill/json":12,"./polyfill/object":13,"./polyfill/string":14,"./polyfill/typedarray":15}],9:[function(h,p,k){"function"!==typeof Array.prototype.reduce&& +(Array.prototype.reduce=function(b){var a,c,e,d;if(null===this||"undefined"===typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!==typeof b)throw new TypeError(b+" is not a function");c=Object(this);a=c.length>>>0;d=0;if(2<=arguments.length)e=arguments[1];else{for(;d=a)throw new TypeError("Reduce of empty array with no initial value");e=c[d++]}for(;da&&(a+=this.length);0>a&&(a=0);for(var c=this.length;aa&&(a+=this.length);a>this.length-1&&(a=this.length-1);for(a++;0>>0)-1,e;if(2<=arguments.length)e=arguments[1];else{for(;0<= + c&&!c in a;)c--;if(0>c)throw new TypeError("Reduce of empty array with no initial value");e=a[c--]}for(;0<=c;c--)c in a&&(e=b(e,a[c],c,a));return e})},{}],10:[function(h,p,k){(function(b){(function(a){a||(a=window.console={log:function(a,b,d,m,q){},info:function(a,b,d,m,q){},warn:function(a,b,d,m,q){},error:function(a,b,d,m,q){},assert:function(a,b){}});"object"===typeof a.log&&(a.log=Function.prototype.call.bind(a.log,a),a.info=Function.prototype.call.bind(a.info,a),a.warn=Function.prototype.call.bind(a.warn, + a),a.error=Function.prototype.call.bind(a.error,a),a.debug=Function.prototype.call.bind(a.info,a));"group"in a||(a.group=function(b){a.info("\n--- "+b+" ---\n")});"groupEnd"in a||(a.groupEnd=function(){a.log("\n")});"assert"in a||(a.assert=function(a,b){if(!a)try{throw Error("assertion failed: "+b);}catch(d){setTimeout(function(){throw d;},0)}});"time"in a||function(){var b={};a.time=function(a){b[a]=(new Date).getTime()};a.timeEnd=function(e){var d=(new Date).getTime();a.info(e+": "+(e in b?d-b[e]: + 0)+"ms")}}()})(b.console)}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],11:[function(h,p,k){Function.prototype.bind||(Function.prototype.bind=function(b){var a=this,c=Array.prototype.slice.call(arguments,1);return function(){return a.apply(b,Array.prototype.concat.apply(c,arguments))}})},{}],12:[function(h,p,k){"object"!==typeof JSON&&(JSON={});(function(){function b(a){return 10>a?"0"+a:a}function a(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b= + g[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,g){var d,e,v,y,H=m,f,x=g[b];x&&"object"===typeof x&&"function"===typeof x.toJSON&&(x=x.toJSON(b));"function"===typeof n&&(x=n.call(g,b,x));switch(typeof x){case "string":return a(x);case "number":return isFinite(x)?String(x):"null";case "boolean":case "null":return String(x);case "object":if(!x)return"null";m+=q;f=[];if("[object Array]"===Object.prototype.toString.apply(x)){y=x.length; + for(d=0;dt)throw RangeError("Array too large for polyfill"); + var f;for(f=0;f>f}function l(a,b){var f=32-b;return a<>>f}function z(a){return[a&255]}function h(a){return n(a[0],8)}function w(a){return[a&255]}function v(a){return l(a[0],8)}function y(a){a=aa(Number(a));return[0>a?0:255>8&255,a&255]}function f(a){return n(a[0]<<8|a[1],16)}function x(a){return[a>>8&255,a&255]}function J(a){return l(a[0]<<8|a[1],16)}function A(a){return[a>>24&255,a>>16&255,a>>8&255, + a&255]}function k(a){return n(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function p(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}function B(a){return l(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function E(a,b,f){function c(a){var b=V(a);a-=b;return 0.5>a?b:0.5a?1:0):0===a?(e=l=0,d=-Infinity===1/a?1:0):(d=0>a,a=u(a),a>=O(2,1-g)?(l=R(V(S(a)/r),1023),e=c(a/O(2,l)*O(2,f)),2<=e/O(2,f)&&(l+=1,e=1), + l>g?(l=(1<>=1;c.reverse();d=c.join("");a=(1<c?-0:0}function Q(a){return I(a,11,52)}function N(a){return E(a,11,52)}function F(a){return I(a,8,23)}function G(a){return E(a,8,23)}var s=void 0,t=1E5,r=Math.LN2,u=Math.abs,V=Math.floor,S=Math.log,M=Math.max,R=Math.min,O=Math.pow,aa=Math.round;(function(){var a=Object.defineProperty,b;try{b=Object.defineProperty({},"x",{})}catch(f){b=!1}a&&b||(Object.defineProperty=function(b,f,c){if(a)try{return a(b, + f,c)}catch(g){}if(b!==Object(b))throw TypeError("Object.defineProperty called on non-object");Object.prototype.__defineGetter__&&"get"in c&&Object.prototype.__defineGetter__.call(b,f,c.get);Object.prototype.__defineSetter__&&"set"in c&&Object.prototype.__defineSetter__.call(b,f,c.set);"value"in c&&(b[f]=c.value);return b})})();(function(){function l(a){a>>=0;if(0>a)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:a});Object.defineProperty(this, + "_bytes",{value:Array(a)});for(var b=0;b>=0;if(0>a)throw RangeError("length is not a small enough positive integer.");Object.defineProperty(this,"length",{value:a});Object.defineProperty(this,"byteLength",{value:a*this.BYTES_PER_ELEMENT});Object.defineProperty(this,"buffer",{value:new l(this.byteLength)});Object.defineProperty(this,"byteOffset",{value:0})}.apply(this,arguments);if(1<=arguments.length&& + "object"===e(arguments[0])&&arguments[0]instanceof n)return function(a){if(this.constructor!==a.constructor)throw TypeError();var b=a.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new l(b)});Object.defineProperty(this,"byteLength",{value:b});Object.defineProperty(this,"byteOffset",{value:0});Object.defineProperty(this,"length",{value:a.length});for(b=0;b>>=0;if(b>a.byteLength)throw RangeError("byteOffset out of range");if(b%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(f===s){var c=a.byteLength-b;if(c%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");f=c/this.BYTES_PER_ELEMENT}else f>>>=0,c=f*this.BYTES_PER_ELEMENT;if(b+c>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer"); + Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this,"byteLength",{value:c});Object.defineProperty(this,"byteOffset",{value:b});Object.defineProperty(this,"length",{value:f})}.apply(this,arguments);throw TypeError();}function r(a,b,f){var c=function(){Object.defineProperty(this,"constructor",{value:c});n.apply(this,arguments);g(this)};"__proto__"in c?c.__proto__=n:(c.from=n.from,c.of=n.of);c.BYTES_PER_ELEMENT=a;var d=function(){};d.prototype=t;c.prototype=new d;Object.defineProperty(c.prototype, + "BYTES_PER_ELEMENT",{value:a});Object.defineProperty(c.prototype,"_pack",{value:b});Object.defineProperty(c.prototype,"_unpack",{value:f});return c}a.ArrayBuffer=a.ArrayBuffer||l;Object.defineProperty(n,"from",{value:function(a){return new this(a)}});Object.defineProperty(n,"of",{value:function(){return new this(arguments)}});var t={};n.prototype=t;Object.defineProperty(n.prototype,"_getter",{value:function(a){if(1>arguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(a>=this.length)return s; + var b=[],f,c;f=0;for(c=this.byteOffset+a*this.BYTES_PER_ELEMENT;farguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(!(a>=this.length)){var f=this._pack(b),c,d;c=0;for(d=this.byteOffset+a*this.BYTES_PER_ELEMENT;c>>0,d=M(d,0);a>>=0;a=0>a?M(d+a,0):R(a,d);b>>=0;b=0>b?M(d+b,0):R(b,d);f=f===s?d:f>>0;f=0>f?M(d+f,0):R(f,d);d=R(f-b,d-a);from>>0;if(!m(a))throw TypeError();for(var d=0;d>>0,d=M(d,0);b>>=0;b=0>b?M(d+b,0):R(b,d);f=f===s?d:f>>0;for(d=0>f?M(d+f,0):R(f,d);b>>0;if(!m(a))throw TypeError(); + for(var d=[],g=0;g>>0;if(!m(a))throw TypeError();for(var c=1>>0;if(!m(a))throw TypeError();for(var c=1>>0;if(!m(a))throw TypeError();for(var d=0;d>>0;if(0===f)return-1;var c=0,d;0=f)return-1;for(c=0<=c?c:M(f-u(c),0);c>>0,c=Array(f),d=0;d>>0;if(0===f)return-1;var c=f;1>>0;if(!m(a))throw TypeError();var d=[];d.length=c;for(var g=0;g>>0;if(!m(a))throw TypeError();if(0===f&&1===arguments.length)throw TypeError();var c=0,d;for(d=2<=arguments.length?arguments[1]:b._getter(c++);c>>0;if(!m(a))throw TypeError(); + if(0===f&&1===arguments.length)throw TypeError();var f=f-1,c;for(c=2<=arguments.length?arguments[1]:b._getter(f--);0<=f;)c=a.call(s,c,b._getter(f),f,b),f--;return c}});Object.defineProperty(n.prototype,"reverse",{value:function(){if(this===s||null===this)throw TypeError();for(var a=Object(this),b=a.length>>>0,f=V(b/2),c=0,b=b-1;carguments.length)throw SyntaxError("Not enough arguments"); + var f,c,d,g,l,n;if("object"===typeof arguments[0]&&arguments[0].constructor===this.constructor){f=arguments[0];c=arguments[1]>>>0;if(c+f.length>this.length)throw RangeError("Offset plus length of array is out of range");n=this.byteOffset+c*this.BYTES_PER_ELEMENT;c=f.length*this.BYTES_PER_ELEMENT;if(f.buffer===this.buffer){d=[];g=0;for(l=f.byteOffset;g>>0;c=arguments[1]>>>0;if(c+d>this.length)throw RangeError("Offset plus length of array is out of range");for(g=0;g>>0,d=a>>0,d=0>d?M(c+d,0):R(d,c),g=b===s?c:b>>0,c=0>g?M(c+g,0):R(g,c), + g=new f.constructor(c-d),l=0;d>>0;if(!m(a))throw TypeError();for(var d=0;d>>0,c=Array(f),d=0;d>=0;b>>=0;1>arguments.length&&(a=0);2>arguments.length&&(b=this.length);0>a&&(a=this.length+a);0>b&&(b=this.length+b);var f=this.length;a=0>a?0:a>f?f:a;f=this.length;f=(0>b?0:b>f?f:b)-a;0>f&&(f=0);return new this.constructor(this.buffer,this.byteOffset+a*this.BYTES_PER_ELEMENT,f)}});var E=r(1,z,h),S=r(1,w,v),I=r(1,y,v),O=r(2,H,f),aa=r(2,x,J),ha=r(4,A,k),da=r(4,p,B), + U=r(4,G,F),$=r(8,N,Q);a.Int8Array=b.Int8Array=a.Int8Array||E;a.Uint8Array=b.Uint8Array=a.Uint8Array||S;a.Uint8ClampedArray=b.Uint8ClampedArray=a.Uint8ClampedArray||I;a.Int16Array=b.Int16Array=a.Int16Array||O;a.Uint16Array=b.Uint16Array=a.Uint16Array||aa;a.Int32Array=b.Int32Array=a.Int32Array||ha;a.Uint32Array=b.Uint32Array=a.Uint32Array||da;a.Float32Array=b.Float32Array=a.Float32Array||U;a.Float64Array=b.Float64Array=a.Float64Array||$})();(function(){function b(a,f){return m(a.get)?a.get(f):a[f]} + function f(a,b,c){if(!(a instanceof ArrayBuffer||"ArrayBuffer"===d(a)))throw TypeError();b>>>=0;if(b>a.byteLength)throw RangeError("byteOffset out of range");c=c===s?a.byteLength-b:c>>>0;if(b+c>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this,"byteLength",{value:c});Object.defineProperty(this,"byteOffset",{value:b})}function c(f){return function(c,d){c>>>=0;if(c+f.BYTES_PER_ELEMENT> + this.byteLength)throw RangeError("Array index out of range");c+=this.byteOffset;for(var g=new a.Uint8Array(this.buffer,c,f.BYTES_PER_ELEMENT),n=[],e=0;e>>=0;if(c+f.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");d=new f([d]);d=new a.Uint8Array(d.buffer);var n=[],e;for(e=0;e must be a string");d.assert(!b||Array.isArray(b),"Session.join: must be an array []");d.assert(!c|| + "string"===typeof c,"Session.join: must be a string");if(this.isOpen)throw"session already open";this._goodbye_sent=!1;this._realm=a;var f={};f.roles=WAMP_FEATURES;b&&(f.authmethods=b);c&&(f.authid=c);this._send_wamp([1,a,f])};w.prototype.leave=function(a,b){d.assert(!a||"string"===typeof a,"Session.leave: must be a string");d.assert(!b||"string"===typeof b,"Session.leave: must be a string");if(!this.isOpen)throw"session not open";a||(a="wamp.close.normal");var c={};b&& + (c.message=b);this._send_wamp([6,c,a]);this._goodbye_sent=!0};w.prototype.call=function(b,c,g,f){d.assert("string"===typeof b,"Session.call: must be a string");d.assert(!c||Array.isArray(c),"Session.call: must be an array []");d.assert(!g||g instanceof Object,"Session.call: must be an object {}");d.assert(!f||f instanceof Object,"Session.call: must be an object {}");if(!this.isOpen)throw"session not open";var l=a(),n=this._defer();this._call_reqs[l]=[n,f];b=[48, + l,f||{},this.resolve(b)];c&&(b.push(c),g&&b.push(g));this._send_wamp(b);return n.promise.then?n.promise:n};w.prototype.publish=function(b,c,g,f){d.assert("string"===typeof b,"Session.publish: must be a string");d.assert(!c||Array.isArray(c),"Session.publish: must be an array []");d.assert(!g||g instanceof Object,"Session.publish: must be an object {}");d.assert(!f||f instanceof Object,"Session.publish: must be an object {}");if(!this.isOpen)throw"session not open"; + var l=f&&f.acknowledge,n=null,e=a();l&&(n=this._defer(),this._publish_reqs[e]=[n,f]);b=[16,e,f||{},this.resolve(b)];c&&(b.push(c),g&&b.push(g));this._send_wamp(b);if(n)return n.promise.then?n.promise:n};w.prototype.subscribe=function(b,c,g){d.assert("string"===typeof b,"Session.subscribe: must be a string");d.assert("function"===typeof c,"Session.subscribe: must be a function");d.assert(!g||g instanceof Object,"Session.subscribe: must be an object {}");if(!this.isOpen)throw"session not open"; + var f=a(),l=this._defer();this._subscribe_reqs[f]=[l,b,c,g];c=[32,f];g?c.push(g):c.push({});c.push(this.resolve(b));this._send_wamp(c);return l.promise.then?l.promise:l};w.prototype.register=function(b,c,g){d.assert("string"===typeof b,"Session.register: must be a string");d.assert("function"===typeof c,"Session.register: must be a function");d.assert(!g||g instanceof Object,"Session.register: must be an object {}");if(!this.isOpen)throw"session not open";var f=a(), + l=this._defer();this._register_reqs[f]=[l,b,c,g];c=[64,f];g?c.push(g):c.push({});c.push(this.resolve(b));this._send_wamp(c);return l.promise.then?l.promise:l};w.prototype.unsubscribe=function(b){d.assert(b instanceof l,"Session.unsubscribe: must be an instance of class autobahn.Subscription");if(!this.isOpen)throw"session not open";if(!(b.active&&b.id in this._subscriptions))throw"subscription not active";var c=this._subscriptions[b.id],g=c.indexOf(b);if(-1===g)throw"subscription not active"; + c.splice(g,1);b.active=!1;g=this._defer();c.length?g.resolve(!1):(c=a(),this._unsubscribe_reqs[c]=[g,b.id],this._send_wamp([34,c,b.id]));return g.promise.then?g.promise:g};w.prototype.unregister=function(b){d.assert(b instanceof z,"Session.unregister: must be an instance of class autobahn.Registration");if(!this.isOpen)throw"session not open";if(!(b.active&&b.id in this._registrations))throw"registration not active";var c=a(),g=this._defer();this._unregister_reqs[c]=[g,b];this._send_wamp([66, + c,b.id]);return g.promise.then?g.promise:g};w.prototype.prefix=function(a,b){d.assert("string"===typeof a,"Session.prefix: must be a string");d.assert(!b||"string"===typeof b,"Session.prefix: must be a string or falsy");b?this._prefixes[a]=b:a in this._prefixes&&delete this._prefixes[a]};w.prototype.resolve=function(a){d.assert("string"===typeof a,"Session.resolve: must be a string");var b=a.indexOf(":");if(0<=b){var c=a.substring(0,b);if(c in this._prefixes)return this._prefixes[c]+ + "."+a.substring(b+1);throw"cannot resolve CURIE prefix '"+c+"'";}return a};k.Session=w;k.Invocation=m;k.Event=q;k.Result=g;k.Error=n;k.Subscription=l;k.Registration=z;k.Publication=P}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./log.js":7,"./util.js":19,when:77,"when/function":54}],17:[function(h,p,k){function b(b){a.assert(void 0!==b.url,"options.url missing");a.assert("string"===typeof b.url,"options.url must be a string");this._options=b}var a=h("../util.js"), + c=h("../log.js");h("when");b.prototype.type="longpoll";b.prototype.create=function(){var b=this;c.debug("longpoll.Factory.create");var d={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"longpoll",url:null,protocol:"wamp.2.json"},_run:function(){var m=null,q=!1,g=b._options.request_timeout||2E3;a.http_post(b._options.url+"/open",JSON.stringify({protocols:["wamp.2.json"]}),g).then(function(n){function l(){c.debug("longpoll.Transport: polling for message ..."); + a.http_post(z+"/receive",null,g).then(function(a){a&&(a=JSON.parse(a),c.debug("longpoll.Transport: message received",a),d.onmessage(a));q||l()},function(a){c.debug("longpoll.Transport: could not receive message",a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport receive failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}m=JSON.parse(n);var z=b._options.url+"/"+m.transport;d.info.url=z;c.debug("longpoll.Transport: open",m);d.close=function(b,l){if(q)throw"transport is already closing"; + q=!0;a.http_post(z+"/close",null,g).then(function(){c.debug("longpoll.Transport: transport closed");d.onclose({code:1E3,reason:"transport closed",wasClean:!0})},function(a){c.debug("longpoll.Transport: could not close transport",a.code,a.text)})};d.send=function(b){if(q)throw"transport is closing or closed already";c.debug("longpoll.Transport: sending message ...",b);b=JSON.stringify(b);a.http_post(z+"/send",b,g).then(function(){c.debug("longpoll.Transport: message sent")},function(a){c.debug("longpoll.Transport: could not send message", + a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport send failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})};l();d.onopen()},function(a){c.debug("longpoll.Transport: could not open transport",a.code,a.text);q=!0;d.onclose({code:1001,reason:"transport open failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}};d._run();return d};k.Factory=b},{"../log.js":7,"../util.js":19,when:77}],18:[function(h,p,k){(function(b){function a(a){c.assert(void 0!==a.url,"options.url missing"); + c.assert("string"===typeof a.url,"options.url must be a string");a.protocols?c.assert(Array.isArray(a.protocols),"options.protocols must be an array"):a.protocols=["wamp.2.json"];this._options=a}var c=h("../util.js"),e=h("../log.js");a.prototype.type="websocket";a.prototype.create=function(){var a=this,c={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"websocket",url:null,protocol:"wamp.2.json"}};"window"in b?function(){var b;if("WebSocket"in + window)b=a._options.protocols?new window.WebSocket(a._options.url,a._options.protocols):new window.WebSocket(a._options.url);else if("MozWebSocket"in window)b=a._options.protocols?new window.MozWebSocket(a._options.url,a._options.protocols):new window.MozWebSocket(a._options.url);else throw"browser does not support WebSocket";b.onmessage=function(a){e.debug("WebSocket transport receive",a.data);a=JSON.parse(a.data);c.onmessage(a)};b.onopen=function(){c.info.url=a._options.url;c.onopen()};b.onclose= + function(a){c.onclose({code:a.code,reason:a.message,wasClean:a.wasClean})};c.send=function(a){a=JSON.stringify(a);e.debug("WebSocket transport send",a);b.send(a)};c.close=function(a,c){b.close(a,c)}}():function(){var b=h("ws"),g,n;a._options.protocols?(n=a._options.protocols,Array.isArray(n)&&(n=n.join(",")),g=new b(a._options.url,{protocol:n})):g=new b(a._options.url);c.send=function(a){a=JSON.stringify(a);g.send(a,{binary:!1})};c.close=function(a,b){g.close()};g.on("open",function(){c.onopen()}); + g.on("message",function(a,b){if(!b.binary){var d=JSON.parse(a);c.onmessage(d)}});g.on("close",function(a,b){c.onclose({code:a,reason:b,wasClean:1E3===a})});g.on("error",function(a){c.onclose({code:1006,reason:"",wasClean:!1})})}();return c};k.Factory=a}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../log.js":7,"../util.js":19,ws:78}],19:[function(h,p,k){(function(b){var a=h("./log.js"),c=h("when"),e=function(a,c){if(!a){if(e.useDebugger||"AUTOBAHN_DEBUG"in b&& + AUTOBAHN_DEBUG)debugger;throw Error(c||"Assertion failed!");}};k.rand_normal=function(a,b){var c,g;do c=2*Math.random()-1,g=2*Math.random()-1,g=c*c+g*g;while(1<=g||0==g);g=Math.sqrt(-2*Math.log(g)/g);return(a||0)+c*g*(b||1)};k.assert=e;k.http_post=function(b,e,q){a.debug("new http_post request",b,e,q);var g=c.defer(),n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var a=1223===n.status?204:n.status;200===a&&g.resolve(n.responseText);if(204===a)g.resolve();else{var b=null; + try{b=n.statusText}catch(c){}g.reject({code:a,text:b})}}};n.open("POST",b,!0);n.setRequestHeader("Content-type","application/json; charset=utf-8");0b;b++)a[b]=128>b?b<<1:b<<1^283;for(var c=0,v=0,b=0;256>b;b++){var k=v^v<<1^v<<2^v<<3^v<<4,k=k>>>8^k&255^99;e[c]=k;d[k]=c;var A=a[c],p=a[A],C=a[p],B=257*a[k]^16843008*k;m[c]=B<<24|B>>>8;q[c]=B<<16|B>>>16;g[c]=B<<8|B>>>24;n[c]=B;B=16843009*C^65537*p^257*A^16843008*c;l[k]=B<<24|B>>>8;z[k]=B<<16|B>>>16;h[k]=B<< +8|B>>>24;w[k]=B;c?(c=A^a[a[a[C^A]]],v^=a[a[v]]):c=v=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],c=c.AES=a.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,a=4*((this._nRounds=c+6)+1),d=this._keySchedule=[],g=0;g>>24]<<24|e[n>>>16&255]<<16|e[n>>>8&255]<<8|e[n&255]):(n=n<<8|n>>>24,n=e[n>>>24]<<24|e[n>>>16&255]<<16|e[n>>>8&255]<<8|e[n&255],n^=v[g/c|0]<<24);d[g]=d[g-c]^n}b=this._invKeySchedule=[];for(c=0;cc||4>=g?n:l[e[n>>>24]]^z[e[n>>>16&255]]^h[e[n>>>8&255]]^w[e[n&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,m,q,g,n,e)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3];a[b+3]=c;this._doCryptBlock(a,b,this._invKeySchedule,l,z,h,w,d);c=a[b+1];a[b+1]=a[b+3];a[b+3]=c},_doCryptBlock:function(a,b,c,d,g,l,n,e){for(var m=this._nRounds,z=a[b]^c[0],q=a[b+1]^c[1],v=a[b+2]^c[2],h=a[b+3]^c[3],w=4,P=1;P>>24]^g[q>>>16&255]^l[v>>>8& + 255]^n[h&255]^c[w++],p=d[q>>>24]^g[v>>>16&255]^l[h>>>8&255]^n[z&255]^c[w++],r=d[v>>>24]^g[h>>>16&255]^l[z>>>8&255]^n[q&255]^c[w++],h=d[h>>>24]^g[z>>>16&255]^l[q>>>8&255]^n[v&255]^c[w++],z=k,q=p,v=r;k=(e[z>>>24]<<24|e[q>>>16&255]<<16|e[v>>>8&255]<<8|e[h&255])^c[w++];p=(e[q>>>24]<<24|e[v>>>16&255]<<16|e[h>>>8&255]<<8|e[z&255])^c[w++];r=(e[v>>>24]<<24|e[h>>>16&255]<<16|e[z>>>8&255]<<8|e[q&255])^c[w++];h=(e[h>>>24]<<24|e[z>>>16&255]<<16|e[q>>>8&255]<<8|e[v&255])^c[w++];a[b]=k;a[b+1]=p;a[b+2]=r;a[b+3]= + h},keySize:8});b.AES=a._createHelper(c)})();return b.AES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],21:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){b.lib.Cipher||function(a){var c=b.lib,e=c.Base,d=c.WordArray,m=c.BufferedBlockAlgorithm,q=b.enc.Base64,g=b.algo.EvpKDF,n=c.Cipher=m.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a, + b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){m.reset.call(this);this._doReset()},process:function(a){this._append(a);return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(a){return{encrypt:function(b,c,d){return("string"==typeof c?y:v).encrypt(a,b,c,d)}, + decrypt:function(b,c,d){return("string"==typeof c?y:v).decrypt(a,b,c,d)}}}}()});c.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=b.mode={},z=c.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a;this._iv=b}}),l=l.CBC=function(){function b(c,d,f){var g=this._iv;g?this._iv=a:g=this._prevBlock;for(var l=0;l>>2]&255}};c.BlockCipher=n.extend({cfg:n.cfg.extend({mode:l,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b= + this._process(!0),a.unpad(b);return b},blockSize:4});var w=c.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),l=(b.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?d.create([1398893684,1701076831]).concat(a).concat(b):b).toString(q)},parse:function(a){a=q.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=d.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a, + salt:c})}},v=c.SerializableCipher=e.extend({cfg:e.extend({format:l}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var g=a.createEncryptor(c,d);b=g.finalize(b);g=g.cfg;return w.create({ciphertext:b,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),e=(b.kdf= +{}).OpenSSL={execute:function(a,b,c,l){l||(l=d.random(8));a=g.create({keySize:b+c}).compute(a,l);c=d.create(a.words.slice(b),4*c);a.sigBytes=4*b;return w.create({key:a,iv:c,salt:l})}},y=c.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:e}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize, + b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}()})},{"./core":22}],22:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a():b.CryptoJS=a()})(this,function(){var b=b||function(a,b){var e={},d=e.lib={},m=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;b&&c.mixIn(b);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a, + arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),q=d.WordArray=m.extend({init:function(a,d){a=this.words=a||[];this.sigBytes=d!=b?d:4*a.length},toString:function(a){return(a||n).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var g=0;g>>2]|= + (c[g>>>2]>>>24-g%4*8&255)<<24-(d+g)%4*8;else if(65535>>2]=c[g>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8;b.length=a.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((g>>>4).toString(16));c.push((g&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new q.init(c,b/2)}},l=g.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<< + 24-d%4*8;return new q.init(c,b)}},z=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(l.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return l.parse(unescape(encodeURIComponent(a)))}},h=d.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,g=c.sigBytes,l= + this.blockSize,n=g/(4*l),n=b?a.ceil(n):a.max((n|0)-this._minBufferSize,0);b=n*l;g=a.min(4*b,g);if(b){for(var e=0;e>>2]>>>24-q%4*8&255)<<16|(b[q+1>>>2]>>>24-(q+1)%4*8&255)<<8|b[q+2>>>2]>>>24-(q+2)%4*8&255,n=0;4>n&&q+0.75*n>>6*(3-n)&63));if(b=m.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(b){var e=b.length,d=this._map,m=d.charAt(64);m&&(m=b.indexOf(m),-1!=m&&(e=m));for(var m=[],q=0,g=0;g>>6-g%4*2;m[q>>>2]|=(n| +l)<<24-q%4*8;q++}return a.create(m,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();return b.enc.Base64})},{"./core":22}],24:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(){function a(a){return a<<8&4278255360|a>>>8&16711935}var c=b.lib.WordArray,e=b.enc;e.Utf16=e.Utf16BE={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],g=0;g>>2]>>>16-g% +4*8&65535));return c.join("")},parse:function(a){for(var b=a.length,e=[],g=0;g>>1]|=a.charCodeAt(g)<<16-g%2*16;return c.create(e,2*b)}};e.Utf16LE={stringify:function(b){var c=b.words;b=b.sigBytes;for(var e=[],g=0;g>>2]>>>16-g%4*8&65535);e.push(String.fromCharCode(n))}return e.join("")},parse:function(b){for(var e=b.length,q=[],g=0;g>>1]|=a(b.charCodeAt(g)<<16-g%2*16);return c.create(q,2*e)}}})();return b.enc.Utf16})},{"./core":22}],25:[function(h,p,k){(function(b, + a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha1"),h("./hmac")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.Base,e=a.WordArray,a=b.algo,d=a.EvpKDF=c.extend({cfg:c.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),l=e.create(),z=l.words,h=c.keySize,c=c.iterations;z.lengthm&&(e=b.finalize(e));e.clamp();for(var q=this._oKey=e.clone(),g=this._iKey=e.clone(),n=q.words,l=g.words,z=0;z>>2]|=a[q]<<24-q%4*8;c.call(this,m,b)}else c.apply(this,arguments)}).prototype=a}})();return b.lib.WordArray})},{"./core":22}],30:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){function c(a,b,c,d,g,l,f){a=a+(b&c|~b&d)+g+f;return(a<>>32-l)+b}function e(a,b,c,d,g,l,f){a=a+(b&d|c&~d)+g+f;return(a<>>32-l)+b}function d(a,b,c,d,g,l,f){a=a+(b^c^d)+g+f;return(a<>>32-l)+b}function m(a,b,c,d,g,l,f){a= + a+(c^(b|~d))+g+f;return(a<>>32-l)+b}var q=b.lib,g=q.WordArray,n=q.Hasher,q=b.algo,l=[];(function(){for(var b=0;64>b;b++)l[b]=4294967296*a.abs(a.sin(b+1))|0})();q=q.MD5=n.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var n=b+g,q=a[n];a[n]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}var g=this._hash.words,n=a[b+0],q=a[b+1],h=a[b+2],f=a[b+3],k=a[b+4],p=a[b+5],A=a[b+6],L=a[b+7],C=a[b+8],B=a[b+ + 9],E=a[b+10],I=a[b+11],Q=a[b+12],N=a[b+13],F=a[b+14],G=a[b+15],s=g[0],t=g[1],r=g[2],u=g[3],s=c(s,t,r,u,n,7,l[0]),u=c(u,s,t,r,q,12,l[1]),r=c(r,u,s,t,h,17,l[2]),t=c(t,r,u,s,f,22,l[3]),s=c(s,t,r,u,k,7,l[4]),u=c(u,s,t,r,p,12,l[5]),r=c(r,u,s,t,A,17,l[6]),t=c(t,r,u,s,L,22,l[7]),s=c(s,t,r,u,C,7,l[8]),u=c(u,s,t,r,B,12,l[9]),r=c(r,u,s,t,E,17,l[10]),t=c(t,r,u,s,I,22,l[11]),s=c(s,t,r,u,Q,7,l[12]),u=c(u,s,t,r,N,12,l[13]),r=c(r,u,s,t,F,17,l[14]),t=c(t,r,u,s,G,22,l[15]),s=e(s,t,r,u,q,5,l[16]),u=e(u,s,t,r,A,9,l[17]), + r=e(r,u,s,t,I,14,l[18]),t=e(t,r,u,s,n,20,l[19]),s=e(s,t,r,u,p,5,l[20]),u=e(u,s,t,r,E,9,l[21]),r=e(r,u,s,t,G,14,l[22]),t=e(t,r,u,s,k,20,l[23]),s=e(s,t,r,u,B,5,l[24]),u=e(u,s,t,r,F,9,l[25]),r=e(r,u,s,t,f,14,l[26]),t=e(t,r,u,s,C,20,l[27]),s=e(s,t,r,u,N,5,l[28]),u=e(u,s,t,r,h,9,l[29]),r=e(r,u,s,t,L,14,l[30]),t=e(t,r,u,s,Q,20,l[31]),s=d(s,t,r,u,p,4,l[32]),u=d(u,s,t,r,C,11,l[33]),r=d(r,u,s,t,I,16,l[34]),t=d(t,r,u,s,F,23,l[35]),s=d(s,t,r,u,q,4,l[36]),u=d(u,s,t,r,k,11,l[37]),r=d(r,u,s,t,L,16,l[38]),t=d(t, + r,u,s,E,23,l[39]),s=d(s,t,r,u,N,4,l[40]),u=d(u,s,t,r,n,11,l[41]),r=d(r,u,s,t,f,16,l[42]),t=d(t,r,u,s,A,23,l[43]),s=d(s,t,r,u,B,4,l[44]),u=d(u,s,t,r,Q,11,l[45]),r=d(r,u,s,t,G,16,l[46]),t=d(t,r,u,s,h,23,l[47]),s=m(s,t,r,u,n,6,l[48]),u=m(u,s,t,r,L,10,l[49]),r=m(r,u,s,t,F,15,l[50]),t=m(t,r,u,s,p,21,l[51]),s=m(s,t,r,u,Q,6,l[52]),u=m(u,s,t,r,f,10,l[53]),r=m(r,u,s,t,E,15,l[54]),t=m(t,r,u,s,q,21,l[55]),s=m(s,t,r,u,C,6,l[56]),u=m(u,s,t,r,G,10,l[57]),r=m(r,u,s,t,A,15,l[58]),t=m(t,r,u,s,N,21,l[59]),s=m(s,t, + r,u,k,6,l[60]),u=m(u,s,t,r,I,10,l[61]),r=m(r,u,s,t,h,15,l[62]),t=m(t,r,u,s,B,21,l[63]);g[0]=g[0]+s|0;g[1]=g[1]+t|0;g[2]=g[2]+r|0;g[3]=g[3]+u|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,g=8*b.sigBytes;c[g>>>5]|=128<<24-g%32;var l=a.floor(d/4294967296);c[(g+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;c[(g+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;b.sigBytes=4*(c.length+1);this._process();b=this._hash;c=b.words;for(d=0;4>d;d++)g=c[d], + c[d]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;return b},clone:function(){var a=n.clone.call(this);a._hash=this._hash.clone();return a}});b.MD5=n._createHelper(q);b.HmacMD5=n._createHmacHelper(q)})(Math);return b.MD5})},{"./core":22}],31:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.mode.CFB=function(){function a(a,b,c,q){var g=this._iv;g?(g=g.slice(0),this._iv=void 0):g=this._prevBlock;q.encryptBlock(g, + 0);for(q=0;q>24&255)){var b=a>>16&255,c=a>>8&255,g=a&255;255===b?(b=0,255===c?(c=0,255===g?g=0:++g):++c):++b;a=0+(b<<16)+(c<<8);a+=g}else a+=16777216;return a}var c=b.lib.BlockCipherMode.extend(),e=c.Encryptor=c.extend({processBlock:function(b,c){var e=this._cipher,g=e.blockSize,n=this._iv,l=this._counter;n&&(l=this._counter=n.slice(0),this._iv=void 0);n=l;0===(n[0]=a(n[0]))&&(n[1]=a(n[1]));l=l.slice(0);e.encryptBlock(l,0); + for(e=0;e>>2]|=d<<24-e%4*8;a.sigBytes+=d},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};return b.pad.Ansix923})},{"./cipher-core":21,"./core":22}],37:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){b.pad.Iso10126={pad:function(a,c){var e=4*c,e=e-a.sigBytes%e;a.concat(b.lib.WordArray.random(e-1)).concat(b.lib.WordArray.create([e<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};return b.pad.Iso10126})},{"./cipher-core":21,"./core":22}],38:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.pad.Iso97971={pad:function(a,c){a.concat(b.lib.WordArray.create([2147483648], + 1));b.pad.ZeroPadding.pad(a,c)},unpad:function(a){b.pad.ZeroPadding.unpad(a);a.sigBytes--}};return b.pad.Iso97971})},{"./cipher-core":21,"./core":22}],39:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){b.pad.NoPadding={pad:function(){},unpad:function(){}};return b.pad.NoPadding})},{"./cipher-core":21,"./core":22}],40:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){b.pad.ZeroPadding={pad:function(a,b){var e=4*b;a.clamp();a.sigBytes+=e-(a.sigBytes%e||e)},unpad:function(a){for(var b=a.words,e=a.sigBytes-1;!(b[e>>>2]>>>24-e%4*8&255);)e--;a.sigBytes=e+1}};return b.pad.ZeroPadding})},{"./cipher-core":21,"./core":22}],41:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha1"),h("./hmac")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.Base,e=a.WordArray,a=b.algo,d=a.HMAC,m=a.PBKDF2= + c.extend({cfg:c.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,l=d.create(c.hasher,a),m=e.create(),h=e.create([1]),w=m.words,k=h.words,y=c.keySize,c=c.iterations;w.lengthc;c++)d[c]=b[c];b[0]=b[0]+1295307597+this._b|0;b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0;b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0;b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0;b[4]=b[4]+ +3545052371+(b[3]>>>0>>0?1:0)|0;b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0;b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0;b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0;this._b=b[7]>>>0>>0?1:0;for(c=0;8>c;c++){var e=a[c]+b[c],h=e&65535,q=e>>>16;m[c]=((h*h>>>17)+h*q>>>15)+q*q^((e&4294901760)*e|0)+((e&65535)*e|0)}a[0]=m[0]+(m[7]<<16|m[7]>>>16)+(m[6]<<16|m[6]>>>16)|0;a[1]=m[1]+(m[0]<<8|m[0]>>>24)+m[7]|0;a[2]=m[2]+(m[1]<<16|m[1]>>>16)+(m[0]<<16|m[0]>>>16)|0;a[3]=m[3]+(m[2]<<8|m[2]>>>24)+ +m[1]|0;a[4]=m[4]+(m[3]<<16|m[3]>>>16)+(m[2]<<16|m[2]>>>16)|0;a[5]=m[5]+(m[4]<<8|m[4]>>>24)+m[3]|0;a[6]=m[6]+(m[5]<<16|m[5]>>>16)+(m[4]<<16|m[4]>>>16)|0;a[7]=m[7]+(m[6]<<8|m[6]>>>24)+m[5]|0}var c=b.lib.StreamCipher,e=[],d=[],m=[],h=b.algo.RabbitLegacy=c.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,d=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>> +16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],e=this._b=0;4>e;e++)a.call(this);for(e=0;8>e;e++)b[e]^=d[e+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,e=c>>>16|d&4294901760,m=d<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=d;b[3]^=m;b[4]^=c;b[5]^=e;b[6]^=d;b[7]^=m;for(e=0;4>e;e++)a.call(this)}},_doProcessBlock:function(b,c){var d=this._X;a.call(this); + e[0]=d[0]^d[5]>>>16^d[3]<<16;e[1]=d[2]^d[7]>>>16^d[5]<<16;e[2]=d[4]^d[1]>>>16^d[7]<<16;e[3]=d[6]^d[3]>>>16^d[1]<<16;for(d=0;4>d;d++)e[d]=(e[d]<<8|e[d]>>>24)&16711935|(e[d]<<24|e[d]>>>8)&4278255360,b[c+d]^=e[d]},blockSize:4,ivSize:2});b.RabbitLegacy=c._createHelper(h)})();return b.RabbitLegacy})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],43:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")): + a(b.CryptoJS)})(this,function(b){(function(){function a(){for(var a=this._X,b=this._C,c=0;8>c;c++)d[c]=b[c];b[0]=b[0]+1295307597+this._b|0;b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0;b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0;b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0;b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0;b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0;b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0;b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0;this._b=b[7]>>>0>>0?1:0;for(c= + 0;8>c;c++){var e=a[c]+b[c],h=e&65535,q=e>>>16;m[c]=((h*h>>>17)+h*q>>>15)+q*q^((e&4294901760)*e|0)+((e&65535)*e|0)}a[0]=m[0]+(m[7]<<16|m[7]>>>16)+(m[6]<<16|m[6]>>>16)|0;a[1]=m[1]+(m[0]<<8|m[0]>>>24)+m[7]|0;a[2]=m[2]+(m[1]<<16|m[1]>>>16)+(m[0]<<16|m[0]>>>16)|0;a[3]=m[3]+(m[2]<<8|m[2]>>>24)+m[1]|0;a[4]=m[4]+(m[3]<<16|m[3]>>>16)+(m[2]<<16|m[2]>>>16)|0;a[5]=m[5]+(m[4]<<8|m[4]>>>24)+m[3]|0;a[6]=m[6]+(m[5]<<16|m[5]>>>16)+(m[4]<<16|m[4]>>>16)|0;a[7]=m[7]+(m[6]<<8|m[6]>>>24)+m[5]|0}var c=b.lib.StreamCipher, + e=[],d=[],m=[],h=b.algo.Rabbit=c.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,d=0;4>d;d++)b[d]=(b[d]<<8|b[d]>>>24)&16711935|(b[d]<<24|b[d]>>>8)&4278255360;for(var e=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],d=this._b=0;4> + d;d++)a.call(this);for(d=0;8>d;d++)b[d]^=e[d+4&7];if(c){var d=c.words,c=d[0],d=d[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,e=c>>>16|d&4294901760,m=d<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=d;b[3]^=m;b[4]^=c;b[5]^=e;b[6]^=d;b[7]^=m;for(d=0;4>d;d++)a.call(this)}},_doProcessBlock:function(b,c){var d=this._X;a.call(this);e[0]=d[0]^d[5]>>>16^d[3]<<16;e[1]=d[2]^d[7]>>>16^d[5]<<16;e[2]=d[4]^d[1]>>>16^d[7]<<16;e[3]=d[6]^d[3]>>>16^d[1]<<16;for(d=0;4>d;d++)e[d]= + (e[d]<<8|e[d]>>>24)&16711935|(e[d]<<24|e[d]>>>8)&4278255360,b[c+d]^=e[d]},blockSize:4,ivSize:2});b.Rabbit=c._createHelper(h)})();return b.Rabbit})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],44:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){var b=(b+1)%256,c= + (c+a[b])%256,h=a[b];a[b]=a[c];a[c]=h;d|=a[(a[b]+a[c])%256]<<24-8*e}this._i=b;this._j=c;return d}var c=b.lib.StreamCipher,e=b.algo,d=e.RC4=c.extend({_doReset:function(){for(var a=this._key,b=a.words,a=a.sigBytes,c=this._S=[],d=0;256>d;d++)c[d]=d;for(var e=d=0;256>d;d++){var h=d%a,e=(e+c[d]+(b[h>>>2]>>>24-h%4*8&255))%256,h=c[d];c[d]=c[e];c[e]=h}this._i=this._j=0},_doProcessBlock:function(b,c){b[c]^=a.call(this)},keySize:8,ivSize:0});b.RC4=c._createHelper(d);e=e.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}), + _doReset:function(){d._doReset.call(this);for(var b=this.cfg.drop;0>>32-b}a=b.lib;var e=a.WordArray,d=a.Hasher;a=b.algo;var h=e.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12, + 0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),q=e.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=e.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8, + 6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),n=e.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=e.create([0,1518500249,1859775393,2400959708,2840853838]),z=e.create([1352829926,1548603684,1836072691,2053994217,0]);a=a.RIPEMD160=d.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])}, + _doProcessBlock:function(a,b){for(var d=0;16>d;d++){var e=b+d,k=a[e];a[e]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var e=this._hash.words,k=l.words,f=z.words,p=h.words,J=q.words,A=g.words,L=n.words,C,B,E,I,Q,N,F,G,s,t;N=C=e[0];F=B=e[1];G=E=e[2];s=I=e[3];t=Q=e[4];for(var r,d=0;80>d;d+=1)r=C+a[b+p[d]]|0,r=16>d?r+((B^E^I)+k[0]):32>d?r+((B&E|~B&I)+k[1]):48>d?r+(((B|~E)^I)+k[2]):64>d?r+((B&I|E&~I)+k[3]):r+((B^(E|~I))+k[4]),r|=0,r=c(r,A[d]),r=r+Q|0,C=Q,Q=I,I=c(E,10),E=B,B=r,r=N+a[b+J[d]]|0,r=16> + d?r+((F^(G|~s))+f[0]):32>d?r+((F&s|G&~s)+f[1]):48>d?r+(((F|~G)^s)+f[2]):64>d?r+((F&G|~F&s)+f[3]):r+((F^G^s)+f[4]),r|=0,r=c(r,L[d]),r=r+t|0,N=t,t=s,s=c(G,10),G=F,F=r;r=e[1]+E+s|0;e[1]=e[2]+I+t|0;e[2]=e[3]+Q+N|0;e[3]=e[4]+C+F|0;e[4]=e[0]+B+G|0;e[0]=r},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;5> + c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.RIPEMD160=d._createHelper(a);b.HmacRIPEMD160=d._createHmacHelper(a)})(Math);return b.RIPEMD160})},{"./core":22}],46:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.lib,c=a.WordArray,e=a.Hasher,d=[],a=b.algo.SHA1=e.extend({_doReset:function(){this._hash=new c.init([1732584193, + 4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,e=c[0],l=c[1],h=c[2],k=c[3],w=c[4],p=0;80>p;p++){if(16>p)d[p]=a[b+p]|0;else{var y=d[p-3]^d[p-8]^d[p-14]^d[p-16];d[p]=y<<1|y>>>31}y=(e<<5|e>>>27)+w+d[p];y=20>p?y+((l&h|~l&k)+1518500249):40>p?y+((l^h^k)+1859775393):60>p?y+((l&h|l&k|h&k)-1894007588):y+((l^h^k)-899497514);w=k;k=h;h=l<<30|l>>>2;l=e;e=y}c[0]=c[0]+e|0;c[1]=c[1]+l|0;c[2]=c[2]+h|0;c[3]=c[3]+k|0;c[4]=c[4]+w|0},_doFinalize:function(){var a= + this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296);b[(d+64>>>9<<4)+15]=c;a.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var a=e.clone.call(this);a._hash=this._hash.clone();return a}});b.SHA1=e._createHelper(a);b.HmacSHA1=e._createHmacHelper(a)})();return b.SHA1})},{"./core":22}],47:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./sha256")):a(b.CryptoJS)})(this,function(b){(function(){var a= + b.lib.WordArray,c=b.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=e._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=e._createHelper(c);b.HmacSHA224=e._createHmacHelper(c)})();return b.SHA224})},{"./core":22,"./sha256":48}],48:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){var c= + b.lib,e=c.WordArray,d=c.Hasher,c=b.algo,h=[],q=[];(function(){function b(c){for(var d=a.sqrt(c),g=2;g<=d;g++)if(!(c%g))return!1;return!0}function c(a){return 4294967296*(a-(a|0))|0}for(var d=2,g=0;64>g;)b(d)&&(8>g&&(h[g]=c(a.pow(d,0.5))),q[g]=c(a.pow(d,1/3)),g++),d++})();var g=[],c=c.SHA256=d.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],h=c[2],m=c[3],k=c[4],f=c[5],p=c[6],J=c[7],A=0;64>A;A++){if(16>A)g[A]=a[b+ +A]|0;else{var L=g[A-15],C=g[A-2];g[A]=((L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3)+g[A-7]+((C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10)+g[A-16]}L=J+((k<<26|k>>>6)^(k<<21|k>>>11)^(k<<7|k>>>25))+(k&f^~k&p)+q[A]+g[A];C=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&h^e&h);J=p;p=f;f=k;k=m+L|0;m=h;h=e;e=d;d=L+C|0}c[0]=c[0]+d|0;c[1]=c[1]+e|0;c[2]=c[2]+h|0;c[3]=c[3]+m|0;c[4]=c[4]+k|0;c[5]=c[5]+f|0;c[6]=c[6]+p|0;c[7]=c[7]+J|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,g=8*b.sigBytes;c[g>>> +5]|=128<<24-g%32;c[(g+64>>>9<<4)+14]=a.floor(d/4294967296);c[(g+64>>>9<<4)+15]=d;b.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.SHA256=d._createHelper(c);b.HmacSHA256=d._createHmacHelper(c)})(Math);return b.SHA256})},{"./core":22}],49:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core")):a(b.CryptoJS)})(this,function(b){(function(a){var c=b.lib,e=c.WordArray,d=c.Hasher, + h=b.x64.Word,c=b.algo,q=[],g=[],n=[];(function(){for(var a=1,b=0,c=0;24>c;c++){q[a+5*b]=(c+1)*(c+2)/2%64;var d=(2*a+3*b)%5,a=b%5,b=d}for(a=0;5>a;a++)for(b=0;5>b;b++)g[a+5*b]=b+(2*a+3*b)%5*5;a=1;for(b=0;24>b;b++){for(var e=d=c=0;7>e;e++){if(a&1){var l=(1<l?d^=1<a;a++)l[a]=h.create()})();c=c.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]= + new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;e>>24)&16711935|(h<<24|h>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,m=c[e];m.high^=f;m.low^=h}for(d=0;24>d;d++){for(e=0;5>e;e++){for(var k=h=0,p=0;5>p;p++)m=c[e+5*p],h^=m.high,k^=m.low;m=l[e];m.high=h;m.low=k}for(e=0;5>e;e++)for(m=l[(e+4)%5],h=l[(e+1)%5],f=h.high,p=h.low,h=m.high^(f<<1|p>>>31),k= + m.low^(p<<1|f>>>31),p=0;5>p;p++)m=c[e+5*p],m.high^=h,m.low^=k;for(f=1;25>f;f++)m=c[f],e=m.high,m=m.low,p=q[f],32>p?(h=e<>>32-p,k=m<>>32-p):(h=m<>>64-p,k=e<>>64-p),m=l[g[f]],m.high=h,m.low=k;m=l[0];e=c[0];m.high=e.high;m.low=e.low;for(e=0;5>e;e++)for(p=0;5>p;p++)f=e+5*p,m=c[f],h=l[f],f=l[(e+1)%5+5*p],k=l[(e+2)%5+5*p],m.high=h.high^~f.high&k.high,m.low=h.low^~f.low&k.low;m=c[0];e=n[d];m.high^=e.high;m.low^=e.low}},_doFinalize:function(){var b=this._data,c=b.words,d=8*b.sigBytes, + g=32*this.blockSize;c[d>>>5]|=1<<24-d%32;c[(a.ceil((d+1)/g)*g>>>5)-1]|=128;b.sigBytes=4*c.length;this._process();for(var b=this._state,c=this.cfg.outputLength/8,d=c/8,g=[],l=0;l>>24)&16711935|(f<<24|f>>>8)&4278255360,h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;g.push(h);g.push(f)}return new e.init(g,c)},clone:function(){for(var a=d.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});b.SHA3=d._createHelper(c); + b.HmacSHA3=d._createHmacHelper(c)})(Math);return b.SHA3})},{"./core":22,"./x64-core":53}],50:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core"),h("./sha512")):a(b.CryptoJS)})(this,function(b){(function(){var a=b.x64,c=a.Word,e=a.WordArray,a=b.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697), + new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});b.SHA384=d._createHelper(a);b.HmacSHA384=d._createHmacHelper(a)})();return b.SHA384})},{"./core":22,"./sha512":51,"./x64-core":53}],51:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./x64-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(){return d.create.apply(d, + arguments)}var c=b.lib.Hasher,e=b.x64,d=e.Word,h=e.WordArray,e=b.algo,q=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774, + 944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480), + a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452, + 2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316, + 1246189591)],g=[];(function(){for(var b=0;80>b;b++)g[b]=a()})();e=e.SHA512=c.extend({_doReset:function(){this._hash=new h.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],h=c[2],m=c[3],k=c[4],f=c[5],p= + c[6],c=c[7],J=d.high,A=d.low,L=e.high,C=e.low,B=h.high,E=h.low,I=m.high,Q=m.low,N=k.high,F=k.low,G=f.high,s=f.low,t=p.high,r=p.low,u=c.high,V=c.low,S=J,M=A,R=L,O=C,aa=B,ea=E,ma=I,fa=Q,X=N,T=F,ja=G,ia=s,ka=t,ga=r,ha=u,da=V,U=0;80>U;U++){var $=g[U];if(16>U)var W=$.high=a[b+2*U]|0,D=$.low=a[b+2*U+1]|0;else{var W=g[U-15],D=W.high,Y=W.low,W=(D>>>1|Y<<31)^(D>>>8|Y<<24)^D>>>7,Y=(Y>>>1|D<<31)^(Y>>>8|D<<24)^(Y>>>7|D<<25),ca=g[U-2],D=ca.high,K=ca.low,ca=(D>>>19|K<<13)^(D<<3|K>>>29)^D>>>6,K=(K>>>19|D<<13)^(K<< + 3|D>>>29)^(K>>>6|D<<26),D=g[U-7],na=D.high,ba=g[U-16],Z=ba.high,ba=ba.low,D=Y+D.low,W=W+na+(D>>>0>>0?1:0),D=D+K,W=W+ca+(D>>>0>>0?1:0),D=D+ba,W=W+Z+(D>>>0>>0?1:0);$.high=W;$.low=D}var na=X&ja^~X&ka,ba=T&ia^~T&ga,$=S&R^S&aa^R&aa,pa=M&O^M&ea^O&ea,Y=(S>>>28|M<<4)^(S<<30|M>>>2)^(S<<25|M>>>7),ca=(M>>>28|S<<4)^(M<<30|S>>>2)^(M<<25|S>>>7),K=q[U],qa=K.high,oa=K.low,K=da+((T>>>14|X<<18)^(T>>>18|X<<14)^(T<<23|X>>>9)),Z=ha+((X>>>14|T<<18)^(X>>>18|T<<14)^(X<<23|T>>>9))+(K>>>0>>0?1:0),K=K+ba,Z=Z+ + na+(K>>>0>>0?1:0),K=K+oa,Z=Z+qa+(K>>>0>>0?1:0),K=K+D,Z=Z+W+(K>>>0>>0?1:0),D=ca+pa,$=Y+$+(D>>>0>>0?1:0),ha=ka,da=ga,ka=ja,ga=ia,ja=X,ia=T,T=fa+K|0,X=ma+Z+(T>>>0>>0?1:0)|0,ma=aa,fa=ea,aa=R,ea=O,R=S,O=M,M=K+D|0,S=Z+$+(M>>>0>>0?1:0)|0}A=d.low=A+M;d.high=J+S+(A>>>0>>0?1:0);C=e.low=C+O;e.high=L+R+(C>>>0>>0?1:0);E=h.low=E+ea;h.high=B+aa+(E>>>0>>0?1:0);Q=m.low=Q+fa;m.high=I+ma+(Q>>>0>>0?1:0);F=k.low=F+T;k.high=N+X+(F>>>0>>0?1:0);s=f.low=s+ia;f.high=G+ja+(s>>>0>> +0?1:0);r=p.low=r+ga;p.high=t+ka+(r>>>0>>0?1:0);V=c.low=V+da;c.high=u+ha+(V>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296);b[(d+128>>>10<<5)+31]=c;a.sigBytes=4*b.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});b.SHA512=c._createHelper(e);b.HmacSHA512=c._createHmacHelper(e)})(); + return b.SHA512})},{"./core":22,"./x64-core":53}],52:[function(h,p,k){(function(b,a,c){"object"===typeof k?p.exports=k=a(h("./core"),h("./enc-base64"),h("./md5"),h("./evpkdf"),h("./cipher-core")):a(b.CryptoJS)})(this,function(b){(function(){function a(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c;this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c;this._rBlock^=c<c;c++){var d=k[c]-1;b[c]=a[d>>>5]>>> +31-d%32&1}a=this._subKeys=[];for(d=0;16>d;d++){for(var f=a[d]=[],e=n[d],c=0;24>c;c++)f[c/6|0]|=b[(g[c]-1+e)%28]<<31-c%6,f[4+(c/6|0)]|=b[28+(g[c+24]-1+e)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>=4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}b=this._invSubKeys=[];for(c=0;16>c;c++)b[c]=a[15-c]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(b,d,e){this._lBlock=b[d];this._rBlock=b[d+1]; + a.call(this,4,252645135);a.call(this,16,65535);c.call(this,2,858993459);c.call(this,8,16711935);a.call(this,1,1431655765);for(var g=0;16>g;g++){for(var f=e[g],h=this._lBlock,m=this._rBlock,n=0,k=0;8>k;k++)n|=l[k][((m^f[k])&p[k])>>>0];this._lBlock=m;this._rBlock=h^n}e=this._lBlock;this._lBlock=this._rBlock;this._rBlock=e;a.call(this,1,1431655765);c.call(this,8,16711935);c.call(this,2,858993459);a.call(this,16,65535);a.call(this,4,252645135);b[d]=this._lBlock;b[d+1]=this._rBlock},keySize:2,ivSize:2, + blockSize:2});b.DES=e._createHelper(P);h=h.TripleDES=e.extend({_doReset:function(){var a=this._key.words;this._des1=P.createEncryptor(d.create(a.slice(0,2)));this._des2=P.createEncryptor(d.create(a.slice(2,4)));this._des3=P.createEncryptor(d.create(a.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b);this._des2.decryptBlock(a,b);this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b);this._des2.encryptBlock(a,b);this._des1.decryptBlock(a,b)},keySize:6, + ivSize:2,blockSize:2});b.TripleDES=e._createHelper(h)})();return b.TripleDES})},{"./cipher-core":21,"./core":22,"./enc-base64":23,"./evpkdf":25,"./md5":30}],53:[function(h,p,k){(function(b,a){"object"===typeof k?p.exports=k=a(h("./core")):a(b.CryptoJS)})(this,function(b){(function(a){var c=b.lib,e=c.Base,d=c.WordArray,c=b.x64={};c.Word=e.extend({init:function(a,b){this.high=a;this.low=b}});c.WordArray=e.extend({init:function(b,c){b=this.words=b||[];this.sigBytes=c!=a?c:8*b.length},toX32:function(){for(var a= + this.words,b=a.length,c=[],e=0;e>>0,h=Array(f),l,m,p;for(l=0;larguments.length?e:3= 2.8.0",ws:">= 0.4.31","crypto-js":">= 3.1.2-2"},devDependencies:{browserify:">= 3.28.1",nodeunit:">= 0.8.6"},repository:{type:"git",url:"git://github.com/tavendo/AutobahnJS.git"},keywords:["WAMP","WebSocket","RPC","PubSub"],author:"Tavendo GmbH",license:"MIT"}},{}]},{},[4])(4)}); \ No newline at end of file