
kerio.waw.ui.interfaceList = {

x_m: function(x_n) {
var
x_2w = x_n + '_',
x_x = kerio.lib.x_x,
x_3q = (x_r.x_3s.x_3t === x_r.x_3s.x_3u),
x_o = (kerio.waw.status.x_p.x_q === x_r.x_s.x_t); 

var x_12t = function (x_1o, x_47) {
return x_fi.x_kg(x_1o, x_47);
}; 
var x_12u = function (x_1o, x_eo, x_fl, x_12v, x_3l) {
if (undefined === x_1o) {
return {
x_47: ''
};
}

var
x_1n,
x_60;
if (x_1o.localizable) {
x_1n = x_fi.x_qm(x_1o.localizableMessage);
} else {
x_1n = x_1o.fixedMessage;
}
if (x_r.x_kh.x_12w === x_eo.type            && x_r.x_12x.x_12y === x_eo.linkStatus  && true === x_eo.enabled ) {                                            x_3l.x_12z = x_1n;
}
return {
x_47: x_1n
};
};
var x_oy = function (x_1o, x_47) {
var x_fk = x_1o;
return {
x_47: x_fa.x_130[x_fk]
};
};
var x_131 = function (x_1o, x_47) {
var x_3l = this;
var x_132 = x_r.x_12q;
var x_121 = x_3l.x_121;
var x_120 = x_47.connectivityParameters;
if ((x_47.group !== x_r.x_133.x_134) || (x_132.x_12r === x_121)
|| (undefined === x_120)) {
return { x_47: x_1o};
}
var x_x = kerio.lib.x_x;
switch (x_121) {
case x_132.x_135:
x_1o = (x_120.onDemand ? x_3l.x_136 : '');
break;
case x_132.x_137:
x_1o = x_3l.x_138[x_120.failoverRole];
break;
case x_132.x_139:
x_1o = x_x(	'Balancing %1 %2',
'interfaceList',
{x_49: [x_120.downBandwidth,
x_3l.x_13a[x_120.downBandwidthUnit]]});
break;
}return {
x_47: x_1o
};
};
var x_13b = {
x_gz:  'x_13c',
x_gx: {
x_13c: {
x_gc: ''
},
x_13d: {
x_gc: '',
x_cy: 'statusBarIcon ipVpnCollision'
}
}
};
var x_60 = new kerio.lib.x_h1(x_2w + 'x_60', x_13b);
var x_13e = 'group';
var x_5o = {
x_5q: false,
x_o: x_o,
x_5s: 'x_kl',
x_1p: 'removePadding interfaceList', x_60: x_60,
x_51: {
x_55: x_x('Add VPN Tunnel…', 'interfaceList')
},
x_53: (x_3q)
? {
x_55: {
x_1j: 'x_56',
x_23: x_x('Add…', 'common'),
x_13f: true, x_1e: [
{
x_1j: 'x_13g',
x_cy: 'interfaceIcon interfaceRas',
x_23: x_x('PPPoE…', 'interfaceList'),
x_25: this.x_13h
},
{
x_1j: 'x_13i',
x_cy: 'interfaceIcon interfaceRas',
x_23: x_x('PPTP…', 'interfaceList'),
x_25: this.x_13h
},
{
x_1j: 'x_13j',
x_cy: 'interfaceIcon interfaceVpnTunnel',
x_23: x_x('VPN Tunnel…', 'interfaceList'),
x_25: this.x_13h
}
]
}
}
: {} , x_5x: {
x_d2: {
x_7s: 'name'
},
x_nh: {
x_7s: x_13e,
x_ni: true
},
x_1e: [
{x_7s: x_13e  ,  x_gn: true, x_na: kerio.waw.shared.x_3e.x_8q.x_13k}, {x_7s: 'type'         ,  x_7t: true},
{x_7s: 'id'           ,  x_7t  : true},
{x_7s: 'name'         ,  x_23: x_x('Name', 'common')                , x_1u: 240,
x_13l: {
x_7s: 'type',
x_13m: [x_r.x_kh.x_13n]
},
x_7u: x_12t
},
{x_7s: 'ip'           ,  x_23: x_x('IP Address', 'interfaceList')   , x_1u: 100},
{x_7s: 'subnetMask'   ,  x_23: x_x('Mask', 'common')                , ak_width: 100},
{x_7s: 'linkStatus'       ,  x_23: x_x('Status', 'common')          , ak_width: 120,	x_7u: x_oy},
{x_7s: 'internet'     ,  x_23: x_x('Internet', 'common')            , ak_width: 200, 	x_7u: x_131},
{x_7s: 'details'      ,  x_23: x_x('Details', 'common')             , ak_width: 300, 	x_7u: x_12u},
{x_7s: 'gateway'      ,  x_23: x_x('Gateway', 'common')             , ak_width: 100, 	x_1m: true},
{x_7s: 'dnsServers'   ,  x_23: x_x('DNS', 'common')                 , ak_width: 100, 	x_1m: true},
{x_7s: 'mac'          ,  x_23: x_x('MAC', 'interfaceList')          , ak_width: 120, 	x_1m: true},
{x_7s: 'systemName'   ,  x_23: x_x('System Name', 'interfaceList')  , ak_width: 200, 	x_1m: true},
{x_7s: 'flags'   ,  x_7t: true},
{x_7s: 'status'   ,  x_7t: true},
{x_7s: 'connectivityParameters'   ,  x_7t: true},
{x_7s: 'status'              ,  x_7t: true},
{x_7s: 'dnsAutodetected'     ,  x_7t: true},
{x_7s: 'gatewayAutodetected' ,  x_7t: true},
{x_7s: 'enabled'             ,  x_7t: true},
{x_7s: 'dhcpEnabled'         ,  x_7t: true},
{x_7s: 'ras'                 ,  x_7t: true},
{x_7s: 'vpn'                 ,  x_7t: true},
{x_7s: 'server'              ,  x_7t: true},
{x_7s: 'tunnel'              ,  x_7t: true}
]
}, x_6h: {
x_5g:     'interfaceEditor',
x_6i:  'x_13o',
x_6k: 'x_13p',
x_6j: 'x_13q'
},
x_6m: 'ids',
x_65: {
x_68: 'interfaces',
x_66: {
object: 'InterfaceManager',
sortByGroup: true
}
},

x_2d: function(x_3l, x_6q) {
var
x_60 = x_3l.x_60,
x_1n = x_3l.x_12z;
if (!x_3l.x_13r) {
x_60.x_ix(x_1n ? 'x_13d' : 'x_13c');
x_60.x_13s(x_1n);
x_3l.x_12z = '';
}
x_3l.x_13t();
x_fi.x_3j();
}, x_32: {
x_5a: [
{
x_1j: 'x_13u',
x_23: x_x('Dial', 'interfaceList'),
x_31: true,

x_25: function(x_32) {
var x_3l = x_32.x_2p;
var x_47 = x_3l.x_3v.x_40[0].x_47;
var x_12x = x_r.x_12x;
var x_13v = x_47.flags;
var x_13w = x_47.linkStatus;
this.x_lc('x_13u'); var x_13x;
if (x_13v.dialable) {
x_13x = 'dial';
x_47.linkState = x_12x.x_13y;
}
else if (x_13v.hangable) {
x_13x = 'hangup';
x_47.linkState = x_12x.x_13z;
}
else {
return; }
var x_j4 = {
x_28: {
object: 'InterfaceManager',
method: x_13x,
params: kerio.lib.x_6r({interfaceId: x_47.id})
},
x_ma: true,
x_2q: x_32,
x_2e: x_3l.x_140,
x_2s: {
x_141: x_13w,
x_142: x_47.id,
x_143: x_47.name
}
};
kerio.lib.x_6t.x_6u(x_j4);
}
}
],

x_4c: function(x_4d, x_4e) {
if ( ! (x_4d instanceof kerio.lib.x_4g) || (x_4d.x_4k.x_4l !== x_4e.x_1f)
|| (1 !== x_4d.x_3v.x_46)) {
return true;
}
var x_144 = x_r.x_12x;
var x_145 = x_4d.x_3v.x_40[0].x_47;
this.x_lc('x_13u', true);
this.x_146('x_13u', x_fa.x_v3.x_147);
if (x_r.x_kh.x_13n === x_145.type) {
return false; }
var x_148 = x_145.flags;
if (x_148.dialable) {
this.x_3b('x_13u');
}
else if (x_148.hangable) {
this.x_3b('x_13u');
this.x_146('x_13u', x_fa.x_v3.x_149);
} x_4d.x_4o = !x_148.deletable;
} } }; var x_3l = new kerio.waw.shared.x_17.x_3c(x_2w + 'x_3l', x_5o);
var x_14a = x_r.x_133;
var x_14b = [
x_14a.x_134,
x_14a.x_14c,
x_14a.x_14d,
x_14a.x_14e
];
var x_14f = [];
var x_14g;
var x_14h = x_r.x_133.x_14d;
for (var x_41 = 0, x_42 = x_14b.length; x_41 < x_42; x_41++) {
x_14g = x_14b[x_41];
if (x_14h === x_14g) {
continue; }
x_14f[x_14g] = [x_14g, x_r.x_kh.x_13n];
}
var x_14i = x_r.x_14j;
var x_13a = [];
x_13a[x_14i.x_14k] = x_x('b/s', 'common');
x_13a[x_14i.x_14l] = x_x('B/s', 'common');
x_13a[x_14i.x_14m] = x_x('kbit/s', 'common');
x_13a[x_14i.x_14n] = x_x('kB/s', 'common');
x_13a[x_14i.x_14o] = x_x('Mbit/s', 'common');
x_13a[x_14i.x_14p] = x_x('MB/s', 'common');
var x_14q = x_r.x_14r;
var x_138 = [];
x_138[x_14q.x_7c]      = '';
x_138[x_14q.x_14s]   = x_x('Primary', 'interfaceList');
x_138[x_14q.x_14t] = x_x('Secondary', 'interfaceList');
var x_14u = x_r.x_12q;
var x_a0 = kerio.lib.x_a1(
{	x_a2: 325,
cs: 250,
en: 250,
zh: 250,
ja: 295,
sk: 290,
de: 300,
es: 320,
it: 320,
pl: 320,
hr: 335,
nl: 330,
hu: 345,
pt: 360,
ru: 400
});
var x_1d = {
x_1e: [
{	x_1f: 'x_79',
x_1v: 80,
x_23: x_x('Internet Connectivity', 'interfaceList'),
x_1l: true,
x_1e: [
{	x_1f: 'x_1i',
x_1o: x_x('Select an option of how the firewall is connected to the Internet:', 'interfaceList')
},
{
x_1f: 'x_b3',
x_1e: [
{	x_1f: 'x_9u',
x_1j: 'x_121',
x_31: x_o,
x_1u: x_a0,
x_1l: true,
x_5z: [
{x_23: x_x('A Single Internet Link - Persistent', 'interfaceList'), x_1o: x_14u.x_12r},
{x_23: x_x('A Single Internet Link - Dial on Demand', 'interfaceList'), x_1o: x_14u.x_135},
{x_23: x_x('Multiple Internet Links - Failover', 'interfaceList'), x_1o: x_14u.x_137},
{x_23: x_x('Multiple Internet Links - Traffic Load Balancing', 'interfaceList'), x_1o: x_14u.x_139}
],
x_a5: 'x_23',
x_a7: 'x_1o',

x_9t: function(x_1c, x_ax, x_1o) {
kerio.waw.status.x_14.x_15(true);
var x_3l = x_1c.x_3l;
x_3l.x_121 = x_1o;
x_1c.x_121 = x_1o;
x_1c.x_2k(['x_rm'], x_1o !== x_r.x_12q.x_12r);
x_3l.x_hg();
}
},
{
x_1f: 'x_rc',
x_1j: 'x_rm',
x_1m: true, x_23: x_x('Advanced…', 'common'),

x_25: function(x_1c) {
var x_14v = 'interfaceAdvancedEditor';
var x_uj = 'x_115';
if (x_r.x_12q.x_135 === x_1c.x_121) {
x_uj = 'x_14w';
}
kerio.lib.x_5l.x_5m({
x_5g: x_14v,
x_n: x_uj,
x_28: {
x_9d: x_1c,
x_2e: x_1c.x_14x,
x_47: x_1c.x_o5
}
});
}
}
]
}
]
},
{	x_1f: 'x_1g',
x_1j: 'x_x8',
x_1x: x_3l
}
]
};var x_1c = new kerio.lib.x_1t(x_2w + 'x_1c', x_1d);
x_1c.x_27({x_3l: x_3l,
x_32: x_3l.x_32,
x_14y: x_1c.x_29('x_121'),
x_o: x_o
});
x_3l.x_27({x_1c: x_1c,
x_3q: x_3q,
x_14f: x_14f,
x_13e: x_13e,
x_14b: x_14b,
x_14y: x_1c.x_29('x_121'),
x_136: x_x('Dial on Demand', 'interfaceList'),
x_13a: x_13a,
x_138: x_138,
x_121: x_14u.x_12r,
x_14z: false,
x_12z: '', x_13r: false, x_150: {}
});
this.x_2a(x_1c);
return x_1c;
}, 
x_2a: function(x_2b) {

x_fa.x_v3 = x_fa.x_x || {};
x_fa.x_v3.x_147 = kerio.lib.x_x('Dial', 'interfaceList');
x_fa.x_v3.x_149 = kerio.lib.x_x('Hang-Up', 'interfaceList');

x_2b.x_2c = function () {
x_fi.x_3f();
var x_14 = kerio.waw.status.x_14;
x_14.x_ia(this.x_o ? undefined : this.x_32);
x_14.x_15(false);
this.x_3l.x_14z = false;
this.x_ez();
}; 
x_2b.x_ez = function() {
var x_da = [
{
object: 'InterfaceManager',
method: 'reset'
},
{
object: 'InterfaceManager',
method: 'getConnectivityConfig'
},
{
object: 'CertificateManager',
method: 'get',
params: {type: x_r.x_151.x_12w}
}
];
var x_f4 = {
x_da: x_da,
x_2q: this,
x_2e: this.x_xl,
x_qj: false, x_2s: {
x_152: 1,x_150: 2,x_153: x_da.length}
};
x_fi.x_db(x_f4);
};
x_2b.x_xl = function(x_6v, x_6w, x_28) {
if (!x_6v.x_6x) {
return;
}
var x_s8 = x_6v.x_ac.batchResult;
if (!x_s8 || Array !== x_s8.constructor || x_28.x_153 !== x_s8.length) {
x_fi.x_j2(kerio.lib.x_x('Error occured in the connection to the server!', 'common')); return;
}
var x_47 = x_s8[x_28.x_152].config || {};
this.x_14y.x_9w(x_47.mode);
this.x_o5 = x_47;
this.x_3l.x_13r = false;
this.x_3l.x_60.x_ix('x_13c');
this.x_3l.x_150 = x_s8[x_28.x_150].certificate || {};
kerio.waw.status.x_14.x_15(false);
this.x_3l.x_6y();
};
x_2b.x_14x = function(x_47) {
x_fi.x_iq(x_47, this.x_o5);
}; var x_3l = x_2b.x_3l;

x_3l.x_5k = function(x_5f, x_5c) {
var
x_154 = kerio.waw.shared.x_3r,
x_155 = x_154.x_kh,
x_156 = x_154.x_157,
x_o = (kerio.waw.status.x_p.x_q === x_154.x_s.x_t),
x_47,
x_5g,
x_n;
if (x_5c) {
x_47 = x_5f.x_28.x_47;
switch (x_47.type) {
case x_155.x_12o:
x_5g = 'interfaceEthernetEditor';
x_n = (x_o ? 'interfaceEthernetView': 'interfaceEthernetEdit');
break;
case x_155.x_158:
x_5g = 'interfaceRasEditor';
if (this.x_3q) {
if (x_156.x_159 === x_47.ras.rasType) {
x_n = (x_o ? 'interfacePPPoEView': 'interfacePPPoEEdit');
}
else {
x_n = (x_o ? 'interfacePPTPView': 'interfacePPTPEdit');
}
}
else {
x_n = (x_o ? 'interfaceRasView': 'interfaceRasEdit');
}
break;
case x_155.x_11w:
x_5g = 'interfaceDialInEditor';
x_n = (x_o ? 'interfaceDialInView': 'interfaceDialInEdit');
break;
case x_155.x_12w:
x_5g = 'interfaceVpnServerEditor';
x_n = (x_o ? 'interfaceVpnServerView': 'interfaceVpnServerEdit');
break;
case x_155.x_15a:
x_5g = 'interfaceVpnTunnelEditor';
x_n = (x_o ? 'interfaceVpnTunnelView': 'interfaceVpnTunnelEdit');
break;
case x_155.x_13n:
return false;
default:
kerio.lib.x_nq('Internal error: Unknown interface cannot be edited!');
return false;
} x_5f.x_5g = x_5g;
x_5f.x_n = x_n;
}
else {
x_5f.x_5g = 'interfaceVpnTunnelEditor';
x_5f.x_n = 'interfaceVpnAdd';
}
}; 
x_3l.x_15b = function(x_7s) {
var
x_fk,
x_42,
x_15c,
x_15d,
x_3l = this,
x_dr = x_3l.x_7i(),
x_15e = x_3l.x_eq(),
x_15f = [];
if (0 === x_15e) {
return x_15f;
}
x_15c = undefined; for (x_fk = 0; x_fk < x_15e; x_fk++) {
x_15d = x_dr[x_fk][x_7s];
if (x_15c !== x_15d) {
x_15c = x_15d;
x_15f[x_15c] = {
x_1o: x_15c,
x_fk: x_fk
};
}
}
return x_15f;
}; 
x_3l.x_15g = function(x_15h, x_15i, x_15j) {
var x_15k;
var x_15l = x_15i.length;
if (0 === x_15l) {
return false;
}
for (x_15k = 0; x_15k < x_15l; x_15k++) {
x_15h.push({
x_fk: x_15j + x_15k,
x_14g: x_15i[x_15k]
});
}
return true;
}; 
x_3l.x_13t = function() {
var x_15m, x_15n, x_15o, x_15p, x_15q, x_15r;
var x_3l = this;
var x_14h = x_r.x_133.x_14d;
var x_13e = x_3l.x_13e;
var x_14b = x_3l.x_14b;
var x_14f = x_3l.x_14f;
var x_15h = [];
var x_15i = [];
var x_15s = x_3l.x_15b(x_13e);
for (x_15q = 0, x_15r = x_14b.length; x_15q < x_15r; x_15q++) {
x_15n = x_14b[x_15q];
x_15m = x_15s[x_15n];
if (undefined !== x_15m) {
if (x_3l.x_15g(x_15h, x_15i, x_15m.x_fk)) {
x_15i = [];
}
}
else {
x_15i.push(x_15n);
}
}
x_3l.x_15g(x_15h, x_15i, x_3l.x_eq() + x_15h.length);
for (x_15o = 0, x_15p = x_15h.length; x_15o < x_15p; x_15o++) {
x_15m = x_15h[x_15o];
x_15n = x_15m.x_14g;
if (x_14h === x_15n) {
continue; }
x_3l.x_ih(x_14f[x_15n], x_15m.x_fk, true);
}
}; 
x_3l.x_140 = function(x_6v, x_6w, x_28) {
var x_1n;
if (x_6v.x_6x) {

}
else {
x_1n = x_6v.x_ac.result;
if (x_1n && x_1n[0]) {
x_fi.x_j2(
x_1n[0].errorMessage,
(x_r.x_12x.x_15t === x_28.x_141)
? 'Hang up response'
: 'Dial response'
); }
} this.x_2p.x_6y();
}; 
x_3l.x_33 = function(x_4x) {
var x_47 = this.x_1c.x_o5;
x_fi.x_3f();
x_47.mode = this.x_1c.x_14y.x_2t();
var x_da = [
{
object: 'InterfaceManager',
method: 'setConnectivityConfig',
params: kerio.lib.x_6r({config: x_47})
},
{
object: 'InterfaceManager',
method: 'apply'
}
];
if (this.x_14z) {
x_da.push({	object: 'VpnRouteManager',
method: 'apply'
});
this.x_14z = false;
}
x_3l.x_32.x_15u = !x_4x;
x_3l.x_32.x_15v = !x_4x;
x_fi.x_db.call(this, x_da, this.x_15w, true, true);
return true; }; 
x_3l.x_35 = function(x_4x) {
var
x_da = [
{
object: 'InterfaceManager',
method: 'reset'
}
],
x_15x = x_fi.x_gu;
if (this.x_14z) {
x_da.push({	object: 'VpnRouteManager',
method: 'reset'
});
this.x_14z = false;
}
if (false !== x_4x) {
x_15x = this.x_15w;
} else {
kerio.waw.status.x_14.x_15(false);
}
x_3l.x_32.x_15u = false;
x_3l.x_32.x_15v = !x_4x;
x_fi.x_db.call(this, x_da, x_15x);
return true; }; 
x_3l.x_15w = function(x_6v) {
var x_ql,
x_s8,
x_41;
if (x_6v.x_6x) {
if (x_3l.x_32.x_15v) {
kerio.waw.status.x_14.x_15y();
}
this.x_1c.x_ez();
}
else {
x_fi.x_3j();
x_ql = x_6v.x_ac.batchResult;
for (x_41 = 0; x_41 < x_ql.length; x_41++) {
x_s8 = x_ql[x_41];
if (!x_s8.returnValue) {
x_fi.x_j2(x_s8.result[0].errorMessage);
return;
}
}
}
}; 
x_3l.x_12s = function(x_s8) {
var
x_60 = this.x_60,
x_1n = '';
if (x_s8 && x_s8.errorMessage) {
x_1n = x_fi.x_qm(x_s8.errorMessage);
}
x_60.x_ix(x_1n ? 'x_13d' : 'x_13c');
x_60.x_13s(x_1n);
};}, 
x_13h: function(x_32, x_g6) {
var
x_3l = x_32.x_2p,
x_1j = x_g6.x_1j,
x_5g,
x_n,
x_5f;
switch (x_1j) {
case 'x_13j':
x_5g = 'interfaceVpnTunnelEditor';
x_n = 'interfaceVpnAdd';
break;
case 'x_13g':
x_5g = 'interfaceRasEditor';
x_n = 'interfacePPPoEAdd';
break;
case 'x_13i':
x_5g = 'interfaceRasEditor';
x_n = 'interfacePPTPAdd';
break;
default:
kerio.lib.x_nq('Internal error: unsupported interface to add.', 'interfaceList', 'openAddDialog');
return;
}
x_5f = {
x_5g: x_5g,
x_n: x_n,
x_28: {
x_5d: x_3l
}
};
kerio.lib.x_5l.x_5m(x_5f);
} }; 