Skip to content

Instantly share code, notes, and snippets.

@murillo128
Created April 19, 2016 07:22
Show Gist options
  • Save murillo128/cae8ed817c065b474a804f68ce3c1076 to your computer and use it in GitHub Desktop.
Save murillo128/cae8ed817c065b474a804f68ce3c1076 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
/**
* ----------------- ThirdPartyNotices -----------------------------------------
* This file is based on or incorporates material from the projects listed below
* (collectively, “Third Party Code”).
* Skype is not the original author of the Third Party Code.
* The original copyright notice and the license, under which Skype received
* such Third Party Code, are set forth below.
* Such licenses and notices are provided for informational purposes only.
* Skype, not the third party, licenses the Third Party Code to you
* under the terms set forth in the Terms of Use for the Skype Product.
* Skype reserves all other rights not expressly granted under this agreement,
* whether by implication, estoppel or otherwise.
*/
/** License
*The JavaScript Canvas to Blob script is released under the
*MIT license: http://www.opensource.org/licenses/MIT.
*/
/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
/*! elementQuery | Author: Tyson Matanich (http://matanich.com), 2013 | License: MIT */
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.3.0
*/
/*!
* Knockout JavaScript library v3.2.0
* (c) Steven Sanderson - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* @license
* lodash 3.6.0 (Custom Build) <https://lodash.com/>
* Build: `lodash compat -o ./lodash.js`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
/*!
*
* Copyright 2009-2012 Kris Kowal under the terms of the MIT
* license found at http://github.com/kriskowal/q/raw/master/LICENSE
*
* With parts by Tyler Close
* Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
* at http://www.opensource.org/licenses/mit-license.html
* Forked at ref_send.js version: 2009-05-11
*
* With parts by Mark Miller
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*!
* Reqwest! A general purpose XHR connection manager
* license MIT (c) Dustin Diaz 2013
* https://github.com/ded/reqwest
** version 1.0.2
*/
/*!
* Sizzle CSS Selector Engine v@VERSION
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: @DATE
*/
/**
* Copyright (c) 2011-2014 Felix Gnass
* Licensed under the MIT license
* http://spin.js.org/
*/
//
// usertiming.js
//
// A polyfill for UserTiming (http://www.w3.org/TR/user-timing/)
//
// Copyright 2013 Nic Jansma
// http://nicj.net
//
// https://github.com/nicjansma/usertiming.js
//
// Licensed under the MIT license
//
/* ***********************************
* * Share on Skype *
* * THIRD PARTY CODE NOTICE *
* ***********************************
* This file is based on or incorporates material from the projects listed below (collectively, “Third Party Code”). Skype is not the original author of the Third Party Code. The original copyright * notice and the license, under which Skype received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Skype, not the third party, * licenses the Third Party Code to you under the terms set forth in the Terms of Use for the Skype Product. Skype reserves all other rights not expressly granted under this agreement, whether by * implication, estoppel or otherwise.
* ------------------------------------------------------------------------------------------------------------------------
* React 0.13.3
*
* Copyright (c) 2013-2015, Facebook, Inc.
*
* For informational purposes only.
*
* 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.
*
* * Neither the name Facebook nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* 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.
* ------------------------------------------------------------------------------------------------------------------------
* through 2.3.8
*
* Copyright (c) 2011 Dominic Tarr
*
* Provided for Informational Purposes Only
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE..
* ------------------------------------------------------------------------------------------------------------------------
* base62 0.1.1
*
* Copyright (c) 2012 Andrew Nesbitt
* Provided for Informational Purposes Only
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* ------------------------------------------------------------------------------------------------------------------------
*
* amdefine 1.0.0
*
* Copyright (c) 2011-2015 The Dojo Foundation
* Provided for Informational Purposes Only
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* ------------------------------------------------------------------------------------------------------------------------
*
* source-map 0.1.31
* Copyright (c) 2009-2011, Mozilla Foundation and contributors
* All rights reserved.
* Provided for Informational Purposes Only
* BSD License
*
* 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.
*
* * Neither the names of the Mozilla Foundation nor the names of project
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 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.
* ------------------------------------------------------------------------------------------------------------------------
* esprima-fb 13001.1001.0-dev-harmony-fb
*
* Copyright (c) Facebook
* Provided for Informational Purposes Only
* BSD License
*
* 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.
*
* ------------------------------------------------------------------------------------------------------------------------
*
* jstransform 10.1.0
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* Provided for Informational Purposes Only
* BSD License
*
* 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.
* * Neither the name Facebook nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* 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.
* ------------------------------------------------------------------------------------------------------------------------
*
* envify 3.4.0
*
* Copyright (c) Hugh Kennedy and Andres Suarez
*
* Provided for Informational Purposes Only
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* ----------------- End of ThirdPartyNotices ----------------------------------
*/
(function() {
var requirejs, require, define;
(function(e) {
function h(e, t) {
return f.call(e, t)
}
function p(e, t) {
var n, r, i, s, o, a, f, l, h, p, d, v = t && t.split("/"), m = u.map, g = m && m["*"] || {};
if (e && e.charAt(0) === ".")
if (t) {
v = v.slice(0, v.length - 1),
e = e.split("/"),
o = e.length - 1,
u.nodeIdCompat && c.test(e[o]) && (e[o] = e[o].replace(c, "")),
e = v.concat(e);
for (h = 0; h < e.length; h += 1) {
d = e[h];
if (d === ".")
e.splice(h, 1),
h -= 1;
else if (d === "..") {
if (h === 1 && (e[2] === ".." || e[0] === ".."))
break;
h > 0 && (e.splice(h - 1, 2),
h -= 2)
}
}
e = e.join("/")
} else
e.indexOf("./") === 0 && (e = e.substring(2));
if ((v || g) && m) {
n = e.split("/");
for (h = n.length; h > 0; h -= 1) {
r = n.slice(0, h).join("/");
if (v)
for (p = v.length; p > 0; p -= 1) {
i = m[v.slice(0, p).join("/")];
if (i) {
i = i[r];
if (i) {
s = i,
a = h;
break
}
}
}
if (s)
break;
!f && g && g[r] && (f = g[r],
l = h)
}
!s && f && (s = f,
a = l),
s && (n.splice(0, a, s),
e = n.join("/"))
}
return e
}
function d(t, r) {
return function() {
return n.apply(e, l.call(arguments, 0).concat([t, r]))
}
}
function v(e) {
return function(t) {
return p(t, e)
}
}
function m(e) {
return function(t) {
s[e] = t
}
}
function g(n) {
if (h(o, n)) {
var r = o[n];
delete o[n],
a[n] = !0,
t.apply(e, r)
}
if (!h(s, n) && !h(a, n))
throw new Error("No " + n);
return s[n]
}
function y(e) {
var t, n = e ? e.indexOf("!") : -1;
return n > -1 && (t = e.substring(0, n),
e = e.substring(n + 1, e.length)),
[t, e]
}
function b(e) {
return function() {
return u && u.config && u.config[e] || {}
}
}
var t, n, r, i, s = {}, o = {}, u = {}, a = {}, f = Object.prototype.hasOwnProperty, l = [].slice, c = /\.js$/;
r = function(e, t) {
var n, r = y(e), i = r[0];
return e = r[1],
i && (i = p(i, t),
n = g(i)),
i ? n && n.normalize ? e = n.normalize(e, v(t)) : e = p(e, t) : (e = p(e, t),
r = y(e),
i = r[0],
e = r[1],
i && (n = g(i))),
{
f: i ? i + "!" + e : e,
n: e,
pr: i,
p: n
}
}
,
i = {
require: function(e) {
return d(e)
},
exports: function(e) {
var t = s[e];
return typeof t != "undefined" ? t : s[e] = {}
},
module: function(e) {
return {
id: e,
uri: "",
exports: s[e],
config: b(e)
}
}
},
t = function(t, n, u, f) {
var l, c, p, v, y, b = [], w = typeof u, E;
f = f || t;
if (w === "undefined" || w === "function") {
n = !n.length && u.length ? ["require", "exports", "module"] : n;
for (y = 0; y < n.length; y += 1) {
v = r(n[y], f),
c = v.f;
if (c === "require")
b[y] = i.require(t);
else if (c === "exports")
b[y] = i.exports(t),
E = !0;
else if (c === "module")
l = b[y] = i.module(t);
else if (h(s, c) || h(o, c) || h(a, c))
b[y] = g(c);
else {
if (!v.p)
throw new Error(t + " missing " + c);
v.p.load(v.n, d(f, !0), m(c), {}),
b[y] = s[c]
}
}
p = u ? u.apply(s[t], b) : undefined;
if (t)
if (l && l.exports !== e && l.exports !== s[t])
s[t] = l.exports;
else if (p !== e || !E)
s[t] = p
} else
t && (s[t] = u)
}
,
requirejs = require = n = function(s, o, a, f, l) {
if (typeof s == "string")
return i[s] ? i[s](o) : g(r(s, o).f);
if (!s.splice) {
u = s,
u.deps && n(u.deps, u.callback);
if (!o)
return;
o.splice ? (s = o,
o = a,
a = null ) : s = e
}
return o = o || function() {}
,
typeof a == "function" && (a = f,
f = l),
f ? t(e, s, o, a) : setTimeout(function() {
t(e, s, o, a)
}, 4),
n
}
,
n.config = function(e) {
return n(e)
}
,
requirejs._defined = s,
define = function(e, t, n) {
t.splice || (n = t,
t = []),
!h(s, e) && !h(o, e) && (o[e] = [e, t, n])
}
,
define.amd = {
jQuery: !0
}
})(),
define("amd", function() {}),
define("utils/common/stringPolyfills", ["require", "exports", "module"], function(e, t) {
t.localeCompare = function(e) {
var t = this;
return t < e ? -1 : t > e ? 1 : 0
}
}),
function() {
function e(e) {
return typeof e == "function" || typeof e == "object" && e !== null
}
function t(e) {
return typeof e == "function"
}
function n(e) {
return typeof e == "object" && e !== null
}
function l(e) {
a = e
}
function c(e) {
f = e
}
function g() {
var e = process.nextTick
, t = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);
return Array.isArray(t) && t[1] === "0" && t[2] === "10" && (e = setImmediate),
function() {
e(x)
}
}
function y() {
return function() {
u(x)
}
}
function b() {
var e = 0
, t = new d(x)
, n = document.createTextNode("");
return t.observe(n, {
characterData: !0
}),
function() {
n.data = e = ++e % 2
}
}
function w() {
var e = new MessageChannel;
return e.port1.onmessage = x,
function() {
e.port2.postMessage(0)
}
}
function E() {
return function() {
setTimeout(x, 1)
}
}
function x() {
for (var e = 0; e < s; e += 2) {
var t = S[e]
, n = S[e + 1];
t(n),
S[e] = undefined,
S[e + 1] = undefined
}
s = 0
}
function T() {
try {
var e = require
, t = e("vertx");
return u = t.runOnLoop || t.runOnContext,
y()
} catch (n) {
return E()
}
}
function C() {}
function M() {
return new TypeError("You cannot resolve a promise with itself")
}
function _() {
return new TypeError("A promises callback cannot return that same promise.")
}
function D(e) {
try {
return e.then
} catch (t) {
return O.error = t,
O
}
}
function P(e, t, n, r) {
try {
e.call(t, n, r)
} catch (i) {
return i
}
}
function H(e, t, n) {
f(function(e) {
var r = !1
, i = P(n, t, function(n) {
if (r)
return;
r = !0,
t !== n ? F(e, n) : q(e, n)
}, function(t) {
if (r)
return;
r = !0,
R(e, t)
}, "Settle: " + (e._label || " unknown promise"));
!r && i && (r = !0,
R(e, i))
}, e)
}
function B(e, t) {
t._state === L ? q(e, t._result) : t._state === A ? R(e, t._result) : U(t, undefined, function(t) {
F(e, t)
}, function(t) {
R(e, t)
})
}
function j(e, n) {
if (n.constructor === e.constructor)
B(e, n);
else {
var r = D(n);
r === O ? R(e, O.error) : r === undefined ? q(e, n) : t(r) ? H(e, n, r) : q(e, n)
}
}
function F(t, n) {
t === n ? R(t, M()) : e(n) ? j(t, n) : q(t, n)
}
function I(e) {
e._onerror && e._onerror(e._result),
z(e)
}
function q(e, t) {
if (e._state !== k)
return;
e._result = t,
e._state = L,
e._subscribers.length !== 0 && f(z, e)
}
function R(e, t) {
if (e._state !== k)
return;
e._state = A,
e._result = t,
f(I, e)
}
function U(e, t, n, r) {
var i = e._subscribers
, s = i.length;
e._onerror = null ,
i[s] = t,
i[s + L] = n,
i[s + A] = r,
s === 0 && e._state && f(z, e)
}
function z(e) {
var t = e._subscribers
, n = e._state;
if (t.length === 0)
return;
var r, i, s = e._result;
for (var o = 0; o < t.length; o += 3)
r = t[o],
i = t[o + n],
r ? $(n, r, i, s) : i(s);
e._subscribers.length = 0
}
function W() {
this.error = null
}
function V(e, t) {
try {
return e(t)
} catch (n) {
return X.error = n,
X
}
}
function $(e, n, r, i) {
var s = t(r), o, u, a, f;
if (s) {
o = V(r, i),
o === X ? (f = !0,
u = o.error,
o = null ) : a = !0;
if (n === o) {
R(n, _());
return
}
} else
o = i,
a = !0;
n._state === k && (s && a ? F(n, o) : f ? R(n, u) : e === L ? q(n, o) : e === A && R(n, o))
}
function J(e, t) {
try {
t(function(n) {
F(e, n)
}, function(n) {
R(e, n)
})
} catch (n) {
R(e, n)
}
}
function K(e, t) {
var n = this;
n._instanceConstructor = e,
n.promise = new e(C),
n._validateInput(t) ? (n._input = t,
n.length = t.length,
n._remaining = t.length,
n._init(),
n.length === 0 ? q(n.promise, n._result) : (n.length = n.length || 0,
n._enumerate(),
n._remaining === 0 && q(n.promise, n._result))) : R(n.promise, n._validationError())
}
function G(e) {
return (new Q(this,e)).promise
}
function Z(e) {
function s(e) {
F(n, e)
}
function o(e) {
R(n, e)
}
var t = this
, n = new t(C);
if (!i(e))
return R(n, new TypeError("You must pass an array to race.")),
n;
var r = e.length;
for (var u = 0; n._state === k && u < r; u++)
U(t.resolve(e[u]), undefined, s, o);
return n
}
function tt(e) {
var t = this;
if (e && typeof e == "object" && e.constructor === t)
return e;
var n = new t(C);
return F(n, e),
n
}
function rt(e) {
var t = this
, n = new t(C);
return R(n, e),
n
}
function ot() {
throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")
}
function ut() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
}
function ft(e) {
this._id = st++,
this._state = undefined,
this._result = undefined,
this._subscribers = [],
C !== e && (t(e) || ot(),
this instanceof ft || ut(),
J(this, e))
}
function lt() {
var e;
if (typeof global != "undefined")
e = global;
else if (typeof self != "undefined")
e = self;
else
try {
e = Function("return this")()
} catch (t) {
throw new Error("polyfill failed because global object is unavailable in this environment")
}
var n = e.Promise;
if (n && Object.prototype.toString.call(n.resolve()) === "[object Promise]" && !n.cast)
return;
e.Promise = at
}
var r;
Array.isArray ? r = Array.isArray : r = function(e) {
return Object.prototype.toString.call(e) === "[object Array]"
}
;
var i = r, s = 0, o = {}.toString, u, a, f = function(t, n) {
S[s] = t,
S[s + 1] = n,
s += 2,
s === 2 && (a ? a(x) : N())
}
, h = typeof window != "undefined" ? window : undefined, p = h || {}, d = p.MutationObserver || p.WebKitMutationObserver, v = typeof process != "undefined" && {}.toString.call(process) === "[object process]", m = typeof Uint8ClampedArray != "undefined" && typeof importScripts != "undefined" && typeof MessageChannel != "undefined", S = new Array(1e3), N;
v ? N = g() : d ? N = b() : m ? N = w() : h === undefined && typeof require == "function" ? N = T() : N = E();
var k = void 0
, L = 1
, A = 2
, O = new W
, X = new W;
K.prototype._validateInput = function(e) {
return i(e)
}
,
K.prototype._validationError = function() {
return new Error("Array Methods must be provided an Array")
}
,
K.prototype._init = function() {
this._result = new Array(this.length)
}
;
var Q = K;
K.prototype._enumerate = function() {
var e = this
, t = e.length
, n = e.promise
, r = e._input;
for (var i = 0; n._state === k && i < t; i++)
e._eachEntry(r[i], i)
}
,
K.prototype._eachEntry = function(e, t) {
var r = this
, i = r._instanceConstructor;
n(e) ? e.constructor === i && e._state !== k ? (e._onerror = null ,
r._settledAt(e._state, t, e._result)) : r._willSettleAt(i.resolve(e), t) : (r._remaining--,
r._result[t] = e)
}
,
K.prototype._settledAt = function(e, t, n) {
var r = this
, i = r.promise;
i._state === k && (r._remaining--,
e === A ? R(i, n) : r._result[t] = n),
r._remaining === 0 && q(i, r._result)
}
,
K.prototype._willSettleAt = function(e, t) {
var n = this;
U(e, undefined, function(e) {
n._settledAt(L, t, e)
}, function(e) {
n._settledAt(A, t, e)
})
}
;
var Y = G
, et = Z
, nt = tt
, it = rt
, st = 0
, at = ft;
ft.all = Y,
ft.race = et,
ft.resolve = nt,
ft.reject = it,
ft._setScheduler = l,
ft._setAsap = c,
ft._asap = f,
ft.prototype = {
constructor: ft,
then: function(e, t) {
var n = this
, r = n._state;
if (r === L && !e || r === A && !t)
return this;
var i = new this.constructor(C)
, s = n._result;
if (r) {
var o = arguments[r - 1];
f(function() {
$(r, i, o, s)
})
} else
U(n, i, e, t);
return i
},
"catch": function(e) {
return this.then(null , e)
}
};
var ct = lt
, ht = {
Promise: at,
polyfill: ct
};
typeof define == "function" && define.amd ? define("es6-promise/dist/es6-promise", [], function() {
return ht
}) : typeof module != "undefined" && module.exports ? module.exports = ht : typeof this != "undefined" && (this.ES6Promise = ht),
ct()
}
.call(this),
define("es6-promise", ["es6-promise/dist/es6-promise"], function(e) {
return e
}),
function(e) {
var t = e.HTMLCanvasElement && e.HTMLCanvasElement.prototype
, n = e.Blob && function() {
try {
return Boolean(new Blob)
} catch (e) {
return !1
}
}()
, r = n && e.Uint8Array && function() {
try {
return (new Blob([new Uint8Array(100)])).size === 100
} catch (e) {
return !1
}
}()
, i = e.BlobBuilder || e.WebKitBlobBuilder || e.MozBlobBuilder || e.MSBlobBuilder
, s = /^data:((.*?)(;charset=.*?)?)(;base64)?,/
, o = (n || i) && e.atob && e.ArrayBuffer && e.Uint8Array && function(e) {
var t, o, u, a, f, l, c, h, p;
t = e.match(s);
if (!t)
throw new Error("invalid data URI");
o = t[2] ? t[1] : "text/plain" + (t[3] || ";charset=US-ASCII"),
u = !!t[4],
a = e.slice(t[0].length),
u ? f = atob(a) : f = decodeURIComponent(a),
l = new ArrayBuffer(f.length),
c = new Uint8Array(l);
for (h = 0; h < f.length; h += 1)
c[h] = f.charCodeAt(h);
return n ? new Blob([r ? c : l],{
type: o
}) : (p = new i,
p.append(l),
p.getBlob(o))
}
;
e.HTMLCanvasElement && !t.toBlob && (t.mozGetAsFile ? t.toBlob = function(e, n, r) {
r && t.toDataURL && o ? e(o(this.toDataURL(n, r))) : e(this.mozGetAsFile("blob", n))
}
: t.toDataURL && o && (t.toBlob = function(e, t, n) {
e(o(this.toDataURL(t, n)))
}
)),
typeof define == "function" && define.amd ? define("vendor/canvas-to-blob", [], function() {
return o
}) : typeof module == "object" && module.exports ? module.exports = o : e.dataURLtoBlob = o
}(window),
define("helpers/polyfills", ["require", "utils/common/stringPolyfills", "es6-promise", "vendor/canvas-to-blob"], function(e) {
var t = e("utils/common/stringPolyfills");
e("es6-promise").polyfill(),
e("vendor/canvas-to-blob"),
Function.prototype.name === undefined && Object.defineProperty(Function.prototype, "name", {
get: function() {
try {
return this.toString().match(/\s*function\s+([_\$\w\d]*)\.*/)[1]
} catch (e) {
return ""
}
}
}),
String.prototype.localeCompare === undefined && (String.prototype.localeCompare = t.localeCompare)
}),
function() {
function At(e, t) {
if (e !== t) {
var n = e === e
, r = t === t;
if (e > t || !n || typeof e == "undefined" && r)
return 1;
if (e < t || !r || typeof t == "undefined" && n)
return -1
}
return 0
}
function Ot(e, t, n) {
var r = e.length
, i = n ? r : -1;
while (n ? i-- : ++i < r)
if (t(e[i], i, e))
return i;
return -1
}
function Mt(e, t, n) {
if (t !== t)
return Ut(e, n);
var r = n - 1
, i = e.length;
while (++r < i)
if (e[r] === t)
return r;
return -1
}
function _t(e) {
return typeof e == "function" || !1
}
function Dt(e) {
return typeof e == "string" ? e : e == null ? "" : e + ""
}
function Pt(e) {
return e.charCodeAt(0)
}
function Ht(e, t) {
var n = -1
, r = e.length;
while (++n < r && t.indexOf(e.charAt(n)) > -1)
;
return n
}
function Bt(e, t) {
var n = e.length;
while (n-- && t.indexOf(e.charAt(n)) > -1)
;
return n
}
function jt(e, t) {
return At(e.criteria, t.criteria) || e.index - t.index
}
function Ft(e, t, n) {
var r = -1
, i = e.criteria
, s = t.criteria
, o = i.length
, u = n.length;
while (++r < o) {
var a = At(i[r], s[r]);
if (a)
return r >= u ? a : a * (n[r] ? 1 : -1)
}
return e.index - t.index
}
function It(e) {
return gt[e]
}
function qt(e) {
return yt[e]
}
function Rt(e) {
return "\\" + Et[e]
}
function Ut(e, t, n) {
var r = e.length
, i = t + (n ? 0 : -1);
while (n ? i-- : ++i < r) {
var s = e[i];
if (s !== s)
return i
}
return -1
}
function Wt(e) {
return !!e && typeof e == "object"
}
function Xt(e) {
return e <= 160 && e >= 9 && e <= 13 || e == 32 || e == 160 || e == 5760 || e == 6158 || e >= 8192 && (e <= 8202 || e == 8232 || e == 8233 || e == 8239 || e == 8287 || e == 12288 || e == 65279)
}
function Vt(e, t) {
var n = -1
, r = e.length
, i = -1
, s = [];
while (++n < r)
e[n] === t && (e[n] = b,
s[++i] = n);
return s
}
function $t(e, t) {
var n, r = -1, i = e.length, s = -1, o = [];
while (++r < i) {
var u = e[r]
, a = t ? t(u, r, e) : u;
if (!r || n !== a)
n = a,
o[++s] = u
}
return o
}
function Jt(e) {
var t = -1
, n = e.length;
while (++t < n && Xt(e.charCodeAt(t)))
;
return t
}
function Kt(e) {
var t = e.length;
while (t-- && Xt(e.charCodeAt(t)))
;
return t
}
function Qt(e) {
return bt[e]
}
function Gt(C) {
function zn(e) {
if (Wt(e) && !ru(e) && !(e instanceof $n)) {
if (e instanceof Xn)
return e;
if (nn.call(e, "__chain__") && nn.call(e, "__wrapped__"))
return ls(e)
}
return new Xn(e)
}
function Wn() {}
function Xn(e, t, n) {
this.__wrapped__ = e,
this.__actions__ = n || [],
this.__chain__ = !!t
}
function $n(e) {
this.__wrapped__ = e,
this.__actions__ = null ,
this.__dir__ = 1,
this.__dropCount__ = 0,
this.__filtered__ = !1,
this.__iteratees__ = null ,
this.__takeCount__ = Dn,
this.__views__ = null
}
function Jn() {
var e = this.__actions__
, t = this.__iteratees__
, n = this.__views__
, r = new $n(this.__wrapped__);
return r.__actions__ = e ? sr(e) : null ,
r.__dir__ = this.__dir__,
r.__filtered__ = this.__filtered__,
r.__iteratees__ = t ? sr(t) : null ,
r.__takeCount__ = this.__takeCount__,
r.__views__ = n ? sr(n) : null ,
r
}
function Kn() {
if (this.__filtered__) {
var e = new $n(this);
e.__dir__ = -1,
e.__filtered__ = !0
} else
e = this.clone(),
e.__dir__ *= -1;
return e
}
function Qn() {
var e = this.__wrapped__.value();
if (!ru(e))
return oi(e, this.__actions__);
var t = this.__dir__
, n = t < 0
, r = Vi(0, e.length, this.__views__)
, i = r.start
, s = r.end
, o = s - i
, u = n ? s : i - 1
, a = kn(o, this.__takeCount__)
, f = this.__iteratees__
, l = f ? f.length : 0
, c = 0
, h = [];
e: while (o-- && c < a) {
u += t;
var p = -1
, d = e[u];
while (++p < l) {
var y = f[p]
, b = y.iteratee
, w = y.type;
if (w == v) {
y.done && (n ? u > y.index : u < y.index) && (y.count = 0,
y.done = !1),
y.index = u;
if (!y.done) {
var E = y.limit;
if (!(y.done = E > -1 ? y.count++ >= E : !b(d)))
continue e
}
} else {
var S = b(d);
if (w == g)
d = S;
else if (!S) {
if (w == m)
continue e;break e
}
}
}
h[c++] = d
}
return h
}
function Gn() {
this.__data__ = {}
}
function Yn(e) {
return this.has(e) && delete this.__data__[e]
}
function Zn(t) {
return t == "__proto__" ? e : this.__data__[t]
}
function er(e) {
return e != "__proto__" && nn.call(this.__data__, e)
}
function tr(e, t) {
return e != "__proto__" && (this.__data__[e] = t),
this
}
function nr(e) {
var t = e ? e.length : 0;
this.data = {
hash: xn(null ),
set: new mn
};
while (t--)
this.push(e[t])
}
function rr(e, t) {
var n = e.data
, r = typeof t == "string" || hu(t) ? n.set.has(t) : n.hash[t];
return r ? 0 : -1
}
function ir(e) {
var t = this.data;
typeof e == "string" || hu(e) ? t.set.add(e) : t.hash[e] = !0
}
function sr(e, t) {
var n = -1
, r = e.length;
t || (t = O(r));
while (++n < r)
t[n] = e[n];
return t
}
function or(e, t) {
var n = -1
, r = e.length;
while (++n < r)
if (t(e[n], n, e) === !1)
break;
return e
}
function ur(e, t) {
var n = e.length;
while (n--)
if (t(e[n], n, e) === !1)
break;
return e
}
function ar(e, t) {
var n = -1
, r = e.length;
while (++n < r)
if (!t(e[n], n, e))
return !1;
return !0
}
function fr(e, t) {
var n = -1
, r = e.length
, i = -1
, s = [];
while (++n < r) {
var o = e[n];
t(o, n, e) && (s[++i] = o)
}
return s
}
function lr(e, t) {
var n = -1
, r = e.length
, i = O(r);
while (++n < r)
i[n] = t(e[n], n, e);
return i
}
function cr(e) {
var t = -1
, n = e.length
, r = _n;
while (++t < n) {
var i = e[t];
i > r && (r = i)
}
return r
}
function hr(e) {
var t = -1
, n = e.length
, r = Dn;
while (++t < n) {
var i = e[t];
i < r && (r = i)
}
return r
}
function pr(e, t, n, r) {
var i = -1
, s = e.length;
r && s && (n = e[++i]);
while (++i < s)
n = t(n, e[i], i, e);
return n
}
function dr(e, t, n, r) {
var i = e.length;
r && i && (n = e[--i]);
while (i--)
n = t(n, e[i], i, e);
return n
}
function vr(e, t) {
var n = -1
, r = e.length;
while (++n < r)
if (t(e[n], n, e))
return !0;
return !1
}
function mr(e) {
var t = e.length
, n = 0;
while (t--)
n += +e[t] || 0;
return n
}
function gr(e, t) {
return typeof e == "undefined" ? t : e
}
function yr(e, t, n, r) {
return typeof e == "undefined" || !nn.call(r, n) ? t : e
}
function br(e, t, n) {
var r = ju(t);
if (!n)
return Er(t, e, r);
var i = -1
, s = r.length;
while (++i < s) {
var o = r[i]
, u = e[o]
, a = n(u, t[o], o, e, t);
if ((a === a ? a !== u : u === u) || typeof u == "undefined" && !(o in e))
e[o] = a
}
return e
}
function wr(t, n) {
var r = -1
, i = t.length
, s = Zi(i)
, o = n.length
, u = O(o);
while (++r < o) {
var a = n[r];
s ? (a = parseFloat(a),
u[r] = Qi(a, i) ? t[a] : e) : u[r] = t[a]
}
return u
}
function Er(e, t, n) {
n || (n = t,
t = {});
var r = -1
, i = n.length;
while (++r < i) {
var s = n[r];
t[s] = e[s]
}
return t
}
function Sr(e, t, n) {
var r = typeof e;
return r == "function" ? typeof t == "undefined" ? e : fi(e, t, n) : e == null ? Ea : r == "object" ? Wr(e) : typeof t == "undefined" ? Jr(e + "") : Xr(e + "", t)
}
function xr(e, t, n, r, i, s, o) {
var u;
n && (u = i ? n(e, r, i) : n(e));
if (typeof u != "undefined")
return u;
if (!hu(e))
return e;
var a = ru(e);
if (a) {
u = $i(e);
if (!t)
return sr(e, u)
} else {
var f = sn.call(e)
, l = f == N;
if (!(f == L || f == w || l && !i))
return vt[f] ? Ki(e, f, t) : i ? e : {};
if (zt(e))
return i ? e : {};
u = Ji(l ? {} : e);
if (!t)
return Er(e, u, ju(e))
}
s || (s = []),
o || (o = []);
var c = s.length;
while (c--)
if (s[c] == e)
return o[c];
return s.push(e),
o.push(u),
(a ? or : jr)(e, function(r, i) {
u[i] = xr(r, t, n, i, e, s, o)
}),
u
}
function Nr(t, n, r) {
if (typeof t != "function")
throw new Tt(y);
return gn(function() {
t.apply(e, r)
}, n)
}
function Cr(e, t) {
var n = e ? e.length : 0
, r = [];
if (!n)
return r;
var i = -1
, s = Xi()
, o = s == Mt
, u = o && t.length >= 200 ? yi(t) : null
, a = t.length;
u && (s = rr,
o = !1,
t = u);
e: while (++i < n) {
var f = e[i];
if (o && f === f) {
var l = a;
while (l--)
if (t[l] === f)
continue e;
r.push(f)
} else
s(t, f, 0) < 0 && r.push(f)
}
return r
}
function Ar(e, t) {
var n = !0;
return kr(e, function(e, r, i) {
return n = !!t(e, r, i),
n
}),
n
}
function Or(e, t, n, r) {
var i = e.length;
n = n == null ? 0 : +n || 0,
n < 0 && (n = -n > i ? 0 : i + n),
r = typeof r == "undefined" || r > i ? i : +r || 0,
r < 0 && (r += i),
i = n > r ? 0 : r >>> 0,
n >>>= 0;
while (n < i)
e[n++] = t;
return e
}
function Mr(e, t) {
var n = [];
return kr(e, function(e, r, i) {
t(e, r, i) && n.push(e)
}),
n
}
function _r(e, t, n, r) {
var i;
return n(e, function(e, n, s) {
if (t(e, n, s))
return i = r ? n : e,
!1
}),
i
}
function Dr(e, t, n) {
var r = -1
, i = e.length
, s = -1
, o = [];
while (++r < i) {
var u = e[r];
if (Wt(u) && Zi(u.length) && (ru(u) || nu(u))) {
t && (u = Dr(u, t, n));
var a = -1
, f = u.length;
o.length += f;
while (++a < f)
o[++s] = u[a]
} else
n || (o[++s] = u)
}
return o
}
function Br(e, t) {
return Pr(e, t, Fu)
}
function jr(e, t) {
return Pr(e, t, ju)
}
function Fr(e, t) {
return Hr(e, t, ju)
}
function Ir(e, t) {
var n = -1
, r = t.length
, i = -1
, s = [];
while (++n < r) {
var o = t[n];
cu(e[o]) && (s[++i] = o)
}
return s
}
function qr(e, t, n, r, i, s) {
if (e === t)
return e !== 0 || 1 / e == 1 / t;
var o = typeof e
, u = typeof t;
return o != "function" && o != "object" && u != "function" && u != "object" || e == null || t == null ? e !== e && t !== t : Rr(e, t, qr, n, r, i, s)
}
function Rr(e, t, n, r, i, s, o) {
var u = ru(e)
, a = ru(t)
, f = E
, l = E;
u || (f = sn.call(e),
f == w ? f = L : f != L && (u = Eu(e))),
a || (l = sn.call(t),
l == w ? l = L : l != L && (a = Eu(t)));
var c = (f == L || i && f == N) && !zt(e)
, h = (l == L || i && l == N) && !zt(t)
, p = f == l;
if (p && !u && !c)
return Ii(e, t, f);
if (i) {
if (!p && (!c || !h))
return !1
} else {
var d = c && nn.call(e, "__wrapped__")
, v = h && nn.call(t, "__wrapped__");
if (d || v)
return n(d ? e.value() : e, v ? t.value() : t, r, i, s, o);
if (!p)
return !1
}
s || (s = []),
o || (o = []);
var m = s.length;
while (m--)
if (s[m] == e)
return o[m] == t;
s.push(e),
o.push(t);
var g = (u ? Fi : qi)(e, t, n, r, i, s, o);
return s.pop(),
o.pop(),
g
}
function Ur(t, n, r, i, s) {
var o = -1
, u = n.length
, a = !s;
while (++o < u)
if (a && i[o] ? r[o] !== t[n[o]] : !(n[o] in t))
return !1;
o = -1;
while (++o < u) {
var f = n[o]
, l = t[f]
, c = r[o];
if (a && i[o])
var h = typeof l != "undefined" || f in t;
else
h = s ? s(l, c, f) : e,
typeof h == "undefined" && (h = qr(c, l, s, !0));
if (!h)
return !1
}
return !0
}
function zr(e, t) {
var n = [];
return kr(e, function(e, r, i) {
n.push(t(e, r, i))
}),
n
}
function Wr(e) {
var t = ju(e)
, n = t.length;
if (!n)
return wa(!0);
if (n == 1) {
var r = t[0]
, i = e[r];
if (es(i))
return function(e) {
return e != null && e[r] === i && (typeof i != "undefined" || r in fs(e))
}
}
var s = O(n)
, o = O(n);
while (n--)
i = e[t[n]],
s[n] = i,
o[n] = es(i);
return function(e) {
return e != null && Ur(fs(e), t, s, o)
}
}
function Xr(e, t) {
return es(t) ? function(n) {
return n != null && n[e] === t && (typeof t != "undefined" || e in fs(n))
}
: function(n) {
return n != null && qr(t, n[e], null , !0)
}
}
function Vr(t, n, r, i, s) {
if (!hu(t))
return t;
var o = Zi(n.length) && (ru(n) || Eu(n));
return (o ? or : jr)(n, function(n, u, a) {
if (Wt(n))
return i || (i = []),
s || (s = []),
$r(t, a, u, Vr, r, i, s);
var f = t[u]
, l = r ? r(f, n, u, t, a) : e
, c = typeof l == "undefined";
c && (l = n),
(o || typeof l != "undefined") && (c || (l === l ? l !== f : f === f)) && (t[u] = l)
}),
t
}
function $r(t, n, r, i, s, o, u) {
var a = o.length
, f = n[r];
while (a--)
if (o[a] == f) {
t[r] = u[a];
return
}
var l = t[r]
, c = s ? s(l, f, r, t, n) : e
, h = typeof c == "undefined";
h && (c = f,
Zi(f.length) && (ru(f) || Eu(f)) ? c = ru(l) ? l : l && l.length ? sr(l) : [] : yu(f) || nu(f) ? c = nu(l) ? Tu(l) : yu(l) ? l : {} : h = !1),
o.push(f),
u.push(c);
if (h)
t[r] = i(c, f, s, o, u);
else if (c === c ? c !== l : l === l)
t[r] = c
}
function Jr(t) {
return function(n) {
return n == null ? e : n[t]
}
}
function Kr(e, t) {
return e + hn(Mn() * (t - e + 1))
}
function Qr(e, t, n, r, i) {
return i(e, function(e, i, s) {
n = r ? (r = !1,
e) : t(n, e, i, s)
}),
n
}
function Yr(e, t, n) {
var r = -1
, i = e.length;
t = t == null ? 0 : +t || 0,
t < 0 && (t = -t > i ? 0 : i + t),
n = typeof n == "undefined" || n > i ? i : +n || 0,
n < 0 && (n += i),
i = t > n ? 0 : n - t >>> 0,
t >>>= 0;
var s = O(i);
while (++r < i)
s[r] = e[r + t];
return s
}
function Zr(e, t) {
var n;
return kr(e, function(e, r, i) {
return n = t(e, r, i),
!n
}),
!!n
}
function ei(e, t) {
var n = e.length;
e.sort(t);
while (n--)
e[n] = e[n].value;
return e
}
function ti(t, n, r) {
var i = -1
, s = t.length
, o = Zi(s) ? O(s) : [];
return kr(t, function(t) {
var r = n.length
, s = O(r);
while (r--)
s[r] = t == null ? e : t[n[r]];
o[++i] = {
criteria: s,
index: i,
value: t
}
}),
ei(o, function(e, t) {
return Ft(e, t, r)
})
}
function ni(e, t) {
var n = 0;
return kr(e, function(e, r, i) {
n += +t(e, r, i) || 0
}),
n
}
function ri(e, t) {
var n = -1
, r = Xi()
, i = e.length
, s = r == Mt
, o = s && i >= 200
, u = o ? yi() : null
, a = [];
u ? (r = rr,
s = !1) : (o = !1,
u = t ? [] : a);
e: while (++n < i) {
var f = e[n]
, l = t ? t(f, n, e) : f;
if (s && f === f) {
var c = u.length;
while (c--)
if (u[c] === l)
continue e;
t && u.push(l),
a.push(f)
} else
r(u, l, 0) < 0 && ((t || o) && u.push(l),
a.push(f))
}
return a
}
function ii(e, t) {
var n = -1
, r = t.length
, i = O(r);
while (++n < r)
i[n] = e[t[n]];
return i
}
function si(e, t, n, r) {
var i = e.length
, s = r ? i : -1;
while ((r ? s-- : ++s < i) && t(e[s], s, e))
;
return n ? Yr(e, r ? 0 : s, r ? s + 1 : i) : Yr(e, r ? s + 1 : 0, r ? i : s)
}
function oi(e, t) {
var n = e;
n instanceof $n && (n = n.value());
var r = -1
, i = t.length;
while (++r < i) {
var s = [n]
, o = t[r];
dn.apply(s, o.args),
n = o.func.apply(o.thisArg, s)
}
return n
}
function ui(e, t, n) {
var r = 0
, i = e ? e.length : r;
if (typeof t == "number" && t === t && i <= Bn) {
while (r < i) {
var s = r + i >>> 1
, o = e[s];
(n ? o <= t : o < t) ? r = s + 1 : i = s
}
return i
}
return ai(e, t, Ea, n)
}
function ai(e, t, n, r) {
t = n(t);
var i = 0
, s = e ? e.length : 0
, o = t !== t
, u = typeof t == "undefined";
while (i < s) {
var a = hn((i + s) / 2)
, f = n(e[a])
, l = f === f;
if (o)
var c = l || r;
else
u ? c = l && (r || typeof f != "undefined") : c = r ? f <= t : f < t;
c ? i = a + 1 : s = a
}
return kn(s, Hn)
}
function fi(e, t, n) {
if (typeof e != "function")
return Ea;
if (typeof t == "undefined")
return e;
switch (n) {
case 1:
return function(n) {
return e.call(t, n)
}
;
case 3:
return function(n, r, i) {
return e.call(t, n, r, i)
}
;
case 4:
return function(n, r, i, s) {
return e.call(t, n, r, i, s)
}
;
case 5:
return function(n, r, i, s, o) {
return e.call(t, n, r, i, s, o)
}
}
return function() {
return e.apply(t, arguments)
}
}
function li(e) {
return fn.call(e, 0)
}
function ci(e, t, n) {
var r = n.length
, i = -1
, s = Cn(e.length - r, 0)
, o = -1
, u = t.length
, a = O(s + u);
while (++o < u)
a[o] = t[o];
while (++i < r)
a[n[i]] = e[i];
while (s--)
a[o++] = e[i++];
return a
}
function hi(e, t, n) {
var r = -1
, i = n.length
, s = -1
, o = Cn(e.length - i, 0)
, u = -1
, a = t.length
, f = O(o + a);
while (++s < o)
f[s] = e[s];
var l = s;
while (++u < a)
f[l + u] = t[u];
while (++r < i)
f[l + n[r]] = e[s++];
return f
}
function pi(e, t) {
return function(n, r, i) {
var s = t ? t() : {};
r = Ui(r, i, 3);
if (ru(n)) {
var o = -1
, u = n.length;
while (++o < u) {
var a = n[o];
e(s, a, r(a, o, n), n)
}
} else
kr(n, function(t, n, i) {
e(s, t, r(t, n, i), i)
});
return s
}
}
function di(e) {
return function() {
var t = arguments
, n = t.length
, r = t[0];
if (n < 2 || r == null )
return r;
var i = t[n - 2]
, s = t[n - 1]
, o = t[3];
n > 3 && typeof i == "function" ? (i = fi(i, s, 5),
n -= 2) : (i = n > 2 && typeof s == "function" ? s : null ,
n -= i ? 1 : 0),
o && Gi(t[1], t[2], o) && (i = n == 3 ? null : i,
n = 2);
var u = 0;
while (++u < n) {
var a = t[u];
a && e(r, a, i)
}
return r
}
}
function vi(e, t) {
return function(n, r) {
var i = n ? n.length : 0;
if (!Zi(i))
return e(n, r);
var s = t ? i : -1
, o = fs(n);
while (t ? s-- : ++s < i)
if (r(o[s], s, o) === !1)
break;
return n
}
}
function mi(e) {
return function(t, n, r) {
var i = fs(t)
, s = r(t)
, o = s.length
, u = e ? o : -1;
while (e ? u-- : ++u < o) {
var a = s[u];
if (n(i[a], a, i) === !1)
break
}
return t
}
}
function gi(e, t) {
function r() {
var i = this && this !== Lt && this instanceof r ? n : e;
return i.apply(t, arguments)
}
var n = wi(e);
return r
}
function bi(e) {
return function(t) {
var n = -1
, r = ga(Yu(t))
, i = r.length
, s = "";
while (++n < i)
s = e(s, r[n], n);
return s
}
}
function wi(e) {
return function() {
var t = Tr(e.prototype)
, n = e.apply(t, arguments);
return hu(n) ? n : t
}
}
function Ei(e) {
function t(n, r, i) {
i && Gi(n, r, i) && (r = null );
var s = ji(n, e, null , null , null , null , null , r);
return s.placeholder = t.placeholder,
s
}
return t
}
function Si(e, t) {
return function(n, r, i) {
i && Gi(n, r, i) && (r = null );
var s = Ui()
, o = r == null ;
if (s !== Sr || !o)
o = !1,
r = s(r, i, 3);
if (o) {
var u = ru(n);
if (!!u || !wu(n))
return e(u ? n : as(n));
r = Pt
}
return Ri(n, r, t)
}
}
function xi(t, n) {
return function(r, i, s) {
i = Ui(i, s, 3);
if (ru(r)) {
var o = Ot(r, i, n);
return o > -1 ? r[o] : e
}
return _r(r, i, t)
}
}
function Ti(e) {
return function(t, n, r) {
return !t || !t.length ? -1 : (n = Ui(n, r, 3),
Ot(t, n, e))
}
}
function Ni(e) {
return function(t, n, r) {
return n = Ui(n, r, 3),
_r(t, n, e, !0)
}
}
function Ci(e) {
return function() {
var t = arguments.length;
if (!t)
return function() {
return arguments[0]
}
;
var n, r = e ? t : -1, i = 0, s = O(t);
while (e ? r-- : ++r < t) {
var o = s[i++] = arguments[r];
if (typeof o != "function")
throw new Tt(y);
var u = n ? "" : Wi(o);
n = u == "wrapper" ? new Xn([]) : n
}
r = n ? -1 : t;
while (++r < t) {
o = s[r],
u = Wi(o);
var a = u == "wrapper" ? zi(o) : null ;
a && Yi(a[0]) ? n = n[Wi(a[0])].apply(n, a[3]) : n = o.length == 1 && Yi(o) ? n[u]() : n.thru(o)
}
return function() {
var e = arguments;
if (n && e.length == 1 && ru(e[0]))
return n.plant(e[0]).value();
var r = 0
, i = s[r].apply(this, e);
while (++r < t)
i = s[r].call(this, i);
return i
}
}
}
function ki(e, t) {
return function(n, r, i) {
return typeof r == "function" && typeof i == "undefined" && ru(n) ? e(n, r) : t(n, fi(r, i, 3))
}
}
function Li(e) {
return function(t, n, r) {
if (typeof n != "function" || typeof r != "undefined")
n = fi(n, r, 3);
return e(t, n, Fu)
}
}
function Ai(e) {
return function(t, n, r) {
if (typeof n != "function" || typeof r != "undefined")
n = fi(n, r, 3);
return e(t, n)
}
}
function Oi(e) {
return function(t, n, r) {
return t = Dt(t),
t && (e ? t : "") + Pi(t, n, r) + (e ? "" : t)
}
}
function Mi(e) {
var t = Qo(function(n, r) {
var i = Vt(r, t.placeholder);
return ji(n, e, null , r, i)
});
return t
}
function _i(e, t) {
return function(n, r, i, s) {
var o = arguments.length < 3;
return typeof r == "function" && typeof s == "undefined" && ru(n) ? e(n, r, i, o) : Qr(n, Ui(r, s, 4), i, o, t)
}
}
function Di(t, l, c, h, p, d, v, m, g, y) {
function k() {
var i = arguments.length
, s = i
, o = O(i);
while (s--)
o[s] = arguments[s];
h && (o = ci(o, h, p)),
d && (o = hi(o, d, v));
if (S || T) {
var f = k.placeholder
, L = Vt(o, f);
i -= L.length;
if (i < y) {
var A = m ? sr(m) : null
, M = Cn(y - i, 0)
, _ = S ? L : null
, D = S ? null : L
, P = S ? o : null
, H = S ? null : o;
l |= S ? u : a,
l &= ~(S ? a : u),
x || (l &= ~(n | r));
var B = [t, l, c, P, _, H, D, A, g, M]
, j = Di.apply(e, B);
return Yi(t) && ss(j, B),
j.placeholder = f,
j
}
}
var F = w ? c : this;
E && (t = F[C]),
m && (o = is(o, m)),
b && g < o.length && (o.length = g);
var I = this && this !== Lt && this instanceof k ? N || wi(t) : t;
return I.apply(F, o)
}
var b = l & f
, w = l & n
, E = l & r
, S = l & s
, x = l & i
, T = l & o
, N = !E && wi(t)
, C = t;
return k
}
function Pi(e, t, n) {
var r = e.length;
t = +t;
if (r >= t || !Tn(t))
return "";
var i = t - r;
return n = n == null ? " " : n + "",
ua(n, ln(i / n.length)).slice(0, i)
}
function Hi(e, t, r, i) {
function u() {
var t = -1
, n = arguments.length
, a = -1
, f = i.length
, l = O(n + f);
while (++a < f)
l[a] = i[a];
while (n--)
l[a++] = arguments[++t];
var c = this && this !== Lt && this instanceof u ? o : e;
return c.apply(s ? r : this, l)
}
var s = t & n
, o = wi(e);
return u
}
function Bi(e) {
return function(t, n, r, i) {
var s = Ui(r);
return s === Sr && r == null ? ui(t, n, e) : ai(t, n, s(r, i, 1), e)
}
}
function ji(t, i, s, o, f, l, c, h) {
var p = i & r;
if (!p && typeof t != "function")
throw new Tt(y);
var d = o ? o.length : 0;
d || (i &= ~(u | a),
o = f = null ),
d -= f ? f.length : 0;
if (i & a) {
var v = o
, m = f;
o = f = null
}
var g = p ? null : zi(t)
, b = [t, i, s, o, f, v, m, l, c, h];
g && (ts(b, g),
i = b[1],
h = b[9]),
b[9] = h == null ? p ? 0 : t.length : Cn(h - d, 0) || 0;
if (i == n)
var w = gi(b[0], b[2]);
else
i != u && i != (n | u) || !!b[4].length ? w = Di.apply(e, b) : w = Hi.apply(e, b);
var E = g ? Gr : ss;
return E(w, b)
}
function Fi(t, n, r, i, s, o, u) {
var a = -1
, f = t.length
, l = n.length
, c = !0;
if (f != l && !(s && l > f))
return !1;
while (c && ++a < f) {
var h = t[a]
, p = n[a];
c = e,
i && (c = s ? i(p, h, a) : i(h, p, a));
if (typeof c == "undefined")
if (s) {
var d = l;
while (d--) {
p = n[d],
c = h && h === p || r(h, p, i, s, o, u);
if (c)
break
}
} else
c = h && h === p || r(h, p, i, s, o, u)
}
return !!c
}
function Ii(e, t, n) {
switch (n) {
case S:
case x:
return +e == +t;
case T:
return e.name == t.name && e.message == t.message;
case k:
return e != +e ? t != +t : e == 0 ? 1 / e == 1 / t : e == +t;
case A:
case M:
return e == t + ""
}
return !1
}
function qi(t, n, r, i, s, o, u) {
var a = ju(t)
, f = a.length
, l = ju(n)
, c = l.length;
if (f != c && !s)
return !1;
var h = s
, p = -1;
while (++p < f) {
var d = a[p]
, v = s ? d in n : nn.call(n, d);
if (v) {
var m = t[d]
, g = n[d];
v = e,
i && (v = s ? i(g, m, d) : i(m, g, d)),
typeof v == "undefined" && (v = m && m === g || r(m, g, i, s, o, u))
}
if (!v)
return !1;
h || (h = d == "constructor")
}
if (!h) {
var y = t.constructor
, b = n.constructor;
if (y != b && "constructor" in t && "constructor" in n && !(typeof y == "function" && y instanceof y && typeof b == "function" && b instanceof b))
return !1
}
return !0
}
function Ri(e, t, n) {
var r = n ? Dn : _n
, i = r
, s = i;
return kr(e, function(e, o, u) {
var a = t(e, o, u);
if ((n ? a < i : a > i) || a === r && a === s)
i = a,
s = e
}),
s
}
function Ui(e, t, n) {
var r = zn.callback || ba;
return r = r === ba ? Sr : r,
n ? r(e, t, n) : r
}
function Xi(e, t, n) {
var r = zn.indexOf || Ts;
return r = r === Ts ? Mt : r,
e ? r(e, t, n) : r
}
function Vi(e, t, n) {
var r = -1
, i = n ? n.length : 0;
while (++r < i) {
var s = n[r]
, o = s.size;
switch (s.type) {
case "drop":
e += o;
break;
case "dropRight":
t -= o;
break;
case "take":
t = kn(t, e + o);
break;
case "takeRight":
e = Cn(e, t - o)
}
}
return {
start: e,
end: t
}
}
function $i(e) {
var t = e.length
, n = new e.constructor(t);
return t && typeof e[0] == "string" && nn.call(e, "index") && (n.index = e.index,
n.input = e.input),
n
}
function Ji(e) {
var t = e.constructor;
return typeof t == "function" && t instanceof t || (t = Et),
new t
}
function Ki(e, t, n) {
var r = e.constructor;
switch (t) {
case D:
return li(e);
case S:
case x:
return new r(+e);
case P:
case H:
case B:
case j:
case F:
case I:
case q:
case R:
case U:
r instanceof r && (r = Rn[t]);
var i = e.buffer;
return new r(n ? li(i) : i,e.byteOffset,e.length);
case k:
case M:
return new r(e);
case A:
var s = new r(e.source,tt.exec(e));
s.lastIndex = e.lastIndex
}
return s
}
function Qi(e, t) {
return e = +e,
t = t == null ? Fn : t,
e > -1 && e % 1 == 0 && e < t
}
function Gi(e, t, n) {
if (!hu(n))
return !1;
var r = typeof t;
if (r == "number")
var i = n.length
, s = Zi(i) && Qi(t, i);
else
s = r == "string" && t in n;
if (s) {
var o = n[t];
return e === e ? e === o : o !== o
}
return !1
}
function Yi(e) {
var t = Wi(e);
return !!t && e === zn[t] && t in $n.prototype
}
function Zi(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Fn
}
function es(e) {
return e === e && (e === 0 ? 1 / e > 0 : !hu(e))
}
function ts(e, t) {
var r = e[1]
, o = t[1]
, u = r | o
, a = u < f
, c = o == f && r == s || o == f && r == l && e[7].length <= t[8] || o == (f | l) && r == s;
if (!a && !c)
return e;
o & n && (e[2] = t[2],
u |= r & n ? 0 : i);
var h = t[3];
if (h) {
var p = e[3];
e[3] = p ? ci(p, h, t[4]) : sr(h),
e[4] = p ? Vt(e[3], b) : sr(t[4])
}
return h = t[5],
h && (p = e[5],
e[5] = p ? hi(p, h, t[6]) : sr(h),
e[6] = p ? Vt(e[5], b) : sr(t[6])),
h = t[7],
h && (e[7] = sr(h)),
o & f && (e[8] = e[8] == null ? t[8] : kn(e[8], t[8])),
e[9] == null && (e[9] = t[9]),
e[0] = t[0],
e[1] = u,
e
}
function ns(e, t) {
e = fs(e);
var n = -1
, r = t.length
, i = {};
while (++n < r) {
var s = t[n];
s in e && (i[s] = e[s])
}
return i
}
function rs(e, t) {
var n = {};
return Br(e, function(e, r, i) {
t(e, r, i) && (n[r] = e)
}),
n
}
function is(t, n) {
var r = t.length
, i = kn(n.length, r)
, s = sr(t);
while (i--) {
var o = n[i];
t[i] = Qi(o, r) ? s[o] : e
}
return t
}
function os(e) {
var t, n = zn.support;
if (!Wt(e) || sn.call(e) != L || !!zt(e) || !nn.call(e, "constructor") && (t = e.constructor,
typeof t == "function" && !(t instanceof t)) || !n.argsTag && nu(e))
return !1;
var r;
return n.ownLast ? (Br(e, function(e, t, n) {
return r = nn.call(n, t),
!1
}),
r !== !1) : (Br(e, function(e, t) {
r = t
}),
typeof r == "undefined" || nn.call(e, r))
}
function us(e) {
var t = Fu(e)
, n = t.length
, r = n && e.length
, i = zn.support
, s = r && Zi(r) && (ru(e) || i.nonEnumStrings && wu(e) || i.nonEnumArgs && nu(e))
, o = -1
, u = [];
while (++o < n) {
var a = t[o];
(s && Qi(a, r) || nn.call(e, a)) && u.push(a)
}
return u
}
function as(e) {
return e == null ? [] : Zi(e.length) ? zn.support.unindexedChars && wu(e) ? e.split("") : hu(e) ? e : Et(e) : Vu(e)
}
function fs(e) {
if (zn.support.unindexedChars && wu(e)) {
var t = -1
, n = e.length
, r = Et(e);
while (++t < n)
r[t] = e.charAt(t);
return r
}
return hu(e) ? e : Et(e)
}
function ls(e) {
return e instanceof $n ? e.clone() : new Xn(e.__wrapped__,e.__chain__,sr(e.__actions__))
}
function cs(e, t, n) {
(n ? Gi(e, t, n) : t == null ) ? t = 1 : t = Cn(+t || 1, 1);
var r = 0
, i = e ? e.length : 0
, s = -1
, o = O(ln(i / t));
while (r < i)
o[++s] = Yr(e, r, r += t);
return o
}
function hs(e) {
var t = -1
, n = e ? e.length : 0
, r = -1
, i = [];
while (++t < n) {
var s = e[t];
s && (i[++r] = s)
}
return i
}
function ds(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return [];
if (n ? Gi(e, t, n) : t == null )
t = 1;
return Yr(e, t < 0 ? 0 : t)
}
function vs(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return [];
if (n ? Gi(e, t, n) : t == null )
t = 1;
return t = r - (+t || 0),
Yr(e, 0, t < 0 ? 0 : t)
}
function ms(e, t, n) {
return e && e.length ? si(e, Ui(t, n, 3), !0, !0) : []
}
function gs(e, t, n) {
return e && e.length ? si(e, Ui(t, n, 3), !0) : []
}
function ys(e, t, n, r) {
var i = e ? e.length : 0;
return i ? (n && typeof n != "number" && Gi(e, t, n) && (n = 0,
r = i),
Or(e, t, n, r)) : []
}
function Es(t) {
return t ? t[0] : e
}
function Ss(e, t, n) {
var r = e ? e.length : 0;
return n && Gi(e, t, n) && (t = !1),
r ? Dr(e, t) : []
}
function xs(e) {
var t = e ? e.length : 0;
return t ? Dr(e, !0) : []
}
function Ts(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return -1;
if (typeof n == "number")
n = n < 0 ? Cn(r + n, 0) : n;
else if (n) {
var i = ui(e, t)
, s = e[i];
return (t === t ? t === s : s !== s) ? i : -1
}
return Mt(e, t, n || 0)
}
function Ns(e) {
return vs(e, 1)
}
function Cs() {
var e = []
, t = -1
, n = arguments.length
, r = []
, i = Xi()
, s = i == Mt;
while (++t < n) {
var o = arguments[t];
if (ru(o) || nu(o))
e.push(o),
r.push(s && o.length >= 120 ? yi(t && o) : null )
}
n = e.length;
var u = e[0]
, a = -1
, f = u ? u.length : 0
, l = []
, c = r[0];
e: while (++a < f) {
o = u[a];
if ((c ? rr(c, o) : i(l, o, 0)) < 0) {
t = n;
while (--t) {
var h = r[t];
if ((h ? rr(h, o) : i(e[t], o, 0)) < 0)
continue e
}
c && c.push(o),
l.push(o)
}
}
return l
}
function ks(t) {
var n = t ? t.length : 0;
return n ? t[n - 1] : e
}
function Ls(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return -1;
var i = r;
if (typeof n == "number")
i = (n < 0 ? Cn(r + n, 0) : kn(n || 0, r - 1)) + 1;
else if (n) {
i = ui(e, t, !0) - 1;
var s = e[i];
return (t === t ? t === s : s !== s) ? i : -1
}
if (t !== t)
return Ut(e, i, !0);
while (i--)
if (e[i] === t)
return i;
return -1
}
function As() {
var e = arguments
, t = e[0];
if (!t || !t.length)
return t;
var n = 0
, r = Xi()
, i = e.length;
while (++n < i) {
var s = 0
, o = e[n];
while ((s = r(t, o, s)) > -1)
yn.call(t, s, 1)
}
return t
}
function Ms(e, t, n) {
var r = -1
, i = e ? e.length : 0
, s = [];
t = Ui(t, n, 3);
while (++r < i) {
var o = e[r];
t(o, r, e) && (s.push(o),
yn.call(e, r--, 1),
i--)
}
return s
}
function _s(e) {
return ds(e, 1)
}
function Ds(e, t, n) {
var r = e ? e.length : 0;
return r ? (n && typeof n != "number" && Gi(e, t, n) && (t = 0,
n = r),
Yr(e, t, n)) : []
}
function Bs(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return [];
if (n ? Gi(e, t, n) : t == null )
t = 1;
return Yr(e, 0, t < 0 ? 0 : t)
}
function js(e, t, n) {
var r = e ? e.length : 0;
if (!r)
return [];
if (n ? Gi(e, t, n) : t == null )
t = 1;
return t = r - (+t || 0),
Yr(e, t < 0 ? 0 : t)
}
function Fs(e, t, n) {
return e && e.length ? si(e, Ui(t, n, 3), !1, !0) : []
}
function Is(e, t, n) {
return e && e.length ? si(e, Ui(t, n, 3)) : []
}
function Rs(e, t, n, r) {
var i = e ? e.length : 0;
if (!i)
return [];
t != null && typeof t != "boolean" && (r = n,
n = Gi(e, t, r) ? null : t,
t = !1);
var s = Ui();
if (s !== Sr || n != null )
n = s(n, r, 3);
return t && Xi() == Mt ? $t(e, n) : ri(e, n)
}
function Us(e) {
var t = -1
, n = (e && e.length && cr(lr(e, tn))) >>> 0
, r = O(n);
while (++t < n)
r[t] = lr(e, Jr(t));
return r
}
function Ws() {
var e = -1
, t = arguments.length;
while (++e < t) {
var n = arguments[e];
if (ru(n) || nu(n))
var r = r ? Cr(r, n).concat(Cr(n, r)) : n
}
return r ? ri(r) : []
}
function Vs(e, t) {
var n = -1
, r = e ? e.length : 0
, i = {};
r && !t && !ru(e[0]) && (t = []);
while (++n < r) {
var s = e[n];
t ? i[s] = t[n] : s && (i[s[0]] = s[1])
}
return i
}
function $s(e) {
var t = zn(e);
return t.__chain__ = !0,
t
}
function Js(e, t, n) {
return t.call(n, e),
e
}
function Ks(e, t, n) {
return t.call(n, e)
}
function Qs() {
return $s(this)
}
function Gs() {
return new Xn(this.value(),this.__chain__)
}
function Ys(e) {
var t, n = this;
while (n instanceof Wn) {
var r = ls(n);
t ? i.__wrapped__ = r : t = r;
var i = r;
n = n.__wrapped__
}
return i.__wrapped__ = e,
t
}
function Zs() {
var e = this.__wrapped__;
return e instanceof $n ? (this.__actions__.length && (e = new $n(this)),
new Xn(e.reverse(),this.__chain__)) : this.thru(function(e) {
return e.reverse()
})
}
function eo() {
return this.value() + ""
}
function to() {
return oi(this.__wrapped__, this.__actions__)
}
function io(e, t, n) {
var r = ru(e) ? ar : Ar;
n && Gi(e, t, n) && (t = null );
if (typeof t != "function" || typeof n != "undefined")
t = Ui(t, n, 3);
return r(e, t)
}
function so(e, t, n) {
var r = ru(e) ? fr : Mr;
return t = Ui(t, n, 3),
r(e, t)
}
function ao(e, t) {
return oo(e, Wr(t))
}
function ho(e, t, n, r) {
var i = e ? e.length : 0;
return Zi(i) || (e = Vu(e),
i = e.length),
i ? (typeof n != "number" || r && Gi(t, n, r) ? n = 0 : n = n < 0 ? Cn(i + n, 0) : n || 0,
typeof e == "string" || !ru(e) && wu(e) ? n < i && e.indexOf(t, n) > -1 : Xi(e, t, n) > -1) : !1
}
function mo(e, t, n) {
var r = ru(e) ? lr : zr;
return t = Ui(t, n, 3),
r(e, t)
}
function yo(e, t) {
return mo(e, Jr(t))
}
function Eo(e, t, n) {
var r = ru(e) ? fr : Mr;
return t = Ui(t, n, 3),
r(e, function(e, n, r) {
return !t(e, n, r)
})
}
function So(t, n, r) {
if (r ? Gi(t, n, r) : n == null ) {
t = as(t);
var i = t.length;
return i > 0 ? t[Kr(0, i - 1)] : e
}
var s = xo(t);
return s.length = kn(n < 0 ? 0 : +n || 0, s.length),
s
}
function xo(e) {
e = as(e);
var t = -1
, n = e.length
, r = O(n);
while (++t < n) {
var i = Kr(0, t);
t != i && (r[t] = r[i]),
r[i] = e[t]
}
return r
}
function To(e) {
var t = e ? e.length : 0;
return Zi(t) ? t : ju(e).length
}
function No(e, t, n) {
var r = ru(e) ? vr : Zr;
n && Gi(e, t, n) && (t = null );
if (typeof t != "function" || typeof n != "undefined")
t = Ui(t, n, 3);
return r(e, t)
}
function Co(e, t, n) {
if (e == null )
return [];
var r = -1
, i = e.length
, s = Zi(i) ? O(i) : [];
return n && Gi(e, t, n) && (t = null ),
t = Ui(t, n, 3),
kr(e, function(e, n, i) {
s[++r] = {
criteria: t(e, n, i),
index: r,
value: e
}
}),
ei(s, jt)
}
function ko() {
var e = arguments
, t = e[0]
, n = e[3]
, r = 0
, i = e.length - 1;
if (t == null )
return [];
var s = O(i);
while (r < i)
s[r] = e[++r];
return n && Gi(e[1], e[2], n) && (s = e[1]),
ti(t, Dr(s), [])
}
function Lo(e, t, n, r) {
return e == null ? [] : (r && Gi(t, n, r) && (n = null ),
ru(t) || (t = t == null ? [] : [t]),
ru(n) || (n = n == null ? [] : [n]),
ti(e, t, n))
}
function Ao(e, t) {
return so(e, Wr(t))
}
function Mo(e, t) {
if (typeof t != "function") {
if (typeof e != "function")
throw new Tt(y);
var n = e;
e = t,
t = n
}
return e = Tn(e = +e) ? e : 0,
function() {
if (--e < 1)
return t.apply(this, arguments)
}
}
function _o(e, t, n) {
return n && Gi(e, t, n) && (t = null ),
t = e && t == null ? e.length : Cn(+t || 0, 0),
ji(e, f, null , null , null , null , t)
}
function Do(e, t) {
var n;
if (typeof t != "function") {
if (typeof e != "function")
throw new Tt(y);
var r = e;
e = t,
t = r
}
return function() {
return --e > 0 ? n = t.apply(this, arguments) : t = null ,
n
}
}
function Io(t, n, r) {
function v() {
f && cn(f),
s && cn(s),
s = f = l = e
}
function m() {
var r = n - (Oo() - u);
if (r <= 0 || r > n) {
s && cn(s);
var h = l;
s = f = l = e,
h && (c = Oo(),
o = t.apply(a, i),
!f && !s && (i = a = null ))
} else
f = gn(m, r)
}
function g() {
f && cn(f),
s = f = l = e;
if (p || h !== n)
c = Oo(),
o = t.apply(a, i),
!f && !s && (i = a = null )
}
function b() {
i = arguments,
u = Oo(),
a = this,
l = p && (f || !d);
if (h === !1)
var e = d && !f;
else {
!s && !d && (c = u);
var r = h - (u - c)
, v = r <= 0 || r > h;
v ? (s && (s = cn(s)),
c = u,
o = t.apply(a, i)) : s || (s = gn(g, r))
}
return v && f ? f = cn(f) : !f && n !== h && (f = gn(m, n)),
e && (v = !0,
o = t.apply(a, i)),
v && !f && !s && (i = a = null ),
o
}
var i, s, o, u, a, f, l, c = 0, h = !1, p = !0;
if (typeof t != "function")
throw new Tt(y);
n = n < 0 ? 0 : +n || 0;
if (r === !0) {
var d = !0;
p = !1
} else
hu(r) && (d = r.leading,
h = "maxWait" in r && Cn(+r.maxWait || 0, n),
p = "trailing" in r ? r.trailing : p);
return b.cancel = v,
b
}
function Wo(e, t) {
if (typeof e != "function" || t && typeof t != "function")
throw new Tt(y);
var n = function() {
var r = arguments
, i = n.cache
, s = t ? t.apply(this, r) : r[0];
if (i.has(s))
return i.get(s);
var o = e.apply(this, r);
return i.set(s, o),
o
}
;
return n.cache = new Wo.Cache,
n
}
function Xo(e) {
if (typeof e != "function")
throw new Tt(y);
return function() {
return !e.apply(this, arguments)
}
}
function Vo(e) {
return Do(e, 2)
}
function Qo(e, t) {
if (typeof e != "function")
throw new Tt(y);
return t = Cn(typeof t == "undefined" ? e.length - 1 : +t || 0, 0),
function() {
var n = arguments
, r = -1
, i = Cn(n.length - t, 0)
, s = O(i);
while (++r < i)
s[r] = n[t + r];
switch (t) {
case 0:
return e.call(this, s);
case 1:
return e.call(this, n[0], s);
case 2:
return e.call(this, n[0], n[1], s)
}
var o = O(t + 1);
r = -1;
while (++r < t)
o[r] = n[r];
return o[t] = s,
e.apply(this, o)
}
}
function Go(e) {
if (typeof e != "function")
throw new Tt(y);
return function(t) {
return e.apply(this, t)
}
}
function Yo(e, t, n) {
var r = !0
, i = !0;
if (typeof e != "function")
throw new Tt(y);
return n === !1 ? r = !1 : hu(n) && (r = "leading" in n ? !!n.leading : r,
i = "trailing" in n ? !!n.trailing : i),
mt.leading = r,
mt.maxWait = +t,
mt.trailing = i,
Io(e, t, mt)
}
function Zo(e, t) {
return t = t == null ? Ea : t,
ji(t, u, null , [e], [])
}
function eu(e, t, n, r) {
return t && typeof t != "boolean" && Gi(e, t, n) ? t = !1 : typeof t == "function" && (r = n,
n = t,
t = !1),
n = typeof n == "function" && fi(n, r, 1),
xr(e, t, n)
}
function tu(e, t, n) {
return t = typeof t == "function" && fi(t, n, 1),
xr(e, !0, t)
}
function nu(t) {
var n = Wt(t) ? t.length : e;
return Zi(n) && sn.call(t) == w
}
function iu(e) {
return e === !0 || e === !1 || Wt(e) && sn.call(e) == S
}
function su(e) {
return Wt(e) && sn.call(e) == x
}
function ou(e) {
return !!e && e.nodeType === 1 && Wt(e) && (zn.support.nodeTag ? sn.call(e).indexOf("Element") > -1 : zt(e))
}
function uu(e) {
if (e == null )
return !0;
var t = e.length;
return Zi(t) && (ru(e) || wu(e) || nu(e) || Wt(e) && cu(e.splice)) ? !t : !ju(e).length
}
function au(t, n, r, i) {
r = typeof r == "function" && fi(r, i, 3);
if (!r && es(t) && es(n))
return t === n;
var s = r ? r(t, n) : e;
return typeof s == "undefined" ? qr(t, n, r) : !!s
}
function fu(e) {
return Wt(e) && typeof e.message == "string" && sn.call(e) == T
}
function hu(e) {
var t = typeof e;
return t == "function" || !!e && t == "object"
}
function pu(e, t, n, r) {
var i = ju(t)
, s = i.length;
if (!s)
return !0;
if (e == null )
return !1;
n = typeof n == "function" && fi(n, r, 3);
if (!n && s == 1) {
var o = i[0]
, u = t[o];
if (es(u))
return u === e[o] && (typeof u != "undefined" || o in fs(e))
}
var a = O(s)
, f = O(s);
while (s--)
u = a[s] = t[i[s]],
f[s] = es(u);
return Ur(fs(e), i, a, f, n)
}
function du(e) {
return gu(e) && e != +e
}
function vu(e) {
return e == null ? !1 : sn.call(e) == N ? un.test(en.call(e)) : Wt(e) && (zt(e) ? un : rt).test(e)
}
function mu(e) {
return e === null
}
function gu(e) {
return typeof e == "number" || Wt(e) && sn.call(e) == k
}
function bu(e) {
return hu(e) && sn.call(e) == A
}
function wu(e) {
return typeof e == "string" || Wt(e) && sn.call(e) == M
}
function Eu(e) {
return Wt(e) && Zi(e.length) && !!dt[sn.call(e)]
}
function Su(e) {
return typeof e == "undefined"
}
function xu(e) {
var t = e ? e.length : 0;
return Zi(t) ? t ? zn.support.unindexedChars && wu(e) ? e.split("") : sr(e) : [] : Vu(e)
}
function Tu(e) {
return Er(e, Fu(e))
}
function Cu(e, t, n) {
var r = Tr(e);
return n && Gi(e, t, n) && (t = null ),
t ? Er(t, r, ju(t)) : r
}
function Pu(e) {
return Ir(e, Fu(e))
}
function Hu(e, t) {
return e ? nn.call(e, t) : !1
}
function Bu(e, t, n) {
n && Gi(e, t, n) && (t = null );
var r = -1
, i = ju(e)
, s = i.length
, o = {};
while (++r < s) {
var u = i[r]
, a = e[u];
t ? nn.call(o, a) ? o[a].push(u) : o[a] = [u] : o[a] = u
}
return o
}
function Fu(e) {
if (e == null )
return [];
hu(e) || (e = Et(e));
var t = e.length
, n = zn.support;
t = t && Zi(t) && (ru(e) || n.nonEnumStrings && wu(e) || n.nonEnumArgs && nu(e)) && t || 0;
var r = e.constructor
, i = -1
, s = cu(r) && r.prototype || kt
, o = s === e
, u = O(t)
, a = t > 0
, f = n.enumErrorProps && (e === Ct || e instanceof gt)
, l = n.enumPrototypes && cu(e);
while (++i < t)
u[i] = i + "";
for (var c in e)
(!l || c != "prototype") && (!f || c != "message" && c != "name") && (!a || !Qi(c, t)) && (c != "constructor" || !o && !!nn.call(e, c)) && u.push(c);
if (n.nonEnumShadows && e !== kt) {
var h = e === Xt ? M : e === Ct ? T : sn.call(e)
, p = Un[h] || Un[L];
h == L && (s = kt),
t = ht.length;
while (t--) {
c = ht[t];
var d = p[c];
(!o || !d) && (d ? nn.call(e, c) : e[c] !== s[c]) && u.push(c)
}
}
return u
}
function Iu(e, t, n) {
var r = {};
return t = Ui(t, n, 3),
jr(e, function(e, n, i) {
r[n] = t(e, n, i)
}),
r
}
function Uu(e) {
var t = -1
, n = ju(e)
, r = n.length
, i = O(r);
while (++t < r) {
var s = n[t];
i[t] = [s, e[s]]
}
return i
}
function Wu(t, n, r) {
var i = t == null ? e : t[n];
return typeof i == "undefined" && (i = r),
cu(i) ? i.call(t) : i
}
function Xu(e, t, n, r) {
var i = ru(e) || Eu(e);
t = Ui(t, r, 4);
if (n == null )
if (i || hu(e)) {
var s = e.constructor;
i ? n = ru(e) ? new s : [] : n = Tr(cu(s) && s.prototype)
} else
n = {};
return (i ? or : jr)(e, function(e, r, i) {
return t(n, e, r, i)
}),
n
}
function Vu(e) {
return ii(e, ju(e))
}
function $u(e) {
return ii(e, Fu(e))
}
function Ju(e, t, n) {
return t = +t || 0,
typeof n == "undefined" ? (n = t,
t = 0) : n = +n || 0,
e >= t && e < n
}
function Ku(e, t, n) {
n && Gi(e, t, n) && (t = n = null );
var r = e == null
, i = t == null ;
n == null && (i && typeof e == "boolean" ? (n = e,
e = 1) : typeof t == "boolean" && (n = t,
i = !0)),
r && i && (t = 1,
i = !1),
e = +e || 0,
i ? (t = e,
e = 0) : t = +t || 0;
if (n || e % 1 || t % 1) {
var s = Mn();
return kn(e + s * (t - e + parseFloat("1e-" + ((s + "").length - 1))), t)
}
return Kr(e, t)
}
function Gu(e) {
return e = Dt(e),
e && e.charAt(0).toUpperCase() + e.slice(1)
}
function Yu(e) {
return e = Dt(e),
e && e.replace(it, It).replace(Z, "")
}
function Zu(e, t, n) {
e = Dt(e),
t += "";
var r = e.length;
return n = typeof n == "undefined" ? r : kn(n < 0 ? 0 : +n || 0, r),
n -= t.length,
n >= 0 && e.indexOf(t, n) == n
}
function ea(e) {
return e = Dt(e),
e && K.test(e) ? e.replace($, qt) : e
}
function ta(e) {
return e = Dt(e),
e && ut.test(e) ? e.replace(ot, "\\$&") : e
}
function ra(e, t, n) {
e = Dt(e),
t = +t;
var r = e.length;
if (r >= t || !Tn(t))
return e;
var i = (t - r) / 2
, s = hn(i)
, o = ln(i);
return n = Pi("", o, n),
n.slice(0, s) + e + n
}
function oa(e, t, n) {
return n && Gi(e, t, n) && (t = 0),
On(e, t)
}
function ua(e, t) {
var n = "";
e = Dt(e),
t = +t;
if (t < 1 || !e || !Tn(t))
return n;
do
t % 2 && (n += e),
t = hn(t / 2),
e += e;
while (t);return n
}
function la(e, t, n) {
return e = Dt(e),
n = n == null ? 0 : kn(n < 0 ? 0 : +n || 0, e.length),
e.lastIndexOf(t, n) == n
}
function ca(t, n, r) {
var i = zn.templateSettings;
r && Gi(t, n, r) && (n = r = null ),
t = Dt(t),
n = br(br({}, r || n), i, yr);
var s = br(br({}, n.imports), i.imports, yr), o = ju(s), u = ii(s, o), a, f, l = 0, c = n.interpolate || st, h = "__p += '", p = St((n.escape || st).source + "|" + c.source + "|" + (c === Y ? et : st).source + "|" + (n.evaluate || st).source + "|$", "g"), d = "//# sourceURL=" + ("sourceURL" in n ? n.sourceURL : "lodash.templateSources[" + ++pt + "]") + "\n";
t.replace(p, function(e, n, r, i, s, o) {
return r || (r = i),
h += t.slice(l, o).replace(at, Rt),
n && (a = !0,
h += "' +\n__e(" + n + ") +\n'"),
s && (f = !0,
h += "';\n" + s + ";\n__p += '"),
r && (h += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"),
l = o + e.length,
e
}),
h += "';\n";
var v = n.variable;
v || (h = "with (obj) {\n" + h + "\n}\n"),
h = (f ? h.replace(z, "") : h).replace(W, "$1").replace(X, "$1;"),
h = "function(" + (v || "obj") + ") {\n" + (v ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (a ? ", __e = _.escape" : "") + (f ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + h + "return __p\n}";
var m = ya(function() {
return yt(o, d + "return " + h).apply(e, u)
});
m.source = h;
if (fu(m))
throw m;
return m
}
function ha(e, t, n) {
var r = e;
return e = Dt(e),
e ? (n ? Gi(r, t, n) : t == null ) ? e.slice(Jt(e), Kt(e) + 1) : (t += "",
e.slice(Ht(e, t), Bt(e, t) + 1)) : e
}
function pa(e, t, n) {
var r = e;
return e = Dt(e),
e ? (n ? Gi(r, t, n) : t == null ) ? e.slice(Jt(e)) : e.slice(Ht(e, t + "")) : e
}
function da(e, t, n) {
var r = e;
return e = Dt(e),
e ? (n ? Gi(r, t, n) : t == null ) ? e.slice(0, Kt(e) + 1) : e.slice(0, Bt(e, t + "") + 1) : e
}
function va(e, t, n) {
n && Gi(e, t, n) && (t = null );
var r = c
, i = h;
if (t != null )
if (hu(t)) {
var s = "separator" in t ? t.separator : s;
r = "length" in t ? +t.length || 0 : r,
i = "omission" in t ? Dt(t.omission) : i
} else
r = +t || 0;
e = Dt(e);
if (r >= e.length)
return e;
var o = r - i.length;
if (o < 1)
return i;
var u = e.slice(0, o);
if (s == null )
return u + i;
if (bu(s)) {
if (e.slice(o).search(s)) {
var a, f, l = e.slice(0, o);
s.global || (s = St(s.source, (tt.exec(s) || "") + "g")),
s.lastIndex = 0;
while (a = s.exec(l))
f = a.index;
u = u.slice(0, f == null ? o : f)
}
} else if (e.indexOf(s, o) != o) {
var p = u.lastIndexOf(s);
p > -1 && (u = u.slice(0, p))
}
return u + i
}
function ma(e) {
return e = Dt(e),
e && J.test(e) ? e.replace(V, Qt) : e
}
function ga(e, t, n) {
return n && Gi(e, t, n) && (t = null ),
e = Dt(e),
e.match(t || ft) || []
}
function ba(e, t, n) {
return n && Gi(e, t, n) && (t = null ),
Wt(e) ? Sa(e) : Sr(e, t)
}
function wa(e) {
return function() {
return e
}
}
function Ea(e) {
return e
}
function Sa(e) {
return Wr(xr(e, !0))
}
function xa(e, t) {
return Xr(e + "", xr(t, !0))
}
function Ta(e, t, n) {
if (n == null ) {
var r = hu(t)
, i = r && ju(t)
, s = i && i.length && Ir(t, i);
if (s ? !s.length : !r)
s = !1,
n = t,
t = e,
e = this
}
s || (s = Ir(t, ju(t)));
var o = !0
, u = -1
, a = cu(e)
, f = s.length;
n === !1 ? o = !1 : hu(n) && "chain" in n && (o = n.chain);
while (++u < f) {
var l = s[u]
, c = t[l];
e[l] = c,
a && (e.prototype[l] = function(t) {
return function() {
var n = this.__chain__;
if (o || n) {
var r = e(this.__wrapped__)
, i = r.__actions__ = sr(this.__actions__);
return i.push({
func: t,
args: arguments,
thisArg: e
}),
r.__chain__ = n,
r
}
var s = [this.value()];
return dn.apply(s, arguments),
t.apply(e, s)
}
}(c))
}
return e
}
function Na() {
return C._ = on,
this
}
function Ca() {}
function ka(e) {
return Jr(e + "")
}
function La(t) {
return function(n) {
return t == null ? e : t[n]
}
}
function Aa(e, t, n) {
n && Gi(e, t, n) && (t = n = null ),
e = +e || 0,
n = n == null ? 1 : +n || 0,
t == null ? (t = e,
e = 0) : t = +t || 0;
var r = -1
, i = Cn(ln((t - e) / (n || 1)), 0)
, s = O(i);
while (++r < i)
s[r] = e,
e += n;
return s
}
function Oa(e, t, n) {
e = +e;
if (e < 1 || !Tn(e))
return [];
var r = -1
, i = O(kn(e, Pn));
t = fi(t, n, 1);
while (++r < e)
r < Pn ? i[r] = t(r) : t(r);
return i
}
function Ma(e) {
var t = ++rn;
return Dt(e) + t
}
function _a(e, t) {
return e + t
}
function Ha(e, t, n) {
n && Gi(e, t, n) && (t = null );
var r = Ui()
, i = t == null ;
if (r !== Sr || !i)
i = !1,
t = r(t, n, 3);
return i ? mr(ru(e) ? e : as(e)) : ni(e, t)
}
C = C ? Yt.defaults(Lt.Object(), C, Yt.pick(Lt, ct)) : Lt;
var O = C.Array
, _ = C.Date
, gt = C.Error
, yt = C.Function
, bt = C.Math
, wt = C.Number
, Et = C.Object
, St = C.RegExp
, xt = C.String
, Tt = C.TypeError
, Nt = O.prototype
, Ct = gt.prototype
, kt = Et.prototype
, Xt = xt.prototype
, Zt = (Zt = C.window) && Zt.document
, en = yt.prototype.toString
, tn = Jr("length")
, nn = kt.hasOwnProperty
, rn = 0
, sn = kt.toString
, on = C._
, un = St("^" + ta(sn).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$")
, an = vu(an = C.ArrayBuffer) && an
, fn = vu(fn = an && (new an(0)).slice) && fn
, ln = bt.ceil
, cn = C.clearTimeout
, hn = bt.floor
, pn = vu(pn = Et.getPrototypeOf) && pn
, dn = Nt.push
, vn = kt.propertyIsEnumerable
, mn = vu(mn = C.Set) && mn
, gn = C.setTimeout
, yn = Nt.splice
, bn = vu(bn = C.Uint8Array) && bn
, wn = vu(wn = C.WeakMap) && wn
, En = function() {
try {
var e = vu(e = C.Float64Array) && e
, t = new e(new an(10),0,1) && e
} catch (n) {}
return t
}()
, Sn = vu(Sn = O.isArray) && Sn
, xn = vu(xn = Et.create) && xn
, Tn = C.isFinite
, Nn = vu(Nn = Et.keys) && Nn
, Cn = bt.max
, kn = bt.min
, Ln = vu(Ln = _.now) && Ln
, An = vu(An = wt.isFinite) && An
, On = C.parseInt
, Mn = bt.random
, _n = wt.NEGATIVE_INFINITY
, Dn = wt.POSITIVE_INFINITY
, Pn = bt.pow(2, 32) - 1
, Hn = Pn - 1
, Bn = Pn >>> 1
, jn = En ? En.BYTES_PER_ELEMENT : 0
, Fn = bt.pow(2, 53) - 1
, In = wn && new wn
, qn = {}
, Rn = {};
Rn[P] = C.Float32Array,
Rn[H] = C.Float64Array,
Rn[B] = C.Int8Array,
Rn[j] = C.Int16Array,
Rn[F] = C.Int32Array,
Rn[I] = C.Uint8Array,
Rn[q] = C.Uint8ClampedArray,
Rn[R] = C.Uint16Array,
Rn[U] = C.Uint32Array;
var Un = {};
Un[E] = Un[x] = Un[k] = {
constructor: !0,
toLocaleString: !0,
toString: !0,
valueOf: !0
},
Un[S] = Un[M] = {
constructor: !0,
toString: !0,
valueOf: !0
},
Un[T] = Un[N] = Un[A] = {
constructor: !0,
toString: !0
},
Un[L] = {
constructor: !0
},
or(ht, function(e) {
for (var t in Un)
if (nn.call(Un, t)) {
var n = Un[t];
n[e] = nn.call(n, e)
}
});
var Vn = zn.support = {};
(function(e) {
var t = function() {
this.x = 1
}
, n = {
0: 1,
length: 1
}
, r = [];
t.prototype = {
valueOf: 1,
y: 1
};
for (var i in new t)
r.push(i);
Vn.argsTag = sn.call(arguments) == w,
Vn.enumErrorProps = vn.call(Ct, "message") || vn.call(Ct, "name"),
Vn.enumPrototypes = vn.call(t, "prototype"),
Vn.funcDecomp = /\bthis\b/.test(function() {
return this
}),
Vn.funcNames = typeof yt.name == "string",
Vn.nodeTag = sn.call(Zt) != L,
Vn.nonEnumStrings = !vn.call("x", 0),
Vn.nonEnumShadows = !/valueOf/.test(r),
Vn.ownLast = r[0] != "x",
Vn.spliceObjects = (yn.call(n, 0, 1),
!n[0]),
Vn.unindexedChars = "x"[0] + Et("x")[0] != "xx";
try {
Vn.dom = Zt.createDocumentFragment().nodeType === 11
} catch (s) {
Vn.dom = !1
}
try {
Vn.nonEnumArgs = !vn.call(arguments, 1)
} catch (s) {
Vn.nonEnumArgs = !0
}
})(0, 0),
zn.templateSettings = {
escape: Q,
evaluate: G,
interpolate: Y,
variable: "",
imports: {
_: zn
}
};
var Tr = function() {
function e() {}
return function(t) {
if (hu(t)) {
e.prototype = t;
var n = new e;
e.prototype = null
}
return n || C.Object()
}
}()
, kr = vi(jr)
, Lr = vi(Fr, !0)
, Pr = mi()
, Hr = mi(!0)
, Gr = In ? function(e, t) {
return In.set(e, t),
e
}
: Ea;
fn || (li = !an || !bn ? wa(null ) : function(e) {
var t = e.byteLength
, n = En ? hn(t / jn) : 0
, r = n * jn
, i = new an(t);
if (n) {
var s = new En(i,0,n);
s.set(new En(e,0,n))
}
return t != r && (s = new bn(i,r),
s.set(new bn(e,r))),
i
}
);
var yi = !xn || !mn ? wa(null ) : function(e) {
return new nr(e)
}
, zi = In ? function(e) {
return In.get(e)
}
: Ca
, Wi = function() {
return Vn.funcNames ? wa.name == "constant" ? Jr("name") : function(e) {
var t = e.name
, n = qn[t]
, r = n ? n.length : 0;
while (r--) {
var i = n[r]
, s = i.func;
if (s == null || s == e)
return i.name
}
return t
}
: wa("")
}()
, ss = function() {
var e = 0
, t = 0;
return function(n, r) {
var i = Oo()
, s = d - (i - t);
t = i;
if (s > 0) {
if (++e >= p)
return n
} else
e = 0;
return Gr(n, r)
}
}()
, ps = Qo(function(e, t) {
return ru(e) || nu(e) ? Cr(e, Dr(t, !1, !0)) : []
})
, bs = Ti()
, ws = Ti(!0)
, Os = Qo(function(e, t) {
e || (e = []),
t = Dr(t);
var n = t.length
, r = wr(e, t);
t.sort(At);
while (n--) {
var i = parseFloat(t[n]);
if (i != s && Qi(i)) {
var s = i;
yn.call(e, i, 1)
}
}
return r
})
, Ps = Bi()
, Hs = Bi(!0)
, qs = Qo(function(e) {
return ri(Dr(e, !1, !0))
})
, zs = Qo(function(e, t) {
return ru(e) || nu(e) ? Cr(e, t) : []
})
, Xs = Qo(Us)
, no = Qo(function(e, t) {
var n = e ? e.length : 0;
return Zi(n) && (e = as(e)),
wr(e, Dr(t))
})
, ro = pi(function(e, t, n) {
nn.call(e, n) ? ++e[n] : e[n] = 1
})
, oo = xi(kr)
, uo = xi(Lr, !0)
, fo = ki(or, kr)
, lo = ki(ur, Lr)
, co = pi(function(e, t, n) {
nn.call(e, n) ? e[n].push(t) : e[n] = [t]
})
, po = pi(function(e, t, n) {
e[n] = t
})
, vo = Qo(function(t, n, r) {
var i = -1
, s = typeof n == "function"
, o = t ? t.length : 0
, u = Zi(o) ? O(o) : [];
return kr(t, function(t) {
var o = s ? n : t != null && t[n];
u[++i] = o ? o.apply(t, r) : e
}),
u
})
, go = pi(function(e, t, n) {
e[n ? 0 : 1].push(t)
}, function() {
return [[], []]
})
, bo = _i(pr, kr)
, wo = _i(dr, Lr)
, Oo = Ln || function() {
return (new _).getTime()
}
, Po = Qo(function(e, t, r) {
var i = n;
if (r.length) {
var s = Vt(r, Po.placeholder);
i |= u
}
return ji(e, i, t, r, s)
})
, Ho = Qo(function(e, t) {
t = t.length ? Dr(t) : Pu(e);
var r = -1
, i = t.length;
while (++r < i) {
var s = t[r];
e[s] = ji(e[s], n, e)
}
return e
})
, Bo = Qo(function(e, t, i) {
var s = n | r;
if (i.length) {
var o = Vt(i, Bo.placeholder);
s |= u
}
return ji(t, s, e, i, o)
})
, jo = Ei(s)
, Fo = Ei(o)
, qo = Qo(function(e, t) {
return Nr(e, 1, t)
})
, Ro = Qo(function(e, t, n) {
return Nr(e, t, n)
})
, Uo = Ci()
, zo = Ci(!0)
, $o = Mi(u)
, Jo = Mi(a)
, Ko = Qo(function(e, t) {
return ji(e, l, null , null , null , Dr(t))
});
Vn.argsTag || (nu = function(t) {
var n = Wt(t) ? t.length : e;
return Zi(n) && nn.call(t, "callee") && !vn.call(t, "callee")
}
);
var ru = Sn || function(e) {
return Wt(e) && Zi(e.length) && sn.call(e) == E
}
;
Vn.dom || (ou = function(e) {
return !!e && e.nodeType === 1 && Wt(e) && !yu(e)
}
);
var lu = An || function(e) {
return typeof e == "number" && Tn(e)
}
, cu = _t(/x/) || bn && !_t(bn) ? function(e) {
return sn.call(e) == N
}
: _t
, yu = pn ? function(e) {
if (!e || sn.call(e) != L || !zn.support.argsTag && nu(e))
return !1;
var t = e.valueOf
, n = vu(t) && (n = pn(t)) && pn(n);
return n ? e == n || pn(e) == n : os(e)
}
: os
, Nu = di(br)
, ku = Qo(function(t) {
var n = t[0];
return n == null ? n : (t.push(gr),
Nu.apply(e, t))
})
, Lu = Ni(jr)
, Au = Ni(Fr)
, Ou = Li(Pr)
, Mu = Li(Hr)
, _u = Ai(jr)
, Du = Ai(Fr)
, ju = Nn ? function(e) {
if (e)
var t = e.constructor
, n = e.length;
return typeof t == "function" && t.prototype === e || (typeof e == "function" ? zn.support.enumPrototypes : n && Zi(n)) ? us(e) : hu(e) ? Nn(e) : []
}
: us
, qu = di(Vr)
, Ru = Qo(function(e, t) {
if (e == null )
return {};
if (typeof t[0] != "function") {
var t = lr(Dr(t), xt);
return ns(e, Cr(Fu(e), t))
}
var n = fi(t[0], t[1], 3);
return rs(e, function(e, t, r) {
return !n(e, t, r)
})
})
, zu = Qo(function(e, t) {
return e == null ? {} : typeof t[0] == "function" ? rs(e, fi(t[0], t[1], 3)) : ns(e, Dr(t))
})
, Qu = bi(function(e, t, n) {
return t = t.toLowerCase(),
e + (n ? t.charAt(0).toUpperCase() + t.slice(1) : t)
})
, na = bi(function(e, t, n) {
return e + (n ? "-" : "") + t.toLowerCase()
})
, ia = Oi()
, sa = Oi(!0);
On(lt + "08") != 8 && (oa = function(e, t, n) {
return (n ? Gi(e, t, n) : t == null ) ? t = 0 : t && (t = +t),
e = ha(e),
On(e, t || (nt.test(e) ? 16 : 10))
}
);
var aa = bi(function(e, t, n) {
return e + (n ? "_" : "") + t.toLowerCase()
})
, fa = bi(function(e, t, n) {
return e + (n ? " " : "") + (t.charAt(0).toUpperCase() + t.slice(1))
})
, ya = Qo(function(t, n) {
try {
return t.apply(e, n)
} catch (r) {
return fu(r) ? r : new gt(r)
}
})
, Da = Si(cr)
, Pa = Si(hr, !0);
return zn.prototype = Wn.prototype,
Xn.prototype = Tr(Wn.prototype),
Xn.prototype.constructor = Xn,
$n.prototype = Tr(Wn.prototype),
$n.prototype.constructor = $n,
Gn.prototype["delete"] = Yn,
Gn.prototype.get = Zn,
Gn.prototype.has = er,
Gn.prototype.set = tr,
nr.prototype.push = ir,
Wo.Cache = Gn,
zn.after = Mo,
zn.ary = _o,
zn.assign = Nu,
zn.at = no,
zn.before = Do,
zn.bind = Po,
zn.bindAll = Ho,
zn.bindKey = Bo,
zn.callback = ba,
zn.chain = $s,
zn.chunk = cs,
zn.compact = hs,
zn.constant = wa,
zn.countBy = ro,
zn.create = Cu,
zn.curry = jo,
zn.curryRight = Fo,
zn.debounce = Io,
zn.defaults = ku,
zn.defer = qo,
zn.delay = Ro,
zn.difference = ps,
zn.drop = ds,
zn.dropRight = vs,
zn.dropRightWhile = ms,
zn.dropWhile = gs,
zn.fill = ys,
zn.filter = so,
zn.flatten = Ss,
zn.flattenDeep = xs,
zn.flow = Uo,
zn.flowRight = zo,
zn.forEach = fo,
zn.forEachRight = lo,
zn.forIn = Ou,
zn.forInRight = Mu,
zn.forOwn = _u,
zn.forOwnRight = Du,
zn.functions = Pu,
zn.groupBy = co,
zn.indexBy = po,
zn.initial = Ns,
zn.intersection = Cs,
zn.invert = Bu,
zn.invoke = vo,
zn.keys = ju,
zn.keysIn = Fu,
zn.map = mo,
zn.mapValues = Iu,
zn.matches = Sa,
zn.matchesProperty = xa,
zn.memoize = Wo,
zn.merge = qu,
zn.mixin = Ta,
zn.negate = Xo,
zn.omit = Ru,
zn.once = Vo,
zn.pairs = Uu,
zn.partial = $o,
zn.partialRight = Jo,
zn.partition = go,
zn.pick = zu,
zn.pluck = yo,
zn.property = ka,
zn.propertyOf = La,
zn.pull = As,
zn.pullAt = Os,
zn.range = Aa,
zn.rearg = Ko,
zn.reject = Eo,
zn.remove = Ms,
zn.rest = _s,
zn.restParam = Qo,
zn.shuffle = xo,
zn.slice = Ds,
zn.sortBy = Co,
zn.sortByAll = ko,
zn.sortByOrder = Lo,
zn.spread = Go,
zn.take = Bs,
zn.takeRight = js,
zn.takeRightWhile = Fs,
zn.takeWhile = Is,
zn.tap = Js,
zn.throttle = Yo,
zn.thru = Ks,
zn.times = Oa,
zn.toArray = xu,
zn.toPlainObject = Tu,
zn.transform = Xu,
zn.union = qs,
zn.uniq = Rs,
zn.unzip = Us,
zn.values = Vu,
zn.valuesIn = $u,
zn.where = Ao,
zn.without = zs,
zn.wrap = Zo,
zn.xor = Ws,
zn.zip = Xs,
zn.zipObject = Vs,
zn.backflow = zo,
zn.collect = mo,
zn.compose = zo,
zn.each = fo,
zn.eachRight = lo,
zn.extend = Nu,
zn.iteratee = ba,
zn.methods = Pu,
zn.object = Vs,
zn.select = so,
zn.tail = _s,
zn.unique = Rs,
Ta(zn, zn),
zn.add = _a,
zn.attempt = ya,
zn.camelCase = Qu,
zn.capitalize = Gu,
zn.clone = eu,
zn.cloneDeep = tu,
zn.deburr = Yu,
zn.endsWith = Zu,
zn.escape = ea,
zn.escapeRegExp = ta,
zn.every = io,
zn.find = oo,
zn.findIndex = bs,
zn.findKey = Lu,
zn.findLast = uo,
zn.findLastIndex = ws,
zn.findLastKey = Au,
zn.findWhere = ao,
zn.first = Es,
zn.has = Hu,
zn.identity = Ea,
zn.includes = ho,
zn.indexOf = Ts,
zn.inRange = Ju,
zn.isArguments = nu,
zn.isArray = ru,
zn.isBoolean = iu,
zn.isDate = su,
zn.isElement = ou,
zn.isEmpty = uu,
zn.isEqual = au,
zn.isError = fu,
zn.isFinite = lu,
zn.isFunction = cu,
zn.isMatch = pu,
zn.isNaN = du,
zn.isNative = vu,
zn.isNull = mu,
zn.isNumber = gu,
zn.isObject = hu,
zn.isPlainObject = yu,
zn.isRegExp = bu,
zn.isString = wu,
zn.isTypedArray = Eu,
zn.isUndefined = Su,
zn.kebabCase = na,
zn.last = ks,
zn.lastIndexOf = Ls,
zn.max = Da,
zn.min = Pa,
zn.noConflict = Na,
zn.noop = Ca,
zn.now = Oo,
zn.pad = ra,
zn.padLeft = ia,
zn.padRight = sa,
zn.parseInt = oa,
zn.random = Ku,
zn.reduce = bo,
zn.reduceRight = wo,
zn.repeat = ua,
zn.result = Wu,
zn.runInContext = Gt,
zn.size = To,
zn.snakeCase = aa,
zn.some = No,
zn.sortedIndex = Ps,
zn.sortedLastIndex = Hs,
zn.startCase = fa,
zn.startsWith = la,
zn.sum = Ha,
zn.template = ca,
zn.trim = ha,
zn.trimLeft = pa,
zn.trimRight = da,
zn.trunc = va,
zn.unescape = ma,
zn.uniqueId = Ma,
zn.words = ga,
zn.all = io,
zn.any = No,
zn.contains = ho,
zn.detect = oo,
zn.foldl = bo,
zn.foldr = wo,
zn.head = Es,
zn.include = ho,
zn.inject = bo,
Ta(zn, function() {
var e = {};
return jr(zn, function(t, n) {
zn.prototype[n] || (e[n] = t)
}),
e
}(), !1),
zn.sample = So,
zn.prototype.sample = function(e) {
return !this.__chain__ && e == null ? So(this.value()) : this.thru(function(t) {
return So(t, e)
})
}
,
zn.VERSION = t,
or(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
zn[e].placeholder = zn
}),
or(["dropWhile", "filter", "map", "takeWhile"], function(e, t) {
var n = t != g
, r = t == v;
$n.prototype[e] = function(e, i) {
var s = this.__filtered__
, o = s && r ? new $n(this) : this.clone()
, u = o.__iteratees__ || (o.__iteratees__ = []);
return u.push({
done: !1,
count: 0,
index: 0,
iteratee: Ui(e, i, 1),
limit: -1,
type: t
}),
o.__filtered__ = s || n,
o
}
}),
or(["drop", "take"], function(e, t) {
var n = e + "While";
$n.prototype[e] = function(n) {
var r = this.__filtered__
, i = r && !t ? this.dropWhile() : this.clone();
n = n == null ? 1 : Cn(hn(n) || 0, 0);
if (r)
t ? i.__takeCount__ = kn(i.__takeCount__, n) : ks(i.__iteratees__).limit = n;
else {
var s = i.__views__ || (i.__views__ = []);
s.push({
size: n,
type: e + (i.__dir__ < 0 ? "Right" : "")
})
}
return i
}
,
$n.prototype[e + "Right"] = function(t) {
return this.reverse()[e](t).reverse()
}
,
$n.prototype[e + "RightWhile"] = function(e, t) {
return this.reverse()[n](e, t).reverse()
}
}),
or(["first", "last"], function(e, t) {
var n = "take" + (t ? "Right" : "");
$n.prototype[e] = function() {
return this[n](1).value()[0]
}
}),
or(["initial", "rest"], function(e, t) {
var n = "drop" + (t ? "" : "Right");
$n.prototype[e] = function() {
return this[n](1)
}
}),
or(["pluck", "where"], function(e, t) {
var n = t ? "filter" : "map"
, r = t ? Wr : Jr;
$n.prototype[e] = function(e) {
return this[n](r(e))
}
}),
$n.prototype.compact = function() {
return this.filter(Ea)
}
,
$n.prototype.reject = function(e, t) {
return e = Ui(e, t, 1),
this.filter(function(t) {
return !e(t)
})
}
,
$n.prototype.slice = function(e, t) {
e = e == null ? 0 : +e || 0;
var n = e < 0 ? this.takeRight(-e) : this.drop(e);
return typeof t != "undefined" && (t = +t || 0,
n = t < 0 ? n.dropRight(-t) : n.take(t - e)),
n
}
,
$n.prototype.toArray = function() {
return this.drop(0)
}
,
jr($n.prototype, function(e, t) {
var n = zn[t];
if (!n)
return;
var r = /^(?:filter|map|reject)|While$/.test(t)
, i = /^(?:first|last)$/.test(t);
zn.prototype[t] = function() {
var t = arguments
, s = t.length
, o = this.__chain__
, u = this.__wrapped__
, a = !!this.__actions__.length
, f = u instanceof $n
, l = t[0]
, c = f || ru(u);
c && r && typeof l == "function" && l.length != 1 && (f = c = !1);
var h = f && !a;
if (i && !o)
return h ? e.call(u) : n.call(zn, this.value());
var p = function(e) {
var r = [e];
return dn.apply(r, t),
n.apply(zn, r)
}
;
if (c) {
var d = h ? u : new $n(this)
, v = e.apply(d, t);
if (!i && (a || v.__actions__)) {
var m = v.__actions__ || (v.__actions__ = []);
m.push({
func: Ks,
args: [p],
thisArg: zn
})
}
return new Xn(v,o)
}
return this.thru(p)
}
}),
or(["concat", "join", "pop", "push", "replace", "shift", "sort", "splice", "split", "unshift"], function(e) {
var t = (/^(?:replace|split)$/.test(e) ? Xt : Nt)[e]
, n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru"
, r = !Vn.spliceObjects && /^(?:pop|shift|splice)$/.test(e)
, i = /^(?:join|pop|replace|shift)$/.test(e)
, s = r ? function() {
var e = t.apply(this, arguments);
return this.length === 0 && delete this[0],
e
}
: t;
zn.prototype[e] = function() {
var e = arguments;
return i && !this.__chain__ ? s.apply(this.value(), e) : this[n](function(t) {
return s.apply(t, e)
})
}
}),
jr($n.prototype, function(e, t) {
var n = zn[t];
if (n) {
var r = n.name
, i = qn[r] || (qn[r] = []);
i.push({
name: t,
func: n
})
}
}),
qn[Di(null , r).name] = [{
name: "wrapper",
func: null
}],
$n.prototype.clone = Jn,
$n.prototype.reverse = Kn,
$n.prototype.value = Qn,
zn.prototype.chain = Qs,
zn.prototype.commit = Gs,
zn.prototype.plant = Ys,
zn.prototype.reverse = Zs,
zn.prototype.toString = eo,
zn.prototype.run = zn.prototype.toJSON = zn.prototype.valueOf = zn.prototype.value = to,
zn.prototype.collect = zn.prototype.map,
zn.prototype.head = zn.prototype.first,
zn.prototype.select = zn.prototype.filter,
zn.prototype.tail = zn.prototype.rest,
zn
}
var e, t = "3.6.0", n = 1, r = 2, i = 4, s = 8, o = 16, u = 32, a = 64, f = 128, l = 256, c = 30, h = "...", p = 150, d = 16, v = 0, m = 1, g = 2, y = "Expected a function", b = "__lodash_placeholder__", w = "[object Arguments]", E = "[object Array]", S = "[object Boolean]", x = "[object Date]", T = "[object Error]", N = "[object Function]", C = "[object Map]", k = "[object Number]", L = "[object Object]", A = "[object RegExp]", O = "[object Set]", M = "[object String]", _ = "[object WeakMap]", D = "[object ArrayBuffer]", P = "[object Float32Array]", H = "[object Float64Array]", B = "[object Int8Array]", j = "[object Int16Array]", F = "[object Int32Array]", I = "[object Uint8Array]", q = "[object Uint8ClampedArray]", R = "[object Uint16Array]", U = "[object Uint32Array]", z = /\b__p \+= '';/g, W = /\b(__p \+=) '' \+/g, X = /(__e\(.*?\)|\b__t\)) \+\n'';/g, V = /&(?:amp|lt|gt|quot|#39|#96);/g, $ = /[&<>"'`]/g, J = RegExp(V.source), K = RegExp($.source), Q = /<%-([\s\S]+?)%>/g, G = /<%([\s\S]+?)%>/g, Y = /<%=([\s\S]+?)%>/g, Z = /[\u0300-\u036f\ufe20-\ufe23]/g, et = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, tt = /\w*$/, nt = /^0[xX]/, rt = /^\[object .+?Constructor\]$/, it = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g, st = /($^)/, ot = /[.*+?^${}()|[\]\/\\]/g, ut = RegExp(ot.source), at = /['\n\r\u2028\u2029\\]/g, ft = function() {
var e = "[A-Z\\xc0-\\xd6\\xd8-\\xde]"
, t = "[a-z\\xdf-\\xf6\\xf8-\\xff]+";
return RegExp(e + "+(?=" + e + t + ")|" + e + "?" + t + "|" + e + "+|[0-9]+", "g")
}(), lt = " \f \n\r\u2028\u2029 ᠎              ", ct = ["Array", "ArrayBuffer", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Math", "Number", "Object", "RegExp", "Set", "String", "_", "clearTimeout", "document", "isFinite", "parseInt", "setTimeout", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "window"], ht = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"], pt = -1, dt = {};
dt[P] = dt[H] = dt[B] = dt[j] = dt[F] = dt[I] = dt[q] = dt[R] = dt[U] = !0,
dt[w] = dt[E] = dt[D] = dt[S] = dt[x] = dt[T] = dt[N] = dt[C] = dt[k] = dt[L] = dt[A] = dt[O] = dt[M] = dt[_] = !1;
var vt = {};
vt[w] = vt[E] = vt[D] = vt[S] = vt[x] = vt[P] = vt[H] = vt[B] = vt[j] = vt[F] = vt[k] = vt[L] = vt[A] = vt[M] = vt[I] = vt[q] = vt[R] = vt[U] = !0,
vt[T] = vt[N] = vt[C] = vt[O] = vt[_] = !1;
var mt = {
leading: !1,
maxWait: 0,
trailing: !1
}
, gt = {
"À": "A",
"Á": "A",
"Â": "A",
"Ã": "A",
"Ä": "A",
"Å": "A",
"à": "a",
"á": "a",
"â": "a",
"ã": "a",
"ä": "a",
"å": "a",
"Ç": "C",
"ç": "c",
"Ð": "D",
"ð": "d",
"È": "E",
"É": "E",
"Ê": "E",
"Ë": "E",
"è": "e",
"é": "e",
"ê": "e",
"ë": "e",
"Ì": "I",
"Í": "I",
"Î": "I",
"Ï": "I",
"ì": "i",
"í": "i",
"î": "i",
"ï": "i",
"Ñ": "N",
"ñ": "n",
"Ò": "O",
"Ó": "O",
"Ô": "O",
"Õ": "O",
"Ö": "O",
"Ø": "O",
"ò": "o",
"ó": "o",
"ô": "o",
"õ": "o",
"ö": "o",
"ø": "o",
"Ù": "U",
"Ú": "U",
"Û": "U",
"Ü": "U",
"ù": "u",
"ú": "u",
"û": "u",
"ü": "u",
"Ý": "Y",
"ý": "y",
"ÿ": "y",
"Æ": "Ae",
"æ": "ae",
"Þ": "Th",
"þ": "th",
"ß": "ss"
}
, yt = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#39;",
"`": "&#96;"
}
, bt = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&#39;": "'",
"&#96;": "`"
}
, wt = {
"function": !0,
object: !0
}
, Et = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}
, St = wt[typeof exports] && exports && !exports.nodeType && exports
, xt = wt[typeof module] && module && !module.nodeType && module
, Tt = St && xt && typeof global == "object" && global
, Nt = wt[typeof self] && self && self.Object && self
, Ct = wt[typeof window] && window && window.Object && window
, kt = xt && xt.exports === St && St
, Lt = Tt || Ct !== (this && this.window) && Ct || Nt || this
, zt = function() {
try {
Object({
toString: 0
} + "")
} catch (e) {
return function() {
return !1
}
}
return function(e) {
return typeof e.toString != "function" && typeof (e + "") == "string"
}
}()
, Yt = Gt();
typeof define == "function" && typeof define.amd == "object" && define.amd ? (Lt._ = Yt,
define("lodash-compat/index", [], function() {
return Yt
})) : St && xt ? kt ? (xt.exports = Yt)._ = Yt : St._ = Yt : Lt._ = Yt
}
.call(this),
define("lodash-compat", ["lodash-compat/index"], function(e) {
return e
}),
function(e) {
typeof e == "undefined" && (e = {}),
typeof e.performance == "undefined" && (e.performance = {}),
e._perfRefForUserTimingPolyfill = e.performance,
e.performance.userTimingJsNow = !1,
e.performance.userTimingJsNowPrefixed = !1,
e.performance.userTimingJsUserTiming = !1,
e.performance.userTimingJsUserTimingPrefixed = !1,
e.performance.userTimingJsPerformanceTimeline = !1,
e.performance.userTimingJsPerformanceTimelinePrefixed = !1;
var t = [], n = [], r = null , i, s;
if (typeof e.performance.now != "function") {
e.performance.userTimingJsNow = !0,
n = ["webkitNow", "msNow", "mozNow"];
for (i = 0; i < n.length; i++)
if (typeof e.performance[n[i]] == "function") {
e.performance.now = e.performance[n[i]],
e.performance.userTimingJsNowPrefixed = !0;
break
}
var o = +(new Date);
e.performance.timing && e.performance.timing.navigationStart && (o = e.performance.timing.navigationStart),
typeof e.performance.now != "function" && (Date.now ? e.performance.now = function() {
return Date.now() - o
}
: e.performance.now = function() {
return +(new Date) - o
}
)
}
var u = function() {}
, a = function() {}
, f = []
, l = !1
, c = !1;
if (typeof e.performance.getEntries != "function" || typeof e.performance.mark != "function") {
typeof e.performance.getEntries == "function" && typeof e.performance.mark != "function" && (c = !0),
e.performance.userTimingJsPerformanceTimeline = !0,
t = ["webkit", "moz"],
n = ["getEntries", "getEntriesByName", "getEntriesByType"];
for (i = 0; i < n.length; i++)
for (s = 0; s < t.length; s++)
r = t[s] + n[i].substr(0, 1).toUpperCase() + n[i].substr(1),
typeof e.performance[r] == "function" && (e.performance[n[i]] = e.performance[r],
e.performance.userTimingJsPerformanceTimelinePrefixed = !0);
u = function(e) {
f.push(e),
e.entryType === "measure" && (l = !0)
}
;
var h = function() {
if (!l)
return;
f.sort(function(e, t) {
return e.startTime - t.startTime
}),
l = !1
}
;
a = function(e, t) {
i = 0;
while (i < f.length) {
if (f[i].entryType !== e) {
i++;
continue
}
if (typeof t != "undefined" && f[i].name !== t) {
i++;
continue
}
f.splice(i, 1)
}
}
;
if (typeof e.performance.getEntries != "function" || c) {
var p = e.performance.getEntries;
e.performance.getEntries = function() {
h();
var t = f.slice(0);
return c && p && (Array.prototype.push.apply(t, p.call(e.performance)),
t.sort(function(e, t) {
return e.startTime - t.startTime
})),
t
}
}
if (typeof e.performance.getEntriesByType != "function" || c) {
var d = e.performance.getEntriesByType;
e.performance.getEntriesByType = function(t) {
if (typeof t == "undefined" || t !== "mark" && t !== "measure")
return c && d ? d.call(e.performance, t) : [];
t === "measure" && h();
var n = [];
for (i = 0; i < f.length; i++)
f[i].entryType === t && n.push(f[i]);
return n
}
}
if (typeof e.performance.getEntriesByName != "function" || c) {
var v = e.performance.getEntriesByName;
e.performance.getEntriesByName = function(t, n) {
if (n && n !== "mark" && n !== "measure")
return c && v ? v.call(e.performance, t, n) : [];
typeof n != "undefined" && n === "measure" && h();
var r = [];
for (i = 0; i < f.length; i++) {
if (typeof n != "undefined" && f[i].entryType !== n)
continue;f[i].name === t && r.push(f[i])
}
return c && v && (Array.prototype.push.apply(r, v.call(e.performance, t, n)),
r.sort(function(e, t) {
return e.startTime - t.startTime
})),
r
}
}
}
if (typeof e.performance.mark != "function") {
e.performance.userTimingJsUserTiming = !0,
t = ["webkit", "moz", "ms"],
n = ["mark", "measure", "clearMarks", "clearMeasures"];
for (i = 0; i < n.length; i++)
for (s = 0; s < t.length; s++)
r = t[s] + n[i].substr(0, 1).toUpperCase() + n[i].substr(1),
typeof e.performance[r] == "function" && (e.performance[n[i]] = e.performance[r],
e.performance.userTimingJsUserTimingPrefixed = !0);
var m = {};
typeof e.performance.mark != "function" && (e.performance.mark = function(t) {
var n = e.performance.now();
if (typeof t == "undefined")
throw new SyntaxError("Mark name must be specified");
if (e.performance.timing && t in e.performance.timing)
throw new SyntaxError("Mark name is not allowed");
m[t] || (m[t] = []),
m[t].push(n),
u({
entryType: "mark",
name: t,
startTime: n,
duration: 0
})
}
),
typeof e.performance.clearMarks != "function" && (e.performance.clearMarks = function(e) {
e ? m[e] = [] : m = {},
a("mark", e)
}
),
typeof e.performance.measure != "function" && (e.performance.measure = function(t, n, r) {
var i = e.performance.now();
if (typeof t == "undefined")
throw new SyntaxError("Measure must be specified");
if (!n) {
u({
entryType: "measure",
name: t,
startTime: 0,
duration: i
});
return
}
var s = 0;
if (e.performance.timing && n in e.performance.timing) {
if (n !== "navigationStart" && e.performance.timing[n] === 0)
throw new Error(n + " has a timing of 0");
s = e.performance.timing[n] - e.performance.timing.navigationStart
} else {
if (!(n in m))
throw new Error(n + " mark not found");
s = m[n][m[n].length - 1]
}
var o = i;
if (r) {
o = 0;
if (e.performance.timing && r in e.performance.timing) {
if (r !== "navigationStart" && e.performance.timing[r] === 0)
throw new Error(r + " has a timing of 0");
o = e.performance.timing[r] - e.performance.timing.navigationStart
} else {
if (!(r in m))
throw new Error(r + " mark not found");
o = m[r][m[r].length - 1]
}
}
var a = o - s;
u({
entryType: "measure",
name: t,
startTime: s,
duration: a
})
}
),
typeof e.performance.clearMeasures != "function" && (e.performance.clearMeasures = function(e) {
a("measure", e)
}
)
}
typeof define != "undefined" && define.amd ? define("usertiming/src/usertiming", [], function() {
return e.performance
}) : typeof module != "undefined" && typeof module.exports != "undefined" && (module.exports = e.performance)
}(typeof window != "undefined" ? window : undefined),
define("usertiming", ["usertiming/src/usertiming"], function(e) {
return e
}),
define("browser/window", [], function() {
return window
}),
define("utils/common/version", ["require", "exports", "module"], function(e, t) {
function n(e) {
function i() {
if (!e) {
t = [n, n],
r = !1;
return
}
var i = o();
i ? (t = e.split(i),
s()) : (t = [e, n],
r = !1)
}
function s() {
var e = 0;
for (e = 0; e < t.length; ++e)
if (!t[e] || isNaN(t[e])) {
t.push(n),
r = !1;
break
}
}
function o() {
return e.indexOf(".") > -1 ? "." : e.indexOf("_") > -1 ? "_" : null
}
var t, n = "U", r = !0;
i(),
this.getMajor = function() {
return t[0]
}
,
this.getMinor = function() {
return t[1]
}
,
this.getAllComponents = function() {
return t
}
,
this.getOriginalString = function() {
return e
}
,
this.isValid = function() {
return r
}
,
this.compareTo = function(e) {
var n = 0
, r = 0
, i = 0
, s = e.getAllComponents();
if (!this.isValid() || !e.isValid())
throw new Error("Invalid version cannot be compared");
for (n = 0; n < s.length; ++n) {
r = parseInt(t[n], 10),
i = parseInt(s[n], 10);
if (!r || r < i)
return -1;
if (r > i)
return 1
}
return 0
}
}
t.parse = function(e) {
return new n(e)
}
}),
define("browser/detect", ["require", "browser/window", "utils/common/version"], function(e) {
function h() {
return t.navigator.userAgent
}
function p(e) {
return h().indexOf(e) > -1
}
function d() {
return p("Trident")
}
function v() {
return p(r.EDGE)
}
function m() {
return p("OPR/")
}
function g() {
return m() ? r.UNKNOWN : p(r.PHANTOMJS) ? r.PHANTOMJS : v() ? r.EDGE : p(r.ELECTRON) ? r.ELECTRON : p(r.CHROME) ? r.CHROME : p(r.FIREFOX) ? r.FIREFOX : p(r.SAFARI) ? r.SAFARI : p(r.SKYPE_SHELL) ? r.SKYPE_SHELL : d() ? r.MSIE : r.UNKNOWN
}
function y() {
function e() {
var e, t = h(), n = t.match(new RegExp(r.MSIE + " " + l));
if (n)
return n[1];
e = t.match(new RegExp("rv:" + l));
if (e)
return e[1]
}
function t(e) {
var t;
return e === r.SAFARI && (e = "Version"),
t = h().match(new RegExp(e + "/" + l)),
t ? t[1] : a
}
return d() ? e() : t(g())
}
function b() {
var e = /(android|ipod|windows phone|wpdesktop|windows ce|blackberry\w*|meego|webos|palm|symbian|pda|\w*?mobile\w*?|\w*?phone\w*?)/i
, t = /tablet|ipad/i;
return h().match(e) ? s.MOBILE : h().match(t) ? s.TABLET : s.DESKTOP
}
function w() {
var e = /(windows|win32)/i
, t = / arm;/i
, n = /windows\sphone\s\d+\.\d+/i
, r = /(macintosh|mac os x)/i
, s = /(iPad|iPhone|iPod)(?=.*like Mac OS X)/i
, o = /(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|cros)/i
, u = /android/i;
return h().match(n) ? i.WINDOWS_PHONE : h().match(t) ? i.WINDOWS_RT : h().match(s) ? i.IOS : h().match(u) ? i.ANDROID : h().match(o) ? i.LINUX : h().match(r) ? i.MACOSX : h().match(e) ? i.WINDOWS : i.UNKNOWN
}
function E() {
function e() {
var e = h().match(new RegExp("Windows NT " + l));
return e && o[e[1]] ? o[e[1]] : a
}
function t() {
var e = h().match(new RegExp(i.MACOSX + " " + c));
return e ? n.parse(e[1].replace(/_/g, ".")).getMajor() : a
}
return w() === i.WINDOWS ? e() : w() === i.MACOSX ? t() : a
}
function S() {
return p("WOW64") || p("Win64")
}
function x() {
return {
width: t.screen && t.screen.width || 0,
height: t.screen && t.screen.height || 0,
pixelRatio: t.devicePixelRatio || 0,
colorDepth: t.screen && t.screen.colorDepth || 0,
isTouchEnabled: Object.prototype.hasOwnProperty.call(t, "ontouchstart") || t.navigator.MaxTouchPoints > 0 || t.navigator.msMaxTouchPoints > 0
}
}
function T() {
return {
deviceType: b(),
osName: w(),
osVersion: E(),
is64bit: S(),
platform: t.navigator.platform
}
}
function N() {
return g() === r.MSIE && C() ? t.external.msIsSiteMode() : "n/a"
}
function C() {
return t.hasOwnProperty("external") && t.external.hasOwnProperty("msIsSiteMode")
}
function k() {
return g() === r.SKYPE_SHELL
}
function L() {
return g() === r.ELECTRON
}
function A() {
return (t.navigator.getUserMedia || t.navigator.mozGetUserMedia || t.navigator.webkitGetUserMedia) && (typeof t.RTCPeerConnection != "undefined" || typeof t.RTCIceGatherer != "undefined" || typeof t.mozRTCPeerConnection != "undefined" || typeof t.webkitRTCPeerConnection != "undefined")
}
function O() {
return A()
}
function M() {
return g() === r.EDGE || g() === r.PHANTOMJS ? !1 : g() === r.CHROME && P() >= f ? !1 : !0
}
function _() {
var e = g();
return e === r.FIREFOX || e === r.CHROME
}
function P() {
var e = n.parse(y()).getMajor();
return isNaN(e) ? e : parseInt(e)
}
function H(e) {
return e in t.document.documentElement.style
}
var t = e("browser/window")
, n = e("utils/common/version")
, r = {
MSIE: "MSIE",
CHROME: "Chrome",
FIREFOX: "Firefox",
SAFARI: "Safari",
EDGE: "Edge",
ELECTRON: "Electron",
SKYPE_SHELL: "SkypeShell",
PHANTOMJS: "PhantomJS",
UNKNOWN: "Unknown"
}
, i = {
WINDOWS: "Windows",
MACOSX: "Mac OS X",
WINDOWS_PHONE: "Windows Phone",
WINDOWS_RT: "Windows RT",
IOS: "iOS",
ANDROID: "Android",
LINUX: "Linux",
UNKNOWN: "Unknown"
}
, s = {
DESKTOP: 1,
MOBILE: 2,
TABLET: 8
}
, o = {
5.1: "XP",
"6.0": "Vista",
6.1: "7",
6.2: "8",
6.3: "8.1",
"10.0": "10"
}
, u = {
OBJECT_FIT: "objectFit"
}
, a = "U"
, f = "42"
, l = "([\\d,.]+)"
, c = "([\\d,_,.]+)"
, D = function() {
var e = {};
if (!t.location.search)
return e;
var n = t.location.search.substring(1).split("&");
if (!n)
return e;
for (var r = 0; r < n.length; r++) {
var i = n[r].split("=");
if (!i[1])
continue;e[i[0]] = i[1] || !0
}
return e
}
;
return {
getBrowserInfo: function() {
return {
browserName: g(),
browserVersion: y(),
browserMajorVersion: P(),
isPinnedSite: N(),
isIeEngine: d(),
isEdge: v(),
isShellApp: k(),
isElectron: L(),
isInBrowserPluginSupported: M(),
isPluginlessCallingSupported: O(),
isBrowserDefaultToBlockPlugin: _(),
getUrlParams: D,
getUserAgent: h
}
},
getScreenInfo: x,
getSystemInfo: T,
supportsCssProperty: H,
supportsPinnedSites: C,
BROWSERS: r,
OPERATING_SYSTEMS: i,
DEVICE_TYPES: s,
CSS_PROPERTIES: u
}
}),
define("constants/common", {
storageKeys: {
ENDPOINT_ID: "endpointId",
PRESENCE_DATA: "presenceData",
RESURECTION_KEY: "isResurected",
RECENT_COUNTRY: "swx|recentCountry"
},
browserProperties: {
DEFAULT: {
HIDDEN: "hidden",
VISIBILITY_CHANGE: "visibilitychange"
},
MS: {
HIDDEN: "msHidden",
VISIBILITY_CHANGE: "msvisibilitychange"
},
MOZ: {
HIDDEN: "mozHidden",
VISIBILITY_CHANGE: "mozvisibilitychange"
},
WEBKIT: {
HIDDEN: "webkitHidden",
VISIBILITY_CHANGE: "webkitvisibilitychange"
}
},
permission: {
DEFAULT: "default",
GRANTED: "granted",
DENIED: "denied"
},
events: {
actions: {
subscriptionCreation: "subscriptioncreation",
getUserPresence: "getuserpresence",
setUserPresence: "setuserpresence",
getSelfProperties: "getselfproperties",
messageSubmitted: "messagesubmitted"
},
auth: {
SIGNIN_FAILED: "signInFailed",
SIGN_OUT: "signOut"
},
callScreen: {
CONTROLS_VISIBLE: "controlsVisible",
VIDEO_STATE_CHANGED: "videoStateChanged",
VIDEO_SIZE_CHANGED: "videoSizeChanged",
SIDEBAR_TOGGLED: "sidebarToggled",
VIDEO_ZOOMED_IN: "videoZoomedIn",
TOGGLE_FULLSCREEN: "toggleFullscreen",
TOGGLE_NARROW_MENU: "toggleNarrowMenu",
BUTTON_FOCUSED: "buttonFocused",
BUTTONS_WIDTH_CHANGED: "buttonsWidthChanged",
ROSTER_WIDTH_CHANGED: "rosterWidthChanged",
ADD_PARTICIPANT: "addParticipant",
ADD_PARTICIPANT_VISIBLE: "addParticipantVisible",
CALL_ESCALATED_TO_GROUP: "callEscalatedToGroup"
},
contacts: {
CONTACTS_LOADED: "contactsLoaded",
CONTACT_REQUEST_SENT: "contactRequestSent",
CONTACT_REQUEST_ACCEPTED: "contactRequestAccepted",
CONTACT_REQUEST_DECLINED: "contactRequestDeclined"
},
message: {
RENDERED: "message:rendered",
QUOTE: "message:quote",
EDIT: "message:edit",
AFTER_EXPANDED: "message:afterExpanded",
BEFORE_EXPANDED: "message:beforeExpanded"
},
resourceTypes: {
userPresence: "userpresence"
},
navigation: {
OPEN_CONVERSATION: "navigate:conversation",
NAVIGATE: "navigate:navigate",
NAVIGATE_TO_PREVIOUS_PAGE: "navigate:previousPage",
COMPONENT_RENDERED: "component:rendered",
FRAGMENT_SHOW: "fragment:show",
FRAGMENT_HIDE: "fragment:hide",
FRAGMENT_BEFORE_SHOW: "fragment:beforeShow",
FRAGMENT_BEFORE_HIDE: "fragment:beforeHide",
FRAGMENT_LOADED: "fragment:loaded",
FRAGMENT_REMOVE: "fragment:remove",
FRAGMENT_REMOVE_ALL_HIDDEN: "fragment:removeAllHidden",
LEAVE_EDIT_MODE: "leave:edit:mode",
NOTIFICATIONS_CENTER: "navigate:notificationsCenter"
},
search: {
QUERY_CHANGED: "search",
QUERY_EXECUTED: "searchFinished",
RESET: "reset",
DIRECTORY_SEARCH_RESULTS: "search:directory:results",
DIRECTORY_SEARCH_RESULTS_RENDERED: "search:directory:results:rendered",
DIRECTORY_SEARCH_ACTIVATED: "search:directory:activated",
DIRECTORY_SEARCH_DEACTIVATED: "search:directory:deactivated",
GROUPS_SEARCH_RESULTS: "search:groups:results",
LOCAL_SEARCH_RESULTS: "search:local:results",
LOCAL_SEARCH_RESULTS_RENDERED: "search:local:results:rendered",
INPUT_FOCUS: "searchInput:focus",
INPUT_BLUR: "searchInput:blur"
},
roster: {
ROSTER_QUERY_CHANGED: "roster:participants:search",
ROSTER_QUERY_EXECUTED: "roster:participants:searchFinished",
ROSTER_SELECTION_REMOVED: "roster:selection:removed",
PICKER_CONTACT_SELECTED: "people:picker:selected",
PICKER_CONTACT_DESELECTED: "people:picker:deselected",
EDIT_ROSTER_MODE: "roster:editRosterMode"
},
conversation: {
JOINING_ENABLED: "conversation:joining:enabled",
OPEN_PROFILE: "conversation:open:profile",
CLOSE_PROFILE: "conversation:close:profile",
COPY_LINK: "conversation:copy:link",
EMAIL_LINK: "conversation:mail:link",
SHARED: "conversation:shared",
MARK_AS_READ: "conversation:mark:read",
VIEWPORT_CHANGED: "conversation:viewport:changed",
OVERLAY_CLOSED: "conversation:overlay:closed"
},
expressionPicker: {
ITEM_PREVIEW_REQUEST: "pes:picker:previewRequest",
ITEM_SELECT_REQUEST: "pes:picker:selectRequest",
ITEM_SEND_REQUEST: "pes:picker:sendRequest",
ITEM_CANCEL_REQUEST: "pes:picker:cancelRequest",
TAB_SELECT_REQUEST: "pes:tabs:selectRequest",
CLOSE_REQUEST: "pes:picker:close",
OPEN_REQUEST: "pes:picker:open",
MRUITEM_ADD_REQUEST: "pes:mruitem:addRequest",
MRUITEM_ADD_EMOTICON_REQUEST: "pes:mruitem:addEmoticonRequest"
},
textarea: {
SUBMIT_AND_FOCUS: "textarea:submitAndFocus",
CHANGED: "textarea:changed",
KEY_DOWN: "textarea:keyDown",
KEY_PRESS: "textarea:keyPress",
INPUT: "textarea:input",
HAS_INPUT: "textarea:hasInput",
INITIALIZATION_COMPLETE: "textarea:initializationComplete"
},
chatInput: {
INITIALIZATION_COMPLETE: "chatInput:initializationComplete"
},
emoticonPicker: {
EMOTICON_SELECTED: "emoticon:selected",
CLOSE: "emoticon:close"
},
errors: {
SERVICE_FAILURE: "serviceFailure"
},
system: {
EXPERIENCE_INITIALIZED: "experienceInitialized",
EXPERIENCE_READY: "experienceReady",
BUTTON_CLICK: "buttonClick",
FORCE_RESYNC: "webapi:forceResync",
ONLINE_STATE_CHANGED: "webapi:onlineStateChanged",
DATE_CHANGED: "dateChanged"
},
trouter: {
CONTACTLIST_CHANGE: 6,
OFFLINE_AUTHREQUEST: 14,
INCOMING_CALL: 100,
INCOMING_SKYPE_NGC_CALL: 107,
INCOMING_SKYPE_NGC_GVC_CALL: 109,
INCOMING_LYNC_NGC_CALL: 105,
INCOMING_STOP_RINGER: 104,
INCOMING_SKYPE_NGC_STOP_RINGER: 110,
USER_SERVICES_CHANGE: 601
},
newConversation: {
CONFIRMED: "newConversation:confirmed",
CANCELLED: "newConversation:cancelled"
},
narrowMode: {
SIDEBAR_STATE_CHANGED: "narrowMode:sidebarStateChanged",
SHOW_SIDEBAR: "narrowMode:showSidebar",
HIDE_SIDEBAR: "narrowMode:hideSidebar",
SIDEBAR_TRANSITION_ENDED: "narrowMode:sidebarTransitionEnded"
},
interaction: {
SCROLL_START: "interaction:scrollStart"
},
browser: {
CLICK: "click",
RESIZE: "resize",
SCROLL: "scroll",
FOCUS: "focus",
BLUR: "blur",
KEYDOWN: "keydown",
MOUSEMOVE: "mousemove",
MOUSEDOWN: "mousedown",
BEFOREUNLOAD: "beforeunload",
VISIBILITYCHANGE: "visibilitychange",
TRANSITIONEND: "transitionend",
MESSAGE: "message",
CONTEXTMENU: "contextmenu"
},
personalExpression: {
CONFIG_INITIALIZED: "pes:configInitialized",
CONFIG_PROCESSED: "pes:configProcessed",
CDN_TOKEN_UPDATED: "pes:cdnTokenUpdated",
store: {
LOAD_PACKS: "pesStore:loadPacks",
PACK_PURCHASED: "pesStore:packPurchased"
}
},
mediaPicker: {
CLOSE_PICKER: "mediaPicker:closePicker",
FILE_PICKER_SELECTED: "mediaPicker:filePickerSelected",
SEND_CONTACTS_SELECTED: "mediaPicker:sendContactsSelected",
POLL_BUTTON_SELECTED: "mediaPicker:pollButtonSelected"
},
shareControl: {
SHARE_CONTROL_SHOW: "shareControl:show",
SHARE_CONTROL_HIDE: "shareControl:hide"
},
skypeOut: {
DIAL_BUTTON_CLICKED: "skypeOut:dialButtonClicked",
INPUT_CHANGED: "skypeOut:inputChanged",
INPUT_TYPE_TOUCH: "touch",
INPUT_TYPE_MOUSE: "mouse",
INPUT_TYPE_KEYBOARD: "keyboard"
},
selectBox: {
TOGGLE: "selectBox:toggle"
},
userListPopup: {
POPUP_TOGGLE: "userListPopup:toggle"
},
videoPlayer: {
FULLSCREEN_ON: "videoPlayer:fullscreenOn",
FULLSCREEN_OFF: "videoPlayer:fullscreenOff"
},
me: {
PRESENCE_POPUP_SHOW: "presencePopup:show"
}
},
styleMode: {
breakpoint: {
NARROW: 420,
MEDIUM: 600,
WIDE: 800
},
NARROW: "style:narrow",
MEDIUM: "style:medium",
WIDE: "style:wide"
},
notifications: {
ERROR: "shellError",
SUCCESS: "shellSuccess",
WARNING: "shellWarning",
INCOMING_CALL: "incomingCall",
INCOMING_CALL_WITH_NO_PLUGIN: "incomingCallWithNoPlugin",
INCOMING_CALL_BROWSER_NOT_SUPPORTED: "incomingCallBrowserNotSupported",
INCOMING_CALL_OS_NOT_SUPPORTED: "incomingCallOsrNotSupported",
DEVICE_MISSING_CAMERA: "cameraMissing",
DEVICE_MISSING_MICROPHONE: "microphoneMissing",
DEVICE_MISSING_SPEAKER: "speakerMissing",
UNREAD_MESSAGE: "UnreadMessage",
CONTACT_REQUEST: "ContactRequest",
CHAT: "Chat",
AUDIO: "Audio",
AUDIO_CALL: "AudioCall",
AVATAR_NOT_SUPPORTED_IMAGE_TYPE: "AvatarNotSupportedImageType",
AVATAR_UPLOAD_ERROR: "AvatarUploadError"
},
serviceLocator: {
FEATURE_FLAGS: "featureFlagApi",
CONTROLS_BUILDER: "controlsBuilder",
NAVIGATION_CONTEXT: "navigation",
PUBSUB: "pubSub",
MODEL_UI_OBSERVER: "webClientModelObserver",
SPLASH_SCREEN: "spashScreen",
SUBSCRIPTION_PROVIDER: "subscriptionProvider",
ACTION_TELEMETRY: "actionTelemetry",
PES_MRU_SERVICE: "pesMRUService",
PES_BING_SEARCH_SERVICE: "pesBingSearchService",
URL_PREVIEW_SERVICE: "urlPreviewService",
PES_CONFIG_SERVICE: "pesConfigService",
PES_2_CONFIG_SERVICE: "pesConfigService:v2",
PES_2_MRU_SERVICE: "pesMRUService:v2",
PES_STORE_SERVICE: "pesStoreService",
PROGRESSIVE_TIMEOUT: "progressiveTimeout"
},
userOptions: {
pluginAutoUpdateOptOutOption: "OPT_WEB_OPTOUT_AUTOUPDATE"
},
msnpErrors: {
nonExistingConverstion: 730,
redirectionOverride: 752,
missingEndpoint: 729
},
callingErrors: {
AUTO_CALL_FAILED: "AUTO_CALL_FAILED"
},
httpStatusCodes: {
OK: 200,
created: 201,
badRequest: 400,
unauthorized: 401,
notFound: 404,
forbidden: 403,
preconditionFailed: 412,
unprocessableEntity: 422,
internalServerError: 500
},
onlineStates: {
ONLINE: "state:online",
OFFLINE: "state:offline"
},
translatorServiceState: {
NotReady: "NotReady",
Authenticated: "Authenticated",
Error: "Error"
},
isTyping: {
THROTTLE: 5e3,
EXPIRY: 7e3,
DETAILED_PARTICIPANTS_MAX_COUNT: 2,
MESSAGE_TYPE: {
SET_TYPING: "Control/Typing",
CLEAR_TYPING: "Control/ClearTyping"
}
},
activityItemGroups: {
PARTICIPANT: "participant",
TEXT: "text",
CALL: "live-session",
NGC_UPGRADE: "ngc-upgrade",
PLUGIN_FREE: "plugin-free",
MEDIA: "media",
CONTACT_REQUEST: "contact-request",
MOJI: "moji",
CONTACT_INFO: "contact-info",
TRANSACTION: "transaction",
POLL: "poll",
PSTN: "pstn",
CUSTOM: "custom"
},
customActivityItemTemplates: {
SPACES_WELCOME_MESSAGE: "spacesWelcomeMessage"
},
featureFlags: {
AGENTS_ENABLED: "agentsEnabled",
AGENTS_DISCOVERABLE: "agentsDiscoverable",
SHOW_AGENT_RATING_ON_PROFILE: "showAgentRatingOnProfile",
URL_OVERRIDE_ENABLED: "urlOverrideEnabled",
CONTACTLIST_CHANGE_NOTIFICATION: "contactListChangeNotification",
SHOW_SPLASH_SCREEN: "showSplashScreen",
BLOCK_CONTACT: "blockContact",
DEACTIVATE_CACHE: "deactivateCache",
HAS_TIMELINE_BADGE: "hasTimelineBadge",
HAS_BETA_LABEL: "hasBetaLabel",
HAS_FEEDBACK_LINK: "hasFeedbackLink",
HAS_FEEDBACK_LINK_ON_ERROR: "hasFeedbackLinkOnError",
HAS_FEEDBACK_ICON: "hasFeedbackIcon",
DISABLE_KES: "disableKes",
SKYPE_DIRECTORY_SEARCH: "skypeDirectorySearch",
MUTE_NOTIFICATIONS: "muteNotifications",
LAST_SEEN: "lastSeen",
MOBILE_INDICATOR: "mobileIndicator",
MOBILE_ACTIVE: "mobileActive",
NEW_CONVERSATION_V2: "newConversationV2",
SPACES: "spaces",
SHOW_SPACES_WELCOME_MESSAGE: "showSpacesWelcomeMessage",
SHOW_CONTACTS_PAGE_HINT: "showContactsPageHint",
SHOW_CONTACTS_PAGE_INFORMATIONAL_MESSAGE: "showContactsPageInformationalMessage",
INCOMING_SCREEN_SHARING: "incomingScreenSharing",
INCOMING_WIKI_MARKUP: "incomingWikiMarkup",
MESSAGE_ENFORCE_TEXT_FORMAT: "messageEnforceTextFormat",
PHOTO_SHARING_ENABLED: "photoSharingEnabled",
DELETE_CONTACT_USING_CONTACTS_SERVICE: "deleteContactUsingContactsService",
SPACE_TOPIC_EDITOR: "spaceTopicEditor",
HEADER_CONTROLS_DISABLED: "headerControlsDisabled",
HIDE_SIDEBAR_ON_START: "hideSidebarOnStart",
SINGLE_CONVERSATION_MODE: "singleConversationMode",
DISABLE_POLLING_ON_KAHUNA: "disablePollingOnKahuna",
ENABLE_RAW_EMOTICONS_RENDERING: "enableRawEmoticonsRendering",
CONTENT_SEARCH: "contentSearch",
SWIFT_CARD_COMMAND: "swiftCardCommand",
SWIFT_CARD_RENDERING: "swiftCardRendering",
UNREAD_MSG_LOGGING: "enableUnreadMessagesLogging",
SEND_SKYPE_INITIATING_USERNAME: "sendSkypeInitiatingUsername",
SHOW_MESSAGE_DELIVERY_INDICATOR_SW4B: "showMessageDeliveryIndicator",
SHOW_MESSAGE_DELIVERY_STATUS: "showMessageDeliveryStatus",
HIDE_EMOTICON_PICKER_BUTTON: "hideEmoticonPickerButton",
IS_TYPING_INDICATOR: "isTypingIndicator",
SERVICE_FAILURE_REPORTING: "serviceFailureReporting",
CALLING: "calling",
INCLUDE_SELF_IN_PARTICIPANTS_COUNT: "includeSelfInParticipantsCount",
HIDE_USER_ROLE: "hideUserRole",
SHOW_ALTERNATE_SHARE_DIALOG_EXPERIENCE: "showAlternateShareDialogExperience",
IS_FLIK_MESSAGE_ENABLED: "isFlikMessageEnabled",
PES_CDN_AUTH_ENABLED: "pesCDNAuthEnabled",
PINNING_TO_DOGFOOD_CLOUD: "pinningToDogfoodCloud",
NOTIFICATIONS_CENTER: "notificationsCenter",
POLLS_ENABLED: "pollsEnabled",
SUPPORT_MESSAGE_PROPERTIES: "supportMessageProperties",
ENABLE_PING_ECS_CONFIG: "enablePingEcsConfig",
ENABLE_ENDPOINT_ECS_CONFIG: "enableEndpointEcsConfig",
SUPPORT_STANDBY_MODE: "supportStandbyMode",
MENTIONS_ENABLED: "mentionsEnabled",
ALTERNATIVE_SIDEBAR_LAYOUT_ENABLED: "alternativeSidebarLayout",
CONTEXT_MENU_QUOTE_MESSAGES_ENABLED: "contextMenuQuoteMessagesEnabled",
CONTEXT_MENU_SAVE_VIDEO_MESSAGES_ENABLED: "contextMenuSaveVideoMessagesEnabled",
SHOW_CONTACTS_PAGE_SIGN_IN: "showContactsPageSignIn",
HIDE_CONVERSATION_HEADER: "hideConversationHeader",
SKIP_CHAT_CAPABILITY_CHECK: "skipChatCapabilityCheck",
DISABLE_PERSISTENT_CONTACT_PRESENCE_SUBSCRIPTION: "disablePersistentContactPresenceSubscription",
ENABLE_CONTACT_MANAGEMENT: "enableContactManagement",
URL_PREVIEWS: "urlPreviews",
SILENT_LINKING: "silentLinking",
REMOVE_CONVERSATION_HISTORY: "removeConversationHistory",
PES_CDN_AUTH_URL_FALLBACK_ENABLED: "pesCDNAuthUrlFallbackEnabled",
PES_FETCH_SMALL_ASSETS_ON_DEMAND: "pesFetchSmallAssetsOnDemand",
PES_FETCH_MEDIUM_ASSETS_ON_DEMAND: "pesFetchMediumAssetsOnDemand",
PES_FETCH_LARGE_ASSETS_ON_DEMAND: "pesFetchLargeAssetsOnDemand",
PES_FETCH_MOJI_ASSETS_ON_DEMAND: "pesFetchMojiAssetsOnDemand",
PES_USE_EXTRA_LARGE_EMOTICONS: "pesUseExtraLargeEmoticons",
PES_BING_IMAGE_SEARCH_ENABLED: "pesBingImageSearchEnabled",
PES_LOCAL_SEARCH_ENABLED: "pesLocalSearchEnabled",
PES_V2_ENABLED: "pesV2Enabled",
EMOTICON_SUGGESTION_ENABLED: "emoticonSuggestionEnabled",
EMOTICON_IMPLICIT_SUGGESTION_DISABLED: "emoticonImplicitSuggestionDisabled",
SUGGEST_HIDDEN_EMOTICONS: "suggestHiddenEmoticons",
PES_STORE_ENABLED: "pesStoreEnabled",
YOUTUBE_PLAYER_ENABLED: "youtubePlayer",
FILE_DRAG_DROP_ENABLED: "fileDragDropEnabled",
FILE_PASTE_ENABLED: "filePasteEnabled",
USE_BUSINESS_WORDING: "useBusinessWording",
FILE_TRANSFER_ENABLED: "fileTransferEnabled",
CONTEXT_MENU_LIKE_MESSAGES_ENABLED: "contextMenuLikeMessagesEnabled",
SHOW_DEFAULT_AVATAR_IN_NOTIFICATIONS: "showDefaultAvatarInNotifications",
MEDIA_BAR_ENABLED: "mediaBarEnabled",
SHOW_SEARCH_QUERY_MORE_RESULTS_AVAILABLE: "showSearchQueryMoreResultsAvailable",
PSTN_ENABLED: "PSTN",
CQF_ENABLED: "CQF",
CONSOLE_LOGGING: "consoleLogging",
ISSUE_REPORTING: "issueReporting",
CALL_INFO_COMMAND: "callInfoCommand",
ERROR_LOG_REPORTING: "errorLogReporting",
AGGRESSIVE_IMPLICT_MENTIONS_MATCHING: "aggressiveImplicitMentionsMatching",
ENABLE_AGGRESSIVE_MENTIONS_TOAST: "enableAggressiveMentionsToast",
SEND_CONTACT_CARD_ENABLED: "sendContactCardEnabled",
NOTIFY_HOST_EVEN_WHEN_ME_NOTAVAILABLE: "notifyHostEvenWhenMeNotAvailable",
HEARTS_ENABLED: "heartsEnabled",
HEARTS_NOTIFICATION_ENABLED: "heartsNotificationEnabled",
TRANSLATOR_SENDING_ENABLED: "translatorSendingEnabled",
RE_AUTH_ENABLED: "reAuthEnabled",
CONTACT_CARD_RENDERING_ENABLED: "contactCardRenderingEnabled",
NEW_URLP_DOMAIN_ENABLED: "newUrlPreviewDomainEnabled",
IS_CLOUD_VIDEO_MESSAGE_ENABLED: "isCloudVideoMessageEnabled",
CREDIT_GIFTING: "creditGifting",
AUTO_CALLING: "autoCalling",
GVC_ESCALATION: "GVCEscalation",
GVC_LOCAL_ESCALATION: "GVCLocalEscalation",
GVC_JOINING: "GVCJoining",
GVC_OUTGOING: "GVCOutgoing",
PERSISTENT_PLUGIN: "persistentPlugin",
PERSISTENT_SHELL_APP: "persistentShellApp",
PLUGINLESS_CALLING_CHROME: "pluginlessCallingChrome",
PLUGINLESS_CALLING_CHROME_LINUX: "pluginlessCallingChromeLinux",
PLUGINLESS_CALLING_EDGE: "pluginlessCallingEdge",
PLUGINLESS_CALLING_FIREFOX: "pluginlessCallingFirefox",
PLUGINLESS_CALLING_ELECTRON: "pluginlessCallingElectron",
PRELOAD_PLUGIN: "preloadPlugin",
PRELOAD_SHELL_APP: "preloadShellApp",
NG_CALLING: "NGCalling",
FAIL_INITIALIZATION_FOR_IE_AND_EDGE: "failInitializationOnIE",
SHELL_APP_LOGS: "shellAppLogs",
INVITE_FREE: "inviteFree",
INVITE_FREE_IMPLICIT_INCOMING_CONTACT_REQUEST: "inviteFreeImplicitIncomingContactRequest",
SHORT_CIRCUIT: "shortCircuit",
USER_SETTINGS_ENABLED: "userSettingsEnabled",
SHOW_UNLISTED_SETTINGS: "showUnlistedSettings",
LOCATION_MESSAGE_SUPPORT: "locationMessageSupport",
READ_RECEIPT_ENABLED: "readReceiptEnabled",
URL_PREVIEW_LOAD_YOUTUBE_PLAYER: "urlPreviewLoadYoutubePlayer",
SEARCH_EDUCATION_BUBBLE: "searchEducationBubble",
CHAT_EDUCATION_BUBBLE: "chatEducationBubble",
CALL_EDUCATION_BUBBLE: "callEducationBubble",
SCHEDULE_CALL_EDUCATION_BUBBLE_1: "scheduleCallEducationBubble1",
SCHEDULE_CALL_EDUCATION_BUBBLE_2: "scheduleCallEducationBubble2",
WELCOME_DIALOG: "welcomeDialog",
TELEMETRY_SEARCH_ENABLED: "telemetrySearchEnabled",
TELEMETRY_UIACTIONPERF_ENABLED: "uiActionPerfTelemetryEnabled",
TELEMETRY_RUNTIME_ERRORS_ENABLED: "runtimeErrorsTelemetryEnabled",
DO_NOT_SEND_CONTACTS_TO_CHAT_SERVICE: "doNotSendContactsToChatService",
CONTACT_PROFILE_CACHE: "contactProfileCache",
PRESENCE_DATA_CACHE: "presenceDataCache",
SCHEDULE_CALL_FROM_CONVERSATION: "scheduleCallFromConversation",
USE_LEGACY_SCHEDULER_URI_FORMAT: "useLegacySchedulerUriFormat",
DIRECTORY_SEARCH_SKYPE_AND_LYNC: "directorySearchSkypeAndLync",
CONTACT_PROFILE: "contactProfile",
GIPHY: "giphy",
SKYPE_CALL_POLICY_SUPPORT: "skypeCallPolicySupport",
SKYPE_VIDEO_CALLING_POLICY_SUPPORT: "skypeVideoCallingPolicySupport",
SHORT_CIRCUIT_SUPPORT: "shortCircuit",
NEW_SELF_PRESENCE: "newSelfPresence",
BATCH_PROFILES_V2: "batchProfilesV2",
CONTACT_PAGE_FILTER_TABS: "contactPageFilterTabs",
USE_AZURE_BASED_SILENT_LOGIN: "useAzureBasedSilentLogin"
},
autoCallingMode: {
call: "Call",
join: "Join"
},
cqfCallType: {
audio: "audio",
video: "video"
},
autoCallingThreadId: "autoCallingThreadId",
capabilities: {
chat: "im.receive",
audio: "audio.receive",
video: "video.receive",
screenSharing: "screen_share",
groupAdd: "group.add"
},
modalityType: {
CHAT: "Chat",
AUDIO: "Audio",
VIDEO: "Video",
SCREENSHARING: "ScreenSharing",
DATACOLLABORATION: "DataCollaboration"
},
apiUIEvents: {
SWX_TIMELINE_LOADED: "swx:timeline:loaded",
SWX_CONTENT_LOADED: "swx:content:loaded",
SWX_SPLASHSCREEN_LOADED: "swx:splashscreen:loaded",
SWX_CALLSCREEN_MAXIMIZE: "swx:callscreen:maximize",
SWX_ON_SIGN_OUT: "swx:on:sign:out",
SWX_SINGLE_CONVERSATION: "swx:single:conversation"
},
chat: {
messageType: {
OUTGOING: "Outgoing",
INCOMING: "Incoming"
}
},
telemetry: {
APP_SOURCE_NAME: "SWX",
uiActions: {
TYPE: "ui_action"
},
runtimeErrors: {
TYPE: "runtime_error"
},
calling: {
MASTER_EVENT: "calling",
CALL_INFO: "CallInfo",
START_CALL: "StartCall",
END_CALL: "EndCall",
RINGING_CALL: "RingingCall",
CONNECTED_CALL: "ConnectedCall",
UNKNOWN_CONTACT_TYPE: "unknown",
PARTICIPANTS_COUNT_PREFIX: "participantsCount_",
direction: {
OUTGOING: "Outgoing call",
INCOMING: "Incoming call"
},
P2P_TO_NGC_NOTIFICATION_DURATION: "P2PtoNGCNotificationDuration",
callType: {
S2S: "S2S",
SkypeOut: "SkypeOut",
SkypeIn: "SkypeIn"
},
AVAILABLE: "Available",
UNAVAILABLE: "Unavailable",
NA: "N/A"
},
autoCalling: {
MASTER_EVENT: "autoCalling",
SERVICE_FAILURE: "serviceFailure",
AUTO_CALL_ENDED: "autoCallEnded",
AUTO_CALL_PAYLOAD_INVALID: "autoCallPayloadInvalid",
AUTO_CALL_HANDLING_ERROR: "autoCallHandlingError",
HOST_JOINED: "hostJoined",
PARTICIPANT_JOINED: "participantJoined",
ATTEMPT_TO_JOIN: "attemptToJoin"
},
chat: {
UI_SEND_MESSAGE: "ui_sendMessage",
UI_EDIT_MESSAGE: "ui_editMessage",
FILE_TRANSFER: "file_transfer",
VIDEO_MESSAGE: {
TYPE: "video_message",
action: {
FIRST_PLAY: "firstPlay",
PLAY: "play",
FULLSCREEN: "fullscreen",
SEEK: "seeking",
REPLAY: "replay"
},
eventName: {
LOADED: "loaded"
}
}
},
contacts: {
type: {
CONTACTS: "Contacts",
CONTACT_REQUESTS: "ContactRequests"
},
name: {
GET_CONTACT_LIST: "GetContactList",
GET_CONTACT_LIST_DELTA: "GetContactListDelta",
CONTACT_REQUEST_READ: "ContactRequestRead",
CONTACT_REQUEST_ACCEPTED: "AcceptContact",
CONTACT_REQUEST_DECLINED: "DeclineContact",
CONTACT_BLOCKED: "ContactBlocked",
CONTACT_UNBLOCKED: "ContactUnblocked",
CONTACT_DELETED: "ContactDeleted",
GET_PROFILES: "GetProfiles",
ADD_CONTACT: "AddContact",
CONTACTS_PAGE_PERFORMANCE: "ContactsPagePerformance",
DISCOVER_AGENTS_PAGE_PERFORMANCE: "DiscoverAgentsPagePerformance",
PROFILE_OPENED: "contact_profile_opened"
},
shortCircuit: {
START: "log_sc_start",
FINISHED: "log_sc_finished"
}
},
agents: {
type: {
AGENTS: "Agents"
},
name: {
DISCOVER_AGENTS_PAGE_PERFORMANCE: "DiscoverAgentsPagePerformance"
}
},
pes: {
eventName: {
MOJI_SENT: "moji_sent",
MOJI_PLAYED: "moji_played",
EMO_SENT: "emo_sent",
IMAGE_SENT: "image_sent"
},
section: {
FEATURED: "FEATURED",
REGULAR: "REGULAR"
},
source: {
TYPED: "TYPED",
ROSTER: "ROSTER",
RECENTS: "RECENTS"
},
UNKNOWN: "N/A"
},
presence: {
TYPE: "Presence",
name: {
SET_ME_PRESENCE: "SetMePresence",
GET_CONTACTS_PRESENCE: "GetContactsPresence"
}
},
search: {
TYPE: "Search"
},
promiseInvalidStateException: {
TYPE: "PromiseInvalidStateException",
feature: {
GROUP_SEARCH: "GroupSearch",
CONTACT_PICKER: "ContactPicker",
PEOPLE_SEARCH: "PeopleSearch"
}
},
NOT_AVAILABLE: "n/a",
trouter: {
NEW_CONNECTION: "newConnection",
ENDPOINT_REGISTRATION_FAILED: "endpointRegistrationFailed",
TROUTER_READY_TIMEOUT: "trouterReadyTimeout",
TROUTER_READY_EVENT: "trouterReadyEvent",
TROUTER_AUTH_EVENT: "trouterAuthEvent",
RENEWAL: "renewal",
AUTHENTICATION_FAILED: "authenticationFailed",
AUTHENTICATION_SUCCEEDED: "authenticationSucceeded",
TROUTER_RECONNECTING: "trouterReconnecting",
TROUTER_INIT: "trouterinit"
},
conversationJoined: {
TYPE: "weblauncher_join",
result: {
SIGNED_IN: "signed_in",
SIGNED_OUT: "signed_out",
SUCCESS: "success",
INCONCLUSIVE: "inconclusive"
},
milestoneType: {
CLIENT_INIT: "client_init",
ERROR: "error",
END: "end"
}
},
guestActionsInHeader: {
TYPE: "chat_guest_headerActions",
cta: {
PROFILE_TOGGLED: "profileToggled",
COPY_LINK: "copyLink",
EMAIL_LINK: "emailLink"
},
telemetryItem: {
AVATAR: "telemetryItemAvatar",
TOPIC: "telemetryItemTopic",
CHEVRON_DOWN: "telemetryItemChevronDown",
CHEVRON_UP: "telemetryItemChevronUp"
},
parent: {
GROUP_PROFILE_VIEW_MODEL: "GroupProfileViewModel",
HEADER_VIEW_MODEL: "HeaderViewModel"
}
},
removeConversationHistory: {
TYPE: "swx_conversation_removeHistory",
cta: {
TIMELINE_MENU: "timeline",
PROFILE: "profile"
},
action: {
CANCELED: "canceled",
CONFIRMED: "confirmed"
}
},
leaveConversation: {
TYPE: "swx_conversation_leave",
cta: {
TIMELINE_MENU: "timeline",
PROFILE: "profile"
},
action: {
CANCELED: "canceled",
CONFIRMED: "confirmed"
}
},
sendContacts: {
TYPE: "message_contactInfo_send",
cta: {
MEDIABAR: "mediabar"
},
action: {
CANCELED: "canceled",
CONFIRMED: "confirmed"
}
},
urlPreviewShown: {
TYPE: "message_urlpreview_show"
},
urlPreviewClicked: {
TYPE: "message_urlpreview_action"
},
contactInfo: {
TYPE: "message_contactinfo_receive",
action: {
SHOW: "showed",
CLICK: "clicked"
}
},
messageSent: {
TYPE: "kpi_message_sent"
},
mediaBarEvent: {
TYPE: "media_bar_event"
},
timelineLoadEvent: {
TYPE: "chat_timeline_load"
},
conversationHistoryLoadEvent: {
TYPE: "chat_conversation_historyLoad"
},
splashScreenEvent: {
TYPE: "experience_load_times"
},
notificationActionsEvent: {
TYPE: "notificationActions",
action: {
accept: "accept",
decline: "decline",
open: "open"
}
},
translator: {
eventType: {
OUTGOING: "translator_message_outgoing",
INCOMING: "translator_message_incoming",
SETTINGS_SHOW: "translator_settings_show",
SETTINGS_HIDE: "translator_settings_hide",
SETTINGS_BUTTON_ENABLED: "translator_settings_button_enabled",
ME_LANGUAGE_CHANGED: "translator_me_language_changed",
PARTICIPANT_LANGUAGE_CHANGED: "translator_participant_language_changed"
},
action: {
CLICK_SEE_ORIGINAL: "click_see_original",
CLICK_SEE_TRANSLATION: "click_see_translation",
TRANSLATE: "translate",
RETRANSLATE: "re-translate",
SHOW: "show"
},
initiator: {
ESCAPE_KEY: "escape_key",
CLICK_GLOBE_BUTTON: "click_globe_button"
}
},
performanceMarks: {
EXPERIENCE: {
INIT_START: "swx_timeline_initStart",
INIT_END_OK: "swx_timeline_initEnd_ok",
INIT_END_404: "swx_timeline_initEnd_404",
INIT_END_ERROR: "swx_timeline_initEnd_err",
TTL_START: "swx_experience_ttl_start",
CONTENT_INIT: "swx_content_initStart"
},
TIMELINE: {
RENDER_END: "swx_timeline_renderEnd",
SYNC_START: "swx_timeline_syncStart",
SYNC_END_OK: "swx_timeline_syncEnd_ok",
SYNC_END_404: "swx_timeline_syncEnd_404",
SYNC_END_ERROR: "swx_timeline_syncEnd_err"
},
CONVERSATION: {
TTP: "swx_conversation_ttp"
},
NEW_CONVERSATION: {
FLOW_START: "swx_newConversation_flowStart",
CREATION_START: "swx_newConversation_creationStart",
CREATION_END_OK: "swx_newConversation_creationEnd_ok",
CREATION_END_404: "swx_newConversation_creationEnd_404",
CREATION_END_ERROR: "swx_newConversation_creationEnd_err",
RENDER_END: "swx_newConversation_renderEnd"
},
CONVERSATION_UPDATE: {
UPDATE_START: "swx_conversationupdate_start",
UPDATE_END: "swx_conversationupdate_end",
SYNC_END: "swx_conversationupdate_syncEnd"
},
IM_SEND: {
POST_START: "swx_imSend_postStart",
POST_END_OK: "swx_imSend_postEnd_ok",
POST_END_404: "swx_imSend_postEnd_404",
POST_END_ERROR: "swx_imSend_postEnd_err"
},
CONTACTS: {
LIST_LOAD: {
START: "swx_contact_list_load",
END: "swx_contact_list_end"
},
PAGE: {
OPENED: "swx_contacts_page_opened",
INITIALIZED: "swx_contacts_page_initialized",
RENDERED: "swx_contacts_page_rendered"
}
},
DISCOVER_AGENTS: {
LIST_LOAD: {
START: "swx_discover_agents_list_load",
END: "swx_discover_agents_list_end"
},
PAGE: {
OPENED: "swx_discover_agents_page_opened",
INITIALIZED: "swx_discover_agents_page_initialized",
RENDERED: "swx_discover_agents_page_rendered"
}
},
CALLING: {
INCOMING: {
P2P_IN_PLUGINLESS_START: "swx_calling_incoming_p2p_in_pluginless_start",
P2P_IN_PLUGINLESS_END: "swx_calling_incoming_p2p_in_pluginless_end"
}
},
SEARCH: {
LOCAL: {
START: "swx_search_local_start",
END: "swx_search_local_end",
RESULTS_RENDERED: "swx_search_local_results_rendered"
},
GLOBAL: {
START: "swx_search_global_start",
END: "swx_search_global_end",
RESULTS_RENDERED: "swx_search_global_results_rendered"
}
},
SKYPEOUT: {
PAGE: {
OPENED: "swx_skypeout_page_opened"
}
},
USER_SETTINGS: {
PAGE: {
OPENED: "swx_settings_page_opened"
}
}
},
measurements: {
EXPERIENCE: {
TTL: "swx_experience_ttl",
TTL404: "swx_experience_ttl",
SPLASH_TIME: "swx_experience_splash_screen_time"
},
TIMELINE: {
TTL: "swx_timeline_ttl",
TTL404: "swx_timeline_ttl",
TTR: "swx_timeline_ttr"
},
NEW_CONVERSATION: {
TTC: "swx_newConversation_ttc",
TTS: "swx_newConversation_tts",
TTR: "swx_newConversation_ttr"
},
CONVERSATION_UPDATE: {
TTC: "swx_conversationupdate_ttc",
TTS: "swx_conversationupdate_tts"
},
IM_SEND: {
TTS: "swx_imsend_tts",
TTS404: "swx_imsend_tts_404",
TTR: "swx_imsend_ttr"
},
CONTACTS: {
LIST_LOAD: {
TTC: "swx_contacts_list_load_ttc"
},
PAGE: {
TTC: "swx_contacts_page_ttc",
TTR: "swx_contacts_page_ttr"
}
},
DISCOVER_AGENTS: {
LIST_LOAD: {
TTC: "swx_discover_agents_list_load_ttc"
},
PAGE: {
TTC: "swx_discover_agents_page_ttc",
TTR: "swx_discover_agents_page_ttr"
}
},
CALLING: {
INCOMING: {
TBN: "swx_calling_incoming_tbn"
}
},
SEARCH: {
LOCAL: {
TTR: "swx_search_local_ttr"
},
GLOBAL: {
TTR: "swx_search_global_ttr"
}
}
},
stages: {
NEW_CONVERSATION: {
STARTED: 1,
CREATED: 2,
REDIRECTED: 3,
ABANDONED: 4
},
CONVERSATION_UPDATE: {
COMPLETED: 1,
CANCELLED: 2,
ABANDONED: 3
}
},
conversationType: {
UNKNOWN: -1,
DIALOG: 0,
GROUP: 1
},
persona: {
NEWBEE: 1,
RETURNING: 2,
CLASSIC_IM: 3,
POWER_IM: 4
},
historyLoadOrigin: {
TIMELINE_INIT: 1,
NOTIFICATION_CONV: 2,
NOTIFICATION_AGGR: 3,
CONTACT_SEARCH: 4,
GROUP_SEARCH: 5,
DIRECTORY_SEARCH: 6,
NEW_CHAT_OPEN_EXISTING: 7,
PAGING: 8,
CALLING: 9,
AUTHOR_SWITCH: 10,
ROSTER: 11,
CONVERSATION_TO_THREAD: 12,
NEW_CHAT_CREATION: 13,
TIMELINE_CLICK: 14,
CONTACT_REQUEST_DECLINED: 15,
NEW_CHAT_DUMMY: 16,
NEW_CHAT_API_START_CONVERSATION: 17,
CONTACTS_PAGE: 18,
SKYPEOUT_PAGE: 19,
NEW_CONVERSATION_API: 20,
CONVERSATION_HEADER_BUTTON: 21,
CREATE_CONVERSATION_FOR_SCHEDULED_CALL: 22,
DISCOVER_AGENTS_PAGE: 23,
MENTION_ME: 99
},
timelineLoadOrigin: {
LOAD: 1,
RELOAD: 2,
RESSURECT: 3
},
messageTypes: {
MEDIA_VIDEO: 1,
MEDIA_PICTURE: 2,
MEDIA_LOCATION: 4,
CALLING_OTHER: 8,
FILES_MASK: 4080,
FILES_PICTURE: 16,
FILES_VIDEO: 32,
FILES_OFFICE: 64,
FILES_ARCHIVE: 128,
FILES_BINARY: 256,
FILES_PDF: 512,
FILES_OTHER: 1024,
FILES_AUDIO: 2048,
RICHTEXT_MASK: 61440,
RICHTEXT_FORMAT: 4096,
RICHTEXT_EMOTICONS: 8192,
RICHTEXT_ME: 16384,
RICHTEXT_OTHER: 32768,
CONTACT_OTHER: 65536,
TEXT_MASK: 15728640,
TEXT_ME: 1048576,
TEXT_OTHER: 2097152,
OTHER_TYPES: 16777216
},
subCategories: {
LOCAL_CONTACT_SEARCH: "LocalContactSearch",
GLOBAL_CONTACT_SEARCH: "GlobalContactSearch",
LOAD_CONTACTS: "LoadContacts"
},
poll: {
eventName: {
DESIGNER_OPENED: "poll_ui_designer_opened",
STICKY_MESSAGE_CLICKED: "poll_ui_sticky_message_clicked",
AVATAR_ELIPSIS_CLICKED: "poll_ui_avatar_elipsis_clicked",
ERROR: "poll_error",
ANSWER_LENGTH: "poll_ui_answer_length",
ACTIVITY: "poll_activity"
},
activityType: {
SEND: "send",
VOTE: "vote",
QUOTE: "quote",
EDIT: "edit",
REMOVE: "remove",
CLOSE: "close"
},
errorType: {
PARSING: "parsing",
SEND: "send",
OTHER: "other"
},
property: {
CONVERSATION_ID: "conversation_id",
MESSAGE_ID: "message_id",
ACTIVITY_TYPE: "activity_type",
ERROR_TYPE: "error_type",
XMM_TYPE: "xmm_type",
QUESTION_LENGTH: "question_length",
ANSWER_LENGTH: "answer_length",
ANSWERS_COUNT: "answers_count",
MULTI_VOTE: "multi_vote",
IS_NEW_VOTE: "is_new_vote",
TOTAL_VOTES: "total_votes",
TIME_SINCE_CREATION: "time_since_creation"
}
},
userSettings: {
eventName: {
PREFERENCE_FETCHED: "user_settings_preference_fetched",
PREFERENCE_CHANGED: "user_settings_preference_changed",
PANEL_SHOWN: "user_settings_panel_shown",
PAGE_DISMISSED: "user_settings_page_dismissed"
},
outcomeNames: {
SUCCESS: "success",
FAILURE: "failure"
},
property: {
ITEM_NAME: "name",
ITEM_VALUE: "value",
OPERATION_OUTCOME: "outcome",
OPERATION_DURATION: "duration"
},
UNKNOWN: "N/A"
},
inappActivity: {
KPI_INAPP_ACTIVITY_START: "kpi_inapp_activity_start",
KPI_INAPP_ACTIVITY_END: "kpi_inapp_activity_end"
},
pstn: {
eventName: {
PSTN_BUTTON_CLICKED: "kpi_pstn_button_clicked",
PSTN_CALL_INITIATED: "kpi_pstn_call_initiated",
ADD_CREDIT: "kpi_pstn_add_credit",
ADD_SUBSCRIPTION: "kpi_pstn_add_subscription",
CREDIT_BALANCE_UPDATE_CALL_END: "kpi_pstn_credit_balance_latency_call_end"
},
entryPoint: {
CONTACT_LIST: "Contact List",
SKYPE_OUT_PAGE: "Skype Out Page",
CONVERSATION: "Conversation",
RECENTS: "Recents",
SEARCH: "Search Results",
NO_CREDIT_CALL_START: "No Credit Call Start",
NO_CREDIT_CALL_END: "No Credit Call End",
NO_SUBSCRIPTION_CALL_START: "No Subscription Call Start",
NO_SUBSCRIPTION_CALL_END: "No Subscription Call End"
},
cssClasses: {
ADD_CREDIT: "js-addCredit",
ADD_SUBSCRIPTION: "js-addSubscription"
}
}
},
globalizationFormatKeys: {
time: {
CALL_DURATION: "duration",
SHORT: "short"
},
date: {
DAY_MONTH: "dayMonth",
DAY_MONTH_YEAR: "dayMonthYear",
DAY_ABBREVIATION: "dayAbbr",
DAY_NAME: "dayName",
DATE_ABBREVIATION: "dateAbbr",
SHORT_DATE_ABBREVIATION: "shortDateAbbr"
}
},
api: {
renderConversation: {
errorMessages: {
CONTAINER_UNDEFINED: "Container is undefined",
CONTAINER_NOT_ELEMENT_NOT_SELECTOR: "Container is not a DOM element or CSS selector",
PARTICIPANTS_WRONG_FORMAT: "Participants are expected to be an array",
CONVERSATION_ID_WRONG_FORMAT: "Conversation ID is expected to be a string",
PARTICIPANTS_AND_CONVERSATION_ID_UNDEFINED: "Participants or Conversation ID can't be undefined"
}
},
conversation: {
errorMessages: {
NO_PARTICIPANTS: "Cannot start, at least one participant is required",
SEARCH_FAILED: "Search for Person failed",
URI_NOT_VALID: "Uri not a string",
SUCCESS_CALLBACK_ERROR: "Unexpected error in success callback"
}
},
modality: {
errorMessages: {
INVALID_MODALITIES: "Invalid modalities format provided",
MODALITY_TYPE_NOT_SUPPORTED: "Modality type not supported",
MODALITY_START_FAILED: "Modality cannot be started",
ERROR_CALLBACK_ERROR: "Unexpected error in error callback"
}
},
auth: {
errorTypes: {
TOO_MANY_CONNECTIONS_ERROR: "TooManyConnectionsError",
NOT_LINKED: "AccountNotLinkedError",
AGE_RESTRICTION_ERROR: "underage"
},
errorMessages: {
AUTH_DISABLED: "authentication disabled",
ALREADY_SIGNED_IN: "user already signed in",
ALREADY_SIGNED_OUT: "user already signed out",
NOT_LINKED: "not-linked"
},
accountLinking: {
WELCOME_FLOW: "welcome",
RELINK_FLOW: "relink",
INLINE_NEW_USER_FLOW: "inlineNewUser"
},
authProviderType: {
SKYPE_TOKEN: "skypeToken",
IMPLICIT_AUTH: "implicitOAuth",
PASSWORD: "password",
ANONYMOUS: "anonymous"
},
DEFAULT_SIGNIN_TIMEOUT: 15e3
}
},
silentLogin: {
errorMessages: {
NOT_LINKED: "not_linked",
TIMED_OUT: "timed_out",
INVALID_GRANT: "invalid_grant"
}
},
conversation: {
TOPIC_DELIMITER: ", ",
NUMBER_OF_PARTICIPANT_NAMES_IN_TOPIC: 4
},
uiMode: {
NARROW: "narrow"
},
cache: {
VERSION: "1.8",
PREFIX_KEYWORD: "swx",
INTERNAL_KEYS: {
VERSION: "version",
ENCRYPTION_KEY: "encryptionKey",
KEYS_MAP: "keysMap"
},
DEFAULT_BUFFER_TIMEOUT: 300
},
experience: {
RENDERER_CLASS: "swx"
},
disposableGroups: {
PUB_SUB: "PUB_SUB",
GENERIC_DISPOSABLE: "GENERIC_DISPOSABLE",
INTERVAL: "INTERVAL",
TIMEOUT: "TIMEOUT",
DOM_EVENT: "DOM_EVENT"
},
urlValidator: {
ALLOW_EMPTY: {}
},
i18n: {
EMBEDDED_LOCALE: "en-us"
},
mentions: {
"class": "mention(?: me)?",
meIdentifier: /class\s?=\s?["']mention me["']/
},
fileTransfer: {
MAX_RESOLUTION: 16e3,
MAX_FILE_SIZE: 104857600,
SUPPORTED_PICTURE_TYPES: "image/x-png, image/png, image/jpeg",
MAX_PHOTO_SIZE: 20971520
},
annotationType: {
EMOTIONS: "emotions"
},
emotionTypes: {
HEART: "heart"
},
textarea: {
MAX_LENGTH: 2e3
},
urlPreviewType: {
WWW: "urlp-www",
YT: "utlp-yt",
GIF: "urlp-gif"
},
userSettings: {
categories: {
MESSAGING: "messaging",
PRIVACY: "privacy",
UNLISTED: "unlisted",
CONTACTS: "contacts"
},
preferences: {
URL_PREVIEWS: "urlPreviews",
YOUTUBE_PLAYER: "youTubePlayer",
MENTIONS: "mentions",
FILE_PASTE: "filePaste",
SKYPE_CALL_POLICY_SUPPORT: "skypeCallPolicySupport",
SKYPE_VIDEO_CALLING_POLICY_SUPPORT: "skypeVideoCallingPolicySupport",
READ_RECEIPT: "readReceipt",
AUTO_BUDDY: "autoBuddy",
AUTO_BUDDY_DISCOVERY: "autoBuddyDiscovery",
DYNAMIC_DISCOVERY: "dynamicDiscovery"
}
},
proofTypes: {
EMAIL: "email",
PHONE: "phone"
},
shortCircuit: {
scenarios: {
ADD_VERIFIED_PHONE: "settingspnv",
MANAGE_ADDRESSBOOKS: "settingsaddressbooks"
}
},
window: {
BLANK_NAME: "_blank"
},
educationBubbles: {
ORIENTATION: {
TOP: "TOP",
BOTTOM: "BOTTOM",
LEFT: "LEFT",
RIGHT: "RIGHT"
},
SIZE: {
LARGE: "LARGE"
}
}
}),
define("cafe/enums", [], function() {
var e = {};
return e.activityType = {
ParticipantJoined: "ParticipantJoined",
ParticipantLeft: "ParticipantLeft",
ParticipantJoinFailed: "ParticipantJoinFailed",
ParticipantRoleUpdate: "ParticipantRoleUpdate",
ParticipantTopicUpdate: "ParticipantTopicUpdate",
ParticipantPictureUpdate: "ParticipantPictureUpdate",
ParticipantHistoryDisclosed: "ParticipantHistoryDisclosed",
ParticipantJoiningEnabled: "ParticipantJoiningEnabled",
ParticipantLegacyMemberAdded: "ParticipantLegacyMemberAdded",
ParticipantLegacyMemberUpgraded: "ParticipantLegacyMemberUpgraded",
CallStarted: "CallStarted",
CallEnded: "CallEnded",
CallMissed: "CallMissed",
NgcUpgradeMessage: "NgcUpgradeMessage",
PluginFreeFallbackWindowsUpdate: "PluginFreeFallbackWindowsUpdate",
PluginFreeFallbackScreenSharing: "PluginFreeFallbackScreenSharing",
PluginFreeFallbackMicrophoneAccess: "PluginFreeFallbackMicrophoneAccess",
PluginFreeFallbackOutgoingP2PCall: "PluginFreeFallbackOutgoingP2PCall",
PluginFreeFallbackIncomingP2PCall: "PluginFreeFallbackIncomingP2PCall",
PstnInsufficientFunds: "InsufficientFunds",
PstnInvalidNumber: "InvalidNumber",
PstnForbiddenNumber: "ForbiddenNumber",
TextMessage: "TextMessage",
VideoMessage: "VideoMessage",
PictureMessage: "PictureMessage",
ContactRequestIncoming: "ContactRequestIncoming",
ContactRequestIncomingInviteFree: "ContactRequestIncomingInviteFree",
ContactRequestOutgoing: "ContactRequestOutgoing",
ContactRequestOutgoingResend: "ContactRequestOutgoingResend",
ContactRequestOutgoingAgent: "ContactRequestOutgoingAgent",
ContactRequestIsNowContact: "ContactRequestIsNowContact",
SuggestedContact: "SuggestedContact",
UnblockContact: "UnblockContact",
MojiMessage: "MojiMessage",
FileTransfer: "FileTransfer",
ContactInfoMessage: "ContactInfoMessage",
CreditTransaction: "CreditTransaction",
PollMessage: "PollMessage",
SystemMessage: "SystemMessage",
CustomMessage: "CustomMessage"
},
e.activityStatus = {
Pending: "Pending",
Succeeded: "Succeeded",
Failed: "Failed"
},
e.transactionStatus = {
Pending: "Pending",
Succeeded: "Succeeded",
Failed: "Failed"
},
e.direction = {
Incoming: "Incoming",
Outgoing: "Outgoing"
},
e.messageFormat = {
Text: "Text",
Html: "Html"
},
e.messageType = {
Text: "Text",
Html: "Html"
},
e.callConnectionState = {
Disconnected: "Disconnected",
Notified: "Notified",
Connecting: "Connecting",
Ringing: "Ringing",
EarlyMedia: "EarlyMedia",
Connected: "Connected",
Disconnecting: "Disconnecting"
},
e.callDisconnectionReason = {
Terminated: "Terminated",
FullSession: "FullSession",
Busy: "Busy",
Refused: "Refused",
Missed: "Missed",
Dropped: "Dropped",
InvalidNumber: "InvalidNumber",
ForbiddenNumber: "ForbiddenNumber",
EmergencyCallDenied: "EmergencyCallDenied",
VoiceMailFailed: "VoiceMailFailed",
TransferFailed: "TransferFailed",
InsufficientFunds: "InsufficientFunds",
Failed: "Failed",
MissingSpeaker: "MissingSpeaker",
CallEscalated: "CallEscalated",
OutOfBrowserCall: "OutOfBrowserCall",
AutoCallFailed: "AutoCallFailed",
AutoCallTimeout: "AutoCallTimeout",
Canceled: "Canceled"
},
e.ecsClientNames = {
Skype: "Skype"
},
e.deviceType = {
Camera: "Camera",
Microphone: "Microphone",
Speaker: "Speaker"
},
e.groupType = {
Root: "Root",
Custom: "Custom",
Others: "Others",
Favorites: "Favorites",
Distribution: "Distribution",
PrivacyRelationship: "PrivacyRelationship"
},
e.groupPrivacyRelationshipLevel = {
None: "None",
Blocked: "Blocked",
Colleagues: "Colleagues",
Workgroup: "Workgroup",
External: "External",
FriendsAndFamily: "FriendsAndFamily"
},
e.mediaStreamState = {
Started: "Started",
Active: "Active",
Inactive: "Inactive",
Stopped: "Stopped"
},
e.mediaType = {
Unknown: "Unknown",
Video: "Video",
Video_WMV: "Video_WMV",
Video_MOV: "Video_MOV",
Video_MP4: "Video_MP4",
Picture: "Picture"
},
e.mediaStatus = {
Unknown: "Unknown",
Pending: "Pending",
Completed: "Completed",
Failed: "Failed"
},
e.participantRole = {
Attendee: "Attendee",
Leader: "Leader"
},
e.participantState = {
Disconnected: "Disconnected",
Connecting: "Connecting",
InLobby: "InLobby",
Connected: "Connected",
Disconnecting: "Disconnecting"
},
e.onlineStatus = {
Online: "Online",
Offline: "Offline",
Hidden: "Hidden",
Busy: "Busy",
Idle: "Idle",
BeRightBack: "BeRightBack",
Away: "Away",
DoNotDisturb: "DoNotDisturb",
Unknown: "Unknown",
OnThePhone: "OnThePhone",
OutForLunch: "OutForLunch"
},
e.phoneType = {
Home: "Home",
Work: "Work",
Cell: "Cell",
Other: "Other"
},
e.selfSettings = {
autoBuddy: "autoBuddy",
linkedMSA: "linkedMSA"
},
e.emailType = {
Personal: "Personal",
Work: "Work",
Other: "Other"
},
e.locationType = {
Home: "Home",
Work: "Work",
Other: "Other",
Unknown: "Unknown"
},
e.noteType = {
Personal: "Personal",
OutOfOffice: "OutOfOffice"
},
e.endpointType = {
Desktop: "Desktop",
Mobile: "Mobile",
Web: "Web",
Unknown: "Unknown"
},
e.reasonCode = {
RequestFailed: "RequestFailed"
},
e.sharedResourceType = {
Desktop: "Desktop",
Application: "Application",
Window: "Window"
},
e.searchScope = {
Agent: "Agent",
AddressBook: "AddressBook",
SkypeDirectory: "SkypeDirectory",
All: "All"
},
e.loginState = {
SignedOut: "SignedOut",
SigningIn: "SigningIn",
SignedIn: "SignedIn",
SigningOut: "SigningOut"
},
e.translatorServiceState = {
NotReady: "NotReady",
Authenticated: "Authenticated",
Error: "Error"
},
e.authType = {
Password: "Password",
Token: "Token",
Passive: "Passive",
ImplicitOAuth: "ImplicitOAuth",
Guest: "Guest",
Integrated: "Integrated",
OutOfBrowser: "OutOfBrowser"
},
e.callingNotSupportedReasons = {
PluginNotInstalled: "PluginNotInstalled",
PluginOutOfDate: "PluginOutOfDate",
BrowserNotSupported: "BrowserNotSupported",
PluginBlocked: "PluginBlocked",
PluginAlreadyRunning: "PluginAlreadyRunning",
OSNotSupported: "OSNotSupported",
FeatureDisabled: "FeatureDisabled",
TooManyParticipants: "TooManyParticipants",
NotInConversation: "NotInConversation",
CameraUnavailable: "CameraUnavailable"
},
e.fileUploadState = {
Uploading: "Uploading",
FileMissing: "FileMissing",
Failed: "Failed",
FailedMalwareScan: "FailedMalwareScan",
Cancelled: "Cancelled",
Sent: "Sent"
},
e.marketplaceSkuType = {
Premium: "Premium",
Skypein: "Skypein",
Calling: "Calling",
CallingLegacy: "CallingLegacy",
StickerPack: "StickerPack"
},
e.callTechnology = {
None: "None",
P2P: "P2P",
NGC: "NGC"
},
e.mediaConnectionType = {
Unknown: "Unknown",
PluginBasedP2P: "PluginBasedP2P",
PluginBasedNGC: "PluginBasedNGC",
Pluginless: "Pluginless"
},
e.subscriptionType = {
Plan: "plan",
Package: "package"
},
e.preferenceValueState = {
Unknown: "Unknown",
Unset: "Unset",
Defined: "Defined",
Saving: "Saving"
},
e.skypeFlagsApiMappings = {
URL_PREVIEWS: 11,
YOUTUBE_PLAYER: 12,
MENTIONS: 13,
FILE_PASTE: 14,
ALLOW_VIDEO_CALLS_FROM_CONTACTS_ONLY: 15,
DONT_ALLOW_VIDEO_CALLS: 16
},
e.preferenceType = {
Boolean: "Boolean",
Number: "Number",
String: "String",
CallPolicy: "CallPolicy",
VideoPolicy: "VideoPolicy",
AutoBuddy: "AutoBuddy",
AutoBuddyDiscovery: "AutoBuddyDiscovery",
AutoBuddyDiscoveryEmail: "AutoBuddyDiscoveryEmail",
AutoBuddyDiscoveryPhone: "AutoBuddyDiscoveryPhone"
},
e.privacyPolicyValues = {
Anyone: 0,
ContactsOnly: 1,
NoOne: 2
},
e
}),
define("cafe/applicationInstance", [], function() {
function t(t) {
e = t
}
function n() {
if (!e)
throw new Error("Instance does not exist yet!");
return e
}
var e;
return {
set: t,
get: n
}
}),
define("jSkype/client", [], function() {
function t(t) {
e = t
}
function n() {
if (!e)
throw new Error("Instance does not exist yet!");
return e
}
var e;
return {
set: t,
get: n
}
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("jcafe-property-model/lib/propertyModel", ["require", "exports"], e)
}(function(e, t) {
var n = null ;
try {
n = window
} catch (r) {}
!n && global && (global.window = global);
var i = function() {
function N(e, t) {
return t = Y({
code: e
}, t),
Y(Error(this || e), t)
}
function C(e, t) {
var n = e + " is not a " + t;
return N.call(n, "WrongType", {
value: e
})
}
function k(e, t, n) {
var r = "`" + e + "` = " + t + " is not a " + n;
return N.call(r, "WrongArgType", {
arg: e,
value: t
})
}
function L(e, t) {
var n = e + " != " + t;
return N.call(n, "DoesNotEqual", {
lhs: e,
rhs: t
})
}
function A(e, t) {
var n = "`" + e + "` is invalid: " + t;
return N.call(n, "InvalidArgument", {
arg: e,
reason: t
})
}
function O(e, t) {
var n = "Invalid state: " + e + " (expected " + t + ")";
return N.call(n, "InvalidState", {
actual: e,
expected: t
})
}
function M(e, t) {
var n = "the `" + e + "` property is missing";
return N.call(n, "KeyMissing", {
key: e,
object: t
})
}
function _(e) {
return N("AlreadyExists", {
item: e
})
}
function D(e) {
return N("DoesNotExist", {
item: e
})
}
function P(e) {
return N("NotSupported", {
reason: e
})
}
function H(e, t, n) {
if (!e) {
if (!E)
debugger ;throw N(t || "AssertionFailed", n)
}
}
function B(e, t, n) {
if (!e)
throw N(t || "RuntimeCheckFailed", n)
}
function j(e) {
return E ? e : e + ":" + tt()
}
function F(e, t) {
x.replacePrototype ? e.__proto__ ? e.__proto__ = t : Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : Y(e, t) : Y(e, t)
}
function I() {
function r(e, t) {
v(e, 0)
}
function i() {
var n = w();
while (e.length) {
var r = e.shift();
r();
var i = w() - n;
if (i >= t || i < 0)
return
}
}
function s() {
n = !0;
try {
i()
} finally {
n = !1,
e.length && r(s, !1)
}
}
function o() {
if (n || e.length > 1)
return;
r(s, !0)
}
function u(t) {
e.push(t),
o()
}
var e = []
, t = 16
, n = !1;
return u
}
function R(e) {
var t = [];
for (var n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
e = e.bind.apply(e, [this].concat(t)),
E ? e() : q(e)
}
function U(e) {
t(e >= 0);
var n = o(e + " sec timeout", {
cancel: function(e) {
m(r),
n.reject(e)
}
})
, r = v(function() {
n.resolve()
}, e * 1e3 | 0);
return n.promise
}
function z(e) {
return Wt(e)().then(function() {
return Y(z(e), {
locked: !0
})
})
}
function W(e, n) {
return t(St(n) && n > 0),
e = Wt(e),
z(function() {
return e().then(V(U, n))
})
}
function X(e, t, n) {
return t in e ? e[t] : n
}
function V(e) {
var t = [];
for (var n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
var r = this;
return e.bind ? e.bind.apply(e, [r].concat(t)) : function() {
return e.apply(r, t.concat([].slice.call(arguments, 0)))
}
}
function $(e, t) {
var n;
if (e.indexOf)
return e.indexOf(t);
for (n = 0; n < e.length; n++)
if (e[n] == t)
return n;
return -1
}
function J(e, t) {
e.splice(t, 1)
}
function K(e, t, n) {
e.splice(t, 0, n)
}
function Q(e) {
var t;
return Object.keys ? t = Object.keys(e) : (t = [],
it(e, function(e, n) {
t.push(n)
})),
t
}
function G(e, t) {
for (var n in e)
if (!t(e[n], n))
return !1;
return !0
}
function Y(e) {
var t = [];
for (var n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
var r, i, s, o = t[t.length - 1];
e = e || {},
o = Et(o) ? o : "";
for (i = 0; i < t.length; i++) {
r = t[i] || {};
if (r !== o)
for (s in r)
if (o != "append" || !(s in e))
e[s] = r[s]
}
return e
}
function Z(e, n, r) {
r === void 0 && (r = null );
var i, s = r || window, o = e.split(".");
for (i = 0; i < o.length; i++)
s = s[o[i]] || (s[o[i]] = {});
for (i in n)
t(!(i in s), e + "." + i + " already exists"),
s[i] = n[i];
return s
}
function et() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
var t = y.random() * 16 | 0
, n = e == "x" ? t : t & 3 | 8;
return n.toString(16)
})
}
function tt() {
return y.random().toString(16).slice(2)
}
function nt(e, t, n, r) {
try {
Object.defineProperty(e, t, {
value: n,
enumerable: !1,
writable: !r
})
} catch (i) {
e[t] = n
}
}
function rt(e) {
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/gm, "")
}
function it(e, n) {
t(bt(e) || yt(e)),
t(xt(n));
var r, i, s;
if (bt(e))
for (i = 0; i < e.length; ++i)
n(e[i], i);
else
for (s in e)
r = n(e[s], s),
t(r === void 0)
}
function st(e, n) {
t(bt(e) || yt(e)),
t(xt(n));
var r;
return bt(e) ? (r = [],
it(e, function(e, t) {
n(e, t) && r.push(e)
})) : (r = {},
it(e, function(e, t) {
n(e, t) && (r[t] = e)
})),
r
}
function ot(e) {
t(yt(e));
var n = [];
return it(e, function(e) {
n.push(e)
}),
n
}
function ut(e) {
return t(bt(e) || yt(e)),
bt(e) ? e.length : Q(e).length
}
function at(e, n) {
t(bt(e) || yt(e)),
t(xt(n));
var r;
if (bt(e)) {
for (r = 0; r < e.length; ++r)
if (n(e[r], r))
return !0
} else
for (r in e)
if (n(e[r], r))
return !0;
return !1
}
function ft(e, n) {
t(bt(e) || yt(e)),
t(xt(n));
var r, i = {};
if (bt(e)) {
for (r = 0; r < e.length; ++r)
if (n(e[r], r))
return e[r]
} else
for (r in e)
if (n(e[r], r))
return i[r] = e[r],
i;
return null
}
function lt(e) {
return Object.freeze ? Object.freeze(e) : e
}
function ct() {
var e = {}, t, n;
for (n = 0; n < arguments.length; n++)
t = arguments[n],
e[t] = t;
return lt(e)
}
function ht() {
var e, t;
if (arguments.length == 1 && yt(arguments[0]))
e = arguments[0];
else {
e = {};
for (t = 0; t < arguments.length; t++)
e[arguments[t]] = t
}
return lt(e)
}
function pt(e, t) {
for (var n in e)
if (e[n] == t)
return n;
return ""
}
function dt(e, t, n) {
var r, i;
if (bt(e)) {
r = [];
for (i = 0; i < e.length; i++)
r.push(t.call(n, e[i], i, e))
} else if (yt(e)) {
r = {};
for (i in e)
r[i] = t.call(n, e[i], i, e)
}
return r
}
function vt(e, t, n) {
var r, i = {};
e = e || {},
t = t || {};
for (r in t)
if (!(r in e) || n != "append")
i[r] = {
value: t[r],
writable: !0,
enumerable: !0,
configurable: !0
};
return Object.create(e, i)
}
function mt(e) {
return e && JSON.parse(JSON.stringify(e))
}
function gt(e) {
return e && Object.prototype.toString.call(e) == "[object Object]"
}
function yt(e) {
return gt(e)
}
function bt(e) {
return Object.prototype.toString.call(e) == "[object Array]"
}
function wt(e, t) {
if (!bt(e))
return !1;
for (var n = 0; n < e.length; n++)
if (!t(e[n]))
return !1;
return !0
}
function Et(e) {
return Object.prototype.toString.call(e) == "[object String]"
}
function St(e) {
return Object.prototype.toString.call(e) == "[object Number]"
}
function xt(e) {
return Object.prototype.toString.call(e) == "[object Function]"
}
function Tt(e) {
return Object.prototype.toString.call(e) == "[object Boolean]"
}
function Nt(e) {
return Et(e) && e.length > 0
}
function Ct(e) {
return e === null || e === undefined
}
function kt(e) {
return St(e) && (e | 0) == e
}
function Lt(e, t) {
return kt(e) && bt(t) && e >= 0 && e < t.length
}
function At(e, t, n) {
return St(n) && n >= e && n <= t
}
function Ot(e) {
return gt(e) && Nt(e.type) && Nt(e.url)
}
function Mt(e) {
return yt(e) && "status" in e
}
function _t(e) {
for (var t in e)
if (e.hasOwnProperty(t))
return !1;
return !0
}
function Dt(e) {
return e && e[S]
}
function Pt(e) {
return e instanceof Jt
}
function Ht(e) {
return e && e.constructor === p
}
function Bt(e) {
return e && e.constructor === h
}
function jt(e) {
return e && e.constructor === ln
}
function Ft(e, t) {
var n, i = t.split("|");
for (n = 0; n < i.length; n++)
if (i[n] in r.types && r.types[i[n]](e))
return !0;
return !1
}
function It(e) {
return e && xt(e.then)
}
function qt(e, t) {
var n, r = typeof e, i = typeof t;
if (e === t)
return !0;
if (r !== i || r !== "object" && r !== "function")
return !1;
if (e === null || t === null )
return e === t;
if (e instanceof g && t instanceof g)
return +e == +t;
for (n in e)
if (!(n in t) || e[n] !== t[n])
return !1;
for (n in t)
if (!(n in e) || e[n] !== t[n])
return !1;
return !0
}
function Rt(e) {
return e.replace(/[<>&;#/]/gm, function(e) {
return "&#" + e.charCodeAt(0) + ";"
}).replace(/\r\n|\n/gm, function() {
return "<br>"
})
}
function Ut(e) {
return a("<root>" + e + "</root>").text()
}
function zt(e) {
return e.replace(/&(#?\w+);/gm, function(e, t) {
return t.charAt(0) == "#" ? String.fromCharCode(+t.slice(1)) : i.entities[t]
})
}
function Wt(e, t) {
var n = e[S] ? e : function() {
try {
return o.wait(e.apply(this, arguments), t)
} catch (n) {
return o().reject(n).promise
}
}
;
return nt(n, S, !0),
n
}
function Xt(e) {
function i(e, n) {
return t.on(e, n),
xt(n) && n(this),
new Vt(t,e)
}
var t = i, n, r = e || {};
return this instanceof s ? (n = this,
Y(n, r),
n._listeners = [],
n._modes = [],
n._locked = !1,
n.observer = t,
F(t, s.prototype.observer),
t._event = n,
n) : new s(e)
}
function Vt(e, t) {
this.event = e,
this.listener = t
}
function $t(e, t) {
if (!(this instanceof o))
return new o(e,t);
Et(e) || (t = e,
e = void 0),
t = t || {};
var n = this
, r = {};
r.leafs = [],
r.state = "pending",
r.status = h({
value: e
}),
t.mode && (r.mode = t.mode),
t.cancel && (r.fnCancel = t.cancel),
r.promise = new o.Promise(n),
Y(n, {
_: r,
status: r.status,
promise: r.promise
})
}
function Jt(e) {
var t = o();
try {
e(function(e) {
t.resolve(e)
}, function(e) {
t.reject(e)
}, t.status)
} catch (n) {
t.promise.state() == "pending" && t.reject(n)
}
return t.promise
}
function Kt(e) {
return vt(Kt.prototype, {
exec: function(t, n) {
var r = e(t, n || 0);
return arguments.length == 2 ? r : !r || r.pos != t.length ? null : r.res
}
})
}
function Qt(e) {
return Kt(function(t, n) {
if (t.slice(n, n + e.length) == e)
return {
res: e,
pos: n + e.length
}
})
}
function Gt(e) {
return Kt(function(t, n) {
var r = e.exec(t.slice(n));
if (r && r.index == 0)
return {
res: r[0],
pos: n + r[0].length
}
})
}
function Yt(e, t) {
return Kt(function(n, r) {
return e.exec(n, r) || {
res: t,
pos: r
}
})
}
function Zt(e, t) {
return Kt(function(n, r) {
return !t.exec(n, r) && e.exec(n, r)
})
}
function en() {
var e = [];
for (var t = 0; t < arguments.length; t++)
e[t - 0] = arguments[t];
return Kt(function(t, n) {
var r, i, s = [];
for (r = 0; r < e.length; r++) {
i = e[r].exec(t, n);
if (!i)
return;
s.push(i.res),
n = i.pos
}
return {
res: s,
pos: n
}
})
}
function tn() {
var e = [];
for (var t = 0; t < arguments.length; t++)
e[t - 0] = arguments[t];
return Kt(function(t, n) {
var r, i;
for (r = 0; r < e.length && !i; r++)
i = e[r].exec(t, n);
return i
})
}
function nn(e) {
return Kt(function(t, n) {
var r, i = [];
while (r = e.exec(t, n))
i.push(r.res),
n = r.pos;
return {
res: i,
pos: n
}
})
}
function rn(e, t) {
var n = en(t, e).select(1)
, r = en(e, nn(n)).then(function(e) {
return [e[0]].concat(e[1])
});
return Yt(r, [])
}
function sn(e, t) {
var n = Gt(/\\./).then(function(e) {
return e.slice(1)
})
, r = tn(n, Zt(Gt(/./), t));
return en(e, nn(r), t).select(1).merge()
}
function on(e) {
var t = u.pattern.exec(e);
if (!t)
throw new SyntaxError("Invalid data URL: " + e);
return t.base64 = !!t.attributes.base64,
t
}
function un(e) {
if (!(Et(e) || e && e.ast))
throw new Error("Invalid argument: " + e);
if (!(this instanceof a))
return new a(e);
var t, n;
try {
t = e.ast || a.pattern.exec(e);
if (!t)
throw void 0
} catch (r) {
throw n = new SyntaxError("Invalid XML: " + e),
n.reason = r,
n
}
var i = t.attrs || {}
, s = (t.nodes || []).map(function(e) {
return a({
ast: Et(e) ? {
text: e
} : e
})
})
, o = function(e, t) {
return e + t.text()
}
, u = function() {
return t.name
}
, f = function() {
return t.text || s.reduce(o, "")
}
;
this.attrs = i,
this.nodes = s,
this.name = u,
this.text = f
}
function an(e) {
return {
root: a(rt(e.replace(/^<\?.+?\?>/, "")))
}
}
function fn(e) {
var t = f.pattern.exec(e || "");
if (t)
return t;
throw new SyntaxError("Invalid WWW-Authenticate header:\n" + e)
}
function ln(e, t) {
function r() {
var t;
if (!n.enabled()) {
t = N("CommandDisabled", {
reason: n.enabled.reason
});
if (Dt(e))
return o().reject(t).promise;
throw t
}
return e.apply(this, arguments)
}
function i() {
return "[Command: enabled = " + n.enabled() + "]"
}
function s(e) {
return ln(function() {
return n.apply(e, arguments)
}, n.enabled)
}
var n = r;
return Y(n, {
constructor: ln,
enabled: t && t.asReadOnly(),
bind: s,
toString: i
})
}
function cn(e) {
return Y(e, {
constructor: ln,
toString: function() {
return "[Command: enabled = true]"
},
enabled: mn(!0)
})
}
function hn(e) {
return e !== void 0 ? ln(function() {}, mn(!1, e)) : (l.instance || (l.instance = ln(function() {}, mn(!1))),
l.instance)
}
function pn(e) {
return e !== void 0 ? ln(Wt(function() {}), mn(!1, e)) : (c.instance || (c.instance = ln(Wt(function() {}), mn(!1))),
c.instance)
}
function dn(e, t) {
var n = 0;
return function() {
var r = !1;
return n++,
n == 1 && e && e(),
{
dispose: function() {
if (r)
throw N("AlreadyDisposed");
r = !0,
n--,
n == 0 && t && t()
}
}
}
}
function vn(e) {
function s(e, n) {
return arguments.length == 0 ? t._value : (t._write(e, n),
this)
}
var t = s
, n = e && e.get
, r = e && e.set
, i = e && e.readOnly;
return e && e.value !== void 0 && (t._value = e.value),
e && e.reason !== void 0 && (t.reason = e.reason),
e && e.check && (t._check = e.check),
n && (t._getter = Wt(n)),
i && (t._ro = t),
r && (t._setter = Wt(r, "sync")),
e && e.subscribed && (t._subscribed = e.subscribed),
e && e.unsubscribed && (t._unsubscribed = e.unsubscribed),
F(t, h.prototype),
Y(t, {
get: jt(n) ? ln(t._getAsync, n.enabled) : cn(t._getAsync),
set: i ? c() : jt(r) ? ln(t._setAsync, r.enabled) : cn(t._setAsync)
}),
Object.defineProperty(t, "changed", {
get: t._getChanged,
set: function(e) {
t._getChanged(),
t._changed.observer = e
}
}),
t
}
function mn(e, t) {
if (t === void 0) {
if (e === null )
return h.null;
if (e === !0)
return h.true;
if (e === !1)
return h.false
}
return h({
value: e,
reason: t,
readOnly: !0
})
}
function gn(e, t) {
var n = h();
return n(e, t),
n.inc = function() {
n(n() + 1)
}
,
n.dec = function() {
n(n() - 1)
}
,
n
}
function yn(e, t) {
var n = h();
return n(e, t),
n
}
function bn(e) {
function r(e) {
return arguments.length == 0 ? t._asArray() : bt(e) ? (t.empty(),
t._addArray(e),
this) : t._getFromCache(e)
}
var t = r
, n = t._ = Y({}, e);
return e && e.get && (n.get = Wt(e.get)),
n.vals = [],
n.keys = [],
n.idxs = {},
F(t, p.prototype),
t._init(),
t
}
function wn(e) {
function f(n, r) {
t(!s[n]),
t(n > e),
t(xt(r)),
s[n] = Wt(r)
}
function l(e) {
n(e >= i(), "InvalidTargetState", {
currentTarget: i(),
requestedTarget: e
});
if (e == r())
return;
return e > i() && (u = o("advancing to target state " + e, {
cancel: c
}),
i.set(e),
p(u)),
u.promise
}
function c(e) {
a.cancel(e),
a = null
}
function p(e) {
if (a)
return;
var t = r() + 1;
e.status("advancing to state " + t),
a = s[t].call(null ),
a.then(function(n) {
a = null ,
r.set(t),
r() < i() ? p(e) : e.resolve(n)
}, function(t) {
a = null ,
e.reject(t)
})
}
var r = h({
value: e
}), i = h({
value: e
}), s = {}, u, a;
return {
defineState: f,
advanceTo: Wt(l),
state: r.asReadOnly(),
target: i.asReadOnly()
}
}
function En(e, n) {
function l() {
t(r <= n);
while (r < n && i.length > 0)
c()
}
function c() {
var t = i.splice(0, 1)[0]
, n = u[t]
, o = s[t];
delete u[t],
delete s[t],
a.splice(0, 1),
r++,
f[t] = e(n),
f[t].then(function(e) {
o.resolve(e)
}, function(e) {
o.reject(e)
}, o.status).then(function() {
r--,
delete f[t],
l()
})
}
function h(e, t) {
var n = a.length;
while (n > 0 && t > a[n - 1])
n--;
a.splice(n, 0, t),
i.splice(n, 0, e)
}
function p(e, t) {
var n;
if (f[e])
f[e].cancel(t);
else {
s[e].reject(t),
delete u[e],
delete s[e];
for (n = 0; n < i.length; n++)
if (i[n] == e) {
i.splice(n, 1),
a.splice(n, 1);
break
}
}
}
t(xt(e)),
t(n > 0),
e = Wt(e);
var r = 0
, i = []
, s = {}
, u = {}
, a = []
, f = {};
return function(e, t) {
var n = tt()
, r = o("Waiting in the throttling queue.", {
cancel: V(p, n)
});
return s[n] = r,
u[n] = e,
h(n, t),
l(),
r.promise
}
}
function Sn(e) {
t(xt(e));
var n = null ;
return function() {
return n || (n = e())
}
}
function xn(e, n) {
function s(e, n, i) {
t(St(e)),
t(i instanceof o);
var s = 0;
while (s < r.length && e > r[s].priority)
s++;
r.splice(s, 0, {
priority: e,
request: n,
task: i
})
}
function u(e) {
t(e > 0),
t(r.length > 0);
var n, i = [], s = [];
for (n = r.length - 1; n >= 0 && i.length < e; n--)
i.push(r[n].request),
s.push(r[n].task);
return r.splice(n + 1, e),
{
requests: i,
tasks: s
}
}
function a(e, t) {
var n;
for (n = 0; n < r.length; n++)
if (r[n].task === e)
break;
n < r.length ? (r.splice(n, 1),
e.reject(t)) : (e.cancelled = !0,
e.reject(t))
}
function f() {
function r(e) {
it(t.tasks, function(t, n) {
t.cancelled || e(t, n)
})
}
var t = u(n);
o.wait(e(t.requests)).then(function(e) {
r(function(t, n) {
var r = bt(e) ? e[n] : e;
o.wait(r).then(function(e) {
t.resolve(e)
}, function(e) {
t.reject(e)
}, t.status)
})
}, function(e) {
r(function(t) {
t.reject(e)
})
}, function(e) {
r(function(t) {
t.status(e)
})
})
}
t(n > 0);
var r = [], i;
return function(e, t) {
var n = o("Waiting in the batching queue.", {
cancel: function(e) {
a(n, e)
}
});
return i || (i = v(function() {
i = null ;
while (r.length > 0)
f()
}, 0)),
s(t, e, n),
n.promise
}
}
function Cn(e) {
function n(e) {
t(Et(e));
var n = e.split("\r\n"), r, i, o, u;
for (var a = 0; a < n.length; a++)
if (u = rt(n[a]))
r = u.indexOf(":"),
r >= 0 && (i = rt(u.substr(0, r)),
o = rt(u.substr(r + 1)),
s(i, o))
}
function r(e) {
t(yt(e));
for (var n in e)
s(n, e[n] + "")
}
function i(e) {
return t(Nt(e)),
u[e.toLowerCase()]
}
function s(e, n) {
t(Nt(e)),
t(Nt(n)),
e = e.toLowerCase(),
u[e] ? u[e] += "\n" + n : u[e] = n
}
function o() {
var e, t, n, r = "";
for (t in u) {
n = u[t].split("\n");
for (e = 0; e < n.length; e++)
n[e] && (r += t + ": " + n[e] + "\r\n")
}
return r + "\r\n"
}
var u = {};
return Nt(e) ? n(e) : yt(e) && r(e),
{
get: i,
add: s,
toString: o
}
}
function kn(e) {
var t = u("data:" + e.replace(/\s/g, "") + ",");
return {
mimeType: t.mime,
attributes: t.attributes
}
}
function Ln(e) {
if (!e)
return e;
var t = /\d+/.exec(e);
return new g(t && +t[0])
}
function An(e) {
return e ? "/Date(" + +e + ")/" : e
}
function On(e, t) {
function n(e, t) {
for (var n = 0; n < e.length; n++)
if ($(t, e[n]) < 0)
return !1;
return !0
}
return n(e, t) && n(t, e)
}
var e = this
, t = H
, n = B
, r = Ft
, i = zt
, s = Xt
, o = $t
, u = on
, a = un
, f = fn
, l = hn
, c = pn
, h = vn
, p = bn
, d = window.ttt ? ttt.window : window
, v = d.setTimeout
, m = d.clearTimeout
, g = d.Date
, y = d.Math
, b = d.console
, w = d.performance && d.performance.now ? function() {
return performance.now()
}
: function() {
return g.now()
}
;
d = null ;
var E = typeof SkypeWebTests != "undefined"
, S = j("async")
, x = Z("Skype.Web.Utils", {
replacePrototype: !0
})
, T = {
log: function() {
if (!E)
try {
b.log.apply(b, arguments)
} catch (e) {}
}
};
t.is = function(e, n) {
if (n instanceof RegExp)
t(n.test(e), "DoesNotMatchPattern", {
value: e,
pattern: n
});
else if (n && !r(e, n)) {
debugger ;throw C(e, n)
}
}
,
t.args = function(e, t) {
it(t, function(t, n) {
var i = e && e[n];
if (!r(i, t)) {
debugger ;throw k(n, i, t)
}
})
}
,
n.equals = function(e, t) {
if (e != t)
throw L(e, t)
}
,
n.state = function(e, t) {
if (bt(t)) {
if ($(t, e) == -1)
throw O(e, t)
} else if (e != t)
throw O(e, t)
}
,
n.belongs = function(e, t) {
if (!(e in t))
throw M(e, t)
}
;
var q = I();
r.types = {
String: Et,
NotEmptyString: Nt,
Function: xt,
Dictionary: yt,
Object: gt,
Array: bt,
Boolean: Tt,
Void: Ct,
Number: St
},
i.entities = {
lt: "<",
gt: ">",
amp: "&",
nbsp: " ",
quot: '"'
},
Y(Vt.prototype, {
dispose: function() {
this.event.off(this.listener)
}
}),
s.prototype = function() {}
,
Y(s.prototype, {
constructor: s,
fire: function() {
var e = this;
if (e._enqueue(e, e._fire, arguments))
return;
e._fire.apply(e, arguments),
e._dequeue()
},
_fire: function() {
var e, t = this;
for (e = 0; e < t._listeners.length; e++)
t._invoke(t._listeners[e], arguments, t._modes[e])
},
_invoke: function(e, t, n) {
var r = this;
if (n == "async" && !E)
R.call(r, r.invoke, e, t, "sync");
else
try {
e.apply(null , t)
} catch (i) {
if (i !== r._ie) {
b && b.log;
debugger
}
}
},
_enqueue: function(e, t, n) {
var r = this;
return r._locked ? (r._queue = r._queue || [],
r._queue.push([e, t, n])) : r._locked = !0,
r._queue && r._queue.length > 0
},
_dequeue: function() {
var e, t = this;
if (t._queue) {
while (e = t._queue.shift())
e[1].apply(e[0], e[2]);
t._queue = null
}
t._locked = !1
},
observed: function() {
return this._listeners.length > 0
},
observer: {
toString: function() {
var e = this._event._listeners.length;
return "[Event" + (e ? ": " + e + " listener" + (e == 1 ? "" : "s") : "") + "]"
},
on: function(e, t) {
var n = this._event;
if (n._enqueue(this, this._addListener, [e, t]))
return;
this._addListener(e, t),
n._dequeue()
},
_addListener: function(e, n) {
var r = this._event;
t(xt(e)),
r.adding && r.adding.call(r.context, e),
r._listeners.push(e),
r._modes.push(n),
r.added && r.added.call(r.context, e),
r._listeners.length == 1 && r.subscribed && r.subscribed.call(r.context)
},
off: function(e) {
var t = this._event;
if (t._enqueue(this, this._removeListener, [e]))
return;
this._removeListener(e),
t._dequeue()
},
_removeListener: function(e) {
var t = this._event
, n = $(t._listeners, e);
n >= 0 && (t._listeners.splice(n, 1),
t._modes.splice(n, 1),
t._listeners.length == 0 && t.unsubscribed && t.unsubscribed.call(t.context))
}
}
}),
Y(o.prototype, {
resolve: function(e) {
var t = this
, r = t._;
return n.state(r.state, "pending"),
r.value = e,
r.state = "resolved",
r.$state && r.$state._set(r.state),
r.promise.result = e,
t._complete()
},
reject: function(e) {
var t = this
, r = t._;
return n.state(r.state, "pending"),
r.value = e,
r.state = "rejected",
r.$state && r.$state._set(r.state),
r.promise.error = e,
t._complete()
},
_complete: function() {
var e = this
, t = e._;
t.status(null );
for (var n = 0; n < t.leafs.length; n++)
t.leafs[n]();
return t.fnCancel = null ,
e
}
}),
o.Promise = function(e) {
this.task = e,
Object.defineProperty(this, "state", {
get: this._getState
}),
Object.defineProperty(this, "status", {
get: this._getStatus
})
}
,
o.Promise.prototype = vt(Jt.prototype, {
_getState: function() {
var e = this.task._;
return e.$state || (e.$state = h({
value: e.state,
readOnly: !0
})),
e.$state
},
_getStatus: function() {
var e = this.task._;
return e.status.asReadOnly()
},
from: function(e) {
var t = this.task
, n = t._;
this.locked ? this.target.from(e) : (n.source = e,
n.source.then(function(e) {
t.resolve(e)
}, function(e) {
t.reject(e)
}, n.status),
n.fnCancel = function(e) {
n.source.cancel(e)
}
,
n.source.locked && (n.source.target = this))
},
cancel: function(e) {
var t = this.task
, r = t._;
n.state(r.state, "pending"),
r.fnCancel ? r.fnCancel(e) : t.reject(e)
},
then: function(e, t, n) {
function f() {
i.status.changed.off(l);
try {
if (i.state == "resolved")
s = xt(e) ? e(i.value) : i.value;
else {
if (!xt(t)) {
u.reject(i.value);
return
}
s = t(i.value)
}
} catch (n) {
u.reject(n);
return
}
It(s) ? u.promise.from(o.wait(s)) : u.resolve(s)
}
function l(e, t) {
i.state == "pending" && (u.status(e, t),
xt(n) && n(e, t))
}
function c(e) {
if (i.leafs.length < 2)
i.promise.cancel(e);
else {
J(i.leafs, $(i.leafs, a)),
i.status.changed.off(l);
try {
xt(t) ? u.promise.from(o.wait(t(e))) : u.reject(e)
} catch (n) {
u.reject(n)
}
}
}
var r = this.task, i = r._, s, u = o({
cancel: c
}), a = i.mode == "sync" ? f : V(R, f);
return i.state == "pending" ? (i.status.changed(l),
i.leafs.push(a)) : a(),
u.promise
}
}),
o.waitAny = function(e) {
function i(t) {
it(e, function(e) {
try {
e.cancel(t)
} catch (n) {}
})
}
var t = e.length
, n = o({
cancel: i
})
, r = n.promise;
return t == 1 ? r = o.wait(e[0]) : t == 0 ? n.reject(Error()) : it(e, function(r) {
r.then(function(e) {
t--,
n && (n.resolve(e),
n = null ,
i(N("CompetingTaskResolved")))
}, function(e) {
t--,
t || (n.reject(e),
n = null )
}, function() {
var t = dt(e, function(e, t) {
return e.status() || "#" + t
});
n.status(t.join(" || "))
})
}),
r
}
,
o.waitAll = function(e) {
function u(t) {
for (var n = 0; n < e.length; n++)
try {
e[n].state() == "pending" && e[n].cancel(t)
} catch (r) {
debugger
}
}
function a() {
var e = dt(s, function(e, t) {
return e.status() || "#" + t
});
r.status(ot(e).join(" && "))
}
var t = e.length
, n = []
, r = o({
cancel: u
})
, i = r.promise
, s = {};
return n.length = e.length,
t == 0 ? r.resolve([]) : t == 1 ? i = o.wait(e[0]).then(function(e) {
return [e]
}) : (it(e, function(t, n) {
s[n] = e[n] = o.wait(t)
}),
a(),
it(e, function(e, i) {
e.then(function(e) {
n[i] = e,
delete s[i],
a(),
t--,
t || (r.resolve(n),
r = null )
}, function(e) {
delete s[i],
t--,
r && (r.reject(e),
r = null ,
u(e))
}, a)
})),
i
}
,
o.wait = function(e, t) {
return Pt(e) ? e : It(e) ? Jt(V.call(e, e.then)) : o({
mode: t
}).resolve(e).promise
}
,
Y(Jt.prototype, {
"catch": function(e) {
return this.then(null , e || function() {}
)
},
"finally": function(e) {
return this.then(function(t) {
return o.wait(e()).then(function() {
return t
})
}, function(t) {
return o.wait(e()).then(function() {
throw t
})
})
}
}),
Y(Kt.prototype, {
then: function(e) {
var t = this.exec;
return Kt(function(n, r) {
var i = t(n, r);
return i && {
res: e(i.res),
pos: i.pos
}
})
},
select: function(e) {
return this.then(function(t) {
return t[e]
})
},
merge: function(e) {
return this.then(function(t) {
return t.join(e || "")
})
},
join: function(e, t) {
return this.then(function(n) {
var r, i = {};
for (r = 0; r < n.length; r++)
i[n[r][e]] = n[r][t];
return i
})
},
as: function(e) {
return this.then(function(t) {
var n, r = {};
for (n in e)
r[n] = t[e[n]];
return r
})
}
}),
u.encodeData = function(e) {
return encodeURIComponent(e).replace(/%20/gm, "+")
}
,
u.decodeData = function(e) {
return decodeURIComponent(e.replace(/\+/gm, " "))
}
,
u.pattern = function() {
var e = Gt(/[^()<>@,;:\\\x22/\[\]?=\s]+/)
, t = en(e, Qt("/"), e).merge()
, n = Gt(/[^\uffff]*/).then(u.decodeData)
, r = sn(Qt('"'), Qt('"'))
, i = en(Gt(/\s*=\s*/), tn(r, e)).select(1)
, s = en(Gt(/\s*;\s*/), e, Yt(i, !0));
return en(Qt("data:"), Yt(t), nn(s).join(1, 2), Gt(/\s*,\s*/), n).as({
mime: 1,
attributes: 2,
data: 4
})
}(),
a.prototype.toString = function() {
return "[object XmlNode]"
}
,
a.prototype.attr = function(e) {
return t(e in this.attrs, "Attribute does not exist: " + this.name() + "." + e),
this.attrs[e]
}
,
a.prototype.selectOne = function(e, n) {
var r = st(this.nodes, xt(e) ? e : function(t) {
var r, i;
if (n)
for (r in n) {
i = r.toLowerCase();
if (n[i] != t.attrs[i])
return !1
}
return t.name() == e.toLowerCase()
}
);
return t(r.length == 1, "Single node expected: " + e),
r[0]
}
,
a.pattern = function() {
var e, t = Gt(/[\x00-\x20]*/), n = Gt(/\x22[^\x22]*\x22/).then(function(e) {
return e.slice(1, -1)
}), r = Gt(/[^\s<>\x22]+/), s = tn(n, r).then(i), o = Gt(/[^<]+/m).then(i), u = Gt(/[\w\d:-]+/).then(function(e) {
return e.toLowerCase()
}), a = en(u, Yt(en(t, Qt("="), t, s).select(3))), f = rn(a, t).join(0, 1), l = en(Qt("<"), t, u, t, f, t, Qt(">")).as({
name: 2,
attrs: 4
}), c = en(Qt("<"), t, u, t, f, t, Qt("/>")).as({
name: 2,
attrs: 4
}), h = en(Qt("</"), t, u, t, Qt(">")).select(2), p = Kt(function(t, n) {
return e.exec(t, n)
}), d = en(l, nn(tn(p, o)), h).then(function(e) {
if (e[0].name == e[2])
return {
name: e[2],
nodes: e[1],
attrs: e[0].attrs
};
throw new SyntaxError("</" + e[2] + "> does not match <" + e[0].name + ">")
});
return e = tn(d, c)
}(),
f.pattern = function() {
var e = Gt(/[\s,]*/)
, t = Gt(/[^\s,=]+/)
, n = sn(Qt('"'), Qt('"'))
, r = en(t, Gt(/\s*=\s*/), n)
, i = rn(r, e).join(0, 2)
, s = en(t, e, i);
return rn(s, e).join(0, 2)
}(),
h.sUpdated = {},
h.prototype = function() {}
,
Y(h.prototype, {
constructor: h,
toString: function() {
return "[Property: value = " + this() + "]"
},
map: function(e) {
var t = this, n, r = h({
get: ln(function() {
return t.get().then(e)
}, t.get.enabled),
subscribed: function() {
n = t.subscribe()
},
unsubscribed: function() {
n.dispose()
}
});
return t.changed(function(t, n) {
r(e(t), n)
}),
r.asReadOnly()
},
when: function(e, t) {
function s(e, n, s) {
i(e) && t.call(r, n, s)
}
var n = this.changed
, r = {
dispose: function() {
n.off(s)
}
}
, i = xt(e) ? e : function(t) {
return t === e
}
;
return n(s),
r
},
once: function(e, t) {
return this.when(e, function() {
this.dispose(),
t.apply(null , arguments)
})
},
equals: function(e) {
return this.map(function(t) {
return t == e
})
},
equalsAny: function() {
var e = [].slice.call(arguments);
return this.map(function(t) {
return at(e, function(e) {
return e == t
})
})
},
fork: function(e) {
var t = this, n, r = e.enabled || mn(!0), i = r === mn(!1), s = h({
value: t(),
reason: t.reason,
readOnly: i,
set: !i && ln(function(n, r) {
return Wt(e)(n, r).then(function(e) {
return t.set(e, r)
})
}, r),
get: t.get.bind(t),
subscribed: function() {
n = t.subscribe()
},
unsubscribed: function() {
n.dispose()
}
});
return (t._forks = t._forks || []).push(s),
s
},
asReadOnly: function() {
var e = this;
return e._ro || (e._ro = e.fork(c())),
e._ro
},
observed: function() {
var e = this
, t = e._changed;
return t && t.observed()
},
subscribe: function() {
var e = this;
return e.subscribe = dn(e._subscribed, e._unsubscribed),
e.subscribe()
}
}),
Y(h.prototype, {
_set: function(e, t) {
var n = this, r = n._value, i, s = n._forks, o = n._changed;
if (!qt(e, r) || !qt(t, n.reason)) {
n._value = e,
n.reason = t,
o && o.fire(e, t, r);
if (s)
for (i = 0; i < s.length; i++)
s[i]._set(e, t)
}
return e
},
_getChanged: function() {
var e = this;
return e._changed || (e._changed = new s({
context: e,
added: e._listenerAdded
})),
e._changed.observer
},
_listenerAdded: function(e) {
var t = this
, n = t._value
, r = t.reason;
n !== void 0 && e(n, r)
},
_getAsync: Wt(function() {
var e = this
, t = e._getter
, n = e._value;
return t ? t.call(e, n, e.reason).then(function(t) {
return e._set(t, e.reason),
e._value
}) : n
}),
_setAsync: Wt(function(e, n) {
var r = this
, i = r._check
, s = r._setter;
return t(arguments.length > 0),
i && i(e),
s ? s.call(r, e, n).then(function(e) {
return r._set(e, n)
}) : r._set(e, n)
}, "sync"),
_write: function(e, t) {
var n = this
, r = n._check
, i = n._setter;
r && r(e);
if (!n.set.enabled())
throw Error("This is a read-only property.");
i && t !== h.sUpdated ? i.call(n, e, t).then(function(e) {
n._set(e, t)
}) : n._set(e, t)
}
}),
h.true = h({
value: !0,
readOnly: !0
}),
h.false = h({
value: !1,
readOnly: !0
}),
h.true.get.enabled = h.true,
h.true.set.enabled = h.false,
h.false.get.enabled = h.true,
h.false.set.enabled = h.false,
c.instance.enabled = h.false,
h.null = h({
value: null ,
readOnly: !0
}),
p.prototype = function() {}
,
Y(p.prototype, {
_init: function() {
var e = this;
Object.defineProperties(e, {
added: {
enumerable: !0,
get: e._initAddedEvent,
set: function(t) {
e._initAddedEvent(),
e._.added.observer = t
}
},
removed: {
enumerable: !0,
get: e._initRemovedEvent,
set: function(t) {
e._initRemovedEvent(),
e._.removed.observer = t
}
},
changed: {
enumerable: !0,
get: e._initChangedEvent,
set: function(t) {
e._initChangedEvent(),
e._.changed.observer = t
}
},
size: {
enumerable: !0,
get: e._initSizeProperty,
set: function(t) {
e._initSizeProperty(),
e._.size.observer = t
}
}
})
},
_initAddedEvent: function() {
var e = this, t = e._, n = "added", r;
return t[n] = t[n] || new s({
context: e,
adding: e._addedListenerAdding
}),
r = t[n].observer,
r
},
_addedListenerAdding: function(e) {
var t = this
, n = t._;
it(n.vals, function(t, r) {
e(t, n.keys[r], r)
})
},
_initRemovedEvent: function() {
var e = this, t = e._, n = "removed", r;
return t[n] = t[n] || new s,
r = t[n].observer,
r
},
_initChangedEvent: function() {
var e = this, t = e._, n = "changed", r;
return t[n] = t[n] || new s({
added: e._changedListenerAdded
}),
r = t[n].observer,
r
},
_changedListenerAdded: function(e) {
e()
},
_initSizeProperty: function() {
var e = this, t = e._, n = "size", r;
return t[n] = t[n] || gn(t.vals.length),
r = t[n].asReadOnly(),
r
},
subscribe: function() {
var e = this
, t = e._;
return e.subscribe = dn(t.subscribed, t.unsubscribed),
e.subscribe()
},
observed: function() {
var e = this._
, t = e.added
, n = e.removed
, r = e.changed;
return t && t.observed() || n && n.observed() || r && r.observed()
},
_insert: function(e, t, n) {
var r, i = this._, s = i.vals.length;
for (r = n; r < s; r++)
i.idxs[i.keys[r]]++;
K(i.vals, n, e),
K(i.keys, n, t),
i.idxs[t] = n
},
add: function(e, t, n) {
var r = this._
, i = r.vals.length;
t = t || (r.key || tt)(e);
if (t in r.idxs)
throw _(t);
return n = kt(n) ? n : i,
n < 0 && (n = 0),
n > i && (n = i),
this._insert(e, t, n),
r.size && r.size.inc(),
r.added && r.added.fire(e, t, n),
r.changed && r.changed.fire(),
t
},
remove: function(e) {
var t = this._, n, r, i;
kt(e) ? (n = e,
e = t.keys[n]) : n = t.idxs[e],
r = t.vals[n];
if (n >= 0 && n < t.vals.length) {
for (i = n + 1; i < t.keys.length; i++)
t.idxs[t.keys[i]]--;
J(t.vals, n),
J(t.keys, n),
delete t.idxs[e],
t.size && t.size.dec(),
t.removed && t.removed.fire(r, e, n),
t.changed && t.changed.fire()
}
},
_getFromCache: function(e) {
var t = this._;
return Et(e) ? t.vals[t.idxs[e]] : t.vals[e]
},
get: function(e) {
var t = this
, n = t._.get
, r = n && n().then(function(e) {
return t._setNewItems(e)
});
return o.wait(r).then(function() {
return Ct(e) ? t._asArray() : t._getFromCache(e)
})
},
index: function(e) {
return this._.idxs[e]
},
key: function(e) {
return this._.keys[e]
},
_setNewItems: function(e) {
var t = this, n = t._, r;
if (!yt(e))
return;
for (r in n.idxs)
(!(r in e) || n.vals[n.idxs[r]] !== e[r]) && t.remove(r);
for (r in e)
r in n.idxs || t.add(e[r], r)
},
empty: function() {
var e = this._, t;
if (e.removed)
for (t = 0; t < e.vals.length; t++)
e.removed.fire(e.vals[t], e.keys[t]);
e.vals = [],
e.keys = [],
e.idxs = {},
e.size && e.size(0),
e.changed && e.changed.fire()
},
_addArray: function(e) {
for (var t = 0; t < e.length; t++)
this.add(e[t])
},
_asArray: function() {
return this._.vals.slice(0)
},
asReadOnly: function() {
function n(e) {
return arguments.length == 0 ? t._asArray() : t._getFromCache(e)
}
var e = n
, t = this;
return F(e, t),
e._init(),
e.add = null ,
e.remove = null ,
e.empty = null ,
e
},
fork: function(e) {
function r(e) {
return jt(e) ? ln(Wt(e), e.enabled) : xt(e) ? cn(Wt(e)) : c(P())
}
function i(e) {
return arguments.length == 0 ? n() : n(e)
}
var t = i
, n = this;
return F(t, n),
Y(t, {
add: r(e.add),
remove: r(e.remove)
}),
t._init(),
t
},
asWritable: function(e) {
return this.fork(e)
}
}),
Y(p.prototype, {
constructor: p,
toString: function() {
return "[Collection: " + this.size() + " items]"
},
each: function(e) {
return this.added(e),
this.added.off(e),
this
},
contains: function(e) {
var t = !1;
return this.each(function(n) {
e(n) && (t = !0)
}),
t
},
observe: function(e) {
function s(e, t) {
r[t] = e,
delete i[t],
u()
}
function o(e, t) {
i[t] = e,
delete r[t],
u()
}
function u() {
t || (t = v(function() {
var n = r
, s = i;
r = {},
i = {},
t = null ,
e(n, s)
}, 0))
}
function a() {
t && (m(t),
t = null )
}
var t, n = this, r = {}, i = {};
return n.added(s),
n.removed(o),
{
dispose: function() {
a(),
n.added.off(s),
n.removed.off(o)
}
}
},
map: function(e) {
var t = this, n, r = p({
get: function(e) {
return t.get().then(function() {
return r(e)
})
},
subscribed: function() {
n = t.subscribe()
},
unsubscribed: function() {
n.dispose()
}
});
return t.added(function(t, n, i) {
r.add(e(t), n, i)
}),
t.removed(function(e, t) {
r.remove(t)
}),
r.asReadOnly()
},
filter: function(e) {
var t = this, n, r = p({
get: function(e) {
return t.get().then(function() {
return r(e)
})
},
subscribed: function() {
n = t.subscribe()
},
unsubscribed: function() {
n.dispose()
}
});
return t.added(function(n, i, s) {
var o, u, a;
if (!e(n))
return;
o = s + 1,
u = t.size();
while (o < u && !e(t(o)))
o++;
a = o < u ? r.index(t.key(o)) : r.size(),
r.add(n, i, a)
}),
t.removed(function(e, t) {
r.remove(t)
}),
r.asReadOnly()
},
sort: function(e) {
function i(t, n) {
return e(t, n) || !e(n, t)
}
var t = this, n, r = p({
get: function(e) {
return t.get().then(function() {
return r(e)
})
},
subscribed: function() {
n = t.subscribe()
},
unsubscribed: function() {
n.dispose()
}
});
return t.added(function(e, n, s) {
var o = r.size()
, u = 0;
while (u < o && !i(e, r(u)))
u++;
while (u < o && i(r(u), e) && t.index(r.key(u)) < s)
u++;
r.add(e, n, u)
}),
t.removed(function(e, t) {
r.remove(t)
}),
r.asReadOnly()
}
}),
p.empty = p().asReadOnly();
var Tn = function(t) {
function r(e) {
var t = function(t) {
return arguments.length == 0 ? (n[e] || "") + "" : (n[e] = (t || "") + "",
this)
}
;
return t.toString = function() {
return t()
}
,
t
}
var n;
if (!(e instanceof Tn))
return new Tn(t);
n = Tn.pattern.exec((t || "") + "");
if (!n)
throw new SyntaxError("Invalid URI: " + t);
e.scheme = r("scheme"),
e.user = r("user"),
e.host = r("host"),
e.port = r("port"),
e.path = r("path"),
e.query = r("query"),
e.hash = r("hash")
}
;
Tn.prototype.toString = function() {
function e(e, t) {
return t ? e + t : ""
}
var t = (this.user() ? this.user() + "@" : "") + (this.host() || "") + e(":", this.port());
return (this.scheme() ? this.scheme() + ":" : "") + e("//", t) + this.path() + e("?", this.query()) + e("#", this.hash())
}
,
Tn.pattern = {
regexp: /^(?:([a-zA-Z][\w+-.]*):)?(?:\/\/(?:([^/@]*)@)?([^:/?#]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,
exec: function(e) {
var t = this.regexp.exec(e);
return t && {
scheme: t[1],
user: t[2],
host: t[3],
port: t[4],
path: t[5],
query: t[6],
hash: t[7]
}
}
},
Tn.Query = function(e) {
if (!(this instanceof Tn.Query))
return new Tn.Query(e);
var t = this;
Et(e) ? it(e.split("&"), function(e) {
var n, r, i = e.indexOf("=");
i < 0 ? (n = e,
r = "") : (n = e.slice(0, i),
r = e.slice(i + 1)),
n && (t[decodeURIComponent(n)] = decodeURIComponent(r))
}) : e && it(mt(e), function(e, n) {
t[n] = e + ""
})
}
,
Tn.Query.prototype.toString = function() {
var e = [];
return it(mt(this), function(t, n) {
e.push(t ? encodeURIComponent(n) + "=" + encodeURIComponent(t) : encodeURIComponent(n))
}),
e.join("&")
}
;
var Nn = {
isInfo: V(At, 100, 199),
isSuccess: V(At, 200, 299),
isRedirection: V(At, 300, 399),
isClientError: V(At, 400, 499),
isServerError: V(At, 500, 599),
isError: V(At, 400, 599),
Unauthorized: 401,
ProxyAuthenticationRequired: 407,
ExpectationFailed: 417,
TooManyRequests: 429,
InternalServerError: 500
};
try {
return {
isPromise: Pt,
isCommand: jt,
isProperty: Bt,
isCollection: Ht,
command: ln,
disabledAsyncCommand: c,
disabledCommand: l,
enabledCommand: cn,
event: s,
async: Wt,
promise: Jt,
task: o,
collection: p,
property: h,
constProperty: mn,
boolProperty: yn,
numProperty: gn
}
} catch (Mn) {}
}();
return i
}),
define("jcafe-property-model", ["jcafe-property-model/lib/propertyModel"], function(e) {
return e
}),
define("jSkype/modelHelpers/signIn/parameterBuilder", ["require", "exports", "module", "cafe/enums", "lodash-compat"], function(e, t) {
var n = e("cafe/enums")
, r = e("lodash-compat");
t.createPasswordSignInParameter = function(e) {
if (!r.isString(e.username))
throw new Error("Username not defined");
if (!r.isString(e.password))
throw new Error("Password not defined");
return {
username: e.username,
password: e.password,
type: n.authType.Password
}
}
,
t.createImplicitOAuthSignInParameter = function(e) {
if (!r.isString(e.client_id))
throw new Error("client_id not defined");
return {
client_id: e.client_id,
type: n.authType.ImplicitOAuth
}
}
,
t.createTokenImplicitOAuthSignInParameter = function(e) {
if (!r.isString(e.client_id))
throw new Error("client_id not defined");
if (!r.isString(e.skypetoken))
throw new Error("skypetoken not defined");
if (!r.isString(e.rps_token))
throw new Error("rps_token not defined");
if (!r.isNumber(e.expires_in))
throw new Error("expires_in not defined");
return {
skypetoken: e.skypetoken,
rps_token: e.rps_token,
expires_in: e.expires_in,
client_id: e.client_id,
type: n.authType.ImplicitOAuth,
site_name: e.site_name
}
}
,
t.createGuestSignInParameter = function(e) {
if (!r.isString(e.displayName))
throw new Error("DisplayName not defined");
return {
displayName: e.displayName,
type: n.authType.Guest
}
}
,
t.createTokenSignInParameter = function(e) {
if (!r.isFunction(e.getToken))
throw new Error("getToken method is not defined");
return {
type: n.authType.Token,
getToken: e.getToken
}
}
}),
define("jSkype/modelHelpers/propertyModelHelper", ["require", "exports", "module", "jcafe-property-model"], function(e, t) {
var n = e("jcafe-property-model");
t.exposeReadOnlyCollection = function(e) {
function n(e, t) {
var n;
for (n = 0; n < e.size(); ++n)
if (t(e(n)))
return n;
return -1
}
var t = e.asReadOnly();
return t._add = e.add,
t._remove = e.remove,
t._removeAll = e.empty,
t._removeByCondition = function(t) {
var r = n(e, t);
r >= 0 && e.remove(r)
}
,
t
}
,
t.createPropertyWithSetter = function(e, t, r) {
var i = n.property({
value: !!r
})
, s = n.command(t, i)
, o = n.property({
value: e,
set: s
});
return o.set._enabled = i,
o
}
,
t.createCommandWithSetter = function(e, t) {
var r = n.command(e, t);
return r._enabled = t,
r
}
,
t.createResolvedPromise = function(e) {
var t = n.task();
return t.resolve(e),
t.promise
}
,
t.createRejectedPromise = function(e) {
var t = n.task();
return t.reject(e),
t.promise
}
,
t.createCancellablePromiseFunction = function(e, n) {
return function() {
return n() ? t.createRejectedPromise() : e()
}
}
}),
define("jSkype/modelHelpers/signIn/handlers/token", ["require", "exports", "module", "jSkype/modelHelpers/propertyModelHelper"], function(e, t) {
function r(e) {
if (e && e.getToken)
return {
getToken: e.getToken
};
throw "Unknown signIn parameter"
}
var n = e("jSkype/modelHelpers/propertyModelHelper");
t.handler = function(e) {
return n.createResolvedPromise(r(e))
}
}),
define("jSkype/modelHelpers/signIn/handlers/password", ["require", "exports", "module", "jSkype/modelHelpers/propertyModelHelper"], function(e, t) {
function r() {
return {
getToken: function() {
return !0
}
}
}
var n = e("jSkype/modelHelpers/propertyModelHelper");
t.handler = function() {
return n.createResolvedPromise(r())
}
}),
function() {
typeof SKYPE == "undefined" && (window.SKYPE = {}),
SKYPE.login = SKYPE.login || {},
SKYPE.login.Silent = function() {
var e = {
pre: "https://prelogin.skype.net",
qa: "https://qalogin.skype.net",
live: "https://login.skype.com"
}, t = {
pre: "https://a.pre.lw.skype.net",
qa: "https://a.qa.lw.skype.net",
live: "https://a.lw.skype.com"
}, n = "/login/silent", r = "1.0", i = null , s, o, u = {}, a = 2e4, f = null , l = null , c = "", h = !1, p = !1, d = null , v = {
env: "live",
client_id: null ,
redirect_uri: null ,
microsoft: !1,
use_azure: !1
}, m = function(e, t) {
d === null && (d = window.location.host.match(/^(pre|qa).*\.net$/) || document.cookie.indexOf("debug") > -1 || window.location.search.indexOf("debug") > -1);
if (!d)
return;
try {
if (typeof t == "object") {
var n = [];
for (var r in t)
r === "skypetoken" ? n.push(r + ": " + "<HIDDEN>") : n.push(r + ": " + JSON.stringify(t[r]));
e += " - " + n.join(", ")
} else
typeof t == "string" && (e += " - " + t);
e = "[silentlogin.js] - " + e
} catch (i) {}
}
, g = function(e) {
m("Received message from " + e.origin);
if (!l || e.origin !== l)
return;
var t = e.data;
if (typeof e.data == "string")
try {
t = JSON.parse(e.data)
} catch (n) {}
m("Message data", t);
var r = t.state || null ;
if (c !== r) {
m("State " + r + " doesn't match the last submitted state " + c);
return
}
window.clearTimeout(f),
u = {};
for (var i in t)
t.hasOwnProperty(i) && (u[i] = t[i]);
S()
}
, y = function(e) {
b(),
typeof s == "undefined" && (s = document.body || document.head || document.getElementsByTagName("head")[0]),
i = document.createElement("iframe"),
i.frameBorder = 0,
i.width = "1px",
i.height = "1px",
i.style.display = "none",
i.style.visibility = "hidden",
i.id = "silentLoginFrame" + Math.floor(Math.random() * 10 + 1),
i.setAttribute("tabindex", -1),
i.setAttribute("src", e),
s.appendChild(i),
m("Created iFrame: " + e)
}
, b = function() {
i && (s.removeChild(i),
i = null )
}
, w = function() {
if (!v.client_id)
throw "[silentlogin.js] client_id not initialized. Call init() first.";
v.redirect_uri || (v.redirect_uri = window.location.protocol + "//" + window.location.host + window.location.pathname)
}
, E = function() {
return "postMessage" in window && typeof JSON == "object" && JSON.parse
}
, S = function() {
m("Calling callback function", u),
p = !1,
typeof o == "function" && o(u)
}
, x = function() {
b(),
u = {},
u.error = "timeout",
S()
}
, T = function(e) {
var t = [];
for (var n in e)
e.hasOwnProperty(n) && t.push(encodeURIComponent(n) + "=" + encodeURIComponent(e[n]));
return t.join("&")
}
, N = function() {
var i = (new Date).getTime()
, s = e;
c = "silentloginsdk_" + i;
var o = {
response_type: "postmessage",
client_id: v.client_id,
redirect_uri: v.redirect_uri,
state: c,
_accept: r,
_nc: i
};
return v.microsoft && (o.partner = "999",
s = v.use_azure ? t : e),
l = s[v.env] || s.live,
l + n + "?" + T(o)
}
, C = function(e) {
if (typeof e == "object") {
e = e || {},
e.hasOwnProperty("callback") && k(e.callback);
for (var t in v)
e.hasOwnProperty(t) && (v[t] = e[t])
}
return h || (h = !0,
window.addEventListener ? window.addEventListener("message", g, !1) : window.attachEvent("onmessage", g)),
this
}
, k = function(e) {
return typeof e == "function" && (o = e),
this
}
, L = function() {
if (p)
return;
w(),
p = !0;
if (!E()) {
u = {
error: "unsupported_browser"
},
S();
return
}
window.clearTimeout(f),
f = window.setTimeout(x, a),
y(N())
}
, A = function() {
return u.skypetoken || null
}
, O = function() {
return u
}
;
return {
init: C,
setCallback: k,
load: L,
getSkypetoken: A,
getFullResponse: O
}
}()
}(),
define("silentLogin", function(e) {
return function() {
var t, n;
return t || e.SKYPE.login.Silent
}
}(this)),
define("jSkype/settings", ["require", "exports", "module"], function(e, t) {
t.settings = {
flagsApiUrl: "",
userOptionsService: {
host: "",
optionsEndpoint: ""
},
contactsProxyService: {},
stratusService: {
host: "",
avatarUrl: ""
},
peopleService: {
appId: "",
settingsEndpoint: ""
},
profileService: {
appId: "",
profileEndpoint: ""
}
},
t.isFeatureOn = function(e) {
return t.settings.featureFlags ? Boolean(t.settings.featureFlags[e]) : !1
}
}),
define("jSkype/modelHelpers/signIn/handlers/implicitOAuth", ["require", "exports", "module", "lodash-compat", "silentLogin", "jSkype/settings", "constants/common"], function(e, t) {
function u(e) {
return !!e.skypetoken && !!e.expires_in && !!e.rps_token
}
function a(e) {
var t = Promise.resolve(c(n.clone(e)));
return f(e),
t
}
function f(e) {
delete e.skypetoken,
delete e.expires_in,
delete e.rps_token,
delete e.site_name
}
function l(e) {
var t = new Promise(function(t, n) {
function o(e) {
e && e.skypetoken ? t(c(e)) : n(e || "unknown_error")
}
r.init({
env: i.settings.xcoEnv,
client_id: e.client_id,
microsoft: !0,
use_azure: i.isFeatureOn(s.featureFlags.USE_AZURE_BASED_SILENT_LOGIN)
}),
r.setCallback(o),
r.load()
}
);
return t
}
function c(e) {
function r() {
return e.skypetoken
}
function i() {
var r = e.expires_in;
return n.isNumber(r) ? t + h(r) : t + h(o)
}
function s() {
return e.rps_token
}
function u() {
return e.site_name
}
var t = Date.now();
return {
getToken: r,
getExpiryTime: i,
getRpsToken: s,
getSiteName: u
}
}
function h(e) {
return e * 1e3
}
var n = e("lodash-compat")
, r = e("silentLogin")
, i = e("jSkype/settings")
, s = e("constants/common")
, o = 3600;
t.handler = function(e) {
var t;
return u(e) ? t = a(e) : t = l(e),
t
}
}),
define("jSkype/modelHelpers/signIn/handlers", ["require", "exports", "module", "cafe/enums", "jSkype/modelHelpers/signIn/handlers/token", "jSkype/modelHelpers/signIn/handlers/password", "jSkype/modelHelpers/signIn/handlers/implicitOAuth"], function(e, t, n) {
var r = e("cafe/enums")
, i = e("jSkype/modelHelpers/signIn/handlers/token").handler
, s = e("jSkype/modelHelpers/signIn/handlers/password").handler
, o = e("jSkype/modelHelpers/signIn/handlers/implicitOAuth").handler;
n.exports = {},
n.exports[r.authType.Token] = i,
n.exports[r.authType.Password] = s,
n.exports[r.authType.ImplicitOAuth] = o
}),
define("jSkype/modelHelpers/signIn/skypeTokenManager", ["require", "exports", "module", "jcafe-property-model", "jSkype/modelHelpers/signIn/handlers", "cafe/enums"], function(e, t) {
function o(e) {
function a() {
return t && !f() ? l() : p()
}
function f() {
return o === i.authType.ImplicitOAuth ? Date.now() >= t.getExpiryTime() - s : !1
}
function l() {
var e = {};
return e.token = t.getToken ? t.getToken() : undefined,
o === i.authType.ImplicitOAuth && (e.rpsToken = t.getRpsToken(),
e.siteName = t.getSiteName()),
e
}
function c(e) {
d(e),
this.resolve(l())
}
function h(e) {
this.reject(e)
}
function p() {
var t = r[o]
, i = n.task();
return o && t ? t(e).then(c.bind(i), h.bind(i)) : i.reject("Unknown sign in parameters"),
i.promise
}
function d(e) {
e && (t = e)
}
e = e || {};
var t, o = e.type || null , u = n.property({
get: a
});
return {
get: u.get.bind(u)
}
}
var n = e("jcafe-property-model")
, r = e("jSkype/modelHelpers/signIn/handlers")
, i = e("cafe/enums")
, s = 6e5;
t.build = function(e) {
return new o(e)
}
}),
define("jSkype/models/location", ["require", "jcafe-property-model"], function(e) {
function n() {
this.type = t.property({
readOnly: !0
}),
this.street = t.property({
readOnly: !0
}),
this.city = t.property({
readOnly: !0
}),
this.state = t.property({
readOnly: !0
}),
this.country = t.property({
readOnly: !0
}),
this.postalCode = t.property({
readOnly: !0
})
}
var t = e("jcafe-property-model");
return n
}),
define("jSkype/models/capabilities", ["require", "jcafe-property-model"], function(e) {
function n() {
this.chat = t.property({
value: !1,
readOnly: !0
}),
this.audio = t.property({
value: !1,
readOnly: !0
}),
this.video = t.property({
value: !1,
readOnly: !0
}),
this.groupAdd = t.property({
value: !1,
readOnly: !0
}),
this.screenSharing = t.property({
value: !1,
readOnly: !0
}),
this.dataCollaboration = t.property({
value: !1,
readOnly: !0
}),
this._groupChat = t.property({
value: !1,
readOnly: !0
})
}
var t = e("jcafe-property-model");
return n
}),
define("jSkype/models/phoneNumber", ["require", "jcafe-property-model"], function(e) {
function n() {
this.type = t.property({
readOnly: !0
}),
this.telUri = t.property({
readOnly: !0
}),
this.displayString = t.property({
readOnly: !0
})
}
var t = e("jcafe-property-model");
return n
}),
define("jSkype/modelHelpers/contacts/dataMappers/dataMaps", ["require", "exports", "module", "cafe/enums"], function(e, t) {
var n = e("cafe/enums");
t.contactTypeNames = {
agent: "agent",
lync: "lync",
msn: "msn",
skype: "skype",
pstn: "pstn"
},
t.phoneTypeKeys = {
Home: "0",
Work: "1",
Cell: "2",
Other: "3"
},
t.contactTypes = {},
t.contactTypes[t.contactTypeNames.agent] = "28",
t.contactTypes[t.contactTypeNames.lync] = "2",
t.contactTypes[t.contactTypeNames.msn] = "1",
t.contactTypes[t.contactTypeNames.skype] = "8",
t.contactTypes[t.contactTypeNames.pstn] = "4",
t.phoneTypes = {},
t.phoneTypes[t.phoneTypeKeys.Home] = n.phoneType.Home,
t.phoneTypes[t.phoneTypeKeys.Work] = n.phoneType.Work,
t.phoneTypes[t.phoneTypeKeys.Cell] = n.phoneType.Cell,
t.phoneTypes[t.phoneTypeKeys.Other] = n.phoneType.Other
}),
define("jSkype/services/stratus/serviceSettings", ["require", "exports", "module", "jSkype/settings", "constants/common"], function(e, t) {
function i(e) {
return "${" + e + "}"
}
var n = e("jSkype/settings")
, r = e("constants/common");
t.getHost = function() {
return n.settings.stratusService.host
}
,
t.getAvatarEndPoint = function(e) {
return t.getHost() + n.settings.stratusService.avatarUrl.replace(t.tokens.contactId, encodeURIComponent(e))
}
,
t.getAvatarUpdateEndPoint = function(e) {
return n.settings.stratusService.avatarUpdateUrl.replace(t.tokens.contactId, e)
}
,
t.getProfileEndPoint = function() {
return n.settings.stratusService.profileEndpoint
}
,
t.getProfilesEndPoint = function() {
return n.settings.stratusService.profilesEndpoint
}
,
t.getProfilesEndPointV2 = function() {
return n.settings.stratusService.batchProfilesEndpoint
}
,
t.getUserInfoEndPoint = function() {
return n.settings.stratusService.userInfoEndpoint
}
,
t.getContactsEndPoint = function() {
return n.settings.stratusService.contactsEndpoint
}
,
t.getBlockContactEndpoint = function(e) {
return n.settings.stratusService.blockContactEndpoint.replace(t.tokens.contactId, encodeURIComponent(e))
}
,
t.getUnblockContactEndpoint = function(e) {
return n.settings.stratusService.unblockContactEndpoint.replace(t.tokens.contactId, encodeURIComponent(e))
}
,
t.getDeleteContactEndpoint = function(e) {
return n.settings.stratusService.deleteContactEndpoint.replace(t.tokens.contactId, encodeURIComponent(e))
}
,
t.getContactRequestEndpoint = function() {
return n.settings.stratusService.contactRequestEndpoint
}
,
t.getTimeIntervalForContactRequests = function() {
return n.settings.stratusService.contactRequestTimeInterval
}
,
t.getDelayForFirstContactRequest = function() {
return n.settings.stratusService.firstContactRequestDelay
}
,
t.getDirectorySearchEndpoint = function(e) {
return n.isFeatureOn(r.featureFlags.DIRECTORY_SEARCH_SKYPE_AND_LYNC) ? n.settings.stratusService.directorySearchEndpoint.replace(t.tokens.keyword, encodeURIComponent(e)) : n.settings.stratusService.directorySearchEndpointSkypeOnly.replace(t.tokens.keyword, encodeURIComponent(e))
}
,
t.getDirectorySearchByIdEndpoint = function(e) {
return n.settings.stratusService.directorySearchByIdEndpoint.replace(t.tokens.skypeName, encodeURIComponent(e))
}
,
t.getRetryPolicy = function() {
return n.settings.stratusService.retry
}
,
t.tokens = {
id: i("id"),
contactId: i("contactId"),
version: i("version"),
keyword: i("keyword"),
skypeName: i("skypeName"),
reason: i("reason")
}
}),
define("constants/people", [], function() {
var e = {
SELF: "self",
ECHO_CONTACT_ID: "echo123",
searchLimit: 20,
contactTypes: {
USER: "8",
AGENT: "28",
PSTN: "4"
},
contactList: {
className: {
LOCAL: "people",
DIRECTORY: "directory"
}
},
contactPicker: {
states: {
STATE_DEFAULT: "default",
STATE_SEARCH: "search"
}
},
authorizationStates: {
UNKNOWN: "UNKNOWN",
UNAUTHORIZED: "UNAUTHORIZED",
PENDING_OUTGOING: "PENDING_OUTGOING",
PENDING_INCOMING: "PENDING_INCOMING",
AUTHORIZED: "AUTHORIZED",
SUGGESTED: "SUGGESTED"
},
showStrategies: {
AVAILABLE_ONLY: "AVAILABLE_ONLY",
AGENTS_ONLY: "AGENTS_ONLY"
},
contactPageTabIds: {
AVAILABLE_TAB: "availableTab",
ALL_CONTACTS_TAB: "allContactsTab",
AGENTS_TAB: "agentsTab"
},
scopes: {
FULL: "full"
}
};
return e
}),
define("jSkype/constants/people", {
SELF: "self",
SUGGESTED_CONTACT_ACTIVITY_MESSAGE: "Skype",
batch: {
MAX_ITEMS: 100,
MAX_DELAY: 500
},
contactList: {
retry: {
TIMEOUT: 3e4
}
},
endpoints: {
MOBILE: "isMobile"
},
authorizationStates: {
UNKNOWN: "UNKNOWN",
UNAUTHORIZED: "UNAUTHORIZED",
PENDING_OUTGOING: "PENDING_OUTGOING",
PENDING_INCOMING: "PENDING_INCOMING",
AUTHORIZED: "AUTHORIZED",
SUGGESTED: "SUGGESTED"
}
}),
define("jSkype/modelHelpers/personHelper", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/dataMaps", "jSkype/services/stratus/serviceSettings", "constants/people", "jSkype/constants/people"], function(e, t) {
function f(e) {
return e.match(u)
}
function l(e, i) {
return t.isPstnId(e) ? c(e, r.contactTypes.pstn) : n(r.contactTypes).values().contains(i) ? c(e, i) : c(e, r.contactTypes.skype)
}
function c(e, t) {
return t + ":" + e
}
var n = e("lodash-compat")
, r = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps")
, i = e("jSkype/services/stratus/serviceSettings")
, s = e("constants/people")
, o = e("jSkype/constants/people").authorizationStates
, u = /^(?:(\d+):)+/
, a = /^guest:/;
t.getId = function(e) {
if (n.isString(e))
return e.replace(u, "")
}
,
t.getKey = function(e, t) {
if (n.isString(e))
return f(e) ? e : l(e, t)
}
,
t.getAvatarUri = function(e) {
if (n.isString(e))
return i.getAvatarEndPoint(e)
}
,
t.isGuest = function(e) {
return a.test(e.id())
}
,
t.isGuestId = function(e) {
return a.test(e)
}
,
t.getTypeFromKey = function(e) {
var t = u.exec(e);
if (t)
return t[1]
}
,
t.isPstn = function(e) {
return !!e.phoneNumbers.size() && e.id() === e.phoneNumbers(0).telUri()
}
,
t.isPstnId = function(e) {
return /^(\+)?\d+$/.test(e)
}
,
t.isEchoContact = function(e) {
return t.isEchoContactId(e.id())
}
,
t.isEchoContactId = function(e) {
return e === s.ECHO_CONTACT_ID
}
,
t.canRequestContactAuthorization = function(e) {
return !t.isPstn(e) && !e.isBlocked()
}
,
t.canAddToChatServiceContactList = function(e) {
return e._authorization() === o.AUTHORIZED && !e.isBlocked() && !t.isPstn(e) && !t.isEchoContact(e)
}
,
t.canRemoveContactFromChatServiceContactList = function(e) {
return !t.isPstn(e) && !t.isEchoContact(e)
}
}),
define("jSkype/services/contacts/serviceSettings", ["require", "exports", "module", "jSkype/settings"], function(e, t) {
function r(e, n, r, i) {
return i = i || t.reasons.default,
e.replace(t.tokens.id, encodeURIComponent(n)).replace(t.tokens.version, r).replace(t.tokens.reason, i)
}
function i(e) {
return t.name + "-" + e
}
function s(e) {
return "${" + e + "}"
}
var n = e("jSkype/settings");
t.getHost = function() {
return n.settings.contactsProxyService.host
}
,
t.getMyContactsEndpoint = function(e, t, i) {
return r(n.settings.contactsProxyService.myContactsEndpoint, e, t, i)
}
,
t.getMyDeltaContactsEndpoint = function(e, t, i) {
return r(n.settings.contactsProxyService.myDeltaContactsEndpoint, e, t, i)
}
,
t.getDeleteContactEndpoint = function(e, r, i, s) {
return n.settings.contactsProxyService.deleteContactEndpoint.replace(t.tokens.version, s).replace(t.tokens.id, encodeURIComponent(e)).replace(t.tokens.contactType, i).replace(t.tokens.contactId, r)
}
,
t.getRetryPolicy = function() {
return n.settings.contactsProxyService.retry
}
,
t.name = "CBLProxy",
t.version = "v1",
t.actions = {
getMyContacts: i("getMyContacts"),
deleteContact: i("deleteContact")
},
t.reasons = {
"default": "default",
notification: "notification"
},
t.tokens = {
id: s("id"),
contactId: s("contactId"),
contactType: s("contactType"),
version: s("version"),
reason: s("reason")
}
}),
define("jSkype/services/webapi/serviceSettings", ["require", "exports", "module", "jSkype/settings"], function(e, t) {
var n = e("jSkype/settings");
t.getHost = function() {
return n.settings.webApiServiceHost
}
}),
define("jSkype/services/entitlement/serviceSettings", ["require", "exports", "module", "jSkype/settings"], function(e, t) {
function r(e) {
return t.name + "-" + e
}
function i(e) {
return "${" + e + "}"
}
var n = e("jSkype/settings");
t.getHost = function() {
return n.settings.entitlementService.host
}
,
t.getEntitlementListingEndpoint = function(e) {
return n.settings.entitlementService.listingEndpoint.replace(t.tokens.username, encodeURIComponent(e))
}
,
t.getEntitlementServiceEndpoint = function(e, r) {
return n.settings.entitlementService.serviceEndpoint.replace(t.tokens.username, encodeURIComponent(e)).replace(t.tokens.service, r)
}
,
t.getRetryPolicy = function() {
return n.settings.entitlementService.retry
}
,
t.name = "Entitlement",
t.version = "3.0",
t.serviceNames = {
credit: "pstn"
},
t.actions = {
getEntitlementService: r("getEntitlementService")
},
t.tokens = {
username: i("username"),
service: i("service")
}
}),
!function(e, t, n) {
typeof module != "undefined" && module.exports ? module.exports = n() : typeof define == "function" && define.amd ? define("reqwest/reqwest", n) : t[e] = n()
}("reqwest", this, function() {
function succeed(e) {
var t = protocolRe.exec(e.url);
return t = t && t[1] || context.location.protocol,
httpsRe.test(t) ? twoHundo.test(e.request.status) : !!e.request.response
}
function handleReadyState(e, t, n) {
return function() {
if (e._aborted)
return n(e.request);
if (e._timedOut)
return n(e.request, "Request is aborted: timeout");
e.request && e.request[readyState] == 4 && (e.request.onreadystatechange = noop,
succeed(e) ? t(e.request) : n(e.request))
}
}
function setHeaders(e, t) {
var n = t.headers || {}, r;
n.Accept = n.Accept || defaultHeaders.accept[t.type] || defaultHeaders.accept["*"];
var i = typeof FormData != "undefined" && t.data instanceof FormData;
!t.crossOrigin && !n[requestedWith] && (n[requestedWith] = defaultHeaders.requestedWith),
!n[contentType] && !i && (n[contentType] = t.contentType || defaultHeaders.contentType);
for (r in n)
n.hasOwnProperty(r) && "setRequestHeader" in e && e.setRequestHeader(r, n[r])
}
function setCredentials(e, t) {
typeof t.withCredentials != "undefined" && typeof e.withCredentials != "undefined" && (e.withCredentials = !!t.withCredentials)
}
function generalCallback(e) {
lastValue = e
}
function urlappend(e, t) {
return e + (/\?/.test(e) ? "&" : "?") + t
}
function handleJsonp(e, t, n, r) {
var i = uniqid++
, s = e.jsonpCallback || "callback"
, o = e.jsonpCallbackName || reqwest.getcallbackPrefix(i)
, u = new RegExp("((^|\\?|&)" + s + ")=([^&]+)")
, a = r.match(u)
, f = doc.createElement("script")
, l = 0
, c = navigator.userAgent.indexOf("MSIE 10.0") !== -1;
return a ? a[3] === "?" ? r = r.replace(u, "$1=" + o) : o = a[3] : r = urlappend(r, s + "=" + o),
context[o] = generalCallback,
f.type = "text/javascript",
f.src = r,
f.async = !0,
typeof f.onreadystatechange != "undefined" && !c && (f.htmlFor = f.id = "_reqwest_" + i),
f.onload = f.onreadystatechange = function() {
if (f[readyState] && f[readyState] !== "complete" && f[readyState] !== "loaded" || l)
return !1;
f.onload = f.onreadystatechange = null ,
f.onclick && f.onclick(),
t(lastValue),
lastValue = undefined,
head.removeChild(f),
l = 1
}
,
head.appendChild(f),
{
abort: function() {
f.onload = f.onreadystatechange = null ,
n({}, "Request is aborted: timeout", {}),
lastValue = undefined,
head.removeChild(f),
l = 1
}
}
}
function getRequest(e, t) {
var n = this.o, r = (n.method || "GET").toUpperCase(), i = typeof n == "string" ? n : n.url, s = n.processData !== !1 && n.data && typeof n.data != "string" ? reqwest.toQueryString(n.data) : n.data || null , o, u = !1;
return (n["type"] == "jsonp" || r == "GET") && s && (i = urlappend(i, s),
s = null ),
n["type"] == "jsonp" ? handleJsonp(n, e, t, i) : (o = n.xhr && n.xhr(n) || xhr(n),
o.open(r, i, n.async === !1 ? !1 : !0),
setHeaders(o, n),
setCredentials(o, n),
context[xDomainRequest] && o instanceof context[xDomainRequest] ? (o.onload = e,
o.onerror = t,
o.onprogress = function() {}
,
u = !0) : o.onreadystatechange = handleReadyState(this, e, t),
n.before && n.before(o),
u ? setTimeout(function() {
o.send(s)
}, 200) : o.send(s),
o)
}
function Reqwest(e, t) {
this.o = e,
this.fn = t,
init.apply(this, arguments)
}
function setType(e) {
if (e === null )
return undefined;
if (e.match("json"))
return "json";
if (e.match("javascript"))
return "js";
if (e.match("text"))
return "html";
if (e.match("xml"))
return "xml"
}
function init(o, fn) {
function complete(e) {
o.timeout && clearTimeout(self.timeout),
self.timeout = null ;
while (self._completeHandlers.length > 0)
self._completeHandlers.shift()(e)
}
function success(resp) {
var type = o.type || resp && setType(resp.getResponseHeader("Content-Type"));
resp = type !== "jsonp" ? self.request : resp;
var filteredResponse = globalSetupOptions.dataFilter(resp.responseText, type)
, r = filteredResponse;
try {
resp.responseText = r
} catch (e) {}
if (r)
switch (type) {
case "json":
try {
resp = context.JSON ? context.JSON.parse(r) : eval("(" + r + ")")
} catch (err) {
return error(resp, "Could not parse JSON in response", err)
}
break;
case "js":
resp = eval(r);
break;
case "html":
resp = r;
break;
case "xml":
resp = resp.responseXML && resp.responseXML.parseError && resp.responseXML.parseError.errorCode && resp.responseXML.parseError.reason ? null : resp.responseXML
}
self._responseArgs.resp = resp,
self._fulfilled = !0,
fn(resp),
self._successHandler(resp);
while (self._fulfillmentHandlers.length > 0)
resp = self._fulfillmentHandlers.shift()(resp);
complete(resp)
}
function timedOut() {
self._timedOut = !0,
self.request.abort()
}
function error(e, t, n) {
e = self.request,
self._responseArgs.resp = e,
self._responseArgs.msg = t,
self._responseArgs.t = n,
self._erred = !0;
while (self._errorHandlers.length > 0)
self._errorHandlers.shift()(e, t, n);
complete(e)
}
this.url = typeof o == "string" ? o : o.url,
this.timeout = null ,
this._fulfilled = !1,
this._successHandler = function() {}
,
this._fulfillmentHandlers = [],
this._errorHandlers = [],
this._completeHandlers = [],
this._erred = !1,
this._responseArgs = {};
var self = this;
fn = fn || function() {}
,
o.timeout && (this.timeout = setTimeout(function() {
timedOut()
}, o.timeout)),
o.success && (this._successHandler = function() {
o.success.apply(o, arguments)
}
),
o.error && this._errorHandlers.push(function() {
o.error.apply(o, arguments)
}),
o.complete && this._completeHandlers.push(function() {
o.complete.apply(o, arguments)
}),
this.request = getRequest.call(this, success, error)
}
function reqwest(e, t) {
return new Reqwest(e,t)
}
function normalize(e) {
return e ? e.replace(/\r?\n/g, "\r\n") : ""
}
function serial(e, t) {
var n = e.name, r = e.tagName.toLowerCase(), i = function(e) {
e && !e.disabled && t(n, normalize(e.attributes.value && e.attributes.value.specified ? e.value : e.text))
}
, s, o, u, a;
if (e.disabled || !n)
return;
switch (r) {
case "input":
/reset|button|image|file/i.test(e.type) || (s = /checkbox/i.test(e.type),
o = /radio/i.test(e.type),
u = e.value,
(!s && !o || e.checked) && t(n, normalize(s && u === "" ? "on" : u)));
break;
case "textarea":
t(n, normalize(e.value));
break;
case "select":
if (e.type.toLowerCase() === "select-one")
i(e.selectedIndex >= 0 ? e.options[e.selectedIndex] : null );
else
for (a = 0; e.length && a < e.length; a++)
e.options[a].selected && i(e.options[a])
}
}
function eachFormElement() {
var e = this, t, n, r = function(t, n) {
var r, i, s;
for (r = 0; r < n.length; r++) {
s = t[byTag](n[r]);
for (i = 0; i < s.length; i++)
serial(s[i], e)
}
}
;
for (n = 0; n < arguments.length; n++)
t = arguments[n],
/input|select|textarea/i.test(t.tagName) && serial(t, e),
r(t, ["input", "select", "textarea"])
}
function serializeQueryString() {
return reqwest.toQueryString(reqwest.serializeArray.apply(null , arguments))
}
function serializeHash() {
var e = {};
return eachFormElement.apply(function(t, n) {
t in e ? (e[t] && !isArray(e[t]) && (e[t] = [e[t]]),
e[t].push(n)) : e[t] = n
}, arguments),
e
}
function buildParams(e, t, n, r) {
var i, s, o, u = /\[\]$/;
if (isArray(t))
for (s = 0; t && s < t.length; s++)
o = t[s],
n || u.test(e) ? r(e, o) : buildParams(e + "[" + (typeof o == "object" ? s : "") + "]", o, n, r);
else if (t && t.toString() === "[object Object]")
for (i in t)
buildParams(e + "[" + i + "]", t[i], n, r);
else
r(e, t)
}
var context = this;
if ("window" in context)
var doc = document
, byTag = "getElementsByTagName"
, head = doc[byTag]("head")[0];
else {
var XHR2;
try {
XHR2 = require("xhr2")
} catch (ex) {
throw new Error("Peer dependency `xhr2` required! Please npm install xhr2")
}
}
var httpsRe = /^http/, protocolRe = /(^\w+):\/\//, twoHundo = /^(20\d|1223)$/, readyState = "readyState", contentType = "Content-Type", requestedWith = "X-Requested-With", uniqid = 0, callbackPrefix = "reqwest_" + +(new Date), lastValue, xmlHttpRequest = "XMLHttpRequest", xDomainRequest = "XDomainRequest", noop = function() {}
, isArray = typeof Array.isArray == "function" ? Array.isArray : function(e) {
return e instanceof Array
}
, defaultHeaders = {
contentType: "application/x-www-form-urlencoded",
requestedWith: xmlHttpRequest,
accept: {
"*": "text/javascript, text/html, application/xml, text/xml, */*",
xml: "application/xml, text/xml",
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
js: "application/javascript, text/javascript"
}
}, xhr = function(e) {
if (e.crossOrigin === !0) {
var t = context[xmlHttpRequest] ? new XMLHttpRequest : null ;
if (t && "withCredentials" in t)
return t;
if (context[xDomainRequest])
return new XDomainRequest;
throw new Error("Browser does not support cross-origin requests")
}
return context[xmlHttpRequest] ? new XMLHttpRequest : XHR2 ? new XHR2 : new ActiveXObject("Microsoft.XMLHTTP")
}
, globalSetupOptions = {
dataFilter: function(e) {
return e
}
};
return Reqwest.prototype = {
abort: function() {
this._aborted = !0,
this.request.abort()
},
retry: function() {
init.call(this, this.o, this.fn)
},
then: function(e, t) {
return e = e || function() {}
,
t = t || function() {}
,
this._fulfilled ? this._responseArgs.resp = e(this._responseArgs.resp) : this._erred ? t(this._responseArgs.resp, this._responseArgs.msg, this._responseArgs.t) : (this._fulfillmentHandlers.push(e),
this._errorHandlers.push(t)),
this
},
always: function(e) {
return this._fulfilled || this._erred ? e(this._responseArgs.resp) : this._completeHandlers.push(e),
this
},
fail: function(e) {
return this._erred ? e(this._responseArgs.resp, this._responseArgs.msg, this._responseArgs.t) : this._errorHandlers.push(e),
this
},
"catch": function(e) {
return this.fail(e)
}
},
reqwest.serializeArray = function() {
var e = [];
return eachFormElement.apply(function(t, n) {
e.push({
name: t,
value: n
})
}, arguments),
e
}
,
reqwest.serialize = function() {
if (arguments.length === 0)
return "";
var e, t, n = Array.prototype.slice.call(arguments, 0);
return e = n.pop(),
e && e.nodeType && n.push(e) && (e = null ),
e && (e = e.type),
e == "map" ? t = serializeHash : e == "array" ? t = reqwest.serializeArray : t = serializeQueryString,
t.apply(null , n)
}
,
reqwest.toQueryString = function(e, t) {
var n, r, i = t || !1, s = [], o = encodeURIComponent, u = function(e, t) {
t = "function" == typeof t ? t() : t == null ? "" : t,
s[s.length] = o(e) + "=" + o(t)
}
;
if (isArray(e))
for (r = 0; e && r < e.length; r++)
u(e[r].name, e[r].value);
else
for (n in e)
e.hasOwnProperty(n) && buildParams(n, e[n], i, u);
return s.join("&").replace(/%20/g, "+")
}
,
reqwest.getcallbackPrefix = function() {
return callbackPrefix
}
,
reqwest.compat = function(e, t) {
return e && (e.type && (e.method = e.type) && delete e.type,
e.dataType && (e.type = e.dataType),
e.jsonpCallback && (e.jsonpCallbackName = e.jsonpCallback) && delete e.jsonpCallback,
e.jsonp && (e.jsonpCallback = e.jsonp)),
new Reqwest(e,t)
}
,
reqwest.ajaxSetup = function(e) {
e = e || {};
for (var t in e)
globalSetupOptions[t] = e[t]
}
,
reqwest
}),
define("reqwest", ["reqwest/reqwest"], function(e) {
return e
}),
define("jSkype/services/serviceAccessLayer/builders/uriBuilder", [], function() {
function e() {
var e = {
fqdn: null ,
resource: null ,
queryParams: null
};
this.build = function() {
var t = e.fqdn;
return t += e.resource !== null ? e.resource : "",
t += e.queryParams !== null ? r(e.queryParams) : "",
t
}
,
this.setDomain = function(t) {
var n = typeof t == "string";
if (!n || t === "")
throw new TypeError("domain must be a string");
e.fqdn = t
}
,
this.setResource = function(t) {
e.fqdn.substring(0, 6) === "skype:" ? e.resource = t : e.resource = n(e.fqdn, t)
}
,
this.setQueryParams = function(t) {
var n = {}.toString.call(t) === "[object Object]";
if (!n && t !== undefined)
throw new Error("queryParams must be an object");
e.queryParams = t || {}
}
}
function t(e) {
var t = /^ *$/;
if (e !== null && e !== undefined)
return e.toString().replace(t, "")
}
function n(e, t) {
var n = "/"
, r = t[0] === n;
return e[e.length - 1] === n ? t = r ? t.substring(1) : t : t = r ? t : n + t,
t
}
function r(e) {
function i(r) {
var i = t(e[r]);
i && n.push(r + "=" + i)
}
var n = []
, r = "";
for (var s in e)
e.hasOwnProperty(s) && i(s);
return n.length > 0 && (r = "?" + n.join("&")),
r
}
return e
}),
define("jSkype/services/serviceAccessLayer/builders/headerBuilder", [], function() {
function e() {
var e = {};
this.get = function(t) {
return t ? e[t] : e
}
,
this.set = function(t, n) {
var r = /\s/;
if (!t || !n)
throw new Error('incorrect number of arguments supplied - expecting "key" and "value"');
if (typeof t != "string" || typeof n != "string")
throw new TypeError('"key" and "value" arguments must be of type String');
if (r.test(t))
throw new SyntaxError("header name cannot contain any whitespace");
e[t] = n
}
,
this.populate = function(e) {
function r() {
for (var t in e)
e.hasOwnProperty(t) && n.set(t, e[t])
}
var n = this;
t(e) && r()
}
,
this.build = function(t) {
function n() {
for (var n in e)
e.hasOwnProperty(n) && t(n, e[n])
}
if (typeof t != "function")
throw new TypeError("argument must be a callback function");
n()
}
}
function t(e) {
var t = {}.toString.call(e) === "[object Object]";
return !!e && t
}
return e
}),
define("jSkype/services/serviceAccessLayer/builders/factory", ["require", "jSkype/services/serviceAccessLayer/builders/uriBuilder", "jSkype/services/serviceAccessLayer/builders/headerBuilder"], function(e) {
var t = e("jSkype/services/serviceAccessLayer/builders/uriBuilder")
, n = e("jSkype/services/serviceAccessLayer/builders/headerBuilder")
, r = {
uriBuilder: function() {
return new t
},
headerBuilder: function() {
return new n
}
}
, i = {
get: function(e) {
var t = r[e];
if (typeof t == "function")
return t()
}
};
return i
}),
define("vendor/i18n/plurals", [], function() {
function e() {
function u(e, i) {
i || (i = s);
var u, a = null , f = "";
for (u in o)
o[u].languages.indexOf(i) !== -1 && (a = u);
switch (a) {
case "group0":
f = e === 1 ? t : n;
break;
case "group1":
f = e === 1 ? t : r;
break;
case "group2":
f = e > 1 ? r : t;
break;
case "group3":
f = e % 10 === 1 && e % 100 !== 11 ? t : e === 0 ? n : r;
break;
case "group4":
f = e === 1 || e === 11 ? t : e === 2 || e === 12 ? n : r;
break;
case "group5":
f = e === 1 ? t : e === 0 || e % 100 > 0 && e % 100 < 20 ? n : r;
break;
case "group6":
f = e % 10 === 1 && e % 100 !== 11 ? t : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? r : n;
break;
case "group7":
f = e % 10 === 1 && e % 100 !== 11 ? t : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? n : r;
break;
case "group8":
f = e === 1 ? t : e >= 2 && e <= 4 ? n : r;
break;
case "group9":
f = e === 1 ? t : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? n : r;
break;
case "group11":
f = e === 1 ? t : e >= 2 && e <= 10 ? n : r;
break;
case "group12":
f = e === 1 ? t : e === 2 ? n : r;
break;
default:
f = ""
}
return f
}
function a(e) {
s = e
}
var e, t = "", n = "_few", r = "_many", i = {
af: "af",
am: "am",
ar: "ar",
as: "as",
az: "az",
be: "be",
bg: "bg",
bn: "bn",
bs: "bs",
chr: "chr",
ca: "ca",
cs: "cs",
cy: "cy",
da: "da",
de: "de",
el: "el",
en: "en",
es: "es",
et: "et",
eu: "eu",
fa: "fa",
fi: "fi",
fil: "fil",
fr: "fr",
ga: "ga",
gd: "gd",
gl: "gl",
gu: "gu",
ha: "ha",
he: "he",
hi: "hi",
hr: "hr",
hu: "hu",
hy: "hy",
id: "id",
ig: "ig",
is: "is",
it: "it",
iw: "iw",
ja: "ja",
ka: "ka",
kk: "kk",
km: "km",
kn: "kn",
ko: "ko",
kok: "kok",
ku: "ku",
ky: "ky",
lb: "lb",
lt: "lt",
lv: "lv",
mi: "mi",
ml: "ml",
mn: "mn",
mr: "mr",
ms: "ms",
ne: "ne",
nl: "nl",
nn: "nn",
nb: "nb",
no: "no",
nso: "nso",
or: "or",
pa: "pa",
pl: "pl",
prs: "prs",
pt_br: "pt-br",
pt_pt: "pt-pt",
qps: "qps",
qut: "qut",
quz: "quz",
ro: "ro",
ru: "ru",
rw: "rw",
sd: "sd",
si: "si",
sl: "sl",
sk: "sk",
sq: "sq",
sr: "sr",
sv: "sv",
sw: "sw",
ta: "ta",
te: "te",
tg: "tg",
th: "th",
ti: "ti",
tk: "tk",
tn: "tn",
tr_tr: "tr-tr",
tt: "tt",
ug: "ug",
uk: "uk",
ur: "ur",
uz: "uz",
vi: "vi",
wo: "wo",
xh: "xh",
yo: "yo",
zh: "zh",
zu: "zu"
}, s = i.en, o = {
group0: {
languages: [i.ja, i.id, i.ko, i.tr_tr, i.vi, i.zh, i.az, i.ig, i.fa, i.ka, i.km, i.kn, i.ms, i.prs, i.th, i.tt, i.ug, i.wo, i.yo]
},
group1: {
languages: [i.bg, i.ca, i.cy, i.da, i.de, i.el, i.en, i.es, i.et, i.fi, i.he, i.hu, i.it, i.iw, i.nb, i.nl, i.no, i.pt_pt, i.qps, i.sv, i.af, i.as, i.bn, i.chr, i.eu, i.gl, i.gu, i.ha, i.hy, i.is, i.kk, i.kok, i.ku, i.ky, i.lb, i.mi, i.ml, i.mn, i.mr, i.ne, i.nn, i.or, i.pa, i.qut, i.quz, i.rw, i.sd, i.si, i.sq, i.sw, i.ta, i.te, i.tk, i.tn, i.ur, i.xh, i.zu]
},
group2: {
languages: [i.fr, i.pt_br, i.am, i.fil, i.hi, i.nso, i.tg, i.ti, i.uz]
},
group3: {
languages: [i.lv]
},
group4: {
languages: [i.gd]
},
group5: {
languages: [i.ro]
},
group6: {
languages: [i.lt]
},
group7: {
languages: [i.ru, i.uk, i.hr, i.sr, i.be, i.bs, i.sl]
},
group8: {
languages: [i.cs, i.sk]
},
group9: {
languages: [i.pl]
},
group11: {
languages: [i.ga]
},
group12: {
languages: [i.ar]
}
};
return e = {
getPluralSuffix: u,
setLocale: a,
pluralizationLocale: i
},
e
}
return new e
}),
define("vendor/i18n/resources", ["require", "exports", "module", "lodash-compat"], function(e, t) {
function i(e) {
if (!e)
throw new Error("[i18n / resources] Specified destination for localizations resources is not reachable")
}
var n = e("lodash-compat")
, r = {};
t.set = function(e) {
i(e),
r = e
}
,
t.merge = function(e) {
i(e),
r = n.merge(r, e)
}
,
t.get = function() {
return r
}
}),
define("vendor/i18n/localization", ["require", "exports", "module", "vendor/i18n/plurals", "vendor/i18n/resources"], function(e, t) {
function i(e) {
var t = r.get()
, n = t && t[e] || e;
return n
}
var n = e("vendor/i18n/plurals")
, r = e("vendor/i18n/resources");
t.fetch = function(e) {
if (typeof e != "object")
throw new Error("[i18n / localization] Argument must be type of object");
var t = e.key, r, s, o, u, a;
if (!t)
throw new Error("[i18n / localization] Missing key");
r = i(t),
e.count !== undefined && (s = e.count,
e.params = e.params || {},
e.params.count = s,
o = n.getPluralSuffix(s, e.locale),
t += o);
if (e.params) {
r = i(t);
for (u in e.params)
if (e.params.hasOwnProperty(u)) {
a = e.params[u];
if (typeof a == "function")
throw new Error("[i18n / localization] Replacement value must not be a function");
r = r.replace(new RegExp("{" + u + "}","g"), a)
}
}
return r
}
}),
define("services/g11n/default", [], function() {
return {
calendar: {
days: {
names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
namesAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
},
months: {
names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
namesAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
},
firstDay: 0
},
time: {
AM: "am",
PM: "pm",
separator: ":",
format: {
duration: "mm:ss",
"short": "h:mm tt",
"long": "h:mm:ss tt"
}
},
date: {
separator: "/",
format: {
dayMonth: "M/d",
dayMonthYear: "M/d/yy",
dayAbbr: "dAbbr",
dayName: "dName",
dateAbbr: "mAbbr d yyyy",
shortDateAbbr: "mAbbr d"
}
},
dir: "ltr"
}
}),
define("services/g11n/formatter", [], function() {
function n(e) {
return /HH|H|hh|h/.test(e)
}
function r(e) {
return /mm|m/.test(e)
}
var e = /dName|dAbbr|mName|mAbbr|dd|d|MM|M|yyyy|yy|HH|H|hh|h|mm|m|tt|ss|s|'[^']*'|'[^']*'/g
, t = function(t, n, r) {
var i = r.calendar
, s = r.time
, o = i.days
, u = i.months;
return n.replace(e, function(e) {
var n;
switch (e) {
case "dName":
n = o.names[t.getDay()];
break;
case "dAbbr":
n = o.namesAbbr[t.getDay()];
break;
case "mName":
n = u.names[t.getMonth()];
break;
case "mAbbr":
n = u.namesAbbr[t.getMonth()];
break;
case "tt":
n = t.getHours() < 12 ? s.AM : s.PM;
break;
case "yyyy":
n = t.getFullYear();
break;
case "yy":
n = t.getFullYear() % 100;
break;
case "d":
n = t.getDate();
break;
case "dd":
n = t.getDate(),
n.toString().length === 1 && (n = "0" + n);
break;
case "M":
n = t.getMonth() + 1;
break;
case "MM":
n = t.getMonth() + 1,
n.toString().length === 1 && (n = "0" + n);
break;
case "h":
n = t.getHours() % 12 || 12;
break;
case "hh":
n = t.getHours() % 12 || 12,
n.toString().length === 1 && (n = "0" + n);
break;
case "H":
n = t.getHours();
break;
case "HH":
n = t.getHours(),
n.toString().length === 1 && (n = "0" + n);
break;
case "m":
n = t.getMinutes();
break;
case "mm":
n = t.getMinutes(),
n.toString().length === 1 && (n = "0" + n);
break;
case "s":
n = t.getSeconds();
break;
case "ss":
n = t.getSeconds(),
n.toString().length === 1 && (n = "0" + n)
}
return n !== undefined ? n : e.slice(1, e.length - 1)
})
}
, i = function(t, i) {
var s, o;
return n(i) && (s = Math.floor(t / 60 / 60),
t -= s * 60 * 60),
r(i) && (o = Math.floor(t / 60),
t -= o * 60),
i.replace(e, function(e) {
var n;
switch (e) {
case "h":
n = s;
break;
case "hh":
n = s,
n.toString().length === 1 && (n = "0" + n);
break;
case "H":
n = s;
break;
case "HH":
n = s,
n.toString().length === 1 && (n = "0" + n);
break;
case "m":
n = o;
break;
case "mm":
n = o,
n.toString().length === 1 && (n = "0" + n);
break;
case "s":
n = t;
break;
case "ss":
n = t,
n.toString().length === 1 && (n = "0" + n)
}
return n !== undefined ? n : e.slice(1, e.length - 1)
})
}
;
return {
formatDate: t,
formatDuration: i
}
}),
define("browser/document", [], function() {
return document
}),
define("services/g11n/globalization", ["require", "exports", "module", "services/g11n/default", "services/g11n/formatter", "browser/document"], function(e, t) {
function s(e, t) {
e.dir || (e.dir = t)
}
var n = e("services/g11n/default")
, r = e("services/g11n/formatter")
, i = e("browser/document");
t.init = function(e) {
n = e
}
,
t.initLocaleDirection = function(e) {
var t = i.documentElement;
t.dir ? s(e, t.dir) : n.dir && s(e, n.dir)
}
,
t.formatDate = function(e, t) {
var i = n.time.format[t];
i || (i = n.date.format[t]);
if (!i)
throw new Error("No format found with a key:" + t + "in settings of:" + n.locale);
return r.formatDate(e, i, n)
}
,
t.formatDuration = function(e, t) {
var i = n.time.format[t];
if (!i)
throw new Error("No format found with a key:" + t + "in settings of:" + n.locale);
return r.formatDuration(e, i)
}
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-pubsub/lib/pubSub", ["require", "exports"], e)
}(function(e, t) {
function n(e) {
for (var t in e)
if (!e[t])
throw new Error(t + " is mandatory")
}
function r(e, t) {
return t && t.indexOf(e) >= 0
}
function i(e, t) {
if (!t || !r(e, t))
return;
t.splice(t.indexOf(e), 1)
}
var s = function() {
function e() {
this.callbacks = {}
}
return e.prototype.subscribe = function(e, t) {
n({
eventName: e,
callback: t
}),
this.callbacks[e] = this.callbacks[e] || [],
r(t, this.callbacks[e]) || this.callbacks[e].push(t)
}
,
e.prototype.unsubscribe = function(e, t) {
n({
eventName: e,
callback: t
});
var r = this.callbacks[e];
i(t, r)
}
,
e.prototype.publish = function(e, t) {
n({
eventName: e
});
if (this.callbacks[e]) {
var r = this.callbacks[e].slice(0);
for (var i = r.length - 1; i >= 0; i--)
r[i](t)
}
}
,
e.prototype.unsubscribeAll = function() {
this.callbacks = {}
}
,
e
}();
t.__esModule = !0,
t["default"] = s
}),
define("swx-pubsub", ["swx-pubsub/lib/pubSub"], function(e) {
return e
}),
define("services/pubSub/pubSub", ["require", "lodash-compat", "swx-pubsub"], function(e) {
var t = e("lodash-compat")
, n = e("swx-pubsub").default
, r = new n;
return t.bindAll(r, "subscribe", "unsubscribe", "publish", "unsubscribeAll"),
r
}),
define("utils/chat/dateTime", ["require", "vendor/i18n/localization", "services/g11n/globalization", "constants/common", "browser/window", "services/pubSub/pubSub"], function(e) {
function d(e) {
return e === 0 || e > 0
}
function v(e, t) {
var r = p.getDate(e);
return n.formatDate(r, t)
}
function m(e, t) {
var n = l.time.SHORT
, r = e < E(6, t)
, i = e < t;
return r ? n = l.date.DAY_MONTH : i && (n = l.date.DAY_ABBREVIATION),
n
}
function g(e) {
var t = p.getDate(e).getFullYear()
, n = p.getDate().getFullYear();
return t === n ? l.date.SHORT_DATE_ABBREVIATION : l.date.DATE_ABBREVIATION
}
function y() {
var e = p.getDate()
, t = e.getTime()
, n = e.setHours(24, 0, 0, 0);
return n - t
}
function b() {
var e = p.getDate();
e.setHours(0, 0, 0, 0);
var t = h < e;
return t && (h = e),
t
}
function w() {
i.setTimeout(function() {
b() && s.publish(c),
w()
}, y() + o)
}
function E(e, t) {
var n = t ? p.getDate(t) : p.getDate()
, r = n.setDate(n.getDate() - e);
return p.getDate(r).setHours(0, 0, 0, 0)
}
var t = e("vendor/i18n/localization"), n = e("services/g11n/globalization"), r = e("constants/common"), i = e("browser/window"), s = e("services/pubSub/pubSub"), o = 1e3, u = o * 60, a = u * 60, f = a * 24, l = r.globalizationFormatKeys, c = r.events.system.DATE_CHANGED, h, p;
return p = {
amNotifyingDayChange: !1,
now: function() {
return i.Date.now()
},
getDate: function() {
return arguments.length === 1 ? new i.Date(arguments[0]) : new i.Date
},
formatDate: function(e) {
return d(e) ? v(e, g(e)) : ""
},
formatTimestampShort: function(e) {
return d(e) ? v(e, l.time.SHORT) : ""
},
formatTimestamp: function(e, t) {
if (d(e)) {
var n = t || this.getMidnight(p.getDate().getTime())
, r = m(e, n);
return v(e, r)
}
return ""
},
getDateGroup: function(e) {
if (d(e)) {
var r = p.getDate(e)
, i = this.getMidnight(e)
, s = p.getDate().setHours(0, 0, 0, 0)
, o = E(1)
, u = E(7);
return i === s ? t.fetch({
key: "today"
}) : i === o ? t.fetch({
key: "yesterday"
}) : i < u ? t.fetch({
key: "olderThanAWeek"
}) : n.formatDate(r, l.date.DAY_NAME)
}
return ""
},
getMidnight: function(e) {
return d(e) ? p.getDate(e).setHours(0, 0, 0, 0) : 0
},
formatCallDuration: function(e) {
return n.formatDuration(e, l.time.CALL_DURATION)
},
notifyOnDayChange: function() {
this.amNotifyingDayChange || (this.amNotifyingDayChange = !0,
h = p.getDate(),
h.setHours(0, 0, 0, 0),
w())
},
getTimeSinceTimestamp: function(e, n) {
n = n || {},
n.now = n.now || p.now(),
n.key = n.key || "duration";
if (d(e) && d(n.now)) {
var r = n.now - e;
return Math.floor(r / f) > 0 ? t.fetch({
key: n.key + "_days",
count: Math.floor(r / f),
params: n.params
}) : Math.floor(r / a) > 0 ? t.fetch({
key: n.key + "_hours",
count: Math.floor(r / a),
params: n.params
}) : Math.floor(r / u) > 0 ? t.fetch({
key: n.key + "_minutes",
count: Math.floor(r / u),
params: n.params
}) : t.fetch({
key: n.key + "_moment",
params: n.params
})
}
return ""
}
},
p
}),
define("jSkype/services/serviceAccessLayer/decorations/retry", ["require", "exports", "module", "lodash-compat", "jSkype/settings", "utils/chat/dateTime"], function(e, t) {
function o(e) {
return i.now() - e
}
function u(e, t) {
return e < t && r.settings.retry.enabled
}
function a(e, t, n) {
return t === s.INCREMENTAL ? n * e : t === s.EXPONENTIAL ? Math.pow(2, e - 1) * n : n
}
function f(e, t, r, i) {
function s() {
e(++t)
}
n.delay(s, a(t, r, i))
}
function l() {
return !1
}
var n = e("lodash-compat")
, r = e("jSkype/settings")
, i = e("utils/chat/dateTime")
, s = {
INCREMENTAL: "incremental",
EXPONENTIAL: "exponential",
FIXED: "fixed"
};
r.settings.retry = r.settings.retry || {},
t.STRATEGIES = s,
t.build = function(t, n) {
var a = n.limit || r.settings.retry.limit || 1
, c = n.delay || r.settings.retry.delay || 1e3
, h = n.strategy || r.settings.retry.strategy || s.FIXED
, p = n.isTransientCheck || l
, d = n.isSuccessCheck || l;
return function(n) {
return new Promise(function(e, r) {
function s(i) {
t(n).then(function(t) {
e(l(t, i))
}, function(t) {
if (d(t)) {
var n = {
request: t
};
e(l(n, i))
} else
u(i, a) && p(t) ? f(s, i, h, c) : r(l(t, i))
})
}
function l(e, t) {
return t > 1 && (e.retryCount = t,
e.ttc = o(v)),
e
}
var v = i.now();
s(1)
}
)
}
}
}),
define("jSkype/services/serviceAccessLayer/decorations/availability", ["require", "exports", "module", "lodash-compat"], function(e, t) {
function r(e, t) {
var r = n.clone(e);
return r.url = t,
r
}
function i(e, t) {
return e < t
}
function s() {
return !1
}
var n = e("lodash-compat");
t.build = function(t, n) {
var o = n.alternateUrls || []
, u = n.isTransientCheck || s;
return function(n) {
function f() {
return Promise.resolve(t(r(n, a[s])))
}
function l(e) {
if (!i(++s, a.length) || !u(e))
throw e;
f(s).catch(l)
}
var s = 0
, a = [n.url].concat(o);
return f(s).catch(l)
}
}
}),
define("jSkype/services/serviceAccessLayer/serviceQosReporter", ["require", "exports", "module", "lodash-compat", "jSkype/client", "jSkype/settings"], function(e, t) {
function o() {
function u(r, i, s) {
if (o === 0 || !r)
return !1;
s = s || {};
var u = r;
n.forIn(s, function(e, t) {
l(t) && (u += t + e)
}),
t[u] || (t[u] = {
total: 0,
success: 0,
serviceName: r,
payload: s
}),
i && t[u].success++,
t[u].total++,
e++,
e >= o && (a(),
t = {},
e = 0)
}
function a() {
Object.keys(t).forEach(function(e) {
var t = f(e);
r.get()._telemetryManager.sendEvent(i.settings.telemetry.jSkypeTenantToken, s, t)
})
}
function f(e) {
var r = t[e].success
, i = t[e].total
, s = t[e].serviceName
, o = t[e].payload
, u = i - r
, a = Math.round(r / i * 100)
, f = {
service_id: s,
qos: a.toString(),
success_count: r.toString(),
failure_count: u.toString()
};
return n.forIn(o, function(e, t) {
l(t) && e && (f[t] = e.toString())
}),
f
}
function l(e) {
return !n.includes(["serviceName", "service_id", "success_count", "failure_count"], e)
}
var e = 0
, t = {}
, o = i.settings.serviceQosReporter.iterationCountBeforeFlushingQoSMetrics;
this.reportSuccess = function(t, n) {
return u(t, !0, n)
}
,
this.reportFail = function(t, n) {
return u(t, !1, n)
}
}
var n = e("lodash-compat")
, r = e("jSkype/client")
, i = e("jSkype/settings")
, s = "service_qos";
t.build = function() {
return new o
}
}),
define("jSkype/services/serviceAccessLayer/serviceQosReporterFacade", ["require", "exports", "module", "jSkype/services/serviceAccessLayer/serviceQosReporter"], function(e, t) {
var n = e("jSkype/services/serviceAccessLayer/serviceQosReporter")
, r = null ;
t.getInstance = function() {
return r || (r = n.build()),
r
}
}),
define("telemetry/chat/telemetryEnumerator", ["require", "constants/common", "cafe/enums"], function(e) {
function r() {
function u(t, n) {
if (t === 0)
return e.enums.CONVERSATION.ZERO;
if (t === 1)
return e.enums.CONVERSATION.ONE;
if (t === 2)
return e.enums.CONVERSATION.TWO;
if (t === 3)
return e.enums.CONVERSATION.THREE;
if (t === 4)
return e.enums.CONVERSATION.FOUR;
if (t === 5)
return e.enums.CONVERSATION.FIVE;
if (t > 5 && t <= 10)
return e.enums.CONVERSATION.LESS_10;
if (t > 10 && t <= 15)
return e.enums.CONVERSATION.LESS_15;
if (t > 15 && t <= 20)
return e.enums.CONVERSATION.LESS_20;
if (t > 20 && t <= 50)
return e.enums.CONVERSATION.LESS_50;
if (n && t > 50)
return Math.round(t / 50) + e.enums.CONVERSATION.MORE_50;
if (t > 50 && t <= 100)
return e.enums.CONVERSATION.LESS_100;
if (t > 100)
return Math.round(t / 100) + e.enums.CONVERSATION.MORE_100
}
function a(e) {
return Math.round(e / 1e3)
}
var e = this
, r = 6e4
, i = 60 * r
, s = 24 * i
, o = t.telemetry.NOT_AVAILABLE;
e.enums = {
GROUP_TYPE: {
ZERO: "zero",
ONE: "1",
TWO: "2",
LESS_5: "3-5",
LESS_10: "5-10",
LESS_25: "10-25",
LESS_50: "25-50",
LESS_100: "50-100",
MORE_100: "x100"
},
TIMEDELTA: {
MIN_1: "1MIN",
MIN_5: "5MIN",
MIN_10: "10MIN",
MIN_30: "30MIN",
HOUR_1: "1HOUR",
HOUR_3: "3HOUR",
HOUR_6: "6HOUR",
HOUR_9: "9HOUR",
HOUR_12: "12HOUR",
HOUR_18: "18HOUR",
HOUR_24: "24HOUR",
DAYS: "DAY"
},
CONTACTS: {
ZERO: "zero",
LESS_5: "1-5",
LESS_10: "5-10",
LESS_25: "10-25",
LESS_50: "25-50",
LESS_100: "50-100",
LESS_150: "100-150",
LESS_200: "150-200",
MORE_200: "x200"
},
CONVERSATION: {
ZERO: "zero",
ONE: "1",
TWO: "2",
THREE: "3",
FOUR: "4",
FIVE: "5",
LESS_10: "5-10",
LESS_15: "10-15",
LESS_20: "15-20",
LESS_50: "20-50",
MORE_50: "x50",
LESS_100: "50-100",
MORE_100: "x100"
},
LIFETIME: {
MIN: "1MIN",
LESS_5MIN: "5MIN",
LESS_10MIN: "10MIN",
LESS_20MIN: "20MIN",
LESS_1HOUR: "1hour",
LESS_1DAY: "1DAY",
LESS_2DAYS: "2DAYS",
LESS_4DAYS: "3_4_DAYS",
LESS_6DAYS: "5_6_DAYS",
LESS_14DAYS: "7_14_DAYS",
LESS_21DAYS: "15_21_DAYS",
LESS_29DAYS: "22_29_DAYS"
},
URL_CONTENT_TYPE: {
YOUTUBE: "YT",
GIF: "GIF",
TWITTER: "TWIT",
OTHER: "WWW"
},
URL_POSITION: {
URL_ONLY: "URL",
TEXT_WITH_URL: "URL_MID",
TEXT_ENDING_WITH_URL: "URL_END"
},
DURATION: {
NA: "n/a",
ZERO: "0SEC",
ONE: "1SEC",
TWO: "2SEC",
THREE: "3SEC",
FOUR: "4SEC",
FIVE: "5SEC",
LESS_10: "5-10SEC",
MORE_10: "x10SEC"
},
NET_CODE: {
OK: {
START: 200,
END: 399
},
ERROR: {
START: 400,
END: 599
}
},
FILE_TYPE_GROUP: {
PICTURE: "picture",
VIDEO: "video",
AUDIO: "audio",
OFFICE: "office",
ARCHIVE: "archive",
BINARY: "binary",
PDF: "pdf",
OTHER: "other"
}
},
e.getFileTypeGroup = function(t) {
switch (t) {
case "png":
case "jpg":
case "gif":
case "bmp":
case "tiff":
return e.enums.FILE_TYPE_GROUP.PICTURE;
case "avi":
case "mp4":
case "mkv":
case "wmv":
case "m4v":
return e.enums.FILE_TYPE_GROUP.VIDEO;
case "mp3":
case "cda":
case "m4a":
case "wav":
return e.enums.FILE_TYPE_GROUP.AUDIO;
case "xls":
case "xlsx":
case "xlsm":
case "doc":
case "docx":
case "ppt":
case "pptx":
return e.enums.FILE_TYPE_GROUP.OFFICE;
case "zip":
case "rar":
case "ace":
case "7z":
case "dmg":
return e.enums.FILE_TYPE_GROUP.ARCHIVE;
case "exe":
case "msi":
case "iso":
return e.enums.FILE_TYPE_GROUP.BINARY;
case "pdf":
return e.enums.FILE_TYPE_GROUP.PDF;
default:
return e.enums.FILE_TYPE_GROUP.OTHER
}
}
,
e.getDurationGroup = function(t) {
if (t <= r)
return e.enums.TIMEDELTA.MIN_1;
if (t > r && t <= 5 * r)
return e.enums.TIMEDELTA.MIN_5;
if (t > 5 * r && t <= 10 * r)
return e.enums.TIMEDELTA.MIN_10;
if (t > 10 * r && t <= 30 * r)
return e.enums.TIMEDELTA.MIN_30;
if (t > 30 * r && t <= i)
return e.enums.TIMEDELTA.HOUR_1;
if (t > i && t <= 3 * i)
return e.enums.TIMEDELTA.HOUR_3;
if (t > 3 * i && t <= 6 * i)
return e.enums.TIMEDELTA.HOUR_6;
if (t > 6 * i && t <= 9 * i)
return e.enums.TIMEDELTA.HOUR_9;
if (t > 9 * i && t <= 12 * i)
return e.enums.TIMEDELTA.HOUR_12;
if (t > 12 * i && t <= 18 * i)
return e.enums.TIMEDELTA.HOUR_18;
if (t > 18 * i && t <= 24 * i)
return e.enums.TIMEDELTA.HOUR_24;
if (t > s)
return Math.round(t / s) + e.enums.TIMEDELTA.DAYS
}
,
e.getParticipantCountGroup = function(t) {
if (t === 0)
return e.enums.GROUP_TYPE.ZERO;
if (t === 1)
return e.enums.GROUP_TYPE.ONE;
if (t === 2)
return e.enums.GROUP_TYPE.TWO;
if (t > 2 && t <= 5)
return e.enums.GROUP_TYPE.LESS_5;
if (t > 5 && t <= 10)
return e.enums.GROUP_TYPE.LESS_10;
if (t > 10 && t <= 25)
return e.enums.GROUP_TYPE.LESS_25;
if (t > 25 && t <= 50)
return e.enums.GROUP_TYPE.LESS_50;
if (t > 50 && t <= 100)
return e.enums.GROUP_TYPE.LESS_100;
if (t > 100)
return Math.round(t / 100) + e.enums.GROUP_TYPE.MORE_100
}
,
e.getMessageType = function(e) {
switch (e.model.type()) {
case n.activityType.TextMessage:
if (e.previews) {
var t = e.previews();
if (t.length > 0)
return t[0].type()
}
return n.activityType.TextMessage;
case n.activityType.VideoMessage:
case n.activityType.PictureMessage:
case n.activityType.MojiMessage:
case n.activityType.FileTransfer:
return e.model.type();
default:
return o
}
}
,
e.getContactsGroup = function(t) {
if (t === 0)
return e.enums.CONTACTS.ZERO;
if (t >= 1 && t <= 5)
return e.enums.CONTACTS.LESS_5;
if (t > 5 && t <= 10)
return e.enums.CONTACTS.LESS_10;
if (t > 10 && t <= 25)
return e.enums.CONTACTS.LESS_25;
if (t > 25 && t <= 50)
return e.enums.CONTACTS.LESS_50;
if (t > 50 && t <= 100)
return e.enums.CONTACTS.LESS_100;
if (t > 100 && t <= 150)
return e.enums.CONTACTS.LESS_150;
if (t > 150 && t <= 200)
return e.enums.CONTACTS.LESS_200;
if (t > 200)
return Math.round(t / 200) + e.enums.CONTACTS.MORE_200
}
,
e.getConversationCountGroup = function(e) {
return u(e)
}
,
e.getMessageCountGroup = function(e) {
return u(e, !0)
}
,
e.getSecondsDurationGroup = function(t) {
return t === 0 ? e.enums.DURATION.ZERO : t === 1 ? e.enums.DURATION.ONE : t === 2 ? e.enums.DURATION.TWO : t === 3 ? e.enums.DURATION.THREE : t === 4 ? e.enums.DURATION.FOUR : t === 5 ? e.enums.DURATION.FIVE : t > 5 && t <= 10 ? e.enums.DURATION.LESS_10 : t > 10 ? Math.round(t / 10) + e.enums.DURATION.MORE_10 : e.enums.DURATION.NA
}
,
e.getSecondsDurationGroupFromMs = function(t) {
return e.getSecondsDurationGroup(a(t))
}
,
e.isError = function(t) {
return e.enums.NET_CODE.OK.START <= t && t < e.enums.NET_CODE.OK.END ? !1 : e.enums.NET_CODE.ERROR.START <= t && t < e.enums.NET_CODE.ERROR.END ? !0 : o
}
,
e.getUrlContentType = function(t) {
return t.indexOf("www.youtube.com") > -1 ? e.enums.URL_CONTENT_TYPE.YOUTUBE : /^http.*\.gif$/.exec(t) ? e.enums.URL_CONTENT_TYPE.GIF : t.indexOf("twitter.com") > -1 ? e.enums.URL_CONTENT_TYPE.TWITTER : e.enums.URL_CONTENT_TYPE.OTHER
}
,
e.getMessageLifeDurationGroup = function(t) {
return t < r ? e.enums.LIFETIME.MIN : t < 5 * r ? e.enums.LIFETIME.LESS_5MIN : t < 10 * r ? e.enums.LIFETIME.LESS_10MIN : t < 20 * r ? e.enums.LIFETIME.LESS_20MIN : t < i ? e.enums.LIFETIME.LESS_1HOUR : t < s ? e.enums.LIFETIME.LESS_1DAY : t < 2 * s ? e.enums.LIFETIME.LESS_2DAYS : t < 4 * s ? e.enums.LIFETIME.LESS_4DAYS : t < 6 * s ? e.enums.LIFETIME.LESS_6DAYS : t < 14 * s ? e.enums.LIFETIME.LESS_14DAYS : t < 21 * s ? e.enums.LIFETIME.LESS_21DAYS : t < 29 * s ? e.enums.LIFETIME.LESS_29DAYS : o
}
}
var t = e("constants/common")
, n = e("cafe/enums");
return new r
}),
define("jSkype/services/serviceAccessLayer/serviceQosRetryReporter", ["require", "exports", "module", "jSkype/client", "jSkype/settings", "telemetry/chat/telemetryEnumerator"], function(e, t) {
function o() {
this.publish = function(e) {
var t = "serviceRetry_qos"
, s = e;
s.ttcGroup = i.getSecondsDurationGroupFromMs(e.ttc),
n.get()._telemetryManager.sendEvent(r.settings.telemetry.jSkypeTenantToken, t, s)
}
}
var n = e("jSkype/client"), r = e("jSkype/settings"), i = e("telemetry/chat/telemetryEnumerator"), s;
t.get = function() {
return s || (s = new o),
s
}
}),
define("jSkype/services/webapi/constants", ["require", "exports", "module"], function(e, t) {
t.SERVICE_CALLS = {
SET_THREAD_OPTION: "setThreadOption",
SET_CONVERSATION_OPTION: "setConversationOption",
PIN_TO_DOGFOOD: "pinToDogfood",
CREATE_CONVERSATION: "createConversation",
POST_MESSAGE: "postMessage",
ADD_PARTICIPANT: "addParticipant",
REMOVE_PARTICIPANT: "removeParticipant",
SET_CONSUMPTION_HORIZON: "setConsumptionHorizon",
FETCH_MESSAGES: "fetchMessages",
FETCH_MESSAGES_LOAD_MORE: "fetchMessagesLoadMore",
FETCH_THREAD: "fetchThread",
FETCH_CONVERSATION: "fetchConversation",
FETCH_CONVERSATIONS: "fetchConversations",
FETCH_CONVERSATIONS_BY_SYNC_STATE: "fetchConversationsBySyncState",
REQUEST_ENDPOINT_CREATION: "requestEndpointCreation",
REQUEST_ENDPOINT_DELETION: "requestEndpointDeletion",
REQUEST_SUBSCRIPTION_CREATION: "requestSubscriptionCreation",
REQUEST_POLLING: "requestPolling",
SET_ENDPOINT_PRESENCE: "setEndpointPresence",
SET_ENDPOINT_PROPERTY: "setEndpointProperty",
ACTIVATE_ENDPOINT: "activateEndpoint",
SET_USER_PRESENCE: "setUserPresence",
GET_USER_PRESENCE: "getUserPresence",
SEND_CONTACT_LIST: "sendContactsList",
ADD_CONTACT_TO_CONTACTS_LIST: "addContactToContactsList",
REMOVE_CONTACT_FROM_CONTACTS_LIST: "removeContactFromContactsList",
GET_SELF_PROPERTIES: "getSelfProperties",
SET_MESSAGE_PROPERTY: "setMessageProperty",
REMOVE_MESSAGE_PROPERTY: "removeMessageProperty",
REMOVE_ALL_MESSAGES: "removeAllMessage"
},
t.ENDPOINT_PROPERTIES = {
SUPPORTS_MESSAGE_PROPERTIES: "supportsMessageProperties"
},
t.MESSAGE_PROPERTIES = {
GLOBAL: {
ACTIVITY_DATA: "activityData",
PINNED: "pinned",
PROTOTYPE_SKYPEX: "prototype_skypex"
},
PER_USER: {
EMOTIONS: "emotions",
POLL: "poll",
TRANSLATIONS: "translations"
}
},
t.ACTIVATE_ENDPOINT_TIMEOUT = 12e3,
t.ACTIVATE_ENDPOINT_TOLERANCE = 6e3
}),
define("jSkype/services/serviceAccessLayer/decorations/reporting", ["require", "exports", "module", "lodash-compat", "constants/common", "jSkype/client", "jSkype/services/serviceAccessLayer/serviceQosReporterFacade", "jSkype/services/serviceAccessLayer/serviceQosRetryReporter", "jSkype/services/webapi/constants", "jSkype/settings"], function(e, t) {
function f(e, t) {
var n = JSON.parse(t.response);
n && n.errorCode && (e.errorCode = n.errorCode,
e.errorMessage = n.message)
}
function l(e, t) {
var r = e.getAllResponseHeaders().toLowerCase();
return n.contains(r, t) && e.getResponseHeader(t)
}
function c(e, t) {
if (e.faultCode === 404) {
if (l(t, "location") || t.response === undefined)
return;
try {
f(e, t)
} catch (n) {}
}
var s = i.get()._telemetry.eventBus;
s.publish(r.events.errors.SERVICE_FAILURE, e)
}
function h(e) {
return e && p()
}
function p() {
return a.isFeatureOn(r.featureFlags.SERVICE_FAILURE_REPORTING)
}
var n = e("lodash-compat")
, r = e("constants/common")
, i = e("jSkype/client")
, s = e("jSkype/services/serviceAccessLayer/serviceQosReporterFacade")
, o = e("jSkype/services/serviceAccessLayer/serviceQosRetryReporter")
, u = e("jSkype/services/webapi/constants").SERVICE_CALLS
, a = e("jSkype/settings");
t.build = function(t, r) {
var i = r.serviceName
, a = s.getInstance();
return function(r) {
function f(e) {
var t = {
serviceName: i,
verb: r.type,
host: m(r.url)
};
return i === "webapi-" + u.REQUEST_POLLING && e && e.response && e.response.eventMessages && l(t, e.response),
t
}
function l(e, t) {
var r = n.map(t.eventMessages, "resourceType");
n.uniq(r).forEach(function(t) {
var i = r.length
, s = n.without(r, t).length;
e[n.camelCase(t)] = i - s
})
}
function p(e, t) {
var n = e.request ? e.request.status : e.status;
return {
serviceName: i,
retryCount: e.retryCount,
responseCode: n,
isFailed: t,
ttc: e.ttc
}
}
function d(e) {
a.reportSuccess(i, f(e)),
e.retryCount && o.get().publish(p(e, !1))
}
function v(e) {
e.retryCount && o.get().publish(p(e, !0));
if (h(i)) {
var t = f();
e instanceof XMLHttpRequest && (t.faultCode = e.status),
a.reportFail(i, t),
c(t, e)
}
}
function m(e) {
if (!e)
return;
var t = e.match(/(?:[\s\S]*):\/\/([^\/\r\n]+)(?:\/[^\r\n]*)?/i);
if (t && t.length > 0)
return t[1]
}
var s = t(r);
return s.then(d, v),
s
}
}
}),
define("jSkype/services/serviceAccessLayer/requestDecorator", ["require", "jSkype/services/serviceAccessLayer/decorations/retry", "jSkype/services/serviceAccessLayer/decorations/availability", "jSkype/services/serviceAccessLayer/decorations/reporting"], function(e) {
function s(e, t) {
function r(e) {
var r = t[e.policyName];
r && (n = e.decoration.build(n, r))
}
var n = e;
return t ? (i.forEach(r),
n) : e
}
var t = e("jSkype/services/serviceAccessLayer/decorations/retry")
, n = e("jSkype/services/serviceAccessLayer/decorations/availability")
, r = e("jSkype/services/serviceAccessLayer/decorations/reporting")
, i = [{
decoration: n,
policyName: "availability"
}, {
decoration: t,
policyName: "retry"
}, {
decoration: r,
policyName: "reporting"
}];
return {
build: s
}
}),
define("jSkype/services/serviceAccessLayer/requestDispatcher", ["require", "exports", "module", "lodash-compat", "reqwest", "jSkype/services/serviceAccessLayer/builders/factory", "jSkype/services/serviceAccessLayer/requestDecorator"], function(e, t) {
function u(e, i, o) {
function p(e) {
return u = r.compat(n.cloneDeep(e)),
a(u)
}
function d(e) {
return function() {
e.request.readyState !== t.REQUEST_DONE_READY_STATE && e.abort()
}
}
var u, l = f(e, i, o), c = s.build(p, o), h = c(l);
return h._abort = d(u),
h
}
function a(e) {
return Promise.resolve(e).then(function(n) {
return {
request: e.request,
response: n
}
}, function() {
throw e.request
})
}
function f(e, t, n) {
var r, s = i.get("headerBuilder"), u = typeof n.addContentType == "undefined" || n.addContentType === !0 ? !0 : !1;
s.populate(n.headers),
r = {
url: t,
type: e,
headers: s.get(),
timeout: o,
dataType: n.dataType || "json",
data: n.payload || "",
crossOrigin: typeof n.crossOrigin != "undefined" ? n.crossOrigin : !0,
withCredentials: typeof n.withCredentials != "undefined" ? n.withCredentials : !1
},
u && (r.contentType = n.contentType || "application/json");
if (n.jsonp || n.dataType === "jsonp")
r.jsonp = n.jsonp || "callback";
return typeof n.processData == "boolean" && (r.processData = n.processData),
r
}
var n = e("lodash-compat")
, r = e("reqwest")
, i = e("jSkype/services/serviceAccessLayer/builders/factory")
, s = e("jSkype/services/serviceAccessLayer/requestDecorator")
, o = 45e3;
t.get = function(e, t) {
return u("GET", e, t)
}
,
t.post = function(e, t) {
return u("POST", e, t)
}
,
t.put = function(e, t) {
return u("PUT", e, t)
}
,
t.remove = function(e, t) {
return u("DELETE", e, t)
}
,
t.REQUEST_DONE_READY_STATE = 4
}),
define("jSkype/services/serviceAccessLayer/serviceLocator", ["require", "jSkype/services/serviceAccessLayer/requestDispatcher", "jSkype/services/serviceAccessLayer/builders/factory"], function(e) {
function r(e) {
typeof e != "string" && s("serviceUri", "string"),
this.uriBuilder = n.get("uriBuilder"),
this.uriBuilder.setDomain(e)
}
function i(e, t) {
var n = {}.toString.call(t) === "[object Object]";
typeof e != "string" && s("resource", "string"),
n || s("options", "object")
}
function s(e, t) {
throw new TypeError('expected typeof "' + e + '" to be: ' + t)
}
var t = e("jSkype/services/serviceAccessLayer/requestDispatcher")
, n = e("jSkype/services/serviceAccessLayer/builders/factory");
return r.prototype.get = function(e, t) {
return this.request("get", e, t)
}
,
r.prototype.post = function(e, t) {
return this.request("post", e, t)
}
,
r.prototype.put = function(e, t) {
return this.request("put", e, t)
}
,
r.prototype.remove = function(e, t) {
return this.request("remove", e, t)
}
,
r.prototype.request = function(e, n, r) {
return i(n, r),
this.uriBuilder.setResource(n),
this.uriBuilder.setQueryParams(r.params),
t[e](this.uriBuilder.build(), r)
}
,
{
build: function(e) {
return new r(e)
}
}
}),
define("jSkype/constants/data", [], function() {
function t(e) {
return new RegExp("^" + e + "\\|")
}
var e = "contactPresence";
return {
storageKeys: {
ENDPOINT_ID: "endpointId",
SKYPE_ID_REG_TOKEN: "skypeIdRegistrationToken",
PRESENCE_DATA: "presenceData",
RESURECTION_KEY: "isResurected",
CONTACT_PROFILES: "contacts",
CONTACT_PRESENCE: e,
ETAG: "etagContacts"
},
storageKeyRegExp: {
CONTACT_PRESENCE: t(e),
CONVERSATION: t("conv")
}
}
}),
define("services/serviceLocator", ["require", "lodash-compat"], function(e) {
var t = e("lodash-compat")
, n = {};
return {
contains: function(e) {
return n[e]
},
register: function(e, r) {
if (!t.isString(e) || e === "")
throw new Error("You must provide a valid name for this service");
if (n[e])
throw new Error("Service '" + e + "' already registered");
n[e] = r
},
resolve: function(e) {
if (!n[e])
throw new Error("Service '" + e + "' not found");
return n[e]
},
destroy: function(e) {
delete n[e]
},
reset: function() {
n = {}
}
}
}),
define("utils/common/settablePromise", ["require", "exports", "module", "helpers/polyfills"], function(e, t) {
e("helpers/polyfills"),
t.build = function() {
var e, t, n = new Promise(function(n, r) {
e = n,
t = r
}
);
return n.resolve = e,
n.reject = t,
n
}
}),
define("vendor/msrcrypto.aes", [], function() {
var e = "1.3"
, t = t || function() {
function p(e, t, n, r, i) {
return []
}
function w() {
function u(e) {
var t;
for (t = e.length - 1; t >= 0; t -= 1) {
e[t] += 1,
e[t] >= 256 && (e[t] = 0);
if (e[t])
break
}
}
function a() {
t = l.getVector(32),
n = l.getVector(16),
r = 32,
i = 48,
s = 1
}
function f(e, t) {
t = t || [0];
if (t.length > i)
throw new Error("Incorrect entropy or additionalEntropy length");
t = t.concat(l.getVector(i - t.length)),
e = e.concat(l.getVector((i - e.length % i) % i));
for (var n = 0; n < e.length; n += i) {
var r = l.xorVectors(e.slice(n, n + i), t);
c(r)
}
s = 1
}
function c(e) {
var s = []
, o = new m.aes(t);
while (s.length < i) {
u(n);
var a = n.slice(0, 16)
, f = o.encrypt(a);
s = s.concat(f)
}
s = l.xorVectors(s, e),
t = s.slice(0, r),
n = s.slice(r)
}
function h(e, r) {
if (e >= 65536)
throw new Error("too much random requested");
if (s > o)
throw new Error("Reseeding is required");
if (r && r.length > 0) {
while (r.length < i)
r = r.concat(l.getVector(i - r.length));
c(r)
} else
r = l.getVector(i);
var a = []
, f = new m.aes(t);
while (a.length < e) {
u(n);
var h = n.slice(0, n.length)
, p = f.encrypt(h);
a = a.concat(p)
}
return a = a.slice(0, e),
c(r),
s += 1,
a
}
if (this instanceof w) {
var e = !1, t, n, r, i, s = 1, o = 1 << 24;
return a(),
{
reseed: f,
init: function(t, n) {
if (t.length < i)
throw new Error("Initial entropy length too short");
a(),
f(t, n),
e = !0
},
getBytes: function(t, n) {
if (!e)
throw new Error("can't get randomness before initialization");
return h(t, n)
},
getNonZeroBytes: function(t, n) {
if (!e)
throw new Error("can't get randomness before initialization");
var r = [], i;
while (r.length < t) {
i = h(t, n);
for (var s = 0; s < i.length; s += 1)
i[s] !== 0 && r.push(i[s])
}
return r.slice(0, t)
}
}
}
throw new Error("create MsrcryptoPrng object with new keyword")
}
function S() {
function a() {
var n, r = [];
for (n = 0; n < e; n += 1)
r[n] = Math.floor(Math.random() * 256);
var a = window.crypto || window.msCrypto;
if (a && typeof a.getRandomValues == "function" && window.Uint8Array) {
var f = new window.Uint8Array(e);
a.getRandomValues(f),
r = r.concat(Array.apply(null , f)),
o = !0
}
var h = new XMLHttpRequest;
for (n = 0; n < u.length; n += 1)
try {
var p = h.getResponseHeader(u[n]);
if (p) {
var d = l.stringToBytes(p);
r = r.concat(d)
}
} catch (v) {}
o || (r = r.concat(t.splice(0, t.length)),
c.startCollectors()),
s ? i.reseed(r) : i.init(r),
s = !0
}
function f(e) {
for (var r = 0; r < e.length; ++r)
t.push(e[r]);
t.length >= n && c.stopCollectors()
}
var e = 48
, t = []
, n = 128
, r = 0
, i = new w
, s = !1
, o = !1
, u = ["Cookie", "RedirectUri", "ETag", "x-ms-client-antiforgery-id", "x-ms-client-request-id", "x-ms-client-session-id", "SubscriptionPool"]
, c = function() {
return {
startCollectors: function() {
if (!this.collectorsRegistered) {
if (window.addEventListener)
window.addEventListener("mousemove", this.MouseEventCallBack, !0),
window.addEventListener("load", this.LoadTimeCallBack, !0);
else {
if (!document.attachEvent)
throw new Error("Can't attach events for entropy collection");
document.attachEvent("onmousemove", this.MouseEventCallBack),
document.attachEvent("onload", this.LoadTimeCallBack)
}
this.collectorsRegistered = 1
}
},
stopCollectors: function() {
this.collectorsRegistered && (window.removeEventListener ? (window.removeEventListener("mousemove", this.MouseEventCallBack, 1),
window.removeEventListener("load", this.LoadTimeCallBack, 1)) : window.detachEvent && (window.detachEvent("onmousemove", this.MouseEventCallBack),
window.detachEvent("onload", this.LoadTimeCallBack)),
this.collectorsRegistered = 0)
},
MouseEventCallBack: function(e) {
var t = (new Date).valueOf()
, n = e.x || e.clientX || e.offsetX || 0
, r = e.y || e.clientY || e.offsetY || 0
, i = [t & 255, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255, n & 255, n >> 8 & 255, r & 255, r >> 8 & 255];
f(i)
},
LoadTimeCallBack: function() {
var e = (new Date).valueOf()
, t = [e & 255, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255];
f(t)
}
}
}();
return {
init: function() {
a();
if (!o && !r)
try {
c.startCollectors()
} catch (e) {}
},
reseed: function(e) {
i.reseed(e)
},
read: function(e) {
if (!s)
throw new Error("Entropy pool is not initialized.");
var t = i.getBytes(e);
return a(),
t
}
}
}
var e = {};
e.register = function(t, n, r) {
e[t] || (e[t] = {});
var i = e[t];
i[n] || (i[n] = r)
}
,
e.exists = function(t, n) {
return e[t] ? e[t][n] ? !0 : !1 : !1
}
;
var t = function() {
if (typeof document != "undefined")
try {
throw new Error
} catch (e) {
if (e.stack) {
var t = /\w+:\/\/(.+?\/)*.+\.js/.exec(e.stack);
return t && t.length > 0 ? t[0] : null
}
}
else if (typeof self != "undefined")
return self.location.href;
return null
}()
, n = !1
, r = typeof Worker != "undefined"
, i = typeof importScripts != "undefined"
, s = typeof Uint8Array != "undefined"
, o = function() {
try {
return Object.defineProperty({}, "oncomplete", {}),
!0
} catch (e) {
return !1
}
}()
, u = r
, a = function(e, t, n, r, i) {
if (!o) {
e[t] = n;
return
}
var s = {};
r && (s.get = r),
i && (s.set = i),
Object.defineProperty(e, t, s)
}
, f = {}
, l = function() {
function n(n, r) {
var i = "";
r || (r = !1);
if (n.pop || n.subarray)
n = String.fromCharCode.apply(null , n);
if (t)
i = btoa(n);
else {
var s, o, u, a, f, l, c, h;
for (h = 0; h < n.length; h += 3)
s = n.charCodeAt(h),
o = n.charCodeAt(h + 1),
u = n.charCodeAt(h + 2),
a = s >> 2,
f = (s & 3) << 4 | o >> 4,
l = (o & 15) << 2 | u >> 6,
c = u & 63,
isNaN(o) ? l = c = 64 : isNaN(u) && (c = 64),
i = i + e.charAt(a) + e.charAt(f) + e.charAt(l) + e.charAt(c)
}
return r ? i.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "") : i
}
function r(e) {
if (t) {
e = e.replace(/-/g, "+").replace(/_/g, "/");
while (e.length % 4 !== 0)
e += "=";
return atob(e)
}
return String.fromCharCode.apply(null , i(e))
}
function i(t) {
t = t.replace(/-/g, "+").replace(/_/g, "/");
while (t.length % 4 !== 0)
t += "=";
var n = [], r, i, s, o, u, a, f, l;
t = t.replace(/[^A-Za-z0-9\+\/\=]/g, "");
for (l = 0; l < t.length; l += 4)
o = e.indexOf(t.charAt(l)),
u = e.indexOf(t.charAt(l + 1)),
a = e.indexOf(t.charAt(l + 2)),
f = e.indexOf(t.charAt(l + 3)),
r = o << 2 | u >> 4,
i = (u & 15) << 4 | a >> 2,
s = (a & 3) << 6 | f,
n.push(r),
a !== 64 && n.push(i),
f !== 64 && n.push(s);
return n
}
function s(e) {
return Object.prototype.toString.call(e).slice(8, -1)
}
function o(e, t) {
var n = "";
typeof t == "undefined" && (t = !1);
for (var r = 0; r < e.length; r++) {
t && r % 4 === 0 && r !== 0 && (n += "-");
var i = e[r].toString(16).toUpperCase();
i.length === 1 && (n += "0"),
n += i
}
return n
}
function u(e, t) {
return t = t || 0,
e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]
}
function a(e) {
var t = new Array(e.length);
for (var n = 0; n < t.length; n++)
t[n] = e.charCodeAt(n);
return t
}
function f(e) {
e = e.replace(/\-/g, "");
var t = [];
while (e.length >= 2)
t.push(parseInt(e.substring(0, 2), 16)),
e = e.substring(2, e.length);
return t
}
function l(e) {
var t = {};
for (var n in e)
e.hasOwnProperty(n) && (t[n] = e[n]);
return t
}
function c(e, t, n) {
var r = i(e), s = [], o;
if (isNaN(t))
return r;
for (o = 0; o < r.length; o += t)
s.push(r.slice(o, o + t));
if (n)
for (o = 0; o < s.length; o++)
s[o] = (s[o][0] << 24) + (s[o][1] << 16) + (s[o][2] << 8) + s[o][3];
return s
}
function h(e) {
return [e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, e & 255]
}
function p(e) {
var t = [];
for (var n = 0; n < e.length; n++)
t = t.concat(h(e[n]));
return t
}
function d(e, t) {
var n = Math.min(e.length, t.length)
, r = new Array(n);
for (var i = 0; i < n; i += 1)
r[i] = e[i] ^ t[i];
return r
}
function v(e, t) {
t || (t = 0);
var n = new Array(e);
for (var r = 0; r < e; r += 1)
n[r] = t;
return n
}
function m(e) {
function t() {
var t = 6e4
, n = []
, r = [];
if (e.length <= t)
return Array.apply(null , e);
for (var i = 0, s = e.length; i < s; i += t)
n.push(e.subarray(i, i + t));
return n.forEach(function(e) {
r = r.concat(Array.apply(null , e))
}),
r
}
return e.pop ? e : e.length === 1 ? [e[0]] : t()
}
function g(e, t, n) {
while (e.length < n)
e.push(t);
return e
}
function y(e, t, n) {
while (e.length < n)
e.unshift(t);
return e
}
function b(e, t) {
var n = !0;
e.length !== t.length && (n = !1);
for (var r = 0; r < e.length; r++)
e[r] !== t[r] && (n = !1);
return n
}
function w(e) {
if (s(e) !== "Array")
return !1;
var t;
for (var n = 0; n < e.length; n++) {
t = e[n];
if (isNaN(t) || t < 0 || t > 255)
return !1
}
return !0
}
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
, t = typeof btoa != "undefined";
return {
toBase64: n,
base64ToString: r,
base64ToBytes: i,
getObjectType: s,
bytesToHexString: o,
bytesToInt32: u,
stringToBytes: a,
unpackData: c,
hexToBytesArray: f,
int32ToBytes: h,
int32ArrayToBytes: p,
toArray: m,
arraysEqual: b,
clone: l,
xorVectors: d,
padEnd: g,
padFront: y,
getVector: v,
verifyByteArray: w
}
}()
, c = function() {
function t(e) {
return i && self.postMessage(e),
e
}
return {
jsCryptoRunner: function(n) {
var r = n.data.operationType, i;
if (!e.exists(r, n.data.algorithm.name))
throw new Error("unregistered algorithm.");
var s = e[r][n.data.algorithm.name]
, o = n.data;
return o.operationSubType === "process" ? (s(o),
i = t({
type: "process"
})) : i = t(s(o)),
i
}
}
}();
i && (self.onmessage = function(e) {
if (e.data.prngSeed) {
var t = e.data.prngSeed;
E.init(t);
return
}
c.jsCryptoRunner(e)
}
);
var h = function() {
function t(e) {
var t = [];
for (var n = 0; n < e.length; n++)
t[n] = e.charCodeAt(n);
return t[t.length - 1] === 0 && t.pop(),
t
}
function n(e) {
var t = e.algorithm.name.slice(0, 3).toLowerCase();
return t === "rsa" ? "RSA" : t === "ecd" ? "EC" : "oct"
}
function r(r, i) {
var s = {};
s.kty = n(r),
s.extractable = r.extractable;
if (i.pop)
s.k = e.toBase64(i, !0);
else
for (var o in i)
i[o].pop && (s[o] = e.toBase64(i[o], !0));
r.algorithm.namedCurve && (s.crv = r.algorithm.namedCurve);
var u = JSON.stringify(s, null , " ");
return t(u)
}
function i(t, n, r) {
var i = String.fromCharCode.apply(null , t)
, s = JSON.parse(i);
for (var o = 0; o < r.length; o += 1) {
var u = s[r[o]];
u && (s[r[o]] = e.base64ToBytes(u))
}
return s
}
var e = l;
return {
keyToJwk: r,
jwkToKey: i
}
}()
, d = function(e, t, n, r, i, s, o) {
function p(e) {
var t = Math.floor(e.length / i);
for (var n = 0; n < t; n++)
s(e, n, a, r, f);
return h += t,
e.slice(t * i)
}
function d() {
var e = [];
for (var t = 0; t < a.length; t++)
e = e.concat(u.int32ToBytes(a[t]));
return e.length = o / 8,
e
}
function v(e) {
var t = i - e.length % i;
t <= i / 8 && (t += i);
var n = u.getVector(t);
n[0] = 128;
var r = (e.length + h * i) * 8;
return n[t - 4] = r >>> 24 & 255,
n[t - 3] = r >>> 16 & 255,
n[t - 2] = r >>> 8 & 255,
n[t - 1] = r & 255,
e.concat(n)
}
function m(e) {
return c = p(e),
y()
}
function g(e) {
c = c.concat(e),
c.length >= i && (c = p(c));
return
}
function y() {
if (p(v(c)).length !== 0)
throw new Error("buffer.length !== 0");
var e = d();
return c = [],
a = n.slice(),
h = 0,
e
}
var u = l
, a = n.slice()
, f = new Array(i)
, c = []
, h = 0;
return {
name: e,
computeHash: m,
process: g,
finish: y,
der: t,
hashLen: o,
maxMessageSize: 4294967295
}
}
, v = function() {
function t(t, n, r, i, s) {
var o, u, a, f, l, c = 64, h = 4294967295, p = r[0], d = r[1], v = r[2], m = r[3], g = r[4], y = r[5], b = r[6], w = r[7];
for (u = 0; u < 16; u++)
s[u] = e.bytesToInt32(t, n * c + u * 4);
for (o = 16; o < 64; o++)
f = s[o - 15],
l = s[o - 2],
s[o] = ((l >>> 17 | l << 15) ^ (l >>> 19 | l << 13) ^ l >>> 10) + s[o - 7] + ((f >>> 7 | f << 25) ^ (f >>> 18 | f << 14) ^ f >>> 3) + s[o - 16],
s[o] = s[o] & h;
for (u = 0; u < 64; u++)
a = w + ((g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7)) + (g & y ^ ~g & b) + i[u] + s[u],
m += a,
a += ((p >>> 2 | p << 30) ^ (p >>> 13 | p << 19) ^ (p >>> 22 | p << 10)) + (p & (d ^ v) ^ d & v),
w = b,
b = y,
y = g,
g = m,
m = v,
v = d,
d = p,
p = a;
return r[0] += p & h,
r[1] += d & h,
r[2] += v & h,
r[3] += m & h,
r[4] += g & h,
r[5] += y & h,
r[6] += b & h,
r[7] += w & h,
r
}
var e = l, n, r, i, s, o, u = e.unpackData;
return r = u("wQWe2DZ81QcwcN0X9w5ZOf/ACzFoWBURZPmPp776T6Q", 4, 1),
i = u("agnmZ7tnroU8bvNypU/1OlEOUn+bBWiMH4PZq1vgzRk", 4, 1),
n = u("QoovmHE3RJG1wPvP6bXbpTlWwltZ8RHxkj+CpKscXtXYB6qYEoNbASQxhb5VDH3Dcr5ddIDesf6b3AanwZvxdOSbacHvvkeGD8GdxiQMocwt6SxvSnSEqlywqdx2+YjamD5RUqgxxm2wAyfIv1l/x8bgC/PVp5FHBspjURQpKWcntwqFLhshOE0sbfxTOA0TZQpzVHZqCruBwskuknIshaK/6KGoGmZLwkuLcMdsUaPRkugZ1pkGJPQONYUQaqBwGaTBFh43bAgnSHdMNLC8tTkcDLNO2KpKW5zKT2gub/N0j4LueKVjb4TIeBSMxwIIkL7/+qRQbOu++aP3xnF48g", 4, 1),
s = u("MC0wDQYJYIZIAWUDBAIEBQAEHA"),
o = u("MDEwDQYJYIZIAWUDBAIBBQAEIA"),
{
sha224: d("SHA-224", s, r, n, 64, t, 224),
sha256: d("SHA-256", o, i, n, 64, t, 256)
}
}();
typeof e != "undefined" && (v.hash256 = function(e) {
if (e.operationSubType === "process") {
v.sha256.process(e.buffer);
return
}
return e.operationSubType === "finish" ? v.sha256.finish() : v.sha256.computeHash(e.buffer)
}
,
v.hash224 = function(e) {
if (e.operationSubType === "process") {
v.sha224.process(e.buffer);
return
}
return e.operationSubType === "finish" ? v.sha224.finish() : v.sha224.computeHash(e.buffer)
}
,
e.register("digest", "sha-224", v.hash224),
e.register("digest", "sha-256", v.hash256)),
f["sha-224"] = v.sha224,
f["sha-256"] = v.sha256;
var m = function() {
var e, t, n, r, i, s, o, u, a, f;
return {
aes: function(c) {
e || (e = l.unpackData("AAIEBggKDA4QEhQWGBocHiAiJCYoKiwuMDI0Njg6PD5AQkRGSEpMTlBSVFZYWlxeYGJkZmhqbG5wcnR2eHp8foCChIaIioyOkJKUlpianJ6goqSmqKqsrrCytLa4ury+wMLExsjKzM7Q0tTW2Nrc3uDi5Obo6uzu8PL09vj6/P4bGR8dExEXFQsJDw0DAQcFOzk/PTMxNzUrKS8tIyEnJVtZX11TUVdVS0lPTUNBR0V7eX99c3F3dWtpb21jYWdlm5mfnZORl5WLiY+Ng4GHhbu5v72zsbe1q6mvraOhp6Xb2d/d09HX1cvJz83DwcfF+/n//fPx9/Xr6e/t4+Hn5QADBgUMDwoJGBseHRQXEhEwMzY1PD86OSgrLi0kJyIhYGNmZWxvaml4e359dHdycVBTVlVcX1pZSEtOTURHQkHAw8bFzM/Kydjb3t3U19LR8PP29fz/+vno6+7t5Ofi4aCjpqWsr6qpuLu+vbS3srGQk5aVnJ+amYiLjo2Eh4KBm5idnpeUkZKDgIWGj4yJiquora6npKGis7C1tr+8ubr7+P3+9/Tx8uPg5ebv7Onqy8jNzsfEwcLT0NXW39zZ2ltYXV5XVFFSQ0BFRk9MSUpraG1uZ2RhYnNwdXZ/fHl6Ozg9Pjc0MTIjICUmLywpKgsIDQ4HBAECExAVFh8cGRoADhwSODYkKnB+bGJIRlRa4O788tjWxMqQnoyCqKa0utvVx8nj7f/xq6W3uZOdj4E7NScpAw0fEUtFV1lzfW9hraOxv5WbiYfd08HP5ev5901DUV91e2lnPTMhLwULGRd2eGpkTkBSXAYIGhQ+MCIslpiKhK6gsrzm6Pr03tDCzEFPXVN5d2VrMT8tIwkHFRuhr72zmZeFi9HfzcPp5/X7mpSGiKKsvrDq5Pb40tzOwHp0ZmhCTF5QCgQWGDI8LiDs4vD+1NrIxpySgI6kqri2DAIQHjQ6KCZ8cmBuREpYVjc5KyUPARMdR0lbVX9xY23X2cvF7+Hz/aepu7WfkYONAA0aFzQ5LiNoZXJ/XFFGS9Ddysfk6f7zuLWir4yBlpu7tqGsj4KVmNPeycTn6v3wa2ZxfF9SRUgDDhkUNzotIG1gd3pZVENOBQgfEjE8Kya9sKeqiYSTntXYz8Lh7Pv21tvMweLv+PW+s6SpioeQnQYLHBEyPyglbmN0eVpXQE3a18DN7uP0+bK/qKWGi5yRCgcQHT4zJClib3h1VltMQWFse3ZVWE9CCQQTHj0wJyqxvKumhYifktnUw87t4Pf6t7qtoIOOmZTf0sXI6+bx/GdqfXBTXklEDwIVGDs2ISwMARYbODUiL2RpfnNQXUpH3NHGy+jl8v+0ua6jgI2alwALFh0sJzoxWFNORXR/Ymmwu6atnJeKgejj/vXEz9LZe3BtZldcQUojKDU+DwQZEsvA3dbn7PH6k5iFjr+0qaL2/eDr2tHMx66luLOCiZSfRk1QW2phfHceFQgDMjkkL42Gm5Chqre81d7DyPny7+Q9NisgERoHDGVuc3hJQl9U9/zh6tvQzcavpLmyg4iVnkdMUVprYH12HxQJAjM4JS6Mh5qRoKu2vdTfwsn48+7lPDcqIRAbBg1kb3J5SENeVQEKFxwtJjswWVJPRHV+Y2ixuqesnZaLgOni//TFztPYenFsZ1ZdQEsiKTQ/DgUYE8rB3Nfm7fD7kpmEj761qKMACRIbJC02P0hBWlNsZX53kJmCi7S9pq/Y0crD/PXu5zsyKSAfFg0Ec3phaFdeRUyrormwj4adlOPq8fjHztXcdn9kbVJbQEk+NywlGhMIAebv9P3Cy9DZrqe8tYqDmJFNRF9WaWB7cgUMFx4hKDM63dTPxvnw6+KVnIeOsbijquzl/vfIwdrTpK22v4CJkpt8dW5nWFFKQzQ9Ji8QGQIL197FzPP64eiflo2Eu7KpoEdOVVxjanF4DwYdFCsiOTCak4iBvrespdLbwMn2/+TtCgMYES4nPDVCS1BZZm90faGos7qFjJee6eD78s3E39YxOCMqFRwHDnlwa2JdVE9GY3x3e/Jrb8UwAWcr/terdsqCyX36WUfwrdSir5ykcsC3/ZMmNj/3zDSl5fFx2DEVBMcjwxiWBZoHEoDi6yeydQmDLBobblqgUjvWsynjL4RT0QDtIPyxW2rLvjlKTFjP0O+q+0NNM4VF+QJ/UDyfqFGjQI+SnTj1vLbaIRD/89LNDBPsX5dEF8Snfj1kXRlzYIFP3CIqkIhG7rgU3l4L2+AyOgpJBiRcwtOsYpGV5HnnyDdtjdVOqWxW9Opleq4IunglLhymtMbo3XQfS72LinA+tWZIA/YOYTVXuYbBHZ7h+JgRadmOlJseh+nOVSjfjKGJDb/mQmhBmS0PsFS7FlIJatUwNqU4v0CjnoHz1/t84zmCmy//hzSOQ0TE3unLVHuUMqbCIz3uTJULQvrDTgguoWYo2SSydluiSW2L0SVy+PZkhmiYFtSkXMxdZbaSbHBIUP3tudpeFUZXp42dhJDYqwCMvNMK9+RYBbizRQbQLB6Pyj8PAsGvvQMBE4prOpERQU9n3OqX8s/O8LTmc5asdCLnrTWF4vk36Bx1325H8RpxHSnFiW+3Yg6qGL4b/FY+S8bSeSCa28D+eM1a9B/dqDOIB8cxsRIQWSeA7F9gUX+pGbVKDS3lep+TyZzvoOA7Ta4q9bDI67s8g1OZYRcrBH66d9Ym4WkUY1UhDH2NAQIECBAgQIAbNmzYq02aL168Y8aXNWrUs33678WROXLk071hwp8lSpQzZsyDHTp06MuNAQIECBAgQIAbNmzYq02aL168Y8aXNWrUs33678WROXLk071hwp8lSpQzZsyDHTp06MuNAQIECBAgQIAbNmzYq02aL168Y8aXNWrUs33678WROXLk071hwp8lSpQzZsyDHTp06MuNAQIECBAgQIAbNmzYq02aL168Y8aXNWrUs33678WROXLk071hwp8lSpQzZsyDHTp06MuNAQIECBAgQIAbNmzYq02aL168Y8aXNWrUs33678WROXLk071hwp8lSpQzZsyDHTp06MuN", 256, !1),
t = e[0],
n = e[1],
r = e[2],
i = e[3],
s = e[4],
o = e[5],
u = e[6],
a = e[7],
f = e[8]);
var h = 128, p, d, v = 4, m, g;
switch (c.length * 8) {
case 128:
p = 128,
d = 4,
m = 10;
break;
case 192:
p = 192,
d = 6,
m = 12;
break;
case 256:
p = 256,
d = 8,
m = 14;
break;
default:
throw new Error("Unsupported keyLength")
}
var y = function(e) {
var t = e[1];
e[1] = e[5],
e[5] = e[9],
e[9] = e[13],
e[13] = t,
t = e[2],
e[2] = e[10],
e[10] = t,
t = e[6],
e[6] = e[14],
e[14] = t,
t = e[15],
e[15] = e[11],
e[11] = e[7],
e[7] = e[3],
e[3] = t
}
, b = function(e) {
var t = e[13];
e[13] = e[9],
e[9] = e[5],
e[5] = e[1],
e[1] = t,
t = e[10],
e[10] = e[2],
e[2] = t,
t = e[14],
e[14] = e[6],
e[6] = t,
t = e[3],
e[3] = e[7],
e[7] = e[11],
e[11] = e[15],
e[15] = t
}
, w = function(e) {
var r = e[0]
, i = e[1]
, s = e[2]
, o = e[3]
, u = e[4]
, a = e[5]
, f = e[6]
, l = e[7]
, c = e[8]
, h = e[9]
, p = e[10]
, d = e[11]
, v = e[12]
, m = e[13]
, g = e[14]
, y = e[15];
e[0] = t[r] ^ n[i] ^ s ^ o,
e[1] = r ^ t[i] ^ n[s] ^ o,
e[2] = r ^ i ^ t[s] ^ n[o],
e[3] = n[r] ^ i ^ s ^ t[o],
e[4] = t[u] ^ n[a] ^ f ^ l,
e[5] = u ^ t[a] ^ n[f] ^ l,
e[6] = u ^ a ^ t[f] ^ n[l],
e[7] = n[u] ^ a ^ f ^ t[l],
e[8] = t[c] ^ n[h] ^ p ^ d,
e[9] = c ^ t[h] ^ n[p] ^ d,
e[10] = c ^ h ^ t[p] ^ n[d],
e[11] = n[c] ^ h ^ p ^ t[d],
e[12] = t[v] ^ n[m] ^ g ^ y,
e[13] = v ^ t[m] ^ n[g] ^ y,
e[14] = v ^ m ^ t[g] ^ n[y],
e[15] = n[v] ^ m ^ g ^ t[y]
}
, E = function(e) {
var t = e[0]
, n = e[1]
, u = e[2]
, a = e[3]
, f = e[4]
, l = e[5]
, c = e[6]
, h = e[7]
, p = e[8]
, d = e[9]
, v = e[10]
, m = e[11]
, g = e[12]
, y = e[13]
, b = e[14]
, w = e[15];
e[0] = r[t] ^ s[n] ^ i[u] ^ o[a],
e[1] = o[t] ^ r[n] ^ s[u] ^ i[a],
e[2] = i[t] ^ o[n] ^ r[u] ^ s[a],
e[3] = s[t] ^ i[n] ^ o[u] ^ r[a],
e[4] = r[f] ^ s[l] ^ i[c] ^ o[h],
e[5] = o[f] ^ r[l] ^ s[c] ^ i[h],
e[6] = i[f] ^ o[l] ^ r[c] ^ s[h],
e[7] = s[f] ^ i[l] ^ o[c] ^ r[h],
e[8] = r[p] ^ s[d] ^ i[v] ^ o[m],
e[9] = o[p] ^ r[d] ^ s[v] ^ i[m],
e[10] = i[p] ^ o[d] ^ r[v] ^ s[m],
e[11] = s[p] ^ i[d] ^ o[v] ^ r[m],
e[12] = r[g] ^ s[y] ^ i[b] ^ o[w],
e[13] = o[g] ^ r[y] ^ s[b] ^ i[w],
e[14] = i[g] ^ o[y] ^ r[b] ^ s[w],
e[15] = s[g] ^ i[y] ^ o[b] ^ r[w]
}
, S = function(e, t) {
return [e[0] ^ t[0], e[1] ^ t[1], e[2] ^ t[2], e[3] ^ t[3]]
}
, x = function(e, t, n) {
for (var r = 0; r < e.length; r += 1)
e[r] ^= t[r + n]
}
, T = function(e) {
var t = e[0];
e[0] = e[1],
e[1] = e[2],
e[2] = e[3],
e[3] = t
}
, N = function(e) {
for (var t = 0; t < e.length; t += 1)
e[t] = u[e[t]]
}
, C = function(e) {
for (var t = 0; t < e.length; t += 1)
e[t] = a[e[t]]
}
, k = function(e, t) {
return [e[4 * t], e[4 * t + 1], e[4 * t + 2], e[4 * t + 3]]
}
, L = function(e, t, n, r) {
e[4 * n] = t[4 * r],
e[4 * n + 1] = t[4 * r + 1],
e[4 * n + 2] = t[4 * r + 2],
e[4 * n + 3] = t[4 * r + 3]
}
, A = function(e) {
var t, n = [], r = 0;
while (r < 4 * d)
n.push(e[r++]);
r = d;
while (r < v * (m + 1)) {
t = k(n, r - 1);
if (r % d === 0) {
var i = r / d
, s = [f[i], 0, 0, 0];
T(t),
N(t),
t = S(t, s)
} else
d > 6 && r % d === 4 && N(t);
var o = S(k(n, r - d), t);
L(n, o, r, 0),
r += 1
}
return n
}
;
return g = A(c),
{
encrypt: function(e) {
var t = e, n;
x(t, g, 0);
for (n = 1; n <= m - 1; n += 1)
N(t),
y(t),
w(t),
x(t, g, 4 * n * v);
return N(t),
y(t),
x(t, g, 4 * m * v),
t
},
decrypt: function(e) {
var t = e, n;
x(t, g, 4 * m * v);
for (n = m - 1; n >= 1; n -= 1)
b(t),
C(t),
x(t, g, 4 * n * v),
E(t);
return b(t),
C(t),
x(t, g, 0),
t
},
clear: function() {},
keyLength: p,
blockSize: h
}
}
}
}()
, g = g || {};
g.pkcsv7 = function(e) {
function t(t) {
var n = t.length - 1 >= 0 ? t.length - 1 : 0
, r = t[n]
, i = r.length
, s = i === e;
if (s) {
var o = [], u;
for (u = 0; u < e; u += 1)
o.push(e);
t.push(o)
} else {
var a = e - i & 255;
while (r.length !== e)
r.push(a)
}
}
function n(t) {
var n = !0;
t.length % e !== 0 && (n = !1);
var r = t.slice(-e)
, i = r[r.length - 1];
for (var s = 0; s < e; s++) {
var o = e - s <= i
, u = r[s] === i;
n = (o ? u : !0) && n
}
var a = n ? i : 0;
return t.length -= a,
n
}
return {
pad: t,
unpad: n
}
}
;
var y = function(e) {
function i(e) {
var n = [];
a = a.concat(e);
var r = Math.floor(a.length / t);
for (var i = 0; i < r; i++)
n.push(a.slice(i * t, (i + 1) * t));
return a = a.slice(r * t),
n
}
function s(t) {
var n = [], r;
for (var i = 0; i < t.length; i++)
r = l.xorVectors(c, t[i]),
n.push(e.encrypt(r)),
c = n[i];
return n
}
function o(t) {
var n = [], r, i;
for (var s = 0; s < t.length; s += 1)
r = t[s].slice(0, t[s].length),
i = e.decrypt(r),
n.push(l.xorVectors(c, i)),
c = t[s];
return n
}
function u() {
a = [],
f = [],
c = null
}
var t = e.blockSize / 8, n = g.pkcsv7(t), r = function(e) {
var t = [], n, r;
for (n = 0; n < e.length; n += 1) {
var i = e[n];
for (r = 0; r < i.length; r += 1)
t.push(i[r])
}
return t
}
, a = [], f = [], c;
return {
init: function(e) {
if (e.length !== t)
throw new Error("Invalid iv size");
c = e.slice()
},
encrypt: function(e) {
return this.processEncrypt(e),
this.finishEncrypt()
},
processEncrypt: function(e) {
var t = s(i(e));
f = f.concat(r(t));
return
},
finishEncrypt: function() {
var e = a.length === 1 ? [[a[0]]] : [a];
n.pad(e);
var t = f.concat(r(s(e)));
return u(),
t
},
decrypt: function(e) {
return this.processDecrypt(e),
this.finishDecrypt()
},
processDecrypt: function(e) {
var t = o(i(e));
f = f.concat(r(t));
return
},
finishDecrypt: function() {
var e = f
, t = n.unpad(e);
return u(),
e
}
}
}
, b = null ;
typeof e != "undefined" && (y.workerEncrypt = function(e) {
var t;
b || (b = y(m.aes(e.keyData)),
b.init(e.algorithm.iv));
if (e.operationSubType === "process") {
b.processEncrypt(e.buffer);
return
}
return e.operationSubType === "finish" ? (t = b.finishEncrypt(),
b = null ,
t) : (t = b.encrypt(e.buffer),
b = null ,
t)
}
,
y.workerDecrypt = function(e) {
var t;
b || (b = y(m.aes(e.keyData)),
b.init(e.algorithm.iv));
if (e.operationSubType === "process") {
b.processDecrypt(e.buffer);
return
}
return e.operationSubType === "finish" ? (t = b.finishDecrypt(),
b = null ,
t) : (t = b.decrypt(e.buffer),
b = null ,
t)
}
,
y.generateKey = function(e) {
if (e.algorithm.length % 8 !== 0)
throw new Error;
return {
type: "keyGeneration",
keyData: E.getBytes(Math.floor(e.algorithm.length / 8)),
keyHandle: {
algorithm: e.algorithm,
extractable: e.extractable,
keyUsage: e.keyUsage,
type: "secret"
}
}
}
,
y.importKey = function(e) {
var t = h.jwkToKey(e.keyData, e.algorithm, ["k"]);
return {
type: "keyImport",
keyData: t.k,
keyHandle: {
algorithm: e.algorithm,
extractable: e.extractable || t.extractable,
keyUsage: e.keyUsage,
type: "secret"
}
}
}
,
y.exportKey = function(e) {
var t = h.keyToJwk(e.keyHandle, e.keyData);
return {
type: "keyExport",
keyHandle: t
}
}
,
e.register("importKey", "aes-cbc", y.importKey),
e.register("exportKey", "aes-cbc", y.exportKey),
e.register("generateKey", "aes-cbc", y.generateKey),
e.register("encrypt", "aes-cbc", y.workerEncrypt),
e.register("decrypt", "aes-cbc", y.workerDecrypt));
var E = new w, x;
i || (x = function() {
function n() {
function t(t) {
try {
e = c.jsCryptoRunner({
data: t
}),
(!t.operationSubType || t.operationSubType !== "process") && this.onmessage({
data: e
})
} catch (n) {
this.onerror({
data: n.description,
type: "error"
})
}
}
var e;
return {
postMessage: t,
onmessage: null ,
onerror: null ,
terminate: function() {}
}
}
function o(e) {
function s(e, t) {}
function o(e, t) {}
function u(e) {
n = e,
this.result && n({
target: this
})
}
function f(e) {
r = e
}
function l() {
return n
}
function c() {
return r
}
function h(t) {
if (t.type === "error") {
this.onerror && this.onerror(t);
return
}
if (t.type === "process")
return;
this.result = e(t.data),
this.oncomplete && this.oncomplete({
target: this
});
return
}
var t = null , n = null , r = null , i;
return i = {
dispatchEvent: h,
addEventListener: s,
removeEventListener: o,
result: null
},
a(i, "oncomplete", null , l, u),
a(i, "onerror", null , c, f),
i
}
function f() {
function e(e) {
switch (e.type) {
case "keyGeneration":
case "keyImport":
case "keyDerive":
return v.add(e.keyHandle, e.keyData),
e.keyHandle;
case "keyExport":
return p(e.keyHandle);
case "keyPairGeneration":
return v.add(e.keyPair.publicKey.keyHandle, e.keyPair.publicKey.keyData),
v.add(e.keyPair.privateKey.keyHandle, e.keyPair.privateKey.keyData),
{
publicKey: e.keyPair.publicKey.keyHandle,
privateKey: e.keyPair.privateKey.keyHandle
};
default:
throw new Error("Unknown key operation")
}
return
}
return o(e)
}
function h(e) {
function t(e) {
return e = p(e),
e
}
var n = o(t);
return n.process = function(t) {
e.operationSubType = "process",
e.buffer = g.toArray(t),
m.continueJob(this, g.clone(e))
}
,
n.finish = function() {
e.operationSubType = "finish",
e.buffer = [],
m.continueJob(this, g.clone(e))
}
,
n.abort = function() {
m.abortJob(this)
}
,
n.onabort = null ,
n.onprogress = null ,
n.algorithm = e.algorithm || null ,
n.key = e.keyHandle || null ,
n
}
function p(e) {
return s && e.pop ? (new Uint8Array(e)).buffer : e
}
function d(e) {
e.oncomplete ? e.oncomplete({
target: e
}) : setTimeout(function() {
d(e)
}, i)
}
function y(t, n) {
if (!e.exists(t, n))
throw new Error("unsupported algorithm")
}
function S(e) {
var t = v.lookup(e);
if (!t)
throw new Error("key not found");
return t
}
function x(e, t) {
var n = {
operationType: e
}
, r = w[e];
for (var i = 0; i < r.length; i += 1) {
var s = b[r[i]]
, o = t[i];
if (!o) {
if (s.required)
throw new Error(s.name);
continue
}
o.subarray && (o = g.toArray(o));
if (l.getObjectType(o) !== s.type)
throw new Error(s.name);
s.name === "algorithm" && (o.name = o.name.toLowerCase(),
o.iv && (o.iv = g.toArray(o.iv)),
o.salt && (o.salt = g.toArray(o.salt)),
o.additionalData && (o.additionalData = g.toArray(o.additionalData)),
o.hash && !o.hash.name && l.getObjectType(o.hash) === "String" && (o.hash = {
name: o.hash
})),
n.hasOwnProperty(s.name) ? n[s.name + "1"] = o : n[s.name] = o
}
return n
}
function T(e, t, n) {
var r = x(e, t);
y(e, r.algorithm.name),
r.keyHandle && (r.keyData = S(r.keyHandle)),
r.keyHandle1 && (r.keyData1 = S(r.keyHandle1)),
r.algorithm && r.algorithm.publicKey && (r.additionalKeyData = S(r.algorithm.publicKey));
var i = n ? f(r) : h(r);
return (n || r.buffer || e === "deriveBits" || e === "wrapKey") && m.runJob(i, r),
i
}
var i = 100
, v = [];
v.add = function(e, t) {
v.push({
keyHandle: e,
keyData: t
})
}
,
v.remove = function(e) {
for (var t = 0; t < v.length; t++)
if (v[t].keyHandle === e) {
v = v.splice(t, 1);
return
}
}
,
v.lookup = function(e) {
for (var t = 0; t < v.length; t++)
if (v[t].keyHandle === e)
return v[t].keyData;
return null
}
;
var m = function() {
function f() {
l(!u);
for (var e = 0; e < s.length; e++)
if (!s[e].busy)
return s[e];
return null
}
function l(e) {
for (var t = s.length - 1; t >= 0; t -= 1)
s[t].isWebWorker === e && (s[t].terminate(),
s.splice(t, 1))
}
function c() {
var e = 0;
for (var t = 0; t < s.length; t++)
s[t].busy || (e += 1);
return e
}
function h(e) {
s.push(e)
}
function p(e) {
for (var t = 0; t < s.length; t++)
if (s[t] === e) {
e.terminate(),
s.splice(t, 1);
return
}
}
function d(e) {
for (var t = 0; t < s.length; t++)
if (s[t].operation === e)
return s[t];
return null
}
function v(e, t) {
o.push({
operation: e,
data: t,
id: a++
})
}
function m(e) {
e.busy = !1,
e.operation = null ;
if (u)
if (o.length > 0) {
var t = o.shift();
w(t.operation, t.data)
} else
c() > i && p(e)
}
function g(e) {
var r;
if (u)
try {
r = new Worker(t),
r.postMessage({
prngSeed: E.getBytes(48)
}),
r.isWebWorker = !0
} catch (i) {
u = !1,
N.forceSync = !0,
r = n(),
r.isWebWorker = !1
}
else
r = n(),
r.isWebWorker = !1;
return r.operation = e,
r.busy = !1,
r.onmessage = function(e) {
var t = r.operation;
for (var n = 0; n < o.length; n++)
if (o[n].operation === r.operation) {
var i = o[n];
o.splice(n, 1),
S(r, i.data);
return
}
t && e.data.type !== "process" && (m(r),
t.dispatchEvent(e))
}
,
r.onerror = function(e) {
var t = r.operation;
m(r),
t.dispatchEvent(e)
}
,
h(r),
r
}
function y(e) {
var t = d(e);
t && p(t)
}
function b(t, n) {
var i = null ;
u = r && !N.forceSync,
i = f();
if (u && i === null && s.length >= e) {
v(t, n);
return
}
i === null && (i = g(t));
if (i === null )
throw v(t, n),
new Error("could not create new worker");
i.operation = t,
i.busy = !0,
S(i, n)
}
function w(e, t) {
var n = d(e);
if (n) {
S(n, t);
return
}
b(e, t)
}
function S(e, t) {
u ? (e.data = t,
e.postMessage(t)) : setTimeout(function() {
e.postMessage(t)
}, 0)
}
var e = 15
, i = 4
, s = []
, o = []
, a = 0;
return {
runJob: b,
continueJob: w,
abortJob: y
}
}()
, g = l
, b = [{
name: "algorithm",
type: "Object",
required: !0
}, {
name: "keyHandle",
type: "Object",
required: !0
}, {
name: "buffer",
type: "Array",
required: !1
}, {
name: "signature",
type: "Array",
required: !0
}, {
name: "format",
type: "String",
required: !0
}, {
name: "keyData",
type: "Array",
required: !0
}, {
name: "extractable",
type: "Boolean",
required: !1
}, {
name: "keyUsages",
type: "Array",
required: !1
}, {
name: "derivedKeyType",
type: "Object",
required: !0
}, {
name: "length",
type: "Number",
required: !1
}]
, w = {
encrypt: [0, 1, 2],
decrypt: [0, 1, 2],
sign: [0, 1, 2],
verify: [0, 1, 3, 2],
digest: [0, 2],
generateKey: [0, 6, 7],
importKey: [4, 5, 0, 6, 7],
exportKey: [0, 4, 1, 6, 7],
deriveKey: [0, 1, 8, 6, 7],
deriveBits: [0, 1, 9],
wrapKey: [1, 1, 0],
unwrapKey: [2, 0, 1, 6, 7]
}
, N = {
encrypt: function(e, t, n) {
return T("encrypt", arguments, 0)
},
decrypt: function(e, t, n) {
return T("decrypt", arguments, 0)
},
sign: function(e, t, n) {
return T("sign", arguments, 0)
},
verify: function(e, t, n, r) {
return T("verify", arguments, 0)
},
digest: function(e, t) {
return T("digest", arguments, 0)
},
generateKey: function(e, t, n) {
return T("generateKey", arguments, 1)
},
deriveKey: function(e, t, n, r, i) {
return T("deriveKey", arguments, 1)
},
deriveBits: function(e, t, n) {
return T("deriveBits", arguments, 0)
},
importKey: function(e, t, n, r, i) {
return T("importKey", arguments, 1)
},
exportKey: function(e, t) {
return T("exportKey", [t.algorithm, e, t], 1)
},
wrapKey: function(e, t, n) {
return T("wrapKey", arguments, 0)
},
unwrapKey: function(e, t, n, r, i) {
return T("unwrapKey", arguments, 1)
}
};
return N
}());
var T = {
subtle: x,
getRandomValues: function(e) {
var t, n = E.getBytes(e.length);
for (t = 0; t < e.length; t += 1)
e[t] = n[t];
return e
},
initPrng: function(e) {
var t = Object.prototype.toString.call(e);
if (t !== "[object Array]" && t !== "[object Uint8Array]")
throw new Error("entropyData must be a Array or Uint8Array");
N && N.reseed(e),
E.reseed(N.read(48)),
n = !0
},
toBase64: function(e, t) {
return l.toBase64(e, !1)
},
base64ToString: function(e) {
return l.base64ToString(e)
},
utilities: l,
sha256: v.sha256,
url: t
};
typeof cryptoMath != "undefined" && (T.cryptoMath = cryptoMath),
typeof testInterface != "undefined" && (T.testInterface = testInterface);
var N;
if (!i) {
N = N || new S,
N.init();
var C = N.read(48);
E.init(C)
}
return T
}();
return t
}),
define("utils/common/msCryptoAdapter", ["require", "exports", "module", "vendor/msrcrypto.aes"], function(e, t) {
function r(e) {
return new Promise(function(t, n) {
e.oncomplete = function(e) {
t(e.target.result)
}
,
e.onerror = n
}
)
}
var n = e("vendor/msrcrypto.aes");
n.subtle.forceSync = !0,
t.getRandomValues = n.getRandomValues,
t.subtle = {
generateKey: function(t, i, s) {
return r(n.subtle.generateKey(t, i, s))
},
exportKey: function(t, i) {
return r(n.subtle.exportKey(t, i))
},
importKey: function(t, i, s, o, u) {
return r(n.subtle.importKey(t, i, s, o, u))
},
encrypt: function(t, i, s) {
return r(n.subtle.encrypt(t, i, s))
},
decrypt: function(t, i, s) {
return r(n.subtle.decrypt(t, i, s))
}
}
}),
define("utils/common/encryption", ["require", "exports", "module", "utils/common/msCryptoAdapter", "browser/window"], function(e, t) {
function u(e) {
var t = 6e4
, n = []
, r = [];
if (e.length <= t)
return Array.apply(null , e);
for (var i = 0, s = e.length; i < s; i += t)
n.push(e.subarray(i, i + t));
return n.forEach(function(e) {
r = r.concat(Array.apply(null , e))
}),
r
}
function a(e) {
var t = new Uint8Array(e.length);
for (var n = 0; n < e.length; n++)
t[n] = e.charCodeAt(n);
return t
}
function f(e) {
var t = 6e4
, n = []
, r = new Uint8Array(e)
, i = "";
if (r.length <= t)
return String.fromCharCode.apply(null , r);
for (var s = 0, o = r.length; s < o; s += t)
n.push(r.subarray(s, s + t));
return n.forEach(function(e) {
i = i.concat(String.fromCharCode.apply(null , e))
}),
i
}
function l(e, t) {
return {
data: f(t),
iv: u(e)
}
}
var n = e("utils/common/msCryptoAdapter"), r = e("browser/window"), i = "Aes-cbc", s = ["encrypt", "decrypt"], o;
r.crypto ? r.crypto.webkitSubtle ? o = {
crypto: {
getRandomValues: r.crypto.getRandomValues.bind(r.crypto),
subtle: r.crypto.webkitSubtle
},
importedKeyProcessor: a,
exportedKeyProcessor: f
} : o = {
crypto: r.crypto,
importedKeyProcessor: JSON.parse,
exportedKeyProcessor: JSON.stringify
} : o = {
crypto: n,
importedKeyProcessor: a,
exportedKeyProcessor: f
},
t.generateEncryptionKey = function() {
return o.crypto.subtle.generateKey({
name: i,
length: 256
}, !0, s)
}
,
t.exportEncryptionKey = function(e) {
return o.crypto.subtle.exportKey("jwk", e).then(o.exportedKeyProcessor)
}
,
t.importEncryptionKey = function(e) {
return o.crypto.subtle.importKey("jwk", o.importedKeyProcessor(e), {
name: i
}, !0, s)
}
,
t.encrypt = function(e, t) {
var n, r = {
name: i
};
return new Promise(function(i, s) {
function u(e) {
i(l(r.iv, e))
}
try {
n = a(encodeURI(JSON.stringify(t)))
} catch (f) {
s(f);
return
}
r.iv = o.crypto.getRandomValues(new Uint8Array(16)),
o.crypto.subtle.encrypt(r, e, n).then(u, s)
}
)
}
,
t.decrypt = function(e, t) {
var n, r;
return !t || !t.data ? Promise.reject("Invalid encrypted data") : (n = {
name: i,
iv: new Uint8Array(t.iv)
},
r = a(t.data),
new Promise(function(t, i) {
function s(e) {
try {
t(JSON.parse(decodeURI(f(e))))
} catch (n) {
i(n);
return
}
}
o.crypto.subtle.decrypt(n, e, r).then(s, i)
}
))
}
}),
define("utils/common/cache/keyHasher", ["require", "lodash-compat", "constants/common"], function(e) {
function r(e, r) {
function s(e, t) {
return t.key === e
}
function o(e, t) {
return t.hash === e
}
var i = {
cursor: 0,
map: []
};
this.fillMap = function(e) {
e !== null && (i = e)
}
,
this.getHashByKey = function(o) {
if (o === n.INTERNAL_KEYS.KEYS_MAP)
return o;
var u = t.find(i.map, s.bind(null , o));
return u && u.hash ? u.hash : (u = "key-" + i.cursor,
r && (u += "-" + o),
i.cursor++,
i.map.push({
key: o,
hash: u
}),
e(n.INTERNAL_KEYS.KEYS_MAP, i),
u)
}
,
this.getKeyByHash = function(e) {
var n = t.find(i.map, o.bind(null , e));
return n && n.key ? n.key : e
}
,
this.removeKeyFromMap = function(r) {
var o = t.remove(i.map, s.bind(null , r));
o.length && e(n.INTERNAL_KEYS.KEYS_MAP, i)
}
}
var t = e("lodash-compat")
, n = e("constants/common").cache;
return {
build: function(e, t) {
return new r(e,t)
}
}
}),
define("utils/common/cache/provider", ["require", "constants/common", "services/serviceLocator", "constants/common", "browser/window", "utils/common/settablePromise", "utils/common/encryption", "utils/common/cache/keyHasher", "lodash-compat"], function(e) {
function l() {
function b(e, t, n) {
if (!l.log)
return
}
function w(t) {
if (l.plainData) {
var n = s.build();
return n.resolve(JSON.stringify(t)),
n
}
return o.encrypt(e, t)
}
function E(t) {
if (l.plainData) {
var n = s.build();
return n.resolve(JSON.parse(t)),
n
}
return o.decrypt(e, t)
}
function S() {
y.getSensitiveItem(t.INTERNAL_KEYS.KEYS_MAP).then(m.fillMap).then(c.resolve, c.resolve)
}
function x(e) {
return i.localStorage.getItem(C(e))
}
function T(e) {
return i.localStorage.removeItem(C(e))
}
function N(e, t) {
return i.localStorage.setItem(C(e), t)
}
function C(e) {
return h + e
}
function k(e) {
return i.localStorage.hasOwnProperty(e) && p.test(e)
}
function L(e, t) {
return Object.keys(i.localStorage).reduce(function(n, r) {
var i = m.getKeyByHash(r.replace(p, ""));
return A(r, i, e, t) ? n.concat(i) : n
}, [])
}
function A(e, n, r, i) {
var s = i ? i.test(n) : !0;
return k(e) && s && (r || e !== C(t.INTERNAL_KEYS.VERSION))
}
function O(e) {
L(e).forEach(function(e) {
i.localStorage.removeItem(C(e))
})
}
var e, f, l = {
log: !1,
showKeys: !1,
plainData: !1
}, c = s.build(), h = t.PREFIX_KEYWORD + "|", p = new RegExp("^" + t.PREFIX_KEYWORD + "\\|"), d = n.resolve(r.serviceLocator.FEATURE_FLAGS).isFeatureOn(r.featureFlags.DEACTIVATE_CACHE), v = {}, m, g = {}, y = this;
y.init = function(n, r) {
function w(n) {
function u(t) {
o.importEncryptionKey(t.response).then(function(t) {
e = t,
p("Key decrypted -> initialization completed"),
n()
}, l)
}
function a(e) {
N(t.INTERNAL_KEYS.ENCRYPTION_KEY, e.response)
}
function f(t) {
e = t,
o.exportEncryptionKey(e).then(function(e) {
s.encrypt(e).then(a)
}),
p("New key generated -> initialization completed"),
n()
}
function l() {
p("KES not reachable, deactivating cache and completing initialization"),
d = !0,
n()
}
function c() {
p("Starting with fresh cache"),
i && O(),
o.generateEncryptionKey().then(f, l)
}
var r;
if (d) {
p("Cache is deactivated -> initialization completed"),
n();
return
}
r = x(t.INTERNAL_KEYS.ENCRYPTION_KEY),
r ? (p("Getting key from KES"),
s.decrypt(r).then(u, c)) : c()
}
var i = !0, s, h, p = b.bind(y, "[Init]"), v = t.VERSION;
a.merge(l, r);
if (f)
return f;
a.forEach(l, function(e, t) {
if (t === "log")
return;
e && (v += "|" + t)
}),
m = u.build(y.setSensitiveItem, l.showKeys),
h = x(t.INTERNAL_KEYS.VERSION),
s = new n;
if (h !== v) {
h ? (p("Version changed from " + h + " to " + v),
O()) : (p("Version not found"),
O(!0)),
i = !1;
try {
N(t.INTERNAL_KEYS.VERSION, v)
} catch (g) {
if (g.name !== "QuotaExceededError")
throw g;
p("Deactivating cache as storage is locked"),
d = !0
}
}
return f = (new Promise(w)).then(S).then(c),
f
}
,
y.isDeactivated = function() {
return d
}
,
y.destroy = function(e) {
!d && e && f && O(),
f = null ,
v = {},
g = {}
}
,
y.getAllKeys = function(e) {
return new Promise(function(t) {
if (d) {
t([]);
return
}
c.then(function() {
t(L(!1, e))
})
}
)
}
,
y.setSensitiveItem = function(e, t, n) {
function u() {
function n(t) {
var n = m.getHashByKey(e);
N(n, JSON.stringify(t)),
o("encrypted"),
s.resolvePromise(),
delete v[e]
}
o("encrypting", t),
w(g[e]).then(n, function(e) {
o("Encryption failed"),
s.rejectPromise(e)
})
}
function a() {
o("Starting new writing operation with delay of " + n + "ms"),
s.promise = new Promise(function(e, t) {
s.resolvePromise = e,
s.rejectPromise = t,
s.timeout = i.setTimeout(function() {
c.then(u)
}, n)
}
),
v[e] = s
}
function f() {
o("Resetting writing operation timeout"),
i.clearTimeout(s.timeout),
s.timeout = i.setTimeout(function() {
c.then(u)
}, n)
}
var s = v[e] || {}
, o = b.bind(y, "[SetSensitiveItem: " + e + "]");
return isNaN(n) && (n = r.cache.DEFAULT_BUFFER_TIMEOUT),
g[e] = t,
d ? new Promise(function(e) {
o("Cache deactivated, resolving"),
e()
}
) : (s.promise ? f() : a(),
s.promise)
}
,
y.setItem = function(e, t) {
var n = b.bind(y, "[SetItem: " + e + "]");
return new Promise(function(r, i) {
c.then(function() {
g[e] = t;
if (d) {
n("Cache deactivated, resolving"),
r();
return
}
try {
var s = m.getHashByKey(e);
N(s, JSON.stringify(t)),
n("stored"),
r()
} catch (o) {
n("storage failed", o),
i(o)
}
})
}
)
}
,
y.getSensitiveItem = function(e) {
function r(t, r) {
var i;
n("Getting");
if (d) {
n("Cache deactivated, returning internal value", g[e]),
t(g[e] || null );
return
}
if (typeof g[e] != "undefined") {
n("Retrieved value already before, returning it", g[e]),
t(g[e]);
return
}
var s = m.getHashByKey(e);
i = x(s);
if (!i) {
n("No data found in storage"),
t(null );
return
}
try {
i = JSON.parse(i)
} catch (o) {
n("Parsing of stored data failed"),
r(o)
}
E(i).then(function(r) {
g[e] = r,
n("Decrypted", r),
t(r)
}, function(e) {
n("Decryption failed", e),
r(e)
})
}
var n = b.bind(y, "[GetSensitiveItem: " + e + "]");
return new Promise(function(n, i) {
e === t.INTERNAL_KEYS.KEYS_MAP ? r(n, i) : c.then(r.bind(null , n, i))
}
)
}
,
y.getSensitiveItems = function(e) {
var t = s.build();
return y.getAllKeys(e).then(function(e) {
var n = e.reduce(function(e, t) {
return e.concat(y.getSensitiveItem(t))
}, []);
Promise.all(n).then(t.resolve, t.reject)
}).catch(t.reject),
t
}
,
y.getItem = function(e) {
function n(n, r) {
var i;
t("Getting");
if (d) {
t("Cache deactivated, returning internal value", g[e]),
n(g[e] || null );
return
}
if (typeof g[e] != "undefined") {
t("Retrieved value already before, returning it", g[e]),
n(g[e]);
return
}
var s = m.getHashByKey(e);
i = x(s);
if (!i) {
t("No data found in storage"),
n(null );
return
}
try {
i = JSON.parse(i),
t("Found", i),
n(i)
} catch (o) {
t("Parsing of stored data failed"),
r(o)
}
}
var t = b.bind(y, "[GetItem: " + e + "]");
return new Promise(function(e, t) {
c.then(n.bind(null , e, t))
}
)
}
,
y.removeItem = function(e) {
var t = b.bind(y, "[RemoveItem: " + e + "]");
return new Promise(function(n) {
c.then(function() {
delete g[e],
d || (T(m.getHashByKey(e)),
m.removeKeyFromMap(e),
typeof v[e] != "undefined" && (t("Item is removed prior encryption timeout finished. Cancelling encryption."),
i.clearTimeout(v[e].timeout),
v[e].rejectPromise(),
delete v[e])),
t("Removed"),
n()
})
}
)
}
}
var t = e("constants/common").cache
, n = e("services/serviceLocator")
, r = e("constants/common")
, i = e("browser/window")
, s = e("utils/common/settablePromise")
, o = e("utils/common/encryption")
, u = e("utils/common/cache/keyHasher")
, a = e("lodash-compat")
, f = "[CacheProvider]";
return l
}),
define("utils/common/cache/instance", ["require", "exports", "module", "utils/common/cache/provider"], function(e, t) {
var n = e("utils/common/cache/provider"), r;
t.get = function() {
return r || (r = new n),
r
}
}),
define("jSkype/services/contacts/facade", ["require", "jSkype/client", "cafe/enums", "jSkype/constants/data", "utils/common/cache/instance", "constants/common", "jSkype/settings", "jSkype/services/contacts/serviceSettings"], function(e) {
function a(e, f) {
function l(t, n) {
var r = u.getMyContactsEndpoint(t, u.version, n)
, i = f.build().then(function(t) {
return e.get(r, t)
});
return i.then(function(e) {
var t = e.request.getResponseHeader("ETag");
t && f.setHeader(a.IF_NONE_MATCH, t)
}),
i
}
function c(t, n) {
return i.get().getItem(r.ETAG).then(function(r) {
return r ? f.setHeader(a.IF_NONE_MATCH, r) : h(),
f.build().then(function(r) {
var i = u.getMyDeltaContactsEndpoint(t, u.version, n);
return e.get(i, r)
})
})
}
function h() {
f.setHeader(a.IF_NONE_MATCH, "/")
}
this.init = function() {
h(),
t.get().signInManager.state.when(n.loginState.SignedOut, function() {
f.removeHeader(a.IF_NONE_MATCH)
})
}
,
this.getMyContacts = function(e, t) {
var n;
return f.setServiceName(u.actions.getMyContacts),
o.isFeatureOn(s.featureFlags.CONTACT_PROFILE_CACHE) ? n = c(e, t) : n = l(e, t),
n
}
,
this.deleteContact = function(t, n, r) {
var i = u.getDeleteContactEndpoint(t, n, r, u.version);
return f.setServiceName(u.actions.deleteContact),
f.build().then(function(t) {
return e.remove(i, t)
})
}
}
var t = e("jSkype/client")
, n = e("cafe/enums")
, r = e("jSkype/constants/data").storageKeys
, i = e("utils/common/cache/instance")
, s = e("constants/common")
, o = e("jSkype/settings")
, u = e("jSkype/services/contacts/serviceSettings");
return a.IF_NONE_MATCH = "If-None-Match",
a
}),
define("jSkype/services/contacts/main", ["require", "exports", "module", "jSkype/services/contacts/facade"], function(e, t) {
var n = e("jSkype/services/contacts/facade"), r;
t.getInstance = function(t, i) {
return r || (r = new n(t,i),
r.init()),
r
}
}),
define("jSkype/services/internalPubSub", ["require", "lodash-compat", "swx-pubsub"], function(e) {
function i() {
return r || (r = new n,
t.bindAll(r, "subscribe", "unsubscribe", "publish", "unsubscribeAll")),
r
}
function s() {
r = null
}
var t = e("lodash-compat"), n = e("swx-pubsub").default, r;
return {
get: i,
reset: s
}
}),
define("jSkype/services/stratus/dispatcher", ["require", "jSkype/services/internalPubSub"], function(e) {
var t = e("jSkype/services/internalPubSub");
return function(n) {
function r(e) {
var t = {};
return t.responseData = e || {},
t.moduleName = "stratus",
t.actionName = n,
t
}
this.success = function(e) {
var n = r(e.response);
t.get().publish("stratus:data", n)
}
,
this.error = function(e) {
var n = r(e);
t.get().publish("stratus:error", n)
}
}
}),
define("jSkype/services/stratus/actions", {
GET_PENDING_CONTACT_REQUESTS: "getIncomingContactRequests",
GET_PROFILE: "getProfile",
GET_PROFILES: "getProfiles",
GET_MY_CONTACTS: "getMyContacts",
CONTACT_REQUEST_SENT: "contactRequestSent",
CONTACT_REQUEST_ACCEPTED: "contactRequestAccepted",
CONTACT_REQUEST_DECLINED: "contactRequestDeclined",
SEND_CONTACT_REQUEST: "sendContactRequest",
ACCEPT_CONTACT_REQUEST: "acceptContactRequest",
DECLINE_CONTACT_REQUEST: "declineContactRequest",
BLOCK_CONTACT: "blockContact",
UNBLOCK_CONTACT: "unblockContact",
DELETE_CONTACT: "deleteContact",
SEARCH_DIRECTORY: "searchDirectory",
SEARCH_DIRECTORY_BY_ID: "searchDirectoryById"
}),
define("jSkype/services/clientInfo", ["require", "jSkype/settings", "browser/detect"], function(e) {
function r() {
var e = n.getSystemInfo()
, r = t.settings.lcid || "en-us"
, i = t.settings.country || "n/a"
, s = "os=" + e.osName + "; osVer=" + e.osVersion + "; proc=" + e.platform + "; lcid=" + r + ";";
return s += " deviceType=" + e.deviceType + "; country=" + i + "; clientName=" + t.settings.biAppName + "; clientVer=" + t.settings.uiVersion,
s
}
var t = e("jSkype/settings")
, n = e("browser/detect");
return {
getBIAppName: function() {
return t.settings.biAppName
},
getBIVersion: function() {
return t.settings.uiVersion
},
getClientInfo: r
}
}),
define("jSkype/constants/common", {
contentTypes: {
FORM_URL_ENCODED: "application/x-www-form-urlencoded",
JSON_V1_0: "application/json; ver=1.0",
JSON_V2_0: "application/json; ver=2.0",
JSON_V3_0: "application/json; ver=3.0"
}
}),
define("jSkype/services/stratus/facade", ["require", "constants/common", "jSkype/settings", "jSkype/services/stratus/serviceSettings", "jSkype/services/stratus/dispatcher", "jSkype/services/stratus/actions", "jSkype/services/clientInfo", "jSkype/constants/common"], function(e) {
function a(e, a) {
function p(e, t) {
a.setOption("payload", e),
a.setOption("contentType", t)
}
this.actions = s,
this.updateAvatar = function(t, n, o) {
var u, l = r.getAvatarUpdateEndPoint(t), c = f(s.UPDATE_AVATAR, t), h = new i(c);
return a.setServiceName(s.UPDATE_AVATAR),
a.setOption("payload", n),
a.setOption("contentType", o),
a.setOption("processData", !1),
u = a.build().then(function(t) {
return e.put(l, t)
}),
u.then(h.success, h.error),
u
}
,
this.getProfile = function() {
var t = r.getProfileEndPoint();
return a.setServiceName(s.GET_PROFILE),
a.build().then(function(n) {
return e.get(t, n)
})
}
,
this.getProfiles = function(i) {
var o;
return a.setServiceName(s.GET_PROFILES),
n.isFeatureOn(t.BATCH_PROFILES_V2) ? (o = r.getProfilesEndPointV2(),
p(JSON.stringify({
usernames: i
}), u.contentTypes.JSON_V1_0)) : (o = r.getProfilesEndPoint(),
p(c(i.map(l)), u.contentTypes.FORM_URL_ENCODED)),
a.build().then(function(t) {
return e.post(o, t)
})
}
,
this.getUserInfo = function() {
var t = r.getUserInfoEndPoint();
return a.setServiceName("getUserInfo"),
a.setHeader("Accept", u.contentTypes.JSON_V2_0),
a.build().then(function(n) {
return e.get(t, n)
})
}
,
this.searchDirectory = function(t) {
var n = r.getDirectorySearchEndpoint(t);
return a.setServiceName(s.SEARCH_DIRECTORY),
a.build().then(function(t) {
return e.get(n, t)
})
}
,
this.searchDirectoryById = function(t) {
var n = r.getDirectorySearchByIdEndpoint(t);
return a.setServiceName(s.SEARCH_DIRECTORY_BY_ID),
a.build().then(function(t) {
return e.get(n, t)
})
}
,
this.sendContactRequest = function(t, n) {
var o, l = f(s.CONTACT_REQUEST_SENT, t), c = new i(l), p = h(r.getContactRequestEndpoint(), encodeURIComponent(t));
return a.setServiceName(s.SEND_CONTACT_REQUEST),
a.setOption("payload", "greeting=" + n),
a.setOption("contentType", u.contentTypes.FORM_URL_ENCODED),
o = a.build().then(function(t) {
return e.put(p, t)
}),
o.then(c.success, c.error),
o
}
,
this.getIncomingContactRequests = function() {
var t, n = new i(s.GET_PENDING_CONTACT_REQUESTS), o = r.getContactRequestEndpoint();
return a.setServiceName(s.GET_PENDING_CONTACT_REQUESTS),
t = a.build().then(function(t) {
return e.get(o, t)
}),
t.then(n.success, n.error),
t
}
,
this.acceptContactRequest = function(t) {
var n, o = f(s.CONTACT_REQUEST_ACCEPTED, t), l = new i(o), c = h(r.getContactRequestEndpoint(), encodeURIComponent(t), "accept");
return a.setServiceName(s.ACCEPT_CONTACT_REQUEST),
a.setOption("contentType", u.contentTypes.FORM_URL_ENCODED),
n = a.build().then(function(t) {
return e.put(c, t)
}),
n.then(l.success, l.error),
n
}
,
this.declineContactRequest = function(t) {
var n, o = f(s.CONTACT_REQUEST_DECLINED, t), l = new i(o), c = h(r.getContactRequestEndpoint(), encodeURIComponent(t), "decline");
return a.setServiceName(s.DECLINE_CONTACT_REQUEST),
a.setOption("contentType", u.contentTypes.FORM_URL_ENCODED),
n = a.build().then(function(t) {
return e.put(c, t)
}),
n.then(l.success, l.error),
n
}
,
this.blockContact = function(t, n) {
var l, h = r.getBlockContactEndpoint(t), p = f(s.BLOCK_CONTACT, t), d = new i(p), v = [{
name: "reporterIp",
value: "127.0.0.1"
}, {
name: "uiVersion",
value: o.getBIVersion()
}];
return n && v.push({
name: "reportAbuse",
value: "1"
}),
a.setServiceName(s.BLOCK_CONTACT),
a.setOption("payload", c(v)),
a.setOption("contentType", u.contentTypes.FORM_URL_ENCODED),
l = a.build().then(function(t) {
return e.put(h, t)
}),
l.then(d.success, d.error),
l
}
,
this.unblockContact = function(t) {
var n, o = f(s.UNBLOCK_CONTACT, t), u = new i(o), l = r.getUnblockContactEndpoint(t);
return a.setServiceName(s.UNBLOCK_CONTACT),
n = a.build().then(function(t) {
return e.put(l, t)
}),
n.then(u.success, u.error),
n
}
,
this.deleteContact = function(t) {
var n, o = f(s.DELETE_CONTACT, t), u = new i(o), l = r.getDeleteContactEndpoint(t);
return a.setServiceName(s.DELETE_CONTACT),
n = a.build().then(function(t) {
return e.remove(l, t)
}),
n.then(u.success, u.error),
n
}
}
function f(e, t) {
return e + ":" + t
}
function l(e) {
return {
name: "contacts[]",
value: e
}
}
function c(e) {
return e.reduce(function(e, t) {
return e.concat(t.name + "=" + t.value)
}, []).join("&")
}
function h() {
return Array.prototype.slice.call(arguments).join("/")
}
var t = e("constants/common").featureFlags
, n = e("jSkype/settings")
, r = e("jSkype/services/stratus/serviceSettings")
, i = e("jSkype/services/stratus/dispatcher")
, s = e("jSkype/services/stratus/actions")
, o = e("jSkype/services/clientInfo")
, u = e("jSkype/constants/common");
return a
}),
define("jSkype/services/stratus/main", ["require", "exports", "module", "jSkype/services/stratus/facade"], function(e, t) {
var n = e("jSkype/services/stratus/facade"), r;
t.getInstance = function(e, t) {
return r || (r = new n(e,t)),
r
}
}),
define("jSkype/services/people/facade", ["require", "exports", "module", "jSkype/settings"], function(e, t) {
function r(e, t) {
function r(e) {
t.setServiceName(e),
t.setHeader("X-AppId", n.settings.peopleService.appId),
t.setHeader("X-SerializeAs", "purejson")
}
this.getSettings = function() {
return r("peopleServiceGetSettings"),
t.build().then(function(t) {
return e.get(n.settings.peopleService.settingsEndpoint, t)
})
}
,
this.setSettings = function(i) {
var s = {
Settings: [{
Name: "Skype.AutoBuddy",
Value: !!i
}]
};
return r("peopleServiceSetSettings"),
t.setOption("payload", JSON.stringify(s)),
t.build().then(function(t) {
return e.post(n.settings.peopleService.settingsEndpoint, t)
})
}
}
var n = e("jSkype/settings");
t.build = function(e, t) {
return new r(e,t)
}
}),
define("jSkype/services/people/main", ["require", "exports", "module", "jSkype/services/people/facade"], function(e, t) {
var n = e("jSkype/services/people/facade"), r;
t.getInstance = function(t, i) {
return r || (r = n.build(t, i)),
r
}
}),
define("jSkype/services/ABCHProfile/facade", ["require", "exports", "module", "jSkype/settings"], function(e, t) {
function r(e, t) {
function r(e) {
t.setServiceName(e),
t.setHeader("PS-ApplicationId", n.settings.profileService.appId)
}
this.getProfile = function() {
return r("profileServiceGetProfile"),
t.build().then(function(t) {
return e.get(n.settings.profileService.profileEndpoint, t)
})
}
,
this.updatePhoneNumber = function(i) {
var s = {
Attributes: [{
Edit: [{
Name: i.number,
Searchable: i.isSearchable,
Country: i.cc
}],
Name: "PersonalContactProfile.Phones",
Delete: null ,
Add: null
}]
};
return r("profileServiceUpdatePhoneNumber"),
t.setOption("payload", JSON.stringify(s)),
t.setHeader("Content-Type", "application"),
t.build().then(function(t) {
return e.post(n.settings.profileService.profileEndpoint, t)
})
}
,
this.deletePhoneNumber = function(i) {
var s = {
Attributes: [{
Edit: null ,
Name: "PersonalContactProfile.Phones",
Delete: [{
Name: i.number,
Country: i.cc
}],
Add: null
}]
};
return r("profileServiceDeletePhoneNumber"),
t.setOption("payload", JSON.stringify(s)),
t.setHeader("Content-Type", "application"),
t.build().then(function(t) {
return e.post(n.settings.profileService.profileEndpoint, t)
})
}
}
var n = e("jSkype/settings");
t.build = function(e, t) {
return new r(e,t)
}
}),
define("jSkype/services/ABCHProfile/main", ["require", "exports", "module", "jSkype/services/ABCHProfile/facade"], function(e, t) {
var n = e("jSkype/services/ABCHProfile/facade"), r;
t.getInstance = function(t, i) {
return r || (r = n.build(t, i)),
r
}
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/guid", ["require", "exports"], e)
}(function(e, t) {
function n(e) {
var t = e.toString(16), n = 4 - t.length, r;
for (r = 0; r < n; r += 1)
t = "0" + t;
return t
}
function r() {
var e = new Array(8), t, r;
for (r = 0; r < e.length; r += 2)
t = Math.floor(Math.random() * 4294967296),
e[r] = n(t & 65535),
e[r + 1] = n(t >>> 16),
r + 1 === 3 && (e[r + 1] = "4" + e[r + 1].substring(1));
return e
}
function i() {
var e = r();
return e[0] + e[1] + "-" + e[2] + "-" + e[3] + "-" + e[4] + "-" + e[5] + e[6] + e[7]
}
function s() {
var e = r();
return e[0] + e[1] + e[2] + e[3] + e[4] + e[5] + e[6] + e[7]
}
t.create = i,
t.createRaw = s
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("global-portable/lib/global", ["require", "exports"], e)
}(function(e, t) {
var n = "undefined"
, r = typeof window !== n ? window : typeof global !== n ? global : Object.create(null );
t.__esModule = !0,
t["default"] = r
}),
define("global-portable", ["global-portable/lib/global"], function(e) {
return e
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-browser-globals/lib/globals", ["require", "exports", "global-portable"], e)
}(function(e, t) {
function s() {
return r
}
function o() {
return i
}
var n = e("global-portable")
, r = n["default"].window
, i = n["default"].document;
t.getWindow = s,
t.getDocument = o
}),
define("swx-browser-globals", ["swx-browser-globals/lib/globals"], function(e) {
return e
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/loader", ["require", "exports", "swx-browser-globals"], e)
}(function(e, t) {
function r(e, t) {
e.getElementsByTagName("head")[0].appendChild(t)
}
function i(e) {
var t = n.getDocument()
, i = t.createElement("link");
return i.href = e,
i.type = "text/css",
i.rel = "stylesheet",
r(t, i),
i
}
function s(e, t, i) {
var s = n.getDocument()
, o = s.createElement("script");
return o.src = e,
o.type = "text/javascript",
o.async = !0,
t && (o.onload = t),
i && (o.onerror = i),
r(s, o),
o
}
var n = e("swx-browser-globals");
t.loadStyle = i,
t.loadScript = s
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/sessionStorage", ["require", "exports", "swx-browser-globals"], e)
}(function(e, t) {
function r(e, t) {
var r = n.getWindow();
try {
r.sessionStorage.setItem(e, t)
} catch (i) {}
}
function i(e) {
var t = n.getWindow();
try {
return t.sessionStorage.getItem(e)
} catch (r) {}
}
function s(e) {
var t = n.getWindow();
try {
return t.sessionStorage.removeItem(e)
} catch (r) {}
}
function o() {
var e = n.getWindow();
try {
e.sessionStorage.clear()
} catch (t) {}
}
var n = e("swx-browser-globals");
t.set = r,
t.get = i,
t.remove = s,
t.clear = o
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/stopwatch", ["require", "exports"], e)
}(function(e, t) {
function r() {
return new n
}
var n = function() {
function e() {
this.msElapsed = 0,
this.isPaused = !1,
this.startTime = (new Date).getTime()
}
return e.prototype.pause = function() {
this.isPaused || (this.msElapsed += (new Date).getTime() - this.startTime,
this.isPaused = !0)
}
,
e.prototype.resume = function() {
this.isPaused && (this.isPaused = !1,
this.startTime = (new Date).getTime())
}
,
e.prototype.duration = function() {
return this.isPaused ? this.msElapsed : this.msElapsed + (new Date).getTime() - this.startTime
}
,
e.prototype.durationInMinutes = function() {
var e = this.duration() / 6e4;
return Math.ceil(e)
}
,
e.prototype.durationInSeconds = function() {
var e = this.duration() / 1e3;
return Math.ceil(e)
}
,
e
}();
t.Stopwatch = n,
t.build = r
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/stringUtils", ["require", "exports", "lodash-compat"], e)
}(function(e, t) {
function o(e, t) {
if (!e)
return !1;
var r = new RegExp("\\b" + n.escapeRegExp(t),"i");
return a(e).search(r) !== -1
}
function u(e) {
return e.replace(/[\W]+|[\s]+/gi, " ").trim()
}
function a(e) {
var t = parseInt("0xD800"), r = parseInt("0xDBFF"), i = 0, o = "", u = "", a;
if (!e)
return e;
while (i < e.length) {
o += e.charAt(i),
a = e.charCodeAt(i);
if (a < t || a > r)
u += n.has(s, o) ? s[o] : o,
o = "";
i++
}
return u
}
function f(e, t, n, r) {
return typeof r == "undefined" && (r = n),
e.substr(0, n) + t + e.substr(r, e.length)
}
function l(e) {
return e === ""
}
function c(e) {
return n.isString(e) && e.length > 0
}
function h(e) {
return e === "\r"
}
function p(e) {
return e === "\n"
}
function d(e) {
return e === " "
}
function v(e, t) {
var n = this.wordBoundariesAt(e, t);
return n.start === -1 ? "" : e.substring(n.start, n.end)
}
function m(e, t) {
if (t > e.length)
return {
start: -1,
end: -1
};
if (t === e.length) {
if (e.search(/\s$/) !== -1)
return {
start: -1,
end: -1
};
t--
}
var n = e.substring(0, t).search(/\S+$/)
, r = e.substring(t).search(/\s/);
return n === -1 && (n = t),
r === -1 ? r = e.length : r += t,
{
start: n,
end: r
}
}
function g(e) {
return r + e + i
}
var n = e("lodash-compat")
, r = "‪"
, i = "‬"
, s = {
"ª": "a",
"º": "o",
"À": "A",
"Á": "A",
"Â": "A",
"Ã": "A",
"Ä": "A",
"Å": "A",
"Ç": "C",
"È": "E",
"É": "E",
"Ê": "E",
"Ë": "E",
"Ì": "I",
"Í": "I",
"Î": "I",
"Ï": "I",
"Ñ": "N",
"Ò": "O",
"Ó": "O",
"Ô": "O",
"Õ": "O",
"Ö": "O",
"Ù": "U",
"Ú": "U",
"Û": "U",
"Ü": "U",
"Ý": "Y",
"à": "a",
"á": "a",
"â": "a",
"ã": "a",
"ä": "a",
"å": "a",
"ç": "c",
"è": "e",
"é": "e",
"ê": "e",
"ë": "e",
"ì": "i",
"í": "i",
"î": "i",
"ï": "i",
"ñ": "n",
"ò": "o",
"ó": "o",
"ô": "o",
"õ": "o",
"ö": "o",
"ù": "u",
"ú": "u",
"û": "u",
"ü": "u",
"ý": "y",
"ÿ": "y",
"Ā": "A",
"ā": "a",
"Ă": "A",
"ă": "a",
"Ą": "A",
"ą": "a",
"Ć": "C",
"ć": "c",
"Ĉ": "C",
"ĉ": "c",
"Ċ": "C",
"ċ": "c",
"Č": "C",
"č": "c",
"Ď": "D",
"ď": "d",
"Ē": "E",
"ē": "e",
"Ĕ": "E",
"ĕ": "e",
"Ė": "E",
"ė": "e",
"Ę": "E",
"ę": "e",
"Ě": "E",
"ě": "e",
"Ĝ": "G",
"ĝ": "g",
"Ğ": "G",
"ğ": "g",
"Ġ": "G",
"ġ": "g",
"Ģ": "G",
"ģ": "g",
"Ĥ": "H",
"ĥ": "h",
"Ĩ": "I",
"ĩ": "i",
"Ī": "I",
"ī": "i",
"Ĭ": "I",
"ĭ": "i",
"Į": "I",
"į": "i",
"İ": "I",
"IJ": "IJ",
"ij": "ij",
"Ĵ": "J",
"ĵ": "j",
"Ķ": "K",
"ķ": "k",
"Ĺ": "L",
"ĺ": "l",
"Ļ": "L",
"ļ": "l",
"Ľ": "L",
"ľ": "l",
"Ŀ": "L·",
"ŀ": "l·",
"Ń": "N",
"ń": "n",
"Ņ": "N",
"ņ": "n",
"Ň": "N",
"ň": "n",
"ʼn": "ʼn",
"Ō": "O",
"ō": "o",
"Ŏ": "O",
"ŏ": "o",
"Ő": "O",
"ő": "o",
"Ŕ": "R",
"ŕ": "r",
"Ŗ": "R",
"ŗ": "r",
"Ř": "R",
"ř": "r",
"Ś": "S",
"ś": "s",
"Ŝ": "S",
"ŝ": "s",
"Ş": "S",
"ş": "s",
"Š": "S",
"š": "s",
"Ţ": "T",
"ţ": "t",
"Ť": "T",
"ť": "t",
"Ũ": "U",
"ũ": "u",
"Ū": "U",
"ū": "u",
"Ŭ": "U",
"ŭ": "u",
"Ů": "U",
"ů": "u",
"Ű": "U",
"ű": "u",
"Ų": "U",
"ų": "u",
"Ŵ": "W",
"ŵ": "w",
"Ŷ": "Y",
"ŷ": "y",
"Ÿ": "Y",
"Ź": "Z",
"ź": "z",
"Ż": "Z",
"ż": "z",
"Ž": "Z",
"ž": "z",
"ſ": "s",
"Ơ": "O",
"ơ": "o",
"Ư": "U",
"ư": "u",
"DŽ": "DZ",
"Dž": "Dz",
"dž": "dz",
"LJ": "LJ",
"Lj": "Lj",
"lj": "lj",
"NJ": "NJ",
"Nj": "Nj",
"nj": "nj",
"Ǎ": "A",
"ǎ": "a",
"Ǐ": "I",
"ǐ": "i",
"Ǒ": "O",
"ǒ": "o",
"Ǔ": "U",
"ǔ": "u",
"Ǖ": "U",
"ǖ": "u",
"Ǘ": "U",
"ǘ": "u",
"Ǚ": "U",
"ǚ": "u",
"Ǜ": "U",
"ǜ": "u",
"Ǟ": "A",
"ǟ": "a",
"Ǡ": "A",
"ǡ": "a",
"Ǧ": "G",
"ǧ": "g",
"Ǩ": "K",
"ǩ": "k",
"Ǫ": "O",
"ǫ": "o",
"Ǭ": "O",
"ǭ": "o",
"ǰ": "j",
"DZ": "DZ",
"Dz": "Dz",
"dz": "dz",
"Ǵ": "G",
"ǵ": "g",
"Ǹ": "N",
"ǹ": "n",
"Ǻ": "A",
"ǻ": "a",
"Ȁ": "A",
"ȁ": "a",
"Ȃ": "A",
"ȃ": "a",
"Ȅ": "E",
"ȅ": "e",
"Ȇ": "E",
"ȇ": "e",
"Ȉ": "I",
"ȉ": "i",
"Ȋ": "I",
"ȋ": "i",
"Ȍ": "O",
"ȍ": "o",
"Ȏ": "O",
"ȏ": "o",
"Ȑ": "R",
"ȑ": "r",
"Ȓ": "R",
"ȓ": "r",
"Ȕ": "U",
"ȕ": "u",
"Ȗ": "U",
"ȗ": "u",
"Ș": "S",
"ș": "s",
"Ț": "T",
"ț": "t",
"Ȟ": "H",
"ȟ": "h",
"Ȧ": "A",
"ȧ": "a",
"Ȩ": "E",
"ȩ": "e",
"Ȫ": "O",
"ȫ": "o",
"Ȭ": "O",
"ȭ": "o",
"Ȯ": "O",
"ȯ": "o",
"Ȱ": "O",
"ȱ": "o",
"Ȳ": "Y",
"ȳ": "y",
"ʰ": "h",
"ʲ": "j",
"ʳ": "r",
"ʷ": "w",
"ʸ": "y",
"ˡ": "l",
"ˢ": "s",
"ˣ": "x"
};
t.anyWordStartsWith = o,
t.clean = u,
t.normalize = a,
t.inject = f,
t.isEmpty = l,
t.isNotEmpty = c,
t.isCarriageReturn = h,
t.isNewLine = p,
t.isWhiteSpace = d,
t.wordAt = v,
t.wordBoundariesAt = m,
t.forceLTREmbedding = g
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-utils-common/lib/index", ["require", "exports", "./guid", "./loader", "./sessionStorage", "./stopwatch", "./stringUtils"], e)
}(function(e, t) {
var n = e("./guid");
t.guid = n;
var r = e("./loader");
t.loader = r;
var i = e("./sessionStorage");
t.sessionStorage = i;
var s = e("./stopwatch");
t.stopwatch = s;
var o = e("./stringUtils");
t.stringUtils = o
}),
define("swx-utils-common", ["swx-utils-common/lib/index"], function(e) {
return e
}),
define("jSkype/services/webapi/builders/requestURIBuilder", ["require", "exports", "module", "swx-utils-common", "jSkype/modelHelpers/personHelper", "jSkype/modelHelpers/personsAndGroupsHelper"], function(e, t) {
function v(e) {
return u + e
}
function m(e, t) {
return t.replace(o, "") + (e || "")
}
function g() {
return "/" + n.get("endpointId")
}
function y(e) {
var t = i.getPersonById(e);
return r.getKey(e, t ? t._type() : null )
}
var n = e("swx-utils-common").sessionStorage
, r = e("jSkype/modelHelpers/personHelper")
, i = e("jSkype/modelHelpers/personsAndGroupsHelper")
, s = "v1"
, o = /http(s)?:\/\/+[\w\-.]*/
, u = s + "/users/ME"
, a = "/ng/ping"
, f = "/messages"
, l = "/conversations"
, c = "/threads"
, h = "/members"
, p = "/contacts"
, d = "/endpoints";
t.ping = function() {
return s + a
}
,
t.conversations = function(e) {
var t = l;
return e && (t += "/" + e),
v(t)
}
,
t.messageProperties = function(e, t) {
var n = "/" + e + f
, r = "/" + t + "/properties"
, i = l + n + r;
return v(i)
}
,
t.messages = function(e) {
var t = "/" + e + f
, n = l + t;
return v(n)
}
,
t.thread = function(e) {
return s + c + "/" + e
}
,
t.member = function(e, t) {
return this.thread(e) + h + "/" + y(t)
}
,
t.contacts = function(e, t) {
var n = e ? "/" + y(e) : "";
return t = t || "",
v(p + n + t)
}
,
t.customResource = function(e, t) {
var n;
return t ? n = m(e, t) : n = v(e),
n
}
,
t.constructPresenceEndpointURI = function(e) {
return u + d + g() + e
}
}),
define("jSkype/services/webapi/builders/headerSelector", ["require", "exports", "module", "lodash-compat", "swx-utils-common", "jSkype/constants/data", "jSkype/client", "jSkype/services/clientInfo", "jcafe-property-model", "jSkype/services/webapi/constants"], function(e, t) {
function p() {
var e = r.get(l) || 0
, s = e < n.now()
, o = r.get(i.SKYPE_ID_REG_TOKEN) !== d()
, u = r.get(f) !== null ;
if (s || o)
t.clearRegistrationToken(),
u = !1;
o && v(),
c(u)
}
function d() {
return s.get().personsAndGroupsManager.mePerson.id()
}
function v() {
r.remove(i.ENDPOINT_ID),
r.remove(i.PRESENCE_DATA)
}
function m() {
return {
ClientInfo: o.getClientInfo(),
"Cache-Control": "no-cache, no-store, must-revalidate",
Pragma: "no-cache",
Expires: "0",
ContextId: "tcid=" + (new Date).getTime() + (Math.floor(Math.random() * 9e4) + 1e4),
BehaviorOverride: "redirectAs404"
}
}
var n = e("lodash-compat"), r = e("swx-utils-common").sessionStorage, i = e("jSkype/constants/data").storageKeys, s = e("jSkype/client"), o = e("jSkype/services/clientInfo"), u = e("jcafe-property-model"), a = e("jSkype/services/webapi/constants"), f = "registrationToken", l = f + "Expiration", c = u.boolProperty(!1), h;
t.setLockAndKey = function(e) {
h = e
}
,
t.setRegistrationToken = function(e) {
var t = /registrationToken=(.+); expires=(\d+)/
, n = t.test(e) && e.match(t)
, s = n && (new Date(n[2] * 1e3)).getTime();
s && s > 0 && (r.set(f, f + "=" + n[1]),
r.set(l, s),
r.set(i.SKYPE_ID_REG_TOKEN, d()),
c(!0))
}
,
t.clearRegistrationToken = function() {
r.remove(f),
r.remove(l),
c(!1)
}
,
t.fetch = function(e) {
function i() {
e === a.SERVICE_CALLS.REQUEST_ENDPOINT_CREATION ? s.get().signInManager._skypeToken().then(l, n.reject.bind(n)) : c.once(!0, o)
}
function o() {
t.RegistrationToken = r.get(f),
n.resolve(t)
}
function l(e) {
t.LockAndKey = h,
t.Authentication = "skypetoken=" + e,
n.resolve(t)
}
var t = m()
, n = u.task();
return p(),
c() ? o() : h ? i() : n.reject(new Error("no valid authorization token present")),
n.promise
}
}),
define("jSkype/services/webapi/utils/exponentialTimeout", ["require", "exports", "module", "jSkype/settings", "constants/common"], function(e, t) {
function u() {
o && clearTimeout(o)
}
var n = e("jSkype/settings"), r = e("constants/common"), i = null , s = 1, o;
t.execute = function(e) {
var t = 1e3
, a = 12e4
, f = 0;
n.isFeatureOn(r.featureFlags.ENABLE_ENDPOINT_ECS_CONFIG) && (t = n.settings.webApiService.endpointRetry.base * 1e3,
a = n.settings.webApiService.endpointRetry.limit * 1e3,
f = n.settings.webApiService.endpointRetry.noiseFactor),
u(),
i === null && (i = t),
o = setTimeout(e, i + Math.random() * f * i),
i < a && (s++,
i *= s)
}
,
t.reset = function() {
u(),
i = null ,
s = 1
}
}),
define("jSkype/services/webapi/boundary/facade", ["require", "lodash-compat", "usertiming", "constants/common", "jSkype/client", "jSkype/constants/data", "jcafe-property-model", "jSkype/services/internalPubSub", "jSkype/services/webapi/builders/requestURIBuilder", "jSkype/services/webapi/builders/headerSelector", "jSkype/services/webapi/constants", "jSkype/services/webapi/utils/exponentialTimeout", "jSkype/settings", "jSkype/services/serviceAccessLayer/serviceQosReporterFacade", "swx-utils-common", "utils/common/cache/instance"], function(e) {
function S(e, t) {
var n = e.getAllResponseHeaders().toLowerCase();
return n.indexOf(t) === -1 ? null : e.getResponseHeader(t)
}
function x(e) {
e = e || "";
var t = e.match(/^(https?:.+?\.live\.com)/i);
return t ? t[1] : null
}
function T(e, t) {
var n = new RegExp("errorCode[\"']?:[\"']?" + t,"i");
return n.test(e)
}
var t = e("lodash-compat")
, n = e("usertiming")
, r = e("constants/common")
, i = e("jSkype/client")
, s = e("jSkype/constants/data").storageKeys
, o = e("jcafe-property-model")
, u = e("jSkype/services/internalPubSub")
, a = e("jSkype/services/webapi/builders/requestURIBuilder")
, f = e("jSkype/services/webapi/builders/headerSelector")
, l = e("jSkype/services/webapi/constants")
, c = e("jSkype/services/webapi/utils/exponentialTimeout")
, h = e("jSkype/settings")
, p = e("jSkype/services/serviceAccessLayer/serviceQosReporterFacade")
, d = e("swx-utils-common").sessionStorage
, v = e("utils/common/cache/instance")
, m = r.msnpErrors
, g = r.httpStatusCodes
, y = r.events.system
, b = r.onlineStates
, w = r.telemetry.performanceMarks
, E = ["/v1/users/ME/conversations/ALL/properties", "/v1/users/ME/conversations/ALL/messages", "/v1/users/ME/contacts/ALL", "/v1/threads/ALL"];
return function(N, C, k) {
function D(e) {
return function() {
d.get(s.ENDPOINT_ID) !== null && e.apply(L, arguments)
}
}
function j(e) {
var t, n = new RegExp(s.ENDPOINT_ID + "=({.+})"), r = e && e.match(n);
r && (t = r[1],
d.set(s.ENDPOINT_ID, t),
v.get().setItem(s.ENDPOINT_ID, t),
P(!0))
}
function F() {
A.promise.state() === "pending" && A.resolve()
}
function I(e, t) {
var n = "chat-4171", r;
t ? d.set(n, e) : (r = d.get(n),
d.set(n, r + ">" + e))
}
function q(e, t, r) {
var i = e.status === g.notFound && T(e.response, m.redirectionOverride), s;
return i ? (s = x(S(e, "location")),
s ? (r && n.mark(r),
k.updateServiceDomain(s),
t(),
!0) : !1) : !1
}
function R(e) {
if (!h.isFeatureOn(r.featureFlags.PINNING_TO_DOGFOOD_CLOUD))
return !1;
var t = /https:\/\/.*?-?df-/i
, n = t.test(x(e.responseURL))
, i = x(S(e, "location"))
, s = t.test(i)
, o = e.status === g.notFound && n && !s;
return o && (k.updateServiceDomain(i),
L.pinUserToDogfoodCloud()),
o
}
function U(e) {
function n(n) {
var r = d.get("chat-4171")
, s = r.match(/(\d+)x>P$/)
, o = new Date - H;
s ? (r = r.replace(/\d+x>P$/, ""),
I(r + (+s[1] + 1) + "x", !0)) : I("POK1x"),
t.success(n);
if (i.get()._standbyMode() && (B || o > L._internal.POLLING_DURATION)) {
var u = h.settings.webApiService.standbyPollingDelayTime.min || 30
, a = h.settings.webApiService.standbyPollingDelayTime.max || 60
, f = W(u, a)
, l = new Promise(function(e) {
setTimeout(e, f * 1e3)
}
);
Promise.race([M, l]).then(U.bind(null , e)),
B = !0
} else
U(e)
}
function r(e) {
t.error(e);
if (q(e, L.poll)) {
I("PERR404");
return
}
e.status === 0 ? (I("PERR0"),
L.ping()) : (I("PERR"),
L.poll())
}
var t = N("polling");
A.promise.then(function() {
I("P"),
H = new Date,
k.requestPolling(e).then(n, r)
})
}
function z() {
k.setEndpointProperty(l.ENDPOINT_PROPERTIES.SUPPORTS_MESSAGE_PROPERTIES, !0)
}
function W(e, t) {
return Math.floor(Math.random() * Math.abs(t - e) + e)
}
var L = this, A = o.task(), O = !1, M = new Promise(function(e) {
i.get()._standbyMode.once(!1, e)
}
), P = o.property({
value: !!d.get(s.ENDPOINT_ID)
}), H, B;
this._internal = {
ANNOTATIONS_RETRY_COUNT: 50,
ANNOTATIONS_RETRY_TIMEOUT: 200,
POLLING_DURATION: 5e3
},
this.setMessageProperty = function(e, t, n, r, i, s) {
function o(o) {
q(o, L.setMessageProperty.bind(L, e, t, n, r, i, s)) || s(o)
}
function a() {
u++,
u < L._internal.ANNOTATIONS_RETRY_COUNT && (t._actualId ? k.setMessageProperty(e, t._actualId, n, r).then(i, o) : setTimeout(a, L._internal.ANNOTATIONS_RETRY_TIMEOUT))
}
var u = 0;
a()
}
,
this.removeMessageProperty = function(e, t, n, r, i, s) {
function o(o) {
q(o, L.removeMessageProperty.bind(L, e, t, n, r, i, s)) || s(o)
}
function a() {
u++,
u < L._internal.ANNOTATIONS_RETRY_COUNT && (t._actualId ? k.removeMessageProperty(e, t._actualId, n, r).then(i, o) : setTimeout(a, L._internal.ANNOTATIONS_RETRY_TIMEOUT))
}
var u = 0;
a()
}
,
this.removeAllMessages = function(e, t, n) {
function s(e) {
r.statusCode = e.response.status,
t && t()
}
function o(i) {
q(i, L.removeAllMessages.bind(L, e, t, n)) || n(i),
r.statusCode = i.status
}
var r = i.get()._telemetry.context;
k.removeAllMessages(e).then(s, o)
}
,
this.setConversationOption = function(e, t, n, r, i) {
function s(s) {
q(s, L.setConversationOption.bind(L, e, t, n, r, i)) || i(s)
}
k.setConversationOption(e, t, n).then(r, s)
}
,
this.setThreadOption = function(e, t, n, r, i) {
function s(s) {
q(s, L.setThreadOption.bind(L, e, t, n, r, i)) || i(s)
}
k.setThreadOption(e, t, n).then(r, s)
}
,
this.pinUserToDogfoodCloud = function() {
function t(t) {
e.success(t),
L.poll()
}
function n(t) {
e.error(t),
q(t, L.pinUserToDogfoodCloud)
}
var e = N("pinToDogfood");
k.pinToDogfood().then(t, n)
}
,
this.ping = function() {
var e = u.get();
e.publish(y.ONLINE_STATE_CHANGED, b.OFFLINE),
I("O");
var t = N("ping");
k.ping().then(function(r) {
I("OOK"),
e.publish(y.ONLINE_STATE_CHANGED, b.ONLINE),
t.success(r),
L.poll(),
p.getInstance().reportSuccess("webapi-ping")
}, function(n) {
var i = d.get("chat-4171")
, s = i.match(/(\d+)x>O$/)
, o = 1e3;
if (h.isFeatureOn(r.featureFlags.ENABLE_PING_ECS_CONFIG)) {
var u = h.settings.webApiService.pingDelayTime.min || 30
, a = h.settings.webApiService.pingDelayTime.max || 60;
o = W(u * 1e3, a * 1e3)
}
s ? (i = i.replace(/\d+x>O$/, ""),
I(i + (+s[1] + 1) + "x", !0)) : I("OERR1x"),
t.error(n),
setTimeout(L.ping, o)
})
}
,
this.createConversation = function(e, t, r) {
function s(e) {
n.mark(w.NEW_CONVERSATION.CREATION_END_OK),
i.success(e);
var r = S(e.request, "location")
, s = r.match(/threads\/(19:.*)$/)[1];
t(s)
}
function o(s) {
n.mark(w.NEW_CONVERSATION.CREATION_END_ERROR),
i.error(s),
q(s, L.createConversation.bind(L, e, t, r)),
r(s)
}
n.mark(w.NEW_CONVERSATION.CREATION_START);
var i = N("createConversation");
k.createConversation(e).then(s, o)
}
,
this.getUserPresence = function(e) {
function n(n) {
t.error(n),
q(n, L.getUserPresence.bind(L, e))
}
var t = N("getUserPresence");
k.getUserPresence(e).then(t.success, n)
}
,
this.setEndpointPresence = function() {
function t(t) {
e.error(t),
q(t, L.setEndpointPresence)
}
var e = N("setEndpointPresence");
k.setEndpointPresence().then(e.success, t)
}
,
this.activateEndpoint = function() {
function e() {
var e = N("activateEndpoint");
k.activateEndpoint().then(e.success, e.error)
}
P.when(!0, e)
}
,
this._getEndpointId = function() {
return new Promise(function(e) {
var t = d.get(s.ENDPOINT_ID);
v.get().getItem(s.ENDPOINT_ID).then(function(n) {
n === t ? e(t) : e()
})
}
)
}
,
this.poll = function() {
function o(e) {
n.error(e);
if (q(e, L.poll)) {
I("SERR404");
return
}
I("SERR");
if (e.status === g.notFound && T(e.response, m.missingEndpoint))
return;
c.execute(L.poll)
}
function l(e) {
I("SOK"),
n.success(e),
L.setEndpointPresence(),
U(S(e.request, "location"))
}
function p(t) {
e.error(t),
v(t);
if (R(t)) {
I("EERRdf");
return
}
if (q(t, L.poll)) {
I("EERR404");
return
}
if (t.status === g.forbidden) {
f.clearRegistrationToken(),
I("EERR403(" + t.getResponseHeader("contextId") + ';"' + t.responseText + '")' + !!d.get("registrationTokenRealTime")),
L.poll();
return
}
I("EERR"),
c.execute(L.poll)
}
function v(e) {
var t = S(e, "set-registrationtoken");
t && (f.setRegistrationToken(t),
j(t))
}
function b(t) {
var n = t.response, f = t.request, p = r.telemetry.timelineLoadOrigin, m = i.get()._telemetry.context, g = u.get(), b;
v(f),
I("EOK"),
c.reset(),
e.success(t),
b = d.get(s.RESURECTION_KEY),
b ? (d.remove(s.RESURECTION_KEY),
m.timelineLoadOrigin = p.RESSURECT) : P() ? m.timelineLoadOrigin = p.RELOAD : m.timelineLoadOrigin = p.LOAD;
if (!h.settings.isPollingEnabled)
return;
h.isFeatureOn(r.featureFlags.SUPPORT_MESSAGE_PROPERTIES) && z();
if (n.subscriptions && n.subscriptions.length > 0) {
var S = a.customResource("/endpoints/SELF/subscriptions/") + n.subscriptions[0].id;
w().finally(function() {
U(S)
})
} else
O && g.publish(y.FORCE_RESYNC),
w().finally(function() {
I("S"),
k.requestSubscriptionCreation(E).then(l, o)
});
O = !0
}
function w() {
var e = k.getSelfProperties();
return e.then(t.success.bind(t), t.error.bind(t)),
e
}
function x() {
var e = "Agent";
return h.isFeatureOn(r.featureFlags.READ_RECEIPT_ENABLED) && (e += ",readReceipts"),
{
endpointFeatures: e
}
}
var e = N("endpointCreation")
, t = N("getSelfProperties")
, n = N("subscriptionCreation");
I("E" + !!d.get(s.ENDPOINT_ID)),
L._getEndpointId().then(function(e) {
k.requestEndpointCreation(e, x()).then(b, p)
})
}
,
this.reset = function() {
function e() {
O = !1
}
return k.abortCurrentPoll(),
k.requestEndpointRemoval(d.get(s.ENDPOINT_ID)).then(e, e)
}
,
this.postMessage = function(e, t, r, s) {
function a(e) {
n.mark(w.IM_SEND.POST_END_OK + o),
u.enqueueSentMessageInfo(t),
r(e)
}
function f(i) {
if (q(i, L.postMessage.bind(L, e, t, r, s)))
return;
n.mark(w.IM_SEND.POST_END_ERROR + o),
u.enqueueSentMessageInfo(t),
s(i)
}
var o = t.clientmessageid
, u = i.get()._telemetry.messagesCollector;
n.mark(w.IM_SEND.POST_START + o),
k.postMessage(e, t).then(a, f)
}
,
this.sendContactsList = function(e) {
k.sendContactsList(e).then(t.noop, function(n) {
q(n, L.sendContactsList.bind(L, e))
})
}
,
this.addContactToContactsList = D(function(e) {
k.addContactToContactsList(e).then(t.noop, function(n) {
q(n, L.addContactToContactsList.bind(L, e))
})
}),
this.removeContactFromContactsList = D(function(e) {
k.removeContactFromContactsList(e).then(t.noop, function(n) {
q(n, L.removeContactFromContactsList.bind(L, e))
})
}),
this.addParticipant = function(e, t, n, r, i) {
k.addParticipant(e, t, n).then(r, function(o) {
q(o, L.addParticipant.bind(L, e, t, n, r, i)) || typeof i == "function" && i(o)
})
}
,
this.removeParticipant = function(e, t, n, r) {
k.removeParticipant(e, t).then(n, function(s) {
q(s, L.removeParticipant.bind(L, e, t, n, r)) || r(s)
})
}
,
this.setConsumptionHorizon = function(e, t, n) {
function i(e) {
n && n(e),
r.success(e)
}
function s(n) {
r.error(n),
q(n, L.setConsumptionHorizon.bind(L, e, t))
}
var r = N("setConsumptionHorizon");
k.setConsumptionHorizon(e, t).then(i, s)
}
,
this.setUserPresence = function(e) {
function n(n) {
t.error(n),
q(n, L.setUserPresence.bind(L, e))
}
var t = N("setUserPresence");
k.setUserPresence(e).then(t.success, n)
}
,
this.syncMessages = function(e, t, n, r, s) {
function a(t) {
var n = C.buildMessageSuccess(e, r);
F(),
n(t)
}
function f(i) {
u.chatHistoryLoadResult[e] = i.status;
var a = q(i, L.syncMessages.bind(L, e, t, n, r, s));
a ? u.isChatHistoryLoad404 = !0 : (o.error(i),
s && s())
}
var o = N("syncMessages")
, u = i.get()._telemetry.context;
u.chatHistoryLoadResult[e] = g.OK,
k.fetchMessages(e, t, n).then(a, f)
}
,
this.syncMessagesLoadMore = function(e, t, n, r) {
function s(t) {
var r = C.buildMessageSuccess(e, n);
r(t)
}
function o(s) {
var o = q(s, L.syncMessagesLoadMore.bind(L, e, t, n, r));
o || (i.error(s),
r(s))
}
var i = N("syncMessagesLoadMore");
k.fetchMessagesLoadMore(e, t).then(s, o)
}
,
this.syncRecents = function(e, t, n, r) {
function i(e) {
n(e),
F()
}
function s(i) {
var s = q(i, L.syncRecents.bind(L, e, t, n, r));
s || r(i)
}
k.fetchConversations(e, t).then(i, s)
}
,
this.syncRecentsBySyncState = function(e, t, n, i) {
function s(e) {
n(e),
h.isFeatureOn(r.featureFlags.DISABLE_POLLING_ON_KAHUNA) || F()
}
function o(r) {
var s = q(r, L.syncRecentsBySyncState.bind(L, e, t, n, i));
s || i(r)
}
k.fetchConversationsBySyncState(e, t).then(s, o)
}
,
this.syncConversation = function(e, t, n) {
function r(e) {
t(e),
F()
}
function i(r) {
var i = q(r, L.syncConversation.bind(L, e, t, n));
i || n(r)
}
k.fetchConversation(e).then(r, i)
}
,
this.syncThread = function(e, t, n) {
function i(e) {
r.success(e),
t(),
F()
}
function s(i) {
var s = q(i, L.syncThread.bind(L, e, t, n));
s || (r.error(i),
n())
}
var r = N("syncThread");
t = t || function() {}
,
n = n || function() {}
,
k.fetchThread(e).then(i, s)
}
}
}),
define("jSkype/services/webapi/boundary/dispatcher", ["require", "lodash-compat", "jSkype/services/internalPubSub"], function(e) {
var t = e("lodash-compat")
, n = e("jSkype/services/internalPubSub");
return function(r) {
function i(e) {
return e = e || {},
t.isObject(e) && (e.moduleName = "webapi",
e.actionName = r),
e
}
this.success = function(e) {
var t = i(e.response);
n.get().publish("webapi:data", t)
}
,
this.error = function(e) {
var t = i(e);
n.get().publish("webapi:error", t)
}
}
}),
define("jSkype/services/webapi/utils/conversationMetadataStore", [], function() {
var e = {};
return {
get: function(t) {
if (typeof t == "string" && e[t])
return e[t].syncState
},
set: function(t, n) {
typeof t == "string" && (e[t] = {
syncState: n
})
},
clear: function(t) {
delete e[t]
}
}
}),
define("jSkype/services/webapi/calls/service", ["require", "lodash-compat", "browser/detect", "cafe/enums", "constants/common", "jSkype/client", "jSkype/modelHelpers/personHelper", "jSkype/services/clientInfo", "jSkype/services/webapi/constants", "jSkype/services/webapi/utils/conversationMetadataStore", "jSkype/settings"], function(e) {
var t = e("lodash-compat")
, n = e("browser/detect")
, r = e("cafe/enums")
, i = e("constants/common")
, s = e("jSkype/client")
, o = e("jSkype/modelHelpers/personHelper")
, u = e("jSkype/services/clientInfo")
, a = e("jSkype/services/webapi/constants")
, f = e("jSkype/services/webapi/utils/conversationMetadataStore")
, l = e("jSkype/settings");
return function(c, h, p) {
function v(e, n, r, i, s) {
function u(e) {
return p.put(n, e)
}
var o = {
params: {},
payload: {}
};
return o.params.name = r,
o.payload[r] = i,
t.forOwn(s, function(e, t) {
o.params[t] = e
}),
h.build(e, o).then(u)
}
var d;
this.updateServiceDomain = function(e) {
p.uriBuilder.setDomain(e)
}
,
this.setConversationOption = function(e, t, n) {
var r = "/conversations/" + e + "/properties"
, i = c.customResource(r);
return v(a.SERVICE_CALLS.SET_CONVERSATION_OPTION, i, t, n)
}
,
this.setThreadOption = function(e, t, n) {
var r = "v1/threads/" + e + "/properties";
return v(a.SERVICE_CALLS.SET_THREAD_OPTION, r, t, n)
}
,
this.ping = function() {
var e = c.ping();
return p.get(e, {})
}
,
this.pinToDogfood = function() {
function t(e) {
return p.put("v1/users/ME/properties", e)
}
var e = {
params: {
name: "dogfoodUser"
},
payload: {
dogfoodUser: !0
}
};
return h.build(a.SERVICE_CALLS.PIN_TO_DOGFOOD, e).then(t)
}
,
this.createConversation = function(e) {
function n(e) {
return p.post("v1/threads", e)
}
var t = {
payload: {
members: e
}
};
return h.build(a.SERVICE_CALLS.CREATE_CONVERSATION, t).then(n)
}
,
this.postMessage = function(e, t) {
function i(e) {
return p.post(n, e)
}
function s(e) {}
var n = c.messages(e)
, r = {
payload: t
};
return h.build(a.SERVICE_CALLS.POST_MESSAGE, r).then(i, s)
}
,
this.addParticipant = function(e, t, n) {
function o(e) {
return p.put(i, e)
}
var i = c.member(e, t)
, s = {
payload: {
role: n === r.participantRole.Leader ? "Admin" : "User"
}
};
return h.build(a.SERVICE_CALLS.ADD_PARTICIPANT, s).then(o)
}
,
this.removeParticipant = function(e, t) {
function r(e) {
return p.remove(n, e)
}
var n = c.member(e, t);
return h.build(a.SERVICE_CALLS.REMOVE_PARTICIPANT).then(r)
}
,
this.setConsumptionHorizon = function(e, t) {
var n = "/conversations/" + e + "/properties"
, o = c.customResource(n)
, u = {};
return l.isFeatureOn(i.featureFlags.READ_RECEIPT_ENABLED) && s.get().personsAndGroupsManager.mePerson.status() === r.onlineStatus.Online && (u.readReceipt = !0),
v(a.SERVICE_CALLS.SET_CONSUMPTION_HORIZON, o, "consumptionhorizon", t, u)
}
,
this.fetchMessages = function(e, t, n) {
function o(e) {
return p.get(r, e)
}
var r = c.messages(e)
, s = {
params: {
startTime: t,
pageSize: n,
view: "msnp24Equivalent" + (l.isFeatureOn(i.featureFlags.SUPPORT_MESSAGE_PROPERTIES) ? "|supportsMessageProperties" : ""),
targetType: "Passport|Skype|Lync|Thread" + (l.isFeatureOn(i.featureFlags.PSTN_ENABLED) ? "|PSTN" : "") + (l.isFeatureOn(i.featureFlags.AGENTS_ENABLED) ? "|Agent" : "")
}
};
return h.build(a.SERVICE_CALLS.FETCH_MESSAGES, s).then(o)
}
,
this.fetchMessagesLoadMore = function(e, t) {
function s(e) {
return p.get(n, e)
}
var n = c.messages(e)
, r = {
params: {
syncState: f.get(e),
startTime: 0,
pageSize: t,
view: "msnp24Equivalent" + (l.isFeatureOn(i.featureFlags.SUPPORT_MESSAGE_PROPERTIES) ? "|supportsMessageProperties" : "")
}
};
return h.build(a.SERVICE_CALLS.FETCH_MESSAGES_LOAD_MORE, r).then(s)
}
,
this.fetchThread = function(e) {
function r(e) {
return p.get(t, e)
}
var t = c.thread(e)
, n = {
params: {
view: "msnp24Equivalent"
}
};
return h.build(a.SERVICE_CALLS.FETCH_THREAD, n).then(r)
}
,
this.fetchConversation = function(e) {
function r(e) {
return p.get(t, e)
}
var t = c.conversations(e)
, n = {
params: {
view: "msnp24Equivalent"
}
};
return h.build(a.SERVICE_CALLS.FETCH_CONVERSATION, n).then(r)
}
,
this.fetchConversations = function(e, t) {
function s(e) {
return p.get(n, e)
}
var n = c.conversations()
, r = {
params: {
startTime: e,
pageSize: t,
view: "msnp24Equivalent",
targetType: "Passport|Skype|Lync|Thread" + (l.isFeatureOn(i.featureFlags.PSTN_ENABLED) ? "|PSTN" : "") + (l.isFeatureOn(i.featureFlags.AGENTS_ENABLED) ? "|Agent" : "")
}
};
return h.build(a.SERVICE_CALLS.FETCH_CONVERSATIONS, r).then(s)
}
,
this.fetchConversationsBySyncState = function(e, t) {
function i(e) {
return p.get(n, e)
}
var n = c.conversations()
, r = {
params: {
syncState: e,
pageSize: t,
view: "msnp24Equivalent"
}
};
return h.build(a.SERVICE_CALLS.FETCH_CONVERSATIONS_BY_SYNC_STATE, r).then(i)
}
,
this.requestEndpointCreation = function(e, t) {
function s(t) {
return e ? p.put(r, t) : p.post(r, t)
}
var n = "/endpoints" + (e ? "/" + e : "")
, r = c.customResource(n)
, i = {
payload: t || {}
};
return h.build(a.SERVICE_CALLS.REQUEST_ENDPOINT_CREATION, i).then(s)
}
,
this.requestEndpointRemoval = function(e) {
function i(e) {
return p.remove(n, e)
}
if (!e)
return Promise.reject(new Error("invalid endpointID"));
var t = "/endpoints/" + e
, n = c.customResource(t)
, r = {
payload: {}
};
return h.build(a.SERVICE_CALLS.REQUEST_ENDPOINT_DELETION, r).then(i)
}
,
this.requestSubscriptionCreation = function(e) {
function r(e) {
return p.post(t, e)
}
var t = c.customResource("/endpoints/SELF/subscriptions")
, n = {
payload: {
channelType: "httpLongPoll",
template: "raw",
interestedResources: e
}
};
return h.build(a.SERVICE_CALLS.REQUEST_SUBSCRIPTION_CREATION, n).then(r)
}
,
this.requestPolling = function(e) {
function n(e) {
var n = p.post(t, e);
return d = n,
n
}
var t = c.customResource("/poll", e);
return h.build(a.SERVICE_CALLS.REQUEST_POLLING).then(n)
}
,
this.abortCurrentPoll = function() {
d && d._abort()
}
,
this.setEndpointPresence = function() {
function i(t) {
return p.put(e, t)
}
var e = c.constructPresenceEndpointURI("/presenceDocs/messagingService")
, t = n.getSystemInfo()
, r = {
id: "messagingService",
type: "EndpointPresenceDoc",
selfLink: "uri",
privateInfo: {
epname: "skype"
},
publicInfo: {
capabilities: "video|audio",
type: t.deviceType,
skypeNameVersion: u.getBIAppName(),
nodeInfo: "xx",
version: u.getBIVersion()
}
};
return h.build(a.SERVICE_CALLS.SET_ENDPOINT_PRESENCE, {
payload: r
}).then(i)
}
,
this.setEndpointProperty = function(e, t) {
function i(e) {
return p.put(n, e)
}
var n = c.customResource("/endpoints/SELF/properties")
, r = {
params: {
name: e
},
payload: {}
};
return r.payload[e] = t,
h.build(a.SERVICE_CALLS.SET_ENDPOINT_PROPERTY, r).then(i)
}
,
this.activateEndpoint = function() {
function n(t) {
return p.post(e, t)
}
var e = c.constructPresenceEndpointURI("/active")
, t = {
payload: {
timeout: a.ACTIVATE_ENDPOINT_TIMEOUT / 1e3
}
};
return h.build(a.SERVICE_CALLS.ACTIVATE_ENDPOINT, t).then(n)
}
,
this.setUserPresence = function(e) {
function i(e) {
return p.put(n, e)
}
var n = c.customResource("/presenceDocs/messagingService")
, r = {
payload: {
status: t.capitalize(e)
}
};
return h.build(a.SERVICE_CALLS.SET_USER_PRESENCE, r).then(i)
}
,
this.getUserPresence = function(e) {
function r(e) {
return p.get(n, e)
}
var t = "/presenceDocs/messagingService"
, n = c.contacts(e, t);
return h.build(a.SERVICE_CALLS.GET_USER_PRESENCE).then(r)
}
,
this.sendContactsList = function(e) {
function r(e) {
return {
id: o.getKey(e.id(), e._type())
}
}
function i(e) {
return p.post(t, e)
}
var t = c.contacts()
, n = {
payload: {
contacts: e.map(r)
}
};
return h.build(a.SERVICE_CALLS.SEND_CONTACT_LIST, n).then(i)
}
,
this.addContactToContactsList = function(e) {
function n(e) {
return p.put(t, e)
}
var t = c.contacts(e);
return h.build(a.SERVICE_CALLS.ADD_CONTACT_TO_CONTACTS_LIST).then(n)
}
,
this.removeContactFromContactsList = function(e) {
function n(e) {
return p.remove(t, e)
}
var t = c.contacts(e);
return h.build(a.SERVICE_CALLS.REMOVE_CONTACT_FROM_CONTACTS_LIST).then(n)
}
,
this.getSelfProperties = function() {
function t(t) {
return p.get(e, t)
}
var e = c.customResource("/properties");
return h.build(a.SERVICE_CALLS.GET_SELF_PROPERTIES).then(t)
}
,
this.setMessageProperty = function(e, t, n, r) {
function o(e) {
return p.put(i, e)
}
var i = c.messageProperties(e, t)
, s = {
params: {
name: n
},
payload: {}
};
return s.payload[n] = JSON.stringify(r),
h.build(a.SERVICE_CALLS.SET_MESSAGE_PROPERTY, s).then(o)
}
,
this.removeMessageProperty = function(e, t, n, r) {
function u(e) {
return s.hasOwnProperty(e) && s[e] === n
}
function l(e) {
return p.remove(i, e)
}
var i = c.messageProperties(e, t)
, s = a.MESSAGE_PROPERTIES.PER_USER
, o = {
params: {
name: n
}
};
for (var f in s)
if (u(f)) {
o.payload = {},
o.payload[n] = JSON.stringify({
key: r
});
break
}
return h.build(a.SERVICE_CALLS.REMOVE_MESSAGE_PROPERTY, o).then(l)
}
,
this.removeAllMessages = function(e) {
function n(e) {
return p.remove(t, e)
}
var t = c.messages(e);
return h.build(a.SERVICE_CALLS.REMOVE_ALL_MESSAGES).then(n)
}
}
}),
define("jSkype/services/serviceAccessLayer/transientFaultPolicy", [], function() {
function t(e) {
return e.status === 0
}
function n(e) {
return e instanceof XMLHttpRequest
}
function r(e, t) {
return t.test(e.status)
}
var e = {
success: /^(2)\d{2}/,
redirection: /^(3)\d{2}/,
serverError: /^(5)\d{2}/
};
return {
isWebApiSuccess: function(t) {
return n(t) ? r(t, e.success) || r(t, e.redirection) : !1
},
isTransientFailure: function(i) {
return n(i) ? t(i) || r(i, e.serverError) : !1
}
}
}),
define("jSkype/services/webapi/builders/requestOptionsBuilder", ["require", "jcafe-property-model", "jSkype/settings", "jSkype/services/serviceAccessLayer/transientFaultPolicy"], function(e) {
var t = e("jcafe-property-model")
, n = e("jSkype/settings")
, r = e("jSkype/services/serviceAccessLayer/transientFaultPolicy");
return function(i) {
this.build = function(e, s) {
function h(t) {
var n = {
headers: t,
retry: {
limit: a,
delay: f,
strategy: l,
isTransientCheck: r.isTransientFailure,
isSuccessCheck: r.isWebApiSuccess
},
reporting: {
serviceName: "webapi-" + e
}
};
s && s.payload && (n.payload = JSON.stringify(s.payload)),
s && s.params && (n.params = s.params),
o.resolve(n)
}
var o = t.task()
, u = n.settings.webApiService
, a = u.retry.limit
, f = u.retry.delay
, l = u.retry.strategy
, c = u.overrides && u.overrides[e];
return i.fetch(e).then(h, o.reject.bind(o)),
c && (f = c.delay || f,
a = c.limit || a,
l = c.strategy || l),
o.promise
}
}
}),
define("utils/common/regex", ["require", "exports", "module"], function(e, t) {
t.escapeSpecialChars = function(e) {
return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
}
,
t.multilineRegExp = function(e, t) {
return new RegExp(e.join(""),t)
}
}),
define("services/pes/emoticons/encoder", [], function() {
function e() {
var e = this;
e.map = {
":)": "smile",
":-)": "smile",
":=)": "smile",
"(smile)": "smile",
":(": "sad",
":-(": "sad",
":=(": "sad",
"(sad)": "sad",
":<": "sad",
":-<": "sad",
":D": "laugh",
":-D": "laugh",
":=D": "laugh",
":d": "laugh",
":-d": "laugh",
":=d": "laugh",
"(laugh)": "laugh",
":>": "laugh",
":->": "laugh",
"(lol)": "laugh",
"(LOL)": "laugh",
"(cool)": "cool",
"8-)": "cool",
"8=)": "cool",
"B-)": "cool",
"B=)": "cool",
":O": "surprised",
":-O": "surprised",
":=O": "surprised",
":o": "surprised",
":-o": "surprised",
":=o": "surprised",
"(surprised)": "surprised",
";)": "wink",
";-)": "wink",
";=)": "wink",
"(wink)": "wink",
";(": "cry",
";-(": "cry",
";=(": "cry",
"(cry)": "cry",
":'(": "cry",
"(:|": "sweat",
"(sweat)": "sweat",
":|": "speechless",
":-|": "speechless",
":=|": "speechless",
"(speechless)": "speechless",
"(kiss)": "kiss",
":*": "kiss",
":-*": "kiss",
":=*": "kiss",
"(xo)": "kiss",
"(K)": "kiss",
"(k)": "kiss",
":P": "tongueout",
":-P": "tongueout",
":=P": "tongueout",
":p": "tongueout",
":-p": "tongueout",
":=p": "tongueout",
"(tongueout)": "tongueout",
":$": "blush",
":-$": "blush",
":=$": "blush",
':">': "blush",
"(blush)": "blush",
":^)": "wonder",
"(wonder)": "wonder",
"|-)": "sleepy",
"I-)": "sleepy",
"I=)": "sleepy",
"(snooze)": "sleepy",
"|-(": "dull",
"|(": "dull",
"|=(": "dull",
"(dull)": "dull",
"(inlove)": "inlove",
"(love)": "inlove",
":]": "inlove",
":-]": "inlove",
"]:)": "eg",
">:)": "eg",
"(grin)": "eg",
"(yn)": "fingerscrossed",
"(fingers)": "fingerscrossed",
"(fingerscrossed)": "fingerscrossed",
"(crossedfingers)": "fingerscrossed",
"(yawn)": "yawn",
"(puke)": "puke",
":&": "puke",
":-&": "puke",
":=&": "puke",
"+o(": "puke",
"(doh)": "doh",
"(angry)": "angry",
":@": "angry",
":-@": "angry",
":=@": "angry",
"x(": "angry",
"x-(": "angry",
"X(": "angry",
"X-(": "angry",
"x=(": "angry",
"X=(": "angry",
";@": "angry",
";-@": "angry",
"(wasntme)": "wasntme",
"(wm)": "wasntme",
"(party)": "party",
"<O)": "party",
"<o)": "party",
"<:o)": "party",
"(worry)": "worry",
":S": "worry",
":s": "worry",
":-s": "worry",
":-S": "worry",
":=s": "worry",
":=S": "worry",
"(mm)": "mmm",
"(mmm)": "mmm",
"(mmmm)": "mmm",
"(nerd)": "nerdy",
"8-|": "nerdy",
"B-|": "nerdy",
"8|": "nerdy",
"B|": "nerdy",
"8=|": "nerdy",
"B=|": "nerdy",
":x": "lipssealed",
":-x": "lipssealed",
":X": "lipssealed",
":-X": "lipssealed",
":#": "lipssealed",
":-#": "lipssealed",
":=x": "lipssealed",
":=X": "lipssealed",
":=#": "lipssealed",
"(wave)": "hi",
"(hi)": "hi",
"(bye)": "hi",
"(BYE)": "hi",
"(Bye)": "hi",
"(Hi)": "hi",
"(HI)": "hi",
"(facepalm)": "facepalm",
"(fail)": "facepalm",
"(devil)": "devil",
"(6)": "devil",
"(angel)": "angel",
"(A)": "angel",
"(a)": "angel",
"(envy)": "envy",
"(V)": "envy",
"(v)": "envy",
"(wait)": "wait",
"(hug)": "hug",
"(bear)": "hug",
"(makeup)": "makeup",
"(kate)": "makeup",
"(chuckle)": "giggle",
"(giggle)": "giggle",
"(clap)": "clap",
"(think)": "think",
":-?": "think",
":?": "think",
":=?": "think",
"*-)": "think",
"(bow)": "bow",
"(rofl)": "rofl",
"(rotfl)": "rofl",
"(whew)": "whew",
"(phew)": "whew",
"(happy)": "happy",
"(smirk)": "smirk",
"(nod)": "nod",
"(shake)": "shake",
"(waiting)": "waiting",
"(forever)": "waiting",
"(impatience)": "waiting",
"(emo)": "emo",
"(y)": "yes",
"(Y)": "yes",
"(ok)": "yes",
"(yes)": "yes",
"(OK)": "yes",
"(oK)": "yes",
"(Ok)": "yes",
"(n)": "no",
"(N)": "no",
"(no)": "no",
"(handshake)": "handshake",
"(highfive)": "highfive",
"(hifive)": "highfive",
"(h5)": "highfive",
"(heart)": "heart",
"(h)": "heart",
"(H)": "heart",
"(l)": "heart",
"(L)": "heart",
"<3": "heart",
"(lalala)": "lalala",
"(lalalala)": "lalala",
"(lala)": "lalala",
"(notlistening)": "lalala",
"(heidy)": "heidy",
"(squirrel)": "heidy",
"(F)": "flower",
"(f)": "flower",
"(flower)": "flower",
"(rain)": "rain",
"(london)": "rain",
"(st)": "rain",
"(ST)": "rain",
"(St)": "rain",
"(sun)": "sun",
"(#)": "sun",
"(tumbleweed)": "tumbleweed",
"(music)": "music",
"(8)": "music",
"(bandit)": "bandit",
"(tmi)": "tmi",
"(coffee)": "coffee",
"(c)": "coffee",
"(C)": "coffee",
"(pi)": "pizza",
"(pizza)": "pizza",
"(cash)": "cash",
"(mo)": "cash",
"($)": "cash",
"(flex)": "muscle",
"(muscle)": "muscle",
"(^)": "cake",
"(cake)": "cake",
"(beer)": "beer",
"(bricklayers)": "beer",
"(B)": "beer",
"(b)": "beer",
"(d)": "drink",
"(D)": "drink",
"(drink)": "drink",
"\\o/": "dance",
"\\:D/": "dance",
"\\:d/": "dance",
"(dance)": "dance",
"(ninja)": "ninja",
"(J)": "ninja",
"(j)": "ninja",
"(*)": "star",
"(star)": "star",
"(headbang)": "headbang",
"(banghead)": "headbang",
"(swear)": "swear",
"(drunk)": "drunk",
"(finger)": "finger",
"(poolparty)": "poolparty",
"(hrv)": "poolparty",
"(rock)": "rock",
"(smoking)": "smoke",
"(smoke)": "smoke",
"(ci)": "smoke",
"(bug)": "bug",
"(toivo)": "toivo",
"(wfh)": "wfh",
"(@h)": "wfh",
"(@H)": "wfh",
"(hollest)": "hollest",
"(zilmer)": "priidu",
"(e)": "mail",
"(m)": "mail",
"(mail)": "mail",
"(E)": "mail",
"(o)": "time",
"(O)": "time",
"(time)": "time",
"(clock)": "time",
"(0)": "time",
"(~)": "movie",
"(film)": "movie",
"(movie)": "movie",
"(mp)": "phone",
"(ph)": "phone",
"(phone)": "phone",
"(talk)": "talk",
"(call)": "call",
"(T)": "call",
"(t)": "call",
"(punch)": "punch",
"*|": "punch",
"*-|": "punch",
"(skype)": "skype",
"(ss)": "skype",
"(u)": "brokenheart",
"(U)": "brokenheart",
"(brokenheart)": "brokenheart",
"(mooning)": "mooning",
"(oliver)": "oliver",
"(bartlett)": "bertlett",
"(football)": "bertlett",
"(soccer)": "bertlett",
"(so)": "bertlett",
"(talktothehand)": "talktothehand",
"(idea)": "idea",
":i": "idea",
":I": "idea",
"*-:)": "idea",
"(sheep)": "sheep",
"(bah)": "sheep",
"(cat)": "cat",
":3": "cat",
"(@)": "cat",
"(meow)": "cat",
"(bike)": "bike",
"(bicycle)": "bike",
"(sander)": "bike",
"(dog)": "dog",
":o3": "dog",
"(&)": "dog"
},
e.maxLength = 16,
e.minLength = 2,
e.firstLetters = "8:(B;|I]>+xX<*\\",
e.firstLettersMap = {
8: "8",
":": ":",
"(": "(",
B: "B",
";": ";",
"|": "|",
I: "I",
"]": "]",
">": ">",
"+": "+",
x: "x",
X: "X",
"<": "<",
"*": "*",
"\\": "\\"
}
}
return new e
}),
define("utils/common/countryCodes", [], function() {
return {
eu: "Europe",
uk: "United Kingdom",
af: "Afghanistan",
ax: "&Aring;land Islands",
al: "Albania",
dz: "Algeria",
as: "American Samoa",
ad: "Andorra",
ao: "Angola",
ai: "Anguilla",
aq: "Antarctica",
ag: "Antigua and Barbuda",
ar: "Argentina",
am: "Armenia",
aw: "Aruba",
au: "Australia",
at: "Austria",
az: "Azerbaijan",
bs: "Bahamas",
bh: "Bahrain",
bd: "Bangladesh",
bb: "Barbados",
by: "Belarus",
be: "Belgium",
bz: "Belize",
bj: "Benin",
bm: "Bermuda",
bt: "Bhutan",
bo: "Bolivia, Plurinational State of",
ba: "Bosnia and Herzegovina",
bw: "Botswana",
bv: "Bouvet Island",
br: "Brazil",
io: "British Indian Ocean Territory",
bn: "Brunei Darussalam",
bg: "Bulgaria",
bf: "Burkina Faso",
bi: "Burundi",
kh: "Cambodia",
cm: "Cameroon",
ca: "Canada",
cv: "Cabo Verde",
ky: "Cayman Islands",
cf: "Central African Republic",
td: "Chad",
cl: "Chile",
cn: "China",
cx: "Christmas Island",
cc: "Cocos (Keeling) Islands",
co: "Colombia",
km: "Comoros",
cg: "Congo",
cd: "Congo, the Democratic Republic of the",
ck: "Cook Islands",
cr: "Costa Rica",
ci: "C&ocirc;te d'Ivoire",
hr: "Croatia",
cu: "Cuba",
cy: "Cyprus",
cz: "Czech Republic",
dk: "Denmark",
dj: "Djibouti",
dm: "Dominica",
"do": "Dominican Republic",
ec: "Ecuador",
eg: "Egypt",
sv: "El Salvador",
gq: "Equatorial Guinea",
er: "Eritrea",
ee: "Estonia",
et: "Ethiopia",
fk: "Falkland Islands (Malvinas)",
fo: "Faroe Islands",
fj: "Fiji",
fi: "Finland",
fr: "France",
gf: "French Guiana",
pf: "French Polynesia",
tf: "French Southern Territories",
ga: "Gabon",
gm: "Gambia",
ge: "Georgia",
de: "Germany",
gh: "Ghana",
gi: "Gibraltar",
gr: "Greece",
gl: "Greenland",
gd: "Grenada",
gp: "Guadeloupe",
gu: "Guam",
gt: "Guatemala",
gg: "Guernsey",
gn: "Guinea",
gw: "Guinea-Bissau",
gy: "Guyana",
ht: "Haiti",
hm: "Heard Island and McDonald Islands",
va: "Holy See (Vatican City State)",
hn: "Honduras",
hk: "Hong Kong",
hu: "Hungary",
is: "Iceland",
"in": "India",
id: "Indonesia",
ir: "Iran, Islamic Republic of",
iq: "Iraq",
ie: "Ireland",
im: "Isle of Man",
il: "Israel",
it: "Italy",
jm: "Jamaica",
jp: "Japan",
je: "Jersey",
jo: "Jordan",
kz: "Kazakhstan",
ke: "Kenya",
ki: "Kiribati",
kp: "Korea, Democratic People's Republic of",
kr: "Korea, Republic of",
kw: "Kuwait",
kg: "Kyrgyzstan",
la: "Lao People's Democratic Republic",
lv: "Latvia",
lb: "Lebanon",
ls: "Lesotho",
lr: "Liberia",
ly: "Libya",
li: "Liechtenstein",
lt: "Lithuania",
lu: "Luxembourg",
mo: "Macao SAR",
mk: "Macedonia, the former Yugoslav Republic of",
mg: "Madagascar",
mw: "Malawi",
my: "Malaysia",
mv: "Maldives",
ml: "Mali",
mt: "Malta",
mh: "Marshall Islands",
mq: "Martinique",
mr: "Mauritania",
mu: "Mauritius",
yt: "Mayotte",
mx: "Mexico",
fm: "Micronesia, Federated States of",
md: "Moldova, Republic of",
mc: "Monaco",
mn: "Mongolia",
me: "Montenegro",
ms: "Montserrat",
ma: "Morocco",
mz: "Mozambique",
mm: "Myanmar",
na: "Namibia",
nr: "Nauru",
np: "Nepal",
nl: "Netherlands",
an: "Netherlands Antilles",
nc: "New Caledonia",
nz: "New Zealand",
ni: "Nicaragua",
ne: "Niger",
ng: "Nigeria",
nu: "Niue",
nf: "Norfolk Island",
mp: "Northern Mariana Islands",
no: "Norway",
om: "Oman",
pk: "Pakistan",
pw: "Palau",
ps: "Palestinian Authority",
pa: "Panama",
pg: "Papua New Guinea",
py: "Paraguay",
pe: "Peru",
ph: "Philippines",
pn: "Pitcairn",
pl: "Poland",
pt: "Portugal",
pr: "Puerto Rico",
qa: "Qatar",
re: "R&eacute;union",
ro: "Romania",
ru: "Russian Federation",
rw: "Rwanda",
bl: "Saint Barth&eacute;lemy",
sh: "Saint Helena, Ascension and Tristan da Cunha",
kn: "Saint Kitts and Nevis",
lc: "Saint Lucia",
mf: "Saint Martin (French part)",
pm: "Saint Pierre and Miquelon",
vc: "Saint Vincent and the Grenadines",
ws: "Samoa",
sm: "San Marino",
st: "Sao Tome and Principe",
sa: "Saudi Arabia",
sn: "Senegal",
rs: "Serbia",
sc: "Seychelles",
sl: "Sierra Leone",
sg: "Singapore",
sk: "Slovakia",
si: "Slovenia",
sb: "Solomon Islands",
so: "Somalia",
za: "South Africa",
gs: "South Georgia and the South Sandwich Islands",
es: "Spain",
lk: "Sri Lanka",
sd: "Sudan",
sr: "Suriname",
sj: "Svalbard and Jan Mayen",
sz: "Swaziland",
se: "Sweden",
ch: "Switzerland",
sy: "Syrian Arab Republic",
tw: "Taiwan",
tj: "Tajikistan",
tz: "Tanzania, United Republic of",
th: "Thailand",
tl: "Timor-Leste",
tg: "Togo",
tk: "Tokelau",
to: "Tonga",
tt: "Trinidad and Tobago",
tn: "Tunisia",
tr: "Turkey",
tm: "Turkmenistan",
tc: "Turks and Caicos Islands",
tv: "Tuvalu",
ug: "Uganda",
ua: "Ukraine",
ae: "United Arab Emirates",
gb: "United Kingdom",
us: "United States",
um: "United States Minor Outlying Islands",
uy: "Uruguay",
uz: "Uzbekistan",
vu: "Vanuatu",
ve: "Venezuela, Bolivarian Republic of",
vn: "Viet Nam",
vg: "Virgin Islands, British",
vi: "Virgin Islands, U.S.",
wf: "Wallis and Futuna",
ye: "Yemen",
zm: "Zambia",
zw: "Zimbabwe"
}
}),
define("utils/common/encoder", ["require", "cafe/applicationInstance", "services/pes/emoticons/encoder", "utils/common/countryCodes", "constants/common", "services/serviceLocator"], function(e) {
function o(e, t) {
return typeof e == "undefined" ? t : e
}
function u() {}
var t = e("cafe/applicationInstance")
, n = e("services/pes/emoticons/encoder")
, r = e("utils/common/countryCodes")
, i = e("constants/common")
, s = e("services/serviceLocator")
, a = {
xml: !0,
emoticons: {},
countryCodes: {},
largeEmoticonClass: "large",
init: function(e) {
e = e || {},
this.xml = o(e.xml, this.xml),
this.emoticons = o(e.emoticons, this.emoticons),
this.countryCodes = o(e.countries, this.countryCodes),
this.largeEmoticonClass = o(e.largeEmoticonClass, this.largeEmoticonClass)
},
encode: function(e, t) {
t = o(t, !0),
!this.xml && t && (e = this.private.escapeXml(e)),
e.search("<") !== -1 && this.xml && t && (e = this.private.escapeXml(e),
u("xml escaped: " + e));
var n = "";
for (var r = 0; r < e.length; ) {
var i = !0
, s = r;
r = this.firstLetter(e, r);
if (r !== -1) {
var a = this.firstSeparator(e, r);
a === -1 && (a = e.length);
var f = e.substring(r, a)
, l = this.private.encodeWord(f, this);
l && (n += e.substring(s, r),
n += l,
i = !1),
r = a
} else
r = e.length;
i && (++r,
n += e.substring(s, r))
}
return u(n),
n
},
decode: function(e) {
function u(e, t) {
t.parentNode && t.parentNode.replaceChild(e, t)
}
function a() {
var e = o.getElementsByTagName("flag")
, n = [];
for (r = 0; r < e.length; ++r) {
var i = t.private.createFlagElement(c, e[r].getAttribute("country"), e[r].textContent);
n.push([i, e[r]])
}
for (r = 0; r < n.length; ++r)
u(n[r][0], n[r][1])
}
function f() {
var e = o.getElementsByTagName("ss")
, n = []
, i = e.length <= 3 && e.length > 0;
if (i)
for (r = 0; r < o.childNodes.length; ++r) {
var s = o.childNodes[r].textContent.replace(" ", "").length === 0;
i = i && (o.childNodes[r].tagName === "ss" || s)
}
var a = e.length > 20;
for (r = 0; r < e.length; ++r) {
var f = t.private.createEmoticonElement(c, e[r].getAttribute("type"), e[r].textContent, i, a, t.largeEmoticonClass);
n.push([f, e[r]])
}
for (r = 0; r < n.length; ++r)
u(n[r][0], n[r][1])
}
function l() {
var e = o.getElementsByTagName("at")
, n = [];
for (r = 0; r < e.length; ++r) {
var i = t.private.createMentionElement(c, e[r].getAttribute("id"), e[r].textContent);
n.push([i, e[r]])
}
for (r = 0; r < n.length; ++r)
u(n[r][0], n[r][1])
}
var t = this, n = s.resolve(i.serviceLocator.FEATURE_FLAGS), r, o;
n.isFeatureOn(i.featureFlags.PES_USE_EXTRA_LARGE_EMOTICONS) && (this.largeEmoticonClass = "extraLarge");
try {
var c = this.private.parseXML(this.private.encapsulateInRootElement(e));
if (c)
return o = c.documentElement,
a(),
f(),
l(),
this.private.fixInvalidHTML(this.private.decapsulateFromRootElement(this.private.xmlToString(c)))
} catch (h) {}
return e
},
escapeXml: function(e) {
return this.private.escapeXml(e)
},
getNodeTextContent: function(e) {
var t = this.private.parseXML(this.private.encapsulateInRootElement(e));
return t && t.documentElement ? t.documentElement.textContent : e
},
firstLetter: function(e, t) {
t = o(t, 0);
for (var n = t; n < e.length; ++n)
if (!this.private.separators[e[n]])
return n;
return -1
},
firstSeparator: function(e, t) {
t = o(t, 0);
for (var n = t; n < e.length; ++n)
if (this.private.separators[e[n]])
return n;
return -1
},
"private": {
separators: {
" ": !0,
"\n": !0,
"\r": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0,
" ": !0
},
createEmoticonXmlTag: function(e, t) {
return '<ss type="' + e + '">' + this.escapeXml(t) + "</ss>"
},
createFlagXmlTag: function(e, t) {
return '<flag country="' + e + '">' + this.escapeXml(t) + "</flag>"
},
createMentionElement: function(e, n, r) {
var i = t.get().personsAndGroupsManager, s = "mention", o, u, a;
return n === i.mePerson.id() ? (r = i.mePerson.displayName(),
s += " me") : (a = i.all.persons(n),
a && (r = a.displayName())),
r = this.escapeXml(r),
u = e.createElement("span"),
u.setAttribute("title", n),
u.textContent = r,
o = e.createElement("i"),
o.setAttribute("class", s),
o.appendChild(u),
o
},
createEmoticonElement: function(e, t, n, r, i, s) {
var o = e.createElement("span")
, u = ["emoticon"];
u.push(t),
i || u.push("animated"),
r && u.push(s),
o.setAttribute("class", u.join(" "));
var a = e.createElement("span");
return a.textContent = n,
a.setAttribute("class", "emoSprite"),
o.appendChild(a),
o
},
createFlagElement: function(e, t, n) {
var r = e.createElement("span");
return r.textContent = n,
r.setAttribute("class", "flag " + t),
r.textContent = "(flag:" + t + ")",
r
},
encapsulateInRootElement: function(e) {
var t;
while (t !== e)
t = e,
e = e.replace(/<\s*?root[\s\S]*?>.*?(<\s*?\/\s*?root\s*?>)?/ig, "");
return "<root>" + e + "</root>"
},
decapsulateFromRootElement: function(e) {
return e.match(/<root ?\/>/) ? "" : e.length === "</root>".length ? "" : e.substring("<root>".length, e.length - "</root>".length)
},
fixInvalidHTML: function(e) {
return e.replace(/<span class='emoSprite'\s*\/>/g, "<span class='emoSprite'></span>")
},
encodeWord: function(e, t) {
function i(e) {
return t.emoticons.map[e]
}
function s(e) {
return t.emoticons.firstLettersMap[e[0]] && i(e)
}
function o(e) {
var t = !0
, r = e;
while (t) {
var i = r.replace(/[,.;?]$/, "");
t = i !== r;
if (t) {
n = a(i);
if (n) {
n += e.substring(i.length);
break
}
}
r = i
}
}
function a(e) {
e = t.private.unescapeXml(e);
for (var o = e.length - 1; o >= 0; ) {
var a = !1
, f = e.substring(o, r);
if (s(f)) {
while (o > 0) {
var l = e.substring(o - 1, r);
if (!s(l))
break;
o--,
f = e.substring(o, r)
}
u(f),
n = t.private.createEmoticonXmlTag(i(f), f) + n,
a = !0
} else if (!a && f[0] === "(") {
var c = f.match(/^\(flag:(\w\w)\)$/i)
, h = c && c[1];
h && t.countryCodes[h] && (n = t.private.createFlagXmlTag(h, f) + n,
a = !0)
}
a && (r = o),
--o
}
return n
}
var n = ""
, r = e.length;
return n = a(e),
n || o(e),
n === "" ? null : (r !== 0 && (n = e.substring(0, r) + n),
n)
},
parseXML: function(e) {
var t;
try {
if (window.DOMParser) {
var n = new DOMParser;
n.async = !1,
t = n.parseFromString(e, "text/xml")
} else {
t = new ActiveXObject("Microsoft.XMLDOM"),
t.async = !1;
if (t.loadXML(e))
return t
}
} catch (r) {
return null
}
return t.parseError && t.parseError.errorCode !== 0 ? null : t.getElementsByTagName("parsererror").length > 0 ? null : t
},
xmlToString: function(e) {
var t;
try {
t = (new XMLSerializer).serializeToString(e)
} catch (n) {
t = e.xml
}
return t
},
xmlEscapeMap: {
"<": "&lt;",
">": "&gt;",
"&": "&amp;",
'"': "&quot;",
"'": "&apos;"
},
escapeXml: function(e) {
var t = this.xmlEscapeMap;
return e.replace(/[<>&"']/g, function(e) {
return t[e]
})
},
unescapeXml: function(e) {
var t = {
"&lt;": "<",
"&gt;": ">",
"&amp;": "&",
"&quot;": '"',
"&apos;": "'"
};
return e.replace(/&lt;|&gt;|&amp;|&quot;|&apos/g, function(e) {
return t[e]
})
}
}
};
return a.init({
emoticons: n,
countries: r
}),
a
}),
define("utils/chat/messageSanitizer", ["require", "services/serviceLocator", "constants/common", "utils/common/regex", "utils/common/encoder", "lodash-compat"], function(e) {
function B(e, t, n) {
return new RegExp("((?:&lt;" + e + ' raw_pre="' + t + '"' + (n ? "" : ' raw_post="' + t + '"') + "&gt;)+)([\\s\\S]*?)((?:&lt;/" + e + "&gt;)+)","gi")
}
function j(e, t, n) {
var r = '<{0} raw_pre="{1}" raw_post="{1}">{2}</{0}>';
return r.split("{0}").join(e).split("{1}").join(t).split("{2}").join(n)
}
function F() {
var e = "^(https?://)?"
, t = "(([0-9a-z_!~*'()\\.&=+$%-]+:)?[0-9a-z_!~*'()\\.&=+$%-]+@)?"
, n = "(\\d{1,2}|1\\d{2}|2[0-4]\\d|25[0-5])"
, r = "(" + n + "\\.){3}" + n
, i = "([0-9a-z][0-9a-z_-]*)?[0-9a-z]"
, s = "(" + i + "\\.)+(com|org|net|edu|gov|mil|aero|arpa|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|pro|tel|travel|[a-z]{2})"
, o = "(:\\d{1,5})?"
, u = "([#/].*)?$"
, a = [e + t + s + o + u, e + t + r + o + u, e + t + i + o + u];
return a.map(function(e) {
return new RegExp(e,"i")
})
}
function I(e) {
return P[e]
}
function q(e) {
return e.replace(/([<>])/gi, I)
}
function R(e) {
return e.replace(/(&lt;|&gt;)/gi, I)
}
function U(e) {
return e.replace(/([<>&"'])/gi, I)
}
function z(e) {
return e.replace(/&(lt|gt|amp|quot|apos);/gi, I)
}
function W(e, t) {
return e.replace(t, R)
}
function X(e) {
function l(e, t) {
return s[i] = t,
e.replace(t, "DUMMY" + i++)
}
function c(e, n) {
t = t.replace("DUMMY" + n, e)
}
var t, n, r, i = 0, s = [], o, u = new RegExp(a,"gi"), f = new RegExp(a,"i");
r = u.exec(e);
if (!r)
return e;
n = e;
while (r)
o = r[0].match(f).splice(1),
t = o.reduce(l, r[0]),
t = R(t),
s.forEach(c),
n = n.replace(r[0], t),
r = u.exec(e);
return n
}
function V(e) {
var t = e.match(b).slice(1);
return t.reduce(W, e)
}
function $(e, t) {
var n = /(<a|&lt;a)/;
return e.search(r.escapeSpecialChars(t)) > -1 ? e : e.replace(n, function(e) {
return e + " " + t
})
}
function J(e, t, n, r, i) {
var s, o;
return s = R(t),
o = R(i),
n.indexOf(H) !== 0 && (s = $(s, 'target="_blank"')),
s = $(s, 'tabindex="-1"'),
s = $(s, 'title="' + n + '"'),
s + r + o
}
function K(e, t) {
var n, r = "&lt;", i = /(\+?[\s\d\-]*\d)&lt;/i;
return n = t.match(i)[0],
n.slice(0, n.length - r.length)
}
function Q(e) {
return U(e.replace(u, J))
}
function G(e) {
return z(e.replace(u, J))
}
function Y(e) {
return e.replace(/<a(:?>|\s.*?>)/g, "").replace(/<\/a>/g, "")
}
function Z(e) {
function t(e, t) {
return e.replace(N[t], "")
}
return Object.keys(N).reduce(t, e)
}
function et(e) {
function t(e, t, n, r, i) {
var s = D[e] || D.default;
return e === "rawFontColor" && (n = n.replace(/font(\s+)color/i, "font color")),
R(n.substr(0, s.opening)) + r + R(i.substr(0, s.closing))
}
function n(e, n) {
return e.replace(M[n], t.bind(null , n))
}
return Object.keys(M).reduce(n, e)
}
function tt(e, t) {
function u() {
return t && Object.keys(t).length > 0 && !f(e) && e.length > 1
}
function a(e) {
return t[e] !== undefined
}
function f(e) {
return !e || !/\S/.test(e)
}
function l(e, t) {
var n;
for (var r = 0; r < e.length; r++) {
n = e[r];
if (t !== undefined && t.length > 0 && t.indexOf(n) !== -1)
continue;return n === " "
}
return !0
}
function c(e) {
return e.split("").reverse().join("")
}
function h(e, t, n) {
var r = [",", ".", ";", ":", "?", "!", "(", ")"];
return a(t) ? l(c(e), r) || l(n, r) : !1
}
function p(e, t, n, r) {
var i = [",", ".", ";", ":", "?", "!", "(", ")"];
return n !== e || s.first(r) === e ? !1 : l(c(t), i) || l(r, i)
}
function d(e, t, n) {
for (var r = t; r <= e.length; r++)
if (n(e.substring(0, r), e[r], e.substring(r + 1, e.length)))
return r;
return -1
}
function v(e, t, n) {
var r = t, i, s;
do {
r += 1,
i = d(e, r, p.bind(null , n));
if (i === -1)
return -1;
s = e.substring(t + 1, i)
} while (f(s));return i
}
var n = 0, r, i, o;
if (!u())
return [];
do {
if (n >= e.length - 1)
return [];
r = d(e, n, h);
if (r === -1)
return [];
o = e.charAt(r),
i = v(e, r, o),
t = s.omit(t, o),
n += 1
} while (i === -1);return [r, i]
}
function nt(e, t) {
var n = tt(t, e), r = n[0], i = n[1], o, u, a, f, l, c, h;
return r === undefined || i === undefined || r < 0 || i < 0 ? t : (o = t.charAt(r),
u = e[o],
h = t.substring(0, r),
a = t.substring(r + 1, i),
l = t.substring(i + 1),
f = nt(s.omit(e, o), a),
f = u(f),
c = nt(e, l),
h + f + c)
}
function rt(e) {
var t = e.split(/\r?\n/), n;
return n = s.map(t, function(e) {
return nt(_, e)
}),
n.join("\r\n")
}
function it(e, t) {
function r(e) {
function n(e) {
return e.test(t)
}
var t = e.replace(/[\u0080-\u9999]/g, "z");
return k.some(n)
}
function i(e) {
return e.replace(/(["\''])/gi, I)
}
function s(e, s) {
return r(s) ? (s = i(s),
n = /^w{3}\./i.test(s) ? "http://" + s : s,
"<a" + (t ? "" : ' tabindex="-1" target="_blank"') + ' href="' + n + '">' + s + "</a>") : s
}
function o(e, t) {
return r(t) ? '<a href="mailto:' + t + '">' + t + "</a>" : t
}
var n;
return e.replace(C, s).replace(f, o)
}
function st(e, t, n) {
var r = q(e.replace(/&/g, "&amp;")), i = r.match(t), s;
return i ? i.forEach(function(e, t) {
var o = r.indexOf(e), u = o + e.length, a = i[t + 1], f;
t === 0 && (s = n(r.substring(0, o))),
s += r.substring(o, u),
r = r.substring(u),
f = a ? r.indexOf(a) : undefined,
s += n(r.substring(0, f))
}) : s = n(r),
R(s.replace(/&amp;/g, "&"))
}
function ot(e) {
var t = document.createElement("div");
return t.innerHTML = e,
t.textContent || ""
}
function ut(e) {
var r = t.resolve(n.serviceLocator.FEATURE_FLAGS)
, i = r.isFeatureOn(n.featureFlags.INCOMING_WIKI_MARKUP)
, s = q(e);
return s = s.replace(y, V),
s = s.replace(w, R),
s = X(s),
s = s.replace(u, J),
s = s.replace(l, K),
i ? et(s) : s
}
function at(e) {
return q(e).replace(/&lt;ss type="[^"]*"&gt;/gi, R).replace(/&lt;\/ss&gt;/gi, R).replace(E, R)
}
function ft(e, t, n) {
var r = e.match(t), i = [], o = e.split(t), u;
if (!r)
return e;
s.each(r, function(e) {
i.push(n(e))
}),
u = o[0];
for (var a = 0; a < i.length; a++)
u += i[a],
u += o[a + 1];
return u
}
function lt(e, t) {
function i(e) {
return n + e + r
}
var n = '<span class="notranslate">'
, r = "</span>";
return ft(e, t, i)
}
function ct(e, t) {
function s(e) {
var t = e.replace(n, "")
, i = t.substring(0, t.lastIndexOf(r));
return i
}
var n = '<span class="notranslate">'
, r = "</span>"
, i = new RegExp(n + t.source + "</span>","gi");
return ft(e, i, s)
}
function ht(e) {
var t;
return e && (t = ct(e, g),
t = ct(t, S),
t = ct(t, x),
t = ct(t, T),
t = ct(t, m),
t = ct(t, v)),
t
}
function pt(e) {
var t = /(\r?\n)|(&lt;br\s?\/&gt;)/gm
, n = "<br/>";
return e.replace(t, n)
}
function dt(e) {
var t = new RegExp(L,"gi"), n = new RegExp(L,"i"), r, i, s = e;
r = t.exec(e);
while (r)
i = n.exec(r[0]),
i && (s = s.replace(i[0], "@" + i[1])),
r = t.exec(e);
return s
}
function vt(e) {
var t = new RegExp(O,"gi"), n = new RegExp(O,"i"), r, i, s = e;
r = t.exec(e);
while (r)
i = n.exec(r[0]),
i && (s = s.replace(i[0], i[2])),
r = t.exec(e);
return s
}
function mt(e) {
var t = new RegExp(A,"gi"), n = new RegExp(A,"i"), r, i, s = e;
r = t.exec(e);
while (r)
i = n.exec(r[0]),
i && i.length === 4 && (s = s.replace(i[0], i[1] + i[3] + i[2])),
r = t.exec(e);
return s
}
function gt(e) {
var t = i.decode(e)
, n = Z(t)
, r = ut(n);
return pt(r)
}
function yt(e) {
var t = dt(e);
return t = mt(t),
t = vt(t),
t
}
function bt(e) {
return e = e.trim(),
e = e.replace(/&/g, "&amp;"),
e = i.encode(e),
e = at(e),
e = it(e, !0),
e = e.replace(/&amp;amp;/gi, "&amp;"),
e = rt(e),
e
}
function wt(e) {
var t = bt(e);
return t = lt(t, S),
t = lt(t, x),
t = lt(t, v),
t
}
function Et(e) {
var t;
return t = lt(e, g),
t = lt(t, T),
t = lt(t, m),
t = lt(t, v),
t
}
function St(e, t) {
var n = s.isArray(t) ? t : [t];
return s.each(n, function(t) {
e = e.replace(t, "")
}),
e = e.trim(),
!e
}
function xt(e) {
var t = /<at id="(.*?)">.*?<\/at>/g
, n = /<i class="(.*?)"><span title="(.*?)">.*?<\/span><\/i>/g;
return St(e, [t, n])
}
function Tt(e) {
return St(e, [S, x, g, T])
}
var t = e("services/serviceLocator")
, n = e("constants/common")
, r = e("utils/common/regex")
, i = e("utils/common/encoder")
, s = e("lodash-compat")
, o = '(?:(?:\\s*title=".*?"\\s*)|(?:\\s*tabindex="-1"\\s*)|(?:\\s*target="_blank"\\s*)){0,3}'
, u = r.multilineRegExp(["(&lt;a ", o, 'href="((?:https?://|mailto:)[^"]+?)"', o, "&gt;)", "((?:(?!&lt;/a&gt;)[\\s\\S])*)", "(&lt;/a&gt;)"], "gi")
, a = '&lt;i class="' + n.mentions.class + '"&gt;&lt;span title="(.*?)"&gt;(.*?)&lt;/span&gt;&lt;/i&gt;'
, f = /((([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,}))/gi
, l = /(&lt;a href="skype:\+\d+"&gt;(\+?[\s\d\-]*\d)&lt;\/a&gt;)/gi
, c = ["(", '&lt;span class="emoticon [a-z0-9]+\\s?(?:animated)?\\s?\\s?(?:large|extraLarge)?\\s?"&gt;', '&lt;span class="emoSprite"&gt;', ")", "(?:.+?)", "(&lt;/span&gt;&lt;/span&gt;)"]
, h = ['<span class="emoticon [a-z0-9]+\\s?(?:animated)?\\s?\\s?(?:large|extraLarge)?\\s?">', '<span class="emoSprite">', "(?:.+?)", "</span></span>"]
, p = ['<i class="' + n.mentions.class + '">', '<span title="(?:.+?)">', "(?:.+?)", "</span></i>"]
, d = ['<a (?:(?:\\s*title=".*?"\\s*)|(?:s*tabindex="-1"\\s*)|(?:\\s*target="_blank"\\s*)){0,3}href="(?:https?://|mailto:)[^"]+?"', '(?:(?:\\s*title=".*?"\\s*)|(?:\\s*tabindex="-1"\\s*)|(?:\\s*target="_blank"\\s*)){0,3}>', "(?:(?!</a>)[\\s\\S])*</a>"]
, v = r.multilineRegExp(d, "gi")
, m = r.multilineRegExp(p, "gi")
, g = r.multilineRegExp(h, "gi")
, y = r.multilineRegExp(c, "gi")
, b = r.multilineRegExp(c, "i")
, w = /&lt;span class="flag ([^"]{2})"&gt;[\s]*\(flag:\1\)[\s]*&lt;\/span&gt;/gi
, E = /&lt;flag country="([^"]{2})"&gt;[\s]*\(flag:\1\)[\s]*&lt;\/flag&gt;/gi
, S = /<ss type="\w+">.*?<\/ss>/g
, x = /<flag country="[\w+]{2}">(?:.+?)<\/flag>/gi
, T = /<span class="flag [^"]{2}">(?:.+?)<\/span>/gi
, N = {
text: /Edited previous message: /,
edited: /<\/?[e_m][^<>]+>/g,
quoted: /(<(?:\/?)(?:quote|legacyquote)[^>]*>)/gi
}
, C = /\b((https?:\/\/|w{3}\.)\S+)/gi
, k = F()
, L = '<i class="' + n.mentions.class + '"><span title="(.*?)">(.*?)</span></i>'
, A = '<.? raw_pre="(.?)" raw_post="(.?)">(.*?)</.?>'
, O = '<ss type="(.*?)">(.*?)</ss>'
, M = {
bold: B("b", "\\*"),
italic: B("i", "_"),
strike: B("s", "~"),
code: B("pre", "{code}"),
codeBlock: B("pre", "!! ", !0),
rawBold: new RegExp("(&lt;b&gt;)(.*?)(&lt;/b&gt;)","gi"),
rawItalic: new RegExp("(&lt;i&gt;)(.*?)(&lt;/i&gt;)","gi"),
rawFontColor: new RegExp('(&lt;font\\s+color="#[a-f0-9]{6}"&gt;)(.*?)(&lt;/font&gt;)',"gi")
}
, _ = {
"*": function(e) {
return j("b", "*", e)
},
_: function(e) {
return j("i", "_", e)
},
"~": function(e) {
return j("s", "~", e)
}
}
, D = {
code: {
opening: 46,
closing: 12
},
codeBlock: {
opening: 25,
closing: 12
},
rawBold: {
opening: 9,
closing: 10
},
rawItalic: {
opening: 9,
closing: 10
},
rawFontColor: {
opening: 28,
closing: 13
},
"default": {
opening: 34,
closing: 10
}
}
, P = {
"<": "&lt;",
">": "&gt;",
"&lt;": "<",
"&gt;": ">",
"&LT;": "<",
"&GT;": ">",
"&": "&amp;",
'"': "&quot;",
"'": "&apos;",
"&amp;": "&",
"&quot;": '"',
"&apos;": "'",
"&AMP;": "&",
"&QUOT;": '"',
"&APOS;": "'"
}
, H = "mailto:";
return {
validateUnescapedLink: function(e) {
return q(e).replace(u, J)
},
encodeEmoticonsTextRepresentation: function(e) {
function t(e) {
return i.decode(i.encode(e))
}
return st(e, y, t)
},
encodeEmoticonsRawRepresentation: function(e) {
return i.decode(i.encode(e, !1))
},
encodeLinkTextRepresentation: function(e) {
return st(e, u, it)
},
unboxHrefContent: function(e) {
function i(e, t) {
var r = t.match(n)[1] || ""
, i = r.replace("&amp;", "&");
return e.replace(t, i)
}
var t = /(<a.*?<\/a>)/gi
, n = /href="(.*?)"/i
, r = e.match(t) || [];
return r.reduce(i, e)
},
processOutgoingTextMessage: bt,
escapeIncomingHTML: ut,
escapeOutgoingHTML: at,
escapeHTML: Q,
unescapeHTML: G,
removeAnchorTags: Y,
removeMetaData: Z,
webify: pt,
unwebify: function(e) {
var t = "\r\n"
, n = /<br\/?>/g;
return e.replace(n, t)
},
getSanitizedTopic: function(e) {
return G(Y(e))
},
getMessageSanitizedContent: gt,
getEmoticonNamesFromMessage: function(e) {
var t = [], n = /(?:<ss type=")(\w+)">/g, r;
while (r = n.exec(e)) {
var i = r[1];
t.push(i)
}
return t
},
stripHTML: ot,
encode: function(e) {
return i.encode(e)
},
handleWikiMarkup: et,
compactHtml: yt,
isMessageWithMentionOnly: xt,
removeNoTranslateTags: ht,
processOutgoingTextMessageForTranslation: wt,
isMessageWithEmoticonsOnly: Tt,
processIncomingSanitizedTextMessageForTranslation: Et
}
}),
define("jSkype/utils/chat/parser", ["require", "utils/chat/messageSanitizer"], function(e) {
var t = e("utils/chat/messageSanitizer")
, n = /\/((?:\d+:|live:)[^\/]+)/;
return {
parseName: function(e) {
if (typeof e != "string")
throw new TypeError("Expected a string, got: " + typeof e);
var t = e.match(n);
return t ? t[1] : e
},
parseTopic: function(e) {
var n = e.replace(/<[^a\/].*?>(.*?)<\/[^a].*?>/gi, "$1")
, r = n.replace(/(<.*?\.{3,})$/, "").trim()
, i = r === "" ? "" : t.validateUnescapedLink(r);
return i
},
getConversationIdFromUrl: function(e) {
var t = new RegExp(/\/(\d+:[^?]*)/)
, n = e && e.match(t);
return n && n[1] ? n[1] : undefined
}
}
}),
define("jSkype/utils/chat/conversation", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/personHelper", "jSkype/client", "jSkype/utils/chat/parser", "constants/people"], function(e, t) {
var n = e("lodash-compat"), r = e("jSkype/modelHelpers/personHelper"), i = e("jSkype/client"), s = e("jSkype/utils/chat/parser"), o = e("constants/people"), u = "@p2p.thread.skype", a = /syncState=([^&]+)/, f;
t.isMessageReadOnServer = function(e, t, n) {
if (!e)
return !0;
var r = Math.floor(n / 1e3) * 1e3
, i = e.lastReadMessageId === t
, s = e.lastReadMessageTimestamp >= r;
return i || s
}
,
t.isMessageOutgoing = function(e) {
var t = s.parseName(e.from)
, n = i.get().personsAndGroupsManager.mePerson;
return f = f || r.getKey(n.id(), n._type()),
t === f
}
,
t.isConversationReadOnServer = function(e) {
var t = this.parseConsumptionHorizon(e.properties.consumptionhorizon)
, n = this.getMessageKey(e.lastMessage);
return this.isMessageReadOnServer(t, n, e.lastMessage.id)
}
,
t.parseConsumptionHorizon = function(e) {
if (!n.isString(e))
return {};
var t = e.split(";");
return {
lastReadMessageTimestamp: t[0],
modificationTime: t[1],
lastReadMessageId: t[2]
}
}
,
t.getMessageKey = function(e) {
return e.clientmessageid || e.skypeeditedid || e.messageid || e.id || 0
}
,
t.isPartiallyMigrated = function(e, t) {
var n = e.indexOf(u) !== -1
, r = t && t.migrationcompleted && t.migrationcompleted === "true";
return n && !r
}
,
t.isAgentConversation = function(e) {
return r.getTypeFromKey(e) === o.contactTypes.AGENT
}
,
t.isMeConversation = function(e) {
var t = i.get().personsAndGroupsManager.mePerson;
return e === r.getKey(t.id(), t._type())
}
,
t.isPstnConversation = function(e) {
return /^\d:\+/.test(e)
}
,
t.isPstnEndpoint = function(e) {
return /^(\+)?\d+$/.test(e)
}
,
t.isPstnOnlyConversation = function(e) {
var n = e.participants.subscribe();
if (!e.participants.size())
return n.dispose(),
!1;
for (var r = 0, i = e.participants.size(); r < i; r++) {
var s = e.participants(r);
if (!s.audio.endpoint || !t.isPstnEndpoint(s.audio.endpoint()))
return n.dispose(),
!1
}
return n.dispose(),
!0
}
,
t.getSyncStateFromResponse = function(e) {
var t = e._metadata && e._metadata.syncState
, n = null ;
return t && a.test(t) && (n = t.match(a)[1]),
n
}
}),
define("jSkype/services/webapi/actions/handlers", ["require", "exports", "module", "jSkype/services/webapi/utils/conversationMetadataStore", "jSkype/utils/chat/conversation"], function(e, t) {
var n = e("jSkype/services/webapi/utils/conversationMetadataStore")
, r = e("jSkype/utils/chat/conversation");
t.buildMessageSuccess = function(e, t) {
return function(i) {
var s = i.response
, o = r.getSyncStateFromResponse(s)
, u = !!s._metadata.backwardLink;
n.set(e, o),
t(s.messages || [], u)
}
}
}),
define("jSkype/services/webapi/utils/lockAndKey", [], function() {
"use strict";
function n() {
var e = window.chatServerTime || (new Date).getTime();
return Math.round(e / 1e3)
}
function r(n, r) {
return n.getMacHash(r, e, t)
}
function i(t, n) {
return "appId=" + e + "; time=" + t + "; lockAndKeyResponse=" + n
}
var e = "msmsgs@msnmsgr.com"
, t = "Q1P7W2E4J9R8U3S5";
return function(t) {
this.generate = function() {
var e = n()
, s = r(t, e);
return i(e, s)
}
}
}),
define("vendor/StringBuilder", [], function() {
return function() {
function t(e) {
return this._parts.push(e),
this
}
function n(e) {
return this._parts.push(typeof e == "undefined" || e === null || e === "" ? "\r\n" : e + "\r\n"),
this
}
function r() {
if (arguments.length !== 0)
throw new Error("InvalidParameterCount");
this._parts = [],
this._value = {},
this._len = 0
}
function i() {
if (arguments.length !== 0)
throw new Error("InvalidParameterCount");
return this._parts.length === 0 ? !0 : this.toString() === ""
}
function s(e) {
e = e || "";
var t = this._parts;
this._len !== t.length && (this._value = {},
this._len = t.length);
var n = this._value;
if (typeof n[e] == "undefined") {
if (e !== "")
for (var r = 0; r < t.length; )
typeof t[r] == "undefined" || t[r] === "" || t[r] === null ? t.splice(r, 1) : r++;
n[e] = this._parts.join(e)
}
return n[e]
}
var e = {};
return e.StringBuilder = function(n) {
this._parts = e.isNullOrEmpty(n) ? [] : [n.toString()],
this._value = {},
this._len = 0
}
,
e.StringBuilder.prototype = {
append: t,
appendLine: n,
clear: r,
isEmpty: i,
toString: s
},
e.isNullOrEmpty = function(t) {
return !t || !t.length
}
,
e
}()
}),
define("vendor/BigInt", ["require", "vendor/StringBuilder"], function(e) {
var t = e("vendor/StringBuilder");
return function() {
var e = "0123456789abcdef"
, n = 16
, r = 3
, i = function(t, n) {
this._elements = [],
this._radix = t,
this._elements.splice(0, 0, n),
this._length = 1,
this._normalize()
}
;
return i.hexRadix = 16,
i.decRadix = 1e3,
i._createDec = function(t) {
return new i(i.decRadix,t)
}
,
i._createHex = function(t) {
return new i(i.hexRadix,t)
}
,
i._computeHexNegative = function(t, r) {
var s, o = [];
for (s = 0; s < r; s++)
o.splice(s, 0, t[s]);
for (s = 0; s < o.length; s++)
o[s] > 0 && (o[s] = i.hexRadix - o[s],
s + 1 < o.length ? o[s + 1] = o[s + 1] + 1 : o.length < n && o.splice(s + 1, 0, 1));
return o
}
,
i.parseDecInt = function(t, n) {
switch (t) {
case i.decRadix:
return i._parseDecIntToDecRadixBigInt(n);
case i.hexRadix:
return i._parseDecIntToHexRadixBigInt(n);
default:
return null
}
}
,
i._parseDecIntToHexRadixBigInt = function(n) {
if (t.isNullOrEmpty(n))
return null ;
var r = n.charAt(0) === "-";
r && (n = n.substr(1));
var s = 9
, o = i._createHex(1e9)
, u = i._createHex(0)
, a = Math.ceil(n.length / s)
, f = i._createHex(1)
, l = n.length;
for (var c = 0; c < a; c++) {
var h = l - s < 0 ? 0 : l - s
, p = parseInt(n.substr(h, l - h), 10)
, d = i._createHex(p);
d.multiply(f),
u.add(d),
f.multiply(o),
l -= s
}
return u._isNegative = r,
u
}
,
i._parseDecIntToDecRadixBigInt = function(t) {
if (t.length === 0)
return i._createDec(0);
var n = !1
, s = [];
t.charAt(0) === "-" && (n = !0,
t = t.substr(1, t.length - 1));
var o;
for (o = 0; r * (o + 1) <= t.length; o++)
s.splice(o, 0, parseInt(t.substring(t.length - r * (o + 1), t.length - r * o), 10));
0 !== t.length % r && s.splice(o++, 0, parseInt(t.substring(0, t.length % r), 10));
var u = i._createDec(0);
return u._elements = s,
u._length = o,
u._isNegative = n,
u
}
,
i._getHexValues = function(t) {
var n = new Array(t.length);
for (var r = 0; r < t.length; r++) {
n[r] = i._hexCharValue(t.charAt(r));
if (n[r] < 0)
return null
}
return n
}
,
i._hexCharValue = function(t) {
if (t >= "0" && t <= "9")
return t - "0";
switch (t) {
case "a":
return 10;
case "b":
return 11;
case "c":
return 12;
case "d":
return 13;
case "e":
return 14;
case "f":
return 15;
default:
return -1
}
}
,
i._toNegativeValues = function(t) {
for (var n = t.length - 1; n >= 0; n--)
t[n] > 0 && (t[n] = 16 - t[n],
n > 0 && (t[n - 1] += 1));
return t
}
,
i.prototype = {
_isNegative: !1,
_length: 0,
_radix: 0,
_normalize: function() {
var t;
for (t = this._length - 1; t >= 0; t--) {
if (this._elements[t] !== 0)
break;
this._length--
}
for (var n = 0; n < 2; n++)
if (this._length === 0)
this._isNegative = !1;
else {
if (this._elements[this._length - 1] < 0) {
for (t = 0; t < this._length; t++)
this._elements[t] = -this._elements[t];
this._isNegative = !this._isNegative
}
for (t = 0; t < this._length - 1; t++) {
var r;
this._elements[t] < 0 && (r = Math.ceil(-this._elements[t] / this._radix),
this._elements[t] = this._elements[t] + this._radix * r,
this._elements[t + 1] = this._elements[t + 1] - r),
this._elements[t] >= this._radix && (r = Math.floor(this._elements[t] / this._radix),
this._elements[t] = this._elements[t] % this._radix,
this._elements[t + 1] = this._elements[t + 1] + r)
}
while (this._elements[this._length - 1] >= this._radix)
this._ensureCapacity(),
this._elements[this._length] = Math.floor(this._elements[this._length - 1] / this._radix),
this._elements[this._length - 1] = this._elements[this._length - 1] % this._radix,
this._length++;
if (!(this._elements[this._length - 1] < 0))
break;
for (t = 0; t < this._length; t++)
this._elements[t] = -this._elements[t];
this._isNegative = !this._isNegative
}
},
_ensureCapacity: function() {
this._length === this._elements.length && this._elements.push(0)
},
add: function(t) {
var n;
for (n = 0; n < this._length - t._length; n++)
t._elements.splice(t._length + n, 0, 0);
for (n = 0; n < t._length - this._length; n++)
this._elements.splice(this._length + n, 0, 0);
this._length = Math.max(t._length, this._length);
if (this._isNegative === t._isNegative)
for (n = 0; n < this._length; n++)
this._elements[n] = this._elements[n] + t._elements[n];
else
for (n = 0; n < this._length; n++)
this._elements[n] = this._elements[n] - t._elements[n];
this._normalize()
},
multiply: function(t) {
var n, r = new i(this._radix,0);
for (n = 0; n < t._length + this._length; n++)
n < r._elements.length ? r._elements[n] = 0 : r._elements.splice(n, 0, 0);
for (n = 0; n < t._length; n++) {
for (var s = 0; s < this._length; s++)
r._elements[n + s] = r._elements[n + s] + t._elements[n] * this._elements[s],
r._elements[n + s] !== 0 && (r._length = Math.max(r._length, n + s + 1));
r._normalize()
}
r._isNegative = t._isNegative !== this._isNegative,
this._elements = r._elements,
this._isNegative = r._isNegative,
this._length = r._length
},
modulus: function(t) {
for (; ; ) {
if (t._length === 0 || this._length === 0)
break;
var n = this._length - t._length;
if (n < 0)
break;
var r = this._elements[this._length - 1]
, i = t._elements[t._length - 1];
if (r >= i) {
var s = Math.floor(r / i);
for (var o = 0; o < t._length; o++)
this._elements[o + n] = this._elements[o + n] - s * t._elements[o];
this._normalize();
continue
}
if (n === 0)
break;
this._elements[this._length - 2] = this._elements[this._length - 2] + this._radix * this._elements[this._length - 1],
this._length--
}
this._isNegative && (t._isNegative ? (t._isNegative = !1,
this.add(t),
t._isNegative = !0) : this.add(t)),
this._normalize()
},
toString: function() {
switch (this._radix) {
case i.hexRadix:
return this._toHexString();
case i.decRadix:
return this._toDecString();
default:
return ""
}
},
_toHexString: function() {
if (this._elements.length === 0)
return "0";
var r = this._elements;
this._isNegative && (r = i._computeHexNegative(r, this._length));
var s = new t.StringBuilder
, o = !1;
for (var u = r.length - 1; u >= 0; u--)
o || r[u] !== 0 && (o = !0),
o && s.append(e.charAt(r[u]));
return s.toString()
},
_toDecString: function() {
if (this._length === 0)
return "0";
var t = "";
for (var n = 0; n < this._length; n++) {
t = this._elements[n] + t;
if (n < this._length - 1)
for (var r = 10; r < this._radix; r *= 10)
this._elements[n] < r && (t = 0 + t)
}
return this._isNegative && (t = "-" + t),
t
}
},
i
}()
}),
define("vendor/ConvertHelper", [], function() {
return function() {
var e = {
tryParseInt: function(t) {
var n = parseInt(t, 10);
return isNaN(n) ? -1 : n
},
parseHexInt: function(t) {
var n = parseInt(t, 16);
return isNaN(n) ? 0 : n
}
};
return e
}()
}),
define("vendor/sha256Auth", ["require", "vendor/msrcrypto.aes", "vendor/StringBuilder", "vendor/BigInt", "vendor/ConvertHelper"], function(e) {
var t = e("vendor/msrcrypto.aes")
, n = e("vendor/StringBuilder")
, r = e("vendor/BigInt")
, i = e("vendor/ConvertHelper");
return function(e) {
function o(e) {
var n = t.utilities.stringToBytes(e)
, r = t.sha256.computeHash(n);
return t.utilities.bytesToHexString(r)
}
function u(e, t) {
var r = e.toString(2), i = t.toString(2), s = new n.StringBuilder, o = new n.StringBuilder, u = Math.abs(r.length - i.length), a;
for (a = 0; a < u; a++)
o.append("0");
r.length < i.length ? (o.append(r),
r = o.toString()) : i.length < r.length && (o.append(i),
i = o.toString());
for (a = 0; a < r.length; a++)
s.append(r.charAt(a) === i.charAt(a) ? "0" : "1");
return parseInt(s.toString(), 2)
}
function a(e, t, n) {
return e.length < t ? (n = n || " ",
e + f(n, t - e.length)) : e.valueOf()
}
function f(e, t) {
var n = e;
for (var r = 1; r < t; r++)
n += e;
return n
}
var s = e.MSP || {};
return s._sha256Auth = function() {}
,
s._sha256Auth.prototype = {
_int32ToHexString: function(t) {
var r = "0123456789abcdef"
, i = new n.StringBuilder;
for (var s = 0; s <= 3; s++)
i.append(r.charAt(t >> s * 8 + 4 & 15)),
i.append(r.charAt(t >> s * 8 & 15));
return i.toString()
},
getMacHash: function(t, n, r) {
var s = t + n
, f = s
, l = 8 - f.length % 8;
l !== 8 && (f = a(f, f.length + l, "0"));
var c = f.length / 4, h = [], p, d;
for (p = 0,
d = 0; p < c; p++)
h.splice(p, 0, 0),
h[p] = h[p] + f.charCodeAt(d++) * 1,
h[p] = h[p] + f.charCodeAt(d++) * 256,
h[p] = h[p] + f.charCodeAt(d++) * 65536,
h[p] = h[p] + f.charCodeAt(d++) * 16777216;
var v = new Array(4)
, m = o(t + r);
for (p = 0,
d = 0; p < v.length; p++)
v[p] = 0,
v[p] += i.parseHexInt(m.substr(d, 2)) * 1,
d += 2,
v[p] += i.parseHexInt(m.substr(d, 2)) * 256,
d += 2,
v[p] += i.parseHexInt(m.substr(d, 2)) * 65536,
d += 2,
v[p] += i.parseHexInt(m.substr(d, 2)) * 16777216,
d += 2;
var g = new Array(2);
this._cS64_C(h, v, g);
var y = u(v[0], g[0])
, b = u(v[1], g[1])
, w = u(v[2], g[0])
, E = u(v[3], g[1]);
return this._int32ToHexString(y) + this._int32ToHexString(b) + this._int32ToHexString(w) + this._int32ToHexString(E)
},
_cS64_C: function(t, n, i) {
var s = 2147483647;
if (t.length < 2 || (t.length & 1) === 1)
return !1;
var o = n[0] & s
, u = n[1] & s
, a = n[2] & s
, f = n[3] & s
, l = 242854337
, c = r.parseDecInt(r.decRadix, o.toString())
, h = r.parseDecInt(r.decRadix, u.toString())
, p = r.parseDecInt(r.decRadix, a.toString())
, d = r.parseDecInt(r.decRadix, f.toString())
, v = r.parseDecInt(r.decRadix, l.toString())
, m = 0
, g = r.parseDecInt(r.decRadix, s.toString())
, y = r.parseDecInt(r.decRadix, "0")
, b = r.parseDecInt(r.decRadix, "0")
, w = r.parseDecInt(r.decRadix, "0");
for (var E = 0; E < t.length / 2; E++)
y = r.parseDecInt(r.decRadix, t[m++].toString()),
y.multiply(v),
y.modulus(g),
b.add(y),
b.multiply(c),
b.add(h),
b.modulus(g),
w.add(b),
b.add(r.parseDecInt(r.decRadix, t[m++].toString())),
b.multiply(p),
b.add(d),
b.modulus(g),
w.add(b);
return b.add(h),
b.modulus(g),
w.add(d),
w.modulus(g),
i[0] = parseInt(b.toString(), 10),
i[1] = parseInt(w.toString(), 10),
!0
}
},
s._sha256Auth
}(window)
}),
define("jSkype/services/webapi/instance", ["require", "jSkype/services/webapi/boundary/facade", "jSkype/services/webapi/boundary/dispatcher", "jSkype/services/webapi/calls/service", "jSkype/services/webapi/builders/headerSelector", "jSkype/services/webapi/builders/requestURIBuilder", "jSkype/services/webapi/builders/requestOptionsBuilder", "jSkype/services/webapi/actions/handlers", "jSkype/services/webapi/utils/lockAndKey", "vendor/sha256Auth"], function(e) {
var t = e("jSkype/services/webapi/boundary/facade")
, n = e("jSkype/services/webapi/boundary/dispatcher")
, r = e("jSkype/services/webapi/calls/service")
, i = e("jSkype/services/webapi/builders/headerSelector")
, s = e("jSkype/services/webapi/builders/requestURIBuilder")
, o = e("jSkype/services/webapi/builders/requestOptionsBuilder")
, u = e("jSkype/services/webapi/actions/handlers")
, a = e("jSkype/services/webapi/utils/lockAndKey")
, f = e("vendor/sha256Auth");
return function(l) {
function v(e) {
return new n(e)
}
var c = new f
, h = new a(c)
, p = new o(i)
, d = new r(s,p,l);
return i.setLockAndKey(h.generate()),
new t(v,u,d)
}
}),
define("jSkype/services/webapi/main", ["require", "jSkype/services/webapi/instance"], function(e) {
var t = e("jSkype/services/webapi/instance"), n;
return {
getInstance: function(e) {
return n || (n = new t(e)),
n
}
}
}),
define("jSkype/services/entitlement/facade", ["require", "jSkype/services/entitlement/serviceSettings"], function(e) {
function n(e, n) {
this.getEntitlementServiceData = function(r, i) {
var s = t.getEntitlementServiceEndpoint(r, i);
return n.build().then(function(t) {
return e.get(s, t)
})
}
,
this.getEntitlementListingData = function(r) {
var i = t.getEntitlementListingEndpoint(r);
return n.build().then(function(t) {
return e.get(i, t)
})
}
}
var t = e("jSkype/services/entitlement/serviceSettings");
return n
}),
define("jSkype/services/entitlement/main", ["require", "exports", "module", "jSkype/services/entitlement/facade"], function(e, t) {
var n = e("jSkype/services/entitlement/facade"), r;
t.getInstance = function(t, i) {
return r || (r = new n(t,i)),
r
}
}),
define("jSkype/services/stratus/optionsBuilder", ["require", "lodash-compat", "swx-utils-common", "jSkype/client", "jcafe-property-model", "jSkype/services/clientInfo", "jSkype/constants/common", "jSkype/services/stratus/serviceSettings", "jSkype/services/serviceAccessLayer/transientFaultPolicy"], function(e) {
function c() {
this._dynamicOptions = {},
this._defaultOptions = {
headers: {
Accept: o.JSON_V1_0,
"X-Stratus-Caller": s.getBIAppName()
},
retry: t.merge({
isTransientCheck: a.isTransientFailure
}, u.getRetryPolicy())
},
this._defaultOptions.headers[f] = "",
this._defaultOptions.headers[l] = ""
}
function h(e, r) {
var i;
return function(s) {
var o = {
makeDefault: !0
};
this.setHeader(f, s, o),
this.setHeader(l, n.create().substring(0, 8), o),
i = t.merge({}, this._defaultOptions, r),
e.resolve(i)
}
.bind(this)
}
var t = e("lodash-compat")
, n = e("swx-utils-common").guid
, r = e("jSkype/client")
, i = e("jcafe-property-model")
, s = e("jSkype/services/clientInfo")
, o = e("jSkype/constants/common").contentTypes
, u = e("jSkype/services/stratus/serviceSettings")
, a = e("jSkype/services/serviceAccessLayer/transientFaultPolicy")
, f = "X-Skypetoken"
, l = "X-Stratus-Request";
return c.prototype.setOption = function(e, t) {
this._dynamicOptions[e] = t
}
,
c.prototype.setHeader = function(e, t, n) {
n && n.makeDefault ? this._defaultOptions.headers[e] = t : (this._dynamicOptions.headers = this._dynamicOptions.headers || {},
this._dynamicOptions.headers[e] = t)
}
,
c.prototype.removeHeader = function(e) {
this._dynamicOptions.headers && delete this._dynamicOptions.headers[e]
}
,
c.prototype.setServiceName = function(e) {
this._dynamicOptions.reporting = {
serviceName: e
}
}
,
c.prototype.build = function() {
var e = i.task();
return r.get().signInManager._skypeToken().then(h.call(this, e, this._dynamicOptions)),
this._dynamicOptions = {},
e.promise
}
,
c
}),
define("jSkype/services/contacts/optionsBuilder", ["require", "lodash-compat", "jSkype/services/stratus/optionsBuilder", "jSkype/services/contacts/serviceSettings"], function(e) {
function i() {
n.call(this),
t.merge(this._defaultOptions.retry, r.getRetryPolicy())
}
var t = e("lodash-compat")
, n = e("jSkype/services/stratus/optionsBuilder")
, r = e("jSkype/services/contacts/serviceSettings");
return t.assign(i.prototype, n.prototype, {
constructor: i
}),
i
}),
define("jSkype/services/entitlement/entitlementOptionsBuilder", ["require", "lodash-compat", "jSkype/client", "jSkype/constants/common", "jSkype/services/entitlement/serviceSettings", "jSkype/services/serviceAccessLayer/transientFaultPolicy", "jSkype/services/stratus/optionsBuilder", "jSkype/services/entitlement/serviceSettings"], function(e) {
function a() {
this._options = {
headers: {
Accept: r.JSON_V3_0,
"X-Skypetoken": ""
},
retry: t.merge({}, {
isTransientCheck: s.isTransientFailure
}, i.getRetryPolicy()),
serviceName: u.actions.getEntitlementService,
addContentType: !1
}
}
var t = e("lodash-compat")
, n = e("jSkype/client")
, r = e("jSkype/constants/common").contentTypes
, i = e("jSkype/services/entitlement/serviceSettings")
, s = e("jSkype/services/serviceAccessLayer/transientFaultPolicy")
, o = e("jSkype/services/stratus/optionsBuilder")
, u = e("jSkype/services/entitlement/serviceSettings");
return t.assign(a.prototype, o.prototype, {
constructor: a,
setHeader: function(e, t) {
this._options.headers[e] = t
},
build: function() {
var e = this;
return n.get().signInManager._skypeToken().then(function(t) {
return e.setHeader("X-Skypetoken", t),
e._options
})
}
}),
a
}),
define("jSkype/services/serviceFactory", ["require", "exports", "module", "jSkype/settings", "jSkype/services/stratus/serviceSettings", "jSkype/services/contacts/serviceSettings", "jSkype/services/webapi/serviceSettings", "jSkype/services/entitlement/serviceSettings", "jSkype/services/serviceAccessLayer/serviceLocator", "jSkype/services/contacts/main", "jSkype/services/stratus/main", "jSkype/services/people/main", "jSkype/services/ABCHProfile/main", "jSkype/services/webapi/main", "jSkype/services/entitlement/main", "jSkype/services/stratus/optionsBuilder", "jSkype/services/contacts/optionsBuilder", "jSkype/services/entitlement/entitlementOptionsBuilder"], function(e, t) {
var n = e("jSkype/settings")
, r = e("jSkype/services/stratus/serviceSettings")
, i = e("jSkype/services/contacts/serviceSettings")
, s = e("jSkype/services/webapi/serviceSettings")
, o = e("jSkype/services/entitlement/serviceSettings")
, u = e("jSkype/services/serviceAccessLayer/serviceLocator")
, a = e("jSkype/services/contacts/main")
, f = e("jSkype/services/stratus/main")
, l = e("jSkype/services/people/main")
, c = e("jSkype/services/ABCHProfile/main")
, h = e("jSkype/services/webapi/main")
, p = e("jSkype/services/entitlement/main")
, d = e("jSkype/services/stratus/optionsBuilder")
, v = e("jSkype/services/contacts/optionsBuilder")
, m = e("jSkype/services/entitlement/entitlementOptionsBuilder");
t.getStratusService = function() {
var e = u.build(r.getHost());
return f.getInstance(e, new d)
}
,
t.getContactsService = function() {
var e = u.build(i.getHost());
return a.getInstance(e, new v)
}
,
t.getPresenceService = function() {
var e = u.build(s.getHost());
return h.getInstance(e)
}
,
t.getEntitlementService = function() {
var e = u.build(o.getHost());
return p.getInstance(e, new m)
}
,
t.getPeopleService = function() {
var e = u.build(n.settings.peopleService.host);
return l.getInstance(e, new d)
}
,
t.getABCHProfileService = function() {
var e = u.build(n.settings.profileService.host);
return c.getInstance(e, new d)
}
}),
define("jSkype/models/note", ["require", "jcafe-property-model"], function(e) {
function n() {
this.type = t.property({
readOnly: !0
}),
this.text = t.property({
readOnly: !0
})
}
var t = e("jcafe-property-model");
return n
}),
define("jSkype/models/agentDetails", ["require", "jcafe-property-model"], function(e) {
function n() {
this.author = t.property({
readOnly: !0
}),
this.description = t.property({
readOnly: !0
}),
this.certification = t.property({
readOnly: !0
}),
this.rating = t.property({
readOnly: !0
}),
this.website = t.property({
readOnly: !0
}),
this.privacyStatement = t.property({
readOnly: !0
}),
this.termsOfService = t.property({
readOnly: !0
}),
this.extraInfo = t.property({
readOnly: !0
})
}
var t = e("jcafe-property-model");
return n
}),
define("jSkype/models/person", ["require", "jcafe-property-model", "jSkype/models/location", "jSkype/models/capabilities", "jSkype/models/phoneNumber", "cafe/enums", "jSkype/modelHelpers/personHelper", "jSkype/services/serviceFactory", "jSkype/models/note", "jSkype/models/agentDetails"], function(e) {
function l(e) {
function h(e, n) {
function s() {
v(!e),
r.resolve(e)
}
function o(e) {
r.reject(e)
}
var r = t.task()
, i = u.getStratusService();
return e ? i.blockContact(l.id(), n).then(s, o) : i.unblockContact(l.id()).then(s, o),
r.promise
}
function p(e) {
return e !== undefined ? new Date(e) : undefined
}
function d(e) {
var t = new i;
t.type._set(s.phoneType.Other),
t.telUri._set(e),
t.displayString._set(e),
l.phoneNumbers.add(t, e)
}
function v(e) {
l.capabilities.chat._set(e),
l.capabilities.audio._set(e),
l.capabilities.video._set(e),
l.capabilities.groupAdd._set(e)
}
var l = this
, c = t.enabledCommand(h);
this._type = t.property({
readOnly: !0
}),
this._authorization = t.property({
readOnly: !0
}),
this.id = t.property({
readOnly: !0,
value: e
}),
this.isBlocked = t.property({
set: c,
value: !1
}),
this.isAgent = t.property({
readOnly: !0,
value: !1
}),
this.displayName = t.property({
readOnly: !0,
value: e
}),
this.firstName = t.property({
readOnly: !0
}),
this.lastName = t.property({
readOnly: !0
}),
this.title = t.property({
readOnly: !0
}),
this.office = t.property({
readOnly: !0
}),
this.department = t.property({
readOnly: !0
}),
this.company = t.property({
readOnly: !0
}),
this.avatarUrl = t.property({
readOnly: !0,
value: o.isGuestId(e) ? undefined : o.getAvatarUri(e)
}),
this.emails = t.collection(),
this.status = t.property({
readOnly: !0
}),
this.activity = t.property({
readOnly: !0
}),
this.endpointType = t.property({
readOnly: !0,
value: s.endpointType.Desktop
}),
this.lastSeenAt = t.property({
set: p
}),
this.note = new a,
this.location = new n,
this.location.type._set(s.locationType.Unknown),
this.capabilities = new r,
v(!0),
this.phoneNumbers = t.collection(),
o.isPstnId(e) && d(e),
this.agentDetails = new f,
this.subscribe = t.enabledCommand(function() {})
}
var t = e("jcafe-property-model")
, n = e("jSkype/models/location")
, r = e("jSkype/models/capabilities")
, i = e("jSkype/models/phoneNumber")
, s = e("cafe/enums")
, o = e("jSkype/modelHelpers/personHelper")
, u = e("jSkype/services/serviceFactory")
, a = e("jSkype/models/note")
, f = e("jSkype/models/agentDetails");
return l
}),
define("jSkype/utils/batch", ["require", "jSkype/constants/people"], function(e) {
function n(e) {
function o() {
e(n),
n = []
}
var n = []
, r = t.MAX_ITEMS
, i = t.MAX_DELAY
, s = null ;
this.add = function(e) {
clearTimeout(s),
n.push(e),
n.length >= r ? o() : s = window.setTimeout(o, i)
}
,
this.clear = function() {
clearTimeout(s),
n = []
}
}
var t = e("jSkype/constants/people").batch;
return {
create: function(e) {
return e ? new n(e) : null
}
}
}),
define("jSkype/modelHelpers/contacts/contactActivityItemHelper", ["require", "exports", "module", "lodash-compat", "cafe/enums"], function(e, t) {
function s(e) {
return e.type() === r.activityType.ContactRequestIncoming
}
function o(e) {
return e.type() === r.activityType.ContactRequestIncomingInviteFree
}
function u(e) {
return i.indexOf(e.type()) !== -1
}
function a(e) {
return e.type() === r.activityType.UnblockContact
}
var n = e("lodash-compat")
, r = e("cafe/enums")
, i = [r.activityType.ContactRequestOutgoingResend, r.activityType.ContactRequestOutgoing, r.activityType.ContactRequestOutgoingAgent, r.activityType.ContactRequestIncoming, r.activityType.ContactRequestIsNowContact, r.activityType.SuggestedContact];
t.filterContactRequestActivityItems = function(e) {
return e.filter(u)
}
,
t.filterUnblockContactActivityItems = function(e) {
return e.filter(a)
}
,
t.clearContactRequestActivityItems = function(e, n) {
var r = e.historyService
, i = t.filterContactRequestActivityItems(r.activityItems())
, s = !1;
return i.forEach(function(e) {
e.type() !== n ? r._removeMessage(e) : s = !0
}),
s
}
,
t.clearUnblockContactActivityItems = function(e) {
var n = e.historyService
, r = t.filterUnblockContactActivityItems(n.activityItems());
r.forEach(function(e) {
n._removeMessage(e)
})
}
,
t.getContactRequestIncomingActivityItem = function(e) {
var t = e.historyService.activityItems();
return n.find(t, s)
}
,
t.getContactRequestIncomingInviteFreeActivityItem = function(e) {
var t = e.historyService.activityItems();
return n.find(t, o)
}
}),
define("jSkype/modelHelpers/contacts/contactMessageFactory", ["require", "exports", "module", "cafe/enums", "jSkype/constants/people", "jSkype/modelHelpers/contacts/contactActivityItemHelper", "jSkype/modelHelpers/personHelper"], function(e, t) {
function o(e, t, n, r, i) {
return r = r || +(new Date),
{
id: +r,
personId: e.id(),
timestamp: r,
contactRequestType: n,
greeting: i,
isOutgoing: t
}
}
var n = e("cafe/enums").activityType
, r = e("jSkype/constants/people").authorizationStates
, i = e("jSkype/modelHelpers/contacts/contactActivityItemHelper")
, s = e("jSkype/modelHelpers/personHelper");
t.getOutgoing = function(e, t) {
return e.isAgent() ? o(e, !0, n.ContactRequestOutgoingAgent, t) : o(e, !0, n.ContactRequestOutgoing, t)
}
,
t.getOutgoingResend = function(e, t) {
return o(e, !0, n.ContactRequestOutgoingResend, t)
}
,
t.getIncoming = function(e, t, r) {
return o(e, !1, n.ContactRequestIncoming, t, r)
}
,
t.getIncomingInviteFree = function(e, t) {
return o(e, !1, n.ContactRequestIncomingInviteFree, t - 1)
}
,
t.getIsNowContact = function(e) {
return o(e, !1, n.ContactRequestIsNowContact)
}
,
t.getSuggested = function(e, t) {
return o(e, !0, n.SuggestedContact, t)
}
,
t.getUnblockContact = function(e) {
return o(e, !0, n.UnblockContact)
}
,
t.getActivityItemForInitialConversationLoad = function(e, n) {
function a() {
switch (e._authorization()) {
case r.PENDING_OUTGOING:
return t.getOutgoingResend(e);
case r.SUGGESTED:
return t.getSuggested(e);
case r.UNAUTHORIZED:
return t.getOutgoing(e);
default:
return
}
}
var o = i.filterContactRequestActivityItems(n.historyService.activityItems())
, u = i.filterUnblockContactActivityItems(n.historyService.activityItems());
if (!o.length && s.canRequestContactAuthorization(e))
return a();
if (!u.length && e.isBlocked())
return t.getUnblockContact(e)
}
}),
define("jSkype/modelHelpers/contacts/authorizationChange", ["require", "jSkype/client", "jcafe-property-model", "jSkype/services/serviceFactory", "cafe/enums", "jSkype/constants/people", "jSkype/modelHelpers/personHelper", "jSkype/modelHelpers/contacts/contactActivityItemHelper", "jSkype/modelHelpers/contacts/contactMessageFactory", "jSkype/settings", "constants/common", "jSkype/modelHelpers/contacts/dataHandlers/factory", "jSkype/modelHelpers/personsAndGroupsHelper"], function(e) {
function p() {
function v(e, t) {
return e === undefined ? t : e
}
function m(e) {
return o.getKey(e.id(), e._type())
}
function g(e, n) {
var r = m(e);
t.get().conversationsManager._conversationBlockedUpdate(r, n)
}
function y(e) {
var n = m(e);
return t.get().conversationsManager._getConversation(n)
}
function b(e, t, n) {
if (t === s.AUTHORIZED)
return;
e._authorization._set(s.AUTHORIZED),
e.isAgent() && e.status._set(h.getDefaultPresence(e, e._authorization()));
switch (t) {
case s.PENDING_OUTGOING:
case s.PENDING_INCOMING:
case s.SUGGESTED:
case s.UNAUTHORIZED:
n && (u.clearContactRequestActivityItems(n),
w(e, n)),
C(e);
break;
default:
}
}
function w(e, t) {
var n;
E() || (n = a.getIsNowContact(e),
t.historyService._processRawMessage(n))
}
function E() {
return f.isFeatureOn(l.featureFlags.INVITE_FREE_IMPLICIT_INCOMING_CONTACT_REQUEST)
}
function S(e, n, r) {
var i;
if (n === s.UNAUTHORIZED)
return;
e._authorization._set(s.UNAUTHORIZED),
e.status._set(undefined);
switch (n) {
case s.PENDING_INCOMING:
r && (u.clearContactRequestActivityItems(r),
t.get().conversationsManager.conversations.remove(r));
break;
case s.UNKNOWN:
case s.PENDING_OUTGOING:
case s.SUGGESTED:
r && o.canRequestContactAuthorization(e) && (i = a.getOutgoing(e),
u.clearContactRequestActivityItems(r),
r.historyService._processRawMessage(i));
break;
case s.AUTHORIZED:
r && o.canRequestContactAuthorization(e) && (i = a.getOutgoing(e),
u.clearContactRequestActivityItems(r),
r.historyService._processRawMessage(i)),
N(e);
break;
default:
}
}
function x(e, t, n) {
var r;
if (t === s.PENDING_OUTGOING)
return;
e._authorization._set(s.PENDING_OUTGOING),
e.status._set(i.onlineStatus.Unknown);
switch (t) {
case s.UNKNOWN:
case s.UNAUTHORIZED:
case s.SUGGESTED:
n && (u.clearContactRequestActivityItems(n),
r = a.getOutgoingResend(e),
n.historyService._processRawMessage(r));
break;
default:
}
}
function T(e, t, n) {
var r;
if (t === s.SUGGESTED)
return;
e._authorization._set(s.SUGGESTED);
switch (t) {
case s.UNKNOWN:
case s.UNAUTHORIZED:
n && (u.clearContactRequestActivityItems(n),
r = a.getSuggested(e),
n.historyService._processRawMessage(r));
break;
default:
}
}
function N(e) {
if (L(e)) {
var t = r.getPresenceService();
t.removeContactFromContactsList(e.id())
}
}
function C(e) {
if (k(e)) {
var t = r.getPresenceService();
t.addContactToContactsList(e.id())
}
}
function k(e) {
return !f.isFeatureOn(l.featureFlags.DO_NOT_SEND_CONTACTS_TO_CHAT_SERVICE) && o.canAddToChatServiceContactList(e)
}
function L(e) {
return !f.isFeatureOn(l.featureFlags.DO_NOT_SEND_CONTACTS_TO_CHAT_SERVICE) && o.canRemoveContactFromChatServiceContactList(e)
}
function A(e, t, n) {
var r = t.persons(e.id());
r || t.persons.add(e, e.id(), undefined, n)
}
var e = this
, p = t.get().personsAndGroupsManager.all
, d = p.groups().filter(function(e) {
return e.relationshipLevel() === i.groupPrivacyRelationshipLevel.Blocked
})[0];
this.setAuthorization = function(e, t, n) {
var r = y(e)
, i = e._authorization();
n = v(n, !0);
if (!t)
return e;
switch (t) {
case s.AUTHORIZED:
b(e, i, r);
break;
case s.UNAUTHORIZED:
S(e, i, r);
break;
case s.PENDING_OUTGOING:
x(e, i, r);
break;
case s.SUGGESTED:
T(e, i, r);
break;
default:
}
return n && this.updateGroups(e),
e
}
,
this.updateGroups = function(e) {
switch (e._authorization()) {
case s.AUTHORIZED:
case s.PENDING_OUTGOING:
case s.SUGGESTED:
A(e, p, !0);
break;
case s.UNAUTHORIZED:
p.persons.remove(e.id(), !0);
break;
default:
}
e.isBlocked() ? A(e, d, !1) : d.persons.remove(e)
}
,
this.setBlocked = function(n, r) {
var i, o;
if (n.isBlocked())
return;
r = v(r, !0),
n.isBlocked._set(!0),
i = y(n),
g(n, !0);
switch (n._authorization()) {
case s.PENDING_INCOMING:
e.sendDeclineRequest(n),
i && (u.clearContactRequestActivityItems(i),
t.get().conversationsManager.conversations.remove(i));
break;
case s.UNAUTHORIZED:
i && (u.clearContactRequestActivityItems(i),
t.get().conversationsManager.conversations.remove(i));
break;
case s.PENDING_OUTGOING:
case s.SUGGESTED:
i && (o = a.getUnblockContact(n),
u.clearContactRequestActivityItems(i),
i.historyService._processRawMessage(o));
break;
case s.AUTHORIZED:
i && (o = a.getUnblockContact(n),
u.clearUnblockContactActivityItems(i),
i.historyService._processRawMessage(o)),
N(n);
break;
default:
}
r && this.updateGroups(n)
}
,
this.setUnblocked = function(e, t) {
var n, r, i;
if (!e.isBlocked())
return;
t = v(t, !0),
e.isBlocked._set(!1),
e.capabilities.chat._set(!0),
e.capabilities.audio._set(!0),
e.capabilities.video._set(!0),
e.capabilities.groupAdd._set(!0),
n = y(e),
g(e, !1);
switch (e._authorization()) {
case s.AUTHORIZED:
n && u.clearUnblockContactActivityItems(n),
C(e);
break;
case s.UNAUTHORIZED:
n && (r = a.getOutgoing(e),
u.clearUnblockContactActivityItems(n),
n.historyService._processRawMessage(r));
break;
case s.PENDING_OUTGOING:
n && (i = a.getOutgoingResend(e),
u.clearUnblockContactActivityItems(n),
n.historyService._processRawMessage(i));
break;
case s.SUGGESTED:
n && (i = a.getSuggested(e),
u.clearUnblockContactActivityItems(n),
n.historyService._processRawMessage(i));
break;
default:
}
t && this.updateGroups(e)
}
,
this.sendDeclineRequest = function(e) {
function s() {
c.getContactRequestDeclinedHandlers().onSuccess(e),
t.resolve()
}
function o(e) {
c.getContactRequestDeclinedHandlers().onError(e),
t.reject(e)
}
var t = n.task()
, i = r.getStratusService();
return i.declineContactRequest(e.id()).then(s, o)
}
}
var t = e("jSkype/client")
, n = e("jcafe-property-model")
, r = e("jSkype/services/serviceFactory")
, i = e("cafe/enums")
, s = e("jSkype/constants/people").authorizationStates
, o = e("jSkype/modelHelpers/personHelper")
, u = e("jSkype/modelHelpers/contacts/contactActivityItemHelper")
, a = e("jSkype/modelHelpers/contacts/contactMessageFactory")
, f = e("jSkype/settings")
, l = e("constants/common")
, c = e("jSkype/modelHelpers/contacts/dataHandlers/factory")
, h = e("jSkype/modelHelpers/personsAndGroupsHelper");
return {
build: function() {
return new p
}
}
}),
define("utils/people/userDataProcessor", ["require", "exports", "module", "lodash-compat", "utils/common/encoder", "utils/chat/messageSanitizer"], function(e, t) {
var n = e("lodash-compat")
, r = e("utils/common/encoder")
, i = e("utils/chat/messageSanitizer")
, s = /(<flag country="\S+">\S+<\/flag>|<ss type="\S+">\S+<\/ss>)/gi;
t.sanitize = function(e) {
if (n.isString(e)) {
var t = e;
if (e.match(s) === null ) {
var o = i.escapeIncomingHTML(e);
t = r.encode(o, !1)
}
return i.escapeIncomingHTML(r.decode(t))
}
return ""
}
,
t.sanitizeXml = function(e) {
return n.isString(e) ? n.escape(e) : ""
}
,
t.stripAnchors = function(e) {
return n.isString(e) ? i.removeAnchorTags(e) : ""
}
}),
define("jSkype/modelHelpers/contacts/dataMappers/mappers", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/dataMaps", "utils/people/userDataProcessor", "jSkype/models/phoneNumber", "utils/chat/dateTime", "constants/common"], function(e, t) {
function a(e, t, n) {
e._set(n ? n(t) : t)
}
function f(e, t) {
var n = r.phoneTypes[t.type]
, o = l(e, t);
return o || (o = new s,
a(o.telUri, t.number, i.sanitize),
e.add(o, o.telUri())),
o.type._set(n),
a(o.displayString, t.number, i.sanitize),
e
}
function l(e, t) {
return n.find(e(), function(e) {
return e.telUri() === t.number
})
}
function c(e) {
var t = "cacheHeaders=1"
, n = new RegExp(t,"i");
return e.match(n) || (e += (e.split("?").length > 1 ? "&" : "?") + t),
e
}
function h(e) {
var t = /^http:\/\//.test(e);
return t ? e.replace("http://", "https://") : e
}
function p(e) {
return e.toUpperCase()
}
var n = e("lodash-compat")
, r = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps")
, i = e("utils/people/userDataProcessor")
, s = e("jSkype/models/phoneNumber")
, o = e("utils/chat/dateTime")
, u = e("constants/common");
t.mapId = function(e, t) {
e && a(t.id, e, i.sanitizeXml)
}
,
t.mapAvatarUrl = function(e, t) {
if (e) {
var r = n.compose(h, c);
a(t.avatarUrl, e, r)
}
}
,
t.mapDisplayName = function(e, t) {
e && a(t.displayName, e, i.sanitizeXml)
}
,
t.mapDisplayNameFallback = function(e, t, n) {
e && t ? a(n.displayName, e + " " + t, i.sanitizeXml) : e ? a(n.displayName, e, i.sanitizeXml) : t && a(n.displayName, t, i.sanitizeXml)
}
,
t.mapFirstName = function(e, t) {
e && a(t.firstName, e, i.sanitizeXml)
}
,
t.mapLastName = function(e, t) {
e && a(t.lastName, e, i.sanitizeXml)
}
,
t.mapCity = function(e, t) {
e && a(t.location.city, e, i.sanitize)
}
,
t.mapState = function(e, t) {
e && a(t.location.state, e, i.sanitize)
}
,
t.mapCountry = function(e, t) {
if (e) {
var r = n.compose(p, i.sanitize);
a(t.location.country, e, r)
}
}
,
t.mapActivity = function(e, t) {
e && a(t.activity, e, i.sanitize)
}
,
t.mapPhoneNumbers = function(e, t) {
function i(e, t) {
return n.some(t, function(t) {
return e.telUri() === t.number
})
}
if (e && !!e.length) {
var r = [];
n.forEach(e, function(n) {
f(t.phoneNumbers, n)
}),
n.forEach(t.phoneNumbers(), function(s) {
!i(s, e) && s.telUri() !== t.id() && r.push(s)
}),
n.forEach(r, function(n) {
t.phoneNumbers.remove(n.telUri())
})
}
}
,
t.mapType = function(e, t) {
e && (a(t._type, r.contactTypes[e]),
e === r.contactTypeNames.agent && a(t.isAgent, !0))
}
,
t.mapCapabilities = function(e, t) {
function r(r, i) {
var s = n.includes(e, r)
, o = t.capabilities[i];
o && a(o, s)
}
/cortana/.test(t.id()) && e.push("im.receive"),
n.forOwn(u.capabilities, r)
}
,
t.mapRegistrationDate = function(e, t) {
e && a(t._registeredAt, o.getDate(parseInt(e, 10)))
}
,
t.mapAgentAuthor = function(e, t) {
e && a(t.agentDetails.author, e, i.sanitizeXml)
}
,
t.mapAgentDescription = function(e, t) {
e && a(t.agentDetails.description, e, i.sanitizeXml)
}
,
t.mapAgentWebsite = function(e, t) {
e && a(t.agentDetails.website, e, i.sanitizeXml)
}
,
t.mapAgentPrivacyStatement = function(e, t) {
e && a(t.agentDetails.privacyStatement, e, i.sanitizeXml)
}
,
t.mapAgentTermsOfService = function(e, t) {
e && a(t.agentDetails.termsOfService, e, i.sanitizeXml)
}
,
t.mapAgentExtraInfo = function(e, t) {
e && a(t.agentDetails.extraInfo, e, i.sanitizeXml)
}
}),
define("jSkype/modelHelpers/contacts/dataMappers/contactToPerson", ["require", "exports", "module", "lodash-compat", "jSkype/constants/people", "jSkype/constants/people", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/modelHelpers/contacts/dataMappers/mappers", "jSkype/modelHelpers/contacts/dataMappers/dataMaps"], function(e, t) {
function l(e) {
return n.isArray(e) && n.isPlainObject(e[0])
}
function c(e) {
return e.suggested ? r.SUGGESTED_CONTACT_ACTIVITY_MESSAGE : e.mood
}
function h(e, t) {
u.mapCity(e.city, t),
u.mapCountry(e.country, t)
}
function p(e) {
return e.type === "agent" ? e.agent.capabilities : e.type === "pstn" ? ["audio.receive", "group.add"] : []
}
function d(e) {
return e.authorized === !0 ? i.AUTHORIZED : e.suggested === !0 ? i.SUGGESTED : i.PENDING_OUTGOING
}
function v(e) {
return e.type === a.contactTypeNames.agent && m(e) || e.type === a.contactTypeNames.pstn || e.blocked
}
function m(e) {
return !!e.agent && !!e.agent.capabilities
}
var n = e("lodash-compat")
, r = e("jSkype/constants/people")
, i = e("jSkype/constants/people").authorizationStates
, s = e("jSkype/modelHelpers/contacts/authorizationChange")
, o = e("jSkype/modelHelpers/personsAndGroupsHelper")
, u = e("jSkype/modelHelpers/contacts/dataMappers/mappers")
, a = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps")
, f = !1;
t.map = function(t, r, i) {
var a = s.build()
, m = n.result(t.name, "first")
, g = n.result(t.name, "surname")
, y = d(t)
, b = c(t);
u.mapType(t.type, r),
u.mapAvatarUrl(t.avatar_url, r),
u.mapDisplayName(t.display_name, r),
u.mapFirstName(m, r),
u.mapLastName(g, r),
u.mapPhoneNumbers(t.phones, r),
u.mapActivity(b, r),
v(t) && u.mapCapabilities(p(t), r),
l(t.locations) && h(t.locations[0], r),
r.displayName() === r.id() && u.mapDisplayNameFallback(m, g, r),
i && r.status._set(o.getDefaultPresence(r, y)),
a.setAuthorization(r, y, f),
t.blocked ? a.setBlocked(r, f) : a.setUnblocked(r, f),
a.updateGroups(r)
}
}),
define("jSkype/modelHelpers/contacts/dataMappers/profileToPerson", ["require", "exports", "module", "jSkype/modelHelpers/contacts/dataMappers/mappers", "jSkype/constants/people"], function(e, t) {
function i(e, t) {
var i = t.displayName();
(i === r || i === t.id()) && n.mapDisplayNameFallback(e.firstname, e.lastname, t)
}
var n = e("jSkype/modelHelpers/contacts/dataMappers/mappers")
, r = e("jSkype/constants/people").SELF;
return t.map = function(e, t) {
n.mapId(e.username, t),
n.mapFirstName(e.firstname, t),
n.mapLastName(e.lastname, t),
n.mapDisplayName(e.displayname, t),
n.mapCity(e.city, t),
n.mapState(e.state, t),
n.mapCountry(e.country, t),
n.mapActivity(e.mood, t),
n.mapAvatarUrl(e.avatarUrl, t),
i(e, t)
}
,
t
}),
define("jSkype/modelHelpers/contacts/dataMappers/userInfo", ["require", "exports", "module", "jSkype/modelHelpers/contacts/dataMappers/mappers"], function(e, t) {
var n = e("jSkype/modelHelpers/contacts/dataMappers/mappers");
return t.map = function(e, t) {
n.mapRegistrationDate(e.registrationDate, t)
}
,
t
}),
define("jSkype/modelHelpers/contacts/dataMappers/directoryResultToPerson", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/mappers"], function(e, t) {
var n = e("lodash-compat")
, r = e("jSkype/modelHelpers/contacts/dataMappers/mappers");
t.map = function(e, t) {
e.Skype ? r.mapDisplayName(n.result(e.Skype, "DisplayName"), t) : e.Lync && r.mapDisplayName(n.result(e.Lync, "DisplayName"), t),
r.mapCity(n.result(e.CurrentLocation, "City"), t),
r.mapState(n.result(e.CurrentLocation, "Province"), t),
r.mapCountry(n.result(e.CurrentLocation, "Country"), t)
}
}),
define("jSkype/modelHelpers/contacts/dataMappers/directorySearchResultByIdToPerson", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/mappers"], function(e, t) {
var n = e("lodash-compat")
, r = e("jSkype/modelHelpers/contacts/dataMappers/mappers");
t.map = function(e, t) {
r.mapDisplayName(n.result(e, "fullname"), t),
r.mapCity(n.result(e, "city"), t),
r.mapState(n.result(e, "province"), t),
r.mapCountry(n.result(e, "key_country"), t)
}
}),
define("jSkype/modelHelpers/contacts/dataMappers/factory", ["require", "exports", "module", "jSkype/modelHelpers/contacts/dataMappers/contactToPerson", "jSkype/modelHelpers/contacts/dataMappers/profileToPerson", "jSkype/modelHelpers/contacts/dataMappers/userInfo", "jSkype/modelHelpers/contacts/dataMappers/directoryResultToPerson", "jSkype/modelHelpers/contacts/dataMappers/directorySearchResultByIdToPerson"], function(e, t) {
var n = e("jSkype/modelHelpers/contacts/dataMappers/contactToPerson")
, r = e("jSkype/modelHelpers/contacts/dataMappers/profileToPerson")
, i = e("jSkype/modelHelpers/contacts/dataMappers/userInfo")
, s = e("jSkype/modelHelpers/contacts/dataMappers/directoryResultToPerson")
, o = e("jSkype/modelHelpers/contacts/dataMappers/directorySearchResultByIdToPerson");
t.getContactMapper = function() {
return n
}
,
t.getProfileMapper = function() {
return r
}
,
t.getUserInfoMapper = function() {
return i
}
,
t.getDirectorySearchMapper = function() {
return s
}
,
t.getDirectorySearchByIdMapper = function() {
return o
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/meProfile", ["require", "exports", "module", "jSkype/client", "constants/common", "jSkype/settings", "jSkype/modelHelpers/propertyModelHelper", "jSkype/modelHelpers/contacts/dataMappers/factory"], function(e, t) {
function u(e) {
this.onSuccess = function(t) {
return e.map(t.response, n.get().personsAndGroupsManager.mePerson),
a(),
s.createResolvedPromise()
}
,
this.onError = function(e) {
return s.createRejectedPromise(e)
}
}
function a() {
var e = n.get()._telemetryManager
, t = {
name: r.telemetry.contacts.name.GET_PROFILES,
batchCount: 1
};
e.sendEvent(i.settings.telemetry.jSkypeTenantToken, r.telemetry.contacts.type.CONTACTS, t)
}
var n = e("jSkype/client")
, r = e("constants/common")
, i = e("jSkype/settings")
, s = e("jSkype/modelHelpers/propertyModelHelper")
, o = e("jSkype/modelHelpers/contacts/dataMappers/factory");
t.build = function() {
var e = o.getProfileMapper();
return new u(e)
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/userInfo", ["require", "exports", "module", "jSkype/client", "jSkype/modelHelpers/propertyModelHelper", "jSkype/modelHelpers/contacts/dataMappers/factory"], function(e, t) {
function s(e) {
this.onSuccess = function(t) {
return e.map(t.response, n.get().personsAndGroupsManager.mePerson),
r.createResolvedPromise()
}
,
this.onError = function(e) {
return r.createRejectedPromise(e)
}
}
var n = e("jSkype/client")
, r = e("jSkype/modelHelpers/propertyModelHelper")
, i = e("jSkype/modelHelpers/contacts/dataMappers/factory");
t.build = function() {
var e = i.getUserInfoMapper();
return new s(e)
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/peopleSettings", ["require", "exports", "module"], function(e, t) {
function r() {
function e(e) {
return e.response && e.response.Settings && e.response.Settings.length > 0
}
function t(t) {
var i = !1;
return e(t) ? (t.response.Settings.some(function(e) {
if (e.Name.toLowerCase() === n) {
i = r(e);
return
}
}),
i) : i
}
function r(e) {
var t;
try {
t = JSON.parse(e.Value.toLowerCase())
} catch (n) {
t = !1
}
return t
}
this.onSuccess = function(e) {
return new Promise(function(n) {
n(t(e))
}
)
}
,
this.onError = function(e) {
return new Promise(function(t, n) {
n(e)
}
)
}
}
var n = "skype.autobuddy";
t.build = function() {
return new r
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/ABCHProfileService", ["require", "exports", "module", "lodash-compat", "constants/common"], function(e, t) {
function o() {
function e(e) {
var t = [];
return !e.response || !e.response.Views ? t : (n.map(e.response.Views, "Attributes")[0].filter(u).reduce(f, t),
n.sortBy(t, a))
}
function t(e) {
return !!(e.response && e.response.Errors && e.response.Errors.length > 0)
}
function o(e) {
return e.response.Errors[0].Message
}
function u(e) {
return e.Name === i.EMAIL || e.Name === i.PHONES
}
function a(e) {
return e.type
}
function f(e, t) {
return t.Name === i.PHONES && n.forEach(t.Value, function(t) {
if (t.State !== s.VERIFIED)
return;
e.push({
type: r.proofTypes.PHONE,
cc: t.Country,
number: t.Name,
value: t.Country.replace(/\w+-(\d+)/, "+$1") + t.Name,
isSearchable: t.Searchable
})
}),
t.Name === i.EMAIL && n.forEach(t.Value, function(t) {
if (t.State !== s.VERIFIED)
return;
e.push({
type: r.proofTypes.EMAIL,
value: t.Name,
isSearchable: t.Searchable
})
}),
e
}
this.onSuccess = function(n) {
return t(n) ? Promise.reject(o(n)) : Promise.resolve(e(n))
}
,
this.onError = function(e) {
return Promise.reject(e)
}
}
var n = e("lodash-compat")
, r = e("constants/common")
, i = {
EMAIL: "PersonalContactProfile.Emails",
PHONES: "PersonalContactProfile.Phones"
}
, s = {
VERIFIED: "Verified"
};
t.build = function() {
return new o
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/phoneUpdate", ["require", "exports", "module"], function(e, t) {
function n() {
function e(e) {
return !!(e.response && e.response.Errors && e.response.Errors.length > 0)
}
function t(e) {
return e.response.Errors[0].Message
}
this.onSuccess = function(n) {
return e(n) ? Promise.reject(t(n)) : Promise.resolve()
}
,
this.onError = function(e) {
return Promise.reject(e)
}
}
t.build = function() {
return new n
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/batchProfiles", ["require", "exports", "module", "lodash-compat", "constants/common", "jSkype/settings", "jSkype/modelHelpers/propertyModelHelper", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/modelHelpers/contacts/dataMappers/factory", "jSkype/client"], function(e, t) {
function f(e) {
function u(t) {
var n = o.getPerson(t.username);
n && e.map(t, n)
}
function f(e) {
var t = a.get()._telemetryManager
, n = e && e.response ? e.response.length : 0
, s = r.telemetry.contacts.type.CONTACTS
, o = {
name: r.telemetry.contacts.name.GET_PROFILES,
batchCount: n
};
t.sendEvent(i.settings.telemetry.jSkypeTenantToken, s, o)
}
var t = n.once(f);
this.onSuccess = function(e) {
var n = e && e.response ? e.response : [];
return n.forEach(u),
t(e),
s.createResolvedPromise()
}
,
this.onError = function(e) {
return s.createRejectedPromise(e)
}
}
var n = e("lodash-compat")
, r = e("constants/common")
, i = e("jSkype/settings")
, s = e("jSkype/modelHelpers/propertyModelHelper")
, o = e("jSkype/modelHelpers/personsAndGroupsHelper")
, u = e("jSkype/modelHelpers/contacts/dataMappers/factory")
, a = e("jSkype/client");
t.build = function() {
var e = u.getProfileMapper();
return new f(e)
}
}),
define("jSkype/modelHelpers/contacts/groupCleaner", ["require", "exports", "module", "lodash-compat", "jSkype/client", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/constants/people", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/modelHelpers/personsRegistry/instance"], function(e, t) {
function a(e) {
function u() {
return e.filter(a).map(function(e) {
return e.id()
})
}
function a(e) {
return !!r.get().personsAndGroupsManager.all.persons(e.id())
}
var t = this;
this.filter = function(e) {
var r = n.difference(u(), n.pluck(e, "id"));
return r.reduce(function(e, n) {
return t.removeContact(n) ? e.concat(n) : e
}, [])
}
,
this.removeContact = function(e) {
var t = i.getPersonById(e);
return t ? (o.build().setAuthorization(t, s.UNAUTHORIZED),
!0) : !1
}
}
var n = e("lodash-compat")
, r = e("jSkype/client")
, i = e("jSkype/modelHelpers/personsAndGroupsHelper")
, s = e("jSkype/constants/people").authorizationStates
, o = e("jSkype/modelHelpers/contacts/authorizationChange")
, u = e("jSkype/modelHelpers/personsRegistry/instance");
t.build = function() {
var e = u.build();
return new a(e)
}
}),
define("jSkype/modelHelpers/contacts/dataProcessors/authorization", ["require", "jSkype/constants/people", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/modelHelpers/personsRegistry/instance"], function(e) {
function i(e) {
var r = n.build();
this.process = function(n) {
n.forEach(function(n) {
n._authorization() === t.UNKNOWN && (r.setAuthorization(n, t.UNAUTHORIZED),
e.add(n))
})
}
}
var t = e("jSkype/constants/people").authorizationStates
, n = e("jSkype/modelHelpers/contacts/authorizationChange")
, r = e("jSkype/modelHelpers/personsRegistry/instance");
return {
build: function() {
var e = r.build();
return new i(e)
}
}
}),
define("jSkype/modelHelpers/presence/cache/local", ["require", "exports", "module", "lodash-compat", "utils/common/cache/instance", "jSkype/constants/data", "jSkype/constants/data", "jSkype/modelHelpers/personHelper", "jSkype/modelHelpers/personsAndGroupsHelper"], function(e, t) {
function a(e) {
return i.CONTACT_PRESENCE + "|" + e
}
function f() {
return r.get().getAllKeys(s.CONTACT_PRESENCE)
}
function l(e) {
return e.forEach(function(e) {
var t = e[1]
, n = u.getPerson(o.getId(e[0]));
if (t.status) {
var r = u.getDefaultPresence(n);
n.status._set(r ? r : t.status)
}
t.lastSeenAt && n.lastSeenAt(t.lastSeenAt),
t.endpointType && n.endpointType._set(t.endpointType)
}),
e
}
var n = e("lodash-compat")
, r = e("utils/common/cache/instance")
, i = e("jSkype/constants/data").storageKeys
, s = e("jSkype/constants/data").storageKeyRegExp
, o = e("jSkype/modelHelpers/personHelper")
, u = e("jSkype/modelHelpers/personsAndGroupsHelper");
t.set = function(e, t) {
var i = a(e)
, s = r.get();
return s.getItem(i).then(function(e) {
var r = n.merge(e || {}, t);
return s.setItem(i, r)
})
}
,
t.remove = function(e) {
return r.get().removeItem(a(e))
}
,
t.restore = function() {
return f().then(function(e) {
var t = e.reduce(function(e, t) {
var n = t.split("|")[1];
return e.concat(Promise.all([n, r.get().getItem(t)]))
}, []);
return Promise.all(t).then(l)
})
}
,
t.destroy = function() {
return f().then(function(e) {
var t = e.reduce(function(e, t) {
return e.concat(r.get().removeItem(t))
}, []);
return Promise.all(t)
})
}
}),
define("jSkype/modelHelpers/presence/cache/session", ["require", "exports", "module", "lodash-compat", "jSkype/client", "jSkype/constants/people", "swx-utils-common", "jSkype/constants/data", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/modelHelpers/personHelper", "jcafe-property-model"], function(e, t) {
function l() {
s.set(o, "{}")
}
function c(e, t, n, r, i) {
e[t] = {
status: n,
lastSeenAt: r,
endpointType: i
}
}
function h(e, t, n, r, i) {
e[t].endpointType = i || e[t].endpointType,
e[t].lastSeenAt = r || e[t].lastSeenAt,
e[t].status = n || e[t].status
}
function p(e) {
return function(n, r) {
var i = !!r && !!(r.status || r.lastSeenAt || r.endpointType);
i && e.call(t, n, r)
}
}
function d() {
var e = s.get(o);
return e ? JSON.parse(e) : (l(),
{})
}
function v(e, t) {
var n = e[t.id()];
n && n.status && t.status(n.status, f.property.sUpdated)
}
function m(e, t) {
n.forIn(n.omit(e, [t.id(), i]), function(e, t) {
var n = u.getPerson(a.getId(t));
if (e.status) {
var r = u.getDefaultPresence(n);
n.status._set(r ? r : e.status)
}
e.lastSeenAt && n.lastSeenAt(e.lastSeenAt),
e.endpointType && n.endpointType._set(e.endpointType)
})
}
function g(e) {
function r(t, n) {
return t[n] = {
status: e[n]
},
t
}
if (!n.isEmpty(e) && y(e)) {
var t = Object.keys(e).reduce(r, {});
s.set(o, JSON.stringify(t)),
e = t
}
return e
}
function y(e) {
return Object.keys(e).every(function(t) {
return n.isString(e[t])
})
}
var n = e("lodash-compat")
, r = e("jSkype/client")
, i = e("jSkype/constants/people").SELF
, s = e("swx-utils-common").sessionStorage
, o = e("jSkype/constants/data").storageKeys.PRESENCE_DATA
, u = e("jSkype/modelHelpers/personsAndGroupsHelper")
, a = e("jSkype/modelHelpers/personHelper")
, f = e("jcafe-property-model");
t.restore = function() {
var e = r.get().personsAndGroupsManager.mePerson
, t = d()
, n = g(t, e.id());
return v(n, e),
m(n, e),
t
}
,
t.set = p(function(e, t) {
var n = d()
, r = t.status
, i = t.lastSeenAt
, u = t.endpointType;
n[e] ? h(n, e, r, i, u) : c(n, e, r, i, u),
s.set(o, JSON.stringify(n))
}),
t.remove = function(e) {
var t = d()
, n = delete t[e];
return s.set(o, JSON.stringify(t)),
n
}
,
t.destroy = function() {
s.remove(o)
}
}),
define("jSkype/modelHelpers/presence/presenceDataStorage", ["require", "exports", "module", "lodash-compat", "jSkype/settings", "constants/common", "jSkype/modelHelpers/presence/cache/local", "jSkype/modelHelpers/presence/cache/session"], function(e, t) {
function u() {
return r.isFeatureOn(i.featureFlags.PRESENCE_DATA_CACHE)
}
function a() {
return o.destroy(),
s.restore()
}
var n = e("lodash-compat")
, r = e("jSkype/settings")
, i = e("constants/common")
, s = e("jSkype/modelHelpers/presence/cache/local")
, o = e("jSkype/modelHelpers/presence/cache/session");
t.getCache = function() {
return u() ? s : o
}
,
t.restoreData = function() {
if (u()) {
var e = o.restore();
if (!n.isEmpty(e)) {
var t = Object.keys(e).map(function(t) {
return s.set(t, e[t])
});
return Promise.all(t).then(function() {
return a()
})
}
return a()
}
return s.restore().then(function(e) {
return n.isEmpty(e) || e.forEach(function(e) {
o.set(e.id, n.omit(e, "id"))
}),
o.restore(),
s.destroy()
})
}
}),
function(e) {
if (typeof module == "object" && typeof module.exports == "object") {
var t = e(require, exports);
t !== undefined && (module.exports = t)
} else
typeof define == "function" && define.amd && define("swx-agentProvisioningService/lib/agentProvisioningService", ["require", "exports", "reqwest", "lodash-compat"], e)
}(function(e, t) {
function i(e, t) {
function i(r) {
var i = e().then(function(e) {
var i = {
url: t.host + "relationship/me/" + r,
type: "PUT",
crossOrigin: !0,
headers: {
"X-SkypeToken": e
}
};
return n.compat(i)
});
return Promise.resolve(i)
}
function s(i) {
var s = e().then(function(e) {
var s = t.host + "agents"
, o = r.reduce(r.keys(i), function(e, t) {
return e.concat([t, i[t]].join("="))
}, []).join("&")
, u = {
url: s + (o ? "?" + o : ""),
type: "GET",
crossOrigin: !0,
headers: {
"X-SkypeToken": e
}
};
return n.compat(u)
});
return Promise.resolve(s)
}
return {
add: i,
search: s
}
}
var n = e("reqwest")
, r = e("lodash-compat");
t.build = i
}),
define("swx-agentProvisioningService", ["swx-agentProvisioningService/lib/agentProvisioningService"], function(e) {
return e
}),
define("jSkype/modelHelpers/contacts/dataMappers/agentToPerson", ["require", "exports", "module", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/mappers", "jSkype/modelHelpers/contacts/dataMappers/dataMaps"], function(e, t) {
var n = e("lodash-compat")
, r = e("jSkype/modelHelpers/contacts/dataMappers/mappers")
, i = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps");
t.map = function(e, t) {
return t.isAgent._set(!0),
t._type._set(i.contactTypes[i.contactTypeNames.agent]),
t.avatarUrl._set(e.userTileStaticUrl),
r.mapDisplayName(e.displayName, t),
r.mapAgentAuthor(e.developer, t),
r.mapAgentDescription(e.description, t),
r.mapAgentWebsite(e.webpage, t),
r.mapAgentPrivacyStatement(e.privacyStatement, t),
r.mapAgentTermsOfService(e.tos, t),
r.mapAgentExtraInfo(e.extra, t),
t.agentDetails.certification._set(e.isTrusted),
t.agentDetails.rating._set(e.starRating),
n(e.capabilities).includes("group_chat") && t.capabilities._groupChat._set(!0),
t
}
}),
define("jSkype/modelHelpers/contacts/dataProcessors/agents", ["require", "lodash-compat", "utils/common/settablePromise", "constants/common", "jSkype/settings", "swx-agentProvisioningService", "jSkype/modelHelpers/contacts/dataMappers/agentToPerson", "jSkype/client"], function(e) {
function a(e) {
function s(t, s) {
var a = {
agentId: s.id()
}
, f = n.build();
return e.search(a).then(function(e) {
e.agentDescriptions[0] ? f.resolve(o.map(e.agentDescriptions[0], s)) : f.resolve(s)
}, function(e) {
u.get()._telemetryManager.sendEvent(i.settings.telemetry.jSkypeTenantToken, "ServiceFault", {
serviceName: "agents-search",
faultCode: e.status,
faultContext: r.telemetry.NOT_AVAILABLE,
errorCode: e.status || r.telemetry.NOT_AVAILABLE,
errorMessage: e.responseText || r.telemetry.NOT_AVAILABLE,
verb: "GET",
host: i.settings.agentProvisioningService.host
}),
f.resolve(s)
}),
t.concat(f),
t
}
this.process = function(e) {
var n = t.reduce(e, s, []);
return Promise.all(n)
}
}
var t = e("lodash-compat")
, n = e("utils/common/settablePromise")
, r = e("constants/common")
, i = e("jSkype/settings")
, s = e("swx-agentProvisioningService")
, o = e("jSkype/modelHelpers/contacts/dataMappers/agentToPerson")
, u = e("jSkype/client");
return {
build: function() {
var e = u.get().signInManager._skypeToken
, t = s.build(e, i.settings.agentProvisioningService);
return new a(t)
}
}
}),
define("jSkype/modelHelpers/contacts/contactAdder", ["require", "lodash-compat", "jSkype/modelHelpers/contacts/dataMappers/factory", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/settings", "constants/common", "jSkype/modelHelpers/presence/presenceDataStorage", "jSkype/modelHelpers/contacts/dataMappers/dataMaps", "jSkype/modelHelpers/contacts/dataProcessors/agents"], function(e) {
function f(e, n) {
function o(t) {
var n = r.getPersonById(t.id);
return n ? e.map(t, n, !1) : (n = r.getPerson(t.id),
e.map(t, n, !0)),
n
}
function f(e, t) {
if (l(t)) {
var n = o(t);
t.type === u.contactTypeNames.agent && e.push(n)
}
return e
}
function l(e) {
return r.isMePerson(e.id) ? !1 : e.type === u.contactTypeNames.pstn && !i.isFeatureOn(s.featureFlags.PSTN_ENABLED) ? !1 : e.type === u.contactTypeNames.agent && !i.isFeatureOn(s.featureFlags.AGENTS_ENABLED) ? !1 : !0
}
function c(e) {
n.set(e.id(), {
status: e.status()
})
}
this.add = function(e) {
var n = t.reduce(e, f, []);
return t.forEach(n, c),
a.build().process(n)
}
}
var t = e("lodash-compat")
, n = e("jSkype/modelHelpers/contacts/dataMappers/factory")
, r = e("jSkype/modelHelpers/personsAndGroupsHelper")
, i = e("jSkype/settings")
, s = e("constants/common")
, o = e("jSkype/modelHelpers/presence/presenceDataStorage")
, u = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps")
, a = e("jSkype/modelHelpers/contacts/dataProcessors/agents");
return {
build: function() {
var e = n.getContactMapper()
, t = o.getCache();
return new f(e,t)
}
}
}),
define("jSkype/modelHelpers/contacts/dataProcessors/contactList", ["require", "exports", "module", "lodash-compat", "constants/common", "constants/people", "utils/common/cache/instance", "jSkype/client", "jSkype/settings", "jSkype/constants/data", "jSkype/constants/people", "jSkype/modelHelpers/contacts/groupCleaner", "jSkype/modelHelpers/contacts/dataProcessors/authorization", "jSkype/modelHelpers/contacts/contactAdder", "jSkype/modelHelpers/personsRegistry/instance", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/services/internalPubSub"], function(e, t) {
function m(e) {
function p(e) {
var t = n.reduce(e.contacts, function(e, t) {
return t.deleted ? (l.build().removeContact(t.id),
e) : e.concat(t)
}, []);
return t.length > 0 && (h.build().add(t),
e.scope === i.scopes.FULL && l.build().filter(t)),
o.get().personsAndGroupsManager.all.persons()
}
function m(e, t) {
if (e && u.isFeatureOn(r.featureFlags.CONTACT_PROFILE_CACHE)) {
var n = t.map(d.createRawDataFromPerson);
return s.get().setSensitiveItem(a.CONTACT_PROFILES, n)
}
return Promise.resolve()
}
function g(t) {
e.defaultPersonAuthorization = f.UNAUTHORIZED,
c.build().process(e.toArray()),
v.get().publish("contacts:loaded", t.filter(function(e) {
return e._authorization() === f.AUTHORIZED && !e.isBlocked()
})),
o.get().personsAndGroupsManager._initialized(!0)
}
var t = n.once(g);
this.process = function(e) {
var n = p(e);
return t(n),
m(e.contacts, n)
}
}
var n = e("lodash-compat")
, r = e("constants/common")
, i = e("constants/people")
, s = e("utils/common/cache/instance")
, o = e("jSkype/client")
, u = e("jSkype/settings")
, a = e("jSkype/constants/data").storageKeys
, f = e("jSkype/constants/people").authorizationStates
, l = e("jSkype/modelHelpers/contacts/groupCleaner")
, c = e("jSkype/modelHelpers/contacts/dataProcessors/authorization")
, h = e("jSkype/modelHelpers/contacts/contactAdder")
, p = e("jSkype/modelHelpers/personsRegistry/instance")
, d = e("jSkype/modelHelpers/personsAndGroupsHelper")
, v = e("jSkype/services/internalPubSub");
t.build = function() {
var e = p.build();
return new m(e)
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactList", ["require", "exports", "module", "lodash-compat", "constants/common", "constants/people", "jSkype/constants/data", "jSkype/client", "jSkype/constants/people", "jSkype/modelHelpers/contacts/dataProcessors/contactList", "jSkype/settings", "utils/common/cache/instance", "browser/window", "jSkype/services/serviceFactory"], function(e, t) {
function p(e) {
function d(e, t) {
var n = e.reduce(function(e, t) {
return t.authorized && (e.authorized += 1),
!t.authorized && !t.suggested && (e.pendingOutgoing += 1),
!t.authorized && t.suggested && (e.suggested += 1),
e
}, {
authorized: 0,
pendingOutgoing: 0,
suggested: 0
});
o.get()._telemetryManager.sendEvent(f.settings.telemetry.jSkypeTenantToken, r.telemetry.contacts.type.CONTACTS, {
contactsCount: e.length,
name: t,
authorizedCount: n.authorized,
pendingOutgoingCount: n.pendingOutgoing,
suggestedCount: n.suggested
}),
o.get()._telemetry.eventBus.publish(r.events.contacts.CONTACTS_LOADED, {
contactsCount: e.length
})
}
function v(e) {
var t = r.telemetry.contacts.name;
g(e.scope) === i.scopes.FULL ? p(e.contacts, t.GET_CONTACT_LIST) : d(e.contacts, t.GET_CONTACT_LIST_DELTA)
}
function m() {
var e = o.get().personsAndGroupsManager.mePerson.id();
h.getContactsService().getMyContacts(e).then(t.onSuccess, t.onError),
a = undefined
}
function g(e) {
return n.isString(e) ? e.toLowerCase() : ""
}
var t = this, a, p = n.once(d);
t.onSuccess = function(t) {
var n = e.process(t.response);
return t.response && t.response.contacts && v(t.response),
n.then(function(e) {
if (f.isFeatureOn(r.featureFlags.CONTACT_PROFILE_CACHE) && e) {
var t = e.getResponseHeader("ETag");
t && l.get().setItem(s.ETAG, t)
}
}
.bind(null , t.request))
}
,
t.onError = function(e) {
return e.status === 404 && !a && (o.get().personsAndGroupsManager._initialized(!0),
a = c.setTimeout(m, u)),
Promise.reject(e)
}
}
var n = e("lodash-compat")
, r = e("constants/common")
, i = e("constants/people")
, s = e("jSkype/constants/data").storageKeys
, o = e("jSkype/client")
, u = e("jSkype/constants/people").contactList.retry.TIMEOUT
, a = e("jSkype/modelHelpers/contacts/dataProcessors/contactList")
, f = e("jSkype/settings")
, l = e("utils/common/cache/instance")
, c = e("browser/window")
, h = e("jSkype/services/serviceFactory");
t.build = function() {
var e = a.build();
return new p(e)
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactBlocked", ["require", "exports", "module", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/client", "constants/common", "jSkype/settings"], function(e, t) {
function u() {
this.onSuccess = function(e) {
var t = n.getPerson(e);
r.build().setBlocked(t),
a()
}
,
this.onError = function(e) {}
}
function a() {
var e = {
name: s.telemetry.contacts.name.CONTACT_BLOCKED
};
i.get()._telemetryManager.sendEvent(o.settings.telemetry.jSkypeTenantToken, s.telemetry.contacts.type.CONTACTS, e)
}
var n = e("jSkype/modelHelpers/personsAndGroupsHelper")
, r = e("jSkype/modelHelpers/contacts/authorizationChange")
, i = e("jSkype/client")
, s = e("constants/common")
, o = e("jSkype/settings");
t.build = function() {
return new u
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactUnblocked", ["require", "exports", "module", "jSkype/modelHelpers/personsAndGroupsHelper", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/client", "jSkype/settings", "constants/common"], function(e, t) {
function u() {
this.onSuccess = function(e) {
var t = n.getPerson(e);
r.build().setUnblocked(t),
a()
}
,
this.onError = function(e) {}
}
function a() {
var e = {
name: o.telemetry.contacts.name.CONTACT_UNBLOCKED
};
i.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, o.telemetry.contacts.type.CONTACTS, e)
}
var n = e("jSkype/modelHelpers/personsAndGroupsHelper")
, r = e("jSkype/modelHelpers/contacts/authorizationChange")
, i = e("jSkype/client")
, s = e("jSkype/settings")
, o = e("constants/common");
t.build = function() {
return new u
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactDeleted", ["require", "exports", "module", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/constants/people", "jSkype/client", "jSkype/settings", "constants/common", "jSkype/modelHelpers/presence/presenceDataStorage"], function(e, t) {
function a() {
this.onSuccess = function(e) {
u.getCache().remove(e.id()),
n.build().setAuthorization(e, r.UNAUTHORIZED),
f()
}
,
this.onError = function(e) {}
}
function f() {
var e = {
name: o.telemetry.contacts.name.CONTACT_DELETED
};
i.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, o.telemetry.contacts.type.CONTACTS, e)
}
var n = e("jSkype/modelHelpers/contacts/authorizationChange")
, r = e("jSkype/constants/people").authorizationStates
, i = e("jSkype/client")
, s = e("jSkype/settings")
, o = e("constants/common")
, u = e("jSkype/modelHelpers/presence/presenceDataStorage");
t.build = function() {
return new a
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactRequestAccepted", ["require", "exports", "module", "constants/common", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/constants/people", "jSkype/settings", "jSkype/client"], function(e, t) {
function u() {
this.onSuccess = function(e) {
r.build().setAuthorization(e, i.AUTHORIZED),
a(e)
}
,
this.onError = function(e) {}
}
function a(e) {
var t = {
name: n.telemetry.contacts.name.CONTACT_REQUEST_ACCEPTED,
user_from: [e.id(), window.skypeTelemetryManager.PIIType.Identity]
};
o.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, n.telemetry.contacts.type.CONTACT_REQUESTS, t)
}
var n = e("constants/common")
, r = e("jSkype/modelHelpers/contacts/authorizationChange")
, i = e("jSkype/constants/people").authorizationStates
, s = e("jSkype/settings")
, o = e("jSkype/client");
t.build = function() {
return new u
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactRequestDeclined", ["require", "exports", "module", "constants/common", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/constants/people", "jSkype/settings", "jSkype/client"], function(e, t) {
function u() {
this.onSuccess = function(e) {
r.build().setAuthorization(e, i.UNAUTHORIZED),
a(e)
}
,
this.onError = function(e) {}
}
function a(e) {
var t = {
name: n.telemetry.contacts.name.CONTACT_REQUEST_DECLINED,
user_from: [e.id(), window.skypeTelemetryManager.PIIType.Identity]
};
o.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, n.telemetry.contacts.type.CONTACT_REQUESTS, t)
}
var n = e("constants/common")
, r = e("jSkype/modelHelpers/contacts/authorizationChange")
, i = e("jSkype/constants/people").authorizationStates
, s = e("jSkype/settings")
, o = e("jSkype/client");
t.build = function() {
return new u
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactRequestSent", ["require", "exports", "module", "jSkype/client", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/constants/people", "jSkype/settings", "constants/common", "jSkype/modelHelpers/contacts/contactMessageFactory"], function(e, t) {
function a() {
this.onSuccess = function(e) {
var t = r.build(), a, f = n.get().conversationsManager.getConversation(e), l = {
name: o.telemetry.contacts.name.ADD_CONTACT
};
if (e.isAgent())
t.setAuthorization(e, i.AUTHORIZED),
l.isResend = !1,
l.suggested = !1,
l.isAgent = !0;
else if (e._authorization() === i.PENDING_OUTGOING)
a = u.getOutgoingResend(e),
f.historyService._processRawMessage(a),
l.isResend = !0,
l.suggested = !1,
l.isAgent = !1;
else {
var c = e._authorization() === i.SUGGESTED;
t.setAuthorization(e, i.PENDING_OUTGOING),
l.isResend = !1,
l.suggested = c,
l.isAgent = !1
}
n.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, o.telemetry.contacts.type.CONTACT_REQUESTS, l)
}
,
this.onError = function(e, t) {
t && t.isAgent() && n.get()._telemetryManager.sendEvent(s.settings.telemetry.jSkypeTenantToken, "ServiceFault", {
serviceName: "agents-addToContacts",
faultCode: e.status,
faultContext: o.telemetry.NOT_AVAILABLE,
errorCode: e.status || o.telemetry.NOT_AVAILABLE,
errorMessage: e.responseText || o.telemetry.NOT_AVAILABLE,
verb: "PUT",
host: s.settings.agentProvisioningService.host
})
}
}
var n = e("jSkype/client")
, r = e("jSkype/modelHelpers/contacts/authorizationChange")
, i = e("jSkype/constants/people").authorizationStates
, s = e("jSkype/settings")
, o = e("constants/common")
, u = e("jSkype/modelHelpers/contacts/contactMessageFactory");
t.build = function() {
return new a
}
}),
define("jSkype/modelHelpers/contacts/dataProcessors/contactRequests", ["require", "exports", "module", "jSkype/client", "jSkype/constants/people", "cafe/enums", "jSkype/modelHelpers/contacts/contactActivityItemHelper", "jSkype/modelHelpers/contacts/contactMessageFactory", "utils/chat/messageSanitizer", "constants/common", "jSkype/settings", "jSkype/modelHelpers/personsRegistry/instance", "jSkype/models/person"], function(e, t) {
function h() {
this.process = function(e) {
var t = n.get().conversationsManager;
t._conversationsSynced.promise.then(function() {
function a(e) {
var t = n.get(e);
return t ? t._authorization._set(r.PENDING_INCOMING) : (t = new c(e),
t._authorization._set(r.PENDING_INCOMING),
n.add(t)),
t
}
var n = l.build();
e.forEach(function(e) {
var n, r, f, l, c, h, d = a(e.sender);
n = t.getConversation(d),
t.conversations.add(n),
c = s.getContactRequestIncomingActivityItem(n),
r = (new Date(e.event_time_iso)).getTime();
if (!c || c._id !== r)
d.status._set(i.onlineStatus.Unknown),
s.clearContactRequestActivityItems(n),
f = u.escapeIncomingHTML(u.removeAnchorTags(e.greeting)),
l = o.getIncoming(d, r, f),
h = s.getContactRequestIncomingInviteFreeActivityItem(n),
p() && !h && n.historyService._processRawMessage(o.getIncomingInviteFree(d, r)),
n.historyService._processRawMessage(l)
})
})
}
}
function p() {
return f.isFeatureOn(a.featureFlags.INVITE_FREE_IMPLICIT_INCOMING_CONTACT_REQUEST)
}
var n = e("jSkype/client")
, r = e("jSkype/constants/people").authorizationStates
, i = e("cafe/enums")
, s = e("jSkype/modelHelpers/contacts/contactActivityItemHelper")
, o = e("jSkype/modelHelpers/contacts/contactMessageFactory")
, u = e("utils/chat/messageSanitizer")
, a = e("constants/common")
, f = e("jSkype/settings")
, l = e("jSkype/modelHelpers/personsRegistry/instance")
, c = e("jSkype/models/person");
t.build = function() {
return new h
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/contactRequestsIncoming", ["require", "exports", "module", "jSkype/modelHelpers/contacts/dataProcessors/contactRequests"], function(e, t) {
function r(e) {
this.onSuccess = function(t) {
t.response && e.process(t.response)
}
,
this.onError = function(e) {}
}
var n = e("jSkype/modelHelpers/contacts/dataProcessors/contactRequests");
t.build = function() {
var e = n.build();
return new r(e)
}
}),
define("jSkype/modelHelpers/contacts/dataHandlers/factory", ["require", "exports", "module", "jSkype/modelHelpers/contacts/dataHandlers/meProfile", "jSkype/modelHelpers/contacts/dataHandlers/userInfo", "jSkype/modelHelpers/contacts/dataHandlers/peopleSettings", "jSkype/modelHelpers/contacts/dataHandlers/ABCHProfileService", "jSkype/modelHelpers/contacts/dataHandlers/phoneUpdate", "jSkype/modelHelpers/contacts/dataHandlers/batchProfiles", "jSkype/modelHelpers/contacts/dataHandlers/contactList", "jSkype/modelHelpers/contacts/dataHandlers/contactBlocked", "jSkype/modelHelpers/contacts/dataHandlers/contactUnblocked", "jSkype/modelHelpers/contacts/dataHandlers/contactDeleted", "jSkype/modelHelpers/contacts/dataHandlers/contactRequestAccepted", "jSkype/modelHelpers/contacts/dataHandlers/contactRequestDeclined", "jSkype/modelHelpers/contacts/dataHandlers/contactRequestSent", "jSkype/modelHelpers/contacts/dataHandlers/contactRequestsIncoming"], function(e, t) {
var n = {
meProfile: e("jSkype/modelHelpers/contacts/dataHandlers/meProfile"),
userInfo: e("jSkype/modelHelpers/contacts/dataHandlers/userInfo"),
peopleSettings: e("jSkype/modelHelpers/contacts/dataHandlers/peopleSettings"),
ABCHProfileService: e("jSkype/modelHelpers/contacts/dataHandlers/ABCHProfileService"),
phoneUpdate: e("jSkype/modelHelpers/contacts/dataHandlers/phoneUpdate"),
batchProfiles: e("jSkype/modelHelpers/contacts/dataHandlers/batchProfiles"),
contactList: e("jSkype/modelHelpers/contacts/dataHandlers/contactList"),
contactBlocked: e("jSkype/modelHelpers/contacts/dataHandlers/contactBlocked"),
contactUnblocked: e("jSkype/modelHelpers/contacts/dataHandlers/contactUnblocked"),
contactDeleted: e("jSkype/modelHelpers/contacts/dataHandlers/contactDeleted"),
contactRequestAccepted: e("jSkype/modelHelpers/contacts/dataHandlers/contactRequestAccepted"),
contactRequestDeclined: e("jSkype/modelHelpers/contacts/dataHandlers/contactRequestDeclined"),
contactRequestSent: e("jSkype/modelHelpers/contacts/dataHandlers/contactRequestSent"),
contactRequestsIncoming: e("jSkype/modelHelpers/contacts/dataHandlers/contactRequestsIncoming")
};
t.getMeProfileHandlers = function() {
return n.meProfile.build()
}
,
t.getUserInfoHandlers = function() {
return n.userInfo.build()
}
,
t.getPeopleSettingsHandlers = function() {
return n.peopleSettings.build()
}
,
t.getABCHProfileServiceHandlers = function() {
return n.ABCHProfileService.build()
}
,
t.getProfilePhoneNumberUpdateHandlers = function() {
return n.phoneUpdate.build()
}
,
t.getBatchProfileHandlers = function() {
return n.batchProfiles.build()
}
,
t.getContactListHandlers = function() {
return n.contactList.build()
}
,
t.getContactBlockedHandlers = function() {
return n.contactBlocked.build()
}
,
t.getContactUnblockedHandlers = function() {
return n.contactUnblocked.build()
}
,
t.getContactDeletedHandlers = function() {
return n.contactDeleted.build()
}
,
t.getContactRequestAcceptedHandlers = function() {
return n.contactRequestAccepted.build()
}
,
t.getContactRequestDeclinedHandlers = function() {
return n.contactRequestDeclined.build()
}
,
t.getContactRequestSentHandlers = function() {
return n.contactRequestSent.build()
}
,
t.getContactRequestsIncomingHandlers = function() {
return n.contactRequestsIncoming.build()
}
}),
define("jSkype/modelHelpers/personsRegistry/registry", ["require", "jSkype/utils/batch", "jSkype/constants/people", "jSkype/modelHelpers/contacts/dataHandlers/factory", "jSkype/services/serviceFactory", "jSkype/modelHelpers/contacts/dataMappers/dataMaps", "jSkype/modelHelpers/contacts/dataProcessors/agents"], function(e) {
function a() {
function l(e) {
i.getStratusService().getProfiles(e).then(f.onSuccess, f.onError)
}
function c(e, t) {
return e !== n.SELF && (t === u.UNAUTHORIZED || t === u.PENDING_INCOMING)
}
var e = {}
, a = t.create(l)
, f = r.getBatchProfileHandlers();
this.defaultPersonAuthorization = u.UNKNOWN,
this.get = function(t) {
return e[t]
}
,
this.add = function(t, n) {
var r = t.id();
e[r] = t,
!n && c(r, t._authorization()) && (t._type() === s.contactTypes[s.contactTypeNames.agent] ? o.build().process([t]) : a.add(r))
}
,
this.filter = function(e) {
return this.toArray().filter(e)
}
,
this.toArray = function() {
var t = [];
return Object.keys(e).forEach(function(n) {
var r = e[n];
t.push(r)
}),
t
}
,
this.dispose = function() {
a.clear()
}
}
var t = e("jSkype/utils/batch")
, n = e("jSkype/constants/people")
, r = e("jSkype/modelHelpers/contacts/dataHandlers/factory")
, i = e("jSkype/services/serviceFactory")
, s = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps")
, o = e("jSkype/modelHelpers/contacts/dataProcessors/agents")
, u = n.authorizationStates;
return a
}),
define("jSkype/modelHelpers/personsRegistry/instance", ["require", "exports", "module", "jSkype/modelHelpers/personsRegistry/registry"], function(e, t) {
var n = e("jSkype/modelHelpers/personsRegistry/registry"), r;
t.reset = function() {
r && (r.dispose(),
r = null )
}
,
t.build = function() {
return r || (r = new n),
r
}
}),
define("jSkype/modelHelpers/personsAndGroupsHelper", ["require", "exports", "module", "lodash-compat", "browser/window", "cafe/enums", "cafe/applicationInstance", "jcafe-property-model", "jSkype/models/person", "jSkype/models/phoneNumber", "jSkype/modelHelpers/personsRegistry/instance", "jSkype/constants/people", "jSkype/modelHelpers/contacts/authorizationChange", "jSkype/modelHelpers/personHelper", "jSkype/modelHelpers/contacts/dataMappers/dataMaps"], function(e, t) {
function d(e, n) {
var r = f.build()
, i = r.get(e);
return i || (i = new u(e),
i._authorization._set(r.defaultPersonAuthorization),
y(i, n),
i.status._set(t.getDefaultPresence(i, i._authorization())),
b(i),
r.add(i)),
i
}
function v(e, t) {
for (var n in e)
e.hasOwnProperty(n) && o.isProperty(e[n]) && e[n]._set(t[n]);
return e
}
function m(e, t) {
var r = e.phoneNumbers(0);
n.forEach(t, function(t) {
if (r && r.telUri() === t.telUri)
v(r, t);
else {
var n = new a;
v(n, t),
e.phoneNumbers.add(n, t.telUri)
}
})
}
function g(e) {
function r(e, t, r) {
var i = o.isProperty(t)
, s = !i && o.isCollection(t)
, u = i || s ? t() : t;
i && !n.isUndefined(u) ? r[e] = u : s && (r[e] = u.reduce(function(e, t) {
return e.concat(g(t))
}, []))
}
var t = {};
return n.forIn(e, function(e, n) {
r(n, e, t)
}),
t
}
function y(e, t) {
e._type._set(t),
t === p.contactTypes[p.contactTypeNames.agent] && e.isAgent._set(!0)
}
function b(e) {
(h.isPstn(e) || h.isEchoContact(e)) && e.capabilities.video._set(!1),
h.isPstn(e) && e.capabilities.chat._set(!1)
}
var n = e("lodash-compat")
, r = e("browser/window")
, i = e("cafe/enums")
, s = e("cafe/applicationInstance")
, o = e("jcafe-property-model")
, u = e("jSkype/models/person")
, a = e("jSkype/models/phoneNumber")
, f = e("jSkype/modelHelpers/personsRegistry/instance")
, l = e("jSkype/constants/people").authorizationStates
, c = e("jSkype/modelHelpers/contacts/authorizationChange")
, h = e("jSkype/modelHelpers/personHelper")
, p = e("jSkype/modelHelpers/contacts/dataMappers/dataMaps");
t.getPersonById = function(e) {
var t = f.build();
return t.get(e)
}
,
t.isMePerson = function(e) {
var t = s.get().personsAndGroupsManager.mePerson
, n = h.getId(e);
return t.id() === n || t._msaId && t._msaId() === n
}
,
t.isKnownPerson = function(e) {
return !!e && !!s.get().personsAndGroupsManager.all.persons(e.id())
}
,
t.createDefaultPerson = function(e) {
var t = new u(e);
return t._authorization._set(l.UNAUTHORIZED),
t
}
,
t.createPersonFromRawData = function(e) {
var n = v(t.getPerson(e.id, e._type), e)
, r = c.build().updateGroups;
return v(n.note, e.note),
v(n.location, e.location),
v(n.capabilities, e.capabilities),
v(n.agentDetails, e.agentDetails),
m(n, e.phoneNumbers),
r(n),
n
}
,
t.createRawDataFromPerson = function(e) {
var t = g(e);
return t.note = g(e.note),
t.location = g(e.location),
t.capabilities = g(e.capabilities),
t.agentDetails = g(e.agentDetails),
t
}
,
t.getUnknownPerson = function(e) {
var n, r = t.getPersonById(e);
return !t.isMePerson(e) && !t.isKnownPerson(r) && (n = r || t.createDefaultPerson(e)),
n
}
,
t.getBlockedGroup = function() {
var e = s.get().personsAndGroupsManager.all;
return e.groups().filter(function(e) {
return e.relationshipLevel() === i.groupPrivacyRelationshipLevel.Blocked
})[0]
}
,
t.getPerson = function(e, n) {
return t.isMePerson(e) ? s.get().personsAndGroupsManager.mePerson : d(e, n)
}
,
t.getPersonByConversationId = function(e) {
var t = h.getId(e)
, n = h.getTypeFromKey(e);
return d(t, n)
}
,
t.extractSkypeIdFromToken = function(e) {
return JSON.parse(r.atob(e.split(".")[1])).skypeid
}
,
t.extractCIDFromToken = function(e) {
return JSON.parse(r.atob(e.split(".")[1])).cid
}
,
t.getDefaultPresence = function(e, t) {
if (t === l.AUTHORIZED && (e.isAgent() || h.isEchoContact(e)))
return i.onlineStatus.Online;
if (t === l.PENDING_INCOMING)
return i.onlineStatus.Unknown;
if (t === l.AUTHORIZED && !h.isPstn(e))
return i.onlineStatus.Offline
}
}),
define("experience/defaultInitParams", [], function() {
return {
apiKey: "<REQUIRED>",
correlationIds: {
experienceId: "",
hostProperty: "",
sessionId: "",
tabId: "",
userAppId: "",
userId: ""
},
fingerprint: "",
locale: "en-us",
variant: "swx",
jsonp: !0
}
}),
define("experience/settings", ["require", "experience/defaultInitParams"], function(e) {
var t = e("experience/defaultInitParams")
, n = {
enabled: !0,
limit: 3,
delay: 1e3,
strategy: "fixed"
}
, r = {
version: "1.37.123",
biAppName: "swx-local",
biClientName: "Web",
platformId: "908",
productName: "SWX",
API: {
version: 1,
exposeCafe: !1
},
ecsHosts: ["https://a.config.skype.com", "https://b.config.skype.com"],
ecsSpacesKey: "swg",
ecsPesKey: "SkypePersonalization",
ecsTrapKey: "MDN_TRAP",
ecsClientCobrandTag: "0",
webApiServiceHost: "https://client-s.gateway.messenger.live.com",
amdServiceHost: "https://api.asm.skype.com",
assetsServiceHost: "https://apps.skypeassets.com/rates/skypeout",
urlPServiceHost: "https://urlp.asm.skype.com",
xmmFallbackUrl: "https://login.skype.com/login/sso",
keyEncryptionServiceHost: "https://kes.skype.com/v1/swx",
locationHost: "https://www.bing.com/maps",
feedbackPageUrl: "https://feedback.skype.com",
pollFallbackUrl: "https://login.skype.com/login/sso?go=webclient",
meProfileUrl: "https://go.skype.com/myaccount?intsrc=client-_-webapp-_-production-_-go-myaccount",
isVideoMessagesDisabled: !1,
listParticipantNamesInConversationTopic: !0,
isPollingEnabled: !0,
maximumParticipantsAudio: 25,
maximumParticipantsVideo: 10,
mentionsTreshold: 4,
startConversationMaxParticipantCount: 0,
youtubeWrapDelay: 500,
youtubeApiUrl: "https://www.youtube.com/iframe_api",
mapsApiUrl: "https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0",
flagsApiUrl: "https://flagsapi.skype.com/flags/v1",
calendarUrl: "https://outlook.live.com/owa/?path=/calendar/action/compose&",
legacyCalendarUrl: "https://calendar.live.com/?rru=addevent&",
webLoginUrl: "https://login.skype.com/login",
webLoginClientId: "680081",
cookiesPrivacyUrl: "https://go.skype.com/privacy/",
application: {
endpointId: "d97583cc-9781-4a59-9628-06c4e609c65b"
},
shellApp: {
contactPollingInterval: 15e3,
chromeExtensionId: "blakpkgjpemejpbmfiglncklihnhjkij",
chromeExtensionWebstoreUrl: "https://chrome.google.com/webstore/detail/blakpkgjpemejpbmfiglncklihnhjkij",
bootstrapperUrl: "https://swx.cdn.skype.com/shared/v/1.2.9/SkypeBootstrap.min.js",
indexPageUrl: undefined,
connectShellAppHostRetries: 2
},
images: {
skypeLogo: "https://swx.cdn.skype.com/assets/skype_logo_white.png"
},
uicServiceUrl: {
byPassword: "https://rtc-uic.cloudapp.net/v0/getuic-jsonp",
bySkypeToken: "https://uic.login.skype.com/login/uic"
},
autoCalling: {
waitTimeOut: 6e3,
callTimeout: 12e4,
serviceFailureTimeout: 3e3
},
cqf: {
skypeCallPercentage: 10,
groupCallPercentage: 10,
pstnCallPercentage: 10,
minimumCallLength: 5e3
},
agentProvisioningService: {
host: "https://api.aps.skype.com/v1/"
},
stratusService: {
avatarUrl: "users/${contactId}/profile/avatar?cacheHeaders=1",
avatarUpdateUrl: "users/${contactId}/profile/avatar",
blockContactEndpoint: "users/self/contacts/${contactId}/block",
contactRequestEndpoint: "users/self/contacts/auth-request",
contactRequestTimeInterval: 6e4,
contactsEndpoint: "users/self/authorized-contacts",
directorySearchEndpointSkypeOnly: "search/users/any?keyWord=${keyword}&contactTypes[]=skype",
directorySearchEndpoint: "search/users/any?keyWord=${keyword}",
directorySearchByIdEndpoint: "search/users?skypename=${skypeName}",
firstContactRequestDelay: 1e4,
host: "https://api.skype.com/",
myContactsEndpoint: "users/self/contacts?hideDetails=true",
profileEndpoint: "users/self/profile",
profilesEndpoint: "users/self/contacts/profiles",
batchProfilesEndpoint: "users/batch/profiles",
userInfoEndpoint: "users/self",
unblockContactEndpoint: "users/self/contacts/${contactId}/unblock",
deleteContactEndpoint: "users/self/contacts/${contactId}",
retry: n
},
contactsProxyService: {
deleteContactEndpoint: "contacts/${version}/users/${id}/contacts/${contactType}/${contactId}",
host: "https://contacts.skype.com/",
myContactsEndpoint: "contacts/${version}/users/${id}/contacts?$filter=type eq 'skype' or type eq 'msn' or type eq 'pstn' or type eq 'agent' or type eq 'lync'&reason=${reason}",
myDeltaContactsEndpoint: "contacts/${version}/users/${id}/contacts?delta&$filter=type eq 'skype' or type eq 'msn' or type eq 'pstn' or type eq 'agent' or type eq 'lync'&reason=${reason}",
retry: n
},
entitlementService: {
host: "https://consumer.entitlement.skype.com/",
listingEndpoint: "/users/${username}/services",
serviceEndpoint: "/users/${username}/services/${service}",
retry: n
},
peopleService: {
appId: "5c7a1e34-3a23-4a36-b2e6-7aa15be85f07",
host: "https://people.directory.live-int.com/",
settingsEndpoint: "people/account/settings"
},
profileService: {
appId: "5c7a1e34-3a23-4a36-b2e6-7aa15be85f07",
host: "https://pf.directory.live-int.com/",
profileEndpoint: "profile/mine/System.ShortCircuitProfile.json"
},
pnvService: {
host: "https://a.qalogin.skype.net/",
pnvEndpoint: "shortcircuit/phonenumberverification",
finishEndpoint: "finish",
clientId: "580081"
},
commerce: {
purchaseCreditUrl: "https://go.skype.com/store.buy.skypecredit",
purchaseSubscriptionUrl: "https://go.skype.com/rates"
},
userOptionsService: {
host: "https://api.skype.com",
optionsEndpoint: "/users/${userId}/options/${optionName}"
},
messageSearchService: {
host: "https://scsquerycontroltower.cloudapp.net/",
endpoints: {
query: "v1/query"
}
},
controls: {
sidebar: "Sidebar",
content: "Content",
me: "Me"
},
plugin: {
pingHeartBeatTimeout: 5e3,
loadDelayMilisec: 250,
maxTotalLoadDelayMilisec: 6e5,
manifestKey: "SkypePluginManifestProd",
ecsService: "prod",
download: {
msi: "https://swx.cdn.skype.com/plugin/SkypeWebPlugin.msi",
pkg: "https://swx.cdn.skype.com/plugin/SkypeWebPlugin.pkg",
minversion: "1.37.123",
maxversion: "1.37.123"
}
},
pluginless: {
conversationServiceUrl: "https://api.conv.skype.com/conv/",
mediaAgent: {
numVideoChannelsGvc: 10,
renegotiationAttempts: 3
},
allowedEdgeVersion: {
lowerBound: 13,
upperBound: 13
}
},
featureFlags: {
agentsDiscoverable: !1,
agentsEnabled: !1,
showAgentIdOnProfile: !1,
showAgentRatingOnProfile: !1,
newChat: !1,
pinningToDogfoodCloud: !1,
pluginAutoUpdate: !1,
resizeCallAndChat: !1,
calling: !0,
NGCalling: !1,
GVCEscalation: !1,
GVCLocalEscalation: !1,
GVCJoining: !1,
GVCOutgoing: !1,
PSTN: !1,
CQF: !1,
creditBalanceAutoUpdateEnabled: !1,
persistentPlugin: !1,
persistentShellApp: !1,
contactListChangeNotification: !1,
deactivateCache: !1,
preloadPlugin: !1,
preloadShellApp: !1,
skypeDirectorySearch: !1,
muteNotifications: !1,
muteNotificationsWithClosedSidebar: !1,
notifyHostEvenWhenMeNotAvailable: !1,
newConversationV2: !1,
spaces: !1,
lastSeen: !1,
mobileIndicator: !1,
mobileActive: !1,
hasBetaLabel: !1,
hasFeedbackLink: !1,
hasFeedbackLinkOnError: !1,
hasFeedbackIcon: !1,
hasTimelineBadge: !1,
showContactsPageHint: !1,
showContactsPageInformationalMessage: !1,
contactProfile: !1,
deleteContactUsingContactsService: !1,
includeSelfInParticipantsCount: !1,
showAlternateShareDialogExperience: !1,
pluginlessCallingFirefox: !1,
pluginlessCallingChrome: !1,
pluginlessCallingEdge: !1,
pluginlessCallingElectron: !1,
pluginlessCallingChromeLinux: !1,
silentLinking: !1,
autoCalling: !1,
showDefaultAvatarInNotifications: !1,
showSearchQueryMoreResultsAvailable: !1,
contactProfileCache: !1,
directorySearchSkypeAndLync: !1,
presenceDataCache: !1,
newSelfPresence: !1,
batchProfilesV2: !1,
contactPageFilterTabs: !1,
doNotSendContactsToChatService: !1,
supportStandbyMode: !1,
disablePollingOnKahuna: !1,
swiftCardCommand: !1,
swiftCardRendering: !1,
reAuthEnabled: !1,
hideSidebarOnStart: !1,
messageEnforceTextFormat: !1,
useBusinessWording: !1,
removeConversationHistory: !1,
showContactsPageSignIn: !1,
hideConversationHeader: !1,
headerControlsDisabled: !1,
singleConversationMode: !1,
skipChatCapabilityCheck: !1,
disablePersistentContactPresenceSubscription: !1,
enableContactManagement: !1,
issueReporting: !1,
callInfoCommand: !1,
serviceFailureReporting: !1,
skypeDataTelemetry: !1,
shellAppLogs: !1,
consoleLogging: !1,
errorLogReporting: !1,
enableUnreadMessagesLogging: !1,
contextMenuQuoteMessagesEnabled: !1,
contextMenuSaveVideoMessagesEnabled: !1,
alternativeSidebarLayout: !1,
userSettingsEnabled: !1,
showUnlistedSettings: !1,
skypeCallPolicySupport: !1,
skypeVideoCallingPolicySupport: !1,
spaceTopicEditor: !1,
inviteFree: !1,
inviteFreeImplicitIncomingContactRequest: !1,
shortCircuit: !1,
pesCDNAuthUrlFallbackEnabled: !1,
pesFetchSmallAssetsOnDemand: !1,
pesFetchMediumAssetsOnDemand: !1,
pesFetchLargeAssetsOnDemand: !1,
pesFetchMojiAssetsOnDemand: !1,
pesCDNAuthEnabled: !1,
pesUseExtraLargeEmoticons: !1,
hideEmoticonPickerButton: !1,
pesBingImageSearchEnabled: !1,
pesLocalSearchEnabled: !1,
pesV2Enabled: !1,
emoticonSuggestionEnabled: !1,
emoticonImplicitSuggestionDisabled: !1,
suggestHiddenEmoticons: !1,
pesStoreEnabled: !1,
urlPreviews: !1,
youtubePlayer: !1,
urlPreviewLoadYoutubePlayer: !1,
incomingScreenSharing: !1,
incomingWikiMarkup: !1,
isCloudVideoMessageEnabled: !1,
isFlikMessageEnabled: !1,
newUrlPreviewDomainEnabled: !1,
contactCardRenderingEnabled: !1,
sendContactCardEnabled: !1,
aggressiveImplicitMentionsMatching: !1,
enableAggressiveMentionsToast: !1,
mentionsEnabled: !1,
notificationsCenter: !1,
supportMessageProperties: !1,
enablePingEcsConfig: !0,
enableEndpointEcsConfig: !0,
heartsEnabled: !1,
heartsNotificationEnabled: !1,
pollsEnabled: !1,
translatorSendingEnabled: !1,
photoSharingEnabled: !1,
fileTransferEnabled: !1,
mediaBarEnabled: !1,
fileDragDropEnabled: !1,
filePasteEnabled: !1,
showMessageDeliveryIndicator: !1,
showMessageDeliveryStatus: !1,
readReceiptEnabled: !1,
isTypingIndicator: !1,
showWhenIamTyping: !1,
creditGifting: !1,
failInitializationOnIE: !1,
searchEducationBubble: !1,
callEducationBubble: !1,
chatEducationBubble: !1,
scheduleCallEducationBubble1: !1,
scheduleCallEducationBubble2: !1,
scheduleCallFromConversation: !1,
useLegacySchedulerUriFormat: !1,
welcomeDialog: !1,
useAzureBasedSilentLogin: !1,
enableRawEmoticonsRendering: !1,
contentSearch: !1,
giphy: !1,
telemetrySearchEnabled: !1,
uiActionPerfTelemetryEnabled: !1,
runtimeErrorsTelemetryEnabled: !1
},
retry: n,
webApiService: {
retry: {
limit: 5,
delay: 100,
strategy: "exponential"
},
overrides: {
ping: {
strategy: "fixed"
}
},
pingDelayTime: {
min: 30,
max: 60
},
endpointRetry: {
base: 5,
limit: 120,
noiseFactor: 0
},
standbyPollingDelayTime: {
min: 30,
max: 30
}
},
giphy: {
apiKey: "dc6zaTOxFJmzC",
rating: "pg-13"
},
activeSpeaker: {
tickInterval: 100,
timeToPromote: 3e3,
timeToDemote: 3e3,
ticksToCancel: 3,
recentlySpokenTimeout: 2e4
},
conversationHistoryPageSize: 30,
incomingCalls: {
notificationTimeout: 3e4,
trouterServiceUrl: "https://go.trouter.io/v2/a",
tpcServiceUrl: "https://prod.tpc.skype.com/v1/policies",
registrarServiceUrl: "https://prod.registrar.skype.com/v2/registrations",
registrarTtlInSeconds: 3600,
registrarRefreshTimeoutInMs: 354e4,
trouterReadyTimeoutInMs: 2e4,
trouterConnectTimeoutInMs: 1e4,
maxRegistrationTimeInMs: 864e5,
pnhTemplate: "SkypeWeb_1.3",
pnhNGCTemplate: "SkypeWebNGC_1.3",
p2pToNgcNotificationTimeout: 2e3
},
telemetry: {
uiTenantToken: "bb15b8f2b7f446d4af2e245fc3b07e79-31d92fdb-e7a5-4be8-b14f-c48048f67a59-7685",
jSkypeTenantToken: "bb15b8f2b7f446d4af2e245fc3b07e79-31d92fdb-e7a5-4be8-b14f-c48048f67a59-7685",
skypeConcoreToken: "53fdaa090eb946b5a1d6cbdeb4f2ef66-bcbf6380-2590-41cc-ae60-9e467cd51835-7413",
mdscToken: "695e6c4def6c4847b178d16c83b926c4-51ac8017-8fbb-4069-9bf4-3e9cc75ebad8-7393",
logReportingToken: "695e6c4def6c4847b178d16c83b926c4-51ac8017-8fbb-4069-9bf4-3e9cc75ebad8-7393",
logThrottleInterval: 1e4,
issueReportUrl: "",
issueReportScript: "",
upnCorrelationIdEnabled: !1
},
serviceQosReporter: {
iterationCountBeforeFlushingQoSMetrics: 50
},
URLSanitizer: {
securedResources: {
allowedDomains: ["**.skypeassets.com", "**.skype.com"],
allowedProtocols: ["http", "https"]
}
},
initParams: t,
pesCDNAuthentication: {
skypeServiceHost: "static.asm.skype.com",
tokenSourceEndpoint: "/pes/v1/petoken",
cdnServiceHost: "static-asm.secure.skypeassets.com",
cookieSourceEndpoint: "/token/token_to_cookies",
securedPathsPattern: "static[.]asm[.]skype[.]com",
cdnTokenTtlMs: 3e5,
rewriteRules: [{
from: "static.asm.skype.com",
to: "static-asm.secure.skypeassets.com"
}, {
from: "api.asm.skype.com",
to: "static-asm.secure.skypeassets.com"
}]
},
pesSearchServices: {
bingApiKey: "aGt3dUhqZkFrbnZyU2doM1FqQ0RPQUdEUTFTbzNqc0FmYlFWMEFSSytMVTpoa3d1SGpmQWtudnJTZ2gzUWpDRE9BR0RRMVNvM2pzQWZiUVYwQVJLK0xV",
bingAuthMethod: "Basic",
bingServiceURL: "https://api.datamarket.azure.com/Bing/Search/v1/Image",
bingTriggerWords: ["bing", "meme", "gif"],
bingDefaultSearchTerm: "popular",
bingPickFirst: "gif",
bingMergeItems: !0,
bingBorderStyle: "thin",
localSearchCategories: ["Greetings", "Happy", "Love", "Angry", "Confused", "Disgust"],
localSearchGroupByType: !0
},
pesPicker: {
useSelectedTabIconForPicker: !1,
tabPlacementOverrides: {
bing: -1
}
},
pesStoreServices: {
catalogApiHost: "apps.skypeassets.com",
catalogServiceEndpoint: "/personal-expression?expansion=full&language=${lang}",
catalogItemByIdServiceEndpoint: "/offers/sticker-pack/skus/${offerId}",
catalogPurchaseEndpoint: "/purchase",
catalogDogfoodContentEnabled: !1,
catalogPurchaseApiHost: "api.skype.com"
},
splashScreen: {
learnMoreUrl: ""
},
authentication: {
anonymousMode: !1
},
messageFilters: {
outgoingMessageFilter: null ,
chatLogMessageFilter: null
},
xcoEnv: "qa",
translatorClientAppId: "FF63883DDDED40068EC45030A601460C",
translatorServiceURI: {
TRANSLATE: "https://dev.microsofttranslator.com/api/skype/translate",
LANGUAGES: "https://dev.microsofttranslator.com/api/languages"
},
userSettings: {
hiddenCategories: [],
hiddenPreferences: [],
privacySettingsFetchTimeout: 1e3
},
displayAppVersion: !1
};
return r
}),
define("browser/dom", ["require", "exports", "module", "lodash-compat", "browser/document", "browser/window"], function(e, t) {
function o(e) {
return Boolean(e && e.nodeType === 1)
}
function u(e) {
return !(!e || !n.isString(e.tagName) && !n.isString(e.nodeName))
}
function a(e, t) {
return n.isElement(e) ? e.tagName.toLowerCase() === t : !1
}
function f(e) {
return Boolean(e.offsetParent)
}
function l(e, t) {
while (e && !E(e, t))
e = e.parentNode;
return e
}
function c(e, t) {
while (e && !h(e, t))
e = e.parentNode;
return e
}
function h(e, t) {
var n = e.matches || e.webkitMatchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector;
return n ? n.call(e, t) : !1
}
function p(e) {
return n.isString(e) ? T(r.createElement(e)) : null
}
function d(e) {
return n.isString(e) ? T(r.querySelector(e)) : null
}
function v(e, t) {
return t = t || r,
n.isString(e) ? T(t.querySelector(e)) : u(e) ? T(e) : null
}
function m(e, n) {
return e ? t.getElement("#" + e, n) : null
}
function g(e, t, n) {
n ? S(e, t) : x(e, t)
}
function y(e, t) {
t = t || r;
var n = t.querySelectorAll(e);
return Array.prototype.slice.call(n, 0)
}
function b(e, t) {
return t ? e.previousSibling : e.nextSibling
}
function w(e) {
return y(['[tabindex]:not([tabindex=""]):not([tabindex="-1"]):not([disabled])'], e)
}
function E(e, t) {
if (e.classList)
return e.classList.contains(t);
var n = e.className ? e.className.split(" ") : [];
for (var r = 0; r < n.length; r++)
if (n[r] === t)
return !0;
return !1
}
function S(e, t) {
if (!n.isString(t))
return;
if (e.classList) {
e.classList.add(t);
return
}
var r = " " + e.className + " ";
r.indexOf(t) < 0 && (r += t + " "),
e.className = r.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
}
function x(e, t) {
if (e.classList) {
e.classList.remove(t);
return
}
e.className = e.className.replace(t, "").replace(/^\s\s*/, "").replace(/\s\s*$/, "")
}
function T(e) {
return e !== null && (e.removeClass = function(t) {
x(e, t)
}
,
e.addClass = function(t) {
S(e, t)
}
,
e.hasClass = function(t) {
return E(e, t)
}
,
e.setClass = function(t, n) {
g(e, t, n)
}
),
e
}
function N(e, t) {
var n, r = i.MutationObserver || i.WebKitMutationObserver;
return r ? (n = new r(function(e) {
e && e[0] && (e[0].addedNodes && e[0].addedNodes.length || e[0].removedNodes && e[0].removedNodes.length) && t()
}
),
n.observe(e, {
childList: !0,
subtree: !0
})) : e.addEventListener("DOMSubtreeModified", t, !1),
{
dispose: function() {
r ? n.disconnect() : e.removeEventListener("DOMSubtreeModified", t)
}
}
}
function C(e) {
var t = {
offsetLeft: 0,
offsetTop: 0
};
while (e)
t.offsetLeft += e.offsetLeft + e.clientLeft - e.scrollLeft,
t.offsetTop += e.offsetTop + e.clientTop - e.scrollTop,
e = e.offsetParent;
return t
}
function k(e, t) {
var n = e;
while (n && !n.contains(t))
n = n.parentNode;
return n
}
function L(e) {
var t = e.lastChild;
while (t && t.nodeType !== s)
t = t.previousSibling;
return t
}
function A() {
return r.hidden
}
var n = e("lodash-compat")
, r = e("browser/document")
, i = e("browser/window")
, s = 1;
t.createElement = p,
t.findElement = d,
t.isElement = o,
t.getElement = v,
t.getElementById = m,
t.getElements = y,
t.getSibling = b,
t.getNavigableChildren = w,
t.isA = a,
t.isVisible = f,
t.hasClass = E,
t.getParentWithClass = l,
t.getParentMatching = c,
t.addClass = S,
t.setClass = g,
t.removeClass = x,
t.extendObject = T,
t.createDomObserverSubscription = N,
t.getElementOffset = C,
t.findFirstCommonAncestor = k,
t.getLastChildElement = L,
t.isDocumentHidden = A
}),
define("ui/appOverlay/appOverlay", ["require", "exports", "module", "browser/document", "browser/dom", "constants/common", "services/serviceLocator"], function(e, t) {
function f() {
if (!o) {
var e, t = s.resolve(i.serviceLocator.CONTROLS_BUILDER);
t.registeredElements.length ? e = n.querySelector(t.registeredElements[0].element) : e = n.querySelector("body"),
o = e.parentNode
}
u = r.createElement("div"),
u.id = a,
o.appendChild(u)
}
function l() {
o.removeChild(n.querySelector("#" + a)),
u = null ,
o = undefined
}
var n = e("browser/document")
, r = e("browser/dom")
, i = e("constants/common")
, s = e("services/serviceLocator")
, o = null
, u = null
, a = "swx-app-overlay";
t.create = function(e) {
return u || f(),
e && e.content && u.appendChild(e.content),
e && e.className && u.classList.add(e.className),
u
}
,
t.destroy = function() {
l()
}
}),
function() {
typeof SKYPE == "undefined" && (window.SKYPE = {}),
SKYPE.linking = function() {
var e = {
pre: "https://a.prelogin.skype.net",
qa: "https://a.qalogin.skype.net",
dogfood: "https://dogfood.login.skype.com",
live: "https://a.login.skype.com"
}, t = "/linking", n = null , r, i = null , s = !1, o = "", u = !1, a = {}, f = {
env: "dogfood",
theme: "skype-blue",
client_id: null ,
redirect_uri: null ,
rps_token: null ,
setlang: null ,
welcome: !1,
createTechnical: !1,
microsoft: !0,
hidden: !1,
relink: !1,
site_name: null
}, l = function(e) {
var t = ["https://login.skype.com", "https://prelogin.skype.net", "https://qalogin.skype.net", "https://a.pre.lw.skype.net", "https://a.qa.lw.skype.net", "https://a.lw.skype.com", "https://a.prelogin.skype.net", "https://a.qalogin.skype.net", "https://a.login.skype.com"];
return t.push(i),
t.indexOf(e) !== -1
}
, c = function(e) {
var t;
if (!l(e.origin))
return;
var n = e.data;
if (typeof n == "string")
try {
n = JSON.parse(e.data)
} catch (r) {}
var i = n.state || null ;
if (o !== i)
return;
t = {};
for (var s in n)
n.hasOwnProperty(s) && (t[s] = n[s]);
m(t)
}
, h = function(e) {
return p(),
n = document.createElement("iframe"),
n.frameBorder = 0,
n.width = "100%",
n.height = "100%",
n.id = "linkingFrame" + Math.floor(Math.random() * 10 + 1),
n.style.backgroundColor = "#00AFF0",
a.hidden && (n.style.display = "none"),
n.setAttribute("src", e),
n
}
, p = function() {
n && (n.parentNode && n.parentNode.removeChild(n),
n = null )
}
, d = function() {
if (!a.client_id || !a.rps_token)
throw "[linking.js] client_id not initialized. Call init() first.";
if (a.createTechnical && a.welcome)
throw "[linking.js] cannot initialize both createTechnical and welcome flows at the same time.";
a.redirect_uri || (a.redirect_uri = window.location.protocol + "//" + window.location.host + window.location.pathname)
}
, v = function() {
return "postMessage" in window && typeof JSON == "object" && JSON.parse
}
, m = function(e) {
u = !1,
typeof r == "function" && r(e)
}
, g = function(e) {
var t = [];
for (var n in e)
e.hasOwnProperty(n) && t.push(encodeURIComponent(n) + "=" + encodeURIComponent(e[n]));
return t.join("&")
}
, y = function() {
var n, r = (new Date).getTime(), s;
return i = e[a.env] || e.dogfood,
o = "linkingsdk_" + r,
n = {
response_type: "postmessage",
client_id: a.client_id,
env: a.env,
theme: a.theme,
redirect_uri: a.redirect_uri,
state: o
},
a.microsoft && (n.partner = "999"),
a.setlang && (n.setlang = a.setlang),
a.relink && (n.scenario = "relink"),
a.createTechnical && (n.scenario = "silentCreateTechnical"),
a.welcome && (n.scenario = "welcome"),
a.site_name && (n.site_name = a.site_name),
s = g(n) + "#access_token=" + encodeURIComponent(a.rps_token),
i + t + "?" + s
}
, b = function() {
a = {},
r = null ,
s = !1,
o = "",
u = !1,
window.addEventListener ? window.removeEventListener("message", c) : window.detachEvent("onmessage", c),
p()
}
, w = function(e) {
b();
if (typeof e == "object") {
e = e || {},
e.hasOwnProperty("callback") && E(e.callback);
for (var t in f)
e.hasOwnProperty(t) ? a[t] = e[t] : a[t] = f[t]
}
return s || (s = !0,
window.addEventListener ? window.addEventListener("message", c) : window.attachEvent("onmessage", c)),
this
}
, E = function(e) {
return typeof e == "function" && (r = e),
this
}
, S = function() {
if (u)
return;
d(),
u = !0;
if (!v()) {
m({
error: "unsupported_browser"
});
return
}
return h(y())
}
, x = function(e) {
var t = S();
t && e.appendChild(t)
}
;
return {
init: w,
setCallback: E,
getIFrame: S,
load: x
}
}()
}(),
define("xcoLinking", function(e) {
return function() {
var t, n;
return t || e.SKYPE.linking
}
}(this));
var clienttelemetry_build;
(function(e) {
e.version = "2.4.0"
})(clienttelemetry_build || (clienttelemetry_build = {}));
var Microsoft;
(function(e) {
(function(e) {
(function(e) {
e[e.BT_STOP = 0] = "BT_STOP",
e[e.BT_STOP_BASE = 1] = "BT_STOP_BASE",
e[e.BT_BOOL = 2] = "BT_BOOL",
e[e.BT_UINT8 = 3] = "BT_UINT8",
e[e.BT_UINT16 = 4] = "BT_UINT16",
e[e.BT_UINT32 = 5] = "BT_UINT32",
e[e.BT_UINT64 = 6] = "BT_UINT64",
e[e.BT_FLOAT = 7] = "BT_FLOAT",
e[e.BT_DOUBLE = 8] = "BT_DOUBLE",
e[e.BT_STRING = 9] = "BT_STRING",
e[e.BT_STRUCT = 10] = "BT_STRUCT",
e[e.BT_LIST = 11] = "BT_LIST",
e[e.BT_SET = 12] = "BT_SET",
e[e.BT_MAP = 13] = "BT_MAP",
e[e.BT_INT8 = 14] = "BT_INT8",
e[e.BT_INT16 = 15] = "BT_INT16",
e[e.BT_INT32 = 16] = "BT_INT32",
e[e.BT_INT64 = 17] = "BT_INT64",
e[e.BT_WSTRING = 18] = "BT_WSTRING",
e[e.BT_UNAVAILABLE = 127] = "BT_UNAVAILABLE"
})(e.BondDataType || (e.BondDataType = {}));
var t = e.BondDataType;
(function(e) {
e[e.MARSHALED_PROTOCOL = 0] = "MARSHALED_PROTOCOL",
e[e.MAFIA_PROTOCOL = 17997] = "MAFIA_PROTOCOL",
e[e.COMPACT_PROTOCOL = 16963] = "COMPACT_PROTOCOL",
e[e.JSON_PROTOCOL = 21322] = "JSON_PROTOCOL",
e[e.PRETTY_JSON_PROTOCOL = 20554] = "PRETTY_JSON_PROTOCOL",
e[e.SIMPLE_PROTOCOL = 20563] = "SIMPLE_PROTOCOL"
})(e.ProtocolType || (e.ProtocolType = {}));
var n = e.ProtocolType
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var Microsoft;
(function(e) {
(function(e) {
(function(e) {
var t = function() {
function e() {
this._buffer = []
}
return e.prototype.Add = function(e) {
var t = 0;
for (; t < this._buffer.length; ++t)
if (this._buffer[t] == e)
break;
t == this._buffer.length && this._buffer.push(e)
}
,
e.prototype.Count = function() {
return this._buffer.length
}
,
e.prototype.GetBuffer = function() {
return this._buffer
}
,
e
}();
e.Set = t;
var n = function() {
function e() {
this._buffer = []
}
return e.prototype.Add = function(e, t) {
this._getIndex(e) == -1 && this._buffer.push({
Key: e,
Value: t
})
}
,
e.prototype.AddOrReplace = function(e, t) {
var n = this._getIndex(e);
n >= 0 ? this._buffer[n] = {
Key: e,
Value: t
} : this._buffer.push({
Key: e,
Value: t
})
}
,
e.prototype.Remove = function(e) {
var t = this._getIndex(e);
t >= 0 && this._buffer.splice(t, 1)
}
,
e.prototype.Count = function() {
return this._buffer.length
}
,
e.prototype.GetBuffer = function() {
return this._buffer
}
,
e.prototype.ContainsKey = function(e) {
return this._getIndex(e) >= 0 ? !0 : !1
}
,
e.prototype.Get = function(e) {
var t = this._getIndex(e);
return t >= 0 ? this._buffer[t].Value : null
}
,
e.prototype._getIndex = function(e) {
var t = 0
, n = -1;
for (; t < this._buffer.length; ++t)
if (this._buffer[t].Key == e) {
n = t;
break
}
return n
}
,
e
}();
e.Map = n
})(e.Collections || (e.Collections = {}));
var t = e.Collections
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var Microsoft;
(function(e) {
(function(t) {
(function(e) {
var n = function() {
function e() {}
return e.GetBytes = function(e) {
var t = [];
for (var n = 0; n < e.length; ++n) {
var r = e.charCodeAt(n);
r < 128 ? t.push(r) : r < 2048 ? t.push(192 | r >> 6, 128 | r & 63) : r < 55296 || r >= 57344 ? t.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | r & 63) : (r = 65536 + ((r & 1023) << 10 | e.charCodeAt(++n) & 1023),
t.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | r & 63))
}
return t
}
,
e
}();
e.Utf8 = n;
var r = function() {
function e() {}
return e.GetString = function(e) {
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = [], r = e.length % 3, i, s, o, u = function(e) {
return [t.charAt(e >> 18 & 63), t.charAt(e >> 12 & 63), t.charAt(e >> 6 & 63), t.charAt(e & 63)].join("")
}
;
for (i = 0,
o = e.length - r; i < o; i += 3)
s = (e[i] << 16) + (e[i + 1] << 8) + e[i + 2],
n.push(u(s));
switch (r) {
case 1:
s = e[e.length - 1],
n.push(t.charAt(s >> 2)),
n.push(t.charAt(s << 4 & 63)),
n.push("==");
break;
case 2:
s = (e[e.length - 2] << 8) + e[e.length - 1],
n.push(t.charAt(s >> 10)),
n.push(t.charAt(s >> 4 & 63)),
n.push(t.charAt(s << 2 & 63)),
n.push("=")
}
return n.join("")
}
,
e
}();
e.Base64 = r;
var s = function() {
function e() {}
return e.GetBytes = function(e) {
var t = [];
while (e & 4294967168)
t.push(e & 127 | 128),
e >>>= 7;
return t.push(e & 127),
t
}
,
e
}();
e.Varint = s;
var o = function() {
function e() {}
return e.GetBytes = function(e) {
var t = e.low
, n = e.high
, r = [];
while (n || 4294967168 & t)
r.push(t & 127 | 128),
t = (n & 127) << 25 | t >>> 7,
n >>>= 7;
return r.push(t & 127),
r
}
,
e
}();
e.Varint64 = o;
var u = function() {
function e() {}
return e.GetBytes = function(e) {
if (t.BrowserChecker.IsDataViewSupport()) {
var n = new DataView(new ArrayBuffer(4));
n.setFloat32(0, e, !0);
var r = [];
for (var s = 0; s < 4; ++s)
r.push(n.getUint8(s));
return r
}
return i.ConvertNumberToArray(e, !1)
}
,
e
}();
e.Float = u;
var a = function() {
function e() {}
return e.GetBytes = function(e) {
if (t.BrowserChecker.IsDataViewSupport()) {
var n = new DataView(new ArrayBuffer(8));
n.setFloat64(0, e, !0);
var r = [];
for (var s = 0; s < 8; ++s)
r.push(n.getUint8(s));
return r
}
return i.ConvertNumberToArray(e, !0)
}
,
e
}();
e.Double = a;
var f = function() {
function e() {}
return e.EncodeZigzag16 = function(e) {
return e = t.Number.ToInt16(e),
e << 1 ^ e >> 15
}
,
e.EncodeZigzag32 = function(e) {
return e = t.Number.ToInt32(e),
e << 1 ^ e >> 31
}
,
e.EncodeZigzag64 = function(e) {
var n = e.low
, r = e.high
, i = r << 1 | n >>> 31
, s = n << 1;
r & 2147483648 && (i = ~i,
s = ~s);
var o = new t.UInt64("0");
return o.low = s,
o.high = i,
o
}
,
e
}();
e.Zigzag = f
})(t.Encoding || (t.Encoding = {}));
var n = t.Encoding;
(function(n) {
var r = function() {
function e() {}
return e.GetString = function(e) {
var t = [];
for (var n = 0; n < e.length; ++n) {
var r = e[n];
if (r <= 191)
t.push(String.fromCharCode(r));
else if (r <= 223) {
var i = e[++n];
t.push(String.fromCharCode((r & 31) << 6 | i & 63))
} else if (r <= 239) {
var i = e[++n]
, s = e[++n];
t.push(String.fromCharCode((r & 15) << 12 | (i & 63) << 6 | s & 63))
} else {
var i = e[++n]
, s = e[++n]
, o = e[++n];
r = (r & 7) << 18 | (i & 63) << 12 | (s & 63) << 6 | o & 63,
r -= 65536,
t.push(String.fromCharCode(55296 | r >> 10 & 1023)),
t.push(String.fromCharCode(56320 | r & 1023))
}
}
return t.join("")
}
,
e
}();
n.Utf8 = r;
var s = function() {
function e() {}
return e.GetBytes = function(e) {
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
, n = [];
for (var r = 0; r < e.length; ++r) {
var i = t.indexOf(e.charAt(r++))
, s = t.indexOf(e.charAt(r++))
, o = t.indexOf(e.charAt(r++))
, u = t.indexOf(e.charAt(r));
n.push(i << 2 | s >> 4),
o >= 0 && (n.push(s << 4 & 240 | o >> 2),
u >= 0 && n.push(o << 6 & 192 | u))
}
return n
}
,
e
}();
n.Base64 = s;
var o = function() {
function t() {}
return t.GetInt64 = function(t) {
var n = new e.Bond.Int64("0")
, r = this._Read(t);
return n.low = r[0],
r.length > 1 && (n.high = r[1]),
n
}
,
t.GetNumber = function(e) {
return this._Read(e)[0]
}
,
t._Read = function(e) {
var t = []
, n = 0
, r = !0
, i = 0;
while (r) {
var s = e.shift();
r = (s & 128) != 0,
s &= 127;
if (!(i < 28)) {
n |= s << i,
t.push(n),
n = s >> 4,
i = 3;
break
}
n |= s << i,
i += 7
}
while (r) {
var s = e.shift();
r = (s & 128) != 0,
s &= 127,
n |= s << i,
i += 7;
if (i >= 32)
break
}
return t.push(n),
t
}
,
t
}();
n.Varint = o;
var u = function() {
function e() {}
return e.GetNumber = function(e) {
if (t.BrowserChecker.IsDataViewSupport()) {
var n = new DataView(new ArrayBuffer(4));
for (var r = 0; r < 4; ++r)
n.setUint8(r, e[r]);
return n.getFloat32(0, !0)
}
return i.ConvertArrayToNumber(e, !1)
}
,
e
}();
n.Float = u;
var a = function() {
function e() {}
return e.GetNumber = function(e) {
if (t.BrowserChecker.IsDataViewSupport()) {
var n = new DataView(new ArrayBuffer(8));
for (var r = 0; r < 8; ++r)
n.setUint8(r, e[r]);
return n.getFloat64(0, !0)
}
return i.ConvertArrayToNumber(e, !0)
}
,
e
}();
n.Double = a;
var f = function() {
function t() {}
return t.DecodeZigzag16 = function(e) {
return ((65535 & e) >>> 1 ^ -(e & 1)) << 16 >> 16
}
,
t.DecodeZigzag32 = function(e) {
return e >>> 1 ^ -(e & 1)
}
,
t.DecodeZigzag64 = function(t) {
var n = t.high & 1
, r = t.high >>> 1
, i = t.low & 1
, s = t.low >>> 1;
s = n << 31 | s,
i && (s ^= 4294967295,
r ^= 4294967295);
var o = new e.Bond.UInt64("0");
return o.low = s,
o.high = r,
o
}
,
t
}();
n.Zigzag = f
})(t.Decoding || (t.Decoding = {}));
var r = t.Decoding
, i = function() {
function e() {}
return e.ConvertNumberToArray = function(e, t) {
if (!e)
return t ? this._doubleZero : this._floatZero;
var n = t ? 11 : 8
, r = t ? 52 : 23
, i = (1 << n - 1) - 1
, s = 1 - i
, o = i
, u = e < 0 ? 1 : 0;
e = Math.abs(e);
var a = Math.floor(e)
, f = e - a
, l = 2 * (i + 2) + r
, c = new Array(l)
, h = 0;
while (h < l)
c[h++] = 0;
h = i + 2;
while (h && a)
c[--h] = a % 2,
a = Math.floor(a / 2);
h = i + 1;
while (h < l - 1 && f > 0)
f *= 2,
f >= 1 ? (c[++h] = 1,
--f) : c[++h] = 0;
var p = 0;
for (; p < l && !c[p]; ++p)
;
var d = i + 1 - p
, v = p + r;
if (c[v + 1]) {
for (h = v; h > p; --h)
if (c[h] = 1 - c[h])
break;
h == p && ++d
}
if (d > o || a)
return u ? t ? this._doubleNegInifinity : this._floatNegInifinity : t ? this._doubleInifinity : this._floatInifinity;
if (d < s)
return t ? this._doubleZero : this._floatZero;
if (t) {
var m = 0;
for (h = 0; h < 20; ++h)
m = m << 1 | c[++p];
var g = 0;
for (; h < 52; ++h)
g = g << 1 | c[++p];
m |= d + i << 20,
m = u << 31 | m & 2147483647;
var y = [g & 255, g >> 8 & 255, g >> 16 & 255, g >>> 24, m & 255, m >> 8 & 255, m >> 16 & 255, m >>> 24];
return y
}
var b = 0;
for (h = 0; h < 23; ++h)
b = b << 1 | c[++p];
b |= d + i << 23,
b = u << 31 | b & 2147483647;
var y = [b & 255, b >> 8 & 255, b >> 16 & 255, b >>> 24];
return y
}
,
e.ConvertArrayToNumber = function(e, n) {
var r = n ? 11 : 8
, i = (1 << r - 1) - 1
, s = (e[n ? 7 : 3] & 128) != 0
, o = n ? (e[7] & 127) << 4 | (e[6] & 240) >> 4 : (e[3] & 127) << 1 | (e[2] & 128) >> 7;
if (o == 255)
throw new t.Exception("Not a valid float/double buffer.");
var u = 1
, a = 1;
if (n) {
var f = (e[6] & 15) << 28 | (e[5] & 255) << 20 | (e[4] & 255) << 12
, l = e[3] << 24 | (e[2] & 255) << 16 | (e[1] & 255) << 8 | e[0] & 255;
if (!o && !f && !l)
return 0;
for (var c = 0; c < 20; ++c)
a /= 2,
f < 0 && (u += a),
f <<= 1;
for (var c = 0; c < 32; ++c)
a /= 2,
l < 0 && (u += a),
l <<= 1
} else {
var h = (e[2] & 127) << 25 | (e[1] & 255) << 17 | (e[0] & 255) << 9;
if (!o && !h)
return 0;
for (var c = 0; c < 23; ++c)
a /= 2,
h < 0 && (u += a),
h <<= 1
}
return u *= Math.pow(2, o - i),
s ? 0 - u : u
}
,
e._floatZero = [0, 0, 0, 0],
e._doubleZero = [0, 0, 0, 0, 0, 0, 0, 0],
e._floatInifinity = [0, 0, 128, 127],
e._floatNegInifinity = [0, 0, 128, 255],
e._doubleInifinity = [0, 0, 0, 0, 0, 0, 240, 127],
e._doubleNegInifinity = [0, 0, 0, 0, 0, 0, 240, 255],
e
}()
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var Microsoft;
(function(e) {
(function(e) {
(function(t) {
var n = function() {
function t() {
this._buffer = []
}
return t.prototype.WriteByte = function(t) {
this._buffer.push(e.Number.ToByte(t))
}
,
t.prototype.Write = function(e, t, n) {
while (n--)
this.WriteByte(e[t++])
}
,
t.prototype.GetBuffer = function() {
return this._buffer
}
,
t
}();
t.MemoryStream = n
})(e.IO || (e.IO = {}));
var t = e.IO
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var Microsoft;
(function(e) {
(function(e) {
var t = function() {
function e(e, t) {
this.Type = e,
this.Id = t
}
return e
}();
e.FieldTag = t;
var n = function() {
function e(e, t) {
this.ElementType = e,
this.Size = t
}
return e
}();
e.ContainerTag = n;
var r = function() {
function e(e, t, n) {
this.KeyType = e,
this.ValueType = t,
this.Size = n
}
return e
}();
e.KeyValueContainerTag = r;
var i = function() {
function e() {}
return e
}();
e.Bonded = i;
var s = function() {
function e(e) {
this.low = 0,
this.high = 0,
this.low = parseInt(e),
this.low < 0 && (this.high = -1)
}
return e.prototype.Equals = function(t) {
var n = new e(t);
return this.low == n.low && this.high == n.high
}
,
e
}();
e.Int64 = s;
var o = function() {
function e(e) {
this.low = 0,
this.high = 0,
this.low = parseInt(e)
}
return e.prototype.Equals = function(t) {
var n = new e(t);
return this.low == n.low && this.high == n.high
}
,
e
}();
e.UInt64 = o;
var u = function() {
function e() {}
return e.ToByte = function(e) {
return this.ToUInt8(e)
}
,
e.ToInt8 = function(e) {
var t = (e & 128) << 24 >> 24;
return e & 127 | t
}
,
e.ToInt16 = function(e) {
var t = (e & 32768) << 16 >> 16;
return e & 32767 | t
}
,
e.ToInt32 = function(e) {
var t = e & 2147483648;
return e & 2147483647 | t
}
,
e.ToUInt8 = function(e) {
return e & 255
}
,
e.ToUInt16 = function(e) {
return e & 65535
}
,
e.ToUInt32 = function(e) {
return e & 4294967295
}
,
e
}();
e.Number = u;
var a = function() {
function e(e) {
this.Message = e
}
return e
}();
e.Exception = a;
var f = function() {
function e() {}
return e
}();
e.KeyValuePair = f;
var l = function() {
function e() {}
return e.IsDataViewSupport = function() {
return typeof ArrayBuffer != "undefined" && typeof DataView != "undefined"
}
,
e
}();
e.BrowserChecker = l
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var Microsoft;
(function(e) {
(function(e) {
var t = function() {
function t(e) {
this._stream = e
}
return t.prototype.WriteBlob = function(e) {
this._stream.Write(e, 0, e.length)
}
,
t.prototype.WriteBool = function(e) {
this._stream.WriteByte(e ? 1 : 0)
}
,
t.prototype.WriteContainerBegin = function(e, t) {
this.WriteUInt8(t),
this.WriteUInt32(e)
}
,
t.prototype.WriteMapContainerBegin = function(e, t, n) {
this.WriteUInt8(t),
this.WriteUInt8(n),
this.WriteUInt32(e)
}
,
t.prototype.WriteContainerEnd = function() {}
,
t.prototype.WriteDouble = function(t) {
var n = e.Encoding.Double.GetBytes(t);
this._stream.Write(n, 0, n.length)
}
,
t.prototype.WriteFloat = function(t) {
var n = e.Encoding.Float.GetBytes(t);
this._stream.Write(n, 0, n.length)
}
,
t.prototype.WriteFieldBegin = function(e, t, n) {
t <= 5 ? this._stream.WriteByte(e | t << 5) : t <= 255 ? (this._stream.WriteByte(e | 192),
this._stream.WriteByte(t)) : (this._stream.WriteByte(e | 224),
this._stream.WriteByte(t),
this._stream.WriteByte(t >> 8))
}
,
t.prototype.WriteFieldEnd = function() {}
,
t.prototype.WriteFieldOmitted = function(e, t, n) {}
,
t.prototype.WriteInt16 = function(t) {
t = e.Encoding.Zigzag.EncodeZigzag16(t),
this.WriteUInt16(t)
}
,
t.prototype.WriteInt32 = function(t) {
t = e.Encoding.Zigzag.EncodeZigzag32(t),
this.WriteUInt32(t)
}
,
t.prototype.WriteInt64 = function(t) {
this.WriteUInt64(e.Encoding.Zigzag.EncodeZigzag64(t))
}
,
t.prototype.WriteInt8 = function(t) {
this._stream.WriteByte(e.Number.ToInt8(t))
}
,
t.prototype.WriteString = function(t) {
if (t == "")
this.WriteUInt32(0);
else {
var n = e.Encoding.Utf8.GetBytes(t);
this.WriteUInt32(n.length),
this._stream.Write(n, 0, n.length)
}
}
,
t.prototype.WriteStructBegin = function(e, t) {}
,
t.prototype.WriteStructEnd = function(e) {
this.WriteUInt8(e ? 1 : 0)
}
,
t.prototype.WriteUInt16 = function(t) {
var n = e.Encoding.Varint.GetBytes(e.Number.ToUInt16(t));
this._stream.Write(n, 0, n.length)
}
,
t.prototype.WriteUInt32 = function(t) {
var n = e.Encoding.Varint.GetBytes(e.Number.ToUInt32(t));
this._stream.Write(n, 0, n.length)
}
,
t.prototype.WriteUInt64 = function(t) {
var n = e.Encoding.Varint64.GetBytes(t);
this._stream.Write(n, 0, n.length)
}
,
t.prototype.WriteUInt8 = function(t) {
this._stream.WriteByte(e.Number.ToUInt8(t))
}
,
t.prototype.WriteWString = function(e) {
this.WriteUInt32(e.length);
for (var t = 0; t < e.length; ++t) {
var n = e.charCodeAt(t);
this._stream.WriteByte(n),
this._stream.WriteByte(n >>> 8)
}
}
,
t
}();
e.CompactBinaryProtocolWriter = t;
var n = function() {
function e() {}
return e
}();
e.CompactBinaryProtocolReader = n
})(e.Bond || (e.Bond = {}));
var t = e.Bond
})(Microsoft || (Microsoft = {}));
var sct;
(function(e) {
var t = function() {
function e() {}
return e.IsSafari = function() {
return e._isSafari === null && e._DetectBrowser(),
e._isSafari
}
,
e.ajax = function(t) {
var n = e._createConnection();
if (t.headers) {
var r = "qsp=true";
for (var i in t.headers)
r += "&",
r += encodeURIComponent(i),
r += "=",
r += encodeURIComponent(t.headers[i]);
t.url.indexOf("?") < 0 ? t.url += "?" : t.url += "&",
t.url += r
}
n.open(t.type, t.url),
t.complete && (n.onload = function() {
typeof n.status == "undefined" && (n.status = 200),
t.complete(n)
}
,
n.ontimeout = function() {
typeof n.status == "undefined" && (n.status = 500),
t.complete(n)
}
,
n.onerror = function() {
t.complete(n)
}
),
n.send(t.data)
}
,
e.keys = function(e) {
if (Object.keys)
return Object.keys(e);
var t = [];
for (var n in e)
e.hasOwnProperty(n) && t.push(n);
return t
}
,
e.IsUsingXDomainRequest = function() {
if (e._usingXDomainRequest == null ) {
var t = new XMLHttpRequest;
typeof t.withCredentials == "undefined" && typeof XDomainRequest != "undefined" ? e._usingXDomainRequest = !0 : e._usingXDomainRequest = !1
}
return e._usingXDomainRequest
}
,
e._createConnection = function() {
var t = new XMLHttpRequest;
return e.IsUsingXDomainRequest() ? new XDomainRequest : t
}
,
e._DetectBrowser = function() {
var t = navigator.userAgent.toLowerCase();
t.indexOf("safari") >= 0 && t.indexOf("chrome") < 0 ? e._isSafari = !0 : e._isSafari = !1
}
,
e._isSafari = null ,
e._usingXDomainRequest = null ,
e
}();
e.Utils = t
})(sct || (sct = {}));
var microsoft;
(function(e) {
(function(e) {
(function(e) {
(function(t) {
var n = function() {
function e() {}
return e.GetGuid = function() {
var e = function() {
return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1, 5)
}
;
return [e(), e(), "-", e(), "-", e(), "-", e(), "-", e(), e(), e()].join("")
}
,
e.GetTimeStamp = function() {
var e = (new Date).getTime()
, t = new Microsoft.Bond.Int64("0");
return t.low = e & 4294967295,
t.high = Math.floor(e / 4294967296),
t
}
,
e.GetTimeStampWithValue = function(e) {
var t = new Microsoft.Bond.Int64("0");
return t.low = e & 4294967295,
t.high = Math.floor(e / 4294967296),
t
}
,
e
}();
t.utils = n,
function(e) {
e[e.NotSet = 0] = "NotSet",
e[e.Event = 1] = "Event",
e[e.PerformanceCounter = 2] = "PerformanceCounter",
e[e.Anomaly = 3] = "Anomaly",
e[e.Prediction = 4] = "Prediction",
e[e.TraceLog = 5] = "TraceLog",
e[e.EventSourceLog = 6] = "EventSourceLog",
e[e.HttpLog = 7] = "HttpLog",
e[e.PerformanceCounterAzure = 8] = "PerformanceCounterAzure",
e[e.PerformanceCounterGfs = 9] = "PerformanceCounterGfs"
}(t.RecordType || (t.RecordType = {}));
var r = t.RecordType;
(function(e) {
e[e.NotSet = 0] = "NotSet",
e[e.O365 = 1] = "O365",
e[e.SkypeBI = 2] = "SkypeBI",
e[e.SkypeData = 3] = "SkypeData"
})(t.PIIScrubber || (t.PIIScrubber = {}));
var i = t.PIIScrubber;
(function(e) {
e[e.NotSet = 0] = "NotSet",
e[e.DistinguishedName = 1] = "DistinguishedName",
e[e.GenericData = 2] = "GenericData",
e[e.IPV4Address = 3] = "IPV4Address",
e[e.IPv6Address = 4] = "IPv6Address",
e[e.MailSubject = 5] = "MailSubject",
e[e.PhoneNumber = 6] = "PhoneNumber",
e[e.QueryString = 7] = "QueryString",
e[e.SipAddress = 8] = "SipAddress",
e[e.SmtpAddress = 9] = "SmtpAddress",
e[e.Identity = 10] = "Identity",
e[e.Uri = 11] = "Uri",
e[e.Fqdn = 12] = "Fqdn",
e[e.IPV4AddressLegacy = 13] = "IPV4AddressLegacy"
})(t.PIIKind || (t.PIIKind = {}));
var s = t.PIIKind
, o = function() {
function e() {
this.ScrubType = 0,
this.Kind = 0,
this.RawContent = ""
}
return e.prototype.Write = function(e) {
this.WriteImpl(e, !1)
}
,
e.prototype.WriteImpl = function(e, t) {
e.WriteStructBegin(null , t),
this.ScrubType != 0 ? (e.WriteFieldBegin(16, 1, null ),
e.WriteInt32(this.ScrubType),
e.WriteFieldEnd()) : e.WriteFieldOmitted(16, 1, null ),
this.Kind != 0 ? (e.WriteFieldBegin(16, 2, null ),
e.WriteInt32(this.Kind),
e.WriteFieldEnd()) : e.WriteFieldOmitted(16, 2, null ),
this.RawContent != "" ? (e.WriteFieldBegin(9, 3, null ),
e.WriteString(this.RawContent),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 3, null ),
e.WriteStructEnd(t)
}
,
e.prototype.Read = function(e) {
this.ReadImpl(e, !1)
}
,
e.prototype.ReadImpl = function(e, t) {}
,
e
}();
t.PII = o;
var u = function() {
function t() {
this.Id = n.GetGuid(),
this.Timestamp = n.GetTimeStamp(),
this.Type = "",
this.EventType = "",
this.Extension = new Microsoft.Bond.Collections.Map,
this.RecordType = 0,
this.PIIExtensions = new Microsoft.Bond.Collections.Map
}
return t.prototype.AddOrReplacePII = function(t, n, r) {
var i = new e.datamodels.PII;
i.RawContent = n,
i.Kind = r,
i.ScrubType = 1,
this.PIIExtensions.AddOrReplace(t, i)
}
,
t.prototype.Write = function(e) {
this.WriteImpl(e, !1)
}
,
t.prototype.WriteImpl = function(e, t) {
e.WriteStructBegin(null , t),
this.Id != "" ? (e.WriteFieldBegin(9, 1, null ),
e.WriteString(this.Id),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 1, null ),
this.Timestamp.Equals("0") ? e.WriteFieldOmitted(17, 3, null ) : (e.WriteFieldBegin(17, 3, null ),
e.WriteInt64(this.Timestamp),
e.WriteFieldEnd()),
this.Type != "" ? (e.WriteFieldBegin(9, 5, null ),
e.WriteString(this.Type),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 5, null ),
this.EventType != "" ? (e.WriteFieldBegin(9, 6, null ),
e.WriteString(this.EventType),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 6, null );
if (this.Extension.Count()) {
e.WriteFieldBegin(13, 13, null ),
e.WriteMapContainerBegin(this.Extension.Count(), 9, 9);
for (var n = 0; n < this.Extension.GetBuffer().length; ++n)
e.WriteString(this.Extension.GetBuffer()[n].Key),
e.WriteString(this.Extension.GetBuffer()[n].Value);
e.WriteContainerEnd(),
e.WriteFieldEnd()
} else
e.WriteFieldOmitted(13, 13, null );
this.RecordType != 0 ? (e.WriteFieldBegin(16, 24, null ),
e.WriteInt32(this.RecordType),
e.WriteFieldEnd()) : e.WriteFieldOmitted(16, 24, null );
if (this.PIIExtensions.Count()) {
e.WriteFieldBegin(13, 30, null ),
e.WriteMapContainerBegin(this.PIIExtensions.Count(), 9, 10);
for (var r = 0; r < this.PIIExtensions.GetBuffer().length; ++r)
e.WriteString(this.PIIExtensions.GetBuffer()[r].Key),
this.PIIExtensions.GetBuffer()[r].Value.WriteImpl(e, !1);
e.WriteContainerEnd(),
e.WriteFieldEnd()
} else
e.WriteFieldOmitted(13, 30, null );
e.WriteStructEnd(t)
}
,
t.prototype.Read = function(e) {
this.ReadImpl(e, !1)
}
,
t.prototype.ReadImpl = function(e, t) {}
,
t
}();
t.Record = u;
var a = function() {
function e() {
this.Source = "",
this.DataPackageId = "",
this.Timestamp = new Microsoft.Bond.Int64("0"),
this.Records = []
}
return e.prototype.Write = function(e) {
this.WriteImpl(e, !1)
}
,
e.prototype.WriteImpl = function(e, t) {
e.WriteStructBegin(null , t),
this.Source != "" ? (e.WriteFieldBegin(9, 2, null ),
e.WriteString(this.Source),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 2, null ),
this.DataPackageId != "" ? (e.WriteFieldBegin(9, 5, null ),
e.WriteString(this.DataPackageId),
e.WriteFieldEnd()) : e.WriteFieldOmitted(9, 5, null ),
this.Timestamp.Equals("0") ? e.WriteFieldOmitted(17, 6, null ) : (e.WriteFieldBegin(17, 6, null ),
e.WriteInt64(this.Timestamp),
e.WriteFieldEnd());
if (this.Records.length) {
e.WriteFieldBegin(11, 8, null ),
e.WriteContainerBegin(this.Records.length, 10);
for (var n = 0; n < this.Records.length; ++n)
this.Records[n].WriteImpl(e, !1);
e.WriteContainerEnd(),
e.WriteFieldEnd()
} else
e.WriteFieldOmitted(11, 8, null );
e.WriteStructEnd(t)
}
,
e.prototype.Read = function(e) {
this.ReadImpl(e, !1)
}
,
e.prototype.ReadImpl = function(e, t) {}
,
e
}();
t.DataPackage = a;
var f = function() {
function e() {
this.DataPackages = [],
this.RequestRetryCount = 0
}
return e.prototype.Write = function(e) {
this.WriteImpl(e, !1)
}
,
e.prototype.WriteImpl = function(e, t) {
e.WriteStructBegin(null , t);
if (this.DataPackages.length) {
e.WriteFieldBegin(11, 1, null ),
e.WriteContainerBegin(this.DataPackages.length, 10);
for (var n = 0; n < this.DataPackages.length; ++n)
this.DataPackages[n].WriteImpl(e, !1);
e.WriteContainerEnd(),
e.WriteFieldEnd()
} else
e.WriteFieldOmitted(11, 1, null );
this.RequestRetryCount != 0 ? (e.WriteFieldBegin(16, 2, null ),
e.WriteInt32(this.RequestRetryCount),
e.WriteFieldEnd()) : e.WriteFieldOmitted(16, 2, null ),
e.WriteStructEnd(t)
}
,
e.prototype.Read = function(e) {
this.ReadImpl(e, !1)
}
,
e.prototype.ReadImpl = function(e, t) {}
,
e
}();
t.ClientToCollectorRequest = f
})(e.datamodels || (e.datamodels = {}));
var t = e.datamodels
})(e.telemetry || (e.telemetry = {}));
var t = e.telemetry
})(e.applications || (e.applications = {}));
var t = e.applications
})(microsoft || (microsoft = {}));
var microsoft;
(function(e) {
(function(e) {
(function(e) {
(function(t) {
(function(e) {
e[e.SENT = 0] = "SENT",
e[e.SEND_FAILED = 1] = "SEND_FAILED"
})(t.CallbackEventType || (t.CallbackEventType = {}));
var n = t.CallbackEventType;
(function(e) {
e[e.DATARV_ERROR_OK = 0] = "DATARV_ERROR_OK",
e[e.DATARV_ERROR_INVALID_EVENT = 1] = "DATARV_ERROR_INVALID_EVENT",
e[e.DATARV_ERROR_INVALID_CONFIG = 2] = "DATARV_ERROR_INVALID_CONFIG",
e[e.DATARV_ERROR_INVALID_DEPENDENCIES = 3] = "DATARV_ERROR_INVALID_DEPENDENCIES",
e[e.DATARV_ERROR_INVALID_STATUS = 4] = "DATARV_ERROR_INVALID_STATUS",
e[e.DATARV_ERROR_INVALID_ARG = 5] = "DATARV_ERROR_INVALID_ARG"
})(t.DATARV_ERROR || (t.DATARV_ERROR = {}));
var r = t.DATARV_ERROR
, i = function() {
function e(e) {
this._errorCode = 0,
this._errorCode = e
}
return e.prototype.ErrorCode = function() {
return this._errorCode
}
,
e.prototype.toString = function() {
switch (this._errorCode) {
case 0:
return "DATARV_ERROR_OK";
case 1:
return "Event is invalid. Either event.Id is empty, or event.Timestamp is empty, or event.EventType is empty.";
case 2:
return "Invalid configuration. CollectorUrl is missing.";
case 3:
return "DATARV_ERROR_INVALID_DEPENDENCIES";
case 4:
return "Telemetry Manager is not initialized.";
case 5:
return "TenantToken is null or empty, or events is null.";
default:
return "Unknown error"
}
}
,
e
}();
t.Exception = i;
var s = function() {
function e() {}
return e
}();
t.TelemetryConfig = s;
var o = function() {
function e() {}
return e.CreateTelemetryManager = function() {
return new f
}
,
e
}();
t.TelemetryManagerFactory = o;
var u = function() {
function e() {}
return e.MaxPackageSizeInBytes = function() {
return 3e6
}
,
e.TimeIntervalForNextSendInMS = function() {
return 1e3
}
,
e
}(), a;
(function(e) {
e[e.Created = 0] = "Created",
e[e.Initialized = 1] = "Initialized",
e[e.Started = 2] = "Started"
})(a || (a = {}));
var f = function() {
function t() {
this._MaxPackageSizeInBytes = u.MaxPackageSizeInBytes(),
this._listeners = [],
this._status = 0,
this._ecsClient = null ,
this._etag = null ,
this._ecsCallback = null ,
this._testServerResponseHook = null
}
return t.prototype.Initialize = function(e) {
if (this._status != 0)
throw new i(4);
if (!e || !e.collectorUrl)
throw new i(2);
this._config = e,
this._Reset(),
this._status = 1,
e.ecsClient && (this._Verbose("ECS object assigned. Do integration"),
this._ecsClient = e.ecsClient),
this._Verbose("Initialize() done")
}
,
t.prototype.AddListener = function(e) {
if (this._status < 1)
throw new i(4);
this._Verbose(["AddListener(), status: ", this._status, " old length: ", this._listeners.length, " func: ", e].join(""));
for (var t = 0; t < this._listeners.length; ++t)
if (this._listeners[t] == e) {
this._Verbose("the listener has been added already, index: " + t);
return
}
this._listeners.push(e),
this._Verbose("AddListener() done, the new length: " + this._listeners.length)
}
,
t.prototype.RemoveListener = function(e) {
if (this._status < 1)
throw new i(4);
this._Verbose(["RemoveListener(), status: ", this._status, " old length: ", this._listeners.length, " func: ", e].join(""));
for (var t = 0; t < this._listeners.length; ++t)
if (this._listeners[t] == e) {
this._listeners.length == 1 ? this._listeners = [] : t == this._listeners.length - 1 ? this._listeners.pop() : this._listeners[t] = this._listeners.pop(),
this._Verbose(["this listener has been found, index: ", t, "new length: ", this._listeners.length].join(""));
return
}
this._Verbose("listener isn't been found, new length" + this._listeners.length)
}
,
t.prototype.Start = function() {
if (this._status < 1)
throw new i(4);
this._Verbose(["Start(), status:", this._status, "tag:", t._tag].join(" ")),
this._status >= 2 && this._Verbose("Start() already, ignore"),
this._ecsClient && (this._ecsCallback = this._CreateEcsCallback(),
this._ecsClient.AddListener(this._ecsCallback),
this._etag = this._ecsClient.GetETag()),
++t._tag,
this._status = 2,
this._Verbose(["Start() done, status: ", this._status, "tag: ", t._tag].join(""))
}
,
t.prototype.Stop = function() {
if (this._status < 1)
throw new i(4);
this._Verbose("Stop(), status: " + this._status);
if (this._status == 1) {
this._Verbose("Stop() already, ignore");
return
}
this._Reset(),
this._status = 1,
this._Verbose("Stop() done, status: " + this._status)
}
,
t.prototype.Flush = function(e) {
this._eventsCache.IsEmpty() || this._WorkThread(e)
}
,
t.prototype.SendAsync = function(e, n) {
if (this._status < 1)
throw new i(4);
this._Verbose(["SendAsync(), status:", this._status, "tenantToken:", e, "count:", n.length].join(" "));
if (this._status < 2)
return this._Info("SendAsync(), not started, ignore, return false"),
!1;
if (!e || !n)
throw this._Error("SendAsync(), tenantToken or events is null or empty"),
new i(5);
for (var r = 0; r < n.length; ++r)
if (!n[r].Id || !t._eventTypeRegex.test(n[r].EventType) || n[r].Timestamp.Equals("0"))
throw this._Error(["eventId:", n[r].Id, "eventType:", n[r].EventType, "timestamp high:", n[r].Timestamp.high, "timestamp low:", n[r].Timestamp.low].join("")),
new i(1);
return this._eventsCache.AddEvents(e, n),
this._Verbose(["SendAsync(), currentTimer: ", this._timer, "eventsCacheIsEmpty", this._eventsCache.IsEmpty()].join(" ")),
!this._eventsCache.IsEmpty() && !this._timer && this._ScheduleTimer(!1),
this._Verbose("SendAsync() done"),
!0
}
,
t.prototype._WorkThread = function(e) {
var n = this;
try {
this._Verbose("_WorkThread, status: " + this._status);
if (this._status < 2) {
this._Verbose("_WorkThread, status is not started, return");
return
}
var r = this._eventsCache.DequeuEvents();
if (r == null ) {
this._Verbose("_WorkThread, No events found, return"),
this._CleanTimer();
return
}
var i = this._PackEvents(r.tenantToken, r.events);
this._eventsCache.AddEvents(r.tenantToken, i.remainedEvents);
if (i.buffer == null || i.buffer.length == 0) {
this._eventsCache.IsEmpty() ? (this._Verbose("eventsCache is empty, stop schedule"),
this._CleanTimer()) : (this._Verbose("eventsCache is not empty, schedule for next run"),
this._ScheduleTimer(!1));
return
}
if (this._testServerResponseHook) {
var s = this._testServerResponseHook();
setTimeout(this._SendCallback(u, r.tenantToken, i.sendEvents, s, null ), 100);
return
}
var o = {
type: "POST",
url: this._config.collectorUrl,
processData: !1,
headers: {
"content-type": "application/bond-compact-binary",
"client-id": "NO_AUTH",
"sdk-version": "ACT-Web-JS-" + clienttelemetry_build.version
},
complete: function(t) {
return n._SendCallback(u, r.tenantToken, i.sendEvents, t, e)
}
};
sct.Utils.IsSafari() || typeof Uint8Array == "undefined" ? (this._Verbose("Uint8Array is undefined, send with base64 encode."),
o.data = Microsoft.Bond.Encoding.Base64.GetString(i.buffer),
o.headers["content-encoding"] = "base64") : (this._Verbose("Uint8Array is defined, send with binary format directly."),
o.data = new Uint8Array(i.buffer)),
r.tenantToken && (o.headers["x-apikey"] = r.tenantToken);
var u = t._tag;
this._lastActiveTime = (new Date).getTime(),
sct.Utils.ajax(o),
this._Verbose("_Workthread, send via jquery, tag: " + u)
} catch (a) {
this._Error("_WorkThread, exception: " + a)
}
}
,
t.prototype._PackEvents = function(t, n) {
this._Verbose("_PackageEvents, total Count: " + n.length);
var r = new e.datamodels.ClientToCollectorRequest
, i = new e.datamodels.DataPackage;
i.Source = "JS_default_source",
i.DataPackageId = e.datamodels.utils.GetGuid(),
i.Timestamp = e.datamodels.utils.GetTimeStamp();
var s, o = n;
n = [];
for (; ; ) {
i.Records = [],
i.Records.push.apply(i.Records, o),
r.DataPackages = [],
r.DataPackages.push(i),
s = this._Serialize(r),
this._Verbose(["_PackageEvents, sendEvents.length:", o.length, "buffer.length:", s.length, "MaxPackageSize:", this._MaxPackageSizeInBytes].join(""));
if (s.length < this._MaxPackageSizeInBytes)
break;
if (o.length == 1) {
o = [],
s = null ;
break
}
var u = o.splice(0, Math.floor(o.length / 2));
this._Verbose("_PackageEvents, too large, package again"),
n.push.apply(n, o),
o = u
}
return this._Verbose(["_PakcageEvents done, sendEventsCount:", o.length, "buffer.length:", s == null ? 0 : s.length, "remained events:", n.length].join("")),
{
buffer: s,
sendEvents: o,
remainedEvents: n
}
}
,
t.prototype._Serialize = function(e) {
var t = new Microsoft.Bond.IO.MemoryStream
, n = new Microsoft.Bond.CompactBinaryProtocolWriter(t);
return e.Write(n),
t.GetBuffer()
}
,
t.prototype._SendCallback = function(e, n, r, i, s) {
this._Verbose(["_SendCallback", "tag:", e, "current tag:", t._tag, "tenantToken:", n, "events count:", r.length, "jqXHR:", i].join(""));
if (s != null ) {
s(i ? i.status : 0, n, r);
return
}
var o = i != null && i.status >= 200 && i.status < 300;
if (this._status < 2 || e < t._tag) {
this._Verbose("_SendCallback, is not started, or tag is not the same, return");
return
}
if (!o && (!i || i.status && i.status != 400)) {
this._Verbose("retry statusCode: " + (i ? i.status : 0)),
this._eventsCache.AddEvents(n, r),
this._ScheduleTimer(!0);
return
}
for (var u = 0; u < this._listeners.length; ++u)
this._listeners[u](o ? 0 : 1, i ? i.status : 0, n, r);
this._eventsCache.IsEmpty() ? (this._Verbose("eventsCache is empty, stop schedule"),
this._CleanTimer()) : (this._Verbose("eventsCache is not empty, schedule for next run"),
this._ScheduleTimer(!1))
}
,
t.prototype._CleanTimer = function() {
this._Verbose("_CleanTimer(), timer: " + this._timer),
this._timer && (clearTimeout(this._timer),
this._timer = null )
}
,
t.prototype._ScheduleTimer = function(e) {
var t = this;
this._Verbose("_ScheduleTimer: isRetry: " + e),
this._CleanTimer();
if (!e) {
var n = 0
, r = (new Date).getTime()
, i = r - this._lastActiveTime;
i > u.TimeIntervalForNextSendInMS() ? n = 0 : n = u.TimeIntervalForNextSendInMS() - i,
this._timer = setTimeout(function() {
return t._WorkThread(null )
}, n),
this._Verbose("_ScheduleTimer, next try: " + n),
this._rescheduleFactor = 1
} else {
this._Verbose("_ScheduleTimer, current factor: " + this._rescheduleFactor);
var n = Math.floor(5 * this._rescheduleFactor * (1 + Math.random()));
this._timer = setTimeout(function() {
return t._WorkThread(null )
}, n * 1e3),
this._Verbose("_ScheduleTimer, next try (s): " + n),
this._rescheduleFactor <<= 1,
this._rescheduleFactor > 64 && (this._rescheduleFactor = 1)
}
}
,
t.prototype._Verbose = function(e) {
this._config.log && this._config.log.Verbose("[TelemetryManagerImpl]: " + e)
}
,
t.prototype._Info = function(e) {
this._config.log && this._config.log.Info("[TelemetryManagerImpl]: " + e)
}
,
t.prototype._Error = function(e) {
this._config.log && this._config.log.Error("[TelemetryManagerImpl]: " + e)
}
,
t.prototype._Reset = function() {
this._Verbose("Reset()"),
this._CleanTimer(),
this._lastActiveTime = 0,
this._rescheduleFactor = 1,
this._sendingEvents = [],
this._eventsCache = new l,
this._ecsClient && (this._ecsClient.RemoveListener(this._ecsCallback),
this._ecsCallback = null )
}
,
t.prototype._CreateEcsCallback = function() {
var e = this;
return function(t) {
t == 0 && (e._etag = e._ecsClient.GetETag())
}
}
,
t.prototype.__GetListenerArray = function() {
return this._listeners
}
,
t.prototype.__GetTotalEventsCount = function() {
return this._eventsCache.GetTotalEventsCount()
}
,
t.prototype.__IsScheduled = function() {
return this._timer != null
}
,
t.prototype.__ChageMaxPackageSizeInKB = function(e) {
this._MaxPackageSizeInBytes = e * 1024
}
,
t.prototype.__SetTestServerResponseHook = function(e) {
this._testServerResponseHook = e
}
,
t._eventTypeRegex = /^[a-zA-Z0-9]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,
t._tag = 0,
t
}()
, l = function() {
function e() {
this._events = {},
this._tokens = []
}
return e.prototype.AddEvents = function(e, t) {
if (!t.length)
return;
this._events[e] || (this._events[e] = [],
this._tokens.push(e)),
this._events[e].push.apply(this._events[e], t)
}
,
e.prototype.IsEmpty = function() {
return this._tokens.length == 0
}
,
e.prototype.DequeuEvents = function() {
if (this._tokens.length == 0)
return null ;
var e = this._tokens.shift()
, t = this._events[e];
return delete this._events[e],
{
tenantToken: e,
events: t
}
}
,
e.prototype.GetTotalEventsCount = function() {
var e = 0;
for (var t in this._events)
e += this._events[t].length;
return e
}
,
e
}()
})(e._sender || (e._sender = {}));
var t = e._sender
})(e.telemetry || (e.telemetry = {}));
var t = e.telemetry
})(e.applications || (e.applications = {}));
var t = e.applications
})(microsoft || (microsoft = {}));
var microsoft;
(function(e) {
(function(e) {
(function(e) {
var t = e._sender.TelemetryManagerFactory.CreateTelemetryManager()
, n = function() {
function e() {
this.collectorUrl = null
}
return e
}();
e.LogConfiguration = n;
var r = function() {
function e() {
this.key = null ,
this.value = null ,
this.pii = null
}
return e
}();
e.Property = r;
var i = function() {
function e() {
this.name = null ,
this.timestamp = null ,
this.properties = [],
this.eventType = null
}
return e.prototype.setProperty = function(t, n, r) {
if (!t || !e._propertyNameRegex.test(t))
throw new o(3);
r ? this.properties.push({
key: t,
value: n,
pii: r != 0 ? r : null
}) : this.properties.push({
key: t,
value: n,
pii: null
})
}
,
e._propertyNameRegex = /^[a-zA-Z0-9](([a-zA-Z0-9|_]){0,98}[a-zA-Z0-9])?$/,
e
}();
e.EventProperties = i,
function(e) {
e[e.INVALID_TENANT_TOKEN = 1] = "INVALID_TENANT_TOKEN",
e[e.MISSING_EVENT_PROPERTIES_NAME = 2] = "MISSING_EVENT_PROPERTIES_NAME",
e[e.INVALID_PROPERTY_NAME = 3] = "INVALID_PROPERTY_NAME",
e[e.INVALID_COLLECTOR_URL = 4] = "INVALID_COLLECTOR_URL",
e[e.MISSING_FAILURE_SIGNATURE = 5] = "MISSING_FAILURE_SIGNATURE",
e[e.MISSING_FAILURE_DETAIL = 6] = "MISSING_FAILURE_DETAIL",
e[e.MISSING_PAGEVIEW_ID = 7] = "MISSING_PAGEVIEW_ID",
e[e.MISSING_PAGEVIEW_NAME = 8] = "MISSING_PAGEVIEW_NAME",
e[e.INVALID_SESSION_STATE = 9] = "INVALID_SESSION_STATE"
}(e.TelemetryError || (e.TelemetryError = {}));
var s = e.TelemetryError
, o = function() {
function e(e) {
this.errorCode = null ,
this.errorCode = e
}
return e.prototype.ErrorCode = function() {
return this.errorCode
}
,
e.prototype.toString = function() {
switch (this.errorCode) {
case 1:
return "Invalid tenant token";
case 2:
return "Eventproperties.name can not be null or empty";
case 3:
return "Invalid Key. Key does not conform to regular expression ^[a-zA-Z0-9](([a-zA-Z0-9|_|.]){0,98}[a-zA-Z0-9])?$";
case 4:
return "Collector url can't be null or empty.";
case 5:
return "Failure signature can't be null or empty.";
case 6:
return "Failure detail can't be null or empty.";
case 7:
return "Pageview id can't be null or empty.";
case 8:
return "Pageview name can't be null or empty.";
case 9:
return "Session state has to be a value from the SessionState enum.";
default:
return "Unknown error"
}
}
,
e
}();
e.Exception = o;
var u = function() {
function e() {
this.contextMap = new Microsoft.Bond.Collections.Map,
this.piiKind = 10
}
return e.prototype.setAppId = function(e) {
e && this.contextMap.Add("AppInfo.Id", e)
}
,
e.prototype.setAppVersion = function(e) {
e && this.contextMap.Add("AppInfo.Version", e)
}
,
e.prototype.setAppLanguage = function(e) {
e && this.contextMap.Add("AppInfo.Language", e)
}
,
e.prototype.setDeviceId = function(e) {
e && this.contextMap.Add("DeviceInfo.Id", e)
}
,
e.prototype.setDeviceOsName = function(e) {
e && this.contextMap.Add("DeviceInfo.OsName", e)
}
,
e.prototype.setDeviceOsVersion = function(e) {
e && this.contextMap.Add("DeviceInfo.OsVersion", e)
}
,
e.prototype.setDeviceBrowserName = function(e) {
e && this.contextMap.Add("DeviceInfo.BrowserName", e)
}
,
e.prototype.setDeviceBrowserVersion = function(e) {
e && this.contextMap.Add("DeviceInfo.BrowserVersion", e)
}
,
e.prototype.setUserId = function(e, t) {
e && this.contextMap.Add("UserInfo.Id", e),
t && (this.piiKind = t)
}
,
e.prototype.setUserMsaId = function(e) {
e && this.contextMap.Add("UserInfo.MsaId", e)
}
,
e.prototype.setUserANID = function(e) {
e && this.contextMap.Add("UserInfo.ANID", e)
}
,
e.prototype.setUserAdvertisingId = function(e) {
e && this.contextMap.Add("UserInfo.AdvertisingId", e)
}
,
e.prototype.setUserTimeZone = function(e) {
e && this.contextMap.Add("UserInfo.TimeZone", e)
}
,
e.prototype.setUserLanguage = function(e) {
e && this.contextMap.Add("UserInfo.Language", e)
}
,
e
}()
, a = function() {
function t() {}
return t.initialize = function() {
var e = document.documentElement.lang;
e && t.semanticContext.setAppLanguage(e);
var n = window.navigator.userLanguage || window.navigator.language;
n && t.semanticContext.setUserLanguage(n);
var r = (new Date).getTimezoneOffset()
, i = r % 60
, s = (r - i) / 60
, o = "+";
s > 0 && (o = "-"),
t.semanticContext.setUserTimeZone(o + (s < 10 ? "0" + s : s.toString()) + ":" + (i < 10 ? "0" + i : i.toString())),
t.semanticContext.setDeviceBrowserName(t._getBrowserName()),
t.semanticContext.setDeviceBrowserVersion(t._getBrowserVersion()),
t.semanticContext.setDeviceOsName(t._getOsName()),
t.semanticContext.setDeviceOsVersion(t._getOsVersion()),
t._setupCookies()
}
,
t._setupCookies = function() {
var n = t._getCookie(t.DEVICE_ID_COOKIE);
n == "" ? (n = e.datamodels.utils.GetGuid(),
t._setCookie(t.DEVICE_ID_COOKIE, n),
t.semanticContext.setDeviceId(n)) : t.semanticContext.setDeviceId(n);
var r = t._getCookie(t.FIRST_LAUNCH_TIME_COOKIE);
r == "" && (r = (new Date).getTime().toString(),
t._setCookie(t.FIRST_LAUNCH_TIME_COOKIE, r)),
t.firstLaunchTime = parseInt(r)
}
,
t._setCookie = function(e, t) {
var n = "expires=Mon, 31 Dec 2029 23:59:59 GMT";
document.cookie = e + "=" + t + "; " + n
}
,
t._getCookie = function(e) {
var t = e + "="
, n = document.cookie.split(";");
for (var r = 0; r < n.length; r++) {
var i = n[r]
, s = 0;
while (i.charAt(s) == " ")
s++;
i = i.substring(s);
if (i.indexOf(t) == 0)
return i.substring(t.length, i.length)
}
return ""
}
,
t._getUserAgent = function() {
return window.navigator.userAgent
}
,
t._userAgentContainsString = function(e) {
return t._getUserAgent().indexOf(e) > -1
}
,
t._isIe = function() {
return t._userAgentContainsString("Trident")
}
,
t._isEdge = function() {
return t._userAgentContainsString(t.BROWSERS.EDGE)
}
,
t._isOpera = function() {
return t._userAgentContainsString("OPR/")
}
,
t._getBrowserName = function() {
return t._isOpera() ? t.BROWSERS.UNKNOWN : t._userAgentContainsString(t.BROWSERS.PHANTOMJS) ? t.BROWSERS.PHANTOMJS : t._isEdge() ? t.BROWSERS.EDGE : t._userAgentContainsString(t.BROWSERS.ELECTRON) ? t.BROWSERS.ELECTRON : t._userAgentContainsString(t.BROWSERS.CHROME) ? t.BROWSERS.CHROME : t._userAgentContainsString(t.BROWSERS.FIREFOX) ? t.BROWSERS.FIREFOX : t._userAgentContainsString(t.BROWSERS.SAFARI) ? t.BROWSERS.SAFARI : t._userAgentContainsString(t.BROWSERS.SKYPE_SHELL) ? t.BROWSERS.SKYPE_SHELL : t._isIe() ? t.BROWSERS.MSIE : t.BROWSERS.UNKNOWN
}
,
t._getBrowserVersion = function() {
function e() {
var e, n = t._getUserAgent(), r = n.match(new RegExp(t.BROWSERS.MSIE + " " + t.REGEX_VERSION));
if (r)
return r[1];
e = n.match(new RegExp("rv:" + t.REGEX_VERSION));
if (e)
return e[1]
}
function n(e) {
var n;
return e === t.BROWSERS.SAFARI && (e = "Version"),
n = t._getUserAgent().match(new RegExp(e + "/" + t.REGEX_VERSION)),
n ? n[1] : t.UNKNOWN_VERSION
}
return t._isIe() ? e() : n(t._getBrowserName())
}
,
t._getOsName = function() {
var e = /(windows|win32)/i
, n = / arm;/i
, r = /windows\sphone\s\d+\.\d+/i
, i = /(macintosh|mac os x)/i
, s = /(iPad|iPhone|iPod)(?=.*like Mac OS X)/i
, o = /(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)/i
, u = /android/i;
return t._getUserAgent().match(r) ? t.OPERATING_SYSTEMS.WINDOWS_PHONE : t._getUserAgent().match(n) ? t.OPERATING_SYSTEMS.WINDOWS_RT : t._getUserAgent().match(s) ? t.OPERATING_SYSTEMS.IOS : t._getUserAgent().match(u) ? t.OPERATING_SYSTEMS.ANDROID : t._getUserAgent().match(o) ? t.OPERATING_SYSTEMS.LINUX : t._getUserAgent().match(i) ? t.OPERATING_SYSTEMS.MACOSX : t._getUserAgent().match(e) ? t.OPERATING_SYSTEMS.WINDOWS : t.OPERATING_SYSTEMS.UNKNOWN
}
,
t._getOsVersion = function() {
function e() {
var e = t._getUserAgent().match(new RegExp("Windows NT " + t.REGEX_VERSION));
return e && t.VERSION_MAPPINGS[e[1]] ? t.VERSION_MAPPINGS[e[1]] : t.UNKNOWN_VERSION
}
function n() {
var e = t._getUserAgent().match(new RegExp(t.OPERATING_SYSTEMS.MACOSX + " " + t.REGEX_VERSION_MAC));
if (e) {
var n = e[1].replace(/_/g, ".")
, i = [];
if (n) {
var s = r(n);
return s ? (i = n.split(s),
i[0]) : n
}
}
return t.UNKNOWN_VERSION
}
function r(e) {
return e.indexOf(".") > -1 ? "." : e.indexOf("_") > -1 ? "_" : null
}
return t._getOsName() === t.OPERATING_SYSTEMS.WINDOWS ? e() : t._getOsName() === t.OPERATING_SYSTEMS.MACOSX ? n() : t.UNKNOWN_VERSION
}
,
t.semanticContext = new u,
t.firstLaunchTime = -1,
t.BROWSERS = {
MSIE: "MSIE",
CHROME: "Chrome",
FIREFOX: "Firefox",
SAFARI: "Safari",
EDGE: "Edge",
ELECTRON: "Electron",
SKYPE_SHELL: "SkypeShell",
PHANTOMJS: "PhantomJS",
UNKNOWN: "Unknown"
},
t.OPERATING_SYSTEMS = {
WINDOWS: "Windows",
MACOSX: "Mac OS X",
WINDOWS_PHONE: "Windows Phone",
WINDOWS_RT: "Windows RT",
IOS: "iOS",
ANDROID: "Android",
LINUX: "Linux",
UNKNOWN: "Unknown"
},
t.VERSION_MAPPINGS = {
5.1: "XP",
"6.0": "Vista",
6.1: "7",
6.2: "8",
6.3: "8.1",
"10.0": "10"
},
t.REGEX_VERSION = "([\\d,.]+)",
t.REGEX_VERSION_MAC = "([\\d,_,.]+)",
t.UNKNOWN_VERSION = "Unknown",
t.DEVICE_ID_COOKIE = "MicrosoftApplicationsTelemetryDeviceId",
t.FIRST_LAUNCH_TIME_COOKIE = "MicrosoftApplicationsTelemetryFirstLaunchTime",
t
}();
(function(e) {
e[e.STARTED = 0] = "STARTED",
e[e.ENDED = 1] = "ENDED"
})(e.SessionState || (e.SessionState = {}));
var f = e.SessionState
, l = function() {
function n() {}
return n.initialize = function(e) {
if (!n._initialized) {
if (!e)
throw new o(1);
n._defaultToken = e,
n._config.collectorUrl || (n._config.collectorUrl = "https://browser.pipe.aria.microsoft.com/Collector/3.0/"),
t.Initialize(n._config),
t.Start(),
a.initialize(),
n._initialized = !0
}
}
,
n.initializeWithConfiguration = function(e, t) {
if (!t.collectorUrl)
throw new o(4);
n._config.collectorUrl = t.collectorUrl,
n.initialize(e)
}
,
n.flush = function(e) {
t.Flush(e)
}
,
n.addCallbackListener = function(e) {
n._initialized && t.AddListener(e)
}
,
n.setContext = function(e, t, r) {
n._contextProperties.setProperty(e, t, r)
}
,
n.isInitialized = function() {
return n._initialized
}
,
n.getDefaultToken = function() {
return n._defaultToken
}
,
n.getSemanticContext = function() {
return n._semanticContext
}
,
n.__backToUninitialized = function() {
n._config = new e._sender.TelemetryConfig,
n._semanticContext = new u,
n._contextProperties = new i,
t = e._sender.TelemetryManagerFactory.CreateTelemetryManager(),
n._initialized = !1
}
,
n._initialized = !1,
n._defaultToken = null ,
n._config = new e._sender.TelemetryConfig,
n._contextProperties = new i,
n._semanticContext = new u,
n
}();
e.LogManager = l;
var c = function() {
function n(t) {
this._initId = e.datamodels.utils.GetGuid(),
this._sequence = 0,
this._tenantToken = null ,
this._contextProperties = new i,
this._semanticContext = new u,
this._sessionStartTime = 0,
this._sessionId = null ,
t ? this._tenantToken = t : this._tenantToken = l.getDefaultToken()
}
return n.prototype.logEvent = function(e) {
if (!e.name)
throw new o(2);
var t = this._createEventRecord(e.name, e.eventType);
this._addCustomPropertiesToEvent(t, e),
this._sendRecord(t)
}
,
n.prototype.logFailure = function(e, t, n, r, i) {
if (!e)
throw new o(5);
if (!t)
throw new o(6);
var s = this._createEventRecord("failure", "failure");
s.Extension.Add("Failure.Signature", e),
s.Extension.Add("Failure.Detail", t),
n && s.Extension.Add("Failure.Category", n),
r && s.Extension.Add("Failure.Id", r),
this._addCustomPropertiesToEvent(s, i),
this._sendRecord(s)
}
,
n.prototype.logPageView = function(e, t, n, r, i, s) {
if (!e)
throw new o(7);
if (!t)
throw new o(8);
var u = this._createEventRecord("pageview", "pageview");
u.Extension.Add("PageView.Id", e),
u.Extension.Add("PageView.Name", t),
n && u.Extension.Add("PageView.Category", n),
r && u.Extension.Add("PageView.Uri", r),
i && u.Extension.Add("PageView.ReferrerUri", i),
this._addCustomPropertiesToEvent(u, s),
this._sendRecord(u)
}
,
n.prototype.logSession = function(t, n) {
if (t !== 0 && t !== 1)
throw new o(9);
var r = this._createEventRecord("session", "session");
if (t === 0) {
if (this._sessionStartTime > 0)
return;
this._sessionStartTime = (new Date).getTime(),
this._sessionId = e.datamodels.utils.GetGuid(),
r.Extension.Add("Session.Id", this._sessionId),
r.Extension.Add("Session.State", "Started")
} else if (t === 1) {
if (this._sessionStartTime == 0)
return;
var i = Math.floor(((new Date).getTime() - this._sessionStartTime) / 1e3);
r.Extension.Add("Session.Duration", i.toString()),
r.Extension.Add("Session.DurationBucket", this._getSessionDurationFromTime(i)),
r.Extension.Add("Session.Id", this._sessionId),
r.Extension.Add("Session.State", "Ended"),
this._sessionId = null ,
this._sessionStartTime = 0
}
r.Extension.Add("Session.FirstLaunchTime", this._getISOString(new Date(a.firstLaunchTime))),
this._addCustomPropertiesToEvent(r, n),
this._sendRecord(r)
}
,
n.prototype.getSessionId = function() {
return this._sessionId
}
,
n.prototype.setContext = function(e, t, n) {
this._contextProperties.setProperty(e, t, n)
}
,
n.prototype.getSemanticContext = function() {
return this._semanticContext
}
,
n.prototype._getSessionDurationFromTime = function(e) {
return e < 0 ? "Undefined" : e <= 3 ? "UpTo3Sec" : e <= 10 ? "UpTo10Sec" : e <= 30 ? "UpTo30Sec" : e <= 60 ? "UpTo60Sec" : e <= 180 ? "UpTo3Min" : e <= 600 ? "UpTo10Min" : e <= 1800 ? "UpTo30Min" : "Above30Min"
}
,
n.prototype._createEventRecord = function(t, n) {
var r = new e.datamodels.Record;
n || (n = "custom"),
r.EventType = t.toLowerCase(),
r.Type = n.toLowerCase(),
r.Extension.Add("EventInfo.Source", "JS_default_source"),
r.Extension.Add("EventInfo.InitId", this._initId),
this._sequence++,
r.Extension.Add("EventInfo.Sequence", this._sequence.toString()),
r.Extension.Add("EventInfo.Name", t.toLowerCase());
var i = new Date;
return r.Timestamp = e.datamodels.utils.GetTimeStampWithValue(i.getTime()),
r.Extension.Add("EventInfo.Time", this._getISOString(i)),
r.Extension.Add("EventInfo.SdkVersion", "ACT-Web-JS-" + clienttelemetry_build.version),
r
}
,
n.prototype._getISOString = function(e) {
function t(e) {
return e < 10 ? "0" + e : e.toString()
}
function n(e) {
return e < 10 ? "00" + e : e < 100 ? "0" + e : e.toString()
}
return e.getUTCFullYear() + "-" + t(e.getUTCMonth() + 1) + "-" + t(e.getUTCDate()) + "T" + t(e.getUTCHours()) + ":" + t(e.getUTCMinutes()) + ":" + t(e.getUTCSeconds()) + ":" + n(e.getUTCMilliseconds()) + "Z"
}
,
n.prototype._addCustomPropertiesToEvent = function(e, t) {
this._addSemanticContext(e, a.semanticContext),
this._addSemanticContext(e, l._semanticContext),
this._addSemanticContext(e, this._semanticContext),
this._sessionId && e.Extension.Add("Session.Id", this._sessionId),
this._addEventPropertiesToEvent(e, l._contextProperties),
this._addEventPropertiesToEvent(e, this._contextProperties),
this._addEventPropertiesToEvent(e, t)
}
,
n.prototype._addSemanticContext = function(e, t) {
if (t && t.contextMap.Count() > 0) {
var n = t.contextMap.GetBuffer();
for (var r = 0; r < n.length; r++)
n[r].Key == "UserInfo.Id" && t.piiKind != 0 ? e.AddOrReplacePII(n[r].Key, n[r].Value, t.piiKind) : e.Extension.AddOrReplace(n[r].Key, n[r].Value)
}
}
,
n.prototype._addEventPropertiesToEvent = function(t, n) {
if (n) {
n.timestamp && n.timestamp >= (new Date("1/1/2000")).getTime() && (t.Timestamp = e.datamodels.utils.GetTimeStampWithValue(n.timestamp),
t.Extension.AddOrReplace("EventInfo.Time", (new Date(n.timestamp)).toISOString())),
n.name && (t.EventType = n.name.toLowerCase(),
t.Extension.AddOrReplace("EventInfo.Name", n.name.toLowerCase()));
var r = n.properties;
if (r && r.length > 0)
for (var i = 0; i < r.length; i++)
r[i].key && typeof r[i].key == "string" && (r[i].value || r[i].value == 0 || r[i].value == 0 || r[i].value == "") && (this._isPii(r[i].pii) ? (t.AddOrReplacePII(r[i].key, r[i].value.toString(), r[i].pii),
t.Extension.Remove(r[i].key)) : (t.Extension.AddOrReplace(r[i].key, r[i].value.toString()),
t.PIIExtensions.Remove(r[i].key)))
}
}
,
n.prototype._isPii = function(t) {
if (t == (null || undefined || 0))
return !1;
var n = !1;
for (var r in e.datamodels.PIIKind)
isNaN(r) || r == t && (n = !0);
return n
}
,
n.prototype._sendRecord = function(e) {
l.isInitialized() && t.SendAsync(this._tenantToken, [e])
}
,
n
}();
e.Logger = c
})(e.telemetry || (e.telemetry = {}));
var t = e.telemetry
})(e.applications || (e.applications = {}));
var t = e.applications
})(microsoft || (microsoft = {})),
define("vendor/aria", function() {}),
require(["vendor/aria"]),
function(e) {
function t() {
function s(t, n) {
Object.keys(n).forEach(function(r) {
var i = n[r];
if (Array.isArray(i)) {
if (!u(i[0]))
throw new Error("Value should be string, number or boolean.");
if (typeof i[1] != "number")
throw new Error("PIIType should be number");
t.setProperty(r, a(i[0]), i[1])
} else
u(i) && t.setProperty(r, a(i), e.skypeTelemetryManager.PIIType.NotSet)
})
}
function o(e) {
Object.keys(t).forEach(function(n) {
var r = t[n]
, i = typeof r[0] == "function" ? r[0]() : r[0];
e.setProperty(n, a(i), r[1])
})
}
function u(e) {
return typeof e == "string" || typeof e == "number" || typeof e == "boolean"
}
function a(e) {
return e + ""
}
var t = {}, n = {}, r = {}, i;
this.setCommonProperty = function(n, r, i) {
if (typeof n != "string")
throw new Error("Property name should be string");
if (typeof i != "undefined" && typeof i != "number")
throw new Error("PIIType should be number");
if (!u(r) && typeof r != "function")
throw new Error("Value should be string, number, boolean or function.");
var s = typeof i == "undefined" ? e.skypeTelemetryManager.PIIType.NotSet : i;
t[n] = [r, s]
}
,
this.setSkypeUserId = function(t) {
this.setCommonProperty("user_id", t, e.skypeTelemetryManager.PIIType.Identity),
this.setCommonProperty("Skype_InitiatingUser_Username", t)
}
,
this.sendEvent = function(e, t, u) {
if (typeof e != "string")
throw new Error("Tenant ID should be string");
if (typeof t != "string")
throw new Error("Event name should be string");
n[e] || (microsoft.applications.telemetry.LogManager.initialize(e),
n[e] = new microsoft.applications.telemetry.Logger(e),
r[e] = n[e].getSemanticContext(),
r[e].setAppVersion(i));
var a = new microsoft.applications.telemetry.EventProperties;
a.name = t,
s(a, u),
o(a),
n[e].logEvent(a)
}
,
this.setAppProperties = function(e) {
i = e
}
}
e.skypeTelemetryManager || (e.skypeTelemetryManager = {}),
e.skypeTelemetryManager.PIIType = {
NotSet: 0,
DistinguishedName: 1,
GenericData: 2,
IPV4Address: 3,
IPv6Address: 4,
MailSubject: 5,
PhoneNumber: 6,
QueryString: 7,
SipAddress: 8,
SmtpAddress: 9,
Identity: 10,
Uri: 11,
Fqdn: 12
},
e.skypeTelemetryManager.create = function() {
return new t
}
}(window),
define("telemetry/manager/telemetryManager", function() {}),
define("ui/session/localSession", ["require", "exports", "module", "swx-utils-common", "swx-utils-common"], function(e, t) {
var n = e("swx-utils-common").guid, r = e("swx-utils-common").sessionStorage, i = {}, s, o = n.create(), u = "swx-sessionid";
t.getSessionId = function() {
return s ? s : (s = r.get(u),
s || (s = n.create(),
r.set(u, s)),
s)
}
,
t.getTabSessionId = function() {
return o
}
,
t.setTelemetrySessionValue = function(e, t) {
if (!t)
throw new Error("You are trying to set session parameter with a null value. Key:" + e);
i[e] = t
}
,
t.getTelemetrySessionKeyValuePairs = function() {
var e = {};
for (var t in i)
i.hasOwnProperty(t) && (e[t] = i[t]);
return e
}
}),
define("ui/telemetry/telemetryClient", ["require", "exports", "module", "telemetry/manager/telemetryManager", "experience/settings", "browser/window", "ui/session/localSession", "browser/detect"], function(e, t) {
function u(e) {
m(e, "session_id", i.getSessionId()),
m(e, "tab_session_id", i.getTabSessionId())
}
function a(e) {
var t = s.getBrowserInfo();
e.setCommonProperty("user_agent_name", t.browserName),
e.setCommonProperty("user_agent_version", t.browserMajorVersion)
}
function f(e) {
var t = s.getSystemInfo();
e.setCommonProperty("user_agent_OS", t.osName),
e.setCommonProperty("user_agent_OS_version", t.osVersion),
e.setCommonProperty("device_type", t.deviceType)
}
function l(e) {
var t = s.getScreenInfo();
e.setCommonProperty("screen_width", t.width),
e.setCommonProperty("screen_height", t.height)
}
function c(e) {
n.eTag && e.setCommonProperty("etag", n.eTag),
n.configIds && n.configIds.length > 0 && e.setCommonProperty("cfg_ids", n.configIds + "")
}
function h(e) {
return n.telemetry.upnCorrelationIdEnabled ? -1 : e.indexOf("upn")
}
function p(e) {
var t = 0
, r = 128
, i = 10
, s = -1
, o = [];
if (!n.initParams || !n.initParams.correlationIds)
return;
o = Object.keys(n.initParams.correlationIds),
s = h(o),
s > -1 && o.splice(s, 1),
o.forEach(function(s) {
t++;
var o = n.initParams.correlationIds[s];
o && o !== "" && o.length <= r && t <= i && e.setCommonProperty("cid_" + s, o)
})
}
function d(e) {
n.initParams && (m(e, "environment_id", n.initParams.environment),
m(e, "api_key", n.initParams.apiKey),
m(e, "locale", n.initParams.locale)),
e.setCommonProperty("ui_version", n.uiVersion),
e.setCommonProperty("version", n.version),
e.setCommonProperty("property", n.biAppName),
e.setCommonProperty("Client_Name", n.biClientName)
}
function v(e) {
if (!n.telemetry.selectedTargets)
return;
for (var t = 0; t < n.telemetry.selectedTargets.length; t++) {
var i = new RegExp(n.telemetry.selectedTargets[t]);
if (i.test(r.location.hostname)) {
e.setCommonProperty("selected_target", !0);
break
}
}
}
function m(e, t, n) {
if (!n)
return;
e.setCommonProperty(t, n)
}
function g(e) {
e.setAppProperties(n.version),
u(e),
a(e),
f(e),
l(e),
p(e),
d(e),
c(e),
v(e)
}
e("telemetry/manager/telemetryManager");
var n = e("experience/settings"), r = e("browser/window"), i = e("ui/session/localSession"), s = e("br
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment