You are on page 1of 19

:function(a){this.$14(a)},$E:function(a){this.$14(a)},$F:function(a){this.

$14(a)
},
$10:function(a){this.$14(a)},$11:function(a){this.$14(a)},$12:function(a){this.$
14(a)},$13:function(a){this.$14(a)},$14:function(){}};MSP.P$C=function(a){MSP.P$
C.initializeBase(this,[a]);a.setTransferServer(null,null)};MSP.P$C.prototype={$8
:function(a){a.get_$1A()&&this.get_$1().$C(new MSP.P$E(this.get_$1(),a));this.ge
t_$1().$B(a)},$9:function(a){this.get_$1().$B(a)},$C:function(a){this.get_$1().$
B(a)},$D:function(a){this.get_$1().$B(a)},$10:function(a){this.get_$1().$B(a)},$
13:function(a){this.get_$1().$B(a)},
$12:function(a){this.get_$1().$B(a)},$11:function(a){this.get_$1().$B(a)},$A:fun
ction(a){this.get_$1().$B(a)},$B:function(a){this.get_$1().$B(a)},$3:function(a)
{this.get_$1().$B(a)},$4:function(a){this.get_$1().$B(a)},$5:function(a){this.ge
t_$1().$B(a)},$6:function(a){this.get_$1().$B(a)},$E:function(a){this.get_$1().$
C(new MSP.P$D(this.get_$1()));this.get_$1().$B(a)},$F:function(a){this.get_$1().
$C(new MSP.P$D(this.get_$1()));this.get_$1().$B(a)}};MSP.P$F=function(a){this.$2
1=[];MSP.P$F.initializeBase(this,
[a])};MSP.P$F.prototype={$15:null,$16:null,$17:null,$18:null,$19:!1,$1A:!1,$1B:!
1,$1C:!1,$1D:!1,$1E:!1,$1F:!1,$20:!1,$22:!1,$23:null,$24:null,$25:0,$7:function(
a,b,c,d,e,f){this.$18=b;this.$17=c;this.$16=d;this.$15=e;this.$23=f;this.$24=thi
s.$15.get_$11();this.$25=a;this.$26();this.$27();1!==a&&(this.$2B(),this.$29(),t
his.$2C())},$8:function(a){a.get_$1A()&&this.get_$1().$C(new MSP.P$E(this.get_$1
(),a));this.get_$1().$B(a)},$C:function(a){null==this.$24?this.$21.enqueue(a):MS
H.ContactHelper.areIMAddressesEqual(a.get_$C(),
this.$15.get_$10())?(this.$24.updateAll(a.get_$D().toArray()),this.$1A=!0,this.$
2C()):this.$21.enqueue(a)},$D:function(a){null==this.$24?this.$21.enqueue(a):MSH
.ContactHelper.areIMAddressesEqual(a.get_$C(),this.$15.get_$10())?this.$24.delet
eAll(a.get_$D().toArray()):this.$21.enqueue(a)},$13:function(a){this.$21.enqueue
(a)},$11:function(a){this.$21.enqueue(a)},$12:function(a){this.$21.enqueue(a)},$
10:function(a){this.$21.enqueue(a)},$E:function(a){this.get_$1().$C(new MSP.P$D(
this.get_$1()));this.get_$1().$B(a)},
$F:function(a){this.get_$1().$C(new MSP.P$D(this.get_$1()));this.get_$1().$B(a)}
,$26:function(){if(0<this.$21.length){MSH.Logger.logTrace(this.get_$1().get_logC
ontext(),"CsSigningInState.SignIn","Dispatching queued presence commands");var a
=this.$21;this.$21=[];for(var b=a.length,c=0;c<b;c++){var d=a.dequeue();Type.can
Cast(d,MSP.P$21)?this.$C(d):Type.canCast(d,MSP.P$20)?this.$D(d):this.$21.enqueue
(d)}}this.$22=!0},$27:function(){this.$1D||(this.$1D=!0,this.$18.add_$7(ss.Deleg
ate.create(this,this.$28)),
this.get_$1().$B(this.$18))},$28:function(){this.$1E=!0;this.$18.remove_$7(ss.De
legate.create(this,this.$28));this.$2E(this.$18.get_$D())},$29:function(){this.$
1F||(this.$1F=!0,this.$17.add_$7(ss.Delegate.create(this,this.$2A)),this.get_$1(
).$B(this.$17))},$2A:function(){this.$20=!0;this.$17.remove_$7(ss.Delegate.creat
e(this,this.$2A));this.$2E(this.$17.get_$10())},$2B:function(){if(null==this.$16
)this.$1C=!0;else if(!this.$1C){this.$1C=!0;for(var a=ss.IEnumerator.getEnumerat
or(this.$16);a.moveNext();){var b=
a.get_current();this.get_$1().$B(b)}this.$2E(0)}},$2C:function(){!this.$19&&(thi
s.$22&&this.$1A)&&(this.$19=!0,this.$15.add_$7(ss.Delegate.create(this,this.$2D)
),this.get_$1().$B(this.$15))},$2D:function(){this.$1B=!0;this.$15.remove_$7(ss.
Delegate.create(this,this.$2D));this.$2E(this.$15.get_$12())},$2E:function(a){(0
!==a||this.$1C&&this.$1B&&this.$1E&&this.$20||1===this.$25&&this.$1E)&&this.$2F(
a)},$2F:function(a){0===a?this.get_$1().$C(new MSP.P$C(this.get_$1())):this.get_
$1().$C(new MSP.P$D(this.get_$1()));
this.$23.$E(a,this.$15.get_$10(),this.$24);this.get_$1().$B(this.$23);if(0===a){
for(var a=this.$21.length,b=0;b<a;b++)this.get_$1().$B(this.$21.dequeue());this.
get_$1().onSignInEventsEmpty()}}};MSP.P$D=function(a){MSP.P$D.initializeBase(thi
s,[a])};MSP.P$D.prototype={$2:function(a){this.get_$1().$C(new MSP.P$F(this.get_
$1()));this.get_$1().$B(a)}};MSP.P$E=function(a,b){MSP.P$E.initializeBase(this,[
a]);this.$15=b};MSP.P$E.prototype={$15:null,$F:function(){this.get_$1().$C(new M
SP.P$D(this.get_$1()));
this.$15.$5()}};MSP.ServiceDataDocumentType=function(){};MSP.ServiceDataDocument
Type.prototype={put:0,del:1};MSP.ServiceDataDocumentType.registerEnum("MSP.Servi

ceDataDocumentType",!1);MSP.P$3=function(a){this.$0=a};MSP.P$3.$4=function(a){if
(String.isNullOrEmpty(a))return 6;switch(MSH.StringHelper.toLowerCase(a)){case "
active":return 0;case "saved":return 3;case "draft":return 4;case "trash":return
1;case "hm_bulkmail_":return 2;case "00000000-0000-0000-0000-000000000006":case
"00000000-0000-0000-0000-000000000007":case "00000000-0000-0000-0000-0000000000
08":case "00000000-0000-0000-0000-000000000009":return 6;
default:return 5}};MSP.P$3.prototype={$0:null,$1:null,get_$2:function(){return t
his.$1},$3:function(){var a=new MSM.MimeParser(this.$0.getBody());switch(MSH.Str
ingHelper.splitChar(this.$0.getHeader("Content-Type"),";")[0]){case "text/x-msms
gsinitialmdatanotification":var b=ss.XmlDocumentParser.parse(a.getHeader("Mail-D
ata")),b=null!=b?b.documentElement:null;if(null==b){MSH.Logger.logError(MC.LogCo
ntext.get_global(),"Presence.MailNotificationParser.Parse","Unable to parse mail
data: "+a.getHeader("Mail-Data"));
break}a=MSH.XmlHelper.selectSingleNode(b,"E");if(null==a)break;for(var b=["IU","
I","OU","O"],c=[0,0,0,0],d=0;d<b.length;d++){var e=MSH.XmlHelper.selectSingleNod
e(a,b[d]);null!=e&&(e=MSH.XmlHelper.xmlNodeValue(e.firstChild),null!=e&&(c[d]=MS
H.ConvertHelper.parseInt(e)))}this.$1=[MC.$create_MailNotificationInfo(MC.$creat
e_MailNotificationInitialInfo(c[0],c[1],c[2],c[3]),0)];return!0;case "text/x-msm
sgsemailnotification":return b=MSP.P$3.$4(a.getHeader("Dest-Folder")),this.$1=[M
C.$create_MailNotificationInfo(MC.$create_MailNotificationIncomingInfo(a.getHead
er("From"),
a.getHeader("From-Addr"),a.getHeader("Message-URL"),a.getHeader("Subject"),b,a.g
etHeader("id")),1),MC.$create_MailNotificationInfo(MC.$create_MailNotificationAc
tivityInfo(b,b,-1),2)],!0;case "text/x-msmsgsactivemailnotification":return this
.$1=[MC.$create_MailNotificationInfo(MC.$create_MailNotificationActivityInfo(MSP
.P$3.$4(a.getHeader("Src-Folder")),MSP.P$3.$4(a.getHeader("Dest-Folder")),MSH.Co
nvertHelper.parseInt(a.getHeader("Message-Delta"))),2)],!0}return!1}};MSP.P$1=fu
nction(){this.$12=[0,
0,0,0];this.$13=[0,0];this.$14=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
;this.$15()};MSP.P$1.f=function(a,b,c){return a&b|~a&c};MSP.P$1.g=function(a,b,c
){return a&c|b&~c};MSP.P$1.h=function(a,b,c){return a^b^c};MSP.P$1.i=function(a,
b,c){return b^(a|~c)};MSP.P$1.$11=function(a,b){return a<<b|a>>>32-b};MSP.P$1.FF
=function(a,b,c,d,e,f,g){a+=MSP.P$1.f(b,c,d)+e+g;a=MSP.P$1.$11(a,f);return a+b};
MSP.P$1.GG=function(a,
b,c,d,e,f,g){a+=MSP.P$1.g(b,c,d)+e+g;a=MSP.P$1.$11(a,f);return a+b};MSP.P$1.HH=f
unction(a,b,c,d,e,f,g){a+=MSP.P$1.h(b,c,d)+e+g;a=MSP.P$1.$11(a,f);return a+b};MS
P.P$1.II=function(a,b,c,d,e,f,g){a+=MSP.P$1.i(b,c,d)+e+g;a=MSP.P$1.$11(a,f);retu
rn a+b};MSP.P$1.$1B=function(a,b,c,d,e){for(var f=0;f<e;f++)c[d+f]=a[b+f]};MSP.P
$1.prototype={$15:function(){this.$13[0]=this.$13[1]=0;this.$12[0]=1732584193;th
is.$12[1]=4023233417;this.$12[2]=2562383102;this.$12[3]=271733878},$16:function(
a,b,c){var d,e;e=this.$13[0]>>>
3&63;(this.$13[0]+=c<<3)<c<<3&&this.$13[1]++;this.$13[1]+=c>>>29;d=64-e;if(c>=d)
{MSP.P$1.$1B(a,b,this.$14,e,d);for(this.$18(this.$14,0);d+63<c;d+=64)this.$18(a,
b+d);e=0}else d=0;MSP.P$1.$1B(a,b+d,this.$14,e,c-d)},$17:function(){var a=Array(
16),b=Array(8),c;this.$19(b,0,this.$13,0,8);c=this.$13[0]>>>3&63;this.$16(MSP.P$
1.$10,0,56>c?56-c:120-c);this.$16(b,0,8);this.$19(a,0,this.$12,0,16);this.$13[0]
=this.$13[1]=0;this.$12[0]=0;this.$12[1]=0;this.$12[2]=0;this.$12[3]=0;this.$15(
);return a},$18:function(a,
b){var c=this.$12[0],d=this.$12[1],e=this.$12[2],f=this.$12[3],g=Array(16);this.
$1A(g,0,a,b,64);c=MSP.P$1.FF(c,d,e,f,g[0],7,3614090360);f=MSP.P$1.FF(f,c,d,e,g[1
],12,3905402710);e=MSP.P$1.FF(e,f,c,d,g[2],17,606105819);d=MSP.P$1.FF(d,e,f,c,g[
3],22,3250441966);c=MSP.P$1.FF(c,d,e,f,g[4],7,4118548399);f=MSP.P$1.FF(f,c,d,e,g
[5],12,1200080426);e=MSP.P$1.FF(e,f,c,d,g[6],17,2821735955);d=MSP.P$1.FF(d,e,f,c
,g[7],22,4249261313);c=MSP.P$1.FF(c,d,e,f,g[8],7,1770035416);f=MSP.P$1.FF(f,c,d,
e,g[9],12,2336552879);
e=MSP.P$1.FF(e,f,c,d,g[10],17,4294925233);d=MSP.P$1.FF(d,e,f,c,g[11],22,23045631
34);c=MSP.P$1.FF(c,d,e,f,g[12],7,1804603682);f=MSP.P$1.FF(f,c,d,e,g[13],12,42546
26195);e=MSP.P$1.FF(e,f,c,d,g[14],17,2792965006);d=MSP.P$1.FF(d,e,f,c,g[15],22,1
236535329);c=MSP.P$1.GG(c,d,e,f,g[1],5,4129170786);f=MSP.P$1.GG(f,c,d,e,g[6],9,3

225465664);e=MSP.P$1.GG(e,f,c,d,g[11],14,643717713);d=MSP.P$1.GG(d,e,f,c,g[0],20
,3921069994);c=MSP.P$1.GG(c,d,e,f,g[5],5,3593408605);f=MSP.P$1.GG(f,c,d,e,g[10],
9,38016083);e=MSP.P$1.GG(e,
f,c,d,g[15],14,3634488961);d=MSP.P$1.GG(d,e,f,c,g[4],20,3889429448);c=MSP.P$1.GG
(c,d,e,f,g[9],5,568446438);f=MSP.P$1.GG(f,c,d,e,g[14],9,3275163606);e=MSP.P$1.GG
(e,f,c,d,g[3],14,4107603335);d=MSP.P$1.GG(d,e,f,c,g[8],20,1163531501);c=MSP.P$1.
GG(c,d,e,f,g[13],5,2850285829);f=MSP.P$1.GG(f,c,d,e,g[2],9,4243563512);e=MSP.P$1
.GG(e,f,c,d,g[7],14,1735328473);d=MSP.P$1.GG(d,e,f,c,g[12],20,2368359562);c=MSP.
P$1.HH(c,d,e,f,g[5],4,4294588738);f=MSP.P$1.HH(f,c,d,e,g[8],11,2272392833);e=MSP
.P$1.HH(e,f,c,d,g[11],
16,1839030562);d=MSP.P$1.HH(d,e,f,c,g[14],23,4259657740);c=MSP.P$1.HH(c,d,e,f,g[
1],4,2763975236);f=MSP.P$1.HH(f,c,d,e,g[4],11,1272893353);e=MSP.P$1.HH(e,f,c,d,g
[7],16,4139469664);d=MSP.P$1.HH(d,e,f,c,g[10],23,3200236656);c=MSP.P$1.HH(c,d,e,
f,g[13],4,681279174);f=MSP.P$1.HH(f,c,d,e,g[0],11,3936430074);e=MSP.P$1.HH(e,f,c
,d,g[3],16,3572445317);d=MSP.P$1.HH(d,e,f,c,g[6],23,76029189);c=MSP.P$1.HH(c,d,e
,f,g[9],4,3654602809);f=MSP.P$1.HH(f,c,d,e,g[12],11,3873151461);e=MSP.P$1.HH(e,f
,c,d,g[15],16,530742520);
d=MSP.P$1.HH(d,e,f,c,g[2],23,3299628645);c=MSP.P$1.II(c,d,e,f,g[0],6,4096336452)
;f=MSP.P$1.II(f,c,d,e,g[7],10,1126891415);e=MSP.P$1.II(e,f,c,d,g[14],15,28786123
91);d=MSP.P$1.II(d,e,f,c,g[5],21,4237533241);c=MSP.P$1.II(c,d,e,f,g[12],6,170048
5571);f=MSP.P$1.II(f,c,d,e,g[3],10,2399980690);e=MSP.P$1.II(e,f,c,d,g[10],15,429
3915773);d=MSP.P$1.II(d,e,f,c,g[1],21,2240044497);c=MSP.P$1.II(c,d,e,f,g[8],6,18
73313359);f=MSP.P$1.II(f,c,d,e,g[15],10,4264355552);e=MSP.P$1.II(e,f,c,d,g[6],15
,2734768916);d=MSP.P$1.II(d,
e,f,c,g[13],21,1309151649);c=MSP.P$1.II(c,d,e,f,g[4],6,4149444226);f=MSP.P$1.II(
f,c,d,e,g[11],10,3174756917);e=MSP.P$1.II(e,f,c,d,g[2],15,718787259);d=MSP.P$1.I
I(d,e,f,c,g[9],21,3951481745);this.$12[0]+=c;this.$12[1]+=d;this.$12[2]+=e;this.
$12[3]+=f;for(c=0;c<g.length;c++)g[c]=0},$19:function(a,b,c,d,e){for(e=b+e;b<e;d
++,b+=4)a[b]=c[d]&255,a[b+1]=c[d]>>>8&255,a[b+2]=c[d]>>>16&255,a[b+3]=c[d]>>>24&
255},$1A:function(a,b,c,d,e){for(e=d+e;d<e;b++,d+=4)a[b]=c[d]|c[d+1]<<8|c[d+2]<<
16|c[d+3]<<24},$1C:function(a){for(var b=
Array(a.length),c=0;c<a.length;c++)b[c]=MSH.StringHelper.charCodeAt(a,c);this.$1
6(b,0,b.length);a=this.$17();b=new ss.StringBuilder;for(c=0;c<a.length;c++)b.app
end(MSH.StringHelper.charAt("0123456789abcdef",a[c]>>>4&15)),b.append(MSH.String
Helper.charAt("0123456789abcdef",a[c]&15));return b.toString()}};MSP.P$8=functio
n(){};MSP.P$8.prototype={$0:function(a){for(var b=new ss.StringBuilder,c=0;3>=c;
c++)b.append(MSH.StringHelper.charAt("0123456789abcdef",a>>8*c+4&15)),b.append(M
SH.StringHelper.charAt("0123456789abcdef",
a>>8*c&15));return b.toString()},$1:function(a,b,c){var d=a+b,b=8-d.length%8;8!=
=b&&(d=d.padRight(d.length+b,"0"));for(var e=d.length/4,b=[],f=0,g=0;f<e;f++)b.i
nsert(f,0),b[f]+=1*MSH.StringHelper.charCodeAt(d,g++),b[f]+=256*MSH.StringHelper
.charCodeAt(d,g++),b[f]+=65536*MSH.StringHelper.charCodeAt(d,g++),b[f]+=16777216
*MSH.StringHelper.charCodeAt(d,g++);d=Array(4);a=MSP.P$2.$1(a+c);for(e=c=0;c<d.l
ength;c++)d[c]=0,d[c]+=1*MSH.ConvertHelper.parseHexInt(MSH.StringHelper.substrin
g(a,e,2)),e+=2,d[c]+=
256*MSH.ConvertHelper.parseHexInt(MSH.StringHelper.substring(a,e,2)),e+=2,d[c]+=
65536*MSH.ConvertHelper.parseHexInt(MSH.StringHelper.substring(a,e,2)),e+=2,d[c]
+=16777216*MSH.ConvertHelper.parseHexInt(MSH.StringHelper.substring(a,e,2)),e+=2
;a=Array(2);this.$2(b,d,a);b=MSP.P$2.$3(d[0],a[0]);c=MSP.P$2.$3(d[1],a[1]);e=MSP
.P$2.$3(d[2],a[0]);d=MSP.P$2.$3(d[3],a[1]);return this.$0(b)+this.$0(c)+this.$0(
e)+this.$0(d)},$2:function(a,b,c){if(2>a.length||1===(a.length&1))return!1;for(v
ar d=b[1]&2147483647,
e=b[2]&2147483647,f=b[3]&2147483647,b=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix
,(b[0]&2147483647).toString()),d=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix,d.to
String()),e=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix,e.toString()),f=MSH.BigIn
t.parseDecInt(MSH.BigInt.decRadix,f.toString()),g=MSH.BigInt.parseDecInt(MSH.Big
Int.decRadix,(242854337).toString()),h=0,i=MSH.BigInt.parseDecInt(MSH.BigInt.dec
Radix,(2147483647).toString()),j=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix,"0")
,k=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix,
"0"),q=MSH.BigInt.parseDecInt(MSH.BigInt.decRadix,"0"),m=0;m<a.length/2;m++)j=MS

H.BigInt.parseDecInt(MSH.BigInt.decRadix,a[h++].toString()),j.multiply(g),j.modu
lus(i),k.add(j),k.multiply(b),k.add(d),k.modulus(i),q.add(k),k.add(MSH.BigInt.pa
rseDecInt(MSH.BigInt.decRadix,a[h++].toString())),k.multiply(e),k.add(f),k.modul
us(i),q.add(k);k.add(d);k.modulus(i);q.add(f);q.modulus(i);c[0]=MSH.ConvertHelpe
r.parseInt(k.toString());c[1]=MSH.ConvertHelper.parseInt(q.toString());return!0}
};MSP.P$7=function(a){this.$0=
a;this.$6()};MSP.P$7.prototype={$0:null,$1:0,$2:!1,get_$3:function(){return this
.$2},get_$4:function(){return this.$0.get_routing().get_from().get_address()},ge
t_$5:function(){return this.$1},$6:function(){var a=ss.XmlDocumentParser.parse(t
his.$0.get_content().get_body()).documentElement;if(null==a||"network"!==a.nodeN
ame)MSH.Logger.logError(MC.LogContext.get_global(),"NetworkDataReader.Parse",Str
ing.format("Parse: Invalid XML {0}",this.$0.get_content()));else{var b=0,b=a.sel
ectSingleNode("status");
if(null!=b){switch(b.text){case "SigningIn":b=1;break;case "SignedIn":b=2;break;
case "SignedOut":b=0;a=a.selectSingleNode("details");if(null!=a)switch(a.text){c
ase "AbnormalDisconnect":case "CredentialsFetchFailed":case "InternalServerError
":b=4}break;default:MSH.Logger.logError(MC.LogContext.get_global(),"NetworkDataR
eader.Parse",String.format("Invalid network status value {0}",this.$0.get_conten
t()));return}this.$1=b;this.$2=!0}}}};MSP.P$6=function(a,b,c){this.$4=a;this.$0=
c;this.$5=1===a.type&&
a.address===b};MSP.P$6.prototype={$0:null,$1:!1,$2:!1,$3:null,$4:null,$5:!1,get_
$6:function(){return this.$3},$7:function(){if(this.$1)return this.$2;var a=ss.X
mlDocumentParser.parse(this.$0).documentElement;if(null==a)return this.$A(String
.format("Parse: Invalid XML {0}",this.$0)),this.$2;if(!MSH.XmlHelper.isElement(a
,"user"))return this.$A(String.format("Parse: Invalid root node '{0}'",a.nodeNam
e)),this.$2;for(var b={},c={},a=ss.IEnumerator.getEnumerator(a.childNodes);a.mov
eNext();){var d=a.get_current(),
e=d.nodeName;if(!("s"!==e&&"sep"!==e)){var f=MSH.XmlHelper.getAttribute(d,"n");i
f(String.isNullOrEmpty(f))return this.$A(String.format("Parse: Missing service n
ame attribute in node '{0}'",d.nodeName)),this.$2;var g=this.$8(d,f);switch(e){c
ase "s":if(Object.keyExists(b,f))return this.$A(String.format("Parse: Duplicate
global service data nodes '{0}'",f)),this.$2;d=MC.ServiceDataHelper.parseService
Name(f);0!==d&&(b[f]=MC.$create_ServiceDataInfo(d,g,null));break;case "sep":e=MS
H.XmlHelper.getAttribute(d,
"epid");if(String.isNullOrEmpty(e))return this.$A(String.format("Parse: Missing
epid attribute in endpoint node '{0}'",d.nodeName)),this.$2;if(Object.keyExists(
c,f)){if(Object.keyExists(c[f],e))return this.$A(String.format("Parse: Duplicate
epid for service data nodes '{0}':{1}",f,e)),this.$2}else c[f]={};c[f][e]=MC.$c
reate_ServiceEndpointDataInfo(e,MC.ServiceDataHelper.parseServiceName(f),g)}}}va
r a=[],h;for(h in c)f=h,g=c[h],Object.keyExists(b,f)?(b[f].endpointData=g,a.add(
b[f]),delete b[f]):a.add(MC.$create_ServiceDataInfo(MC.ServiceDataHelper.parseSe
rviceName(f),
{},g));for(var i in b)c=b[i],c.endpointData={},a.add(c);this.$3=MSH.CollectionHe
lper.toArray(a);this.$B();return this.$2},$8:function(a,b){for(var c={},d=ss.IEn
umerator.getEnumerator(a.childNodes);d.moveNext();){var e=d.get_current(),f=e.no
deName;switch(f){case "WebAppData":e=this.$9(e);null!=e&&(c[f]=e);break;case "Sc
ene":case "UserTileLocation":case "DDP":this.$5&&(c[f]=e.text);break;default:c[f
]="CM"===b?e.xml:e.text}}Object.keyExists(c,"WebAppData")&&(Type.canCast(c.WebAp
pData,String)?delete c.WebAppData:
(d=c.WebAppData,Object.keyExists(c,"DMN")||(c.DMN=d.domain),(c.DMN!==MSCo.Config
uration.get_domainName()||d.domain!==MSCo.Configuration.get_domainName())&&delet
e c.WebAppData));return c},$9:function(a){var b=MSH.XmlHelper.getAttribute(a,"do
main");if(null==b||b!==MSCo.Configuration.get_domainName())return null;var c=[],
d=[],e=MSH.XmlHelper.selectNodes(a,"MsgIds/Id");if(null!=e)for(var f=e.length,g=
0;g<f;g++){var h=e[g].text;String.isNullOrEmpty(h)||c.add(h)}a=MSH.XmlHelper.sel
ectSingleNode(a,"Properties");
if(null!=a){e=a.childNodes.length;for(f=0;f<e;f++)g=a.childNodes[f],h=g.nodeName
,String.isNullOrEmpty(h)||d.add(MC.$create_KeyValuePair(h,g.text))}return MC.$cr
eate_ApplicationDataInfo(b,MSH.CollectionHelper.toArray(d),MSH.CollectionHelper.
toArray(c))},$A:function(a){MSH.Logger.logError(MC.LogContext.get_global(),"Serv

iceDataReader",a);this.$1=!0;this.$2=!1},$B:function(){this.$2=this.$1=!0},get_$
C:function(){return this.$1&&this.$2}};MSP.ServiceDataWriter=function(a,b,c,d){t
his.$5=new ss.StringBuilder;
this.$0=a;this.$1=b;this.$2=c;this.$3=d};MSP.ServiceDataWriter.prototype={$0:nul
l,$1:null,$2:0,$3:0,$4:!1,getPayload:function(){if(this.$4)return this.$5.toStri
ng();this.$5.append("<user>");for(var a=!1,b=ss.IEnumerator.getEnumerator(this.$
0);b.moveNext();){var c=b.get_current();if(this.$6(c.service)){switch(this.$3){c
ase 0:this.$7(c);this.$8(c);break;case 1:this.$9(c)}a=!0}}if(!a)return null;this
.$5.append("</user>");this.$4=!0;return this.$5.toString()},$6:function(a){retur
n(a&this.$2)===a},$7:function(a){var b=
this.$A(a.properties,!0,a.service);0<b.length&&(this.$5.append(String.format('<s
n="{0}">',MC.ServiceDataHelper.formatServiceType(a.service))),this.$5.append(b)
,this.$5.append(String.format("</s>")))},$8:function(a){var b=this.$1,c=a.servic
e;Object.keyExists(a.endpointData,b)||(a.endpointData[b]=MC.$create_ServiceEndpo
intDataInfo(b,c,MC.ServiceDataHelper.getDefaultOfflineEndpointData(c)));this.$5.
append(String.format('<sep n="{0}">',MC.ServiceDataHelper.formatServiceType(c)))
;this.$5.append(this.$A(a.endpointData[b].properties,
!1,c));this.$5.append(String.format("</sep>"))},$9:function(a){var b=a.endpointD
ata,c;for(c in b)b=c,this.$5.append(String.format('<sep n="{0}" epid="{1}"/>',MC
.ServiceDataHelper.formatServiceType(a.service),b))},$A:function(a,b,c){var d=ne
w ss.StringBuilder,e;for(e in a){var f=a[e],g=e;if(null!=f&&MC.ServiceDataHelper
.shouldPublishProperty(g,b,c))switch(g){case "WebAppData":d.append(this.$B(f));b
reak;default:d.append(String.format("<{0}>{1}</{0}>",MSH.XmlHelper.xmlEscape(g),
MSH.XmlHelper.xmlEscape(f)))}}2===
c&&(!b&&!Object.keyExists(a,"WebAppData"))&&d.append(this.$B(MC.$create_Applicat
ionDataInfo(a.DMN,[],[])));return d.toString()},$B:function(a){var b=new ss.Stri
ngBuilder;b.append(String.format('<WebAppData domain="{0}">',a.domain));b.append
("<MsgIds>");for(var c=0;c<a.messageIds.length;c++)b.append("<Id>"),b.append(MSH
.XmlHelper.xmlEscape(a.messageIds[c])),b.append("</Id>");b.append("</MsgIds>");b
.append("<Properties>");for(c=0;c<a.properties.length;c++)b.append(String.format
("<{0}>{1}</{0}>",MSH.XmlHelper.xmlEscape(a.properties[c].key),
MSH.XmlHelper.xmlEscape(a.properties[c].value)));b.append("</Properties>");b.app
end("</WebAppData>");return b.toString()}};MSP.P$9.registerClass("MSP.P$9");MSP.
P$A.registerClass("MSP.P$A",MSP.P$9);MSP.P$16.registerClass("MSP.P$16",MSP.P$9);
MSP.P$15.registerClass("MSP.P$15",MSP.P$9);MSP.P$18.registerClass("MSP.P$18",MSP
.P$9);MSP.P$17.registerClass("MSP.P$17",MSP.P$9);MSP.ConnectionService.registerC
lass("MSP.ConnectionService",null,MC.IConnectionService,MC.IConnectionServiceEve
nts);MSP.P$12.registerClass("MSP.P$12",
MSP.P$9);MSP.P$11.registerClass("MSP.P$11",MSP.P$9);MSP.P$14.registerClass("MSP.
P$14",MSP.P$9);MSP.P$13.registerClass("MSP.P$13",MSP.P$9);MSP.P$19.registerClass
("MSP.P$19",MSP.P$9);MSP.P$1F.registerClass("MSP.P$1F",MSP.P$9);MSP.P$1E.registe
rClass("MSP.P$1E",MSP.P$9);MSP.P$21.registerClass("MSP.P$21",MSP.P$9);MSP.P$20.r
egisterClass("MSP.P$20",MSP.P$9);MSP.P$1B.registerClass("MSP.P$1B",MSP.P$9);MSP.
P$1A.registerClass("MSP.P$1A",MSP.P$9);MSP.P$1D.registerClass("MSP.P$1D",MSP.P$9
);MSP.P$1C.registerClass("MSP.P$1C",
MSP.P$9);MSP.P$10.registerClass("MSP.P$10",MSP.P$9);MSP.P$2.registerClass("MSP.P
$2");MSP.P$B.registerClass("MSP.P$B",MSM.MsnpConnection);MSP.P$4.registerClass("
MSP.P$4");MSP.P$5.registerClass("MSP.P$5");MSP.P$C.registerClass("MSP.P$C",MSP.P
$5);MSP.P$F.registerClass("MSP.P$F",MSP.P$5);MSP.P$D.registerClass("MSP.P$D",MSP
.P$5);MSP.P$E.registerClass("MSP.P$E",MSP.P$5);MSP.P$3.registerClass("MSP.P$3");
MSP.P$1.registerClass("MSP.P$1");MSP.P$8.registerClass("MSP.P$8");MSP.P$7.regist
erClass("MSP.P$7");MSP.P$6.registerClass("MSP.P$6");
MSP.ServiceDataWriter.registerClass("MSP.ServiceDataWriter");MSP.P$2.$8=RegExp("
&amp;|&lt;|&gt;|&apos;|&quot;|&#[0-9]{1,5};|&#x[0-9a-f]{1,5};|&","ig");MSP.P$1.$
10=[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];Type.registerNamespace("M
SS");MSS.St$1=function(a,b,c){MSS.St$1.initializeBase(this,[a]);this.$10=b;this.
$11=c};MSS.St$1.$12=function(a){switch(a){case 7:return"Away";case 5:return"Idle
";case 6:return"BeRightBack";
case 9:return"OutToLunch";case 4:return"Busy";case 8:return"InACall";case 3:retu

rn"AppearOffline";default:return"Online"}};MSS.St$1.$13=function(a){switch(a){ca
se 1:return"1";case 2:return"2";default:return"0"}};MSS.St$1.$14=function(a){swi
tch(a){case 1:return"1";case 2:return"2";default:return"0"}};MSS.St$1.prototype=
{$10:null,$11:null,$A:function(){this.$11.set_cachedSettings(this.$10);var a=Str
ing.format("<MessengerUserSettings><AutoSignInEnabled>{0}</AutoSignInEnabled><Au
dioEnabled>{1}</AudioEnabled><FirstRunExperienceViewed>{2}</FirstRunExperienceVi
ewed><LastStatus>{3}</LastStatus><UploadLogsPreference>{4}</UploadLogsPreference
></MessengerUserSettings>",
MSS.St$1.$14(this.$10.autoSignInEnabled),this.$10.audioEnabled?"1":"0",this.$10.
firstRunExperienceViewed?"1":"0",MSS.St$1.$12(this.$10.lastStatus),MSS.St$1.$13(
this.$10.uploadLogsPreference));this.$8(2,this.$2.get_$3(),a,ss.Delegate.create(
this,this.$B))},$C:function(){},$B:function(){this.$9()}};MSS.St$2=function(a,b,
c){MSS.St$2.initializeBase(this,[a]);this.$12=b;this.$10=MC.$create_UXSettingsIn
fo(2,!0,!1,2,0);this.$11=c};MSS.St$2.$13=function(a){switch(a){case "Away":retur
n 7;case "Idle":return 5;
case "BeRightBack":return 6;case "OutToLunch":return 9;case "Busy":return 4;case
"InACall":return 8;case "AppearOffline":return 3;default:return 2}};MSS.St$2.$1
4=function(a){switch(a){case "1":return 1;case "2":return 2;default:return 0}};M
SS.St$2.$15=function(a){switch(a){case "1":return 1;case "2":return 2;default:re
turn 0}};MSS.St$2.prototype={$10:null,$11:null,$12:null,$A:function(){this.$12.g
et_ageInMilliSeconds()<MSS.St$2.$F&&null!=this.$12.get_cachedSettings()?(this.$1
0=this.$12.get_cachedSettings(),
this.$9()):this.$8(0,this.$2.get_$3(),null,ss.Delegate.create(this,this.$B))},$C
:function(){null!=this.$11&&this.$11.invoke(0,this.$10)},$B:function(a){if(200==
=a.get_status()){var b=a.get_responseXml();if(null!=b){var a=MSH.XmlHelper.selec
tSingleNode(b,"MessengerUserSettings/LastStatus"),c=MSH.XmlHelper.selectSingleNo
de(b,"MessengerUserSettings/UploadLogsPreference"),d=MSH.XmlHelper.selectSingleN
ode(b,"MessengerUserSettings/AutoSignInEnabled"),e=MSH.XmlHelper.selectSingleNod
e(b,"MessengerUserSettings/AudioEnabled"),
b=MSH.XmlHelper.selectSingleNode(b,"MessengerUserSettings/FirstRunExperienceView
ed");null!=a&&(this.$10.lastStatus=MSS.St$2.$13(a.text));null!=c&&(this.$10.uplo
adLogsPreference=MSS.St$2.$14(c.text));null!=d&&(this.$10.autoSignInEnabled=MSS.
St$2.$15(d.text));null!=e&&(this.$10.audioEnabled="1"===e.text);null!=b&&(this.$
10.firstRunExperienceViewed="1"===b.text);this.$12.set_cachedSettings(this.$10)}
}this.$9()}};MSS.StorageService=function(a){this.$0=a};MSS.StorageService.protot
ype={$0:null,$1:null,
get_$2:function(){return this.$0},get_$3:function(){return MSCo.HttpRequest.get_
defaultScheme()+String.format("{0}/MyData/AppStorage/MessengerSettings/Global/fi
rst",MSCo.Configuration.get_storageHostName())},get_logContext:function(){null==
this.$1&&(this.$1=new MC.LogContext(this.$0.liveId));return this.$1},set_logCont
ext:function(a){return this.$1=a},$4:function(a,b,c,d,e){a=new MSCo.HttpRequest(
a,b,d,c,e);a.execute();return a},getSettings:function(a,b){(new MSS.St$2(this,a,
b)).$7()},putSettings:function(a,
b){(new MSS.St$1(this,a,b)).$7()}};MSS.St$0=function(a){this.$1=1;this.$3={};thi
s.$2=a;this.$0=this.$2.get_$3();this.$3["Content-Type"]="application/web3s+xml";
this.$3["Cache-Control"]="no-cache";this.$3.Pragma="No-Cache";this.$3["Content-T
ype"]="application/web3s+xml";this.$3.Application="MessengerLibrary";this.$3["XMSN-Auth"]="Use-Cookie"};MSS.St$0.prototype={$0:null,$2:null,$4:!1,$5:!1,$6:null
,$7:function(){this.$4=!0;this.$A()},$8:function(a,b,c,d){this.$6=this.$2.$4(a,b
,this.$3,c,d)},$9:function(){this.$5||
(this.$1=0,this.$5=!0,null!=this.$E&&this.$E.invoke(this,ss.EventArgs.Empty),thi
s.$C())},add_$D:function(a){this.$E=ss.Delegate.combine(this.$E,a)},remove_$D:fu
nction(a){this.$E=ss.Delegate.remove(this.$E,a)},$E:null};MSS.St$0.registerClass
("MSS.St$0");MSS.St$1.registerClass("MSS.St$1",MSS.St$0);MSS.St$2.registerClass(
"MSS.St$2",MSS.St$0);MSS.StorageService.registerClass("MSS.StorageService",null,
MC.IStorageService);MSS.St$2.$F=18E4;Type.registerNamespace("MSA");MSA.AddressBo
okService=function(a){this.$1=
[];this.$0=a};MSA.AddressBookService.prototype={$0:null,$2:!1,$3:null,$4:null,ge
t_$5:function(){return this.$0},get_$6:function(){return 1===this.$0.authenticat
ionInfo.authType&&!String.isNullOrEmpty(this.$0.authenticationInfo.ticket)},get_

$7:function(){return MSCo.HttpRequest.get_defaultScheme()+String.format("{0}/use
rs/@C@{1}/rest/livecontacts/",this.get_$8(),this.$0.cid)},get_$8:function(){retu
rn MSCo.HttpRequest.get_defaultScheme().startsWith("https:")?MSCo.Configuration.
addressBookSecureHostName:
MSCo.Configuration.addressBookInsecureHostName},abort:function(){var a=null;this
.$1.clear();a=this.$4;this.$4=null;if(null!=a)try{a.abort()}catch(b){}},get_logC
ontext:function(){null==this.$3&&(this.$3=new MC.LogContext(this.$0.liveId));ret
urn this.$3},set_logContext:function(a){return this.$3=a},$9:function(a,b,c,d,e)
{a=new MSCo.HttpRequest(a,b,d,c,e);a.execute();return a},updateIMAvailability:fu
nction(a,b,c,d){a=new MSA.A$2(a,b,c,this,d);this.$A(a)},$A:function(a){a.add_$11
(ss.Delegate.create(this,
this.$B));this.$2?this.$1.add(a):(this.$2=!0,this.$4=a,a.$9())},$B:function(){va
r a=null;0===this.$1.length?this.$2=!1:(a=this.$1[0],this.$1.removeAt(0),this.$4
=a,this.$2=!0,null!=a&&a.$9())}};MSA.A$1=function(){};MSA.A$1.$3=function(a){a=M
SH.XmlHelper.xmlNodeValue(a);return"1"===a?1:"2"===a?2:"4"===a?4:"8"===a?8:"16"=
==a?16:"32"===a?32:0};MSA.A$1.$4=function(a){a=MSH.XmlHelper.xmlNodeValue(a);ret
urn"Allow"===a?2:"Block"===a?4:"Pending"===a?16:0};MSA.A$1.$5=function(a){a=MSH.
XmlHelper.xmlNodeValue(a);
return a.startsWith("MSGR:")?MSH.StringHelper.substringToEnd(a,5):null};MSA.A$1.
$6=function(a){if(String.isNullOrEmpty(a))return null;var b=a.lastIndexOf("("),c
=a.lastIndexOf(")");return-1===b||c<b?null:MSH.StringHelper.substring(a,b+1,c-b1)};MSA.A$1.$7=function(a,b){var c=MSH.XmlHelper.xmlNodeValue(MSH.XmlHelper.sele
ctSingleNode(a,"ID")),d=MSA.A$1.$3(MSH.XmlHelper.selectSingleNode(a,"Capability"
)),e=MSH.XmlHelper.xmlNodeValue(MSH.XmlHelper.selectSingleNode(a,"Address")),f=M
SA.A$1.$4(MSH.XmlHelper.selectSingleNode(a,
"PresencePermission")),g=MSH.XmlHelper.xmlNodeValue(MSH.XmlHelper.selectSingleNo
de(a,"InviteMessage")),h=MSH.XmlHelper.xmlNodeValue(MSH.XmlHelper.selectSingleNo
de(a,"CID"));"0"===h&&(h=String.Empty);"Cid"===MSH.XmlHelper.xmlNodeValue(MSH.Xm
lHelper.selectSingleNode(a,"IMAddressType"))&&(d=11);"00000000-0000-0000-0000-00
0000000000"!==b&&(f|=1);if(String.isNullOrEmpty(c)||0===d||0===f||129<e.length)r
eturn null;d=MC.$create_IMAddressInfo(e,d,f);d.id=c;d.inviteMessage=g;d.cid=h;re
turn d};MSA.A$1.$8=function(a){switch(a){case 2:case 16:case 1:case 32:return!0}
return!1};
MSA.A$1.$9=function(a){a=MSH.XmlHelper.selectSingleNode(a,"PreferredEmail");retu
rn null!=a&&(a=MSH.XmlHelper.xmlNodeValue(a),!String.isNullOrEmpty(a))?MC.$creat
e_EmailInfo(a):null};MSA.A$1.$A=function(a,b,c){var d=MSH.XmlHelper.xmlNodeValue
(MSH.XmlHelper.selectSingleNode(c,"CID")),e=MSH.XmlHelper.xmlNodeValue(MSH.XmlHe
lper.selectSingleNode(c,"Profiles/Personal/FirstName")),f=MSH.XmlHelper.xmlNodeV
alue(MSH.XmlHelper.selectSingleNode(c,"Profiles/Personal/LastName")),c=MSH.XmlHe
lper.xmlNodeValue(MSH.XmlHelper.selectSingleNode(c,
"Profiles/Personal/NickName")),c=MC.$create_ContactInfo(a,c,[]);c.cid=d;"0000000
0-0000-0000-0000-000000000000"!==a&&(c.firstName=e.trim(),c.lastName=f.trim(),c.
emailAddress=b);return c};MSA.A$0=function(a){this.$1=1;this.$2={};this.$3=a;thi
s.$0=this.$3.get_$7();this.$2["Content-Type"]="application/xml; charset=utf-8";t
his.$2["Proxy-Connection"]="Keep-Alive";this.$2.Pragma="No-Cache";this.$2.LiveCo
ntacts_PartnerID=MSCo.Configuration.addressBookPartnerId;this.$2.LiveContacts_Er
rorMessageLevel="Verbose";
this.$2["If-Modified-Since"]=MSH.DateTimeHelper.toUTCString(MSH.DateTimeHelper.m
inValue);this.$3.get_$6()&&(this.$2.LiveContacts_TicketToken=this.$3.get_$5().au
thenticationInfo.ticket)};MSA.A$0.prototype={$0:null,$3:null,$4:!1,$5:!1,$6:!1,$
7:null,get_$8:function(){return 1===this.$1},$9:function(){this.$4=!0;this.$E()}
,$A:function(a,b,c,d){this.$5||(this.$7=this.$3.$9(a,b,this.$2,c,d))},$B:functio
n(){this.$6||(this.$1=0,this.$6=!0,null!=this.$12&&this.$12.invoke(this,ss.Event
Args.Empty),this.$10())},
$C:function(a,b,c,d){MSH.Logger.logWarning(this.$3.get_logContext(),c,String.for
mat("Failed to execute AddressBook method {0}. Response code:{1} Response:{2}",b
,a.get_status(),a.toString()));this.$6||(this.$1=d,this.$6=!0,null!=this.$12&&th
is.$12.invoke(this,ss.EventArgs.Empty),this.$10())},$D:function(a,b,c){this.$C(a
,b,c,1)},add_$11:function(a){this.$12=ss.Delegate.combine(this.$12,a)},remove_$1
1:function(a){this.$12=ss.Delegate.remove(this.$12,a)},$12:null,retry:function()

{this.$E()},fail:function(){this.$1=
1;this.$6=!0;this.$10()},abort:function(){var a=this.$7;this.$7=null;this.$5=!0;
null!=a&&a.abort()}};MSA.A$2=function(a,b,c,d,e){MSA.A$2.initializeBase(this,[d]
);this.$16=d;this.$15=c;this.$14=b;this.$13=a;this.$17=e};MSA.A$2.prototype={$13
:null,$14:0,$15:null,$16:null,$17:null,$E:function(){var a=[];if(null!=this.$13)
{for(var b=ss.IEnumerator.getEnumerator(this.$13);b.moveNext();)for(var c=b.get_
current(),c=ss.IEnumerator.getEnumerator(c.addresses);c.moveNext();){var d=c.get
_current();a.add(d)}if(0===
a.length){this.fail();return}}a=MC.$create_UpdateIMAvailabilityServiceRequest(th
is.$16.get_$5().authenticationInfo,MSH.CollectionHelper.toArray(a),this.$15,this
.$14);a=MSCo.JsonResponseParser.buildRequest(a);b={};b["Content-Type"]=MSCo.Conf
iguration.get_webActionMethodContentType();(new MSCo.HttpRequest(1,MSCo.Configur
ation.get_updateIMAvailabilityService(),a,b,ss.Delegate.create(this,this.$F))).e
xecute()},$F:function(a){switch(a.get_status()){case 200:this.$B();break;case 40
0:case 500:this.$C(a,
"UpdateIMAvailability","UpdateIMAvailabilityServiceCommand.OnResponse",2);break;
default:this.$D(a,"UpdateIMAvailability","UpdateIMAvailabilityServiceCommand.OnR
esponse")}},$10:function(){this.$17.invoke(this.$1)}};MSA.AddressBookService.reg
isterClass("MSA.AddressBookService",null,MC.IAddressBook,MC.IAbortable);MSA.A$1.
registerClass("MSA.A$1");MSA.A$0.registerClass("MSA.A$0",null,MC.IAuthenticatedC
ommand,MC.IAbortable);MSA.A$2.registerClass("MSA.A$2",MSA.A$0);MSA.A$1.$0="MSGR:
";MSA.A$1.$1="00000000-0000-0000-0000-000000000000";
Type.registerNamespace("MSI");MSI.I$0=function(a){this.$2=[];this.$2.add(a)};MSI
.I$0.prototype={$2:null,$3:null,$4:null,$5:null,$6:!1,add_$7:function(a){this.$8
=ss.Delegate.combine(this.$8,a)},remove_$7:function(a){this.$8=ss.Delegate.remov
e(this.$8,a)},$8:null,$9:function(){this.$5=new MSH.Timer(ss.Delegate.create(thi
s,this.$E),null,1E4,MSH.Timeout.infinite);this.$3=document.createElement("img");
this.$3.attachEvent("onload",ss.Delegate.create(this,this.$C));this.$3.attachEve
nt("onerror",ss.Delegate.create(this,
this.$C));this.$3.src=MSCo.Configuration.get_silentReauthDetectionUrl()},$A:func
tion(a){this.$2.add(a)},$B:function(){window.____ReauthenticationCompleted=ss.De
legate.create(this,this.$D)},$C:function(){1===this.$3.width?(this.$B(),this.$4=
document.createElement("iframe"),this.$4.style.display="none",this.$4.src=String
.format(MSCo.Configuration.get_silentReauthUrlFormat(),encodeURIComponent(MSCo.C
onfiguration.get_reauthCompletedPageUrl())),document.body.appendChild(this.$4)):
this.$F(1)},$D:function(){null!=
this.$5&&(this.$5.dispose(),this.$5=null);this.$F(0)},$E:function(){this.$F(1)},
$F:function(a){if(!this.$6){this.$6=!0;null!=this.$4&&(document.body.removeChild
(this.$4),this.$4=null);for(var b=ss.IEnumerator.getEnumerator(this.$2);b.moveNe
xt();)b.get_current().invoke(a);null!=this.$8&&this.$8.invoke(this,ss.EventArgs.
Empty)}}};MSI.IdentityService=function(){};MSI.IdentityService.prototype={$0:nul
l,reauthenticate:function(a){null==this.$0?(this.$0=new MSI.I$0(a),this.$0.add_$
7(ss.Delegate.create(this,
this.$1)),this.$0.$9()):this.$0.$A(a)},$1:function(){this.$0=null}};MSI.I$0.regi
sterClass("MSI.I$0");MSI.IdentityService.registerClass("MSI.IdentityService",nul
l,MC.IIdentityService);Type.registerNamespace("MSCh");MSCh.H$7=function(a,b,c,d,
e,f){this.$4=[];this.id=a;this.$0=b;this.$2=d;this.$3=e;this.$4.add(this.$3);thi
s.$6={};a=new MSM.Mri(a);10===a.get_addressType()&&(f=a);this.$1=c.getMessagingC
ontext(this.$3,f,this);this.$5=MSCh.H$3.$F(f,this)};MSCh.H$7.prototype={$0:null,
$1:null,$2:null,$3:null,
$4:null,id:null,$5:null,$6:null,$7:!1,$8:!1,$9:!1,$A:null,$B:!1,$C:!1,get_id:fun
ction(){return this.id},get_$E:function(){return this.$2},get_$F:function(){retu
rn this.$1},get_$10:function(){return this.$0},get_$11:function(){return this.$3
},get_$12:function(){return this.$8},set_$12:function(a){return this.$8=a},get_$
13:function(){return this.$7},set_$13:function(a){a!==this.$7&&((this.$7=a)||thi
s.$24());return a},get_$14:function(){return this.$4},$15:function(a){!this.$8&&
a&&(this.$22(),this.$21());
this.$8=!0},$16:function(a){this.$5.$E();this.$7=!1;this.$28();a&&this.$23()},$1
7:function(a,b){this.$5.$6(a,b)},$18:function(a,b){this.$5.$9(a,b);MSH.Logger.lo
gTrace(this.$0.get_logContext(),"Chat.Conversation.SendMessage",MSCh.H$5.$2B(a))

},$19:function(a){this.$5=a},$1A:function(a){var b=this.id;this.id=a;this.$0.con
versationUpdateId(b,a)},$1B:function(a){this.$7!==a&&(this.$7=a,this.$2.onConver
sationHasUnreadMessagesUpdated(this.id,a));this.$B=!1},$1C:function(){if(!this.$
8){for(var a=this.$4.length,
b=Array(a),c=0;c<a;c++)b[c]=MSM.Mri.getIMAddressInfo(this.$4[c]);this.$0.convers
ationExpose(this.id,b);this.$8=!0}},$1D:function(a){null==this.$2A(a)&&this.$4.a
dd(a)},$1E:function(a){a=this.$2A(a);null!=a&&2<this.$4.length&&(this.$4.remove(
a),0===this.$4.length&&(a=this.$20().toConversationId(),this.$0.isValidConversat
ion(a)||this.$1A(a)))},$1F:function(a){return null!=this.$2A(a)},$20:function(){
var a=this.$4[0];return a.get_address()===this.get_$11().get_address()?1<this.$4
.length?this.$4[1]:null:
a},$21:function(){MSCo.Configuration.get_missedConversationsEnabled()&&!this.get
_$12()&&(this.$9=!0,this.$0.getConversationHistory(this.$1.get_to().toConversati
onId(),ss.Delegate.create(this,this.$29)))},$22:function(){MSCo.Configuration.ge
t_missedConversationsEnabled()&&this.$25(250)},$23:function(){this.$25(252)},$24
:function(){this.$C?this.$B=!0:(this.$B=!1,this.$25(251),this.$27())},$25:functi
on(a){a=MSCh.H$5.$28(this.$3,this.get_$F().get_to(),a);this.$5.$9(a,null);MSH.Lo
gger.logTrace(this.$0.get_logContext(),
"Chat.Conversation.SendIMWindowMessage",MSCh.H$5.$2B(a))},$26:function(){this.$C
=!1;this.$7?this.$B=!1:this.$B&&this.$24()},$27:function(){null==this.$A?this.$A
=new MSH.Timer(ss.Delegate.create(this,this.$26),null,5E3,MSH.Timeout.infinite):
this.$A.change(5E3,MSH.Timeout.infinite);this.$C=!0},$28:function(){null!=this.$
A&&(this.$A.dispose(),this.$A=null);this.$B=this.$C=!1},$29:function(){this.$9=!
1;this.$1C();if(0<Object.getKeyCount(this.$6)){var a=[],b=this.$6,c;for(c in b)a
.add(b[c]);Object.clearKeys(this.$6);
MSH.ArrayHelper.sortArrayList(a,ss.Delegate.create(this,function(a,b){return Str
ing.compare(a[1].id,b[1].id)}));a[a.length-1][1].isLastHistoryMessage=!0;for(a=s
s.IEnumerator.getEnumerator(a);a.moveNext();)b=a.get_current(),this.$5.$A(b[0],b
[1])}},onAddressLeft:function(a){this.$5.$8(a);MSH.Logger.logTrace(this.$0.get_l
ogContext(),"Chat.Conversation.OnAddressLeft",a.toString())},onAddressJoined:fun
ction(a){this.$5.$7(a);MSH.Logger.logTrace(this.$0.get_logContext(),"Chat.Conver
sation.OnAddressJoined",
a.toString())},onOpened:function(){this.$5.$C();MSH.Logger.logTrace(this.$0.get_
logContext(),"Chat.Conversation.OnOpened","Received OpenIMWindow signal")},onClo
sed:function(){this.$7=this.$8=!1;this.$5.$D();this.$28();MSH.Logger.logTrace(th
is.$0.get_logContext(),"Chat.Conversation.OnClosed","Received CloseIMWindow sign
al")},onMarkedAsRead:function(){this.$1B(!1)},onReceivedMessage:function(a,b){if
(this.$8||255!==b.type)(!this.$8||this.$9)&&MSCo.Configuration.get_missedConvers
ationsEnabled()?(this.$21(),
Object.keyExists(this.$6,b.id)||(this.$6[b.id]=[a,b])):b.isHistoryMessage&&!this
.$9?(b.isRecentMessage=!0,this.$5.$B(a,b)):this.$5.$A(a,b),MSH.Logger.logTrace(t
his.$0.get_logContext(),"Chat.Conversation.OnReceivedMessage",MSCh.H$5.$2B(b))},
onSendMessageFailed:function(a,b,c){255!==b.type&&(this.$2.onConversationSendMes
sageFailed(this.get_id(),a,b,c),MSH.Logger.logError(this.$0.get_logContext(),"Ch
at.Conversation.OnSendMessageFailed",MSCh.H$5.$2B(b)))},$2A:function(a){for(var
b=ss.IEnumerator.getEnumerator(this.$4);b.moveNext();){var c=
b.get_current();if(a.get_address()===c.get_address()&&a.get_addressType()===c.ge
t_addressType())return c}return null}};MSCh.ConversationService=function(a,b,c){
this.$3=a;this.$0=b;this.$1=c;this.conversations={};this.$2=new MSCh.MessagingSe
rvice(a,this,this.$0,ss.Delegate.create(this,this.onIncomingRequest))};MSCh.Conv
ersationService.prototype={conversations:null,$0:null,$1:null,$2:null,$3:null,$4
:null,get_cid:function(){return this.$3.cid},get_liveId:function(){return this.$
3.liveId},get_skypeId:function(){return this.$3.skypeId},
get_localEndpoint:function(){return this.$3.endpointId},isValidConversation:func
tion(a){return null!=this.$5(a)},$5:function(a){return Object.keyExists(this.con
versations,a)?this.conversations[a]:null},conversationCreate:function(a,b,c){if(
null==this.$5(a)){var d=this.$8(b.type,null),b=MSM.Mri.create(b.address,b.type,n
ull,null,b.network),d=new MSCh.H$7(a,this,this.$2,this,d,b);d.$15(c);this.conver
sations[a]=d}else this.conversations[a].$15(c)},conversationSendMessage:function
(a,b,c){a=this.$5(a);

null!=a&&a.$18(b,c)},conversationInviteAddress:function(a,b,c){a=this.$5(a);null
!=a&&a.$17(MSM.Mri.createFromIMAddressInfo(b),c)},conversationClose:function(a,b
){var c=this.$5(a);null!=c&&(c.$16(b),2<c.get_$14().length?delete this.conversat
ions[a]:c.set_$12(!1))},conversationExpose:function(a,b){this.$0.conversationExp
ose(a,b);var c=this.$5(a);null!=c&&c.set_$12(!0)},conversationUpdateId:function(
a,b){var c=this.conversations[a],d=Object.keyExists(this.conversations,b);d&&c.s
et_$12(this.conversations[b].get_$12());
this.conversations[b]=c;delete this.conversations[a];c.get_$12()&&!d&&this.$0.co
nversationUpdateId(a,b)},conversationUpdateHasUnreadMessages:function(a,b){var c
=this.$5(a);null!=c&&c.set_$13(b)},getConversationHistory:function(a,b){this.$0.
getConversationHistory(a,b)},sendDatagram:function(a,b,c){this.$0.sendDatagram(a
,b,c)},onDatagramReceived:function(a){this.$2.onDatagramReceived(a)},onIncomingR
equest:function(a,b){var c=this.$8(a.get_addressType(),a.get_appId()),d=a.toConv
ersationId(),e=MSM.Mri.create(a.get_address(),
a.get_addressType(),null,a.get_appId(),a.get_networkId()),c=new MSCh.H$7(d,this,
this.$2,this,c,e);if(10===a.get_addressType()&&0===b.datagramType)return c.$16(!
1),!1;this.conversations[d]=c;return!0},close:function(a){a?this.$6():this.$7()}
,get_logContext:function(){null==this.$4&&(this.$4=new MC.LogContext(this.$3.liv
eId));return this.$4},set_logContext:function(a){return this.$4=a},onConversatio
nInviteAddressCompleted:function(a,b,c,d){this.$1.onConversationInviteAddressCom
pleted(a,b,c,d)},onConversationAddressJoined:function(a,
b){this.$1.onConversationAddressJoined(a,b)},onConversationAddressLeft:function(
a,b){this.$1.onConversationAddressLeft(a,b)},onConversationMessageReceived:funct
ion(a,b){this.$1.onConversationMessageReceived(a,b)},onRecentMessageReceived:fun
ction(a,b){this.$1.onConversationMessageReceived(a,b)},onConversationHasUnreadMe
ssagesUpdated:function(a,b){this.$1.onConversationHasUnreadMessagesUpdated(a,b)}
,onConversationClosed:function(a){this.$1.onConversationClosed(a)},onConversatio
nSendMessageFailed:function(a,
b,c,d){var e=1;switch(b){case 2:e=5;break;case 3:e=6;break;case 4:e=7}this.$1.on
ConversationSendMessageFailed(a,e,c,d)},onLogRequestReceived:function(a,b){this.
$1.onLogRequestReceived(a,b)},$6:function(){var a=[],b=this.conversations,c;for(
c in b)a.add(c);for(a=ss.IEnumerator.getEnumerator(a);a.moveNext();)b=a.get_curr
ent(),this.conversationClose(b,!1)},$7:function(){var a=[],b=this.conversations,
c;for(c in b)a.add(this.$5(c));for(a=ss.IEnumerator.getEnumerator(a);a.moveNext(
);)b=a.get_current(),
2<b.get_$14().length&&(b.$16(!1),delete this.conversations[b.get_id()],this.$1.o
nConversationClosed(b.get_id()))},$8:function(a,b){var c=null;return c=11===a?MS
M.Mri.create(this.get_cid(),11,this.get_localEndpoint(),b,null):8===a&&!String.i
sNullOrEmpty(this.get_skypeId())?MSM.Mri.create(this.get_skypeId(),8,this.get_lo
calEndpoint(),null,null):MSM.Mri.create(this.get_liveId(),1,this.get_localEndpoi
nt(),null,null)}};MSCh.H$4=function(){};MSCh.H$4.$0=function(a){switch(a){case 1
:return"1";case 255:return"2";
case 2:return"3";default:return"0"}};MSCh.H$4.$2=function(a){return a.replace(MS
Ch.H$4.$3,function(a){return MSCh.H$4.$4(a)})};MSCh.H$4.$4=function(a){switch(a)
{case ":-/":return":S";case "O:-)":return"(A)";case ":-&":return"+o(";case "(:|"
:return"|-)";case ":X":return"(L)";case ">:)":return"(6)";case "X-(":return":@";
case ":((":return":'(";case ":-B":return"8-|";case ":-$":return":-#";case ':">':
return":$";case ":-?":return"*-)";case "B-)":return"(H)";case ":-*":return"(K)";
case "/:)":return"^o)";
case "8-|":return"8-)";case "=((":return"(U)";case "<:-P":return"<:o)";default:r
eturn a}};MSCh.H$5=function(a){this.$14=a};MSCh.H$5.$15=function(a){switch(a){ca
se 250:case 252:case 251:return!0;default:return!1}};MSCh.H$5.$16=function(a){a.
get_headers();a.get_body();a=a.getHeader("Message-Type");switch(a){case "Text":r
eturn 1;case "Signal/AudioMeta":return 5;case "Signal/AudioTunnel":return 4;case
"Signal/RequestLogs":return 249;case "Signal/OpenIMWindow":return 250;case "Sig
nal/CloseIMWindow":return 252;
case "Signal/MarkIMWindowRead":return 251;case "Nudge":return 2;case "Control/Ty
ping":return 255;case "ApplicationMessage":return 3;case "Event/Call":return 6;d
efault:return a.startsWith("Text/")?1:0}};MSCh.H$5.$17=function(a,b){var c=MSCh.
H$5.$16(a),d=null,e=a.get_headers(),f=a.get_body();switch(c){case 3:d=MSCh.H$5.$

20(e,f);break;case 250:case 252:case 251:d=MSCh.H$5.$26(e,f,c);break;case 1:d=MS


Ch.H$5.$21(e,f);break;case 5:d=MSCh.H$5.$22(b,f);break;case 4:d=MSCh.H$5.$23(b,f
);break;case 6:d=MSCh.H$5.$24(f);
break;case 249:d=MSCh.H$5.$25(f);break;case 2:case 255:d=MC.$create_MessageInfo(
c,null)}if(null!=d&&(d.id=a.getHeader("Message-ID"),d.timestamp=MC.$create_DateI
nfo(MSCh.H$5.$19(a)),d.displayNameOverride=a.getHeader("IM-Display-Name"),2===b.
get_service()))switch(b.get_channel()){case 2:d.isOfflineMessage=!0;break;case 4
:d.isHistoryMessage=!0}return d};MSCh.H$5.$18=function(a){a=new MSCh.H$5(a);retu
rn new MSM.MessagingLayer(a.$1A(),a.$1E())};MSCh.H$5.$19=function(a){a=a.getHead
er("Original-Arrival-Time");
return String.isNullOrEmpty(a)?Date.get_now():MSH.DateTimeHelper.parseTimeStamp(
a)};MSCh.H$5.$20=function(a,b){var c=a["WebApp-Message-ID"];if(String.isNullOrEm
pty(c))return MSH.Logger.logError(MC.LogContext.get_global(),"Chat.MessageInfoHa
ndler.ParseMessage","AppMessage does not have valid WebApp-Message-ID header"),n
ull;c=MC.$create_ApplicationMessageInfo(MSH.StringHelper.toLowerCase(c),b);retur
n MC.$create_MessageInfo(3,c)};MSCh.H$5.$21=function(a,b){if(String.isNullOrEmpt
y(b))return null;var c=
null,d=a["X-MMS-IM-Format"];String.isNullOrEmpty(d)||(c=MSCh.H$5.$29(d));c=MC.$c
reate_TextMessageInfo(b,c);d=a["Safe-Url"];String.isNullOrEmpty(d)||(c.safeUrl=d
);return MC.$create_MessageInfo(1,c)};MSCh.H$5.$22=function(a,b){if(String.isNul
lOrEmpty(b))return null;var c=MC.$create_AudioMetaMessageInfo(b,a.get_from().get
_endpointId());return MC.$create_MessageInfo(5,c)};MSCh.H$5.$23=function(a,b){if
(String.isNullOrEmpty(b))return null;var c=MC.$create_AudioTunnelMessageInfo(b,a
.get_from().get_endpointId());
return MC.$create_MessageInfo(4,c)};MSCh.H$5.$24=function(a){if(String.isNullOrE
mpty(a))return null;a=parseInt(a);if(!(0<=a))return null;a=MC.$create_CallEventM
essageInfo(a);return MC.$create_MessageInfo(6,a)};MSCh.H$5.$25=function(a){var b
=ss.XmlDocumentParser.parse(a).documentElement;if(null==b||!MSH.XmlHelper.isElem
ent(b,"LogRequest"))return null;for(var c=a=null,b=ss.IEnumerator.getEnumerator(
b.childNodes);b.moveNext();){var d=b.get_current();switch(d.nodeName){case "Url"
:a=d.text;break;case "AuthToken":c=
d.text}}if(String.isNullOrEmpty(a)||String.isNullOrEmpty(c))return null;a=MC.$cr
eate_LogRequestMessageInfo(a,c);return MC.$create_MessageInfo(249,a)};MSCh.H$5.$
26=function(a,b,c){if(String.isNullOrEmpty(b))return null;var d=a=String.Empty,b
=b.split("/"),a=b[0];if(2===b.length)d=b[1];else if(1===b.length){b=MSM.Mri.tryP
arse(a);if(null==b||10!==b.get_addressType())return null;d=a}else return null;a=
MC.$create_SignalMessageInfo(a,d);return MC.$create_MessageInfo(c,a)};MSCh.H$5.$
27=function(a,b){var c=
MSCh.H$5.$28(a,b,250);return(new MSCh.H$5(c)).$1F()};MSCh.H$5.$28=function(a,b,c
){var d=null,e=null;10===b.get_addressType()?d=e=b.toConversationId():(d=a.toCon
versationId(),e=b.toConversationId());a=0<String.compare(d,e)?MC.$create_SignalM
essageInfo(e,d):MC.$create_SignalMessageInfo(d,e);return MC.$create_MessageInfo(
c,a)};MSCh.H$5.$29=function(a){for(var b=String.Empty,c=0,d=0,e=!1,a=a.split(";"
),a=ss.IEnumerator.getEnumerator(a);a.moveNext();){var f=a.get_current(),g=MSH.S
tringHelper.splitLimit(f,
"=",2);2===g.length&&(f=g[0].trim(),g=MSH.UriHelper.decode(g[1].trim()),"FN"===f
&&MSCh.H$6.$2(g)?b=g:"EF"===f?(0<=g.indexOf("B")&&(d|=1),0<=g.indexOf("I")&&(d|=
2),0<=g.indexOf("U")&&(d|=8),0<=g.indexOf("S")&&(d|=4)):"CO"===f?c=MSH.ConvertHe
lper.parseHexInt(g)&16777215:"RL"===f&&(e="1"===g))}return MC.$create_TextMessag
eFormatInfo(c,b,d,e)};MSCh.H$5.$2A=function(a){var b=new ss.StringBuilder;b.appe
nd("FN=");b.append(MSH.UriHelper.encode(a.fontFamily));b.append("; EF=");0<(a.fo
ntStyle&1)&&b.append("B");
0<(a.fontStyle&2)&&b.append("I");0<(a.fontStyle&4)&&b.append("S");0<(a.fontStyle
&8)&&b.append("U");var c=MSH.ConvertHelper.uInt32ToHexString(a.fontColor);b.appe
nd("; CO=");b.append(MSH.UriHelper.encode(c));a.rightToLeft&&b.append("; RL=1");
return b.toString()};MSCh.H$5.$2B=function(a){var b=new ss.StringBuilder;b.appen
d(String.format("Message Type: {0} ",MC.MessageInfoType.toString(a.type)));1===a
.type?b.append(String.format("Text: {0}",a.info.text)):5===a.type?b.append(Strin
g.format("AudioMeta: {0}",
a.info.body)):4===a.type&&b.append(String.format("AudioTunnel: {0}",a.info.sipBo

dy));if(MSCh.H$5.$15(a.type)){var c=a.info;b.append(String.format("Participating
Users: {0}, {1}",c.firstMri,c.secondMri))}null!=a.sender&&b.append(String.forma
t("Sender: {0}:{1} ",a.sender.type,a.sender.address));return b.toString()};MSCh.
H$5.prototype={$14:null,$1A:function(){var a={};a["Content-Type"]=this.$1B();a["
Message-Type"]=this.$1C();a["IM-Display-Name"]=this.$14.displayNameOverride;this
.$1D(a);return a},$1B:function(){switch(this.$14.type){case 1:case 5:case 4:case
250:case 252:case 251:case 2:case 255:case 6:return"text/plain; charset=UTF-8";
case 3:return"application/x-msmsgr-webapp-message";default:return null}},$1C:fun
ction(){switch(this.$14.type){case 1:return"Text";case 5:return"Signal/AudioMeta
";case 4:return"Signal/AudioTunnel";case 3:return"ApplicationMessage";case 2:ret
urn"Nudge";case 255:return"Control/Typing";case 250:return"Signal/OpenIMWindow";
case 252:return"Signal/CloseIMWindow";case 251:return"Signal/MarkIMWindowRead";c
ase 6:return"Event/Call";default:return null}},$1D:function(a){switch(this.$14.t
ype){case 1:var b=this.$14.info;
null!=b.format&&(a["X-MMS-IM-Format"]=MSCh.H$5.$2A(b.format));break;case 3:b=thi
s.$14.info,null!=b&&(a["WebApp-Message-ID"]=b.id)}},$1E:function(){switch(this.$
14.type){case 1:return this.$14.info.text;case 5:return this.$14.info.body;case
4:return this.$14.info.sipBody;case 3:return this.$14.info.content;case 6:return
this.$14.info.duration.toString();case 250:case 252:case 251:return this.$1F();
default:return String.Empty}},$1F:function(){var a=this.$14.info.firstMri,b=this
.$14.info.secondMri;return a===
b?a:a+"/"+b}};MSCh.H$6=function(){};MSCh.H$6.$0=function(a){return MSH.ConvertHe
lper.parseInt(a)};MSCh.H$6.$1=function(){for(var a=Array(4),b=0;4>b;b++)a[b]=Mat
h.round(16777215*Math.random()).toString(16).padLeft(8,"0");return"{"+a[0]+"-"+M
SH.StringHelper.substring(a[1],0,4)+"-"+MSH.StringHelper.substring(a[1],4,4)+"-"
+MSH.StringHelper.substring(a[2],0,4)+"-"+MSH.StringHelper.substring(a[2],4,4)+a
[3]+"}"};MSCh.H$6.$2=function(a){return!MSH.RegexHelper.isMatch("@|(expression)|
\\(|\\\\",a,"gi")};MSCh.PersistencedConversationService=
function(a,b,c,d){MSCh.PersistencedConversationService.initializeBase(this,[a,b,
c]);this.$9=d};MSCh.PersistencedConversationService.prototype={$9:null,conversat
ionCreate:function(a,b,c){MSCh.PersistencedConversationService.callBaseMethod(th
is,"conversationCreate",[a,b,c]);this.$C()},conversationExpose:function(a,b){MSC
h.PersistencedConversationService.callBaseMethod(this,"conversationExpose",[a,b]
);this.$C()},conversationSendMessage:function(a,b,c){MSCh.PersistencedConversati
onService.callBaseMethod(this,
"conversationSendMessage",[a,b,c]);this.$D(a,b)},conversationInviteAddress:funct
ion(a,b,c){MSCh.PersistencedConversationService.callBaseMethod(this,"conversatio
nInviteAddress",[a,b,c]);this.$C()},conversationClose:function(a,b){MSCh.Persist
encedConversationService.callBaseMethod(this,"conversationClose",[a,b]);this.$C(
)},conversationUpdateId:function(a,b){MSCh.PersistencedConversationService.callB
aseMethod(this,"conversationUpdateId",[a,b]);this.$C();this.$F(a,b)},conversatio
nUpdateHasUnreadMessages:function(a,
b){MSCh.PersistencedConversationService.callBaseMethod(this,"conversationUpdateH
asUnreadMessages",[a,b]);this.$C()},onIncomingRequest:function(a,b){var c=MSCh.P
ersistencedConversationService.callBaseMethod(this,"onIncomingRequest",[a,b]);c&
&this.$C();return c},close:function(a){var b=this.$9;this.$9=null;MSCh.Persisten
cedConversationService.callBaseMethod(this,"close",[a]);this.$9=b},onConversatio
nMessageReceived:function(a,b){MSCh.PersistencedConversationService.callBaseMeth
od(this,"onConversationMessageReceived",
[a,b]);this.$D(a,b)},onRecentMessageReceived:function(a,b){MSCh.PersistencedConv
ersationService.callBaseMethod(this,"onRecentMessageReceived",[a,b]);null!=this.
$9&&this.$9.saveRecentMessage(a,b)},onConversationHasUnreadMessagesUpdated:funct
ion(a,b){MSCh.PersistencedConversationService.callBaseMethod(this,"onConversatio
nHasUnreadMessagesUpdated",[a,b]);this.$C()},onConversationClosed:function(a){MS
Ch.PersistencedConversationService.callBaseMethod(this,"onConversationClosed",[a
]);this.$C()},onConversationAddressJoined:function(a,
b){MSCh.PersistencedConversationService.callBaseMethod(this,"onConversationAddre
ssJoined",[a,b]);this.$C()},onConversationAddressLeft:function(a,b){MSCh.Persist
encedConversationService.callBaseMethod(this,"onConversationAddressLeft",[a,b]);
this.$C()},onConversationInviteAddressCompleted:function(a,b,c,d){MSCh.Persisten

cedConversationService.callBaseMethod(this,"onConversationInviteAddressCompleted
",[a,b,c,d]);this.$C()},onPersistedConversationsLoaded:function(a){for(a=ss.IEnu
merator.getEnumerator(a.conversations);a.moveNext();){var b=
a.get_current();this.$A(b)}},$A:function(a){MSCh.PersistencedConversationService
.callBaseMethod(this,"conversationCreate",[a.id,a.roster[1],!1]);a.hasUnreadMess
ages&&this.conversations[a.id].set_$13(!0);MSCh.H$8.$1(a,this.conversations)},$B
:function(){var a=MSCh.H$8.$2(this.conversations,ss.Delegate.create(this,this.$5
)),b=MC.$create_PersistedConversations();b.conversations=MSH.CollectionHelper.to
Array(a);return b},$C:function(){null!=this.$9&&this.$9.set_conversations(this.$
B())},$D:function(a,b){null!=
this.$9&&this.$9.saveConversationMessage(a,b)},$E:function(a){null!=this.$9&&thi
s.$9.deletePersistedConversationMessages(a)},$F:function(a,b){null!=this.$9&&thi
s.$9.updatePersistedConversationMessageIds(a,b)}};MSCh.H$8=function(){};MSCh.H$8
.$0=function(a){for(var b=a.get_$14().length,c=Array(b),d=Array(b),e=0;e<b;e++)c
[e]=MSM.Mri.getIMAddressInfo(a.get_$14()[e]),d[e]=a.get_$14()[e].toString();retu
rn MC.$create_PersistedConversation(a.get_id(),MSM.Mri.getIMAddressInfo(a.get_$1
1()),c,d,a.get_$13())};
MSCh.H$8.$1=function(a,b){var c=b[a.id];if(null!=c)for(var d=ss.IEnumerator.getE
numerator(a.rosterMri);d.moveNext();){var e=d.get_current();c.$1D(new MSM.Mri(e)
)}};MSCh.H$8.$2=function(a,b){var c=[];if(null!=a)for(var d in a){var e=b.invoke
(d);null!=e&&e.get_$12()&&c.add(MSCh.H$8.$0(e))}return c};MSCh.H$3=function(a){t
his.$0=a;this.$2=a.get_$F();this.$1=a.get_$E()};MSCh.H$3.$F=function(a,b){var c=
null;switch(a.get_addressType()){case 0:case 2:case 1:case 11:case 8:case 16:cas
e 4:case 32:case 13:c=
new MSCh.H$B(a,b);break;case 10:c=MSCh.H$9.$11(b)}return c};MSCh.H$3.prototype={
$0:null,$1:null,$2:null,get_$3:function(){return this.$0},get_$4:function(){retu
rn this.$1},get_$5:function(){return this.$2},$9:function(a,b){this.get_$5().sen
dMessage(a,b)},$A:function(a,b){this.$0.get_$12()||this.$0.$1C();b.sender=MSM.Mr
i.getIMAddressInfo(a);this.$0.get_$10().onConversationMessageReceived(this.$0.ge
t_id(),b);if(255!==b.type&&3!==b.type){var c=b.sender.address===this.$0.get_$11(
).get_address()&&b.sender.type===
this.$0.get_$11().get_addressType();this.$0.$1B(!c&&!b.isHistoryMessage)}},$B:fu
nction(a,b){this.$0.get_$12()||this.$0.$1C();b.sender=MSM.Mri.getIMAddressInfo(a
);this.$0.get_$10().onRecentMessageReceived(this.$0.get_id(),b)},$C:function(){}
,$D:function(){this.$0.get_$10().onConversationClosed(this.$0.get_id())},$E:func
tion(){this.$2.close()}};MSCh.H$9=function(a){MSCh.H$9.initializeBase(this,[a]);
this.$10={}};MSCh.H$9.$11=function(a){return new MSCh.H$9(a)};MSCh.H$9.$12=funct
ion(a,b,c,d){d=new MSCh.H$9(d);
null!=a&&10!==a.get_addressType()&&d.get_$5().$10(a);null!=b&&(d.$13(b,c),a=[b],
d.get_$5().inviteAddress(a));return d};MSCh.H$9.prototype={$10:null,$6:function(
a,b){Object.keyExists(this.$10,a.get_address())||(this.get_$3().get_$11().equals
(a,1)||this.$13(a,b),this.get_$5().inviteAddress([a]))},$7:function(a){(new MSM.
Mri(this.get_$3().get_id())).equals(this.get_$5().get_to(),1)||this.get_$3().$1A
(this.get_$5().get_to().toConversationId());if(!this.get_$3().$1F(a)){this.get_$
3().$1D(a);var b=MSM.Mri.getIMAddressInfo(a);
if(Object.keyExists(this.$10,a.get_address())){var c=this.$15(a);this.get_$4().o
nConversationInviteAddressCompleted(this.get_$3().get_id(),0,b,c);this.$14(a)}if
(this.get_$3().get_$12())this.get_$4().onConversationAddressJoined(this.get_$3()
.get_id(),b);else this.get_$3().$1C()}},$8:function(a){this.get_$3().$1F(a)&&(th
is.get_$3().$1E(a),this.$14(a),a=MSM.Mri.getIMAddressInfo(a),this.get_$4().onCon
versationAddressLeft(this.get_$3().get_id(),a))},$13:function(a,b){this.$10[a.ge
t_address()]=[a,b]},$14:function(a){Object.keyExists(this.$10,
a.get_address())&&delete this.$10[a.get_address()]},$15:function(a){return Objec
t.keyExists(this.$10,a.get_address())?this.$10[a.get_address()][1]:null}};MSCh.H
$B=function(a,b){MSCh.H$B.initializeBase(this,[b]);this.$10=a;this.get_$3().$1D(
a)};MSCh.H$B.prototype={$10:null,$6:function(a,b){var c=MSCh.H$9.$12(this.$10,a,
b,this.get_$3());this.get_$3().$19(c)},$7:function(a){var b=MSCh.H$9.$11(this.ge
t_$3());this.get_$3().$19(b);b.$7(a)},$8:function(){}};MSCh.IMessagingService=fu
nction(){};MSCh.IMessagingService.registerInterface("MSCh.IMessagingService");
MSCh.IMessagingEvents=function(){};MSCh.IMessagingEvents.registerInterface("MSCh

.IMessagingEvents");MSCh.H$2=function(a){this.$2=a};MSCh.H$2.prototype={add_$0:f
unction(a){this.$1=ss.Delegate.combine(this.$1,a)},remove_$0:function(a){this.$1
=ss.Delegate.remove(this.$1,a)},$1:null,$2:null,$3:!1,get_$4:function(){return t
his.$2},$5:function(){this.$6()},$7:function(){this.$3||(this.$3=!0,null!=this.$
1&&this.$1.invoke(this,ss.EventArgs.Empty))}};MSCh.H$A=function(a,b,c){MSCh.H$A.
initializeBase(this,[c]);
this.$9=a;this.$8=b};MSCh.H$A.prototype={$8:null,$9:null,$A:null,$B:null,get_$C:
function(){return this.$8},get_$D:function(){null==this.$A&&(this.$A=new MSM.Rou
tingLayer(this.$8.get_to(),this.$8.get_$A()));return this.$A},get_$E:function(){
null==this.$B&&(this.$B=new MSM.ReliabilityLayer);return this.$B},$F:function(a)
{this.$9.sendDatagram(a,ss.Delegate.create(this,this.$10),this.get_$4())},$10:fu
nction(){this.$7()}};MSCh.H$C=function(a,b){MSCh.H$C.initializeBase(this,[null,a
,null]);this.$11=b};MSCh.H$C.prototype=
{$11:null,$6:function(){switch(this.$11.get_pageType()){case 0:var a=this.$11.ge
t_routing(),b=this.$11.get_content(),a=MSCh.H$5.$17(b,a);if(null==a)break;this.g
et_$C().$B(this.$11.get_routing().get_from(),this.$11.get_routing().get_to(),a);
break;case 1:a=this.$11.get_content();this.get_$C().$F(this.$11.get_routing().ge
t_from(),this.$11.get_routing().get_to(),a.get_pendingUsers(),a.get_users());thi
s.get_$C().$E(this.$11.get_routing().get_from(),this.$11.get_routing().get_to(),
a.get_users());break;
case 2:a=this.$11.get_content(),this.get_$C().$D(this.$11.get_routing().get_from
(),this.$11.get_routing().get_to(),a.get_users())}}};MSCh.H$10=function(a,b,c){M
SCh.H$10.initializeBase(this,[a,b,null]);this.$15=MSM.Mri.create("00000000-00000000-0000-000000000000@live.com",10,null,null,null);this.$16=c};MSCh.H$10.protot
ype={$15:null,$16:null,get_$14:function(){if(String.isNullOrEmpty(this.get_$C().
get_$A().get_appId()))return String.Empty;var a=String.format("<applicationId>{0
}</applicationId>",this.get_$C().get_$A().get_appId());
return String.format("<circle><roster><id>IM</id>{0}</roster></circle>",a)},get_
$D:function(){return new MSM.RoutingLayer(this.$15,MSCh.H$10.callBaseMethod(this
,"get_$D").get_from())},$10:function(a,b){if(0===a){var c=MSM.PagedMessage.creat
ePagedMessage(b.datagramType,b.payload);this.$16.invoke(!0,c.get_routing().get_f
rom())}else this.$16.invoke(!1,null);MSCh.H$10.callBaseMethod(this,"$10",[a,b])}
};MSCh.H$F=function(a,b){MSCh.H$F.initializeBase(this,[a,b,null])};MSCh.H$F.prot
otype={$6:function(){var a=
String.format("/circle/roster(IM)/user({0}:{1})",this.get_$D().get_from().get_ad
dressType(),this.get_$D().get_from().get_address()),a=new MSM.PublicationLayer(a
,1,String.Empty),a=new MSM.PagedMessage(2,this.get_$D(),this.get_$E(),a),a=MC.$c
reate_DatagramInfo(2,a.payLoad());this.$F(a)}};MSCh.H$D=function(a,b,c){MSCh.H$D
.initializeBase(this,[a,b,null]);this.$12=c};MSCh.H$D.prototype={$12:null,get_$1
4:function(){for(var a=new ss.StringBuilder,b=0;b<this.$12.length;b++)a.append(S
tring.format("<user><id>{0}:{1}</id></user>",
this.$12[b].get_addressType(),this.$12[b].get_address()));return String.format("
<circle><roster><id>IM</id>{0}</roster></circle>",a.toString())},$6:function(){v
ar a=new MSM.PublicationLayer("/circle",1,this.get_$14()),a=new MSM.PagedMessage
(1,this.get_$D(),this.get_$E(),a),a=MC.$create_DatagramInfo(1,a.payLoad());this.
$F(a)}};MSCh.H$E=function(a,b,c,d){MSCh.H$E.initializeBase(this,[a,b,d]);this.$1
1=c};MSCh.H$E.prototype={$11:null,$6:function(){var a=this.get_$D();250===this.$
11.type||252===this.$11.type||
251===this.$11.type?(a=new MSM.RoutingLayer(MSM.Mri.create(this.get_$D().get_fro
m().get_address(),this.get_$D().get_from().get_addressType(),null,null,null),thi
s.get_$D().get_from()),a.set_service(4),a.set_disableSelfFanOut(!0)):null!=this.
$11.targetEndpointId&&(a=new MSM.RoutingLayer(MSM.Mri.create(this.get_$D().get_t
o().get_address(),this.get_$D().get_to().get_addressType(),this.$11.targetEndpoi
ntId,null,null),this.get_$D().get_from()),a.set_disableSelfFanOut(!0));this.$11.
isOfflineMessage&&(a.set_service(2),
a.set_channel(2));if(16===a.get_to().get_addressType()||4===a.get_to().get_addre
ssType())a.set_service(2),a.set_channel(3);var b=MSCh.H$5.$18(this.$11);b.set_ap
pId(this.get_$C().get_$A().get_appId());a=new MSM.PagedMessage(0,a,this.get_$E()
,b);a=MC.$create_DatagramInfo(0,a.payLoad());this.$F(a)},$10:function(a,b){5===a
&&1===this.$11.type&&400>=this.$11.info.text.length&&(this.$11.isOfflineMessage=

!0,this.get_$C().sendMessage(this.$11,this.get_$4()),a=0);0!==a&&this.get_$C().$
C(a,this.$11,this.get_$4());
MSCh.H$E.callBaseMethod(this,"$10",[a,b])}};MSCh.MessagingContext=function(a,b,c
,d,e){this.$0=a;this.$1=c;this.$2=b;this.$3=d;this.$4=e;this.$9=[];10===e.get_ad
dressType()&&(this.$7=!0)};MSCh.MessagingContext.prototype={$0:null,$1:null,$2:n
ull,$3:null,$4:null,$5:null,$6:!1,$7:!1,$8:!1,$9:null,get_$A:function(){return t
his.$3},get_to:function(){return this.$4},sendMessage:function(a,b){var c=new MS
Ch.H$E(this.$0,this,a,b);this.$11(c)},inviteAddress:function(a){this.$17(a)},clo
se:function(){this.$19()},
$B:function(a,b,c){c.sender=MSM.Mri.getIMAddressInfo(a);this.$3.equals(a,1)&&(c.
isOfflineMessage=!1);if(!(250===c.type||252===c.type||251===c.type))this.$1.onRe
ceivedMessage(a,c)},$C:function(a,b,c){this.$1.onSendMessageFailed(a,b,c)},$D:fu
nction(a,b,c){for(a=ss.IEnumerator.getEnumerator(c);a.moveNext();)b=a.get_curren
t(),this.$1.onAddressLeft(b)},$E:function(a,b,c){for(a=ss.IEnumerator.getEnumera
tor(c);a.moveNext();)b=a.get_current(),this.$3.equals(b,1)&&!this.$8&&null!=this
.$5?(this.$18(this.$5),
this.$8=!0):(this.$7||this.$15(this.$4),this.$1.onAddressJoined(b))},$F:function
(a,b,c,d){1===c.length&&(1===d.length&&this.$3.equals(c[0],1))&&(this.$4=a,this.
$0.updateSession(d[0],a));for(a=ss.IEnumerator.getEnumerator(c);a.moveNext();)if
(b=a.get_current(),this.$3.equals(b,1)){this.$18(b);break}},$10:function(a){this
.$5=a},$11:function(a){a.$5()},$12:function(a){if(this.$3.equals(a,1))this.$1.on
Opened()},$13:function(a){this.$3.equals(a,1)&&(this.close(),this.$1.onClosed())
},$14:function(a){if(this.$3.equals(a,
1))this.$1.onMarkedAsRead()},$15:function(a){if(!this.$7&&10===a.get_addressType
()){this.$7=!0;for(a=ss.IEnumerator.getEnumerator(this.$9);a.moveNext();){var b=
a.get_current();this.$17(b)}this.$9.clear()}},$16:function(a,b){a?(this.$0.updat
eSession(this.$4,b),this.$4=b):this.$6=!1},$17:function(a){if(this.$7)for(a=ss.I
Enumerator.getEnumerator(a);a.moveNext();){var b=a.get_current();this.$18(b)}els
e this.$9.add(a),this.$6||(this.$6=!0,a=new MSCh.H$10(this.$0,this,ss.Delegate.c
reate(this,this.$16)),
this.$11(a))},$18:function(a){a=new MSCh.H$D(this.$0,this,[a]);this.$11(a)},$19:
function(){if(this.$7){var a=new MSCh.H$F(this.$0,this);this.$11(a);this.$0.dele
teSession(this.$4)}}};MSCh.MessagingService=function(a,b,c,d){this.$0=a;this.$1=
b;this.$4=c;this.$3=d;this.$2={}};MSCh.MessagingService.prototype={$0:null,$1:nu
ll,$2:null,$3:null,$4:null,getMessagingContext:function(a,b,c){var d=this.$6(b);
null==d&&(d=new MSCh.MessagingContext(this,this.$4,c,a,b),this.$2[this.$5(b)]=d)
;return d},onDatagramReceived:function(a){var b=
null,c=null,b=MSM.PagedMessage.createPagedMessage(a.datagramType,a.payload);if(n
ull!=b){var c=b.get_routing().get_from(),d=b.get_routing().get_to();if(0===b.get
_pageType()){var e=b.get_routing(),f=b.get_content();if(this.$A(e.get_to())&&thi
s.$A(e.get_from())){c=MSCh.H$5.$16(f);if(249===c){c=MSCh.H$5.$25(f.get_body());i
f(null==c)return;b=c.info;this.$1.onLogRequestReceived(b.uploadUrl,b.authToken);
return}if(!MSCh.H$5.$15(c))return;c=MSCh.H$5.$26(f.get_headers(),f.get_body(),c)
;if(null==c)return;d=
c.info;c=MSM.Mri.tryParse(d.firstMri);d=MSM.Mri.tryParse(d.secondMri);if(null==c
||null==d)return}}1===b.get_pageType()&&(f=b.get_content(),1===f.get_notificatio
nType()&&(1===f.get_pendingUsers().length&&1===f.get_users().length)&&(c=f.get_u
sers()[0],d=f.get_pendingUsers()[0]));c=this.$8(c,d);a=this.$7(c,a);null!=a&&(ne
w MSCh.H$C(a,b)).$5()}},sendDatagram:function(a,b,c){this.$1.sendDatagram(a,b,c)
},shutdown:function(){},updateSession:function(a,b){var c=this.$6(a);null!=c&&(d
elete this.$2[this.$5(a)],
this.$2[this.$5(b)]=c)},deleteSession:function(a){null!=this.$6(a)&&delete this.
$2[this.$5(a)]},$5:function(a){return String.format("{0}:{1}",a.get_addressType(
),a.get_address())},$6:function(a){a=this.$5(a);return Object.keyExists(this.$2,
a)?this.$2[a]:null},$7:function(a,b){var c=this.$6(a);null==c&&this.$3.invoke(a,
b)&&(c=this.$6(a),null==c&&MSH.Logger.logError(this.$1.get_logContext(),"Chat.Me
ssagingService.OnDatagramReceived","Cannot obtain messaging context for: "+a.toS
tring()));return c},$8:function(a,
b){var c=a;if(10===a.get_addressType())return a;if(10===b.get_addressType())retu
rn b;1===a.get_addressType()?c=0===String.compare(this.$0.liveId,a.get_address()

)?b:a:8===a.get_addressType()?c=0===String.compare(this.$0.skypeId,a.get_address
())?b:a:11===a.get_addressType()&&(c=0===String.compare(this.$0.cid,a.get_addres
s())?b:a);return c},$9:function(a,b){var c=null,c=0===String.compare(this.$0.liv
eId,a.address)&&1===a.type?b:a;return MSM.Mri.createFromIMAddressInfo(c)},$A:fun
ction(a){return MSM.Mri.create(this.$0.liveId,
1,null,null,a.get_networkId()).equals(a,1)}};MSCh.H$7.registerClass("MSCh.H$7",n
ull,MSCh.IMessagingEvents);MSCh.ConversationService.registerClass("MSCh.Conversa
tionService",null,MC.IConversationService,MC.IConversationEvents);MSCh.H$4.regis
terClass("MSCh.H$4");MSCh.H$5.registerClass("MSCh.H$5");MSCh.H$6.registerClass("
MSCh.H$6");MSCh.PersistencedConversationService.registerClass("MSCh.Persistenced
ConversationService",MSCh.ConversationService,MC.IPersistedConversationService);
MSCh.H$8.registerClass("MSCh.H$8");
MSCh.H$3.registerClass("MSCh.H$3");MSCh.H$9.registerClass("MSCh.H$9",MSCh.H$3);M
SCh.H$B.registerClass("MSCh.H$B",MSCh.H$3);MSCh.H$2.registerClass("MSCh.H$2");MS
Ch.H$A.registerClass("MSCh.H$A",MSCh.H$2);MSCh.H$C.registerClass("MSCh.H$C",MSCh
.H$A);MSCh.H$D.registerClass("MSCh.H$D",MSCh.H$A);MSCh.H$10.registerClass("MSCh.
H$10",MSCh.H$D);MSCh.H$F.registerClass("MSCh.H$F",MSCh.H$A);MSCh.H$E.registerCla
ss("MSCh.H$E",MSCh.H$A);MSCh.MessagingContext.registerClass("MSCh.MessagingConte
xt");MSCh.MessagingService.registerClass("MSCh.MessagingService",
null,MSCh.IMessagingService);MSCh.H$4.$3=RegExp(':-/|O:-\\)|:-&|\\(:\\||:X|>:\\)
|X-\\(|:\\(\\(|:-B|:-\\$|:">|:-\\?|B-\\)|:-\\*|/:\\)|8-\\||=\\(\\(|<:-P',"ig");M
SCh.H$D.$13="<circle><roster><id>IM</id>{0}</roster></circle>";Type.registerName
space("MSCr");MSCr.O$0=function(){};MSCr.O$0.prototype={$0:0,$1:1,$2:2};MSCr.O$0
.registerEnum("MSCr.O$0",!1);MSCr.O$2=function(){};MSCr.O$2.prototype={$0:0,$1:1
,$2:2,$3:4,$4:8};MSCr.O$2.registerEnum("MSCr.O$2",!0);MSCr.O$1=function(){};MSCr
.O$1.prototype={$0:0,
$1:1,$2:2,$3:4,$4:8,$5:16,$6:32,$7:64,$8:128,$9:256,$A:512,$B:1024};MSCr.O$1.reg
isterEnum("MSCr.O$1",!0);MSCr.O$9=function(a,b){MSCr.O$9.initializeBase(this);th
is.$D=a;this.$E=b};MSCr.O$9.prototype={$D:null,$E:null,$6:function(){this.$9()},
$A:function(){this.$E.onABChangeNotificationReceived(this.$D)}};MSCr.O$15=functi
on(a,b){MSCr.O$15.initializeBase(this);this.$D=a;this.$E=b};MSCr.O$15.prototype=
{$D:null,$E:null,$6:function(){this.$9()},$A:function(){this.$E.onAlertNotificat
ionReceived(this.$D)}};
MSCr.O$16=function(a,b,c,d){MSCr.O$16.initializeBase(this);this.$F=c;this.$E=b;t
his.$10=MC.$create_IdentityInfo(d,null);this.$D=a;this.$13=0};MSCr.O$16.prototyp
e={$D:null,$E:null,$F:null,$10:null,$11:null,$12:null,$13:0,$14:0,get_$15:functi
on(){return this.$12},$6:function(){this.$16(0)},$A:function(){this.$12=MC.$crea
te_InitializeServiceResult(this.$10,this.$11,this.$14)},$16:function(a){this.$14
=a;0!==a?this.$9():0===this.$13?this.$17():1===this.$13?this.$18():2===this.$13&
&this.$9()},$17:function(){this.$D.initializeUserStorage(null,
this.$10.liveId,ss.Delegate.create(this,function(a){this.$13=1;this.$16(a?0:1)})
)},$18:function(){this.$E.getSettings(this.$F,ss.Delegate.create(this,this.$19))
},$19:function(a,b){this.$11=0===a?b:null;this.$13=2;this.$16(0)}};MSCr.O$17=fun
ction(a,b){MSCr.O$17.initializeBase(this);this.$D=a;this.$E=b};MSCr.O$17.prototy
pe={$D:null,$E:null,$6:function(){this.$D.onDatagramReceived(this.$E)},$A:functi
on(){}};MSCr.O$14=function(a,b){MSCr.O$14.initializeBase(this);this.$D=a;this.$E
=b};MSCr.O$14.prototype=
{$D:null,$E:null,$6:function(){this.$9()},$A:function(){this.$D.onInstancesChang
ed(this.$E)}};MSCr.O$11=function(a,b){MSCr.O$11.initializeBase(this);this.$E=b;t
his.$D=a};MSCr.O$11.prototype={$D:null,$E:null,$6:function(){this.$E.onMailNotif
ication(this.$D)},$A:function(){}};MSCr.O$12=function(a,b,c,d){MSCr.O$12.initial
izeBase(this);this.$D=a;this.$E=b;this.$F=c;this.$10=d};MSCr.O$12.prototype={$D:
null,$E:0,$F:null,$10:null,$6:function(){this.$9()},$A:function(){this.$F.onNetw
orkStatusChanged(this.$D,
this.$E);this.$10.onNetworkStatusChanged(this.$D,this.$E)}};MSCr.O$13=function(a
,b){MSCr.O$13.initializeBase(this);this.$D=a;this.$E=b};MSCr.O$13.prototype={$D:
null,$E:null,$F:0,get_$10:function(){return this.$D},get_$11:function(){return t
his.$F},$6:function(){this.$E.reauthenticate(ss.Delegate.create(this,this.$12))}
,$A:function(){0!==this.$F?this.$D.fail():this.$D.retry()},$12:function(a){this.
$F=a;0!==this.$F?this.$8():this.$9()}};MSCr.O$1C=function(a,b,c,d){MSCr.O$1C.ini

tializeBase(this);this.$D=
a;this.$E=b;this.$F=c;this.$10=d};MSCr.O$1C.prototype={$D:null,$E:null,$F:null,$
10:null,$6:function(){this.$E.sendDatagram(this.$D,ss.Delegate.create(this,this.
$11))},$A:function(){},$11:function(a,b){null!=this.$F&&this.$F.invoke(a,b)}};MS
Cr.O$1D=function(a,b,c){MSCr.O$1D.initializeBase(this);this.$F=a;this.$D=b;this.
$E=c};MSCr.O$1D.prototype={$D:null,$E:null,$F:null,$6:function(){this.$D.getConv
ersationHistory(this.$F,ss.Delegate.create(this,this.$10))},$A:function(){},$10:
function(a){null!=this.$E&&
this.$E.invoke(a);this.$9()}};MSCr.O$5=function(){};MSCr.O$5.prototype={$0:null,
$1:!1,$2:!1,$3:!1,get_$4:function(){return this.$2},$5:function(){this.$0=Date.g
et_now();this.$1=!0;this.$6()},$7:function(){this.$3||(this.$3=!0,this.$A())},$8
:function(){this.$3||(this.$3=!0,this.$A())},$9:function(){this.$3||(this.$2=thi
s.$3=!0,this.$A(),null!=this.$C&&this.$C.invoke(this,ss.EventArgs.Empty))},add_$
B:function(a){this.$C=ss.Delegate.combine(this.$C,a)},remove_$B:function(a){this
.$C=ss.Delegate.remove(this.$C,
a)},$C:null};MSCr.O$1E=function(a,b,c,d,e){MSCr.O$1E.initializeBase(this);this.$
D=a;this.$E=b;this.$F=c;this.$10=d;this.$11=e};MSCr.O$1E.prototype={$D:null,$E:n
ull,$F:null,$10:null,$11:null,get_$12:function(){return this.$D},$6:function(){t
his.$9()},$A:function(){var a=this.$10.serviceDataChanged(this.$D,this.$E,!1);1=
==this.$D.type&&this.$D.address===this.$F.liveId&&(a=this.$E.toArray());this.$11
.onServiceDataChanged(this.$D,a)}};MSCr.O$1B=function(a,b,c,d,e,f,g,h){MSCr.O$1B
.initializeBase(this);
this.$D=a;this.$E=b;this.$14=c;this.$F=d;this.$10=e;this.$11=f;this.$12=g;this.$
13=h};MSCr.O$1B.prototype={$D:null,$E:null,$F:null,$10:null,$11:null,$12:null,$1
3:null,$14:null,$15:0,$16:!1,$17:!1,$6:function(){this.$18();this.$9()},$A:funct
ion(){this.$17&&this.$1B()},$18:function(){if(1!==this.$D.type||this.$D.address!
==this.$F.liveId)this.$17=!0;else if(this.$1A(),0===this.$15||this.$10.get_switc
hingServices())this.$16&&this.$1B(),0!==this.$15&&this.$10.set_switchingServices
(!1),this.$19();else switch(this.$10.get_services()){case 3:this.$16&&
this.$1B();this.$14.updateServices(1,!1,null);break;default:this.$14.signOut(1,n
ull,!1,null)}},$19:function(){if(!(0===this.$15&&(0===this.$10.get_services()||3
===this.$10.get_services()))&&!(1<(new MC.ServiceDataSet(this.$10.getServiceData
Info(this.$D))).imServiceData.getAllEndpoints().length)){var a=MC.ServiceData.cr
eateEmpty(2);a.set_status(1);this.$13.onServiceDataChanged(this.$D,[a.get_info()
])}},$1A:function(){this.$15=0;for(var a=ss.IEnumerator.getEnumerator(this.$E.to
ServiceDataArray());a.moveNext();){var b=
a.get_current();null!=b.getEndpoint(this.$F.endpointId)&&(this.$15|=b.get_servic
e(),b.deleteEndpoint(this.$F.endpointId));0!==b.getAllEndpoints().length&&(this.
$16=!0)}},$1B:function(){this.$10.serviceDataChanged(this.$D,this.$E,!0);this.$1
3.onServiceDataDeleted(this.$D,this.$E.toArray())}};MSCr.O$18=function(a,b){MSCr
.O$18.initializeBase(this);this.$D=a;this.$E=b};MSCr.O$18.prototype={$D:null,$E:
null,$6:function(){this.$9()},$A:function(){this.$E.onSettingsChanged(this.$D)}}
;MSCr.O$19=function(a,
b,c,d,e){MSCr.O$19.initializeBase(this);this.$D=a;this.$E=b;this.$F=c;this.$10=d
;this.$11=e};MSCr.O$19.prototype={$D:null,$E:null,$F:0,$10:0,$11:0,$6:function()
{this.$D.close(2===this.$F);this.$9()},$A:function(){this.$E.onSignedOutRemotely
(this.$10,this.$11)}};MSCr.O$1A=function(a,b,c,d,e,f,g,h,i,j){MSCr.O$1A.initiali
zeBase(this);this.$16=a.clone();this.$17=b;this.$11=c;this.$12=d;this.$18=f;this
.$D=g;this.$F=h;this.$E=i;this.$13=j;this.$14=MSCo.Configuration.get_clientDomai
n();this.$19=Date.get_now();
this.$10=e};MSCr.O$1A.prototype={$D:null,$E:null,$F:null,$10:null,$11:!1,$12:nul
l,$13:null,$14:null,$15:0,$16:null,$17:0,$18:null,$19:null,$1A:0,get_$1B:functio
n(){return this.$25(2)&&!this.$25(4)},$1C:function(a,b){this.$D.authenticate(thi
s.$14,a,this.$17,b,ss.Delegate.create(this,this.$1F))},$1D:function(){this.get_$
1B()||(MSH.Logger.logWarning(this.$D.get_logContext(),"SignInCommand.OnDisconnec
ted","Error Disconnected"),this.$22(1))},$6:function(){this.$22(0)},$A:function(
){null!=this.$E&&(0===
this.$1A?this.$23():3===this.$1A&&this.$18.expire(),this.$E.onSignedIn(this.$1A,
MSH.DateTimeHelper.subtract(Date.get_now(),this.$19).toString(),this.$D.get_serv
erName(),this.$10.skypeId,this.$13))},$1E:function(){this.$D.authenticate(this.$

14,null,this.$17,null,ss.Delegate.create(this,this.$1F))},$1F:function(a){if(0!=
=a)switch(a){case 4:if(!this.$11||this.$25(2)){this.$22(3);break}this.$15|=2;thi
s.$22(0);break;default:this.$22(1)}else this.$15|=1,this.$22(0)},$20:function(a)
{0!==a?this.$22(3):(this.$15|=
4,this.$1E())},$21:function(a){this.$15|=8;0!==a?this.$22(1):this.$22(0)},$22:fu
nction(a){0!==a?(this.$1A=a,this.$8()):0===this.$15?this.$1E():this.$25(8)?(this
.$11||this.$D.getRecentConversations(null),this.$1A=0,this.$9()):this.$25(1)?thi
s.$D.signIn(this.$16,this.$17,this.$12,ss.Delegate.create(this,this.$21)):this.$
25(2)&&this.$F.reauthenticate(ss.Delegate.create(this,this.$20))},$23:function()
{this.$18.set_messengerSessionState(this.$24());this.$18.set_messengerSessionEve
nts(MC.$create_MessengerSessionEvents([]))},
$24:function(){var a=this.$D.getSession();return MC.$create_MessengerSessionStat
e(a.server,a.sessionToken,a.transactionID,this.$17,!1,this.$10)},$25:function(a)
{return(this.$15&a)===a}};MSCr.O$10=function(a,b,c,d,e,f,g,h,i){MSCr.O$10.initia
lizeBase(this);this.$D=a;this.$E=b;this.$F=c;this.$10=d;this.$11=e;this.$12=f;th
is.$13=h;this.$14=i;this.$16=g};MSCr.O$10.prototype={$D:null,$E:0,$F:null,$10:!1
,$11:null,$12:null,$13:null,$14:null,$15:0,$16:null,get_$17:function(){return 1=
==(this.$E&1)},$6:function(){this.get_$17()&&
this.$12.close(!0);this.$11.signOut(this.$D,this.$E,this.$F,this.$10,ss.Delegate
.create(this,this.$18))},$A:function(){if(this.get_$17())this.$16.onSignedOut(th
is.$10?1:0);if(this.$10)this.$13.onSignedOutRemotely(1,-1);else this.$13.onSigne
dOut(this.$15,this.$E,this.$14)},$18:function(a){0===a?(this.$15=0,this.$9()):(t
his.$15=1,this.$8())}};MSCr.O$A=function(a,b,c,d,e){MSCr.O$A.initializeBase(this
);this.$D=a;this.$E=b;this.$F=d;this.$10=e};MSCr.O$A.prototype={$D:null,$E:null,
$F:null,$10:null,get_$11:function(){return this.$D},
get_$12:function(){return this.$E},$6:function(){this.$9()},$A:function(){this.$
10.onDisconnected(0,6,0)}};MSCr.O$8=function(a,b,c,d,e,f,g){MSCr.O$8.initializeB
ase(this);this.$D=a;this.$14=this.$E=b;this.$F=c;this.$11=e;this.$13=f;this.$10=
d;this.$15=g};MSCr.O$8.prototype={$D:null,$E:0,$F:null,$10:null,$11:null,$12:0,$
13:null,$14:0,$15:!1,$6:function(){this.$15?this.$F.updateIMAvailability(null,2=
==this.$14?3:4,this.$D,ss.Delegate.create(this,this.$17)):this.$10.updateNetwork
s(this.$D,this.$E,ss.Delegate.create(this,
this.$16))},$A:function(){this.$11.onUpdateNetworkCompleted(this.$12,this.$D,thi
s.$E)},$16:function(a){this.$12=0===a?0:9;this.$9()},$17:function(a){0===a?this.
$10.updateNetworks(this.$D,this.$E,ss.Delegate.create(this,this.$16)):(this.$12=
8,this.$9())}};MSCr.O$6=function(a,b,c,d,e,f){MSCr.O$6.initializeBase(this);this
.$D=a;this.$E=b;this.$F=c;this.$10=d;this.$11=e;this.$12=f};MSCr.O$6.prototype={
$D:null,$E:null,$F:null,$10:null,$11:null,$12:null,$13:!1,$14:0,$6:function(){va
r a=MC.$create_IMAddressInfo(this.$E.liveId,
1,0),b=new MC.ServiceDataSet(this.$F.getServiceDataInfo(a)),b=MC.ServiceDataSet.
createMessengerUpdate(b,this.$D);this.$15(b);this.$F.serviceDataChanged(a,b,!1);
this.$10.publishServiceData(b,this.$F.get_services(),ss.Delegate.create(this,thi
s.$16))},$A:function(){this.$11.onUserServiceDataUpdated(this.$14,this.$12)},$15
:function(a){null!=a.imServiceData&&a.imServiceData.getEndpoint(this.$E.endpoint
Id).set_domain(MSCo.Configuration.get_domainName())},$16:function(a){this.$13||(
this.$13=!0,0!==a?(this.$14=
1,this.$8()):(this.$14=0,this.$9()))}};MSCr.O$7=function(a,b,c,d,e,f,g,h,i){MSCr
.O$7.initializeBase(this);this.$13=MC.$create_IMAddressInfo(b.liveId,1,0);this.$
E=d;this.$F=e;this.$10=f;this.$17=g;this.$11=h;this.$16=b;this.$D=a;this.$12=c;t
his.$18=i};MSCr.O$7.prototype={$D:0,$E:null,$F:null,$10:null,$11:null,$12:null,$
13:null,$14:0,$15:0,$16:null,$17:null,$18:!1,get_$19:function(){return this.$D},
$6:function(){this.$15=this.$23(this.$12.get_services(),this.$D);this.$12.set_sw
itchingServices(4===(this.$15&
4));this.$1A()},$A:function(){this.$12.set_services(this.$D);if(this.$18)this.$1
1.onUserServicesUpdated(this.$14);else this.$11.onServicesChanged(this.$D)},$1A:
function(){if(1===this.$14)this.$8();else if(2===(this.$15&2))this.$1B();else if
(512===(this.$15&512))this.$E.updateBuddySubscriptions(2,ss.Delegate.create(this
,this.$28));else if(1024===(this.$15&1024)){if(null!=this.$17)for(var a=ss.IEnum
erator.getEnumerator(this.$17);a.moveNext();){var b=a.get_current();this.$E.upda
teNetworks(MSH.StringHelper.toLowerCase(b),

1,ss.Delegate.create(this,this.$26))}}else if(128===(this.$15&128))this.$E.updat
eBuddySubscriptions(4,ss.Delegate.create(this,this.$29));else if(256===(this.$15
&256)){if(null!=this.$17)for(a=ss.IEnumerator.getEnumerator(this.$17);a.moveNext
();)b=a.get_current(),this.$E.updateNetworks(MSH.StringHelper.toLowerCase(b),2,s
s.Delegate.create(this,this.$26))}else 32===(this.$15&32)?this.$1F():16===(this.
$15&16)?this.$1E():4===(this.$15&4)?this.$1C():64===(this.$15&64)?this.$20():8==
=(this.$15&8)?this.$1D():
this.$9()},$1B:function(){var a=this.$12.getServiceDataInfo(this.$13);null!=a&&0
<a.length?(a=new MC.ServiceDataSet(a),1===a.imServiceData.get_status()&&a.imServ
iceData.set_status(2),this.$E.publishServiceData(a,this.$D,ss.Delegate.create(th
is,this.$24))):this.$24(0)},$1C:function(){var a=this.$16.endpointId,b=MC.Servic
eDataSet.create();b.addEndpoint(MC.ServiceEndpointData.createEmpty(2,a));b.addEn
dpoint(MC.ServiceEndpointData.createEmpty(4,a));b.addEndpoint(MC.ServiceEndpoint
Data.createEmpty(1,a));
this.$E.deleteServiceData(b,ss.Delegate.create(this,this.$25))},$1D:function(){v
ar a=this.$12.getServiceDataInfo(this.$13);if(null!=a&&0<a.length)this.$11.onSer
viceDataChanged(this.$13,a);this.$2A(0,8)},$1E:function(){for(var a=this.$12.get
LocalNetworkServiceData(),a=ss.IEnumerator.getEnumerator(a);a.moveNext();){var b
=a.get_current();this.$10.onServiceDataDeleted(b[0],b[1])}for(var a=this.$12.get
ServiceDataInfo(this.$13),b=!1,c=0;c<a.length;c++)Object.keyExists(a[c].endpoint
Data,this.$16.endpointId)&&
delete a[c].endpointData[this.$16.endpointId],0<Object.getKeyCount(a[c].endpoint
Data)&&(b=!0);if(b)this.$10.onServiceDataDeleted(this.$13,new MC.ServiceDataSet(
a));this.$2A(0,16)},$1F:function(){this.$F.close(!0);this.$2A(0,32)},$20:functio
n(){this.$12.get_localStorage().refreshConversationData(ss.Delegate.create(this,
this.$21))},$21:function(){var a=this.$12.get_localStorage().get_conversations()
;if(null!=a){this.$F.onPersistedConversationsLoaded(a);var b={},c=this.$22(a,b);
this.$11.onPersistedConversationsLoaded(a,
c,b,!0)}this.$2A(0,64)},$22:function(a,b){for(var c=Array(a.conversations.length
),d=0,e=ss.IEnumerator.getEnumerator(a.conversations);e.moveNext();){var f=e.get
_current().id,g=this.$12.get_localStorage().getConversationPersistedMessages(f),
h=this.$12.get_localStorage().getLastMessage(f);null!=h&&(b[f]=h);c[d++]=MC.$cre
ate_ConversationMessages(f,g)}return c},$23:function(a,b){3===a&&(a=0);3===b&&(b
=0);if(2===a){if(0===b)return 1098;if(1===b)return 144}else if(0===a){if(2===b)r
eturn 164;if(1===b)return 436}else if(1===
a){if(2===b)return 512;if(0===b)return 1610}return 0},$24:function(a){this.$2A(a
,2)},$25:function(a){this.$2A(a,4)},$26:function(a){this.$2A(a,1024)},$27:functi
on(a){this.$2A(a,256)},$28:function(a){this.$2A(a,512)},$29:function(a){this.$2A
(a,128)},$2A:function(a,b){0!==a&&(this.$14=1);this.$15&=~b;this.$1A()}};MSCr.O$
4=function(){};MSCr.O$4.$0=function(a,b){for(var c=a.events,d={},e=c.length-1;0<
=e;e--){var f=c[e];if("OnServiceData

You might also like